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 @@
{"mappings":";;;;;;;;AAAA;;;;;;;;;;CAUC","sources":["packages/@react-stately/tooltip/src/index.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\nexport {useTooltipTriggerState} from './useTooltipTriggerState';\n\nexport type {TooltipTriggerProps} from '@react-types/tooltip';\nexport type {TooltipTriggerState} from './useTooltipTriggerState';\n"],"names":[],"version":3,"file":"main.js.map"}
@@ -0,0 +1,37 @@
{
"root": true,
"parser": "@babel/eslint-parser",
"parserOptions": {
"ecmaVersion": 2017,
"sourceType": "module"
},
"env": {
"es6": true,
"browser": true,
"node": true,
"jest": true
},
"plugins": [
"import",
"jsx-a11y",
"prettier",
"react",
"react-hooks"
],
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:jsx-a11y/recommended",
"plugin:prettier/recommended"
],
"rules": {
"react-hooks/rules-of-hooks": 2,
"react/forbid-prop-types": 0,
"react/require-default-props": 0
},
"settings": {
"react": {
"version": "detect"
}
}
}
@@ -0,0 +1,31 @@
var through = require("through")
var test = require("tape")
var duplex = require("../index")
var readable = through()
var writable = through(write)
var written = 0
var data = 0
var stream = duplex(writable, readable)
function write() {
written++
}
stream.on("data", ondata)
function ondata() {
data++
}
test("emit and write", function(t) {
t.plan(2)
stream.write()
readable.emit("data")
t.equal(written, 1, "should have written once")
t.equal(data, 1, "should have received once")
})
@@ -0,0 +1,241 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ValueCastError = void 0;
exports.Cast = Cast;
const index_1 = require("../guard/index");
const index_2 = require("../../type/error/index");
const index_3 = require("../../type/symbols/index");
const index_4 = require("../create/index");
const index_5 = require("../check/index");
const index_6 = require("../clone/index");
const index_7 = require("../deref/index");
// ------------------------------------------------------------------
// Errors
// ------------------------------------------------------------------
class ValueCastError extends index_2.TypeBoxError {
constructor(schema, message) {
super(message);
this.schema = schema;
}
}
exports.ValueCastError = ValueCastError;
// ------------------------------------------------------------------
// The following logic assigns a score to a schema based on how well
// it matches a given value. For object types, the score is calculated
// by evaluating each property of the value against the schema's
// properties. To avoid bias towards objects with many properties,
// each property contributes equally to the total score. Properties
// that exactly match literal values receive the highest possible
// score, as literals are often used as discriminators in union types.
// ------------------------------------------------------------------
function ScoreUnion(schema, references, value) {
if (schema[index_3.Kind] === 'Object' && typeof value === 'object' && !(0, index_1.IsNull)(value)) {
const object = schema;
const keys = Object.getOwnPropertyNames(value);
const entries = Object.entries(object.properties);
return entries.reduce((acc, [key, schema]) => {
const literal = schema[index_3.Kind] === 'Literal' && schema.const === value[key] ? 100 : 0;
const checks = (0, index_5.Check)(schema, references, value[key]) ? 10 : 0;
const exists = keys.includes(key) ? 1 : 0;
return acc + (literal + checks + exists);
}, 0);
}
else if (schema[index_3.Kind] === 'Union') {
const schemas = schema.anyOf.map((schema) => (0, index_7.Deref)(schema, references));
const scores = schemas.map((schema) => ScoreUnion(schema, references, value));
return Math.max(...scores);
}
else {
return (0, index_5.Check)(schema, references, value) ? 1 : 0;
}
}
function SelectUnion(union, references, value) {
const schemas = union.anyOf.map((schema) => (0, index_7.Deref)(schema, references));
let [select, best] = [schemas[0], 0];
for (const schema of schemas) {
const score = ScoreUnion(schema, references, value);
if (score > best) {
select = schema;
best = score;
}
}
return select;
}
function CastUnion(union, references, value) {
if ('default' in union) {
return typeof value === 'function' ? union.default : (0, index_6.Clone)(union.default);
}
else {
const schema = SelectUnion(union, references, value);
return Cast(schema, references, value);
}
}
// ------------------------------------------------------------------
// Default
// ------------------------------------------------------------------
function DefaultClone(schema, references, value) {
return (0, index_5.Check)(schema, references, value) ? (0, index_6.Clone)(value) : (0, index_4.Create)(schema, references);
}
function Default(schema, references, value) {
return (0, index_5.Check)(schema, references, value) ? value : (0, index_4.Create)(schema, references);
}
// ------------------------------------------------------------------
// Cast
// ------------------------------------------------------------------
function FromArray(schema, references, value) {
if ((0, index_5.Check)(schema, references, value))
return (0, index_6.Clone)(value);
const created = (0, index_1.IsArray)(value) ? (0, index_6.Clone)(value) : (0, index_4.Create)(schema, references);
const minimum = (0, index_1.IsNumber)(schema.minItems) && created.length < schema.minItems ? [...created, ...Array.from({ length: schema.minItems - created.length }, () => null)] : created;
const maximum = (0, index_1.IsNumber)(schema.maxItems) && minimum.length > schema.maxItems ? minimum.slice(0, schema.maxItems) : minimum;
const casted = maximum.map((value) => Visit(schema.items, references, value));
if (schema.uniqueItems !== true)
return casted;
const unique = [...new Set(casted)];
if (!(0, index_5.Check)(schema, references, unique))
throw new ValueCastError(schema, 'Array cast produced invalid data due to uniqueItems constraint');
return unique;
}
function FromConstructor(schema, references, value) {
if ((0, index_5.Check)(schema, references, value))
return (0, index_4.Create)(schema, references);
const required = new Set(schema.returns.required || []);
const result = function () { };
for (const [key, property] of Object.entries(schema.returns.properties)) {
if (!required.has(key) && value.prototype[key] === undefined)
continue;
result.prototype[key] = Visit(property, references, value.prototype[key]);
}
return result;
}
function FromImport(schema, references, value) {
const definitions = globalThis.Object.values(schema.$defs);
const target = schema.$defs[schema.$ref];
return Visit(target, [...references, ...definitions], value);
}
// ------------------------------------------------------------------
// Intersect
// ------------------------------------------------------------------
function IntersectAssign(correct, value) {
// trust correct on mismatch | value on non-object
if (((0, index_1.IsObject)(correct) && !(0, index_1.IsObject)(value)) || (!(0, index_1.IsObject)(correct) && (0, index_1.IsObject)(value)))
return correct;
if (!(0, index_1.IsObject)(correct) || !(0, index_1.IsObject)(value))
return value;
return globalThis.Object.getOwnPropertyNames(correct).reduce((result, key) => {
const property = key in value ? IntersectAssign(correct[key], value[key]) : correct[key];
return { ...result, [key]: property };
}, {});
}
function FromIntersect(schema, references, value) {
if ((0, index_5.Check)(schema, references, value))
return value;
const correct = (0, index_4.Create)(schema, references);
const assigned = IntersectAssign(correct, value);
return (0, index_5.Check)(schema, references, assigned) ? assigned : correct;
}
function FromNever(schema, references, value) {
throw new ValueCastError(schema, 'Never types cannot be cast');
}
function FromObject(schema, references, value) {
if ((0, index_5.Check)(schema, references, value))
return value;
if (value === null || typeof value !== 'object')
return (0, index_4.Create)(schema, references);
const required = new Set(schema.required || []);
const result = {};
for (const [key, property] of Object.entries(schema.properties)) {
if (!required.has(key) && value[key] === undefined)
continue;
result[key] = Visit(property, references, value[key]);
}
// additional schema properties
if (typeof schema.additionalProperties === 'object') {
const propertyNames = Object.getOwnPropertyNames(schema.properties);
for (const propertyName of Object.getOwnPropertyNames(value)) {
if (propertyNames.includes(propertyName))
continue;
result[propertyName] = Visit(schema.additionalProperties, references, value[propertyName]);
}
}
return result;
}
function FromRecord(schema, references, value) {
if ((0, index_5.Check)(schema, references, value))
return (0, index_6.Clone)(value);
if (value === null || typeof value !== 'object' || Array.isArray(value) || value instanceof Date)
return (0, index_4.Create)(schema, references);
const subschemaPropertyName = Object.getOwnPropertyNames(schema.patternProperties)[0];
const subschema = schema.patternProperties[subschemaPropertyName];
const result = {};
for (const [propKey, propValue] of Object.entries(value)) {
result[propKey] = Visit(subschema, references, propValue);
}
return result;
}
function FromRef(schema, references, value) {
return Visit((0, index_7.Deref)(schema, references), references, value);
}
function FromThis(schema, references, value) {
return Visit((0, index_7.Deref)(schema, references), references, value);
}
function FromTuple(schema, references, value) {
if ((0, index_5.Check)(schema, references, value))
return (0, index_6.Clone)(value);
if (!(0, index_1.IsArray)(value))
return (0, index_4.Create)(schema, references);
if (schema.items === undefined)
return [];
return schema.items.map((schema, index) => Visit(schema, references, value[index]));
}
function FromUnion(schema, references, value) {
return (0, index_5.Check)(schema, references, value) ? (0, index_6.Clone)(value) : CastUnion(schema, references, value);
}
function Visit(schema, references, value) {
const references_ = (0, index_1.IsString)(schema.$id) ? (0, index_7.Pushref)(schema, references) : references;
const schema_ = schema;
switch (schema[index_3.Kind]) {
// --------------------------------------------------------------
// Structural
// --------------------------------------------------------------
case 'Array':
return FromArray(schema_, references_, value);
case 'Constructor':
return FromConstructor(schema_, references_, value);
case 'Import':
return FromImport(schema_, references_, value);
case 'Intersect':
return FromIntersect(schema_, references_, value);
case 'Never':
return FromNever(schema_, references_, value);
case 'Object':
return FromObject(schema_, references_, value);
case 'Record':
return FromRecord(schema_, references_, value);
case 'Ref':
return FromRef(schema_, references_, value);
case 'This':
return FromThis(schema_, references_, value);
case 'Tuple':
return FromTuple(schema_, references_, value);
case 'Union':
return FromUnion(schema_, references_, value);
// --------------------------------------------------------------
// DefaultClone
// --------------------------------------------------------------
case 'Date':
case 'Symbol':
case 'Uint8Array':
return DefaultClone(schema, references, value);
// --------------------------------------------------------------
// Default
// --------------------------------------------------------------
default:
return Default(schema_, references_, value);
}
}
/** Casts a value into a given type. The return value will retain as much information of the original value as possible. */
function Cast(...args) {
return args.length === 3 ? Visit(args[0], args[1], args[2]) : Visit(args[0], [], args[1]);
}
@@ -0,0 +1,48 @@
/*
* Copyright 2024 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 {isMac} from './platform';
interface Event {
altKey: boolean,
ctrlKey: boolean,
metaKey: boolean
}
export function isCtrlKeyPressed(e: Event): boolean {
if (isMac()) {
return e.metaKey;
}
return e.ctrlKey;
}
// HTML input types that do not cause the software keyboard to appear.
const nonTextInputTypes = new Set([
'checkbox',
'radio',
'range',
'color',
'file',
'image',
'button',
'submit',
'reset'
]);
export function willOpenKeyboard(target: Element) {
return (
(target instanceof HTMLInputElement && !nonTextInputTypes.has(target.type)) ||
target instanceof HTMLTextAreaElement ||
(target instanceof HTMLElement && target.isContentEditable)
);
}
@@ -0,0 +1,15 @@
import * as react from 'react';
import { ContextType } from './use-checkbox-group.mjs';
import '@heroui/system';
import '@heroui/theme';
import '@react-types/checkbox';
import '@react-types/shared';
import '@heroui/react-utils';
import '@react-stately/checkbox';
import './checkbox.mjs';
import './use-checkbox.mjs';
declare const CheckboxGroupProvider: react.Provider<ContextType>;
declare const useCheckboxGroupContext: () => ContextType;
export { CheckboxGroupProvider, useCheckboxGroupContext };
@@ -0,0 +1,42 @@
# stop-iteration-iterator <sup>[![Version Badge][npm-version-svg]][package-url]</sup>
[![github actions][actions-image]][actions-url]
[![coverage][codecov-image]][codecov-url]
[![License][license-image]][license-url]
[![Downloads][downloads-image]][downloads-url]
[![npm badge][npm-badge-png]][package-url]
Firefox 17-26 iterators throw a StopIteration object to indicate "done". This normalizes it.
# Usage
```js
var stopIterationIterator = require('stop-iteration-iterator');
var s = new Set([1, 2]);
var iterator = stopIterationIterator(s.keys());
iterator.next(); // { done: false, value: 1 }
```
## Tests
Simply clone the repo, `npm install`, and run `npm test`
[package-url]: https://npmjs.org/package/stop-iteration-iterator
[npm-version-svg]: https://versionbadg.es/ljharb/stop-iteration-iterator.svg
[deps-svg]: https://david-dm.org/ljharb/stop-iteration-iterator.svg
[deps-url]: https://david-dm.org/ljharb/stop-iteration-iterator
[dev-deps-svg]: https://david-dm.org/ljharb/stop-iteration-iterator/dev-status.svg
[dev-deps-url]: https://david-dm.org/ljharb/stop-iteration-iterator#info=devDependencies
[npm-badge-png]: https://nodei.co/npm/stop-iteration-iterator.png?downloads=true&stars=true
[license-image]: https://img.shields.io/npm/l/stop-iteration-iterator.svg
[license-url]: LICENSE
[downloads-image]: https://img.shields.io/npm/dm/stop-iteration-iterator.svg
[downloads-url]: https://npm-stat.com/charts.html?package=stop-iteration-iterator
[codecov-image]: https://codecov.io/gh/ljharb/stop-iteration-iterator/branch/main/graphs/badge.svg
[codecov-url]: https://app.codecov.io/gh/ljharb/stop-iteration-iterator/
[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/stop-iteration-iterator
[actions-url]: https://github.com/ljharb/stop-iteration-iterator/actions
@@ -0,0 +1,12 @@
'use strict';
var SLOT = require('internal-slot');
var keptObjects = [];
// https://262.ecma-international.org/12.0/#sec-clear-kept-objects
module.exports = function ClearKeptObjects() {
keptObjects.length = 0;
};
SLOT.set(module.exports, '[[es-abstract internal: KeptAlive]]', keptObjects);
@@ -0,0 +1,118 @@
{
"bh": 15,
"aav": 209,
"afa": 298,
"alg": 415,
"alv": 430,
"apa": 505,
"aqa": 531,
"aql": 536,
"art": 558,
"ath": 596,
"auf": 620,
"aus": 633,
"awd": 655,
"azc": 702,
"bad": 714,
"bai": 719,
"bat": 727,
"ber": 826,
"bnt": 1054,
"btk": 1193,
"cai": 1366,
"cau": 1377,
"cba": 1383,
"ccn": 1413,
"ccs": 1418,
"cdc": 1420,
"cdd": 1421,
"cel": 1439,
"cmc": 1530,
"cpe": 1585,
"cpf": 1586,
"cpp": 1591,
"crp": 1612,
"csu": 1642,
"cus": 1678,
"day": 1723,
"dmn": 1869,
"dra": 1915,
"egx": 2028,
"esx": 2114,
"euq": 2128,
"fiu": 2170,
"fox": 2192,
"gem": 2318,
"gme": 2404,
"gmq": 2410,
"gmw": 2414,
"grk": 2480,
"him": 2631,
"hmx": 2672,
"hok": 2694,
"hyx": 2765,
"iir": 2819,
"ijo": 2824,
"inc": 2864,
"ine": 2865,
"ira": 2884,
"iro": 2890,
"itc": 2911,
"jpx": 3051,
"kar": 3098,
"kdo": 3168,
"khi": 3264,
"kro": 3519,
"map": 4095,
"mkh": 4338,
"mno": 4419,
"mun": 4591,
"myn": 4691,
"nah": 4736,
"nai": 4737,
"ngf": 4858,
"nic": 4904,
"nub": 5141,
"omq": 5312,
"omv": 5316,
"oto": 5381,
"paa": 5405,
"phi": 5510,
"plf": 5565,
"poz": 5650,
"pqe": 5666,
"pqw": 5668,
"pra": 5669,
"qwe": 5805,
"roa": 5932,
"sai": 5998,
"sal": 6001,
"sdv": 6079,
"sem": 6094,
"sgn": 6124,
"sio": 6172,
"sit": 6177,
"sla": 6225,
"smi": 6254,
"son": 6305,
"sqj": 6339,
"ssa": 6373,
"syd": 6488,
"tai": 6520,
"tbq": 6552,
"trk": 6877,
"tup": 6956,
"tut": 6959,
"tuw": 6962,
"urj": 7138,
"wak": 7280,
"wen": 7329,
"xgn": 7582,
"xnd": 7672,
"ypk": 7996,
"zhx": 8126,
"zle": 8151,
"zls": 8156,
"zlw": 8158,
"znd": 8186
}
@@ -0,0 +1,4 @@
function _nonIterableSpread() {
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
export { _nonIterableSpread as default };
@@ -0,0 +1,30 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var docBibliorefRole = {
abstract: false,
accessibleNameRequired: true,
baseConcepts: [],
childrenPresentational: false,
nameFrom: ['author', 'contents'],
prohibitedProps: [],
props: {
'aria-errormessage': null,
'aria-invalid': null
},
relatedConcepts: [{
concept: {
name: 'biblioref [EPUB-SSV]'
},
module: 'EPUB'
}],
requireContextRole: [],
requiredContextRole: [],
requiredOwnedElements: [],
requiredProps: {},
superClass: [['roletype', 'widget', 'command', 'link']]
};
var _default = exports.default = docBibliorefRole;
@@ -0,0 +1,127 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var base = {
8: "Backspace",
9: "Tab",
10: "Enter",
12: "NumLock",
13: "Enter",
16: "Shift",
17: "Control",
18: "Alt",
20: "CapsLock",
27: "Escape",
32: " ",
33: "PageUp",
34: "PageDown",
35: "End",
36: "Home",
37: "ArrowLeft",
38: "ArrowUp",
39: "ArrowRight",
40: "ArrowDown",
44: "PrintScreen",
45: "Insert",
46: "Delete",
59: ";",
61: "=",
91: "Meta",
92: "Meta",
106: "*",
107: "+",
108: ",",
109: "-",
110: ".",
111: "/",
144: "NumLock",
145: "ScrollLock",
160: "Shift",
161: "Shift",
162: "Control",
163: "Control",
164: "Alt",
165: "Alt",
173: "-",
186: ";",
187: "=",
188: ",",
189: "-",
190: ".",
191: "/",
192: "`",
219: "[",
220: "\\",
221: "]",
222: "'"
};
var shift = {
48: ")",
49: "!",
50: "@",
51: "#",
52: "$",
53: "%",
54: "^",
55: "&",
56: "*",
57: "(",
59: ":",
61: "+",
173: "_",
186: ":",
187: "+",
188: "<",
189: "_",
190: ">",
191: "?",
192: "~",
219: "{",
220: "|",
221: "}",
222: "\""
};
var mac = typeof navigator != "undefined" && /Mac/.test(navigator.platform);
var ie = typeof navigator != "undefined" && /MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);
// Fill in the digit keys
for (var i = 0; i < 10; i++) base[48 + i] = base[96 + i] = String(i);
// The function keys
for (var i = 1; i <= 24; i++) base[i + 111] = "F" + i;
// And the alphabetic keys
for (var i = 65; i <= 90; i++) {
base[i] = String.fromCharCode(i + 32);
shift[i] = String.fromCharCode(i);
}
// For each code that doesn't have a shift-equivalent, copy the base name
for (var code in base) if (!shift.hasOwnProperty(code)) shift[code] = base[code];
function keyName(event) {
// On macOS, keys held with Shift and Cmd don't reflect the effect of Shift in `.key`.
// On IE, shift effect is never included in `.key`.
var ignoreKey = mac && event.metaKey && event.shiftKey && !event.ctrlKey && !event.altKey ||
ie && event.shiftKey && event.key && event.key.length == 1 ||
event.key == "Unidentified";
var name = (!ignoreKey && event.key) ||
(event.shiftKey ? shift : base)[event.keyCode] ||
event.key || "Unidentified";
// Edge sometimes produces wrong names (Issue #3)
if (name == "Esc") name = "Escape";
if (name == "Del") name = "Delete";
// https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/8860571/
if (name == "Left") name = "ArrowLeft";
if (name == "Up") name = "ArrowUp";
if (name == "Right") name = "ArrowRight";
if (name == "Down") name = "ArrowDown";
return name
}
exports.base = base;
exports.keyName = keyName;
exports.shift = shift;
@@ -0,0 +1,27 @@
type VisitorKeys$1 = {
readonly [type: string]: readonly string[];
};
/**
* @typedef {{ readonly [type: string]: ReadonlyArray<string> }} VisitorKeys
*/
/**
* @type {VisitorKeys}
*/
declare const KEYS: VisitorKeys$1;
/**
* Get visitor keys of a given node.
* @param {object} node The AST node to get keys.
* @returns {readonly string[]} Visitor keys of the node.
*/
declare function getKeys(node: object): readonly string[];
/**
* Make the union set with `KEYS` and given keys.
* @param {VisitorKeys} additionalKeys The additional keys.
* @returns {VisitorKeys} The union set.
*/
declare function unionWith(additionalKeys: VisitorKeys): VisitorKeys;
type VisitorKeys = VisitorKeys$1;
export { KEYS, VisitorKeys, getKeys, unionWith };
@@ -0,0 +1,27 @@
import { OneBotAction } from '../../action/OneBotAction';
import { Static } from '@sinclair/typebox';
declare const PayloadSchema: import("@sinclair/typebox").TObject<{
group_id: import("@sinclair/typebox").TString;
remark: import("@sinclair/typebox").TString;
}>;
type PayloadType = Static<typeof PayloadSchema>;
declare const ReturnSchema: import("@sinclair/typebox").TNull;
type ReturnType = Static<typeof ReturnSchema>;
export default class SetGroupRemark extends OneBotAction<PayloadType, ReturnType> {
actionName: "set_group_remark";
payloadSchema: import("@sinclair/typebox").TObject<{
group_id: import("@sinclair/typebox").TString;
remark: import("@sinclair/typebox").TString;
}>;
returnSchema: import("@sinclair/typebox").TNull;
actionSummary: string;
actionDescription: string;
actionTags: string[];
payloadExample: {
group_id: string;
remark: string;
};
returnExample: null;
_handle(payload: PayloadType): Promise<ReturnType>;
}
export {};
@@ -0,0 +1,44 @@
// src/sun.tsx
import { jsx, jsxs } from "react/jsx-runtime";
var SunIcon = (props) => /* @__PURE__ */ jsxs(
"svg",
{
"aria-hidden": "true",
focusable: "false",
height: "1em",
role: "presentation",
viewBox: "0 0 512 512",
width: "1em",
...props,
children: [
/* @__PURE__ */ jsx(
"path",
{
d: "M256 48v48M256 416v48M403.08 108.92l-33.94 33.94M142.86 369.14l-33.94 33.94M464 256h-48M96 256H48M403.08 403.08l-33.94-33.94M142.86 142.86l-33.94-33.94",
fill: "none",
stroke: "currentColor",
strokeLinecap: "round",
strokeMiterlimit: 10,
strokeWidth: 32
}
),
/* @__PURE__ */ jsx(
"circle",
{
cx: 256,
cy: 256,
fill: "none",
r: 80,
stroke: "currentColor",
strokeLinecap: "round",
strokeMiterlimit: 10,
strokeWidth: 32
}
)
]
}
);
export {
SunIcon
};
@@ -0,0 +1,17 @@
import { CreateType } from '../create/type.mjs';
import { Never } from '../never/index.mjs';
import { IntersectCreate } from './intersect-create.mjs';
// ------------------------------------------------------------------
// TypeGuard
// ------------------------------------------------------------------
import { IsTransform } from '../guard/kind.mjs';
/** `[Json]` Creates an evaluated Intersect type */
export function Intersect(types, options) {
if (types.length === 1)
return CreateType(types[0], options);
if (types.length === 0)
return Never(options);
if (types.some((schema) => IsTransform(schema)))
throw new Error('Cannot intersect transform types');
return IntersectCreate(types, options);
}
@@ -0,0 +1 @@
{"name":"@react-stately/list","version":"3.11.1","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532105972,"integrity":"sha512-cil7stSp3ik41Hdv2Dj+GMcbvUfs1q+MZ2Yte0804py9i6oJJN/diCiIr/brcQOZ5ZqwAI6dgaHA7l8FZheQBw==","mode":420,"size":11335},"dist/ListCollection.main.js":{"checkedAt":1794532108652,"integrity":"sha512-Q91zJW2aPhJx9W3aqC25/1CX9ylVNyOoQz9GrowvHFEuebpS9rCRwF+BSTYgn9Yf+Kr+qluUcVF7qYLDty6stw==","mode":420,"size":3297},"dist/ListCollection.module.js":{"checkedAt":1794532108652,"integrity":"sha512-FkMuFgpylcIPkL1/dcBhwiZY+RP9f7N4YGmBrmKF8uQDjx/LnGFji7fFXoyT5GNx+DMk+Dgz3ry/3qXt1LJdAQ==","mode":420,"size":3141},"dist/main.js":{"checkedAt":1794532108652,"integrity":"sha512-ZuojMuiYnT+OPwjOuPPWO3Hts7PA07h8oVqjPeADxKgNnQAnJAgWy0vSErBZgHCiFvWW7ZeeA7xb6gwI34Im8A==","mode":420,"size":1313},"dist/module.js":{"checkedAt":1794532108653,"integrity":"sha512-mivp4Of4dZ77Eu8KjW/JYGTL8ic9jH4cmCCwOa5DT/fhgn2X5G9HYg4Zh5y9r0VkDPZ6T3A2W4UaC9Vqb5pbLg==","mode":420,"size":1189},"dist/useListState.main.js":{"checkedAt":1794532108653,"integrity":"sha512-s6QFQpYDwg0XTVW/f4tMc8GIMF4FWz5Qw3NvBmFIQjaTlE3O0YZ6wdQ+hsvGQQy/NF10dU2HrWZ3bQ7DmNQMJw==","mode":420,"size":5772},"dist/useListState.module.js":{"checkedAt":1794532108653,"integrity":"sha512-7F+WvLnpkRkt71CcbiMBm9LmPzEBkObUWZhPcWQA0c7Iqe51b+lntwwpgvh8vPyPsCxihRM3EsvCArA0lg9Qzw==","mode":420,"size":5735},"dist/useSingleSelectListState.main.js":{"checkedAt":1794532108653,"integrity":"sha512-+x/hACKhA2srSxF2LFr+vF0Wt6Wgvau0uEP+mwCfDwqs0Le1BWrD7iH4Y77lQZykl3SRW8CAX5ZxN5G0SurhCQ==","mode":420,"size":2863},"dist/useSingleSelectListState.module.js":{"checkedAt":1794532108653,"integrity":"sha512-iQThwH6ka92P/VilByqsJT1dcGzzV4kXGz9sOqV0v/HtA1nwKnjnlF59XmMyrAhtLGTtl8oe9wGWRWNfoZSZug==","mode":420,"size":2753},"package.json":{"checkedAt":1794532108653,"integrity":"sha512-yoq02SgavNcpAncI9djgsnafp7GUsad2AexnzvG98QSCHhiLS4n7yzMAm6J3/WZYw5dOFNrWQT8EFmTknxQGog==","mode":420,"size":952},"dist/ListCollection.main.js.map":{"checkedAt":1794532108654,"integrity":"sha512-rBe2+nST5ABB3LPi6c8EM7DqE36aWGFEJ1Mtfp9UINUzEqXx9XNtwf3XACuRsb+P8bitYmv4WN9xnllunQ5nvw==","mode":420,"size":4498},"dist/ListCollection.module.js.map":{"checkedAt":1794532108654,"integrity":"sha512-an/mPrb8fDlmHpJFx3RqYrd8YZkXO1IzQyZahyUlAZ+zo0udpkdDvSXVvkyd/ucBkHwzFPSGYuR010k2bJJmJQ==","mode":420,"size":4494},"dist/main.js.map":{"checkedAt":1794532108654,"integrity":"sha512-mPliNRXjanuF1o19ku8ZwFOsh0x4TRBCGo09RqP0DxzOvws1GsDlAi/EEGgKXONSINHR5hijDLzKiS75DE1Hxg==","mode":420,"size":1124},"dist/module.js.map":{"checkedAt":1794532108654,"integrity":"sha512-+rnP69Atm8nuCxX5sJVUi//IA6Fat4ogrwOliWWRwG6l5kPGaKGGPTz4J8WAGKz8sN6sWtTTS9MmYYtgtjXCnw==","mode":420,"size":1118},"dist/types.d.ts.map":{"checkedAt":1794532108654,"integrity":"sha512-Us/qCTZoGS0Ce+ANg22ADTRzspk3tFI8EYc0FxHLCAnQHj/AR7cGs+gnAhKx/2pdFNBqYHAwXaTtliUGCGMKlQ==","mode":420,"size":2975},"dist/useListState.main.js.map":{"checkedAt":1794532108654,"integrity":"sha512-jAXyxzpadJvCTiSIT/sL5n2Z2/qqdWOKED+fzL0k1hvTtd4z1rvtzHK78VOIt9StNaAsjv7AnU0kII+YwoIttA==","mode":420,"size":7344},"dist/useListState.module.js.map":{"checkedAt":1794532108655,"integrity":"sha512-RN5IHE3kBACrhB5FgvHTSAb5M3mMMEdFb0INwICcO/VWWu94Fa0bhqkEZEtJdvXaXHIsBgR57e1zlRVhIzOllQ==","mode":420,"size":7336},"dist/useSingleSelectListState.main.js.map":{"checkedAt":1794532108655,"integrity":"sha512-dCR4WGHkI2psoFcDjdz7m9FMB9bvco7T9qdW8XzpAKdE/bxWnncFbV7yBJTRv/HVV1b20Uk7ZNjpqOIw/6b4fQ==","mode":420,"size":3909},"dist/useSingleSelectListState.module.js.map":{"checkedAt":1794532108655,"integrity":"sha512-JLVGPris/RCCyCjf7ecwgphuX9xFE/xzyvj8/xyUez6Fu/o4P35SbGWl0LvEPANrg0YdVF696Xtbmm7CmNL+FA==","mode":420,"size":3904},"README.md":{"checkedAt":1794532108655,"integrity":"sha512-+v1/omDOdZ/q/Nu1OczuHOoxL7i47F4ijIDdfzHTySda+b2hAYz0qdBmO4y5DsM4Qcquki760nQ+PabX6LrTSg==","mode":420,"size":136},"dist/import.mjs":{"checkedAt":1794532108655,"integrity":"sha512-/jED5q2Dj/frrr8Wnyq5W11nsVn+sE9wazYGHeqRJMgyoVu8XagOUgzFADUht+3NC4zxEJ0sWfas/J1p5SNrLw==","mode":420,"size":1171},"dist/ListCollection.mjs":{"checkedAt":1794532108652,"integrity":"sha512-FkMuFgpylcIPkL1/dcBhwiZY+RP9f7N4YGmBrmKF8uQDjx/LnGFji7fFXoyT5GNx+DMk+Dgz3ry/3qXt1LJdAQ==","mode":420,"size":3141},"dist/useListState.mjs":{"checkedAt":1794532108655,"integrity":"sha512-8Y4tC1EIy2WKP6IwdDPvZ2pF3r0sHWXmZ7wHeosEb0HLjrHSrRR4bWXv3LxzRPDTpfQxRfSyUcOAQvDNRvoI2Q==","mode":420,"size":5729},"dist/useSingleSelectListState.mjs":{"checkedAt":1794532108655,"integrity":"sha512-RTCK50/LDGp5voH/ReMQROkr1Uob5f9cWhSaW4UP2lSvbfyepscIhpBhItA0GfnoPALLZjjqI4nXn+XeoM3Usg==","mode":420,"size":2747},"src/index.ts":{"checkedAt":1794532108656,"integrity":"sha512-oBcm57hUy0tyCw+rJjQ1eSNqnBdXVU+1Q1juEPtSt6/bwSnfQV5sFWkGzShWiErgKiiTWFjLx4qZzJ/jF6WQiA==","mode":420,"size":936},"src/ListCollection.ts":{"checkedAt":1794532108656,"integrity":"sha512-ZHVg3QdJvHbJRz4HLe/SMsF1+UNmlKOTVic1DcyyljqCsm1WnA7Y0bEjZUeufT9mY77wGBXqKFaNHNpCr3GQMQ==","mode":420,"size":2633},"dist/types.d.ts":{"checkedAt":17Line truncated
@@ -0,0 +1,89 @@
'use strict';
var utils = require('../utils.js');
require('eslint-visitor-keys');
require('espree');
require('estraverse');
var noMixedSpacesAndTabs = utils.createRule({
name: "no-mixed-spaces-and-tabs",
package: "js",
meta: {
type: "layout",
docs: {
description: "Disallow mixed spaces and tabs for indentation"
},
schema: [
{
oneOf: [
{
type: "string",
enum: ["smart-tabs"]
},
{
type: "boolean"
}
]
}
],
messages: {
mixedSpacesAndTabs: "Mixed spaces and tabs."
}
},
create(context) {
const sourceCode = context.sourceCode;
let smartTabs;
switch (context.options[0]) {
case true:
// Support old syntax, maybe add deprecation warning here
case "smart-tabs":
smartTabs = true;
break;
default:
smartTabs = false;
}
return {
"Program:exit": function(node) {
const lines = sourceCode.lines;
const comments = sourceCode.getAllComments();
const ignoredCommentLines = /* @__PURE__ */ new Set();
comments.forEach((comment) => {
for (let i = comment.loc.start.line + 1; i <= comment.loc.end.line; i++)
ignoredCommentLines.add(i);
});
let regex = /^(?=( +|\t+))\1(?:\t| )/u;
if (smartTabs) {
regex = /^(?=(\t*))\1(?=( +))\2\t/u;
}
lines.forEach((line, i) => {
const match = regex.exec(line);
if (match) {
const lineNumber = i + 1;
const loc = {
start: {
line: lineNumber,
column: match[0].length - 2
},
end: {
line: lineNumber,
column: match[0].length
}
};
if (!ignoredCommentLines.has(lineNumber)) {
const containingNode = sourceCode.getNodeByRangeIndex(sourceCode.getIndexFromLoc(loc.start));
if (!(containingNode && ["Literal", "TemplateElement"].includes(containingNode.type))) {
context.report({
node,
loc,
messageId: "mixedSpacesAndTabs"
});
}
}
}
});
}
};
}
});
module.exports = noMixedSpacesAndTabs;
@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2014 Gabriel Llamas
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,15 @@
"use client";
import { animations } from '../../motion/features/animations.mjs';
import { gestureAnimations } from '../../motion/features/gestures.mjs';
import { createDomVisualElement } from './create-visual-element.mjs';
/**
* @public
*/
const domAnimation = {
renderer: createDomVisualElement,
...animations,
...gestureAnimations,
};
export { domAnimation };
@@ -0,0 +1,6 @@
"use strict";
function _non_iterable_spread() {
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
exports._ = _non_iterable_spread;
@@ -0,0 +1 @@
!function(r,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(r="undefined"!=typeof globalThis?globalThis:r||self).dayjs_plugin_relativeTime=e()}(this,(function(){"use strict";return function(r,e,t){r=r||{};var n=e.prototype,o={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function i(r,e,t,o){return n.fromToBase(r,e,t,o)}t.en.relativeTime=o,n.fromToBase=function(e,n,i,d,u){for(var f,a,s,l=i.$locale().relativeTime||o,h=r.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],m=h.length,c=0;c<m;c+=1){var y=h[c];y.d&&(f=d?t(e).diff(i,y.d,!0):i.diff(e,y.d,!0));var p=(r.rounding||Math.round)(Math.abs(f));if(s=f>0,p<=y.r||!y.r){p<=1&&c>0&&(y=h[c-1]);var v=l[y.l];u&&(p=u(""+p)),a="string"==typeof v?v.replace("%d",p):v(p,n,y.l,s);break}}if(n)return a;var M=s?l.future:l.past;return"function"==typeof M?M(a):M.replace("%s",a)},n.to=function(r,e){return i(r,e,this,!0)},n.from=function(r,e){return i(r,e,this)};var d=function(r){return r.$u?t.utc():t()};n.toNow=function(r){return this.to(d(this),r)},n.fromNow=function(r){return this.from(d(this),r)}}}));
@@ -0,0 +1,17 @@
'use strict';
var assign = require('../');
var test = require('tape');
var runTests = require('./tests');
test('as a function', function (t) {
t.test('bad array/this value', function (st) {
st['throws'](function () { assign(undefined); }, TypeError, 'undefined is not an object');
st['throws'](function () { assign(null); }, TypeError, 'null is not an object');
st.end();
});
runTests(assign, t);
t.end();
});
@@ -0,0 +1,11 @@
'use strict';
var stringify = require('./stringify');
var parse = require('./parse');
var formats = require('./formats');
module.exports = {
formats: formats,
parse: parse,
stringify: stringify
};
@@ -0,0 +1,5 @@
import { useLayoutEffect } from 'react';
var index = useLayoutEffect ;
export { index as default };
@@ -0,0 +1,6 @@
export { closestCenter, closestCorners, rectIntersection, getFirstCollision, pointerWithin, } from './algorithms';
export type { Collision, CollisionDescriptor, CollisionDetection, } from './algorithms';
export { defaultCoordinates, distanceBetween, getRelativeTransformOrigin, } from './coordinates';
export { Rect, adjustScale, getAdjustedRect, getClientRect, getTransformAgnosticClientRect, getWindowClientRect, getRectDelta, } from './rect';
export { noop } from './other';
export { getFirstScrollableAncestor, getScrollableAncestors, getScrollableElement, getScrollCoordinates, getScrollDirectionAndSpeed, getScrollElementRect, getScrollOffsets, getScrollPosition, isDocumentScrollingElement, } from './scroll';
@@ -0,0 +1 @@
{"version":3,"file":"mapCoseAlgToWebCryptoAlg.d.ts","sourceRoot":"","sources":["../../../../src/helpers/iso/isoCrypto/mapCoseAlgToWebCryptoAlg.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,OAAO,GAAG,eAAe,CAetE"}
@@ -0,0 +1 @@
module.exports={C:{"115":0.0751,"125":0.00536,"136":0.00536,"140":0.01073,"141":0.00536,"142":0.02682,"143":0.52567,"144":0.27893,_:"2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 116 117 118 119 120 121 122 123 124 126 127 128 129 130 131 132 133 134 135 137 138 139 145 146 147 3.5 3.6"},D:{"39":0.02146,"40":0.02146,"41":0.01609,"42":0.02146,"43":0.02146,"44":0.02146,"45":0.02146,"46":0.02146,"47":0.02146,"48":0.01609,"49":0.02146,"50":0.01609,"51":0.01609,"52":0.01609,"53":0.02146,"54":0.01609,"55":0.02146,"56":0.02146,"57":0.01609,"58":0.02146,"59":0.01609,"60":0.01609,"66":0.00536,"69":0.00536,"70":0.01073,"73":0.03755,"76":0.01073,"79":0.00536,"83":0.03218,"87":0.01609,"90":0.00536,"91":0.02146,"93":0.02146,"95":0.00536,"98":0.01609,"99":0.01073,"100":0.00536,"101":0.00536,"103":0.11264,"105":0.00536,"106":0.00536,"108":0.01073,"109":0.16628,"111":0.01073,"112":2.16706,"113":0.01609,"114":0.01073,"115":0.01073,"116":0.04828,"118":0.00536,"119":0.00536,"120":0.059,"122":0.01073,"123":0.00536,"125":19.22994,"126":0.28966,"127":0.00536,"128":0.08582,"129":0.00536,"130":0.03755,"131":0.02146,"132":0.09655,"133":0.02146,"134":0.02146,"135":0.02146,"136":0.04828,"137":0.58468,"138":0.24138,"139":0.3272,"140":4.66668,"141":9.76784,"142":0.08046,"143":0.01073,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 61 62 63 64 65 67 68 71 72 74 75 77 78 80 81 84 85 86 88 89 92 94 96 97 102 104 107 110 117 121 124 144 145"},F:{"75":0.00536,"90":0.00536,"91":0.01073,"92":0.01073,"95":0.01073,"120":0.08582,"121":0.06437,"122":0.5954,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 60 62 63 64 65 66 67 68 69 70 71 72 73 74 76 77 78 79 80 81 82 83 84 85 86 87 88 89 93 94 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"15":0.00536,"18":0.00536,"92":0.01073,"109":0.00536,"114":0.50422,"116":0.00536,"118":0.02682,"131":0.00536,"134":0.01073,"135":0.00536,"136":0.00536,"137":0.00536,"138":0.02146,"139":0.03218,"140":0.92797,"141":3.96936,"142":0.01609,_:"12 13 14 16 17 79 80 81 83 84 85 86 87 88 89 90 91 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 110 111 112 113 115 117 119 120 121 122 123 124 125 126 127 128 129 130 132 133"},E:{_:"0 4 5 6 7 8 9 10 11 12 13 14 15 3.1 3.2 5.1 6.1 7.1 9.1 10.1 12.1 15.1 15.2-15.3 15.4 15.5 16.0 16.2 16.5 26.2","11.1":0.00536,"13.1":0.00536,"14.1":0.02146,"15.6":0.09655,"16.1":0.00536,"16.3":0.00536,"16.4":0.00536,"16.6":0.09655,"17.0":0.00536,"17.1":0.06437,"17.2":0.00536,"17.3":0.01609,"17.4":0.00536,"17.5":0.01609,"17.6":0.17701,"18.0":0.02146,"18.1":0.03218,"18.2":0.01609,"18.3":0.08582,"18.4":0.02146,"18.5-18.6":0.15556,"26.0":0.72414,"26.1":0.02146},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00137,"5.0-5.1":0,"6.0-6.1":0.00549,"7.0-7.1":0.00412,"8.1-8.4":0,"9.0-9.2":0,"9.3":0.01236,"10.0-10.2":0.00137,"10.3":0.02334,"11.0-11.2":0.346,"11.3-11.4":0.00824,"12.0-12.1":0.00275,"12.2-12.5":0.06728,"13.0-13.1":0,"13.2":0.00687,"13.3":0.00275,"13.4-13.7":0.01098,"14.0-14.4":0.02334,"14.5-14.8":0.02471,"15.0-15.1":0.02334,"15.2-15.3":0.01785,"15.4":0.0206,"15.5":0.02334,"15.6-15.8":0.30481,"16.0":0.04119,"16.1":0.07689,"16.2":0.03982,"16.3":0.0714,"16.4":0.01785,"16.5":0.03158,"16.6-16.7":0.40779,"17.0":0.02883,"17.1":0.04394,"17.2":0.03158,"17.3":0.04668,"17.4":0.08238,"17.5":0.14142,"17.6-17.7":0.35698,"18.0":0.08101,"18.1":0.16751,"18.2":0.09062,"18.3":0.29108,"18.4":0.14966,"18.5-18.6":7.63122,"26.0":0.94326,"26.1":0.03433},P:{"4":0.05314,"20":0.02126,"21":0.01063,"22":0.01063,"23":0.05314,"24":0.13816,"25":0.08502,"26":0.06377,"27":0.05314,"28":2.72068,"29":0.10628,_:"5.0-5.4 6.2-6.4 8.2 9.2 10.1 11.1-11.2 12.0 13.0 14.0 15.0 17.0 18.0 19.0","7.2-7.4":0.07439,"16.0":0.03188},I:{"0":0.03241,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0.00001,"4.4":0,"4.4.3-4.4.4":0.00002},K:{"0":0.15302,_:"10 11 12 11.1 11.5 12.1"},A:{_:"6 7 8 9 10 11 5.5"},S:{_:"2.5 3.0-3.1"},J:{_:"7 10"},N:{_:"10 11"},R:{_:"0"},M:{"0":0.21794},Q:{_:"14.9"},O:{"0":0.07419},H:{"0":0},L:{"0":32.71082}};
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_non_iterable_rest.cjs",
"module": "../../esm/_non_iterable_rest.js"
}
@@ -0,0 +1,311 @@
# compression
[![NPM Version][npm-image]][npm-url]
[![NPM Downloads][downloads-image]][downloads-url]
[![Build Status][github-actions-ci-image]][github-actions-ci-url]
[![OpenSSF Scorecard Badge][ossf-scorecard-badge]][ossf-scorecard-visualizer]
[![Funding][funding-image]][funding-url]
Node.js compression middleware.
The following compression codings are supported:
- deflate
- gzip
- br (brotli)
**Note** Brotli is supported only since Node.js versions v11.7.0 and v10.16.0.
## Install
This is a [Node.js](https://nodejs.org/en/) module available through the
[npm registry](https://www.npmjs.com/). Installation is done using the
[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally):
```bash
$ npm install compression
```
## API
```js
var compression = require('compression')
```
### compression([options])
Returns the compression middleware using the given `options`. The middleware
will attempt to compress response bodies for all requests that traverse through
the middleware, based on the given `options`.
This middleware will never compress responses that include a `Cache-Control`
header with the [`no-transform` directive](https://tools.ietf.org/html/rfc7234#section-5.2.2.4),
as compressing will transform the body.
#### Options
`compression()` accepts these properties in the options object. In addition to
those listed below, [zlib](https://nodejs.org/api/zlib.html) options may be
passed in to the options object or
[brotli](https://nodejs.org/api/zlib.html#zlib_class_brotlioptions) options.
##### chunkSize
Type: `Number`<br>
Default: `zlib.constants.Z_DEFAULT_CHUNK`, or `16384`.
See [Node.js documentation](https://nodejs.org/api/zlib.html#zlib_memory_usage_tuning)
regarding the usage.
##### filter
Type: `Function`
A function to decide if the response should be considered for compression.
This function is called as `filter(req, res)` and is expected to return
`true` to consider the response for compression, or `false` to not compress
the response.
The default filter function uses the [compressible](https://www.npmjs.com/package/compressible)
module to determine if `res.getHeader('Content-Type')` is compressible.
##### level
Type: `Number`<br>
Default: `zlib.constants.Z_DEFAULT_COMPRESSION`, or `-1`
The level of zlib compression to apply to responses. A higher level will result
in better compression, but will take longer to complete. A lower level will
result in less compression, but will be much faster.
This is an integer in the range of `0` (no compression) to `9` (maximum
compression). The special value `-1` can be used to mean the "default
compression level", which is a default compromise between speed and
compression (currently equivalent to level 6).
- `-1` Default compression level (also `zlib.constants.Z_DEFAULT_COMPRESSION`).
- `0` No compression (also `zlib.constants.Z_NO_COMPRESSION`).
- `1` Fastest compression (also `zlib.constants.Z_BEST_SPEED`).
- `2`
- `3`
- `4`
- `5`
- `6` (currently what `zlib.constants.Z_DEFAULT_COMPRESSION` points to).
- `7`
- `8`
- `9` Best compression (also `zlib.constants.Z_BEST_COMPRESSION`).
**Note** in the list above, `zlib` is from `zlib = require('zlib')`.
##### memLevel
Type: `Number`<br>
Default: `zlib.constants.Z_DEFAULT_MEMLEVEL`, or `8`
This specifies how much memory should be allocated for the internal compression
state and is an integer in the range of `1` (minimum level) and `9` (maximum
level).
See [Node.js documentation](https://nodejs.org/api/zlib.html#zlib_memory_usage_tuning)
regarding the usage.
##### brotli
Type: `Object`
This specifies the options for configuring Brotli. See [Node.js documentation](https://nodejs.org/api/zlib.html#class-brotlioptions) for a complete list of available options.
##### strategy
Type: `Number`<br>
Default: `zlib.constants.Z_DEFAULT_STRATEGY`
This is used to tune the compression algorithm. This value only affects the
compression ratio, not the correctness of the compressed output, even if it
is not set appropriately.
- `zlib.constants.Z_DEFAULT_STRATEGY` Use for normal data.
- `zlib.constants.Z_FILTERED` Use for data produced by a filter (or predictor).
Filtered data consists mostly of small values with a somewhat random
distribution. In this case, the compression algorithm is tuned to
compress them better. The effect is to force more Huffman coding and less
string matching; it is somewhat intermediate between `zlib.constants.Z_DEFAULT_STRATEGY`
and `zlib.constants.Z_HUFFMAN_ONLY`.
- `zlib.constants.Z_FIXED` Use to prevent the use of dynamic Huffman codes, allowing
for a simpler decoder for special applications.
- `zlib.constants.Z_HUFFMAN_ONLY` Use to force Huffman encoding only (no string match).
- `zlib.constants.Z_RLE` Use to limit match distances to one (run-length encoding).
This is designed to be almost as fast as `zlib.constants.Z_HUFFMAN_ONLY`, but give
better compression for PNG image data.
**Note** in the list above, `zlib` is from `zlib = require('zlib')`.
##### threshold
Type: `Number` or `String`<br>
Default: `1kb`
The byte threshold for the response body size before compression is considered
for the response. This is a number of bytes or any string
accepted by the [bytes](https://www.npmjs.com/package/bytes) module.
**Note** this is only an advisory setting; if the response size cannot be determined
at the time the response headers are written, then it is assumed the response is
_over_ the threshold. To guarantee the response size can be determined, be sure
set a `Content-Length` response header.
##### windowBits
Type: `Number`<br>
Default: `zlib.constants.Z_DEFAULT_WINDOWBITS`, or `15`
See [Node.js documentation](https://nodejs.org/api/zlib.html#zlib_memory_usage_tuning)
regarding the usage.
##### enforceEncoding
Type: `String`<br>
Default: `identity`
This is the default encoding to use when the client does not specify an encoding in the request's [Accept-Encoding](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Encoding) header.
#### .filter
The default `filter` function. This is used to construct a custom filter
function that is an extension of the default function.
```js
var compression = require('compression')
var express = require('express')
var app = express()
app.use(compression({ filter: shouldCompress }))
function shouldCompress (req, res) {
if (req.headers['x-no-compression']) {
// don't compress responses with this request header
return false
}
// fallback to standard filter function
return compression.filter(req, res)
}
```
### res.flush
This module adds a `res.flush()` method to force the partially-compressed
response to be flushed to the client.
## Examples
### express
When using this module with express, simply `app.use` the module as
high as you like. Requests that pass through the middleware will be compressed.
```js
var compression = require('compression')
var express = require('express')
var app = express()
// compress all responses
app.use(compression())
// add all routes
```
### Node.js HTTP server
```js
var compression = require('compression')({ threshold: 0 })
var http = require('http')
function createServer (fn) {
return http.createServer(function (req, res) {
compression(req, res, function (err) {
if (err) {
res.statusCode = err.status || 500
res.end(err.message)
return
}
fn(req, res)
})
})
}
var server = createServer(function (req, res) {
res.setHeader('Content-Type', 'text/plain')
res.end('hello world!')
})
server.listen(3000, () => {
console.log('> Listening at http://localhost:3000')
})
```
### Server-Sent Events
Because of the nature of compression this module does not work out of the box
with server-sent events. To compress content, a window of the output needs to
be buffered up in order to get good compression. Typically when using server-sent
events, there are certain block of data that need to reach the client.
You can achieve this by calling `res.flush()` when you need the data written to
actually make it to the client.
```js
var compression = require('compression')
var express = require('express')
var app = express()
// compress responses
app.use(compression())
// server-sent event stream
app.get('/events', function (req, res) {
res.setHeader('Content-Type', 'text/event-stream')
res.setHeader('Cache-Control', 'no-cache')
// send a ping approx every 2 seconds
var timer = setInterval(function () {
res.write('data: ping\n\n')
// !!! this is the important part
res.flush()
}, 2000)
res.on('close', function () {
clearInterval(timer)
})
})
```
## Contributing
The Express.js project welcomes all constructive contributions. Contributions take many forms,
from code for bug fixes and enhancements, to additions and fixes to documentation, additional
tests, triaging incoming pull requests and issues, and more!
See the [Contributing Guide](https://github.com/expressjs/express/blob/master/Contributing.md) for more technical details on contributing.
## License
[MIT](LICENSE)
[npm-image]: https://badgen.net/npm/v/compression
[npm-url]: https://npmjs.org/package/compression
[downloads-image]: https://badgen.net/npm/dm/compression
[downloads-url]: https://npmcharts.com/compare/compression?minimal=true
[github-actions-ci-image]: https://badgen.net/github/checks/expressjs/compression/master?label=CI
[github-actions-ci-url]: https://github.com/expressjs/compression/actions?query=workflow%3Aci
[ossf-scorecard-badge]: https://api.scorecard.dev/projects/github.com/expressjs/compression/badge
[ossf-scorecard-visualizer]: https://ossf.github.io/scorecard-visualizer/#/projects/github.com/expressjs/compression
[funding-url]: https://opencollective.com/express
[funding-image]: https://badgen.net/badge/icon/sponsor/pink?icon=github&label=Open%20Collective
@@ -0,0 +1,56 @@
// ------------------------------------------------------------------
// ValueGuard
// ------------------------------------------------------------------
import { IsArray, IsDate, IsMap, IsSet, IsObject, IsTypedArray, IsValueType } from '../guard/index.mjs';
// ------------------------------------------------------------------
// Clonable
// ------------------------------------------------------------------
function FromObject(value) {
const Acc = {};
for (const key of Object.getOwnPropertyNames(value)) {
Acc[key] = Clone(value[key]);
}
for (const key of Object.getOwnPropertySymbols(value)) {
Acc[key] = Clone(value[key]);
}
return Acc;
}
function FromArray(value) {
return value.map((element) => Clone(element));
}
function FromTypedArray(value) {
return value.slice();
}
function FromMap(value) {
return new Map(Clone([...value.entries()]));
}
function FromSet(value) {
return new Set(Clone([...value.entries()]));
}
function FromDate(value) {
return new Date(value.toISOString());
}
function FromValue(value) {
return value;
}
// ------------------------------------------------------------------
// Clone
// ------------------------------------------------------------------
/** Returns a clone of the given value */
export function Clone(value) {
if (IsArray(value))
return FromArray(value);
if (IsDate(value))
return FromDate(value);
if (IsTypedArray(value))
return FromTypedArray(value);
if (IsMap(value))
return FromMap(value);
if (IsSet(value))
return FromSet(value);
if (IsObject(value))
return FromObject(value);
if (IsValueType(value))
return FromValue(value);
throw new Error('ValueClone: Unable to clone value');
}
@@ -0,0 +1 @@
{"name":"package-json-from-dist","version":"1.0.1","requiresBuild":false,"files":{"dist/commonjs/index.js":{"checkedAt":1794532126282,"integrity":"sha512-+Ju2pAs/CBhVajO5RpSWohL3H7Qw1LZ8O2xSViWQCaRSuWUZmz+JPgLq+ie5BuRTW9zUiqdtWDaQjFGG+nHrnQ==","mode":420,"size":5017},"dist/esm/index.js":{"checkedAt":1794532126282,"integrity":"sha512-s9x98RlbLOftrje+fLunyp5u9Vw6orxdcu3jFibZW0KJJgIZ5bhxTypF6X4CZ3Zk9af5qiJU+vRX/fzMSdQ7kQ==","mode":420,"size":4572},"dist/commonjs/package.json":{"checkedAt":1794532096496,"integrity":"sha512-bFiTnaWPm3Fik6gyj3o2SbbiQr8jX64ABVoMx5+yeI5Kmd+qQi4M+tvoTg1eM7g29oYn5qQJZUh37cRDuU0ExA==","mode":420,"size":25},"dist/esm/package.json":{"checkedAt":1794532126282,"integrity":"sha512-nTI0IMxjxr7nncxdtfDxj2uOBz2q+P+lRZ4R8t5ZqfXowXjXf6kq/J3dNSYj3sNixi//hZxxovq5Px4hcsSYfw==","mode":420,"size":23},"package.json":{"checkedAt":1794532126282,"integrity":"sha512-M2cM4ZUkMTvpnlkSLRmjt6K24wm/vdoBj3M6X6zz7IeI1ihO3r5peRrKLaZ3Vpohu7DJusiYHEwYzmuGEl/TAA==","mode":420,"size":1690},"dist/commonjs/index.d.ts.map":{"checkedAt":1794532126283,"integrity":"sha512-OYwPfI7laRAamNbULSEqUjUlrJ4fK6vShOtzomgQXqMsYORT7APScTqF8r6gnxIYXzj8o7VqWlxoauueeai1NQ==","mode":420,"size":342},"dist/esm/index.d.ts.map":{"checkedAt":1794532126283,"integrity":"sha512-OYwPfI7laRAamNbULSEqUjUlrJ4fK6vShOtzomgQXqMsYORT7APScTqF8r6gnxIYXzj8o7VqWlxoauueeai1NQ==","mode":420,"size":342},"dist/commonjs/index.js.map":{"checkedAt":1794532126283,"integrity":"sha512-0dAgGo/b/r0gJ9ZmTi8jcRBRxNqb/ZYrMTzbtb2Mcad7p+mPDPj0l3cOyJKrUOgfqLNXVvAmFL2eafnvtZ2EfQ==","mode":420,"size":6769},"dist/esm/index.js.map":{"checkedAt":1794532126283,"integrity":"sha512-XIq/9pwLCPyt76TxtRvgQEEOUeggWrs3LPyJ0OSyLyQT9iniOf6TzZKRG9THByB5rnOE4hFu3s51fta9JYZhJQ==","mode":420,"size":6795},"LICENSE.md":{"checkedAt":1794532126283,"integrity":"sha512-Sc642i1Pr518gmcnFQT9fLgBXyo7zghQM1k+oJWvYWZTIqENXuRIUdJPKfH2GguOU4+0bWkrxa4XOrPib8/H4A==","mode":420,"size":1764},"README.md":{"checkedAt":1794532126283,"integrity":"sha512-+qdDqgmJ7BIHaaAV7QrJ3qu2PKb5zw53M2LRr/nj2yTyU7cx9WYw6Sv8GWdGLver0I7bwLbVWFoPM9XcqMBtwg==","mode":420,"size":3122},"dist/commonjs/index.d.ts":{"checkedAt":1794532126283,"integrity":"sha512-9RLTysei8ZYDYZF9E7BvEifiL9MPVfwQ7x8JZqdrfnOUWDH2KisyfBOtOFYZwait2YkzMMGr63s0nLX8jdSzGg==","mode":420,"size":2996},"dist/esm/index.d.ts":{"checkedAt":1794532126283,"integrity":"sha512-9RLTysei8ZYDYZF9E7BvEifiL9MPVfwQ7x8JZqdrfnOUWDH2KisyfBOtOFYZwait2YkzMMGr63s0nLX8jdSzGg==","mode":420,"size":2996}}}
@@ -0,0 +1,11 @@
import { InversifyContainerErrorKind } from './InversifyContainerErrorKind';
declare const isAppErrorSymbol: unique symbol;
export declare class InversifyContainerError extends Error {
[isAppErrorSymbol]: true;
kind: InversifyContainerErrorKind;
constructor(kind: InversifyContainerErrorKind, message?: string, options?: ErrorOptions);
static is(value: unknown): value is InversifyContainerError;
static isErrorOfKind(value: unknown, kind: InversifyContainerErrorKind): value is InversifyContainerError;
}
export {};
//# sourceMappingURL=InversifyContainerError.d.ts.map
@@ -0,0 +1,43 @@
{
"name": "yocto-queue",
"version": "0.1.0",
"description": "Tiny queue data structure",
"license": "MIT",
"repository": "sindresorhus/yocto-queue",
"funding": "https://github.com/sponsors/sindresorhus",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "https://sindresorhus.com"
},
"engines": {
"node": ">=10"
},
"scripts": {
"test": "xo && ava && tsd"
},
"files": [
"index.js",
"index.d.ts"
],
"keywords": [
"queue",
"data",
"structure",
"algorithm",
"queues",
"queuing",
"list",
"array",
"linkedlist",
"fifo",
"enqueue",
"dequeue",
"data-structure"
],
"devDependencies": {
"ava": "^2.4.0",
"tsd": "^0.13.1",
"xo": "^0.35.0"
}
}
@@ -0,0 +1,48 @@
import LazyWrapper from './_LazyWrapper.js';
import LodashWrapper from './_LodashWrapper.js';
import baseAt from './_baseAt.js';
import flatRest from './_flatRest.js';
import isIndex from './_isIndex.js';
import thru from './thru.js';
/**
* This method is the wrapper version of `_.at`.
*
* @name at
* @memberOf _
* @since 1.0.0
* @category Seq
* @param {...(string|string[])} [paths] The property paths to pick.
* @returns {Object} Returns the new `lodash` wrapper instance.
* @example
*
* var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
*
* _(object).at(['a[0].b.c', 'a[1]']).value();
* // => [3, 4]
*/
var wrapperAt = flatRest(function(paths) {
var length = paths.length,
start = length ? paths[0] : 0,
value = this.__wrapped__,
interceptor = function(object) { return baseAt(object, paths); };
if (length > 1 || this.__actions__.length ||
!(value instanceof LazyWrapper) || !isIndex(start)) {
return this.thru(interceptor);
}
value = value.slice(start, +start + (length ? 1 : 0));
value.__actions__.push({
'func': thru,
'args': [interceptor],
'thisArg': undefined
});
return new LodashWrapper(value, this.__chain__).thru(function(array) {
if (length && !array.length) {
array.push(undefined);
}
return array;
});
});
export default wrapperAt;
@@ -0,0 +1 @@
{"version":3,"sources":["../src/devModeChecks/identityFunctionCheck.ts","../src/devModeChecks/inputStabilityCheck.ts","../src/devModeChecks/setGlobalDevModeChecks.ts","../src/utils.ts","../src/autotrackMemoize/autotracking.ts","../src/autotrackMemoize/tracking.ts","../src/autotrackMemoize/proxy.ts","../src/lruMemoize.ts","../src/autotrackMemoize/autotrackMemoize.ts","../src/weakMapMemoize.ts","../src/createSelectorCreator.ts","../src/createStructuredSelector.ts"],"sourcesContent":["import type { AnyFunction } from '../types'\r\n\r\n/**\r\n * Runs a check to determine if the given result function behaves as an\r\n * identity function. An identity function is one that returns its\r\n * input unchanged, for example, `x => x`. This check helps ensure\r\n * efficient memoization and prevent unnecessary re-renders by encouraging\r\n * proper use of transformation logic in result functions and\r\n * extraction logic in input selectors.\r\n *\r\n * @param resultFunc - The result function to be checked.\r\n * @param inputSelectorsResults - The results of the input selectors.\r\n * @param outputSelectorResult - The result of the output selector.\r\n *\r\n * @see {@link https://reselect.js.org/api/development-only-stability-checks#identityfunctioncheck `identityFunctionCheck`}\r\n *\r\n * @since 5.0.0\r\n * @internal\r\n */\r\nexport const runIdentityFunctionCheck = (\r\n resultFunc: AnyFunction,\r\n inputSelectorsResults: unknown[],\r\n outputSelectorResult: unknown\r\n) => {\r\n if (\r\n inputSelectorsResults.length === 1 &&\r\n inputSelectorsResults[0] === outputSelectorResult\r\n ) {\r\n let isInputSameAsOutput = false\r\n try {\r\n const emptyObject = {}\r\n if (resultFunc(emptyObject) === emptyObject) isInputSameAsOutput = true\r\n } catch {\r\n // Do nothing\r\n }\r\n if (isInputSameAsOutput) {\r\n let stack: string | undefined = undefined\r\n try {\r\n throw new Error()\r\n } catch (e) {\r\n // eslint-disable-next-line @typescript-eslint/no-extra-semi, no-extra-semi\r\n ;({ stack } = e as Error)\r\n }\r\n console.warn(\r\n 'The result function returned its own inputs without modification. e.g' +\r\n '\\n`createSelector([state => state.todos], todos => todos)`' +\r\n '\\nThis could lead to inefficient memoization and unnecessary re-renders.' +\r\n '\\nEnsure transformation logic is in the result function, and extraction logic is in the input selectors.',\r\n { stack }\r\n )\r\n }\r\n }\r\n}\r\n","import type { CreateSelectorOptions, UnknownMemoizer } from '../types'\r\n\r\n/**\r\n * Runs a stability check to ensure the input selector results remain stable\r\n * when provided with the same arguments. This function is designed to detect\r\n * changes in the output of input selectors, which can impact the performance of memoized selectors.\r\n *\r\n * @param inputSelectorResultsObject - An object containing two arrays: `inputSelectorResults` and `inputSelectorResultsCopy`, representing the results of input selectors.\r\n * @param options - Options object consisting of a `memoize` function and a `memoizeOptions` object.\r\n * @param inputSelectorArgs - List of arguments being passed to the input selectors.\r\n *\r\n * @see {@link https://reselect.js.org/api/development-only-stability-checks/#inputstabilitycheck `inputStabilityCheck`}\r\n *\r\n * @since 5.0.0\r\n * @internal\r\n */\r\nexport const runInputStabilityCheck = (\r\n inputSelectorResultsObject: {\r\n inputSelectorResults: unknown[]\r\n inputSelectorResultsCopy: unknown[]\r\n },\r\n options: Required<\r\n Pick<\r\n CreateSelectorOptions<UnknownMemoizer, UnknownMemoizer>,\r\n 'memoize' | 'memoizeOptions'\r\n >\r\n >,\r\n inputSelectorArgs: unknown[] | IArguments\r\n) => {\r\n const { memoize, memoizeOptions } = options\r\n const { inputSelectorResults, inputSelectorResultsCopy } =\r\n inputSelectorResultsObject\r\n const createAnEmptyObject = memoize(() => ({}), ...memoizeOptions)\r\n // if the memoize method thinks the parameters are equal, these *should* be the same reference\r\n const areInputSelectorResultsEqual =\r\n createAnEmptyObject.apply(null, inputSelectorResults) ===\r\n createAnEmptyObject.apply(null, inputSelectorResultsCopy)\r\n if (!areInputSelectorResultsEqual) {\r\n let stack: string | undefined = undefined\r\n try {\r\n throw new Error()\r\n } catch (e) {\r\n // eslint-disable-next-line @typescript-eslint/no-extra-semi, no-extra-semi\r\n ;({ stack } = e as Error)\r\n }\r\n console.warn(\r\n 'An input selector returned a different result when passed same arguments.' +\r\n '\\nThis means your output selector will likely run more frequently than intended.' +\r\n '\\nAvoid returning a new reference inside your input selector, e.g.' +\r\n '\\n`createSelector([state => state.todos.map(todo => todo.id)], todoIds =Line truncated
@@ -0,0 +1 @@
{"mappings":";;AGwCA,2BAA4B,SAAQ,WAAW;IAC7C,+FAA+F;IAC/F,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,mDAAmD;IACnD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,4DAA4D;IAC5D,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B;;;;;OAKG;IACH,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,yEAAyE;IACzE,yBAAyB,CAAC,EAAE,OAAO,CAAA;CACpC;AAED,+BAAgC,SAAQ,UAAU;IAChD,mCAAmC;IACnC,GAAG,CAAC,EAAE,UAAU,OAAO,GAAG,IAAI,CAAC,CAAA;CAChC;AA2BD;IACE,+CAA+C;IAC/C,SAAS,EAAE,OAAO,CAAC;IACnB,6CAA6C;IAC7C,UAAU,EAAE,aAAa,CAAA;CAC1B;AAqED;;;;GAIG;AACH,yBAAyB,KAAK,EAAE,cAAc,GAAG,WAAW,CAgsB3D;ACj1BD,4BAA4B,MAAM,GAAG,gBAAgB,CAAE,SAAQ,YAAY,MAAM,CAAC;IAChF,mDAAmD;IACnD,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB;AAED,6BAA6B,MAAM,GAAG,gBAAgB;IACpD,+CAA+C;IAC/C,UAAU,EAAE,cAAc,MAAM,CAAC,CAAA;CAClC;AAED;;;GAGG;AACH,yBAAyB,MAAM,SAAS,gBAAgB,GAAG,gBAAgB,EAAE,KAAK,EAAE,WAAW,MAAM,CAAC,GAAG,YAAY,MAAM,CAAC,CAkD3H;AEvED,8BAA+B,SAAQ,cAAc;IACnD,sDAAsD;IACtD,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB;AAED;IACE,+CAA+C;IAC/C,aAAa,EAAE,aAAa,CAAA;CAC7B;AAED;;GAEG;AACH,4BAA4B,KAAK,EAAE,aAAa,GAAG,cAAc,CAOhE;AChBD,kCAAkC,CAAC,GAAG,gBAAgB,CAAE,SAAQ,eAAe,CAAC,CAAC,EAAE,iBAAiB;IAClG,wCAAwC;IACxC,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB;AAED,uCAAwC,SAAQ,aAAa;IAC3D,iDAAiD;IACjD,QAAQ,CAAC,EAAE,SAAS,CAAA;CACrB;AAED,+BAAgC,SAAQ,sBAAsB;IAC5D,GAAG,CAAC,EAAE,iBAAiB,gBAAgB,GAAG,IAAI,CAAC,CAAA;CAChD;AAGD,eAAe;AACf,OAAO,IAAI,kBAAkB,MAAM,OAAO,CAAC,qBAAqB,GAAG,IAAI,CAA2D,CAAC;AAWnI;;GAEG;AACH,OAAO,MAAM,mBACX,MAAM,yBAAyB,CAAC,sBAAsB,GAAG,MAAM,aAAa,CAAC,gBAAgB,CAAC,CAc9F,CAAC;AAEH;IACE,uCAAuC;IACvC,cAAc,EAAE,aAAa,CAAA;CAC9B;AAED;;GAEG;AACH,6BAA6B,CAAC,SAAS,gBAAgB,GAAG,gBAAgB,EAAE,KAAK,EAAE,iBAAiB,CAAC,CAAC,EAAE,MAAM,EAAE,UAAU,gBAAgB,GAAG,IAAI,CAAC,GAAG,aAAa,CA8BjK;AAED,iCAAyC,SAAQ,gBAAgB;IAC/D,QAAQ,EAAE,aAAa,aAAa,EAAE,MAAM,CAAC,CAAA;CAC9C;AAED,OAAO,MAAM,WACX,MAAM,yBAAyB,CAAC,uBAAuB,GAAG,MAAM,aAAa,CAAC,gBAAgB,CAAC,CA+E/F,CAAC;AC5KH,wBAAyB,SAAQ,UAAU;IACzC,QAAQ,EAAE,aAAa,aAAa,EAAE,MAAM,CAAC,CAAA;CAC9C;AAED,OAAO,MAAM,WACX,MAAM,yBAAyB,CAAC,cAAc,GAAG,MAAM,aAAa,CAAC,gBAAgB,CAAC,CAyEtF,CAAC;AC9EH,6BAA8B,SAAQ,UAAU;IAC9C,QAAQ,EAAE,SAAS,CAAA;CACpB;AAED,OAAO,MAAM,gBACX,MAAM,yBAAyB,CAAC,mBAAmB,GAAG,MAAM,aAAa,CAAC,gBAAgB,CAAC,CAmC3F,CAAC;AAEH,oCAAoC,EAAC,QAAQ,EAAC,EAAE;IAAC,QAAQ,EAAE,SAAS,CAAA;CAAC,GAAG,IAAI,OAAO,CAOlF;AC7CD,uBAAuB,UAAU,GAAG,SAAS,GAAG,SAAS,CAAC;AAG1D,kCAAkC,CAAC,gBAAgB,OAAO,KAAK,IAAI,CAAC;AACpE;IACE,2CAA2C;IAC3C,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,gDAAgD;IAChD,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB;AAED;IACE,kDAAkD;IAClD,gBAAgB,OAAO,CAAA;CACxB;AAoKD;;;;;;;;;;;;;;;;GAgBG;AACH,uCAAuC,OAAO,CAAC,EAAE,WAAW,GAAG,IAAI,GAAG,MAAM,IAAI,CAa/E;AAQD;;GAEG;AACH,kCAAkC,OAAO,CAExC;AAED,0CAA0C,QAAQ,GAAG,IAAI,CAExD;AAED,uCAAuC,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAG/D;AAED;;GAEG;AACH,0CAA0C,QAAQ,GAAG,IAAI,CAgBxD;AAkCD;;GAEG;AACH,gCAAgC,KAAK,GAAE,iBAAsB,GAAG,kBAAkB,CAQjF;AAED;;GAEG;AACH,wCAAwC,EAAE,EAAE,mBAAmB,EAAE,IAAI,EAAE,aAAa,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,EAAE;IAAC,WAAW,CAAC,EAAE,OAAO,CAAA;CAAC,GAAG,IAAI,CAiB/H;AC9TD;IACE,0DAA0D;IAC1D,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,qFAAqF;IACrF,aAAa,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,KAAK,IAAI,CAAC;IACxC,qFAAqF;IACrF,YAAY,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,KAAK,IAAI,CAAC;IACvC,sEAAsE;IACtE,mBAAmB,CAAC,EAAE,CAAC,aAAa,EAAE,OAAO,KAAK,IAAI,CAAA;CACvD;AAED;IACE,+CAA+C;IAC/C,gBAAgB,EAAE,aAAa,CAAA;CAChC;AAED;;GAEG;AACH,+BAA+B,KAAK,EAAE,gBAAgB,GAAG,iBAAiB,CA0FzE;AC9GD,2BAA4B,SAAQ,WAAW;IAC7C,mDAAmD;IACnD,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB;AAED;IACE,6CAA6C;IAC7C,UAAU,EAAE,aAAa,CAAC;IAC1B,SAAS,EAAE,OAAO,CAAA;CACnB;AAsDD;;;GAGG;AACH,yBAAyB,KAAK,EAAE,UAAU,GAAG,WAAW,CAqIvD;ACxMD;IACE,GAAG,EAAE,UAAU,OAAO,GAAG,IAAI,CAAC,CAAC;IAC/B,iBAAiB,CAAC,EAAE,CAAC,CAAC,EAAE,YAAY,KAAK,IAAI,CAAC;IAC9C,sBAAsB,CAAC,EAAE,CAAC,CAAC,EAAE,YAAY,KAAK,IAAI,CAAC;IACnD,8DAA8D;IAC9D,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB;AAED;;;GAGG;AACH,mCAAmC,KAAK,EAAE,oBAAoB,GAAG,IAAI,CAiFpE;ACjGD;IACE,6CAA6C;IAC7C,SAAS,EAAE,aAAa,CAAA;CACzB;AASD;;;;GAIG;AACH,wBAAwB,KAAK,EAAE,UAAU,GAAG,UAAU,CAoMrD;ACtND,iCAAkC,SAAQ,YAAY;IACpD,sDAAsD;IACtD,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB;AAGD,+BAA+B,KAAK,EAAE,gBAAgB,EAAE,GAAG,EAAE,UAAU,WAAW,GAAG,IAAI,CAAC,GAAG,IAAI,CAkBhG;ACvBD;IACE,oDAAoD;IACpD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,mEAAmE;IACnE,gBAAgB,CAAC,EAAE,CAAC,CAAC,EAAE,cAAc,KAAK,IAAI,CAAC;IAC/C;;;OAGG;IACH,cAAc,CAAC,EAAE,CAAC,CAAC,EAAE,cAAc,KAAK,IAAI,CAAC;IAC7C;;;OAGG;IACH,WAAW,CAAC,EAAE,CAAC,CAAC,EAAE,cAAc,KAAK,IAAI,CAAC;IAC1C;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,wBAAwB,CAAC,EAAE,MAAM,CAAA;CAClC;AAED;IACE,6CAA6C;IAC7C,cAAc,EAAE,aAAa,CAAA;CAC9B;AAID;;;GAGG;AACH,6BAA6B,KAAK,EAAE,cAAc,GAAG,eAAe,CA+EnE;ACjHD;;;GAGG;AACH,4BAA4B,OAAO,EAAE,gBAAgB,GAAG,IAAI,CAmB3D;ACFD,YAAY,EAAC,UAAU,EAAE,WAAW,EAAE,cAAc,EAAE,aAAa,EAAE,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW,EAAE,cAAc,EAAC,MAAM,qBAAqB,CAAC","sources":["packages/@react-aria/interactions/src/packages/@react-aria/interactions/src/utils.ts","packages/@react-aria/interactions/src/packages/@react-aria/interactions/src/textSelection.ts","packages/@react-aria/interactions/src/packages/@react-aria/interactions/src/context.ts","packages/@react-aria/interactions/src/packages/@react-aria/interactions/src/usePress.Line truncated
@@ -0,0 +1,38 @@
var copyObject = require('./_copyObject'),
createAssigner = require('./_createAssigner'),
keysIn = require('./keysIn');
/**
* This method is like `_.assignIn` except that it accepts `customizer`
* which is invoked to produce the assigned values. If `customizer` returns
* `undefined`, assignment is handled by the method instead. The `customizer`
* is invoked with five arguments: (objValue, srcValue, key, object, source).
*
* **Note:** This method mutates `object`.
*
* @static
* @memberOf _
* @since 4.0.0
* @alias extendWith
* @category Object
* @param {Object} object The destination object.
* @param {...Object} sources The source objects.
* @param {Function} [customizer] The function to customize assigned values.
* @returns {Object} Returns `object`.
* @see _.assignWith
* @example
*
* function customizer(objValue, srcValue) {
* return _.isUndefined(objValue) ? srcValue : objValue;
* }
*
* var defaults = _.partialRight(_.assignInWith, customizer);
*
* defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
* // => { 'a': 1, 'b': 2 }
*/
var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {
copyObject(source, keysIn(source), object, customizer);
});
module.exports = assignInWith;
@@ -0,0 +1 @@
{"name":"@xterm/addon-fit","version":"0.10.0","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532110971,"integrity":"sha512-29Leis/MqqlRb5XzqtWv8SQzEO3dYgk7TmC+pxdPSNH1H8/1R668rlJSbGaKvQak3vcz5PLmrpVQndoU838PNA==","mode":420,"size":1103},"lib/addon-fit.js":{"checkedAt":1794532110971,"integrity":"sha512-LBWytvXspJxWcb8mM1/rSzbm+VexvZCAHA4tPAmUMYYjA0s0BBeukpi+AdxM7oGAGDR8QfYcNjSkB6OOI5ZL9w==","mode":420,"size":1497},"package.json":{"checkedAt":1794532110971,"integrity":"sha512-B8TeM4Wm8SalV7CnvJX7K34UF1IF+wcieMNP3Z9O89ycGpmg84s2Xtuva01Vi/dITueejHzpmhSQWaOy8QLWBA==","mode":420,"size":632},"lib/addon-fit.js.map":{"checkedAt":1794532110971,"integrity":"sha512-EOJ8288CTKyCWxBzn64wYbPwOz4F5pFr2ILUFVvQ+gRE1TODN9CZFp7fMKMdx4aaIlZ3FzgJFDv4nGEuNywkUg==","mode":420,"size":5477},"README.md":{"checkedAt":1794532110972,"integrity":"sha512-ZgifleWVq1iuKkoWPp5nLC5OYxAUWZ7Ne8zEhm7z0mxgwkiYICEwjA1t1XDfemlHFbJHcpVOSGYMGOZUoiNh+Q==","mode":420,"size":638},"typings/addon-fit.d.ts":{"checkedAt":1794532110973,"integrity":"sha512-2/5evIkZOe57iwRpzzv4NOadZgIBfPczvO+22vVR/FUgewykCxLjzmGUsfhHyjB5cqfeotYGcfBfqYvi030e1Q==","mode":420,"size":1184},"src/FitAddon.ts":{"checkedAt":1794532110973,"integrity":"sha512-HCeNUBU46iZL00UWOwA9IftQsRI/I6qn9A5kW4Qx+VSSsNrTRPGAB6d6jPwfTyXCjf5R/DSV7KBk7JBkWXWruA==","mode":420,"size":2985}}}
@@ -0,0 +1 @@
exports._default = require("./react-textarea-autosize.cjs.js").default;
@@ -0,0 +1,33 @@
var baseFlatten = require('./_baseFlatten'),
toInteger = require('./toInteger');
/**
* Recursively flatten `array` up to `depth` times.
*
* @static
* @memberOf _
* @since 4.4.0
* @category Array
* @param {Array} array The array to flatten.
* @param {number} [depth=1] The maximum recursion depth.
* @returns {Array} Returns the new flattened array.
* @example
*
* var array = [1, [2, [3, [4]], 5]];
*
* _.flattenDepth(array, 1);
* // => [1, 2, [3, [4]], 5]
*
* _.flattenDepth(array, 2);
* // => [1, 2, 3, [4], 5]
*/
function flattenDepth(array, depth) {
var length = array == null ? 0 : array.length;
if (!length) {
return [];
}
depth = depth === undefined ? 1 : toInteger(depth);
return baseFlatten(array, depth);
}
module.exports = flattenDepth;
@@ -0,0 +1 @@
{"name":"is-glob","version":"3.1.0","requiresBuild":false,"files":{"package.json":{"checkedAt":1794532122878,"integrity":"sha512-8tjZzkT8wDyck/JZz3LFxHx/ECFiw+7AbtchEkGdx9Ove45PKvyBrAzN9sdGeHGlcmM+8DGwzseJlpcq3MWLFg==","mode":420,"size":1739},"README.md":{"checkedAt":1794532122878,"integrity":"sha512-ZaWnSo3uxPa2hU561o69e0KNuNBK3XovWtLD82/5UGa2sVS8C7szgescw5szNM+3lkqjkoPinA1ds8nG0k7wTw==","mode":420,"size":5219},"LICENSE":{"checkedAt":1794532122878,"integrity":"sha512-CnFEd+zu5cIdcJwcKPQ82LYbZN4zpDGBC4DxyXXSoxyA6Nq6K9d6CCYXQdosU9Fq96xELj21N/ZtmeEGcqlDPw==","mode":420,"size":1088},"index.js":{"checkedAt":1794532122878,"integrity":"sha512-sEwsrL/u3tWxBo9OmwkBRWa/XRB6sNNDBRFykqGmohISPfCyyWBeLpW6H7EylpRHoEWxRO4h3uK+sP7LpqvnVg==","mode":420,"size":547}}}
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F A B wC"},B:{"1":"0 1 2 3 4 5 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","2":"C L M G N O"},C:{"1":"0 1 2 3 4 5 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","2":"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 0C 1C"},D:{"1":"0 1 2 3 4 5 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","2":"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"},E:{"1":"C L M G 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","2":"J ZB K D E F A B 2C ZC 3C 4C 5C 6C aC"},F:{"1":"0 1 2 3 4 5 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","2":"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 FD GD HD ID NC uC JD OC"},G:{"1":"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","2":"E ZC KD vC LD MD ND OD PD QD RD SD TD"},H:{"2":"hD"},I:{"1":"I","2":"TC J iD jD kD lD vC mD nD"},J:{"2":"D A"},K:{"1":"H","2":"A B C NC uC OC"},L:{"1":"I"},M:{"1":"MC"},N:{"2":"A B"},O:{"1":"PC"},P:{"1":"6 7 8 9 AB BB CB DB EB FB rD sD aC tD uD vD wD xD QC RC SC yD","2":"J oD pD qD"},Q:{"1":"zD"},R:{"1":"0D"},S:{"1":"2D","2":"1D"}},B:6,C:"Promise.prototype.finally",D:true};
@@ -0,0 +1,31 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.joinPathSegments = exports.replacePathSegmentSeparator = exports.isAppliedFilter = exports.isFatalError = void 0;
function isFatalError(settings, error) {
if (settings.errorFilter === null) {
return true;
}
return !settings.errorFilter(error);
}
exports.isFatalError = isFatalError;
function isAppliedFilter(filter, value) {
return filter === null || filter(value);
}
exports.isAppliedFilter = isAppliedFilter;
function replacePathSegmentSeparator(filepath, separator) {
return filepath.split(/[/\\]/).join(separator);
}
exports.replacePathSegmentSeparator = replacePathSegmentSeparator;
function joinPathSegments(a, b, separator) {
if (a === '') {
return b;
}
/**
* The correct handling of cases when the first segment is a root (`/`, `C:/`) or UNC path (`//?/C:/`).
*/
if (a.endsWith(separator)) {
return a + b;
}
return a + separator + b;
}
exports.joinPathSegments = joinPathSegments;
@@ -0,0 +1,14 @@
/**
* Figure out the alignment of a GFM table.
*
* @param {Readonly<Array<Event>>} events
* List of events.
* @param {number} index
* Table enter event.
* @returns {Array<Align>}
* List of aligns.
*/
export function gfmTableAlign(events: Readonly<Array<Event>>, index: number): Array<Align>;
export type Align = "center" | "left" | "none" | "right";
import type { Event } from 'micromark-util-types';
//# sourceMappingURL=infer.d.ts.map
@@ -0,0 +1,25 @@
// src/close-filled.tsx
import { jsx } from "react/jsx-runtime";
var CloseFilledIcon = (props) => /* @__PURE__ */ jsx(
"svg",
{
"aria-hidden": "true",
focusable: "false",
height: "1em",
role: "presentation",
viewBox: "0 0 24 24",
width: "1em",
...props,
children: /* @__PURE__ */ jsx(
"path",
{
d: "M12 2a10 10 0 1010 10A10.016 10.016 0 0012 2zm3.36 12.3a.754.754 0 010 1.06.748.748 0 01-1.06 0l-2.3-2.3-2.3 2.3a.748.748 0 01-1.06 0 .754.754 0 010-1.06l2.3-2.3-2.3-2.3A.75.75 0 019.7 8.64l2.3 2.3 2.3-2.3a.75.75 0 011.06 1.06l-2.3 2.3z",
fill: "currentColor"
}
)
}
);
export {
CloseFilledIcon
};
@@ -0,0 +1,92 @@
import type { CreateNodeContext } from '../doc/createNode';
import type { Node } from '../nodes/Node';
import type { Scalar } from '../nodes/Scalar';
import type { YAMLMap } from '../nodes/YAMLMap';
import type { YAMLSeq } from '../nodes/YAMLSeq';
import type { ParseOptions } from '../options';
import type { StringifyContext } from '../stringify/stringify';
import type { Schema } from './Schema';
interface TagBase {
/**
* An optional factory function, used e.g. by collections when wrapping JS objects as AST nodes.
*/
createNode?: (schema: Schema, value: unknown, ctx: CreateNodeContext) => Node;
/**
* If `true`, allows for values to be stringified without
* an explicit tag together with `test`.
* If `'key'`, this only applies if the value is used as a mapping key.
* For most cases, it's unlikely that you'll actually want to use this,
* even if you first think you do.
*/
default?: boolean | 'key';
/**
* If a tag has multiple forms that should be parsed and/or stringified
* differently, use `format` to identify them.
*/
format?: string;
/**
* Used by `YAML.createNode` to detect your data type, e.g. using `typeof` or
* `instanceof`.
*/
identify?: (value: unknown) => boolean;
/**
* The identifier for your data type, with which its stringified form will be
* prefixed. Should either be a !-prefixed local `!tag`, or a fully qualified
* `tag:domain,date:foo`.
*/
tag: string;
}
export interface ScalarTag extends TagBase {
collection?: never;
nodeClass?: never;
/**
* Turns a value into an AST node.
* If returning a non-`Node` value, the output will be wrapped as a `Scalar`.
*/
resolve(value: string, onError: (message: string) => void, options: ParseOptions): unknown;
/**
* Optional function stringifying a Scalar node. If your data includes a
* suitable `.toString()` method, you can probably leave this undefined and
* use the default stringifier.
*
* @param item The node being stringified.
* @param ctx Contains the stringifying context variables.
* @param onComment Callback to signal that the stringifier includes the
* item's comment in its output.
* @param onChompKeep Callback to signal that the output uses a block scalar
* type with the `+` chomping indicator.
*/
stringify?: (item: Scalar, ctx: StringifyContext, onComment?: () => void, onChompKeep?: () => void) => string;
/**
* Together with `default` allows for values to be stringified without an
* explicit tag and detected using a regular expression. For most cases, it's
* unlikely that you'll actually want to use these, even if you first think
* you do.
*/
test?: RegExp;
}
export interface CollectionTag extends TagBase {
stringify?: never;
test?: never;
/** The source collection type supported by this tag. */
collection: 'map' | 'seq';
/**
* The `Node` child class that implements this tag.
* If set, used to select this tag when stringifying.
*
* If the class provides a static `from` method, then that
* will be used if the tag object doesn't have a `createNode` method.
*/
nodeClass?: {
new (schema?: Schema): Node;
from?: (schema: Schema, obj: unknown, ctx: CreateNodeContext) => Node;
};
/**
* Turns a value into an AST node.
* If returning a non-`Node` value, the output will be wrapped as a `Scalar`.
*
* Note: this is required if nodeClass is not provided.
*/
resolve?: (value: YAMLMap.Parsed | YAMLSeq.Parsed, onError: (message: string) => void, options: ParseOptions) => unknown;
}
export {};
@@ -0,0 +1,68 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _onlyOnce = require('./internal/onlyOnce.js');
var _onlyOnce2 = _interopRequireDefault(_onlyOnce);
var _wrapAsync = require('./internal/wrapAsync.js');
var _wrapAsync2 = _interopRequireDefault(_wrapAsync);
var _awaitify = require('./internal/awaitify.js');
var _awaitify2 = _interopRequireDefault(_awaitify);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* The post-check version of [`whilst`]{@link module:ControlFlow.whilst}. To reflect the difference in
* the order of operations, the arguments `test` and `iteratee` are switched.
*
* `doWhilst` is to `whilst` as `do while` is to `while` in plain JavaScript.
*
* @name doWhilst
* @static
* @memberOf module:ControlFlow
* @method
* @see [async.whilst]{@link module:ControlFlow.whilst}
* @category Control Flow
* @param {AsyncFunction} iteratee - A function which is called each time `test`
* passes. Invoked with (callback).
* @param {AsyncFunction} test - asynchronous truth test to perform after each
* execution of `iteratee`. Invoked with (...args, callback), where `...args` are the
* non-error args from the previous callback of `iteratee`.
* @param {Function} [callback] - A callback which is called after the test
* function has failed and repeated execution of `iteratee` has stopped.
* `callback` will be passed an error and any arguments passed to the final
* `iteratee`'s callback. Invoked with (err, [results]);
* @returns {Promise} a promise, if no callback is passed
*/
function doWhilst(iteratee, test, callback) {
callback = (0, _onlyOnce2.default)(callback);
var _fn = (0, _wrapAsync2.default)(iteratee);
var _test = (0, _wrapAsync2.default)(test);
var results;
function next(err, ...args) {
if (err) return callback(err);
if (err === false) return;
results = args;
_test(...args, check);
}
function check(err, truth) {
if (err) return callback(err);
if (err === false) return;
if (!truth) return callback(null, ...results);
_fn(next);
}
return check(null, true);
}
exports.default = (0, _awaitify2.default)(doWhilst, 3);
module.exports = exports.default;
@@ -0,0 +1,83 @@
/**
* @file ttf table校验函数
* @author mengke01(kekee000@gmail.com)
*/
function checkSumArrayBuffer(buffer, offset = 0, length) {
length = length == null ? buffer.byteLength : length;
if (offset + length > buffer.byteLength) {
throw new Error('check sum out of bound');
}
const nLongs = Math.floor(length / 4);
const view = new DataView(buffer, offset, length);
let sum = 0;
let i = 0;
while (i < nLongs) {
sum += view.getUint32(4 * i++, false);
}
let leftBytes = length - nLongs * 4;
if (leftBytes) {
offset = nLongs * 4;
while (leftBytes > 0) {
sum += view.getUint8(offset, false) << (leftBytes * 8);
offset++;
leftBytes--;
}
}
return sum % 0x100000000;
}
function checkSumArray(buffer, offset = 0, length) {
length = length || buffer.length;
if (offset + length > buffer.length) {
throw new Error('check sum out of bound');
}
const nLongs = Math.floor(length / 4);
let sum = 0;
let i = 0;
while (i < nLongs) {
sum += (buffer[i++] << 24)
+ (buffer[i++] << 16)
+ (buffer[i++] << 8)
+ buffer[i++];
}
let leftBytes = length - nLongs * 4;
if (leftBytes) {
offset = nLongs * 4;
while (leftBytes > 0) {
sum += buffer[offset] << (leftBytes * 8);
offset++;
leftBytes--;
}
}
return sum % 0x100000000;
}
/**
* table校验
*
* @param {ArrayBuffer|Array} buffer 表数据
* @param {number=} offset 偏移量
* @param {number=} length 长度
*
* @return {number} 校验和
*/
export default function checkSum(buffer, offset, length) {
if (buffer instanceof ArrayBuffer) {
return checkSumArrayBuffer(buffer, offset, length);
}
else if (buffer instanceof Array) {
return checkSumArray(buffer, offset, length);
}
throw new Error('not support checksum buffer type');
}
@@ -0,0 +1,15 @@
"use strict";
function _class_apply_descriptor_set(receiver, descriptor, value) {
if (descriptor.set) descriptor.set.call(receiver, value);
else {
if (!descriptor.writable) {
// This should only throw in strict mode, but class bodies are
// always strict and private fields can only be used inside
// class bodies.
throw new TypeError("attempted to set read only private field");
}
descriptor.value = value;
}
}
exports._ = _class_apply_descriptor_set;
@@ -0,0 +1,46 @@
/**
* @author Toru Nagashima <https://github.com/mysticatea>
* See LICENSE file in root directory for full license.
*/
"use strict"
const { READ, ReferenceTracker } = require("@eslint-community/eslint-utils")
const { getSourceCode } = require("eslint-compat-utils")
module.exports = {
meta: {
docs: {
description: "disallow the `Number.MAX_SAFE_INTEGER` property.",
category: "ES2015",
recommended: false,
url: "http://eslint-community.github.io/eslint-plugin-es-x/rules/no-number-maxsafeinteger.html",
},
fixable: null,
messages: {
forbidden: "ES2015 '{{name}}' property is forbidden.",
},
schema: [],
type: "problem",
},
create(context) {
return {
"Program:exit"(program) {
const sourceCode = getSourceCode(context)
const tracker = new ReferenceTracker(
sourceCode.getScope(program),
)
for (const { node, path } of tracker.iterateGlobalReferences({
Number: {
MAX_SAFE_INTEGER: { [READ]: true },
},
})) {
context.report({
node,
messageId: "forbidden",
data: { name: path.join(".") },
})
}
},
}
},
}
@@ -0,0 +1,21 @@
/**
* This method returns the first argument it receives.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Util
* @param {*} value Any value.
* @returns {*} Returns `value`.
* @example
*
* var object = { 'a': 1 };
*
* console.log(_.identity(object) === object);
* // => true
*/
function identity(value) {
return value;
}
export default identity;
@@ -0,0 +1 @@
{"version":3,"names":["_setPrototypeOf","require","_inheritsLoose","subClass","superClass","prototype","Object","create","constructor","setPrototypeOf"],"sources":["../../src/helpers/inheritsLoose.ts"],"sourcesContent":["/* @minVersion 7.0.0-beta.0 */\n\nimport setPrototypeOf from \"./setPrototypeOf.ts\";\n\nexport default function _inheritsLoose(\n subClass: Function,\n superClass: Function,\n) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}\n"],"mappings":";;;;;;AAEA,IAAAA,eAAA,GAAAC,OAAA;AAEe,SAASC,cAAcA,CACpCC,QAAkB,EAClBC,UAAoB,EACpB;EACAD,QAAQ,CAACE,SAAS,GAAGC,MAAM,CAACC,MAAM,CAACH,UAAU,CAACC,SAAS,CAAC;EACxDF,QAAQ,CAACE,SAAS,CAACG,WAAW,GAAGL,QAAQ;EACzC,IAAAM,uBAAc,EAACN,QAAQ,EAAEC,UAAU,CAAC;AACtC","ignoreList":[]}
@@ -0,0 +1,188 @@
/**
* @fileoverview Rule to define spacing before/after arrow function's arrow.
* @author Jxck
* @deprecated in ESLint v8.53.0
*/
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const astUtils = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Formatting rules are being moved out of ESLint core.",
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
deprecatedSince: "8.53.0",
availableUntil: "11.0.0",
replacedBy: [
{
message:
"ESLint Stylistic now maintains deprecated stylistic core rules.",
url: "https://eslint.style/guide/migration",
plugin: {
name: "@stylistic/eslint-plugin",
url: "https://eslint.style",
},
rule: {
name: "arrow-spacing",
url: "https://eslint.style/rules/arrow-spacing",
},
},
],
},
type: "layout",
docs: {
description:
"Enforce consistent spacing before and after the arrow in arrow functions",
recommended: false,
url: "https://eslint.org/docs/latest/rules/arrow-spacing",
},
fixable: "whitespace",
schema: [
{
type: "object",
properties: {
before: {
type: "boolean",
default: true,
},
after: {
type: "boolean",
default: true,
},
},
additionalProperties: false,
},
],
messages: {
expectedBefore: "Missing space before =>.",
unexpectedBefore: "Unexpected space before =>.",
expectedAfter: "Missing space after =>.",
unexpectedAfter: "Unexpected space after =>.",
},
},
create(context) {
// merge rules with default
const rule = Object.assign({}, context.options[0]);
rule.before = rule.before !== false;
rule.after = rule.after !== false;
const sourceCode = context.sourceCode;
/**
* Get tokens of arrow(`=>`) and before/after arrow.
* @param {ASTNode} node The arrow function node.
* @returns {Object} Tokens of arrow and before/after arrow.
*/
function getTokens(node) {
const arrow = sourceCode.getTokenBefore(
node.body,
astUtils.isArrowToken,
);
return {
before: sourceCode.getTokenBefore(arrow),
arrow,
after: sourceCode.getTokenAfter(arrow),
};
}
/**
* Count spaces before/after arrow(`=>`) token.
* @param {Object} tokens Tokens before/after arrow.
* @returns {Object} count of space before/after arrow.
*/
function countSpaces(tokens) {
const before = tokens.arrow.range[0] - tokens.before.range[1];
const after = tokens.after.range[0] - tokens.arrow.range[1];
return { before, after };
}
/**
* Determines whether space(s) before after arrow(`=>`) is satisfy rule.
* if before/after value is `true`, there should be space(s).
* if before/after value is `false`, there should be no space.
* @param {ASTNode} node The arrow function node.
* @returns {void}
*/
function spaces(node) {
const tokens = getTokens(node);
const countSpace = countSpaces(tokens);
if (rule.before) {
// should be space(s) before arrow
if (countSpace.before === 0) {
context.report({
node: tokens.before,
messageId: "expectedBefore",
fix(fixer) {
return fixer.insertTextBefore(tokens.arrow, " ");
},
});
}
} else {
// should be no space before arrow
if (countSpace.before > 0) {
context.report({
node: tokens.before,
messageId: "unexpectedBefore",
fix(fixer) {
return fixer.removeRange([
tokens.before.range[1],
tokens.arrow.range[0],
]);
},
});
}
}
if (rule.after) {
// should be space(s) after arrow
if (countSpace.after === 0) {
context.report({
node: tokens.after,
messageId: "expectedAfter",
fix(fixer) {
return fixer.insertTextAfter(tokens.arrow, " ");
},
});
}
} else {
// should be no space after arrow
if (countSpace.after > 0) {
context.report({
node: tokens.after,
messageId: "unexpectedAfter",
fix(fixer) {
return fixer.removeRange([
tokens.arrow.range[1],
tokens.after.range[0],
]);
},
});
}
}
}
return {
ArrowFunctionExpression: spaces,
};
},
};
@@ -0,0 +1,76 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.convertX509PublicKeyToCOSE = convertX509PublicKeyToCOSE;
const asn1_schema_1 = require("@peculiar/asn1-schema");
const asn1_x509_1 = require("@peculiar/asn1-x509");
const asn1_ecc_1 = require("@peculiar/asn1-ecc");
const asn1_rsa_1 = require("@peculiar/asn1-rsa");
const cose_js_1 = require("./cose.js");
const mapX509SignatureAlgToCOSEAlg_js_1 = require("./mapX509SignatureAlgToCOSEAlg.js");
function convertX509PublicKeyToCOSE(x509Certificate) {
let cosePublicKey = new Map();
/**
* Time to extract the public key from an X.509 certificate
*/
const x509 = asn1_schema_1.AsnParser.parse(x509Certificate, asn1_x509_1.Certificate);
const { tbsCertificate } = x509;
const { subjectPublicKeyInfo, signature: _tbsSignature } = tbsCertificate;
const signatureAlgorithm = _tbsSignature.algorithm;
const publicKeyAlgorithmID = subjectPublicKeyInfo.algorithm.algorithm;
if (publicKeyAlgorithmID === asn1_ecc_1.id_ecPublicKey) {
/**
* EC2 Public Key
*/
if (!subjectPublicKeyInfo.algorithm.parameters) {
throw new Error('Certificate public key was missing parameters (EC2)');
}
const ecParameters = asn1_schema_1.AsnParser.parse(new Uint8Array(subjectPublicKeyInfo.algorithm.parameters), asn1_ecc_1.ECParameters);
let crv = -999;
const { namedCurve } = ecParameters;
if (namedCurve === asn1_ecc_1.id_secp256r1) {
crv = cose_js_1.COSECRV.P256;
}
else if (namedCurve === asn1_ecc_1.id_secp384r1) {
crv = cose_js_1.COSECRV.P384;
}
else {
throw new Error(`Certificate public key contained unexpected namedCurve ${namedCurve} (EC2)`);
}
const subjectPublicKey = new Uint8Array(subjectPublicKeyInfo.subjectPublicKey);
let x;
let y;
if (subjectPublicKey[0] === 0x04) {
// Public key is in "uncompressed form", so we can split the remaining bytes in half
let pointer = 1;
const halfLength = (subjectPublicKey.length - 1) / 2;
x = subjectPublicKey.slice(pointer, pointer += halfLength);
y = subjectPublicKey.slice(pointer);
}
else {
throw new Error('TODO: Figure out how to handle public keys in "compressed form"');
}
const coseEC2PubKey = new Map();
coseEC2PubKey.set(cose_js_1.COSEKEYS.kty, cose_js_1.COSEKTY.EC2);
coseEC2PubKey.set(cose_js_1.COSEKEYS.alg, (0, mapX509SignatureAlgToCOSEAlg_js_1.mapX509SignatureAlgToCOSEAlg)(signatureAlgorithm));
coseEC2PubKey.set(cose_js_1.COSEKEYS.crv, crv);
coseEC2PubKey.set(cose_js_1.COSEKEYS.x, x);
coseEC2PubKey.set(cose_js_1.COSEKEYS.y, y);
cosePublicKey = coseEC2PubKey;
}
else if (publicKeyAlgorithmID === asn1_rsa_1.id_rsaEncryption) {
/**
* RSA public key
*/
const rsaPublicKey = asn1_schema_1.AsnParser.parse(subjectPublicKeyInfo.subjectPublicKey, asn1_rsa_1.RSAPublicKey);
const coseRSAPubKey = new Map();
coseRSAPubKey.set(cose_js_1.COSEKEYS.kty, cose_js_1.COSEKTY.RSA);
coseRSAPubKey.set(cose_js_1.COSEKEYS.alg, (0, mapX509SignatureAlgToCOSEAlg_js_1.mapX509SignatureAlgToCOSEAlg)(signatureAlgorithm));
coseRSAPubKey.set(cose_js_1.COSEKEYS.n, new Uint8Array(rsaPublicKey.modulus));
coseRSAPubKey.set(cose_js_1.COSEKEYS.e, new Uint8Array(rsaPublicKey.publicExponent));
cosePublicKey = coseRSAPubKey;
}
else {
throw new Error(`Certificate public key contained unexpected algorithm ID ${publicKeyAlgorithmID}`);
}
return cosePublicKey;
}
@@ -0,0 +1,633 @@
export default `flf2a$ 6 5 18 -1 19
usaflag.flf -- 11/6/94
Figlet conversion by Kent Nassen (kentn@cyberspace.org) based on the
font design by:
Article 2688 of rec.arts.ascii:
Path: news.itd.umich.edu!caen!spool.mu.edu!howland.reston.ans.net!news.sprintlink.net!sashimi.wwa.com!not-for-mail
From: dissel@nunic.nu.edu (David S. Issel)
Newsgroups: rec.arts.ascii,alt.ascii-art
Subject: Line: USA FLAG font
Date: 6 Nov 1994 15:48:01 -0600
Organization: National University
Lines: 72
Sender: boba@wwa.com
Approved: boba@wwa.com
Message-ID: <39jiuh$k12@gagme.wwa.com>
NNTP-Posting-Host: gagme.wwa.com
Xref: news.itd.umich.edu rec.arts.ascii:2688 alt.ascii-art:15738
--------------
$ $@
$ $@
$ $@
$ $@
$ $@
$ $@@
$===@
$===@
$===@
$ @
$===@
$ @@
$== == @
$ == ==@
$ $@
$ $@
$ $@
$ $@@
$ === === @
$=========@
$ === === @
$=========@
$ === === @
$ @@
$ =H=H= @
$==H H @
$ ===== @
$ H H==@
$ =H=H= @
$ @@
$ == ==@
$ ===@
$ === @
$=== @
$== == @
$ @@
$:::== @
$::: == @
$ ===== ==@
$=== === @
$ ===== ==@
$ @@
$ ==@
$== @
$ $@
$ $@
$ $@
$ $@@
$ ===@
$=== @
$=== @
$=== @
$ ===@
$ @@
$=== @
$ ===@
$ ===@
$ ===@
$=== @
$ @@
$ ::: === @
$ ::==== @
$==========@
$ ====== @
$ === === @
$ @@
$ === @
$ === @
$=======@
$ === @
$ === @
$ @@
$ @
$ @
$ @
$ ==@
$ ==@
$== @@
$ $@
$ $@
$========@
$ $@
$ $@
$ $@@
$ $@
$ $@
$ $@
$ $@
$==@
$ $@@
$ ===@
$ === @
$ === @
$ === @
$=== @
$ @@
$:::==== @
$::: ===@
$=== ===@
$=== ===@
$ ====== @
$ @@
$:::@
$:::@
$===@
$===@
$===@
$ @@
$:::==== @
$:: ===@
$ ==== @
$ === @
$========@
$ @@
$:::=== @
$ ===@
$ ===== @
$ ===@
$====== @
$ @@
$::: ===@
$::: ===@
$========@
$ ===@
$ ===@
$ @@
$:::====@
$::: @
$====== @
$ ===@
$====== @
$ @@
$:::==== @
$::: @
$======= @
$=== ===@
$ ====== @
$ @@
$:::=====@
$ ===@
$ === @
$ ==== @
$=== @
$ @@
$:::==== @
$::: ===@
$ ====== @
$=== ===@
$ ====== @
$ @@
$:::==== @
$::: ===@
$ =======@
$ ===@
$ ===== @
$ @@
$ $@
$==@
$ $@
$==@
$ $@
$ $@@
$ $@
$ ==@
$ $@
$ ==@
$ ==@
$==$@@
$ ===@
$ === @
$=== @
$ === @
$ ===@
$ @@
$ $@
$========@
$ $@
$========@
$ $@
$ $@@
$=== @
$ === @
$ ===@
$ === @
$=== @
$ @@
$ ====== @
$== ===@
$ ==== @
$ "" @
$ == @
$ @@
$ ======= @
$=== ===@
$=== =====@
$=== @
$ ======= @
$ @@
$:::==== @
$::: ===@
$========@
$=== ===@
$=== ===@
$ @@
$:::==== @
$::: ===@
$======= @
$=== ===@
$======= @
$ @@
$:::=====@
$::: @
$=== @
$=== @
$ =======@
$ @@
$:::==== @
$::: ===@
$=== ===@
$=== ===@
$======= @
$ @@
$:::=====@
$::: @
$====== @
$=== @
$========@
$ @@
$:::=====@
$::: @
$====== @
$=== @
$=== @
$ @@
$:::===== @
$::: @
$=== =====@
$=== ===@
$ ======= @
$ @@
$::: ===@
$::: ===@
$========@
$=== ===@
$=== ===@
$ @@
$:::@
$:::@
$===@
$===@
$===@
$ @@
$ :::@
$ :::@
$ ===@
$== ===@
$====== @
$ @@
$::: ===@
$::: === @
$====== @
$=== === @
$=== ===@
$ @@
$::: @
$::: @
$=== @
$=== @
$========@
$ @@
$:::======= @
$::: === ===@
$=== === ===@
$=== ===@
$=== ===@
$ @@
$:::= ===@
$:::=====@
$========@
$=== ====@
$=== ===@
$ @@
$:::==== @
$::: ===@
$=== ===@
$=== ===@
$ ====== @
$ @@
$:::==== @
$::: ===@
$======= @
$=== @
$=== @
$ @@
$:::==== @
$::: === @
$=== ==== @
$======== @
$ ==== ===@
$ @@
$:::==== @
$::: ===@
$======= @
$=== === @
$=== ===@
$ @@
$:::=== @
$::: @
$ ===== @
$ ===@
$====== @
$ @@
$:::====@
$:::====@
$ === @
$ === @
$ === @
$ @@
$::: ===@
$::: ===@
$=== ===@
$=== ===@
$ ====== @
$ @@
$::: ===@
$::: ===@
$=== ===@
$ ====== @
$ == @
$ @@
$::: === ===@
$::: === ===@
$=== === ===@
$ =========== @
$ ==== ==== @
$ @@
$::: ===@
$::: ===@
$ ====== @
$ ====== @
$=== ===@
$ @@
$::: ===@
$::: ===@
$ ===== @
$ === @
$ === @
$ @@
$:::=====@
$ ===@
$ === @
$ === @
$========@
$ @@
$=====@
$=== @
$=== @
$=== @
$=====@
$ @@
$=== @
$ === @
$ === @
$ === @
$ ===@
$ @@
$=====@
$ ===@
$ ===@
$ ===@
$=====@
$ @@
$ ==== $@
$=== ===@
$ $@
$ $@
$ $@
$ $@@
$ $@
$ $@
$ $@
$ $@
$ $@
$========@@
$== @
$ ==@
$ $@
$ $@
$ $@
$ $@@
$:::==== @
$::: ===@
$========@
$=== ===@
$=== ===@
$ @@
$:::==== @
$::: ===@
$======= @
$=== ===@
$======= @
$ @@
$:::=====@
$::: @
$=== @
$=== @
$ =======@
$ @@
$:::==== @
$::: ===@
$=== ===@
$=== ===@
$======= @
$ @@
$:::=====@
$::: @
$====== @
$=== @
$========@
$ @@
$:::=====@
$::: @
$====== @
$=== @
$=== @
$ @@
$:::===== @
$::: @
$=== =====@
$=== ===@
$ ======= @
$ @@
$::: ===@
$::: ===@
$========@
$=== ===@
$=== ===@
$ @@
$:::@
$:::@
$===@
$===@
$===@
$ @@
$ :::@
$ :::@
$ ===@
$== ===@
$====== @
$ @@
$::: ===@
$::: === @
$====== @
$=== === @
$=== ===@
$ @@
$::: @
$::: @
$=== @
$=== @
$========@
$ @@
$:::======= @
$::: === ===@
$=== === ===@
$=== ===@
$=== ===@
$ @@
$:::= ===@
$:::=====@
$========@
$=== ====@
$=== ===@
$ @@
$:::==== @
$::: ===@
$=== ===@
$=== ===@
$ ====== @
$ @@
$:::==== @
$::: ===@
$======= @
$=== @
$=== @
$ @@
$:::==== @
$::: === @
$=== ==== @
$======== @
$ ==== ===@
$ @@
$:::==== @
$::: ===@
$======= @
$=== === @
$=== ===@
$ @@
$:::=== @
$::: @
$ ===== @
$ ===@
$====== @
$ @@
$:::====@
$:::====@
$ === @
$ === @
$ === @
$ @@
$::: ===@
$::: ===@
$=== ===@
$=== ===@
$ ====== @
$ @@
$::: ===@
$::: ===@
$=== ===@
$ ====== @
$ == @
$ @@
$::: === ===@
$::: === ===@
$=== === ===@
$ =========== @
$ ==== ==== @
$ @@
$::: ===@
$::: ===@
$ ====== @
$ ====== @
$=== ===@
$ @@
$::: ===@
$::: ===@
$ ===== @
$ === @
$ === @
$ @@
$:::=====@
$ ===@
$ === @
$ === @
$========@
$ @@
$ ===@
$ ===@
$=== @
$ ===@
$ ===@
$ @@
$===@
$===@
$===@
$===@
$===@
$ @@
$=== @
$=== @
$ ===@
$=== @
$=== @
$ @@
$=== ==@
$= ===$@
$ $@
$ $@
$ $@
$ $@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
@
@
@
@
@
@@
`
@@ -0,0 +1,51 @@
import * as tailwind_variants from 'tailwind-variants';
import { VariantProps } from 'tailwind-variants';
import * as tailwind_variants_dist_config from 'tailwind-variants/dist/config';
/**
* Keyboard Key wrapper **Tailwind Variants** component
*
* @example
*
* const { base, abbr, content } = kbd()
*
* <kbd className={base()} >
* <abbr title="Command" className={abbr()}>⌘</abbr>
* <abbr title="Shift" className={abbr()}>⇧</abbr>
* <abbr title="Control" className={abbr()}>⌃</abbr>
* <abbr title="Option" className={abbr()}>⌥</abbr>
* <abbr title="Enter" className={abbr()}>↵</abbr>
* <abbr title="Delete" className={abbr()}>⌫</abbr>
* <abbr title="Escape" className={abbr()}>⎋</abbr>
* <abbr title="Tab" className={abbr()}>⇥</abbr>
* <abbr title="Caps Lock" className={abbr()}>⇪</abbr>
* <abbr title="Up" className={abbr()}>↑</abbr>
* <abbr title="Right" className={abbr()}>→</abbr>
* <abbr title="Down" className={abbr()}>↓</abbr>
* <abbr title="Left" className={abbr()}>←</abbr>
* <abbr title="Page Up" className={abbr()}>⇞</abbr>
* <abbr title="Page Down" className={abbr()}>⇟</abbr>
* <abbr title="Home" className={abbr()}>↖</abbr>
* <abbr title="End" className={abbr()}>↘</abbr>
* <abbr title="Help" className={abbr()}>?</abbr>
* <abbr title="Space" className={abbr()}>␣</abbr>
* <span className={content()}>A</span>
* </kbd>
*/
declare const kbd: tailwind_variants.TVReturnType<{}, {
base: string[];
abbr: string;
content: string;
}, undefined, tailwind_variants_dist_config.TVConfig<{}, {}>, {}, {
base: string[];
abbr: string;
content: string;
}, tailwind_variants.TVReturnType<{}, {
base: string[];
abbr: string;
content: string;
}, undefined, tailwind_variants_dist_config.TVConfig<{}, {}>, unknown, unknown, undefined>>;
type KbdVariantProps = VariantProps<typeof kbd>;
type KbdSlots = keyof ReturnType<typeof kbd>;
export { KbdSlots, KbdVariantProps, kbd };
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_jsx.cjs",
"module": "../../esm/_jsx.js"
}
@@ -0,0 +1,127 @@
/**
* @fileoverview Prevent adjacent inline elements not separated by whitespace.
* @author Sean Hayes
*/
'use strict';
const docsUrl = require('../util/docsUrl');
const isCreateElement = require('../util/isCreateElement');
const report = require('../util/report');
const astUtil = require('../util/ast');
// ------------------------------------------------------------------------------
// Helpers
// ------------------------------------------------------------------------------
// https://developer.mozilla.org/en-US/docs/Web/HTML/Inline_elements
const inlineNames = [
'a',
'b',
'big',
'i',
'small',
'tt',
'abbr',
'acronym',
'cite',
'code',
'dfn',
'em',
'kbd',
'strong',
'samp',
'time',
'var',
'bdo',
'br',
'img',
'map',
'object',
'q',
'script',
'span',
'sub',
'sup',
'button',
'input',
'label',
'select',
'textarea',
];
// Note: raw &nbsp; will be transformed into \u00a0.
const whitespaceRegex = /(?:^\s|\s$)/;
function isInline(node) {
if (node.type === 'Literal') {
// Regular whitespace will be removed.
const value = node.value;
// To properly separate inline elements, each end of the literal will need
// whitespace.
return !whitespaceRegex.test(value);
}
if (node.type === 'JSXElement' && inlineNames.indexOf(node.openingElement.name.name) > -1) {
return true;
}
if (astUtil.isCallExpression(node) && inlineNames.indexOf(node.arguments[0].value) > -1) {
return true;
}
return false;
}
// ------------------------------------------------------------------------------
// Rule Definition
// ------------------------------------------------------------------------------
const messages = {
inlineElement: 'Child elements which render as inline HTML elements should be separated by a space or wrapped in block level elements.',
};
/** @type {import('eslint').Rule.RuleModule} */
module.exports = {
meta: {
docs: {
description: 'Disallow adjacent inline elements not separated by whitespace.',
category: 'Best Practices',
recommended: false,
url: docsUrl('no-adjacent-inline-elements'),
},
schema: [],
messages,
},
create(context) {
function validate(node, children) {
let currentIsInline = false;
let previousIsInline = false;
if (!children) {
return;
}
for (let i = 0; i < children.length; i++) {
currentIsInline = isInline(children[i]);
if (previousIsInline && currentIsInline) {
report(context, messages.inlineElement, 'inlineElement', {
node,
});
return;
}
previousIsInline = currentIsInline;
}
}
return {
JSXElement(node) {
validate(node, node.children);
},
CallExpression(node) {
if (!isCreateElement(context, node)) {
return;
}
if (node.arguments.length < 2 || !node.arguments[2]) {
return;
}
const children = 'elements' in node.arguments[2] ? node.arguments[2].elements : undefined;
validate(node, children);
},
};
},
};
@@ -0,0 +1 @@
exports._default = require("./react-textarea-autosize.edge-light.cjs.js").default;
@@ -0,0 +1,50 @@
'use strict';
var $TypeError = require('es-errors/type');
var Call = require('./Call');
var IsLessThan = require('./IsLessThan');
var ToNumber = require('./ToNumber');
var ToString = require('./ToString');
var isNaN = require('math-intrinsics/isNaN');
// https://262.ecma-international.org/14.0/#sec-comparearrayelements
module.exports = function CompareArrayElements(x, y, compareFn) {
if (typeof compareFn !== 'function' && typeof compareFn !== 'undefined') {
throw new $TypeError('Assertion failed: `compareFn` must be a function or undefined');
}
if (typeof x === 'undefined' && typeof y === 'undefined') {
return 0; // step 1
}
if (typeof x === 'undefined') {
return 1; // step 2
}
if (typeof y === 'undefined') {
return -1; // step 3
}
if (typeof compareFn !== 'undefined') { // step 4
var v = ToNumber(Call(compareFn, void undefined, [x, y])); // step 4.a
if (isNaN(v)) {
return 0; // step 4.b
}
return v; // step 4.c
}
var xString = ToString(x); // step 5
var yString = ToString(y); // step 6
var xSmaller = IsLessThan(xString, yString, true); // step 7
if (xSmaller) {
return -1; // step 8
}
var ySmaller = IsLessThan(yString, xString, true); // step 9
if (ySmaller) {
return 1; // step 10
}
return 0; // step 11
};
@@ -0,0 +1,84 @@
let Declaration = require('../declaration')
let {
getGridGap,
inheritGridGap,
parseGridAreas,
prefixTrackProp,
prefixTrackValue,
warnGridGap,
warnMissedAreas
} = require('./grid-utils')
function getGridRows(tpl) {
return tpl
.trim()
.slice(1, -1)
.split(/["']\s*["']?/g)
}
class GridTemplateAreas extends Declaration {
/**
* Translate grid-template-areas to separate -ms- prefixed properties
*/
insert(decl, prefix, prefixes, result) {
if (prefix !== '-ms-') return super.insert(decl, prefix, prefixes)
let hasColumns = false
let hasRows = false
let parent = decl.parent
let gap = getGridGap(decl)
gap = inheritGridGap(decl, gap) || gap
// remove already prefixed rows
// to prevent doubling prefixes
parent.walkDecls(/-ms-grid-rows/, i => i.remove())
// add empty tracks to rows
parent.walkDecls(/grid-template-(rows|columns)/, trackDecl => {
if (trackDecl.prop === 'grid-template-rows') {
hasRows = true
let { prop, value } = trackDecl
trackDecl.cloneBefore({
prop: prefixTrackProp({ prefix, prop }),
value: prefixTrackValue({ gap: gap.row, value })
})
} else {
hasColumns = true
}
})
let gridRows = getGridRows(decl.value)
if (hasColumns && !hasRows && gap.row && gridRows.length > 1) {
decl.cloneBefore({
prop: '-ms-grid-rows',
raws: {},
value: prefixTrackValue({
gap: gap.row,
value: `repeat(${gridRows.length}, auto)`
})
})
}
// warnings
warnGridGap({
decl,
gap,
hasColumns,
result
})
let areas = parseGridAreas({
gap,
rows: gridRows
})
warnMissedAreas(areas, decl, result)
return decl
}
}
GridTemplateAreas.names = ['grid-template-areas']
module.exports = GridTemplateAreas
@@ -0,0 +1,67 @@
import {filterDOMProps as $5Ot33$filterDOMProps, mergeProps as $5Ot33$mergeProps, useRouter as $5Ot33$useRouter, useLinkProps as $5Ot33$useLinkProps, shouldClientNavigate as $5Ot33$shouldClientNavigate} from "@react-aria/utils";
import {useFocusable as $5Ot33$useFocusable} from "@react-aria/focus";
import {usePress as $5Ot33$usePress} from "@react-aria/interactions";
/*
* 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.
*/
function $298d61e98472621b$export$dcf14c9974fe2767(props, ref) {
let { elementType: elementType = 'a', onPress: onPress, onPressStart: onPressStart, onPressEnd: onPressEnd, // @ts-ignore
onClick: deprecatedOnClick, isDisabled: isDisabled, ...otherProps } = props;
let linkProps = {};
if (elementType !== 'a') linkProps = {
role: 'link',
tabIndex: !isDisabled ? 0 : undefined
};
let { focusableProps: focusableProps } = (0, $5Ot33$useFocusable)(props, ref);
let { pressProps: pressProps, isPressed: isPressed } = (0, $5Ot33$usePress)({
onPress: onPress,
onPressStart: onPressStart,
onPressEnd: onPressEnd,
isDisabled: isDisabled,
ref: ref
});
let domProps = (0, $5Ot33$filterDOMProps)(otherProps, {
labelable: true
});
let interactionHandlers = (0, $5Ot33$mergeProps)(focusableProps, pressProps);
let router = (0, $5Ot33$useRouter)();
let routerLinkProps = (0, $5Ot33$useLinkProps)(props);
return {
isPressed: isPressed,
linkProps: (0, $5Ot33$mergeProps)(domProps, routerLinkProps, {
...interactionHandlers,
...linkProps,
'aria-disabled': isDisabled || undefined,
'aria-current': props['aria-current'],
onClick: (e)=>{
var _pressProps_onClick;
(_pressProps_onClick = pressProps.onClick) === null || _pressProps_onClick === void 0 ? void 0 : _pressProps_onClick.call(pressProps, 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() && (0, $5Ot33$shouldClientNavigate)(e.currentTarget, e) && props.href) {
e.preventDefault();
router.open(e.currentTarget, e, props.href, props.routerOptions);
}
}
})
};
}
export {$298d61e98472621b$export$dcf14c9974fe2767 as useLink};
//# sourceMappingURL=useLink.module.js.map
@@ -0,0 +1,121 @@
'use strict';
/*eslint-disable max-len*/
var YAMLException = require('./exception');
var Type = require('./type');
function compileList(schema, name) {
var result = [];
schema[name].forEach(function (currentType) {
var newIndex = result.length;
result.forEach(function (previousType, previousIndex) {
if (previousType.tag === currentType.tag &&
previousType.kind === currentType.kind &&
previousType.multi === currentType.multi) {
newIndex = previousIndex;
}
});
result[newIndex] = currentType;
});
return result;
}
function compileMap(/* lists... */) {
var result = {
scalar: {},
sequence: {},
mapping: {},
fallback: {},
multi: {
scalar: [],
sequence: [],
mapping: [],
fallback: []
}
}, index, length;
function collectType(type) {
if (type.multi) {
result.multi[type.kind].push(type);
result.multi['fallback'].push(type);
} else {
result[type.kind][type.tag] = result['fallback'][type.tag] = type;
}
}
for (index = 0, length = arguments.length; index < length; index += 1) {
arguments[index].forEach(collectType);
}
return result;
}
function Schema(definition) {
return this.extend(definition);
}
Schema.prototype.extend = function extend(definition) {
var implicit = [];
var explicit = [];
if (definition instanceof Type) {
// Schema.extend(type)
explicit.push(definition);
} else if (Array.isArray(definition)) {
// Schema.extend([ type1, type2, ... ])
explicit = explicit.concat(definition);
} else if (definition && (Array.isArray(definition.implicit) || Array.isArray(definition.explicit))) {
// Schema.extend({ explicit: [ type1, type2, ... ], implicit: [ type1, type2, ... ] })
if (definition.implicit) implicit = implicit.concat(definition.implicit);
if (definition.explicit) explicit = explicit.concat(definition.explicit);
} else {
throw new YAMLException('Schema.extend argument should be a Type, [ Type ], ' +
'or a schema definition ({ implicit: [...], explicit: [...] })');
}
implicit.forEach(function (type) {
if (!(type instanceof Type)) {
throw new YAMLException('Specified list of YAML types (or a single Type object) contains a non-Type object.');
}
if (type.loadKind && type.loadKind !== 'scalar') {
throw new YAMLException('There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.');
}
if (type.multi) {
throw new YAMLException('There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.');
}
});
explicit.forEach(function (type) {
if (!(type instanceof Type)) {
throw new YAMLException('Specified list of YAML types (or a single Type object) contains a non-Type object.');
}
});
var result = Object.create(Schema.prototype);
result.implicit = (this.implicit || []).concat(implicit);
result.explicit = (this.explicit || []).concat(explicit);
result.compiledImplicit = compileList(result, 'implicit');
result.compiledExplicit = compileList(result, 'explicit');
result.compiledTypeMap = compileMap(result.compiledImplicit, result.compiledExplicit);
return result;
};
module.exports = Schema;
@@ -0,0 +1,5 @@
'use strict';
module.exports = function isPrimitive(value) {
return value === null || (typeof value !== 'function' && typeof value !== 'object');
};
@@ -0,0 +1,25 @@
{
"name": "@formatjs/intl-localematcher",
"description": "Intl.LocaleMatcher ponyfill",
"version": "0.6.2",
"license": "MIT",
"author": "Long Ho <holevietlong@gmail.com>",
"types": "index.d.ts",
"dependencies": {
"tslib": "^2.8.0"
},
"bugs": "https://github.com/formatjs/formatjs/issues",
"homepage": "https://github.com/formatjs/formatjs#readme",
"keywords": [
"ecma402",
"formatjs",
"i18n",
"intl",
"locale",
"react-intl",
"tc39"
],
"main": "index.js",
"module": "lib/index.js",
"repository": "formatjs/formatjs.git"
}
@@ -0,0 +1,16 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DeactivationParamsManager = void 0;
const resetDeactivationParams_1 = require("../actions/resetDeactivationParams");
const buildDeactivationParams_1 = require("../calculations/buildDeactivationParams");
class DeactivationParamsManager {
deactivationParams;
constructor(serviceReferenceManager) {
this.deactivationParams = (0, buildDeactivationParams_1.buildDeactivationParams)(serviceReferenceManager);
serviceReferenceManager.onReset(() => {
(0, resetDeactivationParams_1.resetDeactivationParams)(serviceReferenceManager, this.deactivationParams);
});
}
}
exports.DeactivationParamsManager = DeactivationParamsManager;
//# sourceMappingURL=DeactivationParamsManager.js.map
@@ -0,0 +1,8 @@
import { resizeElement } from './handle-element.mjs';
import { resizeWindow } from './handle-window.mjs';
function resize(a, b) {
return typeof a === "function" ? resizeWindow(a) : resizeElement(a, b);
}
export { resize };
@@ -0,0 +1,37 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
/**
* @template T
* @typedef {() => T} FunctionReturning
*/
/**
* @template T
* @param {FunctionReturning<T>} fn memorized function
* @returns {FunctionReturning<T>} new function
*/
const memoize = (fn) => {
let cache = false;
/** @type {T | undefined} */
let result;
return () => {
if (cache) {
return /** @type {T} */ (result);
}
result = fn();
cache = true;
// Allow to clean up memory for fn
// and all dependent resources
/** @type {FunctionReturning<T> | undefined} */
(fn) = undefined;
return /** @type {T} */ (result);
};
};
module.exports = memoize;
@@ -0,0 +1,21 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.injectFromBase = injectFromBase;
const prototype_utils_1 = require("@inversifyjs/prototype-utils");
const InversifyCoreError_1 = require("../../error/models/InversifyCoreError");
const InversifyCoreErrorKind_1 = require("../../error/models/InversifyCoreErrorKind");
const injectFrom_1 = require("./injectFrom");
function injectFromBase(options) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
return (target) => {
const baseType = (0, prototype_utils_1.getBaseType)(target);
if (baseType === undefined) {
throw new InversifyCoreError_1.InversifyCoreError(InversifyCoreErrorKind_1.InversifyCoreErrorKind.injectionDecoratorConflict, `Expected base type for type "${target.name}", none found.`);
}
(0, injectFrom_1.injectFrom)({
...options,
type: baseType,
})(target);
};
}
//# sourceMappingURL=injectFromBase.js.map
@@ -0,0 +1,4 @@
function _taggedTemplateLiteralLoose(e, t) {
return t || (t = e.slice(0)), e.raw = t, e;
}
module.exports = _taggedTemplateLiteralLoose, module.exports.__esModule = true, module.exports["default"] = module.exports;
@@ -0,0 +1,28 @@
'use strict';
var format = require('./format');
var _require = require('triple-beam'),
MESSAGE = _require.MESSAGE;
var jsonStringify = require('safe-stable-stringify');
/*
* function logstash (info)
* Returns a new instance of the LogStash Format that turns a
* log `info` object into pure JSON with the appropriate logstash
* options. This was previously exposed as { logstash: true }
* to transports in `winston < 3.0.0`.
*/
module.exports = format(function (info) {
var logstash = {};
if (info.message) {
logstash['@message'] = info.message;
delete info.message;
}
if (info.timestamp) {
logstash['@timestamp'] = info.timestamp;
delete info.timestamp;
}
logstash['@fields'] = info;
info[MESSAGE] = jsonStringify(logstash);
return info;
});
@@ -0,0 +1,30 @@
import { R as RouteModule } from './instrumentation-iAqbU5Q4.js';
/**
* Apps can use this interface to "register" app-wide types for React Router via interface declaration merging and module augmentation.
* React Router should handle this for you via type generation.
*
* For more on declaration merging and module augmentation, see https://www.typescriptlang.org/docs/handbook/declaration-merging.html#module-augmentation .
*/
interface Register {
}
type AnyParams = Record<string, string | undefined>;
type AnyPages = Record<string, {
params: AnyParams;
}>;
type Pages = Register extends {
pages: infer Registered extends AnyPages;
} ? Registered : AnyPages;
type AnyRouteFiles = Record<string, {
id: string;
page: string;
}>;
type RouteFiles = Register extends {
routeFiles: infer Registered extends AnyRouteFiles;
} ? Registered : AnyRouteFiles;
type AnyRouteModules = Record<string, RouteModule>;
type RouteModules = Register extends {
routeModules: infer Registered extends AnyRouteModules;
} ? Registered : AnyRouteModules;
export type { Pages as P, RouteFiles as R, RouteModules as a, Register as b };
@@ -0,0 +1,7 @@
{
"root": true,
"extends": [
"@satazor/eslint-config/es6",
"@satazor/eslint-config/addons/node"
]
}
@@ -0,0 +1 @@
export { _ as default } from "../esm/_is_native_reflect_construct.js";
@@ -0,0 +1,103 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
'use strict';
var printWarning = function() {};
if (process.env.NODE_ENV !== 'production') {
var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');
var loggedTypeFailures = {};
var has = require('./lib/has');
printWarning = function(text) {
var message = 'Warning: ' + text;
if (typeof console !== 'undefined') {
console.error(message);
}
try {
// --- Welcome to debugging React ---
// This error was thrown as a convenience so that you can use this stack
// to find the callsite that caused this warning to fire.
throw new Error(message);
} catch (x) { /**/ }
};
}
/**
* Assert that the values match with the type specs.
* Error messages are memorized and will only be shown once.
*
* @param {object} typeSpecs Map of name to a ReactPropType
* @param {object} values Runtime values that need to be type-checked
* @param {string} location e.g. "prop", "context", "child context"
* @param {string} componentName Name of the component for error messages.
* @param {?Function} getStack Returns the component stack.
* @private
*/
function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
if (process.env.NODE_ENV !== 'production') {
for (var typeSpecName in typeSpecs) {
if (has(typeSpecs, typeSpecName)) {
var error;
// Prop type validation may throw. In case they do, we don't want to
// fail the render phase where it didn't fail before. So we log it.
// After these have been cleaned up, we'll let them throw.
try {
// This is intentionally an invariant that gets caught. It's the same
// behavior as without this statement except with a better message.
if (typeof typeSpecs[typeSpecName] !== 'function') {
var err = Error(
(componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +
'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'
);
err.name = 'Invariant Violation';
throw err;
}
error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
} catch (ex) {
error = ex;
}
if (error && !(error instanceof Error)) {
printWarning(
(componentName || 'React class') + ': type specification of ' +
location + ' `' + typeSpecName + '` is invalid; the type checker ' +
'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
'You may have forgotten to pass an argument to the type checker ' +
'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
'shape all require an argument).'
);
}
if (error instanceof Error && !(error.message in loggedTypeFailures)) {
// Only monitor this failure once because there tends to be a lot of the
// same error.
loggedTypeFailures[error.message] = true;
var stack = getStack ? getStack() : '';
printWarning(
'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
);
}
}
}
}
}
/**
* Resets warning cache when testing.
*
* @private
*/
checkPropTypes.resetWarningCache = function() {
if (process.env.NODE_ENV !== 'production') {
loggedTypeFailures = {};
}
}
module.exports = checkPropTypes;
@@ -0,0 +1,27 @@
import MapCache from './_MapCache.js';
import setCacheAdd from './_setCacheAdd.js';
import setCacheHas from './_setCacheHas.js';
/**
*
* Creates an array cache object to store unique values.
*
* @private
* @constructor
* @param {Array} [values] The values to cache.
*/
function SetCache(values) {
var index = -1,
length = values == null ? 0 : values.length;
this.__data__ = new MapCache;
while (++index < length) {
this.add(values[index]);
}
}
// Add methods to `SetCache`.
SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
SetCache.prototype.has = setCacheHas;
export default SetCache;
@@ -0,0 +1,58 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.IssuingDistributionPoint = exports.id_ce_issuingDistributionPoint = void 0;
const tslib_1 = require("tslib");
const asn1_schema_1 = require("@peculiar/asn1-schema");
const crl_distribution_points_1 = require("./crl_distribution_points");
const object_identifiers_1 = require("../object_identifiers");
const asn1_schema_2 = require("@peculiar/asn1-schema");
exports.id_ce_issuingDistributionPoint = `${object_identifiers_1.id_ce}.28`;
class IssuingDistributionPoint {
constructor(params = {}) {
this.onlyContainsUserCerts = IssuingDistributionPoint.ONLY;
this.onlyContainsCACerts = IssuingDistributionPoint.ONLY;
this.indirectCRL = IssuingDistributionPoint.ONLY;
this.onlyContainsAttributeCerts = IssuingDistributionPoint.ONLY;
Object.assign(this, params);
}
}
exports.IssuingDistributionPoint = IssuingDistributionPoint;
IssuingDistributionPoint.ONLY = false;
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: crl_distribution_points_1.DistributionPointName, context: 0, optional: true })
], IssuingDistributionPoint.prototype, "distributionPoint", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({
type: asn1_schema_2.AsnPropTypes.Boolean,
context: 1,
defaultValue: IssuingDistributionPoint.ONLY,
implicit: true,
})
], IssuingDistributionPoint.prototype, "onlyContainsUserCerts", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({
type: asn1_schema_2.AsnPropTypes.Boolean,
context: 2,
defaultValue: IssuingDistributionPoint.ONLY,
implicit: true,
})
], IssuingDistributionPoint.prototype, "onlyContainsCACerts", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: crl_distribution_points_1.Reason, context: 3, optional: true, implicit: true })
], IssuingDistributionPoint.prototype, "onlySomeReasons", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({
type: asn1_schema_2.AsnPropTypes.Boolean,
context: 4,
defaultValue: IssuingDistributionPoint.ONLY,
implicit: true,
})
], IssuingDistributionPoint.prototype, "indirectCRL", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({
type: asn1_schema_2.AsnPropTypes.Boolean,
context: 5,
defaultValue: IssuingDistributionPoint.ONLY,
implicit: true,
})
], IssuingDistributionPoint.prototype, "onlyContainsAttributeCerts", void 0);
@@ -0,0 +1,2 @@
import * as ts from 'typescript';
export declare function isTypeBrandedLiteralLike(type: ts.Type): boolean;
@@ -0,0 +1,118 @@
// eslint-disable-next-line n/no-unsupported-features/node-builtins
import { parseArgs } from 'node:util';
import { defaultFlags } from './flags.js';
import { formatHelpMessage } from './format-help.js';
import { filter } from './utils.js';
// TODO: Add helper that translates a meow config into this config
// TODO: Add type tests that verifies overlap and differences to meow
/**
* @template {import('./flag-types.d.ts').AnyFlags} Flags
* @param {import('./peowly-types.d.ts').PeowlyOptions<Flags>} options
* @returns {import('./peowly-types.d.ts').PeowlyResult<Flags>}
*/
export function peowly (options) {
const pkg = options?.pkg;
const name = options?.name || (
Array.isArray(pkg?.bin)
? Object.keys(pkg?.bin).at(0)
: pkg?.name
);
const {
args = process.argv.slice(2),
description = pkg?.description,
examples,
help: baseHelp,
indent = 2,
name: _name, // destructed to get rid of it from parseArgsOptions
options: flags = {},
pkg: _pkg, // destructed to get rid of it from parseArgsOptions
processTitle = name,
returnRemainderArgs,
usage,
version = pkg?.version,
...parseArgsOptions
} = options || {};
if (processTitle) {
process.title = processTitle;
}
let help = baseHelp || formatHelpMessage(name || 'nameless', {
examples,
flags,
indent,
usage,
});
help = '\n' + (description ? ''.padEnd(indent) + description + '\n\n' : '') + help;
/** @type {import('./flag-types.d.ts').AnyFlags & typeof defaultFlags} */
const resolvedFlags = { ...flags, ...defaultFlags };
const showHelp = (/** @type {number | undefined} */ code) => {
// eslint-disable-next-line no-console
console.log(help);
// eslint-disable-next-line unicorn/no-process-exit
process.exit(typeof code === 'number' ? code : 2); // Default to code 2 for incorrect usage (#47)
};
if (args.includes('--help')) {
showHelp(0);
}
if (args.includes('--version')) {
// eslint-disable-next-line no-console
console.log(version || 'no version');
// eslint-disable-next-line unicorn/no-process-exit
process.exit(0);
}
const {
positionals,
tokens,
values: {
help: _helpFlag,
version: _versionFlag,
...values
},
} = parseArgs({
args,
allowPositionals: true,
...parseArgsOptions,
options: resolvedFlags,
strict: !returnRemainderArgs,
tokens: true,
});
/** @type {string[]} */
let remainderArgs = [];
if (returnRemainderArgs) {
/** @type {Array<string|undefined>} */
const sourceArgs = [...args];
for (const token of tokens) {
if (token.kind !== 'option') {
continue;
}
if (!resolvedFlags[token.name]) {
delete values[token.name];
} else {
sourceArgs[token.index] = undefined;
}
}
remainderArgs = filter(sourceArgs);
}
return {
input: positionals,
flags: /** @type {import('./peowly-types.d.ts').TypedFlags<Flags>} */ (values),
remainderArgs,
showHelp,
};
}
@@ -0,0 +1,414 @@
export default `flf2a$ 4 3 10 0 4
straight.flf Version 2
by: Bas Meijer meijer@info.win.tue.nl bas@damek.kth.se
fixed by: Ryan Youck youck@cs.uregina.ca
Disclaimer: most capitals have been designed by someone else
$$@
$$@
$$@
$$@@
@
| @
. @
@@
// @
$$ @
@
@@
@
_|_|_ @
-|-|- @
@@
||_ @
(||$ @
_||) @
|| @@
@
0/ @
/0 @
@@
@
()/ @
(X @
@@
/ @
$ @
$ @
@@
$/ @
($ @
$\\ @
@@
\\$ @
$) @
/$ @
@@
$ $@
$\\/$@
$/\\$@
$ $@@
$ $@
$_|_$@
$ | $@
$ $@@
$@
$$@
,$@
$@@
$ $@
$__$@
$ $@
$ $@@
$@
$ $@
. $@
$@@
@
$/ @
/$ @
@@
$ __ @
$/ \\ @
$\\__/ @
$ @@
$ @
$/| @
$ | @
$ @@
$__ @
$ _) @
$/__ @
$ @@
$__ @
$ _) @
$__) @
$ @@
$ @
$|__| @
$ | @
$ @@
$ __ @
$|_ @
$__) @
$ @@
$ __ @
$/__ @
$\\__) @
$ @@
$___ @
$ / @
$ / @
$ @@
$ __ @
$(__) @
$(__) @
$ @@
$ __ @
$(__\\ @
$ __/ @
$ @@
@
. @
. @
@@
@
. @
, @
@@
$ $@
$/$@
$\\$@
$ $@@
$ $@
$__$@
$--$@
$ $@@
$ $@
$\\$@
$/$@
$ $@@
$ _ @
$ )@
$ . @
$ @@
@
@
@
@@
@
$/\\ @
/--\\ @
@@
$__ @
|__) @
|__) @
@@
$__ @
/ @
\\__ @
@@
$__ @
| \\ @
|__/ @
@@
$__ @
|_ @
|__ @
@@
$__ @
|_ @
| @
@@
$__ @
/ _ @
\\__) @
@@
$ @
|__| @
| | @
@@
$ @
| @
| @
@@
$ @
$| @
__) @
@@
$ @
|_/ @
| \\ @
@@
$ @
| @
|__ @
@@
$ @
|\\/| @
| | @
@@
$ @
|\\ | @
| \\| @
@@
$__ @
/ \\ @
\\__/ @
@@
$__ @
|__) @
| $ @
@@
$__ @
/ \\ @
\\_\\/ @
@@
$__ @
|__) @
| \\ @
@@
$__ @
(_ @
__) @
@@
___ @
$|$ @
| @
@@
$ @
/ \\ @
\\__/ @
@@
$ @
\\ / @
\\/ @
@@
$ @
| | @
|/\\| @
@@
$ @
\\_/ @
/ \\ @
@@
$ @
\\_/ @
| @
@@
___ @
$_/ @
/__ @
@@
_ @
|$ @
|_ @
@@
@
\\ @
\\ @
@@
_ @
$| @
_| @
@@
@
/\\ @
$$ @
@@
@
@
__ @
@@
\\ @
$ @
$ @
@@
@
_ @
(_| @
@@
@
|_ @
|_) @
@@
@
_ @
(_ @
@@
@
_| @
(_| @
@@
@
_ @
(- @
@@
_ @
(_ @
|$ @
@@
@
_ @
(_) @
_/ @@
@
|_ @
| ) @
@@
@
. @
| @
@@
@
. @
| @
/ @@
@
|$ @
|( @
@@
@
| @
| @
@@
@
_ @
||| @
@@
@
_ @
| ) @
@@
@
_ @
(_) @
@@
@
_ @
|_) @
| @@
@
_ @
(_| @
| @@
@
_ @
|$ @
@@
@
_ @
_) @
@@
@
|_ @
|_ @
@@
@
$ $ @
|_| @
@@
@
$$ @
\\/ @
@@
@
$ $ @
\\)/ @
@@
@
$$ @
)( @
@@
@
$$ @
\\/ @
/ @@
@
_ @
/_ @
@@
( @
< @
( @
@@
| @
| @
| @
@@
) @
> @
) @
@@
@
/\\/ @
@
@@
o o @
/\\ @
/--\\ @
@@
o__o @
/ \\ @
\\__/ @
@@
o o @
/ \\ @
\\__/ @
@@
@
-_- @
(_| @
@@
@
-_- @
(_) @
@@
@
- - @
|_| @
@@
__ @
|__) @
|__) @
| @@
`
@@ -0,0 +1,42 @@
{
"name": "@react-stately/checkbox",
"version": "3.7.2",
"description": "Spectrum UI components in React",
"license": "Apache-2.0",
"main": "dist/main.js",
"module": "dist/module.js",
"exports": {
"source": "./src/index.ts",
"types": [
"./dist/types.d.ts",
"./src/index.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-stately/form": "^3.2.2",
"@react-stately/utils": "^3.10.8",
"@react-types/checkbox": "^3.10.2",
"@react-types/shared": "^3.32.1",
"@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": "0bda51183baa23306342af32a82012ea0fe0f2dc"
}
@@ -0,0 +1,489 @@
"use strict";
const promisify = require("util.promisify");
const gensync = require("../");
const TEST_ERROR = new Error("TEST_ERROR");
const DID_ERROR = new Error("DID_ERROR");
const doSuccess = gensync({
sync: () => 42,
async: () => Promise.resolve(42),
});
const doError = gensync({
sync: () => {
throw DID_ERROR;
},
async: () => Promise.reject(DID_ERROR),
});
function throwTestError() {
throw TEST_ERROR;
}
async function expectResult(
fn,
arg,
{ error, value, expectSync = false, syncErrback = expectSync }
) {
if (!expectSync) {
expect(() => fn.sync(arg)).toThrow(TEST_ERROR);
} else if (error) {
expect(() => fn.sync(arg)).toThrow(error);
} else {
expect(fn.sync(arg)).toBe(value);
}
if (error) {
await expect(fn.async(arg)).rejects.toBe(error);
} else {
await expect(fn.async(arg)).resolves.toBe(value);
}
await new Promise((resolve, reject) => {
let sync = true;
fn.errback(arg, (err, val) => {
try {
expect(err).toBe(error);
expect(val).toBe(value);
expect(sync).toBe(syncErrback);
resolve();
} catch (e) {
reject(e);
}
});
sync = false;
});
}
describe("gensync({})", () => {
describe("option validation", () => {
test("disallow async and errback handler together", () => {
try {
gensync({
sync: throwTestError,
async: throwTestError,
errback: throwTestError,
});
throwTestError();
} catch (err) {
expect(err.message).toMatch(
/Expected one of either opts.async or opts.errback, but got _both_\./
);
expect(err.code).toBe("GENSYNC_OPTIONS_ERROR");
}
});
test("disallow missing sync handler", () => {
try {
gensync({
async: throwTestError,
});
throwTestError();
} catch (err) {
expect(err.message).toMatch(/Expected opts.sync to be a function./);
expect(err.code).toBe("GENSYNC_OPTIONS_ERROR");
}
});
test("errback callback required", () => {
const fn = gensync({
sync: throwTestError,
async: throwTestError,
});
try {
fn.errback();
throwTestError();
} catch (err) {
expect(err.message).toMatch(/function called without callback/);
expect(err.code).toBe("GENSYNC_ERRBACK_NO_CALLBACK");
}
});
});
describe("generator function metadata", () => {
test("automatic naming", () => {
expect(
gensync({
sync: function readFileSync() {},
async: () => {},
}).name
).toBe("readFile");
expect(
gensync({
sync: function readFile() {},
async: () => {},
}).name
).toBe("readFile");
expect(
gensync({
sync: function readFileAsync() {},
async: () => {},
}).name
).toBe("readFileAsync");
expect(
gensync({
sync: () => {},
async: function readFileSync() {},
}).name
).toBe("readFileSync");
expect(
gensync({
sync: () => {},
async: function readFile() {},
}).name
).toBe("readFile");
expect(
gensync({
sync: () => {},
async: function readFileAsync() {},
}).name
).toBe("readFile");
expect(
gensync({
sync: () => {},
errback: function readFileSync() {},
}).name
).toBe("readFileSync");
expect(
gensync({
sync: () => {},
errback: function readFile() {},
}).name
).toBe("readFile");
expect(
gensync({
sync: () => {},
errback: function readFileAsync() {},
}).name
).toBe("readFileAsync");
});
test("explicit naming", () => {
expect(
gensync({
name: "readFile",
sync: () => {},
async: () => {},
}).name
).toBe("readFile");
});
test("default arity", () => {
expect(
gensync({
sync: function(a, b, c, d, e, f, g) {
throwTestError();
},
async: throwTestError,
}).length
).toBe(7);
});
test("explicit arity", () => {
expect(
gensync({
arity: 3,
sync: throwTestError,
async: throwTestError,
}).length
).toBe(3);
});
});
describe("'sync' handler", async () => {
test("success", async () => {
const fn = gensync({
sync: (...args) => JSON.stringify(args),
});
await expectResult(fn, 42, { value: "[42]", expectSync: true });
});
test("failure", async () => {
const fn = gensync({
sync: (...args) => {
throw JSON.stringify(args);
},
});
await expectResult(fn, 42, { error: "[42]", expectSync: true });
});
});
describe("'async' handler", async () => {
test("success", async () => {
const fn = gensync({
sync: throwTestError,
async: (...args) => Promise.resolve(JSON.stringify(args)),
});
await expectResult(fn, 42, { value: "[42]" });
});
test("failure", async () => {
const fn = gensync({
sync: throwTestError,
async: (...args) => Promise.reject(JSON.stringify(args)),
});
await expectResult(fn, 42, { error: "[42]" });
});
});
describe("'errback' sync handler", async () => {
test("success", async () => {
const fn = gensync({
sync: throwTestError,
errback: (...args) => args.pop()(null, JSON.stringify(args)),
});
await expectResult(fn, 42, { value: "[42]", syncErrback: true });
});
test("failure", async () => {
const fn = gensync({
sync: throwTestError,
errback: (...args) => args.pop()(JSON.stringify(args)),
});
await expectResult(fn, 42, { error: "[42]", syncErrback: true });
});
});
describe("'errback' async handler", async () => {
test("success", async () => {
const fn = gensync({
sync: throwTestError,
errback: (...args) =>
process.nextTick(() => args.pop()(null, JSON.stringify(args))),
});
await expectResult(fn, 42, { value: "[42]" });
});
test("failure", async () => {
const fn = gensync({
sync: throwTestError,
errback: (...args) =>
process.nextTick(() => args.pop()(JSON.stringify(args))),
});
await expectResult(fn, 42, { error: "[42]" });
});
});
});
describe("gensync(function* () {})", () => {
test("sync throw before body", async () => {
const fn = gensync(function*(arg = throwTestError()) {});
await expectResult(fn, undefined, {
error: TEST_ERROR,
syncErrback: true,
});
});
test("sync throw inside body", async () => {
const fn = gensync(function*() {
throwTestError();
});
await expectResult(fn, undefined, {
error: TEST_ERROR,
syncErrback: true,
});
});
test("async throw inside body", async () => {
const fn = gensync(function*() {
const val = yield* doSuccess();
throwTestError();
});
await expectResult(fn, undefined, {
error: TEST_ERROR,
});
});
test("error inside body", async () => {
const fn = gensync(function*() {
yield* doError();
});
await expectResult(fn, undefined, {
error: DID_ERROR,
expectSync: true,
syncErrback: false,
});
});
test("successful return value", async () => {
const fn = gensync(function*() {
const value = yield* doSuccess();
expect(value).toBe(42);
return 84;
});
await expectResult(fn, undefined, {
value: 84,
expectSync: true,
syncErrback: false,
});
});
test("successful final value", async () => {
const fn = gensync(function*() {
return 42;
});
await expectResult(fn, undefined, {
value: 42,
expectSync: true,
});
});
test("yield unexpected object", async () => {
const fn = gensync(function*() {
yield {};
});
try {
await fn.async();
throwTestError();
} catch (err) {
expect(err.message).toMatch(
/Got unexpected yielded value in gensync generator/
);
expect(err.code).toBe("GENSYNC_EXPECTED_START");
}
});
test("yield suspend yield", async () => {
const fn = gensync(function*() {
yield Symbol.for("gensync:v1:start");
// Should be "yield*" for no error.
yield {};
});
try {
await fn.async();
throwTestError();
} catch (err) {
expect(err.message).toMatch(/Expected GENSYNC_SUSPEND, got {}/);
expect(err.code).toBe("GENSYNC_EXPECTED_SUSPEND");
}
});
test("yield suspend return", async () => {
const fn = gensync(function*() {
yield Symbol.for("gensync:v1:start");
// Should be "yield*" for no error.
return {};
});
try {
await fn.async();
throwTestError();
} catch (err) {
expect(err.message).toMatch(/Unexpected generator completion/);
expect(err.code).toBe("GENSYNC_EXPECTED_SUSPEND");
}
});
});
describe("gensync.all()", () => {
test("success", async () => {
const fn = gensync(function*() {
const result = yield* gensync.all([doSuccess(), doSuccess()]);
expect(result).toEqual([42, 42]);
});
await expectResult(fn, undefined, {
value: undefined,
expectSync: true,
syncErrback: false,
});
});
test("error first", async () => {
const fn = gensync(function*() {
yield* gensync.all([doError(), doSuccess()]);
});
await expectResult(fn, undefined, {
error: DID_ERROR,
expectSync: true,
syncErrback: false,
});
});
test("error last", async () => {
const fn = gensync(function*() {
yield* gensync.all([doSuccess(), doError()]);
});
await expectResult(fn, undefined, {
error: DID_ERROR,
expectSync: true,
syncErrback: false,
});
});
test("empty list", async () => {
const fn = gensync(function*() {
yield* gensync.all([]);
});
await expectResult(fn, undefined, {
value: undefined,
expectSync: true,
syncErrback: false,
});
});
});
describe("gensync.race()", () => {
test("success", async () => {
const fn = gensync(function*() {
const result = yield* gensync.race([doSuccess(), doError()]);
expect(result).toEqual(42);
});
await expectResult(fn, undefined, {
value: undefined,
expectSync: true,
syncErrback: false,
});
});
test("error", async () => {
const fn = gensync(function*() {
yield* gensync.race([doError(), doSuccess()]);
});
await expectResult(fn, undefined, {
error: DID_ERROR,
expectSync: true,
syncErrback: false,
});
});
});
@@ -0,0 +1,3 @@
declare function hasNativeSymbols(): boolean;
export = hasNativeSymbols;
@@ -0,0 +1,9 @@
import { GroupAnimation } from './GroupAnimation.mjs';
class GroupAnimationWithThen extends GroupAnimation {
then(onResolve, _onReject) {
return this.finished.finally(onResolve).then(() => { });
}
}
export { GroupAnimationWithThen };
@@ -0,0 +1,19 @@
/*
* 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 type {PartialNode} from './types';
export {Item} from './Item';
export {Section} from './Section';
export {useCollection} from './useCollection';
export {getItemCount} from './getItemCount';
export {getChildNodes, getFirstItem, getLastItem, getNthItem, compareNodeOrder} from './getChildNodes';
export {CollectionBuilder} from './CollectionBuilder';
@@ -0,0 +1,43 @@
/**
* Utility for resolving a module relative to another module
* @author Teddy Katz
*/
import Module from "node:module";
/*
* `Module.createRequire` is added in v12.2.0. It supports URL as well.
* We only support the case where the argument is a filepath, not a URL.
*/
const createRequire = Module.createRequire;
/**
* Resolves a Node module relative to another module
* @param {string} moduleName The name of a Node module, or a path to a Node module.
* @param {string} relativeToPath An absolute path indicating the module that `moduleName` should be resolved relative to. This must be
* a file rather than a directory, but the file need not actually exist.
* @returns {string} The absolute path that would result from calling `require.resolve(moduleName)` in a file located at `relativeToPath`
* @throws {Error} When the module cannot be resolved.
*/
function resolve(moduleName, relativeToPath) {
try {
return createRequire(relativeToPath).resolve(moduleName);
} catch (error) {
// This `if` block is for older Node.js than 12.0.0. We can remove this block in the future.
if (
typeof error === "object" &&
error !== null &&
error.code === "MODULE_NOT_FOUND" &&
!error.requireStack &&
error.message.includes(moduleName)
) {
error.message += `\nRequire stack:\n- ${relativeToPath}`;
}
throw error;
}
}
export {
resolve
};
@@ -0,0 +1,3 @@
import * as ts from 'typescript';
export declare function getScriptKind(filePath: string, jsx: boolean): ts.ScriptKind;
export declare function getLanguageVariant(scriptKind: ts.ScriptKind): ts.LanguageVariant;
@@ -0,0 +1,122 @@
'use strict';
const colors = require('@colors/colors/safe');
const { LEVEL, MESSAGE } = require('triple-beam');
//
// Fix colors not appearing in non-tty environments
//
colors.enabled = true;
/**
* @property {RegExp} hasSpace
* Simple regex to check for presence of spaces.
*/
const hasSpace = /\s+/;
/*
* Colorizer format. Wraps the `level` and/or `message` properties
* of the `info` objects with ANSI color codes based on a few options.
*/
class Colorizer {
constructor(opts = {}) {
if (opts.colors) {
this.addColors(opts.colors);
}
this.options = opts;
}
/*
* Adds the colors Object to the set of allColors
* known by the Colorizer
*
* @param {Object} colors Set of color mappings to add.
*/
static addColors(clrs) {
const nextColors = Object.keys(clrs).reduce((acc, level) => {
acc[level] = hasSpace.test(clrs[level])
? clrs[level].split(hasSpace)
: clrs[level];
return acc;
}, {});
Colorizer.allColors = Object.assign({}, Colorizer.allColors || {}, nextColors);
return Colorizer.allColors;
}
/*
* Adds the colors Object to the set of allColors
* known by the Colorizer
*
* @param {Object} colors Set of color mappings to add.
*/
addColors(clrs) {
return Colorizer.addColors(clrs);
}
/*
* function colorize (lookup, level, message)
* Performs multi-step colorization using @colors/colors/safe
*/
colorize(lookup, level, message) {
if (typeof message === 'undefined') {
message = level;
}
//
// If the color for the level is just a string
// then attempt to colorize the message with it.
//
if (!Array.isArray(Colorizer.allColors[lookup])) {
return colors[Colorizer.allColors[lookup]](message);
}
//
// If it is an Array then iterate over that Array, applying
// the colors function for each item.
//
for (let i = 0, len = Colorizer.allColors[lookup].length; i < len; i++) {
message = colors[Colorizer.allColors[lookup][i]](message);
}
return message;
}
/*
* function transform (info, opts)
* Attempts to colorize the { level, message } of the given
* `logform` info object.
*/
transform(info, opts) {
if (opts.all && typeof info[MESSAGE] === 'string') {
info[MESSAGE] = this.colorize(info[LEVEL], info.level, info[MESSAGE]);
}
if (opts.level || opts.all || !opts.message) {
info.level = this.colorize(info[LEVEL], info.level);
}
if (opts.all || opts.message) {
info.message = this.colorize(info[LEVEL], info.level, info.message);
}
return info;
}
}
/*
* function colorize (info)
* Returns a new instance of the colorize Format that applies
* level colors to `info` objects. This was previously exposed
* as { colorize: true } to transports in `winston < 3.0.0`.
*/
module.exports = opts => new Colorizer(opts);
//
// Attach the Colorizer for registration purposes
//
module.exports.Colorizer
= module.exports.Format
= Colorizer;
@@ -0,0 +1,17 @@
export { AlignTopBoldIcon } from './align-top.js';
export { AlignBottomBoldIcon } from './align-bottom.js';
export { AlignLeftBoldIcon } from './align-left.js';
export { AlignRightBoldIcon } from './align-right.js';
export { AlignVerticallyBoldIcon } from './align-vertically.js';
export { AlignHorizontallyBoldIcon } from './align-horizontally.js';
export { PetBoldIcon } from './pet.js';
export { VolumeHighBoldIcon } from './volume-high.js';
export { VolumeLowBoldIcon } from './volume-low.js';
export { ShoppingCartBoldIcon } from './shopping-cart.js';
export { SendFilledIcon } from './send.js';
export { PlusFilledIcon } from './plus.js';
export { CalendarBoldIcon } from './calendar-bold.js';
export { ClockSquareBoldIcon } from './clock-square-bold.js';
import 'react/jsx-runtime';
import '../types.js';
import 'react';
@@ -0,0 +1,54 @@
/** @deprecated */
export declare enum Markers {
start = "/**",
nostart = "/***",
delim = "*",
end = "*/"
}
export interface BlockMarkers {
start: string;
nostart: string;
delim: string;
end: string;
}
export interface Block {
description: string;
tags: Spec[];
source: Line[];
problems: Problem[];
}
export interface Spec {
tag: string;
name: string;
default?: string;
type: string;
optional: boolean;
description: string;
problems: Problem[];
source: Line[];
}
export interface Line {
number: number;
source: string;
tokens: Tokens;
}
export interface Tokens {
start: string;
delimiter: string;
postDelimiter: string;
tag: string;
postTag: string;
name: string;
postName: string;
type: string;
postType: string;
description: string;
end: string;
lineEnd: string;
}
export interface Problem {
code: 'unhandled' | 'custom' | 'source:startline' | 'spec:tag:prefix' | 'spec:type:unpaired-curlies' | 'spec:name:unpaired-brackets' | 'spec:name:empty-name' | 'spec:name:invalid-default' | 'spec:name:empty-default';
message: string;
line: number;
critical: boolean;
}
@@ -0,0 +1,52 @@
// Export is needed because TypeScript complains about an error otherwise:
// Error: …/tailwind-merge/src/config-utils.ts(8,17): semantic error TS4058: Return type of exported function has or is using name 'LruCache' from external module "…/tailwind-merge/src/lru-cache" but cannot be named.
export interface LruCache<Key, Value> {
get(key: Key): Value | undefined
set(key: Key, value: Value): void
}
// LRU cache inspired from hashlru (https://github.com/dominictarr/hashlru/blob/v1.0.4/index.js) but object replaced with Map to improve performance
export const createLruCache = <Key, Value>(maxCacheSize: number): LruCache<Key, Value> => {
if (maxCacheSize < 1) {
return {
get: () => undefined,
set: () => {},
}
}
let cacheSize = 0
let cache = new Map<Key, Value>()
let previousCache = new Map<Key, Value>()
const update = (key: Key, value: Value) => {
cache.set(key, value)
cacheSize++
if (cacheSize > maxCacheSize) {
cacheSize = 0
previousCache = cache
cache = new Map()
}
}
return {
get(key) {
let value = cache.get(key)
if (value !== undefined) {
return value
}
if ((value = previousCache.get(key)) !== undefined) {
update(key, value)
return value
}
},
set(key, value) {
if (cache.has(key)) {
cache.set(key, value)
} else {
update(key, value)
}
},
}
}
@@ -0,0 +1,43 @@
/**
* @author Toru Nagashima <https://github.com/mysticatea>
* See LICENSE file in root directory for full license.
*/
"use strict"
const { READ, ReferenceTracker } = require("eslint-utils")
module.exports = {
meta: {
docs: {
description: "disallow the `Object.entries` method.",
category: "ES2017",
recommended: false,
url:
"http://mysticatea.github.io/eslint-plugin-es/rules/no-object-entries.html",
},
fixable: null,
messages: {
forbidden: "ES2017 '{{name}}' method is forbidden.",
},
schema: [],
type: "problem",
},
create(context) {
return {
"Program:exit"() {
const tracker = new ReferenceTracker(context.getScope())
for (const { node, path } of tracker.iterateGlobalReferences({
Object: {
entries: { [READ]: true },
},
})) {
context.report({
node,
messageId: "forbidden",
data: { name: path.join(".") },
})
}
},
}
},
}
@@ -0,0 +1,282 @@
# Acorn
A tiny, fast JavaScript parser written in JavaScript.
## Community
Acorn is open source software released under an
[MIT license](https://github.com/acornjs/acorn/blob/master/acorn/LICENSE).
You are welcome to
[report bugs](https://github.com/acornjs/acorn/issues) or create pull
requests on [github](https://github.com/acornjs/acorn).
## Installation
The easiest way to install acorn is from [`npm`](https://www.npmjs.com/):
```sh
npm install acorn
```
Alternately, you can download the source and build acorn yourself:
```sh
git clone https://github.com/acornjs/acorn.git
cd acorn
npm install
```
## Interface
**parse**`(input, options)` is the main interface to the library. The
`input` parameter is a string, `options` must be an object setting
some of the options listed below. The return value will be an abstract
syntax tree object as specified by the [ESTree
spec](https://github.com/estree/estree).
```javascript
let acorn = require("acorn");
console.log(acorn.parse("1 + 1", {ecmaVersion: 2020}));
```
When encountering a syntax error, the parser will raise a
`SyntaxError` object with a meaningful message. The error object will
have a `pos` property that indicates the string offset at which the
error occurred, and a `loc` object that contains a `{line, column}`
object referring to that same position.
Options are provided by in a second argument, which should be an
object containing any of these fields (only `ecmaVersion` is
required):
- **ecmaVersion**: Indicates the ECMAScript version to parse. Can be a
number, either in year (`2022`) or plain version number (`6`) form,
or `"latest"` (the latest the library supports). This influences
support for strict mode, the set of reserved words, and support for
new syntax features.
**NOTE**: Only 'stage 4' (finalized) ECMAScript features are being
implemented by Acorn. Other proposed new features must be
implemented through plugins.
- **sourceType**: Indicate the mode the code should be parsed in. Can be
either `"script"` or `"module"`. This influences global strict mode
and parsing of `import` and `export` declarations.
**NOTE**: If set to `"module"`, then static `import` / `export` syntax
will be valid, even if `ecmaVersion` is less than 6.
- **onInsertedSemicolon**: If given a callback, that callback will be
called whenever a missing semicolon is inserted by the parser. The
callback will be given the character offset of the point where the
semicolon is inserted as argument, and if `locations` is on, also a
`{line, column}` object representing this position.
- **onTrailingComma**: Like `onInsertedSemicolon`, but for trailing
commas.
- **allowReserved**: If `false`, using a reserved word will generate
an error. Defaults to `true` for `ecmaVersion` 3, `false` for higher
versions. When given the value `"never"`, reserved words and
keywords can also not be used as property names (as in Internet
Explorer's old parser).
- **allowReturnOutsideFunction**: By default, a return statement at
the top level raises an error. Set this to `true` to accept such
code.
- **allowImportExportEverywhere**: By default, `import` and `export`
declarations can only appear at a program's top level. Setting this
option to `true` allows them anywhere where a statement is allowed,
and also allows `import.meta` expressions to appear in scripts
(when `sourceType` is not `"module"`).
- **allowAwaitOutsideFunction**: If `false`, `await` expressions can
only appear inside `async` functions. Defaults to `true` in modules
for `ecmaVersion` 2022 and later, `false` for lower versions.
Setting this option to `true` allows to have top-level `await`
expressions. They are still not allowed in non-`async` functions,
though.
- **allowSuperOutsideMethod**: By default, `super` outside a method
raises an error. Set this to `true` to accept such code.
- **allowHashBang**: When this is enabled, if the code starts with the
characters `#!` (as in a shellscript), the first line will be
treated as a comment. Defaults to true when `ecmaVersion` >= 2023.
- **checkPrivateFields**: By default, the parser will verify that
private properties are only used in places where they are valid and
have been declared. Set this to false to turn such checks off.
- **locations**: When `true`, each node has a `loc` object attached
with `start` and `end` subobjects, each of which contains the
one-based line and zero-based column numbers in `{line, column}`
form. Default is `false`.
- **onToken**: If a function is passed for this option, each found
token will be passed in same format as tokens returned from
`tokenizer().getToken()`.
If array is passed, each found token is pushed to it.
Note that you are not allowed to call the parser from the
callback—that will corrupt its internal state.
- **onComment**: If a function is passed for this option, whenever a
comment is encountered the function will be called with the
following parameters:
- `block`: `true` if the comment is a block comment, false if it
is a line comment.
- `text`: The content of the comment.
- `start`: Character offset of the start of the comment.
- `end`: Character offset of the end of the comment.
When the `locations` options is on, the `{line, column}` locations
of the comment’s start and end are passed as two additional
parameters.
If array is passed for this option, each found comment is pushed
to it as object in Esprima format:
```javascript
{
"type": "Line" | "Block",
"value": "comment text",
"start": Number,
"end": Number,
// If `locations` option is on:
"loc": {
"start": {line: Number, column: Number}
"end": {line: Number, column: Number}
},
// If `ranges` option is on:
"range": [Number, Number]
}
```
Note that you are not allowed to call the parser from the
callback—that will corrupt its internal state.
- **ranges**: Nodes have their start and end characters offsets
recorded in `start` and `end` properties (directly on the node,
rather than the `loc` object, which holds line/column data. To also
add a
[semi-standardized](https://bugzilla.mozilla.org/show_bug.cgi?id=745678)
`range` property holding a `[start, end]` array with the same
numbers, set the `ranges` option to `true`.
- **program**: It is possible to parse multiple files into a single
AST by passing the tree produced by parsing the first file as the
`program` option in subsequent parses. This will add the toplevel
forms of the parsed file to the "Program" (top) node of an existing
parse tree.
- **sourceFile**: When the `locations` option is `true`, you can pass
this option to add a `source` attribute in every node’s `loc`
object. Note that the contents of this option are not examined or
processed in any way; you are free to use whatever format you
choose.
- **directSourceFile**: Like `sourceFile`, but a `sourceFile` property
will be added (regardless of the `location` option) directly to the
nodes, rather than the `loc` object.
- **preserveParens**: If this option is `true`, parenthesized expressions
are represented by (non-standard) `ParenthesizedExpression` nodes
that have a single `expression` property containing the expression
inside parentheses.
**parseExpressionAt**`(input, offset, options)` will parse a single
expression in a string, and return its AST. It will not complain if
there is more of the string left after the expression.
**tokenizer**`(input, options)` returns an object with a `getToken`
method that can be called repeatedly to get the next token, a `{start,
end, type, value}` object (with added `loc` property when the
`locations` option is enabled and `range` property when the `ranges`
option is enabled). When the token's type is `tokTypes.eof`, you
should stop calling the method, since it will keep returning that same
token forever.
Note that tokenizing JavaScript without parsing it is, in modern
versions of the language, not really possible due to the way syntax is
overloaded in ways that can only be disambiguated by the parse
context. This package applies a bunch of heuristics to try and do a
reasonable job, but you are advised to use `parse` with the `onToken`
option instead of this.
In ES6 environment, returned result can be used as any other
protocol-compliant iterable:
```javascript
for (let token of acorn.tokenizer(str)) {
// iterate over the tokens
}
// transform code to array of tokens:
var tokens = [...acorn.tokenizer(str)];
```
**tokTypes** holds an object mapping names to the token type objects
that end up in the `type` properties of tokens.
**getLineInfo**`(input, offset)` can be used to get a `{line,
column}` object for a given program string and offset.
### The `Parser` class
Instances of the **`Parser`** class contain all the state and logic
that drives a parse. It has static methods `parse`,
`parseExpressionAt`, and `tokenizer` that match the top-level
functions by the same name.
When extending the parser with plugins, you need to call these methods
on the extended version of the class. To extend a parser with plugins,
you can use its static `extend` method.
```javascript
var acorn = require("acorn");
var jsx = require("acorn-jsx");
var JSXParser = acorn.Parser.extend(jsx());
JSXParser.parse("foo(<bar/>)", {ecmaVersion: 2020});
```
The `extend` method takes any number of plugin values, and returns a
new `Parser` class that includes the extra parser logic provided by
the plugins.
## Command line interface
The `bin/acorn` utility can be used to parse a file from the command
line. It accepts as arguments its input file and the following
options:
- `--ecma3|--ecma5|--ecma6|--ecma7|--ecma8|--ecma9|--ecma10`: Sets the ECMAScript version
to parse. Default is version 9.
- `--module`: Sets the parsing mode to `"module"`. Is set to `"script"` otherwise.
- `--locations`: Attaches a "loc" object to each node with "start" and
"end" subobjects, each of which contains the one-based line and
zero-based column numbers in `{line, column}` form.
- `--allow-hash-bang`: If the code starts with the characters #! (as
in a shellscript), the first line will be treated as a comment.
- `--allow-await-outside-function`: Allows top-level `await` expressions.
See the `allowAwaitOutsideFunction` option for more information.
- `--compact`: No whitespace is used in the AST output.
- `--silent`: Do not output the AST, just return the exit status.
- `--help`: Print the usage information and quit.
The utility spits out the syntax tree as JSON data.
## Existing plugins
- [`acorn-jsx`](https://github.com/RReverser/acorn-jsx): Parse [Facebook JSX syntax extensions](https://github.com/facebook/jsx)
@@ -0,0 +1,3 @@
import type { TSESLint } from '@typescript-eslint/utils';
declare const _default: TSESLint.RuleModule<"preferFind" | "preferFindSuggestion", [], import("../../rules").ESLintPluginDocs, TSESLint.RuleListener>;
export default _default;
@@ -0,0 +1,22 @@
The MIT License (MIT)
Copyright (c) 2014 Jonathan Ong me@jongleberry.com
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
@@ -0,0 +1,16 @@
var baseFor = require('./_baseFor'),
keys = require('./keys');
/**
* The base implementation of `_.forOwn` without support for iteratee shorthands.
*
* @private
* @param {Object} object The object to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @returns {Object} Returns `object`.
*/
function baseForOwn(object, iteratee) {
return object && baseFor(object, iteratee, keys);
}
module.exports = baseForOwn;
@@ -0,0 +1 @@
{"version":3,"file":"decode-data-xml.js","sourceRoot":"","sources":["../../../src/generated/decode-data-xml.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAE9C,MAAM,CAAC,MAAM,aAAa,GAAgB,eAAe,CAAC,IAAI,WAAW;AACrE,kBAAkB;AAClB,eAAe,CAAC,uFAAuF;KAClG,KAAK,CAAC,EAAE,CAAC;KACT,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CACnC,CAAC"}
@@ -0,0 +1,184 @@
/*!
* screenfull
* v5.2.0 - 2021-11-03
* (c) Sindre Sorhus; MIT License
*/
(function () {
'use strict';
var document = typeof window !== 'undefined' && typeof window.document !== 'undefined' ? window.document : {};
var isCommonjs = typeof module !== 'undefined' && module.exports;
var fn = (function () {
var val;
var fnMap = [
[
'requestFullscreen',
'exitFullscreen',
'fullscreenElement',
'fullscreenEnabled',
'fullscreenchange',
'fullscreenerror'
],
// New WebKit
[
'webkitRequestFullscreen',
'webkitExitFullscreen',
'webkitFullscreenElement',
'webkitFullscreenEnabled',
'webkitfullscreenchange',
'webkitfullscreenerror'
],
// Old WebKit
[
'webkitRequestFullScreen',
'webkitCancelFullScreen',
'webkitCurrentFullScreenElement',
'webkitCancelFullScreen',
'webkitfullscreenchange',
'webkitfullscreenerror'
],
[
'mozRequestFullScreen',
'mozCancelFullScreen',
'mozFullScreenElement',
'mozFullScreenEnabled',
'mozfullscreenchange',
'mozfullscreenerror'
],
[
'msRequestFullscreen',
'msExitFullscreen',
'msFullscreenElement',
'msFullscreenEnabled',
'MSFullscreenChange',
'MSFullscreenError'
]
];
var i = 0;
var l = fnMap.length;
var ret = {};
for (; i < l; i++) {
val = fnMap[i];
if (val && val[1] in document) {
for (i = 0; i < val.length; i++) {
ret[fnMap[0][i]] = val[i];
}
return ret;
}
}
return false;
})();
var eventNameMap = {
change: fn.fullscreenchange,
error: fn.fullscreenerror
};
var screenfull = {
request: function (element, options) {
return new Promise(function (resolve, reject) {
var onFullScreenEntered = function () {
this.off('change', onFullScreenEntered);
resolve();
}.bind(this);
this.on('change', onFullScreenEntered);
element = element || document.documentElement;
var returnPromise = element[fn.requestFullscreen](options);
if (returnPromise instanceof Promise) {
returnPromise.then(onFullScreenEntered).catch(reject);
}
}.bind(this));
},
exit: function () {
return new Promise(function (resolve, reject) {
if (!this.isFullscreen) {
resolve();
return;
}
var onFullScreenExit = function () {
this.off('change', onFullScreenExit);
resolve();
}.bind(this);
this.on('change', onFullScreenExit);
var returnPromise = document[fn.exitFullscreen]();
if (returnPromise instanceof Promise) {
returnPromise.then(onFullScreenExit).catch(reject);
}
}.bind(this));
},
toggle: function (element, options) {
return this.isFullscreen ? this.exit() : this.request(element, options);
},
onchange: function (callback) {
this.on('change', callback);
},
onerror: function (callback) {
this.on('error', callback);
},
on: function (event, callback) {
var eventName = eventNameMap[event];
if (eventName) {
document.addEventListener(eventName, callback, false);
}
},
off: function (event, callback) {
var eventName = eventNameMap[event];
if (eventName) {
document.removeEventListener(eventName, callback, false);
}
},
raw: fn
};
if (!fn) {
if (isCommonjs) {
module.exports = {isEnabled: false};
} else {
window.screenfull = {isEnabled: false};
}
return;
}
Object.defineProperties(screenfull, {
isFullscreen: {
get: function () {
return Boolean(document[fn.fullscreenElement]);
}
},
element: {
enumerable: true,
get: function () {
return document[fn.fullscreenElement];
}
},
isEnabled: {
enumerable: true,
get: function () {
// Coerce to boolean in case of old WebKit
return Boolean(document[fn.fullscreenEnabled]);
}
}
});
if (isCommonjs) {
module.exports = screenfull;
} else {
window.screenfull = screenfull;
}
})();
Loaded 100 of 35554 files, more files were not shown because too many files have changed in this diff. Show more