docs: 仓库链接指向本镜像仓库
Build NapCat Artifacts / Windows Loader Test (push) Canceled after 0s
Build NapCat Artifacts / Type Check & Test (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Framework (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Shell (push) Canceled after 0s

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,7 @@
import { d as daysOfYear } from "./daysOfYear-tJ4F7T8N.mjs";
function daysInMonth(date) {
return daysOfYear(date.getFullYear())[date.getMonth()];
}
export {
daysInMonth as default
};
@@ -0,0 +1 @@
{"name":"array.prototype.flat","version":"1.3.3","requiresBuild":false,"files":{".editorconfig":{"checkedAt":1794532097835,"integrity":"sha512-gD3iQtgC7ZgFS97pyZqR0FPjMNyRAfat8dipbSL28iiJ6B1MP5dDeDYeEnP5sYMTz8whQIk3E5vltk2kcyJJEQ==","mode":420,"size":286},".eslintrc":{"checkedAt":1794532097835,"integrity":"sha512-7FvswRpRAU2NpwqAarXWP87KyPaWNU1y9B2opa+p/g8QUffwlffpgBf0uH9NenKn40KJ7sHFNFfmujiNDpxEPg==","mode":420,"size":520},".nycrc":{"checkedAt":1794532089075,"integrity":"sha512-2vm1RFz8Ajl/OYrfoCWPJIm3Bpnf7Gyn5bha/lZx/cq+We3uMy9xj15XeP6x4wF3jf/pO7KMHAkU9mllm605xg==","mode":420,"size":139},"LICENSE":{"checkedAt":1794532097835,"integrity":"sha512-ApdoZuMEd/XMnh3CnupZNEzUSi9VwwgpJG3hDBdJXaJuTVGdPpArS5bls1KTEpS/qaa33RArqQpBp6Ql1m5VNA==","mode":420,"size":1073},"auto.js":{"checkedAt":1794532097835,"integrity":"sha512-8Q3Im5cACiIFrMmxvLnJnA8SXOjAd1kh/R0UIDVnErDD1WUlJIDrNfaOcIB6rtjAXNhq/OdL1374JM/QcAJ1VQ==","mode":420,"size":36},"implementation.js":{"checkedAt":1794532097835,"integrity":"sha512-UP2/+nKu6NIgy3YQjdajZZ1rGcx759yLm80ZYi2ZDKjLMpMKooEgm14GTHpVevLLcISUZak4qZastJvgmzLWMg==","mode":420,"size":725},"test/implementation.js":{"checkedAt":1794532097836,"integrity":"sha512-wHBgyacGj0MyRZLIRZ4fdCNnnaN+BhEnHiPyS8Cv+exiYPrvvgKuL/K3ZBeUELcYjXYywy3EuV5ZLqcx7hCV8g==","mode":420,"size":597},"index.js":{"checkedAt":1794532097836,"integrity":"sha512-fywptGLdXtNwI/vVCYJCYJJkmUFXKzwDHoL3CsvR4n6n3viVuLEksNd0fV/bMuJ8ltGcKhYUOiYc5PRrgnDvsg==","mode":420,"size":410},"test/index.js":{"checkedAt":1794532097836,"integrity":"sha512-Ozc68/kt37xhuWp6gKfsFEL98Dt36k8zuCF5+rNRDtHvIUgdx+xVg2YoWw3wNOuOUwH38XmeSfmwUplIxX0FoQ==","mode":420,"size":448},"polyfill.js":{"checkedAt":1794532097836,"integrity":"sha512-kSN2dipVY9dNp6fIuw74AKARWiNolQ7/7TaHiD51Mln52GfQzxMrTvq4RY2Gs12QBF+7mWZNcvikKJ8CbdDZYQ==","mode":420,"size":159},"shim.js":{"checkedAt":1794532097836,"integrity":"sha512-Wi1FTze4FtGYLJl3bAUlBUQWtbec45WbXDZqa1QnbaFg3aoB+OV9pi0q/D1wzF3YAbNHgrUOIFRQtJKyu/oMZw==","mode":420,"size":399},"test/shimmed.js":{"checkedAt":1794532097836,"integrity":"sha512-bN+nLuT4SVpvKtATEE9Iq18N8jzlZ334dnLfaT7SYjuGLU5knEa7zroDy4muVkGDBAggkc5FOlwWG7gFBCVEIg==","mode":420,"size":1275},"test/tests.js":{"checkedAt":1794532097836,"integrity":"sha512-AADMBv6A/hNrB6K8wIKURvV3Yq20O8BdZnraP82OS77OKEdoTP6pWgHjDbnDhozDwQbBGFE5c8Ywt6ZK7sJ0xw==","mode":420,"size":1366},"package.json":{"checkedAt":1794532097837,"integrity":"sha512-yWBJllXwDbuDpDl41lABZEgpM+rJfON4WAP3Nfm28RE2elTC5BilrvWhyO/t2gQZD2z3ejqj8lZBR/xnp5+udw==","mode":420,"size":2777},"CHANGELOG.md":{"checkedAt":1794532097837,"integrity":"sha512-0nry0T4ulL+CcttNaPzLgPkbeITkKv4VWZUAwyXohBNzgIr5kJ2IN+EcPeNFUncn2Y5HV0aVCMP+71GDXRzhNw==","mode":420,"size":5987},"README.md":{"checkedAt":1794532097837,"integrity":"sha512-TqbSRD2i4Yr/YHDb4C3keZWRB4ppo4pRpDA+bhoLlrE/sffOqnDllTWr6DcrHsZauUHNTlLz4xwXmgezPEaaOA==","mode":420,"size":2926},".github/FUNDING.yml":{"checkedAt":1794532097837,"integrity":"sha512-hZUBRxjuR1N+2SmBRa2GfSj+RtRQwY6Q2s63BjWMyh7FPxL9vpARPV7NTmjO4lxoiLOLKh5xsdRY2WLfIWwudA==","mode":420,"size":591}}}
@@ -0,0 +1,12 @@
# `typescript-eslint`
> Tooling which enables you to use TypeScript with ESLint
[![NPM Version](https://img.shields.io/npm/v/typescript-eslint.svg?style=flat-square)](https://www.npmjs.com/package/typescript-eslint)
[![NPM Downloads](https://img.shields.io/npm/dm/typescript-eslint.svg?style=flat-square)](https://www.npmjs.com/package/typescript-eslint)
👉 See **https://typescript-eslint.io/packages/typescript-eslint** for documentation on this package.
> See https://typescript-eslint.io for general documentation on typescript-eslint, the tooling that allows you to run ESLint and Prettier on TypeScript code.
<!-- Local path for docs: docs/packages/typescript-eslint.mdx -->
@@ -0,0 +1,24 @@
# @heroui/tooltip
Tooltips display a brief, informative message that appears when a user interacts with an element.
Please refer to the [documentation](https://heroui.com/docs/components/tooltip) for more information.
## Installation
```sh
yarn add @heroui/tooltip
# or
npm i @heroui/tooltip
```
## Contribution
Yes please! See the
[contributing guidelines](https://github.com/frontio-ai/heroui/blob/master/CONTRIBUTING.md)
for details.
## License
This project is licensed under the terms of the
[MIT license](https://github.com/frontio-ai/heroui/blob/master/LICENSE).
@@ -0,0 +1 @@
{"version":3,"file":"verifyEC2.d.ts","sourceRoot":"","sources":["../../../../src/helpers/iso/isoCrypto/verifyEC2.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAqB,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAMvF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE3D;;GAEG;AACH,wBAAsB,SAAS,CAAC,IAAI,EAAE;IACpC,aAAa,EAAE,gBAAgB,CAAC;IAChC,SAAS,EAAE,WAAW,CAAC;IACvB,IAAI,EAAE,WAAW,CAAC;IAClB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B,GAAG,OAAO,CAAC,OAAO,CAAC,CA0EnB"}
@@ -0,0 +1,8 @@
import { _ as _class_apply_descriptor_get } from "./_class_apply_descriptor_get.js";
import { _ as _class_extract_field_descriptor } from "./_class_extract_field_descriptor.js";
function _class_private_field_get(receiver, privateMap) {
var descriptor = _class_extract_field_descriptor(receiver, privateMap, "get");
return _class_apply_descriptor_get(receiver, descriptor);
}
export { _class_private_field_get as _ };
@@ -0,0 +1,34 @@
"use strict";
const constants = require("./constants-DR3SPJ7u.js");
const normalizeUnit = require("./normalizeUnit-Cn0hUyBC.js");
const startOfTime = require("./startOfTime-CiMtfVAs.js");
const units = require("./units.js");
const { DATE, DAY, HOUR, MINUTE, MONTH, SECOND, YEAR } = units;
function startOf(date, unit) {
unit = normalizeUnit.normalizeUnit(unit);
let time = 0;
switch (unit) {
case YEAR:
time = startOfTime.startOfDate(date, void 0, 0, 1);
break;
case MONTH:
time = startOfTime.startOfDate(date, void 0, void 0, 1);
break;
case DATE:
case DAY:
time = startOfTime.startOfDate(date);
break;
case HOUR:
time = startOfTime.startOfTime(date, constants.MS_IN_HOUR);
break;
case MINUTE:
time = startOfTime.startOfTime(date, constants.MS_IN_MINUTE);
break;
case SECOND:
time = startOfTime.startOfTime(date, constants.MS_IN_SECOND);
break;
}
time && date.setTime(time);
return date;
}
module.exports = startOf;
@@ -0,0 +1 @@
{"version":3,"file":"ServiceIdentifier.d.ts","sourceRoot":"","sources":["../../../../src/services/models/ServiceIdentifier.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,MAAM,MAAM,iBAAiB,CAAC,SAAS,GAAG,OAAO,IAC7C,MAAM,GACN,MAAM,GACN,OAAO,CAAC,SAAS,CAAC,GAClB,eAAe,CAAC,SAAS,CAAC,GAE1B,QAAQ,CAAC"}
@@ -0,0 +1,23 @@
# @heroui/dom-animation
A Quick description of the component
> This is an internal utility, not intended for public usage.
## Installation
```sh
yarn add @heroui/dom-animation
# or
npm i @heroui/dom-animation
```
## Contribution
Yes please! See the
[contributing guidelines](https://github.com/heroui-inc/heroui/blob/master/CONTRIBUTING.md)
for details.
## License
This project is licensed under the terms of the
[MIT license](https://github.com/heroui-inc/heroui/blob/master/LICENSE).
@@ -0,0 +1,13 @@
import { Pattern } from '../types';
/**
* Designed to work only with simple paths: `dir\\file`.
*/
export declare function unixify(filepath: string): string;
export declare function makeAbsolute(cwd: string, filepath: string): string;
export declare function removeLeadingDotSegment(entry: string): string;
export declare const escape: typeof escapeWindowsPath;
export declare function escapeWindowsPath(pattern: Pattern): Pattern;
export declare function escapePosixPath(pattern: Pattern): Pattern;
export declare const convertPathToPattern: typeof convertWindowsPathToPattern;
export declare function convertWindowsPathToPattern(filepath: string): Pattern;
export declare function convertPosixPathToPattern(filepath: string): Pattern;
@@ -0,0 +1,11 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _classStaticPrivateMethodSet;
function _classStaticPrivateMethodSet() {
throw new TypeError("attempted to set read only static private field");
}
//# sourceMappingURL=classStaticPrivateMethodSet.js.map
@@ -0,0 +1,78 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _eachSeries = require('./eachSeries.js');
var _eachSeries2 = _interopRequireDefault(_eachSeries);
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 }; }
/**
* It runs each task in series but stops whenever any of the functions were
* successful. If one of the tasks were successful, the `callback` will be
* passed the result of the successful task. If all tasks fail, the callback
* will be passed the error and result (if any) of the final attempt.
*
* @name tryEach
* @static
* @memberOf module:ControlFlow
* @method
* @category Control Flow
* @param {Array|Iterable|AsyncIterable|Object} tasks - A collection containing functions to
* run, each function is passed a `callback(err, result)` it must call on
* completion with an error `err` (which can be `null`) and an optional `result`
* value.
* @param {Function} [callback] - An optional callback which is called when one
* of the tasks has succeeded, or all have failed. It receives the `err` and
* `result` arguments of the last attempt at completing the `task`. Invoked with
* (err, results).
* @returns {Promise} a promise, if no callback is passed
* @example
* async.tryEach([
* function getDataFromFirstWebsite(callback) {
* // Try getting the data from the first website
* callback(err, data);
* },
* function getDataFromSecondWebsite(callback) {
* // First website failed,
* // Try getting the data from the backup website
* callback(err, data);
* }
* ],
* // optional callback
* function(err, results) {
* Now do something with the data.
* });
*
*/
function tryEach(tasks, callback) {
var error = null;
var result;
return (0, _eachSeries2.default)(tasks, (task, taskCb) => {
(0, _wrapAsync2.default)(task)((err, ...args) => {
if (err === false) return taskCb(err);
if (args.length < 2) {
[result] = args;
} else {
result = args;
}
error = err;
taskCb(err ? null : {});
});
}, () => callback(error, result));
}
exports.default = (0, _awaitify2.default)(tryEach);
module.exports = exports.default;
@@ -0,0 +1,60 @@
import {usePress as $f6c31cce2adf654f$export$45712eceda6fad21} from "./usePress.module.js";
import {useFocusable as $f645667febf57a63$export$4c014de7c8940b4c} from "./useFocusable.module.js";
import {useObjectRef as $hhDyF$useObjectRef, getOwnerWindow as $hhDyF$getOwnerWindow, isFocusable as $hhDyF$isFocusable, mergeProps as $hhDyF$mergeProps, mergeRefs as $hhDyF$mergeRefs} from "@react-aria/utils";
import $hhDyF$react, {useEffect as $hhDyF$useEffect} from "react";
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
const $3b117e43dc0ca95d$export$27c701ed9e449e99 = /*#__PURE__*/ (0, $hhDyF$react).forwardRef(({ children: children, ...props }, ref)=>{
ref = (0, $hhDyF$useObjectRef)(ref);
let { pressProps: pressProps } = (0, $f6c31cce2adf654f$export$45712eceda6fad21)({
...props,
ref: ref
});
let { focusableProps: focusableProps } = (0, $f645667febf57a63$export$4c014de7c8940b4c)(props, ref);
let child = (0, $hhDyF$react).Children.only(children);
(0, $hhDyF$useEffect)(()=>{
if (process.env.NODE_ENV === 'production') return;
let el = ref.current;
if (!el || !(el instanceof (0, $hhDyF$getOwnerWindow)(el).Element)) {
console.error('<Pressable> child must forward its ref to a DOM element.');
return;
}
if (!props.isDisabled && !(0, $hhDyF$isFocusable)(el)) {
console.warn('<Pressable> child must be focusable. Please ensure the tabIndex prop is passed through.');
return;
}
if (el.localName !== 'button' && el.localName !== 'input' && el.localName !== 'select' && el.localName !== 'textarea' && el.localName !== 'a' && el.localName !== 'area' && el.localName !== 'summary') {
let role = el.getAttribute('role');
if (!role) console.warn('<Pressable> child must have an interactive ARIA role.');
else if (// https://w3c.github.io/aria/#widget_roles
role !== 'application' && role !== 'button' && role !== 'checkbox' && role !== 'combobox' && role !== 'gridcell' && role !== 'link' && role !== 'menuitem' && role !== 'menuitemcheckbox' && role !== 'menuitemradio' && role !== 'option' && role !== 'radio' && role !== 'searchbox' && role !== 'separator' && role !== 'slider' && role !== 'spinbutton' && role !== 'switch' && role !== 'tab' && role !== 'textbox' && role !== 'treeitem') console.warn(`<Pressable> child must have an interactive ARIA role. Got "${role}".`);
}
}, [
ref,
props.isDisabled
]);
// @ts-ignore
let childRef = parseInt((0, $hhDyF$react).version, 10) < 19 ? child.ref : child.props.ref;
return /*#__PURE__*/ (0, $hhDyF$react).cloneElement(child, {
...(0, $hhDyF$mergeProps)(pressProps, focusableProps, child.props),
// @ts-ignore
ref: (0, $hhDyF$mergeRefs)(childRef, ref)
});
});
export {$3b117e43dc0ca95d$export$27c701ed9e449e99 as Pressable};
//# sourceMappingURL=Pressable.module.js.map
@@ -0,0 +1,10 @@
import { defineInjectionTokenMetadata } from "../reflection-helpers";
function inject(token, options) {
var data = {
token: token,
multiple: false,
isOptional: options && options.isOptional
};
return defineInjectionTokenMetadata(data);
}
export default inject;
@@ -0,0 +1,9 @@
import * as _heroui_system from '@heroui/system';
import { HTMLHeroUIProps } from '@heroui/system';
interface NavbarBrandProps extends HTMLHeroUIProps<"div"> {
children?: React.ReactNode | React.ReactNode[];
}
declare const NavbarBrand: _heroui_system.InternalForwardRefRenderFunction<"div", NavbarBrandProps, never>;
export { NavbarBrandProps, NavbarBrand as default };
@@ -0,0 +1,39 @@
# is-fullwidth-code-point [![Build Status](https://travis-ci.org/sindresorhus/is-fullwidth-code-point.svg?branch=master)](https://travis-ci.org/sindresorhus/is-fullwidth-code-point)
> Check if the character represented by a given [Unicode code point](https://en.wikipedia.org/wiki/Code_point) is [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms)
## Install
```
$ npm install is-fullwidth-code-point
```
## Usage
```js
const isFullwidthCodePoint = require('is-fullwidth-code-point');
isFullwidthCodePoint('谢'.codePointAt(0));
//=> true
isFullwidthCodePoint('a'.codePointAt(0));
//=> false
```
## API
### isFullwidthCodePoint(codePoint)
#### codePoint
Type: `number`
The [code point](https://en.wikipedia.org/wiki/Code_point) of a character.
## License
MIT © [Sindre Sorhus](https://sindresorhus.com)
@@ -0,0 +1,597 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.TypeGuardUnknownTypeError = void 0;
exports.IsReadonly = IsReadonly;
exports.IsOptional = IsOptional;
exports.IsAny = IsAny;
exports.IsArgument = IsArgument;
exports.IsArray = IsArray;
exports.IsAsyncIterator = IsAsyncIterator;
exports.IsBigInt = IsBigInt;
exports.IsBoolean = IsBoolean;
exports.IsComputed = IsComputed;
exports.IsConstructor = IsConstructor;
exports.IsDate = IsDate;
exports.IsFunction = IsFunction;
exports.IsImport = IsImport;
exports.IsInteger = IsInteger;
exports.IsProperties = IsProperties;
exports.IsIntersect = IsIntersect;
exports.IsIterator = IsIterator;
exports.IsKindOf = IsKindOf;
exports.IsLiteralString = IsLiteralString;
exports.IsLiteralNumber = IsLiteralNumber;
exports.IsLiteralBoolean = IsLiteralBoolean;
exports.IsLiteral = IsLiteral;
exports.IsLiteralValue = IsLiteralValue;
exports.IsMappedKey = IsMappedKey;
exports.IsMappedResult = IsMappedResult;
exports.IsNever = IsNever;
exports.IsNot = IsNot;
exports.IsNull = IsNull;
exports.IsNumber = IsNumber;
exports.IsObject = IsObject;
exports.IsPromise = IsPromise;
exports.IsRecord = IsRecord;
exports.IsRecursive = IsRecursive;
exports.IsRef = IsRef;
exports.IsRegExp = IsRegExp;
exports.IsString = IsString;
exports.IsSymbol = IsSymbol;
exports.IsTemplateLiteral = IsTemplateLiteral;
exports.IsThis = IsThis;
exports.IsTransform = IsTransform;
exports.IsTuple = IsTuple;
exports.IsUndefined = IsUndefined;
exports.IsUnionLiteral = IsUnionLiteral;
exports.IsUnion = IsUnion;
exports.IsUint8Array = IsUint8Array;
exports.IsUnknown = IsUnknown;
exports.IsUnsafe = IsUnsafe;
exports.IsVoid = IsVoid;
exports.IsKind = IsKind;
exports.IsSchema = IsSchema;
const ValueGuard = __importStar(require("./value"));
const index_1 = require("../symbols/index");
const index_2 = require("../error/index");
class TypeGuardUnknownTypeError extends index_2.TypeBoxError {
}
exports.TypeGuardUnknownTypeError = TypeGuardUnknownTypeError;
const KnownTypes = [
'Argument',
'Any',
'Array',
'AsyncIterator',
'BigInt',
'Boolean',
'Computed',
'Constructor',
'Date',
'Enum',
'Function',
'Integer',
'Intersect',
'Iterator',
'Literal',
'MappedKey',
'MappedResult',
'Not',
'Null',
'Number',
'Object',
'Promise',
'Record',
'Ref',
'RegExp',
'String',
'Symbol',
'TemplateLiteral',
'This',
'Tuple',
'Undefined',
'Union',
'Uint8Array',
'Unknown',
'Void',
];
function IsPattern(value) {
try {
new RegExp(value);
return true;
}
catch {
return false;
}
}
function IsControlCharacterFree(value) {
if (!ValueGuard.IsString(value))
return false;
for (let i = 0; i < value.length; i++) {
const code = value.charCodeAt(i);
if ((code >= 7 && code <= 13) || code === 27 || code === 127) {
return false;
}
}
return true;
}
function IsAdditionalProperties(value) {
return IsOptionalBoolean(value) || IsSchema(value);
}
function IsOptionalBigInt(value) {
return ValueGuard.IsUndefined(value) || ValueGuard.IsBigInt(value);
}
function IsOptionalNumber(value) {
return ValueGuard.IsUndefined(value) || ValueGuard.IsNumber(value);
}
function IsOptionalBoolean(value) {
return ValueGuard.IsUndefined(value) || ValueGuard.IsBoolean(value);
}
function IsOptionalString(value) {
return ValueGuard.IsUndefined(value) || ValueGuard.IsString(value);
}
function IsOptionalPattern(value) {
return ValueGuard.IsUndefined(value) || (ValueGuard.IsString(value) && IsControlCharacterFree(value) && IsPattern(value));
}
function IsOptionalFormat(value) {
return ValueGuard.IsUndefined(value) || (ValueGuard.IsString(value) && IsControlCharacterFree(value));
}
function IsOptionalSchema(value) {
return ValueGuard.IsUndefined(value) || IsSchema(value);
}
// ------------------------------------------------------------------
// Modifiers
// ------------------------------------------------------------------
/** Returns true if this value has a Readonly symbol */
function IsReadonly(value) {
return ValueGuard.IsObject(value) && value[index_1.ReadonlyKind] === 'Readonly';
}
/** Returns true if this value has a Optional symbol */
function IsOptional(value) {
return ValueGuard.IsObject(value) && value[index_1.OptionalKind] === 'Optional';
}
// ------------------------------------------------------------------
// Types
// ------------------------------------------------------------------
/** Returns true if the given value is TAny */
function IsAny(value) {
// prettier-ignore
return (IsKindOf(value, 'Any') &&
IsOptionalString(value.$id));
}
/** Returns true if the given value is TArgument */
function IsArgument(value) {
// prettier-ignore
return (IsKindOf(value, 'Argument') &&
ValueGuard.IsNumber(value.index));
}
/** Returns true if the given value is TArray */
function IsArray(value) {
return (IsKindOf(value, 'Array') &&
value.type === 'array' &&
IsOptionalString(value.$id) &&
IsSchema(value.items) &&
IsOptionalNumber(value.minItems) &&
IsOptionalNumber(value.maxItems) &&
IsOptionalBoolean(value.uniqueItems) &&
IsOptionalSchema(value.contains) &&
IsOptionalNumber(value.minContains) &&
IsOptionalNumber(value.maxContains));
}
/** Returns true if the given value is TAsyncIterator */
function IsAsyncIterator(value) {
// prettier-ignore
return (IsKindOf(value, 'AsyncIterator') &&
value.type === 'AsyncIterator' &&
IsOptionalString(value.$id) &&
IsSchema(value.items));
}
/** Returns true if the given value is TBigInt */
function IsBigInt(value) {
// prettier-ignore
return (IsKindOf(value, 'BigInt') &&
value.type === 'bigint' &&
IsOptionalString(value.$id) &&
IsOptionalBigInt(value.exclusiveMaximum) &&
IsOptionalBigInt(value.exclusiveMinimum) &&
IsOptionalBigInt(value.maximum) &&
IsOptionalBigInt(value.minimum) &&
IsOptionalBigInt(value.multipleOf));
}
/** Returns true if the given value is TBoolean */
function IsBoolean(value) {
// prettier-ignore
return (IsKindOf(value, 'Boolean') &&
value.type === 'boolean' &&
IsOptionalString(value.$id));
}
/** Returns true if the given value is TComputed */
function IsComputed(value) {
// prettier-ignore
return (IsKindOf(value, 'Computed') &&
ValueGuard.IsString(value.target) &&
ValueGuard.IsArray(value.parameters) &&
value.parameters.every((schema) => IsSchema(schema)));
}
/** Returns true if the given value is TConstructor */
function IsConstructor(value) {
// prettier-ignore
return (IsKindOf(value, 'Constructor') &&
value.type === 'Constructor' &&
IsOptionalString(value.$id) &&
ValueGuard.IsArray(value.parameters) &&
value.parameters.every(schema => IsSchema(schema)) &&
IsSchema(value.returns));
}
/** Returns true if the given value is TDate */
function IsDate(value) {
return (IsKindOf(value, 'Date') &&
value.type === 'Date' &&
IsOptionalString(value.$id) &&
IsOptionalNumber(value.exclusiveMaximumTimestamp) &&
IsOptionalNumber(value.exclusiveMinimumTimestamp) &&
IsOptionalNumber(value.maximumTimestamp) &&
IsOptionalNumber(value.minimumTimestamp) &&
IsOptionalNumber(value.multipleOfTimestamp));
}
/** Returns true if the given value is TFunction */
function IsFunction(value) {
// prettier-ignore
return (IsKindOf(value, 'Function') &&
value.type === 'Function' &&
IsOptionalString(value.$id) &&
ValueGuard.IsArray(value.parameters) &&
value.parameters.every(schema => IsSchema(schema)) &&
IsSchema(value.returns));
}
/** Returns true if the given value is TImport */
function IsImport(value) {
// prettier-ignore
return (IsKindOf(value, 'Import') &&
ValueGuard.HasPropertyKey(value, '$defs') &&
ValueGuard.IsObject(value.$defs) &&
IsProperties(value.$defs) &&
ValueGuard.HasPropertyKey(value, '$ref') &&
ValueGuard.IsString(value.$ref) &&
value.$ref in value.$defs // required
);
}
/** Returns true if the given value is TInteger */
function IsInteger(value) {
return (IsKindOf(value, 'Integer') &&
value.type === 'integer' &&
IsOptionalString(value.$id) &&
IsOptionalNumber(value.exclusiveMaximum) &&
IsOptionalNumber(value.exclusiveMinimum) &&
IsOptionalNumber(value.maximum) &&
IsOptionalNumber(value.minimum) &&
IsOptionalNumber(value.multipleOf));
}
/** Returns true if the given schema is TProperties */
function IsProperties(value) {
// prettier-ignore
return (ValueGuard.IsObject(value) &&
Object.entries(value).every(([key, schema]) => IsControlCharacterFree(key) && IsSchema(schema)));
}
/** Returns true if the given value is TIntersect */
function IsIntersect(value) {
// prettier-ignore
return (IsKindOf(value, 'Intersect') &&
(ValueGuard.IsString(value.type) && value.type !== 'object' ? false : true) &&
ValueGuard.IsArray(value.allOf) &&
value.allOf.every(schema => IsSchema(schema) && !IsTransform(schema)) &&
IsOptionalString(value.type) &&
(IsOptionalBoolean(value.unevaluatedProperties) || IsOptionalSchema(value.unevaluatedProperties)) &&
IsOptionalString(value.$id));
}
/** Returns true if the given value is TIterator */
function IsIterator(value) {
// prettier-ignore
return (IsKindOf(value, 'Iterator') &&
value.type === 'Iterator' &&
IsOptionalString(value.$id) &&
IsSchema(value.items));
}
/** Returns true if the given value is a TKind with the given name. */
function IsKindOf(value, kind) {
return ValueGuard.IsObject(value) && index_1.Kind in value && value[index_1.Kind] === kind;
}
/** Returns true if the given value is TLiteral<string> */
function IsLiteralString(value) {
return IsLiteral(value) && ValueGuard.IsString(value.const);
}
/** Returns true if the given value is TLiteral<number> */
function IsLiteralNumber(value) {
return IsLiteral(value) && ValueGuard.IsNumber(value.const);
}
/** Returns true if the given value is TLiteral<boolean> */
function IsLiteralBoolean(value) {
return IsLiteral(value) && ValueGuard.IsBoolean(value.const);
}
/** Returns true if the given value is TLiteral */
function IsLiteral(value) {
// prettier-ignore
return (IsKindOf(value, 'Literal') &&
IsOptionalString(value.$id) && IsLiteralValue(value.const));
}
/** Returns true if the given value is a TLiteralValue */
function IsLiteralValue(value) {
return ValueGuard.IsBoolean(value) || ValueGuard.IsNumber(value) || ValueGuard.IsString(value);
}
/** Returns true if the given value is a TMappedKey */
function IsMappedKey(value) {
// prettier-ignore
return (IsKindOf(value, 'MappedKey') &&
ValueGuard.IsArray(value.keys) &&
value.keys.every(key => ValueGuard.IsNumber(key) || ValueGuard.IsString(key)));
}
/** Returns true if the given value is TMappedResult */
function IsMappedResult(value) {
// prettier-ignore
return (IsKindOf(value, 'MappedResult') &&
IsProperties(value.properties));
}
/** Returns true if the given value is TNever */
function IsNever(value) {
// prettier-ignore
return (IsKindOf(value, 'Never') &&
ValueGuard.IsObject(value.not) &&
Object.getOwnPropertyNames(value.not).length === 0);
}
/** Returns true if the given value is TNot */
function IsNot(value) {
// prettier-ignore
return (IsKindOf(value, 'Not') &&
IsSchema(value.not));
}
/** Returns true if the given value is TNull */
function IsNull(value) {
// prettier-ignore
return (IsKindOf(value, 'Null') &&
value.type === 'null' &&
IsOptionalString(value.$id));
}
/** Returns true if the given value is TNumber */
function IsNumber(value) {
return (IsKindOf(value, 'Number') &&
value.type === 'number' &&
IsOptionalString(value.$id) &&
IsOptionalNumber(value.exclusiveMaximum) &&
IsOptionalNumber(value.exclusiveMinimum) &&
IsOptionalNumber(value.maximum) &&
IsOptionalNumber(value.minimum) &&
IsOptionalNumber(value.multipleOf));
}
/** Returns true if the given value is TObject */
function IsObject(value) {
// prettier-ignore
return (IsKindOf(value, 'Object') &&
value.type === 'object' &&
IsOptionalString(value.$id) &&
IsProperties(value.properties) &&
IsAdditionalProperties(value.additionalProperties) &&
IsOptionalNumber(value.minProperties) &&
IsOptionalNumber(value.maxProperties));
}
/** Returns true if the given value is TPromise */
function IsPromise(value) {
// prettier-ignore
return (IsKindOf(value, 'Promise') &&
value.type === 'Promise' &&
IsOptionalString(value.$id) &&
IsSchema(value.item));
}
/** Returns true if the given value is TRecord */
function IsRecord(value) {
// prettier-ignore
return (IsKindOf(value, 'Record') &&
value.type === 'object' &&
IsOptionalString(value.$id) &&
IsAdditionalProperties(value.additionalProperties) &&
ValueGuard.IsObject(value.patternProperties) &&
((schema) => {
const keys = Object.getOwnPropertyNames(schema.patternProperties);
return (keys.length === 1 &&
IsPattern(keys[0]) &&
ValueGuard.IsObject(schema.patternProperties) &&
IsSchema(schema.patternProperties[keys[0]]));
})(value));
}
/** Returns true if this value is TRecursive */
function IsRecursive(value) {
return ValueGuard.IsObject(value) && index_1.Hint in value && value[index_1.Hint] === 'Recursive';
}
/** Returns true if the given value is TRef */
function IsRef(value) {
// prettier-ignore
return (IsKindOf(value, 'Ref') &&
IsOptionalString(value.$id) &&
ValueGuard.IsString(value.$ref));
}
/** Returns true if the given value is TRegExp */
function IsRegExp(value) {
// prettier-ignore
return (IsKindOf(value, 'RegExp') &&
IsOptionalString(value.$id) &&
ValueGuard.IsString(value.source) &&
ValueGuard.IsString(value.flags) &&
IsOptionalNumber(value.maxLength) &&
IsOptionalNumber(value.minLength));
}
/** Returns true if the given value is TString */
function IsString(value) {
// prettier-ignore
return (IsKindOf(value, 'String') &&
value.type === 'string' &&
IsOptionalString(value.$id) &&
IsOptionalNumber(value.minLength) &&
IsOptionalNumber(value.maxLength) &&
IsOptionalPattern(value.pattern) &&
IsOptionalFormat(value.format));
}
/** Returns true if the given value is TSymbol */
function IsSymbol(value) {
// prettier-ignore
return (IsKindOf(value, 'Symbol') &&
value.type === 'symbol' &&
IsOptionalString(value.$id));
}
/** Returns true if the given value is TTemplateLiteral */
function IsTemplateLiteral(value) {
// prettier-ignore
return (IsKindOf(value, 'TemplateLiteral') &&
value.type === 'string' &&
ValueGuard.IsString(value.pattern) &&
value.pattern[0] === '^' &&
value.pattern[value.pattern.length - 1] === '$');
}
/** Returns true if the given value is TThis */
function IsThis(value) {
// prettier-ignore
return (IsKindOf(value, 'This') &&
IsOptionalString(value.$id) &&
ValueGuard.IsString(value.$ref));
}
/** Returns true of this value is TTransform */
function IsTransform(value) {
return ValueGuard.IsObject(value) && index_1.TransformKind in value;
}
/** Returns true if the given value is TTuple */
function IsTuple(value) {
// prettier-ignore
return (IsKindOf(value, 'Tuple') &&
value.type === 'array' &&
IsOptionalString(value.$id) &&
ValueGuard.IsNumber(value.minItems) &&
ValueGuard.IsNumber(value.maxItems) &&
value.minItems === value.maxItems &&
(( // empty
ValueGuard.IsUndefined(value.items) &&
ValueGuard.IsUndefined(value.additionalItems) &&
value.minItems === 0) || (ValueGuard.IsArray(value.items) &&
value.items.every(schema => IsSchema(schema)))));
}
/** Returns true if the given value is TUndefined */
function IsUndefined(value) {
// prettier-ignore
return (IsKindOf(value, 'Undefined') &&
value.type === 'undefined' &&
IsOptionalString(value.$id));
}
/** Returns true if the given value is TUnion<Literal<string | number>[]> */
function IsUnionLiteral(value) {
return IsUnion(value) && value.anyOf.every((schema) => IsLiteralString(schema) || IsLiteralNumber(schema));
}
/** Returns true if the given value is TUnion */
function IsUnion(value) {
// prettier-ignore
return (IsKindOf(value, 'Union') &&
IsOptionalString(value.$id) &&
ValueGuard.IsObject(value) &&
ValueGuard.IsArray(value.anyOf) &&
value.anyOf.every(schema => IsSchema(schema)));
}
/** Returns true if the given value is TUint8Array */
function IsUint8Array(value) {
// prettier-ignore
return (IsKindOf(value, 'Uint8Array') &&
value.type === 'Uint8Array' &&
IsOptionalString(value.$id) &&
IsOptionalNumber(value.minByteLength) &&
IsOptionalNumber(value.maxByteLength));
}
/** Returns true if the given value is TUnknown */
function IsUnknown(value) {
// prettier-ignore
return (IsKindOf(value, 'Unknown') &&
IsOptionalString(value.$id));
}
/** Returns true if the given value is a raw TUnsafe */
function IsUnsafe(value) {
return IsKindOf(value, 'Unsafe');
}
/** Returns true if the given value is TVoid */
function IsVoid(value) {
// prettier-ignore
return (IsKindOf(value, 'Void') &&
value.type === 'void' &&
IsOptionalString(value.$id));
}
/** Returns true if the given value is TKind */
function IsKind(value) {
return ValueGuard.IsObject(value) && index_1.Kind in value && ValueGuard.IsString(value[index_1.Kind]) && !KnownTypes.includes(value[index_1.Kind]);
}
/** Returns true if the given value is TSchema */
function IsSchema(value) {
// prettier-ignore
return (ValueGuard.IsObject(value)) && (IsAny(value) ||
IsArgument(value) ||
IsArray(value) ||
IsBoolean(value) ||
IsBigInt(value) ||
IsAsyncIterator(value) ||
IsComputed(value) ||
IsConstructor(value) ||
IsDate(value) ||
IsFunction(value) ||
IsInteger(value) ||
IsIntersect(value) ||
IsIterator(value) ||
IsLiteral(value) ||
IsMappedKey(value) ||
IsMappedResult(value) ||
IsNever(value) ||
IsNot(value) ||
IsNull(value) ||
IsNumber(value) ||
IsObject(value) ||
IsPromise(value) ||
IsRecord(value) ||
IsRef(value) ||
IsRegExp(value) ||
IsString(value) ||
IsSymbol(value) ||
IsTemplateLiteral(value) ||
IsThis(value) ||
IsTuple(value) ||
IsUndefined(value) ||
IsUnion(value) ||
IsUint8Array(value) ||
IsUnknown(value) ||
IsUnsafe(value) ||
IsVoid(value) ||
IsKind(value));
}
@@ -0,0 +1,3 @@
declare const _default: (value: unknown) => value is Date;
export default _default;
//# sourceMappingURL=isDateObject.d.ts.map
@@ -0,0 +1,41 @@
var $c870f3b549c61b6b$exports = require("./Item.main.js");
var $350f13aa4d8b327c$exports = require("./Section.main.js");
var $98fc0fafaca75b6a$exports = require("./useCollection.main.js");
var $e749fe52977fe2c2$exports = require("./getItemCount.main.js");
var $7a155683b0d79a6a$exports = require("./getChildNodes.main.js");
var $51588fd411aace25$exports = require("./CollectionBuilder.main.js");
function $parcel$export(e, n, v, s) {
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
}
$parcel$export(module.exports, "Item", () => $c870f3b549c61b6b$exports.Item);
$parcel$export(module.exports, "Section", () => $350f13aa4d8b327c$exports.Section);
$parcel$export(module.exports, "useCollection", () => $98fc0fafaca75b6a$exports.useCollection);
$parcel$export(module.exports, "getItemCount", () => $e749fe52977fe2c2$exports.getItemCount);
$parcel$export(module.exports, "getChildNodes", () => $7a155683b0d79a6a$exports.getChildNodes);
$parcel$export(module.exports, "getFirstItem", () => $7a155683b0d79a6a$exports.getFirstItem);
$parcel$export(module.exports, "getLastItem", () => $7a155683b0d79a6a$exports.getLastItem);
$parcel$export(module.exports, "getNthItem", () => $7a155683b0d79a6a$exports.getNthItem);
$parcel$export(module.exports, "compareNodeOrder", () => $7a155683b0d79a6a$exports.compareNodeOrder);
$parcel$export(module.exports, "CollectionBuilder", () => $51588fd411aace25$exports.CollectionBuilder);
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
//# sourceMappingURL=main.js.map
@@ -0,0 +1,33 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/regex.ts
var regex_exports = {};
__export(regex_exports, {
isPatternNumeric: () => isPatternNumeric
});
module.exports = __toCommonJS(regex_exports);
var isPatternNumeric = (pattern) => {
const numericPattern = /(^|\W)[0-9](\W|$)/;
return numericPattern.test(pattern) && !/[^\d\^$\[\]\(\)\*\+\-\.\|]/.test(pattern);
};
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
isPatternNumeric
});
@@ -0,0 +1,80 @@
import { AsnArray } from "@peculiar/asn1-schema";
/**
* ```asn1
* id-ce-extKeyUsage OBJECT IDENTIFIER ::= { id-ce 37 }
* ```
*/
export declare const id_ce_extKeyUsage = "2.5.29.37";
/**
* ```asn1
* KeyPurposeId ::= OBJECT IDENTIFIER
* ```
*/
export type KeyPurposeId = string;
/**
* ```asn1
* ExtKeyUsageSyntax ::= SEQUENCE SIZE (1..MAX) OF KeyPurposeId
* ```
*/
export declare class ExtendedKeyUsage extends AsnArray<string> {
constructor(items?: string[]);
}
/**
* ```asn1
* anyExtendedKeyUsage OBJECT IDENTIFIER ::= { id-ce-extKeyUsage 0 }
* ```
*/
export declare const anyExtendedKeyUsage = "2.5.29.37.0";
/**
* ```asn1
* id-kp-serverAuth OBJECT IDENTIFIER ::= { id-kp 1 }
* -- TLS WWW server authentication
* -- Key usage bits that may be consistent: digitalSignature,
* -- keyEncipherment or keyAgreement
* ```
*/
export declare const id_kp_serverAuth = "1.3.6.1.5.5.7.3.1";
/**
* ```asn1
* id-kp-clientAuth OBJECT IDENTIFIER ::= { id-kp 2 }
* -- TLS WWW client authentication
* -- Key usage bits that may be consistent: digitalSignature
* -- and/or keyAgreement
* ```
*/
export declare const id_kp_clientAuth = "1.3.6.1.5.5.7.3.2";
/**
* ```asn1
* id-kp-codeSigning OBJECT IDENTIFIER ::= { id-kp 3 }
* -- Signing of downloadable executable code
* -- Key usage bits that may be consistent: digitalSignature
* ```
*/
export declare const id_kp_codeSigning = "1.3.6.1.5.5.7.3.3";
/**
* ```asn1
* id-kp-emailProtection OBJECT IDENTIFIER ::= { id-kp 4 }
* -- Email protection
* -- Key usage bits that may be consistent: digitalSignature,
* -- nonRepudiation, and/or (keyEncipherment or keyAgreement)
* ```
*/
export declare const id_kp_emailProtection = "1.3.6.1.5.5.7.3.4";
/**
* ```asn1
* id-kp-timeStamping OBJECT IDENTIFIER ::= { id-kp 8 }
* -- Binding the hash of an object to a time
* -- Key usage bits that may be consistent: digitalSignature
* -- and/or nonRepudiation
* ```
*/
export declare const id_kp_timeStamping = "1.3.6.1.5.5.7.3.8";
/**
* ```asn1
* id-kp-OCSPSigning OBJECT IDENTIFIER ::= { id-kp 9 }
* -- Signing OCSP responses
* -- Key usage bits that may be consistent: digitalSignature
* -- and/or nonRepudiation
* ```
*/
export declare const id_kp_OCSPSigning = "1.3.6.1.5.5.7.3.9";
@@ -0,0 +1 @@
module.exports={C:{"115":0.10786,"128":0.03595,"136":0.01541,"140":0.3287,"142":0.03082,"143":0.34925,"144":0.51874,_:"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 125 126 127 129 130 131 132 133 134 135 137 138 139 141 145 146 147 3.5 3.6"},D:{"46":0.00514,"49":0.00514,"56":0.00514,"109":0.40061,"112":0.02054,"116":0.01541,"118":0.00514,"125":0.39034,"126":0.03595,"127":0.03595,"128":0.03082,"130":0.00514,"131":0.03082,"133":0.00514,"134":0.02054,"135":0.01541,"137":0.02054,"138":0.14381,"139":0.14381,"140":8.10461,"141":9.61459,"142":0.03082,_:"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 47 48 50 51 52 53 54 55 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 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 110 111 113 114 115 117 119 120 121 122 123 124 129 132 136 143 144 145"},F:{"122":0.23626,_:"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 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 115 116 117 118 119 120 121 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"128":0.00514,"139":0.06677,"140":0.03595,"141":1.77192,_:"12 13 14 15 16 17 18 79 80 81 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 115 116 117 118 119 120 121 122 123 124 125 126 127 129 130 131 132 133 134 135 136 137 138 142"},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 11.1 12.1 13.1 15.4 16.0 26.2","14.1":0.13354,"15.1":0.3133,"15.2-15.3":0.00514,"15.5":0.00514,"15.6":0.34411,"16.1":0.40061,"16.2":0.40061,"16.3":0.24139,"16.4":0.14894,"16.5":0.8269,"16.6":4.45291,"17.0":0.04109,"17.1":1.926,"17.2":0.41602,"17.3":0.16435,"17.4":2.14685,"17.5":0.8988,"17.6":7.89403,"18.0":0.08731,"18.1":0.13354,"18.2":0.04109,"18.3":0.17976,"18.4":0.30816,"18.5-18.6":0.76526,"26.0":1.17101,"26.1":0.01541},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00365,"5.0-5.1":0,"6.0-6.1":0.01462,"7.0-7.1":0.01096,"8.1-8.4":0,"9.0-9.2":0,"9.3":0.03289,"10.0-10.2":0.00365,"10.3":0.06213,"11.0-11.2":0.92101,"11.3-11.4":0.02193,"12.0-12.1":0.00731,"12.2-12.5":0.17909,"13.0-13.1":0,"13.2":0.01827,"13.3":0.00731,"13.4-13.7":0.02924,"14.0-14.4":0.06213,"14.5-14.8":0.06579,"15.0-15.1":0.06213,"15.2-15.3":0.04751,"15.4":0.05482,"15.5":0.06213,"15.6-15.8":0.81137,"16.0":0.10964,"16.1":0.20467,"16.2":0.10599,"16.3":0.19005,"16.4":0.04751,"16.5":0.08406,"16.6-16.7":1.08548,"17.0":0.07675,"17.1":0.11695,"17.2":0.08406,"17.3":0.12426,"17.4":0.21929,"17.5":0.37645,"17.6-17.7":0.95025,"18.0":0.21563,"18.1":0.44589,"18.2":0.24122,"18.3":0.77482,"18.4":0.39837,"18.5-18.6":20.31343,"26.0":2.51085,"26.1":0.09137},P:{"4":0.01116,"28":2.38923,"29":0.24562,_:"20 21 22 23 24 25 26 27 5.0-5.4 6.2-6.4 7.2-7.4 8.2 9.2 10.1 11.1-11.2 12.0 13.0 14.0 15.0 16.0 17.0 18.0 19.0"},I:{"0":0,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0,"4.4":0,"4.4.3-4.4.4":0},K:{"0":0,_:"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.04864},Q:{_:"14.9"},O:{_:"0"},H:{"0":0},L:{"0":9.41595}};
@@ -0,0 +1,55 @@
{
"name": "decimal.js",
"description": "An arbitrary-precision Decimal type for JavaScript.",
"version": "10.6.0",
"keywords": [
"arbitrary",
"precision",
"arithmetic",
"big",
"number",
"decimal",
"float",
"biginteger",
"bigdecimal",
"bignumber",
"bigint",
"bignum"
],
"repository" : {
"type": "git",
"url": "https://github.com/MikeMcl/decimal.js.git"
},
"main": "decimal",
"module": "decimal.mjs",
"browser": "decimal.js",
"exports": {
".": {
"types": "./decimal.d.ts",
"import": "./decimal.mjs",
"require": "./decimal.js"
},
"./decimal.mjs": "./decimal.mjs",
"./decimal.js": "./decimal.js",
"./package.json": "./package.json",
"./decimal": {
"types": "./decimal.d.ts",
"import": "./decimal.mjs",
"require": "./decimal.js"
}
},
"author": {
"name": "Michael Mclaughlin",
"email": "M8ch88l@gmail.com"
},
"license": "MIT",
"scripts": {
"test": "node ./test/test.js"
},
"types": "decimal.d.ts",
"files": [
"decimal.js",
"decimal.mjs",
"decimal.d.ts"
]
}
@@ -0,0 +1,5 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
tslib_1.__exportStar(require("./bit_string"), exports);
tslib_1.__exportStar(require("./octet_string"), exports);
@@ -0,0 +1,6 @@
import {
SendFilledIcon
} from "../chunk-DIGVROZI.mjs";
export {
SendFilledIcon
};
@@ -0,0 +1,230 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _table = _interopRequireDefault(require("./table"));
var _string = _interopRequireDefault(require("../util/string"));
var _encoding = _interopRequireDefault(require("./cff/encoding"));
var _cffStandardStrings = _interopRequireDefault(require("./cff/cffStandardStrings"));
var _parseCFFDict = _interopRequireDefault(require("./cff/parseCFFDict"));
var _parseCFFGlyph = _interopRequireDefault(require("./cff/parseCFFGlyph"));
var _parseCFFCharset = _interopRequireDefault(require("./cff/parseCFFCharset"));
var _parseCFFEncoding = _interopRequireDefault(require("./cff/parseCFFEncoding"));
var _reader = _interopRequireDefault(require("../reader"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* @file cff表
* @author mengke01(kekee000@gmail.com)
*
* reference:
* http://wwwimages.adobe.com/content/dam/Adobe/en/devnet/font/pdfs/5176.CFF.pdf
*
* modify from:
* https://github.com/nodebox/opentype.js/blob/master/src/tables/cff.js
*/
/**
* 获取cff偏移
*
* @param {Reader} reader 读取器
* @param {number} offSize 偏移大小
* @param {number} offset 起始偏移
* @return {number} 偏移
*/
function getOffset(reader, offSize) {
var v = 0;
for (var i = 0; i < offSize; i++) {
v <<= 8;
v += reader.readUint8();
}
return v;
}
/**
* 解析cff表头部
*
* @param {Reader} reader 读取器
* @return {Object} 头部字段
*/
function parseCFFHead(reader) {
var head = {};
head.startOffset = reader.offset;
head.endOffset = head.startOffset + 4;
head.formatMajor = reader.readUint8();
head.formatMinor = reader.readUint8();
head.size = reader.readUint8();
head.offsetSize = reader.readUint8();
return head;
}
/**
* 解析`CFF`表索引
*
* @param {Reader} reader 读取器
* @param {number} offset 偏移
* @param {Funciton} conversionFn 转换函数
* @return {Object} 表对象
*/
function parseCFFIndex(reader, offset, conversionFn) {
if (offset) {
reader.seek(offset);
}
var start = reader.offset;
var offsets = [];
var objects = [];
var count = reader.readUint16();
var i;
var l;
if (count !== 0) {
var offsetSize = reader.readUint8();
for (i = 0, l = count + 1; i < l; i++) {
offsets.push(getOffset(reader, offsetSize));
}
for (i = 0, l = count; i < l; i++) {
var value = reader.readBytes(offsets[i + 1] - offsets[i]);
if (conversionFn) {
value = conversionFn(value);
}
objects.push(value);
}
}
return {
objects: objects,
startOffset: start,
endOffset: reader.offset
};
}
// Subroutines are encoded using the negative half of the number space.
// See type 2 chapter 4.7 "Subroutine operators".
function calcCFFSubroutineBias(subrs) {
var bias;
if (subrs.length < 1240) {
bias = 107;
} else if (subrs.length < 33900) {
bias = 1131;
} else {
bias = 32768;
}
return bias;
}
var _default = exports.default = _table.default.create('cff', [], {
read: function read(reader, font) {
var offset = this.offset;
reader.seek(offset);
var head = parseCFFHead(reader);
var nameIndex = parseCFFIndex(reader, head.endOffset, _string.default.getString);
var topDictIndex = parseCFFIndex(reader, nameIndex.endOffset);
var stringIndex = parseCFFIndex(reader, topDictIndex.endOffset, _string.default.getString);
var globalSubrIndex = parseCFFIndex(reader, stringIndex.endOffset);
var cff = {
head: head
};
// 全局子glyf数据
cff.gsubrs = globalSubrIndex.objects;
cff.gsubrsBias = calcCFFSubroutineBias(globalSubrIndex.objects);
// 顶级字典数据
var dictReader = new _reader.default(new Uint8Array(topDictIndex.objects[0]).buffer);
var topDict = _parseCFFDict.default.parseTopDict(dictReader, 0, dictReader.length, stringIndex.objects);
cff.topDict = topDict;
// 私有字典数据
var privateDictLength = topDict.private[0];
var privateDict = {};
var privateDictOffset;
if (privateDictLength) {
privateDictOffset = offset + topDict.private[1];
privateDict = _parseCFFDict.default.parsePrivateDict(reader, privateDictOffset, privateDictLength, stringIndex.objects);
cff.defaultWidthX = privateDict.defaultWidthX;
cff.nominalWidthX = privateDict.nominalWidthX;
} else {
cff.defaultWidthX = 0;
cff.nominalWidthX = 0;
}
// 私有子glyf数据
if (privateDict.subrs) {
var subrOffset = privateDictOffset + privateDict.subrs;
var subrIndex = parseCFFIndex(reader, subrOffset);
cff.subrs = subrIndex.objects;
cff.subrsBias = calcCFFSubroutineBias(cff.subrs);
} else {
cff.subrs = [];
cff.subrsBias = 0;
}
cff.privateDict = privateDict;
// 解析glyf数据和名字
var charStringsIndex = parseCFFIndex(reader, offset + topDict.charStrings);
var nGlyphs = charStringsIndex.objects.length;
if (topDict.charset < 3) {
// @author: fr33z00
// See end of chapter 13 (p22) of #5176.CFF.pdf :
// Still more optimization is possible by
// observing that many fonts adopt one of 3 common charsets. In
// these cases the operand to the charset operator in the Top DICT
// specifies a predefined charset id, in place of an offset, as shown in table 22
cff.charset = _cffStandardStrings.default;
} else {
cff.charset = (0, _parseCFFCharset.default)(reader, offset + topDict.charset, nGlyphs, stringIndex.objects);
}
// Standard encoding
if (topDict.encoding === 0) {
cff.encoding = _encoding.default.standardEncoding;
}
// Expert encoding
else if (topDict.encoding === 1) {
cff.encoding = _encoding.default.expertEncoding;
} else {
cff.encoding = (0, _parseCFFEncoding.default)(reader, offset + topDict.encoding);
}
cff.glyf = [];
// only parse subset glyphs
var subset = font.readOptions.subset;
if (subset && subset.length > 0) {
// subset map
var subsetMap = {
0: true // 设置.notdef
};
var codes = font.cmap;
// unicode to index
Object.keys(codes).forEach(function (c) {
if (subset.indexOf(+c) > -1) {
var i = codes[c];
subsetMap[i] = true;
}
});
font.subsetMap = subsetMap;
Object.keys(subsetMap).forEach(function (i) {
i = +i;
var glyf = (0, _parseCFFGlyph.default)(charStringsIndex.objects[i], cff, i);
glyf.name = cff.charset[i];
cff.glyf[i] = glyf;
});
}
// parse all
else {
for (var i = 0, l = nGlyphs; i < l; i++) {
var glyf = (0, _parseCFFGlyph.default)(charStringsIndex.objects[i], cff, i);
glyf.name = cff.charset[i];
cff.glyf.push(glyf);
}
}
return cff;
},
// eslint-disable-next-line no-unused-vars
write: function write(writer, font) {
throw new Error('not support write cff table');
},
// eslint-disable-next-line no-unused-vars
size: function size(font) {
throw new Error('not support get cff table size');
}
});
@@ -0,0 +1,67 @@
/**
Create an opaque type, which hides its internal details from the public, and can only be created by being used explicitly.
The generic type parameter can be anything. It doesn't have to be an object.
[Read more about opaque types.](https://codemix.com/opaque-types-in-javascript/)
There have been several discussions about adding this feature to TypeScript via the `opaque type` operator, similar to how Flow does it. Unfortunately, nothing has (yet) moved forward:
- [Microsoft/TypeScript#15408](https://github.com/Microsoft/TypeScript/issues/15408)
- [Microsoft/TypeScript#15807](https://github.com/Microsoft/TypeScript/issues/15807)
@example
```
import {Opaque} from 'type-fest';
type AccountNumber = Opaque<number, 'AccountNumber'>;
type AccountBalance = Opaque<number, 'AccountBalance'>;
// The Token parameter allows the compiler to differentiate between types, whereas "unknown" will not. For example, consider the following structures:
type ThingOne = Opaque<string>;
type ThingTwo = Opaque<string>;
// To the compiler, these types are allowed to be cast to each other as they have the same underlying type. They are both `string & { __opaque__: unknown }`.
// To avoid this behaviour, you would instead pass the "Token" parameter, like so.
type NewThingOne = Opaque<string, 'ThingOne'>;
type NewThingTwo = Opaque<string, 'ThingTwo'>;
// Now they're completely separate types, so the following will fail to compile.
function createNewThingOne (): NewThingOne {
// As you can see, casting from a string is still allowed. However, you may not cast NewThingOne to NewThingTwo, and vice versa.
return 'new thing one' as NewThingOne;
}
// This will fail to compile, as they are fundamentally different types.
const thingTwo = createNewThingOne() as NewThingTwo;
// Here's another example of opaque typing.
function createAccountNumber(): AccountNumber {
return 2 as AccountNumber;
}
function getMoneyForAccount(accountNumber: AccountNumber): AccountBalance {
return 4 as AccountBalance;
}
// This will compile successfully.
getMoneyForAccount(createAccountNumber());
// But this won't, because it has to be explicitly passed as an `AccountNumber` type.
getMoneyForAccount(2);
// You can use opaque values like they aren't opaque too.
const accountNumber = createAccountNumber();
// This will not compile successfully.
const newAccountNumber = accountNumber + 2;
// As a side note, you can (and should) use recursive types for your opaque types to make them stronger and hopefully easier to type.
type Person = {
id: Opaque<number, Person>;
name: string;
};
```
@category Utilities
*/
export type Opaque<Type, Token = unknown> = Type & {readonly __opaque__: Token};
@@ -0,0 +1 @@
{"name":"tar-stream","version":"1.6.2","requiresBuild":false,"files":{"package.json":{"checkedAt":1794532100887,"integrity":"sha512-NZDbulJ536xBcb9JY9iEZf7IKtcorIeHgeBosnN5uRZtz5KWaIqSjtbXNGuNKZFAwluQTpNV2WBnf02boayCkQ==","mode":420,"size":1411},"extract.js":{"checkedAt":1794532100887,"integrity":"sha512-Iobh15Tt7WNis3yZktyBvaF+StwTyIHHHCaB0rwyqdLQu29eUhfoiU/tA1FFo/hzNCrTAQmRNuOPURNrleHC5g==","mode":420,"size":5928},"headers.js":{"checkedAt":1794532100887,"integrity":"sha512-dfbStfLeNJk4A6PNYUE7fSgy5xh6tJRYRVGD1+sfBWjvDDKKjSF4grHohaZrgkQ3dEeQmoLZ94JqMYaZJczXug==","mode":420,"size":7419},"index.js":{"checkedAt":1794532100887,"integrity":"sha512-lXyFEKvrCDocaeShOWW+cGmdEMEbN9APaVHSvnPF7rFd+DVSgOUee//0npaaze2Oi7jA8vrY5X2udTUIev30hw==","mode":420,"size":72},"LICENSE":{"checkedAt":1794532100887,"integrity":"sha512-tSuhQwQoEtbdEDGhKUav3bbo+Ou8cWnFnBONFqr8XiYarpL+ax6pSj2A450kFcSyGXEO9Gk5ot8TXbJKDPcS+w==","mode":420,"size":1078},"pack.js":{"checkedAt":1794532100887,"integrity":"sha512-i41JgdQEwRJPei8nl6gRroebYqSLLgMXrIFPZEiKC9WbwftYUQhOr5jkMbJP3rDPOQ4vuelvcR6e2lVVDxIR2g==","mode":420,"size":5633},"README.md":{"checkedAt":1794532100887,"integrity":"sha512-Cmw+MZjl+wgfry2ER3gww2Cx5kM7HrNHQVfZTbcmi+0IdYB/Cfu/PGmHQnQWIh1y9wMIPnkMvXsox0vJcLehsg==","mode":420,"size":5241}}}
@@ -0,0 +1,69 @@
/**
* @import {
* Construct,
* State,
* TokenizeContext,
* Tokenizer
* } from 'micromark-util-types'
*/
import {ok as assert} from 'devlop'
import {asciiPunctuation} from 'micromark-util-character'
import {codes, types} from 'micromark-util-symbol'
/** @type {Construct} */
export const characterEscape = {
name: 'characterEscape',
tokenize: tokenizeCharacterEscape
}
/**
* @this {TokenizeContext}
* Context.
* @type {Tokenizer}
*/
function tokenizeCharacterEscape(effects, ok, nok) {
return start
/**
* Start of character escape.
*
* ```markdown
* > | a\*b
* ^
* ```
*
* @type {State}
*/
function start(code) {
assert(code === codes.backslash, 'expected `\\`')
effects.enter(types.characterEscape)
effects.enter(types.escapeMarker)
effects.consume(code)
effects.exit(types.escapeMarker)
return inside
}
/**
* After `\`, at punctuation.
*
* ```markdown
* > | a\*b
* ^
* ```
*
* @type {State}
*/
function inside(code) {
// ASCII punctuation.
if (asciiPunctuation(code)) {
effects.enter(types.characterEscapeValue)
effects.consume(code)
effects.exit(types.characterEscapeValue)
effects.exit(types.characterEscape)
return ok
}
return nok(code)
}
}
@@ -0,0 +1,98 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = woff2ttf;
var _reader = _interopRequireDefault(require("./reader"));
var _writer = _interopRequireDefault(require("./writer"));
var _error = _interopRequireDefault(require("./error"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* @file woff转换ttf
* @author mengke01(kekee000@gmail.com)
*/
/**
* woff格式转换成ttf字体格式
*
* @param {ArrayBuffer} woffBuffer woff缓冲数组
* @param {Object} options 选项
* @param {Object} options.inflate 解压相关函数
*
* @return {ArrayBuffer} ttf格式byte流
*/
function woff2ttf(woffBuffer) {
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var reader = new _reader.default(woffBuffer);
var signature = reader.readUint32(0);
var flavor = reader.readUint32(4);
if (signature !== 0x774F4646 || flavor !== 0x10000 && flavor !== 0x4f54544f) {
reader.dispose();
_error.default.raise(10102);
}
var numTables = reader.readUint16(12);
var ttfSize = reader.readUint32(16);
var tableEntries = [];
var tableEntry;
var i;
var l;
// 读取woff表索引信息
for (i = 0; i < numTables; ++i) {
reader.seek(44 + i * 20);
tableEntry = {
tag: reader.readString(reader.offset, 4),
offset: reader.readUint32(),
compLength: reader.readUint32(),
length: reader.readUint32(),
checkSum: reader.readUint32()
};
// ttf 表数据
var deflateData = reader.readBytes(tableEntry.offset, tableEntry.compLength);
// 需要解压
if (deflateData.length < tableEntry.length) {
if (!options.inflate) {
reader.dispose();
_error.default.raise(10105);
}
tableEntry.data = options.inflate(deflateData);
} else {
tableEntry.data = deflateData;
}
tableEntry.length = tableEntry.data.length;
tableEntries.push(tableEntry);
}
var writer = new _writer.default(new ArrayBuffer(ttfSize));
// 写头部
var entrySelector = Math.floor(Math.log(numTables) / Math.LN2);
var searchRange = Math.pow(2, entrySelector) * 16;
var rangeShift = numTables * 16 - searchRange;
writer.writeUint32(flavor);
writer.writeUint16(numTables);
writer.writeUint16(searchRange);
writer.writeUint16(entrySelector);
writer.writeUint16(rangeShift);
// 写ttf表索引
var tblOffset = 12 + 16 * tableEntries.length;
for (i = 0, l = tableEntries.length; i < l; ++i) {
tableEntry = tableEntries[i];
writer.writeString(tableEntry.tag);
writer.writeUint32(tableEntry.checkSum);
writer.writeUint32(tblOffset);
writer.writeUint32(tableEntry.length);
tblOffset += tableEntry.length + (tableEntry.length % 4 ? 4 - tableEntry.length % 4 : 0);
}
// 写ttf表数据
for (i = 0, l = tableEntries.length; i < l; ++i) {
tableEntry = tableEntries[i];
writer.writeBytes(tableEntry.data);
if (tableEntry.length % 4) {
writer.writeEmpty(4 - tableEntry.length % 4);
}
}
return writer.getBuffer();
}
@@ -0,0 +1,72 @@
'use strict';
const nameStartChar = ':A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD';
const nameChar = nameStartChar + '\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040';
const nameRegexp = '[' + nameStartChar + '][' + nameChar + ']*'
const regexName = new RegExp('^' + nameRegexp + '$');
const getAllMatches = function(string, regex) {
const matches = [];
let match = regex.exec(string);
while (match) {
const allmatches = [];
allmatches.startIndex = regex.lastIndex - match[0].length;
const len = match.length;
for (let index = 0; index < len; index++) {
allmatches.push(match[index]);
}
matches.push(allmatches);
match = regex.exec(string);
}
return matches;
};
const isName = function(string) {
const match = regexName.exec(string);
return !(match === null || typeof match === 'undefined');
};
exports.isExist = function(v) {
return typeof v !== 'undefined';
};
exports.isEmptyObject = function(obj) {
return Object.keys(obj).length === 0;
};
/**
* Copy all the properties of a into b.
* @param {*} target
* @param {*} a
*/
exports.merge = function(target, a, arrayMode) {
if (a) {
const keys = Object.keys(a); // will return an array of own properties
const len = keys.length; //don't make it inline
for (let i = 0; i < len; i++) {
if (arrayMode === 'strict') {
target[keys[i]] = [ a[keys[i]] ];
} else {
target[keys[i]] = a[keys[i]];
}
}
}
};
/* exports.merge =function (b,a){
return Object.assign(b,a);
} */
exports.getValue = function(v) {
if (exports.isExist(v)) {
return v;
} else {
return '';
}
};
// const fakeCall = function(a) {return a;};
// const fakeCallNoReturn = function() {};
exports.isName = isName;
exports.getAllMatches = getAllMatches;
exports.nameRegexp = nameRegexp;
@@ -0,0 +1 @@
{"version":3,"file":"strike.js","names":["Bold","Strike","blotName","tagName"],"sources":["../../src/formats/strike.ts"],"sourcesContent":["import Bold from './bold.js';\n\nclass Strike extends Bold {\n static blotName = 'strike';\n static tagName = ['S', 'STRIKE'];\n}\n\nexport default Strike;\n"],"mappings":"AAAA,OAAOA,IAAI,MAAM,WAAW;AAE5B,MAAMC,MAAM,SAASD,IAAI,CAAC;EACxB,OAAOE,QAAQ,GAAG,QAAQ;EAC1B,OAAOC,OAAO,GAAG,CAAC,GAAG,EAAE,QAAQ,CAAC;AAClC;AAEA,eAAeF,MAAM","ignoreList":[]}
@@ -0,0 +1,2 @@
// this is the actual main file 'index.js', not 'wrong.js' like the package.json would indicate
module.exports = 1;
@@ -0,0 +1,556 @@
/* eslint-env mocha */
/* eslint no-template-curly-in-string: 0 */
import assert from 'assert';
import {
extractProp,
describeIfNotBabylon,
changePlugins,
setParserName,
setIsESM,
} from '../helper';
import { getLiteralPropValue } from '../../src/getPropValue';
describe('getLiteralPropValue', () => {
beforeEach(() => {
setParserName('babel');
});
it('should export a function', () => {
const expected = 'function';
const actual = typeof getLiteralPropValue;
assert.equal(actual, expected);
});
it('should return undefined when not provided with a JSXAttribute', () => {
const expected = undefined;
const actual = getLiteralPropValue(1);
assert.equal(actual, expected);
});
it('should not throw error when trying to get value from unknown node type', () => {
const prop = {
type: 'JSXAttribute',
value: {
type: 'JSXExpressionContainer',
},
};
let counter = 0;
// eslint-disable-next-line no-console
const errorOrig = console.error;
// eslint-disable-next-line no-console
console.error = () => {
counter += 1;
};
let value;
assert.doesNotThrow(() => {
value = getLiteralPropValue(prop);
}, Error);
assert.equal(null, value);
assert.equal(counter, 1);
// eslint-disable-next-line no-console
console.error = errorOrig;
});
describe('Null', () => {
it('should return true when no value is given', () => {
const prop = extractProp('<div foo />');
const expected = true;
const actual = getLiteralPropValue(prop);
assert.equal(actual, expected);
});
});
describe('Literal', () => {
it('should return correct string if value is a string', () => {
const prop = extractProp('<div foo="bar" />');
const expected = 'bar';
const actual = getLiteralPropValue(prop);
assert.equal(actual, expected);
});
it('should return correct string if value is a string expression', () => {
const prop = extractProp('<div foo={"bar"} />');
const expected = 'bar';
const actual = getLiteralPropValue(prop);
assert.equal(actual, expected);
});
it('should return correct integer if value is a integer expression', () => {
const prop = extractProp('<div foo={1} />');
const expected = 1;
const actual = getLiteralPropValue(prop);
assert.equal(actual, expected);
});
it('should convert "true" to boolean type', () => {
const prop = extractProp('<div foo="true" />');
const expected = true;
const actual = getLiteralPropValue(prop);
assert.equal(actual, expected);
});
it('should convert "TrUE" to boolean type', () => {
const prop = extractProp('<div foo="TrUE" />');
const expected = true;
const actual = getLiteralPropValue(prop);
assert.equal(actual, expected);
});
it('should convert "false" to boolean type', () => {
const prop = extractProp('<div foo="false" />');
const expected = false;
const actual = getLiteralPropValue(prop);
assert.equal(actual, expected);
});
it('should convert "FaLsE" to boolean type', () => {
const prop = extractProp('<div foo="FaLsE" />');
const expected = false;
const actual = getLiteralPropValue(prop);
assert.equal(actual, expected);
});
it('should return String null when value is null', () => {
const prop = extractProp('<div foo={null} />');
const expected = 'null';
const actual = getLiteralPropValue(prop);
assert.equal(actual, expected);
});
});
describe('JSXElement', () => {
it('should return null', () => {
const prop = extractProp('<div foo={<bar />} />');
const expected = null;
const actual = getLiteralPropValue(prop);
assert.equal(actual, expected);
});
});
describe('Identifier', () => {
it('should return null', () => {
const prop = extractProp('<div foo={bar} />');
const expected = null;
const actual = getLiteralPropValue(prop);
assert.equal(actual, expected);
});
it('should return undefined when identifier is literally `undefined`', () => {
const prop = extractProp('<div foo={undefined} />');
const expected = undefined;
const actual = getLiteralPropValue(prop);
assert.equal(actual, expected);
});
});
describeIfNotBabylon('Chain Expression', () => {
it('should return null', () => {
const prop = extractProp('<div foo={abc?.def} />');
const expected = null;
const actual = getLiteralPropValue(prop);
assert.equal(actual, expected);
});
});
describe('Template literal', () => {
it('should return template literal with vars wrapped in curly braces', () => {
const prop = extractProp('<div foo={`bar ${baz}`} />');
const expected = 'bar {baz}';
const actual = getLiteralPropValue(prop);
assert.equal(actual, expected);
});
it('should return string "undefined" for expressions that evaluate to undefined', () => {
const prop = extractProp('<div foo={`bar ${undefined}`} />');
const expected = 'bar undefined';
const actual = getLiteralPropValue(prop);
assert.equal(actual, expected);
});
});
describe('Tagged Template literal', () => {
it('should return template literal with vars wrapped in curly braces', () => {
const prop = extractProp('<div foo={noop`bar ${baz}`} />');
const expected = 'bar {baz}';
const actual = getLiteralPropValue(prop);
assert.equal(actual, expected);
});
it('should return string "undefined" for expressions that evaluate to undefined', () => {
const prop = extractProp('<div foo={noop`bar ${undefined}`} />');
const expected = 'bar undefined';
const actual = getLiteralPropValue(prop);
assert.equal(actual, expected);
});
});
describe('Arrow function expression', () => {
it('should return null', () => {
const prop = extractProp('<div foo={ () => { return "bar"; }} />');
const expected = null;
const actual = getLiteralPropValue(prop);
assert.equal(actual, expected);
});
});
describe('Function expression', () => {
it('should return null', () => {
const prop = extractProp('<div foo={ function() { return "bar"; } } />');
const expected = null;
const actual = getLiteralPropValue(prop);
assert.equal(actual, expected);
});
});
describe('Logical expression', () => {
it('should return null for && operator', () => {
const prop = extractProp('<div foo={bar && baz} />');
const expected = null;
const actual = getLiteralPropValue(prop);
assert.equal(actual, expected);
});
it('should return null for || operator', () => {
const prop = extractProp('<div foo={bar || baz} />');
const expected = null;
const actual = getLiteralPropValue(prop);
assert.equal(actual, expected);
});
});
describe('Member expression', () => {
it('should return null', () => {
const prop = extractProp('<div foo={bar.baz} />');
const expected = null;
const actual = getLiteralPropValue(prop);
assert.equal(actual, expected);
});
});
describe('Call expression', () => {
it('should return null', () => {
const prop = extractProp('<div foo={bar()} />');
const expected = null;
const actual = getLiteralPropValue(prop);
assert.equal(actual, expected);
});
});
describe('Unary expression', () => {
it('should correctly evaluate an expression that prefixes with -', () => {
const prop = extractProp('<div foo={-bar} />');
// -"bar" => NaN
const expected = true;
const actual = Number.isNaN(getLiteralPropValue(prop));
assert.equal(actual, expected);
});
it('should correctly evaluate an expression that prefixes with -', () => {
const prop = extractProp('<div foo={-42} />');
const expected = -42;
const actual = getLiteralPropValue(prop);
assert.equal(actual, expected);
});
it('should correctly evaluate an expression that prefixes with +', () => {
const prop = extractProp('<div foo={+bar} />');
// +"bar" => NaN
const expected = true;
const actual = Number.isNaN(getLiteralPropValue(prop));
assert.equal(actual, expected);
});
it('should correctly evaluate an expression that prefixes with +', () => {
const prop = extractProp('<div foo={+42} />');
const expected = 42;
const actual = getLiteralPropValue(prop);
assert.equal(actual, expected);
});
it('should correctly evaluate an expression that prefixes with !', () => {
const prop = extractProp('<div foo={!bar} />');
const expected = false; // !"bar" === false
const actual = getLiteralPropValue(prop);
assert.equal(actual, expected);
});
it('should correctly evaluate an expression that prefixes with ~', () => {
const prop = extractProp('<div foo={~bar} />');
const expected = -1; // ~"bar" === -1
const actual = getLiteralPropValue(prop);
assert.equal(actual, expected);
});
it('should return true when evaluating `delete foo`', () => {
const prop = extractProp('<div foo={delete x} />');
const expected = true;
const actual = getLiteralPropValue(prop);
assert.equal(actual, expected);
});
it('should return undefined when evaluating `void foo`', () => {
const prop = extractProp('<div foo={void x} />');
const expected = undefined;
const actual = getLiteralPropValue(prop);
assert.equal(actual, expected);
});
// TODO: We should fix this to check to see if we can evaluate it.
it('should return undefined when evaluating `typeof foo`', () => {
const prop = extractProp('<div foo={typeof x} />');
const expected = undefined;
const actual = getLiteralPropValue(prop);
assert.equal(actual, expected);
});
});
describe('Update expression', () => {
it('should correctly evaluate an expression that prefixes with ++', () => {
const prop = extractProp('<div foo={++bar} />');
// ++"bar" => NaN
const expected = true;
const actual = Number.isNaN(getLiteralPropValue(prop));
assert.equal(actual, expected);
});
it('should correctly evaluate an expression that prefixes with --', () => {
const prop = extractProp('<div foo={--bar} />');
// --"bar" => NaN
const expected = true;
const actual = Number.isNaN(getLiteralPropValue(prop));
assert.equal(actual, expected);
});
it('should correctly evaluate an expression that suffixes with ++', () => {
const prop = extractProp('<div foo={bar++} />');
// "bar"++ => NaN
const expected = true;
const actual = Number.isNaN(getLiteralPropValue(prop));
assert.equal(actual, expected);
});
it('should correctly evaluate an expression that suffixes with --', () => {
const prop = extractProp('<div foo={bar--} />');
// "bar"-- => NaN
const expected = true;
const actual = Number.isNaN(getLiteralPropValue(prop));
assert.equal(actual, expected);
});
});
describe('This expression', () => {
it('should return null', () => {
const prop = extractProp('<div foo={this} />');
const expected = null;
const actual = getLiteralPropValue(prop);
assert.equal(actual, expected);
});
});
describe('Conditional expression', () => {
it('should return null', () => {
const prop = extractProp('<div foo={bar ? baz : bam} />');
const expected = null;
const actual = getLiteralPropValue(prop);
assert.equal(actual, expected);
});
});
describe('Binary expression', () => {
it('should return null', () => {
const prop = extractProp('<div foo={1 == "1"} />');
const expected = null;
const actual = getLiteralPropValue(prop);
assert.equal(actual, expected);
});
});
describe('Object expression', () => {
it('should return null', () => {
const prop = extractProp('<div foo={ { bar: "baz" } } />');
const expected = null;
const actual = getLiteralPropValue(prop);
assert.deepEqual(actual, expected);
});
});
describe('New expression', () => {
it('should return null', () => {
const prop = extractProp('<div foo={new Bar()} />');
const expected = null;
const actual = getLiteralPropValue(prop);
assert.deepEqual(actual, expected);
});
});
describe('Array expression', () => {
it('should evaluate to correct representation of the the array in props', () => {
const prop = extractProp('<div foo={["bar", 42, null]} />');
const expected = ['bar', 42];
const actual = getLiteralPropValue(prop);
assert.deepEqual(actual, expected);
});
});
it('should return an empty array provided an empty array in props', () => {
const prop = extractProp('<div foo={[]} />');
const expected = [];
const actual = getLiteralPropValue(prop);
assert.deepEqual(actual, expected);
});
describe('Bind expression', () => {
it('should return null', () => {
const prop = extractProp('<div foo={::this.handleClick} />');
const expected = null;
const actual = getLiteralPropValue(prop);
assert.deepEqual(actual, expected);
});
});
describeIfNotBabylon('import.meta', () => {
beforeEach(() => {
setIsESM();
});
it('should return null', () => {
const prop = extractProp('<div foo={import.meta.env.whyIsThisNotOnProcess} />');
const expected = null;
const actual = getLiteralPropValue(prop);
assert.deepEqual(actual, expected);
});
});
describeIfNotBabylon('Typescript', () => {
beforeEach(() => {
changePlugins((pls) => [...pls, 'typescript']);
});
it('should return string representation of variable identifier wrapped in a Typescript non-null assertion', () => {
const prop = extractProp('<div foo={bar!} />');
const expected = null;
const actual = getLiteralPropValue(prop);
assert.equal(actual, expected);
});
it('should return string representation of variable identifier wrapped in a deep Typescript non-null assertion', () => {
const prop = extractProp('<div foo={(bar!)!} />');
const expected = null;
const actual = getLiteralPropValue(prop);
assert.equal(actual, expected);
});
it('should return string representation of variable identifier wrapped in a Typescript type coercion', () => {
changePlugins((pls) => [...pls, 'typescript']);
const prop = extractProp('<div foo={bar as any} />');
const expected = null;
const actual = getLiteralPropValue(prop);
assert.equal(actual, expected);
});
it('should work with a this.props value', () => {
const prop = extractProp('<a href={this.props.href!}>Download</a>', 'href');
const expected = null;
const actual = getLiteralPropValue(prop);
assert.equal(actual, expected);
});
});
});
@@ -0,0 +1,56 @@
{
"name": "@heroui/shared-icons",
"version": "2.1.10",
"description": "Internal icons set, commonly used in the components stories",
"keywords": [
"icons-utils"
],
"author": "HeroUI <support@heroui.com>",
"homepage": "https://heroui.com",
"license": "MIT",
"main": "dist/index.js",
"sideEffects": false,
"files": [
"dist"
],
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git",
"url": "git+https://github.com/heroui-inc/heroui.git",
"directory": "packages/utilities/icons-utils"
},
"bugs": {
"url": "https://github.com/heroui-inc/heroui/issues"
},
"peerDependencies": {
"react": ">=18 || >=19.0.0-rc.0"
},
"clean-package": "../../../clean-package.config.json",
"tsup": {
"clean": true,
"target": "es2019",
"format": [
"cjs",
"esm"
]
},
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.js"
},
"./package.json": "./package.json"
},
"scripts": {
"build": "tsup src --dts",
"dev": "pnpm build:fast --watch",
"clean": "rimraf dist .turbo",
"typecheck": "tsc --noEmit",
"build:fast": "tsup src"
}
}
@@ -0,0 +1,118 @@
/**
* container.js: Inversion of control container for winston logger instances.
*
* (C) 2010 Charlie Robbins
* MIT LICENCE
*/
'use strict';
const createLogger = require('./create-logger');
/**
* Inversion of control container for winston logger instances.
* @type {Container}
*/
module.exports = class Container {
/**
* Constructor function for the Container object responsible for managing a
* set of `winston.Logger` instances based on string ids.
* @param {!Object} [options={}] - Default pass-thru options for Loggers.
*/
constructor(options = {}) {
this.loggers = new Map();
this.options = options;
}
/**
* Retrieves a `winston.Logger` instance for the specified `id`. If an
* instance does not exist, one is created.
* @param {!string} id - The id of the Logger to get.
* @param {?Object} [options] - Options for the Logger instance.
* @returns {Logger} - A configured Logger instance with a specified id.
*/
add(id, options) {
if (!this.loggers.has(id)) {
// Remark: Simple shallow clone for configuration options in case we pass
// in instantiated protoypal objects
options = Object.assign({}, options || this.options);
const existing = options.transports || this.options.transports;
// Remark: Make sure if we have an array of transports we slice it to
// make copies of those references.
if (existing) {
options.transports = Array.isArray(existing) ? existing.slice() : [existing];
} else {
options.transports = [];
}
const logger = createLogger(options);
logger.on('close', () => this._delete(id));
this.loggers.set(id, logger);
}
return this.loggers.get(id);
}
/**
* Retreives a `winston.Logger` instance for the specified `id`. If
* an instance does not exist, one is created.
* @param {!string} id - The id of the Logger to get.
* @param {?Object} [options] - Options for the Logger instance.
* @returns {Logger} - A configured Logger instance with a specified id.
*/
get(id, options) {
return this.add(id, options);
}
/**
* Check if the container has a logger with the id.
* @param {?string} id - The id of the Logger instance to find.
* @returns {boolean} - Boolean value indicating if this instance has a
* logger with the specified `id`.
*/
has(id) {
return !!this.loggers.has(id);
}
/**
* Closes a `Logger` instance with the specified `id` if it exists.
* If no `id` is supplied then all Loggers are closed.
* @param {?string} id - The id of the Logger instance to close.
* @returns {undefined}
*/
close(id) {
if (id) {
return this._removeLogger(id);
}
this.loggers.forEach((val, key) => this._removeLogger(key));
}
/**
* Remove a logger based on the id.
* @param {!string} id - The id of the logger to remove.
* @returns {undefined}
* @private
*/
_removeLogger(id) {
if (!this.loggers.has(id)) {
return;
}
const logger = this.loggers.get(id);
logger.close();
this._delete(id);
}
/**
* Deletes a `Logger` instance with the specified `id`.
* @param {!string} id - The id of the Logger instance to delete from
* container.
* @returns {undefined}
* @private
*/
_delete(id) {
this.loggers.delete(id);
}
};
@@ -0,0 +1,186 @@
/*!
Copyright 2013 Lovell Fuller and others.
SPDX-License-Identifier: Apache-2.0
*/
#include <iostream>
#include <numeric>
#include <string>
#include <vector>
#include <napi.h>
#include <vips/vips8>
#include "./common.h"
#include "./stats.h"
class StatsWorker : public Napi::AsyncWorker {
public:
StatsWorker(Napi::Function callback, StatsBaton *baton, Napi::Function debuglog) :
Napi::AsyncWorker(callback), baton(baton), debuglog(Napi::Persistent(debuglog)) {}
~StatsWorker() {}
const int STAT_MIN_INDEX = 0;
const int STAT_MAX_INDEX = 1;
const int STAT_SUM_INDEX = 2;
const int STAT_SQ_SUM_INDEX = 3;
const int STAT_MEAN_INDEX = 4;
const int STAT_STDEV_INDEX = 5;
const int STAT_MINX_INDEX = 6;
const int STAT_MINY_INDEX = 7;
const int STAT_MAXX_INDEX = 8;
const int STAT_MAXY_INDEX = 9;
void Execute() {
// Decrement queued task counter
sharp::counterQueue--;
vips::VImage image;
sharp::ImageType imageType = sharp::ImageType::UNKNOWN;
try {
std::tie(image, imageType) = OpenInput(baton->input);
} catch (vips::VError const &err) {
(baton->err).append(err.what());
}
if (imageType != sharp::ImageType::UNKNOWN) {
try {
vips::VImage stats = image.stats();
int const bands = image.bands();
for (int b = 1; b <= bands; b++) {
ChannelStats cStats(
static_cast<int>(stats.getpoint(STAT_MIN_INDEX, b).front()),
static_cast<int>(stats.getpoint(STAT_MAX_INDEX, b).front()),
stats.getpoint(STAT_SUM_INDEX, b).front(),
stats.getpoint(STAT_SQ_SUM_INDEX, b).front(),
stats.getpoint(STAT_MEAN_INDEX, b).front(),
stats.getpoint(STAT_STDEV_INDEX, b).front(),
static_cast<int>(stats.getpoint(STAT_MINX_INDEX, b).front()),
static_cast<int>(stats.getpoint(STAT_MINY_INDEX, b).front()),
static_cast<int>(stats.getpoint(STAT_MAXX_INDEX, b).front()),
static_cast<int>(stats.getpoint(STAT_MAXY_INDEX, b).front()));
baton->channelStats.push_back(cStats);
}
// Image is not opaque when alpha layer is present and contains a non-mamixa value
if (image.has_alpha()) {
double const minAlpha = static_cast<double>(stats.getpoint(STAT_MIN_INDEX, bands).front());
if (minAlpha != vips_interpretation_max_alpha(image.interpretation())) {
baton->isOpaque = false;
}
}
// Convert to greyscale
vips::VImage greyscale = image.colourspace(VIPS_INTERPRETATION_B_W)[0];
// Estimate entropy via histogram of greyscale value frequency
baton->entropy = std::abs(greyscale.hist_find().hist_entropy());
// Estimate sharpness via standard deviation of greyscale laplacian
if (image.width() > 1 || image.height() > 1) {
VImage laplacian = VImage::new_matrixv(3, 3,
0.0, 1.0, 0.0,
1.0, -4.0, 1.0,
0.0, 1.0, 0.0);
laplacian.set("scale", 9.0);
baton->sharpness = greyscale.conv(laplacian).deviate();
}
// Most dominant sRGB colour via 4096-bin 3D histogram
vips::VImage hist = sharp::RemoveAlpha(image)
.colourspace(VIPS_INTERPRETATION_sRGB)
.hist_find_ndim(VImage::option()->set("bins", 16));
std::complex<double> maxpos = hist.maxpos();
int const dx = static_cast<int>(std::real(maxpos));
int const dy = static_cast<int>(std::imag(maxpos));
std::vector<double> pel = hist(dx, dy);
int const dz = std::distance(pel.begin(), std::find(pel.begin(), pel.end(), hist.max()));
baton->dominantRed = dx * 16 + 8;
baton->dominantGreen = dy * 16 + 8;
baton->dominantBlue = dz * 16 + 8;
} catch (vips::VError const &err) {
(baton->err).append(err.what());
}
}
// Clean up
vips_error_clear();
vips_thread_shutdown();
}
void OnOK() {
Napi::Env env = Env();
Napi::HandleScope scope(env);
// Handle warnings
std::string warning = sharp::VipsWarningPop();
while (!warning.empty()) {
debuglog.Call(Receiver().Value(), { Napi::String::New(env, warning) });
warning = sharp::VipsWarningPop();
}
if (baton->err.empty()) {
// Stats Object
Napi::Object info = Napi::Object::New(env);
Napi::Array channels = Napi::Array::New(env);
std::vector<ChannelStats>::iterator it;
int i = 0;
for (it = baton->channelStats.begin(); it < baton->channelStats.end(); it++, i++) {
Napi::Object channelStat = Napi::Object::New(env);
channelStat.Set("min", it->min);
channelStat.Set("max", it->max);
channelStat.Set("sum", it->sum);
channelStat.Set("squaresSum", it->squaresSum);
channelStat.Set("mean", it->mean);
channelStat.Set("stdev", it->stdev);
channelStat.Set("minX", it->minX);
channelStat.Set("minY", it->minY);
channelStat.Set("maxX", it->maxX);
channelStat.Set("maxY", it->maxY);
channels.Set(i, channelStat);
}
info.Set("channels", channels);
info.Set("isOpaque", baton->isOpaque);
info.Set("entropy", baton->entropy);
info.Set("sharpness", baton->sharpness);
Napi::Object dominant = Napi::Object::New(env);
dominant.Set("r", baton->dominantRed);
dominant.Set("g", baton->dominantGreen);
dominant.Set("b", baton->dominantBlue);
info.Set("dominant", dominant);
Callback().Call(Receiver().Value(), { env.Null(), info });
} else {
Callback().Call(Receiver().Value(), { Napi::Error::New(env, sharp::TrimEnd(baton->err)).Value() });
}
delete baton->input;
delete baton;
}
private:
StatsBaton* baton;
Napi::FunctionReference debuglog;
};
/*
stats(options, callback)
*/
Napi::Value stats(const Napi::CallbackInfo& info) {
// V8 objects are converted to non-V8 types held in the baton struct
StatsBaton *baton = new StatsBaton;
Napi::Object options = info[size_t(0)].As<Napi::Object>();
// Input
baton->input = sharp::CreateInputDescriptor(options.Get("input").As<Napi::Object>());
baton->input->access = VIPS_ACCESS_RANDOM;
// Function to notify of libvips warnings
Napi::Function debuglog = options.Get("debuglog").As<Napi::Function>();
// Join queue for worker thread
Napi::Function callback = info[size_t(1)].As<Napi::Function>();
StatsWorker *worker = new StatsWorker(callback, baton, debuglog);
worker->Receiver().Set("options", options);
worker->Queue();
// Increment queued task counter
sharp::counterQueue++;
return info.Env().Undefined();
}
@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,EAAE,MAAM,SAAS,CAAA;AACxB,OAAO,MAAM,MAAM,aAAa,CAAA;AAChC,OAAO,IAAI,MAAM,WAAW,CAAA;AAC5B,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AACvD,OAAO,EACL,cAAc,EAGd,MAAM,EACN,UAAU,EACV,oBAAoB,EAEpB,UAAU,GACX,MAAM,qBAAqB,CAAA;AAE5B,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAclE,MAAM,WAAW,GAAG,CAAC,CAAA;AAErB,cAAc,YAAY,CAAA;AAE1B,MAAM,CAAC,MAAM,QAAQ,GAAG;IAEtB,MAAM,EAAE,SAAS;IAEjB,eAAe,EAAE,kBAAkB;IAEnC,aAAa,EAAE,gBAAgB;IAE/B,GAAG,EAAE,KAAK;IAEV,GAAG,EAAE,KAAK;CACF,CAAA;AAIV,MAAM,EACJ,YAAY,EACZ,iBAAiB,EACjB,oBAAoB,EACpB,eAAe,EACf,iBAAiB,GAClB,GAAG,OAAO,CAAC,GAAG,CAAA;AAEf,MAAM,UAAU,GAAG,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAA;AAEpE,MAAM,CAAC,MAAM,eAAe,GAAG,eAAe,CAAC,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,SAAS,CAAA;AAG7E,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAA,iBAAiB,aAAjB,iBAAiB,uBAAjB,iBAAiB,CAAE,KAAK,CAAC,GAAG,CAAC,KAAI,EAAE,CAAA;AAEpE,MAAM,CAAC,MAAM,iBAAiB,GAAG,iBAAyC,CAAA;AAE1E,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC,QAAQ,CACxD,oBAAqB,CACtB,CAAA;AAED,MAAM,CAAC,MAAM,2BAA2B,GAAiB;IACvD;QACE,UAAU,EAAE,YAAY;QACxB,UAAU,EAAE,OAAO;KACpB;IACD;QACE,UAAU,EAAE,iBAAiB;QAC7B,UAAU,EAAE,aAAa;QACzB,KAAK,EAAE,aAAa;KACrB;CACF,CAAA;AAED,MAAM,CAAC,MAAM,0BAA0B,GAAG,EAAE,CAAA;AAE5C,IAAI,WAA2C,CAAA;AAe/C,MAAM,UAAU,iBAAiB,CAAI,MAAU;IAC7C,IAAI,MAAM,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE,CAAC;QACzC,MAAM,UAAU,GAAG,EAAO,CAAA;QAC1B,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE,CAAC;YACzB,UAAU,CAAC,GAAc,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAA;QAC1C,CAAC;QACD,OAAO,UAAU,CAAA;IACnB,CAAC;AACH,CAAC;AAED,MAAM,UAAU,YAAY,CAC1B,UAAkB,EAClB,gBAA0C;IAE1C,WAAW,aAAX,WAAW,cAAX,WAAW,IAAX,WAAW,GAAK,IAAI,GAAG,EAAE,EAAA;IAEzB,MAAM,YAAY,GAAG,WAAW,CAAC,GAAG,CAAC,UAAU,CAAC,CAAA;IAEhD,IAAI,YAAY,EAAE,CAAC;QACjB,OAAO,YAA0B,CAAA;IACnC,CAAC;IAED,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;QACjC,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAA;IAClD,CAAC;IAED,MAAM,MAAM,GAAG,iBAAiB,CAC9B,UAAU,EACiB,OAAO,gBAAgB,KAAK,QAAQ;QAC7D,CAAC,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAE;QAC/B,CAAC,CAAC,gBAAgB,CACrB,CAAA;IAED,WAAW,CAAC,GAAG,CAAC,UAAU,EAAE,MAAM,CAAC,CAAA;IAEnC,OAAO,MAAoB,CAAA;AAC7B,CAAC;AAED,MAAM,UAAU,GACd,OAAO,OAAO,KAAK,WAAW;IAC5B,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC;IACvC,CAAC,CAA4B,OAAO,CAAA;AAExC,MAAM,OAAO,GAAG,CAAC,IAAY,EAAE,EAAE,CAC/B,IAAI,GAAG,CAAC,wBAAwB,kBAAkB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AAE7D,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,IAAY,EAAE,EAAE;;IACrC,IAAI,CAAC;QACH,OAAO,CAAC,CAAC,CAAA,MAAA,EAAE,CAAC,QAAQ,CAAC,IAAI,EAAE,EAAE,cAAc,EAAE,KAAK,EAAE,CAAC,0CAAE,MAAM,EAAE,CAAA,CAAA;IACjE,CAAC;IAAC,WAAM,CAAC;QAEP,OAAO,KAAK,CAAA;IACd,CAAC;AACH,CAAC,CAAA;AAED,MAAM,aAAa,GAAG,CACpB,UAAkB,EAClB,EAAE,QAAQ,EAAE,QAAQ,EAA+C,EACnE,EAAE;IACF,IAAI,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAA;IAElC,IACE,CAAC,wBAAwB,CAAC,IAAI,CAAC,UAAU,CAAC;QAC1C,CAAC,CAAC,GAAG,IAAI,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EACjC,CAAC;QACD,MAAM,kBAAkB,GAAG,GAAG;YAC5B,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC;YAClC,CAAC,CAAC,UAAU,CAAA;QACd,IAAI,UAAoB,CAAA;QACxB,QAAQ,GAAG,EAAE,CAAC;YACZ,KAAK,MAAM,CAAC,CAAC,CAAC;gBACZ,UAAU,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;gBAC7B,MAAK;YACP,CAAC;YACD,KAAK,MAAM,CAAC,CAAC,CAAC;gBACZ,UAAU,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;gBAC7B,MAAK;YACP,CAAC;YACD,OAAO,CAAC,CAAC,CAAC;gBACR,UAAU,GAAG,CAAC,KAAK,EAAE,KAAK,CAAC,CAAA;gBAC3B,MAAK;YACP,CAAC;QACH,CAAC;QACD,MAAM,KAAK,GAAG,aAAa,CAAC,kBAAkB,EAAE,UAAU,CAAC,CAAA;QAC3D,IAAI,YAAiC,CAAA;QACrC,IAAI,KAAK,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,YAAY,GAAG,KAAK,KAAK,kBAAkB,CAAC,CAAC,EAAE,CAAC;YACrE,UAAU,GAAG,KAAK,CAAA;YAClB,IAAI,YAAY,EAAE,CAAC;gBACjB,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAA;YAChC,CAAC;QACH,CAAC;IACH,CAAC;IAED,MAAM,IAAI,GAAG,YAAY,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;IAE1C,IAAI,QAAQ,GAAG,UAAU,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAA;IAC1C,IAAI,QAAQ,GAAG,UAAU,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAA;IAE1C,IAAI,IAAI,EAAE,CAAC;QACT,IAAI,CAAC,QAAQ,EAAE,CAAC;YACd,MAAM,GAAG,GAAG,MAAM,CAAC,UAAU,CAAC,CAAA;YAC9B,IAAI,GAAG,EAAE,CAAC;gBACR,QAAQ;oBACL,UAAU,CAAC,GAAG,CAAsC,CAAC,IAAI;wBAC1D,QAAQ,CAAA;YACZ,CAAC;QACH,CAAC;QAED,IAAI,QAAQ,IAAI,IAAI,IAAI,cAAc,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;YACxD,QAAQ,GAAG,QAAQ,CAAC,MAAM,CAAA;QAC5B,CAAC;QAED,QAAQ,QAAQ,EAAE,CAAC;YACjB,KAAK,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;gBACrB,IAAI,QAAQ,EAAE,CAAC;oBACb,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC;wBACnC,QAAQ,GAAG,CAAC,UAAU,EAAE,GAAG,QAAQ,CAAC,MAAM,MAAM,EAAE,GAAG,QAAQ,CAAC,CAAA;oBAChE,CAAC;gBACH,CAAC;qBAAM,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;oBACpC,QAAQ,GAAG,CAAC,IAAI,EAAE,GAAG,QAAQ,CAAC,MAAM,WAAW,EAAE,GAAG,QAAQ,CAAC,CAAA;gBAC/D,CAAC;gBACD,MAAK;YACP,CAAC;YACD,KAAK,QAAQ,CAAC,eAAe,CAAC,CAAC,CAAC;gBAC9B,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;oBAC7B,QAAQ,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC,eAAe,EAAE,GAAG,QAAQ,CAAC,CAAA;gBAC1D,CAAC;gBACD,MAAK;YACP,CAAC;YACD,KAAK,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC;gBAC5B,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;oBAC7B,QAAQ,GAAGLine truncated
@@ -0,0 +1 @@
{"version":3,"file":"autolink.d.ts","sourceRoot":"","sources":["autolink.js"],"names":[],"mappings":"AAkBA,wBAAwB;AACxB,uBADW,SAAS,CACkD;+BAb5D,sBAAsB"}
@@ -0,0 +1,164 @@
/**
* @fileoverview Enforce PascalCase for user-defined JSX components
* @author Jake Marsh
*/
'use strict';
const elementType = require('jsx-ast-utils/elementType');
const minimatch = require('minimatch');
const docsUrl = require('../util/docsUrl');
const jsxUtil = require('../util/jsx');
const report = require('../util/report');
function testDigit(char) {
const charCode = char.charCodeAt(0);
return charCode >= 48 && charCode <= 57;
}
function testUpperCase(char) {
const upperCase = char.toUpperCase();
return char === upperCase && upperCase !== char.toLowerCase();
}
function testLowerCase(char) {
const lowerCase = char.toLowerCase();
return char === lowerCase && lowerCase !== char.toUpperCase();
}
function testPascalCase(name) {
if (!testUpperCase(name.charAt(0))) {
return false;
}
const anyNonAlphaNumeric = Array.prototype.some.call(
name.slice(1),
(char) => char.toLowerCase() === char.toUpperCase() && !testDigit(char)
);
if (anyNonAlphaNumeric) {
return false;
}
return Array.prototype.some.call(
name.slice(1),
(char) => testLowerCase(char) || testDigit(char)
);
}
function testAllCaps(name) {
const firstChar = name.charAt(0);
if (!(testUpperCase(firstChar) || testDigit(firstChar))) {
return false;
}
for (let i = 1; i < name.length - 1; i += 1) {
const char = name.charAt(i);
if (!(testUpperCase(char) || testDigit(char) || char === '_')) {
return false;
}
}
const lastChar = name.charAt(name.length - 1);
if (!(testUpperCase(lastChar) || testDigit(lastChar))) {
return false;
}
return true;
}
function ignoreCheck(ignore, name) {
return ignore.some(
(entry) => name === entry || minimatch(name, entry, { noglobstar: true })
);
}
// ------------------------------------------------------------------------------
// Rule Definition
// ------------------------------------------------------------------------------
const messages = {
usePascalCase: 'Imported JSX component {{name}} must be in PascalCase',
usePascalOrSnakeCase: 'Imported JSX component {{name}} must be in PascalCase or SCREAMING_SNAKE_CASE',
};
/** @type {import('eslint').Rule.RuleModule} */
module.exports = {
meta: {
docs: {
description: 'Enforce PascalCase for user-defined JSX components',
category: 'Stylistic Issues',
recommended: false,
url: docsUrl('jsx-pascal-case'),
},
messages,
schema: [{
type: 'object',
properties: {
allowAllCaps: {
type: 'boolean',
},
allowLeadingUnderscore: {
type: 'boolean',
},
allowNamespace: {
type: 'boolean',
},
ignore: {
items: [
{
type: 'string',
},
],
minItems: 0,
type: 'array',
uniqueItems: true,
},
},
additionalProperties: false,
}],
},
create(context) {
const configuration = context.options[0] || {};
const allowAllCaps = configuration.allowAllCaps || false;
const allowLeadingUnderscore = configuration.allowLeadingUnderscore || false;
const allowNamespace = configuration.allowNamespace || false;
const ignore = configuration.ignore || [];
return {
JSXOpeningElement(node) {
const isCompatTag = jsxUtil.isDOMComponent(node);
if (isCompatTag) return undefined;
const name = elementType(node);
let checkNames = [name];
let index = 0;
if (name.lastIndexOf(':') > -1) {
checkNames = name.split(':');
} else if (name.lastIndexOf('.') > -1) {
checkNames = name.split('.');
}
do {
const splitName = checkNames[index];
if (splitName.length === 1) return undefined;
const isIgnored = ignoreCheck(ignore, splitName);
const checkName = allowLeadingUnderscore && splitName.startsWith('_') ? splitName.slice(1) : splitName;
const isPascalCase = testPascalCase(checkName);
const isAllowedAllCaps = allowAllCaps && testAllCaps(checkName);
if (!isPascalCase && !isAllowedAllCaps && !isIgnored) {
const messageId = allowAllCaps ? 'usePascalOrSnakeCase' : 'usePascalCase';
report(context, messages[messageId], messageId, {
node,
data: {
name: splitName,
},
});
break;
}
index += 1;
} while (index < checkNames.length && !allowNamespace);
},
};
},
};
@@ -0,0 +1,14 @@
/*
* 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 {useDialog} from './useDialog';
export type {AriaDialogProps} from '@react-types/dialog';
export type {DialogAria} from './useDialog';
@@ -0,0 +1,44 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _table = _interopRequireDefault(require("./table"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* @file directory 表, 读取和写入ttf表索引
* @author mengke01(kekee000@gmail.com)
*
* https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6.html
*/
var _default = exports.default = _table.default.create('directory', [], {
read: function read(reader, ttf) {
var tables = {};
var numTables = ttf.numTables;
var offset = this.offset;
for (var i = offset, l = numTables * 16; i < l; i += 16) {
var name = reader.readString(i, 4).trim();
tables[name] = {
name: name,
checkSum: reader.readUint32(i + 4),
offset: reader.readUint32(i + 8),
length: reader.readUint32(i + 12)
};
}
return tables;
},
write: function write(writer, ttf) {
var tables = ttf.support.tables;
for (var i = 0, l = tables.length; i < l; i++) {
writer.writeString((tables[i].name + ' ').slice(0, 4));
writer.writeUint32(tables[i].checkSum);
writer.writeUint32(tables[i].offset);
writer.writeUint32(tables[i].length);
}
return writer;
},
size: function size(ttf) {
return ttf.numTables * 16;
}
});
@@ -0,0 +1 @@
{"name":"@vitest/snapshot","version":"4.0.9","requiresBuild":false,"files":{"dist/environment.js":{"checkedAt":1794532092171,"integrity":"sha512-gBnVM+nxQ7HbsuAvqYl7QdbClP7OtBavnFlgTHt9vPfPHZB5WGMoRwWJPHGhmwNBDFgMROadg/QeEGXwQmupZg==","mode":420,"size":1133},"dist/index.js":{"checkedAt":1794532092171,"integrity":"sha512-vxDC66tysah1HLEprwnx8o8y2OZZK1Be8BgjL8RVSkk/a0Gna53bdx/kuiRmtxUsWWhbcvIz/jxpdbLPHrhyMA==","mode":420,"size":46605},"dist/manager.js":{"checkedAt":1794532092171,"integrity":"sha512-djyh8AmILvlKKm0CRhT1LSD0w9XXc2z2GInWQmRGpLSrYbFk6hE5jn+XwJe+qx7NSHq3JeV02NIeXWQRsLZZVg==","mode":420,"size":1829},"package.json":{"checkedAt":1794532092171,"integrity":"sha512-eFmT/kW1XUzbwKBlsQoi1wqeNELpByEin0Wv/MISomx9Dedh+aW10soQ3fiazgiKMFoBGNEKg4eCrXiNj4VnwA==","mode":420,"size":1328},"README.md":{"checkedAt":1794532092171,"integrity":"sha512-Ic5zxWtK4GX+3eKpN6xFejkp1sBzdTqovQBKRtd3zs2CDlkfOMt35cQd+Ru+oJ3WXcREbR2Qeto+CtsuUrtsBA==","mode":420,"size":2570},"dist/environment.d-DHdQ1Csl.d.ts":{"checkedAt":1794532092172,"integrity":"sha512-49ssioCh0NcEafheAG4Wo86QSO+8WTuieSNZcPcay406s3FZLgdnrZBi9PxeJNp8duqMG7sgc/PbwVXgzY0bVg==","mode":420,"size":722},"dist/environment.d.ts":{"checkedAt":1794532092172,"integrity":"sha512-mNIG2HhlStKn6EB4i66JwijenaVB32WU8+qE+0q/FwSdtsUon9OG8Mq4s1zF0+Li/8NeXlP3q32f3Q9e8b9Pdw==","mode":420,"size":706},"environment.d.ts":{"checkedAt":1794532092172,"integrity":"sha512-EWsG27Zo5FMiGDrZoImoakgbVMiCzDulS+8zl8XgTzLYwkB9l8HXaAlhOdDESGs7O1LdJj/HYBOP4xv/pegncg==","mode":420,"size":38},"dist/index.d.ts":{"checkedAt":1794532092172,"integrity":"sha512-DuUDrDmh6DO6Nxh5R2O4CAGKCf/14QEozRikyNlp2XZE3pDucUbVcg7K4eGc3gNH3aA88k3OOhvn2r13+RxTWQ==","mode":420,"size":4146},"dist/manager.d.ts":{"checkedAt":1794532092172,"integrity":"sha512-kQuPuUYUmrSeSk3Rphn6vDCAjFO3D1FiU+X2J7UYdmyafP8O0+t4qx7h4BTQIEVSyo+JNAgAJXHrV8WclcpAOA==","mode":420,"size":839},"manager.d.ts":{"checkedAt":1794532092172,"integrity":"sha512-IYZQY320oMYscmJT0NIqDeVG/jOSQ6DCdVteEk8zW12MHmZPgFRzH8wDsqqswM6RGAEPZxQQ7Xi1ociahFKBRw==","mode":420,"size":34},"dist/rawSnapshot.d-lFsMJFUd.d.ts":{"checkedAt":1794532092172,"integrity":"sha512-w93FooNnV4Dhx+VG405PoIG01oXZF0cUbPoPE7zjS1qnvezaQhRdV0kVWliU05iICk1tQ5Meyijl2zAwNdn4Wg==","mode":420,"size":1655},"LICENSE":{"checkedAt":1794532091250,"integrity":"sha512-AxPiQHDnFTOwiy0HEsivy5bYN2wjcRKtw2lWjpeXevVq5EsAeGD6UzkfgwyM9B8ElYup7flAhvpi12SE1jQcGA==","mode":420,"size":1102}}}
@@ -0,0 +1,9 @@
export declare class NapCatPathWrapper {
binaryPath: string;
logsPath: string;
configPath: string;
cachePath: string;
staticPath: string;
pluginPath: string;
constructor(mainPath?: string);
}
@@ -0,0 +1,488 @@
/**
* Type the tailwind-merge configuration adheres to.
*/
export interface Config<ClassGroupIds extends string, ThemeGroupIds extends string>
extends ConfigStaticPart,
ConfigGroupsPart<ClassGroupIds, ThemeGroupIds> {}
/**
* The static part of the tailwind-merge configuration. When merging multiple configurations, the properties of this interface are always overridden.
*/
interface ConfigStaticPart {
/**
* Integer indicating size of LRU cache used for memoizing results.
* - Cache might be up to twice as big as `cacheSize`
* - No cache is used for values <= 0
*/
cacheSize: number
/**
* Prefix added to Tailwind-generated classes
* @see https://tailwindcss.com/docs/configuration#prefix
*/
prefix?: string
/**
* Custom separator for modifiers in Tailwind classes
* @see https://tailwindcss.com/docs/configuration#separator
*/
separator: string
/**
* Allows to customize parsing of individual classes passed to `twMerge`.
* All classes passed to `twMerge` outside of cache hits are passed to this function before it is determined whether the class is a valid Tailwind CSS class.
*
* This is an experimental feature and may introduce breaking changes in any minor version update.
*/
experimentalParseClassName?(param: ExperimentalParseClassNameParam): ExperimentalParsedClassName
}
/**
* Type of param passed to the `experimentalParseClassName` function.
*
* This is an experimental feature and may introduce breaking changes in any minor version update.
*/
export interface ExperimentalParseClassNameParam {
className: string
parseClassName(className: string): ExperimentalParsedClassName
}
/**
* Type of the result returned by the `experimentalParseClassName` function.
*
* This is an experimental feature and may introduce breaking changes in any minor version update.
*/
export interface ExperimentalParsedClassName {
/**
* Modifiers of the class in the order they appear in the class.
*
* @example ['hover', 'dark'] // for `hover:dark:bg-gray-100`
*/
modifiers: string[]
/**
* Whether the class has an `!important` modifier.
*
* @example true // for `hover:dark:!bg-gray-100`
*/
hasImportantModifier: boolean
/**
* Base class without preceding modifiers.
*
* @example 'bg-gray-100' // for `hover:dark:bg-gray-100`
*/
baseClassName: string
/**
* Index position of a possible postfix modifier in the class.
* If the class has no postfix modifier, this is `undefined`.
*
* This property is prefixed with "maybe" because tailwind-merge does not know whether something is a postfix modifier or part of the base class since it's possible to configure Tailwind CSS classes which include a `/` in the base class name.
*
* If a `maybePostfixModifierPosition` is present, tailwind-merge first tries to match the `baseClassName` without the possible postfix modifier to a class group. If tht fails, it tries again with the possible postfix modifier.
*
* @example 11 // for `bg-gray-100/50`
*/
maybePostfixModifierPosition: number | undefined
}
/**
* The dynamic part of the tailwind-merge configuration. When merging multiple configurations, the user can choose to either override or extend the properties of this interface.
*/
interface ConfigGroupsPart<ClassGroupIds extends string, ThemeGroupIds extends string> {
/**
* Theme scales used in classGroups.
* The keys are the same as in the Tailwind config but the values are sometimes defined more broadly.
*/
theme: NoInfer<ThemeObject<ThemeGroupIds>>
/**
* Object with groups of classes.
* @example
* {
* // Creates group of classes `group`, `of` and `classes`
* 'group-id': ['group', 'of', 'classes'],
* // Creates group of classes `look-at-me-other` and `look-at-me-group`.
* 'other-group': [{ 'look-at-me': ['other', 'group']}]
* }
*/
classGroups: NoInfer<Record<ClassGroupIds, ClassGroup<ThemeGroupIds>>>
/**
* Conflicting classes across groups.
* The key is ID of class group which creates conflict, values are IDs of class groups which receive a conflict.
* A class group ID is the key of a class group in classGroups object.
* @example { gap: ['gap-x', 'gap-y'] }
*/
conflictingClassGroups: NoInfer<Partial<Record<ClassGroupIds, readonly ClassGroupIds[]>>>
/**
* Postfix modifiers conflicting with other class groups.
* A class group ID is the key of a class group in classGroups object.
* @example { 'font-size': ['leading'] }
*/
conflictingClassGroupModifiers: NoInfer<
Partial<Record<ClassGroupIds, readonly ClassGroupIds[]>>
>
}
/**
* Type of the configuration object that can be passed to `extendTailwindMerge`.
*/
export interface ConfigExtension<ClassGroupIds extends string, ThemeGroupIds extends string>
extends Partial<ConfigStaticPart> {
override?: PartialPartial<ConfigGroupsPart<ClassGroupIds, ThemeGroupIds>>
extend?: PartialPartial<ConfigGroupsPart<ClassGroupIds, ThemeGroupIds>>
}
type PartialPartial<T> = {
[P in keyof T]?: Partial<T[P]>
}
export type ThemeObject<ThemeGroupIds extends string> = Record<
ThemeGroupIds,
ClassGroup<ThemeGroupIds>
>
export type ClassGroup<ThemeGroupIds extends string> = readonly ClassDefinition<ThemeGroupIds>[]
type ClassDefinition<ThemeGroupIds extends string> =
| string
| ClassValidator
| ThemeGetter
| ClassObject<ThemeGroupIds>
export type ClassValidator = (classPart: string) => boolean
export interface ThemeGetter {
(theme: ThemeObject<AnyThemeGroupIds>): ClassGroup<AnyClassGroupIds>
isThemeGetter: true
}
type ClassObject<ThemeGroupIds extends string> = Record<
string,
readonly ClassDefinition<ThemeGroupIds>[]
>
/**
* Hack from https://stackoverflow.com/questions/56687668/a-way-to-disable-type-argument-inference-in-generics/56688073#56688073
*
* Could be replaced with NoInfer utility type from TypeScript (https://www.typescriptlang.org/docs/handbook/utility-types.html#noinfertype), but that is only supported in TypeScript 5.4 or higher, so I should wait some time before using it.
*/
export type NoInfer<T> = [T][T extends any ? 0 : never]
/**
* Theme group IDs included in the default configuration of tailwind-merge.
*
* If you want to use a scale that is not supported in the `ThemeObject` type,
* consider using `classGroups` instead of `theme`.
*
* @see https://github.com/dcastil/tailwind-merge/blob/main/docs/configuration.md#theme
* (the list of supported keys may vary between `tailwind-merge` versions)
*/
export type DefaultThemeGroupIds =
| 'blur'
| 'borderColor'
| 'borderRadius'
| 'borderSpacing'
| 'borderWidth'
| 'brightness'
| 'colors'
| 'contrast'
| 'gap'
| 'gradientColorStopPositions'
| 'gradientColorStops'
| 'grayscale'
| 'hueRotate'
| 'inset'
| 'invert'
| 'margin'
| 'opacity'
| 'padding'
| 'saturate'
| 'scale'
| 'sepia'
| 'skew'
| 'space'
| 'spacing'
| 'translate'
/**
* Class group IDs included in the default configuration of tailwind-merge.
*/
export type DefaultClassGroupIds =
| 'accent'
| 'align-content'
| 'align-items'
| 'align-self'
| 'animate'
| 'appearance'
| 'aspect'
| 'auto-cols'
| 'auto-rows'
| 'backdrop-blur'
| 'backdrop-brightness'
| 'backdrop-contrast'
| 'backdrop-filter'
| 'backdrop-grayscale'
| 'backdrop-hue-rotate'
| 'backdrop-invert'
| 'backdrop-opacity'
| 'backdrop-saturate'
| 'backdrop-sepia'
| 'basis'
| 'bg-attachment'
| 'bg-blend'
| 'bg-clip'
| 'bg-color'
| 'bg-image'
| 'bg-opacity'
| 'bg-origin'
| 'bg-position'
| 'bg-repeat'
| 'bg-size'
| 'blur'
| 'border-collapse'
| 'border-color-b'
| 'border-color-e'
| 'border-color-l'
| 'border-color-r'
| 'border-color-s'
| 'border-color-t'
| 'border-color-x'
| 'border-color-y'
| 'border-color'
| 'border-opacity'
| 'border-spacing-x'
| 'border-spacing-y'
| 'border-spacing'
| 'border-style'
| 'border-w-b'
| 'border-w-e'
| 'border-w-l'
| 'border-w-r'
| 'border-w-s'
| 'border-w-t'
| 'border-w-x'
| 'border-w-y'
| 'border-w'
| 'bottom'
| 'box-decoration'
| 'box'
| 'break-after'
| 'break-before'
| 'break-inside'
| 'break'
| 'brightness'
| 'caption'
| 'caret-color'
| 'clear'
| 'col-end'
| 'col-start-end'
| 'col-start'
| 'columns'
| 'container'
| 'content'
| 'contrast'
| 'cursor'
| 'delay'
| 'display'
| 'divide-color'
| 'divide-opacity'
| 'divide-style'
| 'divide-x-reverse'
| 'divide-x'
| 'divide-y-reverse'
| 'divide-y'
| 'drop-shadow'
| 'duration'
| 'ease'
| 'end'
| 'fill'
| 'filter'
| 'flex-direction'
| 'flex-wrap'
| 'flex'
| 'float'
| 'font-family'
| 'font-size'
| 'font-smoothing'
| 'font-style'
| 'font-weight'
| 'forced-color-adjust'
| 'fvn-figure'
| 'fvn-fraction'
| 'fvn-normal'
| 'fvn-ordinal'
| 'fvn-slashed-zero'
| 'fvn-spacing'
| 'gap-x'
| 'gap-y'
| 'gap'
| 'gradient-from-pos'
| 'gradient-from'
| 'gradient-to-pos'
| 'gradient-to'
| 'gradient-via-pos'
| 'gradient-via'
| 'grayscale'
| 'grid-cols'
| 'grid-flow'
| 'grid-rows'
| 'grow'
| 'h'
| 'hue-rotate'
| 'hyphens'
| 'indent'
| 'inset-x'
| 'inset-y'
| 'inset'
| 'invert'
| 'isolation'
| 'justify-content'
| 'justify-items'
| 'justify-self'
| 'leading'
| 'left'
| 'line-clamp'
| 'list-image'
| 'list-style-position'
| 'list-style-type'
| 'm'
| 'max-h'
| 'max-w'
| 'mb'
| 'me'
| 'min-h'
| 'min-w'
| 'mix-blend'
| 'ml'
| 'mr'
| 'ms'
| 'mt'
| 'mx'
| 'my'
| 'object-fit'
| 'object-position'
| 'opacity'
| 'order'
| 'outline-color'
| 'outline-offset'
| 'outline-style'
| 'outline-w'
| 'overflow-x'
| 'overflow-y'
| 'overflow'
| 'overscroll-x'
| 'overscroll-y'
| 'overscroll'
| 'p'
| 'pb'
| 'pe'
| 'pl'
| 'place-content'
| 'place-items'
| 'place-self'
| 'placeholder-color'
| 'placeholder-opacity'
| 'pointer-events'
| 'position'
| 'pr'
| 'ps'
| 'pt'
| 'px'
| 'py'
| 'resize'
| 'right'
| 'ring-color'
| 'ring-offset-color'
| 'ring-offset-w'
| 'ring-opacity'
| 'ring-w-inset'
| 'ring-w'
| 'rotate'
| 'rounded-b'
| 'rounded-bl'
| 'rounded-br'
| 'rounded-e'
| 'rounded-ee'
| 'rounded-es'
| 'rounded-l'
| 'rounded-r'
| 'rounded-s'
| 'rounded-se'
| 'rounded-ss'
| 'rounded-t'
| 'rounded-tl'
| 'rounded-tr'
| 'rounded'
| 'row-end'
| 'row-start-end'
| 'row-start'
| 'saturate'
| 'scale-x'
| 'scale-y'
| 'scale'
| 'scroll-behavior'
| 'scroll-m'
| 'scroll-mb'
| 'scroll-me'
| 'scroll-ml'
| 'scroll-mr'
| 'scroll-ms'
| 'scroll-mt'
| 'scroll-mx'
| 'scroll-my'
| 'scroll-p'
| 'scroll-pb'
| 'scroll-pe'
| 'scroll-pl'
| 'scroll-pr'
| 'scroll-ps'
| 'scroll-pt'
| 'scroll-px'
| 'scroll-py'
| 'select'
| 'sepia'
| 'shadow-color'
| 'shadow'
| 'shrink'
| 'size'
| 'skew-x'
| 'skew-y'
| 'snap-align'
| 'snap-stop'
| 'snap-strictness'
| 'snap-type'
| 'space-x-reverse'
| 'space-x'
| 'space-y-reverse'
| 'space-y'
| 'sr'
| 'start'
| 'stroke-w'
| 'stroke'
| 'table-layout'
| 'text-alignment'
| 'text-color'
| 'text-decoration-color'
| 'text-decoration-style'
| 'text-decoration-thickness'
| 'text-decoration'
| 'text-opacity'
| 'text-overflow'
| 'text-transform'
| 'text-wrap'
| 'top'
| 'touch-pz'
| 'touch-x'
| 'touch-y'
| 'touch'
| 'tracking'
| 'transform-origin'
| 'transform'
| 'transition'
| 'translate-x'
| 'translate-y'
| 'underline-offset'
| 'vertical-align'
| 'visibility'
| 'w'
| 'whitespace'
| 'will-change'
| 'z'
export type AnyClassGroupIds = string
export type AnyThemeGroupIds = string
/**
* type of the tailwind-merge configuration that allows for any possible configuration.
*/
export type AnyConfig = Config<AnyClassGroupIds, AnyThemeGroupIds>
@@ -0,0 +1,23 @@
'use strict';
const stream = require('stream');
class BaseStream extends stream.Readable {
addEntry(/* entry, opts */) {
throw new Error('.addEntry not implemented in sub class!');
}
_read() {}
emit(event, data) {
if (event === 'error') {
const error = data;
if (error.name === 'Error') {
error.name = this.constructor.name + 'Error';
}
}
super.emit(event, data);
}
}
module.exports = BaseStream;
@@ -0,0 +1,67 @@
import isSymbol from './isSymbol.js';
/** Used as references for the maximum length and index of an array. */
var MAX_ARRAY_LENGTH = 4294967295,
MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1;
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeFloor = Math.floor,
nativeMin = Math.min;
/**
* The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy`
* which invokes `iteratee` for `value` and each element of `array` to compute
* their sort ranking. The iteratee is invoked with one argument; (value).
*
* @private
* @param {Array} array The sorted array to inspect.
* @param {*} value The value to evaluate.
* @param {Function} iteratee The iteratee invoked per element.
* @param {boolean} [retHighest] Specify returning the highest qualified index.
* @returns {number} Returns the index at which `value` should be inserted
* into `array`.
*/
function baseSortedIndexBy(array, value, iteratee, retHighest) {
var low = 0,
high = array == null ? 0 : array.length;
if (high === 0) {
return 0;
}
value = iteratee(value);
var valIsNaN = value !== value,
valIsNull = value === null,
valIsSymbol = isSymbol(value),
valIsUndefined = value === undefined;
while (low < high) {
var mid = nativeFloor((low + high) / 2),
computed = iteratee(array[mid]),
othIsDefined = computed !== undefined,
othIsNull = computed === null,
othIsReflexive = computed === computed,
othIsSymbol = isSymbol(computed);
if (valIsNaN) {
var setLow = retHighest || othIsReflexive;
} else if (valIsUndefined) {
setLow = othIsReflexive && (retHighest || othIsDefined);
} else if (valIsNull) {
setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);
} else if (valIsSymbol) {
setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);
} else if (othIsNull || othIsSymbol) {
setLow = false;
} else {
setLow = retHighest ? (computed <= value) : (computed < value);
}
if (setLow) {
low = mid + 1;
} else {
high = mid;
}
}
return nativeMin(high, MAX_ARRAY_INDEX);
}
export default baseSortedIndexBy;
@@ -0,0 +1,7 @@
import * as react_jsx_runtime from 'react/jsx-runtime';
import { IconSvgProps } from './types.mjs';
import 'react';
declare const ChevronIcon: (props: IconSvgProps) => react_jsx_runtime.JSX.Element;
export { ChevronIcon };
@@ -0,0 +1 @@
{"mappings":";AAAA,4BAAiB;IAAG,WAAW,CAAC,wBAAG,CAAC;AACpC","sources":["packages/@react-aria/overlays/intl/ja-JP.json"],"sourcesContent":["{\n \"dismiss\": \"閉じる\"\n}\n"],"names":[],"version":3,"file":"ja-JP.module.js.map"}
@@ -0,0 +1 @@
{"mappings":"AAAA,iBAAiB;IAAG,oBAAoB,CAAC,oFAAwE,CAAC;AAClH","sources":["packages/@react-aria/menu/intl/fi-FI.json"],"sourcesContent":["{\n \"longPressMessage\": \"Avaa valikko painamalla pohjassa tai näppäinyhdistelmällä Alt + Alanuoli\"\n}\n"],"names":[],"version":3,"file":"fi-FI.main.js.map"}
@@ -0,0 +1 @@
{"name":"@peculiar/x509","version":"1.14.2","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532103095,"integrity":"sha512-rAEoESahxY4e0qm+5AxyJAhggAqoJOZECff69rvYbxTe7ZYcANjk2oIegSoXSjEFg/O9jTy9YcyNFJX98FGOBw==","mode":420,"size":1091},"build/x509.cjs.js":{"checkedAt":1794532103095,"integrity":"sha512-3Zh4dEZjIEZi2Y5kQCQv17ILRo2yVgXEXgXnxo4E7pmwvUzA1wG884qOvggF7ccU8qDe4qSllsv5gwsLXVTfLA==","mode":420,"size":142672},"build/x509.es.js":{"checkedAt":1794532103096,"integrity":"sha512-r8AyGLpR1Hnp4gkEbv2vanUrgrnzgtmVH3qOCrePYwyw2GcK3/6k1OD9Kfh37j2rcUD/Z4uFY4hLsqvxHznlUA==","mode":420,"size":135317},"build/x509.js":{"checkedAt":1794532103096,"integrity":"sha512-DdSNDWJpHBGFQ7sOfNGPGI8jrVaSwv7vG98IHDLXT/C6lI8XH9O5AQ3TmxrFDISBU7pnNyrBOIYlG7mzbxw0LQ==","mode":420,"size":205910},"package.json":{"checkedAt":1794532103097,"integrity":"sha512-jbNaj5vMXGPcTQuv1fWiFSj+UIYbWhzHmYN8q62uU+ei879pa5dLbIoB7qUQ/jnBERRBIvXtmfAKbg29vhkeCQ==","mode":420,"size":2732},"README.md":{"checkedAt":1794532103097,"integrity":"sha512-+2PDdE9IzGPeNOqeR3q9/eQFi0b7mJLE5jGuHt3TT/yJq08+ciK4R7ijYUhzrdzIKuYIgGm5y9NkAqs/QOGdMw==","mode":420,"size":8095},"build/index.d.ts":{"checkedAt":1794532103097,"integrity":"sha512-8TCTUlPfk6QKzb+CzP1HBEzO6kDefZLpIU+7m4yrjuMRjqKDL+CytmJfS45tBTnj902oit9ouSqgyZ3OPxlMxQ==","mode":420,"size":55294}}}
@@ -0,0 +1,6 @@
function tsRewriteRelativeImportExtensions(t, e) {
return "string" == typeof t && /^\.\.?\//.test(t) ? t.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+)?)\.([cm]?)ts$/i, function (t, s, r, n, o) {
return s ? e ? ".jsx" : ".js" : !r || n && o ? r + n + "." + o.toLowerCase() + "js" : t;
}) : t;
}
module.exports = tsRewriteRelativeImportExtensions, module.exports.__esModule = true, module.exports["default"] = module.exports;
@@ -0,0 +1,3 @@
export type MessageId = 'amd';
declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"amd", [], import("../utils/create-rule.ts").ImportXPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
export default _default;
@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('sortedLastIndexBy', require('../sortedLastIndexBy'));
func.placeholder = require('./placeholder');
module.exports = func;
@@ -0,0 +1,947 @@
export default `flf2a$ 9 8 12 63 18 0 24511 0
Font : Fire Font-s
Author : MJP
Date : 2003/11/6 11:11:05
Version: 1.0
-------------------------------------------------
-------------------------------------------------
This font has been created using JavE's FIGlet font export assistant.
Have a look at: http://www.jave.de
Permission is hereby given to modify this font, as long as the
modifier's name is placed on a comment line.
Based on Small.flf by Glenn Chappell 4/93 -- based on Standard
---
Font modified May 26, 2012 by patorjk
- Added the 0xCA0 character.
$ #
$ #
$ #
$ #
$ #
$ #
$ #
$ #
$ ##
____ #
| / #
| / #
| / #
|/ #
( #
)\\ #
((_) #
##
#
( ( #
)\\ )\\ #
((_)((_) #
#
#
#
#
##
#
_ _ #
_| | |_ #
|_ . _| #
|_ _| #
|_|_| #
#
#
##
#
#
||_ #
(_-< #
/ _/ #
|| #
#
#
##
#
#
#
_ __ #
(_)/ / #
/ /_ #
/_/(_) #
#
##
#
#
( #
__ )\\ #
/ _|((_) #
> _|_ _| #
\\_____| #
#
##
#
( #
)\\ #
((_) #
#
#
#
#
##
#
#
#
__ #
/ / #
| | #
| | #
\\_\\ #
##
#
#
#
__ #
\\ \\ #
| | #
| | #
/_/ #
##
_/\\_ #
> < #
\\/ #
#
#
#
#
#
##
#
#
#
_ #
_| |_ #
|_ _| #
|_| #
#
##
#
#
#
#
#
) #
/( #
(_)) #
##
#
#
#
___ #
|___| #
#
#
#
##
#
#
#
#
#
#
_ #
(_) #
##
#
#
#
__ #
/ / #
/ / #
/_/ #
#
##
#
) #
( /( #
)\\()) #
((_)\\ #
/ (_) #
| () | #
\\__/ #
##
#
) #
( /( #
)\\()) #
((_)\\ #
/ (_) #
| | #
|_| #
##
#
) #
( /( #
)(_)) #
((_) #
|_ ) #
/ / #
/___| #
##
#
) #
( /( #
)\\()) #
((_)\\ #
|__ (_) #
|_ \\ #
|___/ #
##
#
) #
( /( #
)\\()) #
((_)\\ #
| | (_) #
|_ _| #
|_| #
##
#
( ( #
)\\))( #
((_)()\\ #
(()((_) #
| __| #
|__ \\ #
|___/ #
##
#
( #
)\\ ) #
(()/( #
/(_)) #
(_) / #
/ _ \\ #
\\___/ #
##
#
) #
( /( #
)\\()) #
((_)\\ #
|__ / #
/ / #
/_/ #
##
#
( #
)\\ ( #
((_))\\ #
_((_) #
( _ ) #
/ _ \\ #
\\___/ #
##
#
) #
( /( #
)\\()) #
((_)\\ #
/ _(_) #
\\_, / #
/_/ #
##
#
#
#
#
_ #
(_) #
_ #
(_) #
##
#
#
#
#
_ #
(_) #
( #
)\\ #
((_) ##
#
#
#
#
__ #
/ / #
< < #
\\_\\ #
##
#
#
#
#
#
___ #
|___| #
|___| #
##
#
#
#
#
__ #
\\ \\ #
> > #
/_/ #
##
#
#
( #
)\\ #
((_) #
|__ \\ #
/_/ #
(_) #
##
#
#
( #
)\\ #
((_) #
/__ _\\ #
// _\` |\\ #
\\\\__,_|/ #
\\____/ ##
#
( #
)\\ #
((((_)( #
)\\ _ )\\ #
(_)_\\(_) #
/ _ \\ #
/_/ \\_\\ #
##
#
( #
( )\\ #
)((_) #
((_)_ #
| _ ) #
| _ \\ #
|___/ #
##
#
( #
)\\ #
(((_) #
)\\___ #
((/ __| #
| (__ #
\\___| #
##
( #
)\\ ) #
(()/( #
/(_)) #
(_))_ #
| \\ #
| |) | #
|___/ #
##
#
#
( #
)\\ #
((_) #
| __| #
| _| #
|___| #
##
( #
)\\ ) #
(()/( #
/(_)) #
(_))_| #
| |_ #
| __| #
|_| #
##
#
( #
)\\ ) #
(()/( #
/(_))_ #
(_)) __| #
| (_ | #
\\___| #
##
) #
( /( #
)\\()) #
((_)\\ #
_((_) #
| || | #
| __ | #
|_||_| #
##
( #
)\\ ) #
(()/( #
/(_)) #
(_)) #
|_ _| #
| | #
|___| #
##
#
#
( #
)\\ #
((_) #
_ | | #
| || | #
\\__/ #
##
) #
( /( #
)\\()) #
|((_)\\ #
|_ ((_) #
| |/ / #
' < #
_|\\_\\ #
##
( #
)\\ ) #
(()/( #
/(_)) #
(_)) #
| | #
| |__ #
|____| #
##
* #
( \` #
)\\))( #
((_)()\\ #
(_()((_) #
| \\/ | #
| |\\/| | #
|_| |_| #
##
) #
( /( #
)\\()) #
((_)\\ #
_((_) #
| \\| | #
| .\` | #
|_|\\_| #
##
) #
( /( #
)\\()) #
((_)\\ #
((_) #
/ _ \\ #
| (_) | #
\\___/ #
##
( #
)\\ ) #
(()/( #
/(_)) #
(_)) #
| _ \\ #
| _/ #
|_| #
##
#
( #
( )\\ #
)((_) #
((_)_ #
/ _ \\ #
| (_) | #
\\__\\_\\ #
##
( #
)\\ ) #
(()/( #
/(_)) #
(_)) #
| _ \\ #
| / #
|_|_\\ #
##
( #
)\\ ) #
(()/( #
/(_)) #
(_)) #
/ __| #
\\__ \\ #
|___/ #
##
#
* ) #
\` ) /( #
( )(_)) #
(_(_()) #
|_ _| #
| | #
|_| #
##
#
#
( #
)\\ #
_ ((_) #
| | | | #
| |_| | #
\\___/ #
##
#
#
( ( #
)\\ )\\ #
((_)((_) #
\\ \\ / / #
\\ V / #
\\_/ #
##
#
( ( #
)\\))( '#
((_)()\\ ) #
_(())\\_)()#
\\ \\((_)/ /#
\\ \\/\\/ / #
\\_/\\_/ #
##
) #
( /( #
)\\()) #
((_)\\ #
__((_) #
\\ \\/ / #
> < #
/_/\\_\\ #
##
) #
( /( #
)\\()) #
((_)\\ #
__ ((_) #
\\ \\ / / #
\\ V / #
|_| #
##
) #
( /( #
)\\()) #
((_)\\ #
_((_) #
|_ / #
/ / #
/___| #
##
#
#
#
#
__ #
| _| #
| | #
| | #
|__| ##
#
#
#
#
__ #
\\ \\ #
\\ \\ #
\\_\\ #
##
#
#
#
#
__ #
|_ | #
| | #
| | #
|__| ##
#
/\\ #
|/\\| #
#
#
#
#
#
##
#
#
#
#
#
#
#
_____ #
|_____| ##
\`#
#
#
#
#
#
#
#
##
#
#
) #
( /( #
)(_)) #
((_)_ #
/ _\` | #
\\__,_| #
##
#
) #
( /( #
)\\()) #
((_)\\ #
| |(_) #
| '_ \\ #
|_.__/ #
##
#
#
#
( #
)\\ #
((_) #
/ _| #
\\__| #
##
#
( #
)\\ ) #
(()/( #
((_)) #
_| | #
/ _\` | #
\\__,_| #
##
#
#
( #
))\\ #
/((_) #
(_)) #
/ -_) #
\\___| #
##
#
( #
)\\ ) #
(()/( #
/(_)) #
(_) _| #
| _| #
|_| #
##
#
#
( ( #
)\\))( #
((_))\\ #
(()(_) #
/ _\` | #
\\__, | #
|___/ ##
#
) #
( /( #
)\\()) #
((_)\\ #
| |(_) #
| ' \\ #
|_||_| #
##
#
#
( #
)\\ #
((_) #
(_) #
| | #
|_| #
##
#
#
( #
)\\ #
((_) #
! #
| | #
_/ | #
|__/ ##
#
) #
( /( #
)\\()) #
((_)\\ #
| |(_) #
| / / #
|_\\_\\ #
##
#
( #
)\\ #
((_) #
_ #
| | #
| | #
|_| #
##
#
#
) #
( #
)\\ ' #
_((_)) #
| ' \\() #
|_|_|_| #
##
#
#
#
( #
)\\ ) #
_(_/( #
| ' \\)) #
|_||_| #
##
#
#
#
( #
)\\ #
((_) #
/ _ \\ #
\\___/ #
##
#
#
#
\` ) #
/(/( #
((_)_\\ #
| '_ \\) #
| .__/ #
|_| ##
#
#
( #
( )\\ #
)(( ) #
((_)_) #
/ _\` | #
\\__, | #
|_| ##
#
#
( #
)( #
(()\\ #
((_) #
| '_| #
|_| #
##
#
#
#
( #
)\\ #
((_) #
(_-< #
/__/ #
##
#
) #
( /( #
)\\()) #
(_))/ #
| |_ #
| _| #
\\__| #
##
#
#
( #
))\\ #
/((_) #
(_))( #
| || | #
\\_,_| #
##
#
#
) #
/(( #
(_))\\ #
_)((_) #
\\ V / #
\\_/ #
##
#
#
( ( #
)\\))( #
((_)()\\ #
_(()((_) #
\\ V V / #
\\_/\\_/ #
##
#
#
) #
( /( #
)\\()) #
((_)\\ #
\\ \\ / #
/_\\_\\ #
##
#
#
( #
)\\ ) #
(()/( #
)(_)) #
| || | #
\\_, | #
|__/ ##
#
#
#
( #
)\\ #
((_) #
|_ / #
/__| #
##
#
#
#
#
__ #
/ / #
_| | #
| | #
\\_\\ ##
#
#
#
#
_ #
| | #
| | #
| | #
|_| ##
#
#
#
#
__ #
\\ \\ #
| |_ #
| | #
/_/ ##
#
/\\/| #
|/\\/ #
#
#
#
#
#
##
) #
/( ( #
(_)))\\ #
(_)_(_) #
/_\\ #
/ _ \\ #
/_/ \\_\\ #
#
##
( #
) )\\ #
/(((_) #
(_)_(_) #
/ _ \\ #
| (_) | #
\\___/ #
#
##
) #
/( ( #
(_)))\\ #
(_)_(_) #
| | | | #
| |_| | #
\\___/ #
#
##
#
#
( #
_ )\\ #
(_((_) #
/ _\` | #
\\__,_| #
#
##
#
#
) #
/( _ #
(_))(_) #
/ _ \\ #
\\___/ #
#
##
#
#
( #
_ )\\ #
(_)((_) #
| |_| | #
\\___/ #
#
##
#
( #
( )\\ #
)((_) #
(/__ \\ #
| |< < #
| ||_/ #
|_| #
##
0xCA0 KANNADA LETTER TTHA
) #
( /( #
)\\()) #
((_)\\__)#
/____/ #
/ _ \\ #
| (_) | #
$\\___/$ #
##`
@@ -0,0 +1 @@
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(e="undefined"!=typeof globalThis?globalThis:e||self).memoizeOne=n()}(this,(function(){"use strict";var e=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function n(n,t){if(n.length!==t.length)return!1;for(var r=0;r<n.length;r++)if(i=n[r],o=t[r],!(i===o||e(i)&&e(o)))return!1;var i,o;return!0}return function(e,t){var r;void 0===t&&(t=n);var i,o=[],f=!1;return function(){for(var n=[],u=0;u<arguments.length;u++)n[u]=arguments[u];return f&&r===this&&t(n,o)||(i=e.apply(this,n),f=!0,r=this,o=n),i}}}));
@@ -0,0 +1,78 @@
'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 }; }
/**
* Repeatedly call `iteratee`, while `test` returns `true`. Calls `callback` when
* stopped, or an error occurs.
*
* @name whilst
* @static
* @memberOf module:ControlFlow
* @method
* @category Control Flow
* @param {AsyncFunction} test - asynchronous truth test to perform before each
* execution of `iteratee`. Invoked with (callback).
* @param {AsyncFunction} iteratee - An async function which is called each time
* `test` passes. Invoked with (callback).
* @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
* @example
*
* var count = 0;
* async.whilst(
* function test(cb) { cb(null, count < 5); },
* function iter(callback) {
* count++;
* setTimeout(function() {
* callback(null, count);
* }, 1000);
* },
* function (err, n) {
* // 5 seconds have passed, n = 5
* }
* );
*/
function whilst(test, iteratee, callback) {
callback = (0, _onlyOnce2.default)(callback);
var _fn = (0, _wrapAsync2.default)(iteratee);
var _test = (0, _wrapAsync2.default)(test);
var results = [];
function next(err, ...rest) {
if (err) return callback(err);
results = rest;
if (err === false) return;
_test(check);
}
function check(err, truth) {
if (err) return callback(err);
if (err === false) return;
if (!truth) return callback(null, ...results);
_fn(next);
}
return _test(check);
}
exports.default = (0, _awaitify2.default)(whilst, 3);
module.exports = exports.default;
@@ -0,0 +1 @@
{"version":3,"file":"PlanParams.d.ts","sourceRoot":"","sources":["../../../../src/planning/models/PlanParams.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D,MAAM,WAAW,UAAW,SAAQ,cAAc;IAChD,eAAe,EAAE,oBAAoB,CAAC;CACvC"}
@@ -0,0 +1,5 @@
'use strict'
const SemVer = require('../classes/semver')
const major = (a, loose) => new SemVer(a, loose).major
module.exports = major
@@ -0,0 +1,78 @@
import type { IssueData, ZodErrorMap, ZodIssue } from "../ZodError.cjs";
import type { ZodParsedType } from "./util.cjs";
export declare const makeIssue: (params: {
data: any;
path: (string | number)[];
errorMaps: ZodErrorMap[];
issueData: IssueData;
}) => ZodIssue;
export type ParseParams = {
path: (string | number)[];
errorMap: ZodErrorMap;
async: boolean;
};
export type ParsePathComponent = string | number;
export type ParsePath = ParsePathComponent[];
export declare const EMPTY_PATH: ParsePath;
export interface ParseContext {
readonly common: {
readonly issues: ZodIssue[];
readonly contextualErrorMap?: ZodErrorMap | undefined;
readonly async: boolean;
};
readonly path: ParsePath;
readonly schemaErrorMap?: ZodErrorMap | undefined;
readonly parent: ParseContext | null;
readonly data: any;
readonly parsedType: ZodParsedType;
}
export type ParseInput = {
data: any;
path: (string | number)[];
parent: ParseContext;
};
export declare function addIssueToContext(ctx: ParseContext, issueData: IssueData): void;
export type ObjectPair = {
key: SyncParseReturnType<any>;
value: SyncParseReturnType<any>;
};
export declare class ParseStatus {
value: "aborted" | "dirty" | "valid";
dirty(): void;
abort(): void;
static mergeArray(status: ParseStatus, results: SyncParseReturnType<any>[]): SyncParseReturnType;
static mergeObjectAsync(status: ParseStatus, pairs: {
key: ParseReturnType<any>;
value: ParseReturnType<any>;
}[]): Promise<SyncParseReturnType<any>>;
static mergeObjectSync(status: ParseStatus, pairs: {
key: SyncParseReturnType<any>;
value: SyncParseReturnType<any>;
alwaysSet?: boolean;
}[]): SyncParseReturnType;
}
export interface ParseResult {
status: "aborted" | "dirty" | "valid";
data: any;
}
export type INVALID = {
status: "aborted";
};
export declare const INVALID: INVALID;
export type DIRTY<T> = {
status: "dirty";
value: T;
};
export declare const DIRTY: <T>(value: T) => DIRTY<T>;
export type OK<T> = {
status: "valid";
value: T;
};
export declare const OK: <T>(value: T) => OK<T>;
export type SyncParseReturnType<T = any> = OK<T> | DIRTY<T> | INVALID;
export type AsyncParseReturnType<T> = Promise<SyncParseReturnType<T>>;
export type ParseReturnType<T> = SyncParseReturnType<T> | AsyncParseReturnType<T>;
export declare const isAborted: (x: ParseReturnType<any>) => x is INVALID;
export declare const isDirty: <T>(x: ParseReturnType<T>) => x is OK<T> | DIRTY<T>;
export declare const isValid: <T>(x: ParseReturnType<T>) => x is OK<T>;
export declare const isAsync: <T>(x: ParseReturnType<T>) => x is AsyncParseReturnType<T>;
@@ -0,0 +1,14 @@
# prettier-linter-helpers
Helper functions for exposing prettier changes within linting tools.
This package contains:
- `showInvisibles(string)` - Replace invisible characters with ones you can see for
for easier diffing.
- `generateDifferences(source, prettierSource)` - Generate an array of
differences between two strings.
## Inspiration
This code was extracted from [eslint-plugin-prettier v2.7.0](https://github.com/prettier/eslint-plugin-prettier/blob/v2.7.0/eslint-plugin-prettier.js#L85-L215)
@@ -0,0 +1,3 @@
import type { Plugin } from '../types';
declare const useCachePlugin: Plugin<any, any[]>;
export default useCachePlugin;
@@ -0,0 +1,249 @@
"use strict";
/**
* This is the common logic for both the Node.js and web browser
* implementations of `debug()`.
*/
function setup(env) {
createDebug.debug = createDebug;
createDebug.default = createDebug;
createDebug.coerce = coerce;
createDebug.disable = disable;
createDebug.enable = enable;
createDebug.enabled = enabled;
createDebug.humanize = require('ms');
Object.keys(env).forEach(function (key) {
createDebug[key] = env[key];
});
/**
* Active `debug` instances.
*/
createDebug.instances = [];
/**
* The currently active debug mode names, and names to skip.
*/
createDebug.names = [];
createDebug.skips = [];
/**
* Map of special "%n" handling functions, for the debug "format" argument.
*
* Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
*/
createDebug.formatters = {};
/**
* Selects a color for a debug namespace
* @param {String} namespace The namespace string for the for the debug instance to be colored
* @return {Number|String} An ANSI color code for the given namespace
* @api private
*/
function selectColor(namespace) {
var hash = 0;
for (var i = 0; i < namespace.length; i++) {
hash = (hash << 5) - hash + namespace.charCodeAt(i);
hash |= 0; // Convert to 32bit integer
}
return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
}
createDebug.selectColor = selectColor;
/**
* Create a debugger with the given `namespace`.
*
* @param {String} namespace
* @return {Function}
* @api public
*/
function createDebug(namespace) {
var prevTime;
function debug() {
// Disabled?
if (!debug.enabled) {
return;
}
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
var self = debug; // Set `diff` timestamp
var curr = Number(new Date());
var ms = curr - (prevTime || curr);
self.diff = ms;
self.prev = prevTime;
self.curr = curr;
prevTime = curr;
args[0] = createDebug.coerce(args[0]);
if (typeof args[0] !== 'string') {
// Anything else let's inspect with %O
args.unshift('%O');
} // Apply any `formatters` transformations
var index = 0;
args[0] = args[0].replace(/%([a-zA-Z%])/g, function (match, format) {
// If we encounter an escaped % then don't increase the array index
if (match === '%%') {
return match;
}
index++;
var formatter = createDebug.formatters[format];
if (typeof formatter === 'function') {
var val = args[index];
match = formatter.call(self, val); // Now we need to remove `args[index]` since it's inlined in the `format`
args.splice(index, 1);
index--;
}
return match;
}); // Apply env-specific formatting (colors, etc.)
createDebug.formatArgs.call(self, args);
var logFn = self.log || createDebug.log;
logFn.apply(self, args);
}
debug.namespace = namespace;
debug.enabled = createDebug.enabled(namespace);
debug.useColors = createDebug.useColors();
debug.color = selectColor(namespace);
debug.destroy = destroy;
debug.extend = extend; // Debug.formatArgs = formatArgs;
// debug.rawLog = rawLog;
// env-specific initialization logic for debug instances
if (typeof createDebug.init === 'function') {
createDebug.init(debug);
}
createDebug.instances.push(debug);
return debug;
}
function destroy() {
var index = createDebug.instances.indexOf(this);
if (index !== -1) {
createDebug.instances.splice(index, 1);
return true;
}
return false;
}
function extend(namespace, delimiter) {
return createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);
}
/**
* Enables a debug mode by namespaces. This can include modes
* separated by a colon and wildcards.
*
* @param {String} namespaces
* @api public
*/
function enable(namespaces) {
createDebug.save(namespaces);
createDebug.names = [];
createDebug.skips = [];
var i;
var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
var len = split.length;
for (i = 0; i < len; i++) {
if (!split[i]) {
// ignore empty strings
continue;
}
namespaces = split[i].replace(/\*/g, '.*?');
if (namespaces[0] === '-') {
createDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
} else {
createDebug.names.push(new RegExp('^' + namespaces + '$'));
}
}
for (i = 0; i < createDebug.instances.length; i++) {
var instance = createDebug.instances[i];
instance.enabled = createDebug.enabled(instance.namespace);
}
}
/**
* Disable debug output.
*
* @api public
*/
function disable() {
createDebug.enable('');
}
/**
* Returns true if the given mode name is enabled, false otherwise.
*
* @param {String} name
* @return {Boolean}
* @api public
*/
function enabled(name) {
if (name[name.length - 1] === '*') {
return true;
}
var i;
var len;
for (i = 0, len = createDebug.skips.length; i < len; i++) {
if (createDebug.skips[i].test(name)) {
return false;
}
}
for (i = 0, len = createDebug.names.length; i < len; i++) {
if (createDebug.names[i].test(name)) {
return true;
}
}
return false;
}
/**
* Coerce `val`.
*
* @param {Mixed} val
* @return {Mixed}
* @api private
*/
function coerce(val) {
if (val instanceof Error) {
return val.stack || val.message;
}
return val;
}
createDebug.enable(createDebug.load());
return createDebug;
}
module.exports = setup;
@@ -0,0 +1,434 @@
// @ts-ignore TS6133
import { expect, test } from "vitest";
import * as z from "zod/v3";
import { util } from "../helpers/util.js";
const Test = z.object({
f1: z.number(),
f2: z.string().optional(),
f3: z.string().nullable(),
f4: z.array(z.object({ t: z.union([z.string(), z.boolean()]) })),
});
test("object type inference", () => {
type TestType = {
f1: number;
f2?: string | undefined;
f3: string | null;
f4: { t: string | boolean }[];
};
util.assertEqual<z.TypeOf<typeof Test>, TestType>(true);
});
test("unknown throw", () => {
const asdf: unknown = 35;
expect(() => Test.parse(asdf)).toThrow();
});
test("shape() should return schema of particular key", () => {
const f1Schema = Test.shape.f1;
const f2Schema = Test.shape.f2;
const f3Schema = Test.shape.f3;
const f4Schema = Test.shape.f4;
expect(f1Schema).toBeInstanceOf(z.ZodNumber);
expect(f2Schema).toBeInstanceOf(z.ZodOptional);
expect(f3Schema).toBeInstanceOf(z.ZodNullable);
expect(f4Schema).toBeInstanceOf(z.ZodArray);
});
test("correct parsing", () => {
Test.parse({
f1: 12,
f2: "string",
f3: "string",
f4: [
{
t: "string",
},
],
});
Test.parse({
f1: 12,
f3: null,
f4: [
{
t: false,
},
],
});
});
test("incorrect #1", () => {
expect(() => Test.parse({} as any)).toThrow();
});
test("nonstrict by default", () => {
z.object({ points: z.number() }).parse({
points: 2314,
unknown: "asdf",
});
});
const data = {
points: 2314,
unknown: "asdf",
};
test("strip by default", () => {
const val = z.object({ points: z.number() }).parse(data);
expect(val).toEqual({ points: 2314 });
});
test("unknownkeys override", () => {
const val = z.object({ points: z.number() }).strict().passthrough().strip().nonstrict().parse(data);
expect(val).toEqual(data);
});
test("passthrough unknown", () => {
const val = z.object({ points: z.number() }).passthrough().parse(data);
expect(val).toEqual(data);
});
test("strip unknown", () => {
const val = z.object({ points: z.number() }).strip().parse(data);
expect(val).toEqual({ points: 2314 });
});
test("strict", () => {
const val = z.object({ points: z.number() }).strict().safeParse(data);
expect(val.success).toEqual(false);
});
test("catchall inference", () => {
const o1 = z
.object({
first: z.string(),
})
.catchall(z.number());
const d1 = o1.parse({ first: "asdf", num: 1243 });
util.assertEqual<number, (typeof d1)["asdf"]>(true);
util.assertEqual<string, (typeof d1)["first"]>(true);
});
test("catchall overrides strict", () => {
const o1 = z.object({ first: z.string().optional() }).strict().catchall(z.number());
// should run fine
// setting a catchall overrides the unknownKeys behavior
o1.parse({
asdf: 1234,
});
// should only run catchall validation
// against unknown keys
o1.parse({
first: "asdf",
asdf: 1234,
});
});
test("catchall overrides strict", () => {
const o1 = z
.object({
first: z.string(),
})
.strict()
.catchall(z.number());
// should run fine
// setting a catchall overrides the unknownKeys behavior
o1.parse({
first: "asdf",
asdf: 1234,
});
});
test("test that optional keys are unset", async () => {
const SNamedEntity = z.object({
id: z.string(),
set: z.string().optional(),
unset: z.string().optional(),
});
const result = await SNamedEntity.parse({
id: "asdf",
set: undefined,
});
// eslint-disable-next-line ban/ban
expect(Object.keys(result)).toEqual(["id", "set"]);
});
test("test catchall parsing", async () => {
const result = z.object({ name: z.string() }).catchall(z.number()).parse({ name: "Foo", validExtraKey: 61 });
expect(result).toEqual({ name: "Foo", validExtraKey: 61 });
const result2 = z
.object({ name: z.string() })
.catchall(z.number())
.safeParse({ name: "Foo", validExtraKey: 61, invalid: "asdf" });
expect(result2.success).toEqual(false);
});
test("test nonexistent keys", async () => {
const Schema = z.union([z.object({ a: z.string() }), z.object({ b: z.number() })]);
const obj = { a: "A" };
const result = await Schema.spa(obj); // Works with 1.11.10, breaks with 2.0.0-beta.21
expect(result.success).toBe(true);
});
test("test async union", async () => {
const Schema2 = z.union([
z.object({
ty: z.string(),
}),
z.object({
ty: z.number(),
}),
]);
const obj = { ty: "A" };
const result = await Schema2.spa(obj); // Works with 1.11.10, breaks with 2.0.0-beta.21
expect(result.success).toEqual(true);
});
test("test inferred merged type", async () => {
const asdf = z.object({ a: z.string() }).merge(z.object({ a: z.number() }));
type asdf = z.infer<typeof asdf>;
util.assertEqual<asdf, { a: number }>(true);
});
test("inferred merged object type with optional properties", async () => {
const Merged = z
.object({ a: z.string(), b: z.string().optional() })
.merge(z.object({ a: z.string().optional(), b: z.string() }));
type Merged = z.infer<typeof Merged>;
util.assertEqual<Merged, { a?: string; b: string }>(true);
// todo
// util.assertEqual<Merged, { a?: string; b: string }>(true);
});
test("inferred unioned object type with optional properties", async () => {
const Unioned = z.union([
z.object({ a: z.string(), b: z.string().optional() }),
z.object({ a: z.string().optional(), b: z.string() }),
]);
type Unioned = z.infer<typeof Unioned>;
util.assertEqual<Unioned, { a: string; b?: string } | { a?: string; b: string }>(true);
});
test("inferred enum type", async () => {
const Enum = z.object({ a: z.string(), b: z.string().optional() }).keyof();
expect(Enum.Values).toEqual({
a: "a",
b: "b",
});
expect(Enum.enum).toEqual({
a: "a",
b: "b",
});
expect(Enum._def.values).toEqual(["a", "b"]);
type Enum = z.infer<typeof Enum>;
util.assertEqual<Enum, "a" | "b">(true);
});
test("inferred partial object type with optional properties", async () => {
const Partial = z.object({ a: z.string(), b: z.string().optional() }).partial();
type Partial = z.infer<typeof Partial>;
util.assertEqual<Partial, { a?: string; b?: string }>(true);
});
test("inferred picked object type with optional properties", async () => {
const Picked = z.object({ a: z.string(), b: z.string().optional() }).pick({ b: true });
type Picked = z.infer<typeof Picked>;
util.assertEqual<Picked, { b?: string }>(true);
});
test("inferred type for unknown/any keys", () => {
const myType = z.object({
anyOptional: z.any().optional(),
anyRequired: z.any(),
unknownOptional: z.unknown().optional(),
unknownRequired: z.unknown(),
});
type myType = z.infer<typeof myType>;
util.assertEqual<
myType,
{
anyOptional?: any;
anyRequired?: any;
unknownOptional?: unknown;
unknownRequired?: unknown;
}
>(true);
});
test("setKey", () => {
const base = z.object({ name: z.string() });
const withNewKey = base.setKey("age", z.number());
type withNewKey = z.infer<typeof withNewKey>;
util.assertEqual<withNewKey, { name: string; age: number }>(true);
withNewKey.parse({ name: "asdf", age: 1234 });
});
test("strictcreate", async () => {
const strictObj = z.strictObject({
name: z.string(),
});
const syncResult = strictObj.safeParse({ name: "asdf", unexpected: 13 });
expect(syncResult.success).toEqual(false);
const asyncResult = await strictObj.spa({ name: "asdf", unexpected: 13 });
expect(asyncResult.success).toEqual(false);
});
test("object with refine", async () => {
const schema = z
.object({
a: z.string().default("foo"),
b: z.number(),
})
.refine(() => true);
expect(schema.parse({ b: 5 })).toEqual({ b: 5, a: "foo" });
const result = await schema.parseAsync({ b: 5 });
expect(result).toEqual({ b: 5, a: "foo" });
});
test("intersection of object with date", async () => {
const schema = z.object({
a: z.date(),
});
expect(schema.and(schema).parse({ a: new Date(1637353595983) })).toEqual({
a: new Date(1637353595983),
});
const result = await schema.parseAsync({ a: new Date(1637353595983) });
expect(result).toEqual({ a: new Date(1637353595983) });
});
test("intersection of object with refine with date", async () => {
const schema = z
.object({
a: z.date(),
})
.refine(() => true);
expect(schema.and(schema).parse({ a: new Date(1637353595983) })).toEqual({
a: new Date(1637353595983),
});
const result = await schema.parseAsync({ a: new Date(1637353595983) });
expect(result).toEqual({ a: new Date(1637353595983) });
});
test("constructor key", () => {
const person = z
.object({
name: z.string(),
})
.strict();
expect(() =>
person.parse({
name: "bob dylan",
constructor: 61,
})
).toThrow();
});
test("constructor key", () => {
const Example = z.object({
prop: z.string(),
opt: z.number().optional(),
arr: z.string().array(),
});
type Example = z.infer<typeof Example>;
util.assertEqual<keyof Example, "prop" | "opt" | "arr">(true);
});
test("unknownkeys merging", () => {
// This one is "strict"
const schemaA = z
.object({
a: z.string(),
})
.strict();
// This one is "strip"
const schemaB = z
.object({
b: z.string(),
})
.catchall(z.string());
const mergedSchema = schemaA.merge(schemaB);
type mergedSchema = typeof mergedSchema;
util.assertEqual<mergedSchema["_def"]["unknownKeys"], "strip">(true);
expect(mergedSchema._def.unknownKeys).toEqual("strip");
util.assertEqual<mergedSchema["_def"]["catchall"], z.ZodString>(true);
expect(mergedSchema._def.catchall instanceof z.ZodString).toEqual(true);
});
const personToExtend = z.object({
firstName: z.string(),
lastName: z.string(),
});
test("extend() should return schema with new key", () => {
const PersonWithNickname = personToExtend.extend({ nickName: z.string() });
type PersonWithNickname = z.infer<typeof PersonWithNickname>;
const expected = { firstName: "f", nickName: "n", lastName: "l" };
const actual = PersonWithNickname.parse(expected);
expect(actual).toEqual(expected);
util.assertEqual<keyof PersonWithNickname, "firstName" | "lastName" | "nickName">(true);
util.assertEqual<PersonWithNickname, { firstName: string; lastName: string; nickName: string }>(true);
});
test("extend() should have power to override existing key", () => {
const PersonWithNumberAsLastName = personToExtend.extend({
lastName: z.number(),
});
type PersonWithNumberAsLastName = z.infer<typeof PersonWithNumberAsLastName>;
const expected = { firstName: "f", lastName: 42 };
const actual = PersonWithNumberAsLastName.parse(expected);
expect(actual).toEqual(expected);
util.assertEqual<PersonWithNumberAsLastName, { firstName: string; lastName: number }>(true);
});
test("passthrough index signature", () => {
const a = z.object({ a: z.string() });
type a = z.infer<typeof a>;
util.assertEqual<{ a: string }, a>(true);
const b = a.passthrough();
type b = z.infer<typeof b>;
util.assertEqual<{ a: string } & { [k: string]: unknown }, b>(true);
});
test("xor", () => {
type Without<T, U> = { [P in Exclude<keyof T, keyof U>]?: never };
type XOR<T, U> = T extends object ? (U extends object ? (Without<T, U> & U) | (Without<U, T> & T) : U) : T;
type A = { name: string; a: number };
type B = { name: string; b: number };
type C = XOR<A, B>;
type Outer = { data: C };
const _Outer: z.ZodType<Outer> = z.object({
data: z.union([z.object({ name: z.string(), a: z.number() }), z.object({ name: z.string(), b: z.number() })]),
});
});
@@ -0,0 +1,28 @@
<svg viewbox="0 0 18 18">
<g class="ql-fill ql-transparent">
<rect height="2" transform="translate(18 -12) rotate(90)" width="2" x="14" y="2"></rect>
<rect height="2" transform="translate(21 -9) rotate(90)" width="2" x="14" y="5"></rect>
<rect height="2" transform="translate(24 -6) rotate(90)" width="2" x="14" y="8"></rect>
<rect height="2" transform="translate(30 0) rotate(90)" width="2" x="14" y="14"></rect>
<rect height="2" transform="translate(27 -3) rotate(90)" width="2" x="14" y="11"></rect>
<rect height="2" transform="translate(6 0) rotate(90)" width="2" x="2" y="2"></rect>
<rect height="2" transform="translate(9 3) rotate(90)" width="2" x="2" y="5"></rect>
<rect height="2" transform="translate(12 6) rotate(90)" width="2" x="2" y="8"></rect>
<rect height="2" transform="translate(18 12) rotate(90)" width="2" x="2" y="14"></rect>
<rect height="2" transform="translate(15 9) rotate(90)" width="2" x="2" y="11"></rect>
</g>
<line class="ql-stroke-miter" x1="2" x2="16" y1="15" y2="15"></line>
<g class="ql-fill ql-transparent">
<rect height="2" width="2" x="5" y="2"></rect>
<rect height="2" width="2" x="8" y="2"></rect>
<rect height="2" width="2" x="11" y="2"></rect>
<rect height="2" width="2" x="5" y="14"></rect>
<rect height="2" width="2" x="8" y="14"></rect>
<rect height="2" width="2" x="8" y="11"></rect>
<rect height="2" width="2" x="8" y="8"></rect>
<rect height="2" width="2" x="8" y="5"></rect>
<rect height="2" transform="translate(15 3) rotate(90)" width="2" x="5" y="8"></rect>
<rect height="2" transform="translate(21 -3) rotate(90)" width="2" x="11" y="8"></rect>
<rect height="2" width="2" x="11" y="14"></rect>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F A B wC"},B:{"1":"0 1 2 3 4 5 O P Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I","2":"C L M G N"},C:{"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 0C 1C","4609":"5B 6B 7B 8B 9B AC BC CC DC","4674":"VC","5698":"4B","7490":"yB zB 0B 1B 2B","7746":"3B UC","8705":"0 1 2 3 4 5 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"},D:{"1":"0 1 2 3 4 5 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","4097":"9B","4290":"UC 4B VC","6148":"5B 6B 7B 8B"},E:{"1":"G 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 2C ZC 3C 4C 5C 6C aC","4609":"B C NC OC","8193":"L M 7C 8C"},F:{"1":"0 1 2 3 4 5 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 FD GD HD ID NC uC JD OC","4097":"yB","6148":"uB vB wB xB"},G:{"1":"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","4097":"TD UD VD WD"},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:{"4097":"MC"},N:{"2":"A B"},O:{"1":"PC"},P:{"2":"J oD pD qD","4097":"6 7 8 9 AB BB CB DB EB FB rD sD aC tD uD vD wD xD QC RC SC yD"},Q:{"1":"zD"},R:{"1":"0D"},S:{"1":"2D","2":"1D"}},B:5,C:"Variable fonts",D:true};
@@ -0,0 +1,43 @@
// Copyright (c) 2016 Ryan Prichard
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to
// deal in the Software without restriction, including without limitation the
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
// sell copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
#ifndef WINPTY_EXCEPTION_H
#define WINPTY_EXCEPTION_H
#include <windows.h>
#if defined(__GNUC__)
#define WINPTY_NOEXCEPT noexcept
#elif defined(_MSC_VER) && _MSC_VER >= 1900
#define WINPTY_NOEXCEPT noexcept
#else
#define WINPTY_NOEXCEPT
#endif
class WinptyException {
public:
virtual const wchar_t *what() const WINPTY_NOEXCEPT = 0;
virtual ~WinptyException() {}
};
void throwWinptyException(const wchar_t *what);
void throwWindowsError(const wchar_t *prefix, DWORD error=GetLastError());
#endif // WINPTY_EXCEPTION_H
@@ -0,0 +1,216 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.verifyRegistrationResponse = verifyRegistrationResponse;
const decodeAttestationObject_js_1 = require("../helpers/decodeAttestationObject.js");
const decodeClientDataJSON_js_1 = require("../helpers/decodeClientDataJSON.js");
const parseAuthenticatorData_js_1 = require("../helpers/parseAuthenticatorData.js");
const toHash_js_1 = require("../helpers/toHash.js");
const decodeCredentialPublicKey_js_1 = require("../helpers/decodeCredentialPublicKey.js");
const cose_js_1 = require("../helpers/cose.js");
const convertAAGUIDToString_js_1 = require("../helpers/convertAAGUIDToString.js");
const parseBackupFlags_js_1 = require("../helpers/parseBackupFlags.js");
const matchExpectedRPID_js_1 = require("../helpers/matchExpectedRPID.js");
const index_js_1 = require("../helpers/iso/index.js");
const settingsService_js_1 = require("../services/settingsService.js");
const generateRegistrationOptions_js_1 = require("./generateRegistrationOptions.js");
const verifyAttestationFIDOU2F_js_1 = require("./verifications/verifyAttestationFIDOU2F.js");
const verifyAttestationPacked_js_1 = require("./verifications/verifyAttestationPacked.js");
const verifyAttestationAndroidSafetyNet_js_1 = require("./verifications/verifyAttestationAndroidSafetyNet.js");
const verifyAttestationTPM_js_1 = require("./verifications/tpm/verifyAttestationTPM.js");
const verifyAttestationAndroidKey_js_1 = require("./verifications/verifyAttestationAndroidKey.js");
const verifyAttestationApple_js_1 = require("./verifications/verifyAttestationApple.js");
/**
* Verify that the user has legitimately completed the registration process
*
* **Options:**
*
* @param response - Response returned by **@simplewebauthn/browser**'s `startAuthentication()`
* @param expectedChallenge - The base64url-encoded `options.challenge` returned by `generateRegistrationOptions()`
* @param expectedOrigin - Website URL (or array of URLs) that the registration should have occurred on
* @param expectedRPID - RP ID (or array of IDs) that was specified in the registration options
* @param expectedType **(Optional)** - The response type expected ('webauthn.create')
* @param requireUserPresence **(Optional)** - Enforce user presence by the authenticator (or skip it during auto registration) Defaults to `true`
* @param requireUserVerification **(Optional)** - Enforce user verification by the authenticator (via PIN, fingerprint, etc...) Defaults to `true`
* @param supportedAlgorithmIDs **(Optional)** - Array of numeric COSE algorithm identifiers supported for attestation by this RP. See https://www.iana.org/assignments/cose/cose.xhtml#algorithms. Defaults to all supported algorithm IDs
* @param attestationSafetyNetEnforceCTSCheck **(Optional)** - Require that an Android device's system integrity has not been tampered with if it uses SafetyNet attestation. Defaults to `true`
*/
async function verifyRegistrationResponse(options) {
const { response, expectedChallenge, expectedOrigin, expectedRPID, expectedType, requireUserPresence = true, requireUserVerification = true, supportedAlgorithmIDs = generateRegistrationOptions_js_1.supportedCOSEAlgorithmIdentifiers, attestationSafetyNetEnforceCTSCheck = true, } = options;
const { id, rawId, type: credentialType, response: attestationResponse } = response;
// Ensure credential specified an ID
if (!id) {
throw new Error('Missing credential ID');
}
// Ensure ID is base64url-encoded
if (id !== rawId) {
throw new Error('Credential ID was not base64url-encoded');
}
// Make sure credential type is public-key
if (credentialType !== 'public-key') {
throw new Error(`Unexpected credential type ${credentialType}, expected "public-key"`);
}
const clientDataJSON = (0, decodeClientDataJSON_js_1.decodeClientDataJSON)(attestationResponse.clientDataJSON);
const { type, origin, challenge, tokenBinding } = clientDataJSON;
// Make sure we're handling an registration
if (Array.isArray(expectedType)) {
if (!expectedType.includes(type)) {
const joinedExpectedType = expectedType.join(', ');
throw new Error(`Unexpected registration response type "${type}", expected one of: ${joinedExpectedType}`);
}
}
else if (expectedType) {
if (type !== expectedType) {
throw new Error(`Unexpected registration response type "${type}", expected "${expectedType}"`);
}
}
else if (type !== 'webauthn.create') {
throw new Error(`Unexpected registration response type: ${type}`);
}
// Ensure the device provided the challenge we gave it
if (typeof expectedChallenge === 'function') {
if (!(await expectedChallenge(challenge))) {
throw new Error(`Custom challenge verifier returned false for registration response challenge "${challenge}"`);
}
}
else if (challenge !== expectedChallenge) {
throw new Error(`Unexpected registration response challenge "${challenge}", expected "${expectedChallenge}"`);
}
// Check that the origin is our site
if (Array.isArray(expectedOrigin)) {
if (!expectedOrigin.includes(origin)) {
throw new Error(`Unexpected registration response origin "${origin}", expected one of: ${expectedOrigin.join(', ')}`);
}
}
else {
if (origin !== expectedOrigin) {
throw new Error(`Unexpected registration response origin "${origin}", expected "${expectedOrigin}"`);
}
}
if (tokenBinding) {
if (typeof tokenBinding !== 'object') {
throw new Error(`Unexpected value for TokenBinding "${tokenBinding}"`);
}
if (['present', 'supported', 'not-supported'].indexOf(tokenBinding.status) < 0) {
throw new Error(`Unexpected tokenBinding.status value of "${tokenBinding.status}"`);
}
}
const attestationObject = index_js_1.isoBase64URL.toBuffer(attestationResponse.attestationObject);
const decodedAttestationObject = (0, decodeAttestationObject_js_1.decodeAttestationObject)(attestationObject);
const fmt = decodedAttestationObject.get('fmt');
const authData = decodedAttestationObject.get('authData');
const attStmt = decodedAttestationObject.get('attStmt');
const parsedAuthData = (0, parseAuthenticatorData_js_1.parseAuthenticatorData)(authData);
const { aaguid, rpIdHash, flags, credentialID, counter, credentialPublicKey, extensionsData, } = parsedAuthData;
// Make sure the response's RP ID is ours
let matchedRPID;
if (expectedRPID) {
let expectedRPIDs = [];
if (typeof expectedRPID === 'string') {
expectedRPIDs = [expectedRPID];
}
else {
expectedRPIDs = expectedRPID;
}
matchedRPID = await (0, matchExpectedRPID_js_1.matchExpectedRPID)(rpIdHash, expectedRPIDs);
}
// Make sure someone was physically present
if (requireUserPresence && !flags.up) {
throw new Error('User presence was required, but user was not present');
}
// Enforce user verification if specified
if (requireUserVerification && !flags.uv) {
throw new Error('User verification was required, but user could not be verified');
}
if (!credentialID) {
throw new Error('No credential ID was provided by authenticator');
}
if (!credentialPublicKey) {
throw new Error('No public key was provided by authenticator');
}
if (!aaguid) {
throw new Error('No AAGUID was present during registration');
}
const decodedPublicKey = (0, decodeCredentialPublicKey_js_1.decodeCredentialPublicKey)(credentialPublicKey);
const alg = decodedPublicKey.get(cose_js_1.COSEKEYS.alg);
if (typeof alg !== 'number') {
throw new Error('Credential public key was missing numeric alg');
}
// Make sure the key algorithm is one we specified within the registration options
if (!supportedAlgorithmIDs.includes(alg)) {
const supported = supportedAlgorithmIDs.join(', ');
throw new Error(`Unexpected public key alg "${alg}", expected one of "${supported}"`);
}
const clientDataHash = await (0, toHash_js_1.toHash)(index_js_1.isoBase64URL.toBuffer(attestationResponse.clientDataJSON));
const rootCertificates = settingsService_js_1.SettingsService.getRootCertificates({
identifier: fmt,
});
// Prepare arguments to pass to the relevant verification method
const verifierOpts = {
aaguid,
attStmt,
authData,
clientDataHash,
credentialID,
credentialPublicKey,
rootCertificates,
rpIdHash,
attestationSafetyNetEnforceCTSCheck,
};
/**
* Verification can only be performed when attestation = 'direct'
*/
let verified = false;
if (fmt === 'fido-u2f') {
verified = await (0, verifyAttestationFIDOU2F_js_1.verifyAttestationFIDOU2F)(verifierOpts);
}
else if (fmt === 'packed') {
verified = await (0, verifyAttestationPacked_js_1.verifyAttestationPacked)(verifierOpts);
}
else if (fmt === 'android-safetynet') {
verified = await (0, verifyAttestationAndroidSafetyNet_js_1.verifyAttestationAndroidSafetyNet)(verifierOpts);
}
else if (fmt === 'android-key') {
verified = await (0, verifyAttestationAndroidKey_js_1.verifyAttestationAndroidKey)(verifierOpts);
}
else if (fmt === 'tpm') {
verified = await (0, verifyAttestationTPM_js_1.verifyAttestationTPM)(verifierOpts);
}
else if (fmt === 'apple') {
verified = await (0, verifyAttestationApple_js_1.verifyAttestationApple)(verifierOpts);
}
else if (fmt === 'none') {
if (attStmt.size > 0) {
throw new Error('None attestation had unexpected attestation statement');
}
// This is the weaker of the attestations, so there's nothing else to really check
verified = true;
}
else {
throw new Error(`Unsupported Attestation Format: ${fmt}`);
}
if (!verified) {
return { verified: false };
}
const { credentialDeviceType, credentialBackedUp } = (0, parseBackupFlags_js_1.parseBackupFlags)(flags);
return {
verified: true,
registrationInfo: {
fmt,
aaguid: (0, convertAAGUIDToString_js_1.convertAAGUIDToString)(aaguid),
credentialType,
credential: {
id: index_js_1.isoBase64URL.fromBuffer(credentialID),
publicKey: credentialPublicKey,
counter,
transports: response.response.transports,
},
attestationObject,
userVerified: flags.uv,
credentialDeviceType,
credentialBackedUp,
origin: clientDataJSON.origin,
rpID: matchedRPID,
authenticatorExtensionResults: extensionsData,
},
};
}
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F A B wC"},B:{"1":"0 1 2 3 4 5 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 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"},C:{"1":"0 1 2 3 4 5 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 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 0C 1C"},D:{"1":"0 1 2 3 4 5 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 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"},E:{"1":"lC mC CD SC nC oC pC qC rC sC tC DD ED","2":"J ZB K D E F A B C L M G 2C ZC 3C 4C 5C 6C aC NC OC 7C 8C 9C bC cC PC AD QC dC eC fC gC hC BD RC iC jC kC"},F:{"1":"0 1 2 3 4 5 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 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 FD GD HD ID NC uC JD OC"},G:{"1":"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 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"},H:{"2":"hD"},I:{"1":"I","2":"TC J iD jD kD lD vC mD nD"},J:{"2":"D A"},K:{"2":"A B C H NC uC OC"},L:{"1":"I"},M:{"1":"MC"},N:{"2":"A B"},O:{"1":"PC"},P:{"1":"9 AB BB CB DB EB FB","2":"6 7 8 J oD pD qD rD sD aC tD uD vD wD xD QC RC SC yD"},Q:{"16":"zD"},R:{"16":"0D"},S:{"2":"1D","16":"2D"}},B:5,C:"WebAssembly Extended Constant Expressions",D:false};
@@ -0,0 +1,151 @@
'use strict';
var defineProperties = require('define-properties');
var test = require('tape');
var callBind = require('call-bind');
var functionsHaveNames = require('functions-have-names')();
var forEach = require('for-each');
var debug = require('object-inspect');
var v = require('es-value-fixtures');
var hasSymbols = require('has-symbols/shams')();
var mockProperty = require('mock-property');
var index = require('../Iterator.zipKeyed');
var impl = require('../Iterator.zipKeyed/implementation');
var from = require('../Iterator.from/polyfill')();
var testIterator = require('./helpers/testIterator');
var isEnumerable = Object.prototype.propertyIsEnumerable;
module.exports = {
tests: function (zipKeyed, name, t) {
t['throws'](
function () { return new zipKeyed(); }, // eslint-disable-line new-cap
TypeError,
'`' + name + '` itself is not a constructor'
);
t['throws'](
function () { return new zipKeyed({}); }, // eslint-disable-line new-cap
TypeError,
'`' + name + '` itself is not a constructor, with an argument'
);
forEach(v.primitives, function (primitive) {
t['throws'](
function () { zipKeyed(primitive); },
TypeError,
debug(primitive) + ' is not an Object'
);
if (primitive != null) {
t['throws'](
function () { zipKeyed({ a: primitive }); },
TypeError,
'key "a" on iterables object is ' + debug(primitive) + ' which is not an iterable Object'
);
}
});
forEach(v.objects, function (nonIterator) {
t.doesNotThrow(function () { zipKeyed({ a: nonIterator }); }, 'does not throw until `.next()`');
t['throws'](
function () { zipKeyed({ a: nonIterator }).next(); },
TypeError,
'key "a" on iterables object is ' + debug(nonIterator) + ' which is not an iterable Object'
);
});
t.test('actual iteration', { skip: !hasSymbols }, function (st) {
forEach(v.nonFunctions, function (nonFunction) {
if (nonFunction != null) {
var badIterable = {};
badIterable[Symbol.iterator] = nonFunction;
st['throws'](
function () { zipKeyed({ a: [], b: badIterable, c: [] }).next(); },
TypeError,
'key "b" on iterables object is ' + debug(badIterable) + ' is not a function'
);
}
});
forEach(v.strings, function (string) {
st['throws'](
function () { zipKeyed({ a: string }); },
TypeError,
'key "a" on iterables object is an iterable primitive, but non-objects are not considered iterable'
);
});
st.test('real iterators', { skip: !hasSymbols }, function (s2t) {
var iter = [['a', 1], ['b', 2]][Symbol.iterator]();
var iterator = zipKeyed({ a: iter, b: ['a', 3], c: ['b', 4] });
testIterator(
iterator,
[
{ __proto__: null, a: ['a', 1], b: 'a', c: 'b' },
{ __proto__: null, a: ['b', 2], b: 3, c: 4 }
],
s2t,
'array iterator + array yields combined results'
);
s2t.end();
});
st.test('observability in a replaced String iterator', function (s2t) {
var originalStringIterator = String.prototype[Symbol.iterator];
var observedType;
s2t.teardown(mockProperty(String.prototype, Symbol.iterator, {
get: function () {
'use strict'; // eslint-disable-line strict, lines-around-directive
observedType = typeof this;
return originalStringIterator;
}
}));
zipKeyed([from('')]);
s2t.equal(observedType, 'string', 'string primitive -> primitive receiver in Symbol.iterator getter');
zipKeyed([from(Object(''))]);
s2t.equal(observedType, 'object', 'boxed string -> boxed string in Symbol.iterator getter');
s2t.end();
});
st.end();
});
},
index: function () {
test('Iterator.zipKeyed: index', function (t) {
module.exports.tests(index, 'Iterator.zipKeyed', t);
t.end();
});
},
implementation: function () {
test('Iterator.zipKeyed: implementation', function (t) {
module.exports.tests(impl, 'Iterator.zipKeyed', t);
t.end();
});
},
shimmed: function () {
test('Iterator.zipKeyed: shimmed', function (t) {
t.test('Function name', { skip: !functionsHaveNames }, function (st) {
st.equal(Iterator.zipKeyed.name, 'zipKeyed', 'Iterator.zipKeyed has name "zipKeyed"');
st.end();
});
t.test('enumerability', { skip: !defineProperties.supportsDescriptors }, function (et) {
et.equal(false, isEnumerable.call(Iterator, 'zipKeyed'), 'Iterator.zipKeyed is not enumerable');
et.end();
});
module.exports.tests(callBind(Iterator.zipKeyed, Iterator), 'Iterator.zipKeyed', t);
t.end();
});
}
};
@@ -0,0 +1,943 @@
export default `flf2a$ 9 8 18 0 24 0 64 0
Author : LG Beard
Date : 2005/5/8 6:45:39
Version: 1.0
-------------------------------------------------
_ _ _ _ _ _ ~ ~
=_/\\\\___ _____==__/\\\\___==_/\\\\___===_/\\\\_======_/\\\\_===_/\\\\___========~ ~====
(_ v ))(_ ____))(_ _ ))(_ _)) (____)) (_ )) ___~____
/ : <\\ \\\\ / ._)) / |))// / \\\\ / \\\\ / : \\\\ ((______))_
/:. | // ///:. |____ /:. ~ \\\\ /:. \\\\__ /:. \\\\ /:. | // \\:. /__)
\\___| //\\ // \\ _____))\\___| // \\__ ____))\\__ // \\___| // \\_ _/
=====\\//==\\//===\\//===========\\//=====\\//========\\//=======\\//=======~~======
~ ~ ~ ~ ~ ~ ~
Font Built from a sig dated 17 Feb 1995
-------------------------------------------------
This font has been created using JavE's FIGlet font export assistant.
Have a look at: http://www.jave.de
Permission is hereby given to modify this font, as long as the
modifier's name is placed on a comment line.
---
Font modified June 17, 2007 by patorjk
This was to widen the space character.
$ $#
$ $#
$ $#
$ $#
$ $#
$ $#
$ $#
$ $#
$ $##
_ #
_/\\\\_ #
(_ _)) #
/ \\\\ #
/ \\ :\\\\ #
\\__/\\// #
\\// #
#
##
"#
#
#
#
#
#
#
#
##
##
#
#
#
#
#
#
#
##
_ #
/\\\\_ #
/ _ \\\\ #
\\:.\\\\// #
/\\\\ \\\\ #
\\_ _// #
\\// #
#
##
%#
#
#
#
#
#
#
#
##
&#
#
#
#
#
#
#
#
##
____ #
(:. _)) #
\\// #
#
#
#
#
#
##
_ #
//\\__ #
// _\\ #
\\\\:\`\\ #
//:./_ #
\\\\ __/ #
\\\\/ #
#
##
_ #
__/\\\\ #
/_ \\\\ #
/':// #
_\\.:\\\\ #
\\__ // #
\\// #
#
##
*#
#
#
#
#
#
#
#
##
+#
#
#
#
#
#
#
#
##
#
#
#
#
___ #
((:. ) #
\\\\/ #
#
##
-#
#
#
#
#
#
#
#
##
#
#
#
#
_ #
_/\\\\_ #
(:.__)) #
#
##
_ #
//\\ #
// / #
// / #
_//./ #
((_ _) #
\\\\/ #
#
##
_ #
__/\\\\__ #
(_ __)) #
/ _ \\\\ #
/:.(_)) \\\\ #
\\ _____// #
\\// #
#
##
_ #
_/\\\\_ #
(____)) #
/ \\\\ #
/:. \\\\ #
\\__ // #
\\// #
#
##
_ #
__//\\ #
// \\ #
\\\\_/ / #
/.:/_/\\\\ #
\\ ___// #
\\// #
#
##
_ #
__/\\\\ #
/ \\\\ #
\\_/':// #
/ \\.:\\\\ #
\\__ // #
\\// #
#
##
_ #
/\\\\ _ #
/ ///\\\\ #
\\ \\/ // #
_\\:.// #
(_ _) #
\\// #
#
##
_ #
/\\\\__ #
/ _ \\\\ #
\\':\\\\\\// #
/ \\ \\\\ #
\\__ // #
\\// #
#
##
_ #
_/\\\\_ #
(____)) #
/ \\_ #
/:. / \\\\ #
\\ ___// #
\\// #
#
##
_ #
___/\\\\ #
/ \\\\ #
\\_/ .:// #
\\ // #
(_ _)) #
\\// #
#
##
_ #
/\\\\__ #
/:. \\\\ #
\\ \\_// #
/_\\ \\\\ #
\\__.:// #
\\// #
#
##
_ #
___/\\\\ #
/ \\\\ #
\\__/ :// #
\\ // #
(_ _)) #
\\// #
#
##
____ #
(:. _)) #
\\// #
#
_ #
_/\\\\_ #
(:.__)) #
#
##
____ #
(:. _)) #
\\// #
#
___ #
((:. ) #
\\\\/ #
#
##
#
_ #
//\\__ #
//. _\\ #
\\\\: __/ #
\\\\/ #
#
#
##
=#
#
#
#
#
#
#
#
##
#
_ #
__/\\\\ #
/_ :\\\\ #
\\__ '// #
\\// #
#
#
##
_ #
___/\\\\ #
/ \\\\ #
\\_/\\.:// #
_/ // #
(_ _)) #
\\// #
#
##
@#
#
#
#
#
#
#
#
##
_ #
__/\\\\__ #
(_ ____) #
/ _ \\\\ #
/:./_\\ \\\\ #
\\ _ // #
\\// \\// #
#
##
_ #
__/\\\\___ #
(_ __)) #
/ ._))// #
/: ._))\\\\ #
\\ ____// #
\\// #
#
##
_ #
__/\\\\___ #
(_ ____)) #
/ || #
/:. ||___ #
\\ _____)) #
\\// #
#
##
_ #
__/\\\\___ #
(_ ____)) #
/ _ \\\\ #
/:. |_\\ \\\\ #
\\ _____// #
\\// #
#
##
_ #
__/\\\\___ #
(_ ____)) #
/ ._)) #
/:. ||___ #
\\ _____)) #
\\// #
#
##
_ #
__/\\\\___ #
(_ ____)) #
/ ||__ #
/:. ._)) #
\\ _)) #
\\// #
#
##
_ #
__/\\\\__ #
(_ ___)) #
/ || _ #
/:. \\/ \\\\ #
\\ ____// #
\\// #
#
##
_ #
_/\\\\___ #
(_ __ __)) #
/ |_| \\\\ #
/:. _ \\\\ #
\\___| | // #
\\// #
#
##
_ #
_/\\\\_ #
(____)) #
/ \\\\ #
/:. \\\\ #
\\__ // #
\\// #
#
##
_ #
__/\\\\__ #
(_ _)) #
\\ \\\\ #
/\\/ .:\\\\ #
\\__ _// #
\\// #
#
##
#
_/\\\\___ #
(_ __)) #
/ : \\\\ #
/:. | // #
\\___| \\\\ #
\\// #
#
##
_ #
_/\\\\_ #
(_ _)) #
/ \\\\ #
/:. \\\\__ #
\\__ ____)) #
\\// #
#
##
_ #
_/\\\\___ _____ #
(_ v )) #
/ : <\\ \\\\ #
/:. | // // #
\\___| //\\ // #
\\// \\// #
#
##
_ #
_/\\\\___ #
(_ )) #
/ : \\\\ #
/:. | // #
\\___| // #
\\// #
#
##
_ #
__/\\\\___ #
(_ _)) #
/ _ \\\\ #
/:.(_)) \\\\ #
\\ _____// #
\\// #
#
##
_ #
_/\\\\___ #
(_ _ _)) #
/ |))\\\\ #
/:. ___// #
\\_ \\\\ #
\\// #
#
##
_ #
__/\\\\___ #
(_ __)) #
/ _ \\\\ #
/:.(_)) \\\\_ #
\\ _______// #
\\// #
#
##
_ #
_/\\\\___ #
(_ _ )) #
/ |))// #
/:. \\\\ #
\\___| // #
\\// #
#
##
_ #
/\\\\__ #
/ \\\\ #
_\\ \\_// #
// \\:.\\ #
\\\\__ / #
\\\\/ #
#
##
_ #
__/\\\\__ #
(__ __)) #
/ \\\\ #
/:. \\\\ #
\\__ // #
\\// #
#
##
_ #
___ /\\\\ #
/ //\\ \\\\ #
\\:.\\\\_\\ \\\\ #
\\ :. // #
(_ ___)) #
\\// #
#
##
_ #
_ /\\\\ #
/ \\\\ \\\\ #
\\:'/ // #
\\ // #
(_ _)) #
\\// #
#
##
_ _ #
___ /\\\\ /\\\\ #
/ | \\\\/ \\\\ #
\\:' | \\\\ \\\\ #
\\ : </ // #
(_ ___^____)) #
\\// #
#
##
_ _ #
_/\\\\/\\\\_ #
(_ / __)) #
\\/ \\\\ #
__/./.\\\\_ #
(_ _) _)) #
\\// \\// #
#
##
_ #
_ /\\\\ #
/\\\\ / // #
\\ \\/ // #
_\\:.// #
(_ _)) #
\\// #
#
##
_ #
__//\\ #
// \\ #
\\\\_/ /_ #
/.:/ \\\\ #
\\ __// #
\\// #
#
##
_ #
//\\__ #
// _\\ #
||:\`| #
||:.|_ #
\\\\ __/ #
\\\\/ #
#
##
_ #
/\\\\ #
\\ \\\\ #
\\ \\\\ #
\\:\\\\_ #
(_ _)) #
\\// #
#
##
_ #
__/\\\\ #
/_ \\\\ #
|':|| #
_|.:|| #
\\__ // #
\\// #
#
##
^#
#
#
#
#
#
#
#
##
_#
#
#
#
#
#
#
#
##
___ #
((:. ) #
\\\\/ #
#
#
#
#
#
##
_ #
__/\\\\__ #
(_ ____) #
/ _ \\\\ #
/:./_\\ \\\\ #
\\ _ // #
\\// \\// #
#
##
_ #
__/\\\\___ #
(_ __)) #
/ ._))// #
/: ._))\\\\ #
\\ ____// #
\\// #
#
##
_ #
__/\\\\___ #
(_ ____)) #
/ || #
/:. ||___ #
\\ _____)) #
\\// #
#
##
_ #
__/\\\\___ #
(_ ____)) #
/ _ \\\\ #
/:. |_\\ \\\\ #
\\ _____// #
\\// #
#
##
_ #
__/\\\\___ #
(_ ____)) #
/ ._)) #
/:. ||___ #
\\ _____)) #
\\// #
#
##
_ #
__/\\\\___ #
(_ ____)) #
/ ||__ #
/:. ._)) #
\\ _)) #
\\// #
#
##
_ #
__/\\\\__ #
(_ ___)) #
/ || _ #
/:. \\/ \\\\ #
\\ ____// #
\\// #
#
##
_ #
_/\\\\___ #
(_ __ __)) #
/ |_| \\\\ #
/:. _ \\\\ #
\\___| | // #
\\// #
#
##
_ #
_/\\\\_ #
(____)) #
/ \\\\ #
/:. \\\\ #
\\__ // #
\\// #
#
##
_ #
__/\\\\__ #
(_ _)) #
\\ \\\\ #
/\\/ .:\\\\ #
\\__ _// #
\\// #
#
##
#
_/\\\\___ #
(_ __)) #
/ : \\\\ #
/:. | // #
\\___| \\\\ #
\\// #
#
##
_ #
_/\\\\_ #
(_ _)) #
/ \\\\ #
/:. \\\\__ #
\\__ ____)) #
\\// #
#
##
_ #
_/\\\\___ _____ #
(_ v )) #
/ : <\\ \\\\ #
/:. | // // #
\\___| //\\ // #
\\// \\// #
#
##
_ #
_/\\\\___ #
(_ )) #
/ : \\\\ #
/:. | // #
\\___| // #
\\// #
#
##
_ #
__/\\\\___ #
(_ _)) #
/ _ \\\\ #
/:.(_)) \\\\ #
\\ _____// #
\\// #
#
##
_ #
_/\\\\___ #
(_ _ _)) #
/ |))\\\\ #
/:. ___// #
\\_ \\\\ #
\\// #
#
##
_ #
__/\\\\___ #
(_ __)) #
/ _ \\\\ #
/:.(_)) \\\\_ #
\\ _______// #
\\// #
#
##
_ #
_/\\\\___ #
(_ _ )) #
/ |))// #
/:. \\\\ #
\\___| // #
\\// #
#
##
_ #
/\\\\__ #
/ \\\\ #
_\\ \\_// #
// \\:.\\ #
\\\\__ / #
\\\\/ #
#
##
_ #
__/\\\\__ #
(__ __)) #
/ \\\\ #
/:. \\\\ #
\\__ // #
\\// #
#
##
_ #
___ /\\\\ #
/ //\\ \\\\ #
\\:.\\\\_\\ \\\\ #
\\ :. // #
(_ ___)) #
\\// #
#
##
_ #
_ /\\\\ #
/ \\\\ \\\\ #
\\:'/ // #
\\ // #
(_ _)) #
\\// #
#
##
_ _ #
___ /\\\\ /\\\\ #
/ | \\\\/ \\\\ #
\\:' | \\\\ \\\\ #
\\ : </ // #
(_ ___^____)) #
\\// #
#
##
_ _ #
_/\\\\/\\\\_ #
(_ / __)) #
\\/ \\\\ #
__/./.\\\\_ #
(_ _) _)) #
\\// \\// #
#
##
_ #
_ /\\\\ #
/\\\\ / // #
\\ \\/ // #
_\\:.// #
(_ _)) #
\\// #
#
##
_ #
__//\\ #
// \\ #
\\\\_/ /_ #
/.:/ \\\\ #
\\ __// #
\\// #
#
##
_ #
//\\__ #
// _\\ #
\\\\:\`\\ #
//:./_ #
\\\\ __/ #
\\\\/ #
#
##
_ #
_/\\\\_ #
(_ _)) #
/ \\\\ #
/:. \\\\ #
\\ _// #
\\// #
#
##
_ #
__/\\\\ #
/_ \\\\ #
/':// #
_\\.:\\\\ #
\\__ // #
\\// #
#
##
~#
#
#
#
#
#
#
#
##
_ #
__/\\\\__ #
(_ ____) #
/ _ \\\\ #
/:./_\\ \\\\ #
\\ _ // #
\\// \\// #
#
##
_ #
__/\\\\___ #
(_ _)) #
/ _ \\\\ #
/:.(_)) \\\\ #
\\ _____// #
\\// #
#
##
_ #
___ /\\\\ #
/ //\\ \\\\ #
\\:.\\\\_\\ \\\\ #
\\ :. // #
(_ ___)) #
\\// #
#
##
_ #
__/\\\\__ #
(_ ____) #
/ _ \\\\ #
/:./_\\ \\\\ #
\\ _ // #
\\// \\// #
#
##
_ #
__/\\\\___ #
(_ _)) #
/ _ \\\\ #
/:.(_)) \\\\ #
\\ _____// #
\\// #
#
##
_ #
___ /\\\\ #
/ //\\ \\\\ #
\\:.\\\\_\\ \\\\ #
\\ :. // #
(_ ___)) #
\\// #
#
##
�#
#
#
#
#
#
#
#
##`
@@ -0,0 +1,2 @@
declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"unnecessaryQualifier", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
export default _default;
@@ -0,0 +1,8 @@
"use strict";
function _iterable_to_array(iter) {
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) {
return Array.from(iter);
}
}
exports._ = _iterable_to_array;
@@ -0,0 +1,15 @@
import { auto } from './auto.mjs';
import { number } from './numbers/index.mjs';
import { px, percent, degrees, vw, vh } from './numbers/units.mjs';
import { testValueType } from './test.mjs';
/**
* A list of value types commonly used for dimensions
*/
const dimensionValueTypes = [number, px, percent, degrees, vw, vh, auto];
/**
* Tests a dimensional value against the list of dimension ValueTypes
*/
const findDimensionValueType = (v) => dimensionValueTypes.find(testValueType(v));
export { dimensionValueTypes, findDimensionValueType };
@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('sortedIndex', require('../sortedIndex'));
func.placeholder = require('./placeholder');
module.exports = func;
@@ -0,0 +1,6 @@
import {
spacing
} from "./chunk-CH7FQ62Q.mjs";
export {
spacing
};
@@ -0,0 +1,112 @@
/**
* @fileoverview Disallow or enforce spaces around equal signs in JSX attributes.
* @author ryym
*/
'use strict';
const docsUrl = require('../util/docsUrl');
const getSourceCode = require('../util/eslint').getSourceCode;
const report = require('../util/report');
// ------------------------------------------------------------------------------
// Rule Definition
// ------------------------------------------------------------------------------
const messages = {
noSpaceBefore: 'There should be no space before \'=\'',
noSpaceAfter: 'There should be no space after \'=\'',
needSpaceBefore: 'A space is required before \'=\'',
needSpaceAfter: 'A space is required after \'=\'',
};
/** @type {import('eslint').Rule.RuleModule} */
module.exports = {
meta: {
docs: {
description: 'Enforce or disallow spaces around equal signs in JSX attributes',
category: 'Stylistic Issues',
recommended: false,
url: docsUrl('jsx-equals-spacing'),
},
fixable: 'code',
messages,
schema: [{
enum: ['always', 'never'],
}],
},
create(context) {
const config = context.options[0] || 'never';
/**
* Determines a given attribute node has an equal sign.
* @param {ASTNode} attrNode - The attribute node.
* @returns {boolean} Whether or not the attriute node has an equal sign.
*/
function hasEqual(attrNode) {
return attrNode.type !== 'JSXSpreadAttribute' && attrNode.value !== null;
}
// --------------------------------------------------------------------------
// Public
// --------------------------------------------------------------------------
return {
JSXOpeningElement(node) {
node.attributes.forEach((attrNode) => {
if (!hasEqual(attrNode)) {
return;
}
const sourceCode = getSourceCode(context);
const equalToken = sourceCode.getTokenAfter(attrNode.name);
const spacedBefore = sourceCode.isSpaceBetweenTokens(attrNode.name, equalToken);
const spacedAfter = sourceCode.isSpaceBetweenTokens(equalToken, attrNode.value);
if (config === 'never') {
if (spacedBefore) {
report(context, messages.noSpaceBefore, 'noSpaceBefore', {
node: attrNode,
loc: equalToken.loc.start,
fix(fixer) {
return fixer.removeRange([attrNode.name.range[1], equalToken.range[0]]);
},
});
}
if (spacedAfter) {
report(context, messages.noSpaceAfter, 'noSpaceAfter', {
node: attrNode,
loc: equalToken.loc.start,
fix(fixer) {
return fixer.removeRange([equalToken.range[1], attrNode.value.range[0]]);
},
});
}
} else if (config === 'always') {
if (!spacedBefore) {
report(context, messages.needSpaceBefore, 'needSpaceBefore', {
node: attrNode,
loc: equalToken.loc.start,
fix(fixer) {
return fixer.insertTextBefore(equalToken, ' ');
},
});
}
if (!spacedAfter) {
report(context, messages.needSpaceAfter, 'needSpaceAfter', {
node: attrNode,
loc: equalToken.loc.start,
fix(fixer) {
return fixer.insertTextAfter(equalToken, ' ');
},
});
}
}
});
},
};
},
};
@@ -0,0 +1 @@
{"version":3,"file":"encode-html.d.ts","sourceRoot":"","sources":["../../../src/generated/encode-html.ts"],"names":[],"mappings":"AAEA,KAAK,cAAc,GACb,MAAM,GACN;IAAE,CAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;IAAC,CAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAY1E,eAAO,MAAM,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAC,cAAc,CAAwhuB,CAAC"}
@@ -0,0 +1,14 @@
module.exports = {
"ascending": `\u{C624}\u{B984}\u{CC28}\u{C21C}`,
"ascendingSort": (args)=>`${args.columnName} \u{C5F4}\u{C744} \u{AE30}\u{C900}\u{C73C}\u{B85C} \u{C624}\u{B984}\u{CC28}\u{C21C}\u{C73C}\u{B85C} \u{C815}\u{B82C}\u{B428}`,
"columnSize": (args)=>`${args.value} \u{D53D}\u{C140}`,
"descending": `\u{B0B4}\u{B9BC}\u{CC28}\u{C21C}`,
"descendingSort": (args)=>`${args.columnName} \u{C5F4}\u{C744} \u{AE30}\u{C900}\u{C73C}\u{B85C} \u{B0B4}\u{B9BC}\u{CC28}\u{C21C}\u{C73C}\u{B85C} \u{C815}\u{B82C}\u{B428}`,
"resizerDescription": `\u{D06C}\u{AE30} \u{C870}\u{C815}\u{C744} \u{C2DC}\u{C791}\u{D558}\u{B824}\u{BA74} Enter\u{B97C} \u{B204}\u{B974}\u{C138}\u{C694}.`,
"select": `\u{C120}\u{D0DD}`,
"selectAll": `\u{BAA8}\u{B450} \u{C120}\u{D0DD}`,
"sortable": `\u{C815}\u{B82C} \u{AC00}\u{B2A5}\u{D55C} \u{C5F4}`
};
//# sourceMappingURL=ko-KR.main.js.map
@@ -0,0 +1,4 @@
export function fullJitter(delay: number) {
const jitteredDelay = Math.random() * delay;
return Math.round(jitteredDelay);
}
@@ -0,0 +1,120 @@
var minus = "-".charCodeAt(0);
var plus = "+".charCodeAt(0);
var dot = ".".charCodeAt(0);
var exp = "e".charCodeAt(0);
var EXP = "E".charCodeAt(0);
// Check if three code points would start a number
// https://www.w3.org/TR/css-syntax-3/#starts-with-a-number
function likeNumber(value) {
var code = value.charCodeAt(0);
var nextCode;
if (code === plus || code === minus) {
nextCode = value.charCodeAt(1);
if (nextCode >= 48 && nextCode <= 57) {
return true;
}
var nextNextCode = value.charCodeAt(2);
if (nextCode === dot && nextNextCode >= 48 && nextNextCode <= 57) {
return true;
}
return false;
}
if (code === dot) {
nextCode = value.charCodeAt(1);
if (nextCode >= 48 && nextCode <= 57) {
return true;
}
return false;
}
if (code >= 48 && code <= 57) {
return true;
}
return false;
}
// Consume a number
// https://www.w3.org/TR/css-syntax-3/#consume-number
module.exports = function(value) {
var pos = 0;
var length = value.length;
var code;
var nextCode;
var nextNextCode;
if (length === 0 || !likeNumber(value)) {
return false;
}
code = value.charCodeAt(pos);
if (code === plus || code === minus) {
pos++;
}
while (pos < length) {
code = value.charCodeAt(pos);
if (code < 48 || code > 57) {
break;
}
pos += 1;
}
code = value.charCodeAt(pos);
nextCode = value.charCodeAt(pos + 1);
if (code === dot && nextCode >= 48 && nextCode <= 57) {
pos += 2;
while (pos < length) {
code = value.charCodeAt(pos);
if (code < 48 || code > 57) {
break;
}
pos += 1;
}
}
code = value.charCodeAt(pos);
nextCode = value.charCodeAt(pos + 1);
nextNextCode = value.charCodeAt(pos + 2);
if (
(code === exp || code === EXP) &&
((nextCode >= 48 && nextCode <= 57) ||
((nextCode === plus || nextCode === minus) &&
nextNextCode >= 48 &&
nextNextCode <= 57))
) {
pos += nextCode === plus || nextCode === minus ? 3 : 2;
while (pos < length) {
code = value.charCodeAt(pos);
if (code < 48 || code > 57) {
break;
}
pos += 1;
}
}
return {
number: value.slice(0, pos),
unit: value.slice(pos)
};
};
@@ -0,0 +1,89 @@
'use strict';
import utils from './utils.js';
import bind from './helpers/bind.js';
import Axios from './core/Axios.js';
import mergeConfig from './core/mergeConfig.js';
import defaults from './defaults/index.js';
import formDataToJSON from './helpers/formDataToJSON.js';
import CanceledError from './cancel/CanceledError.js';
import CancelToken from './cancel/CancelToken.js';
import isCancel from './cancel/isCancel.js';
import {VERSION} from './env/data.js';
import toFormData from './helpers/toFormData.js';
import AxiosError from './core/AxiosError.js';
import spread from './helpers/spread.js';
import isAxiosError from './helpers/isAxiosError.js';
import AxiosHeaders from "./core/AxiosHeaders.js";
import adapters from './adapters/adapters.js';
import HttpStatusCode from './helpers/HttpStatusCode.js';
/**
* Create an instance of Axios
*
* @param {Object} defaultConfig The default config for the instance
*
* @returns {Axios} A new instance of Axios
*/
function createInstance(defaultConfig) {
const context = new Axios(defaultConfig);
const instance = bind(Axios.prototype.request, context);
// Copy axios.prototype to instance
utils.extend(instance, Axios.prototype, context, {allOwnKeys: true});
// Copy context to instance
utils.extend(instance, context, null, {allOwnKeys: true});
// Factory for creating new instances
instance.create = function create(instanceConfig) {
return createInstance(mergeConfig(defaultConfig, instanceConfig));
};
return instance;
}
// Create the default instance to be exported
const axios = createInstance(defaults);
// Expose Axios class to allow class inheritance
axios.Axios = Axios;
// Expose Cancel & CancelToken
axios.CanceledError = CanceledError;
axios.CancelToken = CancelToken;
axios.isCancel = isCancel;
axios.VERSION = VERSION;
axios.toFormData = toFormData;
// Expose AxiosError class
axios.AxiosError = AxiosError;
// alias for CanceledError for backward compatibility
axios.Cancel = axios.CanceledError;
// Expose all/spread
axios.all = function all(promises) {
return Promise.all(promises);
};
axios.spread = spread;
// Expose isAxiosError
axios.isAxiosError = isAxiosError;
// Expose mergeConfig
axios.mergeConfig = mergeConfig;
axios.AxiosHeaders = AxiosHeaders;
axios.formToJSON = thing => formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing);
axios.getAdapter = adapters.getAdapter;
axios.HttpStatusCode = HttpStatusCode;
axios.default = axios;
// this module should only have a default export
export default axios
@@ -0,0 +1,45 @@
import type {
ErrorPayload,
FullReloadPayload,
PrunePayload,
UpdatePayload,
} from './hmrPayload'
export interface CustomEventMap {
'vite:beforeUpdate': UpdatePayload
'vite:afterUpdate': UpdatePayload
'vite:beforePrune': PrunePayload
'vite:beforeFullReload': FullReloadPayload
'vite:error': ErrorPayload
'vite:invalidate': InvalidatePayload
'vite:ws:connect': WebSocketConnectionPayload
'vite:ws:disconnect': WebSocketConnectionPayload
}
export interface WebSocketConnectionPayload {
/**
* @experimental
* We expose this instance experimentally to see potential usage.
* This might be removed in the future if we didn't find reasonable use cases.
* If you find this useful, please open an issue with details so we can discuss and make it stable API.
*/
// eslint-disable-next-line n/no-unsupported-features/node-builtins
webSocket: WebSocket
}
export interface InvalidatePayload {
path: string
message: string | undefined
firstInvalidatedBy: string
}
/**
* provides types for payloads of built-in Vite events
*/
export type InferCustomEventPayload<T extends string> =
T extends keyof CustomEventMap ? CustomEventMap[T] : any
/**
* provides types for names of built-in Vite events
*/
export type CustomEventName = keyof CustomEventMap | (string & {})
@@ -0,0 +1,99 @@
// Copyright (c) 2016 Ryan Prichard
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to
// deal in the Software without restriction, including without limitation the
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
// sell copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
#ifndef WINPTY_SNPRINTF_H
#define WINPTY_SNPRINTF_H
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include "WinptyAssert.h"
#if defined(__CYGWIN__) || defined(__MSYS__)
#define WINPTY_SNPRINTF_FORMAT(fmtarg, vararg) \
__attribute__((format(printf, (fmtarg), ((vararg)))))
#elif defined(__GNUC__)
#define WINPTY_SNPRINTF_FORMAT(fmtarg, vararg) \
__attribute__((format(ms_printf, (fmtarg), ((vararg)))))
#else
#define WINPTY_SNPRINTF_FORMAT(fmtarg, vararg)
#endif
// Returns a value between 0 and size - 1 (inclusive) on success. Returns -1
// on failure (including truncation). The output buffer is always
// NUL-terminated.
inline int
winpty_vsnprintf(char *out, size_t size, const char *fmt, va_list ap) {
ASSERT(size > 0);
out[0] = '\0';
#if defined(_MSC_VER) && _MSC_VER < 1900
// MSVC 2015 added a C99-conforming vsnprintf.
int count = _vsnprintf_s(out, size, _TRUNCATE, fmt, ap);
#else
// MinGW configurations frequently provide a vsnprintf function that simply
// calls one of the MS _vsnprintf* functions, which are not C99 conformant.
int count = vsnprintf(out, size, fmt, ap);
#endif
if (count < 0 || static_cast<size_t>(count) >= size) {
// On truncation, some *printf* implementations return the
// non-truncated size, but other implementations returns -1. Return
// -1 for consistency.
count = -1;
// Guarantee NUL termination.
out[size - 1] = '\0';
} else {
// Guarantee NUL termination.
out[count] = '\0';
}
return count;
}
// Wraps winpty_vsnprintf.
inline int winpty_snprintf(char *out, size_t size, const char *fmt, ...)
WINPTY_SNPRINTF_FORMAT(3, 4);
inline int winpty_snprintf(char *out, size_t size, const char *fmt, ...) {
va_list ap;
va_start(ap, fmt);
const int count = winpty_vsnprintf(out, size, fmt, ap);
va_end(ap);
return count;
}
// Wraps winpty_vsnprintf with automatic size determination.
template <size_t size>
int winpty_vsnprintf(char (&out)[size], const char *fmt, va_list ap) {
return winpty_vsnprintf(out, size, fmt, ap);
}
// Wraps winpty_vsnprintf with automatic size determination.
template <size_t size>
int winpty_snprintf(char (&out)[size], const char *fmt, ...)
WINPTY_SNPRINTF_FORMAT(2, 3);
template <size_t size>
int winpty_snprintf(char (&out)[size], const char *fmt, ...) {
va_list ap;
va_start(ap, fmt);
const int count = winpty_vsnprintf(out, size, fmt, ap);
va_end(ap);
return count;
}
#endif // WINPTY_SNPRINTF_H
@@ -0,0 +1,18 @@
export { default as Menu, MenuProps } from './menu.js';
export { default as MenuItem, MenuItemBaseProps as MenuItemProps } from './base/menu-item-base.js';
export { default as MenuSection, MenuSectionBaseProps as MenuSectionProps } from './base/menu-section-base.js';
export { useMenu } from './use-menu.js';
import 'react';
import '@heroui/theme';
import '@react-aria/menu';
import '@react-types/shared';
import '@heroui/aria-utils';
import '@heroui/divider';
import './menu-item.js';
import 'react/jsx-runtime';
import './use-menu-item.js';
import 'tailwind-variants';
import '@heroui/system';
import '@react-stately/tree';
import '@react-types/menu';
import '@heroui/react-utils';
@@ -0,0 +1,42 @@
// Arabic (Morocco) [ar-ma]
import dayjs from '../index';
var locale = {
name: 'ar-ma',
weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
months: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'),
weekStart: 6,
weekdaysShort: 'احد_إثنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'),
monthsShort: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'),
weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
ordinal: function ordinal(n) {
return n;
},
formats: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'DD/MM/YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY HH:mm',
LLLL: 'dddd D MMMM YYYY HH:mm'
},
meridiem: function meridiem(hour) {
return hour > 12 ? 'م' : 'ص';
},
relativeTime: {
future: 'في %s',
past: 'منذ %s',
s: 'ثوان',
m: 'دقيقة',
mm: '%d دقائق',
h: 'ساعة',
hh: '%d ساعات',
d: 'يوم',
dd: '%d أيام',
M: 'شهر',
MM: '%d أشهر',
y: 'سنة',
yy: '%d سنوات'
}
};
dayjs.locale(locale, null, true);
export default locale;
@@ -0,0 +1,12 @@
"use strict";
// THIS CODE WAS AUTOMATICALLY GENERATED
// DO NOT EDIT THIS CODE BY HAND
// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE:
// npx nx generate-lib repo
Object.defineProperty(exports, "__esModule", { value: true });
exports.es2019_string = void 0;
const base_config_1 = require("./base-config");
exports.es2019_string = {
libs: [],
variables: [['String', base_config_1.TYPE]],
};
@@ -0,0 +1,28 @@
'use strict';
var $TypeError = require('es-errors/type');
var DefinePropertyOrThrow = require('./DefinePropertyOrThrow');
var HasOwnProperty = require('./HasOwnProperty');
var IsExtensible = require('./IsExtensible');
var IsNonNegativeInteger = require('./IsNonNegativeInteger');
// https://262.ecma-international.org/11.0/#sec-setfunctionlength
module.exports = function SetFunctionLength(F, length) {
if (typeof F !== 'function' || !IsExtensible(F) || HasOwnProperty(F, 'length')) {
throw new $TypeError('Assertion failed: `F` must be an extensible function and lack an own `length` property');
}
if (typeof length !== 'number') {
throw new $TypeError('Assertion failed: `length` must be a Number');
}
if (!IsNonNegativeInteger(length)) {
throw new $TypeError('Assertion failed: `length` must be an integer >= 0');
}
return DefinePropertyOrThrow(F, 'length', {
'[[Configurable]]': true,
'[[Enumerable]]': false,
'[[Value]]': length,
'[[Writable]]': false
});
};
@@ -0,0 +1,68 @@
'use strict';
var json$1 = require('@lezer/json');
var language = require('@codemirror/language');
/**
Calls
[`JSON.parse`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse)
on the document and, if that throws an error, reports it as a
single diagnostic.
*/
const jsonParseLinter = () => (view) => {
try {
JSON.parse(view.state.doc.toString());
}
catch (e) {
if (!(e instanceof SyntaxError))
throw e;
const pos = getErrorPosition(e, view.state.doc);
return [{
from: pos,
message: e.message,
severity: 'error',
to: pos
}];
}
return [];
};
function getErrorPosition(error, doc) {
let m;
if (m = error.message.match(/at position (\d+)/))
return Math.min(+m[1], doc.length);
if (m = error.message.match(/at line (\d+) column (\d+)/))
return Math.min(doc.line(+m[1]).from + (+m[2]) - 1, doc.length);
return 0;
}
/**
A language provider that provides JSON parsing.
*/
const jsonLanguage = language.LRLanguage.define({
name: "json",
parser: json$1.parser.configure({
props: [
language.indentNodeProp.add({
Object: language.continuedIndent({ except: /^\s*\}/ }),
Array: language.continuedIndent({ except: /^\s*\]/ })
}),
language.foldNodeProp.add({
"Object Array": language.foldInside
})
]
}),
languageData: {
closeBrackets: { brackets: ["[", "{", '"'] },
indentOnInput: /^\s*[\}\]]$/
}
});
/**
JSON language support.
*/
function json() {
return new language.LanguageSupport(jsonLanguage);
}
exports.json = json;
exports.jsonLanguage = jsonLanguage;
exports.jsonParseLinter = jsonParseLinter;
@@ -0,0 +1,223 @@
'use strict'
const {
MAX_SAFE_COMPONENT_LENGTH,
MAX_SAFE_BUILD_LENGTH,
MAX_LENGTH,
} = require('./constants')
const debug = require('./debug')
exports = module.exports = {}
// The actual regexps go on exports.re
const re = exports.re = []
const safeRe = exports.safeRe = []
const src = exports.src = []
const safeSrc = exports.safeSrc = []
const t = exports.t = {}
let R = 0
const LETTERDASHNUMBER = '[a-zA-Z0-9-]'
// Replace some greedy regex tokens to prevent regex dos issues. These regex are
// used internally via the safeRe object since all inputs in this library get
// normalized first to trim and collapse all extra whitespace. The original
// regexes are exported for userland consumption and lower level usage. A
// future breaking change could export the safer regex only with a note that
// all input should have extra whitespace removed.
const safeRegexReplacements = [
['\\s', 1],
['\\d', MAX_LENGTH],
[LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH],
]
const makeSafeRegex = (value) => {
for (const [token, max] of safeRegexReplacements) {
value = value
.split(`${token}*`).join(`${token}{0,${max}}`)
.split(`${token}+`).join(`${token}{1,${max}}`)
}
return value
}
const createToken = (name, value, isGlobal) => {
const safe = makeSafeRegex(value)
const index = R++
debug(name, index, value)
t[name] = index
src[index] = value
safeSrc[index] = safe
re[index] = new RegExp(value, isGlobal ? 'g' : undefined)
safeRe[index] = new RegExp(safe, isGlobal ? 'g' : undefined)
}
// The following Regular Expressions can be used for tokenizing,
// validating, and parsing SemVer version strings.
// ## Numeric Identifier
// A single `0`, or a non-zero digit followed by zero or more digits.
createToken('NUMERICIDENTIFIER', '0|[1-9]\\d*')
createToken('NUMERICIDENTIFIERLOOSE', '\\d+')
// ## Non-numeric Identifier
// Zero or more digits, followed by a letter or hyphen, and then zero or
// more letters, digits, or hyphens.
createToken('NONNUMERICIDENTIFIER', `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`)
// ## Main Version
// Three dot-separated numeric identifiers.
createToken('MAINVERSION', `(${src[t.NUMERICIDENTIFIER]})\\.` +
`(${src[t.NUMERICIDENTIFIER]})\\.` +
`(${src[t.NUMERICIDENTIFIER]})`)
createToken('MAINVERSIONLOOSE', `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` +
`(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` +
`(${src[t.NUMERICIDENTIFIERLOOSE]})`)
// ## Pre-release Version Identifier
// A numeric identifier, or a non-numeric identifier.
// Non-numberic identifiers include numberic identifiers but can be longer.
// Therefore non-numberic identifiers must go first.
createToken('PRERELEASEIDENTIFIER', `(?:${src[t.NONNUMERICIDENTIFIER]
}|${src[t.NUMERICIDENTIFIER]})`)
createToken('PRERELEASEIDENTIFIERLOOSE', `(?:${src[t.NONNUMERICIDENTIFIER]
}|${src[t.NUMERICIDENTIFIERLOOSE]})`)
// ## Pre-release Version
// Hyphen, followed by one or more dot-separated pre-release version
// identifiers.
createToken('PRERELEASE', `(?:-(${src[t.PRERELEASEIDENTIFIER]
}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`)
createToken('PRERELEASELOOSE', `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]
}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`)
// ## Build Metadata Identifier
// Any combination of digits, letters, or hyphens.
createToken('BUILDIDENTIFIER', `${LETTERDASHNUMBER}+`)
// ## Build Metadata
// Plus sign, followed by one or more period-separated build metadata
// identifiers.
createToken('BUILD', `(?:\\+(${src[t.BUILDIDENTIFIER]
}(?:\\.${src[t.BUILDIDENTIFIER]})*))`)
// ## Full Version String
// A main version, followed optionally by a pre-release version and
// build metadata.
// Note that the only major, minor, patch, and pre-release sections of
// the version string are capturing groups. The build metadata is not a
// capturing group, because it should not ever be used in version
// comparison.
createToken('FULLPLAIN', `v?${src[t.MAINVERSION]
}${src[t.PRERELEASE]}?${
src[t.BUILD]}?`)
createToken('FULL', `^${src[t.FULLPLAIN]}$`)
// like full, but allows v1.2.3 and =1.2.3, which people do sometimes.
// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty
// common in the npm registry.
createToken('LOOSEPLAIN', `[v=\\s]*${src[t.MAINVERSIONLOOSE]
}${src[t.PRERELEASELOOSE]}?${
src[t.BUILD]}?`)
createToken('LOOSE', `^${src[t.LOOSEPLAIN]}$`)
createToken('GTLT', '((?:<|>)?=?)')
// Something like "2.*" or "1.2.x".
// Note that "x.x" is a valid xRange identifer, meaning "any version"
// Only the first item is strictly required.
createToken('XRANGEIDENTIFIERLOOSE', `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`)
createToken('XRANGEIDENTIFIER', `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`)
createToken('XRANGEPLAIN', `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})` +
`(?:\\.(${src[t.XRANGEIDENTIFIER]})` +
`(?:\\.(${src[t.XRANGEIDENTIFIER]})` +
`(?:${src[t.PRERELEASE]})?${
src[t.BUILD]}?` +
`)?)?`)
createToken('XRANGEPLAINLOOSE', `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})` +
`(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +
`(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +
`(?:${src[t.PRERELEASELOOSE]})?${
src[t.BUILD]}?` +
`)?)?`)
createToken('XRANGE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`)
createToken('XRANGELOOSE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`)
// Coercion.
// Extract anything that could conceivably be a part of a valid semver
createToken('COERCEPLAIN', `${'(^|[^\\d])' +
'(\\d{1,'}${MAX_SAFE_COMPONENT_LENGTH}})` +
`(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` +
`(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`)
createToken('COERCE', `${src[t.COERCEPLAIN]}(?:$|[^\\d])`)
createToken('COERCEFULL', src[t.COERCEPLAIN] +
`(?:${src[t.PRERELEASE]})?` +
`(?:${src[t.BUILD]})?` +
`(?:$|[^\\d])`)
createToken('COERCERTL', src[t.COERCE], true)
createToken('COERCERTLFULL', src[t.COERCEFULL], true)
// Tilde ranges.
// Meaning is "reasonably at or greater than"
createToken('LONETILDE', '(?:~>?)')
createToken('TILDETRIM', `(\\s*)${src[t.LONETILDE]}\\s+`, true)
exports.tildeTrimReplace = '$1~'
createToken('TILDE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`)
createToken('TILDELOOSE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`)
// Caret ranges.
// Meaning is "at least and backwards compatible with"
createToken('LONECARET', '(?:\\^)')
createToken('CARETTRIM', `(\\s*)${src[t.LONECARET]}\\s+`, true)
exports.caretTrimReplace = '$1^'
createToken('CARET', `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`)
createToken('CARETLOOSE', `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`)
// A simple gt/lt/eq thing, or just "" to indicate "any version"
createToken('COMPARATORLOOSE', `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`)
createToken('COMPARATOR', `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`)
// An expression to strip any whitespace between the gtlt and the thing
// it modifies, so that `> 1.2.3` ==> `>1.2.3`
createToken('COMPARATORTRIM', `(\\s*)${src[t.GTLT]
}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true)
exports.comparatorTrimReplace = '$1$2$3'
// Something like `1.2.3 - 1.2.4`
// Note that these all use the loose form, because they'll be
// checked against either the strict or loose comparator form
// later.
createToken('HYPHENRANGE', `^\\s*(${src[t.XRANGEPLAIN]})` +
`\\s+-\\s+` +
`(${src[t.XRANGEPLAIN]})` +
`\\s*$`)
createToken('HYPHENRANGELOOSE', `^\\s*(${src[t.XRANGEPLAINLOOSE]})` +
`\\s+-\\s+` +
`(${src[t.XRANGEPLAINLOOSE]})` +
`\\s*$`)
// Star ranges basically just allow anything at all.
createToken('STAR', '(<|>)?=?\\s*\\*')
// >=0.0.0 is like a star
createToken('GTE0', '^\\s*>=\\s*0\\.0\\.0\\s*$')
createToken('GTE0PRE', '^\\s*>=\\s*0\\.0\\.0-0\\s*$')
@@ -0,0 +1,17 @@
"use client";
// src/types.ts
var CalendarDate = class {
};
var CalendarDateTime = class {
};
var ZonedDateTime = class {
};
var AnyCalendarDate = class {
};
export {
AnyCalendarDate,
CalendarDate,
CalendarDateTime,
ZonedDateTime
};
@@ -0,0 +1,45 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _filter2 = require('./internal/filter.js');
var _filter3 = _interopRequireDefault(_filter2);
var _eachOfLimit = require('./internal/eachOfLimit.js');
var _eachOfLimit2 = _interopRequireDefault(_eachOfLimit);
var _awaitify = require('./internal/awaitify.js');
var _awaitify2 = _interopRequireDefault(_awaitify);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* The same as [`filter`]{@link module:Collections.filter} but runs a maximum of `limit` async operations at a
* time.
*
* @name filterLimit
* @static
* @memberOf module:Collections
* @method
* @see [async.filter]{@link module:Collections.filter}
* @alias selectLimit
* @category Collection
* @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
* @param {number} limit - The maximum number of async operations at a time.
* @param {Function} iteratee - A truth test to apply to each item in `coll`.
* The `iteratee` is passed a `callback(err, truthValue)`, which must be called
* with a boolean argument once it has completed. Invoked with (item, callback).
* @param {Function} [callback] - A callback which is called after all the
* `iteratee` functions have finished. Invoked with (err, results).
* @returns {Promise} a promise, if no callback provided
*/
function filterLimit(coll, limit, iteratee, callback) {
return (0, _filter3.default)((0, _eachOfLimit2.default)(limit), coll, iteratee, callback);
}
exports.default = (0, _awaitify2.default)(filterLimit, 4);
module.exports = exports.default;
@@ -0,0 +1,35 @@
{
"name": "@nolyfill/is-core-module",
"version": "1.0.39",
"repository": {
"type": "git",
"url": "https://github.com/SukkaW/nolyfill",
"directory": "packages/manual/is-core-module"
},
"main": "./index.js",
"types": "./index.d.ts",
"files": [
"**/*.js",
"*.d.ts",
"*.js"
],
"exports": {
".": "./index.js",
"./index.js": "./index.js",
"./package.json": "./package.json"
},
"license": "MIT",
"devDependencies": {
"@rollup/plugin-commonjs": "^26.0.1",
"@rollup/plugin-node-resolve": "^15.2.3",
"@rollup/plugin-replace": "^5.0.7",
"ljharb-is-core-module": "npm:is-core-module@^2.15.0",
"resolve-pkg": "^2.0.0"
},
"engines": {
"node": ">=12.4.0"
},
"scripts": {
"build": "rollup -c rollup.config.ts --configPlugin swc3"
}
}
@@ -0,0 +1 @@
{"version":3,"file":"LazyServiceIdentifier.js","sourceRoot":"","sources":["../../../../src/services/models/LazyServiceIdentifier.ts"],"names":[],"mappings":";;;AAEA,MAAM,6BAA6B,GAAkB,MAAM,CAAC,GAAG,CAC7D,6CAA6C,CAC9C,CAAC;AAEF,MAAa,qBAAqB;IACzB,CAAC,6BAA6B,CAAC,CAAO;IAEpC,eAAe,CAAqC;IAE7D,YAAY,cAAkD;QAC5D,IAAI,CAAC,eAAe,GAAG,cAAc,CAAC;QACtC,IAAI,CAAC,6BAA6B,CAAC,GAAG,IAAI,CAAC;IAC7C,CAAC;IAEM,MAAM,CAAC,EAAE,CACd,KAAc;QAEd,OAAO,CACL,OAAO,KAAK,KAAK,QAAQ;YACzB,KAAK,KAAK,IAAI;YACb,KAAwC,CACvC,6BAA6B,CAC9B,KAAK,IAAI,CACX,CAAC;IACJ,CAAC;IAEM,MAAM;QACX,OAAO,IAAI,CAAC,eAAe,EAAE,CAAC;IAChC,CAAC;CACF;AAzBD,sDAyBC"}
Loaded 100 of 35554 files, more files were not shown because too many files have changed in this diff. Show more