docs: 仓库链接指向本镜像仓库
Build NapCat Artifacts / Type Check & Test (push) Waiting to run

This commit is contained in:
TanTan committed 2026-11-13 09:25:58 +08:00
1 parent f954252a34
commit e311ca3275
35554 files changed
+6229626 -4

No files matched your search

@@ -0,0 +1 @@
{"version":3,"file":"eventemitter3.esm.min.js","sources":["../index.js"],"sourcesContent":["'use strict';\n\nvar has = Object.prototype.hasOwnProperty\n , prefix = '~';\n\n/**\n * Constructor to create a storage for our `EE` objects.\n * An `Events` instance is a plain object whose properties are event names.\n *\n * @constructor\n * @private\n */\nfunction Events() {}\n\n//\n// We try to not inherit from `Object.prototype`. In some engines creating an\n// instance in this way is faster than calling `Object.create(null)` directly.\n// If `Object.create(null)` is not supported we prefix the event names with a\n// character to make sure that the built-in object properties are not\n// overridden or used as an attack vector.\n//\nif (Object.create) {\n Events.prototype = Object.create(null);\n\n //\n // This hack is needed because the `__proto__` property is still inherited in\n // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5.\n //\n if (!new Events().__proto__) prefix = false;\n}\n\n/**\n * Representation of a single event listener.\n *\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} [once=false] Specify if the listener is a one-time listener.\n * @constructor\n * @private\n */\nfunction EE(fn, context, once) {\n this.fn = fn;\n this.context = context;\n this.once = once || false;\n}\n\n/**\n * Add a listener for a given event.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} once Specify if the listener is a one-time listener.\n * @returns {EventEmitter}\n * @private\n */\nfunction addListener(emitter, event, fn, context, once) {\n if (typeof fn !== 'function') {\n throw new TypeError('The listener must be a function');\n }\n\n var listener = new EE(fn, context || emitter, once)\n , evt = prefix ? prefix + event : event;\n\n if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++;\n else if (!emitter._events[evt].fn) emitter._events[evt].push(listener);\n else emitter._events[evt] = [emitter._events[evt], listener];\n\n return emitter;\n}\n\n/**\n * Clear event by name.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} evt The Event name.\n * @private\n */\nfunction clearEvent(emitter, evt) {\n if (--emitter._eventsCount === 0) emitter._events = new Events();\n else delete emitter._events[evt];\n}\n\n/**\n * Minimal `EventEmitter` interface that is molded against the Node.js\n * `EventEmitter` interface.\n *\n * @constructor\n * @public\n */\nfunction EventEmitter() {\n this._events = new Events();\n this._eventsCount = 0;\n}\n\n/**\n * Return an array listing the events for which the emitter has registered\n * listeners.\n *\n * @returns {Array}\n * @public\n */\nEventEmitter.prototype.eventNames = function eventNames() {\n var names = []\n , events\n , name;\n\n if (this._eventsCount === 0) return names;\n\n for (name in (events = this._events)) {\n if (has.call(events, name)) names.push(prefix ? name.slice(1) : name);\n }\n\n if (Object.getOwnPropertySymbols) {\n return names.concat(Object.getOwnPropertySymbols(events));\n }\n\n return names;\n};\n\n/**\n * Return the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Array} The registered listeners.\n * @public\n */\nEventEmitter.prototype.listeners = function listeners(event) {\n var evt = prefix ? prefix + event : event\n , handlers = this._events[evt];\n\n if (!handlers) return [];\n if (handlers.fn) return [handlers.fn];\n\n for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) {\n ee[i] = handlers[i].fn;\n }\n\n return ee;\n};\n\n/**\n * Return the number of listeners listening to a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Number} The number of listeners.\n * @public\n */\nEventEmitter.prototype.listenerCount = function listenerCount(event) {\n var evt = prefix ? prefix + event : event\n , listeners = this._events[evt];\n\n if (!listeners) return 0;\n if (listeners.fn) return 1;\n return listeners.length;\n};\n\n/**\n * Calls each of the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Boolean} `true` if the event had listeners, else `false`.\n * @public\n */\nEventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return false;\n\n var listeners = this._events[evt]\n , len = arguments.length\n , args\n , i;\n\n if (listeners.fn) {\n if (listeners.once) this.removeListener(event, listeners.fn, undefined, true);Line truncated
@@ -0,0 +1,61 @@
# Copyright (c) 2011-2015 Ryan Prichard
#
# 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.
ALL_TARGETS += build/winpty-agent.exe
$(eval $(call def_mingw_target,agent,-DWINPTY_AGENT_ASSERT))
AGENT_OBJECTS = \
build/agent/agent/Agent.o \
build/agent/agent/AgentCreateDesktop.o \
build/agent/agent/ConsoleFont.o \
build/agent/agent/ConsoleInput.o \
build/agent/agent/ConsoleInputReencoding.o \
build/agent/agent/ConsoleLine.o \
build/agent/agent/DebugShowInput.o \
build/agent/agent/DefaultInputMap.o \
build/agent/agent/EventLoop.o \
build/agent/agent/InputMap.o \
build/agent/agent/LargeConsoleRead.o \
build/agent/agent/NamedPipe.o \
build/agent/agent/Scraper.o \
build/agent/agent/Terminal.o \
build/agent/agent/Win32Console.o \
build/agent/agent/Win32ConsoleBuffer.o \
build/agent/agent/main.o \
build/agent/shared/BackgroundDesktop.o \
build/agent/shared/Buffer.o \
build/agent/shared/DebugClient.o \
build/agent/shared/GenRandom.o \
build/agent/shared/OwnedHandle.o \
build/agent/shared/StringUtil.o \
build/agent/shared/WindowsSecurity.o \
build/agent/shared/WindowsVersion.o \
build/agent/shared/WinptyAssert.o \
build/agent/shared/WinptyException.o \
build/agent/shared/WinptyVersion.o
build/agent/shared/WinptyVersion.o : build/gen/GenVersion.h
build/winpty-agent.exe : $(AGENT_OBJECTS)
$(info Linking $@)
@$(MINGW_CXX) $(MINGW_LDFLAGS) -o $@ $^
-include $(AGENT_OBJECTS:.o=.d)
@@ -0,0 +1,19 @@
import { Key, RefObject, ButtonHTMLAttributes } from 'react';
import { Node, DOMAttributes } from '@react-types/shared';
import { TreeState } from '@react-stately/tree';
interface AccordionItemAriaProps<T> {
item: Node<T>;
isDisabled?: boolean;
}
interface AccordionItemAria {
/** Props for the accordion item button. */
buttonProps: ButtonHTMLAttributes<HTMLElement>;
/** Props for the accordion item content element. */
regionProps: DOMAttributes;
}
declare function useReactAriaAccordionItem<T>(props: AccordionItemAriaProps<T>, state: TreeState<T> & {
focusedKey?: Key | null;
}, ref: RefObject<HTMLButtonElement>): AccordionItemAria;
export { type AccordionItemAria, type AccordionItemAriaProps, useReactAriaAccordionItem };
@@ -0,0 +1 @@
{"name":"unist-util-stringify-position","version":"4.0.0","requiresBuild":false,"files":{"license":{"checkedAt":1794532112684,"integrity":"sha512-cQvy4TvDNGTww5W7wo7SHRjv/0G8g3u/v8V2BhwwrAM+M5M2Z7W8hy+cQrU+e4exnULY2LrZ0EQqBk6Fj/Sdrw==","mode":420,"size":1099},"index.js":{"checkedAt":1794532113760,"integrity":"sha512-8c6ME80I0XoO4gsIUjT6Lw1P1TIm/R43wsquAXYnZc5njQFJZ1hNiDWeT/uJJFwyrzBfuJpk+EgR7c38//yqeQ==","mode":420,"size":49},"lib/index.js":{"checkedAt":1794532113760,"integrity":"sha512-INKJ4vw9Qfv4uSdubeF3NxX/c0J9cQEtSZaI0R3BVl1cSigkWyCbNb71VGqSu0dxXKEQjNVBq2J3pLGzupsM6g==","mode":420,"size":2123},"package.json":{"checkedAt":1794532113760,"integrity":"sha512-nhlGS6QOvHkgIYTlYUDKqvtdGiO2CuWx060rPAAMfRLzCPT4L1+8MiCwgIMnevZXP8uDsAQnClPN6FTi5Eg8NQ==","mode":420,"size":2022},"readme.md":{"checkedAt":1794532113760,"integrity":"sha512-LL+oiDZYalVIiklQb+oZpLQnsN9+y1nHSERt/sRKg7Gu4h5e9fJdHC2CWxeaULXc4gGLcdQfhv4NZdLlanlVnQ==","mode":420,"size":6025},"index.d.ts":{"checkedAt":1794532113760,"integrity":"sha512-8c6ME80I0XoO4gsIUjT6Lw1P1TIm/R43wsquAXYnZc5njQFJZ1hNiDWeT/uJJFwyrzBfuJpk+EgR7c38//yqeQ==","mode":420,"size":49},"lib/index.d.ts":{"checkedAt":1794532113761,"integrity":"sha512-185jfKxw0CKvXUdmab0zW+EEM+Q7H8I0vx6B7Ti6WFC3e7+euT6Qu+h967VgH5ZiOwIEywf4anCfbac+WfgE3w==","mode":420,"size":1813}}}
@@ -0,0 +1,36 @@
"use client";
import {
useProviderContext
} from "./chunk-Q3W45BN5.mjs";
// src/hooks/use-label-placement.ts
import { useMemo } from "react";
function useLabelPlacement(props) {
const globalContext = useProviderContext();
const globalLabelPlacement = globalContext == null ? void 0 : globalContext.labelPlacement;
return useMemo(() => {
var _a, _b;
const labelPlacement = (_b = (_a = props.labelPlacement) != null ? _a : globalLabelPlacement) != null ? _b : "inside";
if (labelPlacement === "inside" && !props.label) {
return "outside";
}
return labelPlacement;
}, [props.labelPlacement, globalLabelPlacement, props.label]);
}
function useInputLabelPlacement(props) {
const globalContext = useProviderContext();
const globalLabelPlacement = globalContext == null ? void 0 : globalContext.labelPlacement;
return useMemo(() => {
var _a, _b;
const labelPlacement = (_b = (_a = props.labelPlacement) != null ? _a : globalLabelPlacement) != null ? _b : "inside";
if (labelPlacement === "inside" && !props.label) {
return "outside";
}
return labelPlacement;
}, [props.labelPlacement, globalLabelPlacement, props.label]);
}
export {
useLabelPlacement,
useInputLabelPlacement
};
@@ -0,0 +1,4 @@
import { ContextType } from 'react';
import { PublicContext } from '../store';
export declare function useDndContext(): import("../store").PublicContextDescriptor;
export declare type UseDndContextReturnValue = ContextType<typeof PublicContext>;
@@ -0,0 +1,68 @@
{
"name": "readable-stream",
"version": "3.6.2",
"description": "Streams3, a user-land copy of the stream library from Node.js",
"main": "readable.js",
"engines": {
"node": ">= 6"
},
"dependencies": {
"inherits": "^2.0.3",
"string_decoder": "^1.1.1",
"util-deprecate": "^1.0.1"
},
"devDependencies": {
"@babel/cli": "^7.2.0",
"@babel/core": "^7.2.0",
"@babel/polyfill": "^7.0.0",
"@babel/preset-env": "^7.2.0",
"airtap": "0.0.9",
"assert": "^1.4.0",
"bl": "^2.0.0",
"deep-strict-equal": "^0.2.0",
"events.once": "^2.0.2",
"glob": "^7.1.2",
"gunzip-maybe": "^1.4.1",
"hyperquest": "^2.1.3",
"lolex": "^2.6.0",
"nyc": "^11.0.0",
"pump": "^3.0.0",
"rimraf": "^2.6.2",
"tap": "^12.0.0",
"tape": "^4.9.0",
"tar-fs": "^1.16.2",
"util-promisify": "^2.1.0"
},
"scripts": {
"test": "tap -J --no-esm test/parallel/*.js test/ours/*.js",
"ci": "TAP=1 tap --no-esm test/parallel/*.js test/ours/*.js | tee test.tap",
"test-browsers": "airtap --sauce-connect --loopback airtap.local -- test/browser.js",
"test-browser-local": "airtap --open --local -- test/browser.js",
"cover": "nyc npm test",
"report": "nyc report --reporter=lcov",
"update-browser-errors": "babel -o errors-browser.js errors.js"
},
"repository": {
"type": "git",
"url": "git://github.com/nodejs/readable-stream"
},
"keywords": [
"readable",
"stream",
"pipe"
],
"browser": {
"util": false,
"worker_threads": false,
"./errors": "./errors-browser.js",
"./readable.js": "./readable-browser.js",
"./lib/internal/streams/from.js": "./lib/internal/streams/from-browser.js",
"./lib/internal/streams/stream.js": "./lib/internal/streams/stream-browser.js"
},
"nyc": {
"include": [
"lib/**.js"
]
},
"license": "MIT"
}
@@ -0,0 +1,87 @@
/**
* @author Toru Nagashima
* See LICENSE file in root directory for full license.
*/
"use strict"
const { getTSConfigForContext } = require("./get-tsconfig")
const isTypescript = require("./is-typescript")
/**
* @typedef {string[]} TryExtensions
*/
/** @type {TryExtensions} */
const DEFAULT_JS_VALUE = [".js", ".json", ".node", ".mjs", ".cjs"]
/** @type {TryExtensions} */
const DEFAULT_TS_VALUE = [
".js",
".ts",
".mjs",
".mts",
".cjs",
".cts",
".json",
".node",
]
/**
* Gets `tryExtensions` property from a given option object.
*
* @param {unknown} option - An option object to get.
* @returns {TryExtensions | undefined} The `tryExtensions` value, or `null`.
*/
function get(option) {
if (
option != null &&
typeof option === "object" &&
"tryExtensions" in option &&
Array.isArray(option?.tryExtensions)
) {
return option.tryExtensions.map(String)
}
}
/**
* Gets "tryExtensions" setting.
*
* 1. This checks `options` property, then returns it if exists.
* 2. This checks `settings.n` | `settings.node` property, then returns it if exists.
* 3. This returns `[".js", ".json", ".node", ".mjs", ".cjs"]`.
*
* @param {import('eslint').Rule.RuleContext} context - The rule context.
* @returns {TryExtensions} A list of extensions.
*/
module.exports = function getTryExtensions(context, optionIndex = 0) {
const configured =
get(context.options?.[optionIndex]) ??
get(context.settings?.n) ??
get(context.settings?.node)
if (configured != null) {
return configured
}
if (isTypescript(context) === false) {
return DEFAULT_JS_VALUE
}
const allowImportingTsExtensions =
getTSConfigForContext(context)?.config?.compilerOptions
?.allowImportingTsExtensions
if (allowImportingTsExtensions === true) {
return DEFAULT_TS_VALUE
}
return DEFAULT_JS_VALUE
}
module.exports.schema = {
type: "array",
items: {
type: "string",
pattern: "^\\.",
},
uniqueItems: true,
}
@@ -0,0 +1 @@
{"mappings":";;;;;;AAAA;;;;;;;;;;CAUC,GAOM,SAAS,0CAAa,GAAG,IAA4D;IAC1F,IAAI,KAAK,MAAM,KAAK,KAAK,IAAI,CAAC,EAAE,EAC9B,OAAO,IAAI,CAAC,EAAE;IAGhB,OAAO,CAAC;QACN,IAAI,aAAa;QAEjB,MAAM,WAAW,KAAK,GAAG,CAAC,CAAA;YACxB,MAAM,UAAU,6BAAO,KAAK;YAC5B,eAAA,aAAe,OAAO,WAAW;YACjC,OAAO;QACT;QAEA,IAAI,YACF,OAAO;YACL,SAAS,OAAO,CAAC,CAAC,SAAS;gBACzB,IAAI,OAAO,YAAY,YACrB;qBAEA,6BAAO,IAAI,CAAC,EAAE,EAAE;YAEpB;QACF;IAEJ;AACF;AAEA,SAAS,6BAAU,GAAoD,EAAE,KAAQ;IAC/E,IAAI,OAAO,QAAQ,YACjB,OAAO,IAAI;SACN,IAAI,OAAO,MAChB,IAAI,OAAO,GAAG;AAElB","sources":["packages/@react-aria/utils/src/mergeRefs.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {MutableRefObject, Ref} from 'react';\n\n/**\n * Merges multiple refs into one. Works with either callback or object refs.\n */\nexport function mergeRefs<T>(...refs: Array<Ref<T> | MutableRefObject<T> | null | undefined>): Ref<T> {\n if (refs.length === 1 && refs[0]) {\n return refs[0];\n }\n\n return (value: T | null) => {\n let hasCleanup = false;\n\n const cleanups = refs.map(ref => {\n const cleanup = setRef(ref, value);\n hasCleanup ||= typeof cleanup == 'function';\n return cleanup;\n });\n\n if (hasCleanup) {\n return () => {\n cleanups.forEach((cleanup, i) => {\n if (typeof cleanup === 'function') {\n cleanup();\n } else {\n setRef(refs[i], null);\n }\n });\n };\n }\n };\n}\n\nfunction setRef<T>(ref: Ref<T> | MutableRefObject<T> | null | undefined, value: T) {\n if (typeof ref === 'function') {\n return ref(value);\n } else if (ref != null) {\n ref.current = value;\n }\n}\n"],"names":[],"version":3,"file":"mergeRefs.main.js.map"}
@@ -0,0 +1,13 @@
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _createUseStorageState = require("../createUseStorageState");
var _isBrowser = _interopRequireDefault(require("../utils/isBrowser"));
var useLocalStorageState = (0, _createUseStorageState.createUseStorageState)(function () {
return _isBrowser["default"] ? localStorage : undefined;
});
var _default = exports["default"] = useLocalStorageState;
@@ -0,0 +1,4 @@
import type { TSESLint } from '@typescript-eslint/utils';
export type MessageId = 'await' | 'awaitUsingOfNonAsyncDisposable' | 'convertToOrdinaryFor' | 'forAwaitOfNonAsyncIterable' | 'invalidPromiseAggregatorInput' | 'removeAwait';
declare const _default: TSESLint.RuleModule<MessageId, [], import("../../rules").ESLintPluginDocs, TSESLint.RuleListener>;
export default _default;
@@ -0,0 +1,4 @@
import type { AcceptedPlugin, PluginCreator } from 'postcss'
declare const plugin: PluginCreator<AcceptedPlugin | string | void>
export = plugin
@@ -0,0 +1,2 @@
import type { LibDefinition } from '../variable';
export declare const es7: LibDefinition;
@@ -0,0 +1,19 @@
Copyright (C) 2011 by Beau Gunderson
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.
@@ -0,0 +1 @@
{"version":3,"names":["_AwaitValue","value","wrapped"],"sources":["../../src/helpers/AwaitValue.js"],"sourcesContent":["/* @minVersion 7.0.0-beta.0 */\n/* @onlyBabel7 */\n\nexport default function _AwaitValue(value) {\n this.wrapped = value;\n}\n"],"mappings":";;;;;;AAGe,SAASA,WAAWA,CAACC,KAAK,EAAE;EACzC,IAAI,CAACC,OAAO,GAAGD,KAAK;AACtB","ignoreList":[]}
@@ -0,0 +1,260 @@
/**
* @fileoverview Rule to flag fall-through cases in switch statements.
* @author Matt DuVall <http://mattduvall.com/>
*/
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const { directivesPattern } = require("../shared/directives");
//------------------------------------------------------------------------------
// Helpers
//------------------------------------------------------------------------------
const DEFAULT_FALLTHROUGH_COMMENT = /falls?\s?through/iu;
/**
* Checks all segments in a set and returns true if any are reachable.
* @param {Set<CodePathSegment>} segments The segments to check.
* @returns {boolean} True if any segment is reachable; false otherwise.
*/
function isAnySegmentReachable(segments) {
for (const segment of segments) {
if (segment.reachable) {
return true;
}
}
return false;
}
/**
* Checks whether or not a given comment string is really a fallthrough comment and not an ESLint directive.
* @param {string} comment The comment string to check.
* @param {RegExp} fallthroughCommentPattern The regular expression used for checking for fallthrough comments.
* @returns {boolean} `true` if the comment string is truly a fallthrough comment.
*/
function isFallThroughComment(comment, fallthroughCommentPattern) {
return (
fallthroughCommentPattern.test(comment) &&
!directivesPattern.test(comment.trim())
);
}
/**
* Checks whether or not a given case has a fallthrough comment.
* @param {ASTNode} caseWhichFallsThrough SwitchCase node which falls through.
* @param {ASTNode} subsequentCase The case after caseWhichFallsThrough.
* @param {RuleContext} context A rule context which stores comments.
* @param {RegExp} fallthroughCommentPattern A pattern to match comment to.
* @returns {null | object} the comment if the case has a valid fallthrough comment, otherwise null
*/
function getFallthroughComment(
caseWhichFallsThrough,
subsequentCase,
context,
fallthroughCommentPattern,
) {
const sourceCode = context.sourceCode;
if (
caseWhichFallsThrough.consequent.length === 1 &&
caseWhichFallsThrough.consequent[0].type === "BlockStatement"
) {
const trailingCloseBrace = sourceCode.getLastToken(
caseWhichFallsThrough.consequent[0],
);
const commentInBlock = sourceCode
.getCommentsBefore(trailingCloseBrace)
.pop();
if (
commentInBlock &&
isFallThroughComment(
commentInBlock.value,
fallthroughCommentPattern,
)
) {
return commentInBlock;
}
}
const comment = sourceCode.getCommentsBefore(subsequentCase).pop();
if (
comment &&
isFallThroughComment(comment.value, fallthroughCommentPattern)
) {
return comment;
}
return null;
}
/**
* Checks whether a node and a token are separated by blank lines
* @param {ASTNode} node The node to check
* @param {Token} token The token to compare against
* @returns {boolean} `true` if there are blank lines between node and token
*/
function hasBlankLinesBetween(node, token) {
return token.loc.start.line > node.loc.end.line + 1;
}
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
type: "problem",
defaultOptions: [
{
allowEmptyCase: false,
reportUnusedFallthroughComment: false,
},
],
docs: {
description: "Disallow fallthrough of `case` statements",
recommended: true,
url: "https://eslint.org/docs/latest/rules/no-fallthrough",
},
schema: [
{
type: "object",
properties: {
commentPattern: {
type: "string",
},
allowEmptyCase: {
type: "boolean",
},
reportUnusedFallthroughComment: {
type: "boolean",
},
},
additionalProperties: false,
},
],
messages: {
unusedFallthroughComment:
"Found a comment that would permit fallthrough, but case cannot fall through.",
case: "Expected a 'break' statement before 'case'.",
default: "Expected a 'break' statement before 'default'.",
},
},
create(context) {
const codePathSegments = [];
let currentCodePathSegments = new Set();
const sourceCode = context.sourceCode;
const [
{ allowEmptyCase, commentPattern, reportUnusedFallthroughComment },
] = context.options;
const fallthroughCommentPattern = commentPattern
? new RegExp(commentPattern, "u")
: DEFAULT_FALLTHROUGH_COMMENT;
/*
* We need to use leading comments of the next SwitchCase node because
* trailing comments is wrong if semicolons are omitted.
*/
let previousCase = null;
return {
onCodePathStart() {
codePathSegments.push(currentCodePathSegments);
currentCodePathSegments = new Set();
},
onCodePathEnd() {
currentCodePathSegments = codePathSegments.pop();
},
onUnreachableCodePathSegmentStart(segment) {
currentCodePathSegments.add(segment);
},
onUnreachableCodePathSegmentEnd(segment) {
currentCodePathSegments.delete(segment);
},
onCodePathSegmentStart(segment) {
currentCodePathSegments.add(segment);
},
onCodePathSegmentEnd(segment) {
currentCodePathSegments.delete(segment);
},
SwitchCase(node) {
/*
* Checks whether or not there is a fallthrough comment.
* And reports the previous fallthrough node if that does not exist.
*/
if (previousCase && previousCase.node.parent === node.parent) {
const previousCaseFallthroughComment =
getFallthroughComment(
previousCase.node,
node,
context,
fallthroughCommentPattern,
);
if (
previousCase.isFallthrough &&
!previousCaseFallthroughComment
) {
context.report({
messageId: node.test ? "case" : "default",
node,
});
} else if (
reportUnusedFallthroughComment &&
!previousCase.isSwitchExitReachable &&
previousCaseFallthroughComment
) {
context.report({
messageId: "unusedFallthroughComment",
node: previousCaseFallthroughComment,
});
}
}
previousCase = null;
},
"SwitchCase:exit"(node) {
const nextToken = sourceCode.getTokenAfter(node);
/*
* `reachable` meant fall through because statements preceded by
* `break`, `return`, or `throw` are unreachable.
* And allows empty cases and the last case.
*/
const isSwitchExitReachable = isAnySegmentReachable(
currentCodePathSegments,
);
const isFallthrough =
isSwitchExitReachable &&
(node.consequent.length > 0 ||
(!allowEmptyCase &&
hasBlankLinesBetween(node, nextToken))) &&
node.parent.cases.at(-1) !== node;
previousCase = {
node,
isSwitchExitReachable,
isFallthrough,
};
},
};
},
};
@@ -0,0 +1,124 @@
import {asciiAlphanumeric} from 'micromark-util-character'
import {encode} from 'micromark-util-encode'
import {codes, values} from 'micromark-util-symbol'
/**
* Make a value safe for injection as a URL.
*
* This encodes unsafe characters with percent-encoding and skips already
* encoded sequences (see `normalizeUri`).
* Further unsafe characters are encoded as character references (see
* `micromark-util-encode`).
*
* A regex of allowed protocols can be given, in which case the URL is
* sanitized.
* For example, `/^(https?|ircs?|mailto|xmpp)$/i` can be used for `a[href]`, or
* `/^https?$/i` for `img[src]` (this is what `github.com` allows).
* If the URL includes an unknown protocol (one not matched by `protocol`, such
* as a dangerous example, `javascript:`), the value is ignored.
*
* @param {string | null | undefined} url
* URI to sanitize.
* @param {RegExp | null | undefined} [protocol]
* Allowed protocols.
* @returns {string}
* Sanitized URI.
*/
export function sanitizeUri(url, protocol) {
const value = encode(normalizeUri(url || ''))
if (!protocol) {
return value
}
const colon = value.indexOf(':')
const questionMark = value.indexOf('?')
const numberSign = value.indexOf('#')
const slash = value.indexOf('/')
if (
// If there is no protocol, it’s relative.
colon < 0 ||
// If the first colon is after a `?`, `#`, or `/`, it’s not a protocol.
(slash > -1 && colon > slash) ||
(questionMark > -1 && colon > questionMark) ||
(numberSign > -1 && colon > numberSign) ||
// It is a protocol, it should be allowed.
protocol.test(value.slice(0, colon))
) {
return value
}
return ''
}
/**
* Normalize a URL.
*
* Encode unsafe characters with percent-encoding, skipping already encoded
* sequences.
*
* @param {string} value
* URI to normalize.
* @returns {string}
* Normalized URI.
*/
export function normalizeUri(value) {
/** @type {Array<string>} */
const result = []
let index = -1
let start = 0
let skip = 0
while (++index < value.length) {
const code = value.charCodeAt(index)
/** @type {string} */
let replace = ''
// A correct percent encoded value.
if (
code === codes.percentSign &&
asciiAlphanumeric(value.charCodeAt(index + 1)) &&
asciiAlphanumeric(value.charCodeAt(index + 2))
) {
skip = 2
}
// ASCII.
else if (code < 128) {
if (!/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(code))) {
replace = String.fromCharCode(code)
}
}
// Astral.
else if (code > 55_295 && code < 57_344) {
const next = value.charCodeAt(index + 1)
// A correct surrogate pair.
if (code < 56_320 && next > 56_319 && next < 57_344) {
replace = String.fromCharCode(code, next)
skip = 1
}
// Lone surrogate.
else {
replace = values.replacementCharacter
}
}
// Unicode.
else {
replace = String.fromCharCode(code)
}
if (replace) {
result.push(value.slice(start, index), encodeURIComponent(replace))
start = index + skip + 1
replace = ''
}
if (skip) {
index += skip
skip = 0
}
}
return result.join('') + value.slice(start)
}
@@ -0,0 +1,25 @@
var $a993edba0f043554$exports = require("./useBreadcrumbItem.main.js");
var $2b6c6844f922ad13$exports = require("./useBreadcrumbs.main.js");
function $parcel$export(e, n, v, s) {
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
}
$parcel$export(module.exports, "useBreadcrumbItem", () => $a993edba0f043554$exports.useBreadcrumbItem);
$parcel$export(module.exports, "useBreadcrumbs", () => $2b6c6844f922ad13$exports.useBreadcrumbs);
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you 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 REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
//# sourceMappingURL=main.js.map
@@ -0,0 +1,24 @@
# @heroui/table
Tables are used to display tabular data using rows and columns. They allow users to quickly scan, sort, compare, and take action on large amounts of data.
Please refer to the [documentation](https://heroui.com/docs/components/table) for more information.
## Installation
```sh
yarn add @heroui/table
# or
npm i @heroui/table
```
## Contribution
Yes please! See the
[contributing guidelines](https://github.com/heroui-inc/heroui/blob/master/CONTRIBUTING.md)
for details.
## License
This project is licensed under the terms of the
[MIT license](https://github.com/heroui-inc/heroui/blob/master/LICENSE).
@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('mergeAll', require('../merge'));
func.placeholder = require('./placeholder');
module.exports = func;
@@ -0,0 +1,33 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var docBibliographyRole = {
abstract: false,
accessibleNameRequired: false,
baseConcepts: [],
childrenPresentational: false,
nameFrom: ['author'],
prohibitedProps: [],
props: {
'aria-disabled': null,
'aria-errormessage': null,
'aria-expanded': null,
'aria-haspopup': null,
'aria-invalid': null
},
relatedConcepts: [{
concept: {
name: 'bibliography [EPUB-SSV]'
},
module: 'EPUB'
}],
requireContextRole: [],
requiredContextRole: [],
requiredOwnedElements: [['doc-biblioentry']],
requiredProps: {},
superClass: [['roletype', 'structure', 'section', 'landmark']]
};
var _default = exports.default = docBibliographyRole;
@@ -0,0 +1,6 @@
module.exports = {
"longPressMessage": `Dlouh\xfdm stiskem nebo stisknut\xedm kl\xe1ves Alt + \u{161}ipka dol\u{16F} otev\u{159}ete nab\xeddku`
};
//# sourceMappingURL=cs-CZ.main.js.map
@@ -0,0 +1,17 @@
import baseIndexOf from './_baseIndexOf.js';
/**
* A specialized version of `_.includes` for arrays without support for
* specifying an index to search from.
*
* @private
* @param {Array} [array] The array to inspect.
* @param {*} target The value to search for.
* @returns {boolean} Returns `true` if `target` is found, else `false`.
*/
function arrayIncludes(array, value) {
var length = array == null ? 0 : array.length;
return !!length && baseIndexOf(array, value, 0) > -1;
}
export default arrayIncludes;
@@ -0,0 +1,51 @@
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $TypeError = require('es-errors/type');
var $Number = GetIntrinsic('%Number%');
var $RegExp = GetIntrinsic('%RegExp%');
var $parseInteger = GetIntrinsic('%parseInt%');
var callBound = require('call-bound');
var regexTester = require('safe-regex-test');
var isPrimitive = require('../helpers/isPrimitive');
var $strSlice = callBound('String.prototype.slice');
var isBinary = regexTester(/^0b[01]+$/i);
var isOctal = regexTester(/^0o[0-7]+$/i);
var isInvalidHexLiteral = regexTester(/^[-+]0x[0-9a-f]+$/i);
var nonWS = ['\u0085', '\u200b', '\ufffe'].join('');
var nonWSregex = new $RegExp('[' + nonWS + ']', 'g');
var hasNonWS = regexTester(nonWSregex);
var $trim = require('string.prototype.trim');
var ToPrimitive = require('./ToPrimitive');
// https://262.ecma-international.org/6.0/#sec-tonumber
module.exports = function ToNumber(argument) {
var value = isPrimitive(argument) ? argument : ToPrimitive(argument, $Number);
if (typeof value === 'symbol') {
throw new $TypeError('Cannot convert a Symbol value to a number');
}
if (typeof value === 'bigint') {
throw new $TypeError('Conversion from \'BigInt\' to \'number\' is not allowed.');
}
if (typeof value === 'string') {
if (isBinary(value)) {
return ToNumber($parseInteger($strSlice(value, 2), 2));
} else if (isOctal(value)) {
return ToNumber($parseInteger($strSlice(value, 2), 8));
} else if (hasNonWS(value) || isInvalidHexLiteral(value)) {
return NaN;
}
var trimmed = $trim(value);
if (trimmed !== value) {
return ToNumber(trimmed);
}
}
return +value;
};
@@ -0,0 +1,130 @@
# jsx-a11y/label-has-for
❌ This rule is deprecated. It was replaced by [`jsx-a11y/label-has-associated-control`](label-has-associated-control.md).
🚫 This rule is _disabled_ in the following configs: ☑️ `recommended`, 🔒 `strict`.
<!-- end auto-generated rule header -->
_This rule was deprecated in v6.1.0. It will no longer be maintained._
Enforce label tags have associated control.
There are two supported ways to associate a label with a control:
- nesting: by wrapping a control in a label tag
- id: by using the prop `htmlFor` (or any configured attribute) as in `htmlFor=[ID of control]`
To fully cover 100% of assistive devices, you're encouraged to validate for both nesting and id.
## Rule options
This rule takes one optional object argument of type object:
```json
{
"rules": {
"jsx-a11y/label-has-for": [ 2, {
"components": [ "Label" ],
"required": {
"every": [ "nesting", "id" ]
},
"allowChildren": false
}]
}
}
```
For the `components` option, these strings determine which JSX elements (**always including** `<label>`) should be checked for having `htmlFor` prop. This is a good use case when you have a wrapper component that simply renders a `label` element (like in React):
```js
// Label.js
const Label = props => {
const {
htmlFor,
...otherProps
} = props;
return (
<label htmlFor={htmlFor} {...otherProps} />
);
}
...
// CreateAccount.js (for example)
...
return (
<form>
<input id="firstName" type="text" />
<Label htmlFor="firstName">First Name</Label>
</form>
);
```
The `required` option (defaults to `"required": { "every": ["nesting", "id"] }`) determines which checks are activated. You're allowed to pass in one of the following types:
- string: must be one of the acceptable strings (`"nesting"` or `"id"`)
- object, must have one of the following properties:
- some: an array of acceptable strings, will pass if ANY of the requested checks passed
- every: an array of acceptable strings, will pass if ALL of the requested checks passed
The `allowChildren` option (defaults to `false`) determines whether `{children}` content is allowed to be passed into a `label` element. For example, the following pattern, by default, is not allowed:
```js
<label>{children}</label>
```
However, if `allowChildren` is set to `true`, no error will be raised. If you want to pass in `{children}` content without raising an error, because you cannot be sure what `{children}` will render, then set `allowChildren` to `true`.
Note that passing props as spread attribute without `htmlFor` explicitly defined will cause this rule to fail. Explicitly pass down `htmlFor` prop for rule to pass. The prop must have an actual value to pass. Use `Label` component above as a reference. **It is a good thing to explicitly pass props that you expect to be passed for self-documentation.** For example:
#### Bad
```jsx
function Foo(props) {
return <label {...props} />
}
```
#### Good
```jsx
function Foo({ htmlFor, ...props}) {
return <label htmlFor={htmlFor} {...props} />
}
// OR
function Foo(props) {
const {
htmlFor,
...otherProps
} = props;
return <label htmlFor={htmlFor} {...otherProps} />
}
```
### Succeed
```jsx
<label htmlFor="firstName">
<input type="text" id="firstName" />
First Name
</label>
```
### Fail
```jsx
<input type="text" id="firstName" />
<label>First Name</label>
```
## Accessibility guidelines
- [WCAG 1.3.1](https://www.w3.org/WAI/WCAG21/Understanding/info-and-relationships)
- [WCAG 3.3.2](https://www.w3.org/WAI/WCAG21/Understanding/labels-or-instructions)
- [WCAG 4.1.2](https://www.w3.org/WAI/WCAG21/Understanding/name-role-value)
@@ -0,0 +1,213 @@
import process from 'node:process';
import fs from 'node:fs/promises';
import path, { resolve } from 'node:path';
import { existsSync } from 'node:fs';
import { x } from 'tinyexec';
const AGENTS = [
"npm",
"yarn",
"yarn@berry",
"pnpm",
"pnpm@6",
"bun",
"deno"
];
const LOCKS = {
"bun.lock": "bun",
"bun.lockb": "bun",
"deno.lock": "deno",
"pnpm-lock.yaml": "pnpm",
"pnpm-workspace.yaml": "pnpm",
"yarn.lock": "yarn",
"package-lock.json": "npm",
"npm-shrinkwrap.json": "npm"
};
const INSTALL_METADATA = {
"node_modules/.deno/": "deno",
"node_modules/.pnpm/": "pnpm",
"node_modules/.yarn-state.yml": "yarn",
// yarn v2+ (node-modules)
"node_modules/.yarn_integrity": "yarn",
// yarn v1
"node_modules/.package-lock.json": "npm",
".pnp.cjs": "yarn",
// yarn v3+ (pnp)
".pnp.js": "yarn",
// yarn v2 (pnp)
"bun.lock": "bun",
"bun.lockb": "bun"
};
async function pathExists(path2, type) {
try {
const stat = await fs.stat(path2);
return type === "file" ? stat.isFile() : stat.isDirectory();
} catch {
return false;
}
}
function* lookup(cwd = process.cwd()) {
let directory = path.resolve(cwd);
const { root } = path.parse(directory);
while (directory && directory !== root) {
yield directory;
directory = path.dirname(directory);
}
}
async function parsePackageJson(filepath, onUnknown) {
return !filepath || !pathExists(filepath, "file") ? null : await handlePackageManager(filepath, onUnknown);
}
async function detect(options = {}) {
const {
cwd,
strategies = ["lockfile", "packageManager-field", "devEngines-field"],
onUnknown
} = options;
let stopDir;
if (typeof options.stopDir === "string") {
const resolved = path.resolve(options.stopDir);
stopDir = (dir) => dir === resolved;
} else {
stopDir = options.stopDir;
}
for (const directory of lookup(cwd)) {
for (const strategy of strategies) {
switch (strategy) {
case "lockfile": {
for (const lock of Object.keys(LOCKS)) {
if (await pathExists(path.join(directory, lock), "file")) {
const name = LOCKS[lock];
const result = await parsePackageJson(path.join(directory, "package.json"), onUnknown);
if (result)
return result;
else
return { name, agent: name };
}
}
break;
}
case "packageManager-field":
case "devEngines-field": {
const result = await parsePackageJson(path.join(directory, "package.json"), onUnknown);
if (result)
return result;
break;
}
case "install-metadata": {
for (const metadata of Object.keys(INSTALL_METADATA)) {
const fileOrDir = metadata.endsWith("/") ? "dir" : "file";
if (await pathExists(path.join(directory, metadata), fileOrDir)) {
const name = INSTALL_METADATA[metadata];
const agent = name === "yarn" ? isMetadataYarnClassic(metadata) ? "yarn" : "yarn@berry" : name;
return { name, agent };
}
}
break;
}
}
}
if (stopDir?.(directory))
break;
}
return null;
}
function getNameAndVer(pkg) {
const handelVer = (version) => version?.match(/\d+(\.\d+){0,2}/)?.[0] ?? version;
if (typeof pkg.packageManager === "string") {
const [name, ver] = pkg.packageManager.replace(/^\^/, "").split("@");
return { name, ver: handelVer(ver) };
}
if (typeof pkg.devEngines?.packageManager?.name === "string") {
return {
name: pkg.devEngines.packageManager.name,
ver: handelVer(pkg.devEngines.packageManager.version)
};
}
return void 0;
}
async function handlePackageManager(filepath, onUnknown) {
try {
const pkg = JSON.parse(await fs.readFile(filepath, "utf8"));
let agent;
const nameAndVer = getNameAndVer(pkg);
if (nameAndVer) {
const name = nameAndVer.name;
const ver = nameAndVer.ver;
let version = ver;
if (name === "yarn" && ver && Number.parseInt(ver) > 1) {
agent = "yarn@berry";
version = "berry";
return { name, agent, version };
} else if (name === "pnpm" && ver && Number.parseInt(ver) < 7) {
agent = "pnpm@6";
return { name, agent, version };
} else if (AGENTS.includes(name)) {
agent = name;
return { name, agent, version };
} else {
return onUnknown?.(pkg.packageManager) ?? null;
}
}
} catch {
}
return null;
}
function isMetadataYarnClassic(metadataPath) {
return metadataPath.endsWith(".yarn_integrity");
}
// src/detect.ts
async function detectPackageManager(cwd = process.cwd()) {
const result = await detect({
cwd,
onUnknown(packageManager) {
console.warn("[@antfu/install-pkg] Unknown packageManager:", packageManager);
return void 0;
}
});
return result?.agent || null;
}
async function installPackage(names, options = {}) {
const detectedAgent = options.packageManager || await detectPackageManager(options.cwd) || "npm";
const [agent] = detectedAgent.split("@");
if (!Array.isArray(names))
names = [names];
const args = (typeof options.additionalArgs === "function" ? options.additionalArgs(agent, detectedAgent) : options.additionalArgs) || [];
if (options.preferOffline) {
if (detectedAgent === "yarn@berry")
args.unshift("--cached");
else
args.unshift("--prefer-offline");
}
if (agent === "pnpm") {
args.unshift(
/**
* Prevent pnpm from removing installed devDeps while `NODE_ENV` is `production`
* @see https://pnpm.io/cli/install#--prod--p
*/
"--prod=false"
);
if (existsSync(resolve(options.cwd ?? process.cwd(), "pnpm-workspace.yaml"))) {
args.unshift("-w");
}
}
return x(
agent,
[
agent === "yarn" ? "add" : "install",
options.dev ? "-D" : "",
...args,
...names
].filter(Boolean),
{
nodeOptions: {
stdio: options.silent ? "ignore" : "inherit",
cwd: options.cwd
},
throwOnError: true
}
);
}
export { detectPackageManager, installPackage };
@@ -0,0 +1,110 @@
var id = 0;
function _classPrivateFieldLooseKey(name) {
return "__private_" + id++ + "_" + name;
}
function _classPrivateFieldLooseBase(receiver, privateKey) {
if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) {
throw new TypeError("attempted to use private field on non-instance");
}
return receiver;
}
let _Symbol$iterator;
class Node {
constructor(value) {
this.value = value;
}
}
////////////////////////////////////////////////////////////////////////////////
/**
* Queue
* @implements Iterable<Value>
* @template Value
*/
var _head = /*#__PURE__*/_classPrivateFieldLooseKey("head");
var _tail = /*#__PURE__*/_classPrivateFieldLooseKey("tail");
var _size = /*#__PURE__*/_classPrivateFieldLooseKey("size");
_Symbol$iterator = Symbol.iterator;
class Queue {
constructor() {
Object.defineProperty(this, _head, {
writable: true,
value: void 0
});
Object.defineProperty(this, _tail, {
writable: true,
value: void 0
});
Object.defineProperty(this, _size, {
writable: true,
value: void 0
});
this.clear();
}
/**
* clear
* @returns {void}
*/
clear() {
_classPrivateFieldLooseBase(this, _head)[_head] = undefined;
_classPrivateFieldLooseBase(this, _tail)[_tail] = undefined;
_classPrivateFieldLooseBase(this, _size)[_size] = 0;
}
/**
* push
* @param {Value} value
* @returns {number}
*/
push(value) {
const node = new Node(value);
if (_classPrivateFieldLooseBase(this, _head)[_head]) {
_classPrivateFieldLooseBase(this, _tail)[_tail].next = node;
_classPrivateFieldLooseBase(this, _tail)[_tail] = node;
} else {
_classPrivateFieldLooseBase(this, _head)[_head] = node;
_classPrivateFieldLooseBase(this, _tail)[_tail] = node;
}
_classPrivateFieldLooseBase(this, _size)[_size]++;
return _classPrivateFieldLooseBase(this, _size)[_size];
}
/**
* pop
* @returns {Value | undefined}
*/
pop() {
const current = _classPrivateFieldLooseBase(this, _head)[_head];
if (!current) {
return;
}
_classPrivateFieldLooseBase(this, _head)[_head] = _classPrivateFieldLooseBase(this, _head)[_head].next;
_classPrivateFieldLooseBase(this, _size)[_size]--;
return current.value;
}
/**
* size
* @returns {number}
*/
get size() {
return _classPrivateFieldLooseBase(this, _size)[_size];
}
/**
* Iterator
* @returns {IterableIterator<Value>}
*/
*[_Symbol$iterator]() {
let current = _classPrivateFieldLooseBase(this, _head)[_head];
while (current) {
yield current.value;
current = current.next;
}
}
}
exports.Queue = Queue;
@@ -0,0 +1 @@
{"version":3,"file":"inline.js","names":["EmbedBlot","InlineBlot","Scope","Break","Text","Inline","allowedChildren","order","compare","self","other","selfIndex","indexOf","otherIndex","formatAt","index","length","name","value","statics","blotName","scroll","query","BLOT","blot","isolate","wrap","optimize","context","parent","offset","moveChildren"],"sources":["../../src/blots/inline.ts"],"sourcesContent":["import { EmbedBlot, InlineBlot, Scope } from 'parchment';\nimport type { BlotConstructor } from 'parchment';\nimport Break from './break.js';\nimport Text from './text.js';\n\nclass Inline extends InlineBlot {\n static allowedChildren: BlotConstructor[] = [Inline, Break, EmbedBlot, Text];\n // Lower index means deeper in the DOM tree, since not found (-1) is for embeds\n static order = [\n 'cursor',\n 'inline', // Must be lower\n 'link', // Chrome wants <a> to be lower\n 'underline',\n 'strike',\n 'italic',\n 'bold',\n 'script',\n 'code', // Must be higher\n ];\n\n static compare(self: string, other: string) {\n const selfIndex = Inline.order.indexOf(self);\n const otherIndex = Inline.order.indexOf(other);\n if (selfIndex >= 0 || otherIndex >= 0) {\n return selfIndex - otherIndex;\n }\n if (self === other) {\n return 0;\n }\n if (self < other) {\n return -1;\n }\n return 1;\n }\n\n formatAt(index: number, length: number, name: string, value: unknown) {\n if (\n Inline.compare(this.statics.blotName, name) < 0 &&\n this.scroll.query(name, Scope.BLOT)\n ) {\n const blot = this.isolate(index, length);\n if (value) {\n blot.wrap(name, value);\n }\n } else {\n super.formatAt(index, length, name, value);\n }\n }\n\n optimize(context: { [key: string]: any }) {\n super.optimize(context);\n if (\n this.parent instanceof Inline &&\n Inline.compare(this.statics.blotName, this.parent.statics.blotName) > 0\n ) {\n const parent = this.parent.isolate(this.offset(), this.length());\n // @ts-expect-error TODO: make isolate generic\n this.moveChildren(parent);\n parent.wrap(this);\n }\n }\n}\n\nexport default Inline;\n"],"mappings":"AAAA,SAASA,SAAS,EAAEC,UAAU,EAAEC,KAAK,QAAQ,WAAW;AAExD,OAAOC,KAAK,MAAM,YAAY;AAC9B,OAAOC,IAAI,MAAM,WAAW;AAE5B,MAAMC,MAAM,SAASJ,UAAU,CAAC;EAC9B,OAAOK,eAAe,GAAsB,CAACD,MAAM,EAAEF,KAAK,EAAEH,SAAS,EAAEI,IAAI,CAAC;EAC5E;EACA,OAAOG,KAAK,GAAG,CACb,QAAQ,EACR,QAAQ;EAAE;EACV,MAAM;EAAE;EACR,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,QAAQ,EACR,MAAM,CAAE;EAAA,CACT;EAED,OAAOC,OAAOA,CAACC,IAAY,EAAEC,KAAa,EAAE;IAC1C,MAAMC,SAAS,GAAGN,MAAM,CAACE,KAAK,CAACK,OAAO,CAACH,IAAI,CAAC;IAC5C,MAAMI,UAAU,GAAGR,MAAM,CAACE,KAAK,CAACK,OAAO,CAACF,KAAK,CAAC;IAC9C,IAAIC,SAAS,IAAI,CAAC,IAAIE,UAAU,IAAI,CAAC,EAAE;MACrC,OAAOF,SAAS,GAAGE,UAAU;IAC/B;IACA,IAAIJ,IAAI,KAAKC,KAAK,EAAE;MAClB,OAAO,CAAC;IACV;IACA,IAAID,IAAI,GAAGC,KAAK,EAAE;MAChB,OAAO,CAAC,CAAC;IACX;IACA,OAAO,CAAC;EACV;EAEAI,QAAQA,CAACC,KAAa,EAAEC,MAAc,EAAEC,IAAY,EAAEC,KAAc,EAAE;IACpE,IACEb,MAAM,CAACG,OAAO,CAAC,IAAI,CAACW,OAAO,CAACC,QAAQ,EAAEH,IAAI,CAAC,GAAG,CAAC,IAC/C,IAAI,CAACI,MAAM,CAACC,KAAK,CAACL,IAAI,EAAEf,KAAK,CAACqB,IAAI,CAAC,EACnC;MACA,MAAMC,IAAI,GAAG,IAAI,CAACC,OAAO,CAACV,KAAK,EAAEC,MAAM,CAAC;MACxC,IAAIE,KAAK,EAAE;QACTM,IAAI,CAACE,IAAI,CAACT,IAAI,EAAEC,KAAK,CAAC;MACxB;IACF,CAAC,MAAM;MACL,KAAK,CAACJ,QAAQ,CAACC,KAAK,EAAEC,MAAM,EAAEC,IAAI,EAAEC,KAAK,CAAC;IAC5C;EACF;EAEAS,QAAQA,CAACC,OAA+B,EAAE;IACxC,KAAK,CAACD,QAAQ,CAACC,OAAO,CAAC;IACvB,IACE,IAAI,CAACC,MAAM,YAAYxB,MAAM,IAC7BA,MAAM,CAACG,OAAO,CAAC,IAAI,CAACW,OAAO,CAACC,QAAQ,EAAE,IAAI,CAACS,MAAM,CAACV,OAAO,CAACC,QAAQ,CAAC,GAAG,CAAC,EACvE;MACA,MAAMS,MAAM,GAAG,IAAI,CAACA,MAAM,CAACJ,OAAO,CAAC,IAAI,CAACK,MAAM,CAAC,CAAC,EAAE,IAAI,CAACd,MAAM,CAAC,CAAC,CAAC;MAChE;MACA,IAAI,CAACe,YAAY,CAACF,MAAM,CAAC;MACzBA,MAAM,CAACH,IAAI,CAAC,IAAI,CAAC;IACnB;EACF;AACF;AAEA,eAAerB,MAAM","ignoreList":[]}
@@ -0,0 +1,405 @@
/**
* @fileoverview Disallow inherently interactive elements to be assigned
* non-interactive roles.
* @author Jesse Beach
*/
// -----------------------------------------------------------------------------
// Requirements
// -----------------------------------------------------------------------------
import { RuleTester } from 'eslint';
import { configs } from '../../../src/index';
import parserOptionsMapper from '../../__util__/parserOptionsMapper';
import parsers from '../../__util__/helpers/parsers';
import rule from '../../../src/rules/no-interactive-element-to-noninteractive-role';
import ruleOptionsMapperFactory from '../../__util__/ruleOptionsMapperFactory';
// -----------------------------------------------------------------------------
// Tests
// -----------------------------------------------------------------------------
const ruleTester = new RuleTester();
const errorMessage = 'Interactive elements should not be assigned non-interactive roles.';
const expectedError = {
message: errorMessage,
type: 'JSXAttribute',
};
const ruleName = 'jsx-a11y/no-interactive-element-to-noninteractive-role';
const componentsSettings = {
'jsx-a11y': {
components: {
Button: 'button',
Link: 'a',
},
},
};
const alwaysValid = [
{ code: '<TestComponent onClick={doFoo} />' },
{ code: '<Button onClick={doFoo} />' },
/* Interactive elements */
{ code: '<a href="http://x.y.z" role="button" />' },
{ code: '<a href="http://x.y.z" tabIndex="0" role="button" />' },
{ code: '<button className="foo" role="button" />' },
/* All flavors of input */
{ code: '<input role="button" />' },
{ code: '<input type="button" role="button" />' },
{ code: '<input type="checkbox" role="button" />' },
{ code: '<input type="color" role="button" />' },
{ code: '<input type="date" role="button" />' },
{ code: '<input type="datetime" role="button" />' },
{ code: '<input type="datetime-local" role="button" />' },
{ code: '<input type="email" role="button" />' },
{ code: '<input type="file" role="button" />' },
{ code: '<input type="image" role="button" />' },
{ code: '<input type="month" role="button" />' },
{ code: '<input type="number" role="button" />' },
{ code: '<input type="password" role="button" />' },
{ code: '<input type="radio" role="button" />' },
{ code: '<input type="range" role="button" />' },
{ code: '<input type="reset" role="button" />' },
{ code: '<input type="search" role="button" />' },
{ code: '<input type="submit" role="button" />' },
{ code: '<input type="tel" role="button" />' },
{ code: '<input type="text" role="button" />' },
{ code: '<input type="time" role="button" />' },
{ code: '<input type="url" role="button" />' },
{ code: '<input type="week" role="button" />' },
{ code: '<input type="hidden" role="button" />' },
/* End all flavors of input */
{ code: '<menuitem role="button" />;' },
{ code: '<option className="foo" role="button" />' },
{ code: '<select className="foo" role="button" />' },
{ code: '<textarea className="foo" role="button" />' },
{ code: '<tr role="button" />;' },
/* HTML elements with neither an interactive or non-interactive valence (static) */
{ code: '<a role="button" />' },
{ code: '<a role="img" />;' },
{ code: '<a tabIndex="0" role="button" />' },
{ code: '<a tabIndex="0" role="img" />' },
{ code: '<acronym role="button" />;' },
{ code: '<address role="button" />;' },
{ code: '<applet role="button" />;' },
{ code: '<aside role="button" />;' },
{ code: '<audio role="button" />;' },
{ code: '<b role="button" />;' },
{ code: '<base role="button" />;' },
{ code: '<bdi role="button" />;' },
{ code: '<bdo role="button" />;' },
{ code: '<big role="button" />;' },
{ code: '<blink role="button" />;' },
{ code: '<blockquote role="button" />;' },
{ code: '<body role="button" />;' },
{ code: '<br role="button" />;' },
{ code: '<canvas role="button" />;' },
{ code: '<caption role="button" />;' },
{ code: '<center role="button" />;' },
{ code: '<cite role="button" />;' },
{ code: '<code role="button" />;' },
{ code: '<col role="button" />;' },
{ code: '<colgroup role="button" />;' },
{ code: '<content role="button" />;' },
{ code: '<data role="button" />;' },
{ code: '<datalist role="button" />;' },
{ code: '<del role="button" />;' },
{ code: '<details role="button" />;' },
{ code: '<dir role="button" />;' },
{ code: '<div role="button" />;' },
{ code: '<div className="foo" role="button" />;' },
{ code: '<div className="foo" {...props} role="button" />;' },
{ code: '<div aria-hidden role="button" />;' },
{ code: '<div aria-hidden={true} role="button" />;' },
{ code: '<div role="button" />;' },
{ code: '<div role={undefined} role="button" />;' },
{ code: '<div {...props} role="button" />;' },
{ code: '<div onKeyUp={() => void 0} aria-hidden={false} role="button" />;' },
{ code: '<dl role="button" />;' },
{ code: '<em role="button" />;' },
{ code: '<embed role="button" />;' },
{ code: '<figcaption role="button" />;' },
{ code: '<font role="button" />;' },
{ code: '<footer role="button" />;' },
{ code: '<frameset role="button" />;' },
{ code: '<head role="button" />;' },
{ code: '<header role="button" />;' },
{ code: '<hgroup role="button" />;' },
{ code: '<html role="button" />;' },
{ code: '<i role="button" />;' },
{ code: '<iframe role="button" />;' },
{ code: '<ins role="button" />;' },
{ code: '<kbd role="button" />;' },
{ code: '<keygen role="button" />;' },
{ code: '<label role="button" />;' },
{ code: '<legend role="button" />;' },
{ code: '<link role="button" />;' },
{ code: '<map role="button" />;' },
{ code: '<mark role="button" />;' },
{ code: '<marquee role="button" />;' },
{ code: '<menu role="button" />;' },
{ code: '<meta role="button" />;' },
{ code: '<meter role="button" />;' },
{ code: '<noembed role="button" />;' },
{ code: '<noscript role="button" />;' },
{ code: '<object role="button" />;' },
{ code: '<optgroup role="button" />;' },
{ code: '<output role="button" />;' },
{ code: '<p role="button" />;' },
{ code: '<param role="button" />;' },
{ code: '<picture role="button" />;' },
{ code: '<pre role="button" />;' },
{ code: '<progress role="button" />;' },
{ code: '<q role="button" />;' },
{ code: '<rp role="button" />;' },
{ code: '<rt role="button" />;' },
{ code: '<rtc role="button" />;' },
{ code: '<ruby role="button" />;' },
{ code: '<s role="button" />;' },
{ code: '<samp role="button" />;' },
{ code: '<script role="button" />;' },
{ code: '<section role="button" />;' },
{ code: '<small role="button" />;' },
{ code: '<source role="button" />;' },
{ code: '<spacer role="button" />;' },
{ code: '<span role="button" />;' },
{ code: '<strike role="button" />;' },
{ code: '<strong role="button" />;' },
{ code: '<style role="button" />;' },
{ code: '<sub role="button" />;' },
{ code: '<summary role="button" />;' },
{ code: '<sup role="button" />;' },
{ code: '<th role="button" />;' },
{ code: '<time role="button" />;' },
{ code: '<title role="button" />;' },
{ code: '<track role="button" />;' },
{ code: '<tt role="button" />;' },
{ code: '<u role="button" />;' },
{ code: '<var role="button" />;' },
{ code: '<video role="button" />;' },
{ code: '<wbr role="button" />;' },
{ code: '<xmp role="button" />;' },
/* HTML elements attributed with an interactive role */
{ code: '<div role="button" />;' },
{ code: '<div role="checkbox" />;' },
{ code: '<div role="columnheader" />;' },
{ code: '<div role="combobox" />;' },
{ code: '<div role="grid" />;' },
{ code: '<div role="gridcell" />;' },
{ code: '<div role="link" />;' },
{ code: '<div role="listbox" />;' },
{ code: '<div role="menu" />;' },
{ code: '<div role="menubar" />;' },
{ code: '<div role="menuitem" />;' },
{ code: '<div role="menuitemcheckbox" />;' },
{ code: '<div role="menuitemradio" />;' },
{ code: '<div role="option" />;' },
{ code: '<div role="progressbar" />;' },
{ code: '<div role="radio" />;' },
{ code: '<div role="radiogroup" />;' },
{ code: '<div role="row" />;' },
{ code: '<div role="rowheader" />;' },
{ code: '<div role="searchbox" />;' },
{ code: '<div role="slider" />;' },
{ code: '<div role="spinbutton" />;' },
{ code: '<div role="switch" />;' },
{ code: '<div role="tab" />;' },
{ code: '<div role="textbox" />;' },
{ code: '<div role="treeitem" />;' },
/* Presentation is a special case role that indicates intentional static semantics */
{ code: '<div role="presentation" />;' },
/* HTML elements attributed with an abstract role */
{ code: '<div role="command" />;' },
{ code: '<div role="composite" />;' },
{ code: '<div role="input" />;' },
{ code: '<div role="landmark" />;' },
{ code: '<div role="range" />;' },
{ code: '<div role="roletype" />;' },
{ code: '<div role="section" />;' },
{ code: '<div role="sectionhead" />;' },
{ code: '<div role="select" />;' },
{ code: '<div role="structure" />;' },
{ code: '<div role="tablist" />;' },
{ code: '<div role="toolbar" />;' },
{ code: '<div role="tree" />;' },
{ code: '<div role="treegrid" />;' },
{ code: '<div role="widget" />;' },
{ code: '<div role="window" />;' },
/* HTML elements with an inherent, non-interactive role, assigned an
* interactive role. */
{ code: '<main role="button" />;' },
{ code: '<area role="button" />;' },
{ code: '<article role="button" />;' },
{ code: '<article role="button" />;' },
{ code: '<dd role="button" />;' },
{ code: '<dfn role="button" />;' },
{ code: '<dt role="button" />;' },
{ code: '<fieldset role="button" />;' },
{ code: '<figure role="button" />;' },
{ code: '<form role="button" />;' },
{ code: '<frame role="button" />;' },
{ code: '<h1 role="button" />;' },
{ code: '<h2 role="button" />;' },
{ code: '<h3 role="button" />;' },
{ code: '<h4 role="button" />;' },
{ code: '<h5 role="button" />;' },
{ code: '<h6 role="button" />;' },
{ code: '<hr role="button" />;' },
{ code: '<img role="button" />;' },
{ code: '<li role="button" />;' },
{ code: '<li role="presentation" />;' },
{ code: '<nav role="button" />;' },
{ code: '<ol role="button" />;' },
{ code: '<table role="button" />;' },
{ code: '<tbody role="button" />;' },
{ code: '<td role="button" />;' },
{ code: '<tfoot role="button" />;' },
{ code: '<thead role="button" />;' },
{ code: '<ul role="button" />;' },
/* HTML elements attributed with a non-interactive role */
{ code: '<div role="alert" />;' },
{ code: '<div role="alertdialog" />;' },
{ code: '<div role="application" />;' },
{ code: '<div role="article" />;' },
{ code: '<div role="banner" />;' },
{ code: '<div role="cell" />;' },
{ code: '<div role="complementary" />;' },
{ code: '<div role="contentinfo" />;' },
{ code: '<div role="definition" />;' },
{ code: '<div role="dialog" />;' },
{ code: '<div role="directory" />;' },
{ code: '<div role="document" />;' },
{ code: '<div role="feed" />;' },
{ code: '<div role="figure" />;' },
{ code: '<div role="form" />;' },
{ code: '<div role="group" />;' },
{ code: '<div role="heading" />;' },
{ code: '<div role="img" />;' },
{ code: '<div role="list" />;' },
{ code: '<div role="listitem" />;' },
{ code: '<div role="log" />;' },
{ code: '<div role="main" />;' },
{ code: '<div role="marquee" />;' },
{ code: '<div role="math" />;' },
{ code: '<div role="navigation" />;' },
{ code: '<div role="note" />;' },
{ code: '<div role="region" />;' },
{ code: '<div role="rowgroup" />;' },
{ code: '<div role="search" />;' },
{ code: '<div role="separator" />;' },
{ code: '<div role="scrollbar" />;' },
{ code: '<div role="status" />;' },
{ code: '<div role="table" />;' },
{ code: '<div role="tabpanel" />;' },
{ code: '<div role="term" />;' },
{ code: '<div role="timer" />;' },
{ code: '<div role="tooltip" />;' },
/* Namespaced roles are not checked */
{ code: '<div mynamespace:role="term" />' },
{ code: '<input mynamespace:role="img" />' },
{ code: '<Link href="http://x.y.z" role="img" />' },
{ code: '<Link href="http://x.y.z" />', settings: componentsSettings },
{ code: '<Button onClick={doFoo} />', settings: componentsSettings },
];
const neverValid = [
/* Interactive elements */
{ code: '<a href="http://x.y.z" role="img" />', errors: [expectedError] },
{ code: '<a href="http://x.y.z" tabIndex="0" role="img" />', errors: [expectedError] },
/* All flavors of input */
{ code: '<input role="img" />', errors: [expectedError] },
{ code: '<input type="img" role="img" />', errors: [expectedError] },
{ code: '<input type="checkbox" role="img" />', errors: [expectedError] },
{ code: '<input type="color" role="img" />', errors: [expectedError] },
{ code: '<input type="date" role="img" />', errors: [expectedError] },
{ code: '<input type="datetime" role="img" />', errors: [expectedError] },
{ code: '<input type="datetime-local" role="img" />', errors: [expectedError] },
{ code: '<input type="email" role="img" />', errors: [expectedError] },
{ code: '<input type="file" role="img" />', errors: [expectedError] },
{ code: '<input type="hidden" role="img" />', errors: [expectedError] },
{ code: '<input type="image" role="img" />', errors: [expectedError] },
{ code: '<input type="month" role="img" />', errors: [expectedError] },
{ code: '<input type="number" role="img" />', errors: [expectedError] },
{ code: '<input type="password" role="img" />', errors: [expectedError] },
{ code: '<input type="radio" role="img" />', errors: [expectedError] },
{ code: '<input type="range" role="img" />', errors: [expectedError] },
{ code: '<input type="reset" role="img" />', errors: [expectedError] },
{ code: '<input type="search" role="img" />', errors: [expectedError] },
{ code: '<input type="submit" role="img" />', errors: [expectedError] },
{ code: '<input type="tel" role="img" />', errors: [expectedError] },
{ code: '<input type="text" role="img" />', errors: [expectedError] },
{ code: '<input type="time" role="img" />', errors: [expectedError] },
{ code: '<input type="url" role="img" />', errors: [expectedError] },
{ code: '<input type="week" role="img" />', errors: [expectedError] },
/* End all flavors of input */
{ code: '<menuitem role="img" />;', errors: [expectedError] },
{ code: '<option className="foo" role="img" />', errors: [expectedError] },
{ code: '<select className="foo" role="img" />', errors: [expectedError] },
{ code: '<textarea className="foo" role="img" />', errors: [expectedError] },
{ code: '<tr role="img" />;', errors: [expectedError] },
/* Interactive elements */
{ code: '<a href="http://x.y.z" role="listitem" />', errors: [expectedError] },
{ code: '<a href="http://x.y.z" tabIndex="0" role="listitem" />', errors: [expectedError] },
/* All flavors of input */
{ code: '<input role="listitem" />', errors: [expectedError] },
{ code: '<input type="listitem" role="listitem" />', errors: [expectedError] },
{ code: '<input type="checkbox" role="listitem" />', errors: [expectedError] },
{ code: '<input type="color" role="listitem" />', errors: [expectedError] },
{ code: '<input type="date" role="listitem" />', errors: [expectedError] },
{ code: '<input type="datetime" role="listitem" />', errors: [expectedError] },
{ code: '<input type="datetime-local" role="listitem" />', errors: [expectedError] },
{ code: '<input type="email" role="listitem" />', errors: [expectedError] },
{ code: '<input type="file" role="listitem" />', errors: [expectedError] },
{ code: '<input type="image" role="listitem" />', errors: [expectedError] },
{ code: '<input type="month" role="listitem" />', errors: [expectedError] },
{ code: '<input type="number" role="listitem" />', errors: [expectedError] },
{ code: '<input type="password" role="listitem" />', errors: [expectedError] },
{ code: '<input type="radio" role="listitem" />', errors: [expectedError] },
{ code: '<input type="range" role="listitem" />', errors: [expectedError] },
{ code: '<input type="reset" role="listitem" />', errors: [expectedError] },
{ code: '<input type="search" role="listitem" />', errors: [expectedError] },
{ code: '<input type="submit" role="listitem" />', errors: [expectedError] },
{ code: '<input type="tel" role="listitem" />', errors: [expectedError] },
{ code: '<input type="text" role="listitem" />', errors: [expectedError] },
{ code: '<input type="time" role="listitem" />', errors: [expectedError] },
{ code: '<input type="url" role="listitem" />', errors: [expectedError] },
{ code: '<input type="week" role="listitem" />', errors: [expectedError] },
/* End all flavors of input */
{ code: '<menuitem role="listitem" />;', errors: [expectedError] },
{ code: '<option className="foo" role="listitem" />', errors: [expectedError] },
{ code: '<select className="foo" role="listitem" />', errors: [expectedError] },
{ code: '<textarea className="foo" role="listitem" />', errors: [expectedError] },
{ code: '<tr role="listitem" />;', errors: [expectedError] },
/* Custom elements */
{ code: '<Link href="http://x.y.z" role="img" />', errors: [expectedError], settings: componentsSettings },
];
const recommendedOptions = (configs.recommended.rules[ruleName][1] || {});
ruleTester.run(`${ruleName}:recommended`, rule, {
valid: parsers.all([].concat(
...alwaysValid,
{ code: '<tr role="presentation" />;' },
{ code: '<canvas role="img" />;' },
{ code: '<Component role="presentation" />;' },
))
.map(ruleOptionsMapperFactory(recommendedOptions))
.map(parserOptionsMapper),
invalid: parsers.all([].concat(
...neverValid,
))
.map(ruleOptionsMapperFactory(recommendedOptions))
.map(parserOptionsMapper),
});
ruleTester.run(`${ruleName}:strict`, rule, {
valid: parsers.all([].concat(
...alwaysValid,
)).map(parserOptionsMapper),
invalid: parsers.all([].concat(
...neverValid,
{ code: '<tr role="presentation" />;', errors: [expectedError] },
{ code: '<canvas role="img" />;', errors: [expectedError] },
)).map(parserOptionsMapper),
});
@@ -0,0 +1 @@
{"version":3,"file":"check-bullet-ordered.d.ts","sourceRoot":"","sources":["check-bullet-ordered.js"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;GAGG;AACH,0CAHW,KAAK,GACH,OAAO,CAAC,OAAO,CAAC,eAAe,CAAC,EAAE,IAAI,GAAG,SAAS,CAAC,CAc/D;2BAnBgC,wBAAwB;6BAAxB,wBAAwB"}
@@ -0,0 +1,35 @@
{
"name": "@vitest/spy",
"type": "module",
"version": "4.0.9",
"description": "Lightweight Jest compatible spy implementation",
"license": "MIT",
"funding": "https://opencollective.com/vitest",
"homepage": "https://github.com/vitest-dev/vitest/tree/main/packages/spy#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/vitest-dev/vitest.git",
"directory": "packages/spy"
},
"bugs": {
"url": "https://github.com/vitest-dev/vitest/issues"
},
"sideEffects": false,
"exports": {
".": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"./*": "./*"
},
"main": "./dist/index.js",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"files": [
"dist"
],
"scripts": {
"build": "premove dist && rollup -c",
"dev": "rollup -c --watch"
}
}
@@ -0,0 +1 @@
export { _ as default } from "../esm/_iterable_to_array_limit_loose.js";
@@ -0,0 +1,2 @@
import type { LibDefinition } from '../variable';
export declare const es5: LibDefinition;
@@ -0,0 +1,40 @@
{
"name": "@react-aria/tooltip",
"version": "3.7.10",
"description": "Spectrum UI components in React",
"license": "Apache-2.0",
"main": "dist/main.js",
"module": "dist/module.js",
"exports": {
"types": "./dist/types.d.ts",
"import": "./dist/import.mjs",
"require": "./dist/main.js"
},
"types": "dist/types.d.ts",
"source": "src/index.ts",
"files": [
"dist",
"src"
],
"sideEffects": false,
"repository": {
"type": "git",
"url": "https://github.com/adobe/react-spectrum"
},
"dependencies": {
"@react-aria/focus": "^3.19.0",
"@react-aria/interactions": "^3.22.5",
"@react-aria/utils": "^3.26.0",
"@react-stately/tooltip": "^3.5.0",
"@react-types/shared": "^3.26.0",
"@react-types/tooltip": "^3.4.13",
"@swc/helpers": "^0.5.0"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1"
},
"publishConfig": {
"access": "public"
},
"gitHead": "71f0ef23053f9e03ee7e97df736e8b083e006849"
}
@@ -0,0 +1,90 @@
{
"name": "memoize-one",
"version": "5.2.1",
"description": "A memoization library which only remembers the latest invocation",
"main": "dist/memoize-one.cjs.js",
"types": "dist/memoize-one.d.ts",
"module": "dist/memoize-one.esm.js",
"sideEffects": false,
"author": "Alex Reardon <alexreardon@gmail.com>",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/alexreardon/memoize-one.git"
},
"files": [
"/dist",
"/src"
],
"size-limit": [
{
"path": "dist/memoize-one.min.js",
"limit": "214B"
},
{
"path": "dist/memoize-one.js",
"limit": "216B"
},
{
"path": "dist/memoize-one.cjs.js",
"limit": "213B"
},
{
"path": "dist/memoize-one.esm.js",
"limit": "218B"
}
],
"keywords": [
"memoize",
"memoization",
"cache",
"performance"
],
"dependencies": {},
"devDependencies": {
"@size-limit/preset-small-lib": "^4.10.2",
"@types/jest": "^26.0.22",
"@types/lodash.isequal": "^4.5.5",
"@typescript-eslint/eslint-plugin": "^4.22.0",
"@typescript-eslint/parser": "^4.22.0",
"benchmark": "^2.1.4",
"cross-env": "^7.0.3",
"eslint": "7.24.0",
"eslint-config-prettier": "^8.1.0",
"eslint-plugin-jest": "^24.3.5",
"eslint-plugin-prettier": "^3.3.1",
"jest": "^26.6.3",
"lodash.isequal": "^4.5.0",
"prettier": "2.2.1",
"rimraf": "3.0.2",
"rollup": "^2.45.1",
"rollup-plugin-replace": "^2.2.0",
"rollup-plugin-terser": "^7.0.2",
"rollup-plugin-typescript": "^1.0.1",
"size-limit": "^4.10.2",
"ts-jest": "^26.5.4",
"ts-node": "^9.1.1",
"tslib": "^2.2.0",
"typescript": "^4.2.4"
},
"config": {
"prettier_target": "src/**/*.{ts,js,jsx,md,json} test/**/*.{ts,js,jsx,md,json}"
},
"scripts": {
"validate": "yarn lint && yarn typecheck",
"test": "yarn jest",
"test:size": "yarn build && size-limit",
"typecheck": "yarn tsc --noEmit",
"prettier:check": "yarn prettier --debug-check $npm_package_config_prettier_target",
"prettier:write": "yarn prettier --write $npm_package_config_prettier_target",
"lint:eslint": "eslint $npm_package_config_prettier_target",
"lint": "yarn lint:eslint && yarn prettier:check",
"build": "yarn build:clean && yarn build:dist && yarn build:typescript && yarn build:flow",
"build:clean": "rimraf dist",
"build:dist": "rollup -c",
"build:typescript": "tsc ./src/memoize-one.ts --emitDeclarationOnly --declaration --outDir ./dist",
"build:flow": "cp src/memoize-one.js.flow dist/memoize-one.cjs.js.flow",
"perf": "ts-node ./benchmarks/shallow-equal.ts",
"prepublishOnly": "yarn build"
}
}
@@ -0,0 +1,19 @@
import {useTreeState as $875d6693e12af071$export$728d6ba534403756} from "./useTreeState.module.js";
import {TreeCollection as $05ca4cd7c4a5a999$export$863faf230ee2118a} from "./TreeCollection.module.js";
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you 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 REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
export {$875d6693e12af071$export$728d6ba534403756 as useTreeState, $05ca4cd7c4a5a999$export$863faf230ee2118a as TreeCollection};
//# sourceMappingURL=module.js.map
@@ -0,0 +1 @@
{"version":3,"file":"ClassMetadata.js","sourceRoot":"","sources":["../../../../src/metadata/models/ClassMetadata.ts"],"names":[],"mappings":""}
@@ -0,0 +1,24 @@
// This file exists to consolidate all of the imports from the `@reduxjs/toolkit` package.
// ESBuild does not de-duplicate imports, so this file is used to ensure that each method
// imported is only listed once, and there's only one mention of the `@reduxjs/toolkit` package.
export {
createAction,
createSlice,
createSelector,
createAsyncThunk,
combineReducers,
createNextState,
isAnyOf,
isAllOf,
isAction,
isPending,
isRejected,
isFulfilled,
isRejectedWithValue,
isAsyncThunkAction,
prepareAutoBatched,
SHOULD_AUTOBATCH,
isPlainObject,
nanoid,
} from '@reduxjs/toolkit'
@@ -0,0 +1,3 @@
export * from "./declarations/src/index.js";
export { _default as default } from "./use-latest.cjs.default.js";
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXNlLWxhdGVzdC5janMuZC5tdHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuL2RlY2xhcmF0aW9ucy9zcmMvaW5kZXguZC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSJ9
@@ -0,0 +1,7 @@
import { ClassMetadata } from '@inversifyjs/core';
export declare class ClassMetadataFixtures {
static get any(): ClassMetadata;
static get withScopeRequest(): ClassMetadata;
static get withScopeUndefined(): ClassMetadata;
}
//# sourceMappingURL=ClassMetadataFixtures.d.ts.map
@@ -0,0 +1,7 @@
var getNative = require('./_getNative'),
root = require('./_root');
/* Built-in method references that are verified to be native. */
var Map = getNative(root, 'Map');
module.exports = Map;
@@ -0,0 +1 @@
module.exports={A:{A:{"1":"F A B","132":"K D E wC"},B:{"1":"0 1 2 3 4 5 C L M G N O P Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I"},C:{"1":"0 1 2 3 4 5 6 7 8 9 xC TC J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC yC zC 0C 1C"},D:{"1":"0 1 2 3 4 5 6 7 8 9 J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC"},E:{"1":"J ZB K D E F A B C L M G 2C ZC 3C 4C 5C 6C aC NC OC 7C 8C 9C bC cC PC AD QC dC eC fC gC hC BD RC iC jC kC lC mC CD SC nC oC pC qC rC sC tC DD ED"},F:{"1":"0 1 2 3 4 5 6 7 8 9 F B C G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z FD GD HD ID NC uC JD OC"},G:{"1":"E ZC KD vC LD MD ND OD PD QD RD SD TD UD VD WD XD YD ZD aD bD cD dD bC cC PC eD QC dC eC fC gC hC fD RC iC jC kC lC mC gD SC nC oC pC qC rC sC tC"},H:{"1":"hD"},I:{"1":"TC J I iD jD kD lD vC mD nD"},J:{"1":"D A"},K:{"1":"A B C H NC uC OC"},L:{"1":"I"},M:{"1":"MC"},N:{"1":"A B"},O:{"1":"PC"},P:{"1":"6 7 8 9 J AB BB CB DB EB FB oD pD qD rD sD aC tD uD vD wD xD QC RC SC yD"},Q:{"1":"zD"},R:{"1":"0D"},S:{"1":"1D 2D"}},B:2,C:"CSS first-line pseudo-element",D:true};
@@ -0,0 +1,5 @@
declare function getProto<O extends object>(object: O): object | null;
declare const x: typeof getProto | null;
export = x;
@@ -0,0 +1,57 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = createIterator;
var _isArrayLike = require('./isArrayLike.js');
var _isArrayLike2 = _interopRequireDefault(_isArrayLike);
var _getIterator = require('./getIterator.js');
var _getIterator2 = _interopRequireDefault(_getIterator);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function createArrayIterator(coll) {
var i = -1;
var len = coll.length;
return function next() {
return ++i < len ? { value: coll[i], key: i } : null;
};
}
function createES2015Iterator(iterator) {
var i = -1;
return function next() {
var item = iterator.next();
if (item.done) return null;
i++;
return { value: item.value, key: i };
};
}
function createObjectIterator(obj) {
var okeys = obj ? Object.keys(obj) : [];
var i = -1;
var len = okeys.length;
return function next() {
var key = okeys[++i];
if (key === '__proto__') {
return next();
}
return i < len ? { value: obj[key], key } : null;
};
}
function createIterator(coll) {
if ((0, _isArrayLike2.default)(coll)) {
return createArrayIterator(coll);
}
var iterator = (0, _getIterator2.default)(coll);
return iterator ? createES2015Iterator(iterator) : createObjectIterator(coll);
}
module.exports = exports.default;
@@ -0,0 +1,111 @@
import * as React from 'react';
import { styled, keyframes } from 'goober';
import { Toast, ToastPosition, resolveValue, Renderable } from '../core/types';
import { ToastIcon } from './toast-icon';
import { prefersReducedMotion } from '../core/utils';
const enterAnimation = (factor: number) => `
0% {transform: translate3d(0,${factor * -200}%,0) scale(.6); opacity:.5;}
100% {transform: translate3d(0,0,0) scale(1); opacity:1;}
`;
const exitAnimation = (factor: number) => `
0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}
100% {transform: translate3d(0,${factor * -150}%,-1px) scale(.6); opacity:0;}
`;
const fadeInAnimation = `0%{opacity:0;} 100%{opacity:1;}`;
const fadeOutAnimation = `0%{opacity:1;} 100%{opacity:0;}`;
const ToastBarBase = styled('div')`
display: flex;
align-items: center;
background: #fff;
color: #363636;
line-height: 1.3;
will-change: transform;
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05);
max-width: 350px;
pointer-events: auto;
padding: 8px 10px;
border-radius: 8px;
`;
const Message = styled('div')`
display: flex;
justify-content: center;
margin: 4px 10px;
color: inherit;
flex: 1 1 auto;
white-space: pre-line;
`;
interface ToastBarProps {
toast: Toast;
position?: ToastPosition;
style?: React.CSSProperties;
children?: (components: {
icon: Renderable;
message: Renderable;
}) => Renderable;
}
const getAnimationStyle = (
position: ToastPosition,
visible: boolean
): React.CSSProperties => {
const top = position.includes('top');
const factor = top ? 1 : -1;
const [enter, exit] = prefersReducedMotion()
? [fadeInAnimation, fadeOutAnimation]
: [enterAnimation(factor), exitAnimation(factor)];
return {
animation: visible
? `${keyframes(enter)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`
: `${keyframes(exit)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`,
};
};
export const ToastBar: React.FC<ToastBarProps> = React.memo(
({ toast, position, style, children }) => {
const animationStyle: React.CSSProperties = toast.height
? getAnimationStyle(
toast.position || position || 'top-center',
toast.visible
)
: { opacity: 0 };
const icon = <ToastIcon toast={toast} />;
const message = (
<Message {...toast.ariaProps}>
{resolveValue(toast.message, toast)}
</Message>
);
return (
<ToastBarBase
className={toast.className}
style={{
...animationStyle,
...style,
...toast.style,
}}
>
{typeof children === 'function' ? (
children({
icon,
message,
})
) : (
<>
{icon}
{message}
</>
)}
</ToastBarBase>
);
}
);
@@ -0,0 +1,37 @@
import { isDragActive } from './drag/state/is-active.mjs';
import { setupGesture } from './utils/setup.mjs';
function isValidHover(event) {
return !(event.pointerType === "touch" || isDragActive());
}
/**
* Create a hover gesture. hover() is different to .addEventListener("pointerenter")
* in that it has an easier syntax, filters out polyfilled touch events, interoperates
* with drag gestures, and automatically removes the "pointerennd" event listener when the hover ends.
*
* @public
*/
function hover(elementOrSelector, onHoverStart, options = {}) {
const [elements, eventOptions, cancel] = setupGesture(elementOrSelector, options);
const onPointerEnter = (enterEvent) => {
if (!isValidHover(enterEvent))
return;
const { target } = enterEvent;
const onHoverEnd = onHoverStart(target, enterEvent);
if (typeof onHoverEnd !== "function" || !target)
return;
const onPointerLeave = (leaveEvent) => {
if (!isValidHover(leaveEvent))
return;
onHoverEnd(leaveEvent);
target.removeEventListener("pointerleave", onPointerLeave);
};
target.addEventListener("pointerleave", onPointerLeave, eventOptions);
};
elements.forEach((element) => {
element.addEventListener("pointerenter", onPointerEnter, eventOptions);
});
return cancel;
}
export { hover };
@@ -0,0 +1,20 @@
/*! https://mths.be/includes v2.0.0 by @mathias */
'use strict';
var callBind = require('call-bind');
var define = require('define-properties');
var implementation = require('./implementation');
var getPolyfill = require('./polyfill');
var shim = require('./shim');
var boundIncludes = callBind(getPolyfill());
define(boundIncludes, {
getPolyfill: getPolyfill,
implementation: implementation,
shim: shim
});
module.exports = boundIncludes;
@@ -0,0 +1,14 @@
/**
* Subtracts a specified number of days from a date.
* 从日期中减去指定数量的天数。
*
* @param date - The date to subtract days from. (要减去天数的日期。)
* @param days - The number of days to subtract. (要减去的天数。)
* @returns A new date with the subtracted days. (减去天数后的新日期。)
* @example
* ```ts
* const newDate = subDays(new Date(), 5);
* console.log(newDate); // Outputs the date 5 days ago (输出5天前的日期)
* ```
*/
export default function subDays(date: Date, days: number): Date;
@@ -0,0 +1,24 @@
import { __assign } from "tslib";
import { useEffect, useRef } from 'react';
function useWhyDidYouUpdate(componentName, props) {
var prevProps = useRef({});
useEffect(function () {
if (prevProps.current) {
var allKeys = Object.keys(__assign(__assign({}, prevProps.current), props));
var changedProps_1 = {};
allKeys.forEach(function (key) {
if (!Object.is(prevProps.current[key], props[key])) {
changedProps_1[key] = {
from: prevProps.current[key],
to: props[key],
};
}
});
if (Object.keys(changedProps_1).length) {
console.log('[why-did-you-update]', componentName, changedProps_1);
}
}
prevProps.current = props;
});
}
export default useWhyDidYouUpdate;
@@ -0,0 +1 @@
{"mappings":";;AAkBA,0BAA0B,gBAAgB,GAAG,mBAAmB,GAAG,iBAAiB,CAAC;AAErF,8BAA8B,CAAC,CAAE,SAAQ,WAAW,CAAC,CAAC;IACpD,KAAK,CAAC,EAAE,MAAM,IAAI,CAAA;CACnB;AAED,kCAAkC,CAAC,EAAE,KAAK,EAAE,oBAAoB,CAAC,CAAC,EAAE,KAAK,EAAE,mBAAmB,EAAE,GAAG,EAAE,UAAU,kBAAkB,GAAG,IAAI,CAAC,GAAG,SAAS,GAAG,IAAI,CA2F3J","sources":["packages/@react-aria/form/src/packages/@react-aria/form/src/useFormValidation.ts","packages/@react-aria/form/src/packages/@react-aria/form/src/index.ts","packages/@react-aria/form/src/index.ts"],"sourcesContent":[null,null,"/*\n * Copyright 2023 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nexport {useFormValidation} from './useFormValidation';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
@@ -0,0 +1,15 @@
function calcChildStagger(children, child, delayChildren, staggerChildren = 0, staggerDirection = 1) {
const index = Array.from(children)
.sort((a, b) => a.sortNodePosition(b))
.indexOf(child);
const numChildren = children.size;
const maxStaggerDuration = (numChildren - 1) * staggerChildren;
const delayIsFunction = typeof delayChildren === "function";
return delayIsFunction
? delayChildren(index, numChildren)
: staggerDirection === 1
? index * staggerChildren
: maxStaggerDuration - index * staggerChildren;
}
export { calcChildStagger };
@@ -0,0 +1,8 @@
var $b63105d663e6f9d5$exports = {};
$b63105d663e6f9d5$exports = {
"breadcrumbs": `Navigointilinkit`
};
export {$b63105d663e6f9d5$exports as default};
//# sourceMappingURL=fi-FI.module.js.map
@@ -0,0 +1,731 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
// eslint-disable-next-line n/prefer-global/process
const { versions } = require("process");
const AliasFieldPlugin = require("./AliasFieldPlugin");
const AliasPlugin = require("./AliasPlugin");
const AppendPlugin = require("./AppendPlugin");
const ConditionalPlugin = require("./ConditionalPlugin");
const DescriptionFilePlugin = require("./DescriptionFilePlugin");
const DirectoryExistsPlugin = require("./DirectoryExistsPlugin");
const ExportsFieldPlugin = require("./ExportsFieldPlugin");
const ExtensionAliasPlugin = require("./ExtensionAliasPlugin");
const FileExistsPlugin = require("./FileExistsPlugin");
const ImportsFieldPlugin = require("./ImportsFieldPlugin");
const JoinRequestPartPlugin = require("./JoinRequestPartPlugin");
const JoinRequestPlugin = require("./JoinRequestPlugin");
const MainFieldPlugin = require("./MainFieldPlugin");
const ModulesInHierarchicalDirectoriesPlugin = require("./ModulesInHierarchicalDirectoriesPlugin");
const ModulesInRootPlugin = require("./ModulesInRootPlugin");
const NextPlugin = require("./NextPlugin");
const ParsePlugin = require("./ParsePlugin");
const PnpPlugin = require("./PnpPlugin");
const Resolver = require("./Resolver");
const RestrictionsPlugin = require("./RestrictionsPlugin");
const ResultPlugin = require("./ResultPlugin");
const RootsPlugin = require("./RootsPlugin");
const SelfReferencePlugin = require("./SelfReferencePlugin");
const SymlinkPlugin = require("./SymlinkPlugin");
const SyncAsyncFileSystemDecorator = require("./SyncAsyncFileSystemDecorator");
const TryNextPlugin = require("./TryNextPlugin");
const UnsafeCachePlugin = require("./UnsafeCachePlugin");
const UseFilePlugin = require("./UseFilePlugin");
const { PathType, getType } = require("./util/path");
/** @typedef {import("./AliasPlugin").AliasOption} AliasOptionEntry */
/** @typedef {import("./ExtensionAliasPlugin").ExtensionAliasOption} ExtensionAliasOption */
/** @typedef {import("./PnpPlugin").PnpApiImpl} PnpApi */
/** @typedef {import("./Resolver").EnsuredHooks} EnsuredHooks */
/** @typedef {import("./Resolver").FileSystem} FileSystem */
/** @typedef {import("./Resolver").KnownHooks} KnownHooks */
/** @typedef {import("./Resolver").ResolveRequest} ResolveRequest */
/** @typedef {import("./Resolver").SyncFileSystem} SyncFileSystem */
/** @typedef {import("./UnsafeCachePlugin").Cache} Cache */
/** @typedef {string | string[] | false} AliasOptionNewRequest */
/** @typedef {{ [k: string]: AliasOptionNewRequest }} AliasOptions */
/** @typedef {{ [k: string]: string|string[] }} ExtensionAliasOptions */
/** @typedef {false | 0 | "" | null | undefined} Falsy */
/** @typedef {{apply: (resolver: Resolver) => void} | ((this: Resolver, resolver: Resolver) => void) | Falsy} Plugin */
/**
* @typedef {object} UserResolveOptions
* @property {(AliasOptions | AliasOptionEntry[])=} alias A list of module alias configurations or an object which maps key to value
* @property {(AliasOptions | AliasOptionEntry[])=} fallback A list of module alias configurations or an object which maps key to value, applied only after modules option
* @property {ExtensionAliasOptions=} extensionAlias An object which maps extension to extension aliases
* @property {(string | string[])[]=} aliasFields A list of alias fields in description files
* @property {((predicate: ResolveRequest) => boolean)=} cachePredicate A function which decides whether a request should be cached or not. An object is passed with at least `path` and `request` properties.
* @property {boolean=} cacheWithContext Whether or not the unsafeCache should include request context as part of the cache key.
* @property {string[]=} descriptionFiles A list of description files to read from
* @property {string[]=} conditionNames A list of exports field condition names.
* @property {boolean=} enforceExtension Enforce that a extension from extensions must be used
* @property {(string | string[])[]=} exportsFields A list of exports fields in description files
* @property {(string | string[])[]=} importsFields A list of imports fields in description files
* @property {string[]=} extensions A list of extensions which should be tried for files
* @property {FileSystem} fileSystem The file system which should be used
* @property {(Cache | boolean)=} unsafeCache Use this cache object to unsafely cache the successful requests
* @property {boolean=} symlinks Resolve symlinks to their symlinked location
* @property {Resolver=} resolver A prepared Resolver to which the plugins are attached
* @property {string[] | string=} modules A list of directories to resolve modules from, can be absolute path or folder name
* @property {(string | string[] | {name: string | string[], forceRelative: boolean})[]=} mainFields A list of main fields in description files
* @property {string[]=} mainFiles A list of main files in directories
* @property {Plugin[]=} plugins A list of additional resolve plugins which should be applied
* @property {PnpApi | null=} pnpApi A PnP API that should be used - null is "never", undefined is "auto"
* @property {string[]=} roots A list of root paths
* @property {boolean=} fullySpecified The request is already fully specified and no extensions or directories are resolved for it
* @property {boolean=} resolveToContext Resolve to a context instead of a file
* @property {(string|RegExp)[]=} restrictions A list of resolve restrictions
* @property {boolean=} useSyncFileSystemCalls Use only the sync constraints of the file system calls
* @property {boolean=} preferRelative Prefer to resolve module requests as relative requests before falling back to modules
* @property {boolean=} preferAbsolute Prefer to resolve server-relative urls as absolute paths before falling back to resolve in roots
*/
/**
* @typedef {object} ResolveOptions
* @property {AliasOptionEntry[]} alias alias
* @property {AliasOptionEntry[]} fallback fallback
* @property {Set<string | string[]>} aliasFields alias fields
* @property {ExtensionAliasOption[]} extensionAlias extension alias
* @property {(predicate: ResolveRequest) => boolean} cachePredicate cache predicate
* @property {boolean} cacheWithContext cache with context
* @property {Set<string>} conditionNames A list of exports field condition names.
* @property {string[]} descriptionFiles description files
* @property {boolean} enforceExtension enforce extension
* @property {Set<string | string[]>} exportsFields exports fields
* @property {Set<string | string[]>} importsFields imports fields
* @property {Set<string>} extensions extensions
* @property {FileSystem} fileSystem fileSystem
* @property {Cache | false} unsafeCache unsafe cache
* @property {boolean} symlinks symlinks
* @property {Resolver=} resolver resolver
* @property {Array<string | string[]>} modules modules
* @property {{ name: string[], forceRelative: boolean }[]} mainFields main fields
* @property {Set<string>} mainFiles main files
* @property {Plugin[]} plugins plugins
* @property {PnpApi | null} pnpApi pnp API
* @property {Set<string>} roots roots
* @property {boolean} fullySpecified fully specified
* @property {boolean} resolveToContext resolve to context
* @property {Set<string | RegExp>} restrictions restrictions
* @property {boolean} preferRelative prefer relative
* @property {boolean} preferAbsolute prefer absolute
*/
/**
* @param {PnpApi | null=} option option
* @returns {PnpApi | null} processed option
*/
function processPnpApiOption(option) {
if (
option === undefined &&
/** @type {NodeJS.ProcessVersions & {pnp: string}} */ versions.pnp
) {
const _findPnpApi =
/** @type {(issuer: string) => PnpApi | null}} */
(
// @ts-expect-error maybe nothing
require("module").findPnpApi
);
if (_findPnpApi) {
return {
resolveToUnqualified(request, issuer, opts) {
const pnpapi = _findPnpApi(issuer);
if (!pnpapi) {
// Issuer isn't managed by PnP
return null;
}
return pnpapi.resolveToUnqualified(request, issuer, opts);
},
};
}
}
return option || null;
}
/**
* @param {AliasOptions | AliasOptionEntry[] | undefined} alias alias
* @returns {AliasOptionEntry[]} normalized aliases
*/
function normalizeAlias(alias) {
return typeof alias === "object" && !Array.isArray(alias) && alias !== null
? Object.keys(alias).map((key) => {
/** @type {AliasOptionEntry} */
const obj = { name: key, onlyModule: false, alias: alias[key] };
if (/\$$/.test(key)) {
obj.onlyModule = true;
obj.name = key.slice(0, -1);
}
return obj;
})
: /** @type {Array<AliasOptionEntry>} */ (alias) || [];
}
/**
* Merging filtered elements
* @param {string[]} array source array
* @param {(item: string) => boolean} filter predicate
* @returns {Array<string | string[]>} merge result
*/
function mergeFilteredToArray(array, filter) {
/** @type {Array<string | string[]>} */
const result = [];
const set = new Set(array);
for (const item of set) {
if (filter(item)) {
const lastElement =
result.length > 0 ? result[result.length - 1] : undefined;
if (Array.isArray(lastElement)) {
lastElement.push(item);
} else {
result.push([item]);
}
} else {
result.push(item);
}
}
return result;
}
/**
* @param {UserResolveOptions} options input options
* @returns {ResolveOptions} output options
*/
function createOptions(options) {
const mainFieldsSet = new Set(options.mainFields || ["main"]);
/** @type {ResolveOptions["mainFields"]} */
const mainFields = [];
for (const item of mainFieldsSet) {
if (typeof item === "string") {
mainFields.push({
name: [item],
forceRelative: true,
});
} else if (Array.isArray(item)) {
mainFields.push({
name: item,
forceRelative: true,
});
} else {
mainFields.push({
name: Array.isArray(item.name) ? item.name : [item.name],
forceRelative: item.forceRelative,
});
}
}
return {
alias: normalizeAlias(options.alias),
fallback: normalizeAlias(options.fallback),
aliasFields: new Set(options.aliasFields),
cachePredicate:
options.cachePredicate ||
function trueFn() {
return true;
},
cacheWithContext:
typeof options.cacheWithContext !== "undefined"
? options.cacheWithContext
: true,
exportsFields: new Set(options.exportsFields || ["exports"]),
importsFields: new Set(options.importsFields || ["imports"]),
conditionNames: new Set(options.conditionNames),
descriptionFiles: [
...new Set(options.descriptionFiles || ["package.json"]),
],
enforceExtension:
options.enforceExtension === undefined
? Boolean(options.extensions && options.extensions.includes(""))
: options.enforceExtension,
extensions: new Set(options.extensions || [".js", ".json", ".node"]),
extensionAlias: options.extensionAlias
? Object.keys(options.extensionAlias).map((k) => ({
extension: k,
alias: /** @type {ExtensionAliasOptions} */ (options.extensionAlias)[
k
],
}))
: [],
fileSystem: options.useSyncFileSystemCalls
? new SyncAsyncFileSystemDecorator(
/** @type {SyncFileSystem} */ (
/** @type {unknown} */ (options.fileSystem)
),
)
: options.fileSystem,
unsafeCache:
options.unsafeCache && typeof options.unsafeCache !== "object"
? /** @type {Cache} */ ({})
: options.unsafeCache || false,
symlinks: typeof options.symlinks !== "undefined" ? options.symlinks : true,
resolver: options.resolver,
modules: mergeFilteredToArray(
Array.isArray(options.modules)
? options.modules
: options.modules
? [options.modules]
: ["node_modules"],
(item) => {
const type = getType(item);
return type === PathType.Normal || type === PathType.Relative;
},
),
mainFields,
mainFiles: new Set(options.mainFiles || ["index"]),
plugins: options.plugins || [],
pnpApi: processPnpApiOption(options.pnpApi),
roots: new Set(options.roots || undefined),
fullySpecified: options.fullySpecified || false,
resolveToContext: options.resolveToContext || false,
preferRelative: options.preferRelative || false,
preferAbsolute: options.preferAbsolute || false,
restrictions: new Set(options.restrictions),
};
}
/**
* @param {UserResolveOptions} options resolve options
* @returns {Resolver} created resolver
*/
module.exports.createResolver = function createResolver(options) {
const normalizedOptions = createOptions(options);
const {
alias,
fallback,
aliasFields,
cachePredicate,
cacheWithContext,
conditionNames,
descriptionFiles,
enforceExtension,
exportsFields,
extensionAlias,
importsFields,
extensions,
fileSystem,
fullySpecified,
mainFields,
mainFiles,
modules,
plugins: userPlugins,
pnpApi,
resolveToContext,
preferRelative,
preferAbsolute,
symlinks,
unsafeCache,
resolver: customResolver,
restrictions,
roots,
} = normalizedOptions;
const plugins = [...userPlugins];
const resolver =
customResolver || new Resolver(fileSystem, normalizedOptions);
// // pipeline ////
resolver.ensureHook("resolve");
resolver.ensureHook("internalResolve");
resolver.ensureHook("newInternalResolve");
resolver.ensureHook("parsedResolve");
resolver.ensureHook("describedResolve");
resolver.ensureHook("rawResolve");
resolver.ensureHook("normalResolve");
resolver.ensureHook("internal");
resolver.ensureHook("rawModule");
resolver.ensureHook("alternateRawModule");
resolver.ensureHook("module");
resolver.ensureHook("resolveAsModule");
resolver.ensureHook("undescribedResolveInPackage");
resolver.ensureHook("resolveInPackage");
resolver.ensureHook("resolveInExistingDirectory");
resolver.ensureHook("relative");
resolver.ensureHook("describedRelative");
resolver.ensureHook("directory");
resolver.ensureHook("undescribedExistingDirectory");
resolver.ensureHook("existingDirectory");
resolver.ensureHook("undescribedRawFile");
resolver.ensureHook("rawFile");
resolver.ensureHook("file");
resolver.ensureHook("finalFile");
resolver.ensureHook("existingFile");
resolver.ensureHook("resolved");
// TODO remove in next major
// cspell:word Interal
// Backward-compat
// @ts-expect-error
resolver.hooks.newInteralResolve = resolver.hooks.newInternalResolve;
// resolve
for (const { source, resolveOptions } of [
{ source: "resolve", resolveOptions: { fullySpecified } },
{ source: "internal-resolve", resolveOptions: { fullySpecified: false } },
]) {
if (unsafeCache) {
plugins.push(
new UnsafeCachePlugin(
source,
cachePredicate,
/** @type {import("./UnsafeCachePlugin").Cache} */ (unsafeCache),
cacheWithContext,
`new-${source}`,
),
);
plugins.push(
new ParsePlugin(`new-${source}`, resolveOptions, "parsed-resolve"),
);
} else {
plugins.push(new ParsePlugin(source, resolveOptions, "parsed-resolve"));
}
}
// parsed-resolve
plugins.push(
new DescriptionFilePlugin(
"parsed-resolve",
descriptionFiles,
false,
"described-resolve",
),
);
plugins.push(new NextPlugin("after-parsed-resolve", "described-resolve"));
// described-resolve
plugins.push(new NextPlugin("described-resolve", "raw-resolve"));
if (fallback.length > 0) {
plugins.push(
new AliasPlugin("described-resolve", fallback, "internal-resolve"),
);
}
// raw-resolve
if (alias.length > 0) {
plugins.push(new AliasPlugin("raw-resolve", alias, "internal-resolve"));
}
for (const item of aliasFields) {
plugins.push(new AliasFieldPlugin("raw-resolve", item, "internal-resolve"));
}
for (const item of extensionAlias) {
plugins.push(
new ExtensionAliasPlugin("raw-resolve", item, "normal-resolve"),
);
}
plugins.push(new NextPlugin("raw-resolve", "normal-resolve"));
// normal-resolve
if (preferRelative) {
plugins.push(new JoinRequestPlugin("after-normal-resolve", "relative"));
}
plugins.push(
new ConditionalPlugin(
"after-normal-resolve",
{ module: true },
"resolve as module",
false,
"raw-module",
),
);
plugins.push(
new ConditionalPlugin(
"after-normal-resolve",
{ internal: true },
"resolve as internal import",
false,
"internal",
),
);
if (preferAbsolute) {
plugins.push(new JoinRequestPlugin("after-normal-resolve", "relative"));
}
if (roots.size > 0) {
plugins.push(new RootsPlugin("after-normal-resolve", roots, "relative"));
}
if (!preferRelative && !preferAbsolute) {
plugins.push(new JoinRequestPlugin("after-normal-resolve", "relative"));
}
// internal
for (const importsField of importsFields) {
plugins.push(
new ImportsFieldPlugin(
"internal",
conditionNames,
importsField,
"relative",
"internal-resolve",
),
);
}
// raw-module
for (const exportsField of exportsFields) {
plugins.push(
new SelfReferencePlugin("raw-module", exportsField, "resolve-as-module"),
);
}
for (const item of modules) {
if (Array.isArray(item)) {
if (item.includes("node_modules") && pnpApi) {
plugins.push(
new ModulesInHierarchicalDirectoriesPlugin(
"raw-module",
item.filter((i) => i !== "node_modules"),
"module",
),
);
plugins.push(
new PnpPlugin(
"raw-module",
pnpApi,
"undescribed-resolve-in-package",
"alternate-raw-module",
),
);
plugins.push(
new ModulesInHierarchicalDirectoriesPlugin(
"alternate-raw-module",
["node_modules"],
"module",
),
);
} else {
plugins.push(
new ModulesInHierarchicalDirectoriesPlugin(
"raw-module",
item,
"module",
),
);
}
} else {
plugins.push(new ModulesInRootPlugin("raw-module", item, "module"));
}
}
// module
plugins.push(new JoinRequestPartPlugin("module", "resolve-as-module"));
// resolve-as-module
if (!resolveToContext) {
plugins.push(
new ConditionalPlugin(
"resolve-as-module",
{ directory: false, request: "." },
"single file module",
true,
"undescribed-raw-file",
),
);
}
plugins.push(
new DirectoryExistsPlugin(
"resolve-as-module",
"undescribed-resolve-in-package",
),
);
// undescribed-resolve-in-package
plugins.push(
new DescriptionFilePlugin(
"undescribed-resolve-in-package",
descriptionFiles,
false,
"resolve-in-package",
),
);
plugins.push(
new NextPlugin(
"after-undescribed-resolve-in-package",
"resolve-in-package",
),
);
// resolve-in-package
for (const exportsField of exportsFields) {
plugins.push(
new ExportsFieldPlugin(
"resolve-in-package",
conditionNames,
exportsField,
"relative",
),
);
}
plugins.push(
new NextPlugin("resolve-in-package", "resolve-in-existing-directory"),
);
// resolve-in-existing-directory
plugins.push(
new JoinRequestPlugin("resolve-in-existing-directory", "relative"),
);
// relative
plugins.push(
new DescriptionFilePlugin(
"relative",
descriptionFiles,
true,
"described-relative",
),
);
plugins.push(new NextPlugin("after-relative", "described-relative"));
// described-relative
if (resolveToContext) {
plugins.push(new NextPlugin("described-relative", "directory"));
} else {
plugins.push(
new ConditionalPlugin(
"described-relative",
{ directory: false },
null,
true,
"raw-file",
),
);
plugins.push(
new ConditionalPlugin(
"described-relative",
{ fullySpecified: false },
"as directory",
true,
"directory",
),
);
}
// directory
plugins.push(
new DirectoryExistsPlugin("directory", "undescribed-existing-directory"),
);
if (resolveToContext) {
// undescribed-existing-directory
plugins.push(new NextPlugin("undescribed-existing-directory", "resolved"));
} else {
// undescribed-existing-directory
plugins.push(
new DescriptionFilePlugin(
"undescribed-existing-directory",
descriptionFiles,
false,
"existing-directory",
),
);
for (const item of mainFiles) {
plugins.push(
new UseFilePlugin(
"undescribed-existing-directory",
item,
"undescribed-raw-file",
),
);
}
// described-existing-directory
for (const item of mainFields) {
plugins.push(
new MainFieldPlugin(
"existing-directory",
item,
"resolve-in-existing-directory",
),
);
}
for (const item of mainFiles) {
plugins.push(
new UseFilePlugin("existing-directory", item, "undescribed-raw-file"),
);
}
// undescribed-raw-file
plugins.push(
new DescriptionFilePlugin(
"undescribed-raw-file",
descriptionFiles,
true,
"raw-file",
),
);
plugins.push(new NextPlugin("after-undescribed-raw-file", "raw-file"));
// raw-file
plugins.push(
new ConditionalPlugin(
"raw-file",
{ fullySpecified: true },
null,
false,
"file",
),
);
if (!enforceExtension) {
plugins.push(new TryNextPlugin("raw-file", "no extension", "file"));
}
for (const item of extensions) {
plugins.push(new AppendPlugin("raw-file", item, "file"));
}
// file
if (alias.length > 0) {
plugins.push(new AliasPlugin("file", alias, "internal-resolve"));
}
for (const item of aliasFields) {
plugins.push(new AliasFieldPlugin("file", item, "internal-resolve"));
}
plugins.push(new NextPlugin("file", "final-file"));
// final-file
plugins.push(new FileExistsPlugin("final-file", "existing-file"));
// existing-file
if (symlinks) {
plugins.push(new SymlinkPlugin("existing-file", "existing-file"));
}
plugins.push(new NextPlugin("existing-file", "resolved"));
}
const { resolved } =
/** @type {KnownHooks & EnsuredHooks} */
(resolver.hooks);
// resolved
if (restrictions.size > 0) {
plugins.push(new RestrictionsPlugin(resolved, restrictions));
}
plugins.push(new ResultPlugin(resolved));
// // RESOLVER ////
for (const plugin of plugins) {
if (typeof plugin === "function") {
/** @type {(this: Resolver, resolver: Resolver) => void} */
(plugin).call(resolver, resolver);
} else if (plugin) {
plugin.apply(resolver);
}
}
return resolver;
};
@@ -0,0 +1,452 @@
'use strict';
module.exports = function (buf) {
if (!(buf && buf.length > 1)) {
return null;
}
if (buf[0] === 0xFF && buf[1] === 0xD8 && buf[2] === 0xFF) {
return {
ext: 'jpg',
mime: 'image/jpeg'
};
}
if (buf[0] === 0x89 && buf[1] === 0x50 && buf[2] === 0x4E && buf[3] === 0x47) {
return {
ext: 'png',
mime: 'image/png'
};
}
if (buf[0] === 0x47 && buf[1] === 0x49 && buf[2] === 0x46) {
return {
ext: 'gif',
mime: 'image/gif'
};
}
if (buf[8] === 0x57 && buf[9] === 0x45 && buf[10] === 0x42 && buf[11] === 0x50) {
return {
ext: 'webp',
mime: 'image/webp'
};
}
if (buf[0] === 0x46 && buf[1] === 0x4C && buf[2] === 0x49 && buf[3] === 0x46) {
return {
ext: 'flif',
mime: 'image/flif'
};
}
// needs to be before `tif` check
if (((buf[0] === 0x49 && buf[1] === 0x49 && buf[2] === 0x2A && buf[3] === 0x0) || (buf[0] === 0x4D && buf[1] === 0x4D && buf[2] === 0x0 && buf[3] === 0x2A)) && buf[8] === 0x43 && buf[9] === 0x52) {
return {
ext: 'cr2',
mime: 'image/x-canon-cr2'
};
}
if ((buf[0] === 0x49 && buf[1] === 0x49 && buf[2] === 0x2A && buf[3] === 0x0) || (buf[0] === 0x4D && buf[1] === 0x4D && buf[2] === 0x0 && buf[3] === 0x2A)) {
return {
ext: 'tif',
mime: 'image/tiff'
};
}
if (buf[0] === 0x42 && buf[1] === 0x4D) {
return {
ext: 'bmp',
mime: 'image/bmp'
};
}
if (buf[0] === 0x49 && buf[1] === 0x49 && buf[2] === 0xBC) {
return {
ext: 'jxr',
mime: 'image/vnd.ms-photo'
};
}
if (buf[0] === 0x38 && buf[1] === 0x42 && buf[2] === 0x50 && buf[3] === 0x53) {
return {
ext: 'psd',
mime: 'image/vnd.adobe.photoshop'
};
}
// needs to be before `zip` check
if (buf[0] === 0x50 && buf[1] === 0x4B && buf[2] === 0x3 && buf[3] === 0x4 && buf[30] === 0x6D && buf[31] === 0x69 && buf[32] === 0x6D && buf[33] === 0x65 && buf[34] === 0x74 && buf[35] === 0x79 && buf[36] === 0x70 && buf[37] === 0x65 && buf[38] === 0x61 && buf[39] === 0x70 && buf[40] === 0x70 && buf[41] === 0x6C && buf[42] === 0x69 && buf[43] === 0x63 && buf[44] === 0x61 && buf[45] === 0x74 && buf[46] === 0x69 && buf[47] === 0x6F && buf[48] === 0x6E && buf[49] === 0x2F && buf[50] === 0x65 && buf[51] === 0x70 && buf[52] === 0x75 && buf[53] === 0x62 && buf[54] === 0x2B && buf[55] === 0x7A && buf[56] === 0x69 && buf[57] === 0x70) {
return {
ext: 'epub',
mime: 'application/epub+zip'
};
}
// needs to be before `zip` check
// assumes signed .xpi from addons.mozilla.org
if (buf[0] === 0x50 && buf[1] === 0x4B && buf[2] === 0x3 && buf[3] === 0x4 && buf[30] === 0x4D && buf[31] === 0x45 && buf[32] === 0x54 && buf[33] === 0x41 && buf[34] === 0x2D && buf[35] === 0x49 && buf[36] === 0x4E && buf[37] === 0x46 && buf[38] === 0x2F && buf[39] === 0x6D && buf[40] === 0x6F && buf[41] === 0x7A && buf[42] === 0x69 && buf[43] === 0x6C && buf[44] === 0x6C && buf[45] === 0x61 && buf[46] === 0x2E && buf[47] === 0x72 && buf[48] === 0x73 && buf[49] === 0x61) {
return {
ext: 'xpi',
mime: 'application/x-xpinstall'
};
}
if (buf[0] === 0x50 && buf[1] === 0x4B && (buf[2] === 0x3 || buf[2] === 0x5 || buf[2] === 0x7) && (buf[3] === 0x4 || buf[3] === 0x6 || buf[3] === 0x8)) {
return {
ext: 'zip',
mime: 'application/zip'
};
}
if (buf[257] === 0x75 && buf[258] === 0x73 && buf[259] === 0x74 && buf[260] === 0x61 && buf[261] === 0x72) {
return {
ext: 'tar',
mime: 'application/x-tar'
};
}
if (buf[0] === 0x52 && buf[1] === 0x61 && buf[2] === 0x72 && buf[3] === 0x21 && buf[4] === 0x1A && buf[5] === 0x7 && (buf[6] === 0x0 || buf[6] === 0x1)) {
return {
ext: 'rar',
mime: 'application/x-rar-compressed'
};
}
if (buf[0] === 0x1F && buf[1] === 0x8B && buf[2] === 0x8) {
return {
ext: 'gz',
mime: 'application/gzip'
};
}
if (buf[0] === 0x42 && buf[1] === 0x5A && buf[2] === 0x68) {
return {
ext: 'bz2',
mime: 'application/x-bzip2'
};
}
if (buf[0] === 0x37 && buf[1] === 0x7A && buf[2] === 0xBC && buf[3] === 0xAF && buf[4] === 0x27 && buf[5] === 0x1C) {
return {
ext: '7z',
mime: 'application/x-7z-compressed'
};
}
if (buf[0] === 0x78 && buf[1] === 0x01) {
return {
ext: 'dmg',
mime: 'application/x-apple-diskimage'
};
}
if (
(buf[0] === 0x0 && buf[1] === 0x0 && buf[2] === 0x0 && (buf[3] === 0x18 || buf[3] === 0x20) && buf[4] === 0x66 && buf[5] === 0x74 && buf[6] === 0x79 && buf[7] === 0x70) ||
(buf[0] === 0x33 && buf[1] === 0x67 && buf[2] === 0x70 && buf[3] === 0x35) ||
(buf[0] === 0x0 && buf[1] === 0x0 && buf[2] === 0x0 && buf[3] === 0x1C && buf[4] === 0x66 && buf[5] === 0x74 && buf[6] === 0x79 && buf[7] === 0x70 && buf[8] === 0x6D && buf[9] === 0x70 && buf[10] === 0x34 && buf[11] === 0x32 && buf[16] === 0x6D && buf[17] === 0x70 && buf[18] === 0x34 && buf[19] === 0x31 && buf[20] === 0x6D && buf[21] === 0x70 && buf[22] === 0x34 && buf[23] === 0x32 && buf[24] === 0x69 && buf[25] === 0x73 && buf[26] === 0x6F && buf[27] === 0x6D) ||
(buf[0] === 0x0 && buf[1] === 0x0 && buf[2] === 0x0 && buf[3] === 0x1C && buf[4] === 0x66 && buf[5] === 0x74 && buf[6] === 0x79 && buf[7] === 0x70 && buf[8] === 0x69 && buf[9] === 0x73 && buf[10] === 0x6F && buf[11] === 0x6D) ||
(buf[0] === 0x0 && buf[1] === 0x0 && buf[2] === 0x0 && buf[3] === 0x1c && buf[4] === 0x66 && buf[5] === 0x74 && buf[6] === 0x79 && buf[7] === 0x70 && buf[8] === 0x6D && buf[9] === 0x70 && buf[10] === 0x34 && buf[11] === 0x32 && buf[12] === 0x0 && buf[13] === 0x0 && buf[14] === 0x0 && buf[15] === 0x0)
) {
return {
ext: 'mp4',
mime: 'video/mp4'
};
}
if ((buf[0] === 0x0 && buf[1] === 0x0 && buf[2] === 0x0 && buf[3] === 0x1C && buf[4] === 0x66 && buf[5] === 0x74 && buf[6] === 0x79 && buf[7] === 0x70 && buf[8] === 0x4D && buf[9] === 0x34 && buf[10] === 0x56)) {
return {
ext: 'm4v',
mime: 'video/x-m4v'
};
}
if (buf[0] === 0x4D && buf[1] === 0x54 && buf[2] === 0x68 && buf[3] === 0x64) {
return {
ext: 'mid',
mime: 'audio/midi'
};
}
// needs to be before the `webm` check
if (buf[31] === 0x6D && buf[32] === 0x61 && buf[33] === 0x74 && buf[34] === 0x72 && buf[35] === 0x6f && buf[36] === 0x73 && buf[37] === 0x6B && buf[38] === 0x61) {
return {
ext: 'mkv',
mime: 'video/x-matroska'
};
}
if (buf[0] === 0x1A && buf[1] === 0x45 && buf[2] === 0xDF && buf[3] === 0xA3) {
return {
ext: 'webm',
mime: 'video/webm'
};
}
if (buf[0] === 0x0 && buf[1] === 0x0 && buf[2] === 0x0 && buf[3] === 0x14 && buf[4] === 0x66 && buf[5] === 0x74 && buf[6] === 0x79 && buf[7] === 0x70) {
return {
ext: 'mov',
mime: 'video/quicktime'
};
}
if (buf[0] === 0x52 && buf[1] === 0x49 && buf[2] === 0x46 && buf[3] === 0x46 && buf[8] === 0x41 && buf[9] === 0x56 && buf[10] === 0x49) {
return {
ext: 'avi',
mime: 'video/x-msvideo'
};
}
if (buf[0] === 0x30 && buf[1] === 0x26 && buf[2] === 0xB2 && buf[3] === 0x75 && buf[4] === 0x8E && buf[5] === 0x66 && buf[6] === 0xCF && buf[7] === 0x11 && buf[8] === 0xA6 && buf[9] === 0xD9) {
return {
ext: 'wmv',
mime: 'video/x-ms-wmv'
};
}
if (buf[0] === 0x0 && buf[1] === 0x0 && buf[2] === 0x1 && buf[3].toString(16)[0] === 'b') {
return {
ext: 'mpg',
mime: 'video/mpeg'
};
}
if ((buf[0] === 0x49 && buf[1] === 0x44 && buf[2] === 0x33) || (buf[0] === 0xFF && buf[1] === 0xfb)) {
return {
ext: 'mp3',
mime: 'audio/mpeg'
};
}
if ((buf[4] === 0x66 && buf[5] === 0x74 && buf[6] === 0x79 && buf[7] === 0x70 && buf[8] === 0x4D && buf[9] === 0x34 && buf[10] === 0x41) || (buf[0] === 0x4D && buf[1] === 0x34 && buf[2] === 0x41 && buf[3] === 0x20)) {
return {
ext: 'm4a',
mime: 'audio/m4a'
};
}
// needs to be before `ogg` check
if (buf[28] === 0x4F && buf[29] === 0x70 && buf[30] === 0x75 && buf[31] === 0x73 && buf[32] === 0x48 && buf[33] === 0x65 && buf[34] === 0x61 && buf[35] === 0x64) {
return {
ext: 'opus',
mime: 'audio/opus'
};
}
if (buf[0] === 0x4F && buf[1] === 0x67 && buf[2] === 0x67 && buf[3] === 0x53) {
return {
ext: 'ogg',
mime: 'audio/ogg'
};
}
if (buf[0] === 0x66 && buf[1] === 0x4C && buf[2] === 0x61 && buf[3] === 0x43) {
return {
ext: 'flac',
mime: 'audio/x-flac'
};
}
if (buf[0] === 0x52 && buf[1] === 0x49 && buf[2] === 0x46 && buf[3] === 0x46 && buf[8] === 0x57 && buf[9] === 0x41 && buf[10] === 0x56 && buf[11] === 0x45) {
return {
ext: 'wav',
mime: 'audio/x-wav'
};
}
if (buf[0] === 0x23 && buf[1] === 0x21 && buf[2] === 0x41 && buf[3] === 0x4D && buf[4] === 0x52 && buf[5] === 0x0A) {
return {
ext: 'amr',
mime: 'audio/amr'
};
}
if (buf[0] === 0x25 && buf[1] === 0x50 && buf[2] === 0x44 && buf[3] === 0x46) {
return {
ext: 'pdf',
mime: 'application/pdf'
};
}
if (buf[0] === 0x4D && buf[1] === 0x5A) {
return {
ext: 'exe',
mime: 'application/x-msdownload'
};
}
if ((buf[0] === 0x43 || buf[0] === 0x46) && buf[1] === 0x57 && buf[2] === 0x53) {
return {
ext: 'swf',
mime: 'application/x-shockwave-flash'
};
}
if (buf[0] === 0x7B && buf[1] === 0x5C && buf[2] === 0x72 && buf[3] === 0x74 && buf[4] === 0x66) {
return {
ext: 'rtf',
mime: 'application/rtf'
};
}
if (
(buf[0] === 0x77 && buf[1] === 0x4F && buf[2] === 0x46 && buf[3] === 0x46) &&
(
(buf[4] === 0x00 && buf[5] === 0x01 && buf[6] === 0x00 && buf[7] === 0x00) ||
(buf[4] === 0x4F && buf[5] === 0x54 && buf[6] === 0x54 && buf[7] === 0x4F)
)
) {
return {
ext: 'woff',
mime: 'application/font-woff'
};
}
if (
(buf[0] === 0x77 && buf[1] === 0x4F && buf[2] === 0x46 && buf[3] === 0x32) &&
(
(buf[4] === 0x00 && buf[5] === 0x01 && buf[6] === 0x00 && buf[7] === 0x00) ||
(buf[4] === 0x4F && buf[5] === 0x54 && buf[6] === 0x54 && buf[7] === 0x4F)
)
) {
return {
ext: 'woff2',
mime: 'application/font-woff'
};
}
if (
(buf[34] === 0x4C && buf[35] === 0x50) &&
(
(buf[8] === 0x00 && buf[9] === 0x00 && buf[10] === 0x01) ||
(buf[8] === 0x01 && buf[9] === 0x00 && buf[10] === 0x02) ||
(buf[8] === 0x02 && buf[9] === 0x00 && buf[10] === 0x02)
)
) {
return {
ext: 'eot',
mime: 'application/octet-stream'
};
}
if (buf[0] === 0x00 && buf[1] === 0x01 && buf[2] === 0x00 && buf[3] === 0x00 && buf[4] === 0x00) {
return {
ext: 'ttf',
mime: 'application/font-sfnt'
};
}
if (buf[0] === 0x4F && buf[1] === 0x54 && buf[2] === 0x54 && buf[3] === 0x4F && buf[4] === 0x00) {
return {
ext: 'otf',
mime: 'application/font-sfnt'
};
}
if (buf[0] === 0x00 && buf[1] === 0x00 && buf[2] === 0x01 && buf[3] === 0x00) {
return {
ext: 'ico',
mime: 'image/x-icon'
};
}
if (buf[0] === 0x46 && buf[1] === 0x4C && buf[2] === 0x56 && buf[3] === 0x01) {
return {
ext: 'flv',
mime: 'video/x-flv'
};
}
if (buf[0] === 0x25 && buf[1] === 0x21) {
return {
ext: 'ps',
mime: 'application/postscript'
};
}
if (buf[0] === 0xFD && buf[1] === 0x37 && buf[2] === 0x7A && buf[3] === 0x58 && buf[4] === 0x5A && buf[5] === 0x00) {
return {
ext: 'xz',
mime: 'application/x-xz'
};
}
if (buf[0] === 0x53 && buf[1] === 0x51 && buf[2] === 0x4C && buf[3] === 0x69) {
return {
ext: 'sqlite',
mime: 'application/x-sqlite3'
};
}
if (buf[0] === 0x4E && buf[1] === 0x45 && buf[2] === 0x53 && buf[3] === 0x1A) {
return {
ext: 'nes',
mime: 'application/x-nintendo-nes-rom'
};
}
if (buf[0] === 0x43 && buf[1] === 0x72 && buf[2] === 0x32 && buf[3] === 0x34) {
return {
ext: 'crx',
mime: 'application/x-google-chrome-extension'
};
}
if (
(buf[0] === 0x4D && buf[1] === 0x53 && buf[2] === 0x43 && buf[3] === 0x46) ||
(buf[0] === 0x49 && buf[1] === 0x53 && buf[2] === 0x63 && buf[3] === 0x28)
) {
return {
ext: 'cab',
mime: 'application/vnd.ms-cab-compressed'
};
}
// needs to be before `ar` check
if (buf[0] === 0x21 && buf[1] === 0x3C && buf[2] === 0x61 && buf[3] === 0x72 && buf[4] === 0x63 && buf[5] === 0x68 && buf[6] === 0x3E && buf[7] === 0x0A && buf[8] === 0x64 && buf[9] === 0x65 && buf[10] === 0x62 && buf[11] === 0x69 && buf[12] === 0x61 && buf[13] === 0x6E && buf[14] === 0x2D && buf[15] === 0x62 && buf[16] === 0x69 && buf[17] === 0x6E && buf[18] === 0x61 && buf[19] === 0x72 && buf[20] === 0x79) {
return {
ext: 'deb',
mime: 'application/x-deb'
};
}
if (buf[0] === 0x21 && buf[1] === 0x3C && buf[2] === 0x61 && buf[3] === 0x72 && buf[4] === 0x63 && buf[5] === 0x68 && buf[6] === 0x3E) {
return {
ext: 'ar',
mime: 'application/x-unix-archive'
};
}
if (buf[0] === 0xED && buf[1] === 0xAB && buf[2] === 0xEE && buf[3] === 0xDB) {
return {
ext: 'rpm',
mime: 'application/x-rpm'
};
}
if (
(buf[0] === 0x1F && buf[1] === 0xA0) ||
(buf[0] === 0x1F && buf[1] === 0x9D)
) {
return {
ext: 'Z',
mime: 'application/x-compress'
};
}
if (buf[0] === 0x4C && buf[1] === 0x5A && buf[2] === 0x49 && buf[3] === 0x50) {
return {
ext: 'lz',
mime: 'application/x-lzip'
};
}
if (buf[0] === 0xD0 && buf[1] === 0xCF && buf[2] === 0x11 && buf[3] === 0xE0 && buf[4] === 0xA1 && buf[5] === 0xB1 && buf[6] === 0x1A && buf[7] === 0xE1) {
return {
ext: 'msi',
mime: 'application/x-msi'
};
}
return null;
};
@@ -0,0 +1,98 @@
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you 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 REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
import {AriaLinkProps} from '@react-types/link';
import {DOMAttributes, FocusableElement, RefObject} from '@react-types/shared';
import {filterDOMProps, mergeProps, shouldClientNavigate, useLinkProps, useRouter} from '@react-aria/utils';
import React from 'react';
import {useFocusable} from '@react-aria/focus';
import {usePress} from '@react-aria/interactions';
export interface AriaLinkOptions extends AriaLinkProps {
/** Whether the link is disabled. */
isDisabled?: boolean,
/**
* The HTML element used to render the link, e.g. 'a', or 'span'.
* @default 'a'
*/
elementType?: string
}
export interface LinkAria {
/** Props for the link element. */
linkProps: DOMAttributes,
/** Whether the link is currently pressed. */
isPressed: boolean
}
/**
* Provides the behavior and accessibility implementation for a link component.
* A link allows a user to navigate to another page or resource within a web page
* or application.
*/
export function useLink(props: AriaLinkOptions, ref: RefObject<FocusableElement | null>): LinkAria {
let {
elementType = 'a',
onPress,
onPressStart,
onPressEnd,
// @ts-ignore
onClick: deprecatedOnClick,
isDisabled,
...otherProps
} = props;
let linkProps: DOMAttributes = {};
if (elementType !== 'a') {
linkProps = {
role: 'link',
tabIndex: !isDisabled ? 0 : undefined
};
}
let {focusableProps} = useFocusable(props, ref);
let {pressProps, isPressed} = usePress({onPress, onPressStart, onPressEnd, isDisabled, ref});
let domProps = filterDOMProps(otherProps, {labelable: true});
let interactionHandlers = mergeProps(focusableProps, pressProps);
let router = useRouter();
let routerLinkProps = useLinkProps(props);
return {
isPressed, // Used to indicate press state for visual
linkProps: mergeProps(domProps, routerLinkProps, {
...interactionHandlers,
...linkProps,
'aria-disabled': isDisabled || undefined,
'aria-current': props['aria-current'],
onClick: (e: React.MouseEvent<HTMLAnchorElement>) => {
pressProps.onClick?.(e);
if (deprecatedOnClick) {
deprecatedOnClick(e);
console.warn('onClick is deprecated, please use onPress');
}
// If a custom router is provided, prevent default and forward if this link should client navigate.
if (
!router.isNative &&
e.currentTarget instanceof HTMLAnchorElement &&
e.currentTarget.href &&
// If props are applied to a router Link component, it may have already prevented default.
!e.isDefaultPrevented() &&
shouldClientNavigate(e.currentTarget, e) &&
props.href
) {
e.preventDefault();
router.open(e.currentTarget, e, props.href, props.routerOptions);
}
}
})
};
}
@@ -0,0 +1,7 @@
export default (function (o, c) {
var proto = c.prototype;
proto.toArray = function () {
return [this.$y, this.$M, this.$D, this.$H, this.$m, this.$s, this.$ms];
};
});
@@ -0,0 +1,51 @@
/**
* @author Toru Nagashima
* See LICENSE file in root directory for full license.
*/
"use strict"
const { checkExtraneous, messages } = require("../util/check-extraneous")
const getAllowModules = require("../util/get-allow-modules")
const getConvertPath = require("../util/get-convert-path")
const getResolvePaths = require("../util/get-resolve-paths")
const getResolverConfig = require("../util/get-resolver-config")
const getTryExtensions = require("../util/get-try-extensions")
const visitRequire = require("../util/visit-require")
/** @type {import('./rule-module').RuleModule} */
module.exports = {
meta: {
docs: {
description:
"disallow `require()` expressions which import extraneous modules",
recommended: true,
url: "https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-extraneous-require.md",
},
type: "problem",
fixable: null,
schema: [
{
type: "object",
properties: {
allowModules: getAllowModules.schema,
convertPath: getConvertPath.schema,
resolvePaths: getResolvePaths.schema,
resolverConfig: getResolverConfig.schema,
tryExtensions: getTryExtensions.schema,
},
additionalProperties: false,
},
],
messages,
},
create(context) {
const filePath = context.filename ?? context.getFilename()
if (filePath === "<input>") {
return {}
}
return visitRequire(context, {}, targets => {
checkExtraneous(context, filePath, targets)
})
},
}
@@ -0,0 +1,10 @@
function _typeof(o) {
"@babel/helpers - typeof";
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
return typeof o;
} : function (o) {
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
}, _typeof(o);
}
export { _typeof as default };
@@ -0,0 +1,115 @@
import * as util from "../core/util.js";
const error = () => {
const Sizable = {
string: { unit: "simvol", verb: "olmalıdır" },
file: { unit: "bayt", verb: "olmalıdır" },
array: { unit: "element", verb: "olmalıdır" },
set: { unit: "element", verb: "olmalıdır" },
};
function getSizing(origin) {
return Sizable[origin] ?? null;
}
const parsedType = (data) => {
const t = typeof data;
switch (t) {
case "number": {
return Number.isNaN(data) ? "NaN" : "number";
}
case "object": {
if (Array.isArray(data)) {
return "array";
}
if (data === null) {
return "null";
}
if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
return data.constructor.name;
}
}
}
return t;
};
const Nouns = {
regex: "input",
email: "email address",
url: "URL",
emoji: "emoji",
uuid: "UUID",
uuidv4: "UUIDv4",
uuidv6: "UUIDv6",
nanoid: "nanoid",
guid: "GUID",
cuid: "cuid",
cuid2: "cuid2",
ulid: "ULID",
xid: "XID",
ksuid: "KSUID",
datetime: "ISO datetime",
date: "ISO date",
time: "ISO time",
duration: "ISO duration",
ipv4: "IPv4 address",
ipv6: "IPv6 address",
cidrv4: "IPv4 range",
cidrv6: "IPv6 range",
base64: "base64-encoded string",
base64url: "base64url-encoded string",
json_string: "JSON string",
e164: "E.164 number",
jwt: "JWT",
template_literal: "input",
};
return (issue) => {
switch (issue.code) {
case "invalid_type":
return `Yanlış dəyər: gözlənilən ${issue.expected}, daxil olan ${parsedType(issue.input)}`;
case "invalid_value":
if (issue.values.length === 1)
return `Yanlış dəyər: gözlənilən ${util.stringifyPrimitive(issue.values[0])}`;
return `Yanlış seçim: aşağıdakılardan biri olmalıdır: ${util.joinValues(issue.values, "|")}`;
case "too_big": {
const adj = issue.inclusive ? "<=" : "<";
const sizing = getSizing(issue.origin);
if (sizing)
return `Çox böyük: gözlənilən ${issue.origin ?? "dəyər"} ${adj}${issue.maximum.toString()} ${sizing.unit ?? "element"}`;
return `Çox böyük: gözlənilən ${issue.origin ?? "dəyər"} ${adj}${issue.maximum.toString()}`;
}
case "too_small": {
const adj = issue.inclusive ? ">=" : ">";
const sizing = getSizing(issue.origin);
if (sizing)
return `Çox kiçik: gözlənilən ${issue.origin} ${adj}${issue.minimum.toString()} ${sizing.unit}`;
return `Çox kiçik: gözlənilən ${issue.origin} ${adj}${issue.minimum.toString()}`;
}
case "invalid_format": {
const _issue = issue;
if (_issue.format === "starts_with")
return `Yanlış mətn: "${_issue.prefix}" ilə başlamalıdır`;
if (_issue.format === "ends_with")
return `Yanlış mətn: "${_issue.suffix}" ilə bitməlidir`;
if (_issue.format === "includes")
return `Yanlış mətn: "${_issue.includes}" daxil olmalıdır`;
if (_issue.format === "regex")
return `Yanlış mətn: ${_issue.pattern} şablonuna uyğun olmalıdır`;
return `Yanlış ${Nouns[_issue.format] ?? issue.format}`;
}
case "not_multiple_of":
return `Yanlış ədəd: ${issue.divisor} ilə bölünə bilən olmalıdır`;
case "unrecognized_keys":
return `Tanınmayan açar${issue.keys.length > 1 ? "lar" : ""}: ${util.joinValues(issue.keys, ", ")}`;
case "invalid_key":
return `${issue.origin} daxilində yanlış açar`;
case "invalid_union":
return "Yanlış dəyər";
case "invalid_element":
return `${issue.origin} daxilində yanlış dəyər`;
default:
return `Yanlış dəyər`;
}
};
};
export default function () {
return {
localeError: error(),
};
}
@@ -0,0 +1,26 @@
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
var _react = require("react");
var _useLatest = _interopRequireDefault(require("../useLatest"));
var _utils = require("../utils");
var _isDev = _interopRequireDefault(require("../utils/isDev"));
var useUnmount = function useUnmount(fn) {
if (_isDev["default"]) {
if (!(0, _utils.isFunction)(fn)) {
console.error("useUnmount expected parameter is a function, got ".concat((0, _typeof2["default"])(fn)));
}
}
var fnRef = (0, _useLatest["default"])(fn);
(0, _react.useEffect)(function () {
return function () {
fnRef.current();
};
}, []);
};
var _default = exports["default"] = useUnmount;
@@ -0,0 +1,935 @@
flf2a$ 9 8 22 63 16 0 24511 0
Author : LG Beard
Date : 2004/3/27 20:45:15
Version: 1.0
-------------------------------------------------
-------------------------------------------------
This font has been created using JavE's FIGlet font export assistant.
Have a look at: http://www.jave.de
Permission is hereby given to modify this font, as long as the
modifier's name is placed on a comment line.
---
Font modified June 17, 2007 by patorjk
This was to widen the space character.
$ $#
$ $#
$ $#
$ $#
$ $#
$ $#
$ $#
$ $#
$ $##
.=-.-. #
/==/_ / #
|==|, | #
|==| | #
/==/. / #
`--`-` #
.=. #
:=; : #
`=` ##
,--.- ,--.-, #
/==/, /==/ -/ #
|==|_ |==|_ | #
|==| |==| | #
/==/, /==/, / #
`--`-'`--`-' #
#
#
##
,--, ,--, #
__ /-\==\/-\==\_ #
/\_ \'/==/ '/==/_\#
\/================/#
/\__ \/==/ /==/_\/ #
\/===============/ #
/ `/==/ `/==/ #
`--`-` -`-` #
##
$#
#
#
#
#
#
#
#
##
.=. ,--, #
:=; :/-\==\ #
`=`/ '/==/ #
/ /==/ #
/ -/==/ #
/ `/==/ #
/ -/==/.=. #
/ `/==/:=; : #
`--`-` `=` ##
,---.--. #
/ -_ \==\ #
|` / \/==/ #
\ \ /==/ #
/ \==/ #
/. / \==\ #
| _ \_/\==\ #
\ . - /\==\ #
'----`-`--` ##
.--.-. #
/==/ / #
\==\ -\ #
\==\- \ #
`--`-' #
#
#
#
##
.-.--. #
\ \==\ #
/- /==/ #
/' /==/ #
|,|==| #
\ \==\ #
\ ,\==\ #
/ -/==/ #
`-'--' ##
.--.-. #
/==/ / #
\==\ -\ #
\==\ `\ #
|==|,| #
/==/ / #
/==/, / #
\==\- \ #
`--`-' ##
*#
#
#
#
#
#
#
#
##
.--.-. #
/==/ / #
\==\ -\ #
,--,--`--`--`--. #
\==\ ========== \ #
`--`-,--,--,---` #
/==/, / #
\==\- \ #
`--`-' ##
#
#
#
#
,--, #
/-\==\ #
/ '/==/ #
/ /==/ #
`--`--` ##
#
#
,--.--------. #
/==/, - , -\ #
\==\.-. - ,-./ #
`--`--------` #
#
#
##
#
#
#
#
#
#
.=. #
:=; : #
`=` ##
,--, #
/-\==\ #
/ '/==/ #
/ /==/ #
/ -/==/ #
/ `/==/ #
/ -/==/ #
/ `/==/ #
`--`-` ##
_.---.,_ #
.' - , `.-, #
/ - , ,_\==\ #
| .=. |==| #
| - :=; : _|==| #
| `=` , |==| #
\ _, - /==/ #
`. - .`=.` #
``--'--' ##
,-----.--. #
/` ` - /==/ #
`-'-. -|==| #
| `|==| #
| -|==| #
| `|==| #
.-','|==| #
/ \==\ #
`-----`---` ##
,-----,--, #
| '- -\==\ #
\,--, '/==/ #
/ /==/ #
/ -/==/ #
/ -/==/ #
/ `\==\_,--, #
/` - ,/==/ #
`------`--` ##
.----, #
/ ``--`.-, #
'-._ -|==| #
.-.' |==| #
\ , _\==\ #
`-. |==| #
_.-', _|==| #
\ , \==\ #
``-----'--' ##
.--, .-.--, #
| |=| -\==\ #
| `-' _|==| #
\ , |==| #
`--. -|==| #
\_ |==| #
| \==\ #
\ /==/ #
`--` ##
,-.--. #
/ - \==\ #
/ /\/==/ #
| \==\ #
/ `-.`-. #
`--. \==\ #
.-/ /==/ #
/ /==/ #
`-----`-` ##
.,-. #
/ \==\ #
/ -/==/ #
/- /==/ #
/ /==/ #
/. / \==\ #
| _ \_/\==\ #
\ . - /==/ #
'----`--` ##
,-----,--, #
| '- -\==\ #
\,--, '/==/ #
/ /==/ #
/ -/==/ #
/ `/==/ #
/ -/==/ #
/ `/==/ #
`--`-` ##
,---.--. #
/ -_ \==\ #
|` / \/==/ #
\ \ /==/ #
/ \==/ #
/. / \==\ #
| _ \_/\==\ #
\ . - /==/ #
'----`--` ##
,--,----. #
/==/ .=. \ #
\==\ '='\ \ #
`--`--'/ `/ #
/==/ -/ #
/==/ -/ #
/==/- / #
\==\ / #
`-'` ##
#
.=. #
:=; : #
`=` #
.=. #
:=; : #
`=` #
#
##
#
.=. #
:=; : #
`=` #
.=. #
:=; : #
`.` #
#
##
.--. #
/ \==\ #
/- /==/ #
/' /==/ #
| ,|==| #
\ \==\ #
\ ,\==\ #
\- \==\ #
`./==/ ##
,--.--------. #
/==/, - , -\ #
\==\.-. - ,-./ #
`--`--------` #
,--.--------. #
/==/, - , -\ #
\==\.-. - ,-./ #
`--`--------` #
##
.--. #
/==/ \ #
\==\ -\ #
\==\ `\ #
|==|, | #
/==/ / #
/==/, / #
/==/ -/ #
\==\.' ##
,--,---. #
/==/ - ` \ #
\==\/\ - | #
`--`/ `/ #
|==| | #
`--`--` #
.=. #
:=; : #
`=` ##
_,----. #
,-.--` , \ #
/==/- _.-`\ #
/==/ `.-. \ #
\==\_ , / / #
\==\ .-' / #
`._`.___.' #
#
##
,---. #
.--.' \ #
\==\-/\ \ #
/==/-|_\ | #
\==\, - \ #
/==/ - ,| #
/==/- /\ - \ #
\==\ _.\=\.-' #
`--` ##
#
_..---. #
.' .'.-. \ #
/==/- '=' / #
|==|-, ' #
|==| .=. \ #
/==/- '=' ,| #
|==| - / #
`-._`.___,' ##
_,.----. #
.' .' - \ #
/==/ , ,-' #
|==|- | . #
|==|_ `-' \ #
|==| _ , | #
\==\. / #
`-.`.___.-' #
##
#
_,..---._ #
/==/, - \ #
|==| _ _\ #
|==| .=. | #
|==|,| | -| #
|==| '=' / #
|==|-, _`/ #
`-.`.____.' ##
,----. #
,-.--` , \ #
|==|- _.-` #
|==| `.-. #
/==/_ , / #
|==| .-' #
|==|_ ,`-._ #
/==/ , / #
`--`-----`` ##
_,---. #
.-`.' , \ #
/==/_ _.-' #
/==/- '..-. #
|==|_ , / #
|==| .--' #
|==|- | #
/==/ \ #
`--`---' ##
_,---. #
_.='.'-, \ #
/==.'- / #
/==/ - .-' #
|==|_ /_,-. #
|==| , \_.' ) #
\==\- , ( #
/==/ _ , / #
`--`------' ##
,--.-,,-,--, #
/==/ /|=| | #
|==|_ ||=|, | #
|==| ,|/=| _| #
|==|- `-' _ | #
|==| _ | #
|==| .-. ,\ #
/==/, //=/ | #
`--`-' `-`--` ##
.=-.-. #
/==/_ / #
|==|, | #
|==| | #
|==|- | #
|==| ,| #
|==|- | #
/==/. / #
`--`-` ##
,--.-, #
|==' -| #
|==|- | #
__|==|, | #
,--.-'\=|- | #
|==|- |=/ ,| #
|==|. /=| -| #
\==\, `-' / #
`--`----' ##
,--.-.,-. #
/==/- |\ \ #
|==|_ `/_ / #
|==| , / #
|==|- .| #
|==| _ , \ #
/==/ '\ | #
\==\ /\=\.' #
`--` ##
#
_.-. #
.-,.'| #
|==|, | #
|==|- | #
|==|, | #
|==|- `-._ #
/==/ - , ,/ #
`--`-----' ##
___ #
.-._ .'=.'\ #
/==/ \|==| | #
|==|,| / - | #
|==| \/ , | #
|==|- , _ | #
|==| _ /\ | #
/==/ / / , / #
`--`./ `--` ##
.-._ #
/==/ \ .-._ #
|==|, \/ /, / #
|==|- \| | #
|==| , | -| #
|==| - _ | #
|==| /\ , | #
/==/, | |- | #
`--`./ `--` ##
_,.---._ #
,-.' , - `. #
/==/_, , - \ #
|==| .=. | #
|==|_ : ;=: - | #
|==| , '=' | #
\==\ - ,_ / #
'.='. - .' #
`--`--'' ##
_ __ #
.-`.' ,`. #
/==/, - \ #
|==| _ .=. | #
|==| , '=',| #
|==|- '..' #
|==|, | #
/==/ - | #
`--`---' ##
_,.---._ #
,-.' - , `. #
/==/ , - \ #
|==| - .=. , | #
|==| : ;=: - | #
|==|, '=' , | #
\==\ _ - ; #
'.='. , ; -\ #
`--`--'' `--` ##
#
.-.,.---. #
/==/ ` \ #
|==|-, .=., | #
|==| '=' / #
|==|- , .' #
|==|_ . ,'. #
/==/ /\ , ) #
`--`-`--`--' ##
,-,--. #
,-.'- _\ #
/==/_ ,_.' #
\==\ \ #
\==\ -\ #
_\==\ ,\ #
/==/\/ _ | #
\==\ - , / #
`--`---' ##
,--.--------. #
/==/, - , -\ #
\==\.-. - ,-./ #
`--`\==\- \ #
\==\_ \ #
|==|- | #
|==|, | #
/==/ -/ #
`--`--` ##
#
.--.-. .-.-. #
/==/ -|/=/ | #
|==| ,||=| -| #
|==|- | =/ | #
|==|, \/ - | #
|==|- , / #
/==/ , _ .' #
`--`..---' ##
,-.-. #
,--.-./=/ ,/ #
/==/, ||=| -| #
\==\, \ / ,| #
\==\ - ' - / #
\==\ , | #
|==| - ,/ #
\==\ _ / #
`--`--' ##
,-.-. #
,-..-.-./ \==\ #
|, \=/\=|- |==| #
|- |/ |/ , /==/ #
\, , _|==| #
| - - , |==| #
\ , - /==/ #
|- /\ /==/ #
`--` `--` ##
,-.--, #
.--.-. /=/, .' #
\==\ -\/=/- / #
\==\ `-' ,/ #
|==|, - | #
/==/ , \ #
/==/, .--, - \ #
\==\- \/=/ , / #
`--`-' `--` ##
#
,--.-. .-,--. #
/==/- / /=/_ / #
\==\, \/=/. / #
\==\ \/ -/ #
|==| ,_/ #
\==\-, / #
/==/._/ #
`--`-` ##
#
,--,----. #
/==/` - ./ #
`--`=/. / #
/==/- / #
/==/- /-. #
/==/, `--`\ #
\==\- -, | #
`--`.-.--` ##
,--.---, #
\==\ - '\ #
|==|- .-' #
|==|' | #
|==|- | #
|==|' | #
|==|`,`-. #
/==/ / #
`--`---' ##
,--, #
/==/-\ #
\==\` \ #
\==\ \ #
\==\- \ #
\==\' \ #
\==\- \ #
\==\' \ #
'-'--' ##
,---.--. #
/` - /==/ #
`-. -|==| #
| `|==| #
| -|==| #
| `|==| #
.-','|==| #
\ \==\ #
`---`---` ##
,--.--. #
/==/ _- \ #
/==/ -/\. \ #
/==/, /==\ ,\ #
\==\-/ \==\ .` #
`--` `--` #
#
#
##
#
#
#
#
#
,--.--------. #
/==/, - , -\ #
\==\.-. - ,-./ #
`--`--------` ##
,--, #
/==/-\ #
\==\` \ #
\==\-.' #
`--` #
#
#
#
##
,---. #
.--.' \ #
\==\-/\ \ #
/==/-|_\ | #
\==\, - \ #
/==/ - ,| #
/==/- /\ - \ #
\==\ _.\=\.-' #
`--` ##
#
_..---. #
.' .'.-. \ #
/==/- '=' / #
|==|-, ' #
|==| .=. \ #
/==/- '=' ,| #
|==| - / #
`-._`.___,' ##
_,.----. #
.' .' - \ #
/==/ , ,-' #
|==|- | . #
|==|_ `-' \ #
|==| _ , | #
\==\. / #
`-.`.___.-' #
##
#
_,..---._ #
/==/, - \ #
|==| _ _\ #
|==| .=. | #
|==|,| | -| #
|==| '=' / #
|==|-, _`/ #
`-.`.____.' ##
,----. #
,-.--` , \ #
|==|- _.-` #
|==| `.-. #
/==/_ , / #
|==| .-' #
|==|_ ,`-._ #
/==/ , / #
`--`-----`` ##
_,---. #
.-`.' , \ #
/==/_ _.-' #
/==/- '..-. #
|==|_ , / #
|==| .--' #
|==|- | #
/==/ \ #
`--`---' ##
_,---. #
_.='.'-, \ #
/==.'- / #
/==/ - .-' #
|==|_ /_,-. #
|==| , \_.' ) #
\==\- , ( #
/==/ _ , / #
`--`------' ##
,--.-,,-,--, #
/==/ /|=| | #
|==|_ ||=|, | #
|==| ,|/=| _| #
|==|- `-' _ | #
|==| _ | #
|==| .-. ,\ #
/==/, //=/ | #
`--`-' `-`--` ##
.=-.-. #
/==/_ / #
|==|, | #
|==| | #
|==|- | #
|==| ,| #
|==|- | #
/==/. / #
`--`-` ##
,--.-, #
|==' -| #
|==|- | #
__|==|, | #
,--.-'\=|- | #
|==|- |=/ ,| #
|==|. /=| -| #
\==\, `-' / #
`--`----' ##
,--.-.,-. #
/==/- |\ \ #
|==|_ `/_ / #
|==| , / #
|==|- .| #
|==| _ , \ #
/==/ '\ | #
\==\ /\=\.' #
`--` ##
#
_.-. #
.-,.'| #
|==|, | #
|==|- | #
|==|, | #
|==|- `-._ #
/==/ - , ,/ #
`--`-----' ##
___ #
.-._ .'=.'\ #
/==/ \|==| | #
|==|,| / - | #
|==| \/ , | #
|==|- , _ | #
|==| _ /\ | #
/==/ / / , / #
`--`./ `--` ##
.-._ #
/==/ \ .-._ #
|==|, \/ /, / #
|==|- \| | #
|==| , | -| #
|==| - _ | #
|==| /\ , | #
/==/, | |- | #
`--`./ `--` ##
_,.---._ #
,-.' , - `. #
/==/_, , - \ #
|==| .=. | #
|==|_ : ;=: - | #
|==| , '=' | #
\==\ - ,_ / #
'.='. - .' #
`--`--'' ##
_ __ #
.-`.' ,`. #
/==/, - \ #
|==| _ .=. | #
|==| , '=',| #
|==|- '..' #
|==|, | #
/==/ - | #
`--`---' ##
_,.---._ #
,-.' - , `. #
/==/ , - \ #
|==| - .=. , | #
|==| : ;=: - | #
|==|, '=' , | #
\==\ _ - ; #
'.='. , ; -\ #
`--`--'' `--` ##
#
.-.,.---. #
/==/ ` \ #
|==|-, .=., | #
|==| '=' / #
|==|- , .' #
|==|_ . ,'. #
/==/ /\ , ) #
`--`-`--`--' ##
,-,--. #
,-.'- _\ #
/==/_ ,_.' #
\==\ \ #
\==\ -\ #
_\==\ ,\ #
/==/\/ _ | #
\==\ - , / #
`--`---' ##
,--.--------. #
/==/, - , -\ #
\==\.-. - ,-./ #
`--`\==\- \ #
\==\_ \ #
|==|- | #
|==|, | #
/==/ -/ #
`--`--` ##
#
.--.-. .-.-. #
/==/ -|/=/ | #
|==| ,||=| -| #
|==|- | =/ | #
|==|, \/ - | #
|==|- , / #
/==/ , _ .' #
`--`..---' ##
,-.-. #
,--.-./=/ ,/ #
/==/, ||=| -| #
\==\, \ / ,| #
\==\ - ' - / #
\==\ , | #
|==| - ,/ #
\==\ _ / #
`--`--' ##
,-.-. #
,-..-.-./ \==\ #
|, \=/\=|- |==| #
|- |/ |/ , /==/ #
\, , _|==| #
| - - , |==| #
\ , - /==/ #
|- /\ /==/ #
`--` `--` ##
,-.--, #
.--.-. /=/, .' #
\==\ -\/=/- / #
\==\ `-' ,/ #
|==|, - | #
/==/ , \ #
/==/, .--, - \ #
\==\- \/=/ , / #
`--`-' `--` ##
#
,--.-. .-,--. #
/==/- / /=/_ / #
\==\, \/=/. / #
\==\ \/ -/ #
|==| ,_/ #
\==\-, / #
/==/._/ #
`--`-` ##
#
,--,----. #
/==/` - ./ #
`--`=/. / #
/==/- / #
/==/- /-. #
/==/, `--`\ #
\==\- -, | #
`--`.-.--` ##
.-.--. #
\ \==\ #
/- /==/ #
/' /==/ #
|,|==| #
\ \==\ #
\ ,\==\ #
/ -/==/ #
`-'--' ##
,--.-, #
/==/ / #
|==|_ | #
|==| ,| #
|==|- | #
|==| | #
|==| | #
/==/, / #
`--`-' ##
.--.-. #
/==/ / #
\==\ -\ #
\==\ `\ #
|==|,| #
/==/ / #
/==/, / #
\==\- \ #
`--`-' ##
~#
#
#
#
#
#
#
#
##
,---. #
.--.' \ #
\==\-/\ \ #
/==/-|_\ | #
\==\, - \ #
/==/ - ,| #
/==/- /\ - \ #
\==\ _.\=\.-' #
`--` ##
_,.---._ #
,-.' , - `. #
/==/_, , - \ #
|==| .=. | #
|==|_ : ;=: - | #
|==| , '=' | #
\==\ - ,_ / #
'.='. - .' #
`--`--'' ##
#
.--.-. .-.-. #
/==/ -|/=/ | #
|==| ,||=| -| #
|==|- | =/ | #
|==|, \/ - | #
|==|- , / #
/==/ , _ .' #
`--`..---' ##
,---. #
.--.' \ #
\==\-/\ \ #
/==/-|_\ | #
\==\, - \ #
/==/ - ,| #
/==/- /\ - \ #
\==\ _.\=\.-' #
`--` ##
_,.---._ #
,-.' , - `. #
/==/_, , - \ #
|==| .=. | #
|==|_ : ;=: - | #
|==| , '=' | #
\==\ - ,_ / #
'.='. - .' #
`--`--'' ##
#
.--.-. .-.-. #
/==/ -|/=/ | #
|==| ,||=| -| #
|==|- | =/ | #
|==|, \/ - | #
|==|- , / #
/==/ , _ .' #
`--`..---' ##
ß#
#
#
#
#
#
#
#
##
@@ -0,0 +1,61 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.findPackageData = findPackageData;
function _path() {
const data = require("path");
_path = function () {
return data;
};
return data;
}
var _utils = require("./utils.js");
var _configError = require("../../errors/config-error.js");
const PACKAGE_FILENAME = "package.json";
const readConfigPackage = (0, _utils.makeStaticFileCache)((filepath, content) => {
let options;
try {
options = JSON.parse(content);
} catch (err) {
throw new _configError.default(`Error while parsing JSON - ${err.message}`, filepath);
}
if (!options) throw new Error(`${filepath}: No config detected`);
if (typeof options !== "object") {
throw new _configError.default(`Config returned typeof ${typeof options}`, filepath);
}
if (Array.isArray(options)) {
throw new _configError.default(`Expected config object but found array`, filepath);
}
return {
filepath,
dirname: _path().dirname(filepath),
options
};
});
function* findPackageData(filepath) {
let pkg = null;
const directories = [];
let isPackage = true;
let dirname = _path().dirname(filepath);
while (!pkg && _path().basename(dirname) !== "node_modules") {
directories.push(dirname);
pkg = yield* readConfigPackage(_path().join(dirname, PACKAGE_FILENAME));
const nextLoc = _path().dirname(dirname);
if (dirname === nextLoc) {
isPackage = false;
break;
}
dirname = nextLoc;
}
return {
filepath,
directories,
pkg,
isPackage
};
}
0 && 0;
//# sourceMappingURL=package.js.map
@@ -0,0 +1,39 @@
/**
* @author Toru Nagashima <https://github.com/mysticatea>
* See LICENSE file in root directory for full license.
*/
"use strict"
const {
definePrototypeMethodHandler,
} = require("../util/define-prototype-method-handler")
module.exports = {
meta: {
docs: {
description: "disallow the `String.prototype.normalize` method.",
category: "ES2015",
recommended: false,
url: "http://eslint-community.github.io/eslint-plugin-es-x/rules/no-string-prototype-normalize.html",
},
fixable: null,
messages: {
forbidden: "ES2015 '{{name}}' method is forbidden.",
},
schema: [
{
type: "object",
properties: {
aggressive: { type: "boolean" },
},
additionalProperties: false,
},
],
type: "problem",
},
create(context) {
return definePrototypeMethodHandler(context, {
String: ["normalize"],
})
},
}
@@ -0,0 +1 @@
{"version":3,"file":"signals.js","sourceRoot":"","sources":["../../src/signals.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,CAAC,MAAM,OAAO,GAAqB,EAAE,CAAA;AAC3C,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAA;AAE3C,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO,EAAE;IAChC,OAAO,CAAC,IAAI,CACV,SAAS,EACT,SAAS,EACT,WAAW,EACX,SAAS,EACT,SAAS,EACT,SAAS,EACT,SAAS,EACT,QAAQ,EACR,SAAS,EACT,QAAQ;IACR,yDAAyD;IACzD,UAAU;IACV,YAAY;KACb,CAAA;CACF;AAED,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO,EAAE;IAChC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAA;CACxD","sourcesContent":["/**\n * This is not the set of all possible signals.\n *\n * It IS, however, the set of all signals that trigger\n * an exit on either Linux or BSD systems. Linux is a\n * superset of the signal names supported on BSD, and\n * the unknown signals just fail to register, so we can\n * catch that easily enough.\n *\n * Windows signals are a different set, since there are\n * signals that terminate Windows processes, but don't\n * terminate (or don't even exist) on Posix systems.\n *\n * Don't bother with SIGKILL. It's uncatchable, which\n * means that we can't fire any callbacks anyway.\n *\n * If a user does happen to register a handler on a non-\n * fatal signal like SIGWINCH or something, and then\n * exit, it'll end up firing `process.emit('exit')`, so\n * the handler will be fired anyway.\n *\n * SIGBUS, SIGFPE, SIGSEGV and SIGILL, when not raised\n * artificially, inherently leave the process in a\n * state from which it is not safe to try and enter JS\n * listeners.\n */\nexport const signals: NodeJS.Signals[] = []\nsignals.push('SIGHUP', 'SIGINT', 'SIGTERM')\n\nif (process.platform !== 'win32') {\n signals.push(\n 'SIGALRM',\n 'SIGABRT',\n 'SIGVTALRM',\n 'SIGXCPU',\n 'SIGXFSZ',\n 'SIGUSR2',\n 'SIGTRAP',\n 'SIGSYS',\n 'SIGQUIT',\n 'SIGIOT'\n // should detect profiler and enable/disable accordingly.\n // see #21\n // 'SIGPROF'\n )\n}\n\nif (process.platform === 'linux') {\n signals.push('SIGIO', 'SIGPOLL', 'SIGPWR', 'SIGSTKFLT')\n}\n"]}
@@ -0,0 +1,2 @@
import type { LibDefinition } from '../variable';
export declare const esnext_error: LibDefinition;
@@ -0,0 +1,23 @@
import "../chunk-3ARAAK6Z.mjs";
import {
CheckLinearIcon
} from "../chunk-6O2NYG7W.mjs";
import {
ChevronCircleTopLinearIcon
} from "../chunk-D7KR3R5S.mjs";
import {
ClockCircleLinearIcon
} from "../chunk-3KV3RZ3C.mjs";
import {
CopyLinearIcon
} from "../chunk-W5SCNTSN.mjs";
import {
SearchLinearIcon
} from "../chunk-O65ECHHD.mjs";
export {
CheckLinearIcon,
ChevronCircleTopLinearIcon,
ClockCircleLinearIcon,
CopyLinearIcon,
SearchLinearIcon
};
@@ -0,0 +1 @@
{"name":"mdast-util-to-string","version":"4.0.0","requiresBuild":false,"files":{"license":{"checkedAt":1794532112874,"integrity":"sha512-00mBaAegOXNJDyksTMrytYh98gH+v/fruetGXfLv5IVYnw8WD5PgOTOdM0A7q244DNs0Ynq8gFk4JA6SWxIdbA==","mode":420,"size":1099},"index.js":{"checkedAt":1794532112961,"integrity":"sha512-C88cQJJclaXbN6sW6E/cIAGGhvCwTg5SvO7IUQzlBw1CGpmBt7pX9CBpSWkQ5Z19Wy52lH9tQ5MVqvCv92SfvQ==","mode":420,"size":104},"lib/index.js":{"checkedAt":1794532112961,"integrity":"sha512-c1ahTD53qjKst7j7VoLjtBwDiYa7Wvy4plSGc5SE4yDKDk5CyFY1Ol5+rxwZ8fy19Ty9U+nT7uuCKv36HtQbcw==","mode":420,"size":2626},"package.json":{"checkedAt":1794532112961,"integrity":"sha512-gdzQrWYXn2hwv7VtBtIlx9/dnqzotCZfTqVUaH977jqRDsonwHj7xWxMi7F/WIh1tnCTWmOYJKrOKKlBp0/o7w==","mode":420,"size":1918},"readme.md":{"checkedAt":1794532112961,"integrity":"sha512-gkCdcGt5WdMKl+HslgfN2zyCtNV3bIaapgdBOVqeSsbsv/PH7uWVK/q+lo3/koczJOjMo7LGt9vw0sT0gl8vzg==","mode":420,"size":6017},"index.d.ts":{"checkedAt":1794532112961,"integrity":"sha512-/AvW0+mTCNTZVHa2aIrZ8r3mFedlAvDKjefOlRrPo988GyP44nTtuynfwdUbjYGsgVDJ13wRbgYXuam4JEPEXg==","mode":420,"size":95},"lib/index.d.ts":{"checkedAt":1794532112962,"integrity":"sha512-Ozg/DHgXkUv45To1GrNp/1MSqWaK1T7ed/bqi4ahBuQ+VK90LsdhwIFSL71a7WPZ52645uPluwSFUlHwM6ieQA==","mode":420,"size":833}}}
@@ -0,0 +1,12 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../../../../../../prebuild-install@7.1.3/node_modules/prebuild-install/bin.js" "$@"
else
exec node "$basedir/../../../../../../prebuild-install@7.1.3/node_modules/prebuild-install/bin.js" "$@"
fi
@@ -0,0 +1,221 @@
/**
* @fileoverview Rule to flag use of console object
* @author Nicholas C. Zakas
*/
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const astUtils = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
type: "suggestion",
defaultOptions: [{}],
docs: {
description: "Disallow the use of `console`",
recommended: false,
url: "https://eslint.org/docs/latest/rules/no-console",
},
schema: [
{
type: "object",
properties: {
allow: {
type: "array",
items: {
type: "string",
},
minItems: 1,
uniqueItems: true,
},
},
additionalProperties: false,
},
],
hasSuggestions: true,
messages: {
unexpected: "Unexpected console statement.",
limited:
"Unexpected console statement. Only these console methods are allowed: {{ allowed }}.",
removeConsole: "Remove the console.{{ propertyName }}().",
removeMethodCall: "Remove the console method call.",
},
},
create(context) {
const [{ allow: allowed = [] }] = context.options;
const sourceCode = context.sourceCode;
/**
* Checks whether the given reference is 'console' or not.
* @param {eslint-scope.Reference} reference The reference to check.
* @returns {boolean} `true` if the reference is 'console'.
*/
function isConsole(reference) {
const id = reference.identifier;
return id && id.name === "console";
}
/**
* Checks whether the property name of the given MemberExpression node
* is allowed by options or not.
* @param {ASTNode} node The MemberExpression node to check.
* @returns {boolean} `true` if the property name of the node is allowed.
*/
function isAllowed(node) {
const propertyName = astUtils.getStaticPropertyName(node);
return propertyName && allowed.includes(propertyName);
}
/**
* Checks whether the given reference is a member access which is not
* allowed by options or not.
* @param {eslint-scope.Reference} reference The reference to check.
* @returns {boolean} `true` if the reference is a member access which
* is not allowed by options.
*/
function isMemberAccessExceptAllowed(reference) {
const node = reference.identifier;
const parent = node.parent;
return (
parent.type === "MemberExpression" &&
parent.object === node &&
!isAllowed(parent)
);
}
/**
* Checks if removing the ExpressionStatement node will cause ASI to
* break.
* eg.
* foo()
* console.log();
* [1, 2, 3].forEach(a => doSomething(a))
*
* Removing the console.log(); statement should leave two statements, but
* here the two statements will become one because [ causes continuation after
* foo().
* @param {ASTNode} node The ExpressionStatement node to check.
* @returns {boolean} `true` if ASI will break after removing the ExpressionStatement
* node.
*/
function maybeAsiHazard(node) {
const SAFE_TOKENS_BEFORE = /^[:;{]$/u; // One of :;{
const UNSAFE_CHARS_AFTER = /^[-[(/+`]/u; // One of [(/+-`
const tokenBefore = sourceCode.getTokenBefore(node);
const tokenAfter = sourceCode.getTokenAfter(node);
return (
Boolean(tokenAfter) &&
UNSAFE_CHARS_AFTER.test(tokenAfter.value) &&
tokenAfter.value !== "++" &&
tokenAfter.value !== "--" &&
Boolean(tokenBefore) &&
!SAFE_TOKENS_BEFORE.test(tokenBefore.value)
);
}
/**
* Checks if the MemberExpression node's parent.parent.parent is a
* Program, BlockStatement, StaticBlock, or SwitchCase node. This check
* is necessary to avoid providing a suggestion that might cause a syntax error.
*
* eg. if (a) console.log(b), removing console.log() here will lead to a
* syntax error.
* if (a) { console.log(b) }, removing console.log() here is acceptable.
*
* Additionally, it checks if the callee of the CallExpression node is
* the node itself.
*
* eg. foo(console.log), cannot provide a suggestion here.
* @param {ASTNode} node The MemberExpression node to check.
* @returns {boolean} `true` if a suggestion can be provided for a node.
*/
function canProvideSuggestions(node) {
return (
node.parent.type === "CallExpression" &&
node.parent.callee === node &&
node.parent.parent.type === "ExpressionStatement" &&
astUtils.STATEMENT_LIST_PARENTS.has(
node.parent.parent.parent.type,
) &&
!maybeAsiHazard(node.parent.parent)
);
}
/**
* Reports the given reference as a violation.
* @param {eslint-scope.Reference} reference The reference to report.
* @returns {void}
*/
function report(reference) {
const node = reference.identifier.parent;
const suggest = [];
if (canProvideSuggestions(node)) {
const suggestion = {
fix(fixer) {
return fixer.remove(node.parent.parent);
},
};
if (node.computed) {
suggestion.messageId = "removeMethodCall";
} else {
suggestion.messageId = "removeConsole";
suggestion.data = { propertyName: node.property.name };
}
suggest.push(suggestion);
}
context.report({
node,
loc: node.loc,
messageId: allowed.length ? "limited" : "unexpected",
data: { allowed: allowed.join(", ") },
suggest,
});
}
return {
"Program:exit"(node) {
const scope = sourceCode.getScope(node);
const consoleVar = astUtils.getVariableByName(scope, "console");
const shadowed = consoleVar && consoleVar.defs.length > 0;
/*
* 'scope.through' includes all references to undefined
* variables. If the variable 'console' is not defined, it uses
* 'scope.through'.
*/
const references = consoleVar
? consoleVar.references
: scope.through.filter(isConsole);
if (!shadowed) {
references
.filter(isMemberAccessExceptAllowed)
.forEach(report);
}
},
};
},
};
@@ -0,0 +1,39 @@
import {Pressable as $3b117e43dc0ca95d$export$27c701ed9e449e99} from "./Pressable.mjs";
import {ClearPressResponder as $f1ab8c75478c6f73$export$cf75428e0b9ed1ea, PressResponder as $f1ab8c75478c6f73$export$3351871ee4b288b8} from "./PressResponder.mjs";
import {useFocus as $a1ea59d68270f0dd$export$f8168d8dd8fd66e6} from "./useFocus.mjs";
import {addWindowFocusTracking as $507fabe10e71c6fb$export$2f1888112f558a7d, getInteractionModality as $507fabe10e71c6fb$export$630ff653c5ada6a9, isFocusVisible as $507fabe10e71c6fb$export$b9b3dfddab17db27, setInteractionModality as $507fabe10e71c6fb$export$8397ddfc504fdb9a, useFocusVisible as $507fabe10e71c6fb$export$ffd9e5021c1fb2d6, useFocusVisibleListener as $507fabe10e71c6fb$export$ec71b4b83ac08ec3, useInteractionModality as $507fabe10e71c6fb$export$98e20ec92f614cfe} from "./useFocusVisible.mjs";
import {useFocusWithin as $9ab94262bd0047c7$export$420e68273165f4ec} from "./useFocusWithin.mjs";
import {useHover as $6179b936705e76d3$export$ae780daf29e6d456} from "./useHover.mjs";
import {useInteractOutside as $e0b6e0b68ec7f50f$export$872b660ac5a1ff98} from "./useInteractOutside.mjs";
import {useKeyboard as $46d819fcbaf35654$export$8f71654801c2f7cd} from "./useKeyboard.mjs";
import {useMove as $e8a7022cf87cba2a$export$36da96379f79f245} from "./useMove.mjs";
import {usePress as $f6c31cce2adf654f$export$45712eceda6fad21} from "./usePress.mjs";
import {useScrollWheel as $7d0a636d7a4dcefd$export$2123ff2b87c81ca} from "./useScrollWheel.mjs";
import {useLongPress as $8a26561d2877236e$export$c24ed0104d07eab9} from "./useLongPress.mjs";
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you 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 REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
export {$3b117e43dc0ca95d$export$27c701ed9e449e99 as Pressable, $f1ab8c75478c6f73$export$3351871ee4b288b8 as PressResponder, $f1ab8c75478c6f73$export$cf75428e0b9ed1ea as ClearPressResponder, $a1ea59d68270f0dd$export$f8168d8dd8fd66e6 as useFocus, $507fabe10e71c6fb$export$b9b3dfddab17db27 as isFocusVisible, $507fabe10e71c6fb$export$630ff653c5ada6a9 as getInteractionModality, $507fabe10e71c6fb$export$8397ddfc504fdb9a as setInteractionModality, $507fabe10e71c6fb$export$2f1888112f558a7d as addWindowFocusTracking, $507fabe10e71c6fb$export$98e20ec92f614cfe as useInteractionModality, $507fabe10e71c6fb$export$ffd9e5021c1fb2d6 as useFocusVisible, $507fabe10e71c6fb$export$ec71b4b83ac08ec3 as useFocusVisibleListener, $9ab94262bd0047c7$export$420e68273165f4ec as useFocusWithin, $6179b936705e76d3$export$ae780daf29e6d456 as useHover, $e0b6e0b68ec7f50f$export$872b660ac5a1ff98 as useInteractOutside, $46d819fcbaf35654$export$8f71654801c2f7cd as useKeyboard, $e8a7022cf87cba2a$export$36da96379f79f245 as useMove, $f6c31cce2adf654f$export$45712eceda6fad21 as usePress, $7d0a636d7a4dcefd$export$2123ff2b87c81ca as useScrollWheel, $8a26561d2877236e$export$c24ed0104d07eab9 as useLongPress};
//# sourceMappingURL=module.js.map
@@ -0,0 +1 @@
{"version":3,"file":"ipv4.d.ts","sourceRoot":"","sources":["../src/ipv4.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AAInC;;;;GAIG;AACH,qBAAa,QAAQ;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,MAAM,EAAE,MAAM,CAAoB;IAClC,aAAa,EAAE,MAAM,EAAE,CAAM;IAC7B,YAAY,EAAE,MAAM,CAAM;IAC1B,MAAM,EAAE,MAAM,CAAS;IACvB,UAAU,EAAE,MAAM,CAAM;IACxB,EAAE,EAAE,OAAO,CAAQ;gBAEP,OAAO,EAAE,MAAM;IAsB3B,MAAM,CAAC,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO;IAcxC,KAAK,CAAC,OAAO,EAAE,MAAM;IAUrB;;;;;OAKG;IACH,WAAW,IAAI,MAAM;IAIrB;;;;;OAKG;IACH,SAAS,0DAAoC;IAE7C;;;;;;OAMG;IACH,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,QAAQ;IAcrC;;;;;;OAMG;IACH,MAAM,CAAC,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,QAAQ;IAI7C;;;;;;;;;OASG;IACH,MAAM,CAAC,QAAQ,CAAC,eAAe,EAAE,MAAM,GAAG,QAAQ;IASlD;;;;;OAKG;IACH,KAAK,IAAI,MAAM;IAIf;;;;;OAKG;IACH,OAAO,IAAI,MAAM,EAAE;IAInB;;;;;OAKG;IACH,QAAQ,IAAI,MAAM;IAelB;;;;;OAKG;IACH,MAAM,IAAI,MAAM;IAIhB;;;;;OAKG;IACH,aAAa,IAAI,MAAM;IAIvB;;;;;;OAMG;IACH,YAAY,IAAI,QAAQ;IAIxB;;;;;;OAMG;IACH,qBAAqB,IAAI,QAAQ;IAKjC;;;;;OAKG;IACH,WAAW,IAAI,MAAM;IAIrB;;;;;;OAMG;IACH,UAAU,IAAI,QAAQ;IAItB;;;;;;OAMG;IACH,mBAAmB,IAAI,QAAQ;IAK/B;;;;;;OAMG;IACH,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,QAAQ;IAI3C;;;;;;OAMG;IACH,MAAM,CAAC,aAAa,CAAC,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,QAAQ;IAepD;;;;;;OAMG;IACH,MAAM,CAAC,qBAAqB,CAAC,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,QAAQ;IAS5D;;;;;;OAMG;IACH,IAAI,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM;IAQ3B;;;;;OAKG;IACH,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM;IAIhD;;;;;;;OAOG;IACH,WAAW,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,kBAAkB,GAAG,MAAM;IAcxD;;;;;OAKG;IACH,UAAU,2BAAqB;IAE/B;;;;;OAKG;IACH,WAAW,IAAI,OAAO;IAItB;;;;;OAKG;IACH,aAAa,IAAI,MAAM;IAIvB;;;OAGG;IACH,UAAU,IAAI,MAAM;CAYrB"}
@@ -0,0 +1,62 @@
import {isRTL as $148a7a147e38ea7f$export$702d680b21cbd764} from "./utils.module.js";
import {useDefaultLocale as $1e5a04cdaf7d1af8$export$188ec29ebc2bdc3a} from "./useDefaultLocale.module.js";
import $h9FiU$react, {useContext as $h9FiU$useContext} from "react";
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you 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 REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
const $18f2051aff69b9bf$var$I18nContext = /*#__PURE__*/ (0, $h9FiU$react).createContext(null);
/**
* Internal component that handles the case when locale is provided.
*/ function $18f2051aff69b9bf$var$I18nProviderWithLocale(props) {
let { locale: locale, children: children } = props;
let value = (0, $h9FiU$react).useMemo(()=>({
locale: locale,
direction: (0, $148a7a147e38ea7f$export$702d680b21cbd764)(locale) ? 'rtl' : 'ltr'
}), [
locale
]);
return /*#__PURE__*/ (0, $h9FiU$react).createElement($18f2051aff69b9bf$var$I18nContext.Provider, {
value: value
}, children);
}
/**
* Internal component that handles the case when no locale is provided.
*/ function $18f2051aff69b9bf$var$I18nProviderWithDefaultLocale(props) {
let { children: children } = props;
let defaultLocale = (0, $1e5a04cdaf7d1af8$export$188ec29ebc2bdc3a)();
return /*#__PURE__*/ (0, $h9FiU$react).createElement($18f2051aff69b9bf$var$I18nContext.Provider, {
value: defaultLocale
}, children);
}
function $18f2051aff69b9bf$export$a54013f0d02a8f82(props) {
let { locale: locale, children: children } = props;
// Conditionally render different components to avoid calling useDefaultLocale.
// This is necessary because useDefaultLocale triggers a re-render.
if (locale) return /*#__PURE__*/ (0, $h9FiU$react).createElement($18f2051aff69b9bf$var$I18nProviderWithLocale, {
locale: locale,
children: children
});
return /*#__PURE__*/ (0, $h9FiU$react).createElement($18f2051aff69b9bf$var$I18nProviderWithDefaultLocale, {
children: children
});
}
function $18f2051aff69b9bf$export$43bb16f9c6d9e3f7() {
let defaultLocale = (0, $1e5a04cdaf7d1af8$export$188ec29ebc2bdc3a)();
let context = (0, $h9FiU$useContext)($18f2051aff69b9bf$var$I18nContext);
return context || defaultLocale;
}
export {$18f2051aff69b9bf$export$a54013f0d02a8f82 as I18nProvider, $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 as useLocale};
//# sourceMappingURL=context.module.js.map
@@ -0,0 +1,64 @@
{
"name": "@tanstack/react-virtual",
"version": "3.11.2",
"description": "Headless UI for virtualizing scrollable elements in React",
"author": "Tanner Linsley",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/TanStack/virtual.git",
"directory": "packages/react-virtual"
},
"homepage": "https://tanstack.com/virtual",
"funding": {
"type": "github",
"url": "https://github.com/sponsors/tannerlinsley"
},
"keywords": [
"react",
"vue",
"solid",
"virtual",
"virtual-core",
"datagrid"
],
"type": "module",
"types": "dist/esm/index.d.ts",
"main": "dist/cjs/index.cjs",
"module": "dist/esm/index.js",
"exports": {
".": {
"import": {
"types": "./dist/esm/index.d.ts",
"default": "./dist/esm/index.js"
},
"require": {
"types": "./dist/cjs/index.d.cts",
"default": "./dist/cjs/index.cjs"
}
},
"./package.json": "./package.json"
},
"sideEffects": false,
"files": [
"dist",
"src"
],
"dependencies": {
"@tanstack/virtual-core": "3.11.2"
},
"devDependencies": {
"@testing-library/react": "^16.1.0",
"@types/react": "^18.3.16",
"@types/react-dom": "^18.3.5",
"@vitejs/plugin-react": "^4.3.4",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"resize-observer-polyfill": "^1.5.1"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
},
"scripts": {}
}
@@ -0,0 +1,337 @@
'use strict';
var Alias = require('../nodes/Alias.js');
var Collection = require('../nodes/Collection.js');
var identity = require('../nodes/identity.js');
var Pair = require('../nodes/Pair.js');
var toJS = require('../nodes/toJS.js');
var Schema = require('../schema/Schema.js');
var stringifyDocument = require('../stringify/stringifyDocument.js');
var anchors = require('./anchors.js');
var applyReviver = require('./applyReviver.js');
var createNode = require('./createNode.js');
var directives = require('./directives.js');
class Document {
constructor(value, replacer, options) {
/** A comment before this Document */
this.commentBefore = null;
/** A comment immediately after this Document */
this.comment = null;
/** Errors encountered during parsing. */
this.errors = [];
/** Warnings encountered during parsing. */
this.warnings = [];
Object.defineProperty(this, identity.NODE_TYPE, { value: identity.DOC });
let _replacer = null;
if (typeof replacer === 'function' || Array.isArray(replacer)) {
_replacer = replacer;
}
else if (options === undefined && replacer) {
options = replacer;
replacer = undefined;
}
const opt = Object.assign({
intAsBigInt: false,
keepSourceTokens: false,
logLevel: 'warn',
prettyErrors: true,
strict: true,
stringKeys: false,
uniqueKeys: true,
version: '1.2'
}, options);
this.options = opt;
let { version } = opt;
if (options?._directives) {
this.directives = options._directives.atDocument();
if (this.directives.yaml.explicit)
version = this.directives.yaml.version;
}
else
this.directives = new directives.Directives({ version });
this.setSchema(version, options);
// @ts-expect-error We can't really know that this matches Contents.
this.contents =
value === undefined ? null : this.createNode(value, _replacer, options);
}
/**
* Create a deep copy of this Document and its contents.
*
* Custom Node values that inherit from `Object` still refer to their original instances.
*/
clone() {
const copy = Object.create(Document.prototype, {
[identity.NODE_TYPE]: { value: identity.DOC }
});
copy.commentBefore = this.commentBefore;
copy.comment = this.comment;
copy.errors = this.errors.slice();
copy.warnings = this.warnings.slice();
copy.options = Object.assign({}, this.options);
if (this.directives)
copy.directives = this.directives.clone();
copy.schema = this.schema.clone();
// @ts-expect-error We can't really know that this matches Contents.
copy.contents = identity.isNode(this.contents)
? this.contents.clone(copy.schema)
: this.contents;
if (this.range)
copy.range = this.range.slice();
return copy;
}
/** Adds a value to the document. */
add(value) {
if (assertCollection(this.contents))
this.contents.add(value);
}
/** Adds a value to the document. */
addIn(path, value) {
if (assertCollection(this.contents))
this.contents.addIn(path, value);
}
/**
* Create a new `Alias` node, ensuring that the target `node` has the required anchor.
*
* If `node` already has an anchor, `name` is ignored.
* Otherwise, the `node.anchor` value will be set to `name`,
* or if an anchor with that name is already present in the document,
* `name` will be used as a prefix for a new unique anchor.
* If `name` is undefined, the generated anchor will use 'a' as a prefix.
*/
createAlias(node, name) {
if (!node.anchor) {
const prev = anchors.anchorNames(this);
node.anchor =
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
!name || prev.has(name) ? anchors.findNewAnchor(name || 'a', prev) : name;
}
return new Alias.Alias(node.anchor);
}
createNode(value, replacer, options) {
let _replacer = undefined;
if (typeof replacer === 'function') {
value = replacer.call({ '': value }, '', value);
_replacer = replacer;
}
else if (Array.isArray(replacer)) {
const keyToStr = (v) => typeof v === 'number' || v instanceof String || v instanceof Number;
const asStr = replacer.filter(keyToStr).map(String);
if (asStr.length > 0)
replacer = replacer.concat(asStr);
_replacer = replacer;
}
else if (options === undefined && replacer) {
options = replacer;
replacer = undefined;
}
const { aliasDuplicateObjects, anchorPrefix, flow, keepUndefined, onTagObj, tag } = options ?? {};
const { onAnchor, setAnchors, sourceObjects } = anchors.createNodeAnchors(this,
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
anchorPrefix || 'a');
const ctx = {
aliasDuplicateObjects: aliasDuplicateObjects ?? true,
keepUndefined: keepUndefined ?? false,
onAnchor,
onTagObj,
replacer: _replacer,
schema: this.schema,
sourceObjects
};
const node = createNode.createNode(value, tag, ctx);
if (flow && identity.isCollection(node))
node.flow = true;
setAnchors();
return node;
}
/**
* Convert a key and a value into a `Pair` using the current schema,
* recursively wrapping all values as `Scalar` or `Collection` nodes.
*/
createPair(key, value, options = {}) {
const k = this.createNode(key, null, options);
const v = this.createNode(value, null, options);
return new Pair.Pair(k, v);
}
/**
* Removes a value from the document.
* @returns `true` if the item was found and removed.
*/
delete(key) {
return assertCollection(this.contents) ? this.contents.delete(key) : false;
}
/**
* Removes a value from the document.
* @returns `true` if the item was found and removed.
*/
deleteIn(path) {
if (Collection.isEmptyPath(path)) {
if (this.contents == null)
return false;
// @ts-expect-error Presumed impossible if Strict extends false
this.contents = null;
return true;
}
return assertCollection(this.contents)
? this.contents.deleteIn(path)
: false;
}
/**
* Returns item at `key`, or `undefined` if not found. By default unwraps
* scalar values from their surrounding node; to disable set `keepScalar` to
* `true` (collections are always returned intact).
*/
get(key, keepScalar) {
return identity.isCollection(this.contents)
? this.contents.get(key, keepScalar)
: undefined;
}
/**
* Returns item at `path`, or `undefined` if not found. By default unwraps
* scalar values from their surrounding node; to disable set `keepScalar` to
* `true` (collections are always returned intact).
*/
getIn(path, keepScalar) {
if (Collection.isEmptyPath(path))
return !keepScalar && identity.isScalar(this.contents)
? this.contents.value
: this.contents;
return identity.isCollection(this.contents)
? this.contents.getIn(path, keepScalar)
: undefined;
}
/**
* Checks if the document includes a value with the key `key`.
*/
has(key) {
return identity.isCollection(this.contents) ? this.contents.has(key) : false;
}
/**
* Checks if the document includes a value at `path`.
*/
hasIn(path) {
if (Collection.isEmptyPath(path))
return this.contents !== undefined;
return identity.isCollection(this.contents) ? this.contents.hasIn(path) : false;
}
/**
* Sets a value in this document. For `!!set`, `value` needs to be a
* boolean to add/remove the item from the set.
*/
set(key, value) {
if (this.contents == null) {
// @ts-expect-error We can't really know that this matches Contents.
this.contents = Collection.collectionFromPath(this.schema, [key], value);
}
else if (assertCollection(this.contents)) {
this.contents.set(key, value);
}
}
/**
* Sets a value in this document. For `!!set`, `value` needs to be a
* boolean to add/remove the item from the set.
*/
setIn(path, value) {
if (Collection.isEmptyPath(path)) {
// @ts-expect-error We can't really know that this matches Contents.
this.contents = value;
}
else if (this.contents == null) {
// @ts-expect-error We can't really know that this matches Contents.
this.contents = Collection.collectionFromPath(this.schema, Array.from(path), value);
}
else if (assertCollection(this.contents)) {
this.contents.setIn(path, value);
}
}
/**
* Change the YAML version and schema used by the document.
* A `null` version disables support for directives, explicit tags, anchors, and aliases.
* It also requires the `schema` option to be given as a `Schema` instance value.
*
* Overrides all previously set schema options.
*/
setSchema(version, options = {}) {
if (typeof version === 'number')
version = String(version);
let opt;
switch (version) {
case '1.1':
if (this.directives)
this.directives.yaml.version = '1.1';
else
this.directives = new directives.Directives({ version: '1.1' });
opt = { resolveKnownTags: false, schema: 'yaml-1.1' };
break;
case '1.2':
case 'next':
if (this.directives)
this.directives.yaml.version = version;
else
this.directives = new directives.Directives({ version });
opt = { resolveKnownTags: true, schema: 'core' };
break;
case null:
if (this.directives)
delete this.directives;
opt = null;
break;
default: {
const sv = JSON.stringify(version);
throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${sv}`);
}
}
// Not using `instanceof Schema` to allow for duck typing
if (options.schema instanceof Object)
this.schema = options.schema;
else if (opt)
this.schema = new Schema.Schema(Object.assign(opt, options));
else
throw new Error(`With a null YAML version, the { schema: Schema } option is required`);
}
// json & jsonArg are only used from toJSON()
toJS({ json, jsonArg, mapAsMap, maxAliasCount, onAnchor, reviver } = {}) {
const ctx = {
anchors: new Map(),
doc: this,
keep: !json,
mapAsMap: mapAsMap === true,
mapKeyWarned: false,
maxAliasCount: typeof maxAliasCount === 'number' ? maxAliasCount : 100
};
const res = toJS.toJS(this.contents, jsonArg ?? '', ctx);
if (typeof onAnchor === 'function')
for (const { count, res } of ctx.anchors.values())
onAnchor(res, count);
return typeof reviver === 'function'
? applyReviver.applyReviver(reviver, { '': res }, '', res)
: res;
}
/**
* A JSON representation of the document `contents`.
*
* @param jsonArg Used by `JSON.stringify` to indicate the array index or
* property name.
*/
toJSON(jsonArg, onAnchor) {
return this.toJS({ json: true, jsonArg, mapAsMap: false, onAnchor });
}
/** A YAML representation of the document. */
toString(options = {}) {
if (this.errors.length > 0)
throw new Error('Document with errors cannot be stringified');
if ('indent' in options &&
(!Number.isInteger(options.indent) || Number(options.indent) <= 0)) {
const s = JSON.stringify(options.indent);
throw new Error(`"indent" option must be a positive integer, not ${s}`);
}
return stringifyDocument.stringifyDocument(this, options);
}
}
function assertCollection(contents) {
if (identity.isCollection(contents))
return true;
throw new Error('Expected a YAML collection as document contents');
}
exports.Document = Document;
@@ -0,0 +1,98 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.parseThenCall = parseThenCall;
exports.parseCatchCall = parseCatchCall;
exports.parseFinallyCall = parseFinallyCall;
const utils_1 = require("@typescript-eslint/utils");
const misc_1 = require("./misc");
/**
* Parses a syntactically possible `Promise.then()` call. Does not check the
* type of the callee.
*/
function parseThenCall(node, context) {
if (node.callee.type === utils_1.AST_NODE_TYPES.MemberExpression) {
const methodName = (0, misc_1.getStaticMemberAccessValue)(node.callee, context);
if (methodName === 'then') {
if (node.arguments.length >= 1) {
if (node.arguments[0].type === utils_1.AST_NODE_TYPES.SpreadElement) {
return {
object: node.callee.object,
};
}
if (node.arguments.length >= 2) {
if (node.arguments[1].type === utils_1.AST_NODE_TYPES.SpreadElement) {
return {
object: node.callee.object,
onFulfilled: node.arguments[0],
};
}
return {
object: node.callee.object,
onFulfilled: node.arguments[0],
onRejected: node.arguments[1],
};
}
return {
object: node.callee.object,
onFulfilled: node.arguments[0],
};
}
return {
object: node.callee.object,
};
}
}
return undefined;
}
/**
* Parses a syntactically possible `Promise.catch()` call. Does not check the
* type of the callee.
*/
function parseCatchCall(node, context) {
if (node.callee.type === utils_1.AST_NODE_TYPES.MemberExpression) {
const methodName = (0, misc_1.getStaticMemberAccessValue)(node.callee, context);
if (methodName === 'catch') {
if (node.arguments.length >= 1) {
if (node.arguments[0].type === utils_1.AST_NODE_TYPES.SpreadElement) {
return {
object: node.callee.object,
};
}
return {
object: node.callee.object,
onRejected: node.arguments[0],
};
}
return {
object: node.callee.object,
};
}
}
return undefined;
}
/**
* Parses a syntactically possible `Promise.finally()` call. Does not check the
* type of the callee.
*/
function parseFinallyCall(node, context) {
if (node.callee.type === utils_1.AST_NODE_TYPES.MemberExpression) {
const methodName = (0, misc_1.getStaticMemberAccessValue)(node.callee, context);
if (methodName === 'finally') {
if (node.arguments.length >= 1) {
if (node.arguments[0].type === utils_1.AST_NODE_TYPES.SpreadElement) {
return {
object: node.callee.object,
};
}
return {
object: node.callee.object,
onFinally: node.arguments[0],
};
}
return {
object: node.callee.object,
};
}
}
return undefined;
}
@@ -0,0 +1,103 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.attributeNames = exports.elementNames = void 0;
exports.elementNames = new Map([
"altGlyph",
"altGlyphDef",
"altGlyphItem",
"animateColor",
"animateMotion",
"animateTransform",
"clipPath",
"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",
"foreignObject",
"glyphRef",
"linearGradient",
"radialGradient",
"textPath",
].map(function (val) { return [val.toLowerCase(), val]; }));
exports.attributeNames = new Map([
"definitionURL",
"attributeName",
"attributeType",
"baseFrequency",
"baseProfile",
"calcMode",
"clipPathUnits",
"diffuseConstant",
"edgeMode",
"filterUnits",
"glyphRef",
"gradientTransform",
"gradientUnits",
"kernelMatrix",
"kernelUnitLength",
"keyPoints",
"keySplines",
"keyTimes",
"lengthAdjust",
"limitingConeAngle",
"markerHeight",
"markerUnits",
"markerWidth",
"maskContentUnits",
"maskUnits",
"numOctaves",
"pathLength",
"patternContentUnits",
"patternTransform",
"patternUnits",
"pointsAtX",
"pointsAtY",
"pointsAtZ",
"preserveAlpha",
"preserveAspectRatio",
"primitiveUnits",
"refX",
"refY",
"repeatCount",
"repeatDur",
"requiredExtensions",
"requiredFeatures",
"specularConstant",
"specularExponent",
"spreadMethod",
"startOffset",
"stdDeviation",
"stitchTiles",
"surfaceScale",
"systemLanguage",
"tableValues",
"targetX",
"targetY",
"textLength",
"viewBox",
"viewTarget",
"xChannelSelector",
"yChannelSelector",
"zoomAndPan",
].map(function (val) { return [val.toLowerCase(), val]; }));
@@ -0,0 +1,125 @@
/**
* @fileoverview A collection of methods for processing Espree's options.
* @author Kai Cataldo
*/
//------------------------------------------------------------------------------
// Helpers
//------------------------------------------------------------------------------
const SUPPORTED_VERSIONS = [
3,
5,
6, // 2015
7, // 2016
8, // 2017
9, // 2018
10, // 2019
11, // 2020
12, // 2021
13, // 2022
14, // 2023
15, // 2024
16, // 2025
17 // 2026
];
/**
* Get the latest ECMAScript version supported by Espree.
* @returns {number} The latest ECMAScript version.
*/
export function getLatestEcmaVersion() {
return SUPPORTED_VERSIONS.at(-1);
}
/**
* Get the list of ECMAScript versions supported by Espree.
* @returns {number[]} An array containing the supported ECMAScript versions.
*/
export function getSupportedEcmaVersions() {
return [...SUPPORTED_VERSIONS];
}
/**
* Normalize ECMAScript version from the initial config
* @param {(number|"latest")} ecmaVersion ECMAScript version from the initial config
* @throws {Error} throws an error if the ecmaVersion is invalid.
* @returns {number} normalized ECMAScript version
*/
function normalizeEcmaVersion(ecmaVersion = 5) {
let version = ecmaVersion === "latest" ? getLatestEcmaVersion() : ecmaVersion;
if (typeof version !== "number") {
throw new Error(`ecmaVersion must be a number or "latest". Received value of type ${typeof ecmaVersion} instead.`);
}
// Calculate ECMAScript edition number from official year version starting with
// ES2015, which corresponds with ES6 (or a difference of 2009).
if (version >= 2015) {
version -= 2009;
}
if (!SUPPORTED_VERSIONS.includes(version)) {
throw new Error("Invalid ecmaVersion.");
}
return version;
}
/**
* Normalize sourceType from the initial config
* @param {string} sourceType to normalize
* @throws {Error} throw an error if sourceType is invalid
* @returns {string} normalized sourceType
*/
function normalizeSourceType(sourceType = "script") {
if (sourceType === "script" || sourceType === "module") {
return sourceType;
}
if (sourceType === "commonjs") {
return "script";
}
throw new Error("Invalid sourceType.");
}
/**
* Normalize parserOptions
* @param {Object} options the parser options to normalize
* @throws {Error} throw an error if found invalid option.
* @returns {Object} normalized options
*/
export function normalizeOptions(options) {
const ecmaVersion = normalizeEcmaVersion(options.ecmaVersion);
const sourceType = normalizeSourceType(options.sourceType);
const ranges = options.range === true;
const locations = options.loc === true;
if (ecmaVersion !== 3 && options.allowReserved) {
// a value of `false` is intentionally allowed here, so a shared config can overwrite it when needed
throw new Error("`allowReserved` is only supported when ecmaVersion is 3");
}
if (typeof options.allowReserved !== "undefined" && typeof options.allowReserved !== "boolean") {
throw new Error("`allowReserved`, when present, must be `true` or `false`");
}
const allowReserved = ecmaVersion === 3 ? (options.allowReserved || "never") : false;
const ecmaFeatures = options.ecmaFeatures || {};
const allowReturnOutsideFunction = options.sourceType === "commonjs" ||
Boolean(ecmaFeatures.globalReturn);
if (sourceType === "module" && ecmaVersion < 6) {
throw new Error("sourceType 'module' is not supported when ecmaVersion < 2015. Consider adding `{ ecmaVersion: 2015 }` to the parser options.");
}
return Object.assign({}, options, {
ecmaVersion,
sourceType,
ranges,
locations,
allowReserved,
allowReturnOutsideFunction
});
}
@@ -0,0 +1 @@
{"version":3,"file":"BindingFluentSyntax.spec-d.js","sourceRoot":"","sources":["../../../../src/binding/models/BindingFluentSyntax.spec-d.ts"],"names":[],"mappings":";;AAAA,mCAQgB;AAYhB,iEAAiE;AACjE,IAAA,iBAAQ,EAAC,oBAAoB,EAAE,GAAG,EAAE;IAClC,IAAA,iBAAQ,EAAC,YAAY,EAAE,GAAG,EAAE;QAC1B,IAAI,sBAAoE,CAAC;QAEzE,IAAA,kBAAS,EAAC,GAAG,EAAE;YACb,sBAAsB,GAAG;gBACvB,SAAS,EAAE,eAAM,CAAC,EAAE,EAAE;aAGvB,CAAC;QACJ,CAAC,CAAC,CAAC;QAEH,IAAA,iBAAQ,EAAC,yBAAyB,EAAE,GAAG,EAAE;YACvC,IAAI,cAA+C,CAAC;YAEpD,IAAA,kBAAS,EAAC,GAAG,EAAE;gBACb,cAAc,GAAG,KAAK,IAA+B,EAAE,CAAC,KAAK,IAAI,EAAE,CACjE,SAAS,CAAC;YACd,CAAC,CAAC,CAAC;YAEH,IAAA,WAAE,EAAC,8CAA8C,EAAE,GAAG,EAAE;gBACtD,IAAA,qBAAY,EACV,sBAAsB,CAAC,SAAS,CAAC,cAAc,CAAC,CACjD,CAAC,aAAa,EAA4C,CAAC;YAC9D,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,IAAA,iBAAQ,EAAC,kBAAkB,EAAE,GAAG,EAAE;QAChC,IAAI,sBAA2D,CAAC;QAEhE,IAAA,kBAAS,EAAC,GAAG,EAAE;YACb,sBAAsB,GAAG;gBACvB,eAAe,EAAE,eAAM,CAAC,EAAE,EAAa;aAGxC,CAAC;QACJ,CAAC,CAAC,CAAC;QAEH,IAAA,iBAAQ,EAAC,2CAA2C,EAAE,GAAG,EAAE;YACzD,IAAI,cAAsC,CAAC;YAE3C,IAAA,kBAAS,EAAC,GAAG,EAAE;gBACb,cAAc,GAAG,KAAK,IAAsB,EAAE,CAAC,SAAS,CAAC;YAC3D,CAAC,CAAC,CAAC;YAEH,IAAA,WAAE,EAAC,sEAAsE,EAAE,GAAG,EAAE;gBAC9E,IAAA,qBAAY,EACV,sBAAsB,CAAC,eAAe,CAAC,cAAc,CAAC,CACvD,CAAC,aAAa,EAAqC,CAAC;YACvD,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,IAAA,iBAAQ,EAAC,oEAAoE,EAAE,GAAG,EAAE;YAClF,IAAI,cAAgE,CAAC;YAErE,IAAA,kBAAS,EAAC,GAAG,EAAE;gBACb,cAAc,GAAG,KAAK,EACpB,KAAa,EACb,KAAa,EACK,EAAE,CAAC,SAAS,CAAC;YACnC,CAAC,CAAC,CAAC;YAEH,IAAA,WAAE,EAAC,2HAA2H,EAAE,GAAG,EAAE;gBACnI,MAAM,sBAAsB,GAA8B,MAAM,EAAE,CAAC;gBACnE,MAAM,uBAAuB,GAA8B,MAAM,EAAE,CAAC;gBAEpE,IAAA,qBAAY,EACV,sBAAsB,CAAC,eAAe,CAAC,cAAc,EAAE;oBACrD,sBAAsB;oBACtB,uBAAuB;iBACxB,CAAC,CACH,CAAC,aAAa,EAAqC,CAAC;YACvD,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,IAAA,iBAAQ,EAAC,6DAA6D,EAAE,GAAG,EAAE;YAC3E,IAAI,cAAuD,CAAC;YAE5D,IAAA,kBAAS,EAAC,GAAG,EAAE;gBACb,cAAc,GAAG,CAAC,IAAY,EAAE,IAAY,EAAW,EAAE;oBACvD,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;gBACxB,CAAC,CAAC;YACJ,CAAC,CAAC,CAAC;YAEH,IAAA,WAAE,EAAC,kEAAkE,EAAE,GAAG,EAAE;gBAC1E,kDAAkD;gBAClD,IAAA,mBAAU,EAAC,sBAAsB,CAAC,eAAe,CAAC,cAAc,CAAC,CAAC,CAAC;YACrE,CAAC,CAAC,CAAC;YAEH,IAAA,WAAE,EAAC,mGAAmG,EAAE,GAAG,EAAE;gBAC3G,MAAM,sBAAsB,GAA8B,MAAM,EAAE,CAAC;gBAEnE,IAAA,mBAAU;gBACR,0DAA0D;gBAC1D,sBAAsB,CAAC,eAAe,CAAC,cAAc,EAAE;oBACrD,sBAAsB;iBACvB,CAAC,CACH,CAAC;YACJ,CAAC,CAAC,CAAC;YAEH,IAAA,WAAE,EAAC,2HAA2H,EAAE,GAAG,EAAE;gBACnI,MAAM,sBAAsB,GAA8B,MAAM,EAAE,CAAC;gBACnE,MAAM,uBAAuB,GAA8B,MAAM,EAAE,CAAC;gBAEpE,IAAA,qBAAY,EACV,sBAAsB,CAAC,eAAe,CAAC,cAAc,EAAE;oBACrD,sBAAsB;oBACtB,uBAAuB;iBACxB,CAAC,CACH,CAAC,aAAa,EAAqC,CAAC;YACvD,CAAC,CAAC,CAAC;YAEH,IAAA,WAAE,EAAC,yHAAyH,EAAE,GAAG,EAAE;gBACjI,MAAM,sBAAsB,GAC1B,MAAM,EAA+B,CAAC;gBAExC,MAAM,uBAAuB,GAAoB,MAAM,CAAC;gBAExD,IAAA,qBAAY,EACV,sBAAsB,CAAC,eAAe,CAAC,cAAc,EAAE;oBACrD,sBAAsB;oBACtB,uBAAuB;iBACxB,CAAC,CACH,CAAC,aAAa,EAAqC,CAAC;YACvD,CAAC,CAAC,CAAC;YAEH,IAAA,WAAE,EAAC,sHAAsH,EAAE,GAAG,EAAE;gBAC9H,MAAM,sBAAsB,GAA8B,MAAM,EAAE,CAAC;gBACnE,MAAM,uBAAuB,GAA8B,MAAM,EAAE,CAAC;gBACpE,MAAM,sBAAsB,GAA8B,MAAM,EAAE,CAAC;gBAEnE,IAAA,mBAAU;gBACR,2DAA2D;gBAC3D,sBAAsB,CAAC,eAAe,CAAC,cAAc,EAAE;oBACrD,sBAAsB;oBACtB,uBAAuB;oBACvB,sBAAsB;iBACvB,CAAC,CACH,CAAC;YACJ,CAAC,CAAC,CAAC;YAEH,IAAA,WAAE,EAAC,wHAAwH,EAAE,GAAG,EAAE;gBAChI,MAAM,sBAAsB,GAC1B;oBACE,qDAAqD;oBACrD,UAAU,EAAE,IAAI;oBAChB,iBAAiB,EAAE,MAAM,EAAE;iBAC5B,CAAC;gBAEJ,MAAM,uBAAuB,GAC3B;oBACE,mDAAmD;oBACnD,QAAQ,EAAE,IAAI;oBACd,iBAAiB,EAAE,MAAM,EAAE;iBAC5B,CAAC;gBAEJ,MAAM,sBAAsB,GAC1B;oBACE,qDAAqD;oBACrD,UAAU,EAAE,IAAI;oBAChB,4EAA4E;oBAC5E,QAAQ,EAAE,IAAI;oBACd,iBAAiB,EAAE,MAAM,EAAE;iBAC5B,CAAC;gBACJ,MAAM,uBAAuB,GAC3B;oBACE,iBAAiB,EAAE,MAAM,EAAE;iBAC5B,CAAC;gBAEJ,IAAA,mBAAU,EACR,sBAAsB,CAAC,eAAe,CAAC,cAAc,EAAE;oBACrD,sBAAsB;oBACtB,uBAAuB;iBACxB,CAAC,CACH,CAAC;gBAEF,IAAA,mBAAU,EACR,sBAAsB,CAAC,eAAe,CAAC,cAAc,EAAE;oBACrD,sBAAsB;oBACtB,uBAAuB;iBACxB,CAAC,CACH,CAAC;YACJ,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,IAAA,iBAAQ,EAAC,yCAAyC,EAAE,GAAG,EAAE;YACvD,IAAI,cAA2C,CAAC;YAEhD,IAAA,kBAAS,EAAC,GAAG,EAAE;gBACb,cAAc,GAAG,CAAC,IAAc,EAAW,EAAE,CAAC,IAAI,CAAC;YACrD,CAAC,CAAC,CAAC;YAEH,IAAA,WAAE,EAAC,wHAAwH,EAAE,GAAG,EAAE;gBAChI,MAAM,sBAAsB,GAExB;oBACF,UAAU,EAAE,IAAI;oBAChB,iBAAiB,EAAE,MAAM,EAAE;iBAC5B,CAAC;gBAEF,MAAM,uBAAuB,GAEzB;oBACF,wDAAwD;oBACxD,QAAQ,EAAE,IAAI;oBACd,iBAAiB,EAAE,MAAM,EAAE;iBAC5B,CAAC;gBAEF,MAAM,sBAAsB,GAExB;oBACF,UAAU,EAAE,IAAI;oBAChB,wDAAwD;oBACxD,QAAQ,EAAE,IAAI;oBACd,iBAAiB,EAAE,MAAM,EAAE;iBAC5B,CAAC;gBAEF,wDAAwD;gBACxD,MAAM,uBAAuB,GAEzB;oBACF,iBAAiB,EAAE,MAAM,EAAE;iBAC5B,CAAC;gBAEF,IAAA,mBAAU,EACR,sBAAsB,CAAC,eAAe,CAAC,cAAc,EAAE;oBACrD,sBAAsB;iBACvB,CAAC,CACH,CAAC;gBAEF,IAAA,mBAAU,EACR,sBAAsB,CAAC,eAAe,CAAC,cAAc,EAAE;oBACrD,uBAAuB;iBACxB,CAAC,CACH,CAAC;gBAEF,IAAA,mBAAU,EACR,sBAAsB,CAAC,eAAe,CAAC,cAAc,EAAE;oBACrD,sBAAsB;iBACvB,CAAC,CACH,CAAC;gBAEF,IAAA,mBAAU,EACR,sBAAsB,CAAC,eAAe,CAAC,cAAc,EAAE;oBACrD,uBAAuB;iBACxB,CAAC,CACH,CAAC;YACJ,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,IAAA,iBAAQ,EAAC,4CAA4C,EAAE,GAAG,EAAE;YAC1D,IAAI,cAAqD,CAAC;YAE1D,IAAA,kBAAS,EAAC,GAAG,EAAE;gBACb,cAAc,GAAG,CAAC,IAAa,EAAsB,EALine truncated
@@ -0,0 +1,102 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _ariaQuery = require("aria-query");
var _jsxAstUtils = require("jsx-ast-utils");
var _schemas = require("../util/schemas");
var _getElementType = _interopRequireDefault(require("../util/getElementType"));
var _isAbstractRole = _interopRequireDefault(require("../util/isAbstractRole"));
var _isHiddenFromScreenReader = _interopRequireDefault(require("../util/isHiddenFromScreenReader"));
var _isInteractiveElement = _interopRequireDefault(require("../util/isInteractiveElement"));
var _isInteractiveRole = _interopRequireDefault(require("../util/isInteractiveRole"));
var _isNonInteractiveElement = _interopRequireDefault(require("../util/isNonInteractiveElement"));
var _isNonInteractiveRole = _interopRequireDefault(require("../util/isNonInteractiveRole"));
var _isNonLiteralProperty = _interopRequireDefault(require("../util/isNonLiteralProperty"));
var _isPresentationRole = _interopRequireDefault(require("../util/isPresentationRole"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
/**
* @fileoverview Enforce static elements have no interactive handlers.
* @author Ethan Cohen
*
*/
// ----------------------------------------------------------------------------
// Rule Definition
// ----------------------------------------------------------------------------
var errorMessage = 'Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and support for tabbing, mouse, keyboard, and touch inputs to an interactive content element.';
var defaultInteractiveProps = [].concat(_jsxAstUtils.eventHandlersByType.focus, _jsxAstUtils.eventHandlersByType.keyboard, _jsxAstUtils.eventHandlersByType.mouse);
var schema = (0, _schemas.generateObjSchema)({
handlers: _schemas.arraySchema
});
var _default = exports["default"] = {
meta: {
docs: {
url: 'https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-static-element-interactions.md',
description: 'Enforce that non-interactive, visible elements (such as `<div>`) that have click handlers use the role attribute.'
},
schema: [schema]
},
create: function create(context) {
var options = context.options;
var elementType = (0, _getElementType["default"])(context);
return {
JSXOpeningElement: function (_JSXOpeningElement) {
function JSXOpeningElement(_x) {
return _JSXOpeningElement.apply(this, arguments);
}
JSXOpeningElement.toString = function () {
return _JSXOpeningElement.toString();
};
return JSXOpeningElement;
}(function (node) {
var attributes = node.attributes;
var type = elementType(node);
var _ref = options[0] || {},
allowExpressionValues = _ref.allowExpressionValues,
_ref$handlers = _ref.handlers,
handlers = _ref$handlers === void 0 ? defaultInteractiveProps : _ref$handlers;
var hasInteractiveProps = handlers.some(function (prop) {
return (0, _jsxAstUtils.hasProp)(attributes, prop) && (0, _jsxAstUtils.getPropValue)((0, _jsxAstUtils.getProp)(attributes, prop)) != null;
});
if (!_ariaQuery.dom.has(type)) {
// Do not test higher level JSX components, as we do not know what
// low-level DOM element this maps to.
return;
}
if (!hasInteractiveProps || (0, _isHiddenFromScreenReader["default"])(type, attributes) || (0, _isPresentationRole["default"])(type, attributes)) {
// Presentation is an intentional signal from the author that this
// element is not meant to be perceivable. For example, a click screen
// to close a dialog .
return;
}
if ((0, _isInteractiveElement["default"])(type, attributes) || (0, _isInteractiveRole["default"])(type, attributes) || (0, _isNonInteractiveElement["default"])(type, attributes) || (0, _isNonInteractiveRole["default"])(type, attributes) || (0, _isAbstractRole["default"])(type, attributes)) {
// This rule has no opinion about abstract roles.
return;
}
if (allowExpressionValues === true && (0, _isNonLiteralProperty["default"])(attributes, 'role')) {
// Special case if role is assigned using ternary with literals on both side
var roleProp = (0, _jsxAstUtils.getProp)(attributes, 'role');
if (roleProp && roleProp.type === 'JSXAttribute' && roleProp.value.type === 'JSXExpressionContainer') {
if (roleProp.value.expression.type === 'ConditionalExpression') {
if (roleProp.value.expression.consequent.type === 'Literal' && roleProp.value.expression.alternate.type === 'Literal') {
return;
}
}
}
return;
}
// Visible, non-interactive elements should not have an interactive handler.
context.report({
node,
message: errorMessage
});
})
};
}
};
module.exports = exports.default;
@@ -0,0 +1,842 @@
flf2a$ 8 4 14 0 25 0 16256
Cricket by Leslie Bates Jan. 1, 1996
cricket9@aros.net http://www.aros.net/~cricket9
I wish to thank Wade Fincher for the SIG that was used as a base for Cricket as
well as Chris Gill who designed the Square font, some of which was used in
Cricket. And finally I wish to thank Paul Burton, who if it was not for his
desire to create FIGWin, I may never have had the motivation to create a
FIGfont.
FIGWin is the Windows clone of FIGlet with a full featured FIGfont editor!
Forget about doing the math to figure out the smushmode number. Just check a
few boxes for each smushing rule. Forget about endmarks -- let the computer
figure out how tall and how wide your font is. Just draw FIGfonts with the
mouse and wipe the smudgemarks off your screen from all that counting!
FIGWin is full of features, but it's designed for use by a complete idiot. If
you qualify, visit the FIGWin website. Screen shots are shown, and of course
you can download it. (FREE!)
http://home.earthlink.net/~solution
Also see the FIGlet website: http://st-www.cs.uiuc.edu/users/chai/figlet.html
---
Font modified June 17, 2007 by patorjk
This was to widen the space character.
$ $@
$ $@
$ $@
$ $@
$ $@
$ $@
$ $@
$ $@@
__ @
| |@
|__|@
|__|@
@
@
@
@@
____ @
| | |@
|_|_|@
@
@
@
@
@@
_____ @
_| | |_ @
|_ _|@
|_ _|@
|__|__| @
@
@
@@
__,-,__ @
| ' '__|@
|__ |@
|_______|@
|_| @
@
@
@@
__ ___ @
|__| |@
| __|@
|___|__|@
@
@
@
@@
__,-,__ @
| ' '__|@
| __|@
|_______|@
|_| @
@
@
@@
__ @
| |@
|_|@
@
@
@
@
@@
___ @
,' _|@
| | @
| |_ @
`.___|@
@
@
@@
___ @
|_ `.@
| |@
_| |@
|___,'@
@
@
@@
__ _ __ @
| | | |@
> < @
|__|_|__|@
@
@
@
@@
__ @
_| |_ @
|_ _|@
|__| @
@
@
@
@@
@
@
__ @
| |@
|_|@
@
@
@@
@
______ @
|______|@
@
@
@
@
@@
@
@
__ @
|__|@
@
@
@
@@
___@
/ /@
,' ,' @
/__/ @
@
@
@
@@
_______ @
| _ |@
|. | |@
|. | |@
|: 1 |@
|::.. . |@
`-------'@
@@
_____ @
| _ |@
|.| |@
`-|. |@
|: |@
|::.|@
`---'@
@@
_______ @
| |@
|___| |@
/ ___/ @
|: 1 \ @
|::.. . |@
`-------'@
@@
_______ @
| _ |@
|___| |@
_(__ |@
|: 1 |@
|::.. . |@
`-------'@
@@
___ ___ @
| Y |@
| | |@
|____ |@
|: |@
|::.|@
`---'@
@@
_______ @
| _ |@
| 1___|@
|____ |@
|: 1 |@
|::.. . |@
`-------'@
@@
_______ @
| _ |@
| 1___|@
|. \ @
|: 1 |@
|::.. . |@
`-------'@
@@
_______ @
| _ |@
|___| |@
/ / @
| | @
| | @
`---' @
@@
_______ @
| _ |@
|. | |@
|. _ |@
|: 1 |@
|::.. . |@
`-------'@
@@
_______ @
| _ |@
| | |@
\___ |@
|: 1 |@
|::.. . |@
`-------'@
@@
__ @
|__|@
__ @
|__|@
@
@
@
@@
__ @
|__|@
__ @
| |@
|_|@
@
@
@@
__ @
,' _|@
/ / @
\ \_ @
`.__|@
@
@
@@
@
______ @
|______|@
|______|@
@
@
@
@@
__ @
|_ `. @
\ \@
_/ /@
|__,' @
@
@
@@
_____ @
|__ |@
', ,- @
|--| @
'-- @
@
@
@@
_________ @
| ___ |@
| | _ |@
| |______|@
|_________|@
@
@
@@
_______ @
| _ |@
|. 1 |@
|. _ |@
|: | |@
|::.|:. |@
`--- ---'@
@@
_______ @
| _ \ @
|. 1 / @
|. _ \ @
|: 1 \@
|::.. . /@
`-------' @
@@
_______ @
| _ |@
|. 1___|@
|. |___ @
|: 1 |@
|::.. . |@
`-------'@
@@
______ @
| _ \ @
|. | \ @
|. | \@
|: 1 /@
|::.. . / @
`------' @
@@
_______ @
| _ |@
|. 1___|@
|. __)_ @
|: 1 |@
|::.. . |@
`-------'@
@@
_______ @
| _ |@
|. 1___|@
|. __) @
|: | @
|::.| @
`---' @
@@
_______ @
| _ |@
|. |___|@
|. | |@
|: 1 |@
|::.. . |@
`-------'@
@@
___ ___ @
| Y |@
|. 1 |@
|. _ |@
|: | |@
|::.|:. |@
`--- ---'@
@@
___ @
| |@
|. |@
|. |@
|: |@
|::.|@
`---'@
@@
_______ @
| _ |@
|___| |@
|. | |@
|: 1 |@
|::.. . |@
`-------'@
@@
___ ___ @
| Y ) @
|. 1 / @
|. _ \ @
|: | \ @
|::.| . )@
`--- ---' @
@@
___ @
| | @
|. | @
|. |___ @
|: 1 |@
|::.. . |@
`-------'@
@@
___ ___ @
| Y |@
|. |@
|. \_/ |@
|: | |@
|::.|:. |@
`--- ---'@
@@
______ @
| _ \ @
|. | |@
|. | |@
|: | |@
|::.| |@
`--- ---'@
@@
_______ @
| _ |@
|. | |@
|. | |@
|: 1 |@
|::.. . |@
`-------'@
@@
_______ @
| _ |@
|. 1 |@
|. ____|@
|: | @
|::.| @
`---' @
@@
_______ @
| _ |@
|. | |@
|. | |@
|: 1 |@
|::.. |@
`----|:.|@
`--'@@
_______ @
| _ \@
|. l /@
|. _ 1@
|: | |@
|::.|:. |@
`--- ---'@
@@
_______ @
| _ |@
| 1___|@
|____ |@
|: 1 |@
|::.. . |@
`-------'@
@@
_______ @
| |@
|.| | |@
`-|. |-'@
|: | @
|::.| @
`---' @
@@
___ ___ @
| Y |@
|. | |@
|. | |@
|: 1 |@
|::.. . |@
`-------'@
@@
___ ___ @
| Y |@
|. | |@
|. | |@
|: 1 |@
\:.. ./ @
`---' @
@@
___ ___ @
| Y |@
|. | |@
|. / \ |@
|: |@
|::.|:. |@
`--- ---'@
@@
___ ___ @
( Y ) @
\ 1 / @
/ _ \ @
/: | \ @
(::. |:. )@
`--- ---' @
@@
___ ___ @
| Y |@
| 1 |@
\_ _/ @
|: | @
|::.| @
`---' @
@@
_______ @
| _ |@
|___| |@
/ ___/ @
|: 1 \ @
|::.. . |@
`-------'@
@@
____ @
| _|@
| | @
| |_ @
|____|@
@
@
@@
___ @
\ \ @
`. `. @
\__\@
@
@
@
@@
____ @
|_ |@
| |@
_| |@
|____|@
@
@
@@
____ @
| |@
|_/\_|@
@
@
@
@
@@
@
@
@
______ @
|______|@
@
@
@@
__ @
| |@
|_| @
@
@
@
@
@@
@
.---.-.@
| _ |@
|___._|@
@
@
@
@@
__ @
| |--.@
| _ |@
|_____|@
@
@
@
@@
@
.----.@
| __|@
|____|@
@
@
@
@@
__ @
.--| |@
| _ |@
|_____|@
@
@
@
@@
@
.-----.@
| -__|@
|_____|@
@
@
@
@@
___ @
.' _|@
| _|@
|__| @
@
@
@
@@
@
.-----.@
| _ |@
|___ |@
|_____|@
@
@
@@
__ @
| |--.@
| |@
|__|__|@
@
@
@
@@
__ @
|__|@
| |@
|__|@
@
@
@
@@
__ @
|__|@
| |@
| |@
|___|@
@
@
@@
__ @
| |--.@
| < @
|__|__|@
@
@
@
@@
__ @
| |@
| |@
|__|@
@
@
@
@@
@
.--------.@
| |@
|__|__|__|@
@
@
@
@@
@
.-----.@
| |@
|__|__|@
@
@
@
@@
@
.-----.@
| _ |@
|_____|@
@
@
@
@@
@
.-----.@
| _ |@
| __|@
|__| @
@
@
@@
@
.-----.@
| _ |@
|__ |@
|__|@
@
@
@@
@
.----.@
| _|@
|__| @
@
@
@
@@
@
.-----.@
|__ --|@
|_____|@
@
@
@
@@
__ @
| |_ @
| _|@
|____|@
@
@
@
@@
@
.--.--.@
| | |@
|_____|@
@
@
@
@@
@
.--.--.@
| | |@
\___/ @
@
@
@
@@
@
.--.--.--.@
| | | |@
|________|@
@
@
@
@@
@
.--.--.@
|_ _|@
|__.__|@
@
@
@
@@
@
.--.--.@
| | |@
|___ |@
|_____|@
@
@
@@
@
.-----.@
|-- __|@
|_____|@
@
@
@
@@
___ @
| _|@
/ / @
\ \_ @
|___|@
@
@
@@
__ @
| |@
| |@
| |@
|__|@
@
@
@@
___ @
|_ | @
\ \@
_/ /@
|___| @
@
@
@@
___ @
| ' |@
|_,_| @
@
@
@
@
@@
.--.--.@
|-----|@
| - |@
|__|__|@
@
@
@
@@
.--.--.@
|-----|@
| _ |@
|_____|@
@
@
@
@@
.--.--.@
|--|--|@
| | |@
|_____|@
@
@
@
@@
.--.--.@
|---.-|@
| _ |@
|___._|@
@
@
@
@@
.--.--.@
|-----|@
| _ |@
|_____|@
@
@
@
@@
.--.--.@
|--|--|@
| | |@
|_____|@
@
@
@
@@
_______ @
| __ \@
| __ <@
| |____/@
|__| @
@
@
@@
@@ -0,0 +1 @@
{"version":3,"file":"mapCoseAlgToWebCryptoKeyAlgName.d.ts","sourceRoot":"","sources":["../../../../src/helpers/iso/isoCrypto/mapCoseAlgToWebCryptoKeyAlgName.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAEtD;;GAEG;AACH,wBAAgB,+BAA+B,CAC7C,GAAG,EAAE,OAAO,GACX,sBAAsB,CAoBxB"}
@@ -0,0 +1,20 @@
Copyright (c) 2015 TJ Holowaychuk <tj@vision-media.ca>
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.
@@ -0,0 +1 @@
{"version":3,"file":"bin.d.mts","sourceRoot":"","sources":["../../src/bin.mts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
function convertOffsetToTimes(offset, duration) {
return offset.map((o) => o * duration);
}
export { convertOffsetToTimes };
@@ -0,0 +1,91 @@
{
"name": "parse-entities",
"version": "4.0.2",
"description": "Parse HTML character references",
"license": "MIT",
"keywords": [
"parse",
"html",
"character",
"reference",
"entity",
"entities"
],
"repository": "wooorm/parse-entities",
"bugs": "https://github.com/wooorm/parse-entities/issues",
"funding": {
"type": "github",
"url": "https://github.com/sponsors/wooorm"
},
"author": "Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)",
"contributors": [
"Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)"
],
"sideEffects": false,
"type": "module",
"main": "index.js",
"types": "index.d.ts",
"files": [
"lib/",
"index.d.ts",
"index.js"
],
"dependencies": {
"@types/unist": "^2.0.0",
"character-entities-legacy": "^3.0.0",
"character-reference-invalid": "^2.0.0",
"decode-named-character-reference": "^1.0.0",
"is-alphanumerical": "^2.0.0",
"is-decimal": "^2.0.0",
"is-hexadecimal": "^2.0.0"
},
"devDependencies": {
"@types/node": "^22.0.0",
"c8": "^10.0.0",
"prettier": "^3.0.0",
"remark-cli": "^12.0.0",
"remark-preset-wooorm": "^10.0.0",
"type-coverage": "^2.0.0",
"typescript": "^5.0.0",
"xo": "^0.60.0"
},
"scripts": {
"prepack": "npm run build && npm run format",
"build": "tsc --build --clean && tsc --build && type-coverage",
"format": "remark . -qfo && prettier . -w --log-level warn && xo --fix",
"test-api": "node --conditions development test.js",
"test-coverage": "c8 --check-coverage --100 --reporter lcov npm run test-api",
"test": "npm run build && npm run format && npm run test-coverage"
},
"prettier": {
"tabWidth": 2,
"useTabs": false,
"singleQuote": true,
"bracketSpacing": false,
"semi": false,
"trailingComma": "none"
},
"xo": {
"prettier": true,
"rules": {
"@typescript-eslint/consistent-type-definitions": "off",
"@typescript-eslint/ban-types": "off",
"complexity": "off",
"max-depth": "off",
"no-bitwise": "off",
"unicorn/numeric-separators-style": "off",
"unicorn/prefer-code-point": "off"
}
},
"remarkConfig": {
"plugins": [
"remark-preset-wooorm"
]
},
"typeCoverage": {
"atLeast": 100,
"detail": true,
"strict": true,
"ignoreCatch": true
}
}
@@ -0,0 +1,5 @@
var id = 0;
function _classPrivateFieldKey(e) {
return "__private_" + id++ + "_" + e;
}
module.exports = _classPrivateFieldKey, module.exports.__esModule = true, module.exports["default"] = module.exports;
@@ -0,0 +1 @@
{"version":3,"file":"classMetadataReflectKey.js","sourceRoot":"","sources":["../../../../src/reflectMetadata/data/classMetadataReflectKey.ts"],"names":[],"mappings":";;;AAAa,QAAA,uBAAuB,GAClC,2CAA2C,CAAC"}
@@ -0,0 +1,61 @@
'use strict'
const path = require('path')
const { describe, it } = require('mocha')
const assert = require('assert')
const gyp = require('../lib/node-gyp')
const createConfigGypi = require('../lib/create-config-gypi')
const { parseConfigGypi, getCurrentConfigGypi } = createConfigGypi.test
describe('create-config-gypi', function () {
it('config.gypi with no options', async function () {
const prog = gyp()
prog.parseArgv([])
const config = await getCurrentConfigGypi({ gyp: prog, vsInfo: {} })
assert.strictEqual(config.target_defaults.default_configuration, 'Release')
assert.strictEqual(config.variables.target_arch, process.arch)
})
it('config.gypi with --debug', async function () {
const prog = gyp()
prog.parseArgv(['_', '_', '--debug'])
const config = await getCurrentConfigGypi({ gyp: prog, vsInfo: {} })
assert.strictEqual(config.target_defaults.default_configuration, 'Debug')
})
it('config.gypi with custom options', async function () {
const prog = gyp()
prog.parseArgv(['_', '_', '--shared-libxml2'])
const config = await getCurrentConfigGypi({ gyp: prog, vsInfo: {} })
assert.strictEqual(config.variables.shared_libxml2, true)
})
it('config.gypi with nodedir', async function () {
const nodeDir = path.join(__dirname, 'fixtures', 'nodedir')
const prog = gyp()
prog.parseArgv(['_', '_', `--nodedir=${nodeDir}`])
const config = await getCurrentConfigGypi({ gyp: prog, nodeDir, vsInfo: {} })
assert.strictEqual(config.variables.build_with_electron, true)
})
it('config.gypi with --force-process-config', async function () {
const nodeDir = path.join(__dirname, 'fixtures', 'nodedir')
const prog = gyp()
prog.parseArgv(['_', '_', '--force-process-config', `--nodedir=${nodeDir}`])
const config = await getCurrentConfigGypi({ gyp: prog, nodeDir, vsInfo: {} })
assert.strictEqual(config.variables.build_with_electron, undefined)
})
it('config.gypi parsing', function () {
const str = "# Some comments\n{'variables': {'multiline': 'A'\n'B'}}"
const config = parseConfigGypi(str)
assert.deepStrictEqual(config, { variables: { multiline: 'AB' } })
})
})
@@ -0,0 +1,722 @@
export default `flf2a$ 7 7 20 -1 6
banner.flf by Ryan Youck (youck@cs.uregina.ca)
(From a unix program called banner)
I am not responsible for use of this font
Thanks to Glenn Chappell for his help
March 7, 1994
$$$@
$$$@
$$$@
$$$@
$$$@
$$$@
$$$@@
###$@
###$@
###$@
# $@
$@
###$@
###$@@
### ###$@
### ###$@
# # $@
$ $@
$ $@
$@
$@@
# # $@
# # $@
#######$@
# # $@
#######$@
# # $@
# # $@@
##### $@
# # #$@
# # $@
##### $@
# #$@
# # #$@
##### $@@
### #$@
# # # $@
### # $@
# $@
# ###$@
# # #$@
# ###$@@
## $@
# # $@
## $@
### $@
# # #$@
# # $@
### #$@@
###$@
###$@
# $@
# $@
$@
$@
$@@
##$@
# $@
# $@
# $@
# $@
# $@
##$@@
## $@
# $@
#$@
#$@
#$@
# $@
## $@@
$@
# # $@
# # $@
#######$@
# # $@
# # $@
$@@
$@
# $@
# $@
#####$@
# $@
# $@
$@@
$@
$@
$@
###$@
###$@
# $@
# $@@
$@
$@
$@
#####$@
$@
$@
$@@
$@
$@
$@
$@
###$@
###$@
###$@@
#$@
# $@
# $@
# $@
# $@
# $@
# $@@
### $@
# # $@
# #$@
# #$@
# #$@
# # $@
### $@@
# $@
## $@
# # $@
# $@
# $@
# $@
#####$@@
##### $@
# #$@
#$@
##### $@
# $@
# $@
#######$@@
##### $@
# #$@
#$@
##### $@
#$@
# #$@
##### $@@
# $@
# # $@
# # $@
# # $@
#######$@
# $@
# $@@
#######$@
# $@
# $@
###### $@
#$@
# #$@
##### $@@
##### $@
# #$@
# $@
###### $@
# #$@
# #$@
##### $@@
#######$@
# # $@
# $@
# $@
# $@
# $@
# $@@
##### $@
# #$@
# #$@
##### $@
# #$@
# #$@
##### $@@
##### $@
# #$@
# #$@
######$@
#$@
# #$@
##### $@@
# $@
###$@
# $@
$@
# $@
###$@
# $@@
###$@
###$@
$@
###$@
###$@
# $@
# $@@
#$@
# $@
# $@
# $@
# $@
# $@
#$@@
$@
$@
#####$@
$@
#####$@
$@
$@@
# $@
# $@
# $@
#$@
# $@
# $@
# $@@
##### $@
# #$@
#$@
### $@
# $@
$@
# $@@
##### $@
# #$@
# ### #$@
# ### #$@
# #### $@
# $@
##### $@@
# $@
# # $@
# # $@
# #$@
#######$@
# #$@
# #$@@
###### $@
# #$@
# #$@
###### $@
# #$@
# #$@
###### $@@
##### $@
# #$@
# $@
# $@
# $@
# #$@
##### $@@
###### $@
# #$@
# #$@
# #$@
# #$@
# #$@
###### $@@
#######$@
# $@
# $@
##### $@
# $@
# $@
#######$@@
#######$@
# $@
# $@
##### $@
# $@
# $@
# $@@
##### $@
# #$@
# $@
# ####$@
# #$@
# #$@
##### $@@
# #$@
# #$@
# #$@
#######$@
# #$@
# #$@
# #$@@
###$@
# $@
# $@
# $@
# $@
# $@
###$@@
#$@
#$@
#$@
#$@
# #$@
# #$@
##### $@@
# #$@
# # $@
# # $@
### $@
# # $@
# # $@
# #$@@
# $@
# $@
# $@
# $@
# $@
# $@
#######$@@
# #$@
## ##$@
# # # #$@
# # #$@
# #$@
# #$@
# #$@@
# #$@
## #$@
# # #$@
# # #$@
# # #$@
# ##$@
# #$@@
#######$@
# #$@
# #$@
# #$@
# #$@
# #$@
#######$@@
###### $@
# #$@
# #$@
###### $@
# $@
# $@
# $@@
##### $@
# #$@
# #$@
# #$@
# # #$@
# # $@
#### #$@@
###### $@
# #$@
# #$@
###### $@
# # $@
# # $@
# #$@@
##### $@
# #$@
# $@
##### $@
#$@
# #$@
##### $@@
#######$@
# $@
# $@
# $@
# $@
# $@
# $@@
# #$@
# #$@
# #$@
# #$@
# #$@
# #$@
##### $@@
# #$@
# #$@
# #$@
# #$@
# # $@
# # $@
# $@@
# #$@
# # #$@
# # #$@
# # #$@
# # #$@
# # #$@
## ## $@@
# #$@
# # $@
# # $@
# $@
# # $@
# # $@
# #$@@
# #$@
# # $@
# # $@
# $@
# $@
# $@
# $@@
#######$@
# $@
# $@
# $@
# $@
# $@
#######$@@
#####$@
# $@
# $@
# $@
# $@
# $@
#####$@@
# $@
# $@
# $@
# $@
# $@
# $@
#$@@
#####$@
#$@
#$@
#$@
#$@
#$@
#####$@@
# $@
# # $@
# #$@
$@
$@
$@
$@@
$@
$@
$@
$@
$@
$@
#######$@@
###$@
###$@
# $@
#$@
$@
$@
$@@
$@
## $@
# # $@
# #$@
######$@
# #$@
# #$@@
$@
##### $@
# #$@
##### $@
# #$@
# #$@
##### $@@
$@
#### $@
# #$@
# $@
# $@
# #$@
#### $@@
$@
##### $@
# #$@
# #$@
# #$@
# #$@
##### $@@
$@
######$@
# $@
##### $@
# $@
# $@
######$@@
$@
######$@
# $@
##### $@
# $@
# $@
# $@@
$@
#### $@
# #$@
# $@
# ###$@
# #$@
#### $@@
$@
# #$@
# #$@
######$@
# #$@
# #$@
# #$@@
$@
#$@
#$@
#$@
#$@
#$@
#$@@
$@
#$@
#$@
#$@
#$@
# #$@
#### $@@
$@
# #$@
# # $@
#### $@
# # $@
# # $@
# #$@@
$@
# $@
# $@
# $@
# $@
# $@
######$@@
$@
# #$@
## ##$@
# ## #$@
# #$@
# #$@
# #$@@
$@
# #$@
## #$@
# # #$@
# # #$@
# ##$@
# #$@@
$@
#### $@
# #$@
# #$@
# #$@
# #$@
#### $@@
$@
##### $@
# #$@
# #$@
##### $@
# $@
# $@@
$@
#### $@
# #$@
# #$@
# # #$@
# # $@
### #$@@
$@
##### $@
# #$@
# #$@
##### $@
# # $@
# #$@@
$@
#### $@
# $@
#### $@
#$@
# #$@
#### $@@
$@
#####$@
# $@
# $@
# $@
# $@
# $@@
$@
# #$@
# #$@
# #$@
# #$@
# #$@
#### $@@
$@
# #$@
# #$@
# #$@
# #$@
# # $@
## $@@
$@
# #$@
# #$@
# #$@
# ## #$@
## ##$@
# #$@@
$@
# #$@
# # $@
## $@
## $@
# # $@
# #$@@
$@
# #$@
# # $@
# $@
# $@
# $@
# $@@
$@
######$@
# $@
# $@
# $@
# $@
######$@@
###$@
# $@
# $@
## $@
# $@
# $@
###$@@
#$@
#$@
#$@
$@
#$@
#$@
#$@@
### $@
# $@
# $@
##$@
# $@
# $@
### $@@
## $@
# # #$@
## $@
$@
$@
$@
$@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
`
@@ -0,0 +1 @@
{"name":"ipaddr.js","version":"1.9.1","requiresBuild":false,"files":{"package.json":{"checkedAt":1794532089757,"integrity":"sha512-4tdzEiTcX+KHteL9T6fucToILWa9gC/jiroPy2xvGWjinFc6DHcljb0in/ws86FP4txReJLlM2uLc+0LURSmxw==","mode":420,"size":719},"ipaddr.min.js":{"checkedAt":1794532089758,"integrity":"sha512-PjCdew0WqybdnWhii1fl13pGKtBEZEsvs7Y78JW7aNWFHZemM257wxVQxktnV3u8qU6i/qcOqWVPneUL+oCsWw==","mode":420,"size":9738},"LICENSE":{"checkedAt":1794532089758,"integrity":"sha512-vtA4I7+X8PVvzNMJKTg2f5dLtOvD84KOxsHEMPf303Tnt/XEn2MzINFWUQLHXM3ygId7a3ac9gi6W7ennQT+yQ==","mode":420,"size":1087},"README.md":{"checkedAt":1794532089758,"integrity":"sha512-X4giIUNOfegUDcAuy5om49SWfYo4NV0+a83nJe4wETOsTJdxgBltT3dB2NUcMD7wBOIrWu4WOprDwyhPRSUp5A==","mode":420,"size":8309},"lib/ipaddr.js":{"checkedAt":1794532089758,"integrity":"sha512-aH6VhJR0FGiCFbUZup075KdTJrR69mw4FZAClPmLPCpDFhxnuRFnzpzt+i2riSO6Mek2G9fGMUx/JoVHXA7lsQ==","mode":420,"size":19333},"lib/ipaddr.js.d.ts":{"checkedAt":1794532089758,"integrity":"sha512-hU7gxXG2Gk31255iV/xbWVT0TJavreeVvrQNL1dFm8qGVIl8XtrmM6o+O3zCU/A1/ehnvjmWPZ0zdiqgwCPi/g==","mode":420,"size":2959}}}
@@ -0,0 +1 @@
{"name":"lodash.merge","version":"4.6.2","requiresBuild":false,"files":{"package.json":{"checkedAt":1794532094882,"integrity":"sha512-cydJx5PLqfmZtVUK7aLcvGEOU3Efxo2UFAmJ7abnSSoK0mK0AXsi9Kk8ZqmVlisRRZ2Kc5p2T9FR3Exo2hWvaA==","mode":420,"size":579},"index.js":{"checkedAt":1794532094882,"integrity":"sha512-VNjHS+oc0K689gwFOnIg/L9M4DlHF8nRf7lNiTHGmZ9wwzq0wNlfKdg0O06G6iBxcd9SYDC//ZLNypGJygnwIQ==","mode":420,"size":51155},"LICENSE":{"checkedAt":1794532094882,"integrity":"sha512-OVKmi0ACReW0qn9lB3gIkwOokjOEH4DTURXOynLKs5Wpgl6nWq/flVnw+Ax/jxxqj+40sAcUtOIZHvz5E4Y0NQ==","mode":420,"size":1952},"README.md":{"checkedAt":1794532094883,"integrity":"sha512-SqemvMbcTqci+tuaJtEtosl9f3gQ1K6Wi+1r1x7yP+0kK148uUlej919ZV8fDD6JME24k90Cy2KEIBayMYd79Q==","mode":420,"size":446}}}
@@ -0,0 +1,6 @@
import { _ as _overload_yield } from "./_overload_yield.js";
function _await_async_generator(value) {
return new _overload_yield(value, /* kind: await */ 0);
}
export { _await_async_generator as _ };
@@ -0,0 +1 @@
{"name":"language-subtag-registry","version":"0.3.23","requiresBuild":false,"files":{"data/json/collection.json":{"checkedAt":1794532118166,"integrity":"sha512-UBVLiCnxw3raVKch/eYPovl9+1nJ1DvvTXLVMuH1CkExJN6I03VmWP0jrAwldVoSnJaa0cIXgLXzVUtr6gkz0A==","mode":420,"size":1607},"data/json/extlang.json":{"checkedAt":1794532118166,"integrity":"sha512-9vpqFyYiZYY/TAcS/cyOGriDg4t6ElnA5OD5Qqw3xW3ZN/42ZrDOXB/4VwPg9ArtasCudTAF8wyZ0N1KkJbyQQ==","mode":420,"size":3545},"data/json/grandfathered.json":{"checkedAt":1794532118166,"integrity":"sha512-gOB7OY4k30+u4CvbSMgGbbMnRmpDmCR9ZFFNw8Qa8pB1Nd/2bOYcn+SoKP2mJwuWWve1ss2OCsXwfCAzlH8tSA==","mode":420,"size":481},"data/json/index.json":{"checkedAt":1794532118167,"integrity":"sha512-Opw7TUsx6Je7gBki66CP10rnIYJjo1yiR0/sSs0+C7YymwkhPrj4FuRf2QZHZGYT9bI3kGwObIDjJLDjSvhdMg==","mode":420,"size":299015},"data/json/language.json":{"checkedAt":1794532118167,"integrity":"sha512-Yyr0RiMHQvQ343mOBhUp+0qheLQ/gzR9l3XhhpSBeMogy6ZmSxSu17vBOBxtE9Tf2NOCUNgSCZmDyhWq0hS7Cg==","mode":420,"size":114390},"data/json/macrolanguage.json":{"checkedAt":1794532118168,"integrity":"sha512-wS82vh0ectRHeRi3uMB4HpHSOdIX9VmKXU0CqND0Zw/beh3jV9qCnKdLvfOEOu9LoPMsNQqxFEjSLyRaWR213Q==","mode":420,"size":796},"data/json/meta.json":{"checkedAt":1794532118168,"integrity":"sha512-kLGIeC7pwUuQJqMO8kufLCfHcEtRXzQNAwLp+85xHTEqa7pz01Nh78rMvbHLhTtL3OzAN0ABEiAU1AbexMAp5g==","mode":420,"size":31},"package.json":{"checkedAt":1794532118168,"integrity":"sha512-w/HwVBLUeMY7Wi5PYakcNIhtu/pGDa3XQHNRrc16aqmjG/RC6YWwIougFJ7z5wiUOEeTN2v4c7mTYXnOYr4pUw==","mode":420,"size":811},"data/json/private-use.json":{"checkedAt":1794532118168,"integrity":"sha512-rnbEDCejfoUXQ0O/S5zJbk5/ZKN76+4wcQv/w7nj3Yut8SLulk2K0kvTINHrotnNNaMgh9971g4RIcXKIkFgSw==","mode":420,"size":22},"data/json/redundant.json":{"checkedAt":1794532118168,"integrity":"sha512-2wwY9bdumrWeZPW8tQUypPXX9oNnMM5+onmfuxku9S+GERk4+rIve/AfNI3mKlxHkE+rrtdAG9M1mzwuLYsYxA==","mode":420,"size":1246},"data/json/region.json":{"checkedAt":1794532118168,"integrity":"sha512-/l9bdTccs1DRFwLGGPFqZ/BpOFmiHiH/1XR4FVX21iur8DszoIntuZ1v7TicmacDG+T+pnzDWc6+4GUHt2tjxA==","mode":420,"size":4007},"data/json/registry.json":{"checkedAt":1794532118171,"integrity":"sha512-V9AHushCRRCd8nIzVXmiWVRd1tUz6o37UsFJwPdDmvKw5IZzjOGVKxYu8Ha8KG1E+A364kpo12OovYyjUYKadA==","mode":420,"size":1111658},"data/json/script.json":{"checkedAt":1794532118171,"integrity":"sha512-l4RUFz2VcrFHmfad4BISboWmx5cPjCgqOduVmql56GIExUtbJmaxiEkTmv52Smy0Ss1jQwJTJxNi3rdQz5ESGQ==","mode":420,"size":3339},"data/json/special.json":{"checkedAt":1794532118171,"integrity":"sha512-QqdKyBJ9ZpXWhug2ffhOb376TI4F4JZDPMHaEt5sBs6787nDgPRb4dATRNSgzeDqetmnv1ZquvjDaBX+xM/r+A==","mode":420,"size":59},"data/json/variant.json":{"checkedAt":1794532118172,"integrity":"sha512-vvem4bD70sUh5v5RWV3coKoqV+5FWRJRPM5Owev6ANA76hKujsUrRLSI8oOhRn2L45GVzzb8D8Zx9T9yUOvjrg==","mode":420,"size":2108},"README.md":{"checkedAt":1794532118172,"integrity":"sha512-CypYJDCdAcYSlJRisnvo29jnZjkG7CjeMj9H3/n7Vekd5Yu94ZHKwW5TTeY8woDzMeYcmV+NViSWYEDX08UK2A==","mode":420,"size":1629}}}
@@ -0,0 +1,17 @@
var $8bdaeb71e50c3e1a$exports = {};
$8bdaeb71e50c3e1a$exports = {
"deselectedItem": (args)=>`${args.item} neselectat.`,
"longPressToSelect": `Ap\u{103}sa\u{21B}i lung pentru a intra \xeen modul de selectare.`,
"select": `Selectare`,
"selectedAll": `Toate elementele selectate.`,
"selectedCount": (args, formatter)=>`${formatter.plural(args.count, {
"=0": `Niciun element selectat`,
one: ()=>`${formatter.number(args.count)} element selectat`,
other: ()=>`${formatter.number(args.count)} elemente selectate`
})}.`,
"selectedItem": (args)=>`${args.item} selectat.`
};
export {$8bdaeb71e50c3e1a$exports as default};
//# sourceMappingURL=ro-RO.module.js.map
@@ -0,0 +1,50 @@
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you 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 REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
import {Key} from '@react-types/shared';
export interface SingleSelection {
/** Whether the collection allows empty selection. */
disallowEmptySelection?: boolean,
/** The currently selected key in the collection (controlled). */
selectedKey?: Key | null,
/** The initial selected key in the collection (uncontrolled). */
defaultSelectedKey?: Key,
/** Handler that is called when the selection changes. */
onSelectionChange?: (key: Key | null) => void
}
export type SelectionMode = 'none' | 'single' | 'multiple';
export type SelectionBehavior = 'toggle' | 'replace';
export type Selection = 'all' | Set<Key>;
export interface MultipleSelection {
/** The type of selection that is allowed in the collection. */
selectionMode?: SelectionMode,
/** Whether the collection allows empty selection. */
disallowEmptySelection?: boolean,
/** The currently selected keys in the collection (controlled). */
selectedKeys?: 'all' | Iterable<Key>,
/** The initial selected keys in the collection (uncontrolled). */
defaultSelectedKeys?: 'all' | Iterable<Key>,
/** Handler that is called when the selection changes. */
onSelectionChange?: (keys: Selection) => void,
/** The currently disabled keys in the collection (controlled). */
disabledKeys?: Iterable<Key>
}
export interface SpectrumSelectionProps {
/** How selection should be displayed. */
selectionStyle?: 'checkbox' | 'highlight'
}
export type FocusStrategy = 'first' | 'last';
export type DisabledBehavior = 'selection' | 'all';
@@ -0,0 +1,7 @@
import { i as isLeapYear$1 } from "./isLeapYear-G37NadS-.mjs";
function isLeapYear(date) {
return isLeapYear$1(date.getFullYear());
}
export {
isLeapYear as default
};
@@ -0,0 +1,45 @@
/**
* @author Toru Nagashima <https://github.com/mysticatea>
* See LICENSE file in root directory for full license.
*/
"use strict"
const { getSourceCode } = require("eslint-compat-utils")
const { getRegExpCalls } = require("../utils")
module.exports = {
meta: {
docs: {
description: "disallow RegExp `s` flag.",
category: "ES2018",
recommended: false,
url: "http://eslint-community.github.io/eslint-plugin-es-x/rules/no-regexp-s-flag.html",
},
fixable: null,
messages: {
forbidden: "ES2018 RegExp 's' flag is forbidden.",
},
schema: [],
type: "problem",
},
create(context) {
return {
"Literal[regex]"(node) {
if (node.regex.flags.includes("s")) {
context.report({ node, messageId: "forbidden" })
}
},
"Program:exit"(program) {
const sourceCode = getSourceCode(context)
const scope = sourceCode.getScope(program)
for (const { node, flags } of getRegExpCalls(scope)) {
if (flags && flags.includes("s")) {
context.report({ node, messageId: "forbidden" })
}
}
},
}
},
}
@@ -0,0 +1,15 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = onlyOnce;
function onlyOnce(fn) {
return function (...args) {
if (fn === null) throw new Error("Callback was already called.");
var callFn = fn;
fn = null;
callFn.apply(this, args);
};
}
module.exports = exports.default;
@@ -0,0 +1,10 @@
"use client";
import {
checkbox_default
} from "./chunk-4MFDKOXF.mjs";
import "./chunk-5E6Z6LLK.mjs";
import "./chunk-5JTA22ZA.mjs";
import "./chunk-LK575OWX.mjs";
export {
checkbox_default as default
};
Loaded 100 of 35554 files, more files were not shown because too many files have changed in this diff. Show more