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 @@
{"name":"htmlparser2","version":"10.0.0","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532100858,"integrity":"sha512-knjjk00cNfsNYJgDv6Vmeoe4Ljtb8P3cPsZUbH6DutRb4eNfZIIuyGttnLDxiBduMV5KGZEJ7dNvH+x8dNotQA==","mode":420,"size":1104},"src/__fixtures__/Documents/Attributes.html":{"checkedAt":1794532100859,"integrity":"sha512-V6rSZ1ALdjBbJJFeibELTTnibZWK7M732VcOiXHUk180jTEyaLKSlKX3BEpkg+l6fGP2bYxp228+qxF7o2Bhkw==","mode":420,"size":503},"src/__fixtures__/Documents/Basic.html":{"checkedAt":1794532100859,"integrity":"sha512-heTfiLxhoCOsyLkWQzhUTQ+FssJqdTrEa7O7UgE12A6HewsAusltajRruzwoPiivrQWRskhrSB3P41d6SzKlEQ==","mode":420,"size":76},"src/__fixtures__/Documents/Svg.html":{"checkedAt":1794532100859,"integrity":"sha512-fcNefyw4hsqo6wBzBdEFaqynqwGHHFnWs2mRkUUjWjvE81V5ocuqua87/uQd6E40AyHFW80327lBSEKMVfBz6w==","mode":420,"size":314},"dist/commonjs/index.js":{"checkedAt":1794532100859,"integrity":"sha512-RrTs40p+nBpdrm7Hsa2gB4nzEJmms8sr+xPAJhWo/1eyYwvd6twEvKxhVj5ex7ere1ASin8KhAggRgDbibVuFQ==","mode":420,"size":5707},"dist/esm/index.js":{"checkedAt":1794532100859,"integrity":"sha512-QLsgGEsg1stU1bWyqD2pXI2p5+HTxCJVPQzFPsOQrle6bYm3sO2Xi3AbXbSHPH6v6Gm5K/5RAaNcDNHSZ7cLJQ==","mode":420,"size":2977},"dist/commonjs/Parser.js":{"checkedAt":1794532100859,"integrity":"sha512-h6Z9tBhrSBGCYnwC+BLqvzrfELf/bdVPIm655qm9xWywcbYmv8OmL4WeumcDygifn1kRoJNmWJwjcY4+jy6WVw==","mode":420,"size":18290},"dist/esm/Parser.js":{"checkedAt":1794532100860,"integrity":"sha512-0e6nykTNSWdXbA4GSP+y9fiSk/jtJMJUsMR0GmNjbeQAURZDuzAdKu12l7q0Aw4H0cBUjbC7vak9darnJp8gRw==","mode":420,"size":16720},"dist/commonjs/Tokenizer.js":{"checkedAt":1794532100860,"integrity":"sha512-iD+WLDgWkZRSEtoJid/xX/qTPjxBRgFrplD2pknLd/hjsqnSt8owUKEASXjlGnV31Nl0EGnQ7jP60w7Ksuvr9g==","mode":420,"size":30439},"dist/esm/Tokenizer.js":{"checkedAt":1794532100860,"integrity":"sha512-35J9MXHd6frJglZM6GpVocn9PIVqLx1BvCoCRXd+NvOo7fuRmcPbErMVqOgUDHNiksKDo9vkEFQ9RgOLiUyRug==","mode":420,"size":30303},"dist/commonjs/WritableStream.js":{"checkedAt":1794532100860,"integrity":"sha512-ZLq7LfzwttE1QYtjPVuyWZbbYu7J61yPcwZNscySo/M+5RjdGlo+FTK9mPx/1HU+s9h1kHC26Bax8zorctPr6g==","mode":420,"size":1263},"dist/esm/WritableStream.js":{"checkedAt":1794532100860,"integrity":"sha512-wBzC8DdMdwnOU4trdh5FUkubs9STRNV663QqMtqUNFGVAELvROJBhXIHvZU/7SETK/8ty9B2YHtugXpljJN1lw==","mode":420,"size":1050},"WritableStream.js":{"checkedAt":1794532100860,"integrity":"sha512-AanI8itF5vYdqSA2mm2v1jxeheUnz67WTwjuzOZYXA8gYTTf5hXg0qUb5u0/5Sfqby8tvHORyRmWoSZmBJUT+w==","mode":420,"size":157},"dist/commonjs/package.json":{"checkedAt":1794532100861,"integrity":"sha512-bFiTnaWPm3Fik6gyj3o2SbbiQr8jX64ABVoMx5+yeI5Kmd+qQi4M+tvoTg1eM7g29oYn5qQJZUh37cRDuU0ExA==","mode":420,"size":25},"dist/esm/package.json":{"checkedAt":1794532091320,"integrity":"sha512-nTI0IMxjxr7nncxdtfDxj2uOBz2q+P+lRZ4R8t5ZqfXowXjXf6kq/J3dNSYj3sNixi//hZxxovq5Px4hcsSYfw==","mode":420,"size":23},"package.json":{"checkedAt":1794532100861,"integrity":"sha512-UQ//2hPp+Idaw71BQ6ndGPMHngKfEFukcDrBxZcXO4ddaA4m/tc2qQPanHe8R37DoPa1XKSO9Z+PDsOzI5JIPA==","mode":420,"size":3187},"dist/commonjs/index.d.ts.map":{"checkedAt":1794532100861,"integrity":"sha512-C0hsX+WjmBSnwnVchb+LqjstNiM8+xXa2HywYlxuSFnx4pT0bqbwCw2dd4I4bCM8sfbtfWgKILdQVkR/HEj+zw==","mode":420,"size":1446},"dist/esm/index.d.ts.map":{"checkedAt":1794532100861,"integrity":"sha512-C0hsX+WjmBSnwnVchb+LqjstNiM8+xXa2HywYlxuSFnx4pT0bqbwCw2dd4I4bCM8sfbtfWgKILdQVkR/HEj+zw==","mode":420,"size":1446},"dist/commonjs/index.js.map":{"checkedAt":1794532100861,"integrity":"sha512-7lqXVmb7oGAbjK+CyeibTCYqSw1e5CI53q4eOBFnsS1q14qhbc15QcQLMJHPML1Wkr2abd1pDNJT0gVMnP/qEw==","mode":420,"size":1494},"dist/esm/index.js.map":{"checkedAt":1794532100861,"integrity":"sha512-IZ6vFtod1T4Paz26li0dtP8aafAkyvmJyUCbmlmgoZAgJVUP4yQu6yAqWcPm/aPjdeohgZZ2YbkwlWA3WS2f2Q==","mode":420,"size":1564},"dist/commonjs/Parser.d.ts.map":{"checkedAt":1794532100861,"integrity":"sha512-P+UPgnip93elQnxp09tHywLhS/3CauTglFj6ayNVQ0LfjyMQPzPM1s8gJszse2Btc/1CP5YKQa60N5rkLkCtIw==","mode":420,"size":3748},"dist/esm/Parser.d.ts.map":{"checkedAt":1794532100861,"integrity":"sha512-P+UPgnip93elQnxp09tHywLhS/3CauTglFj6ayNVQ0LfjyMQPzPM1s8gJszse2Btc/1CP5YKQa60N5rkLkCtIw==","mode":420,"size":3748},"dist/commonjs/Parser.js.map":{"checkedAt":1794532100862,"integrity":"sha512-KKBM3SLUeR+foA5/tccsmLH/bQNOP5ImTFreDFNdue3tSSoM9/3550TAO0SCy9dfxBjDjRZIDIy0vYmnM0qJfg==","mode":420,"size":14904},"dist/esm/Parser.js.map":{"checkedAt":1794532100862,"integrity":"sha512-xcjURJOBe5M/fr/yfPKYZ6HZdPMc1KbNoDuIsE1MFglUWUGkQG7gnfkJqoG8ueCXsWU8lb8dYJ+XXhWmGQTRMA==","mode":420,"size":14915},"dist/commonjs/Tokenizer.d.ts.map":{"checkedAt":1794532100862,"integrity":"sha512-JEM0vGC9KcDJXOfQZUc2lMplrYNzJdRGKLZTMvvNe/o8KvGJzXTJlRO7lRM2EuEqqlkBxTm60E4i0U8Dp22VVg==","mode":420,"size":2907},"dist/esm/Tokenizer.d.ts.map":{"checkedAt":1794532100862,"integrity":"sha512-JEM0vGC9KcDJXOfQZUc2lMplrYNzJdRGKLZTMvvNe/o8KvGJzXTJlRO7lRM2EuEqqlkBxTm60E4i0U8Dp22VVg==","mode":420,"size":2907},"dist/commonjs/Tokenizer.jLine truncated
@@ -0,0 +1 @@
{"name":"property-information","version":"7.1.0","requiresBuild":false,"files":{"license":{"checkedAt":1794532127034,"integrity":"sha512-mClk23sYU0Y+Xr6kflRteMQd48As+pppD3+Du6bKsUNMRMu8gDXceY+IpLE+LAY4316y1jZ1kP0iSsLWYk7S3g==","mode":420,"size":1101},"lib/aria.js":{"checkedAt":1794532127034,"integrity":"sha512-G9S9MrA7YroApYlYDr380ItbzhT8nCCd/0oQuKcEJOyVvdb5Ic2wDX1qR29URGAAhTFiIm+6LnzeLkzce86geg==","mode":420,"size":1644},"lib/util/case-insensitive-transform.js":{"checkedAt":1794532127035,"integrity":"sha512-9P3LgkucgyoZ3JLRQYU8kJgxMA2syHwrPQM3BzvFussUAh8EFuRFOAfBr8Ji2xul+fvqQ4Hx2MnpkMQRFR8b0g==","mode":420,"size":367},"lib/util/case-sensitive-transform.js":{"checkedAt":1794532127035,"integrity":"sha512-RqzwnPf1AHuJuo00baVpKOKkDcPfjvKU65GwM/3Yo+NN8xqR1edslm6AEbovh7Xuf1EvKq3KSrb/culnCITNRw==","mode":420,"size":300},"lib/util/create.js":{"checkedAt":1794532127035,"integrity":"sha512-iZVQKE7V3uG/mtIcisBKVuW6zZGXqCuCBJZg8Newm0oNCEvGLkVC3L4fUS2ePw80Ho3t5njZ8lpY3oeBmmBEGw==","mode":420,"size":1710},"lib/util/defined-info.js":{"checkedAt":1794532127035,"integrity":"sha512-L0g92PJXtlR9hBQaQI0MIrbCFRSfpaOi1+z8p0ezXY+YTqBPeEghLFVzGBnMP0eRdYKKgeDP665aKJxG2VFAkw==","mode":420,"size":1198},"lib/find.js":{"checkedAt":1794532127035,"integrity":"sha512-YliKybrVcjEnPKDaeQkjxkm2DgvEBytwZNXoA/Lw0PAGn5nnwCr52CrxdU3I+AUNxL01bPY1B7VfUqbNUztG5g==","mode":420,"size":2344},"lib/hast-to-react.js":{"checkedAt":1794532127035,"integrity":"sha512-C2Adr9h7rFDpeOdNiwqT3iwuTp37TEyJXAEbNgMZWArUos64L9GsuM6F6nQqYV4cICI3UeNShd90iUAL3KsWnA==","mode":420,"size":859},"lib/html.js":{"checkedAt":1794532127036,"integrity":"sha512-NK0P/dUNmNG+d79ahs+bsG3Dn8Ms8rF5H0XOSqgxpzRlPdiYU1IebZrXYGxOvkE/LZ8yPwqMygU1ONt4R5noLA==","mode":420,"size":8649},"index.js":{"checkedAt":1794532127036,"integrity":"sha512-00osyOBkpRM6YrdM2fgOlWEGxj1mElGbzOLmAjh1pwtXnL8+rW1Y71qKUigwrTA5rtBpsgNIR7aFDVIARnYDwQ==","mode":420,"size":591},"lib/util/info.js":{"checkedAt":1794532127036,"integrity":"sha512-jr0O/VbHyEM/DRTaa58NNwPK5awMKTdf4pvR9QU8W/U6RU7XgMMwzVD2YldaZcH3JH2aARjC4b77JLdYX9E7Bg==","mode":420,"size":769},"lib/util/merge.js":{"checkedAt":1794532127036,"integrity":"sha512-xDu/cKikuZKo9JcM30HdqCumvfZ1xcmA+WbXLNDCcsYtvsO++Ime9L+0u4ObTfBA6uZVFwBIS5iG5RDhKyf5wg==","mode":420,"size":607},"lib/normalize.js":{"checkedAt":1794532127036,"integrity":"sha512-/a+w+U8MZihG0xmSuM9FxRIwXv/2ROzvRUJ8Vdpp5JoW7ZA/QdVpB+rLP+fUF1NLrSWePYAFm0KIT3/pgz/Dyg==","mode":420,"size":326},"lib/util/schema.js":{"checkedAt":1794532127036,"integrity":"sha512-ZjgPXJ54f/hcDcnaMJ8jPmld2HF/iJ1DMgNt9EAgMpVgyvqZwU6K5W/2zE18KIyNyATvcjW825+myZD0thPA6Q==","mode":420,"size":587},"lib/svg.js":{"checkedAt":1794532127036,"integrity":"sha512-QLYlVBPZOwhrM2amUerBV3SgmJZHHhNYFaEEeFttQjVSSFvFek17/Ynl5CaXEJTTA0TmwGn2IMLqdZqiqdAzhQ==","mode":420,"size":14350},"lib/util/types.js":{"checkedAt":1794532127037,"integrity":"sha512-+gRZKyg78Q1V5HNGgh8idhERoQVauOlV33qTWEuinQRKTvBX/TD6jHYfH0+0A/2jZkMFv7JyoH3tzRstiJuB4w==","mode":420,"size":350},"lib/xlink.js":{"checkedAt":1794532127037,"integrity":"sha512-uLyk4zTdE3GadNJ7VW2xJYDozxnA5c2BVBuQ6Y+nUCL2WllGln1atcnT9ZJOnOrBytyqqlx6lr3Gu9h/a0qC3w==","mode":420,"size":351},"lib/xml.js":{"checkedAt":1794532127037,"integrity":"sha512-LfXK3M+zXnENLiJHOR4pN3ZgoiKwUNOOaQcRbs3FsdNFczOKIRTPRdDZq1BlkHIUZ+7vM+DLF24jpJM/lYmuBw==","mode":420,"size":233},"lib/xmlns.js":{"checkedAt":1794532127037,"integrity":"sha512-rcaHrBCguV6lsW2gl6GrJoT6XVw/YdiV6GHjjLLtJ6pyC2e8seUYTrIGtWPFQCiauyKz4FBDklWYsS+tllNoIw==","mode":420,"size":298},"package.json":{"checkedAt":1794532127037,"integrity":"sha512-tAsyDRxC1tt3LFQqUtSdgjQdpHiVYcl32rdtJb79fouzNbWkbGwN5BMEVoFX6B2P7dly+WPzCXg7Qi4TpMWY8w==","mode":420,"size":3166},"lib/aria.d.ts.map":{"checkedAt":1794532127037,"integrity":"sha512-GdXwkDcLOJbAKTDQ926E64ReUR0VKpO+acSwBp6hNvZFqhCVxKqt8RuS1JwwskH9rRFj5KoUeOX9pfo328nfOA==","mode":420,"size":106},"lib/util/case-insensitive-transform.d.ts.map":{"checkedAt":1794532127037,"integrity":"sha512-n4pXL9qJqgEb7tqZd8pu+MhFWLU7Z4L3XvnptyOlpACEDYKhXaJh9IG7OP4X/KGC+ldSsUX6w7+AK1pWk2wGFw==","mode":420,"size":222},"lib/util/case-sensitive-transform.d.ts.map":{"checkedAt":1794532127037,"integrity":"sha512-+Bo3Rfd+kiXTw52xdFqoRQsVgeVL6r/vMgAX7Fkyc7LS9QAY0mdCta/ULt9UIYp+bzvWA2gvF1pSdYD8G1yJ7Q==","mode":420,"size":218},"lib/util/create.d.ts.map":{"checkedAt":1794532127038,"integrity":"sha512-ZRVXC1BN8gM3gTkg+7sj8woCaSPysk7N4apJGRGPLOig0lwrQSXvJ57JMnNjQW431hY/zS9IiXmebUXB8ojl4g==","mode":420,"size":414},"lib/util/defined-info.d.ts.map":{"checkedAt":1794532127038,"integrity":"sha512-Wqj97gD+QSxs61q091bLkbJqrfaZSIcUMt7divMzyXrEb5XP3as0EDH29KzsEz7FIx+IduMY3yXSGfXQjyNXrw==","mode":420,"size":251},"lib/find.d.ts.map":{"checkedAt":1794532127038,"integrity":"sha512-h7c2wlNDPSaKk+gAt6GM9d4lCCHnMB3ofquPb0Dmf+4iWCrp6p1TmQxSYSRhZ5Fs1GR6oGZlha7n9yNQeo+FsQ==","mode":420,"size":205},"lib/hast-to-react.d.ts.map":{"checkedAt":1794532127038,"integrity":"sha512-b9pm8gAQSJKcYLzHMOJvSbx2YtV9cH8R+c3zekvX2foqluCNZ4pvzUgcpJIMAh56PBXaV09hVT5GeKvfaEkHSA==","mode":4Line truncated
@@ -0,0 +1,33 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var docAppendixRole = {
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: 'appendix [EPUB-SSV]'
},
module: 'EPUB'
}],
requireContextRole: [],
requiredContextRole: [],
requiredOwnedElements: [],
requiredProps: {},
superClass: [['roletype', 'structure', 'section', 'landmark']]
};
var _default = exports.default = docAppendixRole;
@@ -0,0 +1,9 @@
{{# def.definitions }}
{{# def.setupKeyword }}
{{ var $comment = it.util.toQuotedString($schema); }}
{{? it.opts.$comment === true }}
console.log({{=$comment}});
{{?? typeof it.opts.$comment == 'function' }}
self._opts.$comment({{=$comment}}, {{=it.util.toQuotedString($errSchemaPath)}}, validate.root.schema);
{{?}}
@@ -0,0 +1 @@
{"version":3,"file":"named.int.spec.d.ts","sourceRoot":"","sources":["../../../../src/metadata/decorators/named.int.spec.ts"],"names":[],"mappings":"AAEA,OAAO,kBAAkB,CAAC"}
@@ -0,0 +1,37 @@
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
max_line_length = 200
[*.js]
block_comment_start = /*
block_comment = *
block_comment_end = */
[*.yml]
indent_size = 1
[package.json]
indent_style = tab
[lib/core.json]
indent_style = tab
[CHANGELOG.md]
indent_style = space
indent_size = 2
[{*.json,Makefile}]
max_line_length = off
[test/{dotdot,resolver,module_dir,multirepo,node_path,pathfilter,precedence}/**/*]
indent_style = off
indent_size = off
max_line_length = off
insert_final_newline = off
@@ -0,0 +1,35 @@
import * as proto from '../../../packet/transformer/proto';
import { OidbPacket, PacketTransformer } from '../../../packet/transformer/base';
import { PacketMsgFileElement } from '../../../packet/message/element';
declare class UploadPrivateFile extends PacketTransformer<typeof proto.OidbSvcTrpcTcp0XE37Response> {
build(selfUid: string, peerUid: string, file: PacketMsgFileElement): Promise<OidbPacket>;
parse(data: Buffer): import("napcat-protobuf").any;
seq: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
upload: import("napcat-protobuf").MessageProtoFieldType<() => {
retCode: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
retMsg: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, true, false>;
totalSpace: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT64, false, false>;
usedSpace: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT64, false, false>;
uploadedSize: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT64, false, false>;
uploadIp: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, true, false>;
uploadDomain: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, true, false>;
uploadPort: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
uuid: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, true, false>;
uploadKey: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, true, false>;
boolFileExist: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BOOL, false, false>;
packSize: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
uploadIpList: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, false, true>;
uploadHttpsPort: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
uploadHttpsDomain: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, true, false>;
uploadDns: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, true, false>;
uploadLanip: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, true, false>;
fileAddon: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, true, false>;
mediaPlatformUploadKey: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, true, false>;
}, true, false>;
businessId: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
clientType: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
flagSupportMediaPlatform: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.INT32, false, false>;
}>;
}
declare const _default: UploadPrivateFile;
export default _default;
@@ -0,0 +1,12 @@
# These are supported funding model platforms
github: [ljharb]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: npm/is-number-object
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
@@ -0,0 +1,214 @@
'use strict'
const LRU = require('lru-cache')
const url = require('url')
const isLambda = require('is-lambda')
const dns = require('./dns.js')
const AGENT_CACHE = new LRU({ max: 50 })
const HttpAgent = require('agentkeepalive')
const HttpsAgent = HttpAgent.HttpsAgent
module.exports = getAgent
const getAgentTimeout = timeout =>
typeof timeout !== 'number' || !timeout ? 0 : timeout + 1
const getMaxSockets = maxSockets => maxSockets || 15
function getAgent (uri, opts) {
const parsedUri = new url.URL(typeof uri === 'string' ? uri : uri.url)
const isHttps = parsedUri.protocol === 'https:'
const pxuri = getProxyUri(parsedUri.href, opts)
// If opts.timeout is zero, set the agentTimeout to zero as well. A timeout
// of zero disables the timeout behavior (OS limits still apply). Else, if
// opts.timeout is a non-zero value, set it to timeout + 1, to ensure that
// the node-fetch-npm timeout will always fire first, giving us more
// consistent errors.
const agentTimeout = getAgentTimeout(opts.timeout)
const agentMaxSockets = getMaxSockets(opts.maxSockets)
const key = [
`https:${isHttps}`,
pxuri
? `proxy:${pxuri.protocol}//${pxuri.host}:${pxuri.port}`
: '>no-proxy<',
`local-address:${opts.localAddress || '>no-local-address<'}`,
`strict-ssl:${isHttps ? opts.rejectUnauthorized : '>no-strict-ssl<'}`,
`ca:${(isHttps && opts.ca) || '>no-ca<'}`,
`cert:${(isHttps && opts.cert) || '>no-cert<'}`,
`key:${(isHttps && opts.key) || '>no-key<'}`,
`timeout:${agentTimeout}`,
`maxSockets:${agentMaxSockets}`,
].join(':')
if (opts.agent != null) { // `agent: false` has special behavior!
return opts.agent
}
// keep alive in AWS lambda makes no sense
const lambdaAgent = !isLambda ? null
: isHttps ? require('https').globalAgent
: require('http').globalAgent
if (isLambda && !pxuri) {
return lambdaAgent
}
if (AGENT_CACHE.peek(key)) {
return AGENT_CACHE.get(key)
}
if (pxuri) {
const pxopts = isLambda ? {
...opts,
agent: lambdaAgent,
} : opts
const proxy = getProxy(pxuri, pxopts, isHttps)
AGENT_CACHE.set(key, proxy)
return proxy
}
const agent = isHttps ? new HttpsAgent({
maxSockets: agentMaxSockets,
ca: opts.ca,
cert: opts.cert,
key: opts.key,
localAddress: opts.localAddress,
rejectUnauthorized: opts.rejectUnauthorized,
timeout: agentTimeout,
freeSocketTimeout: 15000,
lookup: dns.getLookup(opts.dns),
}) : new HttpAgent({
maxSockets: agentMaxSockets,
localAddress: opts.localAddress,
timeout: agentTimeout,
freeSocketTimeout: 15000,
lookup: dns.getLookup(opts.dns),
})
AGENT_CACHE.set(key, agent)
return agent
}
function checkNoProxy (uri, opts) {
const host = new url.URL(uri).hostname.split('.').reverse()
let noproxy = (opts.noProxy || getProcessEnv('no_proxy'))
if (typeof noproxy === 'string') {
noproxy = noproxy.split(',').map(n => n.trim())
}
return noproxy && noproxy.some(no => {
const noParts = no.split('.').filter(x => x).reverse()
if (!noParts.length) {
return false
}
for (let i = 0; i < noParts.length; i++) {
if (host[i] !== noParts[i]) {
return false
}
}
return true
})
}
module.exports.getProcessEnv = getProcessEnv
function getProcessEnv (env) {
if (!env) {
return
}
let value
if (Array.isArray(env)) {
for (const e of env) {
value = process.env[e] ||
process.env[e.toUpperCase()] ||
process.env[e.toLowerCase()]
if (typeof value !== 'undefined') {
break
}
}
}
if (typeof env === 'string') {
value = process.env[env] ||
process.env[env.toUpperCase()] ||
process.env[env.toLowerCase()]
}
return value
}
module.exports.getProxyUri = getProxyUri
function getProxyUri (uri, opts) {
const protocol = new url.URL(uri).protocol
const proxy = opts.proxy ||
(
protocol === 'https:' &&
getProcessEnv('https_proxy')
) ||
(
protocol === 'http:' &&
getProcessEnv(['https_proxy', 'http_proxy', 'proxy'])
)
if (!proxy) {
return null
}
const parsedProxy = (typeof proxy === 'string') ? new url.URL(proxy) : proxy
return !checkNoProxy(uri, opts) && parsedProxy
}
const getAuth = u =>
u.username && u.password ? decodeURIComponent(`${u.username}:${u.password}`)
: u.username ? decodeURIComponent(u.username)
: null
const getPath = u => u.pathname + u.search + u.hash
const HttpProxyAgent = require('http-proxy-agent')
const HttpsProxyAgent = require('https-proxy-agent')
const { SocksProxyAgent } = require('socks-proxy-agent')
module.exports.getProxy = getProxy
function getProxy (proxyUrl, opts, isHttps) {
// our current proxy agents do not support an overridden dns lookup method, so will not
// benefit from the dns cache
const popts = {
host: proxyUrl.hostname,
port: proxyUrl.port,
protocol: proxyUrl.protocol,
path: getPath(proxyUrl),
auth: getAuth(proxyUrl),
ca: opts.ca,
cert: opts.cert,
key: opts.key,
timeout: getAgentTimeout(opts.timeout),
localAddress: opts.localAddress,
maxSockets: getMaxSockets(opts.maxSockets),
rejectUnauthorized: opts.rejectUnauthorized,
}
if (proxyUrl.protocol === 'http:' || proxyUrl.protocol === 'https:') {
if (!isHttps) {
return new HttpProxyAgent(popts)
} else {
return new HttpsProxyAgent(popts)
}
} else if (proxyUrl.protocol.startsWith('socks')) {
// socks-proxy-agent uses hostname not host
popts.hostname = popts.host
delete popts.host
return new SocksProxyAgent(popts)
} else {
throw Object.assign(
new Error(`unsupported proxy protocol: '${proxyUrl.protocol}'`),
{
code: 'EUNSUPPORTEDPROXY',
url: proxyUrl.href,
}
)
}
}
@@ -0,0 +1,107 @@
// Copyright 2013 Google Inc. 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
//
// 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 CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Models the histograms of literals, commands and distance codes.
#ifndef BROTLI_ENC_HISTOGRAM_H_
#define BROTLI_ENC_HISTOGRAM_H_
#include <stdint.h>
#include <string.h>
#include <vector>
#include <utility>
#include "./command.h"
#include "./fast_log.h"
#include "./prefix.h"
namespace brotli {
class BlockSplit;
// A simple container for histograms of data in blocks.
template<int kDataSize>
struct Histogram {
Histogram() {
Clear();
}
void Clear() {
memset(data_, 0, sizeof(data_));
total_count_ = 0;
}
void Add(int val) {
++data_[val];
++total_count_;
}
void Remove(int val) {
--data_[val];
--total_count_;
}
template<typename DataType>
void Add(const DataType *p, size_t n) {
total_count_ += n;
n += 1;
while(--n) ++data_[*p++];
}
void AddHistogram(const Histogram& v) {
total_count_ += v.total_count_;
for (int i = 0; i < kDataSize; ++i) {
data_[i] += v.data_[i];
}
}
double EntropyBitCost() const {
double retval = total_count_ * FastLog2(total_count_);
for (int i = 0; i < kDataSize; ++i) {
retval -= data_[i] * FastLog2(data_[i]);
}
return retval;
}
int data_[kDataSize];
int total_count_;
double bit_cost_;
};
// Literal histogram.
typedef Histogram<256> HistogramLiteral;
// Prefix histograms.
typedef Histogram<kNumCommandPrefixes> HistogramCommand;
typedef Histogram<kNumDistancePrefixes> HistogramDistance;
typedef Histogram<kNumBlockLenPrefixes> HistogramBlockLength;
// Context map histogram, 256 Huffman tree indexes + 16 run length codes.
typedef Histogram<272> HistogramContextMap;
// Block type histogram, 256 block types + 2 special symbols.
typedef Histogram<258> HistogramBlockType;
static const int kLiteralContextBits = 6;
static const int kDistanceContextBits = 2;
void BuildHistograms(
const Command* cmds,
const size_t num_commands,
const BlockSplit& literal_split,
const BlockSplit& insert_and_copy_split,
const BlockSplit& dist_split,
const uint8_t* ringbuffer,
size_t pos,
size_t mask,
uint8_t prev_byte,
uint8_t prev_byte2,
const std::vector<int>& context_modes,
std::vector<HistogramLiteral>* literal_histograms,
std::vector<HistogramCommand>* insert_and_copy_histograms,
std::vector<HistogramDistance>* copy_dist_histograms);
} // namespace brotli
#endif // BROTLI_ENC_HISTOGRAM_H_
@@ -0,0 +1,57 @@
/**
* @author Toru Nagashima <https://github.com/mysticatea>
* See LICENSE file in root directory for full license.
*/
"use strict"
const { CALL, CONSTRUCT, READ } = require("@eslint-community/eslint-utils")
const unprefixNodeColon = require("./unprefix-node-colon")
/** @typedef {import('../unsupported-features/types.js').DeprecatedInfoTraceMap} DeprecatedInfoTraceMap */
/** @typedef {import('../unsupported-features/types.js').SupportVersionTraceMap} SupportVersionTraceMap */
/**
* @template {SupportVersionTraceMap | DeprecatedInfoTraceMap} TraceMap
* Enumerate property names of a given object recursively.
* @param {TraceMap} traceMap The map for APIs to enumerate.
* @param {string[]} [path] The path to the current map.
* @param {{ [key: string]: WeakSet<TraceMap> }} [recursion] An object to block recursion (per module)
* @returns {IterableIterator<string>} The property names of the map.
*/
function* enumeratePropertyNames(traceMap, path = [], recursion = {}) {
const recursionSet =
typeof path[0] === "string"
? (recursion[path[0]] ??= new WeakSet())
: undefined
if (recursionSet?.has(traceMap)) {
return
}
for (const key of Object.getOwnPropertyNames(traceMap)) {
const childValue = traceMap[key]
const childPath = [...path, key]
const childName = unprefixNodeColon(childPath.join("."))
if (childValue == null) {
continue
}
if (childValue[CALL]) {
yield `${childName}()`
}
if (childValue[CONSTRUCT]) {
yield `new ${childName}()`
}
if (childValue[READ]) {
yield childName
}
recursionSet?.add(traceMap)
yield* enumeratePropertyNames(childValue, childPath, recursion)
}
}
module.exports = enumeratePropertyNames
@@ -0,0 +1,108 @@
/**
* Copyright (c) 2018 The xterm.js authors. All rights reserved.
* @license MIT
*/
import { IDisposable } from 'common/Types';
/**
* A base class that can be extended to provide convenience methods for managing the lifecycle of an
* object and its components.
*/
export abstract class Disposable implements IDisposable {
protected _disposables: IDisposable[] = [];
protected _isDisposed: boolean = false;
/**
* Disposes the object, triggering the `dispose` method on all registered IDisposables.
*/
public dispose(): void {
this._isDisposed = true;
for (const d of this._disposables) {
d.dispose();
}
this._disposables.length = 0;
}
/**
* Registers a disposable object.
* @param d The disposable to register.
* @returns The disposable.
*/
public register<T extends IDisposable>(d: T): T {
this._disposables.push(d);
return d;
}
/**
* Unregisters a disposable object if it has been registered, if not do
* nothing.
* @param d The disposable to unregister.
*/
public unregister<T extends IDisposable>(d: T): void {
const index = this._disposables.indexOf(d);
if (index !== -1) {
this._disposables.splice(index, 1);
}
}
}
export class MutableDisposable<T extends IDisposable> implements IDisposable {
private _value?: T;
private _isDisposed = false;
/**
* Gets the value if it exists.
*/
public get value(): T | undefined {
return this._isDisposed ? undefined : this._value;
}
/**
* Sets the value, disposing of the old value if it exists.
*/
public set value(value: T | undefined) {
if (this._isDisposed || value === this._value) {
return;
}
this._value?.dispose();
this._value = value;
}
/**
* Resets the stored value and disposes of the previously stored value.
*/
public clear(): void {
this.value = undefined;
}
public dispose(): void {
this._isDisposed = true;
this._value?.dispose();
this._value = undefined;
}
}
/**
* Wrap a function in a disposable.
*/
export function toDisposable(f: () => void): IDisposable {
return { dispose: f };
}
/**
* Dispose of all disposables in an array and set its length to 0.
*/
export function disposeArray(disposables: IDisposable[]): void {
for (const d of disposables) {
d.dispose();
}
disposables.length = 0;
}
/**
* Creates a disposable that will dispose of an array of disposables when disposed.
*/
export function getDisposeArrayDisposable(array: IDisposable[]): IDisposable {
return { dispose: () => disposeArray(array) };
}
@@ -0,0 +1,65 @@
/**
* @author Toru Nagashima
* See LICENSE file in root directory for full license.
*/
"use strict"
const fs = require("fs")
const path = require("path")
const Cache = require("./cache")
const ROOT = /^(?:[/.]|\.\.|[A-Z]:\\|\\\\)(?:[/\\]\.\.)*$/u
const cache = new Cache()
/**
* Check whether the file exists or not.
* @param {string} filePath The file path to check.
* @returns {boolean} `true` if the file exists.
*/
function existsCaseSensitive(filePath) {
let dirPath = filePath
while (dirPath !== "" && !ROOT.test(dirPath)) {
const fileName = path.basename(dirPath)
dirPath = path.dirname(dirPath)
if (fs.readdirSync(dirPath).indexOf(fileName) === -1) {
return false
}
}
return true
}
/**
* Checks whether or not the file of a given path exists.
*
* @param {string} filePath - A file path to check.
* @returns {boolean} `true` if the file of a given path exists.
*/
module.exports = function exists(filePath) {
if (filePath == null) {
return false
}
let result = cache.get(filePath)
if (result == null) {
try {
const relativePath = path.relative(process.cwd(), filePath)
result =
fs.statSync(relativePath).isFile() &&
existsCaseSensitive(relativePath)
} catch (error) {
if (
error instanceof Error &&
("code" in error === false || error.code !== "ENOENT")
) {
throw error
}
result = false
}
cache.set(filePath, result)
}
return result
}
@@ -0,0 +1,11 @@
import { PluginFunc } from 'dayjs'
declare module 'dayjs' {
interface ConfigTypeMap {
bigIntSupport: BigInt
}
export function unix(t: BigInt): Dayjs
}
declare const plugin: PluginFunc
export = plugin
@@ -0,0 +1,40 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _createTester;
var _breakLoop = require('./breakLoop.js');
var _breakLoop2 = _interopRequireDefault(_breakLoop);
var _wrapAsync = require('./wrapAsync.js');
var _wrapAsync2 = _interopRequireDefault(_wrapAsync);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _createTester(check, getResult) {
return (eachfn, arr, _iteratee, cb) => {
var testPassed = false;
var testResult;
const iteratee = (0, _wrapAsync2.default)(_iteratee);
eachfn(arr, (value, _, callback) => {
iteratee(value, (err, result) => {
if (err || err === false) return callback(err);
if (check(result) && !testResult) {
testPassed = true;
testResult = getResult(true, value);
return callback(null, _breakLoop2.default);
}
callback();
});
}, err => {
if (err) return cb(err);
cb(null, testPassed ? testResult : getResult(false));
});
};
}
module.exports = exports.default;
@@ -0,0 +1 @@
{"version":3,"file":"jsx.d.ts","sourceRoot":"","sources":["jsx.js"],"names":[],"mappings":";;;;;;;;;;;mBAoBsB,OAAO,QAAQ,EAAE,MAAM,CAAC,MAAM"}
@@ -0,0 +1,26 @@
import createFlow from './_createFlow.js';
/**
* This method is like `_.flow` except that it creates a function that
* invokes the given functions from right to left.
*
* @static
* @since 3.0.0
* @memberOf _
* @category Util
* @param {...(Function|Function[])} [funcs] The functions to invoke.
* @returns {Function} Returns the new composite function.
* @see _.flow
* @example
*
* function square(n) {
* return n * n;
* }
*
* var addSquare = _.flowRight([square, _.add]);
* addSquare(1, 2);
* // => 9
*/
var flowRight = createFlow(true);
export default flowRight;
@@ -0,0 +1,46 @@
var $jMsK8$reactariautils = require("@react-aria/utils");
function $parcel$export(e, n, v, s) {
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
}
$parcel$export(module.exports, "moveVirtualFocus", () => $a756eb2d3b28d089$export$76e4e37e5339496d);
$parcel$export(module.exports, "getVirtuallyFocusedElement", () => $a756eb2d3b28d089$export$759df0d867455a91);
$parcel$export(module.exports, "dispatchVirtualBlur", () => $a756eb2d3b28d089$export$6c5dc7e81d2cc29a);
$parcel$export(module.exports, "dispatchVirtualFocus", () => $a756eb2d3b28d089$export$2b35b76d2e30e129);
function $a756eb2d3b28d089$export$76e4e37e5339496d(to) {
let from = $a756eb2d3b28d089$export$759df0d867455a91((0, $jMsK8$reactariautils.getOwnerDocument)(to));
if (from !== to) {
if (from) $a756eb2d3b28d089$export$6c5dc7e81d2cc29a(from, to);
if (to) $a756eb2d3b28d089$export$2b35b76d2e30e129(to, from);
}
}
function $a756eb2d3b28d089$export$6c5dc7e81d2cc29a(from, to) {
from.dispatchEvent(new FocusEvent('blur', {
relatedTarget: to
}));
from.dispatchEvent(new FocusEvent('focusout', {
bubbles: true,
relatedTarget: to
}));
}
function $a756eb2d3b28d089$export$2b35b76d2e30e129(to, from) {
to.dispatchEvent(new FocusEvent('focus', {
relatedTarget: from
}));
to.dispatchEvent(new FocusEvent('focusin', {
bubbles: true,
relatedTarget: from
}));
}
function $a756eb2d3b28d089$export$759df0d867455a91(document) {
let activeElement = (0, $jMsK8$reactariautils.getActiveElement)(document);
let activeDescendant = activeElement === null || activeElement === void 0 ? void 0 : activeElement.getAttribute('aria-activedescendant');
if (activeDescendant) return document.getElementById(activeDescendant) || activeElement;
return activeElement;
}
//# sourceMappingURL=virtualFocus.main.js.map
@@ -0,0 +1,67 @@
/**
* Handle values based on a field.
*
* @template {InvalidHandler} [Invalid=InvalidHandler]
* @template {UnknownHandler} [Unknown=UnknownHandler]
* @template {Record<string, Handler>} [Handlers=Record<string, Handler>]
* @param {string} key
* Field to switch on.
* @param {Options<Invalid, Unknown, Handlers>} [options]
* Configuration (required).
* @returns {{unknown: Unknown, invalid: Invalid, handlers: Handlers, (...parameters: Parameters<Handlers[keyof Handlers]>): ReturnType<Handlers[keyof Handlers]>, (...parameters: Parameters<Unknown>): ReturnType<Unknown>}}
*/
export function zwitch<
Invalid extends InvalidHandler = InvalidHandler,
Unknown extends UnknownHandler = UnknownHandler,
Handlers extends Record<string, Handler> = Record<string, Handler>
>(
key: string,
options?: Options<Invalid, Unknown, Handlers> | undefined
): {
(...parameters: Parameters<Handlers[keyof Handlers]>): ReturnType<
Handlers[keyof Handlers]
>
(...parameters: Parameters<Unknown>): ReturnType<Unknown>
unknown: Unknown
invalid: Invalid
handlers: Handlers
}
/**
* Handle a value, with a certain ID field set to a certain value.
* The ID field is passed to `zwitch`, and it’s value is this function’s
* place on the `handlers` record.
*/
export type Handler = (...parameters: any[]) => any
/**
* Handle values that do have a certain ID field, but it’s set to a value
* that is not listed in the `handlers` record.
*/
export type UnknownHandler = (value: unknown, ...rest: any[]) => any
/**
* Handle values that do not have a certain ID field.
*/
export type InvalidHandler = (
value: unknown,
...rest: any[]
) => void | null | undefined | never
/**
* Configuration (required).
*/
export type Options<
Invalid extends InvalidHandler = InvalidHandler,
Unknown extends UnknownHandler = UnknownHandler,
Handlers extends Record<string, Handler> = Record<string, Handler>
> = {
/**
* Handler to use for invalid values.
*/
invalid?: Invalid | undefined
/**
* Handler to use for unknown values.
*/
unknown?: Unknown | undefined
/**
* Handlers to use.
*/
handlers?: Handlers | undefined
}
@@ -0,0 +1 @@
module.exports={A:{A:{"1":"F A B","2":"K D E wC"},B:{"1":"0 1 2 3 4 5 C L M G N O P Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I"},C:{"1":"0 1 2 3 4 5 6 7 8 9 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 1C","2":"xC TC 0C"},D:{"1":"0 1 2 3 4 5 6 7 8 9 J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC"},E:{"1":"J ZB K D E F A B C L M G 2C ZC 3C 4C 5C 6C aC NC OC 7C 8C 9C bC cC PC AD QC dC eC fC gC hC BD RC iC jC kC lC mC CD SC nC oC pC qC rC sC tC DD ED"},F:{"1":"0 1 2 3 4 5 6 7 8 9 B C G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z HD ID NC uC JD OC","2":"F FD GD"},G:{"1":"E ZC KD vC LD MD ND OD PD QD RD SD TD UD VD WD XD YD ZD aD bD cD dD bC cC PC eD QC dC eC fC gC hC fD RC iC jC kC lC mC gD SC nC oC pC qC rC sC tC"},H:{"1":"hD"},I:{"1":"TC J I iD jD kD lD vC mD nD"},J:{"1":"D A"},K:{"1":"A B C H NC uC OC"},L:{"1":"I"},M:{"1":"MC"},N:{"1":"A B"},O:{"1":"PC"},P:{"1":"6 7 8 9 J AB BB CB DB EB FB oD pD qD rD sD aC tD uD vD wD xD QC RC SC yD"},Q:{"1":"zD"},R:{"1":"0D"},S:{"1":"1D 2D"}},B:4,C:"CSS3 Multiple backgrounds",D:true};
@@ -0,0 +1 @@
{"mappings":";;;;AAAA;;;;;;;;;;CAUC;;;AAWM,SAAS,0CAAmB,UAA+B,CAAC,CAAC;IAClE,IAAI,UAAC,MAAM,EAAC,GAAG,CAAA,GAAA,yCAAQ;IACvB,OAAO,CAAA,GAAA,cAAM,EAAE,IAAM,IAAI,CAAA,GAAA,sBAAc,EAAE,QAAQ,UAAU;QAAC;QAAQ;KAAQ;AAC9E","sources":["packages/@react-aria/i18n/src/useNumberFormatter.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {NumberFormatOptions, NumberFormatter} from '@internationalized/number';\nimport {useLocale} from './context';\nimport {useMemo} from 'react';\n\n/**\n * Provides localized number formatting for the current locale. Automatically updates when the locale changes,\n * and handles caching of the number formatter for performance.\n * @param options - Formatting options.\n */\nexport function useNumberFormatter(options: NumberFormatOptions = {}): Intl.NumberFormat {\n let {locale} = useLocale();\n return useMemo(() => new NumberFormatter(locale, options), [locale, options]);\n}\n"],"names":[],"version":3,"file":"useNumberFormatter.module.js.map"}
@@ -0,0 +1,39 @@
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $ArrayBuffer = GetIntrinsic('%ArrayBuffer%');
var $DataView = GetIntrinsic('%DataView%', true);
var callBound = require('call-bound');
// node <= 0.10, < 0.11.4 has a nonconfigurable own property instead of a prototype getter
var $dataViewBuffer = callBound('DataView.prototype.buffer', true);
var isTypedArray = require('is-typed-array');
/** @type {import('.')} */
module.exports = function isDataView(x) {
if (!x || typeof x !== 'object' || !$DataView || isTypedArray(x)) {
return false;
}
if ($dataViewBuffer) {
try {
$dataViewBuffer(x);
return true;
} catch (e) {
return false;
}
}
if (
('getInt8' in x)
&& typeof x.getInt8 === 'function'
&& x.getInt8 === new $DataView(new $ArrayBuffer(1)).getInt8
) {
return true;
}
return false;
};
@@ -0,0 +1,127 @@
# normalize-path [![NPM version](https://img.shields.io/npm/v/normalize-path.svg?style=flat)](https://www.npmjs.com/package/normalize-path) [![NPM monthly downloads](https://img.shields.io/npm/dm/normalize-path.svg?style=flat)](https://npmjs.org/package/normalize-path) [![NPM total downloads](https://img.shields.io/npm/dt/normalize-path.svg?style=flat)](https://npmjs.org/package/normalize-path) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/normalize-path.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/normalize-path)
> Normalize slashes in a file path to be posix/unix-like forward slashes. Also condenses repeat slashes to a single slash and removes and trailing slashes, unless disabled.
Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support.
## Install
Install with [npm](https://www.npmjs.com/):
```sh
$ npm install --save normalize-path
```
## Usage
```js
const normalize = require('normalize-path');
console.log(normalize('\\foo\\bar\\baz\\'));
//=> '/foo/bar/baz'
```
**win32 namespaces**
```js
console.log(normalize('\\\\?\\UNC\\Server01\\user\\docs\\Letter.txt'));
//=> '//?/UNC/Server01/user/docs/Letter.txt'
console.log(normalize('\\\\.\\CdRomX'));
//=> '//./CdRomX'
```
**Consecutive slashes**
Condenses multiple consecutive forward slashes (except for leading slashes in win32 namespaces) to a single slash.
```js
console.log(normalize('.//foo//bar///////baz/'));
//=> './foo/bar/baz'
```
### Trailing slashes
By default trailing slashes are removed. Pass `false` as the last argument to disable this behavior and _**keep** trailing slashes_:
```js
console.log(normalize('foo\\bar\\baz\\', false)); //=> 'foo/bar/baz/'
console.log(normalize('./foo/bar/baz/', false)); //=> './foo/bar/baz/'
```
## Release history
### v3.0
No breaking changes in this release.
* a check was added to ensure that [win32 namespaces](https://msdn.microsoft.com/library/windows/desktop/aa365247(v=vs.85).aspx#namespaces) are handled properly by win32 `path.parse()` after a path has been normalized by this library.
* a minor optimization was made to simplify how the trailing separator was handled
## About
<details>
<summary><strong>Contributing</strong></summary>
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
</details>
<details>
<summary><strong>Running Tests</strong></summary>
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
```sh
$ npm install && npm test
```
</details>
<details>
<summary><strong>Building docs</strong></summary>
_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
To generate the readme, run the following command:
```sh
$ npm install -g verbose/verb#dev verb-generate-readme && verb
```
</details>
### Related projects
Other useful path-related libraries:
* [contains-path](https://www.npmjs.com/package/contains-path): Return true if a file path contains the given path. | [homepage](https://github.com/jonschlinkert/contains-path "Return true if a file path contains the given path.")
* [is-absolute](https://www.npmjs.com/package/is-absolute): Returns true if a file path is absolute. Does not rely on the path module… [more](https://github.com/jonschlinkert/is-absolute) | [homepage](https://github.com/jonschlinkert/is-absolute "Returns true if a file path is absolute. Does not rely on the path module and can be used as a polyfill for node.js native `path.isAbolute`.")
* [is-relative](https://www.npmjs.com/package/is-relative): Returns `true` if the path appears to be relative. | [homepage](https://github.com/jonschlinkert/is-relative "Returns `true` if the path appears to be relative.")
* [parse-filepath](https://www.npmjs.com/package/parse-filepath): Pollyfill for node.js `path.parse`, parses a filepath into an object. | [homepage](https://github.com/jonschlinkert/parse-filepath "Pollyfill for node.js `path.parse`, parses a filepath into an object.")
* [path-ends-with](https://www.npmjs.com/package/path-ends-with): Return `true` if a file path ends with the given string/suffix. | [homepage](https://github.com/jonschlinkert/path-ends-with "Return `true` if a file path ends with the given string/suffix.")
* [unixify](https://www.npmjs.com/package/unixify): Convert Windows file paths to unix paths. | [homepage](https://github.com/jonschlinkert/unixify "Convert Windows file paths to unix paths.")
### Contributors
| **Commits** | **Contributor** |
| --- | --- |
| 35 | [jonschlinkert](https://github.com/jonschlinkert) |
| 1 | [phated](https://github.com/phated) |
### Author
**Jon Schlinkert**
* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert)
* [GitHub Profile](https://github.com/jonschlinkert)
* [Twitter Profile](https://twitter.com/jonschlinkert)
### License
Copyright © 2018, [Jon Schlinkert](https://github.com/jonschlinkert).
Released under the [MIT License](LICENSE).
***
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on April 19, 2018._
@@ -0,0 +1,15 @@
/**
* Adds `value` to `set`.
*
* @private
* @param {Object} set The set to modify.
* @param {*} value The value to add.
* @returns {Object} Returns `set`.
*/
function addSetEntry(set, value) {
// Don't return `set.add` because it's not chainable in IE 11.
set.add(value);
return set;
}
export default addSetEntry;
@@ -0,0 +1 @@
{"name":"commander","version":"14.0.2","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532100458,"integrity":"sha512-SDdrYzWbAHFUv6ezmT7KCw4dXk0rQ182bnDDY6OEHwa5HAn++psEhHqcpE43xVNcgYoCvGZWWiTsFe+cYQOYZw==","mode":420,"size":1098},"lib/argument.js":{"checkedAt":1794532100458,"integrity":"sha512-LCzmn1TEt7zqT5553GnnpaQ4IdDgKCzkxYTLWcKxL9bE6v284sKvq60g2x49XUnmquKipV+J+RhiXCponQDTLg==","mode":420,"size":3208},"lib/command.js":{"checkedAt":1794532100459,"integrity":"sha512-i/tzJ3WtgylAwWMmg0RP4fwARgFC1R28Y2gJuEeig9mE/KNTSLuCSEs43Y07D9B2pmYE7OJj+4s1su286BYWAg==","mode":420,"size":87209},"lib/error.js":{"checkedAt":1794532100459,"integrity":"sha512-Febn6TeQnyc3zvzkaDIRSn7co90RZOw1gkNC4fa7v+UG2WsPAIv6nkYONaABxo1XmbFKj3eLpPvIp5aLjLcp1g==","mode":420,"size":1170},"lib/help.js":{"checkedAt":1794532100459,"integrity":"sha512-0zvgrz5Yv7J0XbGOTjeyfkX3lQwKx503S8KTEjIKXwBWzaZFJyhyp7OZ8YhIv1sQ71I6BMEsiwpkw9mP1TeROw==","mode":420,"size":21130},"index.js":{"checkedAt":1794532100459,"integrity":"sha512-Z4Q7kmBCW0HKlNGi5UP9Bs5hqMN9q7oFXA+U7fbeGpZL5KytqwPPdbBh6m0aQoOPkyMLm4Ftjn31g3ts/YFgJg==","mode":420,"size":812},"lib/option.js":{"checkedAt":1794532100459,"integrity":"sha512-lswP2+YMXXd8PCYT7EKdlco1DPeOyq5aRR8On6g2//we8hZMlfodAi/ZTaY/UxXAwoZsvp4BAgYI1KtAlfV9vA==","mode":420,"size":10289},"lib/suggestSimilar.js":{"checkedAt":1794532100459,"integrity":"sha512-aGcp5g0kf2Gn3kIOXMDuA0N0XPzL4tpPi7X1+jjCI4CAT7wPfYe1W+YdUu+zPZSdX1cXPPMTk80/H2r6L9KoGg==","mode":420,"size":2774},"package-support.json":{"checkedAt":1794532100459,"integrity":"sha512-HRmhkZ1wDiq8+jsuamJlhonlxc6xph8kC0FqqsVtnuI6C5xzeTalpyo+dY++lpJ2IrFat0YpiJlB6RbWoyLubg==","mode":420,"size":231},"package.json":{"checkedAt":1794532100460,"integrity":"sha512-nLiaQkIQ+a/nnc0eihlNfzza+/CJJJSEfSDAqX2y/7khNnv5sDzXP/O4DLpkWUzuUxZ41e82oKjisYhHfFFmfA==","mode":420,"size":2097},"Readme.md":{"checkedAt":1794532100460,"integrity":"sha512-FjvSv+dUhDgxCI5F1ihxLu6vfcKrxnKiNiBMnMkntDw5xhSoWacXtNQGJ8SkSNUC8mXtF7o4SbBaxU7JdAmCLA==","mode":420,"size":42974},"esm.mjs":{"checkedAt":1794532100460,"integrity":"sha512-JO5aKC5lm+zJ8jEFHZHUVBwGGGYuhrPyMZgACK0vEcgnGjtUMDhko1vgP3cPLeDMCw7QtMbmoxQqf0hPouy6Dw==","mode":420,"size":310},"typings/esm.d.mts":{"checkedAt":1794532100460,"integrity":"sha512-3DpLzAG7r5pPH6ZbiBlZPjT0SvGeqszPhVRqscbdCWzvxBRxR+SCq7n6El2NOyVT6tTUMtOa1u+SlFpji/P18w==","mode":420,"size":168},"typings/index.d.ts":{"checkedAt":1794532100460,"integrity":"sha512-d0IoLDS5PEn8weo18esmQRR05ZFRQHJhCzmdfjPbWKkxGustpxju1B0/m0GjUfKdkF+t3DSBOLuv9Nzs9BxIGw==","mode":420,"size":34683}}}
@@ -0,0 +1,21 @@
import baseEach from './_baseEach.js';
/**
* The base implementation of `_.filter` without support for iteratee shorthands.
*
* @private
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} predicate The function invoked per iteration.
* @returns {Array} Returns the new filtered array.
*/
function baseFilter(collection, predicate) {
var result = [];
baseEach(collection, function(value, index, collection) {
if (predicate(value, index, collection)) {
result.push(value);
}
});
return result;
}
export default baseFilter;
@@ -0,0 +1,171 @@
import { HasPropertyKey, IsStandardObject, IsArray, IsTypedArray, IsValueType } from '../guard/index.mjs';
import { ValuePointer } from '../pointer/index.mjs';
import { Clone } from '../clone/index.mjs';
import { Equal } from '../equal/equal.mjs';
import { TypeBoxError } from '../../type/error/index.mjs';
import { Literal } from '../../type/literal/index.mjs';
import { Object } from '../../type/object/index.mjs';
import { String } from '../../type/string/index.mjs';
import { Unknown } from '../../type/unknown/index.mjs';
import { Union } from '../../type/union/index.mjs';
export const Insert = Object({
type: Literal('insert'),
path: String(),
value: Unknown(),
});
export const Update = Object({
type: Literal('update'),
path: String(),
value: Unknown(),
});
export const Delete = Object({
type: Literal('delete'),
path: String(),
});
export const Edit = Union([Insert, Update, Delete]);
// ------------------------------------------------------------------
// Errors
// ------------------------------------------------------------------
export class ValueDiffError extends TypeBoxError {
constructor(value, message) {
super(message);
this.value = value;
}
}
// ------------------------------------------------------------------
// Command Factory
// ------------------------------------------------------------------
function CreateUpdate(path, value) {
return { type: 'update', path, value };
}
function CreateInsert(path, value) {
return { type: 'insert', path, value };
}
function CreateDelete(path) {
return { type: 'delete', path };
}
// ------------------------------------------------------------------
// AssertDiffable
// ------------------------------------------------------------------
function AssertDiffable(value) {
if (globalThis.Object.getOwnPropertySymbols(value).length > 0)
throw new ValueDiffError(value, 'Cannot diff objects with symbols');
}
// ------------------------------------------------------------------
// Diffing Generators
// ------------------------------------------------------------------
function* ObjectType(path, current, next) {
AssertDiffable(current);
AssertDiffable(next);
if (!IsStandardObject(next))
return yield CreateUpdate(path, next);
const currentKeys = globalThis.Object.getOwnPropertyNames(current);
const nextKeys = globalThis.Object.getOwnPropertyNames(next);
// ----------------------------------------------------------------
// inserts
// ----------------------------------------------------------------
for (const key of nextKeys) {
if (HasPropertyKey(current, key))
continue;
yield CreateInsert(`${path}/${key}`, next[key]);
}
// ----------------------------------------------------------------
// updates
// ----------------------------------------------------------------
for (const key of currentKeys) {
if (!HasPropertyKey(next, key))
continue;
if (Equal(current, next))
continue;
yield* Visit(`${path}/${key}`, current[key], next[key]);
}
// ----------------------------------------------------------------
// deletes
// ----------------------------------------------------------------
for (const key of currentKeys) {
if (HasPropertyKey(next, key))
continue;
yield CreateDelete(`${path}/${key}`);
}
}
function* ArrayType(path, current, next) {
if (!IsArray(next))
return yield CreateUpdate(path, next);
for (let i = 0; i < Math.min(current.length, next.length); i++) {
yield* Visit(`${path}/${i}`, current[i], next[i]);
}
for (let i = 0; i < next.length; i++) {
if (i < current.length)
continue;
yield CreateInsert(`${path}/${i}`, next[i]);
}
for (let i = current.length - 1; i >= 0; i--) {
if (i < next.length)
continue;
yield CreateDelete(`${path}/${i}`);
}
}
function* TypedArrayType(path, current, next) {
if (!IsTypedArray(next) || current.length !== next.length || globalThis.Object.getPrototypeOf(current).constructor.name !== globalThis.Object.getPrototypeOf(next).constructor.name)
return yield CreateUpdate(path, next);
for (let i = 0; i < Math.min(current.length, next.length); i++) {
yield* Visit(`${path}/${i}`, current[i], next[i]);
}
}
function* ValueType(path, current, next) {
if (current === next)
return;
yield CreateUpdate(path, next);
}
function* Visit(path, current, next) {
if (IsStandardObject(current))
return yield* ObjectType(path, current, next);
if (IsArray(current))
return yield* ArrayType(path, current, next);
if (IsTypedArray(current))
return yield* TypedArrayType(path, current, next);
if (IsValueType(current))
return yield* ValueType(path, current, next);
throw new ValueDiffError(current, 'Unable to diff value');
}
// ------------------------------------------------------------------
// Diff
// ------------------------------------------------------------------
export function Diff(current, next) {
return [...Visit('', current, next)];
}
// ------------------------------------------------------------------
// Patch
// ------------------------------------------------------------------
function IsRootUpdate(edits) {
return edits.length > 0 && edits[0].path === '' && edits[0].type === 'update';
}
function IsIdentity(edits) {
return edits.length === 0;
}
export function Patch(current, edits) {
if (IsRootUpdate(edits)) {
return Clone(edits[0].value);
}
if (IsIdentity(edits)) {
return Clone(current);
}
const clone = Clone(current);
for (const edit of edits) {
switch (edit.type) {
case 'insert': {
ValuePointer.Set(clone, edit.path, edit.value);
break;
}
case 'update': {
ValuePointer.Set(clone, edit.path, edit.value);
break;
}
case 'delete': {
ValuePointer.Delete(clone, edit.path);
break;
}
}
}
return clone;
}
@@ -0,0 +1,129 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/components/autocomplete.ts
var autocomplete_exports = {};
__export(autocomplete_exports, {
autocomplete: () => autocomplete
});
module.exports = __toCommonJS(autocomplete_exports);
// src/utils/tv.ts
var import_tailwind_variants = require("tailwind-variants");
// src/utils/tw-merge-config.ts
var COMMON_UNITS = ["small", "medium", "large"];
var twMergeConfig = {
theme: {
opacity: ["disabled"],
spacing: ["divider"],
borderWidth: COMMON_UNITS,
borderRadius: COMMON_UNITS
},
classGroups: {
shadow: [{ shadow: COMMON_UNITS }],
"font-size": [{ text: ["tiny", ...COMMON_UNITS] }],
"bg-image": [
"bg-stripe-gradient-default",
"bg-stripe-gradient-primary",
"bg-stripe-gradient-secondary",
"bg-stripe-gradient-success",
"bg-stripe-gradient-warning",
"bg-stripe-gradient-danger"
]
}
};
// src/utils/tv.ts
var tv = (options, config) => {
var _a, _b, _c;
return (0, import_tailwind_variants.tv)(options, {
...config,
twMerge: (_a = config == null ? void 0 : config.twMerge) != null ? _a : true,
twMergeConfig: {
...config == null ? void 0 : config.twMergeConfig,
theme: {
...(_b = config == null ? void 0 : config.twMergeConfig) == null ? void 0 : _b.theme,
...twMergeConfig.theme
},
classGroups: {
...(_c = config == null ? void 0 : config.twMergeConfig) == null ? void 0 : _c.classGroups,
...twMergeConfig.classGroups
}
}
});
};
// src/components/autocomplete.ts
var autocomplete = tv({
slots: {
base: "group inline-flex flex-column w-full",
listboxWrapper: "scroll-py-6 w-full",
listbox: "",
popoverContent: "w-full p-1 overflow-hidden",
endContentWrapper: "relative flex h-full items-center -mr-2",
clearButton: [
"text-medium",
"translate-x-1",
"cursor-text",
"opacity-0",
"pointer-events-none",
"text-default-500",
"group-data-[invalid=true]:text-danger",
"data-[visible=true]:opacity-100",
"data-[visible=true]:pointer-events-auto",
"data-[visible=true]:cursor-pointer",
"sm:data-[visible=true]:opacity-0",
"sm:data-[visible=true]:pointer-events-none",
"sm:group-data-[hover=true]:data-[visible=true]:opacity-100",
"sm:group-data-[hover=true]:data-[visible=true]:pointer-events-auto"
],
selectorButton: "text-medium"
},
variants: {
isClearable: {
true: {},
false: {
clearButton: "hidden"
}
},
disableAnimation: {
true: {
selectorButton: "transition-none"
},
false: {
selectorButton: "transition-transform duration-150 ease motion-reduce:transition-none"
}
},
disableSelectorIconRotation: {
true: {},
false: {
selectorButton: "data-[open=true]:rotate-180"
}
}
},
defaultVariants: {
isClearable: true,
disableSelectorIconRotation: false
}
});
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
autocomplete
});
@@ -0,0 +1,119 @@
/**
* @fileoverview Forbid certain elements
* @author Kenneth Chung
*/
'use strict';
const has = require('hasown');
const docsUrl = require('../util/docsUrl');
const getText = require('../util/eslint').getText;
const isCreateElement = require('../util/isCreateElement');
const report = require('../util/report');
// ------------------------------------------------------------------------------
// Rule Definition
// ------------------------------------------------------------------------------
const messages = {
forbiddenElement: '<{{element}}> is forbidden',
forbiddenElement_message: '<{{element}}> is forbidden, {{message}}',
};
/** @type {import('eslint').Rule.RuleModule} */
module.exports = {
meta: {
docs: {
description: 'Disallow certain elements',
category: 'Best Practices',
recommended: false,
url: docsUrl('forbid-elements'),
},
messages,
schema: [{
type: 'object',
properties: {
forbid: {
type: 'array',
items: {
anyOf: [
{ type: 'string' },
{
type: 'object',
properties: {
element: { type: 'string' },
message: { type: 'string' },
},
required: ['element'],
additionalProperties: false,
},
],
},
},
},
additionalProperties: false,
}],
},
create(context) {
const configuration = context.options[0] || {};
const forbidConfiguration = configuration.forbid || [];
/** @type {Record<string, { element: string, message?: string }>} */
const indexedForbidConfigs = {};
forbidConfiguration.forEach((item) => {
if (typeof item === 'string') {
indexedForbidConfigs[item] = { element: item };
} else {
indexedForbidConfigs[item.element] = item;
}
});
function reportIfForbidden(element, node) {
if (has(indexedForbidConfigs, element)) {
const message = indexedForbidConfigs[element].message;
report(
context,
message ? messages.forbiddenElement_message : messages.forbiddenElement,
message ? 'forbiddenElement_message' : 'forbiddenElement',
{
node,
data: {
element,
message,
},
}
);
}
}
return {
JSXOpeningElement(node) {
reportIfForbidden(getText(context, node.name), node.name);
},
CallExpression(node) {
if (!isCreateElement(context, node)) {
return;
}
const argument = node.arguments[0];
if (!argument) {
return;
}
if (argument.type === 'Identifier' && /^[A-Z_]/.test(argument.name)) {
reportIfForbidden(argument.name, argument);
} else if (argument.type === 'Literal' && /^[a-z][^.]*$/.test(String(argument.value))) {
reportIfForbidden(argument.value, argument);
} else if (argument.type === 'MemberExpression') {
reportIfForbidden(getText(context, argument), argument);
}
},
};
},
};
@@ -0,0 +1,284 @@
import type {
Action,
Reducer,
Slice,
WithSlice,
WithSlicePreloadedState,
} from '@reduxjs/toolkit'
import { combineSlices } from '@reduxjs/toolkit'
import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query'
declare const stringSlice: Slice<string, {}, 'string'>
declare const numberSlice: Slice<number, {}, 'number'>
declare const booleanReducer: Reducer<boolean>
declare const mixedReducer: Reducer<string, Action, number>
declare const mixedSliceLike: {
reducerPath: 'mixedSlice'
reducer: typeof mixedReducer
}
const exampleApi = createApi({
baseQuery: fetchBaseQuery(),
endpoints: (build) => ({
getThing: build.query({
query: () => '',
}),
}),
})
type ExampleApiState = ReturnType<typeof exampleApi.reducer>
describe('type tests', () => {
test('combineSlices correctly combines static state', () => {
const rootReducer = combineSlices(
stringSlice,
numberSlice,
exampleApi,
{
boolean: booleanReducer,
mixed: mixedReducer,
},
mixedSliceLike,
)
expectTypeOf(rootReducer(undefined, { type: '' })).toEqualTypeOf<{
string: string
number: number
boolean: boolean
api: ExampleApiState
mixed: string
mixedSlice: string
}>()
// test for correct preloaded state handling
expectTypeOf(rootReducer).toBeCallableWith(
{ mixed: 9, mixedSlice: 9 },
{ type: '' },
)
})
test('combineSlices allows passing no initial reducers', () => {
const rootReducer = combineSlices()
expectTypeOf(rootReducer(undefined, { type: '' })).toEqualTypeOf<{}>()
const declaredLazy =
combineSlices().withLazyLoadedSlices<WithSlice<typeof numberSlice>>()
expectTypeOf(declaredLazy(undefined, { type: '' })).toEqualTypeOf<{
number?: number
}>()
})
test('withLazyLoadedSlices adds partial to state', () => {
const rootReducer = combineSlices(stringSlice).withLazyLoadedSlices<
WithSlice<typeof numberSlice> & WithSlice<typeof exampleApi>
>()
expectTypeOf(rootReducer(undefined, { type: '' }).number).toEqualTypeOf<
number | undefined
>()
expectTypeOf(rootReducer(undefined, { type: '' }).api).toEqualTypeOf<
ExampleApiState | undefined
>()
})
test('inject marks injected keys as required', () => {
const rootReducer = combineSlices(stringSlice).withLazyLoadedSlices<
WithSlice<typeof numberSlice> &
WithSlice<typeof exampleApi> & { boolean: boolean } & WithSlice<
typeof mixedSliceLike
> &
WithSlice<{
reducerPath: 'mixedReducer'
reducer: typeof mixedReducer
}>,
WithSlicePreloadedState<typeof numberSlice> &
WithSlicePreloadedState<typeof exampleApi> & {
boolean: boolean
} & WithSlicePreloadedState<typeof mixedSliceLike> &
WithSlicePreloadedState<{
reducerPath: 'mixedReducer'
reducer: typeof mixedReducer
}>
>()
expectTypeOf(rootReducer(undefined, { type: '' }).number).toEqualTypeOf<
number | undefined
>()
expectTypeOf(rootReducer(undefined, { type: '' }).boolean).toEqualTypeOf<
boolean | undefined
>()
expectTypeOf(rootReducer(undefined, { type: '' }).api).toEqualTypeOf<
ExampleApiState | undefined
>()
expectTypeOf(rootReducer(undefined, { type: '' }).mixedSlice).toEqualTypeOf<
string | undefined
>()
expectTypeOf(
rootReducer(undefined, { type: '' }).mixedReducer,
).toEqualTypeOf<string | undefined>()
const withNumber = rootReducer.inject(numberSlice)
expectTypeOf(withNumber(undefined, { type: '' }).number).toBeNumber()
const withBool = rootReducer.inject({
reducerPath: 'boolean' as const,
reducer: booleanReducer,
})
expectTypeOf(withBool(undefined, { type: '' }).boolean).toBeBoolean()
const withApi = rootReducer.inject(exampleApi)
expectTypeOf(
withApi(undefined, { type: '' }).api,
).toEqualTypeOf<ExampleApiState>()
const withMixedSlice = rootReducer.inject(mixedSliceLike)
expectTypeOf(
withMixedSlice(undefined, { type: '' }).mixedSlice,
).toBeString()
const withMixedReducer = rootReducer.inject({
reducerPath: 'mixedReducer',
reducer: mixedReducer,
})
expectTypeOf(
withMixedReducer(undefined, { type: '' }).mixedReducer,
).toBeString()
})
test('selector() allows defining selectors with injected reducers defined', () => {
const rootReducer = combineSlices(stringSlice).withLazyLoadedSlices<
WithSlice<typeof numberSlice> & { boolean: boolean }
>()
type RootState = ReturnType<typeof rootReducer>
const withoutInjection = rootReducer.selector(
(state: RootState) => state.number,
)
expectTypeOf(
withoutInjection(rootReducer(undefined, { type: '' })),
).toEqualTypeOf<number | undefined>()
const withInjection = rootReducer
.inject(numberSlice)
.selector((state) => state.number)
expectTypeOf(
withInjection(rootReducer(undefined, { type: '' })),
).toBeNumber()
})
test('selector() passes arguments through', () => {
const rootReducer = combineSlices(stringSlice).withLazyLoadedSlices<
WithSlice<typeof numberSlice> & { boolean: boolean }
>()
const selector = rootReducer
.inject(numberSlice)
.selector((state, num: number) => state.number)
const state = rootReducer(undefined, { type: '' })
expectTypeOf(selector).toBeCallableWith(state, 0)
// required argument
expectTypeOf(selector).parameters.not.toMatchTypeOf([state])
// number not string
expectTypeOf(selector).parameters.not.toMatchTypeOf([state, ''])
})
test('nested calls inferred correctly', () => {
const innerReducer =
combineSlices(stringSlice).withLazyLoadedSlices<
WithSlice<typeof numberSlice>
>()
const innerSelector = innerReducer.inject(numberSlice).selector(
(state) => state.number,
(rootState: RootState) => rootState.inner,
)
const outerReducer = combineSlices({ inner: innerReducer })
type RootState = ReturnType<typeof outerReducer>
expectTypeOf(outerReducer(undefined, { type: '' })).toMatchTypeOf<{
inner: { string: string }
}>()
expectTypeOf(
innerSelector(outerReducer(undefined, { type: '' })),
).toBeNumber()
})
test('selector errors if selectorFn and selectState are mismatched', () => {
const combinedReducer =
combineSlices(stringSlice).withLazyLoadedSlices<
WithSlice<typeof numberSlice>
>()
const outerReducer = combineSlices({ inner: combinedReducer })
type RootState = ReturnType<typeof outerReducer>
combinedReducer.selector(
(state) => state.number,
// @ts-expect-error wrong state returned
(rootState: RootState) => rootState.inner.number,
)
combinedReducer.selector(
(state, num: number) => state.number,
// @ts-expect-error wrong arguments
(rootState: RootState, str: string) => rootState.inner,
)
combinedReducer.selector(
(state, num: number) => state.number,
(rootState: RootState) => rootState.inner,
)
// TODO: see if there's a way of making this work
// probably a rare case so not the end of the world if not
combinedReducer.selector(
(state) => state.number,
// @ts-ignore
(rootState: RootState, num: number) => rootState.inner,
)
})
test('correct type of state is inferred when not declared via `withLazyLoadedSlices`', () => {
// Related to https://github.com/reduxjs/redux-toolkit/issues/4171
const combinedReducer = combineSlices(stringSlice)
const withNumber = combinedReducer.inject(numberSlice)
expectTypeOf(withNumber).returns.toEqualTypeOf<{
string: string
number: number
}>()
expectTypeOf(
withNumber(undefined, { type: '' }).number,
).toMatchTypeOf<number>()
})
})
@@ -0,0 +1,14 @@
module.exports = {
"ascending": `rastu\u{107}i`,
"ascendingSort": (args)=>`sortirano po kolonama ${args.columnName} rastu\u{107}im redosledom`,
"columnSize": (args)=>`${args.value} piksela`,
"descending": `padaju\u{107}i`,
"descendingSort": (args)=>`sortirano po kolonama ${args.columnName} padaju\u{107}im redosledom`,
"resizerDescription": `Pritisnite Enter da biste zapo\u{10D}eli promenu veli\u{10D}ine`,
"select": `Izaberite`,
"selectAll": `Izaberite sve`,
"sortable": `kolona koja se mo\u{17E}e sortirati`
};
//# sourceMappingURL=sr-SP.main.js.map
@@ -0,0 +1,2 @@
import type { LibDefinition } from '../variable';
export declare const es2024_string: LibDefinition;
@@ -0,0 +1,7 @@
"use client";
import {
tab_default
} from "./chunk-TTZQXKQZ.mjs";
export {
tab_default as default
};
@@ -0,0 +1,177 @@
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const net_1 = __importDefault(require("net"));
const tls_1 = __importDefault(require("tls"));
const url_1 = __importDefault(require("url"));
const assert_1 = __importDefault(require("assert"));
const debug_1 = __importDefault(require("debug"));
const agent_base_1 = require("agent-base");
const parse_proxy_response_1 = __importDefault(require("./parse-proxy-response"));
const debug = debug_1.default('https-proxy-agent:agent');
/**
* The `HttpsProxyAgent` implements an HTTP Agent subclass that connects to
* the specified "HTTP(s) proxy server" in order to proxy HTTPS requests.
*
* Outgoing HTTP requests are first tunneled through the proxy server using the
* `CONNECT` HTTP request method to establish a connection to the proxy server,
* and then the proxy server connects to the destination target and issues the
* HTTP request from the proxy server.
*
* `https:` requests have their socket connection upgraded to TLS once
* the connection to the proxy server has been established.
*
* @api public
*/
class HttpsProxyAgent extends agent_base_1.Agent {
constructor(_opts) {
let opts;
if (typeof _opts === 'string') {
opts = url_1.default.parse(_opts);
}
else {
opts = _opts;
}
if (!opts) {
throw new Error('an HTTP(S) proxy server `host` and `port` must be specified!');
}
debug('creating new HttpsProxyAgent instance: %o', opts);
super(opts);
const proxy = Object.assign({}, opts);
// If `true`, then connect to the proxy server over TLS.
// Defaults to `false`.
this.secureProxy = opts.secureProxy || isHTTPS(proxy.protocol);
// Prefer `hostname` over `host`, and set the `port` if needed.
proxy.host = proxy.hostname || proxy.host;
if (typeof proxy.port === 'string') {
proxy.port = parseInt(proxy.port, 10);
}
if (!proxy.port && proxy.host) {
proxy.port = this.secureProxy ? 443 : 80;
}
// ALPN is supported by Node.js >= v5.
// attempt to negotiate http/1.1 for proxy servers that support http/2
if (this.secureProxy && !('ALPNProtocols' in proxy)) {
proxy.ALPNProtocols = ['http 1.1'];
}
if (proxy.host && proxy.path) {
// If both a `host` and `path` are specified then it's most likely
// the result of a `url.parse()` call... we need to remove the
// `path` portion so that `net.connect()` doesn't attempt to open
// that as a Unix socket file.
delete proxy.path;
delete proxy.pathname;
}
this.proxy = proxy;
}
/**
* Called when the node-core HTTP client library is creating a
* new HTTP request.
*
* @api protected
*/
callback(req, opts) {
return __awaiter(this, void 0, void 0, function* () {
const { proxy, secureProxy } = this;
// Create a socket connection to the proxy server.
let socket;
if (secureProxy) {
debug('Creating `tls.Socket`: %o', proxy);
socket = tls_1.default.connect(proxy);
}
else {
debug('Creating `net.Socket`: %o', proxy);
socket = net_1.default.connect(proxy);
}
const headers = Object.assign({}, proxy.headers);
const hostname = `${opts.host}:${opts.port}`;
let payload = `CONNECT ${hostname} HTTP/1.1\r\n`;
// Inject the `Proxy-Authorization` header if necessary.
if (proxy.auth) {
headers['Proxy-Authorization'] = `Basic ${Buffer.from(proxy.auth).toString('base64')}`;
}
// The `Host` header should only include the port
// number when it is not the default port.
let { host, port, secureEndpoint } = opts;
if (!isDefaultPort(port, secureEndpoint)) {
host += `:${port}`;
}
headers.Host = host;
headers.Connection = 'close';
for (const name of Object.keys(headers)) {
payload += `${name}: ${headers[name]}\r\n`;
}
const proxyResponsePromise = parse_proxy_response_1.default(socket);
socket.write(`${payload}\r\n`);
const { statusCode, buffered } = yield proxyResponsePromise;
if (statusCode === 200) {
req.once('socket', resume);
if (opts.secureEndpoint) {
// The proxy is connecting to a TLS server, so upgrade
// this socket connection to a TLS connection.
debug('Upgrading socket connection to TLS');
const servername = opts.servername || opts.host;
return tls_1.default.connect(Object.assign(Object.assign({}, omit(opts, 'host', 'hostname', 'path', 'port')), { socket,
servername }));
}
return socket;
}
// Some other status code that's not 200... need to re-play the HTTP
// header "data" events onto the socket once the HTTP machinery is
// attached so that the node core `http` can parse and handle the
// error status code.
// Close the original socket, and a new "fake" socket is returned
// instead, so that the proxy doesn't get the HTTP request
// written to it (which may contain `Authorization` headers or other
// sensitive data).
//
// See: https://hackerone.com/reports/541502
socket.destroy();
const fakeSocket = new net_1.default.Socket({ writable: false });
fakeSocket.readable = true;
// Need to wait for the "socket" event to re-play the "data" events.
req.once('socket', (s) => {
debug('replaying proxy buffer for failed request');
assert_1.default(s.listenerCount('data') > 0);
// Replay the "buffered" Buffer onto the fake `socket`, since at
// this point the HTTP module machinery has been hooked up for
// the user.
s.push(buffered);
s.push(null);
});
return fakeSocket;
});
}
}
exports.default = HttpsProxyAgent;
function resume(socket) {
socket.resume();
}
function isDefaultPort(port, secure) {
return Boolean((!secure && port === 80) || (secure && port === 443));
}
function isHTTPS(protocol) {
return typeof protocol === 'string' ? /^https:?$/i.test(protocol) : false;
}
function omit(obj, ...keys) {
const ret = {};
let key;
for (key in obj) {
if (!keys.includes(key)) {
ret[key] = obj[key];
}
}
return ret;
}
//# sourceMappingURL=agent.js.map
@@ -0,0 +1,93 @@
import { createRequire } from 'node:module';
import { performance } from 'node:perf_hooks';
import timers from 'node:timers';
import timersPromises from 'node:timers/promises';
import util from 'node:util';
import { startTests, collectTests } from '@vitest/runner';
import { KNOWN_ASSET_TYPES } from '@vitest/utils/constants';
import { s as setupChaiConfig, r as resolveTestRunner, a as resolveSnapshotEnvironment } from '../chunks/index.CPA8jGhR.js';
import { c as setupCommonEnv, s as startCoverageInsideWorker, a as stopCoverageInsideWorker } from '../chunks/setup-common.Dw1XgX0v.js';
import { i as index } from '../chunks/index.CGezRSGU.js';
import { c as closeInspector } from '../chunks/inspector.CvyFGlXm.js';
import { g as getWorkerState } from '../chunks/utils.DvEY5TfP.js';
import { g as globalExpect } from '../chunks/vi.CyIUVSoU.js';
import '@vitest/expect';
import '../chunks/rpc.BytlcPfC.js';
import '@vitest/utils/timers';
import '../chunks/index.0kCJoeWi.js';
import '../chunks/test.w5HLbjmU.js';
import '@vitest/utils/helpers';
import '../chunks/benchmark.B3N2zMcH.js';
import '@vitest/runner/utils';
import '@vitest/utils/error';
import 'pathe';
import '../chunks/coverage.D_JHT54q.js';
import '@vitest/snapshot';
import '../chunks/evaluatedModules.Dg1zASAC.js';
import 'vite/module-runner';
import 'expect-type';
import 'node:url';
import '@vitest/spy';
import '@vitest/utils/offset';
import '@vitest/utils/source-map';
import '../chunks/_commonjsHelpers.BFTU3MAI.js';
import '../chunks/date.Bq6ZW5rf.js';
async function run(method, files, config, moduleRunner) {
const workerState = getWorkerState();
await setupCommonEnv(config);
Object.defineProperty(globalThis, "__vitest_index__", {
value: index,
enumerable: false
});
const viteEnvironment = workerState.environment.viteEnvironment || workerState.environment.name;
globalExpect.setState({ environment: workerState.environment.name });
if (viteEnvironment === "client") {
const _require = createRequire(import.meta.url);
// always mock "required" `css` files, because we cannot process them
_require.extensions[".css"] = resolveCss;
_require.extensions[".scss"] = resolveCss;
_require.extensions[".sass"] = resolveCss;
_require.extensions[".less"] = resolveCss;
// since we are using Vite, we can assume how these will be resolved
KNOWN_ASSET_TYPES.forEach((type) => {
_require.extensions[`.${type}`] = resolveAsset;
});
process.env.SSR = "";
} else process.env.SSR = "1";
// @ts-expect-error not typed global for patched timers
globalThis.__vitest_required__ = {
util,
timers,
timersPromises
};
await startCoverageInsideWorker(config.coverage, moduleRunner, { isolate: false });
if (config.chaiConfig) setupChaiConfig(config.chaiConfig);
const [runner, snapshotEnvironment] = await Promise.all([resolveTestRunner(config, moduleRunner), resolveSnapshotEnvironment(config, moduleRunner)]);
config.snapshotOptions.snapshotEnvironment = snapshotEnvironment;
runner.getWorkerContext = void 0;
workerState.onCancel((reason) => {
closeInspector(config);
runner.cancel?.(reason);
});
workerState.durations.prepare = performance.now() - workerState.durations.prepare;
const { vi } = index;
for (const file of files) {
workerState.filepath = file.filepath;
if (method === "run") await startTests([file], runner);
else await collectTests([file], runner);
// reset after tests, because user might call `vi.setConfig` in setupFile
vi.resetConfig();
// mocks should not affect different files
vi.restoreAllMocks();
}
await stopCoverageInsideWorker(config.coverage, moduleRunner, { isolate: false });
}
function resolveCss(mod) {
mod.exports = "";
}
function resolveAsset(mod, url) {
mod.exports = url;
}
export { run };
@@ -0,0 +1,253 @@
/**
Typings for primary entry point, Node.js specific typings can be found in index.d.ts
*/
import type {ReadableStream as WebReadableStream} from 'node:stream/web';
import type {ITokenizer, AnyWebByteStream} from 'strtok3';
/**
Either the Node.js ReadableStream or the `lib.dom.d.ts` ReadableStream.
Related issue: https://github.com/DefinitelyTyped/DefinitelyTyped/pull/60377
*/
export type AnyWebReadableStream<G> = WebReadableStream<G> | ReadableStream<G>;
export type FileTypeResult = {
/**
One of the supported [file types](https://github.com/sindresorhus/file-type#supported-file-types).
*/
readonly ext: string;
/**
The detected [MIME type](https://en.wikipedia.org/wiki/Internet_media_type).
*/
readonly mime: string;
};
/**
Detect the file type of a `Uint8Array` or `ArrayBuffer`.
The file type is detected by checking the [magic number](https://en.wikipedia.org/wiki/Magic_number_(programming)#Magic_numbers_in_files) of the buffer.
If file access is available, it is recommended to use `.fromFile()` instead.
@param buffer - An Uint8Array or ArrayBuffer representing file data. It works best if the buffer contains the entire file. It may work with a smaller portion as well.
@param options - Options to override default behavior.
@returns The detected file type, or `undefined` when there is no match.
*/
export function fileTypeFromBuffer(buffer: Uint8Array | ArrayBuffer, options?: FileTypeOptions): Promise<FileTypeResult | undefined>;
/**
Detect the file type of a [web `ReadableStream`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream).
The file type is detected by checking the [magic number](https://en.wikipedia.org/wiki/Magic_number_(programming)#Magic_numbers_in_files) of the buffer.
@param stream - A [web `ReadableStream`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream) streaming a file to examine.
@param options - Options to override default behavior.
@returns A `Promise` for an object with the detected file type, or `undefined` when there is no match.
*/
export function fileTypeFromStream(stream: AnyWebByteStream, options?: FileTypeOptions): Promise<FileTypeResult | undefined>;
/**
Detect the file type from an [`ITokenizer`](https://github.com/Borewit/strtok3#tokenizer) source.
This method is used internally, but can also be used for a special "tokenizer" reader.
A tokenizer propagates the internal read functions, allowing alternative transport mechanisms, to access files, to be implemented and used.
@param tokenizer - File source implementing the tokenizer interface.
@param options - Options to override default behavior.
@returns The detected file type, or `undefined` when there is no match.
An example is [`@tokenizer/http`](https://github.com/Borewit/tokenizer-http), which requests data using [HTTP-range-requests](https://developer.mozilla.org/en-US/docs/Web/HTTP/Range_requests). A difference with a conventional stream and the [*tokenizer*](https://github.com/Borewit/strtok3#tokenizer), is that it is able to *ignore* (seek, fast-forward) in the stream. For example, you may only need and read the first 6 bytes, and the last 128 bytes, which may be an advantage in case reading the entire file would take longer.
@example
```
import {makeTokenizer} from '@tokenizer/http';
import {fileTypeFromTokenizer} from 'file-type';
const audioTrackUrl = 'https://test-audio.netlify.com/Various%20Artists%20-%202009%20-%20netBloc%20Vol%2024_%20tiuqottigeloot%20%5BMP3-V2%5D/01%20-%20Diablo%20Swing%20Orchestra%20-%20Heroines.mp3';
const httpTokenizer = await makeTokenizer(audioTrackUrl);
const fileType = await fileTypeFromTokenizer(httpTokenizer);
console.log(fileType);
//=> {ext: 'mp3', mime: 'audio/mpeg'}
```
*/
export function fileTypeFromTokenizer(tokenizer: ITokenizer, options?: FileTypeOptions): Promise<FileTypeResult | undefined>;
/**
Supported file extensions.
*/
export const supportedExtensions: ReadonlySet<string>;
/**
Supported MIME types.
*/
export const supportedMimeTypes: ReadonlySet<string>;
export type StreamOptions = {
/**
The default sample size in bytes.
@default 4100
*/
readonly sampleSize?: number;
};
/**
Detect the file type of a [`Blob`](https://nodejs.org/api/buffer.html#class-blob) or [`File`](https://developer.mozilla.org/en-US/docs/Web/API/File).
@param blob - The [`Blob`](https://nodejs.org/api/buffer.html#class-blob) used for file detection.
@param options - Options to override default behavior.
@returns The detected file type, or `undefined` when there is no match.
@example
```
import {fileTypeFromBlob} from 'file-type';
const blob = new Blob(['<?xml version="1.0" encoding="ISO-8859-1" ?>'], {
type: 'text/plain',
endings: 'native'
});
console.log(await fileTypeFromBlob(blob));
//=> {ext: 'txt', mime: 'text/plain'}
```
*/
export declare function fileTypeFromBlob(blob: Blob, options?: FileTypeOptions): Promise<FileTypeResult | undefined>;
/**
A custom file type detector.
Custom file type detectors are plugins designed to extend the default detection capabilities.
They allow support for uncommon file types, non-binary formats, or customized detection behavior.
Detectors can be added via the constructor options or by modifying `FileTypeParser#detectors` directly.
Detectors provided through the constructor are executed before the default ones.
Detectors can be added via the constructor options or by directly modifying `FileTypeParser#detectors`.
### Example adding a detector
```js
import {FileTypeParser} from 'file-type';
import {detectXml} from '@file-type/xml';
const parser = new FileTypeParser({customDetectors: [detectXml]});
const fileType = await parser.fromFile('sample.kml');
console.log(fileType);
```
### Available-third party file-type detectors
- [@file-type/xml](https://github.com/Borewit/file-type-xml): Detects common XML file types, such as GLM, KML, MusicXML, RSS, SVG, and XHTML
### Detector execution flow
If a detector returns `undefined`, the following rules apply:
1. **No Tokenizer Interaction**: If the detector does not modify the tokenizer's position, the next detector in the sequence is executed.
2. **Tokenizer Interaction**: If the detector modifies the tokenizer's position (`tokenizer.position` is advanced), no further detectors are executed. In this case, the file type remains `undefined`, as subsequent detectors cannot evaluate the content. This is an exceptional scenario, as it prevents any other detectors from determining the file type.
### Example writing a custom detector
Below is an example of a custom detector array. This can be passed to the `FileTypeParser` via the `fileTypeOptions` argument.
```
import {FileTypeParser} from 'file-type';
const customDetectors = [
async tokenizer => {
const unicornHeader = [85, 78, 73, 67, 79, 82, 78]; // "UNICORN" in ASCII decimal
const buffer = new Uint8Array(unicornHeader.length);
await tokenizer.peekBuffer(buffer, {length: unicornHeader.length, mayBeLess: true});
if (unicornHeader.every((value, index) => value === buffer[index])) {
return {ext: 'unicorn', mime: 'application/unicorn'};
}
return undefined;
},
];
const buffer = new Uint8Array([85, 78, 73, 67, 79, 82, 78]);
const parser = new FileTypeParser({customDetectors});
const fileType = await parser.fromBuffer(buffer);
console.log(fileType); // {ext: 'unicorn', mime: 'application/unicorn'}
```
@param tokenizer - The [tokenizer](https://github.com/Borewit/strtok3#tokenizer) used to read file content.
@param fileType - The file type detected by standard or previous custom detectors, or `undefined` if no match is found.
@returns The detected file type, or `undefined` if no match is found.
*/
export type Detector = {
id: string;
detect: (tokenizer: ITokenizer, fileType?: FileTypeResult) => Promise<FileTypeResult | undefined>;
};
export type FileTypeOptions = {
customDetectors?: Iterable<Detector>;
/**
Specifies the byte tolerance for locating the first MPEG audio frame (e.g. `.mp1`, `.mp2`, `.mp3`, `.aac`).
Allows detection to handle slight sync offsets between the expected and actual frame start. Common in malformed or incorrectly muxed files, which, while technically invalid, do occur in the wild.
A tolerance of 10 bytes covers most cases.
@default 0
*/
mpegOffsetTolerance?: number;
};
export declare class TokenizerPositionError extends Error {
constructor(message?: string);
}
export type AnyWebReadableByteStreamWithFileType = AnyWebReadableStream<Uint8Array> & {
readonly fileType?: FileTypeResult;
};
/**
Workaround for using `bundler` as the module-resolution in TypeScript.
*/
export function fileTypeFromFile(filePath: string, options?: {customDetectors?: Iterable<Detector>}): Promise<FileTypeResult | undefined>;
/**
Returns a `Promise` which resolves to the original readable stream argument, but with an added `fileType` property, which is an object like the one returned from `fileTypeFromFile()`.
This method can be handy to put in a stream pipeline, but it comes with a price. Internally `stream()` builds up a buffer of `sampleSize` bytes, used as a sample, to determine the file type. The sample size impacts the file detection resolution. A smaller sample size will result in lower probability of the best file type detection.
*/
export function fileTypeStream(webStream: AnyWebReadableStream<Uint8Array>, options?: StreamOptions): Promise<AnyWebReadableByteStreamWithFileType>;
export declare class FileTypeParser {
/**
File type detectors.
Initialized with a single entry holding the built-in detector function.
*/
detectors: Detector[];
constructor(options?: {customDetectors?: Iterable<Detector>; signal?: AbortSignal});
/**
Works the same way as {@link fileTypeFromBuffer}, additionally taking into account custom detectors (if any were provided to the constructor).
*/
fromBuffer(buffer: Uint8Array | ArrayBuffer): Promise<FileTypeResult | undefined>;
/**
Works the same way as {@link fileTypeFromTokenizer}, additionally taking into account custom detectors (if any were provided to the constructor).
*/
fromTokenizer(tokenizer: ITokenizer): Promise<FileTypeResult | undefined>;
/**
Works the same way as {@link fileTypeFromBlob}, additionally taking into account custom detectors (if any were provided to the constructor).
*/
fromBlob(blob: Blob): Promise<FileTypeResult | undefined>;
/**
Works the same way as {@link fileTypeStream}, additionally taking into account custom detectors (if any were provided to the constructor).
*/
toDetectionStream(webStream: AnyWebReadableStream<Uint8Array>, options?: StreamOptions): Promise<AnyWebReadableByteStreamWithFileType>;
}
@@ -0,0 +1,36 @@
import {useEffectEvent as $8ae05eaa5c114e9c$export$7f54fc3180508a52} from "./useEffectEvent.mjs";
import {useRef as $8rM3G$useRef, useEffect as $8rM3G$useEffect} from "react";
/*
* Copyright 2023 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 $99facab73266f662$export$5add1d006293d136(ref, initialValue, onReset) {
let resetValue = (0, $8rM3G$useRef)(initialValue);
let handleReset = (0, $8ae05eaa5c114e9c$export$7f54fc3180508a52)(()=>{
if (onReset) onReset(resetValue.current);
});
(0, $8rM3G$useEffect)(()=>{
var _ref_current;
let form = ref === null || ref === void 0 ? void 0 : (_ref_current = ref.current) === null || _ref_current === void 0 ? void 0 : _ref_current.form;
form === null || form === void 0 ? void 0 : form.addEventListener('reset', handleReset);
return ()=>{
form === null || form === void 0 ? void 0 : form.removeEventListener('reset', handleReset);
};
}, [
ref,
handleReset
]);
}
export {$99facab73266f662$export$5add1d006293d136 as useFormReset};
//# sourceMappingURL=useFormReset.module.js.map
@@ -0,0 +1,7 @@
'use strict';
if (process.env.NODE_ENV === 'production') {
module.exports = require('./cjs/react-refresh-babel.production.js');
} else {
module.exports = require('./cjs/react-refresh-babel.development.js');
}
@@ -0,0 +1,29 @@
import baseExtremum from './_baseExtremum.js';
import baseLt from './_baseLt.js';
import identity from './identity.js';
/**
* Computes the minimum value of `array`. If `array` is empty or falsey,
* `undefined` is returned.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Math
* @param {Array} array The array to iterate over.
* @returns {*} Returns the minimum value.
* @example
*
* _.min([4, 2, 8, 6]);
* // => 2
*
* _.min([]);
* // => undefined
*/
function min(array) {
return (array && array.length)
? baseExtremum(array, identity, baseLt)
: undefined;
}
export default min;
@@ -0,0 +1 @@
{"version":3,"file":"extractFormValues.d.ts","sourceRoot":"","sources":["../../src/utils/extractFormValues.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,OAAO,UAAU,iBAAiB,CACvC,CAAC,SAAS,MAAM,EAChB,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACjC,WAAW,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,2BAwB9B"}
@@ -0,0 +1,11 @@
/**
* @import {Options, State} from 'mdast-util-to-markdown'
*/
/**
* @param {State} state
* @returns {Exclude<Options['quote'], null | undefined>}
*/
export function checkQuote(state: State): Exclude<Options["quote"], null | undefined>;
import type { State } from 'mdast-util-to-markdown';
import type { Options } from 'mdast-util-to-markdown';
//# sourceMappingURL=check-quote.d.ts.map
@@ -0,0 +1,38 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _asyncToGenerator;
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg);
var value = info.value;
} catch (error) {
reject(error);
return;
}
if (info.done) {
resolve(value);
} else {
Promise.resolve(value).then(_next, _throw);
}
}
function _asyncToGenerator(fn) {
return function () {
var self = this,
args = arguments;
return new Promise(function (resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(undefined);
});
};
}
//# sourceMappingURL=asyncToGenerator.js.map
@@ -0,0 +1,42 @@
import baseClone from './_baseClone.js';
/** Used to compose bitmasks for cloning. */
var CLONE_SYMBOLS_FLAG = 4;
/**
* This method is like `_.clone` except that it accepts `customizer` which
* is invoked to produce the cloned value. If `customizer` returns `undefined`,
* cloning is handled by the method instead. The `customizer` is invoked with
* up to four arguments; (value [, index|key, object, stack]).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to clone.
* @param {Function} [customizer] The function to customize cloning.
* @returns {*} Returns the cloned value.
* @see _.cloneDeepWith
* @example
*
* function customizer(value) {
* if (_.isElement(value)) {
* return value.cloneNode(false);
* }
* }
*
* var el = _.cloneWith(document.body, customizer);
*
* console.log(el === document.body);
* // => false
* console.log(el.nodeName);
* // => 'BODY'
* console.log(el.childNodes.length);
* // => 0
*/
function cloneWith(value, customizer) {
customizer = typeof customizer == 'function' ? customizer : undefined;
return baseClone(value, CLONE_SYMBOLS_FLAG, customizer);
}
export default cloneWith;
@@ -0,0 +1,15 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _isNativeFunction;
function _isNativeFunction(fn) {
try {
return Function.toString.call(fn).indexOf("[native code]") !== -1;
} catch (_e) {
return typeof fn === "function";
}
}
//# sourceMappingURL=isNativeFunction.js.map
@@ -0,0 +1,3 @@
import CryptoJS = require("./index");
export = CryptoJS.mode.CTRGladman;
@@ -0,0 +1,25 @@
/** Used as references for various `Number` constants. */
var MAX_SAFE_INTEGER = 9007199254740991;
/** Used to detect unsigned integer values. */
var reIsUint = /^(?:0|[1-9]\d*)$/;
/**
* Checks if `value` is a valid array-like index.
*
* @private
* @param {*} value The value to check.
* @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
*/
function isIndex(value, length) {
var type = typeof value;
length = length == null ? MAX_SAFE_INTEGER : length;
return !!length &&
(type == 'number' ||
(type != 'symbol' && reIsUint.test(value))) &&
(value > -1 && value % 1 == 0 && value < length);
}
module.exports = isIndex;
@@ -0,0 +1,43 @@
The ISC License
Copyright (c) Isaac Z. Schlueter and Contributors
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
----
This library bundles a version of the `fs.realpath` and `fs.realpathSync`
methods from Node.js v0.10 under the terms of the Node.js MIT license.
Node's license follows, also included at the header of `old.js` which contains
the licensed code:
Copyright Joyent, Inc. and other Node contributors.
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,35 @@
import type { TSchema, SchemaOptions } from '../schema/index.mjs';
import type { Evaluate, Ensure } from '../helpers/index.mjs';
import type { TMappedResult } from '../mapped/index.mjs';
import { type TReadonlyOptional } from '../readonly-optional/index.mjs';
import { type TComputed } from '../computed/index.mjs';
import { type TOptional } from '../optional/index.mjs';
import { type TReadonly } from '../readonly/index.mjs';
import { type TRecursive } from '../recursive/index.mjs';
import { type TObject, type TProperties } from '../object/index.mjs';
import { type TIntersect } from '../intersect/index.mjs';
import { type TUnion } from '../union/index.mjs';
import { type TRef } from '../ref/index.mjs';
import { type TBigInt } from '../bigint/index.mjs';
import { type TBoolean } from '../boolean/index.mjs';
import { type TInteger } from '../integer/index.mjs';
import { type TLiteral } from '../literal/index.mjs';
import { type TNull } from '../null/index.mjs';
import { type TNumber } from '../number/index.mjs';
import { type TString } from '../string/index.mjs';
import { type TSymbol } from '../symbol/index.mjs';
import { type TUndefined } from '../undefined/index.mjs';
import { type TRequiredFromMappedResult } from './required-from-mapped-result.mjs';
type TFromComputed<Target extends string, Parameters extends TSchema[]> = Ensure<TComputed<'Required', [TComputed<Target, Parameters>]>>;
type TFromRef<Ref extends string> = Ensure<TComputed<'Required', [TRef<Ref>]>>;
type TFromProperties<Properties extends TProperties> = Evaluate<{
[K in keyof Properties]: Properties[K] extends (TReadonlyOptional<infer S>) ? TReadonly<S> : Properties[K] extends (TReadonly<infer S>) ? TReadonly<S> : Properties[K] extends (TOptional<infer S>) ? S : Properties[K];
}>;
type TFromObject<Type extends TObject, Properties extends TProperties = Type['properties']> = Ensure<TObject<(TFromProperties<Properties>)>>;
type TFromRest<Types extends TSchema[], Result extends TSchema[] = []> = (Types extends [infer L extends TSchema, ...infer R extends TSchema[]] ? TFromRest<R, [...Result, TRequired<L>]> : Result);
export type TRequired<Type extends TSchema> = (Type extends TRecursive<infer Type extends TSchema> ? TRecursive<TRequired<Type>> : Type extends TComputed<infer Target extends string, infer Parameters extends TSchema[]> ? TFromComputed<Target, Parameters> : Type extends TRef<infer Ref extends string> ? TFromRef<Ref> : Type extends TIntersect<infer Types extends TSchema[]> ? TIntersect<TFromRest<Types>> : Type extends TUnion<infer Types extends TSchema[]> ? TUnion<TFromRest<Types>> : Type extends TObject<infer Properties extends TProperties> ? TFromObject<TObject<Properties>> : Type extends TBigInt ? Type : Type extends TBoolean ? Type : Type extends TInteger ? Type : Type extends TLiteral ? Type : Type extends TNull ? Type : Type extends TNumber ? Type : Type extends TString ? Type : Type extends TSymbol ? Type : Type extends TUndefined ? Type : TObject<{}>);
/** `[Json]` Constructs a type where all properties are required */
export declare function Required<MappedResult extends TMappedResult>(type: MappedResult, options?: SchemaOptions): TRequiredFromMappedResult<MappedResult>;
/** `[Json]` Constructs a type where all properties are required */
export declare function Required<Type extends TSchema>(type: Type, options?: SchemaOptions): TRequired<Type>;
export {};
@@ -0,0 +1,19 @@
Copyright OpenJS Foundation and other contributors, <www.openjsf.org>
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,338 @@
// THIS FILE IS AUTO GENERATED
import type { IconType } from '../lib/index'
export declare const TiAdjustBrightness: IconType;
export declare const TiAdjustContrast: IconType;
export declare const TiAnchorOutline: IconType;
export declare const TiAnchor: IconType;
export declare const TiArchive: IconType;
export declare const TiArrowBackOutline: IconType;
export declare const TiArrowBack: IconType;
export declare const TiArrowDownOutline: IconType;
export declare const TiArrowDownThick: IconType;
export declare const TiArrowDown: IconType;
export declare const TiArrowForwardOutline: IconType;
export declare const TiArrowForward: IconType;
export declare const TiArrowLeftOutline: IconType;
export declare const TiArrowLeftThick: IconType;
export declare const TiArrowLeft: IconType;
export declare const TiArrowLoopOutline: IconType;
export declare const TiArrowLoop: IconType;
export declare const TiArrowMaximiseOutline: IconType;
export declare const TiArrowMaximise: IconType;
export declare const TiArrowMinimiseOutline: IconType;
export declare const TiArrowMinimise: IconType;
export declare const TiArrowMoveOutline: IconType;
export declare const TiArrowMove: IconType;
export declare const TiArrowRepeatOutline: IconType;
export declare const TiArrowRepeat: IconType;
export declare const TiArrowRightOutline: IconType;
export declare const TiArrowRightThick: IconType;
export declare const TiArrowRight: IconType;
export declare const TiArrowShuffle: IconType;
export declare const TiArrowSortedDown: IconType;
export declare const TiArrowSortedUp: IconType;
export declare const TiArrowSyncOutline: IconType;
export declare const TiArrowSync: IconType;
export declare const TiArrowUnsorted: IconType;
export declare const TiArrowUpOutline: IconType;
export declare const TiArrowUpThick: IconType;
export declare const TiArrowUp: IconType;
export declare const TiAt: IconType;
export declare const TiAttachmentOutline: IconType;
export declare const TiAttachment: IconType;
export declare const TiBackspaceOutline: IconType;
export declare const TiBackspace: IconType;
export declare const TiBatteryCharge: IconType;
export declare const TiBatteryFull: IconType;
export declare const TiBatteryHigh: IconType;
export declare const TiBatteryLow: IconType;
export declare const TiBatteryMid: IconType;
export declare const TiBeaker: IconType;
export declare const TiBeer: IconType;
export declare const TiBell: IconType;
export declare const TiBook: IconType;
export declare const TiBookmark: IconType;
export declare const TiBriefcase: IconType;
export declare const TiBrush: IconType;
export declare const TiBusinessCard: IconType;
export declare const TiCalculator: IconType;
export declare const TiCalendarOutline: IconType;
export declare const TiCalendar: IconType;
export declare const TiCameraOutline: IconType;
export declare const TiCamera: IconType;
export declare const TiCancelOutline: IconType;
export declare const TiCancel: IconType;
export declare const TiChartAreaOutline: IconType;
export declare const TiChartArea: IconType;
export declare const TiChartBarOutline: IconType;
export declare const TiChartBar: IconType;
export declare const TiChartLineOutline: IconType;
export declare const TiChartLine: IconType;
export declare const TiChartPieOutline: IconType;
export declare const TiChartPie: IconType;
export declare const TiChevronLeftOutline: IconType;
export declare const TiChevronLeft: IconType;
export declare const TiChevronRightOutline: IconType;
export declare const TiChevronRight: IconType;
export declare const TiClipboard: IconType;
export declare const TiCloudStorageOutline: IconType;
export declare const TiCloudStorage: IconType;
export declare const TiCodeOutline: IconType;
export declare const TiCode: IconType;
export declare const TiCoffee: IconType;
export declare const TiCogOutline: IconType;
export declare const TiCog: IconType;
export declare const TiCompass: IconType;
export declare const TiContacts: IconType;
export declare const TiCreditCard: IconType;
export declare const TiCss3: IconType;
export declare const TiDatabase: IconType;
export declare const TiDeleteOutline: IconType;
export declare const TiDelete: IconType;
export declare const TiDeviceDesktop: IconType;
export declare const TiDeviceLaptop: IconType;
export declare const TiDevicePhone: IconType;
export declare const TiDeviceTablet: IconType;
export declare const TiDirections: IconType;
export declare const TiDivideOutline: IconType;
export declare const TiDivide: IconType;
export declare const TiDocumentAdd: IconType;
export declare const TiDocumentDelete: IconType;
export declare const TiDocumentText: IconType;
export declare const TiDocument: IconType;
export declare const TiDownloadOutline: IconType;
export declare const TiDownload: IconType;
export declare const TiDropbox: IconType;
export declare const TiEdit: IconType;
export declare const TiEjectOutline: IconType;
export declare const TiEject: IconType;
export declare const TiEqualsOutline: IconType;
export declare const TiEquals: IconType;
export declare const TiExportOutline: IconType;
export declare const TiExport: IconType;
export declare const TiEyeOutline: IconType;
export declare const TiEye: IconType;
export declare const TiFeather: IconType;
export declare const TiFilm: IconType;
export declare const TiFilter: IconType;
export declare const TiFlagOutline: IconType;
export declare const TiFlag: IconType;
export declare const TiFlashOutline: IconType;
export declare const TiFlash: IconType;
export declare const TiFlowChildren: IconType;
export declare const TiFlowMerge: IconType;
export declare const TiFlowParallel: IconType;
export declare const TiFlowSwitch: IconType;
export declare const TiFolderAdd: IconType;
export declare const TiFolderDelete: IconType;
export declare const TiFolderOpen: IconType;
export declare const TiFolder: IconType;
export declare const TiGift: IconType;
export declare const TiGlobeOutline: IconType;
export declare const TiGlobe: IconType;
export declare const TiGroupOutline: IconType;
export declare const TiGroup: IconType;
export declare const TiHeadphones: IconType;
export declare const TiHeartFullOutline: IconType;
export declare const TiHeartHalfOutline: IconType;
export declare const TiHeartOutline: IconType;
export declare const TiHeart: IconType;
export declare const TiHomeOutline: IconType;
export declare const TiHome: IconType;
export declare const TiHtml5: IconType;
export declare const TiImageOutline: IconType;
export declare const TiImage: IconType;
export declare const TiInfinityOutline: IconType;
export declare const TiInfinity: IconType;
export declare const TiInfoLargeOutline: IconType;
export declare const TiInfoLarge: IconType;
export declare const TiInfoOutline: IconType;
export declare const TiInfo: IconType;
export declare const TiInputCheckedOutline: IconType;
export declare const TiInputChecked: IconType;
export declare const TiKeyOutline: IconType;
export declare const TiKey: IconType;
export declare const TiKeyboard: IconType;
export declare const TiLeaf: IconType;
export declare const TiLightbulb: IconType;
export declare const TiLinkOutline: IconType;
export declare const TiLink: IconType;
export declare const TiLocationArrowOutline: IconType;
export declare const TiLocationArrow: IconType;
export declare const TiLocationOutline: IconType;
export declare const TiLocation: IconType;
export declare const TiLockClosedOutline: IconType;
export declare const TiLockClosed: IconType;
export declare const TiLockOpenOutline: IconType;
export declare const TiLockOpen: IconType;
export declare const TiMail: IconType;
export declare const TiMap: IconType;
export declare const TiMediaEjectOutline: IconType;
export declare const TiMediaEject: IconType;
export declare const TiMediaFastForwardOutline: IconType;
export declare const TiMediaFastForward: IconType;
export declare const TiMediaPauseOutline: IconType;
export declare const TiMediaPause: IconType;
export declare const TiMediaPlayOutline: IconType;
export declare const TiMediaPlayReverseOutline: IconType;
export declare const TiMediaPlayReverse: IconType;
export declare const TiMediaPlay: IconType;
export declare const TiMediaRecordOutline: IconType;
export declare const TiMediaRecord: IconType;
export declare const TiMediaRewindOutline: IconType;
export declare const TiMediaRewind: IconType;
export declare const TiMediaStopOutline: IconType;
export declare const TiMediaStop: IconType;
export declare const TiMessageTyping: IconType;
export declare const TiMessage: IconType;
export declare const TiMessages: IconType;
export declare const TiMicrophoneOutline: IconType;
export declare const TiMicrophone: IconType;
export declare const TiMinusOutline: IconType;
export declare const TiMinus: IconType;
export declare const TiMortarBoard: IconType;
export declare const TiNews: IconType;
export declare const TiNotesOutline: IconType;
export declare const TiNotes: IconType;
export declare const TiPen: IconType;
export declare const TiPencil: IconType;
export declare const TiPhoneOutline: IconType;
export declare const TiPhone: IconType;
export declare const TiPiOutline: IconType;
export declare const TiPi: IconType;
export declare const TiPinOutline: IconType;
export declare const TiPin: IconType;
export declare const TiPipette: IconType;
export declare const TiPlaneOutline: IconType;
export declare const TiPlane: IconType;
export declare const TiPlug: IconType;
export declare const TiPlusOutline: IconType;
export declare const TiPlus: IconType;
export declare const TiPointOfInterestOutline: IconType;
export declare const TiPointOfInterest: IconType;
export declare const TiPowerOutline: IconType;
export declare const TiPower: IconType;
export declare const TiPrinter: IconType;
export declare const TiPuzzleOutline: IconType;
export declare const TiPuzzle: IconType;
export declare const TiRadarOutline: IconType;
export declare const TiRadar: IconType;
export declare const TiRefreshOutline: IconType;
export declare const TiRefresh: IconType;
export declare const TiRssOutline: IconType;
export declare const TiRss: IconType;
export declare const TiScissorsOutline: IconType;
export declare const TiScissors: IconType;
export declare const TiShoppingBag: IconType;
export declare const TiShoppingCart: IconType;
export declare const TiSocialAtCircular: IconType;
export declare const TiSocialDribbbleCircular: IconType;
export declare const TiSocialDribbble: IconType;
export declare const TiSocialFacebookCircular: IconType;
export declare const TiSocialFacebook: IconType;
export declare const TiSocialFlickrCircular: IconType;
export declare const TiSocialFlickr: IconType;
export declare const TiSocialGithubCircular: IconType;
export declare const TiSocialGithub: IconType;
export declare const TiSocialGooglePlusCircular: IconType;
export declare const TiSocialGooglePlus: IconType;
export declare const TiSocialInstagramCircular: IconType;
export declare const TiSocialInstagram: IconType;
export declare const TiSocialLastFmCircular: IconType;
export declare const TiSocialLastFm: IconType;
export declare const TiSocialLinkedinCircular: IconType;
export declare const TiSocialLinkedin: IconType;
export declare const TiSocialPinterestCircular: IconType;
export declare const TiSocialPinterest: IconType;
export declare const TiSocialSkypeOutline: IconType;
export declare const TiSocialSkype: IconType;
export declare const TiSocialTumblerCircular: IconType;
export declare const TiSocialTumbler: IconType;
export declare const TiSocialTwitterCircular: IconType;
export declare const TiSocialTwitter: IconType;
export declare const TiSocialVimeoCircular: IconType;
export declare const TiSocialVimeo: IconType;
export declare const TiSocialYoutubeCircular: IconType;
export declare const TiSocialYoutube: IconType;
export declare const TiSortAlphabeticallyOutline: IconType;
export declare const TiSortAlphabetically: IconType;
export declare const TiSortNumericallyOutline: IconType;
export declare const TiSortNumerically: IconType;
export declare const TiSpannerOutline: IconType;
export declare const TiSpanner: IconType;
export declare const TiSpiral: IconType;
export declare const TiStarFullOutline: IconType;
export declare const TiStarHalfOutline: IconType;
export declare const TiStarHalf: IconType;
export declare const TiStarOutline: IconType;
export declare const TiStar: IconType;
export declare const TiStarburstOutline: IconType;
export declare const TiStarburst: IconType;
export declare const TiStopwatch: IconType;
export declare const TiSupport: IconType;
export declare const TiTabsOutline: IconType;
export declare const TiTag: IconType;
export declare const TiTags: IconType;
export declare const TiThLargeOutline: IconType;
export declare const TiThLarge: IconType;
export declare const TiThListOutline: IconType;
export declare const TiThList: IconType;
export declare const TiThMenuOutline: IconType;
export declare const TiThMenu: IconType;
export declare const TiThSmallOutline: IconType;
export declare const TiThSmall: IconType;
export declare const TiThermometer: IconType;
export declare const TiThumbsDown: IconType;
export declare const TiThumbsOk: IconType;
export declare const TiThumbsUp: IconType;
export declare const TiTickOutline: IconType;
export declare const TiTick: IconType;
export declare const TiTicket: IconType;
export declare const TiTime: IconType;
export declare const TiTimesOutline: IconType;
export declare const TiTimes: IconType;
export declare const TiTrash: IconType;
export declare const TiTree: IconType;
export declare const TiUploadOutline: IconType;
export declare const TiUpload: IconType;
export declare const TiUserAddOutline: IconType;
export declare const TiUserAdd: IconType;
export declare const TiUserDeleteOutline: IconType;
export declare const TiUserDelete: IconType;
export declare const TiUserOutline: IconType;
export declare const TiUser: IconType;
export declare const TiVendorAndroid: IconType;
export declare const TiVendorApple: IconType;
export declare const TiVendorMicrosoft: IconType;
export declare const TiVideoOutline: IconType;
export declare const TiVideo: IconType;
export declare const TiVolumeDown: IconType;
export declare const TiVolumeMute: IconType;
export declare const TiVolumeUp: IconType;
export declare const TiVolume: IconType;
export declare const TiWarningOutline: IconType;
export declare const TiWarning: IconType;
export declare const TiWatch: IconType;
export declare const TiWavesOutline: IconType;
export declare const TiWaves: IconType;
export declare const TiWeatherCloudy: IconType;
export declare const TiWeatherDownpour: IconType;
export declare const TiWeatherNight: IconType;
export declare const TiWeatherPartlySunny: IconType;
export declare const TiWeatherShower: IconType;
export declare const TiWeatherSnow: IconType;
export declare const TiWeatherStormy: IconType;
export declare const TiWeatherSunny: IconType;
export declare const TiWeatherWindyCloudy: IconType;
export declare const TiWeatherWindy: IconType;
export declare const TiWiFiOutline: IconType;
export declare const TiWiFi: IconType;
export declare const TiWine: IconType;
export declare const TiWorldOutline: IconType;
export declare const TiWorld: IconType;
export declare const TiZoomInOutline: IconType;
export declare const TiZoomIn: IconType;
export declare const TiZoomOutOutline: IconType;
export declare const TiZoomOut: IconType;
export declare const TiZoomOutline: IconType;
export declare const TiZoom: IconType;
@@ -0,0 +1,995 @@
import type {
Action,
ActionCreatorWithNonInferrablePayload,
ActionCreatorWithOptionalPayload,
ActionCreatorWithPayload,
ActionCreatorWithPreparedPayload,
ActionCreatorWithoutPayload,
ActionReducerMapBuilder,
AsyncThunk,
CaseReducer,
PayloadAction,
PayloadActionCreator,
Reducer,
ReducerCreators,
SerializedError,
SliceCaseReducers,
ThunkDispatch,
UnknownAction,
ValidateSliceCaseReducers,
} from '@reduxjs/toolkit'
import {
asyncThunkCreator,
buildCreateSlice,
configureStore,
createAction,
createAsyncThunk,
createSlice,
isRejected,
} from '@reduxjs/toolkit'
import { castDraft } from 'immer'
describe('type tests', () => {
const counterSlice = createSlice({
name: 'counter',
initialState: 0,
reducers: {
increment: (state: number, action) => state + action.payload,
decrement: (state: number, action) => state - action.payload,
},
})
test('Slice name is strongly typed.', () => {
const uiSlice = createSlice({
name: 'ui',
initialState: 0,
reducers: {
goToNext: (state: number, action) => state + action.payload,
goToPrevious: (state: number, action) => state - action.payload,
},
})
const actionCreators = {
[counterSlice.name]: { ...counterSlice.actions },
[uiSlice.name]: { ...uiSlice.actions },
}
expectTypeOf(counterSlice.actions).toEqualTypeOf(actionCreators.counter)
expectTypeOf(uiSlice.actions).toEqualTypeOf(actionCreators.ui)
expectTypeOf(actionCreators).not.toHaveProperty('anyKey')
})
test("createSlice() infers the returned slice's type.", () => {
const firstAction = createAction<{ count: number }>('FIRST_ACTION')
const slice = createSlice({
name: 'counter',
initialState: 0,
reducers: {
increment: (state: number, action) => state + action.payload,
decrement: (state: number, action) => state - action.payload,
},
extraReducers: (builder) => {
builder.addCase(
firstAction,
(state, action) => state + action.payload.count,
)
},
})
test('Reducer', () => {
expectTypeOf(slice.reducer).toMatchTypeOf<
Reducer<number, PayloadAction>
>()
expectTypeOf(slice.reducer).not.toMatchTypeOf<
Reducer<string, PayloadAction>
>()
})
test('Actions', () => {
slice.actions.increment(1)
slice.actions.decrement(1)
expectTypeOf(slice.actions).not.toHaveProperty('other')
})
})
test('Slice action creator types are inferred.', () => {
const counter = createSlice({
name: 'counter',
initialState: 0,
reducers: {
increment: (state) => state + 1,
decrement: (
state,
{ payload = 1 }: PayloadAction<number | undefined>,
) => state - payload,
multiply: (state, { payload }: PayloadAction<number | number[]>) =>
Array.isArray(payload)
? payload.reduce((acc, val) => acc * val, state)
: state * payload,
addTwo: {
reducer: (s, { payload }: PayloadAction<number>) => s + payload,
prepare: (a: number, b: number) => ({
payload: a + b,
}),
},
},
})
expectTypeOf(
counter.actions.increment,
).toMatchTypeOf<ActionCreatorWithoutPayload>()
counter.actions.increment()
expectTypeOf(counter.actions.decrement).toMatchTypeOf<
ActionCreatorWithOptionalPayload<number | undefined>
>()
counter.actions.decrement()
counter.actions.decrement(2)
expectTypeOf(counter.actions.multiply).toMatchTypeOf<
ActionCreatorWithPayload<number | number[]>
>()
counter.actions.multiply(2)
counter.actions.multiply([2, 3, 4])
expectTypeOf(counter.actions.addTwo).toMatchTypeOf<
ActionCreatorWithPreparedPayload<[number, number], number>
>()
counter.actions.addTwo(1, 2)
expectTypeOf(counter.actions.multiply).parameters.not.toMatchTypeOf<[]>()
expectTypeOf(counter.actions.multiply).parameter(0).not.toBeString()
expectTypeOf(counter.actions.addTwo).parameters.not.toMatchTypeOf<
[number]
>()
expectTypeOf(counter.actions.addTwo).parameters.toEqualTypeOf<
[number, number]
>()
})
test('Slice action creator types properties are strongly typed', () => {
const counter = createSlice({
name: 'counter',
initialState: 0,
reducers: {
increment: (state) => state + 1,
decrement: (state) => state - 1,
multiply: (state, { payload }: PayloadAction<number | number[]>) =>
Array.isArray(payload)
? payload.reduce((acc, val) => acc * val, state)
: state * payload,
},
})
expectTypeOf(
counter.actions.increment.type,
).toEqualTypeOf<'counter/increment'>()
expectTypeOf(
counter.actions.increment().type,
).toEqualTypeOf<'counter/increment'>()
expectTypeOf(
counter.actions.decrement.type,
).toEqualTypeOf<'counter/decrement'>()
expectTypeOf(
counter.actions.decrement().type,
).toEqualTypeOf<'counter/decrement'>()
expectTypeOf(
counter.actions.multiply.type,
).toEqualTypeOf<'counter/multiply'>()
expectTypeOf(
counter.actions.multiply(1).type,
).toEqualTypeOf<'counter/multiply'>()
expectTypeOf(
counter.actions.increment.type,
).not.toMatchTypeOf<'increment'>()
})
test('Slice action creator types are inferred for enhanced reducers.', () => {
const counter = createSlice({
name: 'test',
initialState: { counter: 0, concat: '' },
reducers: {
incrementByStrLen: {
reducer: (state, action: PayloadAction<number>) => {
state.counter += action.payload
},
prepare: (payload: string) => ({
payload: payload.length,
}),
},
concatMetaStrLen: {
reducer: (state, action: PayloadAction<string>) => {
state.concat += action.payload
},
prepare: (payload: string) => ({
payload,
meta: payload.length,
}),
},
},
})
expectTypeOf(
counter.actions.incrementByStrLen('test').type,
).toEqualTypeOf<'test/incrementByStrLen'>()
expectTypeOf(counter.actions.incrementByStrLen('test').payload).toBeNumber()
expectTypeOf(counter.actions.concatMetaStrLen('test').payload).toBeString()
expectTypeOf(counter.actions.concatMetaStrLen('test').meta).toBeNumber()
expectTypeOf(
counter.actions.incrementByStrLen('test').payload,
).not.toBeString()
expectTypeOf(counter.actions.concatMetaStrLen('test').meta).not.toBeString()
})
test('access meta and error from reducer', () => {
const counter = createSlice({
name: 'test',
initialState: { counter: 0, concat: '' },
reducers: {
// case: meta and error not used in reducer
testDefaultMetaAndError: {
reducer(_, action: PayloadAction<number, string>) {},
prepare: (payload: number) => ({
payload,
meta: 'meta' as 'meta',
error: 'error' as 'error',
}),
},
// case: meta and error marked as "unknown" in reducer
testUnknownMetaAndError: {
reducer(
_,
action: PayloadAction<number, string, unknown, unknown>,
) {},
prepare: (payload: number) => ({
payload,
meta: 'meta' as 'meta',
error: 'error' as 'error',
}),
},
// case: meta and error are typed in the reducer as returned by prepare
testMetaAndError: {
reducer(_, action: PayloadAction<number, string, 'meta', 'error'>) {},
prepare: (payload: number) => ({
payload,
meta: 'meta' as 'meta',
error: 'error' as 'error',
}),
},
// case: meta is typed differently in the reducer than returned from prepare
testErroneousMeta: {
reducer(_, action: PayloadAction<number, string, 'meta', 'error'>) {},
// @ts-expect-error
prepare: (payload: number) => ({
payload,
meta: 1,
error: 'error' as 'error',
}),
},
// case: error is typed differently in the reducer than returned from prepare
testErroneousError: {
reducer(_, action: PayloadAction<number, string, 'meta', 'error'>) {},
// @ts-expect-error
prepare: (payload: number) => ({
payload,
meta: 'meta' as 'meta',
error: 1,
}),
},
},
})
})
test('returned case reducer has the correct type', () => {
const counter = createSlice({
name: 'counter',
initialState: 0,
reducers: {
increment(state, action: PayloadAction<number>) {
return state + action.payload
},
decrement: {
reducer(state, action: PayloadAction<number>) {
return state - action.payload
},
prepare(amount: number) {
return { payload: amount }
},
},
},
})
test('Should match positively', () => {
expectTypeOf(counter.caseReducers.increment).toMatchTypeOf<
(state: number, action: PayloadAction<number>) => number | void
>()
})
test('Should match positively for reducers with prepare callback', () => {
expectTypeOf(counter.caseReducers.decrement).toMatchTypeOf<
(state: number, action: PayloadAction<number>) => number | void
>()
})
test("Should not mismatch the payload if it's a simple reducer", () => {
expectTypeOf(counter.caseReducers.increment).not.toMatchTypeOf<
(state: number, action: PayloadAction<string>) => number | void
>()
})
test("Should not mismatch the payload if it's a reducer with a prepare callback", () => {
expectTypeOf(counter.caseReducers.decrement).not.toMatchTypeOf<
(state: number, action: PayloadAction<string>) => number | void
>()
})
test("Should not include entries that don't exist", () => {
expectTypeOf(counter.caseReducers).not.toHaveProperty(
'someThingNonExistent',
)
})
})
test('prepared payload does not match action payload - should cause an error.', () => {
const counter = createSlice({
name: 'counter',
initialState: { counter: 0 },
reducers: {
increment: {
reducer(state, action: PayloadAction<string>) {
state.counter += action.payload.length
},
// @ts-expect-error
prepare(x: string) {
return {
payload: 6,
}
},
},
},
})
})
test('if no Payload Type is specified, accept any payload', () => {
// see https://github.com/reduxjs/redux-toolkit/issues/165
const initialState = {
name: null,
}
const mySlice = createSlice({
name: 'name',
initialState,
reducers: {
setName: (state, action) => {
state.name = action.payload
},
},
})
expectTypeOf(
mySlice.actions.setName,
).toMatchTypeOf<ActionCreatorWithNonInferrablePayload>()
const x = mySlice.actions.setName
mySlice.actions.setName(null)
mySlice.actions.setName('asd')
mySlice.actions.setName(5)
})
test('actions.x.match()', () => {
const mySlice = createSlice({
name: 'name',
initialState: { name: 'test' },
reducers: {
setName: (state, action: PayloadAction<string>) => {
state.name = action.payload
},
},
})
const x: Action<string> = {} as any
if (mySlice.actions.setName.match(x)) {
expectTypeOf(x.type).toEqualTypeOf<'name/setName'>()
expectTypeOf(x.payload).toBeString()
} else {
expectTypeOf(x.type).not.toMatchTypeOf<'name/setName'>()
expectTypeOf(x).not.toHaveProperty('payload')
}
})
test('builder callback for extraReducers', () => {
createSlice({
name: 'test',
initialState: 0,
reducers: {},
extraReducers: (builder) => {
expectTypeOf(builder).toEqualTypeOf<ActionReducerMapBuilder<number>>()
},
})
})
test('wrapping createSlice should be possible', () => {
interface GenericState<T> {
data?: T
status: 'loading' | 'finished' | 'error'
}
const createGenericSlice = <
T,
Reducers extends SliceCaseReducers<GenericState<T>>,
>({
name = '',
initialState,
reducers,
}: {
name: string
initialState: GenericState<T>
reducers: ValidateSliceCaseReducers<GenericState<T>, Reducers>
}) => {
return createSlice({
name,
initialState,
reducers: {
start(state) {
state.status = 'loading'
},
success(state: GenericState<T>, action: PayloadAction<T>) {
state.data = action.payload
state.status = 'finished'
},
...reducers,
},
})
}
const wrappedSlice = createGenericSlice({
name: 'test',
initialState: { status: 'loading' } as GenericState<string>,
reducers: {
magic(state) {
expectTypeOf(state).toEqualTypeOf<GenericState<string>>()
expectTypeOf(state).not.toMatchTypeOf<GenericState<number>>()
state.status = 'finished'
state.data = 'hocus pocus'
},
},
})
expectTypeOf(wrappedSlice.actions.success).toMatchTypeOf<
ActionCreatorWithPayload<string>
>()
expectTypeOf(wrappedSlice.actions.magic).toMatchTypeOf<
ActionCreatorWithoutPayload<string>
>()
})
test('extraReducers', () => {
interface GenericState<T> {
data: T | null
}
function createDataSlice<
T,
Reducers extends SliceCaseReducers<GenericState<T>>,
>(
name: string,
reducers: ValidateSliceCaseReducers<GenericState<T>, Reducers>,
initialState: GenericState<T>,
) {
const doNothing = createAction<undefined>('doNothing')
const setData = createAction<T>('setData')
const slice = createSlice({
name,
initialState,
reducers,
extraReducers: (builder) => {
builder.addCase(doNothing, (state) => {
return { ...state }
})
builder.addCase(setData, (state, { payload }) => {
return {
...state,
data: payload,
}
})
},
})
return { doNothing, setData, slice }
}
})
test('slice selectors', () => {
const sliceWithoutSelectors = createSlice({
name: '',
initialState: '',
reducers: {},
})
expectTypeOf(sliceWithoutSelectors.selectors).not.toHaveProperty('foo')
const sliceWithSelectors = createSlice({
name: 'counter',
initialState: { value: 0 },
reducers: {
increment: (state) => {
state.value += 1
},
},
selectors: {
selectValue: (state) => state.value,
selectMultiply: (state, multiplier: number) => state.value * multiplier,
selectToFixed: Object.assign(
(state: { value: number }) => state.value.toFixed(2),
{ static: true },
),
},
})
const rootState = {
[sliceWithSelectors.reducerPath]: sliceWithSelectors.getInitialState(),
}
const { selectValue, selectMultiply, selectToFixed } =
sliceWithSelectors.selectors
expectTypeOf(selectValue(rootState)).toBeNumber()
expectTypeOf(selectMultiply(rootState, 2)).toBeNumber()
expectTypeOf(selectToFixed(rootState)).toBeString()
expectTypeOf(selectToFixed.unwrapped.static).toBeBoolean()
const nestedState = {
nested: rootState,
}
const nestedSelectors = sliceWithSelectors.getSelectors(
(rootState: typeof nestedState) => rootState.nested.counter,
)
expectTypeOf(nestedSelectors.selectValue(nestedState)).toBeNumber()
expectTypeOf(nestedSelectors.selectMultiply(nestedState, 2)).toBeNumber()
expectTypeOf(nestedSelectors.selectToFixed(nestedState)).toBeString()
})
test('reducer callback', () => {
interface TestState {
foo: string
}
interface TestArg {
test: string
}
interface TestReturned {
payload: string
}
interface TestReject {
cause: string
}
const slice = createSlice({
name: 'test',
initialState: {} as TestState,
reducers: (create) => {
const preTypedAsyncThunk = create.asyncThunk.withTypes<{
rejectValue: TestReject
}>()
// @ts-expect-error
create.asyncThunk<any, any, { state: StoreState }>(() => {})
// @ts-expect-error
create.asyncThunk.withTypes<{
rejectValue: string
dispatch: StoreDispatch
}>()
return {
normalReducer: create.reducer<string>((state, action) => {
expectTypeOf(state).toEqualTypeOf<TestState>()
expectTypeOf(action.payload).toBeString()
}),
optionalReducer: create.reducer<string | undefined>(
(state, action) => {
expectTypeOf(state).toEqualTypeOf<TestState>()
expectTypeOf(action.payload).toEqualTypeOf<string | undefined>()
},
),
noActionReducer: create.reducer((state) => {
expectTypeOf(state).toEqualTypeOf<TestState>()
}),
preparedReducer: create.preparedReducer(
(payload: string) => ({
payload,
meta: 'meta' as const,
error: 'error' as const,
}),
(state, action) => {
expectTypeOf(state).toEqualTypeOf<TestState>()
expectTypeOf(action.payload).toBeString()
expectTypeOf(action.meta).toEqualTypeOf<'meta'>()
expectTypeOf(action.error).toEqualTypeOf<'error'>()
},
),
testInferVoid: create.asyncThunk(() => {}, {
pending(state, action) {
expectTypeOf(state).toEqualTypeOf<TestState>()
expectTypeOf(action.meta.arg).toBeVoid()
},
fulfilled(state, action) {
expectTypeOf(state).toEqualTypeOf<TestState>()
expectTypeOf(action.meta.arg).toBeVoid()
expectTypeOf(action.payload).toBeVoid()
},
rejected(state, action) {
expectTypeOf(state).toEqualTypeOf<TestState>()
expectTypeOf(action.meta.arg).toBeVoid()
expectTypeOf(action.error).toEqualTypeOf<SerializedError>()
},
settled(state, action) {
expectTypeOf(state).toEqualTypeOf<TestState>()
expectTypeOf(action.meta.arg).toBeVoid()
if (isRejected(action)) {
expectTypeOf(action.error).toEqualTypeOf<SerializedError>()
} else {
expectTypeOf(action.payload).toBeVoid()
}
},
}),
testInfer: create.asyncThunk(
function payloadCreator(arg: TestArg, api) {
return Promise.resolve<TestReturned>({ payload: 'foo' })
},
{
pending(state, action) {
expectTypeOf(state).toEqualTypeOf<TestState>()
expectTypeOf(action.meta.arg).toEqualTypeOf<TestArg>()
},
fulfilled(state, action) {
expectTypeOf(state).toEqualTypeOf<TestState>()
expectTypeOf(action.meta.arg).toEqualTypeOf<TestArg>()
expectTypeOf(action.payload).toEqualTypeOf<TestReturned>()
},
rejected(state, action) {
expectTypeOf(state).toEqualTypeOf<TestState>()
expectTypeOf(action.meta.arg).toEqualTypeOf<TestArg>()
expectTypeOf(action.error).toEqualTypeOf<SerializedError>()
},
settled(state, action) {
expectTypeOf(state).toEqualTypeOf<TestState>()
expectTypeOf(action.meta.arg).toEqualTypeOf<TestArg>()
if (isRejected(action)) {
expectTypeOf(action.error).toEqualTypeOf<SerializedError>()
} else {
expectTypeOf(action.payload).toEqualTypeOf<TestReturned>()
}
},
},
),
testExplicitType: create.asyncThunk<
TestReturned,
TestArg,
{
rejectValue: TestReject
}
>(
function payloadCreator(arg, api) {
// here would be a circular reference
expectTypeOf(api.getState()).toBeUnknown()
// here would be a circular reference
expectTypeOf(api.dispatch).toMatchTypeOf<
ThunkDispatch<any, any, any>
>()
// so you need to cast inside instead
const getState = api.getState as () => StoreState
const dispatch = api.dispatch as StoreDispatch
expectTypeOf(arg).toEqualTypeOf<TestArg>()
expectTypeOf(api.rejectWithValue).toMatchTypeOf<
(value: TestReject) => any
>()
return Promise.resolve({ payload: 'foo' })
},
{
pending(state, action) {
expectTypeOf(state).toEqualTypeOf<TestState>()
expectTypeOf(action.meta.arg).toEqualTypeOf<TestArg>()
},
fulfilled(state, action) {
expectTypeOf(state).toEqualTypeOf<TestState>()
expectTypeOf(action.meta.arg).toEqualTypeOf<TestArg>()
expectTypeOf(action.payload).toEqualTypeOf<TestReturned>()
},
rejected(state, action) {
expectTypeOf(state).toEqualTypeOf<TestState>()
expectTypeOf(action.meta.arg).toEqualTypeOf<TestArg>()
expectTypeOf(action.error).toEqualTypeOf<SerializedError>()
expectTypeOf(action.payload).toEqualTypeOf<
TestReject | undefined
>()
},
settled(state, action) {
expectTypeOf(state).toEqualTypeOf<TestState>()
expectTypeOf(action.meta.arg).toEqualTypeOf<TestArg>()
if (isRejected(action)) {
expectTypeOf(action.error).toEqualTypeOf<SerializedError>()
expectTypeOf(action.payload).toEqualTypeOf<
TestReject | undefined
>()
} else {
expectTypeOf(action.payload).toEqualTypeOf<TestReturned>()
}
},
},
),
testPreTyped: preTypedAsyncThunk(
function payloadCreator(arg: TestArg, api) {
expectTypeOf(api.rejectWithValue).toMatchTypeOf<
(value: TestReject) => any
>()
return Promise.resolve<TestReturned>({ payload: 'foo' })
},
{
pending(state, action) {
expectTypeOf(state).toEqualTypeOf<TestState>()
expectTypeOf(action.meta.arg).toEqualTypeOf<TestArg>()
},
fulfilled(state, action) {
expectTypeOf(state).toEqualTypeOf<TestState>()
expectTypeOf(action.meta.arg).toEqualTypeOf<TestArg>()
expectTypeOf(action.payload).toEqualTypeOf<TestReturned>()
},
rejected(state, action) {
expectTypeOf(state).toEqualTypeOf<TestState>()
expectTypeOf(action.meta.arg).toEqualTypeOf<TestArg>()
expectTypeOf(action.error).toEqualTypeOf<SerializedError>()
expectTypeOf(action.payload).toEqualTypeOf<
TestReject | undefined
>()
},
settled(state, action) {
expectTypeOf(state).toEqualTypeOf<TestState>()
expectTypeOf(action.meta.arg).toEqualTypeOf<TestArg>()
if (isRejected(action)) {
expectTypeOf(action.error).toEqualTypeOf<SerializedError>()
expectTypeOf(action.payload).toEqualTypeOf<
TestReject | undefined
>()
} else {
expectTypeOf(action.payload).toEqualTypeOf<TestReturned>()
}
},
},
),
}
},
})
const store = configureStore({ reducer: { test: slice.reducer } })
type StoreState = ReturnType<typeof store.getState>
type StoreDispatch = typeof store.dispatch
expectTypeOf(slice.actions.normalReducer).toMatchTypeOf<
PayloadActionCreator<string>
>()
expectTypeOf(slice.actions.normalReducer).toBeCallableWith('')
expectTypeOf(slice.actions.normalReducer).parameters.not.toMatchTypeOf<[]>()
expectTypeOf(slice.actions.normalReducer).parameters.not.toMatchTypeOf<
[number]
>()
expectTypeOf(slice.actions.optionalReducer).toMatchTypeOf<
ActionCreatorWithOptionalPayload<string | undefined>
>()
expectTypeOf(slice.actions.optionalReducer).toBeCallableWith()
expectTypeOf(slice.actions.optionalReducer).toBeCallableWith('')
expectTypeOf(slice.actions.optionalReducer).parameter(0).not.toBeNumber()
expectTypeOf(
slice.actions.noActionReducer,
).toMatchTypeOf<ActionCreatorWithoutPayload>()
expectTypeOf(slice.actions.noActionReducer).toBeCallableWith()
expectTypeOf(slice.actions.noActionReducer).parameter(0).not.toBeString()
expectTypeOf(slice.actions.preparedReducer).toEqualTypeOf<
ActionCreatorWithPreparedPayload<
[string],
string,
'test/preparedReducer',
'error',
'meta'
>
>()
expectTypeOf(slice.actions.testInferVoid).toEqualTypeOf<
AsyncThunk<void, void, {}>
>()
expectTypeOf(slice.actions.testInferVoid).toBeCallableWith()
expectTypeOf(slice.actions.testInfer).toEqualTypeOf<
AsyncThunk<TestReturned, TestArg, {}>
>()
expectTypeOf(slice.actions.testExplicitType).toEqualTypeOf<
AsyncThunk<TestReturned, TestArg, { rejectValue: TestReject }>
>()
type TestInferThunk = AsyncThunk<TestReturned, TestArg, {}>
expectTypeOf(slice.caseReducers.testInfer.pending).toEqualTypeOf<
CaseReducer<TestState, ReturnType<TestInferThunk['pending']>>
>()
expectTypeOf(slice.caseReducers.testInfer.fulfilled).toEqualTypeOf<
CaseReducer<TestState, ReturnType<TestInferThunk['fulfilled']>>
>()
expectTypeOf(slice.caseReducers.testInfer.rejected).toEqualTypeOf<
CaseReducer<TestState, ReturnType<TestInferThunk['rejected']>>
>()
})
test('wrapping createSlice should be possible, with callback', () => {
interface GenericState<T> {
data?: T
status: 'loading' | 'finished' | 'error'
}
const createGenericSlice = <
T,
Reducers extends SliceCaseReducers<GenericState<T>>,
>({
name = '',
initialState,
reducers,
}: {
name: string
initialState: GenericState<T>
reducers: (create: ReducerCreators<GenericState<T>>) => Reducers
}) => {
return createSlice({
name,
initialState,
reducers: (create) => ({
start: create.reducer((state) => {
state.status = 'loading'
}),
success: create.reducer<T>((state, action) => {
state.data = castDraft(action.payload)
state.status = 'finished'
}),
...reducers(create),
}),
})
}
const wrappedSlice = createGenericSlice({
name: 'test',
initialState: { status: 'loading' } as GenericState<string>,
reducers: (create) => ({
magic: create.reducer((state) => {
expectTypeOf(state).toEqualTypeOf<GenericState<string>>()
expectTypeOf(state).not.toMatchTypeOf<GenericState<number>>()
state.status = 'finished'
state.data = 'hocus pocus'
}),
}),
})
expectTypeOf(wrappedSlice.actions.success).toMatchTypeOf<
ActionCreatorWithPayload<string>
>()
expectTypeOf(wrappedSlice.actions.magic).toMatchTypeOf<
ActionCreatorWithoutPayload<string>
>()
})
test('selectSlice', () => {
expectTypeOf(counterSlice.selectSlice({ counter: 0 })).toBeNumber()
// We use `not.toEqualTypeOf` instead of `not.toMatchTypeOf`
// because `toMatchTypeOf` allows missing properties
expectTypeOf(counterSlice.selectSlice).parameter(0).not.toEqualTypeOf<{}>()
})
test('buildCreateSlice', () => {
expectTypeOf(buildCreateSlice()).toEqualTypeOf(createSlice)
buildCreateSlice({
// @ts-expect-error not possible to recreate shape because symbol is not exported
creators: { asyncThunk: { [Symbol()]: createAsyncThunk } },
})
buildCreateSlice({ creators: { asyncThunk: asyncThunkCreator } })
})
})
@@ -0,0 +1 @@
{"name":"@heroui/dropdown","version":"2.3.10","requiresBuild":false,"files":{"dist/dropdown-context.js":{"checkedAt":1794532107961,"integrity":"sha512-kVHllnwrLxXpg+JfMM7369917JoyWeYOXfsfTKI/jo2oRF0UTjTBXd6TGpSznp7rZyA6bP+7m6cmZcAJciMnbg==","mode":420,"size":1502},"dist/dropdown-menu.js":{"checkedAt":1794532107962,"integrity":"sha512-YGUF9a8E7hCjNDWczKZKQ5+9aApUqz5Jc9cGPyUFk6l3ljrZ9f1BJ0at+7A+m/rDU/UQDp/MJtLgjNn4yNMmVg==","mode":420,"size":2189},"dist/dropdown-trigger.js":{"checkedAt":1794532107962,"integrity":"sha512-P5OC9QQKtpAk+1gmMyzCqFDvnmhynmgnYzAJVPp8bDgZD2PZczz792+dM9t7hv1HXFqPzZMaaBZDMRVhaUqXlg==","mode":420,"size":1951},"dist/dropdown.js":{"checkedAt":1794532107962,"integrity":"sha512-ejVV3tvxjHy1cogN81T9GKGKeGHrdnf3VnmNfSHg4z+BDGc3krikuvu5MLcSgjMA4kRuGPxmTIR51WMgXU1g+g==","mode":420,"size":6832},"dist/index.js":{"checkedAt":1794532107962,"integrity":"sha512-0U0xVP3FyXg/JPlzCjCfoZsQV1ozWt9FKkvJv9WlkJAHlMQgqVJIB/o2HR/ZqewtbPXoExQjlh6A81iv4OJF3w==","mode":420,"size":8491},"dist/use-dropdown.js":{"checkedAt":1794532107962,"integrity":"sha512-yj1/xCDwW4XLCrzaMC2bYKNAhvyEfi9R/UxcOGEEPA3UUoMZVh7n07JcS2+jGE47p9edTble7cAvDTx7oAK/Yg==","mode":420,"size":5496},"package.json":{"checkedAt":1794532107962,"integrity":"sha512-MV3cprTQEvt0246EZYioojQMddVnp5GGu1Ru98akqUuKTXxOum27cTC3PS/UouqdzyBTtpygom0MIBVu+lwu9g==","mode":420,"size":1728},"README.md":{"checkedAt":1794532107962,"integrity":"sha512-vkt5h577RgeNLBOa5hus4+fHa4i3matsHOpy7NcpiJzOqNw+8vWg5cSeZeLjRUPuSvEkUYSOkUWr4Xqat8wEaw==","mode":420,"size":545},"dist/chunk-4LJ2IKXJ.mjs":{"checkedAt":1794532107963,"integrity":"sha512-MrTYACYWNsL+1kX4p3/pw1/7WiRkZzv1IHiw3lh2a6eG/sDq5ftnyt3x0LMtbmy9LEHLSFav3474T1Ezmt/zOw==","mode":420,"size":574},"dist/chunk-BV7BCS3N.mjs":{"checkedAt":1794532107963,"integrity":"sha512-qwqqgqmACNUoTAMt16+TRrRYZ4ZRTfAuwo7EM2K/0REtpl4kHkcmg4gwmhz+KmWhBZsQZsM1cSm455RQr32UNA==","mode":420,"size":373},"dist/chunk-IURKDIR4.mjs":{"checkedAt":1794532107963,"integrity":"sha512-bhzzCKPM4vuuItyqa2E9w7fhurmvcU7itAeo57ELqA5bxoEMglXFLOWCTUwF0aQ/HAxy3BLNOMwvg9nNkv3F6Q==","mode":420,"size":4207},"dist/chunk-KQ5CH2X7.mjs":{"checkedAt":1794532107963,"integrity":"sha512-qY1Po784c+XhdMCGeF4qp8F6YJavnN9MZ9nXFLTEl0qNZ7pW8GR7GmHwQXW00jtHIDRJ5rfN++N/6HUvTlGczw==","mode":420,"size":741},"dist/chunk-UIQ4674R.mjs":{"checkedAt":1794532107963,"integrity":"sha512-ScyyotH7QpAjqcfUYOE1OodpBFyTAqUXOKCeIhnSJ9dw1UZF+CvgSdefHrkB7zV+o1i43Gt4Sa06sR9gfmC8MQ==","mode":420,"size":723},"dist/dropdown-context.mjs":{"checkedAt":1794532107963,"integrity":"sha512-IK9K0rBD0jLZNe/w8P96oC6z7Ojr19vmcDt7xPOkX+UfMPCbDNVMHLK0bT7lpaw/KQ5Sw8yk4O3iURsjnWC7Hw==","mode":420,"size":148},"dist/dropdown-menu.mjs":{"checkedAt":1794532107964,"integrity":"sha512-+yI1n+sMecgEXdJeHcTRlucG8PD1rlc/70bZyxj68AE2IadTvnBjyaE9KLV0qZSVGUk2y/4oZgzucoz95EW7ig==","mode":420,"size":156},"dist/dropdown-trigger.mjs":{"checkedAt":1794532107964,"integrity":"sha512-uRXT0oNOjNYaTVKajMoEhendrK4yU9vp5SuQDvpnpNaiS8M9RCdlzig+NC4U5moF3etZS58t4XlNJcER5XvUog==","mode":420,"size":162},"dist/dropdown.mjs":{"checkedAt":1794532107964,"integrity":"sha512-s8GTQKcZZ0/AdtC2uX3w2QT7AMWJaSZQ/IwlxjTKJOUHWOu1zY0tHbF0bDLJhgKWVwVbzlDf2+NKfrJpIx4ljg==","mode":420,"size":177},"dist/index.mjs":{"checkedAt":1794532107964,"integrity":"sha512-+a7DZjwum4zz+f/UWBqI4qATcPRQmYvo4+8HUChajXRQNUVWTSZ8IZJx35t/o4h5lc1my8vX+cVImozyY1gLWg==","mode":420,"size":568},"dist/use-dropdown.mjs":{"checkedAt":1794532107964,"integrity":"sha512-6avLYOTfEEvyTI4C9cbzZkNsZLQccisI9uOu9c4eyOv4jUsUUaKvQxBeckAi9wLaqn53GEdEO8xP4H7joi+KSA==","mode":420,"size":94},"dist/dropdown-context.d.ts":{"checkedAt":1794532107965,"integrity":"sha512-taY3ChwD2d6rFfQQV0bfsSi+R+QN8jm59VTeWdrWfMg/Ea0dW6NBHOg3+A3IUyrS2aQebYVaQVQEm0+KgiRf5Q==","mode":420,"size":396},"dist/dropdown-menu.d.ts":{"checkedAt":1794532107965,"integrity":"sha512-EDrKys8Pt1yi2PSTyg+yUZnnEseLRjgqnwkmHJpmTpEimZINvlWC9w56fEkHOqMOGenqnanH1Twpwanxyz7RkA==","mode":420,"size":379},"dist/dropdown-trigger.d.ts":{"checkedAt":1794532107965,"integrity":"sha512-TN/l7WkGFcDAhNasQKkE4DjH4eERBXR2h26Ngj4hlB4wHSBPmP9XrC/iftq61AVwsZhuTjW65xzpHusIWsNvKA==","mode":420,"size":479},"dist/dropdown.d.ts":{"checkedAt":1794532107965,"integrity":"sha512-KaK8vLG/gmUIXfyV8uEuvtKMqH3YH/vd6muTy9XapXolxMIR87dMBDJJMYDZgld30jFWYCQr4U9gGg+FislrKg==","mode":420,"size":634},"dist/index.d.ts":{"checkedAt":1794532107965,"integrity":"sha512-ZDtEhywEIN5IQ/4kL2xnjD3GNjiQ1lhlVcEprT8ajynasYGo7Ay7WzLB/ORNyzsuWfU1p/8aO7+6OM/+KaffsQ==","mode":420,"size":608},"dist/use-dropdown.d.ts":{"checkedAt":1794532107965,"integrity":"sha512-Tovoc5r0dUZ6brbB3Mrmul7KCGax4kpImSvTNZTjWLYpUyNEbMboD6xKKE5mowYmgzRzmREx3299ZV5rxJGoQA==","mode":420,"size":1521},"LICENSE":{"checkedAt":1794532104252,"integrity":"sha512-eaopHP+N4EYXlGoX9hmoxDPoVft4BqrXKmbsFTcsoBHSrJp/GWF4qVtLBzrw9h9ZrbFfPY69z+3RuDX9FdPG+Q==","mode":420,"size":1064}}}
@@ -0,0 +1,20 @@
/// <reference types="node" />
import type * as fs from 'fs';
export interface Entry {
dirent: Dirent;
name: string;
path: string;
stats?: Stats;
}
export declare type Stats = fs.Stats;
export declare type ErrnoException = NodeJS.ErrnoException;
export interface Dirent {
isBlockDevice: () => boolean;
isCharacterDevice: () => boolean;
isDirectory: () => boolean;
isFIFO: () => boolean;
isFile: () => boolean;
isSocket: () => boolean;
isSymbolicLink: () => boolean;
name: string;
}
@@ -0,0 +1,13 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _temporalRef;
var _temporalUndefined = require("./temporalUndefined.js");
var _tdz = require("./tdz.js");
function _temporalRef(val, name) {
return val === _temporalUndefined.default ? (0, _tdz.default)(name) : val;
}
//# sourceMappingURL=temporalRef.js.map
@@ -0,0 +1,9 @@
"use client";
import {
navbar_menu_default
} from "./chunk-BKQISTKS.mjs";
import "./chunk-IGERPFKH.mjs";
import "./chunk-UJDFI5KD.mjs";
export {
navbar_menu_default as default
};
@@ -0,0 +1,25 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var gridRole = {
abstract: false,
accessibleNameRequired: true,
baseConcepts: [],
childrenPresentational: false,
nameFrom: ['author'],
prohibitedProps: [],
props: {
'aria-multiselectable': null,
'aria-readonly': null
},
relatedConcepts: [],
requireContextRole: [],
requiredContextRole: [],
requiredOwnedElements: [['row'], ['row', 'rowgroup']],
requiredProps: {},
superClass: [['roletype', 'widget', 'composite'], ['roletype', 'structure', 'section', 'table']]
};
var _default = exports.default = gridRole;
@@ -0,0 +1,6 @@
{
"version": 3,
"sources": ["umd:@jridgewell/sourcemap-codec", "umd:@jridgewell/resolve-uri", "../src/trace-mapping.ts", "../src/resolve.ts", "../src/strip-filename.ts", "../src/sourcemap-segment.ts", "../src/sort.ts", "../src/by-source.ts", "../src/binary-search.ts", "../src/types.ts", "../src/flatten-map.ts"],
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA,6CAAAA,SAAA;AAAA,IAAAA,QAAO,UAAU;AAAA;AAAA;;;ACAjB;AAAA,yCAAAC,SAAA;AAAA,IAAAA,QAAO,UAAU;AAAA;AAAA;;;ACAjB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,6BAA+B;;;ACA/B,yBAAuB;;;ACGR,SAAR,cAA+B,MAAyC;AAC7E,MAAI,CAAC,KAAM,QAAO;AAClB,QAAM,QAAQ,KAAK,YAAY,GAAG;AAClC,SAAO,KAAK,MAAM,GAAG,QAAQ,CAAC;AAChC;;;ADHe,SAAR,SACL,QACA,YACS;AACT,QAAM,OAAO,cAAc,MAAM;AAIjC,QAAM,SAAS,aAAa,aAAa,MAAM;AAE/C,SAAO,CAAC,eAAW,mBAAAC,SAAW,UAAU,UAAU,KAAK,IAAI;AAC7D;;;AEAO,IAAM,SAAS;AACf,IAAM,gBAAgB;AACtB,IAAM,cAAc;AACpB,IAAM,gBAAgB;AACtB,IAAM,cAAc;AAEpB,IAAM,qBAAqB;AAC3B,IAAM,uBAAuB;;;AClBrB,SAAR,UACL,UACA,OACsB;AACtB,QAAM,gBAAgB,wBAAwB,UAAU,CAAC;AACzD,MAAI,kBAAkB,SAAS,OAAQ,QAAO;AAI9C,MAAI,CAAC,MAAO,YAAW,SAAS,MAAM;AAEtC,WAAS,IAAI,eAAe,IAAI,SAAS,QAAQ,IAAI,wBAAwB,UAAU,IAAI,CAAC,GAAG;AAC7F,aAAS,CAAC,IAAI,aAAa,SAAS,CAAC,GAAG,KAAK;AAAA,EAC/C;AACA,SAAO;AACT;AAEA,SAAS,wBAAwB,UAAgC,OAAuB;AACtF,WAAS,IAAI,OAAO,IAAI,SAAS,QAAQ,KAAK;AAC5C,QAAI,CAAC,SAAS,SAAS,CAAC,CAAC,EAAG,QAAO;AAAA,EACrC;AACA,SAAO,SAAS;AAClB;AAEA,SAAS,SAAS,MAAmC;AACnD,WAAS,IAAI,GAAG,IAAI,KAAK,QAAQ,KAAK;AACpC,QAAI,KAAK,CAAC,EAAE,MAAM,IAAI,KAAK,IAAI,CAAC,EAAE,MAAM,GAAG;AACzC,aAAO;AAAA,IACT;AAAA,EACF;AACA,SAAO;AACT;AAEA,SAAS,aAAa,MAA0B,OAAoC;AAClF,MAAI,CAAC,MAAO,QAAO,KAAK,MAAM;AAC9B,SAAO,KAAK,KAAK,cAAc;AACjC;AAEO,SAAS,eAA4D,GAAM,GAAc;AAC9F,SAAO,EAAE,MAAM,IAAI,EAAE,MAAM;AAC7B;;;ACnCe,SAAR,eACL,SACA,OACU;AACV,QAAM,UAAoB,MAAM,IAAI,MAAM,CAAC,CAAC;AAE5C,WAAS,IAAI,GAAG,IAAI,QAAQ,QAAQ,KAAK;AACvC,UAAM,OAAO,QAAQ,CAAC;AACtB,aAAS,IAAI,GAAG,IAAI,KAAK,QAAQ,KAAK;AACpC,YAAM,MAAM,KAAK,CAAC;AAClB,UAAI,IAAI,WAAW,EAAG;AAEtB,YAAMC,eAAc,IAAI,aAAa;AACrC,YAAM,aAAa,IAAI,WAAW;AAClC,YAAM,eAAe,IAAI,aAAa;AAEtC,YAAM,SAAS,QAAQA,YAAW;AAClC,YAAM,OAAQ,4CAAuB,CAAC;AACtC,WAAK,KAAK,CAAC,cAAc,GAAG,IAAI,MAAM,CAAC,CAAC;AAAA,IAC1C;AAAA,EACF;AAEA,WAAS,IAAI,GAAG,IAAI,QAAQ,QAAQ,KAAK;AACvC,UAAM,SAAS,QAAQ,CAAC;AACxB,aAAS,IAAI,GAAG,IAAI,OAAO,QAAQ,KAAK;AACtC,YAAM,OAAO,OAAO,CAAC;AACrB,UAAI,KAAM,MAAK,KAAK,cAAc;AAAA,IACpC;AAAA,EACF;AAEA,SAAO;AACT;;;AC/BO,IAAI,QAAQ;AAkBZ,SAAS,aACd,UACA,QACA,KACA,MACQ;AACR,SAAO,OAAO,MAAM;AAClB,UAAM,MAAM,OAAQ,OAAO,OAAQ;AACnC,UAAM,MAAM,SAAS,GAAG,EAAE,MAAM,IAAI;AAEpC,QAAI,QAAQ,GAAG;AACb,cAAQ;AACR,aAAO;AAAA,IACT;AAEA,QAAI,MAAM,GAAG;AACX,YAAM,MAAM;AAAA,IACd,OAAO;AACL,aAAO,MAAM;AAAA,IACf;AAAA,EACF;AAEA,UAAQ;AACR,SAAO,MAAM;AACf;AAEO,SAAS,WACd,UACA,QACA,OACQ;AACR,WAAS,IAAI,QAAQ,GAAG,IAAI,SAAS,QAAQ,QAAQ,KAAK;AACxD,QAAI,SAAS,CAAC,EAAE,MAAM,MAAM,OAAQ;AAAA,EACtC;AACA,SAAO;AACT;AAEO,SAAS,WACd,UACA,QACA,OACQ;AACR,WAAS,IAAI,QAAQ,GAAG,KAAK,GAAG,QAAQ,KAAK;AAC3C,QAAI,SAAS,CAAC,EAAE,MAAM,MAAM,OAAQ;AAAA,EACtC;AACA,SAAO;AACT;AAEO,SAAS,gBAA2B;AACzC,SAAO;AAAA,IACL,SAAS;AAAA,IACT,YAAY;AAAA,IACZ,WAAW;AAAA,EACb;AACF;AAMO,SAAS,qBACd,UACA,QACA,OACA,KACQ;AACR,QAAM,EAAE,SAAS,YAAY,UAAU,IAAI;AAE3C,MAAI,MAAM;AACV,MAAI,OAAO,SAAS,SAAS;AAC7B,MAAI,QAAQ,SAAS;AACnB,QAAI,WAAW,YAAY;AACzB,cAAQ,cAAc,MAAM,SAAS,SAAS,EAAE,MAAM,MAAM;AAC5D,aAAO;AAAA,IACT;AAEA,QAAI,UAAU,YAAY;AAExB,YAAM,cAAc,KAAK,IAAI;AAAA,IAC/B,OAAO;AACL,aAAO;AAAA,IACT;AAAA,EACF;AACA,QAAM,UAAU;AAChB,QAAM,aAAa;AAEnB,SAAQ,MAAM,YAAY,aAAa,UAAU,QAAQ,KAAK,IAAI;AACpE;;;ACHO,SAAS,MAAS,KAA4B;AACnD,SAAO,OAAO,QAAQ,WAAW,KAAK,MAAM,GAAG,IAAK;AACtD;;;ACvFO,IAAM,aAAyB,SAAU,KAAK,QAAQ;AAC3D,QAAM,SAAS,MAAM,GAA8B;AAEnD,MAAI,EAAE,cAAc,SAAS;AAC3B,WAAO,IAAI,SAAS,QAA2D,MAAM;AAAA,EACvF;AAEA,QAAM,WAAiC,CAAC;AACxC,QAAM,UAAoB,CAAC;AAC3B,QAAM,iBAAoC,CAAC;AAC3C,QAAM,QAAkB,CAAC;AACzB,QAAM,aAAuB,CAAC;AAE9B;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAEA,QAAM,SAA2B;AAAA,IAC/B,SAAS;AAAA,IACT,MAAM,OAAO;AAAA,IACb;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAEA,SAAO,oBAAoB,MAAM;AACnC;AAEA,SAAS,QACP,OACA,QACA,UACA,SACA,gBACA,OACA,YACA,YACA,cACA,UACA,YACA;AACA,QAAM,EAAE,SAAS,IAAI;AACrB,WAAS,IAAI,GAAG,IAAI,SAAS,QAAQ,KAAK;AACxC,UAAM,EAAE,KAAK,OAAO,IAAI,SAAS,CAAC;AAElC,QAAI,KAAK;AACT,QAAI,KAAK;AACT,QAAI,IAAI,IAAI,SAAS,QAAQ;AAC3B,YAAM,aAAa,SAAS,IAAI,CAAC,EAAE;AACnC,WAAK,KAAK,IAAI,UAAU,aAAa,WAAW,IAAI;AAEpD,UAAI,OAAO,UAAU;AACnB,aAAK,KAAK,IAAI,YAAY,eAAe,WAAW,MAAM;AAAA,MAC5D,WAAW,KAAK,UAAU;AACxB,aAAK,eAAe,WAAW;AAAA,MACjC;AAAA,IACF;AAEA;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,aAAa,OAAO;AAAA,MACpB,eAAe,OAAO;AAAA,MACtB;AAAA,MACA;AAAA,IACF;AAAA,EACF;AACF;AAEA,SAAS,WACP,OACA,QACA,UACA,SACA,gBACA,OACA,YACA,YACA,cACA,UACA,YACA;AACA,QAAM,SAAS,MAAM,KAAK;AAC1B,MAAI,cAAc,OAAQ,QAAO,QAAQ,GAAI,SAAmD;AAEhG,QAAM,MAAM,IAAI,SAAS,QAAQ,MAAM;AACvC,QAAM,gBAAgB,QAAQ;AAC9B,QAAM,cAAc,MAAM;AAC1B,QAAM,UAAU,gBAAgB,GAAG;AACnC,QAAM,EAAE,iBAAiB,gBAAgB,UAAU,YAAY,QAAQ,IAAI;AAE3E,SAAO,SAAS,eAAe;AAC/B,SAAO,OAAO,IAAI,KAAK;AAEvB,MAAI,SAAU,QAAO,gBAAgB,QAAQ;AAAA,MACxC,UAAS,IAAI,GAAG,IAAI,gBAAgB,QAAQ,IAAK,gBAAe,KAAK,IAAI;AAE9E,MAAI,QAAS,UAAS,IAAI,GAAG,IAAI,QAAQ,QAAQ,IAAK,YAAW,KAAK,QAAQ,CAAC,IAAI,aAAa;AAEhG,WAAS,IAAI,GAAG,IAAI,QAAQ,QAAQ,KAAK;AACvC,UAAM,QAAQ,aAAa;AAM3B,QAAI,QAAQ,SAAU;AAItB,UAAM,MAAM,QAAQ,UAAU,KAAK;AALine truncated
"names": ["module", "module", "resolveUri", "sourceIndex", "sourceIndex"]
}
@@ -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 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC yC zC","2":"6 7 8 9 xC TC J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 0C 1C"},D:{"1":"0 1 2 3 4 5 IC JC KC LC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC","2":"6 7 8 9 J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC"},E:{"1":"G 9C bC cC PC AD QC dC eC fC gC hC BD RC iC jC kC lC mC CD SC nC oC pC qC rC sC tC DD ED","2":"J ZB K D E F A B C L M 2C ZC 3C 4C 5C 6C aC NC OC 7C 8C"},F:{"1":"0 1 2 3 4 5 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z","2":"6 7 8 9 F B C G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B FD GD HD ID NC uC JD OC"},G:{"1":"dD bC cC PC eD QC dC eC fC gC hC fD RC iC jC kC lC mC gD SC nC oC pC qC rC sC tC","2":"E ZC KD vC LD MD ND OD PD QD RD SD TD UD VD WD XD YD ZD aD bD cD"},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 tD uD vD wD xD QC RC SC yD","2":"J oD pD qD rD sD aC"},Q:{"16":"zD"},R:{"16":"0D"},S:{"2":"1D","16":"2D"}},B:5,C:"WebAssembly Non-trapping float-to-int Conversion",D:true};
@@ -0,0 +1,130 @@
import * as C from '../../constant';
export default (function (o, c, d) {
o = o || {};
var proto = c.prototype;
var relObj = {
future: 'in %s',
past: '%s ago',
s: 'a few seconds',
m: 'a minute',
mm: '%d minutes',
h: 'an hour',
hh: '%d hours',
d: 'a day',
dd: '%d days',
M: 'a month',
MM: '%d months',
y: 'a year',
yy: '%d years'
};
d.en.relativeTime = relObj;
proto.fromToBase = function (input, withoutSuffix, instance, isFrom, postFormat) {
var loc = instance.$locale().relativeTime || relObj;
var T = o.thresholds || [{
l: 's',
r: 44,
d: C.S
}, {
l: 'm',
r: 89
}, {
l: 'mm',
r: 44,
d: C.MIN
}, {
l: 'h',
r: 89
}, {
l: 'hh',
r: 21,
d: C.H
}, {
l: 'd',
r: 35
}, {
l: 'dd',
r: 25,
d: C.D
}, {
l: 'M',
r: 45
}, {
l: 'MM',
r: 10,
d: C.M
}, {
l: 'y',
r: 17
}, {
l: 'yy',
d: C.Y
}];
var Tl = T.length;
var result;
var out;
var isFuture;
for (var i = 0; i < Tl; i += 1) {
var t = T[i];
if (t.d) {
result = isFrom ? d(input).diff(instance, t.d, true) : instance.diff(input, t.d, true);
}
var abs = (o.rounding || Math.round)(Math.abs(result));
isFuture = result > 0;
if (abs <= t.r || !t.r) {
if (abs <= 1 && i > 0) t = T[i - 1]; // 1 minutes -> a minute, 0 seconds -> 0 second
var format = loc[t.l];
if (postFormat) {
abs = postFormat("" + abs);
}
if (typeof format === 'string') {
out = format.replace('%d', abs);
} else {
out = format(abs, withoutSuffix, t.l, isFuture);
}
break;
}
}
if (withoutSuffix) return out;
var pastOrFuture = isFuture ? loc.future : loc.past;
if (typeof pastOrFuture === 'function') {
return pastOrFuture(out);
}
return pastOrFuture.replace('%s', out);
};
function fromTo(input, withoutSuffix, instance, isFrom) {
return proto.fromToBase(input, withoutSuffix, instance, isFrom);
}
proto.to = function (input, withoutSuffix) {
return fromTo(input, withoutSuffix, this, true);
};
proto.from = function (input, withoutSuffix) {
return fromTo(input, withoutSuffix, this);
};
var makeNow = function makeNow(thisDay) {
return thisDay.$u ? d.utc() : d();
};
proto.toNow = function (withoutSuffix) {
return this.to(makeNow(this), withoutSuffix);
};
proto.fromNow = function (withoutSuffix) {
return this.from(makeNow(this), withoutSuffix);
};
});
@@ -0,0 +1,24 @@
function stringifyNumber({ format, minFractionDigits, tag, value }) {
if (typeof value === 'bigint')
return String(value);
const num = typeof value === 'number' ? value : Number(value);
if (!isFinite(num))
return isNaN(num) ? '.nan' : num < 0 ? '-.inf' : '.inf';
let n = Object.is(value, -0) ? '-0' : JSON.stringify(value);
if (!format &&
minFractionDigits &&
(!tag || tag === 'tag:yaml.org,2002:float') &&
/^\d/.test(n)) {
let i = n.indexOf('.');
if (i < 0) {
i = n.length;
n += '.';
}
let d = minFractionDigits - (n.length - i - 1);
while (d-- > 0)
n += '0';
}
return n;
}
export { stringifyNumber };
@@ -0,0 +1,125 @@
import type { $ZodStringFormats } from "../core/checks.js";
import type * as errors from "../core/errors.js";
import * as util from "../core/util.js";
export const parsedType = (data: any): string => {
const t = typeof data;
switch (t) {
case "number": {
return Number.isNaN(data) ? "NaN" : "nombro";
}
case "object": {
if (Array.isArray(data)) {
return "tabelo";
}
if (data === null) {
return "senvalora";
}
if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
return data.constructor.name;
}
}
}
return t;
};
const error: () => errors.$ZodErrorMap = () => {
const Sizable: Record<string, { unit: string; verb: string }> = {
string: { unit: "karaktrojn", verb: "havi" },
file: { unit: "bajtojn", verb: "havi" },
array: { unit: "elementojn", verb: "havi" },
set: { unit: "elementojn", verb: "havi" },
};
function getSizing(origin: string): { unit: string; verb: string } | null {
return Sizable[origin] ?? null;
}
const Nouns: {
[k in $ZodStringFormats | (string & {})]?: string;
} = {
regex: "enigo",
email: "retadreso",
url: "URL",
emoji: "emoĝio",
uuid: "UUID",
uuidv4: "UUIDv4",
uuidv6: "UUIDv6",
nanoid: "nanoid",
guid: "GUID",
cuid: "cuid",
cuid2: "cuid2",
ulid: "ULID",
xid: "XID",
ksuid: "KSUID",
datetime: "ISO-datotempo",
date: "ISO-dato",
time: "ISO-tempo",
duration: "ISO-daŭro",
ipv4: "IPv4-adreso",
ipv6: "IPv6-adreso",
cidrv4: "IPv4-rango",
cidrv6: "IPv6-rango",
base64: "64-ume kodita karaktraro",
base64url: "URL-64-ume kodita karaktraro",
json_string: "JSON-karaktraro",
e164: "E.164-nombro",
jwt: "JWT",
template_literal: "enigo",
};
return (issue) => {
switch (issue.code) {
case "invalid_type":
return `Nevalida enigo: atendiĝis ${issue.expected}, riceviĝis ${parsedType(issue.input)}`;
case "invalid_value":
if (issue.values.length === 1) return `Nevalida enigo: atendiĝis ${util.stringifyPrimitive(issue.values[0])}`;
return `Nevalida opcio: atendiĝis unu el ${util.joinValues(issue.values, "|")}`;
case "too_big": {
const adj = issue.inclusive ? "<=" : "<";
const sizing = getSizing(issue.origin);
if (sizing)
return `Tro granda: atendiĝis ke ${issue.origin ?? "valoro"} havu ${adj}${issue.maximum.toString()} ${sizing.unit ?? "elementojn"}`;
return `Tro granda: atendiĝis ke ${issue.origin ?? "valoro"} havu ${adj}${issue.maximum.toString()}`;
}
case "too_small": {
const adj = issue.inclusive ? ">=" : ">";
const sizing = getSizing(issue.origin);
if (sizing) {
return `Tro malgranda: atendiĝis ke ${issue.origin} havu ${adj}${issue.minimum.toString()} ${sizing.unit}`;
}
return `Tro malgranda: atendiĝis ke ${issue.origin} estu ${adj}${issue.minimum.toString()}`;
}
case "invalid_format": {
const _issue = issue as errors.$ZodStringFormatIssues;
if (_issue.format === "starts_with") return `Nevalida karaktraro: devas komenciĝi per "${_issue.prefix}"`;
if (_issue.format === "ends_with") return `Nevalida karaktraro: devas finiĝi per "${_issue.suffix}"`;
if (_issue.format === "includes") return `Nevalida karaktraro: devas inkluzivi "${_issue.includes}"`;
if (_issue.format === "regex") return `Nevalida karaktraro: devas kongrui kun la modelo ${_issue.pattern}`;
return `Nevalida ${Nouns[_issue.format] ?? issue.format}`;
}
case "not_multiple_of":
return `Nevalida nombro: devas esti oblo de ${issue.divisor}`;
case "unrecognized_keys":
return `Nekonata${issue.keys.length > 1 ? "j" : ""} ŝlosilo${issue.keys.length > 1 ? "j" : ""}: ${util.joinValues(issue.keys, ", ")}`;
case "invalid_key":
return `Nevalida ŝlosilo en ${issue.origin}`;
case "invalid_union":
return "Nevalida enigo";
case "invalid_element":
return `Nevalida valoro en ${issue.origin}`;
default:
return `Nevalida enigo`;
}
};
};
export default function (): { localeError: errors.$ZodErrorMap } {
return {
localeError: error(),
};
}
@@ -0,0 +1,22 @@
interface CompileResult {
pattern: string;
tokens: string[];
}
/**
* Compile a format string into a regular expression and extract date parts.
* 编译格式字符串,生成正则表达式和匹配的日期部分
*
* @param formatString - The format string to compile. (要编译的格式字符串。)
* @returns A compiled result object containing the regular expression pattern and extracted date parts.
* (包含正则表达式模式的编译结果对象,以及提取的日期部分。)
* @example
* ```ts
* compile('YYYY-MM-DD HH:mm:ss.SSS');
* // {
* // pattern: '(\\d{1,4})-(\\d{1,2})-(\\d{1,2}) (\\d{1,2}):(\\d{1,2}):(\\d{1,2})\\.(\\d{1,3})',
* // tokens: ['YYYY', 'MM', 'DD','HH', 'mm', 'ss', 'SSS']
* // }
* ```
*/
export default function compile(formatString: string): CompileResult;
export {};
@@ -0,0 +1,82 @@
'use strict'
const PROMISE_STATICS = require('./lib/promise-statics')
const getDocsUrl = require('./lib/get-docs-url')
const PROMISE_INSTANCE_METHODS = new Set(['then', 'catch', 'finally'])
function isPermittedProperty(expression, standardSet, allowedMethods) {
// istanbul ignore if
if (expression.type !== 'MemberExpression') return false
if (expression.property.type === 'Literal')
return (
standardSet.has(expression.property.value) ||
allowedMethods.includes(expression.property.value)
)
// istanbul ignore else
if (expression.property.type === 'Identifier')
return (
expression.computed ||
standardSet.has(expression.property.name) ||
allowedMethods.includes(expression.property.name)
)
// istanbul ignore next
return false
}
module.exports = {
meta: {
type: 'problem',
docs: {
description: 'Disallow use of non-standard Promise static methods.',
url: getDocsUrl('spec-only'),
},
schema: [
{
type: 'object',
properties: {
allowedMethods: {
type: 'array',
items: {
type: 'string',
},
},
},
additionalProperties: false,
},
],
messages: {
avoidNonStandard: "Avoid using non-standard 'Promise.{{ name }}'",
},
},
create(context) {
const { allowedMethods = [] } = context.options[0] || {}
return {
MemberExpression(node) {
if (
node.object.type === 'Identifier' &&
node.object.name === 'Promise' &&
((node.property.name !== 'prototype' &&
!isPermittedProperty(node, PROMISE_STATICS, allowedMethods)) ||
(node.property.name === 'prototype' &&
node.parent.type === 'MemberExpression' &&
!isPermittedProperty(
node.parent,
PROMISE_INSTANCE_METHODS,
allowedMethods,
)))
) {
context.report({
node,
messageId: 'avoidNonStandard',
data: { name: node.property.name ?? node.property.value },
})
}
},
}
},
}
@@ -0,0 +1,4 @@
'use strict';
import AxiosURLSearchParams from '../../../helpers/AxiosURLSearchParams.js';
export default typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;
@@ -0,0 +1,10 @@
import { a as absFloor } from "./absFloor-BlD_nfEw.mjs";
import parse from "./parse.mjs";
function diffInMilliseconds(date, input, asFloat) {
const parsed = parse(input);
const output = +date - +parsed;
return asFloat ? output : absFloor(output);
}
export {
diffInMilliseconds as default
};
@@ -0,0 +1,718 @@
export default `flf2a$ 7 6 20 0 2
computer.flf by Mike Rosulek <mjr@netins.net>, 7/12/95. Check out my
homepage at: http://www.netins.net/showcase/mikewrld/
$ $#
$ $#
$ $#
$ $#
$ $#
$ $#
$ $##
8$ #
88$#
88$#
88$#
$ #
88$#
$##
8 8$#
" "$#
$ #
$ #
$ #
$ #
$ ##
dP dP$ #
888888888$#
dP dP$ #
888888888$ #
dP dP$ #
$ #
$ ##
ee8ee$#
8 8$#
8eeee$#
88$#
e 88$#
8ee88$#
8$ ##
8"8 dP$#
8e8 dP$ #
dP$ #
dP$ #
dP 8"8$#
dP 8e8$#
$ ##
888888$#
8 ,$ #
88eee8e$#
88 8$ #
88 8$ #
88eee8$ #
$ ##
88$#
8$#
$ #
$ #
$ #
$ #
$ ##
8"$#
8$ #
8$ #
8$ #
8$ #
8e$#
$ ##
"8$#
8$#
8$#
8$#
8$#
e8$#
$ ##
\\|/$#
/|\\$#
$ #
$ #
$ #
$ #
$ ##
$ #
$ #
8$ #
ee8ee$#
8$ #
$ #
$ ##
$ #
$ #
$ #
$ #
$ #
88$#
8$##
$ #
$ #
$ #
eeee$#
$ #
$ #
$ ##
$ #
$ #
$ #
$ #
$ #
88$#
$ ##
/$#
/$ #
/$ #
/$ #
/$ #
/$ #
$ ##
eeeeee$#
8 8$#
8 8$#
8 8$#
8 8$#
8eeee8$#
$ ##
88$ #
8$ #
8$ #
8$ #
8888$#
8888$#
$ ##
eeee$#
8$#
8$#
eee8$#
8$ #
8eee$#
$ ##
eeee$ #
8$ #
8$ #
eee8$ #
88$#
eee88$#
$ ##
88$ #
88$ #
88 88$#
88ee88$#
88$#
88$#
$ ##
eeeee$#
8$ #
8eeee$#
8$#
8$#
eeee8$#
$ ##
eeee$ #
8 8$ #
8$ #
8eeee$#
8 8$#
8eee8$#
$ ##
eeeee$#
8 8$#
e'$#
e'$ #
8$ #
8$ #
$ ##
eeeee$ #
8 8$ #
8eee8$ #
88 88$#
88 88$#
88eee88$#
$ ##
eeeee$#
8 8$#
8eee8$#
88$#
88$#
88$#
$ ##
$ #
$ #
$ #
88$#
$ #
88$#
$ ##
$ #
$ #
$ #
88$#
$ #
88$#
8$##
e8"$#
e8"$ #
e8"$ #
"8e$ #
"8e$ #
"8e$#
$ ##
$ #
$ #
$ #
eeeee$#
eeeee$#
$ #
$ ##
"8e$ #
"8e$ #
"8e$#
e8"$#
e8"$ #
e8"$ #
$ ##
8""""8$#
8$#
eeeee8$#
88$ #
""$ #
88$ #
$ ##
__$ #
.' \`.$ #
/ eeee \\$ #
| 8ee8 |$#
\\ 88 8 /$ #
\`.__.'$ #
$ ##
8""""8$#
8 8$#
8eeee8$#
88 8$#
88 8$#
88 8$#
$ ##
8""""8$ #
8 8$ #
8eeee8ee$#
88 8$#
88 8$#
88eeeee8$#
$ ##
8""""8$#
8 "$#
8e$ #
88$ #
88 e$#
88eee8$#
$ ##
8""""8$#
8 8$#
8e 8$#
88 8$#
88 8$#
88eee8$#
$ ##
8""""$#
8$ #
8eeee$#
88$ #
88$ #
88eee$#
$ ##
8""""$#
8$ #
8eeee$#
88$ #
88$ #
88$ #
$ ##
8""""8$#
8 "$#
8e$ #
88 ee$#
88 8$#
88eee8$#
$ ##
8 8$#
8 8$#
8eee8$#
88 8$#
88 8$#
88 8$#
$ ##
8$ #
8$ #
8e$#
88$#
88$#
88$#
$ ##
8$ #
8$ #
8e$#
88$#
e 88$#
8eee88$#
$ ##
8 8$ #
8 8$ #
8eee8e$#
88 8$#
88 8$#
88 8$#
$ ##
8$ #
8$ #
8e$ #
88$ #
88$ #
88eee$#
$ ##
8""8""8$#
8 8 8$#
8e 8 8$#
88 8 8$#
88 8 8$#
88 8 8$#
$ ##
8"""8$#
8 8$#
8e 8$#
88 8$#
88 8$#
88 8$#
$ ##
8"""88$#
8 8$#
8 8$#
8 8$#
8 8$#
8eeee8$#
$ ##
8""""8$#
8 8$#
8eeee8$#
88$ #
88$ #
88$ #
$ ##
8""""8$#
8 8$#
8 8$#
8 8$#
8 ___8$#
8e8888$#
$ ##
8"""8$ #
8 8$ #
8eee8e$#
88 8$#
88 8$#
88 8$#
$ ##
8""""8$#
8 $#
8eeeee$#
88$#
e 88$#
8eee88$#
$ ##
""8""$#
8$ #
8e$ #
88$ #
88$ #
88$ #
$ ##
8 8$#
8 8$#
8e 8$#
88 8$#
88 8$#
88ee8$#
$ ##
88 8$#
88 8$#
88 e8$#
"8 8$ #
8 8$ #
8ee8$ #
$ ##
8 8 8$#
8 8 8$#
8e 8 8$#
88 8 8$#
88 8 8$#
88ee8ee8$#
$ ##
8 8$#
8 8$#
eeeeee$#
88 8$#
88 8$#
88 8$#
$ ##
8 8$#
8 8$#
8eeee8$#
88$ #
88$ #
88$ #
$ ##
8""""8$#
8$#
eeeee8$#
88$ #
88$ #
88eee8$#
$ ##
8"$#
8 $#
8 $#
8 $#
8 $#
8e$#
$ ##
\\$ #
\\$ #
\\$ #
\\$ #
\\$ #
\\$#
$ ##
"8$#
8$#
8$#
8$#
8$#
e8$#
$ ##
/\\$#
$ #
$ #
$ #
$ #
$ #
$ ##
$ #
$ #
$ #
$ #
$ #
$ #
eeeee$##
\\$ #
\\$#
$ #
$ #
$ #
$ #
$ ##
$ #
eeeee$#
8 8$#
8eee8$#
88 8$#
88 8$#
$ ##
$ #
eeeee$ #
8 8$ #
8eee8e$#
88 8$#
88eee8$#
$ ##
$ #
eeee$#
8 8$#
8e$ #
88$ #
88e8$#
$ ##
$ #
eeeee$#
8 8$#
8e 8$#
88 8$#
88ee8$#
$ ##
$ #
eeee$#
8$ #
8eee$#
88$ #
88ee$#
$ ##
$ #
eeee$#
8$ #
8eee$#
88$ #
88$ #
$ ##
$ #
eeeee$#
8 8$#
8e$ #
88 "8$#
88ee8$#
$ ##
$ #
e e$#
8 8$#
8eee8$#
88 8$#
88 8$#
$ ##
$ #
e$ #
8$ #
8e$#
88$#
88$#
$ ##
$ #
e$ #
8$ #
8e$#
e 88$#
8ee88$#
$ ##
$ #
e e$ #
8 8$ #
8eee8e$#
88 8$#
88 8$#
$ ##
$ #
e$ #
8$ #
8e$ #
88$ #
88eee$#
$ ##
$ #
eeeeeee$#
8 8 8$#
8e 8 8$#
88 8 8$#
88 8 8$#
$ ##
$ #
eeeee$#
8 8$#
8e 8$#
88 8$#
88 8$#
$ ##
$ #
eeeee$#
8 88$#
8 8$#
8 8$#
8eee8$#
$ ##
$ #
eeeee$#
8 8$#
8eee8$#
88$ #
88$ #
$ ##
$ #
eeeee$#
8 8$#
8 8$#
8 __8$#
8e888$#
$ ##
$ #
eeeee$ #
8 8$ #
8eee8e$#
88 8$#
88 8$#
$ ##
$ #
eeeee$#
8 "$#
8eeee$#
88$#
8ee88$#
$ ##
$ #
eeeee$#
8$ #
8e$ #
88$ #
88$ #
$ ##
$ #
e e$#
8 8$#
8e 8$#
88 8$#
88ee8$#
$ ##
$ #
ee e$#
88 8$#
88 e8$#
8 8$ #
8ee8$ #
$ ##
$ #
e e e$#
8 8 8$#
8e 8 8$#
88 8 8$#
88ee8ee8$#
$ ##
$ #
e e$#
8 8$#
eeeeee$#
88 8$#
88 8$#
$ ##
$ #
e e$#
8 8$#
8eeee8$#
88$ #
88$ #
$ ##
$ #
eeeee$#
" 8$#
eeee8$#
88$ #
88ee8$#
$ ##
/"$#
|$ #
|$ #
<$ #
|$ #
|$ #
\\_$##
8$#
8$#
8$#
8$#
8$#
8$#
$ ##
"\\$ #
|$ #
|$ #
>$#
|$ #
|$ #
_/$ ##
/\\/$#
$ #
$ #
$ #
$ #
$ #
$ ##
"" ""$#
eeeee$#
8 8$#
8eee8$#
88 8$#
88 8$#
$ ##
"" ""$#
eeeee$#
8 88$#
8 8$#
8 8$#
8eee8$#
$ ##
"" ""$#
e e$#
8 8$#
8e 8$#
88 8$#
88ee8$#
$ ##
"" ""$#
eeeee$#
8 8$#
8eee8$#
88 8$#
88 8$#
$ ##
"" ""$#
eeeee$#
8 88$#
8 8$#
8 8$#
8eee8$#
$ ##
"" ""$#
e e$#
8 8$#
8e 8$#
88 8$#
88ee8$#
$ ##
$#
$#
$#
$#
$#
$#
$##
`
@@ -0,0 +1,108 @@
var Stream = require('stream')
// through
//
// a stream that does nothing but re-emit the input.
// useful for aggregating a series of changing but not ending streams into one stream)
exports = module.exports = through
through.through = through
//create a readable writable stream.
function through (write, end, opts) {
write = write || function (data) { this.queue(data) }
end = end || function () { this.queue(null) }
var ended = false, destroyed = false, buffer = [], _ended = false
var stream = new Stream()
stream.readable = stream.writable = true
stream.paused = false
// stream.autoPause = !(opts && opts.autoPause === false)
stream.autoDestroy = !(opts && opts.autoDestroy === false)
stream.write = function (data) {
write.call(this, data)
return !stream.paused
}
function drain() {
while(buffer.length && !stream.paused) {
var data = buffer.shift()
if(null === data)
return stream.emit('end')
else
stream.emit('data', data)
}
}
stream.queue = stream.push = function (data) {
// console.error(ended)
if(_ended) return stream
if(data === null) _ended = true
buffer.push(data)
drain()
return stream
}
//this will be registered as the first 'end' listener
//must call destroy next tick, to make sure we're after any
//stream piped from here.
//this is only a problem if end is not emitted synchronously.
//a nicer way to do this is to make sure this is the last listener for 'end'
stream.on('end', function () {
stream.readable = false
if(!stream.writable && stream.autoDestroy)
process.nextTick(function () {
stream.destroy()
})
})
function _end () {
stream.writable = false
end.call(stream)
if(!stream.readable && stream.autoDestroy)
stream.destroy()
}
stream.end = function (data) {
if(ended) return
ended = true
if(arguments.length) stream.write(data)
_end() // will emit or queue
return stream
}
stream.destroy = function () {
if(destroyed) return
destroyed = true
ended = true
buffer.length = 0
stream.writable = stream.readable = false
stream.emit('close')
return stream
}
stream.pause = function () {
if(stream.paused) return
stream.paused = true
return stream
}
stream.resume = function () {
if(stream.paused) {
stream.paused = false
stream.emit('resume')
}
drain()
//may have become paused again,
//as drain emits 'data'.
if(!stream.paused)
stream.emit('drain')
return stream
}
return stream
}
@@ -0,0 +1 @@
{"mappings":"AAAA,iBAAiB;IAAG,eAAe,CAAC,oBAAc,CAAC;AACnD","sources":["packages/@react-aria/breadcrumbs/intl/lt-LT.json"],"sourcesContent":["{\n \"breadcrumbs\": \"Naršymo kelias\"\n}\n"],"names":[],"version":3,"file":"lt-LT.main.js.map"}
@@ -0,0 +1,65 @@
'use strict'
var stringWidth = require('string-width')
exports.center = alignCenter
exports.left = alignLeft
exports.right = alignRight
// lodash's way of generating pad characters.
function createPadding (width) {
var result = ''
var string = ' '
var n = width
do {
if (n % 2) {
result += string;
}
n = Math.floor(n / 2);
string += string;
} while (n);
return result;
}
function alignLeft (str, width) {
var trimmed = str.trimRight()
if (trimmed.length === 0 && str.length >= width) return str
var padding = ''
var strWidth = stringWidth(trimmed)
if (strWidth < width) {
padding = createPadding(width - strWidth)
}
return trimmed + padding
}
function alignRight (str, width) {
var trimmed = str.trimLeft()
if (trimmed.length === 0 && str.length >= width) return str
var padding = ''
var strWidth = stringWidth(trimmed)
if (strWidth < width) {
padding = createPadding(width - strWidth)
}
return padding + trimmed
}
function alignCenter (str, width) {
var trimmed = str.trim()
if (trimmed.length === 0 && str.length >= width) return str
var padLeft = ''
var padRight = ''
var strWidth = stringWidth(trimmed)
if (strWidth < width) {
var padLeftBy = parseInt((width - strWidth) / 2, 10)
padLeft = createPadding(padLeftBy)
padRight = createPadding(width - (strWidth + padLeftBy))
}
return padLeft + trimmed + padRight
}
@@ -0,0 +1,9 @@
var arrayLikeToArray = require("./arrayLikeToArray.js");
function _unsupportedIterableToArray(r, a) {
if (r) {
if ("string" == typeof r) return arrayLikeToArray(r, a);
var t = {}.toString.call(r).slice(8, -1);
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? arrayLikeToArray(r, a) : void 0;
}
}
module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
@@ -0,0 +1,50 @@
import { default as Level } from './Level';
import { Config, ILogger, TLevel } from './typings';
/**
* Log Factory (日志工厂)
*/
export default class LogFactory {
private readonly loggers;
private LoggerClass;
private defaultLevel;
private appenders;
/**
* Constructor (构造函数)
* @param config Configuration options (配置选项)
*/
constructor(config?: Config);
/**
* Get the default log level (获取或设置默认日志级别)
*/
get level(): Level;
/**
* Get the default log level name (获取或设置默认日志级别名称)
*/
get levelName(): string;
/**
* Update the default log level (更新默认日志级别)
* @param level Log level (日志级别)
* @param updateCachedLoggers Whether to update the cached loggers (是否更新缓存的日志器)
* @returns Update level success if true (如果为 true 表示更新成功)
*/
updateLevel(level: Level | TLevel, updateCachedLoggers?: boolean): boolean;
/**
* Configure the log factory (配置日志工厂)
* @param param Configuration options (配置选项)
*/
configure({ LoggerClass, level, appenders }?: Config): void;
/**
* Get a logger instance (获取日志实例)
* @param name Logger name (日志名称)
*/
getLogger(name: string): ILogger;
/**
* Clear the logger cache (清除日志缓存)
* @param name Logger name (日志名称)
*/
clear(name?: string): void;
/**
* Dispose the log factory (销毁日志工厂)
*/
dispose(): Promise<any[]>;
}
@@ -0,0 +1 @@
!function(_,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],e):(_="undefined"!=typeof globalThis?globalThis:_||self).dayjs_locale_lo=e(_.dayjs)}(this,(function(_){"use strict";function e(_){return _&&"object"==typeof _&&"default"in _?_:{default:_}}var t=e(_),d={name:"lo",weekdays:"ອາທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ".split("_"),months:"ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ".split("_"),weekdaysShort:"ທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ".split("_"),monthsShort:"ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ".split("_"),weekdaysMin:"ທ_ຈ_ອຄ_ພ_ພຫ_ສກ_ສ".split("_"),ordinal:function(_){return _},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:"ອີກ %s",past:"%sຜ່ານມາ",s:"ບໍ່ເທົ່າໃດວິນາທີ",m:"1 ນາທີ",mm:"%d ນາທີ",h:"1 ຊົ່ວໂມງ",hh:"%d ຊົ່ວໂມງ",d:"1 ມື້",dd:"%d ມື້",M:"1 ເດືອນ",MM:"%d ເດືອນ",y:"1 ປີ",yy:"%d ປີ"}};return t.default.locale(d,null,!0),d}));
@@ -0,0 +1,17 @@
import type * as ts from 'typescript';
declare module 'typescript' {
interface AssertClause extends ts.ImportAttributes {
}
interface AssertEntry extends ts.ImportAttribute {
}
interface SatisfiesExpression extends ts.Node {
}
interface JsxNamespacedName extends ts.Node {
}
interface ImportAttribute extends ts.Node {
}
interface ImportAttributes extends ts.Node {
}
}
export type TSToken = ts.Token<ts.SyntaxKind>;
export type TSNode = ts.ArrayBindingPattern | ts.ArrayLiteralExpression | ts.ArrayTypeNode | ts.ArrowFunction | ts.AsExpression | ts.AssertClause | ts.AssertEntry | ts.AwaitExpression | ts.BigIntLiteral | ts.BinaryExpression | ts.BindingElement | ts.Block | ts.BooleanLiteral | ts.BreakStatement | ts.Bundle | ts.CallExpression | ts.CallSignatureDeclaration | ts.CaseBlock | ts.CaseClause | ts.CatchClause | ts.ClassDeclaration | ts.ClassExpression | ts.ClassStaticBlockDeclaration | ts.CommaListExpression | ts.ComputedPropertyName | ts.ConditionalExpression | ts.ConditionalTypeNode | ts.ConstructorDeclaration | ts.ConstructorTypeNode | ts.ConstructSignatureDeclaration | ts.ContinueStatement | ts.DebuggerStatement | ts.Decorator | ts.DefaultClause | ts.DeleteExpression | ts.DoStatement | ts.ElementAccessExpression | ts.EmptyStatement | ts.EnumDeclaration | ts.EnumMember | ts.ExportAssignment | ts.ExportDeclaration | ts.ExportSpecifier | ts.ExpressionStatement | ts.ExpressionWithTypeArguments | ts.ExternalModuleReference | ts.ForInStatement | ts.ForOfStatement | ts.ForStatement | ts.FunctionDeclaration | ts.FunctionExpression | ts.FunctionTypeNode | ts.GetAccessorDeclaration | ts.HeritageClause | ts.Identifier | ts.IfStatement | ts.ImportAttribute | ts.ImportAttributes | ts.ImportClause | ts.ImportDeclaration | ts.ImportEqualsDeclaration | ts.ImportExpression | ts.ImportSpecifier | ts.ImportTypeNode | ts.IndexedAccessTypeNode | ts.IndexSignatureDeclaration | ts.InferTypeNode | ts.InterfaceDeclaration | ts.IntersectionTypeNode | ts.JSDoc | ts.JSDocAllType | ts.JSDocAugmentsTag | ts.JSDocAuthorTag | ts.JSDocCallbackTag | ts.JSDocClassTag | ts.JSDocEnumTag | ts.JSDocFunctionType | ts.JSDocNonNullableType | ts.JSDocNullableType | ts.JSDocOptionalType | ts.JSDocParameterTag | ts.JSDocPropertyTag | ts.JSDocReturnTag | ts.JSDocSignature | ts.JSDocTemplateTag | ts.JSDocThisTag | ts.JSDocTypedefTag | ts.JSDocTypeExpression | ts.JSDocTypeLiteral | ts.JSDocTypeTag | ts.JSDocUnknownTag | ts.JSDocUnknownType | ts.JSDocVariadicType | ts.JsonMinusNumericLiteral | ts.JsxAttribute | ts.JsxClosingElement | ts.JsxClosingFragment | ts.JsxElement | ts.JsxExpression | ts.JsxFragment | ts.JsxNamespacedName | ts.JsxOpeningElement | ts.JsxOpeningFragment | ts.JsxSelfClosingElement | ts.JsxSpreadAttribute | ts.JsxText | ts.KeywordTypeNode | ts.LabeledStatement | ts.LiteralTypeNode | ts.MappedTypeNode | ts.MetaProperty | ts.MethodDeclaration | ts.MethodSignature | ts.MissingDeclaration | ts.Modifier | ts.ModuleBlock | ts.ModuleDeclaration | ts.NamedExports | ts.NamedImports | ts.NamedTupleMember | ts.NamespaceExportDeclaration | ts.NamespaceImport | ts.NewExpression | ts.NonNullExpression | ts.NoSubstitutionTemplateLiteral | ts.NotEmittedStatement | ts.NullLiteral | ts.NumericLiteral | ts.ObjectBindingPattern | ts.ObjectLiteralExpression | ts.OmittedExpression | ts.OptionalTypeNode | ts.ParameterDeclaration | ts.ParenthesizedExpression | ts.ParenthesizedTypeNode | ts.PartiallyEmittedExpression | ts.PostfixUnaryExpression | ts.PrefixUnaryExpression | ts.PrivateIdentifier | ts.PropertyAccessExpression | ts.PropertyAssignment | ts.PropertyDeclaration | ts.PropertySignature | ts.QualifiedName | ts.RegularExpressionLiteral | ts.RestTypeNode | ts.ReturnStatement | ts.SatisfiesExpression | ts.SemicolonClassElement | ts.SetAccessorDeclaration | ts.ShorthandPropertyAssignment | ts.SourceFile | ts.SpreadAssignment | ts.SpreadElement | ts.StringLiteral | ts.SuperExpression | ts.SwitchStatement | ts.SyntheticExpression | ts.TaggedTemplateExpression | ts.TemplateExpression | ts.TemplateHead | ts.TemplateLiteralTypeNode | ts.TemplateMiddle | ts.TemplateSpan | ts.TemplateTail | ts.ThisExpression | ts.ThisTypeNode | ts.ThrowStatement | ts.TryStatement | ts.TupleTypeNode | ts.TypeAliasDeclaration | ts.TypeAssertion | ts.TypeLiteralNode | ts.TypeOfExpression | ts.TypeOperatorNode | ts.TypeParameterDeclaration | ts.TypePredicateNode | ts.TypeQueryNode | ts.TypeReferenceNode | ts.UnionTypeNode | ts.VariableDeclaration | ts.VariableDeclarationList | ts.VariableStatement | ts.VoidExpression | ts.WhileStatement | ts.WithStatement | ts.YieldExpression;
@@ -0,0 +1,233 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.DEFAULT_EXTENSIONS = void 0;
Object.defineProperty(exports, "File", {
enumerable: true,
get: function () {
return _file.default;
}
});
Object.defineProperty(exports, "buildExternalHelpers", {
enumerable: true,
get: function () {
return _buildExternalHelpers.default;
}
});
Object.defineProperty(exports, "createConfigItem", {
enumerable: true,
get: function () {
return _index2.createConfigItem;
}
});
Object.defineProperty(exports, "createConfigItemAsync", {
enumerable: true,
get: function () {
return _index2.createConfigItemAsync;
}
});
Object.defineProperty(exports, "createConfigItemSync", {
enumerable: true,
get: function () {
return _index2.createConfigItemSync;
}
});
Object.defineProperty(exports, "getEnv", {
enumerable: true,
get: function () {
return _environment.getEnv;
}
});
Object.defineProperty(exports, "loadOptions", {
enumerable: true,
get: function () {
return _index2.loadOptions;
}
});
Object.defineProperty(exports, "loadOptionsAsync", {
enumerable: true,
get: function () {
return _index2.loadOptionsAsync;
}
});
Object.defineProperty(exports, "loadOptionsSync", {
enumerable: true,
get: function () {
return _index2.loadOptionsSync;
}
});
Object.defineProperty(exports, "loadPartialConfig", {
enumerable: true,
get: function () {
return _index2.loadPartialConfig;
}
});
Object.defineProperty(exports, "loadPartialConfigAsync", {
enumerable: true,
get: function () {
return _index2.loadPartialConfigAsync;
}
});
Object.defineProperty(exports, "loadPartialConfigSync", {
enumerable: true,
get: function () {
return _index2.loadPartialConfigSync;
}
});
Object.defineProperty(exports, "parse", {
enumerable: true,
get: function () {
return _parse.parse;
}
});
Object.defineProperty(exports, "parseAsync", {
enumerable: true,
get: function () {
return _parse.parseAsync;
}
});
Object.defineProperty(exports, "parseSync", {
enumerable: true,
get: function () {
return _parse.parseSync;
}
});
exports.resolvePreset = exports.resolvePlugin = void 0;
Object.defineProperty((0, exports), "template", {
enumerable: true,
get: function () {
return _template().default;
}
});
Object.defineProperty((0, exports), "tokTypes", {
enumerable: true,
get: function () {
return _parser().tokTypes;
}
});
Object.defineProperty(exports, "transform", {
enumerable: true,
get: function () {
return _transform.transform;
}
});
Object.defineProperty(exports, "transformAsync", {
enumerable: true,
get: function () {
return _transform.transformAsync;
}
});
Object.defineProperty(exports, "transformFile", {
enumerable: true,
get: function () {
return _transformFile.transformFile;
}
});
Object.defineProperty(exports, "transformFileAsync", {
enumerable: true,
get: function () {
return _transformFile.transformFileAsync;
}
});
Object.defineProperty(exports, "transformFileSync", {
enumerable: true,
get: function () {
return _transformFile.transformFileSync;
}
});
Object.defineProperty(exports, "transformFromAst", {
enumerable: true,
get: function () {
return _transformAst.transformFromAst;
}
});
Object.defineProperty(exports, "transformFromAstAsync", {
enumerable: true,
get: function () {
return _transformAst.transformFromAstAsync;
}
});
Object.defineProperty(exports, "transformFromAstSync", {
enumerable: true,
get: function () {
return _transformAst.transformFromAstSync;
}
});
Object.defineProperty(exports, "transformSync", {
enumerable: true,
get: function () {
return _transform.transformSync;
}
});
Object.defineProperty((0, exports), "traverse", {
enumerable: true,
get: function () {
return _traverse().default;
}
});
exports.version = exports.types = void 0;
var _file = require("./transformation/file/file.js");
var _buildExternalHelpers = require("./tools/build-external-helpers.js");
var resolvers = require("./config/files/index.js");
var _environment = require("./config/helpers/environment.js");
function _types() {
const data = require("@babel/types");
_types = function () {
return data;
};
return data;
}
Object.defineProperty((0, exports), "types", {
enumerable: true,
get: function () {
return _types();
}
});
function _parser() {
const data = require("@babel/parser");
_parser = function () {
return data;
};
return data;
}
function _traverse() {
const data = require("@babel/traverse");
_traverse = function () {
return data;
};
return data;
}
function _template() {
const data = require("@babel/template");
_template = function () {
return data;
};
return data;
}
var _index2 = require("./config/index.js");
var _transform = require("./transform.js");
var _transformFile = require("./transform-file.js");
var _transformAst = require("./transform-ast.js");
var _parse = require("./parse.js");
;
const version = exports.version = "7.28.5";
const resolvePlugin = (name, dirname) => resolvers.resolvePlugin(name, dirname, false).filepath;
exports.resolvePlugin = resolvePlugin;
const resolvePreset = (name, dirname) => resolvers.resolvePreset(name, dirname, false).filepath;
exports.resolvePreset = resolvePreset;
const DEFAULT_EXTENSIONS = exports.DEFAULT_EXTENSIONS = Object.freeze([".js", ".jsx", ".es6", ".es", ".mjs", ".cjs"]);
{
exports.OptionManager = class OptionManager {
init(opts) {
return (0, _index2.loadOptionsSync)(opts);
}
};
exports.Plugin = function Plugin(alias) {
throw new Error(`The (${alias}) Babel 5 plugin is being run with an unsupported Babel version.`);
};
}
0 && (exports.types = exports.traverse = exports.tokTypes = exports.template = 0);
//# sourceMappingURL=index.js.map
@@ -0,0 +1,411 @@
flf2a$ 4 3 20 -1 2
Contessa by Christopher Joseph Pirillo (pirillc2770@cobra.uni.edu)
$$@
$$@
$$@
$$@@
| @
| @
* @
@@
* * @
` ` @
@
@@
_|_|_ @
_|_|_ @
| | @
@@
_;_. @
(_|_ @
._|_) @
` @@
* / @
/ @
/ * @
@@
_;_@
(_|_@
(_|_@
` @@
*@
'@
@
@@
/ @
( @
\ @
@@
\ @
)@
/ @
@@
.|, @
-*- @
'|` @
@@
, @
-+- @
' @
@@
@
@
* @
' @@
@
___ @
@
@@
@
@
* @
@@
/ @
/ @
/ @
@@
_, @
|.| @
|_| @
@@
, @
/| @
.|. @
@@
_, @
'_) @
/_. @
@@
_, @
'_) @
._) @
@@
. , @
|_| @
| @
@@
._, @
|_ @
._) @
@@
._, @
(_ @
(_) @
@@
__, @
/ @
/ @
@@
_, @
(_) @
(_) @
@@
_, @
(_) @
| @
@@
@
* @
* @
@@
@
* @
* @
' @@
/ @
< @
\ @
@@
@
=== @
=== @
@@
\ @
>@
/ @
@@
_ @
' )@
; @
@@
__ @
/(]| @
\__/ @
@@
.__.@
[__]@
| |@
@@
.__ @
[__)@
[__)@
@@
__ @
/ `@
\__.@
@@
.__ @
| \@
|__/@
@@
.___@
[__ @
[___@
@@
.___@
[__ @
| @
@@
.__ @
[ __@
[_./@
@@
. .@
|__|@
| |@
@@
._.@
| @
_|_@
@@
.@
|@
\__|@
@@
. .@
|_/ @
| \@
@@
. @
| @
|___@
@@
. .@
|\/|@
| |@
@@
. .@
|\ |@
| \|@
@@
.__.@
| |@
|__|@
@@
.__ @
[__)@
| @
@@
.__.@
| |@
|__\@
@@
.__ @
[__)@
| \@
@@
__.@
(__ @
.__)@
@@
.___.@
| @
| @
@@
. .@
| |@
|__|@
@@
. .@
\ /@
\/ @
@@
. .@
| |@
|/\|@
@@
\ /@
>< @
/ \@
@@
. ,@
\./ @
| @
@@
.___.@
_/ @
./__.@
@@
[~ @
[ @
[_ @
@@
\ @
\ @
\ @
@@
~]@
]@
_]@
@@
/\ @
@
@
@@
@
@
____@
@@
* @
` @
@
@@
@
_.@
(_]@
@@
. @
|_ @
[_)@
@@
@
_.@
(_.@
@@
.@
_|@
(_]@
@@
@
_ @
(/,@
@@
._@
|,@
| @
@@
@
_ @
(_]@
._|@@
. @
|_ @
[ )@
@@
@
*@
|@
@@
@
*@
|@
._|@@
. @
;_/@
| \@
@@
.@
|@
|@
@@
@
._ _ @
[ | )@
@@
@
._ @
[ )@
@@
@
_ @
(_)@
@@
@
._ @
[_)@
| @@
@
_.@
(_]@
|@@
@
._.@
[ @
@@
@
__@
_) @
@@
, @
-+-@
| @
@@
@
. .@
(_|@
@@
@
. ,@
\/ @
@@
@
. ,@
\/\/ @
@@
@
\./@
/'\@
@@
@
.@
\_|@
._|@@
@
__.@
/_@
@@
/ @
> @
\ @
@@
| @
| @
| @
@@
\ @
< @
/ @
@@
/\ @
\/ @
@
@@
oo @
|__|@
| |@
@@
oo @
/``\@
\__/@
@@
oo @
: ;@
|__|@
@@
@
oo @
(_|,@
@@
oo @
__ @
(__)@
@@
oo @
. ,@
|__|@
@@
__ @
| )@
| >@
@@
@@ -0,0 +1,34 @@
import { OneBotAction } from '../../action/OneBotAction';
import { Static } from '@sinclair/typebox';
declare const PayloadSchema: import("@sinclair/typebox").TObject<{
group_id: import("@sinclair/typebox").TString;
album_id: import("@sinclair/typebox").TString;
album_name: import("@sinclair/typebox").TString;
file: import("@sinclair/typebox").TString;
}>;
type PayloadType = Static<typeof PayloadSchema>;
declare const ReturnSchema: import("@sinclair/typebox").TAny;
type ReturnType = Static<typeof ReturnSchema>;
export declare class UploadImageToQunAlbum extends OneBotAction<PayloadType, ReturnType> {
actionName: "upload_image_to_qun_album";
actionSummary: string;
actionTags: string[];
payloadExample: {
group_id: string;
album_id: string;
album_name: string;
file: string;
};
returnExample: {
result: null;
};
payloadSchema: import("@sinclair/typebox").TObject<{
group_id: import("@sinclair/typebox").TString;
album_id: import("@sinclair/typebox").TString;
album_name: import("@sinclair/typebox").TString;
file: import("@sinclair/typebox").TString;
}>;
returnSchema: import("@sinclair/typebox").TAny;
_handle(payload: PayloadType): Promise<void>;
}
export {};
@@ -0,0 +1,43 @@
var $3187c0e19200cb16$exports = require("./GridKeyboardDelegate.main.js");
var $11d770dfabe45077$exports = require("./useGrid.main.js");
var $c7def85a57100898$exports = require("./useGridRowGroup.main.js");
var $eed398987c639831$exports = require("./useGridRow.main.js");
var $cf2021be63b01ef4$exports = require("./useGridCell.main.js");
var $d8385f73d3701365$exports = require("./useGridSelectionCheckbox.main.js");
var $340f2fcd0ef9ce8d$exports = require("./useHighlightSelectionDescription.main.js");
var $1eb174acfe8a0f16$exports = require("./useGridSelectionAnnouncement.main.js");
function $parcel$export(e, n, v, s) {
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
}
$parcel$export(module.exports, "GridKeyboardDelegate", () => $3187c0e19200cb16$exports.GridKeyboardDelegate);
$parcel$export(module.exports, "useGrid", () => $11d770dfabe45077$exports.useGrid);
$parcel$export(module.exports, "useGridRowGroup", () => $c7def85a57100898$exports.useGridRowGroup);
$parcel$export(module.exports, "useGridRow", () => $eed398987c639831$exports.useGridRow);
$parcel$export(module.exports, "useGridCell", () => $cf2021be63b01ef4$exports.useGridCell);
$parcel$export(module.exports, "useGridSelectionCheckbox", () => $d8385f73d3701365$exports.useGridSelectionCheckbox);
$parcel$export(module.exports, "useHighlightSelectionDescription", () => $340f2fcd0ef9ce8d$exports.useHighlightSelectionDescription);
$parcel$export(module.exports, "useGridSelectionAnnouncement", () => $1eb174acfe8a0f16$exports.useGridSelectionAnnouncement);
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
//# sourceMappingURL=main.js.map
@@ -0,0 +1,269 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("@typescript-eslint/utils");
const util_1 = require("../util");
exports.default = (0, util_1.createRule)({
name: 'no-type-alias',
meta: {
type: 'suggestion',
deprecated: {
deprecatedSince: '6.0.0',
replacedBy: [
{
rule: {
name: '@typescript-eslint/consistent-type-definitions',
url: 'https://typescript-eslint.io/rules/consistent-type-definitions',
},
},
],
url: 'https://github.com/typescript-eslint/typescript-eslint/pull/6229',
},
docs: {
description: 'Disallow type aliases',
// too opinionated to be recommended
},
messages: {
noCompositionAlias: '{{typeName}} in {{compositionType}} types are not allowed.',
noTypeAlias: 'Type {{alias}} are not allowed.',
},
schema: [
{
type: 'object',
$defs: {
expandedOptions: {
type: 'string',
enum: [
'always',
'never',
'in-unions',
'in-intersections',
'in-unions-and-intersections',
],
},
simpleOptions: {
type: 'string',
enum: ['always', 'never'],
},
},
additionalProperties: false,
properties: {
allowAliases: {
$ref: '#/items/0/$defs/expandedOptions',
description: 'Whether to allow direct one-to-one type aliases.',
},
allowCallbacks: {
$ref: '#/items/0/$defs/simpleOptions',
description: 'Whether to allow type aliases for callbacks.',
},
allowConditionalTypes: {
$ref: '#/items/0/$defs/simpleOptions',
description: 'Whether to allow type aliases for conditional types.',
},
allowConstructors: {
$ref: '#/items/0/$defs/simpleOptions',
description: 'Whether to allow type aliases with constructors.',
},
allowGenerics: {
$ref: '#/items/0/$defs/simpleOptions',
description: 'Whether to allow type aliases with generic types.',
},
allowLiterals: {
$ref: '#/items/0/$defs/expandedOptions',
description: 'Whether to allow type aliases with object literal types.',
},
allowMappedTypes: {
$ref: '#/items/0/$defs/expandedOptions',
description: 'Whether to allow type aliases with mapped types.',
},
allowTupleTypes: {
$ref: '#/items/0/$defs/expandedOptions',
description: 'Whether to allow type aliases with tuple types.',
},
},
},
],
},
defaultOptions: [
{
allowAliases: 'never',
allowCallbacks: 'never',
allowConditionalTypes: 'never',
allowConstructors: 'never',
allowGenerics: 'never',
allowLiterals: 'never',
allowMappedTypes: 'never',
allowTupleTypes: 'never',
},
],
create(context, [{ allowAliases, allowCallbacks, allowConditionalTypes, allowConstructors, allowGenerics, allowLiterals, allowMappedTypes, allowTupleTypes, },]) {
const unions = ['always', 'in-unions', 'in-unions-and-intersections'];
const intersections = [
'always',
'in-intersections',
'in-unions-and-intersections',
];
const compositions = [
'in-unions',
'in-intersections',
'in-unions-and-intersections',
];
const aliasTypes = new Set([
utils_1.AST_NODE_TYPES.TSArrayType,
utils_1.AST_NODE_TYPES.TSImportType,
utils_1.AST_NODE_TYPES.TSIndexedAccessType,
utils_1.AST_NODE_TYPES.TSLiteralType,
utils_1.AST_NODE_TYPES.TSTemplateLiteralType,
utils_1.AST_NODE_TYPES.TSTypeQuery,
utils_1.AST_NODE_TYPES.TSTypeReference,
]);
/**
* Determines if the composition type is supported by the allowed flags.
* @param isTopLevel a flag indicating this is the top level node.
* @param compositionType the composition type (either TSUnionType or TSIntersectionType)
* @param allowed the currently allowed flags.
*/
function isSupportedComposition(isTopLevel, compositionType, allowed) {
return (!compositions.includes(allowed) ||
(!isTopLevel &&
((compositionType === utils_1.AST_NODE_TYPES.TSUnionType &&
unions.includes(allowed)) ||
(compositionType === utils_1.AST_NODE_TYPES.TSIntersectionType &&
intersections.includes(allowed)))));
}
/**
* Gets the message to be displayed based on the node type and whether the node is a top level declaration.
* @param node the location
* @param compositionType the type of composition this alias is part of (undefined if not
* part of a composition)
* @param isRoot a flag indicating we are dealing with the top level declaration.
* @param type the kind of type alias being validated.
*/
function reportError(node, compositionType, isRoot, type) {
if (isRoot) {
return context.report({
node,
messageId: 'noTypeAlias',
data: {
alias: type.toLowerCase(),
},
});
}
return context.report({
node,
messageId: 'noCompositionAlias',
data: {
compositionType: compositionType === utils_1.AST_NODE_TYPES.TSUnionType
? 'union'
: 'intersection',
typeName: type,
},
});
}
const isValidTupleType = (type) => {
if (type.node.type === utils_1.AST_NODE_TYPES.TSTupleType) {
return true;
}
if (type.node.type === utils_1.AST_NODE_TYPES.TSTypeOperator &&
['keyof', 'readonly'].includes(type.node.operator) &&
type.node.typeAnnotation &&
type.node.typeAnnotation.type === utils_1.AST_NODE_TYPES.TSTupleType) {
return true;
}
return false;
};
const isValidGeneric = (type) => {
return (type.node.type === utils_1.AST_NODE_TYPES.TSTypeReference &&
type.node.typeArguments != null);
};
const checkAndReport = (optionValue, isTopLevel, type, label) => {
if (optionValue === 'never' ||
!isSupportedComposition(isTopLevel, type.compositionType, optionValue)) {
reportError(type.node, type.compositionType, isTopLevel, label);
}
};
/**
* Validates the node looking for aliases, callbacks and literals.
* @param type the type of composition this alias is part of (null if not
* part of a composition)
* @param isTopLevel a flag indicating this is the top level node.
*/
function validateTypeAliases(type, isTopLevel = false) {
// https://github.com/typescript-eslint/typescript-eslint/issues/5439
/* eslint-disable @typescript-eslint/no-non-null-assertion */
if (type.node.type === utils_1.AST_NODE_TYPES.TSFunctionType) {
// callback
if (allowCallbacks === 'never') {
reportError(type.node, type.compositionType, isTopLevel, 'Callbacks');
}
}
else if (type.node.type === utils_1.AST_NODE_TYPES.TSConditionalType) {
// conditional type
if (allowConditionalTypes === 'never') {
reportError(type.node, type.compositionType, isTopLevel, 'Conditional types');
}
}
else if (type.node.type === utils_1.AST_NODE_TYPES.TSConstructorType) {
if (allowConstructors === 'never') {
reportError(type.node, type.compositionType, isTopLevel, 'Constructors');
}
}
else if (type.node.type === utils_1.AST_NODE_TYPES.TSTypeLiteral) {
// literal object type
checkAndReport(allowLiterals, isTopLevel, type, 'Literals');
}
else if (type.node.type === utils_1.AST_NODE_TYPES.TSMappedType) {
// mapped type
checkAndReport(allowMappedTypes, isTopLevel, type, 'Mapped types');
}
else if (isValidTupleType(type)) {
// tuple types
checkAndReport(allowTupleTypes, isTopLevel, type, 'Tuple Types');
}
else if (isValidGeneric(type)) {
if (allowGenerics === 'never') {
reportError(type.node, type.compositionType, isTopLevel, 'Generics');
}
}
else if (type.node.type.endsWith(utils_1.AST_TOKEN_TYPES.Keyword) ||
aliasTypes.has(type.node.type) ||
(type.node.type === utils_1.AST_NODE_TYPES.TSTypeOperator &&
(type.node.operator === 'keyof' ||
(type.node.operator === 'readonly' &&
type.node.typeAnnotation &&
aliasTypes.has(type.node.typeAnnotation.type))))) {
// alias / keyword
checkAndReport(allowAliases, isTopLevel, type, 'Aliases');
}
else {
// unhandled type - shouldn't happen
reportError(type.node, type.compositionType, isTopLevel, 'Unhandled');
}
/* eslint-enable @typescript-eslint/no-non-null-assertion */
}
/**
* Flatten the given type into an array of its dependencies
*/
function getTypes(node, compositionType = null) {
if (node.type === utils_1.AST_NODE_TYPES.TSUnionType ||
node.type === utils_1.AST_NODE_TYPES.TSIntersectionType) {
return node.types.flatMap(type => getTypes(type, node.type));
}
return [{ node, compositionType }];
}
return {
TSTypeAliasDeclaration(node) {
const types = getTypes(node.typeAnnotation);
if (types.length === 1) {
// is a top level type annotation
validateTypeAliases(types[0], true);
}
else {
// is a composition type
types.forEach(type => {
validateTypeAliases(type);
});
}
},
};
},
});
@@ -0,0 +1,3 @@
import { InjectFromBaseOptions } from '../models/InjectFromBaseOptions';
export declare function injectFromBase(options?: InjectFromBaseOptions): ClassDecorator;
//# sourceMappingURL=injectFromBase.d.ts.map
@@ -0,0 +1,348 @@
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.MotionUtils = {}));
})(this, (function (exports) { 'use strict';
function addUniqueItem(arr, item) {
if (arr.indexOf(item) === -1)
arr.push(item);
}
function removeItem(arr, item) {
const index = arr.indexOf(item);
if (index > -1)
arr.splice(index, 1);
}
// Adapted from array-move
function moveItem([...arr], fromIndex, toIndex) {
const startIndex = fromIndex < 0 ? arr.length + fromIndex : fromIndex;
if (startIndex >= 0 && startIndex < arr.length) {
const endIndex = toIndex < 0 ? arr.length + toIndex : toIndex;
const [item] = arr.splice(fromIndex, 1);
arr.splice(endIndex, 0, item);
}
return arr;
}
const clamp = (min, max, v) => {
if (v > max)
return max;
if (v < min)
return min;
return v;
};
function formatErrorMessage(message, errorCode) {
return errorCode
? `${message}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${errorCode}`
: message;
}
exports.warning = () => { };
exports.invariant = () => { };
{
exports.warning = (check, message, errorCode) => {
if (!check && typeof console !== "undefined") {
console.warn(formatErrorMessage(message, errorCode));
}
};
exports.invariant = (check, message, errorCode) => {
if (!check) {
throw new Error(formatErrorMessage(message, errorCode));
}
};
}
const MotionGlobalConfig = {};
/**
* Check if value is a numerical string, ie a string that is purely a number eg "100" or "-100.1"
*/
const isNumericalString = (v) => /^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(v);
function isObject(value) {
return typeof value === "object" && value !== null;
}
/**
* Check if the value is a zero value string like "0px" or "0%"
*/
const isZeroValueString = (v) => /^0[^.\s]+$/u.test(v);
/*#__NO_SIDE_EFFECTS__*/
function memo(callback) {
let result;
return () => {
if (result === undefined)
result = callback();
return result;
};
}
/*#__NO_SIDE_EFFECTS__*/
const noop = (any) => any;
/**
* Pipe
* Compose other transformers to run linearily
* pipe(min(20), max(40))
* @param {...functions} transformers
* @return {function}
*/
const combineFunctions = (a, b) => (v) => b(a(v));
const pipe = (...transformers) => transformers.reduce(combineFunctions);
/*
Progress within given range
Given a lower limit and an upper limit, we return the progress
(expressed as a number 0-1) represented by the given value, and
limit that progress to within 0-1.
@param [number]: Lower limit
@param [number]: Upper limit
@param [number]: Value to find progress within given range
@return [number]: Progress of value within range as expressed 0-1
*/
/*#__NO_SIDE_EFFECTS__*/
const progress = (from, to, value) => {
const toFromDifference = to - from;
return toFromDifference === 0 ? 1 : (value - from) / toFromDifference;
};
class SubscriptionManager {
constructor() {
this.subscriptions = [];
}
add(handler) {
addUniqueItem(this.subscriptions, handler);
return () => removeItem(this.subscriptions, handler);
}
notify(a, b, c) {
const numSubscriptions = this.subscriptions.length;
if (!numSubscriptions)
return;
if (numSubscriptions === 1) {
/**
* If there's only a single handler we can just call it without invoking a loop.
*/
this.subscriptions[0](a, b, c);
}
else {
for (let i = 0; i < numSubscriptions; i++) {
/**
* Check whether the handler exists before firing as it's possible
* the subscriptions were modified during this loop running.
*/
const handler = this.subscriptions[i];
handler && handler(a, b, c);
}
}
}
getSize() {
return this.subscriptions.length;
}
clear() {
this.subscriptions.length = 0;
}
}
/**
* Converts seconds to milliseconds
*
* @param seconds - Time in seconds.
* @return milliseconds - Converted time in milliseconds.
*/
/*#__NO_SIDE_EFFECTS__*/
const secondsToMilliseconds = (seconds) => seconds * 1000;
/*#__NO_SIDE_EFFECTS__*/
const millisecondsToSeconds = (milliseconds) => milliseconds / 1000;
/*
Convert velocity into velocity per second
@param [number]: Unit per frame
@param [number]: Frame duration in ms
*/
function velocityPerSecond(velocity, frameDuration) {
return frameDuration ? velocity * (1000 / frameDuration) : 0;
}
const warned = new Set();
function hasWarned(message) {
return warned.has(message);
}
function warnOnce(condition, message, errorCode) {
if (condition || warned.has(message))
return;
console.warn(formatErrorMessage(message, errorCode));
warned.add(message);
}
const wrap = (min, max, v) => {
const rangeSize = max - min;
return ((((v - min) % rangeSize) + rangeSize) % rangeSize) + min;
};
/*
Bezier function generator
This has been modified from Gaëtan Renaudeau's BezierEasing
https://github.com/gre/bezier-easing/blob/master/src/index.js
https://github.com/gre/bezier-easing/blob/master/LICENSE
I've removed the newtonRaphsonIterate algo because in benchmarking it
wasn't noticeably faster than binarySubdivision, indeed removing it
usually improved times, depending on the curve.
I also removed the lookup table, as for the added bundle size and loop we're
only cutting ~4 or so subdivision iterations. I bumped the max iterations up
to 12 to compensate and this still tended to be faster for no perceivable
loss in accuracy.
Usage
const easeOut = cubicBezier(.17,.67,.83,.67);
const x = easeOut(0.5); // returns 0.627...
*/
// Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2.
const calcBezier = (t, a1, a2) => (((1.0 - 3.0 * a2 + 3.0 * a1) * t + (3.0 * a2 - 6.0 * a1)) * t + 3.0 * a1) *
t;
const subdivisionPrecision = 0.0000001;
const subdivisionMaxIterations = 12;
function binarySubdivide(x, lowerBound, upperBound, mX1, mX2) {
let currentX;
let currentT;
let i = 0;
do {
currentT = lowerBound + (upperBound - lowerBound) / 2.0;
currentX = calcBezier(currentT, mX1, mX2) - x;
if (currentX > 0.0) {
upperBound = currentT;
}
else {
lowerBound = currentT;
}
} while (Math.abs(currentX) > subdivisionPrecision &&
++i < subdivisionMaxIterations);
return currentT;
}
function cubicBezier(mX1, mY1, mX2, mY2) {
// If this is a linear gradient, return linear easing
if (mX1 === mY1 && mX2 === mY2)
return noop;
const getTForX = (aX) => binarySubdivide(aX, 0, 1, mX1, mX2);
// If animation is at start/end, return t without easing
return (t) => t === 0 || t === 1 ? t : calcBezier(getTForX(t), mY1, mY2);
}
// Accepts an easing function and returns a new one that outputs mirrored values for
// the second half of the animation. Turns easeIn into easeInOut.
const mirrorEasing = (easing) => (p) => p <= 0.5 ? easing(2 * p) / 2 : (2 - easing(2 * (1 - p))) / 2;
// Accepts an easing function and returns a new one that outputs reversed values.
// Turns easeIn into easeOut.
const reverseEasing = (easing) => (p) => 1 - easing(1 - p);
const backOut = /*@__PURE__*/ cubicBezier(0.33, 1.53, 0.69, 0.99);
const backIn = /*@__PURE__*/ reverseEasing(backOut);
const backInOut = /*@__PURE__*/ mirrorEasing(backIn);
const anticipate = (p) => (p *= 2) < 1 ? 0.5 * backIn(p) : 0.5 * (2 - Math.pow(2, -10 * (p - 1)));
const circIn = (p) => 1 - Math.sin(Math.acos(p));
const circOut = reverseEasing(circIn);
const circInOut = mirrorEasing(circIn);
const easeIn = /*@__PURE__*/ cubicBezier(0.42, 0, 1, 1);
const easeOut = /*@__PURE__*/ cubicBezier(0, 0, 0.58, 1);
const easeInOut = /*@__PURE__*/ cubicBezier(0.42, 0, 0.58, 1);
function steps(numSteps, direction = "end") {
return (progress) => {
progress =
direction === "end"
? Math.min(progress, 0.999)
: Math.max(progress, 0.001);
const expanded = progress * numSteps;
const rounded = direction === "end" ? Math.floor(expanded) : Math.ceil(expanded);
return clamp(0, 1, rounded / numSteps);
};
}
const isEasingArray = (ease) => {
return Array.isArray(ease) && typeof ease[0] !== "number";
};
function getEasingForSegment(easing, i) {
return isEasingArray(easing) ? easing[wrap(0, easing.length, i)] : easing;
}
const isBezierDefinition = (easing) => Array.isArray(easing) && typeof easing[0] === "number";
const easingLookup = {
linear: noop,
easeIn,
easeInOut,
easeOut,
circIn,
circInOut,
circOut,
backIn,
backInOut,
backOut,
anticipate,
};
const isValidEasing = (easing) => {
return typeof easing === "string";
};
const easingDefinitionToFunction = (definition) => {
if (isBezierDefinition(definition)) {
// If cubic bezier definition, create bezier curve
exports.invariant(definition.length === 4, `Cubic bezier arrays must contain four numerical values.`, "cubic-bezier-length");
const [x1, y1, x2, y2] = definition;
return cubicBezier(x1, y1, x2, y2);
}
else if (isValidEasing(definition)) {
// Else lookup from table
exports.invariant(easingLookup[definition] !== undefined, `Invalid easing type '${definition}'`, "invalid-easing-type");
return easingLookup[definition];
}
return definition;
};
exports.MotionGlobalConfig = MotionGlobalConfig;
exports.SubscriptionManager = SubscriptionManager;
exports.addUniqueItem = addUniqueItem;
exports.anticipate = anticipate;
exports.backIn = backIn;
exports.backInOut = backInOut;
exports.backOut = backOut;
exports.circIn = circIn;
exports.circInOut = circInOut;
exports.circOut = circOut;
exports.clamp = clamp;
exports.cubicBezier = cubicBezier;
exports.easeIn = easeIn;
exports.easeInOut = easeInOut;
exports.easeOut = easeOut;
exports.easingDefinitionToFunction = easingDefinitionToFunction;
exports.getEasingForSegment = getEasingForSegment;
exports.hasWarned = hasWarned;
exports.isBezierDefinition = isBezierDefinition;
exports.isEasingArray = isEasingArray;
exports.isNumericalString = isNumericalString;
exports.isObject = isObject;
exports.isZeroValueString = isZeroValueString;
exports.memo = memo;
exports.millisecondsToSeconds = millisecondsToSeconds;
exports.mirrorEasing = mirrorEasing;
exports.moveItem = moveItem;
exports.noop = noop;
exports.pipe = pipe;
exports.progress = progress;
exports.removeItem = removeItem;
exports.reverseEasing = reverseEasing;
exports.secondsToMilliseconds = secondsToMilliseconds;
exports.steps = steps;
exports.velocityPerSecond = velocityPerSecond;
exports.warnOnce = warnOnce;
exports.wrap = wrap;
}));
@@ -0,0 +1,64 @@
import baseRest from './_baseRest.js';
import eq from './eq.js';
import isIterateeCall from './_isIterateeCall.js';
import keysIn from './keysIn.js';
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* Assigns own and inherited enumerable string keyed properties of source
* objects to the destination object for all destination properties that
* resolve to `undefined`. Source objects are applied from left to right.
* Once a property is set, additional values of the same property are ignored.
*
* **Note:** This method mutates `object`.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Object
* @param {Object} object The destination object.
* @param {...Object} [sources] The source objects.
* @returns {Object} Returns `object`.
* @see _.defaultsDeep
* @example
*
* _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
* // => { 'a': 1, 'b': 2 }
*/
var defaults = baseRest(function(object, sources) {
object = Object(object);
var index = -1;
var length = sources.length;
var guard = length > 2 ? sources[2] : undefined;
if (guard && isIterateeCall(sources[0], sources[1], guard)) {
length = 1;
}
while (++index < length) {
var source = sources[index];
var props = keysIn(source);
var propsIndex = -1;
var propsLength = props.length;
while (++propsIndex < propsLength) {
var key = props[propsIndex];
var value = object[key];
if (value === undefined ||
(eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {
object[key] = source[key];
}
}
}
return object;
});
export default defaults;
@@ -0,0 +1,234 @@
# micromark-factory-destination
[![Build][build-badge]][build]
[![Coverage][coverage-badge]][coverage]
[![Downloads][downloads-badge]][downloads]
[![Size][bundle-size-badge]][bundle-size]
[![Sponsors][sponsors-badge]][opencollective]
[![Backers][backers-badge]][opencollective]
[![Chat][chat-badge]][chat]
[micromark][] factory to parse destinations (found in resources, definitions).
## Contents
* [What is this?](#what-is-this)
* [When should I use this?](#when-should-i-use-this)
* [Install](#install)
* [Use](#use)
* [API](#api)
* [`factoryDestination(…)`](#factorydestination)
* [Types](#types)
* [Compatibility](#compatibility)
* [Security](#security)
* [Contribute](#contribute)
* [License](#license)
## What is this?
This package exposes states to parse destinations.
## When should I use this?
This package is useful when you are making your own micromark extensions.
## Install
This package is [ESM only][esm].
In Node.js (version 16+), install with [npm][]:
```sh
npm install micromark-factory-destination
```
In Deno with [`esm.sh`][esmsh]:
```js
import {factoryDestination} from 'https://esm.sh/micromark-factory-destination@1'
```
In browsers with [`esm.sh`][esmsh]:
```html
<script type="module">
import {factoryDestination} from 'https://esm.sh/micromark-factory-destination@1?bundle'
</script>
```
## Use
```js
import {factoryDestination} from 'micromark-factory-destination'
import {codes, types} from 'micromark-util-symbol'
// A micromark tokenizer that uses the factory:
/**
* @this {TokenizeContext}
* Context.
* @type {Tokenizer}
*/
function tokenizeResource(effects, ok, nok) {
return start
// …
/** @type {State} */
function open(code) {
if (code === codes.rightParenthesis) {
return end(code)
}
return factoryDestination(
effects,
destinationAfter,
nok,
types.resourceDestination,
types.resourceDestinationLiteral,
types.resourceDestinationLiteralMarker,
types.resourceDestinationRaw,
types.resourceDestinationString,
constants.linkResourceDestinationBalanceMax
)(code)
}
// …
}
```
## API
This module exports the identifier
[`factoryDestination`][api-factory-destination].
There is no default export.
### `factoryDestination(…)`
Parse destinations.
###### Examples
```markdown
<a>
<a\>b>
<a b>
<a)>
a
a\)b
a(b)c
a(b)
```
###### Parameters
* `effects` (`Effects`)
— context
* `ok` (`State`)
— state switched to when successful
* `nok` (`State`)
— state switched to when unsuccessful
* `type` (`string`)
— type for whole (`<a>` or `b`)
* `literalType` (`string`)
— type when enclosed (`<a>`)
* `literalMarkerType` (`string`)
— type for enclosing (`<` and `>`)
* `rawType` (`string`)
— type when not enclosed (`b`)
* `stringType` (`string`)
— type for the value (`a` or `b`)
* `max` (`number`, default: `Infinity`)
— depth of nested parens (inclusive)
###### Returns
Start state (`State`).
## Types
This package is fully typed with [TypeScript][].
It exports no additional types.
## Compatibility
Projects maintained by the unified collective are compatible with maintained
versions of Node.js.
When we cut a new major release, we drop support for unmaintained versions of
Node.
This means we try to keep the current release line,
`micromark-factory-destination@2`, compatible with Node.js 16.
This package works with `micromark@3`.
## Security
This package is safe.
See [`security.md`][securitymd] in [`micromark/.github`][health] for how to
submit a security report.
## Contribute
See [`contributing.md`][contributing] in [`micromark/.github`][health] for ways
to get started.
See [`support.md`][support] for ways to get help.
This project has a [code of conduct][coc].
By interacting with this repository, organisation, or community you agree to
abide by its terms.
## License
[MIT][license] © [Titus Wormer][author]
<!-- Definitions -->
[build-badge]: https://github.com/micromark/micromark/workflows/main/badge.svg
[build]: https://github.com/micromark/micromark/actions
[coverage-badge]: https://img.shields.io/codecov/c/github/micromark/micromark.svg
[coverage]: https://codecov.io/github/micromark/micromark
[downloads-badge]: https://img.shields.io/npm/dm/micromark-factory-destination.svg
[downloads]: https://www.npmjs.com/package/micromark-factory-destination
[bundle-size-badge]: https://img.shields.io/badge/dynamic/json?label=minzipped%20size&query=$.size.compressedSize&url=https://deno.bundlejs.com/?q=micromark-factory-destination
[bundle-size]: https://bundlejs.com/?q=micromark-factory-destination
[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg
[backers-badge]: https://opencollective.com/unified/backers/badge.svg
[opencollective]: https://opencollective.com/unified
[npm]: https://docs.npmjs.com/cli/install
[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
[esmsh]: https://esm.sh
[chat-badge]: https://img.shields.io/badge/chat-discussions-success.svg
[chat]: https://github.com/micromark/micromark/discussions
[license]: https://github.com/micromark/micromark/blob/main/license
[author]: https://wooorm.com
[health]: https://github.com/micromark/.github
[securitymd]: https://github.com/micromark/.github/blob/main/security.md
[contributing]: https://github.com/micromark/.github/blob/main/contributing.md
[support]: https://github.com/micromark/.github/blob/main/support.md
[coc]: https://github.com/micromark/.github/blob/main/code-of-conduct.md
[typescript]: https://www.typescriptlang.org
[micromark]: https://github.com/micromark/micromark
[api-factory-destination]: #factorydestination
@@ -0,0 +1,28 @@
/**
* The inverse of `_.toPairs`; this method returns an object composed
* from key-value `pairs`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Array
* @param {Array} pairs The key-value pairs.
* @returns {Object} Returns the new object.
* @example
*
* _.fromPairs([['a', 1], ['b', 2]]);
* // => { 'a': 1, 'b': 2 }
*/
function fromPairs(pairs) {
var index = -1,
length = pairs == null ? 0 : pairs.length,
result = {};
while (++index < length) {
var pair = pairs[index];
result[pair[0]] = pair[1];
}
return result;
}
module.exports = fromPairs;
@@ -0,0 +1,3 @@
import type { TSESLint } from '@typescript-eslint/utils';
declare const _default: TSESLint.RuleModule<"dynamicDelete", [], import("../../rules").ESLintPluginDocs, TSESLint.RuleListener>;
export default _default;
@@ -0,0 +1,70 @@
/**
* FFmpeg Node.js Native Addon Type Definitions
*
* This addon provides FFmpeg functionality for Node.js including:
* - Video information extraction with thumbnail generation
* - Audio/Video duration detection
* - Audio format conversion to NTSILK
* - Audio decoding to PCM
*/
/**
* Video information result object
*/
export interface VideoInfo {
/** Video width in pixels */
width: number;
/** Video height in pixels */
height: number;
/** Video duration in seconds */
duration: number;
/** Container format name (e.g., "mp4", "mkv", "avi") */
format: string;
/** Video codec name (e.g., "h264", "hevc", "vp9") */
videoCodec: string;
/** First frame thumbnail as BMP image buffer */
image: Buffer;
}
/**
* Audio PCM decoding result object
*/
export interface AudioPCMResult {
/** PCM audio data as 16-bit signed integer samples */
pcm: Buffer;
/** Sample rate in Hz (e.g., 44100, 48000, 24000) */
sampleRate: number;
/** Number of audio channels (1 for mono, 2 for stereo) */
channels: number;
}
/**
* FFmpeg interface providing all audio/video processing methods
*/
export interface FFmpeg {
convertFile(inputFile: string, outputFile: string, format: string): Promise<{
success: boolean;
}>;
/**
* Get video information including resolution, duration, format, codec and first frame thumbnail
*/
getVideoInfo(filePath: string, format?: 'bmp' | 'bmp24'): Promise<VideoInfo>;
/**
* Get duration of audio or video file in seconds
*/
getDuration(filePath: string): Promise<number>;
/**
* Convert audio file to NTSILK format (WeChat voice message format)
*/
convertToNTSilkTct(inputPath: string, outputPath: string): Promise<void>;
/**
* Decode audio file to raw PCM data
*/
decodeAudioToPCM(filePath: string, pcmPath: string, sampleRate?: number): Promise<{
result: boolean;
sampleRate: number;
}>;
decodeAudioToFmt(filePath: string, pcmPath: string, format: string): Promise<{
channels: number;
sampleRate: number;
format: string;
}>;
convertToNTSilkTct(inputFile: string, outputFile: string): Promise<void>;
}
@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2012 James Halliday, Josh Duff, and other contributors
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,8 @@
/**
* Check if the given character code, or the character code at the first
* character, is hexadecimal.
*
* @param {string|number} character
* @returns {boolean} Whether `character` is hexadecimal
*/
export function isHexadecimal(character: string | number): boolean
@@ -0,0 +1,21 @@
/** Error message constants. */
var FUNC_ERROR_TEXT = 'Expected a function';
/**
* The base implementation of `_.delay` and `_.defer` which accepts `args`
* to provide to `func`.
*
* @private
* @param {Function} func The function to delay.
* @param {number} wait The number of milliseconds to delay invocation.
* @param {Array} args The arguments to provide to `func`.
* @returns {number|Object} Returns the timer id or timeout object.
*/
function baseDelay(func, wait, args) {
if (typeof func != 'function') {
throw new TypeError(FUNC_ERROR_TEXT);
}
return setTimeout(function() { func.apply(undefined, args); }, wait);
}
module.exports = baseDelay;
@@ -0,0 +1,24 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.IndexFromMappedResult = IndexFromMappedResult;
const index_1 = require("../mapped/index");
const indexed_property_keys_1 = require("./indexed-property-keys");
const index_2 = require("./index");
// prettier-ignore
function FromProperties(type, properties, options) {
const result = {};
for (const K2 of Object.getOwnPropertyNames(properties)) {
result[K2] = (0, index_2.Index)(type, (0, indexed_property_keys_1.IndexPropertyKeys)(properties[K2]), options);
}
return result;
}
// prettier-ignore
function FromMappedResult(type, mappedResult, options) {
return FromProperties(type, mappedResult.properties, options);
}
// prettier-ignore
function IndexFromMappedResult(type, mappedResult, options) {
const properties = FromMappedResult(type, mappedResult, options);
return (0, index_1.MappedResult)(properties);
}
@@ -0,0 +1,38 @@
import {isAppleDevice as $jUnAJ$isAppleDevice, useId as $jUnAJ$useId} from "@react-aria/utils";
/*
* 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 $feb5ffebff200149$export$d3e3bd3e26688c04(e) {
// Ctrl + Arrow Up/Arrow Down has a system wide meaning on macOS, so use Alt instead.
// On Windows and Ubuntu, Alt + Space has a system wide meaning.
return (0, $jUnAJ$isAppleDevice)() ? e.altKey : e.ctrlKey;
}
function $feb5ffebff200149$export$c3d8340acf92597f(collectionRef, key) {
var _collectionRef_current, _collectionRef_current1;
let selector = `[data-key="${CSS.escape(String(key))}"]`;
let collection = (_collectionRef_current = collectionRef.current) === null || _collectionRef_current === void 0 ? void 0 : _collectionRef_current.dataset.collection;
if (collection) selector = `[data-collection="${CSS.escape(collection)}"]${selector}`;
return (_collectionRef_current1 = collectionRef.current) === null || _collectionRef_current1 === void 0 ? void 0 : _collectionRef_current1.querySelector(selector);
}
const $feb5ffebff200149$var$collectionMap = new WeakMap();
function $feb5ffebff200149$export$881eb0d9f3605d9d(collection) {
let id = (0, $jUnAJ$useId)();
$feb5ffebff200149$var$collectionMap.set(collection, id);
return id;
}
function $feb5ffebff200149$export$6aeb1680a0ae8741(collection) {
return $feb5ffebff200149$var$collectionMap.get(collection);
}
export {$feb5ffebff200149$export$d3e3bd3e26688c04 as isNonContiguousSelectionModifier, $feb5ffebff200149$export$c3d8340acf92597f as getItemElement, $feb5ffebff200149$export$881eb0d9f3605d9d as useCollectionId, $feb5ffebff200149$export$6aeb1680a0ae8741 as getCollectionId};
//# sourceMappingURL=utils.module.js.map
@@ -0,0 +1,10 @@
/**
* Detect Electron renderer / nwjs process, which is node, but we should
* treat as a browser.
*/
if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) {
module.exports = require('./browser.js');
} else {
module.exports = require('./node.js');
}
@@ -0,0 +1,10 @@
import type { TProperties } from '../object/index.mjs';
import { type TMappedResult } from '../mapped/index.mjs';
import { type TOptionalWithFlag } from './optional.mjs';
type TFromProperties<P extends TProperties, F extends boolean> = ({
[K2 in keyof P]: TOptionalWithFlag<P[K2], F>;
});
type TFromMappedResult<R extends TMappedResult, F extends boolean> = (TFromProperties<R['properties'], F>);
export type TOptionalFromMappedResult<R extends TMappedResult, F extends boolean, P extends TProperties = TFromMappedResult<R, F>> = (TMappedResult<P>);
export declare function OptionalFromMappedResult<R extends TMappedResult, F extends boolean, P extends TProperties = TFromMappedResult<R, F>>(R: R, F: F): TMappedResult<P>;
export {};
@@ -0,0 +1,25 @@
var serial = require('../serial.js');
// API
module.exports = ReadableSerial;
/**
* Streaming wrapper to `asynckit.serial`
*
* @param {array|object} list - array or object (named list) to iterate over
* @param {function} iterator - iterator to run
* @param {function} callback - invoked when all elements processed
* @returns {stream.Readable#}
*/
function ReadableSerial(list, iterator, callback)
{
if (!(this instanceof ReadableSerial))
{
return new ReadableSerial(list, iterator, callback);
}
// turn on object mode
ReadableSerial.super_.call(this, {objectMode: true});
this._start(serial, list, iterator, callback);
}
@@ -0,0 +1,63 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.parseTriple = parseTriple;
const constants_js_1 = require("./constants.js");
const CpuToNodeArch = {
x86_64: 'x64',
aarch64: 'arm64',
i686: 'ia32',
armv7: 'arm',
loongarch64: 'loong64',
riscv64gc: 'riscv64',
powerpc64le: 'ppc64',
};
const SysToNodePlatform = {
linux: 'linux',
freebsd: 'freebsd',
darwin: 'darwin',
windows: 'win32',
ohos: 'openharmony',
};
const SUB_SYSTEMS = new Set(['android', 'ohos']);
function parseTriple(rawTriple) {
if (rawTriple === constants_js_1.WASM32_WASI ||
rawTriple === `${constants_js_1.WASM32_WASI}-preview1-threads` ||
rawTriple.startsWith(`${constants_js_1.WASM32}-${constants_js_1.WASI}p`)) {
return {
triple: rawTriple,
platformArchABI: constants_js_1.WASM32_WASI,
platform: constants_js_1.WASI,
arch: constants_js_1.WASM32,
abi: constants_js_1.WASI,
};
}
const triple = rawTriple.endsWith(constants_js_1.EABI)
? `${rawTriple.slice(0, -4)}-${constants_js_1.EABI}`
: rawTriple;
const triples = triple.split('-');
let cpu;
let sys;
let abi = null;
if (triples.length === 2) {
;
[cpu, sys] = triples;
}
else {
;
[cpu, , sys, abi = null] = triples;
}
if (abi && SUB_SYSTEMS.has(abi)) {
sys = abi;
abi = null;
}
const platform = SysToNodePlatform[sys] ?? sys;
const arch = CpuToNodeArch[cpu] ?? cpu;
return {
triple: rawTriple,
platformArchABI: abi ? `${platform}-${arch}-${abi}` : `${platform}-${arch}`,
platform,
arch,
abi,
};
}
//# sourceMappingURL=target.js.map
Loaded 100 of 35554 files, more files were not shown because too many files have changed in this diff. Show more