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,26 @@
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.isUndef = exports.isString = exports.isObject = exports.isNumber = exports.isFunction = exports.isBoolean = void 0;
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
var isObject = exports.isObject = function isObject(value) {
return value !== null && (0, _typeof2["default"])(value) === 'object';
};
var isFunction = exports.isFunction = function isFunction(value) {
return typeof value === 'function';
};
var isString = exports.isString = function isString(value) {
return typeof value === 'string';
};
var isBoolean = exports.isBoolean = function isBoolean(value) {
return typeof value === 'boolean';
};
var isNumber = exports.isNumber = function isNumber(value) {
return typeof value === 'number';
};
var isUndef = exports.isUndef = function isUndef(value) {
return typeof value === 'undefined';
};
@@ -0,0 +1,110 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.SKELETON_TYPE = exports.TYPE = void 0;
exports.isLiteralElement = isLiteralElement;
exports.isArgumentElement = isArgumentElement;
exports.isNumberElement = isNumberElement;
exports.isDateElement = isDateElement;
exports.isTimeElement = isTimeElement;
exports.isSelectElement = isSelectElement;
exports.isPluralElement = isPluralElement;
exports.isPoundElement = isPoundElement;
exports.isTagElement = isTagElement;
exports.isNumberSkeleton = isNumberSkeleton;
exports.isDateTimeSkeleton = isDateTimeSkeleton;
exports.createLiteralElement = createLiteralElement;
exports.createNumberElement = createNumberElement;
var TYPE;
(function (TYPE) {
/**
* Raw text
*/
TYPE[TYPE["literal"] = 0] = "literal";
/**
* Variable w/o any format, e.g `var` in `this is a {var}`
*/
TYPE[TYPE["argument"] = 1] = "argument";
/**
* Variable w/ number format
*/
TYPE[TYPE["number"] = 2] = "number";
/**
* Variable w/ date format
*/
TYPE[TYPE["date"] = 3] = "date";
/**
* Variable w/ time format
*/
TYPE[TYPE["time"] = 4] = "time";
/**
* Variable w/ select format
*/
TYPE[TYPE["select"] = 5] = "select";
/**
* Variable w/ plural format
*/
TYPE[TYPE["plural"] = 6] = "plural";
/**
* Only possible within plural argument.
* This is the `#` symbol that will be substituted with the count.
*/
TYPE[TYPE["pound"] = 7] = "pound";
/**
* XML-like tag
*/
TYPE[TYPE["tag"] = 8] = "tag";
})(TYPE || (exports.TYPE = TYPE = {}));
var SKELETON_TYPE;
(function (SKELETON_TYPE) {
SKELETON_TYPE[SKELETON_TYPE["number"] = 0] = "number";
SKELETON_TYPE[SKELETON_TYPE["dateTime"] = 1] = "dateTime";
})(SKELETON_TYPE || (exports.SKELETON_TYPE = SKELETON_TYPE = {}));
/**
* Type Guards
*/
function isLiteralElement(el) {
return el.type === TYPE.literal;
}
function isArgumentElement(el) {
return el.type === TYPE.argument;
}
function isNumberElement(el) {
return el.type === TYPE.number;
}
function isDateElement(el) {
return el.type === TYPE.date;
}
function isTimeElement(el) {
return el.type === TYPE.time;
}
function isSelectElement(el) {
return el.type === TYPE.select;
}
function isPluralElement(el) {
return el.type === TYPE.plural;
}
function isPoundElement(el) {
return el.type === TYPE.pound;
}
function isTagElement(el) {
return el.type === TYPE.tag;
}
function isNumberSkeleton(el) {
return !!(el && typeof el === 'object' && el.type === SKELETON_TYPE.number);
}
function isDateTimeSkeleton(el) {
return !!(el && typeof el === 'object' && el.type === SKELETON_TYPE.dateTime);
}
function createLiteralElement(value) {
return {
type: TYPE.literal,
value: value,
};
}
function createNumberElement(value, style) {
return {
type: TYPE.number,
value: value,
style: style,
};
}
@@ -0,0 +1 @@
{"version":3,"file":"no-unused-class-component-methods.d.ts","sourceRoot":"","sources":["no-unused-class-component-methods.js"],"names":[],"mappings":"wBAoGW,OAAO,QAAQ,EAAE,IAAI,CAAC,UAAU"}
@@ -0,0 +1,50 @@
# string-width
> Get the visual width of a string - the number of columns required to display it
Some Unicode characters are [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms) and use double the normal width. [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) are stripped and doesn't affect the width.
Useful to be able to measure the actual width of command-line output.
## Install
```
$ npm install string-width
```
## Usage
```js
const stringWidth = require('string-width');
stringWidth('a');
//=> 1
stringWidth('古');
//=> 2
stringWidth('\u001B[1m古\u001B[22m');
//=> 2
```
## Related
- [string-width-cli](https://github.com/sindresorhus/string-width-cli) - CLI for this module
- [string-length](https://github.com/sindresorhus/string-length) - Get the real length of a string
- [widest-line](https://github.com/sindresorhus/widest-line) - Get the visual width of the widest line in a string
---
<div align="center">
<b>
<a href="https://tidelift.com/subscription/pkg/npm-string-width?utm_source=npm-string-width&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
</b>
<br>
<sub>
Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
</sub>
</div>
@@ -0,0 +1 @@
export declare function moduleRequire<T>(p: string, sourceFile: string): T;
@@ -0,0 +1,40 @@
import { DOMProps, AriaLabelingProps } from '@react-types/shared';
interface Options {
/**
* If the filter should be enabled.
*/
enabled?: boolean;
/**
* If labelling associated aria properties should be included in the filter.
*/
labelable?: boolean;
/**
* A Set of other property names that should be included in the filter.
*/
propNames?: Set<string>;
/**
* A Set of other property names that should be removed from the filter.
*/
omitPropNames?: Set<string>;
/**
* A Set of event names that should be excluded from the filter.
*/
omitEventNames?: Set<string>;
/**
* Whether to omit data-* props.
*/
omitDataProps?: boolean;
/**
* Whether to omit event props.
*/
omitEventProps?: boolean;
}
/**
* Filters out all props that aren't valid DOM props or defined via override prop obj.
* @param props - The component props to be filtered.
* @param opts - Props to override.
*/
declare function filterDOMProps(props: DOMProps & AriaLabelingProps, opts?: Options): DOMProps & AriaLabelingProps;
export { filterDOMProps };
@@ -0,0 +1,5 @@
Copyright 2018 Kilian Valkhof
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
@@ -0,0 +1,174 @@
import test from 'tape';
import { elementType } from 'jsx-ast-utils';
import getAccessibleChildText from '../../../src/util/getAccessibleChildText';
import JSXAttributeMock from '../../../__mocks__/JSXAttributeMock';
import JSXElementMock from '../../../__mocks__/JSXElementMock';
test('getAccessibleChildText', (t) => {
t.equal(
getAccessibleChildText(JSXElementMock(
'a',
[JSXAttributeMock('aria-label', 'foo')],
), elementType),
'foo',
'returns the aria-label when present',
);
t.equal(
getAccessibleChildText(JSXElementMock(
'a',
[JSXAttributeMock('aria-label', 'foo')],
[{ type: 'JSXText', value: 'bar' }],
), elementType),
'foo',
'returns the aria-label instead of children',
);
t.equal(
getAccessibleChildText(JSXElementMock(
'a',
[JSXAttributeMock('aria-hidden', 'true')],
), elementType),
'',
'skips elements with aria-hidden=true',
);
t.equal(
getAccessibleChildText(JSXElementMock(
'a',
[],
[{ type: 'JSXText', value: 'bar' }],
), elementType),
'bar',
'returns literal value for JSXText child',
);
t.equal(
getAccessibleChildText(JSXElementMock(
'a',
[],
[JSXElementMock('img', [
JSXAttributeMock('src', 'some/path'),
JSXAttributeMock('alt', 'a sensible label'),
])],
), elementType),
'a sensible label',
'returns alt text for img child',
);
t.equal(
getAccessibleChildText(JSXElementMock(
'a',
[],
[JSXElementMock('span', [
JSXAttributeMock('alt', 'a sensible label'),
])],
), elementType),
'',
'returns blank when alt tag is used on arbitrary element',
);
t.equal(
getAccessibleChildText(JSXElementMock(
'a',
[],
[{ type: 'Literal', value: 'bar' }],
), elementType),
'bar',
'returns literal value for JSXText child',
);
t.equal(
getAccessibleChildText(JSXElementMock(
'a',
[],
[{ type: 'Literal', value: ' bar ' }],
), elementType),
'bar',
'returns trimmed literal value for JSXText child',
);
t.equal(
getAccessibleChildText(JSXElementMock(
'a',
[],
[{ type: 'Literal', value: 'foo bar' }],
), elementType),
'foo bar',
'returns space-collapsed literal value for JSXText child',
);
t.equal(
getAccessibleChildText(JSXElementMock(
'a',
[],
[{ type: 'Literal', value: 'foo, bar. baz? foo; bar:' }],
), elementType),
'foo bar baz foo bar',
'returns punctuation-stripped literal value for JSXText child',
);
t.equal(
getAccessibleChildText(JSXElementMock(
'a',
[],
[JSXElementMock(
'span',
[],
[{ type: 'Literal', value: 'bar' }],
)],
), elementType),
'bar',
'returns recursive value for JSXElement child',
);
t.equal(
getAccessibleChildText(JSXElementMock(
'a',
[],
[JSXElementMock(
'span',
[],
[JSXElementMock(
'span',
[JSXAttributeMock('aria-hidden', 'true')],
)],
)],
), elementType),
'',
'skips children with aria-hidden-true',
);
t.equal(
getAccessibleChildText(JSXElementMock(
'a',
[],
[{ type: 'Literal', value: 'foo' }, { type: 'Literal', value: 'bar' }],
), elementType),
'foo bar',
'joins multiple children properly - no spacing',
);
t.equal(
getAccessibleChildText(JSXElementMock(
'a',
[],
[{ type: 'Literal', value: ' foo ' }, { type: 'Literal', value: ' bar ' }],
), elementType),
'foo bar',
'joins multiple children properly - with spacing',
);
t.equal(
getAccessibleChildText(JSXElementMock(
'a',
[],
[{ type: 'Literal', value: 'foo' }, { type: 'Unknown' }, { type: 'Literal', value: 'bar' }],
), elementType),
'foo bar',
'skips unknown elements',
);
t.end();
});
@@ -0,0 +1,29 @@
/**
* Checks if `value` is object-like. A value is object-like if it's not `null`
* and has a `typeof` result of "object".
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
* @example
*
* _.isObjectLike({});
* // => true
*
* _.isObjectLike([1, 2, 3]);
* // => true
*
* _.isObjectLike(_.noop);
* // => false
*
* _.isObjectLike(null);
* // => false
*/
function isObjectLike(value) {
return value != null && typeof value == 'object';
}
export default isObjectLike;
@@ -0,0 +1,26 @@
import { OneBotAction } from '../../action/OneBotAction';
import { Static } from '@sinclair/typebox';
declare const PayloadSchema: import("@sinclair/typebox").TObject<{
user_id: import("@sinclair/typebox").TString;
event_type: import("@sinclair/typebox").TNumber;
}>;
type PayloadType = Static<typeof PayloadSchema>;
declare const ReturnSchema: import("@sinclair/typebox").TAny;
type ReturnType = Static<typeof ReturnSchema>;
export declare class SetInputStatus extends OneBotAction<PayloadType, ReturnType> {
actionName: "set_input_status";
payloadSchema: import("@sinclair/typebox").TObject<{
user_id: import("@sinclair/typebox").TString;
event_type: import("@sinclair/typebox").TNumber;
}>;
returnSchema: import("@sinclair/typebox").TAny;
actionSummary: string;
actionTags: string[];
payloadExample: {
user_id: string;
event_type: number;
};
returnExample: null;
_handle(payload: PayloadType): Promise<unknown>;
}
export {};
@@ -0,0 +1 @@
{"name":"@jridgewell/resolve-uri","version":"3.1.2","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532105068,"integrity":"sha512-wOwPpHtjnxygZkohTraXz1QrdoL1PWwEHVKEWJtpLlZVRg4jf0O3Dk7gUAaQ0iNEhd/1J3TuDeeC5M/yl+Jm1g==","mode":420,"size":1079},"dist/resolve-uri.umd.js":{"checkedAt":1794532105068,"integrity":"sha512-gTgySyQ0DmPFe2mNdIbEjRfhMUWz3Jo6zUoULy70y7QKAxoQmD5UgLbzWNNe++nVk9Zb50KifOUJBAN3koMLnw==","mode":420,"size":9866},"package.json":{"checkedAt":1794532105068,"integrity":"sha512-6MCx2HgSBvipgP3/i2HfjJAV6bIW/mj6YEFw3fKu72BqtBb1Q/txeWrJy1FDFSlCjtQuszh/iGBEmdmFWSMweg==","mode":420,"size":2063},"dist/resolve-uri.mjs.map":{"checkedAt":1794532105068,"integrity":"sha512-IsZGs5tpBiWvO4nQ6YNYHb2uF8tbpNrAUR46qeD9JdsLRzcx4DGuGvFsilAlQlmInr0z1xwSx5CcLTd1Nazw+Q==","mode":420,"size":14262},"dist/resolve-uri.umd.js.map":{"checkedAt":1794532105069,"integrity":"sha512-t1rHjiIsphkd2Km2JkV2fKsJQxK9nIr0ABGYtRiJG70GeMP4/KVTOf62qjBJGGFGLQFKPTTjYotu/Ou6JOW1tw==","mode":420,"size":14298},"README.md":{"checkedAt":1794532105069,"integrity":"sha512-p4MJJQWCeDdNMVSWtscCgd2a2DWB4tCBmaCNDtVfo3nVLdojdHAHWt6TMBc6bf1qASmE1psDpLdwAuCz98qUWw==","mode":420,"size":2826},"dist/resolve-uri.mjs":{"checkedAt":1794532105069,"integrity":"sha512-FcVCiCniVkWkviHWSwia/SGngje2PelKi6UAUAHyIL9lzukqZvmo7nlakylCg5hKkdfni3UEtgPioMMyevNFpQ==","mode":420,"size":8609},"dist/types/resolve-uri.d.ts":{"checkedAt":1794532105069,"integrity":"sha512-Q9+2KeIaGY5RvKRLAKw6QiDm7dYPV+m6ID1tQ58QE7IasEOGaXxDmiu0c5EesdbOlH88KjhDZxGAk/8PjPIIsA==","mode":420,"size":150}}}
@@ -0,0 +1,25 @@
export namespace modernization {
let name: string;
let rules: {
'dot-notation': "off";
'n/no-deprecated-api': "warn";
};
}
export namespace modernizationStyles {
let name_1: string;
export { name_1 as name };
let rules_1: {
'@stylistic/comma-dangle': ["warn", {
arrays: string;
enums: string;
exports: string;
imports: string;
objects: string;
}];
'@stylistic/no-multi-spaces': ["error", {
ignoreEOLComments: boolean;
}];
};
export { rules_1 as rules };
}
//# sourceMappingURL=modernization.d.ts.map
@@ -0,0 +1,38 @@
import { transformPropOrder } from '../../render/utils/keys-transform.mjs';
const translateAlias = {
x: "translateX",
y: "translateY",
z: "translateZ",
transformPerspective: "perspective",
};
function buildTransform(state) {
let transform = "";
let transformIsDefault = true;
/**
* Loop over all possible transforms in order, adding the ones that
* are present to the transform string.
*/
for (let i = 0; i < transformPropOrder.length; i++) {
const key = transformPropOrder[i];
const value = state.latest[key];
if (value === undefined)
continue;
let valueIsDefault = true;
if (typeof value === "number") {
valueIsDefault = value === (key.startsWith("scale") ? 1 : 0);
}
else {
valueIsDefault = parseFloat(value) === 0;
}
if (!valueIsDefault) {
transformIsDefault = false;
const transformName = translateAlias[key] || key;
const valueToRender = state.latest[key];
transform += `${transformName}(${valueToRender}) `;
}
}
return transformIsDefault ? "none" : transform.trim();
}
export { buildTransform };
@@ -0,0 +1,103 @@
// Copyright (c) 2011-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 AGENT_SCRAPER_H
#define AGENT_SCRAPER_H
#include <windows.h>
#include <stdint.h>
#include <memory>
#include <vector>
#include "ConsoleLine.h"
#include "Coord.h"
#include "LargeConsoleRead.h"
#include "SmallRect.h"
#include "Terminal.h"
class ConsoleScreenBufferInfo;
class Win32Console;
class Win32ConsoleBuffer;
// We must be able to issue a single ReadConsoleOutputW call of
// MAX_CONSOLE_WIDTH characters, and a single read of approximately several
// hundred fewer characters than BUFFER_LINE_COUNT.
const int BUFFER_LINE_COUNT = 3000;
const int MAX_CONSOLE_WIDTH = 2500;
const int MAX_CONSOLE_HEIGHT = 2000;
const int SYNC_MARKER_LEN = 16;
const int SYNC_MARKER_MARGIN = 200;
class Scraper {
public:
Scraper(
Win32Console &console,
Win32ConsoleBuffer &buffer,
std::unique_ptr<Terminal> terminal,
Coord initialSize);
~Scraper();
void resizeWindow(Win32ConsoleBuffer &buffer,
Coord newSize,
ConsoleScreenBufferInfo &finalInfoOut);
void scrapeBuffer(Win32ConsoleBuffer &buffer,
ConsoleScreenBufferInfo &finalInfoOut);
Terminal &terminal() { return *m_terminal; }
private:
void resetConsoleTracking(
Terminal::SendClearFlag sendClear, int64_t scrapedLineCount);
void markEntireWindowDirty(const SmallRect &windowRect);
void scanForDirtyLines(const SmallRect &windowRect);
void clearBufferLines(int firstRow, int count);
void resizeImpl(const ConsoleScreenBufferInfo &origInfo);
void syncConsoleContentAndSize(bool forceResize,
ConsoleScreenBufferInfo &finalInfoOut);
WORD attributesMask();
void directScrapeOutput(const ConsoleScreenBufferInfo &info,
bool consoleCursorVisible);
bool scrollingScrapeOutput(const ConsoleScreenBufferInfo &info,
bool consoleCursorVisible,
bool tentative);
void syncMarkerText(CHAR_INFO (&output)[SYNC_MARKER_LEN]);
int findSyncMarker();
void createSyncMarker(int row);
private:
Win32Console &m_console;
Win32ConsoleBuffer *m_consoleBuffer = nullptr;
std::unique_ptr<Terminal> m_terminal;
int m_syncRow = -1;
unsigned int m_syncCounter = 0;
bool m_directMode = false;
Coord m_ptySize;
int64_t m_scrapedLineCount = 0;
int64_t m_scrolledCount = 0;
int64_t m_maxBufferedLine = -1;
LargeConsoleReadBuffer m_readBuffer;
std::vector<ConsoleLine> m_bufferData;
int m_dirtyWindowTop = -1;
int m_dirtyLineCount = 0;
};
#endif // AGENT_SCRAPER_H
@@ -0,0 +1 @@
{"version":3,"file":"parseBackupFlags.d.ts","sourceRoot":"","sources":["../../src/helpers/parseBackupFlags.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAE9D;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE;IAAE,EAAE,EAAE,OAAO,CAAC;IAAC,EAAE,EAAE,OAAO,CAAA;CAAE,GAAG;IAC1E,oBAAoB,EAAE,oBAAoB,CAAC;IAC3C,kBAAkB,EAAE,OAAO,CAAC;CAC7B,CAeA;AAED,qBAAa,kBAAmB,SAAQ,KAAK;gBAC/B,OAAO,EAAE,MAAM;CAI5B"}
@@ -0,0 +1 @@
module.exports={A:{A:{"1":"B","2":"K D E F A wC"},B:{"1":"0 1 2 3 4 5 C L M G N O P Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I"},C:{"1":"0 1 2 3 4 5 6 7 8 9 J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC yC zC","2":"xC TC 0C 1C"},D:{"1":"0 1 2 3 4 5 6 7 8 9 K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC","2":"J ZB"},E:{"1":"K D E F A B C L M G 3C 4C 5C 6C aC NC OC 7C 8C 9C bC cC PC AD QC dC eC fC gC hC BD RC iC jC kC lC mC CD SC nC oC pC qC rC sC tC DD ED","2":"J ZB 2C ZC"},F:{"1":"0 1 2 3 4 5 6 7 8 9 C G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z NC uC JD OC","2":"F B FD GD HD ID"},G:{"1":"E LD MD ND OD PD QD RD SD TD UD VD WD XD YD ZD aD bD cD dD bC cC PC eD QC dC eC fC gC hC fD RC iC jC kC lC mC gD SC nC oC pC qC rC sC tC","2":"ZC KD vC"},H:{"1":"hD"},I:{"1":"J I lD vC mD nD","2":"TC iD jD kD"},J:{"1":"A","2":"D"},K:{"1":"C H NC uC OC","2":"A B"},L:{"1":"I"},M:{"1":"MC"},N:{"1":"B","2":"A"},O:{"1":"PC"},P:{"1":"6 7 8 9 J AB BB CB DB EB FB oD pD qD rD sD aC tD uD vD wD xD QC RC SC yD"},Q:{"1":"zD"},R:{"1":"0D"},S:{"1":"1D 2D"}},B:1,C:"hidden attribute",D:true};
@@ -0,0 +1,45 @@
export declare const BITS = 128;
export declare const GROUPS = 8;
/**
* Represents IPv6 address scopes
* @memberof Address6
* @static
*/
export declare const SCOPES: {
[key: number]: string | undefined;
};
/**
* Represents IPv6 address types
* @memberof Address6
* @static
*/
export declare const TYPES: {
[key: string]: string | undefined;
};
/**
* A regular expression that matches bad characters in an IPv6 address
* @memberof Address6
* @static
*/
export declare const RE_BAD_CHARACTERS: RegExp;
/**
* A regular expression that matches an incorrect IPv6 address
* @memberof Address6
* @static
*/
export declare const RE_BAD_ADDRESS: RegExp;
/**
* A regular expression that matches an IPv6 subnet
* @memberof Address6
* @static
*/
export declare const RE_SUBNET_STRING: RegExp;
/**
* A regular expression that matches an IPv6 zone
* @memberof Address6
* @static
*/
export declare const RE_ZONE_STRING: RegExp;
export declare const RE_URL: RegExp;
export declare const RE_URL_WITH_PORT: RegExp;
//# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
{"name":"unrs-resolver","version":"1.11.1","requiresBuild":true,"files":{"browser.js":{"checkedAt":1794532096166,"integrity":"sha512-BY1LekXwJmzucZ7ZYb2il2x8rOYoTcbnyAZAiwkdUX6uttOuepmKy4HQOl6BXvQr0bS5iFftf2fIyMmyoqVorA==","mode":420,"size":51},"index.js":{"checkedAt":1794532096166,"integrity":"sha512-TnmzUHUTQ55i7MdCZxLPFskJcQt0ZrQCnA2CqdJe4NSMNFkfcw7eEOkkWvQdX8emMsCHOxbKp2XcS/Y6q466hA==","mode":420,"size":9981},"package.json":{"checkedAt":1794532096166,"integrity":"sha512-UjLEJNUKWpwDucQ9h+6YDOu9nxegwp1XIYXUezYwHc2UTby/F5jWX7rUFx5q3xy59pA4mgjtlIGxkHLDtAbVIw==","mode":420,"size":2674},"README.md":{"checkedAt":1794532096166,"integrity":"sha512-abHCaMvGawS7ZU6wvPzWW23WWD3dJOWClPnc9Ox3q97qJM3j+qbQZEW4Wo//ae3gn0VXE7pwjzbn1avKSYsh/Q==","mode":420,"size":24233},"index.d.ts":{"checkedAt":1794532096167,"integrity":"sha512-CUXEifIcjWYou/nZ624DpNpMjgnUVMGE+Te83spAC4iWsd9DZzk8xBp6FY9lQ1vs0amgl6EuYhZkPWBjYRgqwg==","mode":420,"size":8890}},"sideEffects":{"linux-x64-node-v24-3c7982e8c17949fe6c63620dae5c3e44c715cb95":{"README.md":{"checkedAt":1794532128901,"integrity":"sha512-abHCaMvGawS7ZU6wvPzWW23WWD3dJOWClPnc9Ox3q97qJM3j+qbQZEW4Wo//ae3gn0VXE7pwjzbn1avKSYsh/Q==","mode":33188,"size":24233},"browser.js":{"checkedAt":1794532128902,"integrity":"sha512-BY1LekXwJmzucZ7ZYb2il2x8rOYoTcbnyAZAiwkdUX6uttOuepmKy4HQOl6BXvQr0bS5iFftf2fIyMmyoqVorA==","mode":33188,"size":51},"index.d.ts":{"checkedAt":1794532128902,"integrity":"sha512-CUXEifIcjWYou/nZ624DpNpMjgnUVMGE+Te83spAC4iWsd9DZzk8xBp6FY9lQ1vs0amgl6EuYhZkPWBjYRgqwg==","mode":33188,"size":8890},"index.js":{"checkedAt":1794532128902,"integrity":"sha512-TnmzUHUTQ55i7MdCZxLPFskJcQt0ZrQCnA2CqdJe4NSMNFkfcw7eEOkkWvQdX8emMsCHOxbKp2XcS/Y6q466hA==","mode":33188,"size":9981},"node_modules/.bin/napi-postinstall":{"checkedAt":1794532128902,"integrity":"sha512-JLBhxBoV44+FPFv9tx+0N3Osiy1W8ZOeo46glgdX7RYGftFBMAvNFDHdPJMa9hAaYb9/Job4XAa1ulsnlA3f+g==","mode":33261,"size":402},"package.json":{"checkedAt":1794532128902,"integrity":"sha512-UjLEJNUKWpwDucQ9h+6YDOu9nxegwp1XIYXUezYwHc2UTby/F5jWX7rUFx5q3xy59pA4mgjtlIGxkHLDtAbVIw==","mode":33188,"size":2674}}}}
@@ -0,0 +1,9 @@
import { FormProps } from './base-form.mjs';
import './utils.mjs';
import * as React from 'react';
import '@react-types/form';
import '@react-types/shared';
declare const Form: React.ForwardRefExoticComponent<FormProps & React.RefAttributes<HTMLFormElement>>;
export { Form };
@@ -0,0 +1,19 @@
import { __decorate } from "tslib";
import { AsnProp, AsnType, AsnTypeTypes } from "@peculiar/asn1-schema";
import { IssuerAndSerialNumber } from "./issuer_and_serial_number";
import { SubjectKeyIdentifier } from "@peculiar/asn1-x509";
let SignerIdentifier = class SignerIdentifier {
constructor(params = {}) {
Object.assign(this, params);
}
};
__decorate([
AsnProp({ type: SubjectKeyIdentifier, context: 0, implicit: true })
], SignerIdentifier.prototype, "subjectKeyIdentifier", void 0);
__decorate([
AsnProp({ type: IssuerAndSerialNumber })
], SignerIdentifier.prototype, "issuerAndSerialNumber", void 0);
SignerIdentifier = __decorate([
AsnType({ type: AsnTypeTypes.Choice })
], SignerIdentifier);
export { SignerIdentifier };
@@ -0,0 +1,206 @@
/**
* @import {Effects, State, TokenType} from 'micromark-util-types'
*/
import { asciiControl, markdownLineEndingOrSpace, markdownLineEnding } from 'micromark-util-character';
/**
* Parse destinations.
*
* ###### Examples
*
* ```markdown
* <a>
* <a\>b>
* <a b>
* <a)>
* a
* a\)b
* a(b)c
* a(b)
* ```
*
* @param {Effects} effects
* Context.
* @param {State} ok
* State switched to when successful.
* @param {State} nok
* State switched to when unsuccessful.
* @param {TokenType} type
* Type for whole (`<a>` or `b`).
* @param {TokenType} literalType
* Type when enclosed (`<a>`).
* @param {TokenType} literalMarkerType
* Type for enclosing (`<` and `>`).
* @param {TokenType} rawType
* Type when not enclosed (`b`).
* @param {TokenType} stringType
* Type for the value (`a` or `b`).
* @param {number | undefined} [max=Infinity]
* Depth of nested parens (inclusive).
* @returns {State}
* Start state.
*/
export function factoryDestination(effects, ok, nok, type, literalType, literalMarkerType, rawType, stringType, max) {
const limit = max || Number.POSITIVE_INFINITY;
let balance = 0;
return start;
/**
* Start of destination.
*
* ```markdown
* > | <aa>
* ^
* > | aa
* ^
* ```
*
* @type {State}
*/
function start(code) {
if (code === 60) {
effects.enter(type);
effects.enter(literalType);
effects.enter(literalMarkerType);
effects.consume(code);
effects.exit(literalMarkerType);
return enclosedBefore;
}
// ASCII control, space, closing paren.
if (code === null || code === 32 || code === 41 || asciiControl(code)) {
return nok(code);
}
effects.enter(type);
effects.enter(rawType);
effects.enter(stringType);
effects.enter("chunkString", {
contentType: "string"
});
return raw(code);
}
/**
* After `<`, at an enclosed destination.
*
* ```markdown
* > | <aa>
* ^
* ```
*
* @type {State}
*/
function enclosedBefore(code) {
if (code === 62) {
effects.enter(literalMarkerType);
effects.consume(code);
effects.exit(literalMarkerType);
effects.exit(literalType);
effects.exit(type);
return ok;
}
effects.enter(stringType);
effects.enter("chunkString", {
contentType: "string"
});
return enclosed(code);
}
/**
* In enclosed destination.
*
* ```markdown
* > | <aa>
* ^
* ```
*
* @type {State}
*/
function enclosed(code) {
if (code === 62) {
effects.exit("chunkString");
effects.exit(stringType);
return enclosedBefore(code);
}
if (code === null || code === 60 || markdownLineEnding(code)) {
return nok(code);
}
effects.consume(code);
return code === 92 ? enclosedEscape : enclosed;
}
/**
* After `\`, at a special character.
*
* ```markdown
* > | <a\*a>
* ^
* ```
*
* @type {State}
*/
function enclosedEscape(code) {
if (code === 60 || code === 62 || code === 92) {
effects.consume(code);
return enclosed;
}
return enclosed(code);
}
/**
* In raw destination.
*
* ```markdown
* > | aa
* ^
* ```
*
* @type {State}
*/
function raw(code) {
if (!balance && (code === null || code === 41 || markdownLineEndingOrSpace(code))) {
effects.exit("chunkString");
effects.exit(stringType);
effects.exit(rawType);
effects.exit(type);
return ok(code);
}
if (balance < limit && code === 40) {
effects.consume(code);
balance++;
return raw;
}
if (code === 41) {
effects.consume(code);
balance--;
return raw;
}
// ASCII control (but *not* `\0`) and space and `(`.
// Note: in `markdown-rs`, `\0` exists in codes, in `micromark-js` it
// doesn’t.
if (code === null || code === 32 || code === 40 || asciiControl(code)) {
return nok(code);
}
effects.consume(code);
return code === 92 ? rawEscape : raw;
}
/**
* After `\`, at special character.
*
* ```markdown
* > | a\*a
* ^
* ```
*
* @type {State}
*/
function rawEscape(code) {
if (code === 40 || code === 41 || code === 92) {
effects.consume(code);
return raw;
}
return raw(code);
}
}
@@ -0,0 +1 @@
{"mappings":";;;AAAA;;;;;;;;;;CAUC,GAED,gEAAgE;AAChE,gGAAgG;;;AAMhG,mBAAmB;AACnB,MAAM,yCAAmB;AAEzB,gEAAgE;AAChE,MAAM,0CAAoB;AAOnB,MAAM,kDAAuB,CAAA,GAAA,yCAAgB;IAGlD,cAAc,EAAU,EAAgB;QACtC,gCAAgC;QAChC,IAAI,OAAO,KAAK,CAAC,cAAc;QAE/B,mBAAmB;QACnB,IAAI,aAAa,KAAK,IAAI,GAAG;QAE7B,iDAAiD;QACjD,IAAI,OAAO,KAAK,CAAA,GAAA,yCAAmB,EAAE,KAAK,GAAG,EAAE,KAAK,IAAI,EAAE,GAAG;QAE7D,IAAI;QACJ,IAAI,OAAO,yCAAmB;YAC5B,gDAAgD;YAChD;YAEA,uDAAuD;YACvD,YAAY,CAAA,GAAA,yCAAS,EAAE,KAAK,IAAI,GAAG,KAAK,KAAK;YAC7C,QAAQ,YAAa,MAAW,KAAU;QAC5C,OAAO;YACL,8BAA8B;YAC9B,YAAY,CAAA,GAAA,yCAAS,EAAE,KAAK,IAAI,IAAI,KAAK;YACzC,QAAQ;QACV;QAEA,IAAI;QACJ,IAAI;QACJ,IAAI,OAAO,WAAW;YACpB,cAAc;YACd,YAAY,OAAO;QACrB,OAAO;YACL,IAAI,OAAO,OAAO;YAClB,IAAI,OAAQ,KAAS;gBACnB,cAAc,KAAK,KAAK,CAAC,OAAO,MAAM;gBACtC,YAAY,AAAC,OAAO,KAAM;YAC5B,OAAO;gBACL,QAAQ;gBACR,cAAc,KAAK,KAAK,CAAC,OAAO,MAAM;gBACtC,YAAY,AAAC,OAAO,KAAM;YAC5B;QACF;QAEA,OAAO,IAAI,CAAA,GAAA,yCAAW,EAAE,IAAI,EAAE,YAAY,aAAa;IACzD;IAEA,YAAY,IAAqB,EAAE;QACjC,IAAI,eAAe,KAAK,IAAI,GAAG;QAC/B,IAAI,CAAC,KAAK,KAAK,GAAG,CAAA,GAAA,yCAAe,EAAE;QAEnC,IAAI;QACJ,IAAI;QACJ,IAAI,CAAA,GAAA,yCAAS,EAAE,OAAO;YACpB,YAAY;YACZ,KAAK,CAAA,GAAA,yCAAmB,EAAE,KAAK,MAAM,GAAG;QAC1C,OAAO;YACL,YAAY;YACZ,KAAK,CAAA,GAAA,yCAAmB,EAAE,KAAK,MAAM,GAAG;QAC1C;QAEA,IAAI,KAAK,KAAK,KAAK,GACjB,OAAO,KAAK,KAAK,GAAG,GAAG;QAGzB,MAAM,YAAY,KAAK,GAAG,CAAC,KAAK,KAAK,GAAG,GAAG,KAAK;QAEhD,IAAI,KAAK,KAAK,IAAI,GAChB,MAAM,AAAC,CAAA,KAAK,KAAK,GAAG,CAAA,IAAK;QAG3B,MAAM,KAAK,GAAG,GAAG;QACjB,OAAO;IACT;IAEA,eAAe,IAAqB,EAAU;QAC5C,IAAI,KAAK,KAAK,KAAK,KAAK,CAAA,GAAA,yCAAS,EAAE,KAAK,IAAI,GAAG,yCAC7C,OAAO;QAGT,IAAI,KAAK,KAAK,IAAI,KAAK,KAAK,KAAK,IAAI,GACnC,OAAO;QAGT,OAAO;IACT;IAEA,gBAAwB;QACtB,6CAA6C;QAC7C,6CAA6C;QAC7C,OAAO;IACT;IAEA,UAAU;QACR,OAAO;YAAC;SAAO;IACjB;IAEA,cAAc,CAAC;;6BAhGf,aAAa;;AAiGf","sources":["packages/@internationalized/date/src/calendars/IndianCalendar.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n// Portions of the code in this file are based on code from ICU.\n// Original licensing can be found in the NOTICE file in the root directory of this source tree.\n\nimport {AnyCalendarDate} from '../types';\nimport {CalendarDate} from '../CalendarDate';\nimport {fromExtendedYear, GregorianCalendar, gregorianToJulianDay, isLeapYear} from './GregorianCalendar';\n\n// Starts in 78 AD,\nconst INDIAN_ERA_START = 78;\n\n// The Indian year starts 80 days later than the Gregorian year.\nconst INDIAN_YEAR_START = 80;\n\n/**\n * The Indian National Calendar is similar to the Gregorian calendar, but with\n * years numbered since the Saka era in 78 AD (Gregorian). There are 12 months\n * in each year, with either 30 or 31 days. Only one era identifier is supported: 'saka'.\n */\nexport class IndianCalendar extends GregorianCalendar {\n identifier = 'indian';\n\n fromJulianDay(jd: number): CalendarDate {\n // Gregorian date for Julian day\n let date = super.fromJulianDay(jd);\n\n // Year in Saka era\n let indianYear = date.year - INDIAN_ERA_START;\n\n // Day number in Gregorian year (starting from 0)\n let yDay = jd - gregorianToJulianDay(date.era, date.year, 1, 1);\n\n let leapMonth: number;\n if (yDay < INDIAN_YEAR_START) {\n // Day is at the end of the preceding Saka year\n indianYear--;\n\n // Days in leapMonth this year, previous Gregorian year\n leapMonth = isLeapYear(date.year - 1) ? 31 : 30;\n yDay += leapMonth + (31 * 5) + (30 * 3) + 10;\n } else {\n // Days in leapMonth this year\n leapMonth = isLeapYear(date.year) ? 31 : 30;\n yDay -= INDIAN_YEAR_START;\n }\n\n let indianMonth: number;\n let indianDay: number;\n if (yDay < leapMonth) {\n indianMonth = 1;\n indianDay = yDay + 1;\n } else {\n let mDay = yDay - leapMonth;\n if (mDay < (31 * 5)) {\n indianMonth = Math.floor(mDay / 31) + 2;\n indianDay = (mDay % 31) + 1;\n } else {\n mDay -= 31 * 5;\n indianMonth = Math.floor(mDay / 30) + 7;\n indianDay = (mDay % 30) + 1;\n }\n }\n\n return new CalendarDate(this, indianYear, indianMonth, indianDay);\n }\n\n toJulianDay(date: AnyCalendarDate) {\n let extendedYear = date.year + INDIAN_ERA_START;\n let [era, year] = fromExtendedYear(extendedYear);\n\n let leapMonth: number;\n let jd: number;\n if (isLeapYear(year)) {\n leapMonth = 31;\n jd = gregorianToJulianDay(era, year, 3, 21);\n } else {\Line truncated
@@ -0,0 +1,134 @@
import {getOffset as $ab71dadb03a6fb2e$export$622cea445a1c5b7d} from "./getOffset.module.js";
import {useRef as $1rnCS$useRef} 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.
*/ /* eslint-disable rulesdir/pure-render */
// Keep track of elements that we are currently handling dragging for via useDrag1D.
// If there's an ancestor and a descendant both using useDrag1D(), and the user starts
// dragging the descendant, we don't want useDrag1D events to fire for the ancestor.
const $9cc09df9fd7676be$var$draggingElements = [];
function $9cc09df9fd7676be$export$7bbed75feba39706(props) {
console.warn('useDrag1D is deprecated, please use `useMove` instead https://react-spectrum.adobe.com/react-aria/useMove.html');
let { containerRef: containerRef, reverse: reverse, orientation: orientation, onHover: onHover, onDrag: onDrag, onPositionChange: onPositionChange, onIncrement: onIncrement, onDecrement: onDecrement, onIncrementToMax: onIncrementToMax, onDecrementToMin: onDecrementToMin, onCollapseToggle: onCollapseToggle } = props;
let getPosition = (e)=>orientation === 'horizontal' ? e.clientX : e.clientY;
let getNextOffset = (e)=>{
let containerOffset = (0, $ab71dadb03a6fb2e$export$622cea445a1c5b7d)(containerRef.current, reverse, orientation);
let mouseOffset = getPosition(e);
let nextOffset = reverse ? containerOffset - mouseOffset : mouseOffset - containerOffset;
return nextOffset;
};
let dragging = (0, $1rnCS$useRef)(false);
let prevPosition = (0, $1rnCS$useRef)(0);
// Keep track of the current handlers in a ref so that the events can access them.
let handlers = (0, $1rnCS$useRef)({
onPositionChange: onPositionChange,
onDrag: onDrag
});
handlers.current.onDrag = onDrag;
handlers.current.onPositionChange = onPositionChange;
let onMouseDragged = (e)=>{
e.preventDefault();
let nextOffset = getNextOffset(e);
if (!dragging.current) {
dragging.current = true;
if (handlers.current.onDrag) handlers.current.onDrag(true);
if (handlers.current.onPositionChange) handlers.current.onPositionChange(nextOffset);
}
if (prevPosition.current === nextOffset) return;
prevPosition.current = nextOffset;
if (onPositionChange) onPositionChange(nextOffset);
};
let onMouseUp = (e)=>{
const target = e.target;
dragging.current = false;
let nextOffset = getNextOffset(e);
if (handlers.current.onDrag) handlers.current.onDrag(false);
if (handlers.current.onPositionChange) handlers.current.onPositionChange(nextOffset);
$9cc09df9fd7676be$var$draggingElements.splice($9cc09df9fd7676be$var$draggingElements.indexOf(target), 1);
window.removeEventListener('mouseup', onMouseUp, false);
window.removeEventListener('mousemove', onMouseDragged, false);
};
let onMouseDown = (e)=>{
const target = e.currentTarget;
// If we're already handling dragging on a descendant with useDrag1D, then
// we don't want to handle the drag motion on this target as well.
if ($9cc09df9fd7676be$var$draggingElements.some((elt)=>target.contains(elt))) return;
$9cc09df9fd7676be$var$draggingElements.push(target);
window.addEventListener('mousemove', onMouseDragged, false);
window.addEventListener('mouseup', onMouseUp, false);
};
let onMouseEnter = ()=>{
if (onHover) onHover(true);
};
let onMouseOut = ()=>{
if (onHover) onHover(false);
};
let onKeyDown = (e)=>{
switch(e.key){
case 'Left':
case 'ArrowLeft':
if (orientation === 'horizontal') {
e.preventDefault();
if (onDecrement && !reverse) onDecrement();
else if (onIncrement && reverse) onIncrement();
}
break;
case 'Up':
case 'ArrowUp':
if (orientation === 'vertical') {
e.preventDefault();
if (onDecrement && !reverse) onDecrement();
else if (onIncrement && reverse) onIncrement();
}
break;
case 'Right':
case 'ArrowRight':
if (orientation === 'horizontal') {
e.preventDefault();
if (onIncrement && !reverse) onIncrement();
else if (onDecrement && reverse) onDecrement();
}
break;
case 'Down':
case 'ArrowDown':
if (orientation === 'vertical') {
e.preventDefault();
if (onIncrement && !reverse) onIncrement();
else if (onDecrement && reverse) onDecrement();
}
break;
case 'Home':
e.preventDefault();
if (onDecrementToMin) onDecrementToMin();
break;
case 'End':
e.preventDefault();
if (onIncrementToMax) onIncrementToMax();
break;
case 'Enter':
e.preventDefault();
if (onCollapseToggle) onCollapseToggle();
break;
}
};
return {
onMouseDown: onMouseDown,
onMouseEnter: onMouseEnter,
onMouseOut: onMouseOut,
onKeyDown: onKeyDown
};
}
export {$9cc09df9fd7676be$export$7bbed75feba39706 as useDrag1D};
//# sourceMappingURL=useDrag1D.module.js.map
@@ -0,0 +1,13 @@
Copyright (c) 2020, Jamund Ferguson
Permission to use, copy, modify, and/or distribute this software for any purpose
with or without fee is hereby granted, provided that the above copyright notice
and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
THIS SOFTWARE.
@@ -0,0 +1,17 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.FormatNumericToParts = FormatNumericToParts;
var _262_1 = require("../262");
var PartitionNumberPattern_1 = require("./PartitionNumberPattern");
function FormatNumericToParts(nf, x, implDetails) {
var parts = (0, PartitionNumberPattern_1.PartitionNumberPattern)(implDetails.getInternalSlots(nf), x);
var result = (0, _262_1.ArrayCreate)(0);
for (var _i = 0, parts_1 = parts; _i < parts_1.length; _i++) {
var part = parts_1[_i];
result.push({
type: part.type,
value: part.value,
});
}
return result;
}
@@ -0,0 +1,13 @@
import { OneBotAction } from '../../action/OneBotAction';
export declare class CleanStreamTempFile extends OneBotAction<void, void> {
actionName: "clean_stream_temp_file";
actionSummary: string;
actionTags: string[];
payloadExample: {};
returnExample: {
message: string;
};
payloadSchema: import("@sinclair/typebox").TObject<{}>;
returnSchema: import("@sinclair/typebox").TNull;
_handle(_payload: void): Promise<void>;
}
@@ -0,0 +1 @@
{"name":"typed-array-byte-offset","version":"1.0.4","requiresBuild":false,"files":{".eslintrc":{"checkedAt":1794532097422,"integrity":"sha512-cKycw52UuSH4fUjPkpPi2XfVCIvkAce32vQRixBDHlvAH9OFBimfEwB10RHynhfgpuOsGw9NQfZcuhCkmuV98g==","mode":420,"size":60},".nycrc":{"checkedAt":1794532089066,"integrity":"sha512-42sgwWzusJB1Dzhl78jX/Zg65Oi0HDDMOGXS/Uklv1kCYn4fHtRsD/JFPwdu+d40vome9XdUspzRWEQAcTGEeQ==","mode":420,"size":216},"LICENSE":{"checkedAt":1794532097422,"integrity":"sha512-Pg0j9BX+Fmp8mAx1XW2wDVYsnbXuEq5QKBINQE+k1CyfdfAzv0tb/KUpKlAfmNVDddSa6Px43FQXpmTJrbd2Jw==","mode":420,"size":1067},"index.js":{"checkedAt":1794532097422,"integrity":"sha512-W7s44ipTr3Qo9vLDX9zU+tguU4h8M/xPOXovWakFcv4WlU4W/D7Ab46HNY1+jP6URtYD7NQHP/p6UDdsWpfFfw==","mode":420,"size":2486},"test/index.js":{"checkedAt":1794532097422,"integrity":"sha512-ThnzkuM6ZX5z7XfW6REZZcxb3J9KTaG9qEcnbIoHr1W8gQv5Xh/uV2TdT0JEYyjdwDlp4PzQL4oyfGhFIYXA1A==","mode":420,"size":2911},"package.json":{"checkedAt":1794532097422,"integrity":"sha512-UnqgMnPnnOqy3v3+n1bozfCSpHBuexmy12LgJMnWvaoM4H2P5HfQiWrUI7v9dTuO+9JNJ0CXzXi/w8ZNNAfVqQ==","mode":420,"size":3047},"tsconfig.json":{"checkedAt":1794532097422,"integrity":"sha512-edaaV0Xj9ttgJ0FNJkyI3SmVm1ej9ubx8zimr37ypx5marsY5+MFTP3GFeeHJ6oVkCFk8XBlvMgqLWh0M3l2jA==","mode":420,"size":145},"CHANGELOG.md":{"checkedAt":1794532097422,"integrity":"sha512-OgTivx4TDNyfeKaul67fHD4KOTt76RQrTF++gnBtVWpeisSwMRQYFanjV2fp+gU96pQP+xSesaRID7JrUVFNqQ==","mode":420,"size":5081},"README.md":{"checkedAt":1794532097423,"integrity":"sha512-+f9thzFDNUorGLH79Y/7WOJ0M5Lb+DJuX0MfhNMm5xhSFkoSLruPEfurwVlk72PgVYtZ0czIOnWBVz+mk3qpAA==","mode":420,"size":3671},"index.d.ts":{"checkedAt":1794532097423,"integrity":"sha512-bPDVN5ZG6wproAHwTOMgOEiKhmPs1fDJDU1IHgmIv+HscxXX7qAq1NJrXFhVJbNAeiN72Bh112KLSl5WPavYNw==","mode":420,"size":485},".github/FUNDING.yml":{"checkedAt":1794532097423,"integrity":"sha512-Aq6+i2ricrTb9hd2KlNwwT2FDjZQny238OoXCg1ZVrYzvW8Tq8No0NsL6X9m15oFrsoUkjovyFCtrcymt9NukQ==","mode":420,"size":589}}}
@@ -0,0 +1,2 @@
export declare function setReflectMetadata(target: object, metadataKey: unknown, metadata: unknown, propertyKey?: string | symbol): void;
//# sourceMappingURL=setReflectMetadata.d.ts.map
@@ -0,0 +1 @@
{"version":3,"names":["_setFunctionName","require","_toPropertyKey","applyDecs2203RFactory","createAddInitializerMethod","initializers","decoratorFinishedRef","addInitializer","initializer","assertNotFinished","assertCallable","push","memberDec","dec","name","desc","kind","isStatic","isPrivate","value","kindStr","ctx","toPropertyKey","static","private","v","get","set","call","access","fnName","Error","fn","hint","TypeError","assertValidReturnValue","type","undefined","init","applyMemberDec","ret","base","decInfo","decs","prefix","setFunctionName","Object","getOwnPropertyDescriptor","newValue","i","length","newInit","instance","ownInitializers","originalInitializer","args","defineProperty","applyMemberDecs","Class","decInfos","protoInitializers","staticInitializers","existingProtoNonFields","Map","existingStaticNonFields","Array","isArray","prototype","existingNonFields","existingKind","pushInitializers","applyClassDecs","targetClass","classDecs","newClass","nextNewClass","applyDecs2203R","memberDecs","e","c","exports","default"],"sources":["../../src/helpers/applyDecs2203R.js"],"sourcesContent":["/* @minVersion 7.20.0 */\n/* @onlyBabel7 */\n\nimport setFunctionName from \"setFunctionName\";\nimport toPropertyKey from \"toPropertyKey\";\n\n/**\n Enums are used in this file, but not assigned to vars to avoid non-hoistable values\n\n CONSTRUCTOR = 0;\n PUBLIC = 1;\n PRIVATE = 2;\n\n FIELD = 0;\n ACCESSOR = 1;\n METHOD = 2;\n GETTER = 3;\n SETTER = 4;\n\n STATIC = 5;\n\n CLASS = 10; // only used in assertValidReturnValue\n*/\n\nfunction applyDecs2203RFactory() {\n function createAddInitializerMethod(initializers, decoratorFinishedRef) {\n return function addInitializer(initializer) {\n assertNotFinished(decoratorFinishedRef, \"addInitializer\");\n assertCallable(initializer, \"An initializer\");\n initializers.push(initializer);\n };\n }\n\n function memberDec(\n dec,\n name,\n desc,\n initializers,\n kind,\n isStatic,\n isPrivate,\n value,\n ) {\n var kindStr;\n\n switch (kind) {\n case 1 /* ACCESSOR */:\n kindStr = \"accessor\";\n break;\n case 2 /* METHOD */:\n kindStr = \"method\";\n break;\n case 3 /* GETTER */:\n kindStr = \"getter\";\n break;\n case 4 /* SETTER */:\n kindStr = \"setter\";\n break;\n default:\n kindStr = \"field\";\n }\n\n var ctx = {\n kind: kindStr,\n name: isPrivate ? \"#\" + name : toPropertyKey(name),\n static: isStatic,\n private: isPrivate,\n };\n\n var decoratorFinishedRef = { v: false };\n\n if (kind !== 0 /* FIELD */) {\n ctx.addInitializer = createAddInitializerMethod(\n initializers,\n decoratorFinishedRef,\n );\n }\n\n var get, set;\n if (kind === 0 /* FIELD */) {\n if (isPrivate) {\n get = desc.get;\n set = desc.set;\n } else {\n get = function () {\n return this[name];\n };\n set = function (v) {\n this[name] = v;\n };\n }\n } else if (kind === 2 /* METHOD */) {\n get = function () {\n return desc.value;\n };\n } else {\n // replace with values that will go through the final getter and setter\n if (kind === 1 /* ACCESSOR */ || kind === 3 /* GETTER */) {\n get = function () {\n return desc.get.call(this);\n };\n }\n\n if (kind === 1 /* ACCESSOR */ || kind === 4 /* SETTER */) {\n set = function (v) {\n desc.set.call(this, v);\n };\n }\n }\n ctx.access =\n get && set ? { get: get, set: set } : get ? { get: get } : { set: set };\n\n try {\n return dec(value, ctx);\n } finally {\n decoratorFinishedRef.v = true;\n }\n }\n\n function assertNotFinished(decoratorFinishedRef, fnName) {\n if (decoratorFinishedRef.v) {\n throw new Error(\n \"attempted to call \" + fnName + \" after decoration was finished\",\n );\n }\n }\n\n function assertCallable(fn, hint) {\n if (typeof fn !== \"function\") {\n throw new TypeError(hint + \" must be a function\");\n }\n }\n\n function assertValidReturnValue(kind, value) {\n var type = typeof value;\n\n if (kind === 1 /* ACCESSOR */) {\n if (type !== \"object\" || value === null) {\n throw new TypeError(\n \"accessor decorators must return an object with get, set, or init properties or void 0\",\n );\n }\n if (value.get !== undefined) {\n assertCallable(value.get, \"accessor.get\");\n }\n if (value.set !== undefined) {\n assertCallable(value.set, \"accessor.set\");\n }\n if (value.init !== undefined) {\n assertCallable(value.init, \"accessor.init\");\n }\n } else if (type !== \"function\") {\n var hint;\n if (kind === 0 /* FIELD */) {\n hint = \"field\";\n } else if (kind === 10 /* CLALine truncated
@@ -0,0 +1,218 @@
import {CalendarDate as $35ea8db9cb2ccb90$export$99faa760c7908e4f, CalendarDateTime as $35ea8db9cb2ccb90$export$ca871e8dbb80966f, Time as $35ea8db9cb2ccb90$export$680ea196effce5f, ZonedDateTime as $35ea8db9cb2ccb90$export$d3b7288e7994edea} from "./CalendarDate.module.js";
import {constrain as $735220c2d4774dd3$export$c4e2ecac49351ef2} from "./manipulation.module.js";
import {getExtendedYear as $3b62074eb05584b2$export$c36e0ecb2d4fa69d, GregorianCalendar as $3b62074eb05584b2$export$80ee6245ec4f29ec} from "./GregorianCalendar.module.js";
import {getLocalTimeZone as $14e0f24ef4ac5c92$export$aa8b41735afcabd2} from "./queries.module.js";
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/ // Portions of the code in this file are based on code from the TC39 Temporal proposal.
// Original licensing can be found in the NOTICE file in the root directory of this source tree.
function $11d87f3f76e88657$export$bd4fb2bc8bb06fb(date) {
date = $11d87f3f76e88657$export$b4a036af3fc0b032(date, new (0, $3b62074eb05584b2$export$80ee6245ec4f29ec)());
let year = (0, $3b62074eb05584b2$export$c36e0ecb2d4fa69d)(date.era, date.year);
return $11d87f3f76e88657$var$epochFromParts(year, date.month, date.day, date.hour, date.minute, date.second, date.millisecond);
}
function $11d87f3f76e88657$var$epochFromParts(year, month, day, hour, minute, second, millisecond) {
// Note: Date.UTC() interprets one and two-digit years as being in the
// 20th century, so don't use it
let date = new Date();
date.setUTCHours(hour, minute, second, millisecond);
date.setUTCFullYear(year, month - 1, day);
return date.getTime();
}
function $11d87f3f76e88657$export$59c99f3515d3493f(ms, timeZone) {
// Fast path for UTC.
if (timeZone === 'UTC') return 0;
// Fast path: for local timezone after 1970, use native Date.
if (ms > 0 && timeZone === (0, $14e0f24ef4ac5c92$export$aa8b41735afcabd2)()) return new Date(ms).getTimezoneOffset() * -60000;
let { year: year, month: month, day: day, hour: hour, minute: minute, second: second } = $11d87f3f76e88657$var$getTimeZoneParts(ms, timeZone);
let utc = $11d87f3f76e88657$var$epochFromParts(year, month, day, hour, minute, second, 0);
return utc - Math.floor(ms / 1000) * 1000;
}
const $11d87f3f76e88657$var$formattersByTimeZone = new Map();
function $11d87f3f76e88657$var$getTimeZoneParts(ms, timeZone) {
let formatter = $11d87f3f76e88657$var$formattersByTimeZone.get(timeZone);
if (!formatter) {
formatter = new Intl.DateTimeFormat('en-US', {
timeZone: timeZone,
hour12: false,
era: 'short',
year: 'numeric',
month: 'numeric',
day: 'numeric',
hour: 'numeric',
minute: 'numeric',
second: 'numeric'
});
$11d87f3f76e88657$var$formattersByTimeZone.set(timeZone, formatter);
}
let parts = formatter.formatToParts(new Date(ms));
let namedParts = {};
for (let part of parts)if (part.type !== 'literal') namedParts[part.type] = part.value;
return {
// Firefox returns B instead of BC... https://bugzilla.mozilla.org/show_bug.cgi?id=1752253
year: namedParts.era === 'BC' || namedParts.era === 'B' ? -namedParts.year + 1 : +namedParts.year,
month: +namedParts.month,
day: +namedParts.day,
hour: namedParts.hour === '24' ? 0 : +namedParts.hour,
minute: +namedParts.minute,
second: +namedParts.second
};
}
const $11d87f3f76e88657$var$DAYMILLIS = 86400000;
function $11d87f3f76e88657$export$136f38efe7caf549(date, timeZone) {
let ms = $11d87f3f76e88657$export$bd4fb2bc8bb06fb(date);
let earlier = ms - $11d87f3f76e88657$export$59c99f3515d3493f(ms - $11d87f3f76e88657$var$DAYMILLIS, timeZone);
let later = ms - $11d87f3f76e88657$export$59c99f3515d3493f(ms + $11d87f3f76e88657$var$DAYMILLIS, timeZone);
return $11d87f3f76e88657$var$getValidWallTimes(date, timeZone, earlier, later);
}
function $11d87f3f76e88657$var$getValidWallTimes(date, timeZone, earlier, later) {
let found = earlier === later ? [
earlier
] : [
earlier,
later
];
return found.filter((absolute)=>$11d87f3f76e88657$var$isValidWallTime(date, timeZone, absolute));
}
function $11d87f3f76e88657$var$isValidWallTime(date, timeZone, absolute) {
let parts = $11d87f3f76e88657$var$getTimeZoneParts(absolute, timeZone);
return date.year === parts.year && date.month === parts.month && date.day === parts.day && date.hour === parts.hour && date.minute === parts.minute && date.second === parts.second;
}
function $11d87f3f76e88657$export$5107c82f94518f5c(date, timeZone, disambiguation = 'compatible') {
let dateTime = $11d87f3f76e88657$export$b21e0b124e224484(date);
// Fast path: if the time zone is UTC, use native Date.
if (timeZone === 'UTC') return $11d87f3f76e88657$export$bd4fb2bc8bb06fb(dateTime);
// Fast path: if the time zone is the local timezone and disambiguation is compatible, use native Date.
if (timeZone === (0, $14e0f24ef4ac5c92$export$aa8b41735afcabd2)() && disambiguation === 'compatible') {
dateTime = $11d87f3f76e88657$export$b4a036af3fc0b032(dateTime, new (0, $3b62074eb05584b2$export$80ee6245ec4f29ec)());
// Don't use Date constructor here because two-digit years are interpreted in the 20th century.
let date = new Date();
let year = (0, $3b62074eb05584b2$export$c36e0ecb2d4fa69d)(dateTime.era, dateTime.year);
date.setFullYear(year, dateTime.month - 1, dateTime.day);
date.setHours(dateTime.hour, dateTime.minute, dateTime.second, dateTime.millisecond);
return date.getTime();
}
let ms = $11d87f3f76e88657$export$bd4fb2bc8bb06fb(dateTime);
let offsetBefore = $11d87f3f76e88657$export$59c99f3515d3493f(ms - $11d87f3f76e88657$var$DAYMILLIS, timeZone);
let offsetAfter = $11d87f3f76e88657$export$59c99f3515d3493f(ms + $11d87f3f76e88657$var$DAYMILLIS, timeZone);
let valid = $11d87f3f76e88657$var$getValidWallTimes(dateTime, timeZone, ms - offsetBefore, ms - offsetAfter);
if (valid.length === 1) return valid[0];
if (valid.length > 1) switch(disambiguation){
// 'compatible' means 'earlier' for "fall back" transitions
case 'compatible':
case 'earlier':
return valid[0];
case 'later':
return valid[valid.length - 1];
case 'reject':
throw new RangeError('Multiple possible absolute times found');
}
switch(disambiguation){
case 'earlier':
return Math.min(ms - offsetBefore, ms - offsetAfter);
// 'compatible' means 'later' for "spring forward" transitions
case 'compatible':
case 'later':
return Math.max(ms - offsetBefore, ms - offsetAfter);
case 'reject':
throw new RangeError('No such absolute time found');
}
}
function $11d87f3f76e88657$export$e67a095c620b86fe(dateTime, timeZone, disambiguation = 'compatible') {
return new Date($11d87f3f76e88657$export$5107c82f94518f5c(dateTime, timeZone, disambiguation));
}
function $11d87f3f76e88657$export$1b96692a1ba042ac(ms, timeZone) {
let offset = $11d87f3f76e88657$export$59c99f3515d3493f(ms, timeZone);
let date = new Date(ms + offset);
let year = date.getUTCFullYear();
let month = date.getUTCMonth() + 1;
let day = date.getUTCDate();
let hour = date.getUTCHours();
let minute = date.getUTCMinutes();
let second = date.getUTCSeconds();
let millisecond = date.getUTCMilliseconds();
return new (0, $35ea8db9cb2ccb90$export$d3b7288e7994edea)(year < 1 ? 'BC' : 'AD', year < 1 ? -year + 1 : year, month, day, timeZone, offset, hour, minute, second, millisecond);
}
function $11d87f3f76e88657$export$e57ff100d91bd4b9(date, timeZone) {
return $11d87f3f76e88657$export$1b96692a1ba042ac(date.getTime(), timeZone);
}
function $11d87f3f76e88657$export$d7f92bcd3596b086(date) {
return $11d87f3f76e88657$export$e57ff100d91bd4b9(date, (0, $14e0f24ef4ac5c92$export$aa8b41735afcabd2)());
}
function $11d87f3f76e88657$export$93522d1a439f3617(dateTime) {
return new (0, $35ea8db9cb2ccb90$export$99faa760c7908e4f)(dateTime.calendar, dateTime.era, dateTime.year, dateTime.month, dateTime.day);
}
function $11d87f3f76e88657$export$6f4d78149f3f53ac(date) {
return {
era: date.era,
year: date.year,
month: date.month,
day: date.day
};
}
function $11d87f3f76e88657$export$4d0393e732857be5(date) {
return {
hour: date.hour,
minute: date.minute,
second: date.second,
millisecond: date.millisecond
};
}
function $11d87f3f76e88657$export$b21e0b124e224484(date, time) {
let hour = 0, minute = 0, second = 0, millisecond = 0;
if ('timeZone' in date) ({ hour: hour, minute: minute, second: second, millisecond: millisecond } = date);
else if ('hour' in date && !time) return date;
if (time) ({ hour: hour, minute: minute, second: second, millisecond: millisecond } = time);
return new (0, $35ea8db9cb2ccb90$export$ca871e8dbb80966f)(date.calendar, date.era, date.year, date.month, date.day, hour, minute, second, millisecond);
}
function $11d87f3f76e88657$export$d33f79e3ffc3dc83(dateTime) {
return new (0, $35ea8db9cb2ccb90$export$680ea196effce5f)(dateTime.hour, dateTime.minute, dateTime.second, dateTime.millisecond);
}
function $11d87f3f76e88657$export$b4a036af3fc0b032(date, calendar) {
if (date.calendar.identifier === calendar.identifier) return date;
let calendarDate = calendar.fromJulianDay(date.calendar.toJulianDay(date));
let copy = date.copy();
copy.calendar = calendar;
copy.era = calendarDate.era;
copy.year = calendarDate.year;
copy.month = calendarDate.month;
copy.day = calendarDate.day;
(0, $735220c2d4774dd3$export$c4e2ecac49351ef2)(copy);
return copy;
}
function $11d87f3f76e88657$export$84c95a83c799e074(date, timeZone, disambiguation) {
if (date instanceof (0, $35ea8db9cb2ccb90$export$d3b7288e7994edea)) {
if (date.timeZone === timeZone) return date;
return $11d87f3f76e88657$export$538b00033cc11c75(date, timeZone);
}
let ms = $11d87f3f76e88657$export$5107c82f94518f5c(date, timeZone, disambiguation);
return $11d87f3f76e88657$export$1b96692a1ba042ac(ms, timeZone);
}
function $11d87f3f76e88657$export$83aac07b4c37b25(date) {
let ms = $11d87f3f76e88657$export$bd4fb2bc8bb06fb(date) - date.offset;
return new Date(ms);
}
function $11d87f3f76e88657$export$538b00033cc11c75(date, timeZone) {
let ms = $11d87f3f76e88657$export$bd4fb2bc8bb06fb(date) - date.offset;
return $11d87f3f76e88657$export$b4a036af3fc0b032($11d87f3f76e88657$export$1b96692a1ba042ac(ms, timeZone), date.calendar);
}
function $11d87f3f76e88657$export$d9b67bc93c097491(date) {
return $11d87f3f76e88657$export$538b00033cc11c75(date, (0, $14e0f24ef4ac5c92$export$aa8b41735afcabd2)());
}
export {$11d87f3f76e88657$export$bd4fb2bc8bb06fb as epochFromDate, $11d87f3f76e88657$export$b4a036af3fc0b032 as toCalendar, $11d87f3f76e88657$export$59c99f3515d3493f as getTimeZoneOffset, $11d87f3f76e88657$export$136f38efe7caf549 as possibleAbsolutes, $11d87f3f76e88657$export$5107c82f94518f5c as toAbsolute, $11d87f3f76e88657$export$b21e0b124e224484 as toCalendarDateTime, $11d87f3f76e88657$export$e67a095c620b86fe as toDate, $11d87f3f76e88657$export$1b96692a1ba042ac as fromAbsolute, $11d87f3f76e88657$export$e57ff100d91bd4b9 as fromDate, $11d87f3f76e88657$export$d7f92bcd3596b086 as fromDateToLocal, $11d87f3f76e88657$export$93522d1a439f3617 as toCalendarDate, $11d87f3f76e88657$export$6f4d78149f3f53ac as toDateFields, $11d87f3f76e88657$export$4d0393e732857be5 as toTimeFields, $11d87f3f76e88657$export$d33f79e3ffc3dc83 as toTime, $11d87f3f76e88657$export$84c95a83c799e074 as toZoned, $11d87f3f76e88657$export$538b00033cc11c75 as toTimeZone, $11d87f3f76e88657$export$83aac07b4c37b25 as zonedToDate, $11d87f3f76e88657$export$d9b67bc93c097491 as toLocalTimeZone};
//# sourceMappingURL=conversion.module.js.map
@@ -0,0 +1,327 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.AsnParser = void 0;
const asn1js = require("asn1js");
const enums_1 = require("./enums");
const converters = require("./converters");
const errors_1 = require("./errors");
const helper_1 = require("./helper");
const storage_1 = require("./storage");
class AsnParser {
static parse(data, target) {
const asn1Parsed = asn1js.fromBER(data);
if (asn1Parsed.result.error) {
throw new Error(asn1Parsed.result.error);
}
const res = this.fromASN(asn1Parsed.result, target);
return res;
}
static fromASN(asn1Schema, target) {
try {
if ((0, helper_1.isConvertible)(target)) {
const value = new target();
return value.fromASN(asn1Schema);
}
const schema = storage_1.schemaStorage.get(target);
storage_1.schemaStorage.cache(target);
let targetSchema = schema.schema;
const choiceResult = this.handleChoiceTypes(asn1Schema, schema, target, targetSchema);
if (choiceResult === null || choiceResult === void 0 ? void 0 : choiceResult.result) {
return choiceResult.result;
}
if (choiceResult === null || choiceResult === void 0 ? void 0 : choiceResult.targetSchema) {
targetSchema = choiceResult.targetSchema;
}
const sequenceResult = this.handleSequenceTypes(asn1Schema, schema, target, targetSchema);
const res = new target();
if ((0, helper_1.isTypeOfArray)(target)) {
return this.handleArrayTypes(asn1Schema, schema, target);
}
this.processSchemaItems(schema, sequenceResult, res);
return res;
}
catch (error) {
if (error instanceof errors_1.AsnSchemaValidationError) {
error.schemas.push(target.name);
}
throw error;
}
}
static handleChoiceTypes(asn1Schema, schema, target, targetSchema) {
if (asn1Schema.constructor === asn1js.Constructed &&
schema.type === enums_1.AsnTypeTypes.Choice &&
asn1Schema.idBlock.tagClass === 3) {
for (const key in schema.items) {
const schemaItem = schema.items[key];
if (schemaItem.context === asn1Schema.idBlock.tagNumber && schemaItem.implicit) {
if (typeof schemaItem.type === "function" &&
storage_1.schemaStorage.has(schemaItem.type)) {
const fieldSchema = storage_1.schemaStorage.get(schemaItem.type);
if (fieldSchema && fieldSchema.type === enums_1.AsnTypeTypes.Sequence) {
const newSeq = new asn1js.Sequence();
if ("value" in asn1Schema.valueBlock &&
Array.isArray(asn1Schema.valueBlock.value) &&
"value" in newSeq.valueBlock) {
newSeq.valueBlock.value = asn1Schema.valueBlock.value;
const fieldValue = this.fromASN(newSeq, schemaItem.type);
const res = new target();
res[key] = fieldValue;
return { result: res };
}
}
}
}
}
}
else if (asn1Schema.constructor === asn1js.Constructed &&
schema.type !== enums_1.AsnTypeTypes.Choice) {
const newTargetSchema = new asn1js.Constructed({
idBlock: {
tagClass: 3,
tagNumber: asn1Schema.idBlock.tagNumber,
},
value: schema.schema.valueBlock.value,
});
for (const key in schema.items) {
delete asn1Schema[key];
}
return { targetSchema: newTargetSchema };
}
return null;
}
static handleSequenceTypes(asn1Schema, schema, target, targetSchema) {
if (schema.type === enums_1.AsnTypeTypes.Sequence) {
const asn1ComparedSchema = asn1js.compareSchema({}, asn1Schema, targetSchema);
if (!asn1ComparedSchema.verified) {
throw new errors_1.AsnSchemaValidationError(`Data does not match to ${target.name} ASN1 schema.${asn1ComparedSchema.result.error ? ` ${asn1ComparedSchema.result.error}` : ""}`);
}
return asn1ComparedSchema;
}
else {
const asn1ComparedSchema = asn1js.compareSchema({}, asn1Schema, targetSchema);
if (!asn1ComparedSchema.verified) {
throw new errors_1.AsnSchemaValidationError(`Data does not match to ${target.name} ASN1 schema.${asn1ComparedSchema.result.error ? ` ${asn1ComparedSchema.result.error}` : ""}`);
}
return asn1ComparedSchema;
}
}
static processRepeatedField(asn1Elements, asn1Index, schemaItem) {
let elementsToProcess = asn1Elements.slice(asn1Index);
if (elementsToProcess.length === 1 && elementsToProcess[0].constructor.name === "Sequence") {
const seq = elementsToProcess[0];
if (seq.valueBlock && seq.valueBlock.value && Array.isArray(seq.valueBlock.value)) {
elementsToProcess = seq.valueBlock.value;
}
}
if (typeof schemaItem.type === "number") {
const converter = converters.defaultConverter(schemaItem.type);
if (!converter)
throw new Error(`No converter for ASN.1 type ${schemaItem.type}`);
return elementsToProcess
.filter((el) => el && el.valueBlock)
.map((el) => {
try {
return converter.fromASN(el);
}
catch {
return undefined;
}
})
.filter((v) => v !== undefined);
}
else {
return elementsToProcess
.filter((el) => el && el.valueBlock)
.map((el) => {
try {
return this.fromASN(el, schemaItem.type);
}
catch {
return undefined;
}
})
.filter((v) => v !== undefined);
}
}
static processPrimitiveField(asn1Element, schemaItem) {
const converter = converters.defaultConverter(schemaItem.type);
if (!converter)
throw new Error(`No converter for ASN.1 type ${schemaItem.type}`);
return converter.fromASN(asn1Element);
}
static isOptionalChoiceField(schemaItem) {
return (schemaItem.optional &&
typeof schemaItem.type === "function" &&
storage_1.schemaStorage.has(schemaItem.type) &&
storage_1.schemaStorage.get(schemaItem.type).type === enums_1.AsnTypeTypes.Choice);
}
static processOptionalChoiceField(asn1Element, schemaItem) {
try {
const value = this.fromASN(asn1Element, schemaItem.type);
return { processed: true, value };
}
catch (err) {
if (err instanceof errors_1.AsnSchemaValidationError &&
/Wrong values for Choice type/.test(err.message)) {
return { processed: false };
}
throw err;
}
}
static handleArrayTypes(asn1Schema, schema, target) {
if (!("value" in asn1Schema.valueBlock && Array.isArray(asn1Schema.valueBlock.value))) {
throw new Error(`Cannot get items from the ASN.1 parsed value. ASN.1 object is not constructed.`);
}
const itemType = schema.itemType;
if (typeof itemType === "number") {
const converter = converters.defaultConverter(itemType);
if (!converter) {
throw new Error(`Cannot get default converter for array item of ${target.name} ASN1 schema`);
}
return target.from(asn1Schema.valueBlock.value, (element) => converter.fromASN(element));
}
else {
return target.from(asn1Schema.valueBlock.value, (element) => this.fromASN(element, itemType));
}
}
static processSchemaItems(schema, asn1ComparedSchema, res) {
for (const key in schema.items) {
const asn1SchemaValue = asn1ComparedSchema.result[key];
if (!asn1SchemaValue) {
continue;
}
const schemaItem = schema.items[key];
const schemaItemType = schemaItem.type;
let parsedValue;
if (typeof schemaItemType === "number" || (0, helper_1.isConvertible)(schemaItemType)) {
parsedValue = this.processPrimitiveSchemaItem(asn1SchemaValue, schemaItem, schemaItemType);
}
else {
parsedValue = this.processComplexSchemaItem(asn1SchemaValue, schemaItem, schemaItemType);
}
if (parsedValue &&
typeof parsedValue === "object" &&
"value" in parsedValue &&
"raw" in parsedValue) {
res[key] = parsedValue.value;
res[`${key}Raw`] = parsedValue.raw;
}
else {
res[key] = parsedValue;
}
}
}
static processPrimitiveSchemaItem(asn1SchemaValue, schemaItem, schemaItemType) {
var _a;
const converter = (_a = schemaItem.converter) !== null && _a !== void 0 ? _a : ((0, helper_1.isConvertible)(schemaItemType)
? new schemaItemType()
: null);
if (!converter) {
throw new Error("Converter is empty");
}
if (schemaItem.repeated) {
return this.processRepeatedPrimitiveItem(asn1SchemaValue, schemaItem, converter);
}
else {
return this.processSinglePrimitiveItem(asn1SchemaValue, schemaItem, schemaItemType, converter);
}
}
static processRepeatedPrimitiveItem(asn1SchemaValue, schemaItem, converter) {
if (schemaItem.implicit) {
const Container = schemaItem.repeated === "sequence" ? asn1js.Sequence : asn1js.Set;
const newItem = new Container();
newItem.valueBlock = asn1SchemaValue.valueBlock;
const newItemAsn = asn1js.fromBER(newItem.toBER(false));
if (newItemAsn.offset === -1) {
throw new Error(`Cannot parse the child item. ${newItemAsn.result.error}`);
}
if (!("value" in newItemAsn.result.valueBlock &&
Array.isArray(newItemAsn.result.valueBlock.value))) {
throw new Error("Cannot get items from the ASN.1 parsed value. ASN.1 object is not constructed.");
}
const value = newItemAsn.result.valueBlock.value;
return Array.from(value, (element) => converter.fromASN(element));
}
else {
return Array.from(asn1SchemaValue, (element) => converter.fromASN(element));
}
}
static processSinglePrimitiveItem(asn1SchemaValue, schemaItem, schemaItemType, converter) {
let value = asn1SchemaValue;
if (schemaItem.implicit) {
let newItem;
if ((0, helper_1.isConvertible)(schemaItemType)) {
newItem = new schemaItemType().toSchema("");
}
else {
const Asn1TypeName = enums_1.AsnPropTypes[schemaItemType];
const Asn1Type = asn1js[Asn1TypeName];
if (!Asn1Type) {
throw new Error(`Cannot get '${Asn1TypeName}' class from asn1js module`);
}
newItem = new Asn1Type();
}
newItem.valueBlock = value.valueBlock;
value = asn1js.fromBER(newItem.toBER(false)).result;
}
return converter.fromASN(value);
}
static processComplexSchemaItem(asn1SchemaValue, schemaItem, schemaItemType) {
if (schemaItem.repeated) {
if (!Array.isArray(asn1SchemaValue)) {
throw new Error("Cannot get list of items from the ASN.1 parsed value. ASN.1 value should be iterable.");
}
return Array.from(asn1SchemaValue, (element) => this.fromASN(element, schemaItemType));
}
else {
const valueToProcess = this.handleImplicitTagging(asn1SchemaValue, schemaItem, schemaItemType);
if (this.isOptionalChoiceField(schemaItem)) {
try {
return this.fromASN(valueToProcess, schemaItemType);
}
catch (err) {
if (err instanceof errors_1.AsnSchemaValidationError &&
/Wrong values for Choice type/.test(err.message)) {
return undefined;
}
throw err;
}
}
else {
const parsedValue = this.fromASN(valueToProcess, schemaItemType);
if (schemaItem.raw) {
return {
value: parsedValue,
raw: asn1SchemaValue.valueBeforeDecodeView,
};
}
return parsedValue;
}
}
}
static handleImplicitTagging(asn1SchemaValue, schemaItem, schemaItemType) {
if (schemaItem.implicit && typeof schemaItem.context === "number") {
const schema = storage_1.schemaStorage.get(schemaItemType);
if (schema.type === enums_1.AsnTypeTypes.Sequence) {
const newSeq = new asn1js.Sequence();
if ("value" in asn1SchemaValue.valueBlock &&
Array.isArray(asn1SchemaValue.valueBlock.value) &&
"value" in newSeq.valueBlock) {
newSeq.valueBlock.value = asn1SchemaValue.valueBlock.value;
return newSeq;
}
}
else if (schema.type === enums_1.AsnTypeTypes.Set) {
const newSet = new asn1js.Set();
if ("value" in asn1SchemaValue.valueBlock &&
Array.isArray(asn1SchemaValue.valueBlock.value) &&
"value" in newSet.valueBlock) {
newSet.valueBlock.value = asn1SchemaValue.valueBlock.value;
return newSet;
}
}
}
return asn1SchemaValue;
}
}
exports.AsnParser = AsnParser;
@@ -0,0 +1,27 @@
// Zod 3 compat layer
import * as core from "../core/index.js";
/** @deprecated Use the raw string literal codes instead, e.g. "invalid_type". */
export const ZodIssueCode = {
invalid_type: "invalid_type",
too_big: "too_big",
too_small: "too_small",
invalid_format: "invalid_format",
not_multiple_of: "not_multiple_of",
unrecognized_keys: "unrecognized_keys",
invalid_union: "invalid_union",
invalid_key: "invalid_key",
invalid_element: "invalid_element",
invalid_value: "invalid_value",
custom: "custom",
};
export { $brand, config } from "../core/index.js";
/** @deprecated Use `z.config(params)` instead. */
export function setErrorMap(map) {
core.config({
customError: map,
});
}
/** @deprecated Use `z.config()` instead. */
export function getErrorMap() {
return core.config().customError;
}
@@ -0,0 +1,76 @@
"use strict";
var _overload_yield = require("./_overload_yield.cjs");
function _async_generator(gen) {
var front, back;
function send(key, arg) {
return new Promise(function(resolve, reject) {
var request = { key: key, arg: arg, resolve: resolve, reject: reject, next: null };
if (back) back = back.next = request;
else {
front = back = request;
resume(key, arg);
}
});
}
function resume(key, arg) {
try {
var result = gen[key](arg);
var value = result.value;
var overloaded = value instanceof _overload_yield._;
Promise.resolve(overloaded ? value.v : value).then(function(arg) {
if (overloaded) {
var nextKey = key === "return" ? "return" : "next";
if (!value.k || arg.done) return resume(nextKey, arg);
else arg = gen[nextKey](arg).value;
}
settle(result.done ? "return" : "normal", arg);
}, function(err) {
resume("throw", err);
});
} catch (err) {
settle("throw", err);
}
}
function settle(type, value) {
switch (type) {
case "return":
front.resolve({ value: value, done: true });
break;
case "throw":
front.reject(value);
break;
default:
front.resolve({ value: value, done: false });
break;
}
front = front.next;
if (front) resume(front.key, front.arg);
else back = null;
}
this._invoke = send;
if (typeof gen.return !== "function") this.return = undefined;
}
_async_generator.prototype[(typeof Symbol === "function" && Symbol.asyncIterator) || "@@asyncIterator"] = function() {
return this;
};
_async_generator.prototype.next = function(arg) {
return this._invoke("next", arg);
};
_async_generator.prototype.throw = function(arg) {
return this._invoke("throw", arg);
};
_async_generator.prototype.return = function(arg) {
return this._invoke("return", arg);
};
exports._ = _async_generator;
@@ -0,0 +1,177 @@
/**
* @fileoverview Utility to get information about the execution environment.
* @author Kai Cataldo
*/
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const path = require("node:path");
const spawn = require("cross-spawn");
const os = require("node:os");
const log = require("../shared/logging");
const packageJson = require("../../package.json");
//------------------------------------------------------------------------------
// Helpers
//------------------------------------------------------------------------------
/**
* Generates and returns execution environment information.
* @returns {string} A string that contains execution environment information.
*/
function environment() {
const cache = new Map();
/**
* Checks if a path is a child of a directory.
* @param {string} parentPath The parent path to check.
* @param {string} childPath The path to check.
* @returns {boolean} Whether or not the given path is a child of a directory.
*/
function isChildOfDirectory(parentPath, childPath) {
return !path.relative(parentPath, childPath).startsWith("..");
}
/**
* Synchronously executes a shell command and formats the result.
* @param {string} cmd The command to execute.
* @param {Array} args The arguments to be executed with the command.
* @throws {Error} As may be collected by `cross-spawn.sync`.
* @returns {string} The version returned by the command.
*/
function execCommand(cmd, args) {
const key = [cmd, ...args].join(" ");
if (cache.has(key)) {
return cache.get(key);
}
const process = spawn.sync(cmd, args, { encoding: "utf8" });
if (process.error) {
throw process.error;
}
const result = process.stdout.trim();
cache.set(key, result);
return result;
}
/**
* Normalizes a version number.
* @param {string} versionStr The string to normalize.
* @returns {string} The normalized version number.
*/
function normalizeVersionStr(versionStr) {
return versionStr.startsWith("v") ? versionStr : `v${versionStr}`;
}
/**
* Gets bin version.
* @param {string} bin The bin to check.
* @throws {Error} As may be collected by `cross-spawn.sync`.
* @returns {string} The normalized version returned by the command.
*/
function getBinVersion(bin) {
const binArgs = ["--version"];
try {
return normalizeVersionStr(execCommand(bin, binArgs));
} catch (e) {
log.error(
`Error finding ${bin} version running the command \`${bin} ${binArgs.join(" ")}\``,
);
throw e;
}
}
/**
* Gets installed npm package version.
* @param {string} pkg The package to check.
* @param {boolean} global Whether to check globally or not.
* @throws {Error} As may be collected by `cross-spawn.sync`.
* @returns {string} The normalized version returned by the command.
*/
function getNpmPackageVersion(pkg, { global = false } = {}) {
const npmBinArgs = ["bin", "-g"];
const npmLsArgs = ["ls", "--depth=0", "--json", pkg];
if (global) {
npmLsArgs.push("-g");
}
try {
const parsedStdout = JSON.parse(execCommand("npm", npmLsArgs));
/*
* Checking globally returns an empty JSON object, while local checks
* include the name and version of the local project.
*/
if (
Object.keys(parsedStdout).length === 0 ||
!(parsedStdout.dependencies && parsedStdout.dependencies.eslint)
) {
return "Not found";
}
const [, processBinPath] = process.argv;
let npmBinPath;
try {
npmBinPath = execCommand("npm", npmBinArgs);
} catch (e) {
log.error(
`Error finding npm binary path when running command \`npm ${npmBinArgs.join(" ")}\``,
);
throw e;
}
const isGlobal = isChildOfDirectory(npmBinPath, processBinPath);
let pkgVersion = parsedStdout.dependencies.eslint.version;
if ((global && isGlobal) || (!global && !isGlobal)) {
pkgVersion += " (Currently used)";
}
return normalizeVersionStr(pkgVersion);
} catch (e) {
log.error(
`Error finding ${pkg} version running the command \`npm ${npmLsArgs.join(" ")}\``,
);
throw e;
}
}
return [
"Environment Info:",
"",
`Node version: ${process.version}`,
`npm version: ${getBinVersion("npm")}`,
`Local ESLint version: ${getNpmPackageVersion("eslint", { global: false })}`,
`Global ESLint version: ${getNpmPackageVersion("eslint", { global: true })}`,
`Operating System: ${os.platform()} ${os.release()}`,
].join("\n");
}
/**
* Returns version of currently executing ESLint.
* @returns {string} The version from the currently executing ESLint's package.json.
*/
function version() {
return `v${packageJson.version}`;
}
//------------------------------------------------------------------------------
// Public Interface
//------------------------------------------------------------------------------
module.exports = {
__esModule: true, // Indicate intent for imports, remove ambiguity for Knip (see: https://github.com/eslint/eslint/pull/18005#discussion_r1484422616)
environment,
version,
};
@@ -0,0 +1,348 @@
# Multer [![NPM Version][npm-version-image]][npm-url] [![NPM Downloads][npm-downloads-image]][npm-url] [![Build Status][ci-image]][ci-url] [![Test Coverage][test-image]][test-url] [![OpenSSF Scorecard Badge][ossf-scorecard-badge]][ossf-scorecard-visualizer]
Multer is a node.js middleware for handling `multipart/form-data`, which is primarily used for uploading files. It is written
on top of [busboy](https://github.com/mscdex/busboy) for maximum efficiency.
**NOTE**: Multer will not process any form which is not multipart (`multipart/form-data`).
## Translations
This README is also available in other languages:
| | |
| ------------------------------------------------------------------------------ | --------------- |
| [العربية](https://github.com/expressjs/multer/blob/main/doc/README-ar.md) | Arabic |
| [简体中文](https://github.com/expressjs/multer/blob/main/doc/README-zh-cn.md) | Chinese |
| [Français](https://github.com/expressjs/multer/blob/main/doc/README-fr.md) | French |
| [한국어](https://github.com/expressjs/multer/blob/main/doc/README-ko.md) | Korean |
| [Português](https://github.com/expressjs/multer/blob/main/doc/README-pt-br.md) | Portuguese (BR) |
| [Русский язык](https://github.com/expressjs/multer/blob/main/doc/README-ru.md) | Russian |
| [Español](https://github.com/expressjs/multer/blob/main/doc/README-es.md) | Spanish |
| [O'zbek tili](https://github.com/expressjs/multer/blob/main/doc/README-uz.md) | Uzbek |
| [Việt Nam](https://github.com/expressjs/multer/blob/main/doc/README-vi.md) | Vietnamese |
## Installation
```sh
$ npm install multer
```
## Usage
Multer adds a `body` object and a `file` or `files` object to the `request` object. The `body` object contains the values of the text fields of the form, the `file` or `files` object contains the files uploaded via the form.
Basic usage example:
Don't forget the `enctype="multipart/form-data"` in your form.
```html
<form action="/profile" method="post" enctype="multipart/form-data">
<input type="file" name="avatar" />
</form>
```
```javascript
const express = require('express')
const multer = require('multer')
const upload = multer({ dest: 'uploads/' })
const app = express()
app.post('/profile', upload.single('avatar'), function (req, res, next) {
// req.file is the `avatar` file
// req.body will hold the text fields, if there were any
})
app.post('/photos/upload', upload.array('photos', 12), function (req, res, next) {
// req.files is array of `photos` files
// req.body will contain the text fields, if there were any
})
const uploadMiddleware = upload.fields([{ name: 'avatar', maxCount: 1 }, { name: 'gallery', maxCount: 8 }])
app.post('/cool-profile', uploadMiddleware, function (req, res, next) {
// req.files is an object (String -> Array) where fieldname is the key, and the value is array of files
//
// e.g.
// req.files['avatar'][0] -> File
// req.files['gallery'] -> Array
//
// req.body will contain the text fields, if there were any
})
```
In case you need to handle a text-only multipart form, you should use the `.none()` method:
```javascript
const express = require('express')
const app = express()
const multer = require('multer')
const upload = multer()
app.post('/profile', upload.none(), function (req, res, next) {
// req.body contains the text fields
})
```
Here's an example on how multer is used in a HTML form. Take special note of the `enctype="multipart/form-data"` and `name="uploaded_file"` fields:
```html
<form action="/stats" enctype="multipart/form-data" method="post">
<div class="form-group">
<input type="file" class="form-control-file" name="uploaded_file">
<input type="text" class="form-control" placeholder="Number of speakers" name="nspeakers">
<input type="submit" value="Get me the stats!" class="btn btn-default">
</div>
</form>
```
Then in your javascript file you would add these lines to access both the file and the body. It is important that you use the `name` field value from the form in your upload function. This tells multer which field on the request it should look for the files in. If these fields aren't the same in the HTML form and on your server, your upload will fail:
```javascript
const multer = require('multer')
const upload = multer({ dest: './public/data/uploads/' })
app.post('/stats', upload.single('uploaded_file'), function (req, res) {
// req.file is the name of your file in the form above, here 'uploaded_file'
// req.body will hold the text fields, if there were any
console.log(req.file, req.body)
});
```
## API
### File information
Each file contains the following information:
Key | Description | Note
--- | --- | ---
`fieldname` | Field name specified in the form |
`originalname` | Name of the file on the user's computer |
`encoding` | Encoding type of the file |
`mimetype` | Mime type of the file |
`size` | Size of the file in bytes |
`destination` | The folder to which the file has been saved | `DiskStorage`
`filename` | The name of the file within the `destination` | `DiskStorage`
`path` | The full path to the uploaded file | `DiskStorage`
`buffer` | A `Buffer` of the entire file | `MemoryStorage`
### `multer(opts)`
Multer accepts an options object, the most basic of which is the `dest`
property, which tells Multer where to upload the files. In case you omit the
options object, the files will be kept in memory and never written to disk.
By default, Multer will rename the files so as to avoid naming conflicts. The
renaming function can be customized according to your needs.
The following are the options that can be passed to Multer.
Key | Description
--- | ---
`dest` or `storage` | Where to store the files
`fileFilter` | Function to control which files are accepted
`limits` | Limits of the uploaded data
`preservePath` | Keep the full path of files instead of just the base name
In an average web app, only `dest` might be required, and configured as shown in
the following example.
```javascript
const upload = multer({ dest: 'uploads/' })
```
If you want more control over your uploads, you'll want to use the `storage`
option instead of `dest`. Multer ships with storage engines `DiskStorage`
and `MemoryStorage`; More engines are available from third parties.
#### `.single(fieldname)`
Accept a single file with the name `fieldname`. The single file will be stored
in `req.file`.
#### `.array(fieldname[, maxCount])`
Accept an array of files, all with the name `fieldname`. Optionally error out if
more than `maxCount` files are uploaded. The array of files will be stored in
`req.files`.
#### `.fields(fields)`
Accept a mix of files, specified by `fields`. An object with arrays of files
will be stored in `req.files`.
`fields` should be an array of objects with `name` and optionally a `maxCount`.
Example:
```javascript
[
{ name: 'avatar', maxCount: 1 },
{ name: 'gallery', maxCount: 8 }
]
```
#### `.none()`
Accept only text fields. If any file upload is made, error with code
"LIMIT\_UNEXPECTED\_FILE" will be issued.
#### `.any()`
Accepts all files that comes over the wire. An array of files will be stored in
`req.files`.
**WARNING:** Make sure that you always handle the files that a user uploads.
Never add multer as a global middleware since a malicious user could upload
files to a route that you didn't anticipate. Only use this function on routes
where you are handling the uploaded files.
### `storage`
#### `DiskStorage`
The disk storage engine gives you full control on storing files to disk.
```javascript
const storage = multer.diskStorage({
destination: function (req, file, cb) {
cb(null, '/tmp/my-uploads')
},
filename: function (req, file, cb) {
const uniqueSuffix = Date.now() + '-' + Math.round(Math.random() * 1E9)
cb(null, file.fieldname + '-' + uniqueSuffix)
}
})
const upload = multer({ storage: storage })
```
There are two options available, `destination` and `filename`. They are both
functions that determine where the file should be stored.
`destination` is used to determine within which folder the uploaded files should
be stored. This can also be given as a `string` (e.g. `'/tmp/uploads'`). If no
`destination` is given, the operating system's default directory for temporary
files is used.
**Note:** You are responsible for creating the directory when providing
`destination` as a function. When passing a string, multer will make sure that
the directory is created for you.
`filename` is used to determine what the file should be named inside the folder.
If no `filename` is given, each file will be given a random name that doesn't
include any file extension.
**Note:** Multer will not append any file extension for you, your function
should return a filename complete with a file extension.
Each function gets passed both the request (`req`) and some information about
the file (`file`) to aid with the decision.
Note that `req.body` might not have been fully populated yet. It depends on the
order that the client transmits fields and files to the server.
For understanding the calling convention used in the callback (needing to pass
null as the first param), refer to
[Node.js error handling](https://web.archive.org/web/20220417042018/https://www.joyent.com/node-js/production/design/errors)
#### `MemoryStorage`
The memory storage engine stores the files in memory as `Buffer` objects. It
doesn't have any options.
```javascript
const storage = multer.memoryStorage()
const upload = multer({ storage: storage })
```
When using memory storage, the file info will contain a field called
`buffer` that contains the entire file.
**WARNING**: Uploading very large files, or relatively small files in large
numbers very quickly, can cause your application to run out of memory when
memory storage is used.
### `limits`
An object specifying the size limits of the following optional properties. Multer passes this object into busboy directly, and the details of the properties can be found on [busboy's page](https://github.com/mscdex/busboy#busboy-methods).
The following integer values are available:
Key | Description | Default
--- | --- | ---
`fieldNameSize` | Max field name size | 100 bytes
`fieldSize` | Max field value size (in bytes) | 1MB
`fields` | Max number of non-file fields | Infinity
`fileSize` | For multipart forms, the max file size (in bytes) | Infinity
`files` | For multipart forms, the max number of file fields | Infinity
`parts` | For multipart forms, the max number of parts (fields + files) | Infinity
`headerPairs` | For multipart forms, the max number of header key=>value pairs to parse | 2000
Specifying the limits can help protect your site against denial of service (DoS) attacks.
### `fileFilter`
Set this to a function to control which files should be uploaded and which
should be skipped. The function should look like this:
```javascript
function fileFilter (req, file, cb) {
// The function should call `cb` with a boolean
// to indicate if the file should be accepted
// To reject this file pass `false`, like so:
cb(null, false)
// To accept the file pass `true`, like so:
cb(null, true)
// You can always pass an error if something goes wrong:
cb(new Error('I don\'t have a clue!'))
}
```
## Error handling
When encountering an error, Multer will delegate the error to Express. You can
display a nice error page using [the standard express way](http://expressjs.com/guide/error-handling.html).
If you want to catch errors specifically from Multer, you can call the
middleware function by yourself. Also, if you want to catch only [the Multer errors](https://github.com/expressjs/multer/blob/main/lib/multer-error.js), you can use the `MulterError` class that is attached to the `multer` object itself (e.g. `err instanceof multer.MulterError`).
```javascript
const multer = require('multer')
const upload = multer().single('avatar')
app.post('/profile', function (req, res) {
upload(req, res, function (err) {
if (err instanceof multer.MulterError) {
// A Multer error occurred when uploading.
} else if (err) {
// An unknown error occurred when uploading.
}
// Everything went fine.
})
})
```
## Custom storage engine
For information on how to build your own storage engine, see [Multer Storage Engine](https://github.com/expressjs/multer/blob/main/StorageEngine.md).
## License
[MIT](LICENSE)
[ci-image]: https://github.com/expressjs/multer/actions/workflows/ci.yml/badge.svg
[ci-url]: https://github.com/expressjs/multer/actions/workflows/ci.yml
[test-url]: https://coveralls.io/r/expressjs/multer?branch=main
[test-image]: https://badgen.net/coveralls/c/github/expressjs/multer/main
[npm-downloads-image]: https://badgen.net/npm/dm/multer
[npm-url]: https://npmjs.org/package/multer
[npm-version-image]: https://badgen.net/npm/v/multer
[ossf-scorecard-badge]: https://api.scorecard.dev/projects/github.com/expressjs/multer/badge
[ossf-scorecard-visualizer]: https://ossf.github.io/scorecard-visualizer/#/projects/github.com/expressjs/multer
@@ -0,0 +1,19 @@
'use strict';
var defineProperties = require('define-properties');
var implementation = require('./implementation');
var getPolyfill = require('./polyfill');
var shim = require('./shim');
var polyfill = getPolyfill();
var getGlobal = function () { return polyfill; };
defineProperties(getGlobal, {
getPolyfill: getPolyfill,
implementation: implementation,
shim: shim
});
module.exports = getGlobal;
@@ -0,0 +1,15 @@
import { __decorate } from "tslib";
import { AsnProp, AsnPropTypes } from "@peculiar/asn1-schema";
export class AttCertValidityPeriod {
constructor(params = {}) {
this.notBeforeTime = new Date();
this.notAfterTime = new Date();
Object.assign(this, params);
}
}
__decorate([
AsnProp({ type: AsnPropTypes.GeneralizedTime })
], AttCertValidityPeriod.prototype, "notBeforeTime", void 0);
__decorate([
AsnProp({ type: AsnPropTypes.GeneralizedTime })
], AttCertValidityPeriod.prototype, "notAfterTime", void 0);
@@ -0,0 +1,33 @@
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
/// <reference no-default-lib="true"/>
interface String {
/**
* Replace all instances of a substring in a string, using a regular expression or search string.
* @param searchValue A string to search for.
* @param replaceValue A string containing the text to replace for every successful match of searchValue in this string.
*/
replaceAll(searchValue: string | RegExp, replaceValue: string): string;
/**
* Replace all instances of a substring in a string, using a regular expression or search string.
* @param searchValue A string to search for.
* @param replacer A function that returns the replacement text.
*/
replaceAll(searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string;
}
@@ -0,0 +1,14 @@
export { getInertValue } from './getInertValue.mjs';
export { Dict, __DEV__, __TEST__, dataAttr, isArray, isEmpty, isEmptyArray, isEmptyObject, isFunction, isNumeric, isObject } from '../../common/assertion.mjs';
export { clsx } from '../../common/clsx.mjs';
export { MergeObject, arrayToObject, cleanObject, cleanObjectKeys, compact, copyObject, getKeyValue, getProp, omitObject, renameProp } from '../../common/object.mjs';
export { safeAriaLabel, safeInitials, safeText } from '../../common/text.mjs';
export { getMargin } from '../../common/dimensions.mjs';
export { callAll, callAllHandlers, capitalize, debounce, extractProperty, get, getUniqueID, intersectionBy, kebabCase, mapKeys, objectToDeps, omit, removeEvents, uniqBy } from '../../common/functions.mjs';
export { clamp, clampPercentage, range } from '../../common/numbers.mjs';
export { warn } from '../../common/console.mjs';
export { Timer } from '../../common/types.mjs';
export { getGregorianYearOffset } from '../../common/dates.mjs';
export { isPatternNumeric } from '../../common/regex.mjs';
export { chain, idsUpdaterMap, mergeIds, mergeProps, mergeRefs } from '../../common/ra.mjs';
import 'react';
@@ -0,0 +1,5 @@
import getAsyncFunction from './index.js';
export default getAsyncFunction;
export { getAsyncFunction as 'module.exports' };
@@ -0,0 +1,132 @@
'use strict';
var utils = require('../utils.js');
require('eslint-visitor-keys');
require('espree');
require('estraverse');
const messages = {
require: "JSX element should start in a new line",
prevent: "JSX element should not start in a new line",
allowMultilines: "Multiline JSX elements should start in a new line"
};
function isMultilined(node) {
return node && node.loc.start.line !== node.loc.end.line;
}
var jsxNewline = utils.createRule({
name: "jsx-newline",
package: "jsx",
meta: {
type: "layout",
docs: {
description: "Require or prevent a new line after jsx elements and expressions."
},
fixable: "code",
messages,
schema: [
{
type: "object",
properties: {
prevent: {
default: false,
type: "boolean"
},
allowMultilines: {
default: false,
type: "boolean"
}
},
additionalProperties: false,
// @ts-expect-error Missing in type definition
if: {
properties: {
allowMultilines: {
const: true
}
}
},
then: {
properties: {
prevent: {
const: true
}
},
required: [
"prevent"
]
}
}
]
},
create(context) {
const jsxElementParents = /* @__PURE__ */ new Set();
const sourceCode = context.sourceCode;
function isBlockCommentInCurlyBraces(element) {
const elementRawValue = sourceCode.getText(element);
return /^\s*\{\/\*/.test(elementRawValue);
}
function isNonBlockComment(element) {
return !isBlockCommentInCurlyBraces(element) && (element.type === "JSXElement" || element.type === "JSXExpressionContainer");
}
return {
"Program:exit": function() {
jsxElementParents.forEach((parent) => {
parent.children.forEach((element, index, elements) => {
if (element.type === "JSXElement" || element.type === "JSXExpressionContainer") {
const configuration = context.options[0] || {};
const prevent = configuration.prevent || false;
const allowMultilines = configuration.allowMultilines || false;
const firstAdjacentSibling = elements[index + 1];
const secondAdjacentSibling = elements[index + 2];
const hasSibling = firstAdjacentSibling && secondAdjacentSibling && (firstAdjacentSibling.type === "Literal" || firstAdjacentSibling.type === "JSXText");
if (!hasSibling)
return;
const isWithoutNewLine = !/\n\s*\n/.test(firstAdjacentSibling.value);
if (isBlockCommentInCurlyBraces(element))
return;
if (allowMultilines && (isMultilined(element) || isMultilined(elements.slice(index + 2).find(isNonBlockComment)))) {
if (!isWithoutNewLine)
return;
const regex2 = /(\n)(?!.*\1)/g;
const replacement2 = "\n\n";
const messageId2 = "allowMultilines";
context.report({
messageId: messageId2,
node: secondAdjacentSibling,
fix(fixer) {
return fixer.replaceText(
firstAdjacentSibling,
sourceCode.getText(firstAdjacentSibling).replace(regex2, replacement2)
);
}
});
return;
}
if (isWithoutNewLine === prevent)
return;
const messageId = prevent ? "prevent" : "require";
const regex = prevent ? /(\n\n)(?!.*\1)/g : /(\n)(?!.*\1)/g;
const replacement = prevent ? "\n" : "\n\n";
context.report({
messageId,
node: secondAdjacentSibling,
fix(fixer) {
return fixer.replaceText(
firstAdjacentSibling,
// double or remove the last newline
sourceCode.getText(firstAdjacentSibling).replace(regex, replacement)
);
}
});
}
});
});
},
":matches(JSXElement, JSXFragment) > :matches(JSXElement, JSXExpressionContainer)": (node) => {
jsxElementParents.add(node.parent);
}
};
}
});
module.exports = jsxNewline;
@@ -0,0 +1,33 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var cellRole = {
abstract: false,
accessibleNameRequired: false,
baseConcepts: [],
childrenPresentational: false,
nameFrom: ['author', 'contents'],
prohibitedProps: [],
props: {
'aria-colindex': null,
'aria-colspan': null,
'aria-rowindex': null,
'aria-rowspan': null
},
relatedConcepts: [{
concept: {
constraints: ['ancestor table element has table role'],
name: 'td'
},
module: 'HTML'
}],
requireContextRole: ['row'],
requiredContextRole: ['row'],
requiredOwnedElements: [],
requiredProps: {},
superClass: [['roletype', 'structure', 'section']]
};
var _default = exports.default = cellRole;
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F A B wC"},B:{"1":"0 1 2 3 4 5 Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I","2":"C L M G N O P"},C:{"1":"0 1 2 3 4 5 LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC yC zC","2":"6 7 8 9 xC TC J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC 0C 1C"},D:{"1":"0 1 2 3 4 5 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC","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"},E:{"1":"gC hC BD RC iC jC kC lC mC CD SC nC oC pC qC rC sC tC DD ED","2":"J ZB K D E F A B C L M G 2C ZC 3C 4C 5C 6C aC NC OC 7C 8C 9C bC cC PC AD QC dC eC fC"},F:{"1":"0 1 2 3 4 5 uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z","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"},G:{"1":"gC hC fD RC iC jC kC lC mC gD SC nC oC pC qC rC sC tC","2":"E ZC KD vC LD MD ND OD PD QD RD SD TD UD VD WD XD YD ZD aD bD cD dD bC cC PC eD QC dC eC fC"},H:{"2":"hD"},I:{"1":"I","2":"TC J iD jD kD lD vC mD nD"},J:{"2":"D A"},K:{"1":"H","2":"A B C NC uC OC"},L:{"1":"I"},M:{"1":"MC"},N:{"2":"A B"},O:{"1":"PC"},P:{"1":"6 7 8 9 AB BB CB DB EB FB rD sD aC tD uD vD wD xD QC RC SC yD","2":"J oD pD qD"},Q:{"1":"zD"},R:{"1":"0D"},S:{"1":"2D","2":"1D"}},B:6,C:"Lookbehind in JS regular expressions",D:true};
@@ -0,0 +1,24 @@
# json-buffer
JSON functions that can convert buffers!
[![build status](https://secure.travis-ci.org/dominictarr/json-buffer.png)](http://travis-ci.org/dominictarr/json-buffer)
[![testling badge](https://ci.testling.com/dominictarr/json-buffer.png)](https://ci.testling.com/dominictarr/json-buffer)
JSON mangles buffers by converting to an array...
which isn't helpful. json-buffers converts to base64 instead,
and deconverts base64 to a buffer.
``` js
var JSONB = require('json-buffer')
var Buffer = require('buffer').Buffer
var str = JSONB.stringify(Buffer.from('hello there!'))
console.log(JSONB.parse(str)) //GET a BUFFER back
```
## License
MIT
@@ -0,0 +1 @@
{"name":"@humanwhocodes/retry","version":"0.4.3","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532092659,"integrity":"sha512-3Gto0TuM+VlkS5NfEZKwLHGqelz2U71DtEgPqJ7sjU0/FqInjsjDtAqx/bIzsxc6eP2DWQ1vc54Mno/1bCglVw==","mode":420,"size":11357},"dist/retrier.cjs":{"checkedAt":1794532093697,"integrity":"sha512-eVjiSXL4W66/W7vzjKz7NJNTAEsqIw0mOCtGc+y7zSFufTUxJ/kiz/n5WMR87kcCRa+i8MbE8duQafsyBFJ8rA==","mode":420,"size":13766},"dist/retrier.d.cts":{"checkedAt":1794532093697,"integrity":"sha512-n7cCDC4kQWymKu/LJWnE6zVtIjXIw21y9UjFwmBn1NZ/RxbILICbZczk9POYH8zWpPGdLbEW0JMDW1kAwB0uLg==","mode":420,"size":1889},"dist/retrier.js":{"checkedAt":1794532093698,"integrity":"sha512-vxgXVn0KU2sXiV3dDQiGO0n2jMx1PNMCvvJODzU+T7MZkWhpPxCiklb6P1lvnzKy4swxZH561MYkmNc9CHl7Sg==","mode":420,"size":13779},"dist/retrier.min.js":{"checkedAt":1794532093698,"integrity":"sha512-danqGWQ7BOO2NdaZNgANZAxPb7+2sDmFdfwWZX8p+8NGte/H0BiDRm6RJX2Foz/W+3BO1IPsmi2lcdvPdjuSSQ==","mode":420,"size":3103},"package.json":{"checkedAt":1794532093698,"integrity":"sha512-Gzy5pQHDL6cLJkIhCc4kgL9FLOly+cdwstyyuXmAQHe6rsLNLVksPQdYdKYJKoyEznFltRq7w32g7561PRlkdg==","mode":420,"size":1917},"README.md":{"checkedAt":1794532093698,"integrity":"sha512-d5WbLKO00PHNik0MXEfGMBeRZs7HPtbm+8Y5bKMRjatD7SzKUEWHOoforc+l6cGKCizeo0o/R+jwyvV1BVCGOg==","mode":420,"size":4267},"dist/retrier.mjs":{"checkedAt":1794532093698,"integrity":"sha512-Wweq2u2UU0+3zmod7f4Aw75sVeQd0yxht/ZqowjQEH3qlq4nEFp3502B0U8nRn8cCvXFBO4MNMJyU1o4u4XhoA==","mode":420,"size":13744},"dist/retrier.d.ts":{"checkedAt":1794532093697,"integrity":"sha512-n7cCDC4kQWymKu/LJWnE6zVtIjXIw21y9UjFwmBn1NZ/RxbILICbZczk9POYH8zWpPGdLbEW0JMDW1kAwB0uLg==","mode":420,"size":1889}}}
@@ -0,0 +1,2 @@
import 'reflect-metadata';
//# sourceMappingURL=childContainerGetShouldReturnRightInstanceWhenParentBindingIsUpdated.int.spec.d.ts.map
@@ -0,0 +1,733 @@
flf2a$ 7 6 15 -1 18
Thin font by LESTER
======================
-> Conversion to FigLet font by MEPH. (Part of ASCII Editor Service Pack I)
(http://studenten.freepage.de/meph/ascii/ascii/editor/_index.htm)
-> Defined: ASCII code alphanumeric + most used symbols
-> Uppercase characters only.
.-~~-.
(_^..^_)
Lester||||AMC - Anthony Cucchiara
*Mythos Online : Internet Magazine of Lovecraftian Horror - Dead Alice*
http://www.fortunecity.com/victorian/redlion/157/deadal.htm
*Visit my web page ANSI/ASCII/Fonts*
http://members.aol.com/lester5374/
$@
$@
$@
$@
$@
$@
$@@
.-. @
| | @
| | @
`-' @
_ @
`-' @
@@
_ _ @
`|'|' @
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
_ _ @
`-' _`-' @
_`-' @
_`-' @
_`-' _ @
`-' `-' @
@@
@
@
@
@
@
@
@@
_ @
`/' @
@
@
@
@
@@
.---. @
.-.~~~ @
| | @
| | @
~.---. @
~~~ @
@@
.---. @
~~~.-. @
| | @
| | @
.---.~ @
~~~ @
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
_ @
`/' @
@@
@
@
@
@
@
@
@@
@
@
@
@
_ @
`-' @
@@
_ @
_`-' @
_`-' @
_`-' @
_`-' @
`-' @
@@
.-----. @
_~~~~~_ @
| |\ | | @
| | \ | | @
~___\_~ @
`-----' @
@@
.-..-. @
~ | | @
| | @
| | @
| | @
`-' @
@@
.-..-. @
~ | | @
_ | | @
| |`-' @
| | _ @
`-'`-' @
@@
.--..-. @
~~ | | @
_ | | @
`-'| | @
__ | | @
`--'`-' @
@@
.-. .-. @
| | _ | | @
`-'`-'| | @
| | @
| | @
`-' @
@@
.-..-. @
| | ~ @
| | _ @
`-'| | @
_ | | @
`-'`-' @
@@
.-..--. @
| | ~~ @
| | _ @
| |`-'_ @
| | _`-' @
`-'`-' @
@@
.-..-. @
~ | | @
|/ @
/| @
| | @
`-' @
@@
.---. @
.-.~~~.-. @
~.---.~ @
.-.~~~.-. @
~.---.~ @
~~~ @
@@
.-..-. @
.-.~ | | @
~.-.| | @
~ | | @
__ | | @
`--'`-' @
@@
_ @
`-' @
@
_ @
`-' @
@
@@
_ @
`-' @
@
_ @
`-/ @
@
@@
_ @
_`-' @
_`-' @
`-'_ @
`-'_ @
`-' @
@@
@
@
@
@
@
@
@@
_ @
`-'_ @
`-'_ @
_`-' @
_`-' @
`-' @
@@
.---. @
.-.~~~.-. @
~ .--.~ @
|_| @
_ @
`-' @
@@
@
@
@
@
@
@
@@
.-..-..-. @
| | ~ | | @
| |.-.| | @
| | ~ | | @
| | | | @
`-' `-' @
@@
.-..--. @
| | ~~.-. @
| |.--.~ @
| | ~~.-. @
| |.--.~ @
`-' ~~ @
@@
.-..--. @
| | ~~ @
| | @
| | @
| | __ @
`-'`--' @
@@
.-..-. @
| | ~.-. @
| | | | @
| | | | @
| | _`-' @
`-'`-' @
@@
.-..--. @
| | ~~ @
| | _ @
| |`-' @
| | __ @
`-'`--' @
@@
.-..--. @
| | ~~ @
| | _ @
| |`-' @
| | @
`-' @
@@
.-..--. @
| | ~~ @
| | __ @
| | `. | @
| | _| | @
`-'`---' @
@@
.-. .-. @
| | _ | | @
| |`-'| | @
| | | | @
| | | | @
`-' `-' @
@@
.-. @
| | @
| | @
| | @
| | @
`-' @
@@
.-. @
| | @
| | @
| | @
__ | | @
`--'`-' @
@@
.-. .-. @
| | _`-' @
| |`-'.-. @
| | | | @
| | | | @
`-' `-' @
@@
.-. @
| | @
| | @
| | @
| | __ @
`-'`--' @
@@
.-.-. .-.-. @
| |~.-.~| | @
| | ~ | | @
| | | | @
| | | | @
`-' `-' @
@@
.-..-. .-. @
| | ~.-.| | @
| | ~ | | @
| | | | @
| | | | @
`-' `-' @
@@
.-..-..-. @
| | ~ | | @
| | | | @
| | | | @
| | _ | | @
`-'`-'`-' @
@@
.-..--. @
| | ~~.-. @
| |.--.~ @
| | ~~ @
| | @
`-' @
@@
.-..-..-. @
| | ~ | | @
| | | | @
| | | | @
| | _\| | @
`-'`-'`-' @
@@
.-..-. @
| | ~.-. @
| |.-.~ @
| | ~.-. @
| | | | @
`-' `-' @
@@
.-..-. @
| | ~ @
\| @
|\ @
_ | | @
`-'`-' @
@@
.-..-..-. @
~ | | ~ @
| | @
| | @
| | @
`-' @
@@
.-. .-. @
| | | | @
| | | | @
| | | | @
| | _ | | @
`-'`-'`-' @
@@
.-. .-. @
| | | | @
| | | | @
| | | | @
`-' _ `-' @
`-' @
@@
.-. .-. .-. @
| | | | | | @
| | | | | | @
| | | | | | @
`-'_`-'_`-' @
`-' `-' @
@@
.-. .-. @
| | | | @
`-'..`-' @
.-.`'.-. @
| | | | @
`-' `-' @
@@
.-. .-. @
| | | | @
`-'.-.`-' @
| | @
| | @
`-' @
@@
.-..-. @
~ | | @
|/ @
/| @
| | _ @
`-'`-' @
@@
.-..-. @
| | ~ @
| | @
| | @
| | _ @
`-'`-' @
@@
_ @
`-'_ @
`-'_ @
`-'_ @
`-'_ @
`-' @
@@
.-..-. @
~ | | @
| | @
| | @
_ | | @
`-'`-' @
@@
_ @
_`-'_ @
`-' `-' @
@
@
@
@@
@
@
@
@
@
@
@@
_ @
`\' @
@
@
@
@
@@
.-..-..-. @
| | ~ | | @
| |.-.| | @
| | ~ | | @
| | | | @
`-' `-' @
@@
.-..--. @
| | ~~.-. @
| |.--.~ @
| | ~~.-. @
| |.--.~ @
`-' ~~ @
@@
.-..--. @
| | ~~ @
| | @
| | @
| | __ @
`-'`--' @
@@
.-..-. @
| | ~.-. @
| | | | @
| | | | @
| | _`-' @
`-'`-' @
@@
.-..--. @
| | ~~ @
| | _ @
| |`-' @
| | __ @
`-'`--' @
@@
.-..--. @
| | ~~ @
| | _ @
| |`-' @
| | @
`-' @
@@
.-..--. @
| | ~~ @
| | __ @
| | `. | @
| | _| | @
`-'`---' @
@@
.-. .-. @
| | _ | | @
| |`-'| | @
| | | | @
| | | | @
`-' `-' @
@@
.-. @
| | @
| | @
| | @
| | @
`-' @
@@
.-. @
| | @
| | @
| | @
__ | | @
`--'`-' @
@@
.-. .-. @
| | _`-' @
| |`-'.-. @
| | | | @
| | | | @
`-' `-' @
@@
.-. @
| | @
| | @
| | @
| | __ @
`-'`--' @
@@
.-.-. .-.-. @
| |~.-.~| | @
| | ~ | | @
| | | | @
| | | | @
`-' `-' @
@@
.-..-. .-. @
| | ~.-.| | @
| | ~ | | @
| | | | @
| | | | @
`-' `-' @
@@
.-..-..-. @
| | ~ | | @
| | | | @
| | | | @
| | _ | | @
`-'`-'`-' @
@@
.-..--. @
| | ~~.-. @
| |.--.~ @
| | ~~ @
| | @
`-' @
@@
.-..-..-. @
| | ~ | | @
| | | | @
| | | | @
| | _\| | @
`-'`-'`-' @
@@
.-..-. @
| | ~.-. @
| |.-.~ @
| | ~.-. @
| | | | @
`-' `-' @
@@
.-..-. @
| | ~ @
\| @
|\ @
_ | | @
`-'`-' @
@@
.-..-..-. @
~ | | ~ @
| | @
| | @
| | @
`-' @
@@
.-. .-. @
| | | | @
| | | | @
| | | | @
| | _ | | @
`-'`-'`-' @
@@
.-. .-. @
| | | | @
| | | | @
| | | | @
`-' _ `-' @
`-' @
@@
.-. .-. .-. @
| | | | | | @
| | | | | | @
| | | | | | @
`-'_`-'_`-' @
`-' `-' @
@@
.-. .-. @
| | | | @
`-'..`-' @
.-.`'.-. @
| | | | @
`-' `-' @
@@
.-. .-. @
| | | | @
`-'.-.`-' @
| | @
| | @
`-' @
@@
.-..-. @
~ | | @
|/ @
/| @
| | _ @
`-'`-' @
@@
@
@
@
@
@
@
@@
.-. @
| | @
`-' @
.-. @
| | @
`-' @
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@@ -0,0 +1,721 @@
export default `flf2a$ 7 5 16 0 5 0 64 0
Font Author: ?
Font based on TheDraw's "THIS!.TDF"
FIGFont created with: http://patorjk.com/figfont-editor
$ $@
$ $@
$ $@
$ $@
$ $@
$ $@
$ $@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
▄$@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
▄▀▀█▄$ @
▐ ▄▀ ▀▄$@
█▄▄▄█$@
▄▀ █$@
█ ▄▀$ @
▐ ▐$ @
@@
▄▀▀█▄▄$ @
▐ ▄▀ █$@
█▄▄▄▀$ @
█ █$ @
▄▀▄▄▄▀$ @
█ ▐$ @
▐ @@
▄▀▄▄▄▄$ @
█ █ ▌$@
▐ █ @
█ @
▄▀▄▄▄▄▀$@
█ ▐$ @
▐ @@
▄▀▀█▄▄$ @
█ ▄▀ █$@
▐ █ █$@
█ █$@
▄▀▄▄▄▄▀$@
█ ▐$ @
▐ @@
▄▀▀█▄▄▄▄$@
▐ ▄▀ ▐$@
█▄▄▄▄▄$ @
█ ▌$ @
▄▀▄▄▄▄$ @
█ ▐$ @
▐ @@
▄▀▀▀█▄$ @
█ ▄▀ ▀▄$@
▐ █▄▄▄▄$ @
█ ▐$ @
█ @
█ @
▐ @@
▄▀▀▀▀▄$ @
█ @
█ ▀▄▄$ @
█ █ █$@
▐▀▄▄▄▄▀ ▐$@
▐ @
@@
▄▀▀▄ ▄▄$ @
█ █ ▄▀$@
▐ █▄▄▄█$ @
█ █$ @
▄▀ ▄▀$ @
█ █$ @
▐ ▐$ @@
▄▀▀█▀▄$ @
█ █ █$ @
▐ █ ▐$ @
█ @
▄▀▀▀▀▀▄$ @
█ █$@
▐ ▐$@@
▄█$@
▄▀▀▀█▀ ▐$@
█ █$ @
▐ █$ @
▄ ▀▄$ @
▀▀▀▀$ @
@@
▄▀▀▄ █$@
█ █ ▄▀$@
▐ █▀▄$ @
█ █$@
▄▀ █$ @
█ ▐$ @
▐ @@
▄▀▀▀▀▄ @
█ █ @
▐ █ @
█ @
▄▀▄▄▄▄▄▄▀$@
█ @
▐ @@
▄▀▀▄ ▄▀▄$@
█ █ ▀ █$@
▐ █ █$@
█ █$ @
▄▀ ▄▀$ @
█ █$ @
▐ ▐$ @@
▄▀▀▄ ▀▄$@
█ █ █ █$@
▐ █ ▀█$@
█ █$ @
▄▀ █$ @
█ ▐$ @
▐ @@
▄▀▀▀▀▄$ @
█ █$@
█ █$@
▀▄ ▄▀$@
▀▀▀▀ $ @
@
@@
▄▀▀▄▀▀▀▄$@
█ █ █$@
▐ █▀▀▀▀$ @
█$ @
▄▀$ @
█$ @
▐$ @@
▄▀▀▀▀▄$ @
█ █$ @
█ █$ @
▀▄▄▄▄▀▄$ @
█$@
▐$@
@@
▄▀▀▄▀▀▀▄$@
█ █ █$@
▐ █▀▀█▀$ @
▄▀ █$ @
█ █$ @
▐ ▐$ @
@@
▄▀▀▀▀▄$@
█ █ ▐$@
▀▄$ @
▀▄ █$ @
█▀▀▀$ @
▐ @
@@
▄▀▀▀█▀▀▄$@
█ █ ▐$@
▐ █$ @
█$ @
▄▀$ @
█ @
▐ @@
▄▀▀▄ ▄▀▀▄$@
█ █ █$@
▐ █ █$ @
█ █$ @
▀▄▄▄▄▀$ @
@
@@
▄▀▀▄ ▄▀▀▄$@
█ █ █$@
▐ █ █$ @
█ ▄▀$ @
▀▄▀$ @
@
@@
▄▀▀▄ ▄▀▀▄$@
█ █ ▐ █$@
▐ █ █$@
█ ▄ █$ @
▀▄▀ ▀▄ ▄▀$ @
▀$ @
@@
▄▀▀▄ ▄▀▄$@
█ █ █$@
▐ ▀▄▀$ @
▄▀ █$ @
█ ▄▀$ @
▄▀ ▄▀$ @
█ ▐$ @@
▄▀▀▄ ▀▀▄$@
█ ▀▄ ▄▀$@
▐ █$ @
█$ @
▄▀$ @
█$ @
▐$ @@
▄▀▀▀▀▄$ @
█ ▄▀$ @
▐ ▄▄▀▀$ @
█$ @
▀▄▄▄▄▀$@
▐$ @
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
▄▀▀█▄$ @
▐ ▄▀ ▀▄$@
█▄▄▄█$@
▄▀ █$@
█ ▄▀$ @
▐ ▐$ @
@@
▄▀▀█▄▄$ @
▐ ▄▀ █$@
█▄▄▄▀$ @
█ █$ @
▄▀▄▄▄▀$ @
█ ▐$ @
▐ @@
▄▀▄▄▄▄$ @
█ █ ▌$@
▐ █ @
█ @
▄▀▄▄▄▄▀$@
█ ▐$ @
▐ @@
▄▀▀█▄▄$ @
█ ▄▀ █$@
▐ █ █$@
█ █$@
▄▀▄▄▄▄▀$@
█ ▐$ @
▐ @@
▄▀▀█▄▄▄▄$@
▐ ▄▀ ▐$@
█▄▄▄▄▄$ @
█ ▌$ @
▄▀▄▄▄▄$ @
█ ▐$ @
▐ @@
▄▀▀▀█▄$ @
█ ▄▀ ▀▄$@
▐ █▄▄▄▄$ @
█ ▐$ @
█ @
█ @
▐ @@
▄▀▀▀▀▄$ @
█ @
█ ▀▄▄$ @
█ █ █$@
▐▀▄▄▄▄▀ ▐$@
▐ @
@@
▄▀▀▄ ▄▄$ @
█ █ ▄▀$@
▐ █▄▄▄█$ @
█ █$ @
▄▀ ▄▀$ @
█ █$ @
▐ ▐$ @@
▄▀▀█▀▄$ @
█ █ █$ @
▐ █ ▐$ @
█ @
▄▀▀▀▀▀▄$ @
█ █$@
▐ ▐$@@
▄█$@
▄▀▀▀█▀ ▐$@
█ █$ @
▐ █$ @
▄ ▀▄$ @
▀▀▀▀$ @
@@
▄▀▀▄ █$@
█ █ ▄▀$@
▐ █▀▄$ @
█ █$@
▄▀ █$ @
█ ▐$ @
▐ @@
▄▀▀▀▀▄ @
█ █ @
▐ █ @
█ @
▄▀▄▄▄▄▄▄▀$@
█ @
▐ @@
▄▀▀▄ ▄▀▄$@
█ █ ▀ █$@
▐ █ █$@
█ █$ @
▄▀ ▄▀$ @
█ █$ @
▐ ▐$ @@
▄▀▀▄ ▀▄$@
█ █ █ █$@
▐ █ ▀█$@
█ █$ @
▄▀ █$ @
█ ▐$ @
▐ @@
▄▀▀▀▀▄$ @
█ █$@
█ █$@
▀▄ ▄▀$@
▀▀▀▀ $ @
@
@@
▄▀▀▄▀▀▀▄$@
█ █ █$@
▐ █▀▀▀▀$ @
█$ @
▄▀$ @
█$ @
▐$ @@
▄▀▀▀▀▄$ @
█ █$ @
█ █$ @
▀▄▄▄▄▀▄$ @
█$@
▐$@
@@
▄▀▀▄▀▀▀▄$@
█ █ █$@
▐ █▀▀█▀$ @
▄▀ █$ @
█ █$ @
▐ ▐$ @
@@
▄▀▀▀▀▄$@
█ █ ▐$@
▀▄$ @
▀▄ █$ @
█▀▀▀$ @
▐ @
@@
▄▀▀▀█▀▀▄$@
█ █ ▐$@
▐ █$ @
█$ @
▄▀$ @
█ @
▐ @@
▄▀▀▄ ▄▀▀▄$@
█ █ █$@
▐ █ █$ @
█ █$ @
▀▄▄▄▄▀$ @
@
@@
▄▀▀▄ ▄▀▀▄$@
█ █ █$@
▐ █ █$ @
█ ▄▀$ @
▀▄▀$ @
@
@@
▄▀▀▄ ▄▀▀▄$@
█ █ ▐ █$@
▐ █ █$@
█ ▄ █$ @
▀▄▀ ▀▄ ▄▀$ @
▀$ @
@@
▄▀▀▄ ▄▀▄$@
█ █ █$@
▐ ▀▄▀$ @
▄▀ █$ @
█ ▄▀$ @
▄▀ ▄▀$ @
█ ▐$ @@
▄▀▀▄ ▀▀▄$@
█ ▀▄ ▄▀$@
▐ █$ @
█$ @
▄▀$ @
█$ @
▐$ @@
▄▀▀▀▀▄$ @
█ ▄▀$ @
▐ ▄▄▀▀$ @
█$ @
▀▄▄▄▄▀$@
▐$ @
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
`
@@ -0,0 +1,41 @@
import "../chunk-CWYZ2GEH.mjs";
import {
colorVariants
} from "../chunk-GQT3YUX3.mjs";
import {
cn
} from "../chunk-46U6G7UJ.mjs";
import {
mergeClasses
} from "../chunk-DGTYPKBN.mjs";
import {
COMMON_UNITS,
twMergeConfig
} from "../chunk-GIXI35A3.mjs";
import {
absoluteFullClasses,
baseStyles,
collapseAdjacentVariantBorders,
dataFocusVisibleClasses,
focusVisibleClasses,
groupDataFocusVisibleClasses,
hiddenInputClasses,
ringClasses,
translateCenterClasses
} from "../chunk-GH5E4FQB.mjs";
export {
COMMON_UNITS,
absoluteFullClasses,
baseStyles,
cn,
collapseAdjacentVariantBorders,
colorVariants,
dataFocusVisibleClasses,
focusVisibleClasses,
groupDataFocusVisibleClasses,
hiddenInputClasses,
mergeClasses,
ringClasses,
translateCenterClasses,
twMergeConfig
};
@@ -0,0 +1,17 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = iterationDecorator;
var _iteratorProxy = _interopRequireDefault(require("./iteratorProxy"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function iterationDecorator(collection, entries) {
if (typeof Symbol === 'function' && _typeof(Symbol.iterator) === 'symbol') {
Object.defineProperty(collection, Symbol.iterator, {
value: _iteratorProxy.default.bind(entries)
});
}
return collection;
}
@@ -0,0 +1 @@
{"version":3,"file":"named.spec.d.ts","sourceRoot":"","sources":["../../../../src/metadata/decorators/named.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,173 @@
# ansi-styles
> [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) for styling strings in the terminal
You probably want the higher-level [chalk](https://github.com/chalk/chalk) module for styling your strings.
![](screenshot.png)
## Install
```sh
npm install ansi-styles
```
## Usage
```js
import styles from 'ansi-styles';
console.log(`${styles.green.open}Hello world!${styles.green.close}`);
// Color conversion between 256/truecolor
// NOTE: When converting from truecolor to 256 colors, the original color
// may be degraded to fit the new color palette. This means terminals
// that do not support 16 million colors will best-match the
// original color.
console.log(`${styles.color.ansi(styles.rgbToAnsi(199, 20, 250))}Hello World${styles.color.close}`)
console.log(`${styles.color.ansi256(styles.rgbToAnsi256(199, 20, 250))}Hello World${styles.color.close}`)
console.log(`${styles.color.ansi16m(...styles.hexToRgb('#abcdef'))}Hello World${styles.color.close}`)
```
## API
### `open` and `close`
Each style has an `open` and `close` property.
### `modifierNames`, `foregroundColorNames`, `backgroundColorNames`, and `colorNames`
All supported style strings are exposed as an array of strings for convenience. `colorNames` is the combination of `foregroundColorNames` and `backgroundColorNames`.
This can be useful if you need to validate input:
```js
import {modifierNames, foregroundColorNames} from 'ansi-styles';
console.log(modifierNames.includes('bold'));
//=> true
console.log(foregroundColorNames.includes('pink'));
//=> false
```
## Styles
### Modifiers
- `reset`
- `bold`
- `dim`
- `italic` *(Not widely supported)*
- `underline`
- `overline` *Supported on VTE-based terminals, the GNOME terminal, mintty, and Git Bash.*
- `inverse`
- `hidden`
- `strikethrough` *(Not widely supported)*
### Colors
- `black`
- `red`
- `green`
- `yellow`
- `blue`
- `magenta`
- `cyan`
- `white`
- `blackBright` (alias: `gray`, `grey`)
- `redBright`
- `greenBright`
- `yellowBright`
- `blueBright`
- `magentaBright`
- `cyanBright`
- `whiteBright`
### Background colors
- `bgBlack`
- `bgRed`
- `bgGreen`
- `bgYellow`
- `bgBlue`
- `bgMagenta`
- `bgCyan`
- `bgWhite`
- `bgBlackBright` (alias: `bgGray`, `bgGrey`)
- `bgRedBright`
- `bgGreenBright`
- `bgYellowBright`
- `bgBlueBright`
- `bgMagentaBright`
- `bgCyanBright`
- `bgWhiteBright`
## Advanced usage
By default, you get a map of styles, but the styles are also available as groups. They are non-enumerable so they don't show up unless you access them explicitly. This makes it easier to expose only a subset in a higher-level module.
- `styles.modifier`
- `styles.color`
- `styles.bgColor`
###### Example
```js
import styles from 'ansi-styles';
console.log(styles.color.green.open);
```
Raw escape codes (i.e. without the CSI escape prefix `\u001B[` and render mode postfix `m`) are available under `styles.codes`, which returns a `Map` with the open codes as keys and close codes as values.
###### Example
```js
import styles from 'ansi-styles';
console.log(styles.codes.get(36));
//=> 39
```
## 16 / 256 / 16 million (TrueColor) support
`ansi-styles` allows converting between various color formats and ANSI escapes, with support for 16, 256 and [16 million colors](https://gist.github.com/XVilka/8346728).
The following color spaces are supported:
- `rgb`
- `hex`
- `ansi256`
- `ansi`
To use these, call the associated conversion function with the intended output, for example:
```js
import styles from 'ansi-styles';
styles.color.ansi(styles.rgbToAnsi(100, 200, 15)); // RGB to 16 color ansi foreground code
styles.bgColor.ansi(styles.hexToAnsi('#C0FFEE')); // HEX to 16 color ansi foreground code
styles.color.ansi256(styles.rgbToAnsi256(100, 200, 15)); // RGB to 256 color ansi foreground code
styles.bgColor.ansi256(styles.hexToAnsi256('#C0FFEE')); // HEX to 256 color ansi foreground code
styles.color.ansi16m(100, 200, 15); // RGB to 16 million color foreground code
styles.bgColor.ansi16m(...styles.hexToRgb('#C0FFEE')); // Hex (RGB) to 16 million color foreground code
```
## Related
- [ansi-escapes](https://github.com/sindresorhus/ansi-escapes) - ANSI escape codes for manipulating the terminal
## Maintainers
- [Sindre Sorhus](https://github.com/sindresorhus)
- [Josh Junon](https://github.com/qix-)
## For enterprise
Available as part of the Tidelift Subscription.
The maintainers of `ansi-styles` and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-ansi-styles?utm_source=npm-ansi-styles&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)
@@ -0,0 +1,5 @@
import { LeafBindingNode } from './LeafBindingNode';
import { PlanServiceNodeParent } from './PlanServiceNodeParent';
import { PlanServiceRedirectionBindingNode } from './PlanServiceRedirectionBindingNode';
export type PlanBindingNode = PlanServiceNodeParent | PlanServiceRedirectionBindingNode | LeafBindingNode;
//# sourceMappingURL=PlanBindingNode.d.ts.map
@@ -0,0 +1,192 @@
"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 });
const tsutils = __importStar(require("ts-api-utils"));
const ts = __importStar(require("typescript"));
const util_1 = require("../util");
const shared_1 = require("./enum-utils/shared");
/**
* @returns Whether the right type is an unsafe comparison against any left type.
*/
function typeViolates(leftTypeParts, rightType) {
const leftEnumValueTypes = new Set(leftTypeParts.map(getEnumValueType));
return ((leftEnumValueTypes.has(ts.TypeFlags.Number) && isNumberLike(rightType)) ||
(leftEnumValueTypes.has(ts.TypeFlags.String) && isStringLike(rightType)));
}
function isNumberLike(type) {
return tsutils
.unionConstituents(type)
.every(unionPart => tsutils
.intersectionConstituents(unionPart)
.some(intersectionPart => tsutils.isTypeFlagSet(intersectionPart, ts.TypeFlags.Number | ts.TypeFlags.NumberLike)));
}
function isStringLike(type) {
return tsutils
.unionConstituents(type)
.every(unionPart => tsutils
.intersectionConstituents(unionPart)
.some(intersectionPart => tsutils.isTypeFlagSet(intersectionPart, ts.TypeFlags.String | ts.TypeFlags.StringLike)));
}
/**
* @returns What type a type's enum value is (number or string), if either.
*/
function getEnumValueType(type) {
return tsutils.isTypeFlagSet(type, ts.TypeFlags.EnumLike)
? tsutils.isTypeFlagSet(type, ts.TypeFlags.NumberLiteral)
? ts.TypeFlags.Number
: ts.TypeFlags.String
: undefined;
}
exports.default = (0, util_1.createRule)({
name: 'no-unsafe-enum-comparison',
meta: {
type: 'suggestion',
docs: {
description: 'Disallow comparing an enum value with a non-enum value',
recommended: 'recommended',
requiresTypeChecking: true,
},
hasSuggestions: true,
messages: {
mismatchedCase: 'The case statement does not have a shared enum type with the switch predicate.',
mismatchedCondition: 'The two values in this comparison do not have a shared enum type.',
replaceValueWithEnum: 'Replace with an enum value comparison.',
},
schema: [],
},
defaultOptions: [],
create(context) {
const parserServices = (0, util_1.getParserServices)(context);
const typeChecker = parserServices.program.getTypeChecker();
function isMismatchedComparison(leftType, rightType) {
// Allow comparisons that don't have anything to do with enums:
//
// ```ts
// 1 === 2;
// ```
const leftEnumTypes = (0, shared_1.getEnumTypes)(typeChecker, leftType);
const rightEnumTypes = new Set((0, shared_1.getEnumTypes)(typeChecker, rightType));
if (leftEnumTypes.length === 0 && rightEnumTypes.size === 0) {
return false;
}
// Allow comparisons that share an enum type:
//
// ```ts
// Fruit.Apple === Fruit.Banana;
// ```
for (const leftEnumType of leftEnumTypes) {
if (rightEnumTypes.has(leftEnumType)) {
return false;
}
}
// We need to split the type into the union type parts in order to find
// valid enum comparisons like:
//
// ```ts
// declare const something: Fruit | Vegetable;
// something === Fruit.Apple;
// ```
const leftTypeParts = tsutils.unionConstituents(leftType);
const rightTypeParts = tsutils.unionConstituents(rightType);
// If a type exists in both sides, we consider this comparison safe:
//
// ```ts
// declare const fruit: Fruit.Apple | 0;
// fruit === 0;
// ```
for (const leftTypePart of leftTypeParts) {
if (rightTypeParts.includes(leftTypePart)) {
return false;
}
}
return (typeViolates(leftTypeParts, rightType) ||
typeViolates(rightTypeParts, leftType));
}
return {
'BinaryExpression[operator=/^[<>!=]?={0,2}$/]'(node) {
const leftType = parserServices.getTypeAtLocation(node.left);
const rightType = parserServices.getTypeAtLocation(node.right);
if (isMismatchedComparison(leftType, rightType)) {
context.report({
node,
messageId: 'mismatchedCondition',
suggest: [
{
messageId: 'replaceValueWithEnum',
fix(fixer) {
// Replace the right side with an enum key if possible:
//
// ```ts
// Fruit.Apple === 'apple'; // Fruit.Apple === Fruit.Apple
// ```
const leftEnumKey = (0, shared_1.getEnumKeyForLiteral)((0, shared_1.getEnumLiterals)(leftType), (0, util_1.getStaticValue)(node.right)?.value);
if (leftEnumKey) {
return fixer.replaceText(node.right, leftEnumKey);
}
// Replace the left side with an enum key if possible:
//
// ```ts
// declare const fruit: Fruit;
// 'apple' === Fruit.Apple; // Fruit.Apple === Fruit.Apple
// ```
const rightEnumKey = (0, shared_1.getEnumKeyForLiteral)((0, shared_1.getEnumLiterals)(rightType), (0, util_1.getStaticValue)(node.left)?.value);
if (rightEnumKey) {
return fixer.replaceText(node.left, rightEnumKey);
}
return null;
},
},
],
});
}
},
SwitchCase(node) {
// Ignore `default` cases.
if (node.test == null) {
return;
}
const { parent } = node;
const leftType = parserServices.getTypeAtLocation(parent.discriminant);
const rightType = parserServices.getTypeAtLocation(node.test);
if (isMismatchedComparison(leftType, rightType)) {
context.report({
node,
messageId: 'mismatchedCase',
});
}
},
};
},
});
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2024 Madeline Gurriarán
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
@@ -0,0 +1,24 @@
# @heroui/button
Buttons allow users to perform actions and choose with a single tap.
Please refer to the [documentation](https://heroui.com/docs/components/button) for more information.
## Installation
```sh
yarn add @heroui/button
# or
npm i @heroui/button
```
## 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,26 @@
export type Config = $eslintcore.ConfigObject;
export type LegacyConfig = $eslintcore.LegacyConfigObject;
export type Plugin = $eslintcore.Plugin;
export type RuleConfig = $eslintcore.RuleConfig;
export type ExtendsElement = $typests.ExtendsElement;
export type SimpleExtendsElement = $typests.SimpleExtendsElement;
export type ConfigWithExtends = $typests.ConfigWithExtends;
export type InfiniteConfigArray = $typests.InfiniteArray<Config>;
export type ConfigWithExtendsArray = $typests.ConfigWithExtendsArray;
/**
* Helper function to define a config array.
* @param {ConfigWithExtendsArray} args The arguments to the function.
* @returns {Config[]} The config array.
* @throws {TypeError} If no arguments are provided or if an argument is not an object.
*/
export function defineConfig(...args: ConfigWithExtendsArray): Config[];
/**
* Creates a global ignores config with the given patterns.
* @param {string[]} ignorePatterns The ignore patterns.
* @param {string} [name] The name of the global ignores config.
* @returns {Config} The global ignores config.
* @throws {TypeError} If ignorePatterns is not an array or if it is empty.
*/
export function globalIgnores(ignorePatterns: string[], name?: string): Config;
import type * as $eslintcore from "@eslint/core";
import type * as $typests from "./types.cts";
@@ -0,0 +1,3 @@
declare const _default: <T>(data: (T | undefined)[], from: number, to: number) => (T | undefined)[];
export default _default;
//# sourceMappingURL=move.d.ts.map
@@ -0,0 +1,6 @@
import type { Base64URLString, Uint8Array_ } from '../types/index.js';
/**
* Convert buffer to an OpenSSL-compatible PEM text format.
*/
export declare function convertCertBufferToPEM(certBuffer: Uint8Array_ | Base64URLString): string;
//# sourceMappingURL=convertCertBufferToPEM.d.ts.map
@@ -0,0 +1 @@
!function(global,factory){"object"==typeof exports&&"undefined"!=typeof module?module.exports=factory():"function"==typeof define&&define.amd?define(factory):(global="undefined"!=typeof globalThis?globalThis:global||self).monaco_loader=factory()}(this,function(){"use strict";function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n}function _defineProperty$1(e,r,t){return(r=function(t){var i=function(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r);if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==typeof i?i:i+""}(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function ownKeys$1(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,o)}return t}function _objectSpread2$1(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ownKeys$1(Object(t),!0).forEach(function(r){_defineProperty$1(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys$1(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})}return e}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable})),keys.push.apply(keys,symbols)}return keys}function _objectSpread2(target){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?ownKeys(Object(source),!0).forEach(function(key){_defineProperty(target,key,source[key])}):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))})}return target}function curry$1(fn){return function curried(){for(var _this=this,_len2=arguments.length,args=new Array(_len2),_key2=0;_key2<_len2;_key2++)args[_key2]=arguments[_key2];return args.length>=fn.length?fn.apply(this,args):function(){for(var _len3=arguments.length,nextArgs=new Array(_len3),_key3=0;_key3<_len3;_key3++)nextArgs[_key3]=arguments[_key3];return curried.apply(_this,[].concat(args,nextArgs))}}}function isObject$1(value){return{}.toString.call(value).includes("Object")}function isFunction(value){return"function"==typeof value}var errorHandler$1=curry$1(function(errorMessages,type){throw new Error(errorMessages[type]||errorMessages.default)})({initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"}),validators$1={changes:function(initial,changes){return isObject$1(changes)||errorHandler$1("changeType"),Object.keys(changes).some(function(field){return object=initial,property=field,!Object.prototype.hasOwnProperty.call(object,property);var object,property})&&errorHandler$1("changeField"),changes},selector:function(selector){isFunction(selector)||errorHandler$1("selectorType")},handler:function(handler){isFunction(handler)||isObject$1(handler)||errorHandler$1("handlerType"),isObject$1(handler)&&Object.values(handler).some(function(_handler){return!isFunction(_handler)})&&errorHandler$1("handlersType")},initial:function(initial){var obj;initial||errorHandler$1("initialIsRequired"),isObject$1(initial)||errorHandler$1("initialType"),obj=initial,Object.keys(obj).length||errorHandler$1("initialContent")}};function extractChanges(state,causedChanges){return isFunction(causedChanges)?causedChanges(state.current):causedChanges}function updateState(state,changes){return state.current=_objectSpread2(_objectSpread2({},state.current),changes),changes}function didStateUpdate(state,handler,changes){return isFunction(handler)?handler(state.current):Object.keys(changes).forEach(function(field){var _handler$field;return null===(_handler$field=handler[field])||void 0===_handler$field?void 0:_handler$field.call(handler,state.current[field])}),changes}var index={create:function(initial){var handler=argumeLine truncated
@@ -0,0 +1 @@
{"name":"zwitch","version":"2.0.4","requiresBuild":false,"files":{"license":{"checkedAt":1794532112684,"integrity":"sha512-cQvy4TvDNGTww5W7wo7SHRjv/0G8g3u/v8V2BhwwrAM+M5M2Z7W8hy+cQrU+e4exnULY2LrZ0EQqBk6Fj/Sdrw==","mode":420,"size":1099},"index.js":{"checkedAt":1794532113894,"integrity":"sha512-qRB/q63FVb3/aXznxmBibAeMdOkg3kddHxZfrr2Y5Lphc1aPYkFtQ6JHjZp5BHqtztO4ChDJR2NvmJ8k3alKNg==","mode":420,"size":3787},"package.json":{"checkedAt":1794532113894,"integrity":"sha512-KALLWiX2hDIYTE8TXuQcKfYBznD7yqV77WL+ynxni1rPNOBcwcvwz9EYG2A1/DCe4cX5JwIZTd8tE+/k6TzLsA==","mode":420,"size":1767},"readme.md":{"checkedAt":1794532113894,"integrity":"sha512-b0mte1yP6lb3BOt7UrjYK7tpd1G6QNsovFAj4FuNfMvsQRKv5xriMLhu9oPhjzZKRDu94k9QQWFbRR+HyzgFyw==","mode":420,"size":4930},"index.d.ts":{"checkedAt":1794532113894,"integrity":"sha512-TySF8WjWaRAr+yFy6Y83nWPrOHm9XFJI2D7oAA+Tr4noIPDuvyd3GR3zvCMXkF9RepxaFrZPaa5On1pYdbZcCQ==","mode":420,"size":2169}}}
@@ -0,0 +1,15 @@
import { TypeSystemPolicy } from '../../system/policy.mjs';
import { Immutable } from './immutable.mjs';
import { Clone } from '../clone/value.mjs';
/** Creates TypeBox schematics using the configured InstanceMode */
export function CreateType(schema, options) {
const result = options !== undefined ? { ...options, ...schema } : schema;
switch (TypeSystemPolicy.InstanceMode) {
case 'freeze':
return Immutable(result);
case 'clone':
return Clone(result);
default:
return result;
}
}
@@ -0,0 +1,25 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isNodeEqual = isNodeEqual;
const utils_1 = require("@typescript-eslint/utils");
function isNodeEqual(a, b) {
if (a.type !== b.type) {
return false;
}
if (a.type === utils_1.AST_NODE_TYPES.ThisExpression &&
b.type === utils_1.AST_NODE_TYPES.ThisExpression) {
return true;
}
if (a.type === utils_1.AST_NODE_TYPES.Literal && b.type === utils_1.AST_NODE_TYPES.Literal) {
return a.value === b.value;
}
if (a.type === utils_1.AST_NODE_TYPES.Identifier &&
b.type === utils_1.AST_NODE_TYPES.Identifier) {
return a.name === b.name;
}
if (a.type === utils_1.AST_NODE_TYPES.MemberExpression &&
b.type === utils_1.AST_NODE_TYPES.MemberExpression) {
return (isNodeEqual(a.property, b.property) && isNodeEqual(a.object, b.object));
}
return false;
}
@@ -0,0 +1,4 @@
/** @type {InitialConstruct} */
export const content: InitialConstruct;
import type { InitialConstruct } from 'micromark-util-types';
//# sourceMappingURL=content.d.ts.map
@@ -0,0 +1 @@
{"name":"@react-aria/table","version":"3.17.8","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532105972,"integrity":"sha512-cil7stSp3ik41Hdv2Dj+GMcbvUfs1q+MZ2Yte0804py9i6oJJN/diCiIr/brcQOZ5ZqwAI6dgaHA7l8FZheQBw==","mode":420,"size":11335},"dist/ar-AE.main.js":{"checkedAt":1794532109777,"integrity":"sha512-lqcUHwa+Xr4qPdxaJNw4M16pM28JNQRFph/LgQrq+DZdECkph2RoEhzsLKg5bvZkdQrlrkbGCbAnZdSTTX4pUA==","mode":420,"size":1247},"dist/ar-AE.module.js":{"checkedAt":1794532109777,"integrity":"sha512-R+45AQRYS9ywwPoSfyIIyzsxjN1Wx4iOm23POSAf9tU52N6XfZzG3wFrXNTLKDKkMM2k4Z/gS1Tm7gBD/vlv6w==","mode":420,"size":1343},"dist/bg-BG.main.js":{"checkedAt":1794532109778,"integrity":"sha512-hYMzVODHFCTbjKi1CJIUXgwMcJ1kIJF5IgyhCCKrO8F1EL7r45NVRSqgcl9DF3K9L7LcGVZsKofi7kFdz+1TiA==","mode":420,"size":1496},"dist/bg-BG.module.js":{"checkedAt":1794532109778,"integrity":"sha512-OkRICepehfRVlFezgi850T/z+Fkj8Z61n6uSX9HlaTFexTAK2Q+WlLVg7WYy1421swh0+00siEEnSbCFDFCy6g==","mode":420,"size":1592},"dist/cs-CZ.main.js":{"checkedAt":1794532109778,"integrity":"sha512-mz5bciUhshWADovMXLGM160qDCFxSvBr5GP9ebp3EJzbdjUF7cvUFiywr3QXdTkHonspAh5fCrTbDKnRn2Q8sQ==","mode":420,"size":597},"dist/cs-CZ.module.js":{"checkedAt":1794532109778,"integrity":"sha512-UOJXsu5HJAe1cEIF5F67opxwnq8nUelwY3cWYjE4cUOZ8Qc6BvaQuJsqNIHan0vtsKn+Rt7w/BSK9ivRfb4Ygg==","mode":420,"size":693},"dist/da-DK.main.js":{"checkedAt":1794532109778,"integrity":"sha512-oFSOK78lPdH2FkqPtQpPOGkGgMR+sJRZTNisK5Ex4V4KpSQi8AOsAC+zWytO3jYC7CAAWdqQHdjR4yWBfesNRg==","mode":420,"size":546},"dist/da-DK.module.js":{"checkedAt":1794532109778,"integrity":"sha512-i7iI+Ly4x6eTZUbxhlTpWW3oLrdH1i4mUGuEQ2340Cp5vaURdX8PY8Oq0BlAqoP51fFmtoC4KlY8WH+4B1YFpQ==","mode":420,"size":642},"dist/de-DE.main.js":{"checkedAt":1794532109779,"integrity":"sha512-kX0RCCBr1BjSEYfAhb/ZZmL/kYALlKDSQgDYUFByNRJdcSiB3U9Vht19WgFrnY8DOX1JmyUttvkYt2D0ePR9tg==","mode":420,"size":577},"dist/de-DE.module.js":{"checkedAt":1794532109779,"integrity":"sha512-IMQ5Cu6WdZmbt0ttQZXnyAFZ8DZWB3hNUVu9gJZdfAi+wJwCmKjoHM5F4owOMIXyNyXDeRMn3cQSUOVbR9gmIg==","mode":420,"size":673},"dist/el-GR.main.js":{"checkedAt":1794532109779,"integrity":"sha512-6f9cu06ranasFMzg+eQIMsjZ1hAhu7pR9Ksv1txjdzULciGgQhX6qtFWiQI18/wH9T0gcnrz5xFYn0LI50VeLA==","mode":420,"size":1344},"dist/el-GR.module.js":{"checkedAt":1794532109779,"integrity":"sha512-dVHdF7Xn9UpIqsq62lCIQFZxCpPByk53XvFZnzsrIZKXfxXXbJhUwtoh/qvy4j+O0FBHYa0YSViLxP0RpYQMPg==","mode":420,"size":1440},"dist/en-US.main.js":{"checkedAt":1794532109779,"integrity":"sha512-cAHHh/FjaKNMIjXPnb8byICOxWIy4+cMQzN9EvHlnVkYEKf2SAcztsSzQ/2EpTpIHkpjpMSQkFceKEobFWaTFA==","mode":420,"size":499},"dist/en-US.module.js":{"checkedAt":1794532109779,"integrity":"sha512-fADtYqK9+6evwacRbZT9vvwqaCnh0BMOXKDCBoEFS9de7MpKYGgrrcIZqAJ1tRrMJRWdTrzhsQeys8r/gX+qPg==","mode":420,"size":595},"dist/es-ES.main.js":{"checkedAt":1794532109779,"integrity":"sha512-QixMmNN5eLHTx2NC2o9ihUgp5svs5u1MtrlAa5utRBjXXnt5GBvcIodEXm6I7npIZX1ixd6qhIccjSWVgqVjFg==","mode":420,"size":542},"dist/es-ES.module.js":{"checkedAt":1794532109779,"integrity":"sha512-7vbErKsmbJf2ExkceeHGNdMe+VCOuIr7G9kLwUXhAzSTzVxXAb23++C7fDOT41CUDftDqP6MfJaOaLaj5uKaEQ==","mode":420,"size":638},"dist/et-EE.main.js":{"checkedAt":1794532109779,"integrity":"sha512-qO6yeKphAsXhTZsvjoed813lACvjBLlhAILFfg40Pexz0yQJ31a2Ir7xlStNxbh0KyoAM725zVq0V0OGGE1ewQ==","mode":420,"size":568},"dist/et-EE.module.js":{"checkedAt":1794532109780,"integrity":"sha512-4mLXWM4IkOA3AcpvXkGlsOGdt/K9RmKxj6wFaQTwWlA54cho8/+PodHUt7cxjMTjZcIg8yrFQpssNDCVOfxLXA==","mode":420,"size":664},"dist/fi-FI.main.js":{"checkedAt":1794532109780,"integrity":"sha512-QBeH7qEgfahLzK7opSVEKzQ80I4VngX/tsJYXiRnFrx3hHugf9M2X120rhcpnu3XZy+netm7El+bNdBS7nwMvg==","mode":420,"size":577},"dist/fi-FI.module.js":{"checkedAt":1794532109780,"integrity":"sha512-ArWQwQ65kxkb54sv/UijyGV5bTzyqa0pns4ULKGxBl/JElbo3C/Xzvkf7xpJqaebsOXylXJWjZtuKvlMLjsEGw==","mode":420,"size":673},"dist/fr-FR.main.js":{"checkedAt":1794532109780,"integrity":"sha512-oiBFzv70AgFxjVukn5bUeT2YsV9ErQjMm3XcvvREWVWV9uSQsx8LEQGYwJ+luMF+rlKyEzY3MQdHPPnh3KmkxA==","mode":420,"size":600},"dist/fr-FR.module.js":{"checkedAt":1794532109780,"integrity":"sha512-Qfxfa6AjwVVvr/KP9wq125WHNqONR7GblufLsEhMemCDShNW69dKq4wkoWZQimZPKdTbDD/O0ktMnF8h0l8+bg==","mode":420,"size":696},"dist/he-IL.main.js":{"checkedAt":1794532109780,"integrity":"sha512-neK39HAgFWl36YpCk0O35y3EhpRoLsB8rXOs+iouVjKk73InFbN1Uaf+iQSsOLOjHL15OqsQEP/pW5AzPYVnFQ==","mode":420,"size":1050},"dist/he-IL.module.js":{"checkedAt":1794532109780,"integrity":"sha512-2WU6NaauhvzdSPHZ224J50lJg1wYxuCHFroqr8+a+C+LE8xbRVk6yGCuA4ne3LSh+WCPMMxVlxXmZoGohI0xhg==","mode":420,"size":1146},"dist/hr-HR.main.js":{"checkedAt":1794532109781,"integrity":"sha512-D43QIJgDGfR7vDfnKpLocz2F3hYnqfGRLmhoPoPU+NbKVLO3Ko3BbMlt7sMA7ZYY73l1bGJXjw0Cny8diopyng==","mode":420,"size":599},"dist/hr-HR.module.js":{"checkedAt":1794532109781,"integrity":"sha512-fN8fAF0M1s23+iz8/PD+7uPtJAznJPeRa1NobkwIuxC7D0wbuBhbx9KmP+1DBKhVI/cN82bonu4h7E5xQyKl/A==","mode":420,"size":695},"dist/hu-Line truncated
@@ -0,0 +1,24 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getSortedNodesGroup = void 0;
var natural_sort_1 = require("../natural-sort");
var getSortedNodesGroup = function (imports, options) {
return imports.sort(function (a, b) {
if (options.importOrderGroupNamespaceSpecifiers) {
var diff = namespaceSpecifierSort(a, b);
if (diff !== 0)
return diff;
}
return (0, natural_sort_1.naturalSort)(a.source.value, b.source.value);
});
};
exports.getSortedNodesGroup = getSortedNodesGroup;
function namespaceSpecifierSort(a, b) {
var aFirstSpecifier = a.specifiers.find(function (s) { return s.type === 'ImportNamespaceSpecifier'; })
? 1
: 0;
var bFirstSpecifier = b.specifiers.find(function (s) { return s.type === 'ImportNamespaceSpecifier'; })
? 1
: 0;
return bFirstSpecifier - aFirstSpecifier;
}
@@ -0,0 +1,45 @@
'use strict';
var $TypeError = require('es-errors/type');
var GeneratorStart = require('./GeneratorStart');
var IsArray = require('es-abstract/2024/IsArray');
var IsCallable = require('es-abstract/2024/IsCallable');
var OrdinaryObjectCreate = require('es-abstract/2024/OrdinaryObjectCreate');
var every = require('es-abstract/helpers/every');
var SLOT = require('internal-slot');
var safeConcat = require('safe-array-concat');
var isString = function isString(slot) {
return typeof slot === 'string';
};
module.exports = function CreateIteratorFromClosure(closure, generatorBrand, proto) {
if (!IsCallable(closure)) {
throw new $TypeError('`closure` must be a function');
}
if (typeof generatorBrand !== 'string') {
throw new $TypeError('`generatorBrand` must be a string');
}
var extraSlots = arguments.length > 3 ? arguments[3] : [];
if (arguments.length > 3) {
if (!IsArray(extraSlots) || !every(extraSlots, isString)) {
throw new $TypeError('`extraSlots` must be a List of String internal slot names');
}
}
var internalSlotsList = safeConcat(extraSlots, ['[[GeneratorContext]]', '[[GeneratorBrand]]', '[[GeneratorState]]']); // step 3
var generator = OrdinaryObjectCreate(proto, internalSlotsList); // steps 4, 6
SLOT.set(generator, '[[GeneratorBrand]]', generatorBrand); // step 5
SLOT.assert(closure, '[[Sentinel]]'); // our userland slot
SLOT.set(generator, '[[Sentinel]]', SLOT.get(closure, '[[Sentinel]]')); // our userland slot
SLOT.assert(closure, '[[CloseIfAbrupt]]'); // our second userland slot
SLOT.set(generator, '[[CloseIfAbrupt]]', SLOT.get(closure, '[[CloseIfAbrupt]]')); // our second userland slot
GeneratorStart(generator, closure); // step 13
return generator; // step 15
};
@@ -0,0 +1,2 @@
export { ZipHandler } from './ZipHandler.js';
export { GzipHandler } from './GzipHandler.js';
@@ -0,0 +1,61 @@
{
"name": "mylas",
"version": "2.1.14",
"description": "Mylas is a npm package to make the loading and storing of data from fs easy and reliable.",
"main": "build/index.js",
"typings": "build/index",
"files": [
"build/"
],
"exports": {
".": {
"types": "./build/index.d.ts",
"require": "./build/index.js",
"default": "./build/index.js"
},
"./register": {
"types": "./build/register.d.ts",
"require": "./build/register.js",
"default": "./build/register.js"
}
},
"scripts": {
"prepack": "npm run build",
"test": "jest --config ./tests/jest.config.js",
"build": "bash ./config/build.sh"
},
"repository": {
"type": "git",
"url": "git+https://github.com/raouldeheer/Mylas.git"
},
"keywords": [
"fs",
"data",
"json",
"loader",
"multithreaded",
"json-comments",
"node-modules"
],
"author": "Raoul de Heer",
"license": "MIT",
"bugs": {
"url": "https://github.com/raouldeheer/Mylas/issues"
},
"homepage": "https://mylas.js.org/",
"devDependencies": {
"@types/jest": "^30.0.0",
"@types/node": "^24.10.0",
"jest": "^30.2.0",
"ts-jest": "^29.4.5",
"tsup": "^8.5.0",
"typescript": "^5.9.3"
},
"engines": {
"node": ">=16.0.0"
},
"funding": {
"type": "github",
"url": "https://github.com/sponsors/raouldeheer"
}
}
@@ -0,0 +1,9 @@
"use client";
import {
ProviderContext,
useProviderContext
} from "./chunk-Q3W45BN5.mjs";
export {
ProviderContext,
useProviderContext
};
@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2014 Blake Embrey (hello@blakeembrey.com)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
@@ -0,0 +1,97 @@
const BREAK = Symbol('break visit');
const SKIP = Symbol('skip children');
const REMOVE = Symbol('remove item');
/**
* Apply a visitor to a CST document or item.
*
* Walks through the tree (depth-first) starting from the root, calling a
* `visitor` function with two arguments when entering each item:
* - `item`: The current item, which included the following members:
* - `start: SourceToken[]` – Source tokens before the key or value,
* possibly including its anchor or tag.
* - `key?: Token | null` – Set for pair values. May then be `null`, if
* the key before the `:` separator is empty.
* - `sep?: SourceToken[]` – Source tokens between the key and the value,
* which should include the `:` map value indicator if `value` is set.
* - `value?: Token` – The value of a sequence item, or of a map pair.
* - `path`: The steps from the root to the current node, as an array of
* `['key' | 'value', number]` tuples.
*
* The return value of the visitor may be used to control the traversal:
* - `undefined` (default): Do nothing and continue
* - `visit.SKIP`: Do not visit the children of this token, continue with
* next sibling
* - `visit.BREAK`: Terminate traversal completely
* - `visit.REMOVE`: Remove the current item, then continue with the next one
* - `number`: Set the index of the next step. This is useful especially if
* the index of the current token has changed.
* - `function`: Define the next visitor for this item. After the original
* visitor is called on item entry, next visitors are called after handling
* a non-empty `key` and when exiting the item.
*/
function visit(cst, visitor) {
if ('type' in cst && cst.type === 'document')
cst = { start: cst.start, value: cst.value };
_visit(Object.freeze([]), cst, visitor);
}
// Without the `as symbol` casts, TS declares these in the `visit`
// namespace using `var`, but then complains about that because
// `unique symbol` must be `const`.
/** Terminate visit traversal completely */
visit.BREAK = BREAK;
/** Do not visit the children of the current item */
visit.SKIP = SKIP;
/** Remove the current item */
visit.REMOVE = REMOVE;
/** Find the item at `path` from `cst` as the root */
visit.itemAtPath = (cst, path) => {
let item = cst;
for (const [field, index] of path) {
const tok = item?.[field];
if (tok && 'items' in tok) {
item = tok.items[index];
}
else
return undefined;
}
return item;
};
/**
* Get the immediate parent collection of the item at `path` from `cst` as the root.
*
* Throws an error if the collection is not found, which should never happen if the item itself exists.
*/
visit.parentCollection = (cst, path) => {
const parent = visit.itemAtPath(cst, path.slice(0, -1));
const field = path[path.length - 1][0];
const coll = parent?.[field];
if (coll && 'items' in coll)
return coll;
throw new Error('Parent collection not found');
};
function _visit(path, item, visitor) {
let ctrl = visitor(item, path);
if (typeof ctrl === 'symbol')
return ctrl;
for (const field of ['key', 'value']) {
const token = item[field];
if (token && 'items' in token) {
for (let i = 0; i < token.items.length; ++i) {
const ci = _visit(Object.freeze(path.concat([[field, i]])), token.items[i], visitor);
if (typeof ci === 'number')
i = ci - 1;
else if (ci === BREAK)
return BREAK;
else if (ci === REMOVE) {
token.items.splice(i, 1);
i -= 1;
}
}
if (typeof ctrl === 'function' && field === 'key')
ctrl = ctrl(item, path);
}
}
return typeof ctrl === 'function' ? ctrl(item, path) : ctrl;
}
export { visit };
@@ -0,0 +1,239 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.OptionKeys = void 0;
const utils_1 = require("@typescript-eslint/utils");
const util_1 = require("../util");
var OptionKeys;
(function (OptionKeys) {
OptionKeys["ArrayDestructuring"] = "arrayDestructuring";
OptionKeys["ArrowParameter"] = "arrowParameter";
OptionKeys["MemberVariableDeclaration"] = "memberVariableDeclaration";
OptionKeys["ObjectDestructuring"] = "objectDestructuring";
OptionKeys["Parameter"] = "parameter";
OptionKeys["PropertyDeclaration"] = "propertyDeclaration";
OptionKeys["VariableDeclaration"] = "variableDeclaration";
OptionKeys["VariableDeclarationIgnoreFunction"] = "variableDeclarationIgnoreFunction";
})(OptionKeys || (exports.OptionKeys = OptionKeys = {}));
exports.default = (0, util_1.createRule)({
name: 'typedef',
meta: {
type: 'suggestion',
deprecated: {
deprecatedSince: '8.33.0',
message: 'This is an old rule that is no longer recommended for use.',
},
docs: {
description: 'Require type annotations in certain places',
},
messages: {
expectedTypedef: 'Expected a type annotation.',
expectedTypedefNamed: 'Expected {{name}} to have a type annotation.',
},
schema: [
{
type: 'object',
additionalProperties: false,
properties: {
[OptionKeys.ArrayDestructuring]: {
type: 'boolean',
description: 'Whether to enforce type annotations on variables declared using array destructuring.',
},
[OptionKeys.ArrowParameter]: {
type: 'boolean',
description: 'Whether to enforce type annotations for parameters of arrow functions.',
},
[OptionKeys.MemberVariableDeclaration]: {
type: 'boolean',
description: 'Whether to enforce type annotations on member variables of classes.',
},
[OptionKeys.ObjectDestructuring]: {
type: 'boolean',
description: 'Whether to enforce type annotations on variables declared using object destructuring.',
},
[OptionKeys.Parameter]: {
type: 'boolean',
description: 'Whether to enforce type annotations for parameters of functions and methods.',
},
[OptionKeys.PropertyDeclaration]: {
type: 'boolean',
description: 'Whether to enforce type annotations for properties of interfaces and types.',
},
[OptionKeys.VariableDeclaration]: {
type: 'boolean',
description: 'Whether to enforce type annotations for variable declarations, excluding array and object destructuring.',
},
[OptionKeys.VariableDeclarationIgnoreFunction]: {
type: 'boolean',
description: 'Whether to ignore variable declarations for non-arrow and arrow functions.',
},
},
},
],
},
defaultOptions: [
{
[OptionKeys.ArrayDestructuring]: false,
[OptionKeys.ArrowParameter]: false,
[OptionKeys.MemberVariableDeclaration]: false,
[OptionKeys.ObjectDestructuring]: false,
[OptionKeys.Parameter]: false,
[OptionKeys.PropertyDeclaration]: false,
[OptionKeys.VariableDeclaration]: false,
[OptionKeys.VariableDeclarationIgnoreFunction]: false,
},
],
create(context, [{ arrayDestructuring, arrowParameter, memberVariableDeclaration, objectDestructuring, parameter, propertyDeclaration, variableDeclaration, variableDeclarationIgnoreFunction, },]) {
function report(location, name) {
context.report({
node: location,
messageId: name ? 'expectedTypedefNamed' : 'expectedTypedef',
data: { name },
});
}
function getNodeName(node) {
return node.type === utils_1.AST_NODE_TYPES.Identifier ? node.name : undefined;
}
function isForOfStatementContext(node) {
let current = node.parent;
while (current) {
switch (current.type) {
case utils_1.AST_NODE_TYPES.VariableDeclarator:
case utils_1.AST_NODE_TYPES.VariableDeclaration:
case utils_1.AST_NODE_TYPES.ObjectPattern:
case utils_1.AST_NODE_TYPES.ArrayPattern:
case utils_1.AST_NODE_TYPES.Property:
current = current.parent;
break;
case utils_1.AST_NODE_TYPES.ForOfStatement:
return true;
default:
current = undefined;
}
}
return false;
}
function checkParameters(params) {
for (const param of params) {
let annotationNode;
switch (param.type) {
case utils_1.AST_NODE_TYPES.AssignmentPattern:
annotationNode = param.left;
break;
case utils_1.AST_NODE_TYPES.TSParameterProperty:
annotationNode = param.parameter;
// Check TS parameter property with default value like `constructor(private param: string = 'something') {}`
if (annotationNode.type === utils_1.AST_NODE_TYPES.AssignmentPattern) {
annotationNode = annotationNode.left;
}
break;
default:
annotationNode = param;
break;
}
if (!annotationNode.typeAnnotation) {
report(param, getNodeName(param));
}
}
}
function isVariableDeclarationIgnoreFunction(node) {
return (variableDeclarationIgnoreFunction === true &&
(node.type === utils_1.AST_NODE_TYPES.ArrowFunctionExpression ||
node.type === utils_1.AST_NODE_TYPES.FunctionExpression));
}
function isAncestorHasTypeAnnotation(node) {
let ancestor = node.parent;
while (ancestor) {
if ((ancestor.type === utils_1.AST_NODE_TYPES.ObjectPattern ||
ancestor.type === utils_1.AST_NODE_TYPES.ArrayPattern) &&
ancestor.typeAnnotation) {
return true;
}
ancestor = ancestor.parent;
}
return false;
}
return {
...(arrayDestructuring && {
ArrayPattern(node) {
if (node.parent.type === utils_1.AST_NODE_TYPES.RestElement &&
node.parent.typeAnnotation) {
return;
}
if (!node.typeAnnotation &&
!isForOfStatementContext(node) &&
!isAncestorHasTypeAnnotation(node) &&
node.parent.type !== utils_1.AST_NODE_TYPES.AssignmentExpression) {
report(node);
}
},
}),
...(arrowParameter && {
ArrowFunctionExpression(node) {
checkParameters(node.params);
},
}),
...(memberVariableDeclaration && {
PropertyDefinition(node) {
if (!(node.value && isVariableDeclarationIgnoreFunction(node.value)) &&
!node.typeAnnotation) {
report(node, node.key.type === utils_1.AST_NODE_TYPES.Identifier
? node.key.name
: undefined);
}
},
}),
...(parameter && {
'FunctionDeclaration, FunctionExpression'(node) {
checkParameters(node.params);
},
}),
...(objectDestructuring && {
ObjectPattern(node) {
if (!node.typeAnnotation &&
!isForOfStatementContext(node) &&
!isAncestorHasTypeAnnotation(node)) {
report(node);
}
},
}),
...(propertyDeclaration && {
'TSIndexSignature, TSPropertySignature'(node) {
if (!node.typeAnnotation) {
report(node, node.type === utils_1.AST_NODE_TYPES.TSPropertySignature
? getNodeName(node.key)
: undefined);
}
},
}),
VariableDeclarator(node) {
if (!variableDeclaration ||
node.id.typeAnnotation ||
(node.id.type === utils_1.AST_NODE_TYPES.ArrayPattern &&
!arrayDestructuring) ||
(node.id.type === utils_1.AST_NODE_TYPES.ObjectPattern &&
!objectDestructuring) ||
(node.init && isVariableDeclarationIgnoreFunction(node.init))) {
return;
}
let current = node.parent;
while (current) {
switch (current.type) {
case utils_1.AST_NODE_TYPES.VariableDeclaration:
// Keep looking upwards
current = current.parent;
break;
case utils_1.AST_NODE_TYPES.ForOfStatement:
case utils_1.AST_NODE_TYPES.ForInStatement:
// Stop traversing and don't report an error
return;
default:
// Stop traversing
current = undefined;
break;
}
}
report(node, getNodeName(node.id));
},
};
},
});
@@ -0,0 +1,6 @@
import type { AttestationFormatVerifierOpts } from '../verifyRegistrationResponse.js';
/**
* Verify an attestation response with fmt 'android-key'
*/
export declare function verifyAttestationAndroidKey(options: AttestationFormatVerifierOpts): Promise<boolean>;
//# sourceMappingURL=verifyAttestationAndroidKey.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"jsx-boolean-value.d.ts","sourceRoot":"","sources":["jsx-boolean-value.js"],"names":[],"mappings":"wBAwDW,OAAO,QAAQ,EAAE,IAAI,CAAC,UAAU"}
@@ -0,0 +1,38 @@
{
"name": "setprototypeof",
"version": "1.2.0",
"description": "A small polyfill for Object.setprototypeof",
"main": "index.js",
"typings": "index.d.ts",
"scripts": {
"test": "standard && mocha",
"testallversions": "npm run node010 && npm run node4 && npm run node6 && npm run node9 && npm run node11",
"testversion": "docker run -it --rm -v $(PWD):/usr/src/app -w /usr/src/app node:${NODE_VER} npm install mocha@${MOCHA_VER:-latest} && npm t",
"node010": "NODE_VER=0.10 MOCHA_VER=3 npm run testversion",
"node4": "NODE_VER=4 npm run testversion",
"node6": "NODE_VER=6 npm run testversion",
"node9": "NODE_VER=9 npm run testversion",
"node11": "NODE_VER=11 npm run testversion",
"prepublishOnly": "npm t",
"postpublish": "git push origin && git push origin --tags"
},
"repository": {
"type": "git",
"url": "https://github.com/wesleytodd/setprototypeof.git"
},
"keywords": [
"polyfill",
"object",
"setprototypeof"
],
"author": "Wes Todd",
"license": "ISC",
"bugs": {
"url": "https://github.com/wesleytodd/setprototypeof/issues"
},
"homepage": "https://github.com/wesleytodd/setprototypeof",
"devDependencies": {
"mocha": "^6.1.4",
"standard": "^13.0.2"
}
}
@@ -0,0 +1 @@
{"mappings":";;;;;;;;;AAAA;;;;;;;;;;CAUC;;AAUM,SAAS,yCAAiB,UAAkC,CAAC,CAAC;IACnE,IAAI,UAAC,MAAM,EAAC,GAAG,CAAA,GAAA,mCAAQ;IACvB,OAAO,CAAA,GAAA,oBAAM,EAAE,IAAM,IAAI,KAAK,UAAU,CAAC,QAAQ,UAAU;QAAC;QAAQ;KAAQ;AAC9E","sources":["packages/@react-aria/i18n/src/useListFormatter.tsx"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {useLocale} from './context';\nimport {useMemo} from 'react';\n\n/**\n * Provides localized list formatting for the current locale. Automatically updates when the locale changes,\n * and handles caching of the list formatter for performance.\n * @param options - Formatting options.\n */\nexport function useListFormatter(options: Intl.ListFormatOptions = {}): Intl.ListFormat {\n let {locale} = useLocale();\n return useMemo(() => new Intl.ListFormat(locale, options), [locale, options]);\n}\n"],"names":[],"version":3,"file":"useListFormatter.main.js.map"}
@@ -0,0 +1,68 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _jsxAstUtils = require("jsx-ast-utils");
var _languageTags = _interopRequireDefault(require("language-tags"));
var _schemas = require("../util/schemas");
var _getElementType = _interopRequireDefault(require("../util/getElementType"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
/**
* @fileoverview Enforce lang attribute has a valid value.
* @author Ethan Cohen
*/
// ----------------------------------------------------------------------------
// Rule Definition
// ----------------------------------------------------------------------------
var errorMessage = 'lang attribute must have a valid value.';
var schema = (0, _schemas.generateObjSchema)();
var _default = exports["default"] = {
meta: {
docs: {
url: 'https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/lang.md',
description: 'Enforce lang attribute has a valid value.'
},
schema: [schema]
},
create: function create(context) {
var elementType = (0, _getElementType["default"])(context);
return {
JSXAttribute: function JSXAttribute(node) {
var name = (0, _jsxAstUtils.propName)(node);
if (name && name.toUpperCase() !== 'LANG') {
return;
}
var parent = node.parent;
var type = elementType(parent);
if (type && type !== 'html') {
return;
}
var value = (0, _jsxAstUtils.getLiteralPropValue)(node);
// Don't check identifiers
if (value === null) {
return;
}
if (value === undefined) {
context.report({
node,
message: errorMessage
});
return;
}
if (_languageTags["default"].check(value)) {
return;
}
context.report({
node,
message: errorMessage
});
}
};
}
};
module.exports = exports.default;
@@ -0,0 +1,463 @@
"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/components/slider.ts
var slider_exports = {};
__export(slider_exports, {
slider: () => slider
});
module.exports = __toCommonJS(slider_exports);
// src/utils/classes.ts
var dataFocusVisibleClasses = [
"outline-none",
"data-[focus-visible=true]:z-10",
"data-[focus-visible=true]:outline-2",
"data-[focus-visible=true]:outline-focus",
"data-[focus-visible=true]:outline-offset-2"
];
// src/utils/tw-merge-config.ts
var COMMON_UNITS = ["small", "medium", "large"];
var twMergeConfig = {
theme: {
opacity: ["disabled"],
spacing: ["divider"],
borderWidth: COMMON_UNITS,
borderRadius: COMMON_UNITS
},
classGroups: {
shadow: [{ shadow: COMMON_UNITS }],
"font-size": [{ text: ["tiny", ...COMMON_UNITS] }],
"bg-image": [
"bg-stripe-gradient-default",
"bg-stripe-gradient-primary",
"bg-stripe-gradient-secondary",
"bg-stripe-gradient-success",
"bg-stripe-gradient-warning",
"bg-stripe-gradient-danger"
]
}
};
// src/utils/tv.ts
var import_tailwind_variants = require("tailwind-variants");
var tv = (options, config) => {
var _a, _b, _c;
return (0, import_tailwind_variants.tv)(options, {
...config,
twMerge: (_a = config == null ? void 0 : config.twMerge) != null ? _a : true,
twMergeConfig: {
...config == null ? void 0 : config.twMergeConfig,
theme: {
...(_b = config == null ? void 0 : config.twMergeConfig) == null ? void 0 : _b.theme,
...twMergeConfig.theme
},
classGroups: {
...(_c = config == null ? void 0 : config.twMergeConfig) == null ? void 0 : _c.classGroups,
...twMergeConfig.classGroups
}
}
});
};
// src/components/slider.ts
var slider = tv({
slots: {
base: "flex flex-col w-full gap-1",
labelWrapper: "w-full flex justify-between items-center",
label: "",
value: "",
step: [
"h-1.5",
"w-1.5",
"absolute",
"rounded-full",
"bg-default-300/50",
"data-[in-range=true]:bg-background/50"
],
mark: [
"absolute",
"text-small",
"cursor-default",
"opacity-50",
"data-[in-range=true]:opacity-100"
],
trackWrapper: "relative flex gap-2",
track: ["flex", "w-full", "relative", "rounded-full", "bg-default-300/50"],
filler: "h-full absolute",
thumb: [
"flex",
"justify-center",
"items-center",
"before:absolute",
"before:w-11",
"before:h-11",
"before:rounded-full",
"after:shadow-small",
"after:shadow-small",
"after:bg-background",
"data-[focused=true]:z-10",
dataFocusVisibleClasses
],
startContent: [],
endContent: []
},
variants: {
size: {
sm: {
label: "text-small",
value: "text-small",
thumb: "w-5 h-5 after:w-4 after:h-4",
step: "data-[in-range=false]:bg-default-200"
},
md: {
thumb: "w-6 h-6 after:w-5 after:h-5",
label: "text-small",
value: "text-small"
},
lg: {
thumb: "h-7 w-7 after:w-5 after:h-5",
step: "w-2 h-2",
label: "text-medium",
value: "text-medium",
mark: "mt-2"
}
},
radius: {
none: {
thumb: "rounded-none after:rounded-none"
},
sm: {
thumb: "rounded-[calc(theme(borderRadius.small)/2)] after:rounded-[calc(theme(borderRadius.small)/3)]"
},
md: {
thumb: "rounded-[calc(theme(borderRadius.medium)/2)] after:rounded-[calc(theme(borderRadius.medium)/3)]"
},
lg: {
thumb: "rounded-[calc(theme(borderRadius.large)/1.5)] after:rounded-[calc(theme(borderRadius.large)/2)]"
},
full: {
thumb: "rounded-full after:rounded-full"
}
},
color: {
foreground: {
filler: "bg-foreground",
thumb: "bg-foreground"
},
primary: {
filler: "bg-primary",
thumb: "bg-primary"
},
secondary: {
filler: "bg-secondary",
thumb: "bg-secondary"
},
success: {
filler: "bg-success",
thumb: "bg-success"
},
warning: {
filler: "bg-warning",
thumb: "bg-warning"
},
danger: {
filler: "bg-danger",
thumb: "bg-danger"
}
},
isVertical: {
true: {
base: "w-auto h-full flex-col-reverse items-center",
trackWrapper: "flex-col h-full justify-center items-center",
filler: "w-full h-auto",
thumb: "left-1/2",
track: "h-full border-y-transparent",
labelWrapper: "flex-col justify-center items-center",
step: ["left-1/2", "-translate-x-1/2", "translate-y-1/2"],
mark: ["left-1/2", "ml-1", "translate-x-1/2", "translate-y-1/2"]
},
false: {
thumb: "top-1/2",
trackWrapper: "items-center",
track: "border-x-transparent",
step: ["top-1/2", "-translate-x-1/2", "-translate-y-1/2"],
mark: ["top-1/2", "mt-1", "-translate-x-1/2", "translate-y-1/2"]
}
},
isDisabled: {
false: {
thumb: ["cursor-grab", "data-[dragging=true]:cursor-grabbing"]
},
true: {
base: "opacity-disabled",
thumb: "cursor-default"
}
},
hasMarks: {
true: {
base: "mb-5",
mark: "cursor-pointer"
},
false: {}
},
showOutline: {
true: {
thumb: "ring-2 ring-background"
},
false: {
thumb: "ring-transparent border-0"
}
},
hideValue: {
true: {
value: "sr-only"
}
},
hideThumb: {
true: {
thumb: "sr-only",
track: "cursor-pointer"
}
},
hasSingleThumb: {
true: {},
false: {}
},
disableAnimation: {
true: {
thumb: "data-[dragging=true]:after:scale-100"
},
false: {
thumb: "after:transition-all motion-reduce:after:transition-none",
mark: "transition-opacity motion-reduce:transition-none"
}
},
disableThumbScale: {
true: {},
false: {
thumb: "data-[dragging=true]:after:scale-80"
}
}
},
compoundVariants: [
{
size: ["sm", "md"],
showOutline: false,
class: {
thumb: "shadow-small"
}
},
{
size: "sm",
color: "foreground",
class: {
step: "data-[in-range=true]:bg-foreground"
}
},
{
size: "sm",
color: "primary",
class: {
step: "data-[in-range=true]:bg-primary"
}
},
{
size: "sm",
color: "secondary",
class: {
step: "data-[in-range=true]:bg-secondary"
}
},
{
size: "sm",
color: "success",
class: {
step: "data-[in-range=true]:bg-success"
}
},
{
size: "sm",
color: "warning",
class: {
step: "data-[in-range=true]:bg-warning"
}
},
{
size: "sm",
color: "danger",
class: {
step: "data-[in-range=true]:bg-danger"
}
},
{
size: "sm",
isVertical: false,
class: {
track: "h-1 my-[calc((theme(spacing.5)-theme(spacing.1))/2)] border-x-[calc(theme(spacing.5)/2)]"
}
},
{
size: "md",
isVertical: false,
class: {
track: "h-3 my-[calc((theme(spacing.6)-theme(spacing.3))/2)] border-x-[calc(theme(spacing.6)/2)]"
}
},
{
size: "lg",
isVertical: false,
class: {
track: "h-7 my-[calc((theme(spacing.7)-theme(spacing.5))/2)] border-x-[calc(theme(spacing.7)/2)]"
}
},
{
size: "sm",
isVertical: true,
class: {
track: "w-1 mx-[calc((theme(spacing.5)-theme(spacing.1))/2)] border-y-[calc(theme(spacing.5)/2)]"
}
},
{
size: "md",
isVertical: true,
class: {
track: "w-3 mx-[calc((theme(spacing.6)-theme(spacing.3))/2)] border-y-[calc(theme(spacing.6)/2)]"
}
},
{
size: "lg",
isVertical: true,
class: {
track: "w-7 mx-[calc((theme(spacing.7)-theme(spacing.5))/2)] border-y-[calc(theme(spacing.7)/2)]"
}
},
{
color: "foreground",
isVertical: false,
hasSingleThumb: true,
class: {
track: "border-s-foreground"
}
},
{
color: "primary",
isVertical: false,
hasSingleThumb: true,
class: {
track: "border-s-primary"
}
},
{
color: "secondary",
isVertical: false,
hasSingleThumb: true,
class: {
track: "border-s-secondary"
}
},
{
color: "success",
isVertical: false,
hasSingleThumb: true,
class: {
track: "border-s-success"
}
},
{
color: "warning",
isVertical: false,
hasSingleThumb: true,
class: {
track: "border-s-warning"
}
},
{
color: "danger",
isVertical: false,
hasSingleThumb: true,
class: {
track: "border-s-danger"
}
},
{
color: "foreground",
isVertical: true,
hasSingleThumb: true,
class: {
track: "border-b-foreground"
}
},
{
color: "primary",
isVertical: true,
hasSingleThumb: true,
class: {
track: "border-b-primary"
}
},
{
color: "secondary",
isVertical: true,
hasSingleThumb: true,
class: {
track: "border-b-secondary"
}
},
{
color: "success",
isVertical: true,
hasSingleThumb: true,
class: {
track: "border-b-success"
}
},
{
color: "warning",
isVertical: true,
hasSingleThumb: true,
class: {
track: "border-b-warning"
}
},
{
color: "danger",
isVertical: true,
hasSingleThumb: true,
class: {
track: "border-b-danger"
}
}
],
defaultVariants: {
size: "md",
color: "primary",
radius: "full",
hideValue: false,
hideThumb: false,
isDisabled: false,
disableThumbScale: false,
showOutline: false
}
});
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
slider
});
@@ -0,0 +1,2 @@
export declare const classMetadataReflectKey: string;
//# sourceMappingURL=classMetadataReflectKey.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"resolveBindingServiceActivations.d.ts","sourceRoot":"","sources":["../../../../src/resolution/actions/resolveBindingServiceActivations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAGnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,QAAQ,EAAgB,MAAM,oBAAoB,CAAC;AAE5D,wBAAgB,gCAAgC,CAAC,UAAU,EACzD,MAAM,EAAE,gBAAgB,EACxB,iBAAiB,EAAE,iBAAiB,CAAC,UAAU,CAAC,EAChD,KAAK,EAAE,QAAQ,CAAC,UAAU,CAAC,GAC1B,QAAQ,CAAC,UAAU,CAAC,CAqBtB"}
@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=checkServiceNodeSingleInjectionBindings.spec.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,cAAc,CAAA"}
@@ -0,0 +1,75 @@
/**
* @import {Info, State} from 'mdast-util-to-markdown'
* @import {Heading, Parents} from 'mdast'
*/
import {encodeCharacterReference} from '../util/encode-character-reference.js'
import {formatHeadingAsSetext} from '../util/format-heading-as-setext.js'
/**
* @param {Heading} node
* @param {Parents | undefined} _
* @param {State} state
* @param {Info} info
* @returns {string}
*/
export function heading(node, _, state, info) {
const rank = Math.max(Math.min(6, node.depth || 1), 1)
const tracker = state.createTracker(info)
if (formatHeadingAsSetext(node, state)) {
const exit = state.enter('headingSetext')
const subexit = state.enter('phrasing')
const value = state.containerPhrasing(node, {
...tracker.current(),
before: '\n',
after: '\n'
})
subexit()
exit()
return (
value +
'\n' +
(rank === 1 ? '=' : '-').repeat(
// The whole size…
value.length -
// Minus the position of the character after the last EOL (or
// 0 if there is none)…
(Math.max(value.lastIndexOf('\r'), value.lastIndexOf('\n')) + 1)
)
)
}
const sequence = '#'.repeat(rank)
const exit = state.enter('headingAtx')
const subexit = state.enter('phrasing')
// Note: for proper tracking, we should reset the output positions when there
// is no content returned, because then the space is not output.
// Practically, in that case, there is no content, so it doesn’t matter that
// we’ve tracked one too many characters.
tracker.move(sequence + ' ')
let value = state.containerPhrasing(node, {
before: '# ',
after: '\n',
...tracker.current()
})
if (/^[\t ]/.test(value)) {
// To do: what effect has the character reference on tracking?
value = encodeCharacterReference(value.charCodeAt(0)) + value.slice(1)
}
value = value ? sequence + ' ' + value : sequence
if (state.options.closeAtx) {
value += ' ' + sequence
}
subexit()
exit()
return value
}
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2025 FatehAK
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
@@ -0,0 +1,104 @@
import * as react from 'react';
import { Ref } from 'react';
import * as _heroui_system from '@heroui/system';
import { HTMLHeroUIProps, PropGetter } from '@heroui/system';
import { InputVariantProps, SlotsToClasses, InputSlots } from '@heroui/theme';
import { AriaTextFieldProps } from '@react-types/textfield';
interface Props<T extends HTMLInputElement | HTMLTextAreaElement = HTMLInputElement> extends Omit<HTMLHeroUIProps<"input">, keyof InputVariantProps> {
/**
* Ref to the DOM node.
*/
ref?: Ref<T>;
/**
* Ref to the container DOM node.
*/
baseRef?: Ref<HTMLDivElement>;
/**
* Ref to the input wrapper DOM node.
* This is the element that wraps the input label and the innerWrapper when the labelPlacement="inside"
* and the input has start/end content.
*/
wrapperRef?: Ref<HTMLDivElement>;
/**
* Ref to the input inner wrapper DOM node.
* This is the element that wraps the input and the start/end content when passed.
*/
innerWrapperRef?: Ref<HTMLDivElement>;
/**
* Element to be rendered in the left side of the input.
*/
startContent?: React.ReactNode;
/**
* Element to be rendered in the right side of the input.
* if you pass this prop and the `onClear` prop, the passed element
* will have the clear button props and it will be rendered instead of the
* default clear button.
*/
endContent?: React.ReactNode;
/**
* Classname or List of classes to change the classNames of the element.
* if `className` is passed, it will be added to the base slot.
*
* @example
* ```ts
* <Input classNames={{
* base:"base-classes",
* label: "label-classes",
* mainWrapper: "main-wrapper-classes",
* inputWrapper: "input-wrapper-classes",
* innerWrapper: "inner-wrapper-classes",
* input: "input-classes",
* clearButton: "clear-button-classes",
* helperWrapper: "helper-wrapper-classes",
* description: "description-classes",
* errorMessage: "error-message-classes",
* }} />
* ```
*/
classNames?: SlotsToClasses<InputSlots>;
/**
* Callback fired when the value is cleared.
* if you pass this prop, the clear button will be shown.
*/
onClear?: () => void;
/**
* React aria onChange event.
*/
onValueChange?: (value: string) => void;
}
type UseInputProps<T extends HTMLInputElement | HTMLTextAreaElement = HTMLInputElement> = Props<T> & Omit<AriaTextFieldProps, "onChange"> & InputVariantProps;
declare function useInput<T extends HTMLInputElement | HTMLTextAreaElement = HTMLInputElement>(originalProps: UseInputProps<T>): {
Component: _heroui_system.As<any>;
classNames: SlotsToClasses<"base" | "input" | "label" | "description" | "errorMessage" | "mainWrapper" | "inputWrapper" | "innerWrapper" | "helperWrapper" | "clearButton"> | undefined;
domRef: react.RefObject<T>;
label: react.ReactNode;
description: react.ReactNode;
startContent: react.ReactNode;
endContent: react.ReactNode;
labelPlacement: "outside" | "outside-left" | "inside" | undefined;
isClearable: boolean | undefined;
hasHelper: boolean;
hasStartContent: boolean;
isLabelOutside: boolean;
isOutsideLeft: boolean;
isLabelOutsideAsPlaceholder: boolean;
shouldLabelBeOutside: boolean;
shouldLabelBeInside: boolean;
hasPlaceholder: boolean;
isInvalid: boolean;
errorMessage: react.ReactNode;
getBaseProps: PropGetter<Record<string, unknown>, _heroui_system.DOMAttributes<_heroui_system.DOMElement>>;
getLabelProps: PropGetter<Record<string, unknown>, _heroui_system.DOMAttributes<_heroui_system.DOMElement>>;
getInputProps: PropGetter<Record<string, unknown>, _heroui_system.DOMAttributes<_heroui_system.DOMElement>>;
getMainWrapperProps: PropGetter<Record<string, unknown>, _heroui_system.DOMAttributes<_heroui_system.DOMElement>>;
getInputWrapperProps: PropGetter<Record<string, unknown>, _heroui_system.DOMAttributes<_heroui_system.DOMElement>>;
getInnerWrapperProps: PropGetter<Record<string, unknown>, _heroui_system.DOMAttributes<_heroui_system.DOMElement>>;
getHelperWrapperProps: PropGetter<Record<string, unknown>, _heroui_system.DOMAttributes<_heroui_system.DOMElement>>;
getDescriptionProps: PropGetter<Record<string, unknown>, _heroui_system.DOMAttributes<_heroui_system.DOMElement>>;
getErrorMessageProps: PropGetter<Record<string, unknown>, _heroui_system.DOMAttributes<_heroui_system.DOMElement>>;
getClearButtonProps: PropGetter<Record<string, unknown>, _heroui_system.DOMAttributes<_heroui_system.DOMElement>>;
};
type UseInputReturn = ReturnType<typeof useInput>;
export { Props, UseInputProps, UseInputReturn, useInput };
@@ -0,0 +1,21 @@
// from swr
import isBrowser from '../../../utils/isBrowser';
import isDocumentVisible from './isDocumentVisible';
import isOnline from './isOnline';
var listeners = new Set();
function subscribe(listener) {
listeners.add(listener);
return function unsubscribe() {
listeners.has(listener) && listeners.delete(listener);
};
}
if (isBrowser) {
var revalidate = function () {
if (!isDocumentVisible() || !isOnline())
return;
listeners.forEach(function (listener) { return listener(); });
};
window.addEventListener('visibilitychange', revalidate, false);
window.addEventListener('focus', revalidate, false);
}
export default subscribe;
@@ -0,0 +1,79 @@
import {usePress as $f6c31cce2adf654f$export$45712eceda6fad21} from "./usePress.mjs";
import {useGlobalListeners as $4k2kv$useGlobalListeners, useDescription as $4k2kv$useDescription, mergeProps as $4k2kv$mergeProps} from "@react-aria/utils";
import {useRef as $4k2kv$useRef} 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 $8a26561d2877236e$var$DEFAULT_THRESHOLD = 500;
function $8a26561d2877236e$export$c24ed0104d07eab9(props) {
let { isDisabled: isDisabled, onLongPressStart: onLongPressStart, onLongPressEnd: onLongPressEnd, onLongPress: onLongPress, threshold: threshold = $8a26561d2877236e$var$DEFAULT_THRESHOLD, accessibilityDescription: accessibilityDescription } = props;
const timeRef = (0, $4k2kv$useRef)(undefined);
let { addGlobalListener: addGlobalListener, removeGlobalListener: removeGlobalListener } = (0, $4k2kv$useGlobalListeners)();
let { pressProps: pressProps } = (0, $f6c31cce2adf654f$export$45712eceda6fad21)({
isDisabled: isDisabled,
onPressStart (e) {
e.continuePropagation();
if (e.pointerType === 'mouse' || e.pointerType === 'touch') {
if (onLongPressStart) onLongPressStart({
...e,
type: 'longpressstart'
});
timeRef.current = setTimeout(()=>{
// Prevent other usePress handlers from also handling this event.
e.target.dispatchEvent(new PointerEvent('pointercancel', {
bubbles: true
}));
if (onLongPress) onLongPress({
...e,
type: 'longpress'
});
timeRef.current = undefined;
}, threshold);
// Prevent context menu, which may be opened on long press on touch devices
if (e.pointerType === 'touch') {
let onContextMenu = (e)=>{
e.preventDefault();
};
addGlobalListener(e.target, 'contextmenu', onContextMenu, {
once: true
});
addGlobalListener(window, 'pointerup', ()=>{
// If no contextmenu event is fired quickly after pointerup, remove the handler
// so future context menu events outside a long press are not prevented.
setTimeout(()=>{
removeGlobalListener(e.target, 'contextmenu', onContextMenu);
}, 30);
}, {
once: true
});
}
}
},
onPressEnd (e) {
if (timeRef.current) clearTimeout(timeRef.current);
if (onLongPressEnd && (e.pointerType === 'mouse' || e.pointerType === 'touch')) onLongPressEnd({
...e,
type: 'longpressend'
});
}
});
let descriptionProps = (0, $4k2kv$useDescription)(onLongPress && !isDisabled ? accessibilityDescription : undefined);
return {
longPressProps: (0, $4k2kv$mergeProps)(pressProps, descriptionProps)
};
}
export {$8a26561d2877236e$export$c24ed0104d07eab9 as useLongPress};
//# sourceMappingURL=useLongPress.module.js.map
@@ -0,0 +1 @@
var StructuredJSON=function(e){"use strict";const r="object"==typeof self?self:globalThis,t=e=>((e,t)=>{const n=(r,t)=>(e.set(t,r),r),s=c=>{if(e.has(c))return e.get(c);const[a,o]=t[c];switch(a){case 0:case-1:return n(o,c);case 1:{const e=n([],c);for(const r of o)e.push(s(r));return e}case 2:{const e=n({},c);for(const[r,t]of o)e[s(r)]=s(t);return e}case 3:return n(new Date(o),c);case 4:{const{source:e,flags:r}=o;return n(new RegExp(e,r),c)}case 5:{const e=n(new Map,c);for(const[r,t]of o)e.set(s(r),s(t));return e}case 6:{const e=n(new Set,c);for(const r of o)e.add(s(r));return e}case 7:{const{name:e,message:t}=o;return n(new r[e](t),c)}case 8:return n(BigInt(o),c);case"BigInt":return n(Object(BigInt(o)),c);case"ArrayBuffer":return n(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}return n(new r[a](o),c)};return s})(new Map,e)(0),n="",{toString:s}={},{keys:c}=Object,a=e=>{const r=typeof e;if("object"!==r||!e)return[0,r];const t=s.call(e).slice(8,-1);switch(t){case"Array":return[1,n];case"Object":return[2,n];case"Date":return[3,n];case"RegExp":return[4,n];case"Map":return[5,n];case"Set":return[6,n];case"DataView":return[1,t]}return t.includes("Array")?[1,t]:t.includes("Error")?[7,t]:[2,t]},o=([e,r])=>0===e&&("function"===r||"symbol"===r),u=(e,{json:r,lossy:t}={})=>{const n=[];return((e,r,t,n)=>{const s=(e,r)=>{const s=n.push(e)-1;return t.set(r,s),s},u=n=>{if(t.has(n))return t.get(n);let[f,i]=a(n);switch(f){case 0:{let r=n;switch(i){case"bigint":f=8,r=n.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+i);r=null;break;case"undefined":return s([-1],n)}return s([f,r],n)}case 1:{if(i){let e=n;return"DataView"===i?e=new Uint8Array(n.buffer):"ArrayBuffer"===i&&(e=new Uint8Array(n)),s([i,[...e]],n)}const e=[],r=s([f,e],n);for(const r of n)e.push(u(r));return r}case 2:{if(i)switch(i){case"BigInt":return s([i,n.toString()],n);case"Boolean":case"Number":case"String":return s([i,n.valueOf()],n)}if(r&&"toJSON"in n)return u(n.toJSON());const t=[],l=s([f,t],n);for(const r of c(n))!e&&o(a(n[r]))||t.push([u(r),u(n[r])]);return l}case 3:return s([f,n.toISOString()],n);case 4:{const{source:e,flags:r}=n;return s([f,{source:e,flags:r}],n)}case 5:{const r=[],t=s([f,r],n);for(const[t,s]of n)(e||!o(a(t))&&!o(a(s)))&&r.push([u(t),u(s)]);return t}case 6:{const r=[],t=s([f,r],n);for(const t of n)!e&&o(a(t))||r.push(u(t));return t}}const{message:l}=n;return s([f,{name:i,message:l}],n)};return u})(!(r||t),!!r,new Map,n)(e),n},{parse:f,stringify:i}=JSON,l={json:!0,lossy:!0};return e.parse=e=>t(f(e)),e.stringify=e=>i(u(e,l)),e}({});
@@ -0,0 +1,40 @@
// Norwegian Bokmål [nb]
import dayjs from '../index';
var locale = {
name: 'nb',
weekdays: 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'),
weekdaysShort: 'sø._ma._ti._on._to._fr._lø.'.split('_'),
weekdaysMin: 'sø_ma_ti_on_to_fr_lø'.split('_'),
months: 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split('_'),
monthsShort: 'jan._feb._mars_april_mai_juni_juli_aug._sep._okt._nov._des.'.split('_'),
ordinal: function ordinal(n) {
return n + ".";
},
weekStart: 1,
yearStart: 4,
formats: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'DD.MM.YYYY',
LL: 'D. MMMM YYYY',
LLL: 'D. MMMM YYYY [kl.] HH:mm',
LLLL: 'dddd D. MMMM YYYY [kl.] HH:mm'
},
relativeTime: {
future: 'om %s',
past: '%s siden',
s: 'noen sekunder',
m: 'ett minutt',
mm: '%d minutter',
h: 'en time',
hh: '%d timer',
d: 'en dag',
dd: '%d dager',
M: 'en måned',
MM: '%d måneder',
y: 'ett år',
yy: '%d år'
}
};
dayjs.locale(locale, null, true);
export default locale;
@@ -0,0 +1,37 @@
'use strict';
var test = require('tape');
var parse = require('../');
test('boolean default true', function (t) {
var argv = parse([], {
boolean: 'sometrue',
default: { sometrue: true },
});
t.equal(argv.sometrue, true);
t.end();
});
test('boolean default false', function (t) {
var argv = parse([], {
boolean: 'somefalse',
default: { somefalse: false },
});
t.equal(argv.somefalse, false);
t.end();
});
test('boolean default to null', function (t) {
var argv = parse([], {
boolean: 'maybe',
default: { maybe: null },
});
t.equal(argv.maybe, null);
var argvLong = parse(['--maybe'], {
boolean: 'maybe',
default: { maybe: null },
});
t.equal(argvLong.maybe, true);
t.end();
});
@@ -0,0 +1 @@
{"name":"esbuild","version":"0.25.12","requiresBuild":true,"files":{"bin/esbuild":{"checkedAt":1794532090734,"integrity":"sha512-sGrZO/mv4JkOAamBw23Z5T1v3jwOdknMyOjbkkSV6r6KlCiRA2Nw5rX6IpXkZp1B3TrF1m27/Fjvgrau3h5LWQ==","mode":493,"size":9351},"install.js":{"checkedAt":1794532090734,"integrity":"sha512-A/MhGi5PLSIIiCZ3UmEEpyMjR76/MtEQoZ/ObaKJxJmAm7IJaIjXnVkcwnlnKc0dQ3KfIJME3hEwu4h6ClXGBw==","mode":420,"size":11160},"lib/main.js":{"checkedAt":1794532090735,"integrity":"sha512-deZ7sdaT8kXrdFiRrSHNd6PGZ+Kh1rmeD+1VgieScTIkMDlJojbt0kwTaN5Kv8tqc8IFLAKde5H77k9ABZzGEg==","mode":420,"size":88706},"package.json":{"checkedAt":1794532090735,"integrity":"sha512-iSblYRLoeuK3qH0CBmh071K4gUxJeUYluP4TPoy4jBhAIF4utRIIdnwGoDttsRM65gNoDgw5u4n3K3lK10aINg==","mode":420,"size":1490},"LICENSE.md":{"checkedAt":1794532090735,"integrity":"sha512-oQ9lr3GFGv53nYkl4A1WgBdsYLdqABglgLT15u2KH3GyGBkTT0Aa1apEyikCaWk8KOERe9SHT8f7hVezAfkAxw==","mode":420,"size":1069},"README.md":{"checkedAt":1794532090736,"integrity":"sha512-d8nFKDXLOjrfvX2ysOMMH70lmd6JzrJCMUDtSrlqRENr7wchIAA9o1hMX6i1xG+1AX6+N2fbGqAKklwnjx8wxA==","mode":420,"size":175},"lib/main.d.ts":{"checkedAt":1794532090736,"integrity":"sha512-FeSWlW7AN+XuVP71W7gp0y2UDV2Pc+ymmI1rno1Ck85r/om8ZTRz6gdrNG8Et2NPNrvObieLCRs1k0YsKrZsng==","mode":420,"size":23392}},"sideEffects":{"linux-x64-node-v24-a6d81e66dc9bbc82e88dab6ca52f7733691f9599":{"LICENSE.md":{"checkedAt":1794532128929,"integrity":"sha512-oQ9lr3GFGv53nYkl4A1WgBdsYLdqABglgLT15u2KH3GyGBkTT0Aa1apEyikCaWk8KOERe9SHT8f7hVezAfkAxw==","mode":33188,"size":1069},"README.md":{"checkedAt":1794532128929,"integrity":"sha512-d8nFKDXLOjrfvX2ysOMMH70lmd6JzrJCMUDtSrlqRENr7wchIAA9o1hMX6i1xG+1AX6+N2fbGqAKklwnjx8wxA==","mode":33188,"size":175},"bin/esbuild":{"checkedAt":1794532096161,"integrity":"sha512-EBtZ2Syq8+RatKY1BPrHc/zVL4RVSI5WdGYNiNN0ssgRYz5psOm6IlKbBZA0x+CbC8potS7Q1ZnkRHxTtlahow==","mode":33261,"size":10358936},"install.js":{"checkedAt":1794532128949,"integrity":"sha512-A/MhGi5PLSIIiCZ3UmEEpyMjR76/MtEQoZ/ObaKJxJmAm7IJaIjXnVkcwnlnKc0dQ3KfIJME3hEwu4h6ClXGBw==","mode":33188,"size":11160},"lib/main.d.ts":{"checkedAt":1794532128949,"integrity":"sha512-FeSWlW7AN+XuVP71W7gp0y2UDV2Pc+ymmI1rno1Ck85r/om8ZTRz6gdrNG8Et2NPNrvObieLCRs1k0YsKrZsng==","mode":33188,"size":23392},"lib/main.js":{"checkedAt":1794532128950,"integrity":"sha512-deZ7sdaT8kXrdFiRrSHNd6PGZ+Kh1rmeD+1VgieScTIkMDlJojbt0kwTaN5Kv8tqc8IFLAKde5H77k9ABZzGEg==","mode":33188,"size":88706},"node_modules/.bin/esbuild":{"checkedAt":1794532128950,"integrity":"sha512-29N4SaeraPcNUUwte/KkloNqU9dNiz7KaNjnxQuF1wxrxclYZMv00o7Wu2PP3muBR0wFDa1UbALkoeA3KQazEw==","mode":33261,"size":280},"package.json":{"checkedAt":1794532128950,"integrity":"sha512-iSblYRLoeuK3qH0CBmh071K4gUxJeUYluP4TPoy4jBhAIF4utRIIdnwGoDttsRM65gNoDgw5u4n3K3lK10aINg==","mode":33188,"size":1490}}}}
@@ -0,0 +1,7 @@
'use strict';
if (process.env.NODE_ENV === 'production') {
module.exports = require('../cjs/use-sync-external-store-shim.production.js');
} else {
module.exports = require('../cjs/use-sync-external-store-shim.development.js');
}
@@ -0,0 +1,83 @@
"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.getTypeName = getTypeName;
const ts = __importStar(require("typescript"));
/**
* Get the type name of a given type.
* @param typeChecker The context sensitive TypeScript TypeChecker.
* @param type The type to get the name of.
*/
function getTypeName(typeChecker, type) {
// It handles `string` and string literal types as string.
if ((type.flags & ts.TypeFlags.StringLike) !== 0) {
return 'string';
}
// If the type is a type parameter which extends primitive string types,
// but it was not recognized as a string like. So check the constraint
// type of the type parameter.
if ((type.flags & ts.TypeFlags.TypeParameter) !== 0) {
// `type.getConstraint()` method doesn't return the constraint type of
// the type parameter for some reason. So this gets the constraint type
// via AST.
const symbol = type.getSymbol();
const decls = symbol?.getDeclarations();
const typeParamDecl = decls?.[0];
if (typeParamDecl != null &&
ts.isTypeParameterDeclaration(typeParamDecl) &&
typeParamDecl.constraint != null) {
return getTypeName(typeChecker, typeChecker.getTypeFromTypeNode(typeParamDecl.constraint));
}
}
// If the type is a union and all types in the union are string like,
// return `string`. For example:
// - `"a" | "b"` is string.
// - `string | string[]` is not string.
if (type.isUnion() &&
type.types
.map(value => getTypeName(typeChecker, value))
.every(t => t === 'string')) {
return 'string';
}
// If the type is an intersection and a type in the intersection is string
// like, return `string`. For example: `string & {__htmlEscaped: void}`
if (type.isIntersection() &&
type.types
.map(value => getTypeName(typeChecker, value))
.some(t => t === 'string')) {
return 'string';
}
return typeChecker.typeToString(type);
}
@@ -0,0 +1,88 @@
# clsx [![CI](https://github.com/lukeed/clsx/workflows/CI/badge.svg)](https://github.com/lukeed/clsx/actions?query=workflow%3ACI) [![codecov](https://badgen.net/codecov/c/github/lukeed/clsx)](https://codecov.io/gh/lukeed/clsx)
> A tiny (228B) utility for constructing `className` strings conditionally.<Br>Also serves as a [faster](/bench) & smaller drop-in replacement for the `classnames` module.
This module is available in three formats:
* **ES Module**: `dist/clsx.m.js`
* **CommonJS**: `dist/clsx.js`
* **UMD**: `dist/clsx.min.js`
## Install
```
$ npm install --save clsx
```
## Usage
```js
import clsx from 'clsx';
// or
import { clsx } from 'clsx';
// Strings (variadic)
clsx('foo', true && 'bar', 'baz');
//=> 'foo bar baz'
// Objects
clsx({ foo:true, bar:false, baz:isTrue() });
//=> 'foo baz'
// Objects (variadic)
clsx({ foo:true }, { bar:false }, null, { '--foobar':'hello' });
//=> 'foo --foobar'
// Arrays
clsx(['foo', 0, false, 'bar']);
//=> 'foo bar'
// Arrays (variadic)
clsx(['foo'], ['', 0, false, 'bar'], [['baz', [['hello'], 'there']]]);
//=> 'foo bar baz hello there'
// Kitchen sink (with nesting)
clsx('foo', [1 && 'bar', { baz:false, bat:null }, ['hello', ['world']]], 'cya');
//=> 'foo bar hello world cya'
```
## API
### clsx(...input)
Returns: `String`
#### input
Type: `Mixed`
The `clsx` function can take ***any*** number of arguments, each of which can be an Object, Array, Boolean, or String.
> **Important:** _Any_ falsey values are discarded!<br>Standalone Boolean values are discarded as well.
```js
clsx(true, false, '', null, undefined, 0, NaN);
//=> ''
```
## Benchmarks
For snapshots of cross-browser results, check out the [`bench`](/bench) directory~!
## Support
All versions of Node.js are supported.
All browsers that support [`Array.isArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray#Browser_compatibility) are supported (IE9+).
>**Note:** For IE8 support and older, please install `clsx@1.0.x` and beware of [#17](https://github.com/lukeed/clsx/issues/17).
## Related
- [obj-str](https://github.com/lukeed/obj-str) - A smaller (96B) and similiar utility that only works with Objects.
## License
MIT © [Luke Edwards](https://lukeed.com)
@@ -0,0 +1,12 @@
import type { SchemaOptions } from '../schema/index.mjs';
import type { Ensure, Evaluate } from '../helpers/index.mjs';
import type { TProperties } from '../object/index.mjs';
import { type TMappedResult } from '../mapped/index.mjs';
import { type TRequired } from './required.mjs';
type TFromProperties<P extends TProperties> = ({
[K2 in keyof P]: TRequired<P[K2]>;
});
type TFromMappedResult<R extends TMappedResult> = (Evaluate<TFromProperties<R['properties']>>);
export type TRequiredFromMappedResult<R extends TMappedResult, P extends TProperties = TFromMappedResult<R>> = (Ensure<TMappedResult<P>>);
export declare function RequiredFromMappedResult<R extends TMappedResult, P extends TProperties = TFromMappedResult<R>>(R: R, options?: SchemaOptions): TMappedResult<P>;
export {};
Loaded 100 of 35554 files, more files were not shown because too many files have changed in this diff. Show more