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,6 @@
export { AbortError, EndOfStreamError } from './Errors.js';
export { StreamReader } from './StreamReader.js';
export { WebStreamByobReader } from './WebStreamByobReader.js';
export { WebStreamDefaultReader } from './WebStreamDefaultReader.js';
export type { IStreamReader } from './AbstractStreamReader.js';
export { type AnyWebByteStream, makeWebStreamReader } from './WebStreamReaderFactory.js';
@@ -0,0 +1,12 @@
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _isBrowser = _interopRequireDefault(require("./isBrowser"));
var _useEffectWithTarget = _interopRequireDefault(require("./useEffectWithTarget"));
var _useLayoutEffectWithTarget = _interopRequireDefault(require("./useLayoutEffectWithTarget"));
var useIsomorphicLayoutEffectWithTarget = _isBrowser["default"] ? _useLayoutEffectWithTarget["default"] : _useEffectWithTarget["default"];
var _default = exports["default"] = useIsomorphicLayoutEffectWithTarget;
@@ -0,0 +1,6 @@
"use client";
import { createContext } from 'react';
const MotionContext = /* @__PURE__ */ createContext({});
export { MotionContext };
@@ -0,0 +1,28 @@
'use strict';
require('../auto');
var test = require('tape');
var defineProperties = require('define-properties');
var isEnumerable = Object.prototype.propertyIsEnumerable;
var functionsHaveNames = require('functions-have-names')();
var runTests = require('./tests');
test('shimmed', function (t) {
t.equal(Reflect.getPrototypeOf.length, 1, 'Reflect.getPrototypeOf has length of 1');
t.test('Function name', { skip: !functionsHaveNames }, function (st) {
st.equal(Reflect.getPrototypeOf.name, 'getPrototypeOf', 'Reflect.getPrototypeOf has name "getPrototypeOf"');
st.end();
});
t.test('enumerability', { skip: !defineProperties.supportsDescriptors }, function (et) {
et.equal(false, isEnumerable.call(Reflect, 'getPrototypeOf'), 'Reflect.getPrototypeOf is not enumerable');
et.end();
});
runTests(Reflect.getPrototypeOf, t);
t.end();
});
@@ -0,0 +1,68 @@
"use client";
"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/hooks/index.ts
var hooks_exports = {};
__export(hooks_exports, {
useInputLabelPlacement: () => useInputLabelPlacement,
useLabelPlacement: () => useLabelPlacement
});
module.exports = __toCommonJS(hooks_exports);
// src/hooks/use-label-placement.ts
var import_react = require("react");
// src/provider-context.ts
var import_react_utils = require("@heroui/react-utils");
var [ProviderContext, useProviderContext] = (0, import_react_utils.createContext)({
name: "ProviderContext",
strict: false
});
// src/hooks/use-label-placement.ts
function useLabelPlacement(props) {
const globalContext = useProviderContext();
const globalLabelPlacement = globalContext == null ? void 0 : globalContext.labelPlacement;
return (0, import_react.useMemo)(() => {
var _a, _b;
const labelPlacement = (_b = (_a = props.labelPlacement) != null ? _a : globalLabelPlacement) != null ? _b : "inside";
if (labelPlacement === "inside" && !props.label) {
return "outside";
}
return labelPlacement;
}, [props.labelPlacement, globalLabelPlacement, props.label]);
}
function useInputLabelPlacement(props) {
const globalContext = useProviderContext();
const globalLabelPlacement = globalContext == null ? void 0 : globalContext.labelPlacement;
return (0, import_react.useMemo)(() => {
var _a, _b;
const labelPlacement = (_b = (_a = props.labelPlacement) != null ? _a : globalLabelPlacement) != null ? _b : "inside";
if (labelPlacement === "inside" && !props.label) {
return "outside";
}
return labelPlacement;
}, [props.labelPlacement, globalLabelPlacement, props.label]);
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
useInputLabelPlacement,
useLabelPlacement
});
@@ -0,0 +1 @@
{"version":3,"file":"InjectFromBaseOptionsLifecycle.js","sourceRoot":"","sources":["../../../../src/metadata/models/InjectFromBaseOptionsLifecycle.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('next', require('../next'), require('./_falseOptions'));
func.placeholder = require('./placeholder');
module.exports = func;
@@ -0,0 +1,23 @@
name: Build Status
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
strategy:
matrix:
node-version: [lts/*]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm test
@@ -0,0 +1,36 @@
import { GetPacketStatusDepends } from '../../action/packet/GetPacketStatus';
import { Static } from '@sinclair/typebox';
export declare const GetRkeyServerReturnSchema: import("@sinclair/typebox").TObject<{
private_rkey: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
group_rkey: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
expired_time: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
name: import("@sinclair/typebox").TString;
}>;
export type GetRkeyServerReturn = Static<typeof GetRkeyServerReturnSchema>;
export declare class GetRkeyServer extends GetPacketStatusDepends<void, GetRkeyServerReturn> {
actionName: "get_rkey_server";
actionSummary: string;
actionTags: string[];
payloadExample: {};
returnExample: {
private_rkey: string;
group_rkey: string;
expired_time: number;
name: string;
};
payloadSchema: import("@sinclair/typebox").TObject<{}>;
returnSchema: import("@sinclair/typebox").TObject<{
private_rkey: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
group_rkey: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
expired_time: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
name: import("@sinclair/typebox").TString;
}>;
private rkeyCache;
private expiryTime;
_handle(): Promise<{
private_rkey?: string | undefined;
group_rkey?: string | undefined;
expired_time?: number | undefined;
name: string;
}>;
}
@@ -0,0 +1,139 @@
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _tslib = require("tslib");
var _react = require("react");
var _useEventListener = _interopRequireDefault(require("../useEventListener"));
var _useLatest = _interopRequireDefault(require("../useLatest"));
var _useMemoizedFn = _interopRequireDefault(require("../useMemoizedFn"));
var _useSize = _interopRequireDefault(require("../useSize"));
var _domTarget = require("../utils/domTarget");
var _utils = require("../utils");
var _useUpdateEffect = _interopRequireDefault(require("../useUpdateEffect"));
var useVirtualList = function useVirtualList(list, options) {
var containerTarget = options.containerTarget,
wrapperTarget = options.wrapperTarget,
itemHeight = options.itemHeight,
_a = options.overscan,
overscan = _a === void 0 ? 5 : _a;
var itemHeightRef = (0, _useLatest["default"])(itemHeight);
var size = (0, _useSize["default"])(containerTarget);
var scrollTriggerByScrollToFunc = (0, _react.useRef)(false);
var _b = (0, _tslib.__read)((0, _react.useState)([]), 2),
targetList = _b[0],
setTargetList = _b[1];
var _c = (0, _tslib.__read)((0, _react.useState)({}), 2),
wrapperStyle = _c[0],
setWrapperStyle = _c[1];
var getVisibleCount = function getVisibleCount(containerHeight, fromIndex) {
if ((0, _utils.isNumber)(itemHeightRef.current)) {
return Math.ceil(containerHeight / itemHeightRef.current);
}
var sum = 0;
var endIndex = 0;
for (var i = fromIndex; i < list.length; i++) {
var height = itemHeightRef.current(i, list[i]);
sum += height;
endIndex = i;
if (sum >= containerHeight) {
break;
}
}
return endIndex - fromIndex;
};
var getOffset = function getOffset(scrollTop) {
if ((0, _utils.isNumber)(itemHeightRef.current)) {
return Math.floor(scrollTop / itemHeightRef.current);
}
var sum = 0;
var offset = 0;
for (var i = 0; i < list.length; i++) {
var height = itemHeightRef.current(i, list[i]);
sum += height;
if (sum >= scrollTop) {
offset = i;
break;
}
}
return offset + 1;
};
// 获取上部高度
var getDistanceTop = function getDistanceTop(index) {
if ((0, _utils.isNumber)(itemHeightRef.current)) {
var height_1 = index * itemHeightRef.current;
return height_1;
}
var height = list.slice(0, index).reduce(function (sum, _, i) {
return sum + itemHeightRef.current(i, list[i]);
}, 0);
return height;
};
var totalHeight = (0, _react.useMemo)(function () {
if ((0, _utils.isNumber)(itemHeightRef.current)) {
return list.length * itemHeightRef.current;
}
return list.reduce(function (sum, _, index) {
return sum + itemHeightRef.current(index, list[index]);
}, 0);
}, [list]);
var calculateRange = function calculateRange() {
var container = (0, _domTarget.getTargetElement)(containerTarget);
if (container) {
var scrollTop = container.scrollTop,
clientHeight = container.clientHeight;
var offset = getOffset(scrollTop);
var visibleCount = getVisibleCount(clientHeight, offset);
var start_1 = Math.max(0, offset - overscan);
var end = Math.min(list.length, offset + visibleCount + overscan);
var offsetTop = getDistanceTop(start_1);
setWrapperStyle({
height: totalHeight - offsetTop + 'px',
marginTop: offsetTop + 'px'
});
setTargetList(list.slice(start_1, end).map(function (ele, index) {
return {
data: ele,
index: index + start_1
};
}));
}
};
(0, _useUpdateEffect["default"])(function () {
var wrapper = (0, _domTarget.getTargetElement)(wrapperTarget);
if (wrapper) {
Object.keys(wrapperStyle).forEach(function (key) {
return wrapper.style[key] = wrapperStyle[key];
});
}
}, [wrapperStyle]);
(0, _react.useEffect)(function () {
if (!(size === null || size === void 0 ? void 0 : size.width) || !(size === null || size === void 0 ? void 0 : size.height)) {
return;
}
calculateRange();
}, [size === null || size === void 0 ? void 0 : size.width, size === null || size === void 0 ? void 0 : size.height, list]);
(0, _useEventListener["default"])('scroll', function (e) {
if (scrollTriggerByScrollToFunc.current) {
scrollTriggerByScrollToFunc.current = false;
return;
}
e.preventDefault();
calculateRange();
}, {
target: containerTarget
});
var scrollTo = function scrollTo(index) {
var container = (0, _domTarget.getTargetElement)(containerTarget);
if (container) {
scrollTriggerByScrollToFunc.current = true;
container.scrollTop = getDistanceTop(index);
calculateRange();
}
};
return [targetList, (0, _useMemoizedFn["default"])(scrollTo)];
};
var _default = exports["default"] = useVirtualList;
@@ -0,0 +1,116 @@
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
import {DOMAttributes, Key, KeyboardDelegate} from '@react-types/shared';
import {KeyboardEvent, useRef} from 'react';
import {MultipleSelectionManager} from '@react-stately/selection';
/**
* Controls how long to wait before clearing the typeahead buffer.
*/
const TYPEAHEAD_DEBOUNCE_WAIT_MS = 1000; // 1 second
export interface AriaTypeSelectOptions {
/**
* A delegate that returns collection item keys with respect to visual layout.
*/
keyboardDelegate: KeyboardDelegate,
/**
* An interface for reading and updating multiple selection state.
*/
selectionManager: MultipleSelectionManager,
/**
* Called when an item is focused by typing.
*/
onTypeSelect?: (key: Key) => void
}
export interface TypeSelectAria {
/**
* Props to be spread on the owner of the options.
*/
typeSelectProps: DOMAttributes
}
/**
* Handles typeahead interactions with collections.
*/
export function useTypeSelect(options: AriaTypeSelectOptions): TypeSelectAria {
let {keyboardDelegate, selectionManager, onTypeSelect} = options;
let state = useRef<{search: string, timeout: ReturnType<typeof setTimeout> | undefined}>({
search: '',
timeout: undefined
}).current;
let onKeyDown = (e: KeyboardEvent) => {
let character = getStringForKey(e.key);
if (!character || e.ctrlKey || e.metaKey || !e.currentTarget.contains(e.target as HTMLElement)) {
return;
}
// Do not propagate the Spacebar event if it's meant to be part of the search.
// When we time out, the search term becomes empty, hence the check on length.
// Trimming is to account for the case of pressing the Spacebar more than once,
// which should cycle through the selection/deselection of the focused item.
if (character === ' ' && state.search.trim().length > 0) {
e.preventDefault();
if (!('continuePropagation' in e)) {
e.stopPropagation();
}
}
state.search += character;
if (keyboardDelegate.getKeyForSearch != null) {
// Use the delegate to find a key to focus.
// Prioritize items after the currently focused item, falling back to searching the whole list.
let key = keyboardDelegate.getKeyForSearch(state.search, selectionManager.focusedKey);
// If no key found, search from the top.
if (key == null) {
key = keyboardDelegate.getKeyForSearch(state.search);
}
if (key != null) {
selectionManager.setFocusedKey(key);
if (onTypeSelect) {
onTypeSelect(key);
}
}
}
clearTimeout(state.timeout);
state.timeout = setTimeout(() => {
state.search = '';
}, TYPEAHEAD_DEBOUNCE_WAIT_MS);
};
return {
typeSelectProps: {
// Using a capturing listener to catch the keydown event before
// other hooks in order to handle the Spacebar event.
onKeyDownCapture: keyboardDelegate.getKeyForSearch ? onKeyDown : undefined
}
};
}
function getStringForKey(key: string) {
// If the key is of length 1, it is an ASCII value.
// Otherwise, if there are no ASCII characters in the key name,
// it is a Unicode character.
// See https://www.w3.org/TR/uievents-key/
if (key.length === 1 || !/^[A-Z]/i.test(key)) {
return key;
}
return '';
}
@@ -0,0 +1 @@
{"version":3,"file":"script.js","names":["Inline","Script","blotName","tagName","create","value","document","createElement","formats","domNode","undefined"],"sources":["../../src/formats/script.ts"],"sourcesContent":["import Inline from '../blots/inline.js';\n\nclass Script extends Inline {\n static blotName = 'script';\n static tagName = ['SUB', 'SUP'];\n\n static create(value: 'super' | 'sub' | (string & {})) {\n if (value === 'super') {\n return document.createElement('sup');\n }\n if (value === 'sub') {\n return document.createElement('sub');\n }\n return super.create(value);\n }\n\n static formats(domNode: HTMLElement) {\n if (domNode.tagName === 'SUB') return 'sub';\n if (domNode.tagName === 'SUP') return 'super';\n return undefined;\n }\n}\n\nexport default Script;\n"],"mappings":"AAAA,OAAOA,MAAM,MAAM,oBAAoB;AAEvC,MAAMC,MAAM,SAASD,MAAM,CAAC;EAC1B,OAAOE,QAAQ,GAAG,QAAQ;EAC1B,OAAOC,OAAO,GAAG,CAAC,KAAK,EAAE,KAAK,CAAC;EAE/B,OAAOC,MAAMA,CAACC,KAAsC,EAAE;IACpD,IAAIA,KAAK,KAAK,OAAO,EAAE;MACrB,OAAOC,QAAQ,CAACC,aAAa,CAAC,KAAK,CAAC;IACtC;IACA,IAAIF,KAAK,KAAK,KAAK,EAAE;MACnB,OAAOC,QAAQ,CAACC,aAAa,CAAC,KAAK,CAAC;IACtC;IACA,OAAO,KAAK,CAACH,MAAM,CAACC,KAAK,CAAC;EAC5B;EAEA,OAAOG,OAAOA,CAACC,OAAoB,EAAE;IACnC,IAAIA,OAAO,CAACN,OAAO,KAAK,KAAK,EAAE,OAAO,KAAK;IAC3C,IAAIM,OAAO,CAACN,OAAO,KAAK,KAAK,EAAE,OAAO,OAAO;IAC7C,OAAOO,SAAS;EAClB;AACF;AAEA,eAAeT,MAAM","ignoreList":[]}
@@ -0,0 +1,56 @@
/*! *****************************************************************************
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"/>
declare namespace Intl {
interface NumberFormatOptionsUseGroupingRegistry {
min2: never;
auto: never;
always: never;
}
interface NumberFormatOptionsSignDisplayRegistry {
negative: never;
}
interface NumberFormatOptions {
roundingPriority?: "auto" | "morePrecision" | "lessPrecision" | undefined;
roundingIncrement?: 1 | 2 | 5 | 10 | 20 | 25 | 50 | 100 | 200 | 250 | 500 | 1000 | 2000 | 2500 | 5000 | undefined;
roundingMode?: "ceil" | "floor" | "expand" | "trunc" | "halfCeil" | "halfFloor" | "halfExpand" | "halfTrunc" | "halfEven" | undefined;
trailingZeroDisplay?: "auto" | "stripIfInteger" | undefined;
}
interface ResolvedNumberFormatOptions {
roundingPriority: "auto" | "morePrecision" | "lessPrecision";
roundingMode: "ceil" | "floor" | "expand" | "trunc" | "halfCeil" | "halfFloor" | "halfExpand" | "halfTrunc" | "halfEven";
roundingIncrement: 1 | 2 | 5 | 10 | 20 | 25 | 50 | 100 | 200 | 250 | 500 | 1000 | 2000 | 2500 | 5000;
trailingZeroDisplay: "auto" | "stripIfInteger";
}
interface NumberRangeFormatPart extends NumberFormatPart {
source: "startRange" | "endRange" | "shared";
}
type StringNumericLiteral = `${number}` | "Infinity" | "-Infinity" | "+Infinity";
interface NumberFormat {
format(value: number | bigint | StringNumericLiteral): string;
formatToParts(value: number | bigint | StringNumericLiteral): NumberFormatPart[];
formatRange(start: number | bigint | StringNumericLiteral, end: number | bigint | StringNumericLiteral): string;
formatRangeToParts(start: number | bigint | StringNumericLiteral, end: number | bigint | StringNumericLiteral): NumberRangeFormatPart[];
}
}
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2016 EduardoRFS
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
@@ -0,0 +1,15 @@
'use strict';
/**
* Creates a new URL by combining the specified URLs
*
* @param {string} baseURL The base URL
* @param {string} relativeURL The relative URL
*
* @returns {string} The combined URL
*/
export default function combineURLs(baseURL, relativeURL) {
return relativeURL
? baseURL.replace(/\/?\/$/, '') + '/' + relativeURL.replace(/^\/+/, '')
: baseURL;
}
@@ -0,0 +1,106 @@
import { decodeAuthenticatorExtensions, } from './decodeAuthenticatorExtensions.js';
import { isoCBOR, isoUint8Array } from './iso/index.js';
/**
* Make sense of the authData buffer contained in an Attestation
*/
export function parseAuthenticatorData(authData) {
if (authData.byteLength < 37) {
throw new Error(`Authenticator data was ${authData.byteLength} bytes, expected at least 37 bytes`);
}
let pointer = 0;
const dataView = isoUint8Array.toDataView(authData);
const rpIdHash = authData.slice(pointer, pointer += 32);
const flagsBuf = authData.slice(pointer, pointer += 1);
const flagsInt = flagsBuf[0];
// Bit positions can be referenced here:
// https://www.w3.org/TR/webauthn-2/#flags
const flags = {
up: !!(flagsInt & (1 << 0)), // User Presence
uv: !!(flagsInt & (1 << 2)), // User Verified
be: !!(flagsInt & (1 << 3)), // Backup Eligibility
bs: !!(flagsInt & (1 << 4)), // Backup State
at: !!(flagsInt & (1 << 6)), // Attested Credential Data Present
ed: !!(flagsInt & (1 << 7)), // Extension Data Present
flagsInt,
};
const counterBuf = authData.slice(pointer, pointer + 4);
const counter = dataView.getUint32(pointer, false);
pointer += 4;
let aaguid = undefined;
let credentialID = undefined;
let credentialPublicKey = undefined;
if (flags.at) {
aaguid = authData.slice(pointer, pointer += 16);
const credIDLen = dataView.getUint16(pointer);
pointer += 2;
credentialID = authData.slice(pointer, pointer += credIDLen);
/**
* Firefox 117 incorrectly CBOR-encodes authData when EdDSA (-8) is used for the public key.
* A CBOR "Map of 3 items" (0xa3) should be "Map of 4 items" (0xa4), and if we manually adjust
* the single byte there's a good chance the authData can be correctly parsed.
*
* This browser release also incorrectly uses the string labels "OKP" and "Ed25519" instead of
* their integer representations for kty and crv respectively. That's why the COSE public key
* in the hex below looks so odd.
*/
// Bytes decode to `{ 1: "OKP", 3: -8, -1: "Ed25519" }` (it's missing key -2 a.k.a. COSEKEYS.x)
const badEdDSACBOR = isoUint8Array.fromHex('a301634f4b500327206745643235353139');
const bytesAtCurrentPosition = authData.slice(pointer, pointer + badEdDSACBOR.byteLength);
let foundBadCBOR = false;
if (isoUint8Array.areEqual(badEdDSACBOR, bytesAtCurrentPosition)) {
// Change the bad CBOR 0xa3 to 0xa4 so that the credential public key can be recognized
foundBadCBOR = true;
authData[pointer] = 0xa4;
}
// Decode the next CBOR item in the buffer, then re-encode it back to a Buffer
const firstDecoded = isoCBOR.decodeFirst(authData.slice(pointer));
const firstEncoded = Uint8Array.from(
/**
* Casting to `Map` via `as unknown` here because TS doesn't make it possible to define Maps
* with discrete keys and properties with known types per pair, and CBOR libs typically parse
* CBOR Major Type 5 to `Map` because you can have numbers for keys. A `COSEPublicKey` can be
* generalized as "a Map with numbers for keys and either numbers or bytes for values" though.
* If this presumption falls apart then other parts of verification later on will fail so we
* should be safe doing this here.
*/
isoCBOR.encode(firstDecoded));
if (foundBadCBOR) {
// Restore the bit we changed so that `authData` is the same as it came in and won't break
// signature verification.
authData[pointer] = 0xa3;
}
credentialPublicKey = firstEncoded;
pointer += firstEncoded.byteLength;
}
let extensionsData = undefined;
let extensionsDataBuffer = undefined;
if (flags.ed) {
const firstDecoded = isoCBOR.decodeFirst(authData.slice(pointer));
extensionsDataBuffer = Uint8Array.from(isoCBOR.encode(firstDecoded));
extensionsData = decodeAuthenticatorExtensions(extensionsDataBuffer);
pointer += extensionsDataBuffer.byteLength;
}
// Pointer should be at the end of the authenticator data, otherwise too much data was sent
if (authData.byteLength > pointer) {
throw new Error('Leftover bytes detected while parsing authenticator data');
}
return _parseAuthenticatorDataInternals.stubThis({
rpIdHash,
flagsBuf,
flags,
counter,
counterBuf,
aaguid,
credentialID,
credentialPublicKey,
extensionsData,
extensionsDataBuffer,
});
}
/**
* Make it possible to stub the return value during testing
* @ignore Don't include this in docs output
*/
export const _parseAuthenticatorDataInternals = {
stubThis: (value) => value,
};
@@ -0,0 +1,5 @@
export declare function importKey(opts: {
keyData: JsonWebKey;
algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams;
}): Promise<CryptoKey>;
//# sourceMappingURL=importKey.d.ts.map
@@ -0,0 +1,38 @@
// Thai [th]
import dayjs from '../index';
var locale = {
name: 'th',
weekdays: 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์'.split('_'),
weekdaysShort: 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์'.split('_'),
weekdaysMin: 'อา._จ._อ._พ._พฤ._ศ._ส.'.split('_'),
months: 'มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม'.split('_'),
monthsShort: 'ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.'.split('_'),
formats: {
LT: 'H:mm',
LTS: 'H:mm:ss',
L: 'DD/MM/YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY เวลา H:mm',
LLLL: 'วันddddที่ D MMMM YYYY เวลา H:mm'
},
relativeTime: {
future: 'อีก %s',
past: '%sที่แล้ว',
s: 'ไม่กี่วินาที',
m: '1 นาที',
mm: '%d นาที',
h: '1 ชั่วโมง',
hh: '%d ชั่วโมง',
d: '1 วัน',
dd: '%d วัน',
M: '1 เดือน',
MM: '%d เดือน',
y: '1 ปี',
yy: '%d ปี'
},
ordinal: function ordinal(n) {
return n + ".";
}
};
dayjs.locale(locale, null, true);
export default locale;
@@ -0,0 +1,40 @@
{
"name": "motion-dom",
"version": "12.23.23",
"author": "Matt Perry",
"license": "MIT",
"repository": "https://github.com/motiondivision/motion",
"main": "./dist/cjs/index.js",
"types": "./dist/index.d.ts",
"module": "./dist/es/index.mjs",
"sideEffects": false,
"exports": {
".": {
"types": "./dist/index.d.ts",
"require": "./dist/cjs/index.js",
"import": "./dist/es/index.mjs",
"default": "./dist/cjs/index.js"
}
},
"dependencies": {
"motion-utils": "^12.23.6"
},
"scripts": {
"clean": "rm -rf types dist lib",
"build": "yarn clean && tsc -p . && rollup -c && node ./scripts/check-bundle.js",
"dev": "concurrently -c blue,red -n tsc,rollup --kill-others \"tsc --watch -p . --preserveWatchOutput\" \"rollup --config --watch --no-watch.clearScreen\"",
"test": "jest --config jest.config.json --max-workers=2",
"measure": "rollup -c ./rollup.size.config.mjs"
},
"bundlesize": [
{
"path": "./dist/size-rollup-style-effect.js",
"maxSize": "2.9 kB"
},
{
"path": "./dist/size-rollup-motion-value.js",
"maxSize": "1.8 kB"
}
],
"gitHead": "237eee22464039152dd3acf122496503b3f3a5da"
}
@@ -0,0 +1,6 @@
[![Test coverage](https://codecov.io/gh/inversify/monorepo/branch/main/graph/badge.svg?flag=%40inversifyjs%2Fcommon)](https://codecov.io/gh/inversify/monorepo/branch/main/graph/badge.svg?flag=%40inversifyjs%2Fcommon)
[![npm version](https://img.shields.io/github/package-json/v/inversify/monorepo?filename=packages%2Fcontainer%2Flibraries%2Fcommon%2Fpackage.json&style=plastic)](https://www.npmjs.com/package/@inversifyjs/common)
# @inversifyjs/common
Inversify monorepo common modules.
@@ -0,0 +1 @@
{"version":3,"file":"resolveResolvedValueBindingNode.d.ts","sourceRoot":"","sources":["../../../../src/resolution/actions/resolveResolvedValueBindingNode.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,wBAAwB,EAAE,MAAM,gDAAgD,CAAC;AAC1F,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE9C,wBAAgB,+BAA+B,CAC7C,UAAU,EACV,QAAQ,SACN,oBAAoB,CAAC,UAAU,CAAC,GAAG,oBAAoB,CAAC,UAAU,CAAC,EAErE,iCAAiC,EAAE,CACjC,MAAM,EAAE,gBAAgB,EACxB,IAAI,EAAE,wBAAwB,CAAC,QAAQ,CAAC,KACrC,OAAO,EAAE,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC,GAClC,CACD,MAAM,EAAE,gBAAgB,EACxB,IAAI,EAAE,wBAAwB,CAAC,QAAQ,CAAC,KACrC,QAAQ,CAAC,UAAU,CAAC,CAiBxB"}
@@ -0,0 +1 @@
module.exports={A:{A:{"1":"A B","2":"K D E F 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 ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC","2":"J"},E:{"1":"K D E F A B C L M G 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 2C ZC","4":"ZB 3C"},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 uC JD OC","2":"F B FD GD HD ID NC"},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","4":"vC"},H:{"2":"hD"},I:{"1":"I jD kD vC mD nD","2":"TC J iD lD"},J:{"1":"D A"},K:{"1":"C H NC uC OC","2":"A B"},L:{"1":"I"},M:{"1":"MC"},N:{"1":"A B"},O:{"1":"PC"},P:{"1":"6 7 8 9 J AB BB CB DB EB FB oD pD qD rD sD aC tD uD vD wD xD QC RC SC yD"},Q:{"1":"zD"},R:{"1":"0D"},S:{"1":"1D 2D"}},B:1,C:"Session history management",D:true};
@@ -0,0 +1 @@
{"version":3,"file":"pendingClassMetadataCountReflectKey.js","sourceRoot":"","sources":["../../../../src/reflectMetadata/data/pendingClassMetadataCountReflectKey.ts"],"names":[],"mappings":";;;AAAa,QAAA,mCAAmC,GAC9C,uDAAuD,CAAC"}
@@ -0,0 +1,375 @@
flf2a 1 1 10 -1 16
B1FF by Joe Rumsey 12/94 based on Terminal by Glenn Chappell
Includes characters 128-255
figlet release 2.1 -- 12 Aug 1994
Permission is hereby given to modify this font, as long as the
modifier's name is placed on a comment line.
Explanation of first line:
flf2 - "magic number" for file identification
a - should always be `a', for now
 - the "hardblank" -- prints as a blank, but can't be smushed
1 - height of a character
1 - height of a character, not including descenders
10 - max line length (excluding comment lines) + a fudge factor
-1 - default smushmode for this font
16 - number of comment lines
@
!@
"@
#@
$@
%@
&@
'@
(@
)@
*@
+@
,@
-@
.@
/@
0@
1@
2@
3@
4@
5@
6@
7@
8@
9@
:@
;@
<@
=@
>@
?@
@#
/-\@
|3@
(@
|)@
3@
F@
6@
H@
1@
_/@
/<@
|_@
/\/\@
/\/@
0@
P@
Q@
R@
5@
T@
|_|@
\/@
\/\/@
X@
Y@
Z@
[@
\@
]@
^@
_@
`@
/-\@
|3@
(@
|)@
3@
F@
6@
H@
1@
_/@
/<@
|_@
/\/\@
/\/@
0@
P@
Q@
R@
5@
T@
|_|@
\/@
\/\/@
X@
Y@
Z@
{@
|@
}@
~@
願
淐
軹
裰
蠩
廹
稛
128
�@
129
�
130
�
131
�
132
�
133
�
134
�
135
䏰
136
㇀
137
𪎩
138
𧶄
139
𣏴
140
倻
141
𠮟
142
𣻗
143
蕋
144
趩
145
𥜆
146
𡏆
147
媁
148
銉
149
𦅜
150
桇
151
愌
152
𦴦
153
䄉
154
鋣
155
𡨭
156
嵛
157
𨆉
158
𠺢
159
籖
160
𨩚
161
 
162
\
163
w
164
一
165
世
166
共
167
作
168
杓
169
咖
170
昇
171
陂
172
拯
173
耐
174
哦
175
浬
176
虔
177
娼
178
毫
179
莆
180
婷
181
溉
182
詔
183
媳
184
睹
185
辟
186
愿
187
罰
188
劇
189
瑾
190
輥
191
濃
192
錐
193
瞧
194
駿
195
鞭
196
願
197
護
198
讖
199
す
200
Л
201
乂
202
汌
203
杙
204
坨
205
泒
206
哃
207
柜
208
穾
209
唊
210
毨
211
笄
212
酎
213
崰
214
淐
215
耞
216
釫
217
惲
218
湨
219
罦
220
軹
221
媷
222
毹
223
稛
224
觡
225
凘
226
榠
227
禗
228
裰
229
噚
230
澍
231
膞
232
踔
233
噳
234
澢
235
蕀
236
錋
237
檕
238
蕷
239
鞞
240
璸
241
蹛
242
徿
243
譑
244
嚵
245
鏼
246
蠩
247
糴
248
讌
249
纘
250
𠕇
251
𨦼
252
廹
253
𣑯
254
鑂
255
�@
@@ -0,0 +1 @@
{"name":"@tootallnate/once","version":"2.0.0","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532121876,"integrity":"sha512-x5H97Fda70mcQB+KhGNUmeveOvV7c6p5+y5T3S8/U0/+gnF6IAyuNncwkfNH9oQEr8fD87Xh9ni/sKQ+6u0KZQ==","mode":420,"size":1071},"dist/index.js":{"checkedAt":1794532121876,"integrity":"sha512-kDrgHXCO7DOBy0zLcJo6wv165lSLPvFBfJs374OwKULKJuilH429C7KIpGzrRf8t7045oVwMeOZywEwgskOAbA==","mode":420,"size":846},"dist/overloaded-parameters.js":{"checkedAt":1794532121876,"integrity":"sha512-vYdkkcCpiHxScWk2xD6ll0igCsBKc/jlSqcOpwhAX+prmi0g2IRIOj7T5o2T071gR/HC4k0MgzvoOY0hpW+RuA==","mode":420,"size":126},"dist/types.js":{"checkedAt":1794532121876,"integrity":"sha512-nhU68BdqPrnDQLwwwBa2/FQQRm6PTNXOCac/25gmXJN8MGd/us9Sb/dVXJPn2oVcihcP12eYp0aT4/28wYI4Cg==","mode":420,"size":110},"package.json":{"checkedAt":1794532121877,"integrity":"sha512-FXKvN4HTDGLMygLY88aBLJlWde/CM0RjlO5+KR/vbrmzju45qIfPT3ZXTSPtMqF5kh/dfZ1kAjnDW796CZsoHw==","mode":420,"size":1151},"dist/index.js.map":{"checkedAt":1794532121877,"integrity":"sha512-fd5bybS5aTv2n84SFgoC+jqxwD5k1OxMgcxWKGjwO6vxNK90OcF7oZ2Q84bE1IBPWiJEIyLipl+RjefSgoJfUg==","mode":420,"size":824},"dist/overloaded-parameters.js.map":{"checkedAt":1794532121877,"integrity":"sha512-wAtMIPYtJm4BdSlNNTqvITEsnqfyWAJYJWmjs5e+8Kw/ZMHdxocJ/jicAl1p+UQ9U3JKagxzOfrA7J+wFj0jhQ==","mode":420,"size":134},"dist/types.js.map":{"checkedAt":1794532121877,"integrity":"sha512-TF/b/T3nwqhwzvSQCv/dboeSHvr/1GLVyXJFcy8q00n5bdXOxGy8TtkQmE0+xkLfpv5k1PO4MlQwUgwQr0MEhQ==","mode":420,"size":102},"README.md":{"checkedAt":1794532121877,"integrity":"sha512-pgg4Z8IkoatOQbt6ev+pGeQWANvgwU9I9N/aXG5ZEv4/kHFfz0CzYOfL/YNFqx5svICxQxR1yajHoIO/mVhfWA==","mode":420,"size":2693},"dist/index.d.ts":{"checkedAt":1794532121877,"integrity":"sha512-92vlH//Fy8sdA1h01SEsKVTwKHmVaQVr7eivP4DPLXC2etOT0x8kmqL96scJUWdVNjGsdy9xqrcjOhYF2ZgBxw==","mode":420,"size":407},"dist/overloaded-parameters.d.ts":{"checkedAt":1794532121877,"integrity":"sha512-+kZM/Ey35RNTOJCSgeYOL/5C3ONNDxJ8jsI9keDNAi2PgGXp5+riSMdRKUqSLPSMjTn3LzaMyBbisXtjZ1YlJQ==","mode":420,"size":7853},"dist/types.d.ts":{"checkedAt":1794532121877,"integrity":"sha512-Ad6CBy0fTarKOhsGpQc9Z6gMeeeMA19D4Y5c2oCe6+x31eNbnFAKqJCihn0dj6EURaaX1l3V3jE9SbhZtMj7lQ==","mode":420,"size":1015}}}
@@ -0,0 +1,33 @@
'use strict';
var result = require('./')();
var test = {
__proto__: null,
foo: {}
};
var setter = require('dunder-proto/set');
/** @type {import('./mutator')} */
module.exports = function hasMutator() {
if (!result) {
return false;
}
var obj = { __proto__: test };
// @ts-expect-error: TS errors on an inherited property for some reason
if (obj.foo !== test.foo) {
return false;
}
if (!setter) {
return false;
}
setter(obj, null);
if ('foo' in obj || 'toString' in obj) {
return false;
}
return true;
};
@@ -0,0 +1,18 @@
"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 __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./not"), exports);
@@ -0,0 +1 @@
{"version":3,"file":"core.cjs.production.min.js","sources":["../src/components/DndMonitor/context.ts","../src/components/DndMonitor/useDndMonitor.ts","../src/components/Accessibility/defaults.ts","../src/components/Accessibility/Accessibility.tsx","../src/store/actions.ts","../src/utilities/other/noop.ts","../src/utilities/coordinates/constants.ts","../src/utilities/coordinates/distanceBetweenPoints.ts","../src/utilities/coordinates/getRelativeTransformOrigin.ts","../src/utilities/algorithms/helpers.ts","../src/utilities/algorithms/closestCenter.ts","../src/utilities/algorithms/rectIntersection.ts","../src/utilities/algorithms/pointerWithin.ts","../src/utilities/rect/getRectDelta.ts","../src/utilities/rect/rectAdjustment.ts","../src/utilities/transform/parseTransform.ts","../src/utilities/rect/getRect.ts","../src/utilities/transform/inverseTransform.ts","../src/utilities/scroll/getScrollableAncestors.ts","../src/utilities/scroll/isScrollable.ts","../src/utilities/scroll/isFixed.ts","../src/utilities/scroll/getScrollableElement.ts","../src/utilities/scroll/getScrollCoordinates.ts","../src/types/direction.ts","../src/utilities/scroll/documentScrollingElement.ts","../src/utilities/scroll/getScrollPosition.ts","../src/utilities/scroll/getScrollDirectionAndSpeed.ts","../src/utilities/scroll/getScrollElementRect.ts","../src/utilities/scroll/getScrollOffsets.ts","../src/utilities/scroll/scrollIntoViewIfNeeded.ts","../src/utilities/rect/Rect.ts","../src/sensors/utilities/Listeners.ts","../src/sensors/utilities/hasExceededDistance.ts","../src/sensors/events.ts","../src/sensors/keyboard/types.ts","../src/sensors/keyboard/defaults.ts","../src/sensors/keyboard/KeyboardSensor.ts","../src/sensors/pointer/AbstractPointerSensor.ts","../src/sensors/utilities/getEventListenerTarget.ts","../src/sensors/pointer/PointerSensor.ts","../src/sensors/mouse/MouseSensor.ts","../src/sensors/touch/TouchSensor.ts","../src/hooks/utilities/useAutoScroller.ts","../src/hooks/utilities/useDroppableMeasuring.ts","../src/hooks/utilities/useInitialValue.ts","../src/hooks/utilities/useResizeObserver.ts","../src/hooks/utilities/useRect.ts","../src/hooks/utilities/useMutationObserver.ts","../src/hooks/utilities/useScrollableAncestors.ts","../src/hooks/utilities/useScrollOffsetsDelta.ts","../src/hooks/utilities/useWindowRect.ts","../src/utilities/rect/getWindowClientRect.ts","../src/hooks/utilities/useRects.ts","../src/utilities/nodes/getMeasurableNode.ts","../src/components/DndContext/defaults.ts","../src/store/constructors.ts","../src/store/context.ts","../src/store/reducer.ts","../src/components/Accessibility/components/RestoreFocus.tsx","../src/modifiers/applyModifiers.ts","../src/components/DndContext/DndContext.tsx","../src/components/DndMonitor/useDndMonitorProvider.tsx","../src/components/DndContext/hooks/useMeasuringConfiguration.ts","../src/hooks/utilities/useCachedNode.ts","../src/hooks/utilities/useInitialRect.ts","../src/components/DndContext/hooks/useLayoutShiftScrollCompensation.ts","../src/hooks/utilities/useDragOverlayMeasuring.ts","../src/hooks/utilities/useRectDelta.ts","../src/hooks/utilities/useScrollOffsets.ts","../src/utilities/rect/adjustScale.ts","../src/hooks/utilities/useCombineActivators.ts","../src/hooks/utilities/useSensorSetup.ts","../src/hooks/useDraggable.ts","../src/hooks/useDndContext.ts","../src/hooks/useDroppable.ts","../src/components/DragOverlay/components/AnimationManager/AnimationManager.tsx","../src/components/DragOverlay/components/NullifiedContextProvider/NullifiedContextProvider.tsx","../src/components/DragOverlay/components/PositionedOverlay/PositionedOverlay.tsx","../src/components/DragOverlay/hooks/useDropAnimation.ts","../src/components/DragOverlay/hooks/useKey.ts","../src/components/DragOverlay/DragOverlay.tsx","../src/utilities/algorithms/closestCorners.ts","../src/hooks/utilities/useSyntheticListeners.ts","../src/sensors/useSensor.ts","../src/sensors/useSensors.ts"],"sourcesContent":["import {createContext} from 'react';\n\nimport type {RegisterListener} from './types';\n\nexport const DndMonitorContext = createContext<RegisterListener | null>(null);\n","import {useContext, useEffect} from 'react';\n\nimport {DndMonitorContext} from './context';\nimport type {DndMonitorListener} from './types';\n\nexport function useDndMonitor(listener: DndMonitorListener) {\n const registerListener = useContext(DndMonitorContext);\n\n useEffect(() => {\n if (!registerListener) {\n throw new Error(\n 'useDndMonitor must be used within a children of <DndContext>'\n );\n }\n\n const unsubscribe = registerListener(listener);\n\n return unsubscribe;\n }, [listener, registerListener]);\n}\n","import type {Announcements, ScreenReaderInstructions} from './types';\n\nexport const defaultScreenReaderInstructions: ScreenReaderInstructions = {\n draggable: `\n To pick up a draggable item, press the space bar.\n While dragging, use the arrow keys to move the item.\n Press space again Line truncated
@@ -0,0 +1,13 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.buildDefaultMaybeClassElementMetadata = buildDefaultMaybeClassElementMetadata;
const MaybeClassElementMetadataKind_1 = require("../models/MaybeClassElementMetadataKind");
function buildDefaultMaybeClassElementMetadata() {
return {
kind: MaybeClassElementMetadataKind_1.MaybeClassElementMetadataKind.unknown,
name: undefined,
optional: false,
tags: new Map(),
};
}
//# sourceMappingURL=buildDefaultMaybeClassElementMetadata.js.map
@@ -0,0 +1,15 @@
"use client";
import {
input_default
} from "./chunk-2QAN2V2R.mjs";
import {
textarea_default
} from "./chunk-YBZ5IULK.mjs";
import {
useInput
} from "./chunk-MSLIMGMJ.mjs";
export {
input_default as Input,
textarea_default as Textarea,
useInput
};
@@ -0,0 +1,217 @@
import type {
EnhancedStore,
Middleware,
Reducer,
Store,
UnknownAction,
} from '@reduxjs/toolkit'
import { configureStore } from '@reduxjs/toolkit'
import { setupListeners } from '@reduxjs/toolkit/query'
import { useCallback, useEffect, useRef } from 'react'
import { Provider } from 'react-redux'
import { act, cleanup } from '@testing-library/react'
export const ANY = 0 as any
export const DEFAULT_DELAY_MS = 150
export const getSerializedHeaders = (headers: Headers = new Headers()) => {
const result: Record<string, string> = {}
headers.forEach((val, key) => {
result[key] = val
})
return result
}
export async function waitMs(time = DEFAULT_DELAY_MS) {
const now = Date.now()
while (Date.now() < now + time) {
await new Promise((res) => process.nextTick(res))
}
}
export function waitForFakeTimer(time = DEFAULT_DELAY_MS) {
return new Promise((resolve) => setTimeout(resolve, time))
}
export function withProvider(store: Store<any>) {
return function Wrapper({ children }: any) {
return <Provider store={store}>{children}</Provider>
}
}
export const hookWaitFor = async (cb: () => void, time = 2000) => {
const startedAt = Date.now()
while (true) {
try {
cb()
return true
} catch (e) {
if (Date.now() > startedAt + time) {
throw e
}
await act(async () => {
await waitMs(2)
})
}
}
}
export const fakeTimerWaitFor = async (cb: () => void, time = 2000) => {
const startedAt = Date.now()
while (true) {
try {
cb()
return true
} catch (e) {
if (Date.now() > startedAt + time) {
throw e
}
await act(async () => {
await vi.advanceTimersByTimeAsync(2)
})
}
}
}
export const useRenderCounter = () => {
const countRef = useRef(0)
useEffect(() => {
countRef.current += 1
})
useEffect(() => {
return () => {
countRef.current = 0
}
}, [])
return useCallback(() => countRef.current, [])
}
expect.extend({
toMatchSequence(
_actions: UnknownAction[],
...matchers: Array<(arg: any) => boolean>
) {
const actions = _actions.concat()
actions.shift() // remove INIT
for (let i = 0; i < matchers.length; i++) {
if (!matchers[i](actions[i])) {
return {
message: () =>
`Action ${actions[i].type} does not match sequence at position ${i}.
All actions:
${actions.map((a) => a.type).join('\n')}`,
pass: false,
}
}
}
return {
message: () => `All actions match the sequence.`,
pass: true,
}
},
})
export const actionsReducer = {
actions: (state: UnknownAction[] = [], action: UnknownAction) => {
// As of 2.0-beta.4, we are going to ignore all `subscriptionsUpdated` actions in tests
if (action.type.includes('subscriptionsUpdated')) {
return state
}
return [...state, action]
},
}
export function setupApiStore<
A extends {
reducerPath: 'api'
reducer: Reducer<any, any>
middleware: Middleware
util: { resetApiState(): any }
},
R extends Record<string, Reducer<any, any>> = Record<never, never>,
>(
api: A,
extraReducers?: R,
options: {
withoutListeners?: boolean
withoutTestLifecycles?: boolean
middleware?: {
prepend?: Middleware[]
concat?: Middleware[]
}
} = {},
) {
const { middleware } = options
const getStore = () =>
configureStore({
reducer: { api: api.reducer, ...extraReducers },
middleware: (gdm) => {
const tempMiddleware = gdm({
serializableCheck: false,
immutableCheck: false,
}).concat(api.middleware)
return tempMiddleware
.concat(middleware?.concat ?? [])
.prepend(middleware?.prepend ?? []) as typeof tempMiddleware
},
enhancers: (gde) =>
gde({
autoBatch: false,
}),
})
type State = {
api: ReturnType<A['reducer']>
} & {
[K in keyof R]: ReturnType<R[K]>
}
type StoreType = EnhancedStore<
{
api: ReturnType<A['reducer']>
} & {
[K in keyof R]: ReturnType<R[K]>
},
UnknownAction,
ReturnType<typeof getStore> extends EnhancedStore<any, any, infer M>
? M
: never
>
const initialStore = getStore() as StoreType
const refObj = {
api,
store: initialStore,
wrapper: withProvider(initialStore),
}
let cleanupListeners: () => void
if (!options.withoutTestLifecycles) {
beforeEach(() => {
const store = getStore() as StoreType
refObj.store = store
refObj.wrapper = withProvider(store)
if (!options.withoutListeners) {
cleanupListeners = setupListeners(store.dispatch)
}
})
afterEach(() => {
cleanup()
if (!options.withoutListeners) {
cleanupListeners()
}
refObj.store.dispatch(api.util.resetApiState())
})
}
return refObj
}
@@ -0,0 +1,91 @@
import type { Action, AnyAction, Middleware } from 'redux'
/**
* The dispatch method as modified by React-Thunk; overloaded so that you can
* dispatch:
* - standard (object) actions: `dispatch()` returns the action itself
* - thunk actions: `dispatch()` returns the thunk's return value
*
* @template State The redux state
* @template ExtraThunkArg The extra argument passed to the inner function of
* thunks (if specified when setting up the Thunk middleware)
* @template BasicAction The (non-thunk) actions that can be dispatched.
*/
export interface ThunkDispatch<
State,
ExtraThunkArg,
BasicAction extends Action
> {
// When the thunk middleware is added, `store.dispatch` now has three overloads (NOTE: the order here matters for correct behavior and is very fragile - do not reorder these!):
// 1) The specific thunk function overload
/** Accepts a thunk function, runs it, and returns whatever the thunk itself returns */
<ReturnType>(
thunkAction: ThunkAction<ReturnType, State, ExtraThunkArg, BasicAction>
): ReturnType
// 2) The base overload.
/** Accepts a standard action object, and returns that action object */
<Action extends BasicAction>(action: Action): Action
// 3) A union of the other two overloads. This overload exists to work around a problem
// with TS inference ( see https://github.com/microsoft/TypeScript/issues/14107 )
/** A union of the other two overloads for TS inference purposes */
<ReturnType, Action extends BasicAction>(
action: Action | ThunkAction<ReturnType, State, ExtraThunkArg, BasicAction>
): Action | ReturnType
}
/**
* A "thunk" action (a callback function that can be dispatched to the Redux
* store.)
*
* Also known as the "thunk inner function", when used with the typical pattern
* of an action creator function that returns a thunk action.
*
* @template ReturnType The return type of the thunk's inner function
* @template State The redux state
* @template ExtraThunkArg Optional extra argument passed to the inner function
* (if specified when setting up the Thunk middleware)
* @template BasicAction The (non-thunk) actions that can be dispatched.
*/
export type ThunkAction<
ReturnType,
State,
ExtraThunkArg,
BasicAction extends Action
> = (
dispatch: ThunkDispatch<State, ExtraThunkArg, BasicAction>,
getState: () => State,
extraArgument: ExtraThunkArg
) => ReturnType
/**
* A generic type that takes a thunk action creator and returns a function
* signature which matches how it would appear after being processed using
* bindActionCreators(): a function that takes the arguments of the outer
* function, and returns the return type of the inner "thunk" function.
*
* @template ActionCreator Thunk action creator to be wrapped
*/
export type ThunkActionDispatch<
ActionCreator extends (...args: any[]) => ThunkAction<any, any, any, any>
> = (
...args: Parameters<ActionCreator>
) => ReturnType<ReturnType<ActionCreator>>
/**
* @template State The redux state
* @template BasicAction The (non-thunk) actions that can be dispatched
* @template ExtraThunkArg An optional extra argument to pass to a thunk's
* inner function. (Only used if you call `withExtraArgument()`)
*/
export type ThunkMiddleware<
State = any,
BasicAction extends Action = AnyAction,
ExtraThunkArg = undefined
> = Middleware<
ThunkDispatch<State, ExtraThunkArg, BasicAction>,
State,
ThunkDispatch<State, ExtraThunkArg, BasicAction>
>
@@ -0,0 +1 @@
{"version":3,"file":"ClassMetadataLifecycle.d.ts","sourceRoot":"","sources":["../../../../src/metadata/models/ClassMetadataLifecycle.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,sBAAsB;IACrC,wBAAwB,EAAE,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;IAC/C,qBAAqB,EAAE,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;CAC7C"}
@@ -0,0 +1,430 @@
"use client";
"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
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 __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/index.ts
var src_exports = {};
__export(src_exports, {
Modal: () => modal_default,
ModalBody: () => modal_body_default,
ModalContent: () => modal_content_default,
ModalFooter: () => modal_footer_default,
ModalHeader: () => modal_header_default,
ModalProvider: () => ModalProvider,
useDisclosure: () => import_use_disclosure.useDisclosure,
useDraggable: () => import_use_draggable.useDraggable,
useModal: () => useModal,
useModalContext: () => useModalContext
});
module.exports = __toCommonJS(src_exports);
// src/modal.tsx
var import_framer_motion = require("framer-motion");
var import_overlays2 = require("@react-aria/overlays");
var import_system2 = require("@heroui/system");
// src/use-modal.ts
var import_use_aria_modal_overlay = require("@heroui/use-aria-modal-overlay");
var import_react = require("react");
var import_theme = require("@heroui/theme");
var import_system = require("@heroui/system");
var import_use_aria_button = require("@heroui/use-aria-button");
var import_focus = require("@react-aria/focus");
var import_shared_utils = require("@heroui/shared-utils");
var import_react_utils = require("@heroui/react-utils");
var import_overlays = require("@react-stately/overlays");
var import_utils = require("@react-aria/utils");
function useModal(originalProps) {
var _a, _b, _c;
const globalContext = (0, import_system.useProviderContext)();
const [props, variantProps] = (0, import_system.mapPropsVariants)(originalProps, import_theme.modal.variantKeys);
const {
ref,
as,
className,
classNames,
isOpen,
defaultOpen,
onOpenChange,
motionProps,
closeButton,
isDismissable = true,
hideCloseButton = false,
shouldBlockScroll = true,
portalContainer,
isKeyboardDismissDisabled = false,
onClose,
...otherProps
} = props;
const Component = as || "section";
const domRef = (0, import_react_utils.useDOMRef)(ref);
const closeButtonRef = (0, import_react.useRef)(null);
const [headerMounted, setHeaderMounted] = (0, import_react.useState)(false);
const [bodyMounted, setBodyMounted] = (0, import_react.useState)(false);
const disableAnimation = (_b = (_a = originalProps.disableAnimation) != null ? _a : globalContext == null ? void 0 : globalContext.disableAnimation) != null ? _b : false;
const dialogId = (0, import_react.useId)();
const headerId = (0, import_react.useId)();
const bodyId = (0, import_react.useId)();
const state = (0, import_overlays.useOverlayTriggerState)({
isOpen,
defaultOpen,
onOpenChange: (isOpen2) => {
onOpenChange == null ? void 0 : onOpenChange(isOpen2);
if (!isOpen2) {
onClose == null ? void 0 : onClose();
}
}
});
const { modalProps, underlayProps } = (0, import_use_aria_modal_overlay.useAriaModalOverlay)(
{
isDismissable,
shouldBlockScroll,
isKeyboardDismissDisabled
},
state,
domRef
);
const { buttonProps: closeButtonProps } = (0, import_use_aria_button.useAriaButton)({ onPress: state.close }, closeButtonRef);
const { isFocusVisible: isCloseButtonFocusVisible, focusProps: closeButtonFocusProps } = (0, import_focus.useFocusRing)();
const baseStyles = (0, import_shared_utils.clsx)(classNames == null ? void 0 : classNames.base, className);
const slots = (0, import_react.useMemo)(
() => (0, import_theme.modal)({
...variantProps,
disableAnimation
}),
[(0, import_shared_utils.objectToDeps)(variantProps), disableAnimation]
);
const getDialogProps = (props2 = {}, ref2 = null) => {
var _a2;
return {
ref: (0, import_utils.mergeRefs)(ref2, domRef),
...(0, import_utils.mergeProps)(modalProps, otherProps, props2),
className: slots.base({ class: (0, import_shared_utils.clsx)(baseStyles, props2.className) }),
id: dialogId,
"data-open": (0, import_shared_utils.dataAttr)(state.isOpen),
"data-dismissable": (0, import_shared_utils.dataAttr)(isDismissable),
"aria-modal": (0, import_shared_utils.dataAttr)(true),
"data-placement": (_a2 = originalProps == null ? void 0 : originalProps.placement) != null ? _a2 : "right",
"aria-labelledby": headerMounted ? headerId : void 0,
"aria-describedby": bodyMounted ? bodyId : void 0
};
};
const getBackdropProps = (0, import_react.useCallback)(
(props2 = {}) => ({
className: slots.backdrop({ class: classNames == null ? void 0 : classNames.backdrop }),
onClick: () => state.close(),
...underlayProps,
...props2
}),
[slots, classNames, underlayProps]
);
const getCloseButtonProps = () => {
return {
role: "button",
tabIndex: 0,
"aria-label": "Close",
"data-focus-visible": (0, import_shared_utils.dataAttr)(isCloseButtonFocusVisible),
className: slots.closeButton({ class: classNames == null ? void 0 : classNames.closeButton }),
...(0, import_utils.mergeProps)(closeButtonProps, closeButtonFocusProps)
};
};
return {
Component,
slots,
domRef,
headerId,
bodyId,
motionProps,
classNames,
isDismissable,
closeButton,
hideCloseButton,
portalContainer,
shouldBlockScroll,
backdrop: (_c = originalProps.backdrop) != null ? _c : "opaque",
isOpen: state.isOpen,
onClose: state.close,
disableAnimation,
setBodyMounted,
setHeaderMounted,
getDialogProps,
getBackdropProps,
getCloseButtonProps
};
}
// src/modal-context.ts
var import_react_utils2 = require("@heroui/react-utils");
var [ModalProvider, useModalContext] = (0, import_react_utils2.createContext)({
name: "ModalContext",
errorMessage: "useModalContext: `context` is undefined. Seems you forgot to wrap all popover components within `<Modal />`"
});
// src/modal.tsx
var import_jsx_runtime = require("react/jsx-runtime");
var Modal = (0, import_system2.forwardRef)((props, ref) => {
const { children, ...otherProps } = props;
const context = useModal({ ...otherProps, ref });
const overlay = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_overlays2.Overlay, { portalContainer: context.portalContainer, children });
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ModalProvider, { value: context, children: context.disableAnimation && context.isOpen ? overlay : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_framer_motion.AnimatePresence, { children: context.isOpen ? overlay : null }) });
});
Modal.displayName = "HeroUI.Modal";
var modal_default = Modal;
// src/modal-content.tsx
var import_react2 = require("react");
var import_overlays3 = require("@react-aria/overlays");
var import_framer_utils2 = require("@heroui/framer-utils");
var import_shared_icons = require("@heroui/shared-icons");
var import_framer_motion2 = require("framer-motion");
var import_dialog = require("@react-aria/dialog");
var import_utils2 = require("@react-aria/utils");
// src/modal-transition.ts
var import_framer_utils = require("@heroui/framer-utils");
var scaleInOut = {
enter: {
scale: "var(--scale-enter)",
y: "var(--slide-enter)",
opacity: 1,
willChange: "auto",
transition: {
scale: {
duration: 0.4,
ease: import_framer_utils.TRANSITION_EASINGS.ease
},
opacity: {
duration: 0.4,
ease: import_framer_utils.TRANSITION_EASINGS.ease
},
y: {
type: "spring",
bounce: 0,
duration: 0.6
}
}
},
exit: {
scale: "var(--scale-exit)",
y: "var(--slide-exit)",
opacity: 0,
willChange: "transform",
transition: {
duration: 0.3,
ease: import_framer_utils.TRANSITION_EASINGS.ease
}
}
};
// src/modal-content.tsx
var import_jsx_runtime2 = require("react/jsx-runtime");
var domAnimation = () => import("@heroui/dom-animation").then((res) => res.default);
var ModalContent = (props) => {
const { as, children, role = "dialog", ...otherProps } = props;
const {
Component: DialogComponent,
domRef,
slots,
classNames,
motionProps,
backdrop,
closeButton,
hideCloseButton,
disableAnimation,
getDialogProps,
getBackdropProps,
getCloseButtonProps,
onClose
} = useModalContext();
const Component = as || DialogComponent || "div";
const viewport = (0, import_utils2.useViewportSize)();
const { dialogProps } = (0, import_dialog.useDialog)(
{
role
},
domRef
);
const closeButtonContent = (0, import_react2.isValidElement)(closeButton) ? (0, import_react2.cloneElement)(closeButton, getCloseButtonProps()) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("button", { ...getCloseButtonProps(), children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_shared_icons.CloseIcon, {}) });
const onKeyDown = (0, import_react2.useCallback)((e) => {
if (e.key === "Tab" && e.nativeEvent.isComposing) {
e.stopPropagation();
e.preventDefault();
}
}, []);
const contentProps = getDialogProps((0, import_utils2.mergeProps)(dialogProps, otherProps));
const content = /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Component, { ...contentProps, onKeyDown: (0, import_utils2.chain)(contentProps.onKeyDown, onKeyDown), children: [
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_overlays3.DismissButton, { onDismiss: onClose }),
!hideCloseButton && closeButtonContent,
typeof children === "function" ? children(onClose) : children,
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_overlays3.DismissButton, { onDismiss: onClose })
] });
const backdropContent = (0, import_react2.useMemo)(() => {
if (backdrop === "transparent") {
return null;
}
if (disableAnimation) {
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { ...getBackdropProps() });
}
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_framer_motion2.LazyMotion, { features: domAnimation, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
import_framer_motion2.m.div,
{
animate: "enter",
exit: "exit",
initial: "exit",
variants: import_framer_utils2.TRANSITION_VARIANTS.fade,
...getBackdropProps()
}
) });
}, [backdrop, disableAnimation, getBackdropProps]);
const viewportStyle = {
"--visual-viewport-height": viewport.height + "px"
};
const contents = disableAnimation ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
"div",
{
className: slots.wrapper({ class: classNames == null ? void 0 : classNames.wrapper }),
"data-slot": "wrapper",
style: viewportStyle,
children: content
}
) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_framer_motion2.LazyMotion, { features: domAnimation, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
import_framer_motion2.m.div,
{
animate: "enter",
className: slots.wrapper({ class: classNames == null ? void 0 : classNames.wrapper }),
"data-slot": "wrapper",
exit: "exit",
initial: "exit",
variants: scaleInOut,
...motionProps,
style: viewportStyle,
children: content
}
) });
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { tabIndex: -1, children: [
backdropContent,
contents
] });
};
ModalContent.displayName = "HeroUI.ModalContent";
var modal_content_default = ModalContent;
// src/modal-header.tsx
var import_react3 = require("react");
var import_system3 = require("@heroui/system");
var import_react_utils3 = require("@heroui/react-utils");
var import_shared_utils2 = require("@heroui/shared-utils");
var import_jsx_runtime3 = require("react/jsx-runtime");
var ModalHeader = (0, import_system3.forwardRef)((props, ref) => {
const { as, children, className, ...otherProps } = props;
const { slots, classNames, headerId, setHeaderMounted } = useModalContext();
const domRef = (0, import_react_utils3.useDOMRef)(ref);
const Component = as || "header";
(0, import_react3.useEffect)(() => {
setHeaderMounted(true);
return () => setHeaderMounted(false);
}, [setHeaderMounted]);
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
Component,
{
ref: domRef,
className: slots.header({ class: (0, import_shared_utils2.clsx)(classNames == null ? void 0 : classNames.header, className) }),
id: headerId,
...otherProps,
children
}
);
});
ModalHeader.displayName = "HeroUI.ModalHeader";
var modal_header_default = ModalHeader;
// src/modal-body.tsx
var import_react4 = require("react");
var import_system4 = require("@heroui/system");
var import_react_utils4 = require("@heroui/react-utils");
var import_shared_utils3 = require("@heroui/shared-utils");
var import_jsx_runtime4 = require("react/jsx-runtime");
var ModalBody = (0, import_system4.forwardRef)((props, ref) => {
const { as, children, className, ...otherProps } = props;
const { slots, classNames, bodyId, setBodyMounted } = useModalContext();
const domRef = (0, import_react_utils4.useDOMRef)(ref);
const Component = as || "div";
(0, import_react4.useEffect)(() => {
setBodyMounted(true);
return () => setBodyMounted(false);
}, [setBodyMounted]);
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
Component,
{
ref: domRef,
className: slots.body({ class: (0, import_shared_utils3.clsx)(classNames == null ? void 0 : classNames.body, className) }),
id: bodyId,
...otherProps,
children
}
);
});
ModalBody.displayName = "HeroUI.ModalBody";
var modal_body_default = ModalBody;
// src/modal-footer.tsx
var import_system5 = require("@heroui/system");
var import_react_utils5 = require("@heroui/react-utils");
var import_shared_utils4 = require("@heroui/shared-utils");
var import_jsx_runtime5 = require("react/jsx-runtime");
var ModalFooter = (0, import_system5.forwardRef)((props, ref) => {
const { as, children, className, ...otherProps } = props;
const { slots, classNames } = useModalContext();
const domRef = (0, import_react_utils5.useDOMRef)(ref);
const Component = as || "footer";
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
Component,
{
ref: domRef,
className: slots.footer({ class: (0, import_shared_utils4.clsx)(classNames == null ? void 0 : classNames.footer, className) }),
...otherProps,
children
}
);
});
ModalFooter.displayName = "HeroUI.ModalFooter";
var modal_footer_default = ModalFooter;
// src/index.ts
var import_use_disclosure = require("@heroui/use-disclosure");
var import_use_draggable = require("@heroui/use-draggable");
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
Modal,
ModalBody,
ModalContent,
ModalFooter,
ModalHeader,
ModalProvider,
useDisclosure,
useDraggable,
useModal,
useModalContext
});
@@ -0,0 +1,199 @@
/**
* Copyright (c) 2019 The xterm.js authors. All rights reserved.
* @license MIT
*/
import { ILinkProvider, ILink, Terminal, IViewportRange, IBufferLine } from '@xterm/xterm';
export interface ILinkProviderOptions {
hover?(event: MouseEvent, text: string, location: IViewportRange): void;
leave?(event: MouseEvent, text: string): void;
urlRegex?: RegExp;
}
export class WebLinkProvider implements ILinkProvider {
constructor(
private readonly _terminal: Terminal,
private readonly _regex: RegExp,
private readonly _handler: (event: MouseEvent, uri: string) => void,
private readonly _options: ILinkProviderOptions = {}
) {
}
public provideLinks(y: number, callback: (links: ILink[] | undefined) => void): void {
const links = LinkComputer.computeLink(y, this._regex, this._terminal, this._handler);
callback(this._addCallbacks(links));
}
private _addCallbacks(links: ILink[]): ILink[] {
return links.map(link => {
link.leave = this._options.leave;
link.hover = (event: MouseEvent, uri: string): void => {
if (this._options.hover) {
const { range } = link;
this._options.hover(event, uri, range);
}
};
return link;
});
}
}
function isUrl(urlString: string): boolean {
try {
const url = new URL(urlString);
const parsedBase = url.password && url.username
? `${url.protocol}//${url.username}:${url.password}@${url.host}`
: url.username
? `${url.protocol}//${url.username}@${url.host}`
: `${url.protocol}//${url.host}`;
return urlString.toLocaleLowerCase().startsWith(parsedBase.toLocaleLowerCase());
} catch (e) {
return false;
}
}
export class LinkComputer {
public static computeLink(y: number, regex: RegExp, terminal: Terminal, activate: (event: MouseEvent, uri: string) => void): ILink[] {
const rex = new RegExp(regex.source, (regex.flags || '') + 'g');
const [lines, startLineIndex] = LinkComputer._getWindowedLineStrings(y - 1, terminal);
const line = lines.join('');
let match;
const result: ILink[] = [];
while (match = rex.exec(line)) {
const text = match[0];
// check via URL if the matched text would form a proper url
if (!isUrl(text)) {
continue;
}
// map string positions back to buffer positions
// values are 0-based right side excluding
const [startY, startX] = LinkComputer._mapStrIdx(terminal, startLineIndex, 0, match.index);
const [endY, endX] = LinkComputer._mapStrIdx(terminal, startY, startX, text.length);
if (startY === -1 || startX === -1 || endY === -1 || endX === -1) {
continue;
}
// range expects values 1-based right side including, thus +1 except for endX
const range = {
start: {
x: startX + 1,
y: startY + 1
},
end: {
x: endX,
y: endY + 1
}
};
result.push({ range, text, activate });
}
return result;
}
/**
* Get wrapped content lines for the current line index.
* The top/bottom line expansion stops at whitespaces or length > 2048.
* Returns an array with line strings and the top line index.
*
* NOTE: We pull line strings with trimRight=true on purpose to make sure
* to correctly match urls with early wrapped wide chars. This corrupts the string index
* for 1:1 backmapping to buffer positions, thus needs an additional correction in _mapStrIdx.
*/
private static _getWindowedLineStrings(lineIndex: number, terminal: Terminal): [string[], number] {
let line: IBufferLine | undefined;
let topIdx = lineIndex;
let bottomIdx = lineIndex;
let length = 0;
let content = '';
const lines: string[] = [];
if ((line = terminal.buffer.active.getLine(lineIndex))) {
const currentContent = line.translateToString(true);
// expand top, stop on whitespaces or length > 2048
if (line.isWrapped && currentContent[0] !== ' ') {
length = 0;
while ((line = terminal.buffer.active.getLine(--topIdx)) && length < 2048) {
content = line.translateToString(true);
length += content.length;
lines.push(content);
if (!line.isWrapped || content.indexOf(' ') !== -1) {
break;
}
}
lines.reverse();
}
// append current line
lines.push(currentContent);
// expand bottom, stop on whitespaces or length > 2048
length = 0;
while ((line = terminal.buffer.active.getLine(++bottomIdx)) && line.isWrapped && length < 2048) {
content = line.translateToString(true);
length += content.length;
lines.push(content);
if (content.indexOf(' ') !== -1) {
break;
}
}
}
return [lines, topIdx];
}
/**
* Map a string index back to buffer positions.
* Returns buffer position as [lineIndex, columnIndex] 0-based,
* or [-1, -1] in case the lookup ran into a non-existing line.
*/
private static _mapStrIdx(terminal: Terminal, lineIndex: number, rowIndex: number, stringIndex: number): [number, number] {
const buf = terminal.buffer.active;
const cell = buf.getNullCell();
let start = rowIndex;
while (stringIndex) {
const line = buf.getLine(lineIndex);
if (!line) {
return [-1, -1];
}
for (let i = start; i < line.length; ++i) {
line.getCell(i, cell);
const chars = cell.getChars();
const width = cell.getWidth();
if (width) {
stringIndex -= chars.length || 1;
// correct stringIndex for early wrapped wide chars:
// - currently only happens at last cell
// - cells to the right are reset with chars='' and width=1 in InputHandler.print
// - follow-up line must be wrapped and contain wide char at first cell
// --> if all these conditions are met, correct stringIndex by +1
if (i === line.length - 1 && chars === '') {
const line = buf.getLine(lineIndex + 1);
if (line && line.isWrapped) {
line.getCell(0, cell);
if (cell.getWidth() === 2) {
stringIndex += 1;
}
}
}
}
if (stringIndex < 0) {
return [lineIndex, i];
}
}
lineIndex++;
start = 0;
}
return [lineIndex, start];
}
}
@@ -0,0 +1,34 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.AuthorityKeyIdentifier = exports.KeyIdentifier = exports.id_ce_authorityKeyIdentifier = void 0;
const tslib_1 = require("tslib");
const asn1_schema_1 = require("@peculiar/asn1-schema");
const general_name_1 = require("../general_name");
const object_identifiers_1 = require("../object_identifiers");
exports.id_ce_authorityKeyIdentifier = `${object_identifiers_1.id_ce}.35`;
class KeyIdentifier extends asn1_schema_1.OctetString {
}
exports.KeyIdentifier = KeyIdentifier;
class AuthorityKeyIdentifier {
constructor(params = {}) {
if (params) {
Object.assign(this, params);
}
}
}
exports.AuthorityKeyIdentifier = AuthorityKeyIdentifier;
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: KeyIdentifier, context: 0, optional: true, implicit: true })
], AuthorityKeyIdentifier.prototype, "keyIdentifier", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: general_name_1.GeneralName, context: 1, optional: true, implicit: true, repeated: "sequence" })
], AuthorityKeyIdentifier.prototype, "authorityCertIssuer", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({
type: asn1_schema_1.AsnPropTypes.Integer,
context: 2,
optional: true,
implicit: true,
converter: asn1_schema_1.AsnIntegerArrayBufferConverter,
})
], AuthorityKeyIdentifier.prototype, "authorityCertSerialNumber", void 0);
@@ -0,0 +1,184 @@
// Type definitions for @colors/colors 1.4+
// Project: https://github.com/Marak/colors.js
// Definitions by: Bart van der Schoor <https://github.com/Bartvds>, Staffan Eketorp <https://github.com/staeke>
// Definitions: https://github.com/DABH/colors.js
export interface Color {
(text: string): string;
strip: Color;
stripColors: Color;
black: Color;
red: Color;
green: Color;
yellow: Color;
blue: Color;
magenta: Color;
cyan: Color;
white: Color;
gray: Color;
grey: Color;
brightRed: Color;
brightGreen: Color;
brightYellow: Color;
brightBlue: Color;
brightMagenta: Color;
brightCyan: Color;
brightWhite: Color;
bgBlack: Color;
bgRed: Color;
bgGreen: Color;
bgYellow: Color;
bgBlue: Color;
bgMagenta: Color;
bgCyan: Color;
bgWhite: Color;
bgBrightRed: Color;
bgBrightGreen: Color;
bgBrightYellow: Color;
bgBrightBlue: Color;
bgBrightMagenta: Color;
bgBrightCyan: Color;
bgBrightWhite: Color;
reset: Color;
bold: Color;
dim: Color;
italic: Color;
underline: Color;
inverse: Color;
hidden: Color;
strikethrough: Color;
rainbow: Color;
zebra: Color;
america: Color;
trap: Color;
random: Color;
zalgo: Color;
}
export function enable(): void;
export function disable(): void;
export function setTheme(theme: any): void;
export let enabled: boolean;
export const strip: Color;
export const stripColors: Color;
export const black: Color;
export const red: Color;
export const green: Color;
export const yellow: Color;
export const blue: Color;
export const magenta: Color;
export const cyan: Color;
export const white: Color;
export const gray: Color;
export const grey: Color;
export const brightRed: Color;
export const brightGreen: Color;
export const brightYellow: Color;
export const brightBlue: Color;
export const brightMagenta: Color;
export const brightCyan: Color;
export const brightWhite: Color;
export const bgBlack: Color;
export const bgRed: Color;
export const bgGreen: Color;
export const bgYellow: Color;
export const bgBlue: Color;
export const bgMagenta: Color;
export const bgCyan: Color;
export const bgWhite: Color;
export const bgBrightRed: Color;
export const bgBrightGreen: Color;
export const bgBrightYellow: Color;
export const bgBrightBlue: Color;
export const bgBrightMagenta: Color;
export const bgBrightCyan: Color;
export const bgBrightWhite: Color;
export const reset: Color;
export const bold: Color;
export const dim: Color;
export const italic: Color;
export const underline: Color;
export const inverse: Color;
export const hidden: Color;
export const strikethrough: Color;
export const rainbow: Color;
export const zebra: Color;
export const america: Color;
export const trap: Color;
export const random: Color;
export const zalgo: Color;
declare global {
interface String {
strip: string;
stripColors: string;
black: string;
red: string;
green: string;
yellow: string;
blue: string;
magenta: string;
cyan: string;
white: string;
gray: string;
grey: string;
brightRed: string;
brightGreen: string;
brightYellow: string;
brightBlue: string;
brightMagenta: string;
brightCyan: string;
brightWhite: string;
bgBlack: string;
bgRed: string;
bgGreen: string;
bgYellow: string;
bgBlue: string;
bgMagenta: string;
bgCyan: string;
bgWhite: string;
bgBrightRed: string;
bgBrightGreen: string;
bgBrightYellow: string;
bgBrightBlue: string;
bgBrightMagenta: string;
bgBrightCyan: string;
bgBrightWhite: string;
reset: string;
// @ts-ignore
bold: string;
dim: string;
italic: string;
underline: string;
inverse: string;
hidden: string;
strikethrough: string;
rainbow: string;
zebra: string;
america: string;
trap: string;
random: string;
zalgo: string;
}
}
@@ -0,0 +1,320 @@
// THIS FILE IS AUTO GENERATED
import type { IconType } from '../lib/index'
export declare const RxAccessibility: IconType;
export declare const RxActivityLog: IconType;
export declare const RxAlignBaseline: IconType;
export declare const RxAlignBottom: IconType;
export declare const RxAlignCenterHorizontally: IconType;
export declare const RxAlignCenterVertically: IconType;
export declare const RxAlignLeft: IconType;
export declare const RxAlignRight: IconType;
export declare const RxAlignTop: IconType;
export declare const RxAllSides: IconType;
export declare const RxAngle: IconType;
export declare const RxArchive: IconType;
export declare const RxArrowBottomLeft: IconType;
export declare const RxArrowBottomRight: IconType;
export declare const RxArrowDown: IconType;
export declare const RxArrowLeft: IconType;
export declare const RxArrowRight: IconType;
export declare const RxArrowTopLeft: IconType;
export declare const RxArrowTopRight: IconType;
export declare const RxArrowUp: IconType;
export declare const RxAspectRatio: IconType;
export declare const RxAvatar: IconType;
export declare const RxBackpack: IconType;
export declare const RxBadge: IconType;
export declare const RxBarChart: IconType;
export declare const RxBell: IconType;
export declare const RxBlendingMode: IconType;
export declare const RxBookmarkFilled: IconType;
export declare const RxBookmark: IconType;
export declare const RxBorderAll: IconType;
export declare const RxBorderBottom: IconType;
export declare const RxBorderDashed: IconType;
export declare const RxBorderDotted: IconType;
export declare const RxBorderLeft: IconType;
export declare const RxBorderNone: IconType;
export declare const RxBorderRight: IconType;
export declare const RxBorderSolid: IconType;
export declare const RxBorderSplit: IconType;
export declare const RxBorderStyle: IconType;
export declare const RxBorderTop: IconType;
export declare const RxBorderWidth: IconType;
export declare const RxBoxModel: IconType;
export declare const RxBox: IconType;
export declare const RxButton: IconType;
export declare const RxCalendar: IconType;
export declare const RxCamera: IconType;
export declare const RxCardStackMinus: IconType;
export declare const RxCardStackPlus: IconType;
export declare const RxCardStack: IconType;
export declare const RxCaretDown: IconType;
export declare const RxCaretLeft: IconType;
export declare const RxCaretRight: IconType;
export declare const RxCaretSort: IconType;
export declare const RxCaretUp: IconType;
export declare const RxChatBubble: IconType;
export declare const RxCheckCircled: IconType;
export declare const RxCheck: IconType;
export declare const RxCheckbox: IconType;
export declare const RxChevronDown: IconType;
export declare const RxChevronLeft: IconType;
export declare const RxChevronRight: IconType;
export declare const RxChevronUp: IconType;
export declare const RxCircleBackslash: IconType;
export declare const RxCircle: IconType;
export declare const RxClipboardCopy: IconType;
export declare const RxClipboard: IconType;
export declare const RxClock: IconType;
export declare const RxCode: IconType;
export declare const RxCodesandboxLogo: IconType;
export declare const RxColorWheel: IconType;
export declare const RxColumnSpacing: IconType;
export declare const RxColumns: IconType;
export declare const RxCommit: IconType;
export declare const RxComponent1: IconType;
export declare const RxComponent2: IconType;
export declare const RxComponentBoolean: IconType;
export declare const RxComponentInstance: IconType;
export declare const RxComponentNone: IconType;
export declare const RxComponentPlaceholder: IconType;
export declare const RxContainer: IconType;
export declare const RxCookie: IconType;
export declare const RxCopy: IconType;
export declare const RxCornerBottomLeft: IconType;
export declare const RxCornerBottomRight: IconType;
export declare const RxCornerTopLeft: IconType;
export declare const RxCornerTopRight: IconType;
export declare const RxCorners: IconType;
export declare const RxCountdownTimer: IconType;
export declare const RxCounterClockwiseClock: IconType;
export declare const RxCrop: IconType;
export declare const RxCross1: IconType;
export declare const RxCross2: IconType;
export declare const RxCrossCircled: IconType;
export declare const RxCrosshair1: IconType;
export declare const RxCrosshair2: IconType;
export declare const RxCrumpledPaper: IconType;
export declare const RxCube: IconType;
export declare const RxCursorArrow: IconType;
export declare const RxCursorText: IconType;
export declare const RxDash: IconType;
export declare const RxDashboard: IconType;
export declare const RxDesktop: IconType;
export declare const RxDimensions: IconType;
export declare const RxDisc: IconType;
export declare const RxDiscordLogo: IconType;
export declare const RxDividerHorizontal: IconType;
export declare const RxDividerVertical: IconType;
export declare const RxDotFilled: IconType;
export declare const RxDot: IconType;
export declare const RxDotsHorizontal: IconType;
export declare const RxDotsVertical: IconType;
export declare const RxDoubleArrowDown: IconType;
export declare const RxDoubleArrowLeft: IconType;
export declare const RxDoubleArrowRight: IconType;
export declare const RxDoubleArrowUp: IconType;
export declare const RxDownload: IconType;
export declare const RxDragHandleDots1: IconType;
export declare const RxDragHandleDots2: IconType;
export declare const RxDragHandleHorizontal: IconType;
export declare const RxDragHandleVertical: IconType;
export declare const RxDrawingPinFilled: IconType;
export declare const RxDrawingPin: IconType;
export declare const RxDropdownMenu: IconType;
export declare const RxEnterFullScreen: IconType;
export declare const RxEnter: IconType;
export declare const RxEnvelopeClosed: IconType;
export declare const RxEnvelopeOpen: IconType;
export declare const RxEraser: IconType;
export declare const RxExclamationTriangle: IconType;
export declare const RxExitFullScreen: IconType;
export declare const RxExit: IconType;
export declare const RxExternalLink: IconType;
export declare const RxEyeClosed: IconType;
export declare const RxEyeNone: IconType;
export declare const RxEyeOpen: IconType;
export declare const RxFace: IconType;
export declare const RxFigmaLogo: IconType;
export declare const RxFileMinus: IconType;
export declare const RxFilePlus: IconType;
export declare const RxFileText: IconType;
export declare const RxFile: IconType;
export declare const RxFontBold: IconType;
export declare const RxFontFamily: IconType;
export declare const RxFontItalic: IconType;
export declare const RxFontRoman: IconType;
export declare const RxFontSize: IconType;
export declare const RxFontStyle: IconType;
export declare const RxFrame: IconType;
export declare const RxFramerLogo: IconType;
export declare const RxGear: IconType;
export declare const RxGithubLogo: IconType;
export declare const RxGlobe: IconType;
export declare const RxGrid: IconType;
export declare const RxGroup: IconType;
export declare const RxHalf1: IconType;
export declare const RxHalf2: IconType;
export declare const RxHamburgerMenu: IconType;
export declare const RxHand: IconType;
export declare const RxHeading: IconType;
export declare const RxHeartFilled: IconType;
export declare const RxHeart: IconType;
export declare const RxHeight: IconType;
export declare const RxHobbyKnife: IconType;
export declare const RxHome: IconType;
export declare const RxIconjarLogo: IconType;
export declare const RxIdCard: IconType;
export declare const RxImage: IconType;
export declare const RxInfoCircled: IconType;
export declare const RxInput: IconType;
export declare const RxInstagramLogo: IconType;
export declare const RxKeyboard: IconType;
export declare const RxLapTimer: IconType;
export declare const RxLaptop: IconType;
export declare const RxLayers: IconType;
export declare const RxLayout: IconType;
export declare const RxLetterCaseCapitalize: IconType;
export declare const RxLetterCaseLowercase: IconType;
export declare const RxLetterCaseToggle: IconType;
export declare const RxLetterCaseUppercase: IconType;
export declare const RxLetterSpacing: IconType;
export declare const RxLightningBolt: IconType;
export declare const RxLineHeight: IconType;
export declare const RxLink1: IconType;
export declare const RxLink2: IconType;
export declare const RxLinkBreak1: IconType;
export declare const RxLinkBreak2: IconType;
export declare const RxLinkNone1: IconType;
export declare const RxLinkNone2: IconType;
export declare const RxLinkedinLogo: IconType;
export declare const RxListBullet: IconType;
export declare const RxLockClosed: IconType;
export declare const RxLockOpen1: IconType;
export declare const RxLockOpen2: IconType;
export declare const RxLoop: IconType;
export declare const RxMagicWand: IconType;
export declare const RxMagnifyingGlass: IconType;
export declare const RxMargin: IconType;
export declare const RxMaskOff: IconType;
export declare const RxMaskOn: IconType;
export declare const RxMinusCircled: IconType;
export declare const RxMinus: IconType;
export declare const RxMix: IconType;
export declare const RxMixerHorizontal: IconType;
export declare const RxMixerVertical: IconType;
export declare const RxMobile: IconType;
export declare const RxModulzLogo: IconType;
export declare const RxMoon: IconType;
export declare const RxMove: IconType;
export declare const RxNotionLogo: IconType;
export declare const RxOpacity: IconType;
export declare const RxOpenInNewWindow: IconType;
export declare const RxOverline: IconType;
export declare const RxPadding: IconType;
export declare const RxPaperPlane: IconType;
export declare const RxPause: IconType;
export declare const RxPencil1: IconType;
export declare const RxPencil2: IconType;
export declare const RxPerson: IconType;
export declare const RxPieChart: IconType;
export declare const RxPilcrow: IconType;
export declare const RxPinBottom: IconType;
export declare const RxPinLeft: IconType;
export declare const RxPinRight: IconType;
export declare const RxPinTop: IconType;
export declare const RxPlay: IconType;
export declare const RxPlusCircled: IconType;
export declare const RxPlus: IconType;
export declare const RxQuestionMarkCircled: IconType;
export declare const RxQuestionMark: IconType;
export declare const RxQuote: IconType;
export declare const RxRadiobutton: IconType;
export declare const RxReader: IconType;
export declare const RxReload: IconType;
export declare const RxReset: IconType;
export declare const RxResume: IconType;
export declare const RxRocket: IconType;
export declare const RxRotateCounterClockwise: IconType;
export declare const RxRowSpacing: IconType;
export declare const RxRows: IconType;
export declare const RxRulerHorizontal: IconType;
export declare const RxRulerSquare: IconType;
export declare const RxScissors: IconType;
export declare const RxSection: IconType;
export declare const RxSewingPinFilled: IconType;
export declare const RxSewingPin: IconType;
export declare const RxShadowInner: IconType;
export declare const RxShadowNone: IconType;
export declare const RxShadowOuter: IconType;
export declare const RxShadow: IconType;
export declare const RxShare1: IconType;
export declare const RxShare2: IconType;
export declare const RxShuffle: IconType;
export declare const RxSize: IconType;
export declare const RxSketchLogo: IconType;
export declare const RxSlash: IconType;
export declare const RxSlider: IconType;
export declare const RxSpaceBetweenHorizontally: IconType;
export declare const RxSpaceBetweenVertically: IconType;
export declare const RxSpaceEvenlyHorizontally: IconType;
export declare const RxSpaceEvenlyVertically: IconType;
export declare const RxSpeakerLoud: IconType;
export declare const RxSpeakerModerate: IconType;
export declare const RxSpeakerOff: IconType;
export declare const RxSpeakerQuiet: IconType;
export declare const RxSquare: IconType;
export declare const RxStack: IconType;
export declare const RxStarFilled: IconType;
export declare const RxStar: IconType;
export declare const RxStitchesLogo: IconType;
export declare const RxStop: IconType;
export declare const RxStopwatch: IconType;
export declare const RxStretchHorizontally: IconType;
export declare const RxStretchVertically: IconType;
export declare const RxStrikethrough: IconType;
export declare const RxSun: IconType;
export declare const RxSwitch: IconType;
export declare const RxSymbol: IconType;
export declare const RxTable: IconType;
export declare const RxTarget: IconType;
export declare const RxTextAlignBottom: IconType;
export declare const RxTextAlignCenter: IconType;
export declare const RxTextAlignJustify: IconType;
export declare const RxTextAlignLeft: IconType;
export declare const RxTextAlignMiddle: IconType;
export declare const RxTextAlignRight: IconType;
export declare const RxTextAlignTop: IconType;
export declare const RxTextNone: IconType;
export declare const RxText: IconType;
export declare const RxThickArrowDown: IconType;
export declare const RxThickArrowLeft: IconType;
export declare const RxThickArrowRight: IconType;
export declare const RxThickArrowUp: IconType;
export declare const RxTimer: IconType;
export declare const RxTokens: IconType;
export declare const RxTrackNext: IconType;
export declare const RxTrackPrevious: IconType;
export declare const RxTransform: IconType;
export declare const RxTransparencyGrid: IconType;
export declare const RxTrash: IconType;
export declare const RxTriangleDown: IconType;
export declare const RxTriangleLeft: IconType;
export declare const RxTriangleRight: IconType;
export declare const RxTriangleUp: IconType;
export declare const RxTwitterLogo: IconType;
export declare const RxUnderline: IconType;
export declare const RxUpdate: IconType;
export declare const RxUpload: IconType;
export declare const RxValueNone: IconType;
export declare const RxValue: IconType;
export declare const RxVercelLogo: IconType;
export declare const RxVideo: IconType;
export declare const RxViewGrid: IconType;
export declare const RxViewHorizontal: IconType;
export declare const RxViewNone: IconType;
export declare const RxViewVertical: IconType;
export declare const RxWidth: IconType;
export declare const RxZoomIn: IconType;
export declare const RxZoomOut: IconType;
@@ -0,0 +1 @@
{"version":3,"file":"isNotParentBindingConstraintsWithName.js","sourceRoot":"","sources":["../../../../src/binding/calculations/isNotParentBindingConstraintsWithName.ts"],"names":[],"mappings":";;AAKA,sFAIC;AAPD,iFAA8E;AAC9E,mFAAgF;AAEhF,SAAgB,qCAAqC,CACnD,IAAkB;IAElB,OAAO,IAAA,6DAA6B,EAAC,IAAA,2DAA4B,EAAC,IAAI,CAAC,CAAC,CAAC;AAC3E,CAAC"}
@@ -0,0 +1 @@
(()=>{var __webpack_modules__={"./node_modules/.pnpm/create-require@1.1.1/node_modules/create-require/create-require.js":(module,__unused_webpack_exports,__webpack_require__)=>{const nativeModule=__webpack_require__("module"),path=__webpack_require__("path"),fs=__webpack_require__("fs");module.exports=function(filename){return filename||(filename=process.cwd()),function(path){try{return fs.lstatSync(path).isDirectory()}catch(e){return!1}}(filename)&&(filename=path.join(filename,"index.js")),nativeModule.createRequire?nativeModule.createRequire(filename):nativeModule.createRequireFromPath?nativeModule.createRequireFromPath(filename):function(filename){const mod=new nativeModule.Module(filename,null);return mod.filename=filename,mod.paths=nativeModule.Module._nodeModulePaths(path.dirname(filename)),mod._compile("module.exports = require;",filename),mod.exports}(filename)}},"./node_modules/.pnpm/mlly@1.7.3/node_modules/mlly/dist lazy recursive":module=>{function webpackEmptyAsyncContext(req){return Promise.resolve().then((()=>{var e=new Error("Cannot find module '"+req+"'");throw e.code="MODULE_NOT_FOUND",e}))}webpackEmptyAsyncContext.keys=()=>[],webpackEmptyAsyncContext.resolve=webpackEmptyAsyncContext,webpackEmptyAsyncContext.id="./node_modules/.pnpm/mlly@1.7.3/node_modules/mlly/dist lazy recursive",module.exports=webpackEmptyAsyncContext},"./node_modules/.pnpm/object-hash@3.0.0/node_modules/object-hash/index.js":(module,exports,__webpack_require__)=>{"use strict";var crypto=__webpack_require__("crypto");function objectHash(object,options){return function(object,options){var hashingStream;hashingStream="passthrough"!==options.algorithm?crypto.createHash(options.algorithm):new PassThrough;void 0===hashingStream.write&&(hashingStream.write=hashingStream.update,hashingStream.end=hashingStream.update);var hasher=typeHasher(options,hashingStream);hasher.dispatch(object),hashingStream.update||hashingStream.end("");if(hashingStream.digest)return hashingStream.digest("buffer"===options.encoding?void 0:options.encoding);var buf=hashingStream.read();if("buffer"===options.encoding)return buf;return buf.toString(options.encoding)}(object,options=applyDefaults(object,options))}(exports=module.exports=objectHash).sha1=function(object){return objectHash(object)},exports.keys=function(object){return objectHash(object,{excludeValues:!0,algorithm:"sha1",encoding:"hex"})},exports.MD5=function(object){return objectHash(object,{algorithm:"md5",encoding:"hex"})},exports.keysMD5=function(object){return objectHash(object,{algorithm:"md5",encoding:"hex",excludeValues:!0})};var hashes=crypto.getHashes?crypto.getHashes().slice():["sha1","md5"];hashes.push("passthrough");var encodings=["buffer","hex","binary","base64"];function applyDefaults(object,sourceOptions){sourceOptions=sourceOptions||{};var options={};if(options.algorithm=sourceOptions.algorithm||"sha1",options.encoding=sourceOptions.encoding||"hex",options.excludeValues=!!sourceOptions.excludeValues,options.algorithm=options.algorithm.toLowerCase(),options.encoding=options.encoding.toLowerCase(),options.ignoreUnknown=!0===sourceOptions.ignoreUnknown,options.respectType=!1!==sourceOptions.respectType,options.respectFunctionNames=!1!==sourceOptions.respectFunctionNames,options.respectFunctionProperties=!1!==sourceOptions.respectFunctionProperties,options.unorderedArrays=!0===sourceOptions.unorderedArrays,options.unorderedSets=!1!==sourceOptions.unorderedSets,options.unorderedObjects=!1!==sourceOptions.unorderedObjects,options.replacer=sourceOptions.replacer||void 0,options.excludeKeys=sourceOptions.excludeKeys||void 0,void 0===object)throw new Error("Object argument required.");for(var i=0;i<hashes.length;++i)hashes[i].toLowerCase()===options.algorithm.toLowerCase()&&(options.algorithm=hashes[i]);if(-1===hashes.indexOf(options.algorithm))throw new Error('Algorithm "'+options.algorithm+'" not supported. supported values: '+hashes.join(", "));if(-1===encodings.indexOf(options.encoding)&&"passthrough"!==options.algorithm)throw new Error('Encoding "'+options.encoding+'" not supported. supported values: '+encodings.join(", "));return options}function isNativeFunction(f){if("function"!=typeof f)return!1;return null!=/^function\s+\w*\s*\(\s*\)\s*{\s+\[native code\]\s+}$/i.exec(Function.prototype.toString.call(f))}function typeHasher(options,writeTo,context){context=context||[];var write=function(str){return writeTo.update?writeTo.update(str,"utf8"):writeTo.write(str,"utf8")};return{dispatch:function(value){options.replacer&&(value=options.replacer(value));var type=typeof value;return null===value&&(type="null"),this["_"+type](value)},_object:function(object){var objString=Object.prototype.toString.call(object),objType=/\[object (.*)\]/i.exec(objString);objType=(objType=objType?objType[1]:"unknown:["+objString+"]").toLowerCase();var objectNumber;if((objectNumber=context.indexOf(object))>=0)return this.dispatch("[CIRCULAR:"+objectNumber+"]");if(context.push(object),"undefined"!=typeofLine truncated
@@ -0,0 +1,6 @@
module.exports = {
"longPressMessage": `\u{627}\u{636}\u{63A}\u{637} \u{645}\u{637}\u{648}\u{644}\u{627}\u{64B} \u{623}\u{648} \u{627}\u{636}\u{63A}\u{637} \u{639}\u{644}\u{649} Alt + \u{627}\u{644}\u{633}\u{647}\u{645} \u{644}\u{623}\u{633}\u{641}\u{644} \u{644}\u{641}\u{62A}\u{62D} \u{627}\u{644}\u{642}\u{627}\u{626}\u{645}\u{629}`
};
//# sourceMappingURL=ar-AE.main.js.map
@@ -0,0 +1 @@
{"name":"@heroui/table","version":"2.2.27","requiresBuild":false,"files":{"dist/base/index.js":{"checkedAt":1794532126714,"integrity":"sha512-z2u7hxVPO7+sMqm1MAQYNXACT9qNisve6P1tpewYcXat+bBnNLVeMrsoWbLkoyXNwgPfefgnNPx86QSiHjke2Q==","mode":420,"size":2078},"dist/index.js":{"checkedAt":1794532126715,"integrity":"sha512-NpxLbnXty3I1I9CRXco7UB+wGHJLVrHxTkASrpQxnNWTD8vF4yFtWkrJTDgaqjmjvL2P7S8gIpEnTXoHaAHy/w==","mode":420,"size":42879},"dist/base/table-body.js":{"checkedAt":1794532126715,"integrity":"sha512-iwosAU2xm2hCto1fqa9m1YJMyaG3o2ykcs/BofUGkHISpz4i/8ecztZYf+WUmB/SemyJWbcJ06uGLL5D6uEoGA==","mode":420,"size":1120},"dist/table-body.js":{"checkedAt":1794532126715,"integrity":"sha512-i52m1wdfNYgWeofsAF5hiJGMsqAKXkIWL2WbcnJtenhf2fQ4hJg32Cz9ikKcV5ZSJEHIg38+dHvFI9LyZEg7xw==","mode":420,"size":13233},"dist/base/table-cell.js":{"checkedAt":1794532126715,"integrity":"sha512-1n18Gg8eadXvGcRPMiJa1ycC9/OIsmY68puWmOiK5v9/oS7FuAfIfKs2dtap+4Qfd98V+aRwwYuYGDSsct9aEg==","mode":420,"size":1115},"dist/table-cell.js":{"checkedAt":1794532126715,"integrity":"sha512-zyVQgu2TCEeEdZl8AHMrY3RTyUKRxz6XmMLaIp3XZPYQXQhN/r5oDzkplRJSqda0bdrfarr2h5iCtn67fvDf0w==","mode":420,"size":3107},"dist/table-checkbox-cell.js":{"checkedAt":1794532126715,"integrity":"sha512-/GYDnqPUsa4G/7BpAcm3PF6yUZMl3qqKEw1VkkW3Ud9Ol/2bje0v1OfSTMa8kvo7FIf0TIsl4Lo0ykJ/1v0img==","mode":420,"size":3684},"dist/table-column-header.js":{"checkedAt":1794532126715,"integrity":"sha512-VdL1VZUwC/RVrh5tfBDLFFn5qWJeyZAiyxDgugyNab/aXvi+jTxmfk6hT4ZK3Me2N3ghK6IB4ht89W9cjHMn6Q==","mode":420,"size":4201},"dist/base/table-column.js":{"checkedAt":1794532126715,"integrity":"sha512-mBqUU9gRPAcDI5Sx8laPYrYU6l29JKZx6MWnQ3rU9UguLwwOq8eDd4dxyoKX8xbuypiLvuD6j0uqMozY1zWkqQ==","mode":420,"size":1133},"dist/table-header-row.js":{"checkedAt":1794532126716,"integrity":"sha512-J9BZozIqHWvSQCi+YzGMBafduLcGTnU/Zlb84TCxX+rnITfKzrsxcWCwM4Q+aZGBv+NgwKeT9M1zbr3UXQTONg==","mode":420,"size":2371},"dist/base/table-header.js":{"checkedAt":1794532126716,"integrity":"sha512-DJhJnQbKxm2a9s/o6b9xul2NWICljiPjPtd6roEdswsb2znDDRpGbDbFHAuJc9d/ocdugYFd5trZvCS2Z4S2Dw==","mode":420,"size":1138},"dist/table-row-group.js":{"checkedAt":1794532126716,"integrity":"sha512-T/vx+8HoxH/SzoumQhKEBXj86e9okeqPhkbutt978OHZHXeiJTDlt7Dzemvp4ssLeRNlMWsuQ02JaQ+Xkpa8GQ==","mode":420,"size":2084},"dist/base/table-row.js":{"checkedAt":1794532126716,"integrity":"sha512-FXNf50Y5N7VsDiT8ovRw70kdC6mIJ8mMYQGsrO6vKNejPZUZdhzXSrBV9/6uSiHuswPYXawHBmXftKO87YCYpQ==","mode":420,"size":1106},"dist/table-row.js":{"checkedAt":1794532126716,"integrity":"sha512-LoDwPjOqckRo+8n+LSfisBOzCKtO/DpP1fLs/66sxi3/3obUeZFLLGok2eU+XkB/c1X9pJyMLcQEDzPfcaobtg==","mode":420,"size":3887},"dist/table-select-all-checkbox.js":{"checkedAt":1794532126716,"integrity":"sha512-ID7djvwNrPtjr1rpoOP96dpr4qjqz7CsH4zxPaEG4SzJ+RcwgntyOV8mnx8z80UW4Mf/lC9Q1B8AKTdlElz3Yw==","mode":420,"size":3634},"dist/table.js":{"checkedAt":1794532126716,"integrity":"sha512-F1nrj6zrfKx1i39ZSjmzL+12vwF5KkP2XRRcyP0c6wLXF/l7kWoyO+E4pP9y3stcfpW8AwIXM3sEUEaOHUKcmQ==","mode":420,"size":41495},"dist/use-table.js":{"checkedAt":1794532126717,"integrity":"sha512-g+1P66jKXG2q7th2/WnSrNqa+gKKX30I8OZUy4uujDfL+dvP4qbpZOC3rAcfk76s1GSDa64bXVJjLonaadYWJw==","mode":420,"size":6176},"dist/virtualized-table-body.js":{"checkedAt":1794532126717,"integrity":"sha512-HUGz9GSBWh8uWfTVtk2UGVklNkp+wjM2RAiEsD0PYnhDhPv5Wb8YaA9JJnVX+PRb09KpHrRx9S7PPljosHlaeg==","mode":420,"size":13848},"dist/virtualized-table.js":{"checkedAt":1794532126717,"integrity":"sha512-X8HYD+L8/ggCT2keKuCjIRQrklfsb/0Geqod+50xzVy5zQNGy3HhMwhfSs1TdhBRhhQgwx+WwbkL9JmJKB/Zmw==","mode":420,"size":32702},"package.json":{"checkedAt":1794532126717,"integrity":"sha512-wAI4dcaTpaVmzBHVNJo3aSi96QSeXYCdqmBu4ke1AA1HqA0OaEFhaFmOOPTXs4vWKxDK+xH2H91Z3ZWuD+k2sA==","mode":420,"size":1832},"README.md":{"checkedAt":1794532126717,"integrity":"sha512-0CAhsSVzm0RHrRCxoPXf6M43JK04MFTnx3rREMaS3+1X39VOCrG//QcmnaQp/V4jH4J7SyGssWatOQy8Z0A4PA==","mode":420,"size":626},"dist/chunk-6QNXQNN7.mjs":{"checkedAt":1794532126717,"integrity":"sha512-ILbyUQA/SIX7lTlukkQqO56ldyxdGdOYYdzCyW786lEhFtw6Yfh0Ia+fyY/UQakB+AWsZpV/qdrU+6KFsRwalQ==","mode":420,"size":4801},"dist/chunk-CIL4Y7FA.mjs":{"checkedAt":1794532126717,"integrity":"sha512-0sdmMt2jOTWXk4NGNwXLEhz4NTNh8WRVKpFunn4m4DZWJ/rUdOtCG0d7ZHQW3FM9zai8x2a5L5uNOqhZ4dfDTg==","mode":420,"size":172},"dist/chunk-CKWQQGXG.mjs":{"checkedAt":1794532126717,"integrity":"sha512-eLxisvs1VqSddyQvWwZpQ9n25sdnx+/hxRIqSsc4qy65c5F1QRCBQSZJq6mLKmgi9UgLfMpi4JwaKYUSfuByUg==","mode":420,"size":2541},"dist/chunk-F3UDT23P.mjs":{"checkedAt":1794532126718,"integrity":"sha512-Z9rGlR2Cz3RWwFonPsR0Hg7b8104E4Yizvq97rTuk2j9WlSPGVQn2aIf+pxUwqjqlAD6e1JBcz19qzUcXWowtg==","mode":420,"size":179},"dist/chunk-FKPXBCGS.mjs":{"checkedAt":1794532126718,"integrity":"sha512-sZSP6GUs3lB+JbkLV9d37Glgh0KVjS6w1GL6FwbfPxS87a3evaTP4R3f1X9y3KzKf8Q4iHfHT5Mo948tja+Hrw==","mode":420,"size":210},"dist/chunk-IAFUOJEK.mjs":{"checkedAt":1794532126718,"integrity":"sha512-HIgUU9NVs1HhnnOvzzYBt91hNW96CFLine truncated
@@ -0,0 +1,26 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ECPrivateKey = void 0;
const tslib_1 = require("tslib");
const asn1_schema_1 = require("@peculiar/asn1-schema");
const ec_parameters_1 = require("./ec_parameters");
class ECPrivateKey {
constructor(params = {}) {
this.version = 1;
this.privateKey = new asn1_schema_1.OctetString();
Object.assign(this, params);
}
}
exports.ECPrivateKey = ECPrivateKey;
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: asn1_schema_1.AsnPropTypes.Integer })
], ECPrivateKey.prototype, "version", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: asn1_schema_1.OctetString })
], ECPrivateKey.prototype, "privateKey", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: ec_parameters_1.ECParameters, context: 0, optional: true })
], ECPrivateKey.prototype, "parameters", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: asn1_schema_1.AsnPropTypes.BitString, context: 1, optional: true })
], ECPrivateKey.prototype, "publicKey", void 0);
@@ -0,0 +1 @@
{"mappings":";;;AAAA;;;;;;;;;;CAUC;;AAmDM,SAAS,0CAA6B,KAAqC,EAAE,KAAoB;IACtG,IAAI,mBACF,eAAe,sBACf,kBAAkB,cAClB,aAAa,GACd,GAAG;IAEJ,IAAI,CAAC,gBAAgB,kBAAkB,GAAG,CAAA,GAAA,eAAO,EAAc;IAC/D,IAAI,eAAe,CAAA,GAAA,cAAM,EACvB,IAAM,IAAI,CAAA,GAAA,yCAAgB,EAAE;6BAC1B;gCACA;QACF,IACA;QAAC;QAAiB;KAAmB;IAGvC,IAAI,CAAC,mBAAmB,oBAAoB,GAAG,CAAA,GAAA,cAAM,EAAE,IACnD,aAAa,yCAAyC,CAAC,MAAM,UAAU,CAAC,OAAO,GACjF;QAAC,MAAM,UAAU,CAAC,OAAO;QAAE;KAAa;IAE1C,6BAA6B;IAC7B,IAAI,CAAC,oBAAoB,sBAAsB,GAAG,CAAA,GAAA,eAAO,EAAE,IACzD,aAAa,4BAA4B,CAAC;IAG5C,qDAAqD;IACrD,IAAI,CAAC,aAAa,eAAe,GAAG,CAAA,GAAA,eAAO,EAAE,MAAM,UAAU,CAAC,OAAO;IACrE,IAAI,MAAM,UAAU,CAAC,OAAO,KAAK,aAAa;QAC5C,IACE,MAAM,UAAU,CAAC,OAAO,CAAC,MAAM,KAAK,YAAY,MAAM,IACtD,MAAM,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,GAAG,IAAM,EAAE,GAAG,KAAK,WAAW,CAAC,EAAE,CAAC,GAAG,GACpE;YACA,IAAI,wBAAwB,aAAa,4BAA4B,CAAC;YACtE,sBAAsB;QACxB;QACA,eAAe,MAAM,UAAU,CAAC,OAAO;IACzC;IAEA,6EAA6E;IAC7E,IAAI,YAAY,CAAA,GAAA,cAAM,EAAE,IACpB,aAAa,gBAAgB,CAAC,MAAM,UAAU,CAAC,OAAO,EAAE,oBAAoB,qBAAqB,oBACnG;QAAC,MAAM,UAAU,CAAC,OAAO;QAAE;QAAoB;QAAqB;QAAmB;KAAa;IAEtG,IAAI,cAAc,CAAA,GAAA,kBAAU,EAAE,CAAC;QAC7B,kBAAkB;IACpB,GAAG;QAAC;KAAkB;IAEtB,IAAI,uBAAuB,CAAA,GAAA,kBAAU,EAAE,CAAC,KAAU;QAChD,IAAI,WAAW,aAAa,iBAAiB,CAAC,MAAM,UAAU,EAAE,oBAAoB,KAAK;QACzF,IAAI,MAAM,IAAI,IAAI,MAAM,IAAI,CAAC,qBAAqB,GAAG,CAAC,CAAC,CAAC,IAAI,GAAK;gBAAC;gBAAK,SAAS,GAAG,CAAC;aAAM;QAC1F,IAAI,GAAG,CAAC,KAAK;QACb,sBAAsB;QACtB,OAAO;IACT,GAAG;QAAC;QAAqB;QAAuB;QAAc,MAAM,UAAU;QAAE;KAAmB;IAEnG,IAAI,YAAY,CAAA,GAAA,kBAAU,EAAE;QAC1B,kBAAkB;IACpB,GAAG;QAAC;KAAkB;IAEtB,IAAI,eAAe,CAAA,GAAA,cAAM,EAAE,IACzB,aAAa,iBAAiB,CAAC,YAAY,MAAM,UAAU,EAAE,YAC7D;QAAC;QAAY,MAAM,UAAU;QAAE;QAAW;KAAa;IAEzD,OAAO,CAAA,GAAA,cAAM,EAAE,IAAO,CAAA;4BACpB;kCACA;yBACA;uBACA;YACA,gBAAgB,CAAC,MACf,aAAa,cAAc,CAAC;YAC9B,mBAAmB,CAAC,MAClB,aAAa,iBAAiB,CAAC;YACjC,mBAAmB,CAAC,MAClB,aAAa,iBAAiB,CAAC;YACjC,YAAY;0BACZ;QACF,CAAA,GAAI;QACF;QACA;QACA;QACA;QACA;QACA;QACA;KACD;AACH","sources":["packages/@react-stately/table/src/useTableColumnResizeState.ts"],"sourcesContent":["/*\n * Copyright 2022 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 {ColumnSize} from '@react-types/table';\nimport {GridNode} from '@react-types/grid';\nimport {Key} from '@react-types/shared';\nimport {TableColumnLayout} from './TableColumnLayout';\nimport {TableState} from './useTableState';\nimport {useCallback, useMemo, useState} from 'react';\n\nexport interface TableColumnResizeStateProps<T> {\n /**\n * Current width of the table or table viewport that the columns\n * should be calculated against.\n */\n tableWidth: number,\n /** A function that is called to find the default width for a given column. */\n getDefaultWidth?: (node: GridNode<T>) => ColumnSize | null | undefined,\n /** A function that is called to find the default minWidth for a given column. */\n getDefaultMinWidth?: (node: GridNode<T>) => ColumnSize | null | undefined\n}\nexport interface TableColumnResizeState<T> {\n /**\n * Called to update the state that a resize event has occurred.\n * Returns the new widths for all columns based on the resized column.\n */\n updateResizedColumns: (key: Key, width: number) => Map<Key, ColumnSize>,\n /** Callback for when onColumnResize has started. */\n startResize: (key: Key) => void,\n /** Callback for when onColumnResize has ended. */\n endResize: () => void,\n /** Gets the current width for the specified column. */\n getColumnWidth: (key: Key) => number,\n /** Gets the current minWidth for the specified column. */\n getColumnMinWidth: (key: Key) => number,\n /** Gets the current maxWidth for the specified column. */\n getColumnMaxWidth: (key: Key) => number,\n /** Key of the currently resizing column. */\n resizingColumn: Key | null,\n /** A reference to the table state. */\n tableState: TableState<T>,\n /** A map of the current column widths. */\n columnWidths: Map<Key, number>\n}\n\n/**\n * Provides column width state management for a table component with column resizing support. Handles building\n * a map of column widths calculated from the table's width and any provided column width information from the collection.\n * In addition, it tracks the currently resizing column and provides callbacks for updating the widths upon resize operations.\n * @param props - Props for the table.\n * @param state - State for the table, as returned by `useTableState`.\n */\nexport function useTableColumnResizeState<T>(props: TableColuLine truncated
@@ -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 CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC yC zC","2":"6 7 8 9 xC TC J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB 0C 1C","194":"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"},D:{"1":"0 1 2 3 4 5 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":"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","66":"wB"},E:{"1":"cC PC AD QC dC eC fC gC hC BD RC iC jC kC lC mC CD SC nC oC pC qC rC sC tC DD ED","2":"J ZB K D E F A B C L M G 2C ZC 3C 4C 5C 6C aC NC OC 7C 8C 9C bC"},F:{"1":"0 1 2 3 4 5 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","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 FD GD HD ID NC uC JD OC","66":"jB kB"},G:{"1":"cC PC eD QC dC eC fC gC hC fD RC iC jC kC lC mC gD SC nC oC pC qC rC sC tC","2":"E ZC KD vC LD MD ND OD PD QD RD SD TD UD VD WD XD YD ZD aD bD cD dD bC"},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 pD qD rD sD aC tD uD vD wD xD QC RC SC yD","2":"J oD"},Q:{"1":"zD"},R:{"1":"0D"},S:{"1":"2D","194":"1D"}},B:2,C:"CSS Containment",D:true};
@@ -0,0 +1 @@
{"mappings":";;;;;;;;;;;AAoCO,SAAS,0CAAa,QAA4B,CAAC,CAAC;IACzD,IAAI,aACF,YAAY,oBACZ,WAAW,UACX,MAAM,EACP,GAAG;IACJ,IAAI,QAAQ,CAAA,GAAA,mBAAK,EAAE;QACjB,WAAW;QACX,gBAAgB,aAAa,CAAA,GAAA,2CAAa;IAC5C;IACA,IAAI,CAAC,WAAW,WAAW,GAAG,CAAA,GAAA,qBAAO,EAAE;IACvC,IAAI,CAAC,qBAAqB,gBAAgB,GAAG,CAAA,GAAA,qBAAO,EAAE,IAAM,MAAM,OAAO,CAAC,SAAS,IAAI,MAAM,OAAO,CAAC,cAAc;IAEnH,IAAI,cAAc,CAAA,GAAA,wBAAU,EAAE,IAAM,gBAAgB,MAAM,OAAO,CAAC,SAAS,IAAI,MAAM,OAAO,CAAC,cAAc,GAAG,EAAE;IAEhH,IAAI,gBAAgB,CAAA,GAAA,wBAAU,EAAE,CAAA;QAC9B,MAAM,OAAO,CAAC,SAAS,GAAG;QAC1B,WAAW;QACX;IACF,GAAG;QAAC;KAAY;IAEhB,CAAA,GAAA,oDAAsB,EAAE,CAAC;QACvB,MAAM,OAAO,CAAC,cAAc,GAAG;QAC/B;IACF,GAAG,EAAE,EAAE;qBAAC;IAAW;IAEnB,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,qCAAO,EAAE;QAC1B,YAAY;uBACZ;IACF;IAEA,IAAI,oBAAC,gBAAgB,EAAC,GAAG,CAAA,GAAA,2CAAa,EAAE;QACtC,YAAY,CAAC;QACb,qBAAqB;IACvB;IAEA,OAAO;mBACL;QACA,gBAAgB;QAChB,YAAY,SAAS,mBAAmB;IAC1C;AACF","sources":["packages/@react-aria/focus/src/useFocusRing.ts"],"sourcesContent":["import {DOMAttributes} from '@react-types/shared';\nimport {isFocusVisible, useFocus, useFocusVisibleListener, useFocusWithin} from '@react-aria/interactions';\nimport {useCallback, useRef, useState} from 'react';\n\nexport interface AriaFocusRingProps {\n /**\n * Whether to show the focus ring when something\n * inside the container element has focus (true), or\n * only if the container itself has focus (false).\n * @default 'false'\n */\n within?: boolean,\n\n /** Whether the element is a text input. */\n isTextInput?: boolean,\n\n /** Whether the element will be auto focused. */\n autoFocus?: boolean\n}\n\nexport interface FocusRingAria {\n /** Whether the element is currently focused. */\n isFocused: boolean,\n\n /** Whether keyboard focus should be visible. */\n isFocusVisible: boolean,\n\n /** Props to apply to the container element with the focus ring. */\n focusProps: DOMAttributes\n}\n\n/**\n * Determines whether a focus ring should be shown to indicate keyboard focus.\n * Focus rings are visible only when the user is interacting with a keyboard,\n * not with a mouse, touch, or other input methods.\n */\nexport function useFocusRing(props: AriaFocusRingProps = {}): FocusRingAria {\n let {\n autoFocus = false,\n isTextInput,\n within\n } = props;\n let state = useRef({\n isFocused: false,\n isFocusVisible: autoFocus || isFocusVisible()\n });\n let [isFocused, setFocused] = useState(false);\n let [isFocusVisibleState, setFocusVisible] = useState(() => state.current.isFocused && state.current.isFocusVisible);\n\n let updateState = useCallback(() => setFocusVisible(state.current.isFocused && state.current.isFocusVisible), []);\n\n let onFocusChange = useCallback(isFocused => {\n state.current.isFocused = isFocused;\n setFocused(isFocused);\n updateState();\n }, [updateState]);\n\n useFocusVisibleListener((isFocusVisible) => {\n state.current.isFocusVisible = isFocusVisible;\n updateState();\n }, [], {isTextInput});\n\n let {focusProps} = useFocus({\n isDisabled: within,\n onFocusChange\n });\n\n let {focusWithinProps} = useFocusWithin({\n isDisabled: !within,\n onFocusWithinChange: onFocusChange\n });\n\n return {\n isFocused,\n isFocusVisible: isFocusVisibleState,\n focusProps: within ? focusWithinProps : focusProps\n };\n}\n"],"names":[],"version":3,"file":"useFocusRing.main.js.map"}
@@ -0,0 +1,5 @@
'use strict';
// do NOT remove this file - it would break pre-compiled schemas
// https://github.com/ajv-validator/ajv/issues/889
module.exports = require('fast-deep-equal');
@@ -0,0 +1,33 @@
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $Date = GetIntrinsic('%Date%');
var $TypeError = require('es-errors/type');
var isNaN = require('math-intrinsics/isNaN');
var callBound = require('call-bound');
var $indexOf = callBound('String.prototype.indexOf');
var $slice = callBound('String.prototype.slice');
var $toTimeString = callBound('Date.prototype.toTimeString');
// https://262.ecma-international.org/9.0/#sec-timezoneestring
module.exports = function TimeZoneString(tv) {
if (typeof tv !== 'number' || isNaN(tv)) {
throw new $TypeError('Assertion failed: `tv` must be a non-NaN Number'); // steps 1 - 2
}
// 3. Let offset be LocalTZA(tv, true).
// 4. If offset ≥ 0, let offsetSign be "+"; otherwise, let offsetSign be "-".
// 5. Let offsetMin be the String representation of MinFromTime(abs(offset)), formatted as a two-digit decimal number, padded to the left with a zero if necessary.
// 6. Let offsetHour be the String representation of HourFromTime(abs(offset)), formatted as a two-digit decimal number, padded to the left with a zero if necessary.
// 7. Let tzName be an implementation-defined string that is either the empty string or the string-concatenation of the code unit 0x0020 (SPACE), the code unit 0x0028 (LEFT PARENTHESIS), an implementation-dependent timezone name, and the code unit 0x0029 (RIGHT PARENTHESIS).
// 8. Return the string-concatenation of offsetSign, offsetHour, offsetMin, and tzName.
// hack until LocalTZA, and "implementation-defined string" are available
var ts = $toTimeString(new $Date(tv));
return $slice(ts, $indexOf(ts, '(') + 1, $indexOf(ts, ')'));
};
@@ -0,0 +1,726 @@
/**
* Note: this file should import all other files for type discovery and declaration merging
*/
import type {
ActionCreatorWithPayload,
Dispatch,
Middleware,
Reducer,
ThunkAction,
ThunkDispatch,
UnknownAction,
} from '@reduxjs/toolkit'
import { enablePatches } from '../utils/immerImports'
import type { Api, Module } from '../apiTypes'
import type { BaseQueryFn } from '../baseQueryTypes'
import type { InternalSerializeQueryArgs } from '../defaultSerializeQueryArgs'
import type {
AssertTagTypes,
EndpointDefinitions,
InfiniteQueryDefinition,
MutationDefinition,
QueryArgFrom,
QueryArgFromAnyQuery,
QueryDefinition,
TagDescription,
} from '../endpointDefinitions'
import {
isInfiniteQueryDefinition,
isMutationDefinition,
isQueryDefinition,
} from '../endpointDefinitions'
import { assertCast, safeAssign } from '../tsHelpers'
import type {
CombinedState,
MutationKeys,
QueryKeys,
RootState,
} from './apiState'
import type {
BuildInitiateApiEndpointMutation,
BuildInitiateApiEndpointQuery,
MutationActionCreatorResult,
QueryActionCreatorResult,
InfiniteQueryActionCreatorResult,
BuildInitiateApiEndpointInfiniteQuery,
} from './buildInitiate'
import { buildInitiate } from './buildInitiate'
import type {
ReferenceCacheCollection,
ReferenceCacheLifecycle,
ReferenceQueryLifecycle,
} from './buildMiddleware'
import { buildMiddleware } from './buildMiddleware'
import type {
BuildSelectorsApiEndpointInfiniteQuery,
BuildSelectorsApiEndpointMutation,
BuildSelectorsApiEndpointQuery,
} from './buildSelectors'
import { buildSelectors } from './buildSelectors'
import type { SliceActions, UpsertEntries } from './buildSlice'
import { buildSlice } from './buildSlice'
import type {
AllQueryKeys,
BuildThunksApiEndpointInfiniteQuery,
BuildThunksApiEndpointMutation,
BuildThunksApiEndpointQuery,
PatchQueryDataThunk,
QueryArgFromAnyQueryDefinition,
UpdateQueryDataThunk,
UpsertQueryDataThunk,
} from './buildThunks'
import { buildThunks } from './buildThunks'
import { createSelector as _createSelector } from './rtkImports'
import { onFocus, onFocusLost, onOffline, onOnline } from './setupListeners'
import type { InternalMiddlewareState } from './buildMiddleware/types'
import { getOrInsertComputed } from '../utils'
/**
* `ifOlderThan` - (default: `false` | `number`) - _number is value in seconds_
* - If specified, it will only run the query if the difference between `new Date()` and the last `fulfilledTimeStamp` is greater than the given value
*
* @overloadSummary
* `force`
* - If `force: true`, it will ignore the `ifOlderThan` value if it is set and the query will be run even if it exists in the cache.
*/
export type PrefetchOptions =
| {
ifOlderThan?: false | number
}
| { force?: boolean }
export const coreModuleName = /* @__PURE__ */ Symbol()
export type CoreModule =
| typeof coreModuleName
| ReferenceCacheLifecycle
| ReferenceQueryLifecycle
| ReferenceCacheCollection
export type ThunkWithReturnValue<T> = ThunkAction<T, any, any, UnknownAction>
export interface ApiModules<
// eslint-disable-next-line @typescript-eslint/no-unused-vars
BaseQuery extends BaseQueryFn,
Definitions extends EndpointDefinitions,
ReducerPath extends string,
TagTypes extends string,
> {
[coreModuleName]: {
/**
* This api's reducer should be mounted at `store[api.reducerPath]`.
*
* @example
* ```ts
* configureStore({
* reducer: {
* [api.reducerPath]: api.reducer,
* },
* middleware: (getDefaultMiddleware) => getDefaultMiddleware().concat(api.middleware),
* })
* ```
*/
reducerPath: ReducerPath
/**
* Internal actions not part of the public API. Note: These are subject to change at any given time.
*/
internalActions: InternalActions
/**
* A standard redux reducer that enables core functionality. Make sure it's included in your store.
*
* @example
* ```ts
* configureStore({
* reducer: {
* [api.reducerPath]: api.reducer,
* },
* middleware: (getDefaultMiddleware) => getDefaultMiddleware().concat(api.middleware),
* })
* ```
*/
reducer: Reducer<
CombinedState<Definitions, TagTypes, ReducerPath>,
UnknownAction
>
/**
* This is a standard redux middleware and is responsible for things like polling, garbage collection and a handful of other things. Make sure it's included in your store.
*
* @example
* ```ts
* configureStore({
* reducer: {
* [api.reducerPath]: api.reducer,
* },
* middleware: (getDefaultMiddleware) => getDefaultMiddleware().concat(api.middleware),
* })
* ```
*/
middleware: Middleware<
{},
RootState<Definitions, string, ReducerPath>,
ThunkDispatch<any, any, UnknownAction>
>
/**
* A collection of utility thunks for various situations.
*/
util: {
/**
* A thunk that (if dispatched) will return a specific running query, identified
* by `endpointName` and `arg`.
* If that query is not running, dispatching the thunk will result in `undefined`.
*
* Can be used to await a specific query triggered in any way,
* including via hook calls or manually dispatching `initiate` actions.
*
* See https://redux-toolkit.js.org/rtk-query/usage/server-side-rendering for details.
*/
getRunningQueryThunk<EndpointName extends AllQueryKeys<Definitions>>(
endpointName: EndpointName,
arg: QueryArgFromAnyQueryDefinition<Definitions, EndpointName>,
): ThunkWithReturnValue<
| QueryActionCreatorResult<
Definitions[EndpointName] & { type: 'query' }
>
| InfiniteQueryActionCreatorResult<
Definitions[EndpointName] & { type: 'infinitequery' }
>
| undefined
>
/**
* A thunk that (if dispatched) will return a specific running mutation, identified
* by `endpointName` and `fixedCacheKey` or `requestId`.
* If that mutation is not running, dispatching the thunk will result in `undefined`.
*
* Can be used to await a specific mutation triggered in any way,
* including via hook trigger functions or manually dispatching `initiate` actions.
*
* See https://redux-toolkit.js.org/rtk-query/usage/server-side-rendering for details.
*/
getRunningMutationThunk<EndpointName extends MutationKeys<Definitions>>(
endpointName: EndpointName,
fixedCacheKeyOrRequestId: string,
): ThunkWithReturnValue<
| MutationActionCreatorResult<
Definitions[EndpointName] & { type: 'mutation' }
>
| undefined
>
/**
* A thunk that (if dispatched) will return all running queries.
*
* Useful for SSR scenarios to await all running queries triggered in any way,
* including via hook calls or manually dispatching `initiate` actions.
*
* See https://redux-toolkit.js.org/rtk-query/usage/server-side-rendering for details.
*/
getRunningQueriesThunk(): ThunkWithReturnValue<
Array<
QueryActionCreatorResult<any> | InfiniteQueryActionCreatorResult<any>
>
>
/**
* A thunk that (if dispatched) will return all running mutations.
*
* Useful for SSR scenarios to await all running mutations triggered in any way,
* including via hook calls or manually dispatching `initiate` actions.
*
* See https://redux-toolkit.js.org/rtk-query/usage/server-side-rendering for details.
*/
getRunningMutationsThunk(): ThunkWithReturnValue<
Array<MutationActionCreatorResult<any>>
>
/**
* A Redux thunk that can be used to manually trigger pre-fetching of data.
*
* The thunk accepts three arguments: the name of the endpoint we are updating (such as `'getPost'`), the appropriate query arg values to construct the desired cache key, and a set of options used to determine if the data actually should be re-fetched based on cache staleness.
*
* React Hooks users will most likely never need to use this directly, as the `usePrefetch` hook will dispatch this thunk internally as needed when you call the prefetching function supplied by the hook.
*
* @example
*
* ```ts no-transpile
* dispatch(api.util.prefetch('getPosts', undefined, { force: true }))
* ```
*/
prefetch<EndpointName extends QueryKeys<Definitions>>(
endpointName: EndpointName,
arg: QueryArgFrom<Definitions[EndpointName]>,
options?: PrefetchOptions,
): ThunkAction<void, any, any, UnknownAction>
/**
* A Redux thunk action creator that, when dispatched, creates and applies a set of JSON diff/patch objects to the current state. This immediately updates the Redux state with those changes.
*
* The thunk action creator accepts three arguments: the name of the endpoint we are updating (such as `'getPost'`), the appropriate query arg values to construct the desired cache key, and an `updateRecipe` callback function. The callback receives an Immer-wrapped `draft` of the current state, and may modify the draft to match the expected results after the mutation completes successfully.
*
* The thunk executes _synchronously_, and returns an object containing `{patches: Patch[], inversePatches: Patch[], undo: () => void}`. The `patches` and `inversePatches` are generated using Immer's [`produceWithPatches` method](https://immerjs.github.io/immer/patches).
*
* This is typically used as the first step in implementing optimistic updates. The generated `inversePatches` can be used to revert the updates by calling `dispatch(patchQueryData(endpointName, arg, inversePatches))`. Alternatively, the `undo` method can be called directly to achieve the same effect.
*
* Note that the first two arguments (`endpointName` and `arg`) are used to determine which existing cache entry to update. If no existing cache entry is found, the `updateRecipe` callback will not run.
*
* @example
*
* ```ts
* const patchCollection = dispatch(
* api.util.updateQueryData('getPosts', undefined, (draftPosts) => {
* draftPosts.push({ id: 1, name: 'Teddy' })
* })
* )
* ```
*/
updateQueryData: UpdateQueryDataThunk<
Definitions,
RootState<Definitions, string, ReducerPath>
>
/**
* A Redux thunk action creator that, when dispatched, acts as an artificial API request to upsert a value into the cache.
*
* The thunk action creator accepts three arguments: the name of the endpoint we are updating (such as `'getPost'`), the appropriate query arg values to construct the desired cache key, and the data to upsert.
*
* If no cache entry for that cache key exists, a cache entry will be created and the data added. If a cache entry already exists, this will _overwrite_ the existing cache entry data.
*
* The thunk executes _asynchronously_, and returns a promise that resolves when the store has been updated.
*
* If dispatched while an actual request is in progress, both the upsert and request will be handled as soon as they resolve, resulting in a "last result wins" update behavior.
*
* @example
*
* ```ts
* await dispatch(
* api.util.upsertQueryData('getPost', {id: 1}, {id: 1, text: "Hello!"})
* )
* ```
*/
upsertQueryData: UpsertQueryDataThunk<
Definitions,
RootState<Definitions, string, ReducerPath>
>
/**
* A Redux thunk that applies a JSON diff/patch array to the cached data for a given query result. This immediately updates the Redux state with those changes.
*
* The thunk accepts three arguments: the name of the endpoint we are updating (such as `'getPost'`), the appropriate query arg values to construct the desired cache key, and a JSON diff/patch array as produced by Immer's `produceWithPatches`.
*
* This is typically used as the second step in implementing optimistic updates. If a request fails, the optimistically-applied changes can be reverted by dispatching `patchQueryData` with the `inversePatches` that were generated by `updateQueryData` earlier.
*
* In cases where it is desired to simply revert the previous changes, it may be preferable to call the `undo` method returned from dispatching `updateQueryData` instead.
*
* @example
* ```ts
* const patchCollection = dispatch(
* api.util.updateQueryData('getPosts', undefined, (draftPosts) => {
* draftPosts.push({ id: 1, name: 'Teddy' })
* })
* )
*
* // later
* dispatch(
* api.util.patchQueryData('getPosts', undefined, patchCollection.inversePatches)
* )
*
* // or
* patchCollection.undo()
* ```
*/
patchQueryData: PatchQueryDataThunk<
Definitions,
RootState<Definitions, string, ReducerPath>
>
/**
* A Redux action creator that can be dispatched to manually reset the api state completely. This will immediately remove all existing cache entries, and all queries will be considered 'uninitialized'.
*
* @example
*
* ```ts
* dispatch(api.util.resetApiState())
* ```
*/
resetApiState: SliceActions['resetApiState']
upsertQueryEntries: UpsertEntries<Definitions>
/**
* A Redux action creator that can be used to manually invalidate cache tags for [automated re-fetching](../../usage/automated-refetching.mdx).
*
* The action creator accepts one argument: the cache tags to be invalidated. It returns an action with those tags as a payload, and the corresponding `invalidateTags` action type for the api.
*
* Dispatching the result of this action creator will [invalidate](../../usage/automated-refetching.mdx#invalidating-cache-data) the given tags, causing queries to automatically re-fetch if they are subscribed to cache data that [provides](../../usage/automated-refetching.mdx#providing-cache-data) the corresponding tags.
*
* The array of tags provided to the action creator should be in one of the following formats, where `TagType` is equal to a string provided to the [`tagTypes`](../createApi.mdx#tagtypes) property of the api:
*
* - `[TagType]`
* - `[{ type: TagType }]`
* - `[{ type: TagType, id: number | string }]`
*
* @example
*
* ```ts
* dispatch(api.util.invalidateTags(['Post']))
* dispatch(api.util.invalidateTags([{ type: 'Post', id: 1 }]))
* dispatch(
* api.util.invalidateTags([
* { type: 'Post', id: 1 },
* { type: 'Post', id: 'LIST' },
* ])
* )
* ```
*/
invalidateTags: ActionCreatorWithPayload<
Array<TagDescription<TagTypes> | null | undefined>,
string
>
/**
* A function to select all `{ endpointName, originalArgs, queryCacheKey }` combinations that would be invalidated by a specific set of tags.
*
* Can be used for mutations that want to do optimistic updates instead of invalidating a set of tags, but don't know exactly what they need to update.
*/
selectInvalidatedBy: (
state: RootState<Definitions, string, ReducerPath>,
tags: ReadonlyArray<TagDescription<TagTypes> | null | undefined>,
) => Array<{
endpointName: string
originalArgs: any
queryCacheKey: string
}>
/**
* A function to select all arguments currently cached for a given endpoint.
*
* Can be used for mutations that want to do optimistic updates instead of invalidating a set of tags, but don't know exactly what they need to update.
*/
selectCachedArgsForQuery: <QueryName extends AllQueryKeys<Definitions>>(
state: RootState<Definitions, string, ReducerPath>,
queryName: QueryName,
) => Array<QueryArgFromAnyQuery<Definitions[QueryName]>>
}
/**
* Endpoints based on the input endpoints provided to `createApi`, containing `select` and `action matchers`.
*/
endpoints: {
[K in keyof Definitions]: Definitions[K] extends QueryDefinition<
any,
any,
any,
any,
any
>
? ApiEndpointQuery<Definitions[K], Definitions>
: Definitions[K] extends MutationDefinition<any, any, any, any, any>
? ApiEndpointMutation<Definitions[K], Definitions>
: Definitions[K] extends InfiniteQueryDefinition<
any,
any,
any,
any,
any
>
? ApiEndpointInfiniteQuery<Definitions[K], Definitions>
: never
}
}
}
export interface ApiEndpointQuery<
// eslint-disable-next-line @typescript-eslint/no-unused-vars
Definition extends QueryDefinition<any, any, any, any, any>,
// eslint-disable-next-line @typescript-eslint/no-unused-vars
Definitions extends EndpointDefinitions,
> extends BuildThunksApiEndpointQuery<Definition>,
BuildInitiateApiEndpointQuery<Definition>,
BuildSelectorsApiEndpointQuery<Definition, Definitions> {
name: string
/**
* All of these are `undefined` at runtime, purely to be used in TypeScript declarations!
*/
Types: NonNullable<Definition['Types']>
}
export interface ApiEndpointInfiniteQuery<
// eslint-disable-next-line @typescript-eslint/no-unused-vars
Definition extends InfiniteQueryDefinition<any, any, any, any, any>,
// eslint-disable-next-line @typescript-eslint/no-unused-vars
Definitions extends EndpointDefinitions,
> extends BuildThunksApiEndpointInfiniteQuery<Definition>,
BuildInitiateApiEndpointInfiniteQuery<Definition>,
BuildSelectorsApiEndpointInfiniteQuery<Definition, Definitions> {
name: string
/**
* All of these are `undefined` at runtime, purely to be used in TypeScript declarations!
*/
Types: NonNullable<Definition['Types']>
}
// eslint-disable-next-line @typescript-eslint/no-unused-vars
export interface ApiEndpointMutation<
// eslint-disable-next-line @typescript-eslint/no-unused-vars
Definition extends MutationDefinition<any, any, any, any, any>,
// eslint-disable-next-line @typescript-eslint/no-unused-vars
Definitions extends EndpointDefinitions,
> extends BuildThunksApiEndpointMutation<Definition>,
BuildInitiateApiEndpointMutation<Definition>,
BuildSelectorsApiEndpointMutation<Definition, Definitions> {
name: string
/**
* All of these are `undefined` at runtime, purely to be used in TypeScript declarations!
*/
Types: NonNullable<Definition['Types']>
}
export type ListenerActions = {
/**
* Will cause the RTK Query middleware to trigger any refetchOnReconnect-related behavior
* @link https://redux-toolkit.js.org/rtk-query/api/setupListeners
*/
onOnline: typeof onOnline
onOffline: typeof onOffline
/**
* Will cause the RTK Query middleware to trigger any refetchOnFocus-related behavior
* @link https://redux-toolkit.js.org/rtk-query/api/setupListeners
*/
onFocus: typeof onFocus
onFocusLost: typeof onFocusLost
}
export type InternalActions = SliceActions & ListenerActions
export interface CoreModuleOptions {
/**
* A selector creator (usually from `reselect`, or matching the same signature)
*/
createSelector?: typeof _createSelector
}
/**
* Creates a module containing the basic redux logic for use with `buildCreateApi`.
*
* @example
* ```ts
* const createBaseApi = buildCreateApi(coreModule());
* ```
*/
export const coreModule = ({
createSelector = _createSelector,
}: CoreModuleOptions = {}): Module<CoreModule> => ({
name: coreModuleName,
init(
api,
{
baseQuery,
tagTypes,
reducerPath,
serializeQueryArgs,
keepUnusedDataFor,
refetchOnMountOrArgChange,
refetchOnFocus,
refetchOnReconnect,
invalidationBehavior,
onSchemaFailure,
catchSchemaFailure,
skipSchemaValidation,
},
context,
) {
enablePatches()
assertCast<InternalSerializeQueryArgs>(serializeQueryArgs)
const assertTagType: AssertTagTypes = (tag) => {
if (
typeof process !== 'undefined' &&
process.env.NODE_ENV === 'development'
) {
if (!tagTypes.includes(tag.type as any)) {
console.error(
`Tag type '${tag.type}' was used, but not specified in \`tagTypes\`!`,
)
}
}
return tag
}
Object.assign(api, {
reducerPath,
endpoints: {},
internalActions: {
onOnline,
onOffline,
onFocus,
onFocusLost,
},
util: {},
})
const selectors = buildSelectors({
serializeQueryArgs: serializeQueryArgs as any,
reducerPath,
createSelector,
})
const {
selectInvalidatedBy,
selectCachedArgsForQuery,
buildQuerySelector,
buildInfiniteQuerySelector,
buildMutationSelector,
} = selectors
safeAssign(api.util, { selectInvalidatedBy, selectCachedArgsForQuery })
const {
queryThunk,
infiniteQueryThunk,
mutationThunk,
patchQueryData,
updateQueryData,
upsertQueryData,
prefetch,
buildMatchThunkActions,
} = buildThunks({
baseQuery,
reducerPath,
context,
api,
serializeQueryArgs,
assertTagType,
selectors,
onSchemaFailure,
catchSchemaFailure,
skipSchemaValidation,
})
const { reducer, actions: sliceActions } = buildSlice({
context,
queryThunk,
infiniteQueryThunk,
mutationThunk,
serializeQueryArgs,
reducerPath,
assertTagType,
config: {
refetchOnFocus,
refetchOnReconnect,
refetchOnMountOrArgChange,
keepUnusedDataFor,
reducerPath,
invalidationBehavior,
},
})
safeAssign(api.util, {
patchQueryData,
updateQueryData,
upsertQueryData,
prefetch,
resetApiState: sliceActions.resetApiState,
upsertQueryEntries: sliceActions.cacheEntriesUpserted as any,
})
safeAssign(api.internalActions, sliceActions)
const internalStateMap = new WeakMap<Dispatch, InternalMiddlewareState>()
const getInternalState = (dispatch: Dispatch) => {
const state = getOrInsertComputed(internalStateMap, dispatch, () => ({
currentSubscriptions: new Map(),
currentPolls: new Map(),
runningQueries: new Map(),
runningMutations: new Map(),
}))
return state
}
const {
buildInitiateQuery,
buildInitiateInfiniteQuery,
buildInitiateMutation,
getRunningMutationThunk,
getRunningMutationsThunk,
getRunningQueriesThunk,
getRunningQueryThunk,
} = buildInitiate({
queryThunk,
mutationThunk,
infiniteQueryThunk,
api,
serializeQueryArgs: serializeQueryArgs as any,
context,
getInternalState,
})
safeAssign(api.util, {
getRunningMutationThunk,
getRunningMutationsThunk,
getRunningQueryThunk,
getRunningQueriesThunk,
})
const { middleware, actions: middlewareActions } = buildMiddleware({
reducerPath,
context,
queryThunk,
mutationThunk,
infiniteQueryThunk,
api,
assertTagType,
selectors,
getRunningQueryThunk,
getInternalState,
})
safeAssign(api.util, middlewareActions)
safeAssign(api, { reducer: reducer as any, middleware })
return {
name: coreModuleName,
injectEndpoint(endpointName, definition) {
const anyApi = api as any as Api<
any,
Record<string, any>,
string,
string,
CoreModule
>
const endpoint = (anyApi.endpoints[endpointName] ??= {} as any)
if (isQueryDefinition(definition)) {
safeAssign(
endpoint,
{
name: endpointName,
select: buildQuerySelector(endpointName, definition),
initiate: buildInitiateQuery(endpointName, definition),
},
buildMatchThunkActions(queryThunk, endpointName),
)
}
if (isMutationDefinition(definition)) {
safeAssign(
endpoint,
{
name: endpointName,
select: buildMutationSelector(),
initiate: buildInitiateMutation(endpointName),
},
buildMatchThunkActions(mutationThunk, endpointName),
)
}
if (isInfiniteQueryDefinition(definition)) {
safeAssign(
endpoint,
{
name: endpointName,
select: buildInfiniteQuerySelector(endpointName, definition),
initiate: buildInitiateInfiniteQuery(endpointName, definition),
},
buildMatchThunkActions(queryThunk, endpointName),
)
}
},
}
},
})
@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2015 Linus Unnebäck
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,42 @@
// Copyright (c) 2015 Ryan Prichard
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to
// deal in the Software without restriction, including without limitation the
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
// sell copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
#ifndef UNIX_ADAPTER_WAKEUP_FD_H
#define UNIX_ADAPTER_WAKEUP_FD_H
class WakeupFd {
public:
WakeupFd();
~WakeupFd();
int fd() { return m_pipeReadFd; }
void set();
void reset();
private:
// Do not allow copying the WakeupFd object.
WakeupFd(const WakeupFd &other);
WakeupFd &operator=(const WakeupFd &other);
private:
int m_pipeReadFd;
int m_pipeWriteFd;
};
#endif // UNIX_ADAPTER_WAKEUP_FD_H
@@ -0,0 +1,99 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.clearGlobCache = clearGlobCache;
exports.resolveProjectList = resolveProjectList;
exports.clearGlobResolutionCache = clearGlobResolutionCache;
const debug_1 = __importDefault(require("debug"));
const fast_glob_1 = require("fast-glob");
const is_glob_1 = __importDefault(require("is-glob"));
const shared_1 = require("../create-program/shared");
const ExpiringCache_1 = require("./ExpiringCache");
const log = (0, debug_1.default)('typescript-eslint:typescript-estree:parseSettings:resolveProjectList');
let RESOLUTION_CACHE = null;
function clearGlobCache() {
RESOLUTION_CACHE?.clear();
}
/**
* Normalizes, sanitizes, resolves and filters the provided project paths
*/
function resolveProjectList(options) {
const sanitizedProjects = [];
// Normalize and sanitize the project paths
if (options.project != null) {
for (const project of options.project) {
if (typeof project === 'string') {
sanitizedProjects.push(project);
}
}
}
if (sanitizedProjects.length === 0) {
return new Map();
}
const projectFolderIgnoreList = (options.projectFolderIgnoreList ?? ['**/node_modules/**'])
.filter(folder => typeof folder === 'string')
// prefix with a ! for not match glob
.map(folder => (folder.startsWith('!') ? folder : `!${folder}`));
const cacheKey = getHash({
project: sanitizedProjects,
projectFolderIgnoreList,
tsconfigRootDir: options.tsconfigRootDir,
});
if (RESOLUTION_CACHE == null) {
// note - we initialize the global cache based on the first config we encounter.
// this does mean that you can't have multiple lifetimes set per folder
// I doubt that anyone will really bother reconfiguring this, let alone
// try to do complicated setups, so we'll deal with this later if ever.
RESOLUTION_CACHE = new ExpiringCache_1.ExpiringCache(options.singleRun
? 'Infinity'
: (options.cacheLifetime?.glob ??
ExpiringCache_1.DEFAULT_TSCONFIG_CACHE_DURATION_SECONDS));
}
else {
const cached = RESOLUTION_CACHE.get(cacheKey);
if (cached) {
return cached;
}
}
// Transform glob patterns into paths
const nonGlobProjects = sanitizedProjects.filter(project => !(0, is_glob_1.default)(project));
const globProjects = sanitizedProjects.filter(project => (0, is_glob_1.default)(project));
let globProjectPaths = [];
if (globProjects.length > 0) {
// Although fast-glob supports multiple patterns, fast-glob returns arbitrary order of results
// to improve performance. To ensure the order is correct, we need to call fast-glob for each pattern
// separately and then concatenate the results in patterns' order.
globProjectPaths = globProjects.flatMap(pattern => (0, fast_glob_1.sync)(pattern, {
cwd: options.tsconfigRootDir,
ignore: projectFolderIgnoreList,
}));
}
const uniqueCanonicalProjectPaths = new Map([...nonGlobProjects, ...globProjectPaths].map(project => [
(0, shared_1.getCanonicalFileName)((0, shared_1.ensureAbsolutePath)(project, options.tsconfigRootDir)),
(0, shared_1.ensureAbsolutePath)(project, options.tsconfigRootDir),
]));
log('parserOptions.project (excluding ignored) matched projects: %s', uniqueCanonicalProjectPaths);
RESOLUTION_CACHE.set(cacheKey, uniqueCanonicalProjectPaths);
return uniqueCanonicalProjectPaths;
}
function getHash({ project, projectFolderIgnoreList, tsconfigRootDir, }) {
// create a stable representation of the config
const hashObject = {
tsconfigRootDir,
// the project order does matter and can impact the resolved globs
project,
// the ignore order won't doesn't ever matter
projectFolderIgnoreList: [...projectFolderIgnoreList].sort(),
};
return (0, shared_1.createHash)(JSON.stringify(hashObject));
}
/**
* Exported for testing purposes only
* @internal
*/
function clearGlobResolutionCache() {
RESOLUTION_CACHE?.clear();
RESOLUTION_CACHE = null;
}
@@ -0,0 +1 @@
{"version":3,"file":"getExtendedLifecycle.js","sourceRoot":"","sources":["../../../../src/metadata/calculations/getExtendedLifecycle.ts"],"names":[],"mappings":";;AAgBA,oDA0BC;AAtCD,SAAS,oBAAoB,CAC3B,MAAe,EACf,OAAe,EACf,UAAkB;IAElB,IAAI,MAAM,EAAE,CAAC;QACX,OAAO,IAAI,GAAG,CAAC,CAAC,GAAG,OAAO,EAAE,GAAG,UAAU,CAAC,CAAC,CAAC;IAC9C,CAAC;IAED,OAAO,UAAU,CAAC;AACpB,CAAC;AAED,SAAgB,oBAAoB,CAClC,OAA0B,EAC1B,qBAAoC,EACpC,YAA2B;IAE3B,MAAM,0BAA0B,GAC9B,OAAO,CAAC,SAAS,EAAE,0BAA0B,IAAI,IAAI,CAAC;IACxD,MAAM,uBAAuB,GAC3B,OAAO,CAAC,SAAS,EAAE,uBAAuB,IAAI,IAAI,CAAC;IAErD,MAAM,qBAAqB,GAAyB,oBAAoB,CACtE,uBAAuB,EACvB,qBAAqB,CAAC,SAAS,CAAC,qBAAqB,EACrD,YAAY,CAAC,SAAS,CAAC,qBAAqB,CAC7C,CAAC;IAEF,MAAM,wBAAwB,GAAyB,oBAAoB,CACzE,0BAA0B,EAC1B,qBAAqB,CAAC,SAAS,CAAC,wBAAwB,EACxD,YAAY,CAAC,SAAS,CAAC,wBAAwB,CAChD,CAAC;IAEF,OAAO;QACL,wBAAwB;QACxB,qBAAqB;KACtB,CAAC;AACJ,CAAC"}
@@ -0,0 +1,183 @@
/**
* @import {Options} from 'micromark-extension-gfm-strikethrough'
* @import {Event, Extension, Resolver, State, Token, TokenizeContext, Tokenizer} from 'micromark-util-types'
*/
import {ok as assert} from 'devlop'
import {splice} from 'micromark-util-chunked'
import {classifyCharacter} from 'micromark-util-classify-character'
import {resolveAll} from 'micromark-util-resolve-all'
import {codes, constants, types} from 'micromark-util-symbol'
/**
* Create an extension for `micromark` to enable GFM strikethrough syntax.
*
* @param {Options | null | undefined} [options={}]
* Configuration.
* @returns {Extension}
* Extension for `micromark` that can be passed in `extensions`, to
* enable GFM strikethrough syntax.
*/
export function gfmStrikethrough(options) {
const options_ = options || {}
let single = options_.singleTilde
const tokenizer = {
name: 'strikethrough',
tokenize: tokenizeStrikethrough,
resolveAll: resolveAllStrikethrough
}
if (single === null || single === undefined) {
single = true
}
return {
text: {[codes.tilde]: tokenizer},
insideSpan: {null: [tokenizer]},
attentionMarkers: {null: [codes.tilde]}
}
/**
* Take events and resolve strikethrough.
*
* @type {Resolver}
*/
function resolveAllStrikethrough(events, context) {
let index = -1
// Walk through all events.
while (++index < events.length) {
// Find a token that can close.
if (
events[index][0] === 'enter' &&
events[index][1].type === 'strikethroughSequenceTemporary' &&
events[index][1]._close
) {
let open = index
// Now walk back to find an opener.
while (open--) {
// Find a token that can open the closer.
if (
events[open][0] === 'exit' &&
events[open][1].type === 'strikethroughSequenceTemporary' &&
events[open][1]._open &&
// If the sizes are the same:
events[index][1].end.offset - events[index][1].start.offset ===
events[open][1].end.offset - events[open][1].start.offset
) {
events[index][1].type = 'strikethroughSequence'
events[open][1].type = 'strikethroughSequence'
/** @type {Token} */
const strikethrough = {
type: 'strikethrough',
start: Object.assign({}, events[open][1].start),
end: Object.assign({}, events[index][1].end)
}
/** @type {Token} */
const text = {
type: 'strikethroughText',
start: Object.assign({}, events[open][1].end),
end: Object.assign({}, events[index][1].start)
}
// Opening.
/** @type {Array<Event>} */
const nextEvents = [
['enter', strikethrough, context],
['enter', events[open][1], context],
['exit', events[open][1], context],
['enter', text, context]
]
const insideSpan = context.parser.constructs.insideSpan.null
if (insideSpan) {
// Between.
splice(
nextEvents,
nextEvents.length,
0,
resolveAll(insideSpan, events.slice(open + 1, index), context)
)
}
// Closing.
splice(nextEvents, nextEvents.length, 0, [
['exit', text, context],
['enter', events[index][1], context],
['exit', events[index][1], context],
['exit', strikethrough, context]
])
splice(events, open - 1, index - open + 3, nextEvents)
index = open + nextEvents.length - 2
break
}
}
}
}
index = -1
while (++index < events.length) {
if (events[index][1].type === 'strikethroughSequenceTemporary') {
events[index][1].type = types.data
}
}
return events
}
/**
* @this {TokenizeContext}
* @type {Tokenizer}
*/
function tokenizeStrikethrough(effects, ok, nok) {
const previous = this.previous
const events = this.events
let size = 0
return start
/** @type {State} */
function start(code) {
assert(code === codes.tilde, 'expected `~`')
if (
previous === codes.tilde &&
events[events.length - 1][1].type !== types.characterEscape
) {
return nok(code)
}
effects.enter('strikethroughSequenceTemporary')
return more(code)
}
/** @type {State} */
function more(code) {
const before = classifyCharacter(previous)
if (code === codes.tilde) {
// If this is the third marker, exit.
if (size > 1) return nok(code)
effects.consume(code)
size++
return more
}
if (size < 2 && !single) return nok(code)
const token = effects.exit('strikethroughSequenceTemporary')
const after = classifyCharacter(code)
token._open =
!after || (after === constants.attentionSideAfter && Boolean(before))
token._close =
!before || (before === constants.attentionSideAfter && Boolean(after))
return ok(code)
}
}
}
@@ -0,0 +1,13 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const injectable_1 = require("./injectable");
const dependency_container_1 = require("../dependency-container");
function scoped(lifecycle, token) {
return function (target) {
injectable_1.default()(target);
dependency_container_1.instance.register(token || target, target, {
lifecycle
});
};
}
exports.default = scoped;
@@ -0,0 +1,937 @@
flf2a$ 9 8 18 -1 18
AMC razor 2 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
-> 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,53 @@
'use strict';
var hasPropertyDescriptors = require('has-property-descriptors');
var $defineProperty = require('es-define-property');
var hasArrayLengthDefineBug = hasPropertyDescriptors.hasArrayLengthDefineBug();
// eslint-disable-next-line global-require
var isArray = hasArrayLengthDefineBug && require('../helpers/IsArray');
var callBound = require('call-bound');
var $isEnumerable = callBound('Object.prototype.propertyIsEnumerable');
// eslint-disable-next-line max-params
module.exports = function DefineOwnProperty(IsDataDescriptor, SameValue, FromPropertyDescriptor, O, P, desc) {
if (!$defineProperty) {
if (!IsDataDescriptor(desc)) {
// ES3 does not support getters/setters
return false;
}
if (!desc['[[Configurable]]'] || !desc['[[Writable]]']) {
return false;
}
// fallback for ES3
if (P in O && $isEnumerable(O, P) !== !!desc['[[Enumerable]]']) {
// a non-enumerable existing property
return false;
}
// property does not exist at all, or exists but is enumerable
var V = desc['[[Value]]'];
// eslint-disable-next-line no-param-reassign
O[P] = V; // will use [[Define]]
return SameValue(O[P], V);
}
if (
hasArrayLengthDefineBug
&& P === 'length'
&& '[[Value]]' in desc
&& isArray(O)
&& O.length !== desc['[[Value]]']
) {
// eslint-disable-next-line no-param-reassign
O.length = desc['[[Value]]'];
return O.length === desc['[[Value]]'];
}
$defineProperty(O, P, FromPropertyDescriptor(desc));
return true;
};
@@ -0,0 +1,62 @@
var $01d3f539e91688c8$exports = require("./context.main.js");
var $3maub$reactariautils = require("@react-aria/utils");
var $3maub$react = require("react");
function $parcel$interopDefault(a) {
return a && a.__esModule ? a.default : a;
}
function $parcel$export(e, n, v, s) {
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
}
$parcel$export(module.exports, "PressResponder", () => $3596bae48579386f$export$3351871ee4b288b8);
$parcel$export(module.exports, "ClearPressResponder", () => $3596bae48579386f$export$cf75428e0b9ed1ea);
/*
* 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 $3596bae48579386f$export$3351871ee4b288b8 = /*#__PURE__*/ (0, ($parcel$interopDefault($3maub$react))).forwardRef(({ children: children, ...props }, ref)=>{
let isRegistered = (0, $3maub$react.useRef)(false);
let prevContext = (0, $3maub$react.useContext)((0, $01d3f539e91688c8$exports.PressResponderContext));
ref = (0, $3maub$reactariautils.useObjectRef)(ref || (prevContext === null || prevContext === void 0 ? void 0 : prevContext.ref));
let context = (0, $3maub$reactariautils.mergeProps)(prevContext || {}, {
...props,
ref: ref,
register () {
isRegistered.current = true;
if (prevContext) prevContext.register();
}
});
(0, $3maub$reactariautils.useSyncRef)(prevContext, ref);
(0, $3maub$react.useEffect)(()=>{
if (!isRegistered.current) {
if (process.env.NODE_ENV !== 'production') console.warn("A PressResponder was rendered without a pressable child. Either call the usePress hook, or wrap your DOM node with <Pressable> component.");
isRegistered.current = true; // only warn once in strict mode.
}
}, []);
return /*#__PURE__*/ (0, ($parcel$interopDefault($3maub$react))).createElement((0, $01d3f539e91688c8$exports.PressResponderContext).Provider, {
value: context
}, children);
});
function $3596bae48579386f$export$cf75428e0b9ed1ea({ children: children }) {
let context = (0, $3maub$react.useMemo)(()=>({
register: ()=>{}
}), []);
return /*#__PURE__*/ (0, ($parcel$interopDefault($3maub$react))).createElement((0, $01d3f539e91688c8$exports.PressResponderContext).Provider, {
value: context
}, children);
}
//# sourceMappingURL=PressResponder.main.js.map
@@ -0,0 +1,19 @@
[![npm version](https://badge.fury.io/js/%40tokenizer%2Ftoken.svg)](https://www.npmjs.com/package/@tokenizer/token)
[![npm downloads](http://img.shields.io/npm/dm/@tokenizer/token.svg)](https://npmcharts.com/compare/@tokenizer/token?interval=30)
# @tokenizer/token
TypeScript definition of an [strtok3](https://github.com/Borewit/strtok3) token.
## Licence
(The MIT License)
Copyright (c) 2020 Borewit
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,73 @@
"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
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 __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/utils/object.ts
var object_exports = {};
__export(object_exports, {
flattenThemeObject: () => flattenThemeObject,
removeDefaultKeys: () => removeDefaultKeys,
swapColorValues: () => swapColorValues
});
module.exports = __toCommonJS(object_exports);
var import_flat = __toESM(require("flat"));
function swapColorValues(colors) {
const swappedColors = {};
const keys = Object.keys(colors);
const length = keys.length;
for (let i = 0; i < length / 2; i++) {
const key1 = keys[i];
const key2 = keys[length - 1 - i];
swappedColors[key1] = colors[key2];
swappedColors[key2] = colors[key1];
}
if (length % 2 !== 0) {
const middleKey = keys[Math.floor(length / 2)];
swappedColors[middleKey] = colors[middleKey];
}
return swappedColors;
}
function removeDefaultKeys(obj) {
const newObj = {};
for (const key in obj) {
if (key.endsWith("-DEFAULT")) {
newObj[key.replace("-DEFAULT", "")] = obj[key];
continue;
}
newObj[key] = obj[key];
}
return newObj;
}
var flattenThemeObject = (obj) => removeDefaultKeys(
(0, import_flat.default)(obj, {
safe: true,
delimiter: "-"
})
);
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
flattenThemeObject,
removeDefaultKeys,
swapColorValues
});
@@ -0,0 +1 @@
{"version":3,"file":"ignore.js","sourceRoot":"","sources":["../../src/ignore.ts"],"names":[],"mappings":"AAAA,sDAAsD;AACtD,kCAAkC;AAClC,kEAAkE;AAClE,6CAA6C;AAE7C,OAAO,EAAE,SAAS,EAAoB,MAAM,WAAW,CAAA;AAEvD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAStC,MAAM,eAAe,GACnB,CACE,OAAO,OAAO,KAAK,QAAQ;IAC3B,OAAO;IACP,OAAO,OAAO,CAAC,QAAQ,KAAK,QAAQ,CACrC,CAAC,CAAC;IACD,OAAO,CAAC,QAAQ;IAClB,CAAC,CAAC,OAAO,CAAA;AAEX;;GAEG;AACH,MAAM,OAAO,MAAM;IACjB,QAAQ,CAAa;IACrB,gBAAgB,CAAa;IAC7B,QAAQ,CAAa;IACrB,gBAAgB,CAAa;IAC7B,QAAQ,CAAiB;IACzB,MAAM,CAAkB;IAExB,YACE,OAAiB,EACjB,EACE,OAAO,EACP,MAAM,EACN,KAAK,EACL,UAAU,EACV,QAAQ,GAAG,eAAe,GACX;QAEjB,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAA;QAClB,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAA;QAClB,IAAI,CAAC,gBAAgB,GAAG,EAAE,CAAA;QAC1B,IAAI,CAAC,gBAAgB,GAAG,EAAE,CAAA;QAC1B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAA;QACxB,IAAI,CAAC,MAAM,GAAG;YACZ,GAAG,EAAE,IAAI;YACT,OAAO;YACP,MAAM;YACN,KAAK;YACL,UAAU;YACV,iBAAiB,EAAE,CAAC;YACpB,QAAQ;YACR,SAAS,EAAE,IAAI;YACf,QAAQ,EAAE,IAAI;SACf,CAAA;QACD,KAAK,MAAM,GAAG,IAAI,OAAO;YAAE,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;IAC1C,CAAC;IAED,GAAG,CAAC,GAAW;QACb,mEAAmE;QACnE,gEAAgE;QAChE,mEAAmE;QACnE,uCAAuC;QACvC,mEAAmE;QACnE,qEAAqE;QACrE,uBAAuB;QACvB,uEAAuE;QACvE,oEAAoE;QACpE,qBAAqB;QACrB,sEAAsE;QACtE,wCAAwC;QACxC,MAAM,EAAE,GAAG,IAAI,SAAS,CAAC,GAAG,EAAE,IAAI,CAAC,MAAM,CAAC,CAAA;QAC1C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACvC,MAAM,MAAM,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAA;YACxB,MAAM,SAAS,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC,CAAA;YACjC,qBAAqB;YACrB,IAAI,CAAC,MAAM,IAAI,CAAC,SAAS,EAAE,CAAC;gBAC1B,MAAM,IAAI,KAAK,CAAC,wBAAwB,CAAC,CAAA;YAC3C,CAAC;YACD,gCAAgC;YAChC,iDAAiD;YACjD,OAAO,MAAM,CAAC,CAAC,CAAC,KAAK,GAAG,IAAI,SAAS,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE,CAAC;gBACjD,MAAM,CAAC,KAAK,EAAE,CAAA;gBACd,SAAS,CAAC,KAAK,EAAE,CAAA;YACnB,CAAC;YACD,oBAAoB;YACpB,MAAM,CAAC,GAAG,IAAI,OAAO,CAAC,MAAM,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAA;YAC1D,MAAM,CAAC,GAAG,IAAI,SAAS,CAAC,CAAC,CAAC,UAAU,EAAE,EAAE,IAAI,CAAC,MAAM,CAAC,CAAA;YACpD,MAAM,QAAQ,GAAG,SAAS,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,IAAI,CAAA;YACzD,MAAM,QAAQ,GAAG,CAAC,CAAC,UAAU,EAAE,CAAA;YAC/B,IAAI,QAAQ;gBAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;;gBAC9B,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;YAC1B,IAAI,QAAQ,EAAE,CAAC;gBACb,IAAI,QAAQ;oBAAE,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;;oBACtC,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;YACpC,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,CAAC,CAAO;QACb,MAAM,QAAQ,GAAG,CAAC,CAAC,QAAQ,EAAE,CAAA;QAC7B,MAAM,SAAS,GAAG,GAAG,QAAQ,GAAG,CAAA;QAChC,MAAM,QAAQ,GAAG,CAAC,CAAC,QAAQ,EAAE,IAAI,GAAG,CAAA;QACpC,MAAM,SAAS,GAAG,GAAG,QAAQ,GAAG,CAAA;QAChC,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YAC9B,IAAI,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC;gBAAE,OAAO,IAAI,CAAA;QAC1D,CAAC;QACD,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YAC9B,IAAI,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC;gBAAE,OAAO,IAAI,CAAA;QAC1D,CAAC;QACD,OAAO,KAAK,CAAA;IACd,CAAC;IAED,eAAe,CAAC,CAAO;QACrB,MAAM,QAAQ,GAAG,CAAC,CAAC,QAAQ,EAAE,GAAG,GAAG,CAAA;QACnC,MAAM,QAAQ,GAAG,CAAC,CAAC,CAAC,QAAQ,EAAE,IAAI,GAAG,CAAC,GAAG,GAAG,CAAA;QAC5C,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,gBAAgB,EAAE,CAAC;YACtC,IAAI,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC;gBAAE,OAAO,IAAI,CAAA;QACpC,CAAC;QACD,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,gBAAgB,EAAE,CAAC;YACtC,IAAI,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC;gBAAE,OAAO,IAAI,CAAA;QACpC,CAAC;QACD,OAAO,KAAK,CAAA;IACd,CAAC;CACF","sourcesContent":["// give it a pattern, and it'll be able to tell you if\n// a given path should be ignored.\n// Ignoring a path ignores its children if the pattern ends in /**\n// Ignores are always parsed in dot:true mode\n\nimport { Minimatch, MinimatchOptions } from 'minimatch'\nimport { Path } from 'path-scurry'\nimport { Pattern } from './pattern.js'\nimport { GlobWalkerOpts } from './walker.js'\n\nexport interface IgnoreLike {\n ignored?: (p: Path) => boolean\n childrenIgnored?: (p: Path) => boolean\n add?: (ignore: string) => void\n}\n\nconst defaultPlatform: NodeJS.Platform =\n (\n typeof process === 'object' &&\n process &&\n typeof process.platform === 'string'\n ) ?\n process.platform\n : 'linux'\n\n/**\n * Class used to process ignored patterns\n */\nexport class Ignore implements IgnoreLike {\n relative: Minimatch[]\n relativeChildren: Minimatch[]\n absolute: Minimatch[]\n absoluteChildren: Minimatch[]\n platform: NodeJS.Platform\n mmopts: MinimatchOptions\n\n constructor(\n ignored: string[],\n {\n nobrace,\n nocase,\n noext,\n noglobstar,\n platform = defaultPlatform,\n }: GlobWalkerOpts,\n ) {\n this.relative = []\n this.absolute = []\n this.relativeChildren = []\n this.absoluteChildren = []\n this.platform = platform\n this.mmopts = {\n dot: true,\n nobrace,\n nocase,\n noext,\n noglobstar,\n optimizationLevel: 2,\n platform,\n nocomment: true,\n nonegate: true,\n }\n for (const ign of ignored) this.add(ign)\n }\n\n add(igLine truncated
@@ -0,0 +1,17 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var ContentInfoRole = {
relatedConcepts: [{
module: 'ARIA',
concept: {
name: 'structureinfo'
}
}],
type: 'structure'
};
var _default = ContentInfoRole;
exports.default = _default;
@@ -0,0 +1,41 @@
// Duplicate some of the utils in `/src/utils` to ensure
// we don't end up dragging in larger chunks of the RTK core
// into the RTKQ bundle
export function getOrInsert<K extends object, V>(
map: WeakMap<K, V>,
key: K,
value: V,
): V
export function getOrInsert<K, V>(map: Map<K, V>, key: K, value: V): V
export function getOrInsert<K extends object, V>(
map: Map<K, V> | WeakMap<K, V>,
key: K,
value: V,
): V {
if (map.has(key)) return map.get(key) as V
return map.set(key, value).get(key) as V
}
export function getOrInsertComputed<K extends object, V>(
map: WeakMap<K, V>,
key: K,
compute: (key: K) => V,
): V
export function getOrInsertComputed<K, V>(
map: Map<K, V>,
key: K,
compute: (key: K) => V,
): V
export function getOrInsertComputed<K extends object, V>(
map: Map<K, V> | WeakMap<K, V>,
key: K,
compute: (key: K) => V,
): V {
if (map.has(key)) return map.get(key) as V
return map.set(key, compute(key)).get(key) as V
}
export const createNewMap = () => new Map()
@@ -0,0 +1,7 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const Graphemer_1 = __importDefault(require("./Graphemer"));
exports.default = Graphemer_1.default;
@@ -0,0 +1 @@
{"version":3,"sources":["spec-parser.js"],"names":["Object","defineProperty","exports","value","util_js_1","require","getParser","tokenizers","parseSpec","source","_a","spec","seedSpec","tokenize","problems","length","critical","default"],"mappings":"AAAA;;AACAA,MAAM,CAACC,cAAP,CAAsBC,OAAtB,EAA+B,YAA/B,EAA6C;AAAEC,EAAAA,KAAK,EAAE;AAAT,CAA7C;;AACA,MAAMC,SAAS,GAAGC,OAAH,eAAf;;AACA,SAASC,SAAT,CAAmB;AAAEC,EAAAA;AAAF,CAAnB,EAAmC;AAC/B,SAAO,SAASC,SAAT,CAAmBC,MAAnB,EAA2B;AAC9B,QAAIC,EAAJ;;AACA,QAAIC,IAAI,GAAG,CAAC,GAAGP,SAAS,CAACQ,QAAd,EAAwB;AAAEH,MAAAA;AAAF,KAAxB,CAAX;;AACA,SAAK,MAAMI,QAAX,IAAuBN,UAAvB,EAAmC;AAC/BI,MAAAA,IAAI,GAAGE,QAAQ,CAACF,IAAD,CAAf;AACA,UAAI,CAACD,EAAE,GAAGC,IAAI,CAACG,QAAL,CAAcH,IAAI,CAACG,QAAL,CAAcC,MAAd,GAAuB,CAArC,CAAN,MAAmD,IAAnD,IAA2DL,EAAE,KAAK,KAAK,CAAvE,GAA2E,KAAK,CAAhF,GAAoFA,EAAE,CAACM,QAA3F,EACI;AACP;;AACD,WAAOL,IAAP;AACH,GATD;AAUH;;AACDT,OAAO,CAACe,OAAR,GAAkBX,SAAlB","sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst util_js_1 = require(\"../util.js\");\nfunction getParser({ tokenizers }) {\n return function parseSpec(source) {\n var _a;\n let spec = (0, util_js_1.seedSpec)({ source });\n for (const tokenize of tokenizers) {\n spec = tokenize(spec);\n if ((_a = spec.problems[spec.problems.length - 1]) === null || _a === void 0 ? void 0 : _a.critical)\n break;\n }\n return spec;\n };\n}\nexports.default = getParser;\n"],"file":"spec-parser.cjs"}
@@ -0,0 +1 @@
{"name":"@react-aria/grid","version":"3.14.5","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532109908,"integrity":"sha512-cil7stSp3ik41Hdv2Dj+GMcbvUfs1q+MZ2Yte0804py9i6oJJN/diCiIr/brcQOZ5ZqwAI6dgaHA7l8FZheQBw==","mode":420,"size":11335},"dist/ar-AE.main.js":{"checkedAt":1794532109908,"integrity":"sha512-Ks1aDwGeHTmFt5AF74VWqqpbk+QfErZHZr4s4Attds1upv7JtG1xE5yGtfqvlKaond+iVevTDeutx7wxeIUYWA==","mode":420,"size":1151},"dist/ar-AE.module.js":{"checkedAt":1794532109908,"integrity":"sha512-TONrX9d0ojobqQyCYWZloJHwEKK+O4ianMl6xbJjMi75Kms3/ycgFgMk7dp6Fe6VmCmLS9I1Lvd+rXH7GMOMvQ==","mode":420,"size":1247},"dist/bg-BG.main.js":{"checkedAt":1794532109908,"integrity":"sha512-AmZmfo54f+89BedMeoRQZX9kdoQ6K6+LpmwU9rUhh8KWc9gvHaQmTvRI/47Bc2YDnrukD/l/1rn1L5i5PGfA8A==","mode":420,"size":1444},"dist/bg-BG.module.js":{"checkedAt":1794532109909,"integrity":"sha512-GoBqamYqZeBvsqh2lpMfi8q147jdyT0XXhOhghOp2mjl20Sl5wrukPSNFUbgtO3STWmWhJORmpzWqwaAR63/tw==","mode":420,"size":1540},"dist/cs-CZ.main.js":{"checkedAt":1794532109909,"integrity":"sha512-EVJFskTi/LG6nKaT1MpI4osUHzQiyoA6caMDdCUyYe5R0IrWrcgNtRF7QSuijL0wL4NYx0ZMBx+hiBOl8aDyGw==","mode":420,"size":717},"dist/cs-CZ.module.js":{"checkedAt":1794532109909,"integrity":"sha512-Nun3CXexkBKj3Yto+rJNAavtUnT7PXy17u2Y1Qjx+iFzV9h8Kt0Xh7Y9+BLrIKY5MGipIOuIN6GkpAuF3uRQQA==","mode":420,"size":813},"dist/da-DK.main.js":{"checkedAt":1794532109909,"integrity":"sha512-cOI9iO2oAd9oWV7er/lzTNh+5NVLLVjpLO/6u27FG8awrPBJYl/ZdTOjOl8xegG1xghFZiajojTtr2WA6+0NKA==","mode":420,"size":591},"dist/da-DK.module.js":{"checkedAt":1794532109909,"integrity":"sha512-U9aRhrCS3lTC2LPFKesAXlttfLwZj6G2NlCIkKYPRqPJOTcBvFjGtpdHVXQ2zto5L9ORnZxm3OImh7pWiG8FDw==","mode":420,"size":687},"dist/de-DE.main.js":{"checkedAt":1794532109909,"integrity":"sha512-dQ2CisOUiAuYKYA9mwRJx52MMGeLgzOvRfXti6tbfDtoaW10hrfsaQnzY4B14M/lwyleTQFOnhxXPjXWgJBwWQ==","mode":420,"size":644},"dist/de-DE.module.js":{"checkedAt":1794532109909,"integrity":"sha512-WiUguMe04AyjmMs0X+m41mWrSf5QS5QoREE+x7uid6X+etOMdLLxIQYPkEEx3cPIJAPlcMopsinPwQwyUll6tw==","mode":420,"size":740},"dist/el-GR.main.js":{"checkedAt":1794532109910,"integrity":"sha512-1LRv8eh/OOyMmD0zngHcMyAt2Yq35wjrqO6Pz9Ta7UvnZ/1KehXlSl3EDImWP1SrnPx3EI1ALfMD4MpwvrTCug==","mode":420,"size":1754},"dist/el-GR.module.js":{"checkedAt":1794532109910,"integrity":"sha512-+50PdIjmLBFTmumfSdcEA/qd9SO52pFhVRyzFBj4pltM9bLO2un+fg9m9c4yrmNfee3yBOL7DVZuBSZpteGj5w==","mode":420,"size":1850},"dist/en-US.main.js":{"checkedAt":1794532109910,"integrity":"sha512-diylb1yXQQrwx8dB9It1vFR4ZO59um3PJ/6khCDqKnHMaCsPgaKUujmWGsml+BaopvNJNN+GNUjAyMXicSQzaw==","mode":420,"size":576},"dist/en-US.module.js":{"checkedAt":1794532109910,"integrity":"sha512-OI/SzA6th79a6KYRyxTWgCDmLWbNZadXlAhLMKfvX+LJdSdw+l77nWtR30P9HB9bv/+99a7o8JbGTpz7j2DwcQ==","mode":420,"size":672},"dist/es-ES.main.js":{"checkedAt":1794532109910,"integrity":"sha512-5UlxtbKKidEbo6qBnojE9318IomhngQ5qjD9dyxxC5jMjiViyyC6Is9YphKf2YgWPYXwvIl0Nvzgr2zGI7WoeQ==","mode":420,"size":651},"dist/es-ES.module.js":{"checkedAt":1794532109910,"integrity":"sha512-xqlDkZlL+2ddou6Ub70S+q7UbGp7zNSEw8n95uDSvRmZqf1dMBHQTVpRTVHJHH9tliyznCrZzp860i1vIZqF7A==","mode":420,"size":747},"dist/et-EE.main.js":{"checkedAt":1794532109911,"integrity":"sha512-vltbXG8+2brjIuOJ1b7T3lTEWQSV1LPuhWxuW9MvGW4jADnUOWD5SQttfYzBx9KaotEQC1/ggqtdrSZTqhNBnQ==","mode":420,"size":606},"dist/et-EE.module.js":{"checkedAt":1794532109911,"integrity":"sha512-5YXC8iNYAGRkLRPxZF9FhPxEtkAGM75KXEg5z4peGQBjjifmHAz/gfm63tX6ymnKJkiuGenFf6AEPb/KIMzM0A==","mode":420,"size":702},"dist/fi-FI.main.js":{"checkedAt":1794532109911,"integrity":"sha512-r+emPeN8xjdDd9Zz/0VMbYBsME1ge7e3HWTQWTHxhi08khSYgOtthh8mvTfUVI0b390DHY4ZvPEqj8zUOykSVQ==","mode":420,"size":615},"dist/fi-FI.module.js":{"checkedAt":1794532109911,"integrity":"sha512-Jb37eOQiBmkgfRnKCeICEV+fuLlp1uEoP+sSD5tTcKAPMzDP7ogn6C3C9QUYXKZ5Qzfp6KtM3FnGJmBdGi1jDQ==","mode":420,"size":711},"dist/fr-FR.main.js":{"checkedAt":1794532109911,"integrity":"sha512-vFAf3AckbBn7sUZIBdahpKmVyrF6zkNlD+AH6f9ga2tLv3J7Nu+PJ1YbZHvtT9LdvDyQb2cZjfMkqwMVoeXlQg==","mode":420,"size":720},"dist/fr-FR.module.js":{"checkedAt":1794532109911,"integrity":"sha512-IKAwj7MsD5yNiC8IQ5FGkFAU4XVcwblM873NnjdHIcAgMXk2zXNPivdtndw5zOa9I3OQ8GqHjbuFJUwr1XeTFw==","mode":420,"size":816},"dist/GridKeyboardDelegate.main.js":{"checkedAt":1794532109911,"integrity":"sha512-yctFytYuMxx78tfqi45j+WuQseRdgLi9SvOPgAHbAB2Q2eSItKLswgqYD862cIDYSFJMgWTXvnWGHuDkB5HZ3g==","mode":420,"size":17357},"dist/GridKeyboardDelegate.module.js":{"checkedAt":1794532109912,"integrity":"sha512-GHypUr3ja1z4U9k76tFEl+kAgIWI8ReaJqSNoGS1hgGiZYtLhGdO4PskfV2Ej+t9ha02DTNYipklv8pq75Jtjw==","mode":420,"size":16760},"dist/he-IL.main.js":{"checkedAt":1794532109912,"integrity":"sha512-hYEpHUD30Kltl2stZWeLouNuldaGTOVsT+RDTPtsa8ZGMql1n2O6F8drPe6CXK3JdK2O/8r22dQ8wQj3JoAlpg==","mode":420,"size":1046},"dist/he-IL.module.js":{"checkedAt":1794532109912,"integrity":"sha512-h0Bm47U4vZUMY8UXtcf9CE2T7VnqpD/m1XYf+qkJIadx/6DBDdQ0Q34njJR/5lbTj8DqQgMcxPwUcu7vCXXo/w==",Line truncated
@@ -0,0 +1,9 @@
/**
* Create an extension for `micromark` to enable GFM footnote syntax.
*
* @returns {Extension}
* Extension for `micromark` that can be passed in `extensions` to
* enable GFM footnote syntax.
*/
export function gfmFootnote(): Extension;
import type { Extension } from 'micromark-util-types';
@@ -0,0 +1,33 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var docIntroductionRole = {
abstract: false,
accessibleNameRequired: false,
baseConcepts: [],
childrenPresentational: false,
nameFrom: ['author'],
prohibitedProps: [],
props: {
'aria-disabled': null,
'aria-errormessage': null,
'aria-expanded': null,
'aria-haspopup': null,
'aria-invalid': null
},
relatedConcepts: [{
concept: {
name: 'introduction [EPUB-SSV]'
},
module: 'EPUB'
}],
requireContextRole: [],
requiredContextRole: [],
requiredOwnedElements: [],
requiredProps: {},
superClass: [['roletype', 'structure', 'section', 'landmark']]
};
var _default = exports.default = docIntroductionRole;
@@ -0,0 +1,95 @@
"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/delete.tsx
var delete_exports = {};
__export(delete_exports, {
DeleteIcon: () => DeleteIcon
});
module.exports = __toCommonJS(delete_exports);
var import_jsx_runtime = require("react/jsx-runtime");
var DeleteIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
"svg",
{
"aria-hidden": "true",
fill: "none",
focusable: "false",
height: "1em",
role: "presentation",
viewBox: "0 0 20 20",
width: "1em",
...props,
children: [
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
"path",
{
d: "M17.5 4.98332C14.725 4.70832 11.9333 4.56665 9.15 4.56665C7.5 4.56665 5.85 4.64998 4.2 4.81665L2.5 4.98332",
stroke: "currentColor",
strokeLinecap: "round",
strokeLinejoin: "round",
strokeWidth: 1.5
}
),
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
"path",
{
d: "M7.08331 4.14169L7.26665 3.05002C7.39998 2.25835 7.49998 1.66669 8.90831 1.66669H11.0916C12.5 1.66669 12.6083 2.29169 12.7333 3.05835L12.9166 4.14169",
stroke: "currentColor",
strokeLinecap: "round",
strokeLinejoin: "round",
strokeWidth: 1.5
}
),
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
"path",
{
d: "M15.7084 7.61664L15.1667 16.0083C15.075 17.3166 15 18.3333 12.675 18.3333H7.32502C5.00002 18.3333 4.92502 17.3166 4.83335 16.0083L4.29169 7.61664",
stroke: "currentColor",
strokeLinecap: "round",
strokeLinejoin: "round",
strokeWidth: 1.5
}
),
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
"path",
{
d: "M8.60834 13.75H11.3833",
stroke: "currentColor",
strokeLinecap: "round",
strokeLinejoin: "round",
strokeWidth: 1.5
}
),
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
"path",
{
d: "M7.91669 10.4167H12.0834",
stroke: "currentColor",
strokeLinecap: "round",
strokeLinejoin: "round",
strokeWidth: 1.5
}
)
]
}
);
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
DeleteIcon
});
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_get.cjs",
"module": "../../esm/_get.js"
}
@@ -0,0 +1,21 @@
{
"name": "@react-types/slider",
"version": "3.8.2",
"description": "Spectrum UI components in React",
"license": "Apache-2.0",
"types": "src/index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/adobe/react-spectrum"
},
"dependencies": {
"@react-types/shared": "^3.32.1"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1"
},
"publishConfig": {
"access": "public"
},
"gitHead": "0bda51183baa23306342af32a82012ea0fe0f2dc"
}
@@ -0,0 +1,55 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _ariaQuery = require("aria-query");
var _jsxAstUtils = require("jsx-ast-utils");
var _arrayIncludes = _interopRequireDefault(require("array-includes"));
var _arrayPrototype = _interopRequireDefault(require("array.prototype.flatmap"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
var nonInteractiveRoles = _ariaQuery.roles.keys().filter(function (name) {
return !_ariaQuery.roles.get(name)["abstract"] && !_ariaQuery.roles.get(name).superClass.some(function (klasses) {
return (0, _arrayIncludes["default"])(klasses, 'widget');
});
});
/**
* Returns boolean indicating whether the given element has a role
* that is associated with a non-interactive component. Non-interactive roles
* include `listitem`, `article`, or `dialog`. These are roles that indicate
* for the most part containers.
*
* Elements with these roles should not respond or handle user interactions.
* For example, an `onClick` handler should not be assigned to an element with
* the role `listitem`. An element inside the `listitem`, like a button or a
* link, should handle the click.
*
* This utility returns true for elements that are assigned a non-interactive
* role. It will return false for elements that do not have a role. So whereas
* a `div` might be considered non-interactive, for the purpose of this utility,
* it is considered neither interactive nor non-interactive -- a determination
* cannot be made in this case and false is returned.
*/
var isNonInteractiveRole = function isNonInteractiveRole(tagName, attributes) {
// Do not test higher level JSX components, as we do not know what
// low-level DOM element this maps to.
if (!_ariaQuery.dom.has(tagName)) {
return false;
}
var role = (0, _jsxAstUtils.getLiteralPropValue)((0, _jsxAstUtils.getProp)(attributes, 'role'));
var isNonInteractive = false;
var normalizedValues = String(role).toLowerCase().split(' ');
var validRoles = (0, _arrayPrototype["default"])(normalizedValues, function (name) {
return _ariaQuery.roles.has(name) ? [name] : [];
});
if (validRoles.length > 0) {
// The first role value is a series takes precedence.
isNonInteractive = (0, _arrayIncludes["default"])(nonInteractiveRoles, validRoles[0]);
}
return isNonInteractive;
};
var _default = exports["default"] = isNonInteractiveRole;
module.exports = exports.default;
@@ -0,0 +1,108 @@
import { URL } from 'url'
import { TlsOptions } from 'tls'
import Dispatcher from './dispatcher'
import buildConnector from "./connector";
type ClientConnectOptions = Omit<Dispatcher.ConnectOptions, "origin">;
/**
* A basic HTTP/1.1 client, mapped on top a single TCP/TLS connection. Pipelining is disabled by default.
*/
export class Client extends Dispatcher {
constructor(url: string | URL, options?: Client.Options);
/** Property to get and set the pipelining factor. */
pipelining: number;
/** `true` after `client.close()` has been called. */
closed: boolean;
/** `true` after `client.destroyed()` has been called or `client.close()` has been called and the client shutdown has completed. */
destroyed: boolean;
// Override dispatcher APIs.
override connect(
options: ClientConnectOptions
): Promise<Dispatcher.ConnectData>;
override connect(
options: ClientConnectOptions,
callback: (err: Error | null, data: Dispatcher.ConnectData) => void
): void;
}
export declare namespace Client {
export interface OptionsInterceptors {
Client: readonly Dispatcher.DispatchInterceptor[];
}
export interface Options {
/** TODO */
interceptors?: OptionsInterceptors;
/** The maximum length of request headers in bytes. Default: Node.js' `--max-http-header-size` or `16384` (16KiB). */
maxHeaderSize?: number;
/** The amount of time, in milliseconds, the parser will wait to receive the complete HTTP headers (Node 14 and above only). Default: `300e3` milliseconds (300s). */
headersTimeout?: number;
/** @deprecated unsupported socketTimeout, use headersTimeout & bodyTimeout instead */
socketTimeout?: never;
/** @deprecated unsupported requestTimeout, use headersTimeout & bodyTimeout instead */
requestTimeout?: never;
/** TODO */
connectTimeout?: number;
/** The timeout after which a request will time out, in milliseconds. Monitors time between receiving body data. Use `0` to disable it entirely. Default: `300e3` milliseconds (300s). */
bodyTimeout?: number;
/** @deprecated unsupported idleTimeout, use keepAliveTimeout instead */
idleTimeout?: never;
/** @deprecated unsupported keepAlive, use pipelining=0 instead */
keepAlive?: never;
/** the timeout, in milliseconds, after which a socket without active requests will time out. Monitors time between activity on a connected socket. This value may be overridden by *keep-alive* hints from the server. Default: `4e3` milliseconds (4s). */
keepAliveTimeout?: number;
/** @deprecated unsupported maxKeepAliveTimeout, use keepAliveMaxTimeout instead */
maxKeepAliveTimeout?: never;
/** the maximum allowed `idleTimeout`, in milliseconds, when overridden by *keep-alive* hints from the server. Default: `600e3` milliseconds (10min). */
keepAliveMaxTimeout?: number;
/** A number of milliseconds subtracted from server *keep-alive* hints when overriding `idleTimeout` to account for timing inaccuracies caused by e.g. transport latency. Default: `1e3` milliseconds (1s). */
keepAliveTimeoutThreshold?: number;
/** TODO */
socketPath?: string;
/** The amount of concurrent requests to be sent over the single TCP/TLS connection according to [RFC7230](https://tools.ietf.org/html/rfc7230#section-6.3.2). Default: `1`. */
pipelining?: number;
/** @deprecated use the connect option instead */
tls?: never;
/** If `true`, an error is thrown when the request content-length header doesn't match the length of the request body. Default: `true`. */
strictContentLength?: boolean;
/** TODO */
maxCachedSessions?: number;
/** TODO */
maxRedirections?: number;
/** TODO */
connect?: buildConnector.BuildOptions | buildConnector.connector;
/** TODO */
maxRequestsPerClient?: number;
/** TODO */
localAddress?: string;
/** Max response body size in bytes, -1 is disabled */
maxResponseSize?: number;
/** Enables a family autodetection algorithm that loosely implements section 5 of RFC 8305. */
autoSelectFamily?: boolean;
/** The amount of time in milliseconds to wait for a connection attempt to finish before trying the next address when using the `autoSelectFamily` option. */
autoSelectFamilyAttemptTimeout?: number;
/**
* @description Enables support for H2 if the server has assigned bigger priority to it through ALPN negotiation.
* @default false
*/
allowH2?: boolean;
/**
* @description Dictates the maximum number of concurrent streams for a single H2 session. It can be overridden by a SETTINGS remote frame.
* @default 100
*/
maxConcurrentStreams?: number
}
export interface SocketInfo {
localAddress?: string
localPort?: number
remoteAddress?: string
remotePort?: number
remoteFamily?: string
timeout?: number
bytesWritten?: number
bytesRead?: number
}
}
export default Client;
@@ -0,0 +1,365 @@
/**
* @fileoverview A rule to disallow using `this`/`super` before `super()`.
* @author Toru Nagashima
*/
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const astUtils = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Helpers
//------------------------------------------------------------------------------
/**
* Checks whether or not a given node is a constructor.
* @param {ASTNode} node A node to check. This node type is one of
* `Program`, `FunctionDeclaration`, `FunctionExpression`, and
* `ArrowFunctionExpression`.
* @returns {boolean} `true` if the node is a constructor.
*/
function isConstructorFunction(node) {
return (
node.type === "FunctionExpression" &&
node.parent.type === "MethodDefinition" &&
node.parent.kind === "constructor"
);
}
/*
* Information for each code path segment.
* - superCalled: The flag which shows `super()` called in all code paths.
* - invalidNodes: The array of invalid ThisExpression and Super nodes.
*/
/**
*
*/
class SegmentInfo {
/**
* Indicates whether `super()` is called in all code paths.
* @type {boolean}
*/
superCalled = false;
/**
* The array of invalid ThisExpression and Super nodes.
* @type {ASTNode[]}
*/
invalidNodes = [];
}
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
type: "problem",
docs: {
description:
"Disallow `this`/`super` before calling `super()` in constructors",
recommended: true,
url: "https://eslint.org/docs/latest/rules/no-this-before-super",
},
schema: [],
messages: {
noBeforeSuper: "'{{kind}}' is not allowed before 'super()'.",
},
},
create(context) {
/*
* Information for each constructor.
* - upper: Information of the upper constructor.
* - hasExtends: A flag which shows whether the owner class has a valid
* `extends` part.
* - scope: The scope of the owner class.
* - codePath: The code path of this constructor.
*/
let funcInfo = null;
/** @type {Record<string, SegmentInfo>} */
let segInfoMap = Object.create(null);
/**
* Gets whether or not `super()` is called in a given code path segment.
* @param {CodePathSegment} segment A code path segment to get.
* @returns {boolean} `true` if `super()` is called.
*/
function isCalled(segment) {
return !segment.reachable || segInfoMap[segment.id]?.superCalled;
}
/**
* Checks whether or not this is in a constructor.
* @returns {boolean} `true` if this is in a constructor.
*/
function isInConstructorOfDerivedClass() {
return Boolean(
funcInfo && funcInfo.isConstructor && funcInfo.hasExtends,
);
}
/**
* Determines if every segment in a set has been called.
* @param {Set<CodePathSegment>} segments The segments to search.
* @returns {boolean} True if every segment has been called; false otherwise.
*/
function isEverySegmentCalled(segments) {
for (const segment of segments) {
if (!isCalled(segment)) {
return false;
}
}
return true;
}
/**
* Checks whether or not this is before `super()` is called.
* @returns {boolean} `true` if this is before `super()` is called.
*/
function isBeforeCallOfSuper() {
return (
isInConstructorOfDerivedClass() &&
!isEverySegmentCalled(funcInfo.currentSegments)
);
}
/**
* Sets a given node as invalid.
* @param {ASTNode} node A node to set as invalid. This is one of
* a ThisExpression and a Super.
* @returns {void}
*/
function setInvalid(node) {
const segments = funcInfo.currentSegments;
for (const segment of segments) {
if (segment.reachable) {
segInfoMap[segment.id].invalidNodes.push(node);
}
}
}
/**
* Sets the current segment as `super` was called.
* @returns {void}
*/
function setSuperCalled() {
const segments = funcInfo.currentSegments;
for (const segment of segments) {
if (segment.reachable) {
segInfoMap[segment.id].superCalled = true;
}
}
}
return {
/**
* Adds information of a constructor into the stack.
* @param {CodePath} codePath A code path which was started.
* @param {ASTNode} node The current node.
* @returns {void}
*/
onCodePathStart(codePath, node) {
if (isConstructorFunction(node)) {
// Class > ClassBody > MethodDefinition > FunctionExpression
const classNode = node.parent.parent.parent;
funcInfo = {
upper: funcInfo,
isConstructor: true,
hasExtends: Boolean(
classNode.superClass &&
!astUtils.isNullOrUndefined(
classNode.superClass,
),
),
codePath,
currentSegments: new Set(),
};
} else {
funcInfo = {
upper: funcInfo,
isConstructor: false,
hasExtends: false,
codePath,
currentSegments: new Set(),
};
}
},
/**
* Removes the top of stack item.
*
* And this traverses all segments of this code path then reports every
* invalid node.
* @param {CodePath} codePath A code path which was ended.
* @returns {void}
*/
onCodePathEnd(codePath) {
const isDerivedClass = funcInfo.hasExtends;
funcInfo = funcInfo.upper;
if (!isDerivedClass) {
return;
}
/**
* A collection of nodes to avoid duplicate reports.
* @type {Set<ASTNode>}
*/
const reported = new Set();
codePath.traverseSegments((segment, controller) => {
const info = segInfoMap[segment.id];
const invalidNodes = info.invalidNodes.filter(
/*
* Avoid duplicate reports.
* When there is a `finally`, invalidNodes may contain already reported node.
*/
node => !reported.has(node),
);
for (const invalidNode of invalidNodes) {
reported.add(invalidNode);
context.report({
messageId: "noBeforeSuper",
node: invalidNode,
data: {
kind:
invalidNode.type === "Super"
? "super"
: "this",
},
});
}
if (info.superCalled) {
controller.skip();
}
});
},
/**
* Initialize information of a given code path segment.
* @param {CodePathSegment} segment A code path segment to initialize.
* @returns {void}
*/
onCodePathSegmentStart(segment) {
funcInfo.currentSegments.add(segment);
if (!isInConstructorOfDerivedClass()) {
return;
}
// Initialize info.
segInfoMap[segment.id] = {
superCalled:
segment.prevSegments.length > 0 &&
segment.prevSegments.every(isCalled),
invalidNodes: [],
};
},
onUnreachableCodePathSegmentStart(segment) {
funcInfo.currentSegments.add(segment);
},
onUnreachableCodePathSegmentEnd(segment) {
funcInfo.currentSegments.delete(segment);
},
onCodePathSegmentEnd(segment) {
funcInfo.currentSegments.delete(segment);
},
/**
* Update information of the code path segment when a code path was
* looped.
* @param {CodePathSegment} fromSegment The code path segment of the
* end of a loop.
* @param {CodePathSegment} toSegment A code path segment of the head
* of a loop.
* @returns {void}
*/
onCodePathSegmentLoop(fromSegment, toSegment) {
if (!isInConstructorOfDerivedClass()) {
return;
}
// Update information inside of the loop.
funcInfo.codePath.traverseSegments(
{ first: toSegment, last: fromSegment },
(segment, controller) => {
const info =
segInfoMap[segment.id] ?? new SegmentInfo();
if (info.superCalled) {
controller.skip();
} else if (
segment.prevSegments.length > 0 &&
segment.prevSegments.every(isCalled)
) {
info.superCalled = true;
}
segInfoMap[segment.id] = info;
},
);
},
/**
* Reports if this is before `super()`.
* @param {ASTNode} node A target node.
* @returns {void}
*/
ThisExpression(node) {
if (isBeforeCallOfSuper()) {
setInvalid(node);
}
},
/**
* Reports if this is before `super()`.
* @param {ASTNode} node A target node.
* @returns {void}
*/
Super(node) {
if (!astUtils.isCallee(node) && isBeforeCallOfSuper()) {
setInvalid(node);
}
},
/**
* Marks `super()` called.
* @param {ASTNode} node A target node.
* @returns {void}
*/
"CallExpression:exit"(node) {
if (node.callee.type === "Super" && isBeforeCallOfSuper()) {
setSuperCalled();
}
},
/**
* Resets state.
* @returns {void}
*/
"Program:exit"() {
segInfoMap = Object.create(null);
},
};
},
};
@@ -0,0 +1,3 @@
# use-composed-ref
React hook which creates a ref function from given refs. Useful when using forwardRef.
@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AACtC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAA;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAExC,MAAM,EAAE,GAAG,GAAG,GAAG,eAAe,GAAG,EAAE,CAAA;AACrC,MAAM,KAAK,GAAG,SAAS,GAAG,EAAE,CAAA;AAC5B,MAAM,GAAG,GAAG,GAAG,GAAG,UAAU,GAAG,EAAE,CAAA;AACjC,MAAM,IAAI,GAAG,GAAG,GAAG,OAAO,GAAG,EAAE,CAAA;AAE/B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAC7B,IAAkB,EAClB,cAAsB,iBAAiB,EAC/B,EAAE;IACV,MAAM,CAAC,GACL,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC;QACtD,aAAa,CAAC,IAAI,CAAC;QACrB,CAAC,CAAC,IAAI,CAAA;IACR,MAAM,SAAS,GAAG,OAAO,CAAC,CAAC,CAAC,CAAA;IAE5B,MAAM,GAAG,GAAG,SAAS,CAAC,WAAW,CAAC,EAAE,CAAC,CAAA;IACrC,IAAI,GAAG,KAAK,CAAC,CAAC,EAAE,CAAC;QACf,qEAAqE;QACrE,MAAM,EAAE,GAAG,SAAS,CAAC,SAAS,CAAC,CAAC,EAAE,GAAG,GAAG,EAAE,CAAC,MAAM,CAAC,CAAA;QAClD,MAAM,MAAM,GAAG,SAAS,CAAC,SAAS,CAAC,GAAG,GAAG,EAAE,CAAC,MAAM,CAAC,CAAA;QACnD,4DAA4D;QAC5D,sDAAsD;QACtD,IAAI,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC;YAC7B,MAAM,GAAG,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;YAC7C,IAAI,GAAG,EAAE,CAAC;gBACR,OAAO,OAAO,CACZ,EAAE,EACF,MAAM,CAAC,SAAS,CAAC,CAAC,EAAE,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,EACrC,cAAc,CACf,CAAA;YACH,CAAC;QACH,CAAC;QACD,MAAM,OAAO,GACX,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC;YACtB,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;YAChC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;QAChC,OAAO,OAAO,CAAC,EAAE,EAAE,OAAO,EAAE,cAAc,CAAC,CAAA;IAC7C,CAAC;SAAM,CAAC;QACN,kCAAkC;QAClC,MAAM,CAAC,GAAG,SAAS,CAAC,WAAW,CAAC,IAAI,CAAC,CAAA;QACrC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC;YACb,OAAO,OAAO,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,cAAc,CAAC,CAAA;QAC3D,CAAC;aAAM,CAAC;YACN,OAAO,OAAO,CAAC,SAAS,EAAE,WAAW,CAAC,CAAA;QACxC,CAAC;IACH,CAAC;AACH,CAAC,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAC7B,IAAkB,EAClB,cAAsB,iBAAiB,EACvC,EAAE,CACF,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,eAAe,CAAC,IAAI,EAAE,WAAW,CAAC,EAAE,MAAM,CAAC,CAAC,CAAA","sourcesContent":["import { readFileSync } from 'node:fs'\nimport { dirname, resolve, sep } from 'node:path'\nimport { fileURLToPath } from 'node:url'\n\nconst NM = `${sep}node_modules${sep}`\nconst STORE = `.store${sep}`\nconst PKG = `${sep}package${sep}`\nconst DIST = `${sep}dist${sep}`\n\n/**\n * Find the package.json file, either from a TypeScript file somewhere not\n * in a 'dist' folder, or a built and/or installed 'dist' folder.\n *\n * Note: this *only* works if you build your code into `'./dist'`, and that the\n * source path does not also contain `'dist'`! If you don't build into\n * `'./dist'`, or if you have files at `./src/dist/dist.ts`, then this will\n * not work properly!\n *\n * The default `pathFromSrc` option assumes that the calling code lives one\n * folder below the root of the package. Otherwise, it must be specified.\n *\n * Example:\n *\n * ```ts\n * // src/index.ts\n * import { findPackageJson } from 'package-json-from-dist'\n *\n * const pj = findPackageJson(import.meta.url)\n * console.log(`package.json found at ${pj}`)\n * ```\n *\n * If the caller is deeper within the project source, then you must provide\n * the appropriate fallback path:\n *\n * ```ts\n * // src/components/something.ts\n * import { findPackageJson } from 'package-json-from-dist'\n *\n * const pj = findPackageJson(import.meta.url, '../../package.json')\n * console.log(`package.json found at ${pj}`)\n * ```\n *\n * When running from CommmonJS, use `__filename` instead of `import.meta.url`\n *\n * ```ts\n * // src/index.cts\n * import { findPackageJson } from 'package-json-from-dist'\n *\n * const pj = findPackageJson(__filename)\n * console.log(`package.json found at ${pj}`)\n * ```\n */\nexport const findPackageJson = (\n from: string | URL,\n pathFromSrc: string = '../package.json',\n): string => {\n const f =\n typeof from === 'object' || from.startsWith('file://') ?\n fileURLToPath(from)\n : from\n const __dirname = dirname(f)\n\n const nms = __dirname.lastIndexOf(NM)\n if (nms !== -1) {\n // inside of node_modules. find the dist directly under package name.\n const nm = __dirname.substring(0, nms + NM.length)\n const pkgDir = __dirname.substring(nms + NM.length)\n // affordance for yarn berry, which puts package contents in\n // '.../node_modules/.store/${id}-${hash}/package/...'\n if (pkgDir.startsWith(STORE)) {\n const pkg = pkgDir.indexOf(PKG, STORE.length)\n if (pkg) {\n return resolve(\n nm,\n pkgDir.substring(0, pkg + PKG.length),\n 'package.json',\n )\n }\n }\n const pkgName =\n pkgDir.startsWith('@') ?\n pkgDir.split(sep, 2).join(sep)\n : String(pkgDir.split(sep)[0])\n return resolve(nm, pkgName, 'package.json')\n } else {\n // see if we are in a dist folder.\n const d = __dirname.lastIndexOf(DLine truncated
@@ -0,0 +1,3 @@
declare const _exports: import('eslint').Rule.RuleModule;
export = _exports;
//# sourceMappingURL=no-multi-comp.d.ts.map
@@ -0,0 +1,60 @@
{
"name": "@types/unist",
"version": "3.0.3",
"description": "TypeScript definitions for unist",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/unist",
"license": "MIT",
"contributors": [
{
"name": "bizen241",
"githubUsername": "bizen241",
"url": "https://github.com/bizen241"
},
{
"name": "Jun Lu",
"githubUsername": "lujun2",
"url": "https://github.com/lujun2"
},
{
"name": "Hernan Rajchert",
"githubUsername": "hrajchert",
"url": "https://github.com/hrajchert"
},
{
"name": "Titus Wormer",
"githubUsername": "wooorm",
"url": "https://github.com/wooorm"
},
{
"name": "Junyoung Choi",
"githubUsername": "rokt33r",
"url": "https://github.com/rokt33r"
},
{
"name": "Ben Moon",
"githubUsername": "GuiltyDolphin",
"url": "https://github.com/GuiltyDolphin"
},
{
"name": "JounQin",
"githubUsername": "JounQin",
"url": "https://github.com/JounQin"
},
{
"name": "Remco Haszing",
"githubUsername": "remcohaszing",
"url": "https://github.com/remcohaszing"
}
],
"main": "",
"types": "index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
"directory": "types/unist"
},
"scripts": {},
"dependencies": {},
"typesPublisherContentHash": "7f3d5ce8d56003f3583a5317f98d444bdc99910c7b486c6b10af4f38694e61fe",
"typeScriptVersion": "4.8"
}
@@ -0,0 +1,2 @@
"use strict";var j=Object.defineProperty;var C=(r,e,t)=>e in r?j(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var f=(r,e,t)=>C(r,typeof e!="symbol"?e+"":e,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("@protobuf-ts/runtime");class i{constructor(e,t,p,s){f(this,"_value");f(this,"_fieldId");f(this,"_opt");f(this,"_callback");this._value=t,this._fieldId=e,this._opt=p,this._callback=s}get value(){return this._value}set value(e){this._value=e}getTypeName(){return this.constructor.name}getFieldId(){return this._fieldId}getField(e){return _(e,this)}}class y extends i{getTypeName(){return"DoubleWrapper"}}class T extends i{getTypeName(){return"FloatWrapper"}}class I extends i{getTypeName(){return"StringWrapper"}}class B extends i{getTypeName(){return"UInt32Wrapper"}}class S extends i{getTypeName(){return"Int32Wrapper"}}class g extends i{getTypeName(){return"Int64Wrapper"}}class F extends i{getTypeName(){return"UInt64Wrapper"}}class x extends i{getTypeName(){return"ArrayWrapper"}}class P extends i{getTypeName(){return"BoolWrapper"}}class w extends i{getTypeName(){return"BytesWrapper"}}class h extends i{getTypeName(){return"Fixed64Wrapper"}}class m extends i{getTypeName(){return"Fixed32Wrapper"}}class b extends i{getTypeName(){return"SFixed32Wrapper"}}class U extends i{getTypeName(){return"SFixed64Wrapper"}}class N extends i{getTypeName(){return"SInt32Wrapper"}}class k extends i{getTypeName(){return"SInt64Wrapper"}}class D extends i{getTypeName(){return"UnknownWrapper"}}const n={UInt32Wrapper:"UInt32Wrapper",Int32Wrapper:"Int32Wrapper",Int64Wrapper:"Int64Wrapper",UInt64Wrapper:"UInt64Wrapper",StringWrapper:"StringWrapper",ArrayWrapper:"ArrayWrapper",BoolWrapper:"BoolWrapper",BytesWrapper:"BytesWrapper",DoubleWrapper:"DoubleWrapper",FloatWrapper:"FloatWrapper",Fixed64Wrapper:"Fixed64Wrapper",Fixed32Wrapper:"Fixed32Wrapper",SFixed32Wrapper:"SFixed32Wrapper",SFixed64Wrapper:"SFixed64Wrapper",SInt32Wrapper:"SInt32Wrapper",SInt64Wrapper:"SInt64Wrapper",UnknownWrapper:"UnknownWrapper"},M={[n.UInt32Wrapper]:B,[n.Int32Wrapper]:S,[n.Int64Wrapper]:g,[n.UInt64Wrapper]:F,[n.StringWrapper]:I,[n.ArrayWrapper]:x,[n.BoolWrapper]:P,[n.BytesWrapper]:w,[n.DoubleWrapper]:y,[n.FloatWrapper]:T,[n.Fixed64Wrapper]:h,[n.Fixed32Wrapper]:m,[n.SFixed32Wrapper]:b,[n.SFixed64Wrapper]:U,[n.SInt32Wrapper]:N,[n.SInt64Wrapper]:k,[n.UnknownWrapper]:D},K={[n.UInt32Wrapper]:a.ScalarType.UINT32,[n.Int32Wrapper]:a.ScalarType.INT32,[n.Int64Wrapper]:a.ScalarType.INT64,[n.UInt64Wrapper]:a.ScalarType.UINT64,[n.StringWrapper]:a.ScalarType.STRING,[n.BytesWrapper]:a.ScalarType.BYTES,[n.BoolWrapper]:a.ScalarType.BOOL,[n.DoubleWrapper]:a.ScalarType.DOUBLE,[n.FloatWrapper]:a.ScalarType.FLOAT,[n.Fixed64Wrapper]:a.ScalarType.FIXED64,[n.Fixed32Wrapper]:a.ScalarType.FIXED32,[n.SFixed32Wrapper]:a.ScalarType.SFIXED32,[n.SFixed64Wrapper]:a.ScalarType.SFIXED64,[n.SInt32Wrapper]:a.ScalarType.SINT32,[n.SInt64Wrapper]:a.ScalarType.SINT64,[n.UnknownWrapper]:a.ScalarType.BYTES};function R(r){return M[r]||D}function O(r){return K[r]||a.ScalarType.BYTES}function L(r=0,e,t=!1,p=[]){return new x(r,p,t,()=>e)}function X(r=0,e=!1,t=0){return new y(r,t,e)}function G(r=0,e=!1,t=0){return new T(r,t,e)}function Y(r=0,e=!1,t=""){return new I(r,t,e)}function q(r=0,e=!1,t=0){return new B(r,t,e)}function Q(r=0,e=!1,t=0){return new S(r,t,e)}function V(r=0,e=!1,t=BigInt(0)){return new g(r,t,e)}function $(r=0,e=!1,t=BigInt(0)){return new F(r,t,e)}function z(r=0,e=!1,t=!1){return new P(r,t,e)}function H(r=0,e=!1,t=new Uint8Array){return new w(r,t,e)}function J(r=0,e=!1,t=BigInt(0)){return new h(r,t,e)}function Z(r=0,e=!1,t=0){return new m(r,t,e)}function ee(r=0,e=!1,t=0){return new b(r,t,e)}function re(r=0,e=!1,t=BigInt(0)){return new U(r,t,e)}function te(r=0,e=!1,t=0){return new N(r,t,e)}function ne(r=0,e=!1,t=BigInt(0)){return new k(r,t,e)}function _(r,e){var c;const t=e.getTypeName(),p=e.getFieldId(),s=e._opt;if(t===n.ArrayWrapper){const o=(c=e._callback)==null?void 0:c.call(e);if(o instanceof l)return{no:p,name:r,kind:"message",T:()=>new a.MessageType(r,o.generateFields()),opt:s||!1,repeat:a.RepeatType.PACKED};if(o instanceof i){const u=o.getTypeName();return{no:p,name:r,kind:"scalar",T:O(u),opt:s||!1,repeat:u===n.StringWrapper||u===n.BytesWrapper?a.RepeatType.UNPACKED:a.RepeatType.PACKED}}throw new Error("ArrayWrapper item type error")}return{no:p,name:r,kind:"scalar",T:O(t),opt:s||!1,repeat:a.RepeatType.NO}}class l{constructor(){f(this,"_fieldId",0)}generateFields(){const e=[];for(const t of Object.keys(this)){const p="_"+t,s=this[p];s instanceof i&&e.push(s.getField(t)),s instanceof l&&e.push({no:s._fieldId,name:t,kind:"message",T:()=>new a.MessageType(p,s.generateFields()),repeat:a.RepeatType.NO,opt:!1})}return e}assignFields(e){for(const t of Object.keys(this)){const p="_"+t;let s=this[p];if(s instanceof i){const c=e[t];c!==void 0&&(s.value=c)}else if(s instanceof l){const c=e[t];c!==void 0&&s.assignFields(c)}else{const c=e[t];cLine truncated
//# sourceMappingURL=protobuf.cjs.map
@@ -0,0 +1 @@
{"version":3,"sources":["../../../../src/query/react/index.ts","../../../../src/query/react/rtkqImports.ts","../../../../src/query/react/module.ts","../../../../src/query/utils/capitalize.ts","../../../../src/query/endpointDefinitions.ts","../../../../src/query/tsHelpers.ts","../../../../src/query/react/buildHooks.ts","../../../../src/query/react/reactImports.ts","../../../../src/query/react/reactReduxImports.ts","../../../../src/query/react/constants.ts","../../../../src/query/react/useSerializedStableValue.ts","../../../../src/query/react/useShallowStableValue.ts","../../../../src/query/react/ApiProvider.tsx"],"sourcesContent":["// This must remain here so that the `mangleErrors.cjs` build script\n// does not have to import this into each source file it rewrites.\nimport { formatProdErrorMessage } from '@reduxjs/toolkit';\nimport { buildCreateApi, coreModule } from './rtkqImports';\nimport { reactHooksModule, reactHooksModuleName } from './module';\nexport * from '@reduxjs/toolkit/query';\nexport { ApiProvider } from './ApiProvider';\nconst createApi = /* @__PURE__ */buildCreateApi(coreModule(), reactHooksModule());\nexport type { TypedUseMutationResult, TypedUseQueryHookResult, TypedUseQueryStateResult, TypedUseQuerySubscriptionResult, TypedLazyQueryTrigger, TypedUseLazyQuery, TypedUseMutation, TypedMutationTrigger, TypedQueryStateSelector, TypedUseQueryState, TypedUseQuery, TypedUseQuerySubscription, TypedUseLazyQuerySubscription, TypedUseQueryStateOptions, TypedUseLazyQueryStateResult, TypedUseInfiniteQuery, TypedUseInfiniteQueryHookResult, TypedUseInfiniteQueryStateResult, TypedUseInfiniteQuerySubscriptionResult, TypedUseInfiniteQueryStateOptions, TypedInfiniteQueryStateSelector, TypedUseInfiniteQuerySubscription, TypedUseInfiniteQueryState, TypedLazyInfiniteQueryTrigger } from './buildHooks';\nexport { UNINITIALIZED_VALUE } from './constants';\nexport { createApi, reactHooksModule, reactHooksModuleName };","export { buildCreateApi, coreModule, copyWithStructuralSharing, setupListeners, QueryStatus, skipToken } from '@reduxjs/toolkit/query';","import { formatProdErrorMessage as _formatProdErrorMessage } from \"@reduxjs/toolkit\";\nimport type { Api, BaseQueryFn, EndpointDefinitions, InfiniteQueryDefinition, Module, MutationDefinition, PrefetchOptions, QueryArgFrom, QueryDefinition, QueryKeys } from '@reduxjs/toolkit/query';\nimport { batch as rrBatch, useDispatch as rrUseDispatch, useSelector as rrUseSelector, useStore as rrUseStore } from 'react-redux';\nimport { createSelector as _createSelector } from 'reselect';\nimport { isInfiniteQueryDefinition, isMutationDefinition, isQueryDefinition } from '../endpointDefinitions';\nimport { safeAssign } from '../tsHelpers';\nimport { capitalize, countObjectKeys } from '../utils';\nimport type { InfiniteQueryHooks, MutationHooks, QueryHooks } from './buildHooks';\nimport { buildHooks } from './buildHooks';\nimport type { HooksWithUniqueNames } from './namedHooks';\nexport const reactHooksModuleName = /* @__PURE__ */Symbol();\nexport type ReactHooksModule = typeof reactHooksModuleName;\ndeclare module '@reduxjs/toolkit/query' {\n export interface ApiModules<\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n BaseQuery extends BaseQueryFn, Definitions extends EndpointDefinitions,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n ReducerPath extends string,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n TagTypes extends string> {\n [reactHooksModuleName]: {\n /**\n * Endpoints based on the input endpoints provided to `createApi`, containing `select`, `hooks` and `action matchers`.\n */\n endpoints: { [K in keyof Definitions]: Definitions[K] extends QueryDefinition<any, any, any, any, any> ? QueryHooks<Definitions[K]> : Definitions[K] extends MutationDefinition<any, any, any, any, any> ? MutationHooks<Definitions[K]> : Definitions[K] extends InfiniteQueryDefinition<any, any, any, any, any> ? InfiniteQueryHooks<Definitions[K]> : never };\n /**\n * A hook that accepts a string endpoint name, and provides a callback that when called, pre-fetches the data for that endpoint.\n */\n usePrefetch<EndpointName extends QueryKeys<Definitions>>(endpointName: EndpointName, options?: PrefetchOptions): (arg: QueryArgFrom<Definitions[EndpointName]>, options?: PrefetchOptions) => void;\n } & HooksWithUniqueNames<Definitions>;\n }\n}\ntype RR = typeof import('react-redux');\nexport interface ReactHooksModuleOptions {\n /**\n * The hooks from React Redux to be used\n */\n hooks?: {\n /**\n * The version of the `useDispatch` hook to be used\n */\n useDispatch: RR['useDispatch'];\n /**\n * The version of the `useSelector` hook to be used\n */\n useSelector: RR['useSelector'];\n /**\n * The version of the `useStore` hook to be used\n */\n useStore: RR['useStore'];\n };\n /**\n * The version of the `batchedUpdates` function toLine truncated
@@ -0,0 +1,106 @@
'use strict';
import utils from '../utils.js';
import AxiosHeaders from "./AxiosHeaders.js";
const headersToObject = (thing) => thing instanceof AxiosHeaders ? { ...thing } : thing;
/**
* Config-specific merge-function which creates a new config-object
* by merging two configuration objects together.
*
* @param {Object} config1
* @param {Object} config2
*
* @returns {Object} New object resulting from merging config2 to config1
*/
export default function mergeConfig(config1, config2) {
// eslint-disable-next-line no-param-reassign
config2 = config2 || {};
const config = {};
function getMergedValue(target, source, prop, caseless) {
if (utils.isPlainObject(target) && utils.isPlainObject(source)) {
return utils.merge.call({caseless}, target, source);
} else if (utils.isPlainObject(source)) {
return utils.merge({}, source);
} else if (utils.isArray(source)) {
return source.slice();
}
return source;
}
// eslint-disable-next-line consistent-return
function mergeDeepProperties(a, b, prop, caseless) {
if (!utils.isUndefined(b)) {
return getMergedValue(a, b, prop, caseless);
} else if (!utils.isUndefined(a)) {
return getMergedValue(undefined, a, prop, caseless);
}
}
// eslint-disable-next-line consistent-return
function valueFromConfig2(a, b) {
if (!utils.isUndefined(b)) {
return getMergedValue(undefined, b);
}
}
// eslint-disable-next-line consistent-return
function defaultToConfig2(a, b) {
if (!utils.isUndefined(b)) {
return getMergedValue(undefined, b);
} else if (!utils.isUndefined(a)) {
return getMergedValue(undefined, a);
}
}
// eslint-disable-next-line consistent-return
function mergeDirectKeys(a, b, prop) {
if (prop in config2) {
return getMergedValue(a, b);
} else if (prop in config1) {
return getMergedValue(undefined, a);
}
}
const mergeMap = {
url: valueFromConfig2,
method: valueFromConfig2,
data: valueFromConfig2,
baseURL: defaultToConfig2,
transformRequest: defaultToConfig2,
transformResponse: defaultToConfig2,
paramsSerializer: defaultToConfig2,
timeout: defaultToConfig2,
timeoutMessage: defaultToConfig2,
withCredentials: defaultToConfig2,
withXSRFToken: defaultToConfig2,
adapter: defaultToConfig2,
responseType: defaultToConfig2,
xsrfCookieName: defaultToConfig2,
xsrfHeaderName: defaultToConfig2,
onUploadProgress: defaultToConfig2,
onDownloadProgress: defaultToConfig2,
decompress: defaultToConfig2,
maxContentLength: defaultToConfig2,
maxBodyLength: defaultToConfig2,
beforeRedirect: defaultToConfig2,
transport: defaultToConfig2,
httpAgent: defaultToConfig2,
httpsAgent: defaultToConfig2,
cancelToken: defaultToConfig2,
socketPath: defaultToConfig2,
responseEncoding: defaultToConfig2,
validateStatus: mergeDirectKeys,
headers: (a, b, prop) => mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true)
};
utils.forEach(Object.keys({...config1, ...config2}), function computeConfigValue(prop) {
const merge = mergeMap[prop] || mergeDeepProperties;
const configValue = merge(config1[prop], config2[prop], prop);
(utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
});
return config;
}
@@ -0,0 +1,279 @@
import {TokenType as tt} from "../parser/tokenizer/types";
import isIdentifier from "../util/isIdentifier";
import Transformer from "./Transformer";
export default class TypeScriptTransformer extends Transformer {
constructor(
rootTransformer,
tokens,
isImportsTransformEnabled,
) {
super();this.rootTransformer = rootTransformer;this.tokens = tokens;this.isImportsTransformEnabled = isImportsTransformEnabled;;
}
process() {
if (
this.rootTransformer.processPossibleArrowParamEnd() ||
this.rootTransformer.processPossibleAsyncArrowWithTypeParams() ||
this.rootTransformer.processPossibleTypeRange()
) {
return true;
}
if (
this.tokens.matches1(tt._public) ||
this.tokens.matches1(tt._protected) ||
this.tokens.matches1(tt._private) ||
this.tokens.matches1(tt._abstract) ||
this.tokens.matches1(tt._readonly) ||
this.tokens.matches1(tt._override) ||
this.tokens.matches1(tt.nonNullAssertion)
) {
this.tokens.removeInitialToken();
return true;
}
if (this.tokens.matches1(tt._enum) || this.tokens.matches2(tt._const, tt._enum)) {
this.processEnum();
return true;
}
if (
this.tokens.matches2(tt._export, tt._enum) ||
this.tokens.matches3(tt._export, tt._const, tt._enum)
) {
this.processEnum(true);
return true;
}
return false;
}
processEnum(isExport = false) {
// We might have "export const enum", so just remove all relevant tokens.
this.tokens.removeInitialToken();
while (this.tokens.matches1(tt._const) || this.tokens.matches1(tt._enum)) {
this.tokens.removeToken();
}
const enumName = this.tokens.identifierName();
this.tokens.removeToken();
if (isExport && !this.isImportsTransformEnabled) {
this.tokens.appendCode("export ");
}
this.tokens.appendCode(`var ${enumName}; (function (${enumName})`);
this.tokens.copyExpectedToken(tt.braceL);
this.processEnumBody(enumName);
this.tokens.copyExpectedToken(tt.braceR);
if (isExport && this.isImportsTransformEnabled) {
this.tokens.appendCode(`)(${enumName} || (exports.${enumName} = ${enumName} = {}));`);
} else {
this.tokens.appendCode(`)(${enumName} || (${enumName} = {}));`);
}
}
/**
* Transform an enum into equivalent JS. This has complexity in a few places:
* - TS allows string enums, numeric enums, and a mix of the two styles within an enum.
* - Enum keys are allowed to be referenced in later enum values.
* - Enum keys are allowed to be strings.
* - When enum values are omitted, they should follow an auto-increment behavior.
*/
processEnumBody(enumName) {
// Code that can be used to reference the previous enum member, or null if this is the first
// enum member.
let previousValueCode = null;
while (true) {
if (this.tokens.matches1(tt.braceR)) {
break;
}
const {nameStringCode, variableName} = this.extractEnumKeyInfo(this.tokens.currentToken());
this.tokens.removeInitialToken();
if (
this.tokens.matches3(tt.eq, tt.string, tt.comma) ||
this.tokens.matches3(tt.eq, tt.string, tt.braceR)
) {
this.processStringLiteralEnumMember(enumName, nameStringCode, variableName);
} else if (this.tokens.matches1(tt.eq)) {
this.processExplicitValueEnumMember(enumName, nameStringCode, variableName);
} else {
this.processImplicitValueEnumMember(
enumName,
nameStringCode,
variableName,
previousValueCode,
);
}
if (this.tokens.matches1(tt.comma)) {
this.tokens.removeToken();
}
if (variableName != null) {
previousValueCode = variableName;
} else {
previousValueCode = `${enumName}[${nameStringCode}]`;
}
}
}
/**
* Detect name information about this enum key, which will be used to determine which code to emit
* and whether we should declare a variable as part of this declaration.
*
* Some cases to keep in mind:
* - Enum keys can be implicitly referenced later, e.g. `X = 1, Y = X`. In Sucrase, we implement
* this by declaring a variable `X` so that later expressions can use it.
* - In addition to the usual identifier key syntax, enum keys are allowed to be string literals,
* e.g. `"hello world" = 3,`. Template literal syntax is NOT allowed.
* - Even if the enum key is defined as a string literal, it may still be referenced by identifier
* later, e.g. `"X" = 1, Y = X`. That means that we need to detect whether or not a string
* literal is identifier-like and emit a variable if so, even if the declaration did not use an
* identifier.
* - Reserved keywords like `break` are valid enum keys, but are not valid to be referenced later
* and would be a syntax error if we emitted a variable, so we need to skip the variable
* declaration in those cases.
*
* The variableName return value captures these nuances: if non-null, we can and must emit a
* variable declaration, and if null, we can't and shouldn't.
*/
extractEnumKeyInfo(nameToken) {
if (nameToken.type === tt.name) {
const name = this.tokens.identifierNameForToken(nameToken);
return {
nameStringCode: `"${name}"`,
variableName: isIdentifier(name) ? name : null,
};
} else if (nameToken.type === tt.string) {
const name = this.tokens.stringValueForToken(nameToken);
return {
nameStringCode: this.tokens.code.slice(nameToken.start, nameToken.end),
variableName: isIdentifier(name) ? name : null,
};
} else {
throw new Error("Expected name or string at beginning of enum element.");
}
}
/**
* Handle an enum member where the RHS is just a string literal (not omitted, not a number, and
* not a complex expression). This is the typical form for TS string enums, and in this case, we
* do *not* create a reverse mapping.
*
* This is called after deleting the key token, when the token processor is at the equals sign.
*
* Example 1:
* someKey = "some value"
* ->
* const someKey = "some value"; MyEnum["someKey"] = someKey;
*
* Example 2:
* "some key" = "some value"
* ->
* MyEnum["some key"] = "some value";
*/
processStringLiteralEnumMember(
enumName,
nameStringCode,
variableName,
) {
if (variableName != null) {
this.tokens.appendCode(`const ${variableName}`);
// =
this.tokens.copyToken();
// value string
this.tokens.copyToken();
this.tokens.appendCode(`; ${enumName}[${nameStringCode}] = ${variableName};`);
} else {
this.tokens.appendCode(`${enumName}[${nameStringCode}]`);
// =
this.tokens.copyToken();
// value string
this.tokens.copyToken();
this.tokens.appendCode(";");
}
}
/**
* Handle an enum member initialized with an expression on the right-hand side (other than a
* string literal). In these cases, we should transform the expression and emit code that sets up
* a reverse mapping.
*
* The TypeScript implementation of this operation distinguishes between expressions that can be
* "constant folded" at compile time (i.e. consist of number literals and simple math operations
* on those numbers) and ones that are dynamic. For constant expressions, it emits the resolved
* numeric value, and auto-incrementing is only allowed in that case. Evaluating expressions at
* compile time would add significant complexity to Sucrase, so Sucrase instead leaves the
* expression as-is, and will later emit something like `MyEnum["previousKey"] + 1` to implement
* auto-incrementing.
*
* This is called after deleting the key token, when the token processor is at the equals sign.
*
* Example 1:
* someKey = 1 + 1
* ->
* const someKey = 1 + 1; MyEnum[MyEnum["someKey"] = someKey] = "someKey";
*
* Example 2:
* "some key" = 1 + 1
* ->
* MyEnum[MyEnum["some key"] = 1 + 1] = "some key";
*/
processExplicitValueEnumMember(
enumName,
nameStringCode,
variableName,
) {
const rhsEndIndex = this.tokens.currentToken().rhsEndIndex;
if (rhsEndIndex == null) {
throw new Error("Expected rhsEndIndex on enum assign.");
}
if (variableName != null) {
this.tokens.appendCode(`const ${variableName}`);
this.tokens.copyToken();
while (this.tokens.currentIndex() < rhsEndIndex) {
this.rootTransformer.processToken();
}
this.tokens.appendCode(
`; ${enumName}[${enumName}[${nameStringCode}] = ${variableName}] = ${nameStringCode};`,
);
} else {
this.tokens.appendCode(`${enumName}[${enumName}[${nameStringCode}]`);
this.tokens.copyToken();
while (this.tokens.currentIndex() < rhsEndIndex) {
this.rootTransformer.processToken();
}
this.tokens.appendCode(`] = ${nameStringCode};`);
}
}
/**
* Handle an enum member with no right-hand side expression. In this case, the value is the
* previous value plus 1, or 0 if there was no previous value. We should also always emit a
* reverse mapping.
*
* Example 1:
* someKey2
* ->
* const someKey2 = someKey1 + 1; MyEnum[MyEnum["someKey2"] = someKey2] = "someKey2";
*
* Example 2:
* "some key 2"
* ->
* MyEnum[MyEnum["some key 2"] = someKey1 + 1] = "some key 2";
*/
processImplicitValueEnumMember(
enumName,
nameStringCode,
variableName,
previousValueCode,
) {
let valueCode = previousValueCode != null ? `${previousValueCode} + 1` : "0";
if (variableName != null) {
this.tokens.appendCode(`const ${variableName} = ${valueCode}; `);
valueCode = variableName;
}
this.tokens.appendCode(
`${enumName}[${enumName}[${nameStringCode}] = ${valueCode}] = ${nameStringCode};`,
);
}
}
@@ -0,0 +1 @@
{"mappings":";AAAA,4BAAiB;IAAG,eAAe,CAAC,SAAS,CAAC;AAC9C","sources":["packages/@react-aria/breadcrumbs/intl/et-EE.json"],"sourcesContent":["{\n \"breadcrumbs\": \"Lingiread\"\n}\n"],"names":[],"version":3,"file":"et-EE.module.js.map"}
@@ -0,0 +1,22 @@
var baseMean = require('./_baseMean'),
identity = require('./identity');
/**
* Computes the mean of the values in `array`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Math
* @param {Array} array The array to iterate over.
* @returns {number} Returns the mean.
* @example
*
* _.mean([4, 2, 8, 6]);
* // => 5
*/
function mean(array) {
return baseMean(array, identity);
}
module.exports = mean;
@@ -0,0 +1,4 @@
declare const versions: readonly ["4.7", "4.8", "4.9", "5.0", "5.1", "5.2", "5.3", "5.4"];
type Versions = typeof versions extends ArrayLike<infer U> ? U : never;
export declare const typescriptVersionIsAtLeast: Record<Versions, boolean>;
export {};
@@ -0,0 +1,12 @@
import AsyncReader from '../readers/async';
import type Settings from '../settings';
import type { Entry, Errno } from '../types';
export declare type AsyncCallback = (error: Errno, entries: Entry[]) => void;
export default class AsyncProvider {
private readonly _root;
private readonly _settings;
protected readonly _reader: AsyncReader;
private readonly _storage;
constructor(_root: string, _settings: Settings);
read(callback: AsyncCallback): void;
}
@@ -0,0 +1 @@
{"version":3,"file":"appendErrors.d.ts","sourceRoot":"","sources":["../../src/logic/appendErrors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EACnB,iBAAiB,EACjB,cAAc,EACf,MAAM,UAAU,CAAC;yBAGhB,MAAM,iBAAiB,EACvB,0BAA0B,OAAO,EACjC,QAAQ,mBAAmB,EAC3B,MAAM,MAAM,EACZ,SAAS,cAAc;AALzB,wBAeS"}
@@ -0,0 +1,207 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.ArrayExpression = ArrayExpression;
exports.AssignmentExpression = AssignmentExpression;
exports.BinaryExpression = BinaryExpression;
exports.BooleanLiteral = BooleanLiteral;
exports.CallExpression = CallExpression;
exports.ConditionalExpression = ConditionalExpression;
exports.ClassDeclaration = exports.ClassExpression = exports.FunctionDeclaration = exports.ArrowFunctionExpression = exports.FunctionExpression = Func;
Object.defineProperty(exports, "Identifier", {
enumerable: true,
get: function () {
return _infererReference.default;
}
});
exports.LogicalExpression = LogicalExpression;
exports.NewExpression = NewExpression;
exports.NullLiteral = NullLiteral;
exports.NumericLiteral = NumericLiteral;
exports.ObjectExpression = ObjectExpression;
exports.ParenthesizedExpression = ParenthesizedExpression;
exports.RegExpLiteral = RegExpLiteral;
exports.RestElement = RestElement;
exports.SequenceExpression = SequenceExpression;
exports.StringLiteral = StringLiteral;
exports.TSAsExpression = TSAsExpression;
exports.TSNonNullExpression = TSNonNullExpression;
exports.TaggedTemplateExpression = TaggedTemplateExpression;
exports.TemplateLiteral = TemplateLiteral;
exports.TypeCastExpression = TypeCastExpression;
exports.UnaryExpression = UnaryExpression;
exports.UpdateExpression = UpdateExpression;
exports.VariableDeclarator = VariableDeclarator;
var _t = require("@babel/types");
var _infererReference = require("./inferer-reference.js");
var _util = require("./util.js");
const {
BOOLEAN_BINARY_OPERATORS,
BOOLEAN_UNARY_OPERATORS,
NUMBER_BINARY_OPERATORS,
NUMBER_UNARY_OPERATORS,
STRING_UNARY_OPERATORS,
anyTypeAnnotation,
arrayTypeAnnotation,
booleanTypeAnnotation,
buildMatchMemberExpression,
genericTypeAnnotation,
identifier,
nullLiteralTypeAnnotation,
numberTypeAnnotation,
stringTypeAnnotation,
tupleTypeAnnotation,
unionTypeAnnotation,
voidTypeAnnotation,
isIdentifier
} = _t;
function VariableDeclarator() {
if (!this.get("id").isIdentifier()) return;
return this.get("init").getTypeAnnotation();
}
function TypeCastExpression(node) {
return node.typeAnnotation;
}
TypeCastExpression.validParent = true;
function TSAsExpression(node) {
return node.typeAnnotation;
}
TSAsExpression.validParent = true;
function TSNonNullExpression() {
return this.get("expression").getTypeAnnotation();
}
function NewExpression(node) {
if (node.callee.type === "Identifier") {
return genericTypeAnnotation(node.callee);
}
}
function TemplateLiteral() {
return stringTypeAnnotation();
}
function UnaryExpression(node) {
const operator = node.operator;
if (operator === "void") {
return voidTypeAnnotation();
} else if (NUMBER_UNARY_OPERATORS.includes(operator)) {
return numberTypeAnnotation();
} else if (STRING_UNARY_OPERATORS.includes(operator)) {
return stringTypeAnnotation();
} else if (BOOLEAN_UNARY_OPERATORS.includes(operator)) {
return booleanTypeAnnotation();
}
}
function BinaryExpression(node) {
const operator = node.operator;
if (NUMBER_BINARY_OPERATORS.includes(operator)) {
return numberTypeAnnotation();
} else if (BOOLEAN_BINARY_OPERATORS.includes(operator)) {
return booleanTypeAnnotation();
} else if (operator === "+") {
const right = this.get("right");
const left = this.get("left");
if (left.isBaseType("number") && right.isBaseType("number")) {
return numberTypeAnnotation();
} else if (left.isBaseType("string") || right.isBaseType("string")) {
return stringTypeAnnotation();
}
return unionTypeAnnotation([stringTypeAnnotation(), numberTypeAnnotation()]);
}
}
function LogicalExpression() {
const argumentTypes = [this.get("left").getTypeAnnotation(), this.get("right").getTypeAnnotation()];
return (0, _util.createUnionType)(argumentTypes);
}
function ConditionalExpression() {
const argumentTypes = [this.get("consequent").getTypeAnnotation(), this.get("alternate").getTypeAnnotation()];
return (0, _util.createUnionType)(argumentTypes);
}
function SequenceExpression() {
return this.get("expressions").pop().getTypeAnnotation();
}
function ParenthesizedExpression() {
return this.get("expression").getTypeAnnotation();
}
function AssignmentExpression() {
return this.get("right").getTypeAnnotation();
}
function UpdateExpression(node) {
const operator = node.operator;
if (operator === "++" || operator === "--") {
return numberTypeAnnotation();
}
}
function StringLiteral() {
return stringTypeAnnotation();
}
function NumericLiteral() {
return numberTypeAnnotation();
}
function BooleanLiteral() {
return booleanTypeAnnotation();
}
function NullLiteral() {
return nullLiteralTypeAnnotation();
}
function RegExpLiteral() {
return genericTypeAnnotation(identifier("RegExp"));
}
function ObjectExpression() {
return genericTypeAnnotation(identifier("Object"));
}
function ArrayExpression() {
return genericTypeAnnotation(identifier("Array"));
}
function RestElement() {
return ArrayExpression();
}
RestElement.validParent = true;
function Func() {
return genericTypeAnnotation(identifier("Function"));
}
const isArrayFrom = buildMatchMemberExpression("Array.from");
const isObjectKeys = buildMatchMemberExpression("Object.keys");
const isObjectValues = buildMatchMemberExpression("Object.values");
const isObjectEntries = buildMatchMemberExpression("Object.entries");
function CallExpression() {
const {
callee
} = this.node;
if (isObjectKeys(callee)) {
return arrayTypeAnnotation(stringTypeAnnotation());
} else if (isArrayFrom(callee) || isObjectValues(callee) || isIdentifier(callee, {
name: "Array"
})) {
return arrayTypeAnnotation(anyTypeAnnotation());
} else if (isObjectEntries(callee)) {
return arrayTypeAnnotation(tupleTypeAnnotation([stringTypeAnnotation(), anyTypeAnnotation()]));
}
return resolveCall(this.get("callee"));
}
function TaggedTemplateExpression() {
return resolveCall(this.get("tag"));
}
function resolveCall(callee) {
callee = callee.resolve();
if (callee.isFunction()) {
const {
node
} = callee;
if (node.async) {
if (node.generator) {
return genericTypeAnnotation(identifier("AsyncIterator"));
} else {
return genericTypeAnnotation(identifier("Promise"));
}
} else {
if (node.generator) {
return genericTypeAnnotation(identifier("Iterator"));
} else if (callee.node.returnType) {
return callee.node.returnType;
} else {}
}
}
}
//# sourceMappingURL=inferers.js.map
@@ -0,0 +1,46 @@
function $parcel$export(e, n, v, s) {
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
}
$parcel$export(module.exports, "createEventHandler", () => $951fbcbbca8db6ce$export$48d1ea6320830260);
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/ function $951fbcbbca8db6ce$export$48d1ea6320830260(handler) {
if (!handler) return undefined;
let shouldStopPropagation = true;
return (e)=>{
let event = {
...e,
preventDefault () {
e.preventDefault();
},
isDefaultPrevented () {
return e.isDefaultPrevented();
},
stopPropagation () {
if (shouldStopPropagation && process.env.NODE_ENV !== 'production') console.error('stopPropagation is now the default behavior for events in React Spectrum. You can use continuePropagation() to revert this behavior.');
else shouldStopPropagation = true;
},
continuePropagation () {
shouldStopPropagation = false;
},
isPropagationStopped () {
return shouldStopPropagation;
}
};
handler(event);
if (shouldStopPropagation) e.stopPropagation();
};
}
//# sourceMappingURL=createEventHandler.main.js.map
@@ -0,0 +1,126 @@
import type { $ZodStringFormats } from "../core/checks.js";
import type * as errors from "../core/errors.js";
import * as util from "../core/util.js";
const error: () => errors.$ZodErrorMap = () => {
const Sizable: Record<string, { unit: string; verb: string }> = {
string: { unit: "តួអក្សរ", verb: "គួរមាន" },
file: { unit: "បៃ", verb: "គួរមាន" },
array: { unit: "ធាតុ", verb: "គួរមាន" },
set: { unit: "ធាតុ", verb: "គួរមាន" },
};
function getSizing(origin: string): { unit: string; verb: string } | null {
return Sizable[origin] ?? null;
}
const parsedType = (data: any): string => {
const t = typeof data;
switch (t) {
case "number": {
return Number.isNaN(data) ? "មិនមែនជាលេខ (NaN)" : "លេខ";
}
case "object": {
if (Array.isArray(data)) {
return "អារេ (Array)";
}
if (data === null) {
return "គ្មានតម្លៃ (null)";
}
if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
return data.constructor.name;
}
}
}
return t;
};
const Nouns: {
[k in $ZodStringFormats | (string & {})]?: string;
} = {
regex: "ទិន្នន័យបញ្ចូល",
email: "អាសយដ្ឋានអ៊ីមែល",
url: "URL",
emoji: "សញ្ញាអារម្មណ៍",
uuid: "UUID",
uuidv4: "UUIDv4",
uuidv6: "UUIDv6",
nanoid: "nanoid",
guid: "GUID",
cuid: "cuid",
cuid2: "cuid2",
ulid: "ULID",
xid: "XID",
ksuid: "KSUID",
datetime: "កាលបរិច្ឆេទ និងម៉ោង ISO",
date: "កាលបរិច្ឆេទ ISO",
time: "ម៉ោង ISO",
duration: "រយៈពេល ISO",
ipv4: "អាសយដ្ឋាន IPv4",
ipv6: "អាសយដ្ឋាន IPv6",
cidrv4: "ដែនអាសយដ្ឋាន IPv4",
cidrv6: "ដែនអាសយដ្ឋាន IPv6",
base64: "ខ្សែអក្សរអ៊ិកូដ base64",
base64url: "ខ្សែអក្សរអ៊ិកូដ base64url",
json_string: "ខ្សែអក្សរ JSON",
e164: "លេខ E.164",
jwt: "JWT",
template_literal: "ទិន្នន័យបញ្ចូល",
};
return (issue) => {
switch (issue.code) {
case "invalid_type":
return `ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${issue.expected} ប៉ុន្តែទទួលបាន ${parsedType(issue.input)}`;
case "invalid_value":
if (issue.values.length === 1) return `ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${util.stringifyPrimitive(issue.values[0])}`;
return `ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${util.joinValues(issue.values, "|")}`;
case "too_big": {
const adj = issue.inclusive ? "<=" : "<";
const sizing = getSizing(issue.origin);
if (sizing)
return `ធំពេក៖ ត្រូវការ ${issue.origin ?? "តម្លៃ"} ${adj} ${issue.maximum.toString()} ${sizing.unit ?? "ធាតុ"}`;
return `ធំពេក៖ ត្រូវការ ${issue.origin ?? "តម្លៃ"} ${adj} ${issue.maximum.toString()}`;
}
case "too_small": {
const adj = issue.inclusive ? ">=" : ">";
const sizing = getSizing(issue.origin);
if (sizing) {
return `តូចពេក៖ ត្រូវការ ${issue.origin} ${adj} ${issue.minimum.toString()} ${sizing.unit}`;
}
return `តូចពេក៖ ត្រូវការ ${issue.origin} ${adj} ${issue.minimum.toString()}`;
}
case "invalid_format": {
const _issue = issue as errors.$ZodStringFormatIssues;
if (_issue.format === "starts_with") {
return `ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${_issue.prefix}"`;
}
if (_issue.format === "ends_with") return `ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${_issue.suffix}"`;
if (_issue.format === "includes") return `ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${_issue.includes}"`;
if (_issue.format === "regex") return `ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${_issue.pattern}`;
return `មិនត្រឹមត្រូវ៖ ${Nouns[_issue.format] ?? issue.format}`;
}
case "not_multiple_of":
return `លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${issue.divisor}`;
case "unrecognized_keys":
return `រកឃើញសោមិនស្គាល់៖ ${util.joinValues(issue.keys, ", ")}`;
case "invalid_key":
return `សោមិនត្រឹមត្រូវនៅក្នុង ${issue.origin}`;
case "invalid_union":
return `ទិន្នន័យមិនត្រឹមត្រូវ`;
case "invalid_element":
return `ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${issue.origin}`;
default:
return `ទិន្នន័យមិនត្រឹមត្រូវ`;
}
};
};
export default function (): { localeError: errors.$ZodErrorMap } {
return {
localeError: error(),
};
}
@@ -0,0 +1,21 @@
// @ts-ignore TS6133
import { expect, test } from "vitest";
import * as z from "zod/v3";
const schema = z.nan();
test("passing validations", () => {
schema.parse(Number.NaN);
schema.parse(Number("Not a number"));
});
test("failing validations", () => {
expect(() => schema.parse(5)).toThrow();
expect(() => schema.parse("John")).toThrow();
expect(() => schema.parse(true)).toThrow();
expect(() => schema.parse(null)).toThrow();
expect(() => schema.parse(undefined)).toThrow();
expect(() => schema.parse({})).toThrow();
expect(() => schema.parse([])).toThrow();
});
@@ -0,0 +1,22 @@
Copyright (c) Bogdan Chadkin <trysound@yandex.ru>
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,31 @@
"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/index.ts
var index_exports = {};
__export(index_exports, {
useSafeLayoutEffect: () => useSafeLayoutEffect
});
module.exports = __toCommonJS(index_exports);
var import_react = require("react");
var useSafeLayoutEffect = Boolean(globalThis == null ? void 0 : globalThis.document) ? import_react.useLayoutEffect : import_react.useEffect;
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
useSafeLayoutEffect
});
@@ -0,0 +1,62 @@
import {isRTL as $148a7a147e38ea7f$export$702d680b21cbd764} from "./utils.module.js";
import {useState as $ffhGL$useState, useEffect as $ffhGL$useEffect} from "react";
import {useIsSSR as $ffhGL$useIsSSR} from "@react-aria/ssr";
/*
* 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.
*/
// Locale passed from server by PackageLocalizationProvider.
const $1e5a04cdaf7d1af8$var$localeSymbol = Symbol.for('react-aria.i18n.locale');
function $1e5a04cdaf7d1af8$export$f09106e7c6677ec5() {
let locale = typeof window !== 'undefined' && window[$1e5a04cdaf7d1af8$var$localeSymbol] || typeof navigator !== 'undefined' && (navigator.language || navigator.userLanguage) || 'en-US';
try {
Intl.DateTimeFormat.supportedLocalesOf([
locale
]);
} catch {
locale = 'en-US';
}
return {
locale: locale,
direction: (0, $148a7a147e38ea7f$export$702d680b21cbd764)(locale) ? 'rtl' : 'ltr'
};
}
let $1e5a04cdaf7d1af8$var$currentLocale = $1e5a04cdaf7d1af8$export$f09106e7c6677ec5();
let $1e5a04cdaf7d1af8$var$listeners = new Set();
function $1e5a04cdaf7d1af8$var$updateLocale() {
$1e5a04cdaf7d1af8$var$currentLocale = $1e5a04cdaf7d1af8$export$f09106e7c6677ec5();
for (let listener of $1e5a04cdaf7d1af8$var$listeners)listener($1e5a04cdaf7d1af8$var$currentLocale);
}
function $1e5a04cdaf7d1af8$export$188ec29ebc2bdc3a() {
let isSSR = (0, $ffhGL$useIsSSR)();
let [defaultLocale, setDefaultLocale] = (0, $ffhGL$useState)($1e5a04cdaf7d1af8$var$currentLocale);
(0, $ffhGL$useEffect)(()=>{
if ($1e5a04cdaf7d1af8$var$listeners.size === 0) window.addEventListener('languagechange', $1e5a04cdaf7d1af8$var$updateLocale);
$1e5a04cdaf7d1af8$var$listeners.add(setDefaultLocale);
return ()=>{
$1e5a04cdaf7d1af8$var$listeners.delete(setDefaultLocale);
if ($1e5a04cdaf7d1af8$var$listeners.size === 0) window.removeEventListener('languagechange', $1e5a04cdaf7d1af8$var$updateLocale);
};
}, []);
// We cannot determine the browser's language on the server, so default to
// en-US. This will be updated after hydration on the client to the correct value.
if (isSSR) return {
locale: 'en-US',
direction: 'ltr'
};
return defaultLocale;
}
export {$1e5a04cdaf7d1af8$export$f09106e7c6677ec5 as getDefaultLocale, $1e5a04cdaf7d1af8$export$188ec29ebc2bdc3a as useDefaultLocale};
//# sourceMappingURL=useDefaultLocale.module.js.map
@@ -0,0 +1,18 @@
const isPrimaryPointer = (event) => {
if (event.pointerType === "mouse") {
return typeof event.button !== "number" || event.button <= 0;
}
else {
/**
* isPrimary is true for all mice buttons, whereas every touch point
* is regarded as its own input. So subsequent concurrent touch points
* will be false.
*
* Specifically match against false here as incomplete versions of
* PointerEvents in very old browser might have it set as undefined.
*/
return event.isPrimary !== false;
}
};
export { isPrimaryPointer };
@@ -0,0 +1 @@
{"mappings":";;AAAA;;;;;;;;;;CAUC","sources":["packages/@react-stately/form/src/index.ts"],"sourcesContent":["/*\n * Copyright 2023 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nexport {FormValidationContext, useFormValidationState, DEFAULT_VALIDATION_RESULT, VALID_VALIDITY_STATE, privateValidationStateProp, mergeValidation} from './useFormValidationState';\nexport type {FormValidationState} from './useFormValidationState';\n"],"names":[],"version":3,"file":"module.js.map"}
@@ -0,0 +1,40 @@
// Dutch [nl]
import dayjs from '../index';
var locale = {
name: 'nl',
weekdays: 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split('_'),
weekdaysShort: 'zo._ma._di._wo._do._vr._za.'.split('_'),
weekdaysMin: 'zo_ma_di_wo_do_vr_za'.split('_'),
months: 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split('_'),
monthsShort: 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split('_'),
ordinal: function ordinal(n) {
return "[" + n + (n === 1 || n === 8 || n >= 20 ? 'ste' : 'de') + "]";
},
weekStart: 1,
yearStart: 4,
formats: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'DD-MM-YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY HH:mm',
LLLL: 'dddd D MMMM YYYY HH:mm'
},
relativeTime: {
future: 'over %s',
past: '%s geleden',
s: 'een paar seconden',
m: 'een minuut',
mm: '%d minuten',
h: 'een uur',
hh: '%d uur',
d: 'een dag',
dd: '%d dagen',
M: 'een maand',
MM: '%d maanden',
y: 'een jaar',
yy: '%d jaar'
}
};
dayjs.locale(locale, null, true);
export default locale;
@@ -0,0 +1 @@
{"version":3,"file":"MultipleBindingPlanParamsConstraint.js","sourceRoot":"","sources":["../../../../src/planning/models/MultipleBindingPlanParamsConstraint.ts"],"names":[],"mappings":""}
@@ -0,0 +1,823 @@
"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);
// source/index.ts
var index_exports = {};
__export(index_exports, {
MemoryStore: () => MemoryStore,
default: () => lib_default,
rateLimit: () => lib_default
});
module.exports = __toCommonJS(index_exports);
// source/headers.ts
var import_node_buffer = require("node:buffer");
var import_node_crypto = require("node:crypto");
var SUPPORTED_DRAFT_VERSIONS = [
"draft-6",
"draft-7",
"draft-8"
];
var getResetSeconds = (resetTime, windowMs) => {
let resetSeconds = void 0;
if (resetTime) {
const deltaSeconds = Math.ceil((resetTime.getTime() - Date.now()) / 1e3);
resetSeconds = Math.max(0, deltaSeconds);
} else if (windowMs) {
resetSeconds = Math.ceil(windowMs / 1e3);
}
return resetSeconds;
};
var getPartitionKey = (key) => {
const hash = (0, import_node_crypto.createHash)("sha256");
hash.update(key);
const partitionKey = hash.digest("hex").slice(0, 12);
return import_node_buffer.Buffer.from(partitionKey).toString("base64");
};
var setLegacyHeaders = (response, info) => {
if (response.headersSent) return;
response.setHeader("X-RateLimit-Limit", info.limit.toString());
response.setHeader("X-RateLimit-Remaining", info.remaining.toString());
if (info.resetTime instanceof Date) {
response.setHeader("Date", (/* @__PURE__ */ new Date()).toUTCString());
response.setHeader(
"X-RateLimit-Reset",
Math.ceil(info.resetTime.getTime() / 1e3).toString()
);
}
};
var setDraft6Headers = (response, info, windowMs) => {
if (response.headersSent) return;
const windowSeconds = Math.ceil(windowMs / 1e3);
const resetSeconds = getResetSeconds(info.resetTime);
response.setHeader("RateLimit-Policy", `${info.limit};w=${windowSeconds}`);
response.setHeader("RateLimit-Limit", info.limit.toString());
response.setHeader("RateLimit-Remaining", info.remaining.toString());
if (resetSeconds)
response.setHeader("RateLimit-Reset", resetSeconds.toString());
};
var setDraft7Headers = (response, info, windowMs) => {
if (response.headersSent) return;
const windowSeconds = Math.ceil(windowMs / 1e3);
const resetSeconds = getResetSeconds(info.resetTime, windowMs);
response.setHeader("RateLimit-Policy", `${info.limit};w=${windowSeconds}`);
response.setHeader(
"RateLimit",
`limit=${info.limit}, remaining=${info.remaining}, reset=${resetSeconds}`
);
};
var setDraft8Headers = (response, info, windowMs, name, key) => {
if (response.headersSent) return;
const windowSeconds = Math.ceil(windowMs / 1e3);
const resetSeconds = getResetSeconds(info.resetTime, windowMs);
const partitionKey = getPartitionKey(key);
const policy = `q=${info.limit}; w=${windowSeconds}; pk=:${partitionKey}:`;
const header = `r=${info.remaining}; t=${resetSeconds}`;
response.append("RateLimit-Policy", `"${name}"; ${policy}`);
response.append("RateLimit", `"${name}"; ${header}`);
};
var setRetryAfterHeader = (response, info, windowMs) => {
if (response.headersSent) return;
const resetSeconds = getResetSeconds(info.resetTime, windowMs);
response.setHeader("Retry-After", resetSeconds.toString());
};
// source/validations.ts
var import_node_net = require("node:net");
var ValidationError = class extends Error {
/**
* The code must be a string, in snake case and all capital, that starts with
* the substring `ERR_ERL_`.
*
* The message must be a string, starting with an uppercase character,
* describing the issue in detail.
*/
constructor(code, message) {
const url = `https://express-rate-limit.github.io/${code}/`;
super(`${message} See ${url} for more information.`);
this.name = this.constructor.name;
this.code = code;
this.help = url;
}
};
var ChangeWarning = class extends ValidationError {
};
var usedStores = /* @__PURE__ */ new Set();
var singleCountKeys = /* @__PURE__ */ new WeakMap();
var validations = {
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
enabled: {
default: true
},
// Should be EnabledValidations type, but that's a circular reference
disable() {
for (const k of Object.keys(this.enabled)) this.enabled[k] = false;
},
/**
* Checks whether the IP address is valid, and that it does not have a port
* number in it.
*
* See https://github.com/express-rate-limit/express-rate-limit/wiki/Error-Codes#err_erl_invalid_ip_address.
*
* @param ip {string | undefined} - The IP address provided by Express as request.ip.
*
* @returns {void}
*/
ip(ip) {
if (ip === void 0) {
throw new ValidationError(
"ERR_ERL_UNDEFINED_IP_ADDRESS",
`An undefined 'request.ip' was detected. This might indicate a misconfiguration or the connection being destroyed prematurely.`
);
}
if (!(0, import_node_net.isIP)(ip)) {
throw new ValidationError(
"ERR_ERL_INVALID_IP_ADDRESS",
`An invalid 'request.ip' (${ip}) was detected. Consider passing a custom 'keyGenerator' function to the rate limiter.`
);
}
},
/**
* Makes sure the trust proxy setting is not set to `true`.
*
* See https://github.com/express-rate-limit/express-rate-limit/wiki/Error-Codes#err_erl_permissive_trust_proxy.
*
* @param request {Request} - The Express request object.
*
* @returns {void}
*/
trustProxy(request) {
if (request.app.get("trust proxy") === true) {
throw new ValidationError(
"ERR_ERL_PERMISSIVE_TRUST_PROXY",
`The Express 'trust proxy' setting is true, which allows anyone to trivially bypass IP-based rate limiting.`
);
}
},
/**
* Makes sure the trust proxy setting is set in case the `X-Forwarded-For`
* header is present.
*
* See https://github.com/express-rate-limit/express-rate-limit/wiki/Error-Codes#err_erl_unset_trust_proxy.
*
* @param request {Request} - The Express request object.
*
* @returns {void}
*/
xForwardedForHeader(request) {
if (request.headers["x-forwarded-for"] && request.app.get("trust proxy") === false) {
throw new ValidationError(
"ERR_ERL_UNEXPECTED_X_FORWARDED_FOR",
`The 'X-Forwarded-For' header is set but the Express 'trust proxy' setting is false (default). This could indicate a misconfiguration which would prevent express-rate-limit from accurately identifying users.`
);
}
},
/**
* Ensures totalHits value from store is a positive integer.
*
* @param hits {any} - The `totalHits` returned by the store.
*/
positiveHits(hits) {
if (typeof hits !== "number" || hits < 1 || hits !== Math.round(hits)) {
throw new ValidationError(
"ERR_ERL_INVALID_HITS",
`The totalHits value returned from the store must be a positive integer, got ${hits}`
);
}
},
/**
* Ensures a single store instance is not used with multiple express-rate-limit instances
*/
unsharedStore(store) {
if (usedStores.has(store)) {
const maybeUniquePrefix = store?.localKeys ? "" : " (with a unique prefix)";
throw new ValidationError(
"ERR_ERL_STORE_REUSE",
`A Store instance must not be shared across multiple rate limiters. Create a new instance of ${store.constructor.name}${maybeUniquePrefix} for each limiter instead.`
);
}
usedStores.add(store);
},
/**
* Ensures a given key is incremented only once per request.
*
* @param request {Request} - The Express request object.
* @param store {Store} - The store class.
* @param key {string} - The key used to store the client's hit count.
*
* @returns {void}
*/
singleCount(request, store, key) {
let storeKeys = singleCountKeys.get(request);
if (!storeKeys) {
storeKeys = /* @__PURE__ */ new Map();
singleCountKeys.set(request, storeKeys);
}
const storeKey = store.localKeys ? store : store.constructor.name;
let keys = storeKeys.get(storeKey);
if (!keys) {
keys = [];
storeKeys.set(storeKey, keys);
}
const prefixedKey = `${store.prefix ?? ""}${key}`;
if (keys.includes(prefixedKey)) {
throw new ValidationError(
"ERR_ERL_DOUBLE_COUNT",
`The hit count for ${key} was incremented more than once for a single request.`
);
}
keys.push(prefixedKey);
},
/**
* Warns the user that the behaviour for `max: 0` / `limit: 0` is
* changing in the next major release.
*
* @param limit {number} - The maximum number of hits per client.
*
* @returns {void}
*/
limit(limit) {
if (limit === 0) {
throw new ChangeWarning(
"WRN_ERL_MAX_ZERO",
`Setting limit or max to 0 disables rate limiting in express-rate-limit v6 and older, but will cause all requests to be blocked in v7`
);
}
},
/**
* Warns the user that the `draft_polli_ratelimit_headers` option is deprecated
* and will be removed in the next major release.
*
* @param draft_polli_ratelimit_headers {any | undefined} - The now-deprecated setting that was used to enable standard headers.
*
* @returns {void}
*/
draftPolliHeaders(draft_polli_ratelimit_headers) {
if (draft_polli_ratelimit_headers) {
throw new ChangeWarning(
"WRN_ERL_DEPRECATED_DRAFT_POLLI_HEADERS",
`The draft_polli_ratelimit_headers configuration option is deprecated and has been removed in express-rate-limit v7, please set standardHeaders: 'draft-6' instead.`
);
}
},
/**
* Warns the user that the `onLimitReached` option is deprecated and
* will be removed in the next major release.
*
* @param onLimitReached {any | undefined} - The maximum number of hits per client.
*
* @returns {void}
*/
onLimitReached(onLimitReached) {
if (onLimitReached) {
throw new ChangeWarning(
"WRN_ERL_DEPRECATED_ON_LIMIT_REACHED",
`The onLimitReached configuration option is deprecated and has been removed in express-rate-limit v7.`
);
}
},
/**
* Warns the user when an invalid/unsupported version of the draft spec is passed.
*
* @param version {any | undefined} - The version passed by the user.
*
* @returns {void}
*/
headersDraftVersion(version) {
if (typeof version !== "string" || // @ts-expect-error This is fine. If version is not in the array, it will just return false.
!SUPPORTED_DRAFT_VERSIONS.includes(version)) {
const versionString = SUPPORTED_DRAFT_VERSIONS.join(", ");
throw new ValidationError(
"ERR_ERL_HEADERS_UNSUPPORTED_DRAFT_VERSION",
`standardHeaders: only the following versions of the IETF draft specification are supported: ${versionString}.`
);
}
},
/**
* Warns the user when the selected headers option requires a reset time but
* the store does not provide one.
*
* @param resetTime {Date | undefined} - The timestamp when the client's hit count will be reset.
*
* @returns {void}
*/
headersResetTime(resetTime) {
if (!resetTime) {
throw new ValidationError(
"ERR_ERL_HEADERS_NO_RESET",
`standardHeaders: 'draft-7' requires a 'resetTime', but the store did not provide one. The 'windowMs' value will be used instead, which may cause clients to wait longer than necessary.`
);
}
},
/**
* Checks the options.validate setting to ensure that only recognized
* validations are enabled or disabled.
*
* If any unrecognized values are found, an error is logged that
* includes the list of supported vaidations.
*/
validationsConfig() {
const supportedValidations = Object.keys(this).filter(
(k) => !["enabled", "disable"].includes(k)
);
supportedValidations.push("default");
for (const key of Object.keys(this.enabled)) {
if (!supportedValidations.includes(key)) {
throw new ValidationError(
"ERR_ERL_UNKNOWN_VALIDATION",
`options.validate.${key} is not recognized. Supported validate options are: ${supportedValidations.join(
", "
)}.`
);
}
}
},
/**
* Checks to see if the instance was created inside of a request handler,
* which would prevent it from working correctly, with the default memory
* store (or any other store with localKeys.)
*/
creationStack(store) {
const { stack } = new Error(
"express-rate-limit validation check (set options.validate.creationStack=false to disable)"
);
if (stack?.includes("Layer.handle [as handle_request]")) {
if (!store.localKeys) {
throw new ValidationError(
"ERR_ERL_CREATED_IN_REQUEST_HANDLER",
"express-rate-limit instance should *usually* be created at app initialization, not when responding to a request."
);
}
throw new ValidationError(
"ERR_ERL_CREATED_IN_REQUEST_HANDLER",
`express-rate-limit instance should be created at app initialization, not when responding to a request.`
);
}
}
};
var getValidations = (_enabled) => {
let enabled;
if (typeof _enabled === "boolean") {
enabled = {
default: _enabled
};
} else {
enabled = {
default: true,
..._enabled
};
}
const wrappedValidations = {
enabled
};
for (const [name, validation] of Object.entries(validations)) {
if (typeof validation === "function")
wrappedValidations[name] = (...args) => {
if (!(enabled[name] ?? enabled.default)) {
return;
}
try {
;
validation.apply(
wrappedValidations,
args
);
} catch (error) {
if (error instanceof ChangeWarning) console.warn(error);
else console.error(error);
}
};
}
return wrappedValidations;
};
// source/memory-store.ts
var MemoryStore = class {
constructor() {
/**
* These two maps store usage (requests) and reset time by key (for example, IP
* addresses or API keys).
*
* They are split into two to avoid having to iterate through the entire set to
* determine which ones need reset. Instead, `Client`s are moved from `previous`
* to `current` as they hit the endpoint. Once `windowMs` has elapsed, all clients
* left in `previous`, i.e., those that have not made any recent requests, are
* known to be expired and can be deleted in bulk.
*/
this.previous = /* @__PURE__ */ new Map();
this.current = /* @__PURE__ */ new Map();
/**
* Confirmation that the keys incremented in once instance of MemoryStore
* cannot affect other instances.
*/
this.localKeys = true;
}
/**
* Method that initializes the store.
*
* @param options {Options} - The options used to setup the middleware.
*/
init(options) {
this.windowMs = options.windowMs;
if (this.interval) clearInterval(this.interval);
this.interval = setInterval(() => {
this.clearExpired();
}, this.windowMs);
if (this.interval.unref) this.interval.unref();
}
/**
* Method to fetch a client's hit count and reset time.
*
* @param key {string} - The identifier for a client.
*
* @returns {ClientRateLimitInfo | undefined} - The number of hits and reset time for that client.
*
* @public
*/
async get(key) {
return this.current.get(key) ?? this.previous.get(key);
}
/**
* Method to increment a client's hit counter.
*
* @param key {string} - The identifier for a client.
*
* @returns {ClientRateLimitInfo} - The number of hits and reset time for that client.
*
* @public
*/
async increment(key) {
const client = this.getClient(key);
const now = Date.now();
if (client.resetTime.getTime() <= now) {
this.resetClient(client, now);
}
client.totalHits++;
return client;
}
/**
* Method to decrement a client's hit counter.
*
* @param key {string} - The identifier for a client.
*
* @public
*/
async decrement(key) {
const client = this.getClient(key);
if (client.totalHits > 0) client.totalHits--;
}
/**
* Method to reset a client's hit counter.
*
* @param key {string} - The identifier for a client.
*
* @public
*/
async resetKey(key) {
this.current.delete(key);
this.previous.delete(key);
}
/**
* Method to reset everyone's hit counter.
*
* @public
*/
async resetAll() {
this.current.clear();
this.previous.clear();
}
/**
* Method to stop the timer (if currently running) and prevent any memory
* leaks.
*
* @public
*/
shutdown() {
clearInterval(this.interval);
void this.resetAll();
}
/**
* Recycles a client by setting its hit count to zero, and reset time to
* `windowMs` milliseconds from now.
*
* NOT to be confused with `#resetKey()`, which removes a client from both the
* `current` and `previous` maps.
*
* @param client {Client} - The client to recycle.
* @param now {number} - The current time, to which the `windowMs` is added to get the `resetTime` for the client.
*
* @return {Client} - The modified client that was passed in, to allow for chaining.
*/
resetClient(client, now = Date.now()) {
client.totalHits = 0;
client.resetTime.setTime(now + this.windowMs);
return client;
}
/**
* Retrieves or creates a client, given a key. Also ensures that the client being
* returned is in the `current` map.
*
* @param key {string} - The key under which the client is (or is to be) stored.
*
* @returns {Client} - The requested client.
*/
getClient(key) {
if (this.current.has(key)) return this.current.get(key);
let client;
if (this.previous.has(key)) {
client = this.previous.get(key);
this.previous.delete(key);
} else {
client = { totalHits: 0, resetTime: /* @__PURE__ */ new Date() };
this.resetClient(client);
}
this.current.set(key, client);
return client;
}
/**
* Move current clients to previous, create a new map for current.
*
* This function is called every `windowMs`.
*/
clearExpired() {
this.previous = this.current;
this.current = /* @__PURE__ */ new Map();
}
};
// source/lib.ts
var isLegacyStore = (store) => (
// Check that `incr` exists but `increment` does not - store authors might want
// to keep both around for backwards compatibility.
typeof store.incr === "function" && typeof store.increment !== "function"
);
var promisifyStore = (passedStore) => {
if (!isLegacyStore(passedStore)) {
return passedStore;
}
const legacyStore = passedStore;
class PromisifiedStore {
async increment(key) {
return new Promise((resolve, reject) => {
legacyStore.incr(
key,
(error, totalHits, resetTime) => {
if (error) reject(error);
resolve({ totalHits, resetTime });
}
);
});
}
async decrement(key) {
return legacyStore.decrement(key);
}
async resetKey(key) {
return legacyStore.resetKey(key);
}
/* istanbul ignore next */
async resetAll() {
if (typeof legacyStore.resetAll === "function")
return legacyStore.resetAll();
}
}
return new PromisifiedStore();
};
var getOptionsFromConfig = (config) => {
const { validations: validations2, ...directlyPassableEntries } = config;
return {
...directlyPassableEntries,
validate: validations2.enabled
};
};
var omitUndefinedOptions = (passedOptions) => {
const omittedOptions = {};
for (const k of Object.keys(passedOptions)) {
const key = k;
if (passedOptions[key] !== void 0) {
omittedOptions[key] = passedOptions[key];
}
}
return omittedOptions;
};
var parseOptions = (passedOptions) => {
const notUndefinedOptions = omitUndefinedOptions(passedOptions);
const validations2 = getValidations(notUndefinedOptions?.validate ?? true);
validations2.validationsConfig();
validations2.draftPolliHeaders(
// @ts-expect-error see the note above.
notUndefinedOptions.draft_polli_ratelimit_headers
);
validations2.onLimitReached(notUndefinedOptions.onLimitReached);
let standardHeaders = notUndefinedOptions.standardHeaders ?? false;
if (standardHeaders === true) standardHeaders = "draft-6";
const config = {
windowMs: 60 * 1e3,
limit: passedOptions.max ?? 5,
// `max` is deprecated, but support it anyways.
message: "Too many requests, please try again later.",
statusCode: 429,
legacyHeaders: passedOptions.headers ?? true,
identifier(request, _response) {
let duration = "";
const property = config.requestPropertyName;
const { limit } = request[property];
const seconds = config.windowMs / 1e3;
const minutes = config.windowMs / (1e3 * 60);
const hours = config.windowMs / (1e3 * 60 * 60);
const days = config.windowMs / (1e3 * 60 * 60 * 24);
if (seconds < 60) duration = `${seconds}sec`;
else if (minutes < 60) duration = `${minutes}min`;
else if (hours < 24) duration = `${hours}hr${hours > 1 ? "s" : ""}`;
else duration = `${days}day${days > 1 ? "s" : ""}`;
return `${limit}-in-${duration}`;
},
requestPropertyName: "rateLimit",
skipFailedRequests: false,
skipSuccessfulRequests: false,
requestWasSuccessful: (_request, response) => response.statusCode < 400,
skip: (_request, _response) => false,
keyGenerator(request, _response) {
validations2.ip(request.ip);
validations2.trustProxy(request);
validations2.xForwardedForHeader(request);
return request.ip;
},
async handler(request, response, _next, _optionsUsed) {
response.status(config.statusCode);
const message = typeof config.message === "function" ? await config.message(
request,
response
) : config.message;
if (!response.writableEnded) {
response.send(message);
}
},
passOnStoreError: false,
// Allow the default options to be overridden by the passed options.
...notUndefinedOptions,
// `standardHeaders` is resolved into a draft version above, use that.
standardHeaders,
// Note that this field is declared after the user's options are spread in,
// so that this field doesn't get overridden with an un-promisified store!
store: promisifyStore(notUndefinedOptions.store ?? new MemoryStore()),
// Print an error to the console if a few known misconfigurations are detected.
validations: validations2
};
if (typeof config.store.increment !== "function" || typeof config.store.decrement !== "function" || typeof config.store.resetKey !== "function" || config.store.resetAll !== void 0 && typeof config.store.resetAll !== "function" || config.store.init !== void 0 && typeof config.store.init !== "function") {
throw new TypeError(
"An invalid store was passed. Please ensure that the store is a class that implements the `Store` interface."
);
}
return config;
};
var handleAsyncErrors = (fn) => async (request, response, next) => {
try {
await Promise.resolve(fn(request, response, next)).catch(next);
} catch (error) {
next(error);
}
};
var rateLimit = (passedOptions) => {
const config = parseOptions(passedOptions ?? {});
const options = getOptionsFromConfig(config);
config.validations.creationStack(config.store);
config.validations.unsharedStore(config.store);
if (typeof config.store.init === "function") config.store.init(options);
const middleware = handleAsyncErrors(
async (request, response, next) => {
const skip = await config.skip(request, response);
if (skip) {
next();
return;
}
const augmentedRequest = request;
const key = await config.keyGenerator(request, response);
let totalHits = 0;
let resetTime;
try {
const incrementResult = await config.store.increment(key);
totalHits = incrementResult.totalHits;
resetTime = incrementResult.resetTime;
} catch (error) {
if (config.passOnStoreError) {
console.error(
"express-rate-limit: error from store, allowing request without rate-limiting.",
error
);
next();
return;
}
throw error;
}
config.validations.positiveHits(totalHits);
config.validations.singleCount(request, config.store, key);
const retrieveLimit = typeof config.limit === "function" ? config.limit(request, response) : config.limit;
const limit = await retrieveLimit;
config.validations.limit(limit);
const info = {
limit,
used: totalHits,
remaining: Math.max(limit - totalHits, 0),
resetTime
};
Object.defineProperty(info, "current", {
configurable: false,
enumerable: false,
value: totalHits
});
augmentedRequest[config.requestPropertyName] = info;
if (config.legacyHeaders && !response.headersSent) {
setLegacyHeaders(response, info);
}
if (config.standardHeaders && !response.headersSent) {
switch (config.standardHeaders) {
case "draft-6": {
setDraft6Headers(response, info, config.windowMs);
break;
}
case "draft-7": {
config.validations.headersResetTime(info.resetTime);
setDraft7Headers(response, info, config.windowMs);
break;
}
case "draft-8": {
const retrieveName = typeof config.identifier === "function" ? config.identifier(request, response) : config.identifier;
const name = await retrieveName;
config.validations.headersResetTime(info.resetTime);
setDraft8Headers(response, info, config.windowMs, name, key);
break;
}
default: {
config.validations.headersDraftVersion(config.standardHeaders);
break;
}
}
}
if (config.skipFailedRequests || config.skipSuccessfulRequests) {
let decremented = false;
const decrementKey = async () => {
if (!decremented) {
await config.store.decrement(key);
decremented = true;
}
};
if (config.skipFailedRequests) {
response.on("finish", async () => {
if (!await config.requestWasSuccessful(request, response))
await decrementKey();
});
response.on("close", async () => {
if (!response.writableEnded) await decrementKey();
});
response.on("error", async () => {
await decrementKey();
});
}
if (config.skipSuccessfulRequests) {
response.on("finish", async () => {
if (await config.requestWasSuccessful(request, response))
await decrementKey();
});
}
}
config.validations.disable();
if (totalHits > limit) {
if (config.legacyHeaders || config.standardHeaders) {
setRetryAfterHeader(response, info, config.windowMs);
}
config.handler(request, response, next, options);
return;
}
next();
}
);
const getThrowFn = () => {
throw new Error("The current store does not support the get/getKey method");
};
middleware.resetKey = config.store.resetKey.bind(config.store);
middleware.getKey = typeof config.store.get === "function" ? config.store.get.bind(config.store) : getThrowFn;
return middleware;
};
var lib_default = rateLimit;
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
MemoryStore,
rateLimit
});
module.exports = rateLimit; module.exports.default = rateLimit; module.exports.rateLimit = rateLimit; module.exports.MemoryStore = MemoryStore;
Loaded 100 of 35554 files, more files were not shown because too many files have changed in this diff. Show more