docs: 仓库链接指向本镜像仓库
Dev Build / cleanup (push) Waiting to run
Dev Build / typecheck (push) Waiting to run

This commit is contained in:
TanTan committed 2026-11-13 09:27:07 +08:00
1 parent fa9c73363d
commit 2a69b23b47
18210 files changed
+5101211 -16

No files matched your search

@@ -0,0 +1,19 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Contact = createLucideIcon("Contact", [
["path", { d: "M16 2v2", key: "scm5qe" }],
["path", { d: "M7 22v-2a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2", key: "1waht3" }],
["path", { d: "M8 2v2", key: "pbkmx" }],
["circle", { cx: "12", cy: "11", r: "3", key: "itu57m" }],
["rect", { x: "3", y: "4", width: "18", height: "18", rx: "2", key: "12vinp" }]
]);
export { Contact as default };
//# sourceMappingURL=contact.js.map
@@ -0,0 +1,150 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("@typescript-eslint/utils");
const util_1 = require("../util");
const analyzeChain_1 = require("./prefer-optional-chain-utils/analyzeChain");
const checkNullishAndReport_1 = require("./prefer-optional-chain-utils/checkNullishAndReport");
const gatherLogicalOperands_1 = require("./prefer-optional-chain-utils/gatherLogicalOperands");
exports.default = (0, util_1.createRule)({
name: 'prefer-optional-chain',
meta: {
type: 'suggestion',
docs: {
description: 'Enforce using concise optional chain expressions instead of chained logical ands, negated logical ors, or empty objects',
recommended: 'stylistic',
requiresTypeChecking: true,
},
fixable: 'code',
hasSuggestions: true,
messages: {
optionalChainSuggest: 'Change to an optional chain.',
preferOptionalChain: "Prefer using an optional chain expression instead, as it's more concise and easier to read.",
},
schema: [
{
type: 'object',
additionalProperties: false,
properties: {
allowPotentiallyUnsafeFixesThatModifyTheReturnTypeIKnowWhatImDoing: {
type: 'boolean',
description: 'Allow autofixers that will change the return type of the expression. This option is considered unsafe as it may break the build.',
},
checkAny: {
type: 'boolean',
description: 'Check operands that are typed as `any` when inspecting "loose boolean" operands.',
},
checkBigInt: {
type: 'boolean',
description: 'Check operands that are typed as `bigint` when inspecting "loose boolean" operands.',
},
checkBoolean: {
type: 'boolean',
description: 'Check operands that are typed as `boolean` when inspecting "loose boolean" operands.',
},
checkNumber: {
type: 'boolean',
description: 'Check operands that are typed as `number` when inspecting "loose boolean" operands.',
},
checkString: {
type: 'boolean',
description: 'Check operands that are typed as `string` when inspecting "loose boolean" operands.',
},
checkUnknown: {
type: 'boolean',
description: 'Check operands that are typed as `unknown` when inspecting "loose boolean" operands.',
},
requireNullish: {
type: 'boolean',
description: 'Skip operands that are not typed with `null` and/or `undefined` when inspecting "loose boolean" operands.',
},
},
},
],
},
defaultOptions: [
{
allowPotentiallyUnsafeFixesThatModifyTheReturnTypeIKnowWhatImDoing: false,
checkAny: true,
checkBigInt: true,
checkBoolean: true,
checkNumber: true,
checkString: true,
checkUnknown: true,
requireNullish: false,
},
],
create(context, [options]) {
const parserServices = (0, util_1.getParserServices)(context);
const seenLogicals = new Set();
return {
'LogicalExpression[operator!="??"]'(node) {
if (seenLogicals.has(node)) {
return;
}
const { newlySeenLogicals, operands } = (0, gatherLogicalOperands_1.gatherLogicalOperands)(node, parserServices, context.sourceCode, options);
for (const logical of newlySeenLogicals) {
seenLogicals.add(logical);
}
let currentChain = [];
for (const operand of operands) {
if (operand.type === gatherLogicalOperands_1.OperandValidity.Invalid) {
(0, analyzeChain_1.analyzeChain)(context, parserServices, options, node, node.operator, currentChain);
currentChain = [];
}
else if (operand.type === gatherLogicalOperands_1.OperandValidity.Last) {
(0, analyzeChain_1.analyzeChain)(context, parserServices, options, node, node.operator, currentChain, operand);
currentChain = [];
}
else {
currentChain.push(operand);
}
}
// make sure to check whatever's left
if (currentChain.length > 0) {
(0, analyzeChain_1.analyzeChain)(context, parserServices, options, node, node.operator, currentChain);
}
},
// specific handling for `(foo ?? {}).bar` / `(foo || {}).bar`
'LogicalExpression[operator="||"], LogicalExpression[operator="??"]'(node) {
const leftNode = node.left;
const rightNode = node.right;
const parentNode = node.parent;
const isRightNodeAnEmptyObjectLiteral = rightNode.type === utils_1.AST_NODE_TYPES.ObjectExpression &&
rightNode.properties.length === 0;
if (!isRightNodeAnEmptyObjectLiteral ||
parentNode.type !== utils_1.AST_NODE_TYPES.MemberExpression ||
parentNode.optional) {
return;
}
seenLogicals.add(node);
function isLeftSideLowerPrecedence() {
const logicalTsNode = parserServices.esTreeNodeToTSNodeMap.get(node);
const leftTsNode = parserServices.esTreeNodeToTSNodeMap.get(leftNode);
const leftPrecedence = (0, util_1.getOperatorPrecedence)(leftTsNode.kind, logicalTsNode.operatorToken.kind);
return leftPrecedence < util_1.OperatorPrecedence.LeftHandSide;
}
(0, checkNullishAndReport_1.checkNullishAndReport)(context, parserServices, options, [leftNode], {
node: parentNode,
messageId: 'preferOptionalChain',
suggest: [
{
messageId: 'optionalChainSuggest',
fix: (fixer) => {
const leftNodeText = context.sourceCode.getText(leftNode);
// Any node that is made of an operator with higher or equal precedence,
const maybeWrappedLeftNode = isLeftSideLowerPrecedence()
? `(${leftNodeText})`
: leftNodeText;
const propertyToBeOptionalText = context.sourceCode.getText(parentNode.property);
const maybeWrappedProperty = parentNode.computed
? `[${propertyToBeOptionalText}]`
: propertyToBeOptionalText;
return fixer.replaceTextRange(parentNode.range, `${maybeWrappedLeftNode}?.${maybeWrappedProperty}`);
},
},
],
});
},
};
},
});
@@ -0,0 +1,13 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const WifiZero = createLucideIcon("WifiZero", [["path", { d: "M12 20h.01", key: "zekei9" }]]);
export { WifiZero as default };
//# sourceMappingURL=wifi-zero.js.map
@@ -0,0 +1,44 @@
# Contributing to node-gyp
## Making changes to gyp-next
Changes in the subfolder `gyp/` should be submitted to the
[`gyp-next`][] repository first. The `gyp/` folder is regularly
synced from [`gyp-next`][] with GitHub Actions workflow
[`update-gyp-next.yml`](.github/workflows/update-gyp-next.yml),
and any changes in this folder would be overridden by the workflow.
## Code of Conduct
Please read the
[Code of Conduct](https://github.com/nodejs/admin/blob/main/CODE_OF_CONDUCT.md)
which explains the minimum behavior expectations for node-gyp contributors.
<a id="developers-certificate-of-origin"></a>
## Developer's Certificate of Origin 1.1
By making a contribution to this project, I certify that:
* (a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or
* (b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or
* (c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.
* (d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.
[`gyp-next`]: https://github.com/nodejs/gyp-next
@@ -0,0 +1,16 @@
/**
* Subtracts a specified number of minutes from a date.
* 从日期中减去指定数量的分钟。
*
* @param date - The date to subtract minutes from. (要从日期中减去的日期。)
* @param minutes - The number of minutes to subtract. (要减去的分钟数。)
* @returns A new date with the subtracted minutes. (减去分钟后的新日期。)
* @example
* ```ts
* // Subtracting 30 minutes from a date (从日期中减去30分钟)
* const date = new Date('2023-10-01T12:00:00Z');
* subMinutes(date, 30);
* // Returns: 2023-10-01T11:30:00.000Z (返回: 2023-10-01T11:30:00.000Z)
* ```
*/
export default function subMinutes(date: Date, minutes: number): Date;
@@ -0,0 +1,101 @@
# vary
[![NPM Version][npm-image]][npm-url]
[![NPM Downloads][downloads-image]][downloads-url]
[![Node.js Version][node-version-image]][node-version-url]
[![Build Status][travis-image]][travis-url]
[![Test Coverage][coveralls-image]][coveralls-url]
Manipulate the HTTP Vary header
## Installation
This is a [Node.js](https://nodejs.org/en/) module available through the
[npm registry](https://www.npmjs.com/). Installation is done using the
[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally):
```sh
$ npm install vary
```
## API
<!-- eslint-disable no-unused-vars -->
```js
var vary = require('vary')
```
### vary(res, field)
Adds the given header `field` to the `Vary` response header of `res`.
This can be a string of a single field, a string of a valid `Vary`
header, or an array of multiple fields.
This will append the header if not already listed, otherwise leaves
it listed in the current location.
<!-- eslint-disable no-undef -->
```js
// Append "Origin" to the Vary header of the response
vary(res, 'Origin')
```
### vary.append(header, field)
Adds the given header `field` to the `Vary` response header string `header`.
This can be a string of a single field, a string of a valid `Vary` header,
or an array of multiple fields.
This will append the header if not already listed, otherwise leaves
it listed in the current location. The new header string is returned.
<!-- eslint-disable no-undef -->
```js
// Get header string appending "Origin" to "Accept, User-Agent"
vary.append('Accept, User-Agent', 'Origin')
```
## Examples
### Updating the Vary header when content is based on it
```js
var http = require('http')
var vary = require('vary')
http.createServer(function onRequest (req, res) {
// about to user-agent sniff
vary(res, 'User-Agent')
var ua = req.headers['user-agent'] || ''
var isMobile = /mobi|android|touch|mini/i.test(ua)
// serve site, depending on isMobile
res.setHeader('Content-Type', 'text/html')
res.end('You are (probably) ' + (isMobile ? '' : 'not ') + 'a mobile user')
})
```
## Testing
```sh
$ npm test
```
## License
[MIT](LICENSE)
[npm-image]: https://img.shields.io/npm/v/vary.svg
[npm-url]: https://npmjs.org/package/vary
[node-version-image]: https://img.shields.io/node/v/vary.svg
[node-version-url]: https://nodejs.org/en/download
[travis-image]: https://img.shields.io/travis/jshttp/vary/master.svg
[travis-url]: https://travis-ci.org/jshttp/vary
[coveralls-image]: https://img.shields.io/coveralls/jshttp/vary/master.svg
[coveralls-url]: https://coveralls.io/r/jshttp/vary
[downloads-image]: https://img.shields.io/npm/dm/vary.svg
[downloads-url]: https://npmjs.org/package/vary
@@ -0,0 +1,15 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Cloud = createLucideIcon("Cloud", [
["path", { d: "M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z", key: "p7xjir" }]
]);
export { Cloud as default };
//# sourceMappingURL=cloud.js.map
@@ -0,0 +1,93 @@
/**
* SSE Polling Example Client (SEP-1699)
*
* This example demonstrates client-side behavior during server-initiated
* SSE stream disconnection and automatic reconnection.
*
* Key features demonstrated:
* - Automatic reconnection when server closes SSE stream
* - Event replay via Last-Event-ID header
* - Resumption token tracking via onresumptiontoken callback
*
* Run with: npx tsx src/examples/client/ssePollingClient.ts
* Requires: ssePollingExample.ts server running on port 3001
*/
import { Client } from '../../client/index.js';
import { StreamableHTTPClientTransport } from '../../client/streamableHttp.js';
import { CallToolResultSchema, LoggingMessageNotificationSchema } from '../../types.js';
const SERVER_URL = 'http://localhost:3001/mcp';
async function main() {
console.log('SSE Polling Example Client');
console.log('==========================');
console.log(`Connecting to ${SERVER_URL}...`);
console.log('');
// Create transport with reconnection options
const transport = new StreamableHTTPClientTransport(new URL(SERVER_URL), {
// Use default reconnection options - SDK handles automatic reconnection
});
// Track the last event ID for debugging
let lastEventId;
// Set up transport error handler to observe disconnections
// Filter out expected errors from SSE reconnection
transport.onerror = error => {
// Skip abort errors during intentional close
if (error.message.includes('AbortError'))
return;
// Show SSE disconnect (expected when server closes stream)
if (error.message.includes('Unexpected end of JSON')) {
console.log('[Transport] SSE stream disconnected - client will auto-reconnect');
return;
}
console.log(`[Transport] Error: ${error.message}`);
};
// Set up transport close handler
transport.onclose = () => {
console.log('[Transport] Connection closed');
};
// Create and connect client
const client = new Client({
name: 'sse-polling-client',
version: '1.0.0'
});
// Set up notification handler to receive progress updates
client.setNotificationHandler(LoggingMessageNotificationSchema, notification => {
const data = notification.params.data;
console.log(`[Notification] ${data}`);
});
try {
await client.connect(transport);
console.log('[Client] Connected successfully');
console.log('');
// Call the long-task tool
console.log('[Client] Calling long-task tool...');
console.log('[Client] Server will disconnect mid-task to demonstrate polling');
console.log('');
const result = await client.request({
method: 'tools/call',
params: {
name: 'long-task',
arguments: {}
}
}, CallToolResultSchema, {
// Track resumption tokens for debugging
onresumptiontoken: token => {
lastEventId = token;
console.log(`[Event ID] ${token}`);
}
});
console.log('');
console.log('[Client] Tool completed!');
console.log(`[Result] ${JSON.stringify(result.content, null, 2)}`);
console.log('');
console.log(`[Debug] Final event ID: ${lastEventId}`);
}
catch (error) {
console.error('[Error]', error);
}
finally {
await transport.close();
console.log('[Client] Disconnected');
}
}
main().catch(console.error);
//# sourceMappingURL=ssePollingClient.js.map
@@ -0,0 +1,17 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const SquareArrowUpRight = createLucideIcon("SquareArrowUpRight", [
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
["path", { d: "M8 8h8v8", key: "b65dnt" }],
["path", { d: "m8 16 8-8", key: "13b9ih" }]
]);
export { SquareArrowUpRight as default };
//# sourceMappingURL=square-arrow-up-right.js.map
@@ -0,0 +1 @@
{"version":3,"file":"legacy.d.ts","sourceRoot":"","sources":["src/legacy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EAAO,MAAM,EAAO,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,KAAK,KAAK,EAA6B,KAAK,IAAI,EAAE,MAAM,YAAY,CAAC;AAU9E,uCAAuC;AACvC,qBAAa,KAAM,SAAQ,MAAM,CAAC,KAAK,CAAC;IACtC,OAAO,CAAC,CAAC,CAAkB;IAC3B,OAAO,CAAC,CAAC,CAAkB;IAC3B,OAAO,CAAC,CAAC,CAAkB;IAC3B,OAAO,CAAC,CAAC,CAAkB;IAC3B,OAAO,CAAC,CAAC,CAAkB;;IAK3B,SAAS,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;IAIzD,SAAS,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI;IAO1E,SAAS,CAAC,OAAO,CAAC,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI;IAoCvD,SAAS,CAAC,UAAU,IAAI,IAAI;IAG5B,OAAO,IAAI,IAAI;CAOhB;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,IAAI,EAAE,IAAI,CAAC,KAAK,CAAmD,CAAC;AAcjF,sCAAsC;AACtC,qBAAa,IAAK,SAAQ,MAAM,CAAC,IAAI,CAAC;IACpC,OAAO,CAAC,CAAC,CAAiB;IAC1B,OAAO,CAAC,CAAC,CAAiB;IAC1B,OAAO,CAAC,CAAC,CAAiB;IAC1B,OAAO,CAAC,CAAC,CAAiB;;IAK1B,SAAS,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;IAIjD,SAAS,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI;IAM/D,SAAS,CAAC,OAAO,CAAC,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI;IAqCvD,SAAS,CAAC,UAAU,IAAI,IAAI;IAG5B,OAAO,IAAI,IAAI;CAOhB;AAED;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,GAAG,EAAE,IAAI,CAAC,KAAK,CAAkD,CAAC;AAmD/E;;;GAGG;AACH,qBAAa,UAAW,SAAQ,MAAM,CAAC,UAAU,CAAC;IAChD,OAAO,CAAC,EAAE,CAAkB;IAC5B,OAAO,CAAC,EAAE,CAAkB;IAC5B,OAAO,CAAC,EAAE,CAAkB;IAC5B,OAAO,CAAC,EAAE,CAAkB;IAC5B,OAAO,CAAC,EAAE,CAAkB;;IAK5B,SAAS,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;IAIzD,SAAS,CAAC,GAAG,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,IAAI;IAO/E,SAAS,CAAC,OAAO,CAAC,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI;IAoCvD,SAAS,CAAC,UAAU,IAAI,IAAI;IAG5B,OAAO,IAAI,IAAI;CAKhB;AAED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,SAAS,EAAE,IAAI,CAAC,KAAK,CAAwD,CAAC"}
@@ -0,0 +1,522 @@
flf2a$ 5 4 8 1 11 0 16769 0
Author :
Date : 2008/8/28 1:12:58
Version: 1.0
-------------------------------------------------
-------------------------------------------------
This font has been created using JavE's FIGlet font export assistant.
Have a look at: http://www.jave.de
Permission is hereby given to modify this font, as long as the
modifier's name is placed on a comment line.
$ $#
$ $#
$ $#
$ $#
$ $##
!#
#
#
#
##
"#
#
#
#
##
##
#
#
#
##
$#
#
#
#
##
%#
#
#
#
##
&#
#
#
#
##
'#
#
#
#
##
(#
#
#
#
##
)#
#
#
#
##
*#
#
#
#
##
+#
#
#
#
##
,#
#
#
#
##
-#
#
#
#
##
.#
#
#
#
##
/#
#
#
#
##
0#
#
#
#
##
1#
#
#
#
##
2#
#
#
#
##
3#
#
#
#
##
4#
#
#
#
##
5#
#
#
#
##
6#
#
#
#
##
7#
#
#
#
##
8#
#
#
#
##
9#
#
#
#
##
:#
#
#
#
##
;#
#
#
#
##
<#
#
#
#
##
=#
#
#
#
##
>#
#
#
#
##
?#
#
#
#
##
@#
#
#
#
##
_ #
'|\ #
|-\ #
' ` #
##
__ #
'|_) #
_|_) #
' #
##
_, #
/ #
'\_ #
` #
##
,_ #
| \,#
_|_/ #
' #
##
_, #
/_, #
'\_ #
` #
##
__, #
'|_, #
| #
' #
##
_, #
/ _ #
'\_|` #
_| #
' ##
, , #
|_|, #
'| | #
' ` #
##
___, #
' | #
_|_, #
' #
##
___, #
',| #
(_| #
#
##
, , #
|_/ #
'| \ #
' ` #
##
, #
| #
'|__ #
' #
##
, , #
|\/| #
| `| #
' ` #
##
, , #
|\ | #
|'\| #
' ` #
##
_, #
/ \, #
'\_/ #
' #
##
,_ #
|_) #
'| #
' #
##
_, #
/ \, #
'\_X #
` #
##
,_ #
|_) #
'| \ #
' ` #
##
_, #
(_, #
_) #
' #
##
___, #
' | #
| #
' #
##
, , #
| | #
'\__| #
` #
##
, , #
\ / #
\/` #
' #
##
, , #
| ,| #
|/\| #
' ` #
##
, , #
\_/ #
/ \ #
' ` #
##
, ,#
\_/ #
, /` #
(_/ #
##
,__, #
/ #
/_ #
' ` #
##
[#
#
#
#
##
\#
#
#
#
##
]#
#
#
#
##
^#
#
#
#
##
_#
#
#
#
##
`#
#
#
#
##
_ #
'|\ #
|-\ #
' ` #
##
__ #
'|_) #
_|_) #
' #
##
_, #
/ #
'\_ #
` #
##
,_ #
| \,#
_|_/ #
' #
##
_, #
/_, #
'\_ #
` #
##
__, #
'|_, #
| #
' #
##
_, #
/ _ #
'\_|` #
_| #
' ##
, , #
|_|, #
'| | #
' ` #
##
___, #
' | #
_|_, #
' #
##
___, #
',| #
(_| #
#
##
, , #
|_/ #
'| \ #
' ` #
##
, #
| #
'|__ #
' #
##
, , #
|\/| #
| `| #
' ` #
##
, , #
|\ | #
|'\| #
' ` #
##
_, #
/ \, #
'\_/ #
' #
##
,_ #
|_) #
'| #
' #
##
_, #
/ \, #
'\_X #
` #
##
,_ #
|_) #
'| \ #
' ` #
##
_, #
(_, #
_) #
' #
##
___, #
' | #
| #
' #
##
, , #
| | #
'\__| #
` #
##
, , #
\ / #
\/` #
' #
##
, , #
| ,| #
|/\| #
' ` #
##
, , #
\_/ #
/ \ #
' ` #
##
, ,#
\_/ #
, /` #
(_/ #
##
,__, #
/ #
/_ #
' ` #
##
{#
#
#
#
##
|#
#
#
#
##
}#
#
#
#
##
~#
#
#
#
##
_ #
'|\ #
|-\ #
' ` #
##
_, #
/ \, #
'\_/ #
' #
##
, , #
| | #
'\__| #
` #
##
_ #
'|\ #
|-\ #
' ` #
##
_, #
/ \, #
'\_/ #
' #
##
, , #
| | #
'\__| #
` #
##
ß#
#
#
#
##
@@ -0,0 +1,9 @@
import { TokenType } from "../tokenizer/types";
export declare function parseSpread(): void;
export declare function parseRest(isBlockScope: boolean): void;
export declare function parseBindingIdentifier(isBlockScope: boolean): void;
export declare function parseImportedIdentifier(): void;
export declare function markPriorBindingIdentifier(isBlockScope: boolean): void;
export declare function parseBindingAtom(isBlockScope: boolean): void;
export declare function parseBindingList(close: TokenType, isBlockScope: boolean, allowEmpty?: boolean, allowModifiers?: boolean, contextId?: number): void;
export declare function parseMaybeDefault(isBlockScope: boolean, leftAlreadyParsed?: boolean): void;
@@ -0,0 +1 @@
{"version":3,"file":"mini.js","sources":["../../src/utils/use-constant.ts","../../src/utils/use-unmount-effect.ts","../../src/animation/animators/waapi/animate-elements.ts","../../src/animation/animators/waapi/animate-style.ts","../../src/animation/hooks/use-animate-style.ts"],"sourcesContent":["\"use client\"\n\nimport { useRef } from \"react\"\n\ntype Init<T> = () => T\n\n/**\n * Creates a constant value over the lifecycle of a component.\n *\n * Even if `useMemo` is provided an empty array as its final argument, it doesn't offer\n * a guarantee that it won't re-run for performance reasons later on. By using `useConstant`\n * you can ensure that initialisers don't execute twice or more.\n */\nexport function useConstant<T>(init: Init<T>) {\n const ref = useRef<T | null>(null)\n\n if (ref.current === null) {\n ref.current = init()\n }\n\n return ref.current\n}\n","\"use client\"\n\nimport { useEffect } from \"react\"\n\nexport function useUnmountEffect(callback: () => void) {\n return useEffect(() => () => callback(), [])\n}\n","import {\n animationMapKey,\n AnimationPlaybackControls,\n AnimationScope,\n applyPxDefaults,\n DOMKeyframesDefinition,\n AnimationOptions as DynamicAnimationOptions,\n ElementOrSelector,\n fillWildcards,\n getAnimationMap,\n getComputedStyle,\n getValueTransition,\n NativeAnimation,\n NativeAnimationOptions,\n resolveElements,\n UnresolvedValueKeyframe,\n ValueKeyframe,\n} from \"motion-dom\"\nimport { invariant, secondsToMilliseconds } from \"motion-utils\"\n\ninterface AnimationDefinition {\n map: Map<string, NativeAnimation<any>>\n key: string\n unresolvedKeyframes: UnresolvedValueKeyframe[]\n options: Omit<NativeAnimationOptions, \"keyframes\"> & {\n keyframes?: ValueKeyframe[]\n }\n}\n\nexport function animateElements(\n elementOrSelector: ElementOrSelector,\n keyframes: DOMKeyframesDefinition,\n options?: DynamicAnimationOptions,\n scope?: AnimationScope\n) {\n // Gracefully handle null/undefined elements (e.g., from querySelector returning null)\n if (elementOrSelector == null) {\n return []\n }\n\n const elements = resolveElements(elementOrSelector, scope) as Array<\n HTMLElement | SVGElement\n >\n const numElements = elements.length\n\n invariant(\n Boolean(numElements),\n \"No valid elements provided.\",\n \"no-valid-elements\"\n )\n\n /**\n * WAAPI doesn't support interrupting animations.\n *\n * Therefore, starting animations requires a three-step process:\n * 1. Stop existing animations (write styles to DOM)\n * 2. Resolve keyframes (read styles from DOM)\n * 3. Create new animations (write styles to DOM)\n *\n * The hybrid `animate()` function uses AsyncAnimation to resolve\n * keyframes before creating new animations, which removes style\n * thrashing. Here, we have much stricter filesize constraints.\n * Therefore we do this in a synchronous way that ensures that\n * at least within `animate()` calls there is no style thrashing.\n *\n * In the motion-native-animate-mini-interrupt benchmark this\n * was 80% faster than a single loop.\n */\n const animationDefinitions: AnimationDefinition[] = []\n\n /**\n * Step 1: Build options and stop existing animations (write)\n */\n for (let i = 0; i < numElements; i++) {\n const element = elements[i]\n const elementTransition: DynamicAnimationOptions = { ...options }\n\n /**\n * Resolve stagger function if provided.\n */\n if (typeof elementTransition.delay === \"function\") {\n elementTransition.delay = elementTransition.delay(i, numElements)\n }\n\n for (const valueName in keyframes) {\n let valueKeyframes = keyframes[valueName as keyof typeof keyframes]!\n\n if (!Array.isArray(valueKeyframes)) {\n valueKeyframes = [valueKeyframes]\n }\n\n const valueOptions = {\n ...getValueTransition(elementTransition as any, valueName),\n }\n\n valueOptions.duration &&= secondsToMilliseconds(\n valueOptions.duration\n )\n\n valueOptions.delay &&= secondsToMilliseconds(valueOptions.delay)\n\n /**\n * If there's an existing animation playing on this element then stop it\n * before creating a new one.\n */\n const map = getAnimationMap(element)\n const key = animationMapKey(\n valueName,\n valueOptions.pseudoElement || \"\"\n )\n const currentAnimation = map.get(key)\n currentAnimation && currentAnimation.stop()\n\n animationDefinitions.push({\n map,\n key,\n unresolvedKeyframes: valueKeyframes,\n optLine truncated
@@ -0,0 +1,94 @@
type Intrinsic = typeof globalThis;
type IntrinsicName = keyof Intrinsic | `%${keyof Intrinsic}%`;
type IntrinsicPath = IntrinsicName | `${StripPercents<IntrinsicName>}.${string}` | `%${StripPercents<IntrinsicName>}.${string}%`;
type AllowMissing = boolean;
type StripPercents<T extends string> = T extends `%${infer U}%` ? U : T;
type BindMethodPrecise<F> =
F extends (this: infer This, ...args: infer Args) => infer R
? (obj: This, ...args: Args) => R
: F extends {
(this: infer This1, ...args: infer Args1): infer R1;
(this: infer This2, ...args: infer Args2): infer R2
}
? {
(obj: This1, ...args: Args1): R1;
(obj: This2, ...args: Args2): R2
}
: never
// Extract method type from a prototype
type GetPrototypeMethod<T extends keyof typeof globalThis, M extends string> =
(typeof globalThis)[T] extends { prototype: any }
? M extends keyof (typeof globalThis)[T]['prototype']
? (typeof globalThis)[T]['prototype'][M]
: never
: never
// Get static property/method
type GetStaticMember<T extends keyof typeof globalThis, P extends string> =
P extends keyof (typeof globalThis)[T] ? (typeof globalThis)[T][P] : never
// Type that maps string path to actual bound function or value with better precision
type BoundIntrinsic<S extends string> =
S extends `${infer Obj}.prototype.${infer Method}`
? Obj extends keyof typeof globalThis
? BindMethodPrecise<GetPrototypeMethod<Obj, Method & string>>
: unknown
: S extends `${infer Obj}.${infer Prop}`
? Obj extends keyof typeof globalThis
? GetStaticMember<Obj, Prop & string>
: unknown
: unknown
declare function arraySlice<T>(array: readonly T[], start?: number, end?: number): T[];
declare function arraySlice<T>(array: ArrayLike<T>, start?: number, end?: number): T[];
declare function arraySlice<T>(array: IArguments, start?: number, end?: number): T[];
// Special cases for methods that need explicit typing
interface SpecialCases {
'%Object.prototype.isPrototypeOf%': (thisArg: {}, obj: unknown) => boolean;
'%String.prototype.replace%': {
(str: string, searchValue: string | RegExp, replaceValue: string): string;
(str: string, searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string
};
'%Object.prototype.toString%': (obj: {}) => string;
'%Object.prototype.hasOwnProperty%': (obj: {}, v: PropertyKey) => boolean;
'%Array.prototype.slice%': typeof arraySlice;
'%Array.prototype.map%': <T, U>(array: readonly T[], callbackfn: (value: T, index: number, array: readonly T[]) => U, thisArg?: any) => U[];
'%Array.prototype.filter%': <T>(array: readonly T[], predicate: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any) => T[];
'%Array.prototype.indexOf%': <T>(array: readonly T[], searchElement: T, fromIndex?: number) => number;
'%Function.prototype.apply%': <T, A extends any[], R>(fn: (...args: A) => R, thisArg: any, args: A) => R;
'%Function.prototype.call%': <T, A extends any[], R>(fn: (...args: A) => R, thisArg: any, ...args: A) => R;
'%Function.prototype.bind%': <T, A extends any[], R>(fn: (...args: A) => R, thisArg: any, ...args: A) => (...remainingArgs: A) => R;
'%Promise.prototype.then%': {
<T, R>(promise: Promise<T>, onfulfilled: (value: T) => R | PromiseLike<R>): Promise<R>;
<T, R>(promise: Promise<T>, onfulfilled: ((value: T) => R | PromiseLike<R>) | undefined | null, onrejected: (reason: any) => R | PromiseLike<R>): Promise<R>;
};
'%RegExp.prototype.test%': (regexp: RegExp, str: string) => boolean;
'%RegExp.prototype.exec%': (regexp: RegExp, str: string) => RegExpExecArray | null;
'%Error.prototype.toString%': (error: Error) => string;
'%TypeError.prototype.toString%': (error: TypeError) => string;
'%String.prototype.split%': (
obj: unknown,
splitter: string | RegExp | {
[Symbol.split](string: string, limit?: number): string[];
},
limit?: number | undefined
) => string[];
}
/**
* Returns a bound function for a prototype method, or a value for a static property.
*
* @param name - The name of the intrinsic (e.g. 'Array.prototype.slice')
* @param {AllowMissing} [allowMissing] - Whether to allow missing intrinsics (default: false)
*/
declare function callBound<K extends keyof SpecialCases | StripPercents<keyof SpecialCases>, S extends IntrinsicPath>(name: K, allowMissing?: AllowMissing): SpecialCases[`%${StripPercents<K>}%`];
declare function callBound<K extends keyof SpecialCases | StripPercents<keyof SpecialCases>, S extends IntrinsicPath>(name: S, allowMissing?: AllowMissing): BoundIntrinsic<S>;
export = callBound;
@@ -0,0 +1,3 @@
# `react-focus-scope`
This is an internal utility, not intended for public usage.
@@ -0,0 +1,308 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ScopeBase = void 0;
const types_1 = require("@typescript-eslint/types");
const assert_1 = require("../assert");
const ID_1 = require("../ID");
const Reference_1 = require("../referencer/Reference");
const variable_1 = require("../variable");
const ScopeType_1 = require("./ScopeType");
/**
* Test if scope is strict
*/
function isStrictScope(scope, block, isMethodDefinition) {
let body;
// When upper scope is exists and strict, inner scope is also strict.
if (scope.upper?.isStrict) {
return true;
}
if (isMethodDefinition) {
return true;
}
if (scope.type === ScopeType_1.ScopeType.class ||
scope.type === ScopeType_1.ScopeType.conditionalType ||
scope.type === ScopeType_1.ScopeType.functionType ||
scope.type === ScopeType_1.ScopeType.mappedType ||
scope.type === ScopeType_1.ScopeType.module ||
scope.type === ScopeType_1.ScopeType.tsEnum ||
scope.type === ScopeType_1.ScopeType.tsModule ||
scope.type === ScopeType_1.ScopeType.type) {
return true;
}
if (scope.type === ScopeType_1.ScopeType.block || scope.type === ScopeType_1.ScopeType.switch) {
return false;
}
if (scope.type === ScopeType_1.ScopeType.function) {
const functionBody = block;
switch (functionBody.type) {
case types_1.AST_NODE_TYPES.ArrowFunctionExpression:
if (functionBody.body.type !== types_1.AST_NODE_TYPES.BlockStatement) {
return false;
}
body = functionBody.body;
break;
case types_1.AST_NODE_TYPES.Program:
body = functionBody;
break;
default:
body = functionBody.body;
}
if (!body) {
return false;
}
}
else if (scope.type === ScopeType_1.ScopeType.global) {
body = block;
}
else {
return false;
}
// Search 'use strict' directive.
for (const stmt of body.body) {
if (stmt.type !== types_1.AST_NODE_TYPES.ExpressionStatement ||
stmt.directive == null) {
break;
}
if (stmt.directive === 'use strict') {
return true;
}
}
return false;
}
function registerScope(scopeManager, scope) {
scopeManager.scopes.push(scope);
const scopes = scopeManager.nodeToScope.get(scope.block);
if (scopes) {
scopes.push(scope);
}
else {
scopeManager.nodeToScope.set(scope.block, [scope]);
}
}
const generator = (0, ID_1.createIdGenerator)();
const VARIABLE_SCOPE_TYPES = new Set([
ScopeType_1.ScopeType.classFieldInitializer,
ScopeType_1.ScopeType.classStaticBlock,
ScopeType_1.ScopeType.function,
ScopeType_1.ScopeType.global,
ScopeType_1.ScopeType.module,
ScopeType_1.ScopeType.tsModule,
]);
class ScopeBase {
/**
* A unique ID for this instance - primarily used to help debugging and testing
*/
$id = generator();
/**
* The AST node which created this scope.
* @public
*/
block;
/**
* The array of child scopes. This does not include grandchild scopes.
* @public
*/
childScopes = [];
/**
* A map of the variables for each node in this scope.
* This is map is a pointer to the one in the parent ScopeManager instance
*/
#declaredVariables;
/**
* Generally, through the lexical scoping of JS you can always know which variable an identifier in the source code
* refers to. There are a few exceptions to this rule. With `global` and `with` scopes you can only decide at runtime
* which variable a reference refers to.
* All those scopes are considered "dynamic".
*/
#dynamic;
/**
* Whether this scope is created by a FunctionExpression.
* @public
*/
functionExpressionScope = false;
/**
* Whether 'use strict' is in effect in this scope.
* @public
*/
isStrict;
/**
* List of {@link Reference}s that are left to be resolved (i.e. which
* need to be linked to the variable they refer to).
*/
leftToResolve = [];
/**
* Any variable {@link Reference} found in this scope.
* This includes occurrences of local variables as well as variables from parent scopes (including the global scope).
* For local variables this also includes defining occurrences (like in a 'var' statement).
* In a 'function' scope this does not include the occurrences of the formal parameter in the parameter list.
* @public
*/
references = [];
/**
* The map from variable names to variable objects.
* @public
*/
set = new Map();
/**
* The {@link Reference}s that are not resolved with this scope.
* @public
*/
through = [];
type;
/**
* Reference to the parent {@link Scope}.
* @public
*/
upper;
/**
* The scoped {@link Variable}s of this scope.
* In the case of a 'function' scope this includes the automatic argument `arguments` as its first element, as well
* as all further formal arguments.
* This does not include variables which are defined in child scopes.
* @public
*/
variables = [];
/**
* For scopes that can contain variable declarations, this is a self-reference.
* For other scope types this is the *variableScope* value of the parent scope.
* @public
*/
#dynamicCloseRef = (ref) => {
// notify all names are through to global
let current = this;
do {
/* eslint-disable @typescript-eslint/no-non-null-assertion */
current.through.push(ref);
current = current.upper;
/* eslint-enable @typescript-eslint/no-non-null-assertion */
} while (current);
};
#staticCloseRef = (ref) => {
const resolve = () => {
const name = ref.identifier.name;
const variable = this.set.get(name);
if (!variable) {
return false;
}
if (!this.isValidResolution(ref, variable)) {
return false;
}
// make sure we don't match a type reference to a value variable
const isValidTypeReference = ref.isTypeReference && variable.isTypeVariable;
const isValidValueReference = ref.isValueReference && variable.isValueVariable;
if (!isValidTypeReference && !isValidValueReference) {
return false;
}
variable.references.push(ref);
ref.resolved = variable;
return true;
};
if (!resolve()) {
this.delegateToUpperScope(ref);
}
};
variableScope;
constructor(scopeManager, type, upperScope, block, isMethodDefinition) {
const upperScopeAsScopeBase = upperScope;
this.type = type;
this.#dynamic =
this.type === ScopeType_1.ScopeType.global || this.type === ScopeType_1.ScopeType.with;
this.block = block;
this.variableScope = this.isVariableScope()
? this
: // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
upperScopeAsScopeBase.variableScope;
this.upper = upperScope;
/**
* Whether 'use strict' is in effect in this scope.
* @member {boolean} Scope#isStrict
*/
this.isStrict = isStrictScope(this, block, isMethodDefinition);
// this is guaranteed to be correct at runtime
upperScopeAsScopeBase?.childScopes.push(this);
this.#declaredVariables = scopeManager.declaredVariables;
registerScope(scopeManager, this);
}
isVariableScope() {
return VARIABLE_SCOPE_TYPES.has(this.type);
}
close(_scopeManager) {
const closeRef = this.shouldStaticallyClose()
? this.#staticCloseRef
: this.#dynamicCloseRef;
// Try Resolving all references in this scope.
(0, assert_1.assert)(this.leftToResolve);
this.leftToResolve.forEach(ref => closeRef(ref));
this.leftToResolve = null;
return this.upper;
}
shouldStaticallyClose() {
return !this.#dynamic || this.type === 'global';
}
/**
* To override by function scopes.
* References in default parameters isn't resolved to variables which are in their function body.
*/
defineVariable(nameOrVariable, set, variables, node, def) {
const name = typeof nameOrVariable === 'string' ? nameOrVariable : nameOrVariable.name;
let variable = set.get(name);
if (!variable) {
variable =
typeof nameOrVariable === 'string'
? new variable_1.Variable(name, this)
: nameOrVariable;
set.set(name, variable);
variables.push(variable);
}
if (def) {
variable.defs.push(def);
this.addDeclaredVariablesOfNode(variable, def.node);
this.addDeclaredVariablesOfNode(variable, def.parent);
}
if (node) {
variable.identifiers.push(node);
}
}
delegateToUpperScope(ref) {
this.upper?.leftToResolve?.push(ref);
this.through.push(ref);
}
isValidResolution(_ref, _variable) {
return true;
}
addDeclaredVariablesOfNode(variable, node) {
if (node == null) {
return;
}
let variables = this.#declaredVariables.get(node);
if (variables == null) {
variables = [];
this.#declaredVariables.set(node, variables);
}
if (!variables.includes(variable)) {
variables.push(variable);
}
}
defineIdentifier(node, def) {
this.defineVariable(node.name, this.set, this.variables, node, def);
}
defineLiteralIdentifier(node, def) {
this.defineVariable(node.value, this.set, this.variables, null, def);
}
referenceDualValueType(node) {
const ref = new Reference_1.Reference(node, this, Reference_1.ReferenceFlag.Read, null, null, false, Reference_1.ReferenceTypeFlag.Type | Reference_1.ReferenceTypeFlag.Value);
this.references.push(ref);
this.leftToResolve?.push(ref);
}
referenceType(node) {
const ref = new Reference_1.Reference(node, this, Reference_1.ReferenceFlag.Read, null, null, false, Reference_1.ReferenceTypeFlag.Type);
this.references.push(ref);
this.leftToResolve?.push(ref);
}
referenceValue(node, assign = Reference_1.ReferenceFlag.Read, writeExpr, maybeImplicitGlobal, init = false) {
const ref = new Reference_1.Reference(node, this, assign, writeExpr, maybeImplicitGlobal, init, Reference_1.ReferenceTypeFlag.Value);
this.references.push(ref);
this.leftToResolve?.push(ref);
}
}
exports.ScopeBase = ScopeBase;
@@ -0,0 +1,2 @@
/* included for compatibility with react-native without package exports support */
module.exports = require('./dist/stream.cjs')
@@ -0,0 +1 @@
{"version":3,"file":"hash-scroll.js","names":[],"sources":["../../src/hash-scroll.ts"],"sourcesContent":["import type { AnyRouter } from './router'\n\n/**\n * @private\n * Handles hash-based scrolling after navigation completes.\n * To be used in framework-specific <Transitioner> components during the onResolved event.\n */\nexport function handleHashScroll(router: AnyRouter) {\n if (typeof document !== 'undefined' && (document as any).querySelector) {\n const location = router.stores.location.get()\n const hashScrollIntoViewOptions =\n location.state.__hashScrollIntoViewOptions ?? true\n\n if (hashScrollIntoViewOptions && location.hash !== '') {\n const el = document.getElementById(location.hash)\n if (el) {\n el.scrollIntoView(hashScrollIntoViewOptions)\n }\n }\n }\n}\n"],"mappings":";;;;;;AAOA,SAAgB,iBAAiB,QAAmB;AAClD,KAAI,OAAO,aAAa,eAAgB,SAAiB,eAAe;EACtE,MAAM,WAAW,OAAO,OAAO,SAAS,KAAK;EAC7C,MAAM,4BACJ,SAAS,MAAM,+BAA+B;AAEhD,MAAI,6BAA6B,SAAS,SAAS,IAAI;GACrD,MAAM,KAAK,SAAS,eAAe,SAAS,KAAK;AACjD,OAAI,GACF,IAAG,eAAe,0BAA0B"}
@@ -0,0 +1,501 @@
// Run with: npx tsx src/examples/server/elicitationFormExample.ts
//
// This example demonstrates how to use form elicitation to collect structured user input
// with JSON Schema validation via a local HTTP server with SSE streaming.
// Form elicitation allows servers to request *non-sensitive* user input through the client
// with schema-based validation.
// Note: See also elicitationUrlExample.ts for an example of using URL elicitation
// to collect *sensitive* user input via a browser.
import { randomUUID } from 'node:crypto';
import { McpServer } from '../../server/mcp.js';
import { StreamableHTTPServerTransport } from '../../server/streamableHttp.js';
import { isInitializeRequest } from '../../types.js';
import { createMcpExpressApp } from '../../server/express.js';
// Factory to create a new MCP server per session.
// Each session needs its own server+transport pair to avoid cross-session contamination.
const getServer = () => {
// Create MCP server - it will automatically use AjvJsonSchemaValidator with sensible defaults
// The validator supports format validation (email, date, etc.) if ajv-formats is installed
const mcpServer = new McpServer({
name: 'form-elicitation-example-server',
version: '1.0.0'
}, {
capabilities: {}
});
/**
* Example 1: Simple user registration tool
* Collects username, email, and password from the user
*/
mcpServer.registerTool('register_user', {
description: 'Register a new user account by collecting their information',
inputSchema: {}
}, async () => {
try {
// Request user information through form elicitation
const result = await mcpServer.server.elicitInput({
mode: 'form',
message: 'Please provide your registration information:',
requestedSchema: {
type: 'object',
properties: {
username: {
type: 'string',
title: 'Username',
description: 'Your desired username (3-20 characters)',
minLength: 3,
maxLength: 20
},
email: {
type: 'string',
title: 'Email',
description: 'Your email address',
format: 'email'
},
password: {
type: 'string',
title: 'Password',
description: 'Your password (min 8 characters)',
minLength: 8
},
newsletter: {
type: 'boolean',
title: 'Newsletter',
description: 'Subscribe to newsletter?',
default: false
},
role: {
type: 'string',
title: 'Role',
description: 'Your primary role',
oneOf: [
{ const: 'developer', title: 'Developer' },
{ const: 'designer', title: 'Designer' },
{ const: 'manager', title: 'Manager' },
{ const: 'other', title: 'Other' }
],
default: 'developer'
},
interests: {
type: 'array',
title: 'Interests',
description: 'Select your areas of interest',
items: {
type: 'string',
enum: ['frontend', 'backend', 'mobile', 'devops', 'ai']
},
minItems: 1,
maxItems: 3
}
},
required: ['username', 'email', 'password']
}
});
// Handle the different possible actions
if (result.action === 'accept' && result.content) {
const { username, email, newsletter } = result.content;
return {
content: [
{
type: 'text',
text: `Registration successful!\n\nUsername: ${username}\nEmail: ${email}\nNewsletter: ${newsletter ? 'Yes' : 'No'}`
}
]
};
}
else if (result.action === 'decline') {
return {
content: [
{
type: 'text',
text: 'Registration cancelled by user.'
}
]
};
}
else {
return {
content: [
{
type: 'text',
text: 'Registration was cancelled.'
}
]
};
}
}
catch (error) {
return {
content: [
{
type: 'text',
text: `Registration failed: ${error instanceof Error ? error.message : String(error)}`
}
],
isError: true
};
}
});
/**
* Example 2: Multi-step workflow with multiple form elicitation requests
* Demonstrates how to collect information in multiple steps
*/
mcpServer.registerTool('create_event', {
description: 'Create a calendar event by collecting event details',
inputSchema: {}
}, async () => {
try {
// Step 1: Collect basic event information
const basicInfo = await mcpServer.server.elicitInput({
mode: 'form',
message: 'Step 1: Enter basic event information',
requestedSchema: {
type: 'object',
properties: {
title: {
type: 'string',
title: 'Event Title',
description: 'Name of the event',
minLength: 1
},
description: {
type: 'string',
title: 'Description',
description: 'Event description (optional)'
}
},
required: ['title']
}
});
if (basicInfo.action !== 'accept' || !basicInfo.content) {
return {
content: [{ type: 'text', text: 'Event creation cancelled.' }]
};
}
// Step 2: Collect date and time
const dateTime = await mcpServer.server.elicitInput({
mode: 'form',
message: 'Step 2: Enter date and time',
requestedSchema: {
type: 'object',
properties: {
date: {
type: 'string',
title: 'Date',
description: 'Event date',
format: 'date'
},
startTime: {
type: 'string',
title: 'Start Time',
description: 'Event start time (HH:MM)'
},
duration: {
type: 'integer',
title: 'Duration',
description: 'Duration in minutes',
minimum: 15,
maximum: 480
}
},
required: ['date', 'startTime', 'duration']
}
});
if (dateTime.action !== 'accept' || !dateTime.content) {
return {
content: [{ type: 'text', text: 'Event creation cancelled.' }]
};
}
// Combine all collected information
const event = {
...basicInfo.content,
...dateTime.content
};
return {
content: [
{
type: 'text',
text: `Event created successfully!\n\n${JSON.stringify(event, null, 2)}`
}
]
};
}
catch (error) {
return {
content: [
{
type: 'text',
text: `Event creation failed: ${error instanceof Error ? error.message : String(error)}`
}
],
isError: true
};
}
});
/**
* Example 3: Collecting address information
* Demonstrates validation with patterns and optional fields
*/
mcpServer.registerTool('update_shipping_address', {
description: 'Update shipping address with validation',
inputSchema: {}
}, async () => {
try {
const result = await mcpServer.server.elicitInput({
mode: 'form',
message: 'Please provide your shipping address:',
requestedSchema: {
type: 'object',
properties: {
name: {
type: 'string',
title: 'Full Name',
description: 'Recipient name',
minLength: 1
},
street: {
type: 'string',
title: 'Street Address',
minLength: 1
},
city: {
type: 'string',
title: 'City',
minLength: 1
},
state: {
type: 'string',
title: 'State/Province',
minLength: 2,
maxLength: 2
},
zipCode: {
type: 'string',
title: 'ZIP/Postal Code',
description: '5-digit ZIP code'
},
phone: {
type: 'string',
title: 'Phone Number (optional)',
description: 'Contact phone number'
}
},
required: ['name', 'street', 'city', 'state', 'zipCode']
}
});
if (result.action === 'accept' && result.content) {
return {
content: [
{
type: 'text',
text: `Address updated successfully!\n\n${JSON.stringify(result.content, null, 2)}`
}
]
};
}
else if (result.action === 'decline') {
return {
content: [{ type: 'text', text: 'Address update cancelled by user.' }]
};
}
else {
return {
content: [{ type: 'text', text: 'Address update was cancelled.' }]
};
}
}
catch (error) {
return {
content: [
{
type: 'text',
text: `Address update failed: ${error instanceof Error ? error.message : String(error)}`
}
],
isError: true
};
}
});
return mcpServer;
};
async function main() {
const PORT = process.env.PORT ? parseInt(process.env.PORT, 10) : 3000;
const app = createMcpExpressApp();
// Close sessions that have been idle for IDLE_MS, and keep at most MAX_SESSIONS open
const IDLE_MS = 30 * 60000;
const MAX_SESSIONS = 1000;
const sessions = new Map();
// Count open responses so a long-running request or a listening SSE stream is not treated as idle
const trackResponse = (session, res) => {
if (!res.socket || res.destroyed)
return;
session.open++;
res.on('close', () => {
session.open--;
session.lastActive = Date.now();
});
};
// Close sessions with nothing open and no activity for IDLE_MS
setInterval(() => {
const cutoff = Date.now() - IDLE_MS;
for (const { transport, open, lastActive } of sessions.values()) {
if (open === 0 && lastActive < cutoff)
transport.close().catch(console.error);
}
}, 60000).unref();
// MCP POST endpoint
const mcpPostHandler = async (req, res) => {
const sessionId = req.headers['mcp-session-id'];
if (sessionId) {
console.log(`Received MCP request for session: ${sessionId}`);
}
try {
const session = sessionId ? sessions.get(sessionId) : undefined;
let transport;
if (session) {
// Reuse existing transport for this session
transport = session.transport;
trackResponse(session, res);
}
else if (!sessionId && isInitializeRequest(req.body)) {
// New initialization request - create new transport
if (sessions.size >= MAX_SESSIONS) {
res.status(503).json({ jsonrpc: '2.0', error: { code: -32000, message: 'Too many open sessions' }, id: null });
return;
}
transport = new StreamableHTTPServerTransport({
sessionIdGenerator: () => randomUUID(),
onsessioninitialized: sessionId => {
// Store the transport by session ID when session is initialized
console.log(`Session initialized with ID: ${sessionId}`);
sessions.set(sessionId, { transport, open: 0, lastActive: Date.now() });
}
});
// Set up onclose handler to clean up transport when closed
transport.onclose = () => {
const sid = transport.sessionId;
if (sid && sessions.has(sid)) {
console.log(`Transport closed for session ${sid}, removing from sessions map`);
sessions.delete(sid);
}
};
// Create a new server per session and connect it to the transport
const mcpServer = getServer();
await mcpServer.connect(transport);
await transport.handleRequest(req, res, req.body);
return;
}
else if (sessionId) {
// Unknown or expired session ID - the client should start a new session
res.status(404).json({ jsonrpc: '2.0', error: { code: -32001, message: 'Session not found' }, id: null });
return;
}
else {
// Invalid request - no session ID and not an initialization request
res.status(400).json({
jsonrpc: '2.0',
error: {
code: -32000,
message: 'Bad Request: No valid session ID provided'
},
id: null
});
return;
}
// Handle the request with existing transport
await transport.handleRequest(req, res, req.body);
}
catch (error) {
console.error('Error handling MCP request:', error);
if (!res.headersSent) {
res.status(500).json({
jsonrpc: '2.0',
error: {
code: -32603,
message: 'Internal server error'
},
id: null
});
}
}
};
app.post('/mcp', mcpPostHandler);
// Handle GET requests for SSE streams
const mcpGetHandler = async (req, res) => {
const sessionId = req.headers['mcp-session-id'];
if (!sessionId) {
res.status(400).send('Missing session ID');
return;
}
const session = sessions.get(sessionId);
if (!session) {
// Unknown or expired session ID - the client should start a new session
res.status(404).json({ jsonrpc: '2.0', error: { code: -32001, message: 'Session not found' }, id: null });
return;
}
console.log(`Establishing SSE stream for session ${sessionId}`);
trackResponse(session, res);
await session.transport.handleRequest(req, res);
};
app.get('/mcp', mcpGetHandler);
// Handle DELETE requests for session termination
const mcpDeleteHandler = async (req, res) => {
const sessionId = req.headers['mcp-session-id'];
if (!sessionId) {
res.status(400).send('Missing session ID');
return;
}
const session = sessions.get(sessionId);
if (!session) {
// Unknown or expired session ID - the client should start a new session
res.status(404).json({ jsonrpc: '2.0', error: { code: -32001, message: 'Session not found' }, id: null });
return;
}
console.log(`Received session termination request for session ${sessionId}`);
try {
trackResponse(session, res);
await session.transport.handleRequest(req, res);
}
catch (error) {
console.error('Error handling session termination:', error);
if (!res.headersSent) {
res.status(500).send('Error processing session termination');
}
}
};
app.delete('/mcp', mcpDeleteHandler);
// Start listening
app.listen(PORT, error => {
if (error) {
console.error('Failed to start server:', error);
process.exit(1);
}
console.log(`Form elicitation example server is running on http://localhost:${PORT}/mcp`);
console.log('Available tools:');
console.log(' - register_user: Collect user registration information');
console.log(' - create_event: Multi-step event creation');
console.log(' - update_shipping_address: Collect and validate address');
console.log('\nConnect your MCP client to this server using the HTTP transport.');
});
// Handle server shutdown
process.on('SIGINT', async () => {
console.log('Shutting down server...');
// Close all active transports to properly clean up resources
for (const [sessionId, { transport }] of sessions) {
try {
console.log(`Closing transport for session ${sessionId}`);
await transport.close();
sessions.delete(sessionId);
}
catch (error) {
console.error(`Error closing transport for session ${sessionId}:`, error);
}
}
console.log('Server shutdown complete');
process.exit(0);
});
}
main().catch(error => {
console.error('Server error:', error);
process.exit(1);
});
//# sourceMappingURL=elicitationFormExample.js.map
@@ -0,0 +1,141 @@
(function(f){function e(){var i=f();return i.default||i}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.yaml=e()}})(function(){"use strict";var Wn=Object.defineProperty;var co=Object.getOwnPropertyDescriptor;var fo=Object.getOwnPropertyNames;var uo=Object.prototype.hasOwnProperty;var Vs=(t,e)=>{for(var n in e)Wn(t,n,{get:e[n],enumerable:!0})},po=(t,e,n,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of fo(e))!uo.call(t,r)&&r!==n&&Wn(t,r,{get:()=>e[r],enumerable:!(s=co(e,r))||s.enumerable});return t};var mo=t=>po(Wn({},"__esModule",{value:!0}),t);var Ja={};Vs(Ja,{languages:()=>Ar,options:()=>Tr,parsers:()=>Us,printers:()=>Ha});var Kt=(t,e)=>(n,s,...r)=>n|1&&s==null?void 0:(e.call(s)??s[t]).apply(s,r);function ho(t){return this[t<0?this.length+t:t]}var go=Kt("at",function(){if(Array.isArray(this)||typeof this=="string")return ho}),j=go;var yo=String.prototype.replaceAll??function(t,e){return t.global?this.replace(t,e):this.split(t).join(e)},wo=Kt("replaceAll",function(){if(typeof this=="string")return yo}),Yt=wo;var bo=()=>{},ft=bo;var ut="string",pt="array",Ut="cursor",jt="indent",Fe="align",Vt="trim",Ke="group",Ye="fill",Ue="if-break",Gt="indent-if-break",je="line-suffix",Qt="line-suffix-boundary",we="line",Ht="label",Ve="break-parent",Jt=new Set([Ut,jt,Fe,Vt,Ke,Ye,Ue,Gt,je,Qt,we,Ht,Ve]);function Wt(t,e,n){if(!t.has(e)){let s=n(e);t.set(e,s)}return t.get(e)}function ko(t){if(typeof t=="string")return ut;if(Array.isArray(t))return pt;if(!t)return;let{type:e}=t;if(Jt.has(e))return e}var Xt=ko;var So=t=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(t);function Eo(t){let e=t===null?"null":typeof t;if(e!=="string"&&e!=="object")return`Unexpected doc '${e}',
Expected it to be 'string' or 'object'.`;if(Xt(t))throw new Error("doc is valid.");let n=Object.prototype.toString.call(t);if(n!=="[object Object]")return`Unexpected doc '${n}'.`;let s=So([...Jt].map(r=>`'${r}'`));return`Unexpected doc.type '${t.type}'.
Expected it to be ${s}.`}var Xn=class extends Error{name="InvalidDocError";constructor(e){super(Eo(e)),this.doc=e}},Gs=Xn;function Co(t,e){if(typeof t=="string")return e(t);let n=new Map;return s(t);function s(i){return Wt(n,i,r)}function r(i){switch(Xt(i)){case pt:return e(i.map(s));case Ye:return e({...i,parts:i.parts.map(s)});case Ue:return e({...i,breakContents:s(i.breakContents),flatContents:s(i.flatContents)});case Ke:{let{expandedStates:o,contents:a}=i;return o?(o=o.map(s),a=o[0]):a=s(a),e({...i,contents:a,expandedStates:o})}case Fe:case jt:case Gt:case Ht:case je:return e({...i,contents:s(i.contents)});case ut:case Ut:case Vt:case Qt:case we:case Ve:return e(i);default:throw new Gs(i)}}}function Qs(t,e=mt){return Co(t,n=>typeof n=="string"?R(e,n.split(`
`)):n)}var ne=ft,zt=ft,Hs=ft,Js=ft;function ht(t,e){return Js(t),ne(e),{type:Fe,contents:e,n:t}}function zn(t){return ht(Number.NEGATIVE_INFINITY,t)}function Ws(t){return ht({type:"root"},t)}function Xs(t){return ht(-1,t)}var dt={type:Ve};function Zt(t){return Hs(t),{type:Ye,parts:t}}function Ge(t,e={}){return ne(t),zt(e.expandedStates,!0),{type:Ke,id:e.id,contents:t,break:!!e.shouldBreak,expandedStates:e.expandedStates}}function Zn(t,e){return Ge(t[0],{...e,expandedStates:t})}function gt(t,e="",n={}){return ne(t),e!==""&&ne(e),{type:Ue,breakContents:t,flatContents:e,groupId:n.groupId}}function R(t,e){ne(t),zt(e);let n=[];for(let s=0;s<e.length;s++)s!==0&&n.push(t),n.push(e[s]);return n}var be={type:we},en={type:we,soft:!0},No={type:we,hard:!0},O=[No,dt],Ao={type:we,hard:!0,literal:!0},mt=[Ao,dt];function zs(t){return ne(t),{type:je,contents:t}}function tn(t){return(e,n,s)=>{if(n===!1)return!1;let r=!!s?.backwards,{length:i}=e,o=n;for(;o>=0&&o<i;){let a=e.charAt(o);if(t instanceof RegExp){if(!t.test(a))return o}else if(!t.includes(a))return o;r?o--:o++}return o===-1||o===i?o:!1}}var rc=tn(/\s/),es=tn(" "),ic=tn(",; "),oc=tn(/[^\n\r]/);var Zs=t=>t===`
`||t==="\r"||t==="\u2028"||t==="\u2029";function To(t,e,n){if(e===!1)return!1;let s=!!n?.backwards,r=t.charAt(e);if(s){if(t.charAt(e-1)==="\r"&&r===`
`)return e-2;if(Zs(r))return e-1}else{if(r==="\r"&&t.charAt(e+1)===`
`)return e+2;if(Zs(r))return e+1}return e}var ts=To;function Oo(t,e){let n=e-1;n=es(t,n,{backwards:!0}),n=ts(t,n,{backwards:!0}),n=es(t,n,{backwards:!0});let s=ts(t,n,{backwards:!0});return n!==s}var ns=Oo;var ss=class extends Error{name="UnexpectedNodeError";constructor(e,n,s="type"){super(`Unexpected ${n} node ${s}: ${JSON.stringify(e[s])}.`),this.node=e}},er=ss;function tr(t,e){let{node:n}=t;if(n.type==="root"&&e.filepath&&/(?:[/\\]|^)\.(?:prettier|stylelint|lintstaged)rc$/.test(e.filepath))return async s=>{let r=await s(e.originalText,{parser:"json"});return r?[r,O]:void 0}}tr.getVisitorKeys=()=>[];var nr=tr;var yt=null;function wt(t){if(yt!==null&&typeof yt.property){let e=yt;return yt=wt.prototype=null,e}return yt=wt.prototype=t??Object.create(null),new wt}var _o=10;for(let t=0;t<=_o;t++)wt();function rs(t){return wt(t)}function Io(t,e="type"){rs(t);function n(s){let r=s[e],i=t[r];if(!Array.isArray(i))throw Object.assign(new Error(`Missing visitor keys for '${r}'.`),{node:s});return i}return n}var sr=Io;var P=[["children","anchor","tag","indicatorComment","leadingComments","middleComments","trailingComment","endComments"],["anchor","tag","indicatorComment","leadingComments","middleComments","trailingComment","endComments"],["key","value","children","anchor","tag","indicatorComment","leadingComments","middleComments","trailingComment","endComments"],["content","children","anchor","tag","indicatorComment","leadingComments","middleComments","trailingComment","endComments"],["indicatorComment","leadingComments","middleComments","trailingComment","endComments"]],rr={root:P[0],document:["head","body","children","anchor","tag","indicatorComment","leadingComments","middleComments","trailingComment","endComments"],documentHead:P[0],documentBody:P[0],directive:P[1],alias:P[1],blockLiteral:P[1],blockFolded:P[0],plain:P[0],quoteSingle:P[1],quoteDouble:P[1],mapping:P[0],mappingItem:P[2],mappingKey:P[3],mappingValue:P[3],sequence:P[0],sequenceItem:P[3],flowMapping:P[0],flowMappingItem:P[2],flowSequence:P[0],flowSequenceItem:P[3],comment:P[1],tag:P[4],anchor:P[4]};var Lo=sr(rr),ir=Lo;var bt=t=>t.position.start.offset,or=t=>t.position.end.offset;var ar="format";var lr=/^\s*#[^\S\n]*@(?:noformat|noprettier)\s*?(?:\n|$)/,cr=/^\s*#[^\S\n]*@(?:format|prettier)\s*?(?:\n|$)/,fr=/^\s*@(?:format|prettier)\s*$/;var ur=t=>fr.test(t),pr=t=>cr.test(t),mr=t=>lr.test(t),hr=t=>`# @${ar}
${t}`;function is(t,e){switch(t.type){case"comment":if(ur(t.value))return null;break;case"quoteDouble":case"quoteSingle":e.type="quote";break;case"document":e.directivesEndMarker||delete e.directivesEndMarker,e.documentEndMarker||delete e.documentEndMarker;break;case"blockLiteral":case"blockFolded":t.chomping==="keep"?e.value=t.value.split(`
`).map(n=>n.replace(/[ \t]+$/,"")).join(`
`):(t.chomping==="clip"||t.chomping==="strip")&&(e.value=t.value.trimEnd());break}}is.ignoredProperties=new Set(["position"]);function Po(t){return Array.isArray(t)&&t.length>0}var Qe=Po;function J(t,e){return typeof t?.type=="string"&&e.includes(t.type)}function os(t,e,n){return e("children"in t?{...t,children:t.children.map(s=>os(s,e,t))}:t,n)}function He(t,e,n){Object.defineProperty(t,e,{get:n,enumerable:!1})}function gr(t,e){let n=0,s=e.length;for(let r=t.position.end.offset-1;r<s;r++){let i=e[r];if(i===`
`&&n++,n===1&&/\S/.test(i))return!1;if(n===2)return!0}return!1}function nn(t){let{node:e}=t;switch(e.type){case"tag":case"anchor":case"comment":return!1}let n=t.stack.length;for(let s=1;s<n;s++){let r=t.stack[s],i=t.stack[s-1];if(Array.isArray(i)&&typeof r=="number"&&r!==i.length-1)return!1}return!0}function sn(t){return Qe(t.children)?sn(j(0,t.children,-1)):t}function dr(t){return t.value.trim()==="prettier-ignore"}function yr(t){let{node:e}=t;if(e.type==="documentBody"){let n=t.parent.head;return F(n)&&dr(j(0,n.endComments,-1))}return ce(e)&&dr(j(0,e.leadingComments,-1))}function Je(t){return!Qe(t.children)&&!vo(t)}function vo(t){return ce(t)||Oe(t)||as(t)||W(t)||F(t)}function ce(t){return Qe(t?.leadingComments)}function Oe(t){return Qe(t?.middleComments)}function as(t){return t?.indicatorComment}function W(t){return t?.trailingComment}function F(t){return Qe(t?.endComments)}function wr(t){return t?t.split(/(?<!^| ) (?! |$)/):[]}function br(t,e,n){let s=e.split(`
`).map((i,o,a)=>o===0&&o===a.length-1?i:o!==0&&o!==a.length-1?i.trim():o===0?i.trimEnd():i.trimStart());if(n.proseWrap==="preserve")return s.map(i=>i?[i]:[]);let r=[];for(let[i,o]of s.entries()){let a=wr(o);i>0&&s[i-1].length>0&&a.length>0&&!(t==="quoteDouble"&&j(0,j(0,r,-1),-1).endsWith("\\"))?r[r.length-1]=[...j(0,r,-1),...a]:r.push(a)}return n.proseWrap==="never"?r.map(i=>[i.join(" ")]):r}function kr(t,{parentIndent:e,isLastDescendant:n,options:s}){let r=t.position.start.line===t.position.end.line?"":s.originalText.slice(t.position.start.offset,t.position.end.offset).match(/^[^\n]*\n(.*)$/s)[1];if(r==="")return[];let i;if(t.indent===null){let c=r.match(/^(?<leadingSpace> *)[^\n\r ]/m);i=c?c.groups.leadingSpace.length:Number.POSITIVE_INFINITY}else i=t.indent-1+e;let o=r.split(`
`).map(c=>c.slice(i));if(s.proseWrap==="preserve"||t.type==="blockLiteral")return l(o.map(c=>c?[c]:[]));let a=[];for(let[c,u]of o.entries()){let f=wr(u);c>0&&f.length>0&&o[c-1].length>0&&!/^\s/.test(f[0])&&!/^\s|\s$/.test(j(0,a,-1))?a[a.length-1]=[...j(0,a,-1),...f]:a.push(f)}return a=a.map(c=>{let u=[];for(let f of c)u.length>0&&/\s$/.test(j(0,u,-1))?u[u.length-1]+=" "+f:u.push(f);return u}),s.proseWrap==="never"&&(a=a.map(c=>[c.join(" ")])),l(a);function l(c){if(t.chomping==="keep")return r.endsWith(`
`)&&j(0,c,-1).length===0?c.slice(0,-1):c;let u=0;for(let f=c.length-1;f>=0&&c[f].every(p=>p.replace(/[ \t]+$/,"")==="");f--)u++;return u===0?c:u>=2&&!n?c.slice(0,-(u-1)):c.slice(0,-u)}}function kt(t){if(!t)return!0;switch(t.type){case"plain":case"quoteDouble":case"quoteSingle":case"alias":case"flowMapping":case"flowSequence":return!0;default:return!1}}var Do=new WeakMap;function rn(t,e){let{node:n,root:s}=t,r=Wt(Do,s,()=>new Set);return!r.has(n.position.end.offset)&&(r.add(n.position.end.offset),gr(n,e)&&!ls(t.parent))?en:""}function ls(t){return F(t)&&!J(t,["documentHead","documentBody","flowMapping","flowSequence"])}function K(t,e){return ht(" ".repeat(t),e)}function xo(t,e,n){let{node:s}=t,r=t.ancestors.filter(c=>c.type==="sequence"||c.type==="mapping").length,i=nn(t),o=[s.type==="blockFolded"?">":"|"];s.indent!==null&&o.push(s.indent.toString()),s.chomping!=="clip"&&o.push(s.chomping==="keep"?"+":"-"),as(s)&&o.push(" ",n("indicatorComment"));let a=kr(s,{parentIndent:r,isLastDescendant:i,options:e}),l=[];for(let[c,u]of a.entries())c===0&&l.push(O),l.push(Zt(R(be,u))),c!==a.length-1?l.push(u.length===0?O:Ws(mt)):s.chomping==="keep"&&i&&l.push(zn(u.length===0?O:mt));return s.indent===null?o.push(Xs(K(e.tabWidth,l))):o.push(zn(K(s.indent-1+r,l))),o}var Sr=xo;function on(t,e,n){let{node:s}=t,r=s.type==="flowMapping",i=r?"{":"[",o=r?"}":"]",a=en;r&&s.children.length>0&&e.bracketSpacing&&(a=be);let l=j(0,s.children,-1),c=l?.type==="flowMappingItem"&&Je(l.key)&&Je(l.value);return[i,K(e.tabWidth,[a,Mo(t,e,n),e.trailingComma==="none"?"":gt(","),F(s)?[O,R(O,t.map(n,"endComments"))]:""]),c?"":a,o]}function Mo(t,e,n){return t.map(({isLast:s,node:r,next:i})=>[n(),s?"":[",",be,r.position.start.line!==i.position.start.line?rn(t,e.originalText):""]],"children")}function $o(t,e,n){let{node:s,parent:r}=t,{key:i,value:o}=s,a=Je(i),l=Je(o);if(a&&l)return": ";let c=n("key"),u=Bo(s)?" ":"";if(l)return s.type==="flowMappingItem"&&r.type==="flowMapping"?c:s.type==="mappingItem"&&an(i.content,e)&&!W(i.content)&&r.tag?.value!=="tag:yaml.org,2002:set"?[c,u,":"]:["? ",K(2,c)];let f=n("value");if(a)return[": ",K(2,f)];if(ce(o)||!kt(i.content))return["? ",K(2,c),O,...t.map(()=>[n(),O],"value","leadingComments"),": ",K(2,f)];if(Ro(i.content)&&!ce(i.content)&&!Oe(i.content)&&!W(i.content)&&!F(i)&&!ce(o.content)&&!Oe(o.content)&&!F(o)&&an(o.content,e)&&an(i.content,e))return[c,u,": ",f];let p=Symbol("mappingKey"),h=Ge([gt("? "),Ge(K(2,c),{id:p})]),g=[O,": ",K(2,f)],m=[u,":"];F(o)&&o.content&&J(o.content,["flowMapping","flowSequence"])&&o.content.children.length===0?m.push(" "):ce(o.content)||F(o)&&o.content&&!J(o.content,["mapping","sequence"])||r.type==="mapping"&&W(i.content)&&kt(o.content)||J(o.content,["mapping","sequence"])&&o.content.tag===null&&o.content.anchor===null?m.push(O):o.content?m.push(be):W(o)&&m.push(" "),m.push(f);let d=K(e.tabWidth,m);return an(i.content,e)&&!ce(i.content)&&!Oe(i.content)&&!W(i.content)&&!F(i)?Zn([[c,d]]):Zn([[h,gt(g,d,{groupId:p})]])}function an(t,e){if(!t)return!0;switch(t.type){case"plain":case"quoteSingle":case"quoteDouble":break;case"alias":return!0;default:return!1}if(e.proseWrap==="preserve")return t.position.start.line===t.position.end.line;if(/\\$/m.test(e.originalText.slice(t.position.start.offset,t.position.end.offset)))return!1;switch(e.proseWrap){case"never":return!t.value.includes(`
`);case"always":return!/[\n ]/.test(t.value);default:return!1}}function Bo(t){return t.key.content?.type==="alias"}function Ro(t){if(!t)return!0;switch(t.type){case"plain":case"quoteDouble":case"quoteSingle":return t.position.start.line===t.position.end.line;case"alias":return!0;default:return!1}}var Er=$o;function qo(t){return os(t,Fo)}function Fo(t){switch(t.type){case"document":He(t,"head",()=>t.children[0]),He(t,"body",()=>t.children[1]);break;case"documentBody":case"sequenceItem":case"flowSequenceItem":case"mappingKey":case"mappingValue":He(t,"content",()=>t.children[0]);break;case"mappingItem":case"flowMappingItem":He(t,"key",()=>t.children[0]),He(t,"value",()=>t.children[1]);break}return t}var Cr=qo;function Ko(t,e,n){let{node:s}=t,r=[];s.type!=="mappingValue"&&ce(s)&&r.push([R(O,t.map(n,"leadingComments")),O]);let{tag:i,anchor:o}=s;i&&r.push(n("tag")),i&&o&&r.push(" "),o&&r.push(n("anchor"));let a="";return J(s,["mapping","sequence","comment","directive","mappingItem","sequenceItem"])&&!nn(t)&&(a=rn(t,e.originalText)),(i||o)&&(J(s,["sequence","mapping"])&&!Oe(s)?r.push(O):r.push(" ")),Oe(s)&&r.push([s.middleComments.length===1?"":O,R(O,t.map(n,"middleComments")),O]),yr(t)?r.push(Qs(e.originalText.slice(s.position.start.offset,s.position.end.offset).trimEnd())):r.push(Ge(Yo(t,e,n))),W(s)&&!J(s,["document","documentHead"])&&r.push(zs([s.type==="mappingValue"&&!s.content?"":" ",t.parent.type==="mappingKey"&&t.getParentNode(2).type==="mapping"&&kt(s)?"":dt,n("trailingComment")])),ls(s)&&r.push(K(s.type==="sequenceItem"?2:0,[O,R(O,t.map(({node:l})=>[ns(e.originalText,bt(l))?O:"",n()],"endComments"))])),r.push(a),r}function Yo(t,e,n){let{node:s}=t;switch(s.type){case"root":{let r=sn(s),i=!(J(r,["blockLiteral","blockFolded"])&&r.chomping==="keep"),o=[];return t.each(({node:a,isFirst:l})=>{l||o.push(O),o.push(n()),jo(t)&&(i&&o.push(O),o.push("..."),W(a)&&o.push(" ",n("trailingComment")))},"children"),i&&o.push(O),o}case"document":{let r=[];return Vo(t)&&((s.head.children.length>0||s.head.endComments.length>0)&&r.push(n("head")),W(s.head)?r.push(["---"," ",n(["head","trailingComment"])]):r.push("---")),Uo(s)&&r.push(n("body")),R(O,r)}case"documentHead":return R(O,[...t.map(n,"children"),...t.map(n,"endComments")]);case"documentBody":{let{children:r,endComments:i}=s,o="";if(r.length>0&&i.length>0){let a=sn(s);if(J(a,["blockFolded","blockLiteral"]))a.chomping!=="keep"&&(o=[O,O]);else{let l=j(0,r,-1);o=J(l,["mapping"])&&ns(e.originalText,bt(i[0]))?[O,O]:O}}return[R(O,t.map(n,"children")),o,R(O,t.map(n,"endComments"))]}case"directive":return["%",R(" ",[s.name,...s.parameters])];case"comment":return["#",s.value];case"alias":return["*",s.value];case"tag":return e.originalText.slice(s.position.start.offset,s.position.end.offset);case"anchor":return["&",s.value];case"plain":return St(s.type,e.originalText.slice(s.position.start.offset,s.position.end.offset),e);case"quoteDouble":case"quoteSingle":{let o=e.originalText.slice(s.position.start.offset+1,s.position.end.offset-1);if(s.type==="quoteSingle"&&o.includes("\\")||s.type==="quoteDouble"&&/\\[^"]/.test(o)){let l=s.type==="quoteDouble"?'"':"'";return[l,St(s.type,o,e),l]}if(o.includes('"'))return["'",St(s.type,s.type==="quoteDouble"?Yt(0,Yt(0,o,'\\"','"'),"'","'".repeat(2)):o,e),"'"];if(o.includes("'"))return['"',St(s.type,s.type==="quoteSingle"?Yt(0,o,"''","'"):o,e),'"'];let a=e.singleQuote?"'":'"';return[a,St(s.type,o,e),a]}case"blockFolded":case"blockLiteral":return Sr(t,e,n);case"mapping":case"sequence":return R(O,t.map(n,"children"));case"sequenceItem":return["- ",K(2,s.content?n("content"):"")];case"mappingKey":case"mappingValue":return s.content?n("content"):"";case"mappingItem":case"flowMappingItem":return Er(t,e,n);case"flowMapping":return on(t,e,n);case"flowSequence":return on(t,e,n);case"flowSequenceItem":return n("content");default:throw new er(s,"YAML")}}function Uo(t){return t.body.children.length>0||F(t.body)}function jo(t){let e=t.node;if(e.documentEndMarker||W(e))return!0;if(t.isLast)return!1;let n=t.next;return n.head.children.length>0||F(n.head)}function Vo(t){let e=t.node;return e.directivesEndMarker||e.head.children.length>0||F(e.head)||W(e.head)}function St(t,e,n){let s=br(t,e,n);return R(O,s.map(r=>Zt(R(be,r))))}var Go={preprocess:Cr,embed:nr,print:Ko,massageAstNode:is,insertPragma:hr,getVisitorKeys:ir},Nr=Go;var Ar=[{name:"YAML",type:"data",aceMode:"yaml",extensions:[".yml",".mir",".reek",".rviz",".sublime-syntax",".syntax",".yaml",".yaml-tmlanguage",".yaml.sed",".yml.mysql"],filenames:[".clang-format",".clang-tidy",".clangd",".gemrc","CITATION.cff","glide.lock","pixi.lock",".prettierrc",".stylelintrc",".lintstagedrc"],tmScope:"source.yaml",aliases:["yml"],codemirrorMode:"yaml",codemirrorMimeType:"text/x-yaml",parsers:["yaml"],vscodeLanguageIds:["yaml","ansible","dockercompose","github-actions-workflow","home-assistant"],linguistLanguageId:407}];var ln={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces betLine truncated
`)}};me.defaultYaml={explicit:!1,version:"1.2"};me.defaultTags={"!!":"tag:yaml.org,2002:"};function dn(t){if(/[\x00-\x19\s,[\]{}]/.test(t)){let n=`Anchor must not contain whitespace or control characters: ${JSON.stringify(t)}`;throw new Error(n)}return!0}function us(t){let e=new Set;return pe(t,{Value(n,s){s.anchor&&e.add(s.anchor)}}),e}function ps(t,e){for(let n=1;;++n){let s=`${t}${n}`;if(!e.has(s))return s}}function Zr(t,e){let n=[],s=new Map,r=null;return{onAnchor:i=>{n.push(i),r??(r=us(t));let o=ps(e,r);return r.add(o),o},setAnchors:()=>{for(let i of n){let o=s.get(i);if(typeof o=="object"&&o.anchor&&(N(o.node)||I(o.node)))o.node.anchor=o.anchor;else{let a=new Error("Failed to resolve repeated object (this should not happen)");throw a.source=i,a}}},sourceObjects:s}}function Ie(t,e,n,s){if(s&&typeof s=="object")if(Array.isArray(s))for(let r=0,i=s.length;r<i;++r){let o=s[r],a=Ie(t,s,String(r),o);a===void 0?delete s[r]:a!==o&&(s[r]=a)}else if(s instanceof Map)for(let r of Array.from(s.keys())){let i=s.get(r),o=Ie(t,s,r,i);o===void 0?s.delete(r):o!==i&&s.set(r,o)}else if(s instanceof Set)for(let r of Array.from(s)){let i=Ie(t,s,r,r);i===void 0?s.delete(r):i!==r&&(s.delete(r),s.add(i))}else for(let[r,i]of Object.entries(s)){let o=Ie(t,s,r,i);o===void 0?delete s[r]:o!==i&&(s[r]=o)}return t.call(e,n,s)}function B(t,e,n){if(Array.isArray(t))return t.map((s,r)=>B(s,String(r),n));if(t&&typeof t.toJSON=="function"){if(!n||!mn(t))return t.toJSON(e,n);let s={aliasCount:0,count:1,res:void 0};n.anchors.set(t,s),n.onCreate=i=>{s.res=i,delete n.onCreate};let r=t.toJSON(e,n);return n.onCreate&&n.onCreate(r),r}return typeof t=="bigint"&&!n?.keep?Number(t):t}var Le=class{constructor(e){Object.defineProperty(this,V,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:n,maxAliasCount:s,onAnchor:r,reviver:i}={}){if(!fe(e))throw new TypeError("A document argument is required");let o={anchors:new Map,doc:e,keep:!0,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof s=="number"?s:100},a=B(this,"",o);if(typeof r=="function")for(let{count:l,res:c}of o.anchors.values())r(c,l);return typeof i=="function"?Ie(i,{"":a},"",a):a}};var Ce=class extends Le{constructor(e){super(un),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e,n){if(n?.maxAliasCount===0)throw new ReferenceError("Alias resolution is disabled");let s;n?.aliasResolveCache?s=n.aliasResolveCache:(s=[],pe(e,{Node:(i,o)=>{(Z(o)||mn(o))&&s.push(o)}}),n&&(n.aliasResolveCache=s));let r;for(let i of s){if(i===this)break;i.anchor===this.source&&(r=i)}return r}toJSON(e,n){if(!n)return{source:this.source};let{anchors:s,doc:r,maxAliasCount:i}=n,o=this.resolve(r,n);if(!o){let l=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(l)}let a=s.get(o);if(a||(B(o,null,n),a=s.get(o)),a?.res===void 0){let l="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(l)}if(i>=0&&(a.count+=1,a.aliasCount===0&&(a.aliasCount=gn(r,o,s)),a.count*a.aliasCount>i)){let l="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(l)}return a.res}toString(e,n,s){let r=`*${this.source}`;if(e){if(dn(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let i=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(i)}if(e.implicitKey)return`${r} `}return r}};function gn(t,e,n){if(Z(e)){let s=e.resolve(t),r=n&&s&&n.get(s);return r?r.count*r.aliasCount:0}else if(I(e)){let s=0;for(let r of e.items){let i=gn(t,r,n);i>s&&(s=i)}return s}else if(T(e)){let s=gn(t,e.key,n),r=gn(t,e.value,n);return Math.max(s,r)}return 1}var yn=t=>!t||typeof t!="function"&&typeof t!="object",y=class extends Le{constructor(e){super(z),this.value=e}toJSON(e,n){return n?.keep?this.value:B(this.value,e,n)}toString(){return String(this.value)}};y.BLOCK_FOLDED="BLOCK_FOLDED";y.BLOCK_LITERAL="BLOCK_LITERAL";y.PLAIN="PLAIN";y.QUOTE_DOUBLE="QUOTE_DOUBLE";y.QUOTE_SINGLE="QUOTE_SINGLE";var na="tag:yaml.org,2002:";function sa(t,e,n){if(e){let s=n.filter(i=>i.tag===e),r=s.find(i=>!i.format)??s[0];if(!r)throw new Error(`Tag ${e} not found`);return r}return n.find(s=>s.identify?.(t)&&!s.format)}function Ne(t,e,n){if(fe(t)&&(t=t.contents),_(t))return t;if(T(t)){let f=n.schema[re].createNode?.(n.schema,null,n);return f.items.push(t),f}(t instanceof String||t instanceof Number||t instanceof Boolean||typeof BigInt<"u"&&t instanceof BigInt)&&(t=t.valueOf());let{aliasDuplicateObjects:s,onAnchor:r,onTagObj:i,schema:o,sourceObjects:a}=n,l;if(s&&t&&typeof t=="object"){if(l=a.get(t),l)return l.anchor??(l.anchor=r(t)),new Ce(l.anchor);l={anchor:null,node:null},a.set(t,l)}e?.startsWith("!!")&&(e=na+e.slice(2));let c=sa(t,e,o.tags);if(!c){if(t&&typeof t.toJSON=="function"&&(t=t.toJSON()),!t||typeof t!="object"){let f=new y(tLine truncated
`)?te(n,e):n.includes(`
`)?`
`+te(n,e):(t.endsWith(" ")?"":" ")+n;var ms="flow",wn="block",Tt="quoted";function Ot(t,e,n="flow",{indentAtStart:s,lineWidth:r=80,minContentWidth:i=20,onFold:o,onOverflow:a}={}){if(!r||r<0)return t;r<i&&(i=0);let l=Math.max(1+i,1+r-e.length);if(t.length<=l)return t;let c=[],u={},f=r-e.length;typeof s=="number"&&(s>r-Math.max(2,i)?c.push(0):f=r-s);let p,h,g=!1,m=-1,d=-1,b=-1;n===wn&&(m=ti(t,m,e.length),m!==-1&&(f=m+l));for(let S;S=t[m+=1];){if(n===Tt&&S==="\\"){switch(d=m,t[m+1]){case"x":m+=3;break;case"u":m+=5;break;case"U":m+=9;break;default:m+=1}b=m}if(S===`
`)n===wn&&(m=ti(t,m,e.length)),f=m+e.length+l,p=void 0;else{if(S===" "&&h&&h!==" "&&h!==`
`&&h!==" "){let E=t[m+1];E&&E!==" "&&E!==`
`&&E!==" "&&(p=m)}if(m>=f)if(p)c.push(p),f=p+l,p=void 0;else if(n===Tt){for(;h===" "||h===" ";)h=S,S=t[m+=1],g=!0;let E=m>b+1?m-2:d-1;if(u[E])return t;c.push(E),u[E]=!0,f=E+l,p=void 0}else g=!0}h=S}if(g&&a&&a(),c.length===0)return t;o&&o();let k=t.slice(0,c[0]);for(let S=0;S<c.length;++S){let E=c[S],C=c[S+1]||t.length;E===0?k=`
${e}${t.slice(0,C)}`:(n===Tt&&u[E]&&(k+=`${t[E]}\\`),k+=`
${e}${t.slice(E+1,C)}`)}return k}function ti(t,e,n){let s=e,r=e+1,i=t[r];for(;i===" "||i===" ";)if(e<r+n)i=t[++e];else{do i=t[++e];while(i&&i!==`
`);s=e,r=e+1,i=t[r]}return s}var kn=(t,e)=>({indentAtStart:e?t.indent.length:t.indentAtStart,lineWidth:t.options.lineWidth,minContentWidth:t.options.minContentWidth}),Sn=t=>/^(%|---|\.\.\.)/m.test(t);function ra(t,e,n){if(!e||e<0)return!1;let s=e-n,r=t.length;if(r<=s)return!1;for(let i=0,o=0;i<r;++i)if(t[i]===`
`){if(i-o>s)return!0;if(o=i+1,r-o<=s)return!1}return!0}function _t(t,e){let n=JSON.stringify(t);if(e.options.doubleQuotedAsJSON)return n;let{implicitKey:s}=e,r=e.options.doubleQuotedMinMultiLineLength,i=e.indent||(Sn(t)?" ":""),o="",a=0;for(let l=0,c=n[l];c;c=n[++l])if(c===" "&&n[l+1]==="\\"&&n[l+2]==="n"&&(o+=n.slice(a,l)+"\\ ",l+=1,a=l,c="\\"),c==="\\")switch(n[l+1]){case"u":{o+=n.slice(a,l);let u=n.substr(l+2,4);switch(u){case"0000":o+="\\0";break;case"0007":o+="\\a";break;case"000b":o+="\\v";break;case"001b":o+="\\e";break;case"0085":o+="\\N";break;case"00a0":o+="\\_";break;case"2028":o+="\\L";break;case"2029":o+="\\P";break;default:u.substr(0,2)==="00"?o+="\\x"+u.substr(2):o+=n.substr(l,6)}l+=5,a=l+1}break;case"n":if(s||n[l+2]==='"'||n.length<r)l+=1;else{for(o+=n.slice(a,l)+`
`;n[l+2]==="\\"&&n[l+3]==="n"&&n[l+4]!=='"';)o+=`
`,l+=2;o+=i,n[l+2]===" "&&(o+="\\"),l+=1,a=l+1}break;default:l+=1}return o=a?o+n.slice(a):n,s?o:Ot(o,i,Tt,kn(e,!1))}function hs(t,e){if(e.options.singleQuote===!1||e.implicitKey&&t.includes(`
`)||/[ \t]\n|\n[ \t]/.test(t))return _t(t,e);let n=e.indent||(Sn(t)?" ":""),s="'"+t.replace(/'/g,"''").replace(/\n+/g,`$&
${n}`)+"'";return e.implicitKey?s:Ot(s,n,ms,kn(e,!1))}function et(t,e){let{singleQuote:n}=e.options,s;if(n===!1)s=_t;else{let r=t.includes('"'),i=t.includes("'");r&&!i?s=hs:i&&!r?s=_t:s=n?hs:_t}return s(t,e)}var ds;try{ds=new RegExp(`(^|(?<!
))
+(?!
|$)`,"g")}catch{ds=/\n+(?!\n|$)/g}function bn({comment:t,type:e,value:n},s,r,i){let{blockQuote:o,commentString:a,lineWidth:l}=s.options;if(!o||/\n[\t ]+$/.test(n))return et(n,s);let c=s.indent||(s.forceBlockIndent||Sn(n)?" ":""),u=o==="literal"?!0:o==="folded"||e===y.BLOCK_FOLDED?!1:e===y.BLOCK_LITERAL?!0:!ra(n,l,c.length);if(!n)return u?`|
`:`>
`;let f,p;for(p=n.length;p>0;--p){let C=n[p-1];if(C!==`
`&&C!==" "&&C!==" ")break}let h=n.substring(p),g=h.indexOf(`
`);g===-1?f="-":n===h||g!==h.length-1?(f="+",i&&i()):f="",h&&(n=n.slice(0,-h.length),h[h.length-1]===`
`&&(h=h.slice(0,-1)),h=h.replace(ds,`$&${c}`));let m=!1,d,b=-1;for(d=0;d<n.length;++d){let C=n[d];if(C===" ")m=!0;else if(C===`
`)b=d;else break}let k=n.substring(0,b<d?b+1:d);k&&(n=n.substring(k.length),k=k.replace(/\n+/g,`$&${c}`));let E=(m?c?"2":"1":"")+f;if(t&&(E+=" "+a(t.replace(/ ?[\r\n]+/g," ")),r&&r()),!u){let C=n.replace(/\n+/g,`
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${c}`),A=!1,L=kn(s,!0);o!=="folded"&&e!==y.BLOCK_FOLDED&&(L.onOverflow=()=>{A=!0});let w=Ot(`${k}${C}${h}`,c,wn,L);if(!A)return`>${E}
${c}${w}`}return n=n.replace(/\n+/g,`$&${c}`),`|${E}
${c}${k}${n}${h}`}function ia(t,e,n,s){let{type:r,value:i}=t,{actualString:o,implicitKey:a,indent:l,indentStep:c,inFlow:u}=e;if(a&&i.includes(`
`)||u&&/[[\]{},]/.test(i))return et(i,e);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(i))return a||u||!i.includes(`
`)?et(i,e):bn(t,e,n,s);if(!a&&!u&&r!==y.PLAIN&&i.includes(`
`))return bn(t,e,n,s);if(Sn(i)){if(l==="")return e.forceBlockIndent=!0,bn(t,e,n,s);if(a&&l===c)return et(i,e)}let f=i.replace(/\n+/g,`$&
${l}`);if(o){let p=m=>m.default&&m.tag!=="tag:yaml.org,2002:str"&&m.test?.test(f),{compat:h,tags:g}=e.doc.schema;if(g.some(p)||h?.some(p))return et(i,e)}return a?f:Ot(f,l,ms,kn(e,!1))}function $e(t,e,n,s){let{implicitKey:r,inFlow:i}=e,o=typeof t.value=="string"?t:Object.assign({},t,{value:String(t.value)}),{type:a}=t;a!==y.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value)&&(a=y.QUOTE_DOUBLE);let l=u=>{switch(u){case y.BLOCK_FOLDED:case y.BLOCK_LITERAL:return r||i?et(o.value,e):bn(o,e,n,s);case y.QUOTE_DOUBLE:return _t(o.value,e);case y.QUOTE_SINGLE:return hs(o.value,e);case y.PLAIN:return ia(o,e,n,s);default:return null}},c=l(a);if(c===null){let{defaultKeyType:u,defaultStringType:f}=e.options,p=r&&u||f;if(c=l(p),c===null)throw new Error(`Unsupported default string type ${p}`)}return c}function En(t,e){let n=Object.assign({blockQuote:!0,commentString:ei,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},t.schema.toStringOptions,e),s;switch(n.collectionStyle){case"block":s=!1;break;case"flow":s=!0;break;default:s=null}return{anchors:new Set,doc:t,flowCollectionPadding:n.flowCollectionPadding?" ":"",indent:"",indentStep:typeof n.indent=="number"?" ".repeat(n.indent):" ",inFlow:s,options:n}}function oa(t,e){if(e.tag){let r=t.filter(i=>i.tag===e.tag);if(r.length>0)return r.find(i=>i.format===e.format)??r[0]}let n,s;if(N(e)){s=e.value;let r=t.filter(i=>i.identify?.(s));if(r.length>1){let i=r.filter(o=>o.test);i.length>0&&(r=i)}n=r.find(i=>i.format===e.format)??r.find(i=>!i.format)}else s=e,n=t.find(r=>r.nodeClass&&s instanceof r.nodeClass);if(!n){let r=s?.constructor?.name??(s===null?"null":typeof s);throw new Error(`Tag not resolved for ${r} value`)}return n}function aa(t,e,{anchors:n,doc:s}){if(!s.directives)return"";let r=[],i=(N(t)||I(t))&&t.anchor;i&&dn(i)&&(n.add(i),r.push(`&${i}`));let o=t.tag??(e.default?null:e.tag);return o&&r.push(s.directives.tagString(o)),r.join(" ")}function Ae(t,e,n,s){if(T(t))return t.toString(e,n,s);if(Z(t)){if(e.doc.directives)return t.toString(e);if(e.resolvedAliases?.has(t))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(t):e.resolvedAliases=new Set([t]),t=t.resolve(e.doc)}let r,i=_(t)?t:e.doc.createNode(t,{onTagObj:l=>r=l});r??(r=oa(e.doc.schema.tags,i));let o=aa(i,r,e);o.length>0&&(e.indentAtStart=(e.indentAtStart??0)+o.length+1);let a=typeof r.stringify=="function"?r.stringify(i,e,n,s):N(i)?$e(i,e,n,s):i.toString(e,n,s);return o?N(i)||a[0]==="{"||a[0]==="["?`${o} ${a}`:`${o}
${e.indent}${a}`:a}function ni({key:t,value:e},n,s,r){let{allNullValues:i,doc:o,indent:a,indentStep:l,options:{commentString:c,indentSeq:u,simpleKeys:f}}=n,p=_(t)&&t.comment||null;if(f){if(p)throw new Error("With simple keys, key nodes cannot have comments");if(I(t)||!_(t)&&typeof t=="object"){let L="With simple keys, collection cannot be used as a key value";throw new Error(L)}}let h=!f&&(!t||p&&e==null&&!n.inFlow||I(t)||(N(t)?t.type===y.BLOCK_FOLDED||t.type===y.BLOCK_LITERAL:typeof t=="object"));n=Object.assign({},n,{allNullValues:!1,implicitKey:!h&&(f||!i),indent:a+l});let g=!1,m=!1,d=Ae(t,n,()=>g=!0,()=>m=!0);if(!h&&!n.inFlow&&d.length>1024){if(f)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");h=!0}if(n.inFlow){if(i||e==null)return g&&s&&s(),d===""?"?":h?`? ${d}`:d}else if(i&&!f||e==null&&h)return d=`? ${d}`,p&&!g?d+=he(d,n.indent,c(p)):m&&r&&r(),d;g&&(p=null),h?(p&&(d+=he(d,n.indent,c(p))),d=`? ${d}
${a}:`):(d=`${d}:`,p&&(d+=he(d,n.indent,c(p))));let b,k,S;_(e)?(b=!!e.spaceBefore,k=e.commentBefore,S=e.comment):(b=!1,k=null,S=null,e&&typeof e=="object"&&(e=o.createNode(e))),n.implicitKey=!1,!h&&!p&&N(e)&&(n.indentAtStart=d.length+1),m=!1,!u&&l.length>=2&&!n.inFlow&&!h&&ee(e)&&!e.flow&&!e.tag&&!e.anchor&&(n.indent=n.indent.substring(2));let E=!1,C=Ae(e,n,()=>E=!0,()=>m=!0),A=" ";if(p||b||k){if(A=b?`
`:"",k){let L=c(k);A+=`
${te(L,n.indent)}`}C===""&&!n.inFlow?A===`
`&&S&&(A=`
`):A+=`
${n.indent}`}else if(!h&&I(e)){let L=C[0],w=C.indexOf(`
`),M=w!==-1,Te=n.inFlow??e.flow??e.items.length===0;if(M||!Te){let qe=!1;if(M&&(L==="&"||L==="!")){let $=C.indexOf(" ");L==="&"&&$!==-1&&$<w&&C[$+1]==="!"&&($=C.indexOf(" ",$+1)),($===-1||w<$)&&(qe=!0)}qe||(A=`
${n.indent}`)}}else(C===""||C[0]===`
`)&&(A="");return d+=A+C,n.inFlow?E&&s&&s():S&&!E?d+=he(d,n.indent,c(S)):m&&r&&r(),d}function gs(t,e){(t==="debug"||t==="warn")&&console.warn(e)}var Cn="<<",ie={identify:t=>t===Cn||typeof t=="symbol"&&t.description===Cn,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new y(Symbol(Cn)),{addToJSMap:ws}),stringify:()=>Cn},si=(t,e)=>(ie.identify(e)||N(e)&&(!e.type||e.type===y.PLAIN)&&ie.identify(e.value))&&t?.doc.schema.tags.some(n=>n.tag===ie.tag&&n.default);function ws(t,e,n){let s=ri(t,n);if(ee(s))for(let r of s.items)ys(t,e,r);else if(Array.isArray(s))for(let r of s)ys(t,e,r);else ys(t,e,s)}function ys(t,e,n){let s=ri(t,n);if(!G(s))throw new Error("Merge sources must be maps or map aliases");let r=s.toJSON(null,t,Map);for(let[i,o]of r)e instanceof Map?e.has(i)||e.set(i,o):e instanceof Set?e.add(i):Object.prototype.hasOwnProperty.call(e,i)||Object.defineProperty(e,i,{value:o,writable:!0,enumerable:!0,configurable:!0});return e}function ri(t,e){return t&&Z(e)?e.resolve(t.doc,t):e}function Nn(t,e,{key:n,value:s}){if(_(n)&&n.addToJSMap)n.addToJSMap(t,e,s);else if(si(t,n))ws(t,e,s);else{let r=B(n,"",t);if(e instanceof Map)e.set(r,B(s,r,t));else if(e instanceof Set)e.add(r);else{let i=la(n,r,t),o=B(s,i,t);i in e?Object.defineProperty(e,i,{value:o,writable:!0,enumerable:!0,configurable:!0}):e[i]=o}}return e}function la(t,e,n){if(e===null)return"";if(typeof e!="object")return String(e);if(_(t)&&n?.doc){let s=En(n.doc,{});s.anchors=new Set;for(let i of n.anchors.keys())s.anchors.add(i.anchor);s.inFlow=!0,s.inStringifyKey=!0;let r=t.toString(s);if(!n.mapKeyWarned){let i=JSON.stringify(r);i.length>40&&(i=i.substring(0,36)+'..."'),gs(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${i}. Set mapAsMap: true to use object keys.`),n.mapKeyWarned=!0}return r}return JSON.stringify(e)}function tt(t,e,n){let s=Ne(t,void 0,n),r=Ne(e,void 0,n);return new D(s,r)}var D=class t{constructor(e,n=null){Object.defineProperty(this,V,{value:fs}),this.key=e,this.value=n}clone(e){let{key:n,value:s}=this;return _(n)&&(n=n.clone(e)),_(s)&&(s=s.clone(e)),new t(n,s)}toJSON(e,n){let s=n?.mapAsMap?new Map:{};return Nn(n,s,this)}toString(e,n,s){return e?.doc?ni(this,e,n,s):JSON.stringify(this)}};function Tn(t,e,n){return(e.inFlow??t.flow?fa:ca)(t,e,n)}function ca({comment:t,items:e},n,{blockItemPrefix:s,flowChars:r,itemIndent:i,onChompKeep:o,onComment:a}){let{indent:l,options:{commentString:c}}=n,u=Object.assign({},n,{indent:i,type:null}),f=!1,p=[];for(let g=0;g<e.length;++g){let m=e[g],d=null;if(_(m))!f&&m.spaceBefore&&p.push(""),An(n,p,m.commentBefore,f),m.comment&&(d=m.comment);else if(T(m)){let k=_(m.key)?m.key:null;k&&(!f&&k.spaceBefore&&p.push(""),An(n,p,k.commentBefore,f))}f=!1;let b=Ae(m,u,()=>d=null,()=>f=!0);d&&(b+=he(b,i,c(d))),f&&d&&(f=!1),p.push(s+b)}let h;if(p.length===0)h=r.start+r.end;else{h=p[0];for(let g=1;g<p.length;++g){let m=p[g];h+=m?`
${l}${m}`:`
`}}return t?(h+=`
`+te(c(t),l),a&&a()):f&&o&&o(),h}function fa({items:t},e,{flowChars:n,itemIndent:s}){let{indent:r,indentStep:i,flowCollectionPadding:o,options:{commentString:a}}=e;s+=i;let l=Object.assign({},e,{indent:s,inFlow:!0,type:null}),c=!1,u=0,f=[];for(let g=0;g<t.length;++g){let m=t[g],d=null;if(_(m))m.spaceBefore&&f.push(""),An(e,f,m.commentBefore,!1),m.comment&&(d=m.comment);else if(T(m)){let k=_(m.key)?m.key:null;k&&(k.spaceBefore&&f.push(""),An(e,f,k.commentBefore,!1),k.comment&&(c=!0));let S=_(m.value)?m.value:null;S?(S.comment&&(d=S.comment),S.commentBefore&&(c=!0)):m.value==null&&k?.comment&&(d=k.comment)}d&&(c=!0);let b=Ae(m,l,()=>d=null);c||(c=f.length>u||b.includes(`
`)),g<t.length-1?b+=",":e.options.trailingComma&&(e.options.lineWidth>0&&(c||(c=f.reduce((k,S)=>k+S.length+2,2)+(b.length+2)>e.options.lineWidth)),c&&(b+=",")),d&&(b+=he(b,s,a(d))),f.push(b),u=f.length}let{start:p,end:h}=n;if(f.length===0)return p+h;if(!c){let g=f.reduce((m,d)=>m+d.length+2,2);c=e.options.lineWidth>0&&g>e.options.lineWidth}if(c){let g=p;for(let m of f)g+=m?`
${i}${r}${m}`:`
`;return`${g}
${r}${h}`}else return`${p}${o}${f.join(" ")}${o}${h}`}function An({indent:t,options:{commentString:e}},n,s,r){if(s&&r&&(s=s.replace(/^\n+/,"")),s){let i=te(e(s),t);n.push(i.trimStart())}}function Pe(t,e){let n=N(e)?e.value:e;for(let s of t)if(T(s)&&(s.key===e||s.key===n||N(s.key)&&s.key.value===n))return s}var x=class extends ze{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(re,e),this.items=[]}static from(e,n,s){let{keepUndefined:r,replacer:i}=s,o=new this(e),a=(l,c)=>{if(typeof i=="function")c=i.call(n,l,c);else if(Array.isArray(i)&&!i.includes(l))return;(c!==void 0||r)&&o.items.push(tt(l,c,s))};if(n instanceof Map)for(let[l,c]of n)a(l,c);else if(n&&typeof n=="object")for(let l of Object.keys(n))a(l,n[l]);return typeof e.sortMapEntries=="function"&&o.items.sort(e.sortMapEntries),o}add(e,n){let s;T(e)?s=e:!e||typeof e!="object"||!("key"in e)?s=new D(e,e?.value):s=new D(e.key,e.value);let r=Pe(this.items,s.key),i=this.schema?.sortMapEntries;if(r){if(!n)throw new Error(`Key ${s.key} already set`);N(r.value)&&yn(s.value)?r.value.value=s.value:r.value=s.value}else if(i){let o=this.items.findIndex(a=>i(s,a)<0);o===-1?this.items.push(s):this.items.splice(o,0,s)}else this.items.push(s)}delete(e){let n=Pe(this.items,e);return n?this.items.splice(this.items.indexOf(n),1).length>0:!1}get(e,n){let r=Pe(this.items,e)?.value;return(!n&&N(r)?r.value:r)??void 0}has(e){return!!Pe(this.items,e)}set(e,n){this.add(new D(e,n),!0)}toJSON(e,n,s){let r=s?new s:n?.mapAsMap?new Map:{};n?.onCreate&&n.onCreate(r);for(let i of this.items)Nn(n,r,i);return r}toString(e,n,s){if(!e)return JSON.stringify(this);for(let r of this.items)if(!T(r))throw new Error(`Map items must all be pairs; found ${JSON.stringify(r)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),Tn(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:s,onComment:n})}};var oe={collection:"map",default:!0,nodeClass:x,tag:"tag:yaml.org,2002:map",resolve(t,e){return G(t)||e("Expected a mapping for this tag"),t},createNode:(t,e,n)=>x.from(t,e,n)};var Y=class extends ze{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(Ee,e),this.items=[]}add(e){this.items.push(e)}delete(e){let n=On(e);return typeof n!="number"?!1:this.items.splice(n,1).length>0}get(e,n){let s=On(e);if(typeof s!="number")return;let r=this.items[s];return!n&&N(r)?r.value:r}has(e){let n=On(e);return typeof n=="number"&&n<this.items.length}set(e,n){let s=On(e);if(typeof s!="number")throw new Error(`Expected a valid index, not ${e}.`);let r=this.items[s];N(r)&&yn(n)?r.value=n:this.items[s]=n}toJSON(e,n){let s=[];n?.onCreate&&n.onCreate(s);let r=0;for(let i of this.items)s.push(B(i,String(r++),n));return s}toString(e,n,s){return e?Tn(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:s,onComment:n}):JSON.stringify(this)}static from(e,n,s){let{replacer:r}=s,i=new this(e);if(n&&Symbol.iterator in Object(n)){let o=0;for(let a of n){if(typeof r=="function"){let l=n instanceof Set?a:String(o++);a=r.call(n,l,a)}i.items.push(Ne(a,void 0,s))}}return i}};function On(t){let e=N(t)?t.value:t;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}var ae={collection:"seq",default:!0,nodeClass:Y,tag:"tag:yaml.org,2002:seq",resolve(t,e){return ee(t)||e("Expected a sequence for this tag"),t},createNode:(t,e,n)=>Y.from(t,e,n)};var ve={identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify(t,e,n,s){return e=Object.assign({actualString:!0},e),$e(t,e,n,s)}};var Be={identify:t=>t==null,createNode:()=>new y(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new y(null),stringify:({source:t},e)=>typeof t=="string"&&Be.test.test(t)?t:e.options.nullStr};var It={identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:t=>new y(t[0]==="t"||t[0]==="T"),stringify({source:t,value:e},n){if(t&&It.test.test(t)){let s=t[0]==="t"||t[0]==="T";if(e===s)return t}return e?n.options.trueStr:n.options.falseStr}};function U({format:t,minFractionDigits:e,tag:n,value:s}){if(typeof s=="bigint")return String(s);let r=typeof s=="number"?s:Number(s);if(!isFinite(r))return isNaN(r)?".nan":r<0?"-.inf":".inf";let i=Object.is(s,-0)?"-0":JSON.stringify(s);if(!t&&e&&(!n||n==="tag:yaml.org,2002:float")&&/^-?\d/.test(i)&&!i.includes("e")){let o=i.indexOf(".");o<0&&(o=i.length,i+=".");let a=e-(i.length-o-1);for(;a-- >0;)i+="0"}return i}var _n={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:U},In={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+Line truncated
`:" ")}return $e({comment:t,type:e,value:a},s,r,i)}};function ks(t,e){if(ee(t))for(let n=0;n<t.items.length;++n){let s=t.items[n];if(!T(s)){if(G(s)){s.items.length>1&&e("Each pair must have its own sequence indicator");let r=s.items[0]||new D(new y(null));if(s.commentBefore&&(r.key.commentBefore=r.key.commentBefore?`${s.commentBefore}
${r.key.commentBefore}`:s.commentBefore),s.comment){let i=r.value??r.key;i.comment=i.comment?`${s.comment}
${i.comment}`:s.comment}s=r}t.items[n]=T(s)?s:new D(s)}}else e("Expected a sequence for this tag");return t}function Ss(t,e,n){let{replacer:s}=n,r=new Y(t);r.tag="tag:yaml.org,2002:pairs";let i=0;if(e&&Symbol.iterator in Object(e))for(let o of e){typeof s=="function"&&(o=s.call(e,String(i++),o));let a,l;if(Array.isArray(o))if(o.length===2)a=o[0],l=o[1];else throw new TypeError(`Expected [key, value] tuple: ${o}`);else if(o&&o instanceof Object){let c=Object.keys(o);if(c.length===1)a=c[0],l=o[a];else throw new TypeError(`Expected tuple with one key, not ${c.length} keys`)}else a=o;r.items.push(tt(a,l,n))}return r}var Pt={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:ks,createNode:Ss};var nt=class t extends Y{constructor(){super(),this.add=x.prototype.add.bind(this),this.delete=x.prototype.delete.bind(this),this.get=x.prototype.get.bind(this),this.has=x.prototype.has.bind(this),this.set=x.prototype.set.bind(this),this.tag=t.tag}toJSON(e,n){if(!n)return super.toJSON(e);let s=new Map;n?.onCreate&&n.onCreate(s);for(let r of this.items){let i,o;if(T(r)?(i=B(r.key,"",n),o=B(r.value,i,n)):i=B(r,"",n),s.has(i))throw new Error("Ordered maps must not include duplicate keys");s.set(i,o)}return s}static from(e,n,s){let r=Ss(e,n,s),i=new this;return i.items=r.items,i}};nt.tag="tag:yaml.org,2002:omap";var vt={collection:"seq",identify:t=>t instanceof Map,nodeClass:nt,default:!1,tag:"tag:yaml.org,2002:omap",resolve(t,e){let n=ks(t,e),s=[];for(let{key:r}of n.items)N(r)&&(s.includes(r.value)?e(`Ordered maps must not include duplicate keys: ${r.value}`):s.push(r.value));return Object.assign(new nt,n)},createNode:(t,e,n)=>nt.from(t,e,n)};function ci({value:t,source:e},n){return e&&(t?Es:Cs).test.test(e)?e:t?n.options.trueStr:n.options.falseStr}var Es={identify:t=>t===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new y(!0),stringify:ci},Cs={identify:t=>t===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new y(!1),stringify:ci};var fi={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:U},ui={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t.replace(/_/g,"")),stringify(t){let e=Number(t.value);return isFinite(e)?e.toExponential():U(t)}},pi={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(t){let e=new y(parseFloat(t.replace(/_/g,""))),n=t.indexOf(".");if(n!==-1){let s=t.substring(n+1).replace(/_/g,"");s[s.length-1]==="0"&&(e.minFractionDigits=s.length)}return e},stringify:U};var Dt=t=>typeof t=="bigint"||Number.isInteger(t);function $n(t,e,n,{intAsBigInt:s}){let r=t[0];if((r==="-"||r==="+")&&(e+=1),t=t.substring(e).replace(/_/g,""),s){switch(n){case 2:t=`0b${t}`;break;case 8:t=`0o${t}`;break;case 16:t=`0x${t}`;break}let o=BigInt(t);return r==="-"?BigInt(-1)*o:o}let i=parseInt(t,n);return r==="-"?-1*i:i}function Ns(t,e,n){let{value:s}=t;if(Dt(s)){let r=s.toString(e);return s<0?"-"+n+r.substr(1):n+r}return U(t)}var mi={identify:Dt,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(t,e,n)=>$n(t,2,2,n),stringify:t=>Ns(t,2,"0b")},hi={identify:Dt,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(t,e,n)=>$n(t,1,8,n),stringify:t=>Ns(t,8,"0")},di={identify:Dt,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(t,e,n)=>$n(t,0,10,n),stringify:U},gi={identify:Dt,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(t,e,n)=>$n(t,2,16,n),stringify:t=>Ns(t,16,"0x")};var st=class t extends x{constructor(e){super(e),this.tag=t.tag}add(e){let n;T(e)?n=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?n=new D(e.key,null):n=new D(e,null),Pe(this.items,n.key)||this.items.push(n)}get(e,n){let s=Pe(this.items,e);return!n&&T(s)?N(s.key)?s.key.value:s.key:s}set(e,n){if(typeof n!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof n}`);let s=Pe(this.items,e);s&&!n?this.items.splice(this.items.indexOf(s),1):!s&&n&&this.items.push(new D(e))}toJSON(e,n){return super.toJSON(e,n,Set)}toString(e,n,s){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),n,s);throw new Error("Set items must all have null values")}static from(e,n,s){let{replacer:r}=s,i=new this(e);if(n&&Symbol.iterator in Object(n))for(let o of n)typeof r=="function"&&(o=r.call(n,o,o)),i.items.push(tt(o,null,s));return i}};st.tag="tag:yaml.org,2002:set";var xt={collection:"map",identify:t=>t instanceof Set,nodeClass:st,defaultLine truncated
`)?(n.push("..."),n.push(te(l,""))):n.push(`... ${l}`)}else n.push("...");else{let l=t.comment;l&&o&&(l=l.replace(/^\n+/,"")),l&&((!o||a)&&n[n.length-1]!==""&&n.push(""),n.push(te(i(l),"")))}return n.join(`
`)+`
`}var De=class t{constructor(e,n,s){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,V,{value:pn});let r=null;typeof n=="function"||Array.isArray(n)?r=n:s===void 0&&n&&(s=n,n=void 0);let i=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},s);this.options=i;let{version:o}=i;s?._directives?(this.directives=s._directives.atDocument(),this.directives.yaml.explicit&&(o=this.directives.yaml.version)):this.directives=new me({version:o}),this.setSchema(o,s),this.contents=e===void 0?null:this.createNode(e,r,s)}clone(){let e=Object.create(t.prototype,{[V]:{value:pn}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=_(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){it(this.contents)&&this.contents.add(e)}addIn(e,n){it(this.contents)&&this.contents.addIn(e,n)}createAlias(e,n){if(!e.anchor){let s=us(this);e.anchor=!n||s.has(n)?ps(n||"a",s):n}return new Ce(e.anchor)}createNode(e,n,s){let r;if(typeof n=="function")e=n.call({"":e},"",e),r=n;else if(Array.isArray(n)){let d=k=>typeof k=="number"||k instanceof String||k instanceof Number,b=n.filter(d).map(String);b.length>0&&(n=n.concat(b)),r=n}else s===void 0&&n&&(s=n,n=void 0);let{aliasDuplicateObjects:i,anchorPrefix:o,flow:a,keepUndefined:l,onTagObj:c,tag:u}=s??{},{onAnchor:f,setAnchors:p,sourceObjects:h}=Zr(this,o||"a"),g={aliasDuplicateObjects:i??!0,keepUndefined:l??!1,onAnchor:f,onTagObj:c,replacer:r,schema:this.schema,sourceObjects:h},m=Ne(e,u,g);return a&&I(m)&&(m.flow=!0),p(),m}createPair(e,n,s={}){let r=this.createNode(e,null,s),i=this.createNode(n,null,s);return new D(r,i)}delete(e){return it(this.contents)?this.contents.delete(e):!1}deleteIn(e){return Ze(e)?this.contents==null?!1:(this.contents=null,!0):it(this.contents)?this.contents.deleteIn(e):!1}get(e,n){return I(this.contents)?this.contents.get(e,n):void 0}getIn(e,n){return Ze(e)?!n&&N(this.contents)?this.contents.value:this.contents:I(this.contents)?this.contents.getIn(e,n):void 0}has(e){return I(this.contents)?this.contents.has(e):!1}hasIn(e){return Ze(e)?this.contents!==void 0:I(this.contents)?this.contents.hasIn(e):!1}set(e,n){this.contents==null?this.contents=At(this.schema,[e],n):it(this.contents)&&this.contents.set(e,n)}setIn(e,n){Ze(e)?this.contents=n:this.contents==null?this.contents=At(this.schema,Array.from(e),n):it(this.contents)&&this.contents.setIn(e,n)}setSchema(e,n={}){typeof e=="number"&&(e=String(e));let s;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new me({version:"1.1"}),s={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new me({version:e}),s={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,s=null;break;default:{let r=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${r}`)}}if(n.schema instanceof Object)this.schema=n.schema;else if(s)this.schema=new Mt(Object.assign(s,n));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:n,mapAsMap:s,maxAliasCount:r,onAnchor:i,reviver:o}={}){let a={anchors:new Map,doc:this,keep:!e,mapAsMap:s===!0,mapKeyWarned:!1,maxAliasCount:typeof r=="number"?r:100},l=B(this.contents,n??"",a);if(typeof i=="function")for(let{count:c,res:u}of a.anchors.values())i(u,c);return typeof o=="function"?Ie(o,{"":l},"",l):l}toJSON(e,n){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:n})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){let n=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${n}`)}return Si(this,e)}};function it(t){if(I(t))return!0;throw new Error("Expected a YAML collection as document contents")}var $t=class extends Error{constructor(e,n,s,r){super(),this.name=e,this.code=s,this.message=r,this.pos=n}},de=class extends $t{constructor(e,n,s){super("YAMLParseError",e,n,s)}},Bt=class extends $t{constructor(e,n,s){super("YAMLWarning",e,n,s)}};function ge(t,{flow:e,indicator:n,next:s,offset:r,onError:i,parentIndent:o,startOnNewline:a}){let l=!1,c=a,u=a,f="",p="",h=!1,g=!1,m=null,d=null,b=null,k=null,S=null,E=null,C=null;for(let w of t)switch(g&&(w.type!=="space"&&w.type!=="newline"&&w.type!=="comma"&&i(w.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),g=!1),m&&(c&&w.type!=="comment"&&w.type!=="newline"&&i(m,"TAB_AS_INDENT","Tabs are not allowed as indentation"),m=null),w.type){caLine truncated
`))return!0;if(t.end){for(let e of t.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(let e of t.items){for(let n of e.start)if(n.type==="newline")return!0;if(e.sep){for(let n of e.sep)if(n.type==="newline")return!0}if(xe(e.key)||xe(e.value))return!0}return!1;default:return!0}}function Rt(t,e,n){if(e?.type==="flow-collection"){let s=e.end[0];s.indent===t&&(s.source==="]"||s.source==="}")&&xe(e)&&n(s,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function Fn(t,e,n){let{uniqueKeys:s}=t.options;if(s===!1)return!1;let r=typeof s=="function"?s:(i,o)=>i===o||N(i)&&N(o)&&i.value===o.value;return e.some(i=>r(i.key,n))}var Ei="All mapping items must start at the same column";function Ci({composeNode:t,composeEmptyNode:e},n,s,r,i){let o=i?.nodeClass??x,a=new o(n.schema);n.atRoot&&(n.atRoot=!1);let l=s.offset,c=null;for(let u of s.items){let{start:f,key:p,sep:h,value:g}=u,m=ge(f,{indicator:"explicit-key-ind",next:p??h?.[0],offset:l,onError:r,parentIndent:s.indent,startOnNewline:!0}),d=!m.found;if(d){if(p&&(p.type==="block-seq"?r(l,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in p&&p.indent!==s.indent&&r(l,"BAD_INDENT",Ei)),!m.anchor&&!m.tag&&!h){c=m.end,m.comment&&(a.comment?a.comment+=`
`+m.comment:a.comment=m.comment);continue}(m.newlineAfterProp||xe(p))&&r(p??f[f.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else m.found?.indent!==s.indent&&r(l,"BAD_INDENT",Ei);n.atKey=!0;let b=m.end,k=p?t(n,p,m,r):e(n,b,f,null,m,r);n.schema.compat&&Rt(s.indent,p,r),n.atKey=!1,Fn(n,a.items,k)&&r(b,"DUPLICATE_KEY","Map keys must be unique");let S=ge(h??[],{indicator:"map-value-ind",next:g,offset:k.range[2],onError:r,parentIndent:s.indent,startOnNewline:!p||p.type==="block-scalar"});if(l=S.end,S.found){d&&(g?.type==="block-map"&&!S.hasNewline&&r(l,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),n.options.strict&&m.start<S.found.offset-1024&&r(k.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));let E=g?t(n,g,S,r):e(n,l,h,null,S,r);n.schema.compat&&Rt(s.indent,g,r),l=E.range[2];let C=new D(k,E);n.options.keepSourceTokens&&(C.srcToken=u),a.items.push(C)}else{d&&r(k.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),S.comment&&(k.comment?k.comment+=`
`+S.comment:k.comment=S.comment);let E=new D(k);n.options.keepSourceTokens&&(E.srcToken=u),a.items.push(E)}}return c&&c<l&&r(c,"IMPOSSIBLE","Map comment with trailing content"),a.range=[s.offset,l,c??l],a}function Ni({composeNode:t,composeEmptyNode:e},n,s,r,i){let o=i?.nodeClass??Y,a=new o(n.schema);n.atRoot&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let l=s.offset,c=null;for(let{start:u,value:f}of s.items){let p=ge(u,{indicator:"seq-item-ind",next:f,offset:l,onError:r,parentIndent:s.indent,startOnNewline:!0});if(!p.found)if(p.anchor||p.tag||f)f?.type==="block-seq"?r(p.end,"BAD_INDENT","All sequence items must start at the same column"):r(l,"MISSING_CHAR","Sequence item without - indicator");else{c=p.end,p.comment&&(a.comment=p.comment);continue}let h=f?t(n,f,p,r):e(n,p.end,u,null,p,r);n.schema.compat&&Rt(s.indent,f,r),l=h.range[2],a.items.push(h)}return a.range=[s.offset,l,c??l],a}function ye(t,e,n,s){let r="";if(t){let i=!1,o="";for(let a of t){let{source:l,type:c}=a;switch(c){case"space":i=!0;break;case"comment":{n&&!i&&s(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let u=l.substring(1)||" ";r?r+=o+u:r=u,o="";break}case"newline":r&&(o+=l),i=!0;break;default:s(a,"UNEXPECTED_TOKEN",`Unexpected ${c} at node end`)}e+=l.length}}return{comment:r,offset:e}}var Os="Block collections are not allowed within flow collections",_s=t=>t&&(t.type==="block-map"||t.type==="block-seq");function Ai({composeNode:t,composeEmptyNode:e},n,s,r,i){let o=s.start.source==="{",a=o?"flow map":"flow sequence",l=i?.nodeClass??(o?x:Y),c=new l(n.schema);c.flow=!0;let u=n.atRoot;u&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let f=s.offset+s.start.source.length;for(let d=0;d<s.items.length;++d){let b=s.items[d],{start:k,key:S,sep:E,value:C}=b,A=ge(k,{flow:a,indicator:"explicit-key-ind",next:S??E?.[0],offset:f,onError:r,parentIndent:s.indent,startOnNewline:!1});if(!A.found){if(!A.anchor&&!A.tag&&!E&&!C){d===0&&A.comma?r(A.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`):d<s.items.length-1&&r(A.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${a}`),A.comment&&(c.comment?c.comment+=`
`+A.comment:c.comment=A.comment),f=A.end;continue}!o&&n.options.strict&&xe(S)&&r(S,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(d===0)A.comma&&r(A.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`);else if(A.comma||r(A.start,"MISSING_CHAR",`Missing , between ${a} items`),A.comment){let L="";e:for(let w of k)switch(w.type){case"comma":case"space":break;case"comment":L=w.source.substring(1);break e;default:break e}if(L){let w=c.items[c.items.length-1];T(w)&&(w=w.value??w.key),w.comment?w.comment+=`
`+L:w.comment=L,A.comment=A.comment.substring(L.length+1)}}if(!o&&!E&&!A.found){let L=C?t(n,C,A,r):e(n,A.end,E,null,A,r);c.items.push(L),f=L.range[2],_s(C)&&r(L.range,"BLOCK_IN_FLOW",Os)}else{n.atKey=!0;let L=A.end,w=S?t(n,S,A,r):e(n,L,k,null,A,r);_s(S)&&r(w.range,"BLOCK_IN_FLOW",Os),n.atKey=!1;let M=ge(E??[],{flow:a,indicator:"map-value-ind",next:C,offset:w.range[2],onError:r,parentIndent:s.indent,startOnNewline:!1});if(M.found){if(!o&&!A.found&&n.options.strict){if(E)for(let $ of E){if($===M.found)break;if($.type==="newline"){r($,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}A.start<M.found.offset-1024&&r(M.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else C&&("source"in C&&C.source?.[0]===":"?r(C,"MISSING_CHAR",`Missing space after : in ${a}`):r(M.start,"MISSING_CHAR",`Missing , or : between ${a} items`));let Te=C?t(n,C,M,r):M.found?e(n,M.end,E,null,M,r):null;Te?_s(C)&&r(Te.range,"BLOCK_IN_FLOW",Os):M.comment&&(w.comment?w.comment+=`
`+M.comment:w.comment=M.comment);let qe=new D(w,Te);if(n.options.keepSourceTokens&&(qe.srcToken=b),o){let $=c;Fn(n,$.items,w)&&r(L,"DUPLICATE_KEY","Map keys must be unique"),$.items.push(qe)}else{let $=new x(n.schema);$.flow=!0,$.items.push(qe);let js=(Te??w).range;$.range=[w.range[0],js[1],js[2]],c.items.push($)}f=Te?Te.range[2]:M.end}}let p=o?"}":"]",[h,...g]=s.end,m=f;if(h?.source===p)m=h.offset+h.source.length;else{let d=a[0].toUpperCase()+a.substring(1),b=u?`${d} must end with a ${p}`:`${d} in block collection must be sufficiently indented and end with a ${p}`;r(f,u?"MISSING_CHAR":"BAD_INDENT",b),h&&h.source.length!==1&&g.unshift(h)}if(g.length>0){let d=ye(g,m,n.options.strict,r);d.comment&&(c.comment?c.comment+=`
`+d.comment:c.comment=d.comment),c.range=[s.offset,m,d.offset]}else c.range=[s.offset,m,m];return c}function Is(t,e,n,s,r,i){let o=n.type==="block-map"?Ci(t,e,n,s,i):n.type==="block-seq"?Ni(t,e,n,s,i):Ai(t,e,n,s,i),a=o.constructor;return r==="!"||r===a.tagName?(o.tag=a.tagName,o):(r&&(o.tag=r),o)}function Ti(t,e,n,s,r){let i=s.tag,o=i?e.directives.tagName(i.source,p=>r(i,"TAG_RESOLVE_FAILED",p)):null;if(n.type==="block-seq"){let{anchor:p,newlineAfterProp:h}=s,g=p&&i?p.offset>i.offset?p:i:p??i;g&&(!h||h.offset<g.offset)&&r(g,"MISSING_CHAR","Missing newline after block sequence props")}let a=n.type==="block-map"?"map":n.type==="block-seq"?"seq":n.start.source==="{"?"map":"seq";if(!i||!o||o==="!"||o===x.tagName&&a==="map"||o===Y.tagName&&a==="seq")return Is(t,e,n,r,o);let l=e.schema.tags.find(p=>p.tag===o&&p.collection===a);if(!l){let p=e.schema.knownTags[o];if(p?.collection===a)e.schema.tags.push(Object.assign({},p,{default:!1})),l=p;else return p?r(i,"BAD_COLLECTION_TYPE",`${p.tag} used for ${a} collection, but expects ${p.collection??"scalar"}`,!0):r(i,"TAG_RESOLVE_FAILED",`Unresolved tag: ${o}`,!0),Is(t,e,n,r,o)}let c=Is(t,e,n,r,o,l),u=l.resolve?.(c,p=>r(i,"TAG_RESOLVE_FAILED",p),e.options)??c,f=_(u)?u:new y(u);return f.range=c.range,f.tag=o,l?.format&&(f.format=l.format),f}function Ls(t,e,n){let s=e.offset,r=ha(e,t.options.strict,n);if(!r)return{value:"",type:null,comment:"",range:[s,s,s]};let i=r.mode===">"?y.BLOCK_FOLDED:y.BLOCK_LITERAL,o=e.source?da(e.source):[],a=o.length;for(let m=o.length-1;m>=0;--m){let d=o[m][1];if(d===""||d==="\r")a=m;else break}if(a===0){let m=r.chomp==="+"&&o.length>0?`
`.repeat(Math.max(1,o.length-1)):"",d=s+r.length;return e.source&&(d+=e.source.length),{value:m,type:i,comment:r.comment,range:[s,d,d]}}let l=e.indent+r.indent,c=e.offset+r.length,u=0;for(let m=0;m<a;++m){let[d,b]=o[m];if(b===""||b==="\r")r.indent===0&&d.length>l&&(l=d.length);else{d.length<l&&n(c+d.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),r.indent===0&&(l=d.length),u=m,l===0&&!t.atRoot&&n(c,"BAD_INDENT","Block scalar values in collections must be indented");break}c+=d.length+b.length+1}for(let m=o.length-1;m>=a;--m)o[m][0].length>l&&(a=m+1);let f="",p="",h=!1;for(let m=0;m<u;++m)f+=o[m][0].slice(l)+`
`;for(let m=u;m<a;++m){let[d,b]=o[m];c+=d.length+b.length+1;let k=b[b.length-1]==="\r";if(k&&(b=b.slice(0,-1)),b&&d.length<l){let E=`Block scalar lines must not be less indented than their ${r.indent?"explicit indentation indicator":"first line"}`;n(c-b.length-(k?2:1),"BAD_INDENT",E),d=""}i===y.BLOCK_LITERAL?(f+=p+d.slice(l)+b,p=`
`):d.length>l||b[0]===" "?(p===" "?p=`
`:!h&&p===`
`&&(p=`
`),f+=p+d.slice(l)+b,p=`
`,h=!0):b===""?p===`
`?f+=`
`:p=`
`:(f+=p+b,p=" ",h=!1)}switch(r.chomp){case"-":break;case"+":for(let m=a;m<o.length;++m)f+=`
`+o[m][0].slice(l);f[f.length-1]!==`
`&&(f+=`
`);break;default:f+=`
`}let g=s+r.length+e.source.length;return{value:f,type:i,comment:r.comment,range:[s,g,g]}}function ha({offset:t,props:e},n,s){if(e[0].type!=="block-scalar-header")return s(e[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:r}=e[0],i=r[0],o=0,a="",l=-1;for(let p=1;p<r.length;++p){let h=r[p];if(!a&&(h==="-"||h==="+"))a=h;else{let g=Number(h);!o&&g?o=g:l===-1&&(l=t+p)}}l!==-1&&s(l,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${r}`);let c=!1,u="",f=r.length;for(let p=1;p<e.length;++p){let h=e[p];switch(h.type){case"space":c=!0;case"newline":f+=h.source.length;break;case"comment":n&&!c&&s(h,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),f+=h.source.length,u=h.source.substring(1);break;case"error":s(h,"UNEXPECTED_TOKEN",h.message),f+=h.source.length;break;default:{let g=`Unexpected token in block scalar header: ${h.type}`;s(h,"UNEXPECTED_TOKEN",g);let m=h.source;m&&typeof m=="string"&&(f+=m.length)}}}return{mode:i,indent:o,chomp:a,comment:u,length:f}}function da(t){let e=t.split(/\n( *)/),n=e[0],s=n.match(/^( *)/),i=[s?.[1]?[s[1],n.slice(s[1].length)]:["",n]];for(let o=1;o<e.length;o+=2)i.push([e[o],e[o+1]]);return i}function Ps(t,e,n){let{offset:s,type:r,source:i,end:o}=t,a,l,c=(p,h,g)=>n(s+p,h,g);switch(r){case"scalar":a=y.PLAIN,l=ga(i,c);break;case"single-quoted-scalar":a=y.QUOTE_SINGLE,l=ya(i,c);break;case"double-quoted-scalar":a=y.QUOTE_DOUBLE,l=wa(i,c);break;default:return n(t,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${r}`),{value:"",type:null,comment:"",range:[s,s+i.length,s+i.length]}}let u=s+i.length,f=ye(o,u,e,n);return{value:l,type:a,comment:f.comment,range:[s,u,f.offset]}}function ga(t,e){let n="";switch(t[0]){case" ":n="a tab character";break;case",":n="flow indicator character ,";break;case"%":n="directive indicator character %";break;case"|":case">":{n=`block scalar indicator ${t[0]}`;break}case"@":case"`":{n=`reserved character ${t[0]}`;break}}return n&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${n}`),Oi(t)}function ya(t,e){return(t[t.length-1]!=="'"||t.length===1)&&e(t.length,"MISSING_CHAR","Missing closing 'quote"),Oi(t.slice(1,-1)).replace(/''/g,"'")}function Oi(t){let e,n;try{e=new RegExp(`(.*?)(?<![ ])[ ]*\r?
`,"sy"),n=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
`,"sy")}catch{e=/(.*?)[ \t]*\r?\n/sy,n=/[ \t]*(.*?)[ \t]*\r?\n/sy}let s=e.exec(t);if(!s)return t;let r=s[1],i=" ",o=e.lastIndex;for(n.lastIndex=o;s=n.exec(t);)s[1]===""?i===`
`?r+=i:i=`
`:(r+=i+s[1],i=" "),o=n.lastIndex;let a=/[ \t]*(.*)/sy;return a.lastIndex=o,s=a.exec(t),r+i+(s?.[1]??"")}function wa(t,e){let n="";for(let s=1;s<t.length-1;++s){let r=t[s];if(!(r==="\r"&&t[s+1]===`
`))if(r===`
`){let{fold:i,offset:o}=ba(t,s);n+=i,s=o}else if(r==="\\"){let i=t[++s],o=ka[i];if(o)n+=o;else if(i===`
`)for(i=t[s+1];i===" "||i===" ";)i=t[++s+1];else if(i==="\r"&&t[s+1]===`
`)for(i=t[++s+1];i===" "||i===" ";)i=t[++s+1];else if(i==="x"||i==="u"||i==="U"){let a=i==="x"?2:i==="u"?4:8;n+=Sa(t,s+1,a,e),s+=a}else{let a=t.substr(s-1,2);e(s-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),n+=a}}else if(r===" "||r===" "){let i=s,o=t[s+1];for(;o===" "||o===" ";)o=t[++s+1];o!==`
`&&!(o==="\r"&&t[s+2]===`
`)&&(n+=s>i?t.slice(i,s+1):r)}else n+=r}return(t[t.length-1]!=='"'||t.length===1)&&e(t.length,"MISSING_CHAR",'Missing closing "quote'),n}function ba(t,e){let n="",s=t[e+1];for(;(s===" "||s===" "||s===`
`||s==="\r")&&!(s==="\r"&&t[e+2]!==`
`);)s===`
`&&(n+=`
`),e+=1,s=t[e+1];return n||(n=" "),{fold:n,offset:e}}var ka={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
`,r:"\r",t:" ",v:"\v",N:"\x85",_:"\xA0",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function Sa(t,e,n,s){let r=t.substr(e,n),o=r.length===n&&/^[0-9a-fA-F]+$/.test(r)?parseInt(r,16):NaN;try{return String.fromCodePoint(o)}catch{let a=t.substr(e-2,n+2);return s(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),a}}function vs(t,e,n,s){let{value:r,type:i,comment:o,range:a}=e.type==="block-scalar"?Ls(t,e,s):Ps(e,t.options.strict,s),l=n?t.directives.tagName(n.source,f=>s(n,"TAG_RESOLVE_FAILED",f)):null,c;t.options.stringKeys&&t.atKey?c=t.schema[z]:l?c=Ea(t.schema,r,l,n,s):e.type==="scalar"?c=Ca(t,r,e,s):c=t.schema[z];let u;try{let f=c.resolve(r,p=>s(n??e,"TAG_RESOLVE_FAILED",p),t.options);u=N(f)?f:new y(f)}catch(f){let p=f instanceof Error?f.message:String(f);s(n??e,"TAG_RESOLVE_FAILED",p),u=new y(r)}return u.range=a,u.source=r,i&&(u.type=i),l&&(u.tag=l),c.format&&(u.format=c.format),o&&(u.comment=o),u}function Ea(t,e,n,s,r){if(n==="!")return t[z];let i=[];for(let a of t.tags)if(!a.collection&&a.tag===n)if(a.default&&a.test)i.push(a);else return a;for(let a of i)if(a.test?.test(e))return a;let o=t.knownTags[n];return o&&!o.collection?(t.tags.push(Object.assign({},o,{default:!1,test:void 0})),o):(r(s,"TAG_RESOLVE_FAILED",`Unresolved tag: ${n}`,n!=="tag:yaml.org,2002:str"),t[z])}function Ca({atKey:t,directives:e,schema:n},s,r,i){let o=n.tags.find(a=>(a.default===!0||t&&a.default==="key")&&a.test?.test(s))||n[z];if(n.compat){let a=n.compat.find(l=>l.default&&l.test?.test(s))??n[z];if(o.tag!==a.tag){let l=e.tagString(o.tag),c=e.tagString(a.tag),u=`Value may be parsed as either ${l} or ${c}`;i(r,"TAG_RESOLVE_FAILED",u,!0)}}return o}function _i(t,e,n){if(e){n??(n=e.length);for(let s=n-1;s>=0;--s){let r=e[s];switch(r.type){case"space":case"comment":case"newline":t-=r.source.length;continue}for(r=e[++s];r?.type==="space";)t+=r.source.length,r=e[++s];break}}return t}var Na={composeNode:Ds,composeEmptyNode:Kn};function Ds(t,e,n,s){let r=t.atKey,{spaceBefore:i,comment:o,anchor:a,tag:l}=n,c,u=!0;switch(e.type){case"alias":c=Aa(t,e,s),(a||l)&&s(e,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":c=vs(t,e,l,s),a&&(c.anchor=a.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{c=Ti(Na,t,e,n,s),a&&(c.anchor=a.source.substring(1))}catch(f){let p=f instanceof Error?f.message:String(f);s(e,"RESOURCE_EXHAUSTION",p)}break;default:{let f=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;s(e,"UNEXPECTED_TOKEN",f),u=!1}}return c??(c=Kn(t,e.offset,void 0,null,n,s)),a&&c.anchor===""&&s(a,"BAD_ALIAS","Anchor cannot be an empty string"),r&&t.options.stringKeys&&(!N(c)||typeof c.value!="string"||c.tag&&c.tag!=="tag:yaml.org,2002:str")&&s(l??e,"NON_STRING_KEY","With stringKeys, all keys must be strings"),i&&(c.spaceBefore=!0),o&&(e.type==="scalar"&&e.source===""?c.comment=o:c.commentBefore=o),t.options.keepSourceTokens&&u&&(c.srcToken=e),c}function Kn(t,e,n,s,{spaceBefore:r,comment:i,anchor:o,tag:a,end:l},c){let u={type:"scalar",offset:_i(e,n,s),indent:-1,source:""},f=vs(t,u,a,c);return o&&(f.anchor=o.source.substring(1),f.anchor===""&&c(o,"BAD_ALIAS","Anchor cannot be an empty string")),r&&(f.spaceBefore=!0),i&&(f.comment=i,f.range[2]=l),f}function Aa({options:t},{offset:e,source:n,end:s},r){let i=new Ce(n.substring(1));i.source===""&&r(e,"BAD_ALIAS","Alias cannot be an empty string"),i.source.endsWith(":")&&r(e+n.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let o=e+n.length,a=ye(s,o,t.strict,r);return i.range=[e,o,a.offset],a.comment&&(i.comment=a.comment),i}function Ii(t,e,{offset:n,start:s,value:r,end:i},o){let a=Object.assign({_directives:e},t),l=new De(void 0,a),c={atKey:!1,atRoot:!0,directives:l.directives,options:l.options,schema:l.schema},u=ge(s,{indicator:"doc-start",next:r??i?.[0],offset:n,onError:o,parentIndent:0,startOnNewline:!0});u.found&&(l.directives.docStart=!0,r&&(r.type==="block-map"||r.type==="block-seq")&&!u.hasNewline&&o(u.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),l.contents=r?Ds(c,r,u,o):Kn(c,u.end,s,null,u,o);let f=l.contents.range[2],p=ye(i,f,!1,o);return p.comment&&(l.comment=p.comment),l.range=[n,f,p.offset],l}function qt(t){if(typeof t=="number")return[t,t+1];if(Array.isArray(t))return t.length===2?t:[t[0],t[1]];let{offset:e,source:n}=t;return[e,e+(typeof n=="string"?n.length:1)]}function Li(t){let e="",n=!1,s=!1;for(let r=0;r<t.length;++r){let i=t[r];switch(i[0]){case"#":e+=(e===""?"":s?`
`:`
`)+(i.substring(1)||" "),n=!0,s=!1;break;case"%":t[r+1]?.[0]!=="#"&&(r+=1),n=!1;break;default:n||(s=!0),n=!1}}return{comment:e,afterEmptyLine:s}}var ot=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(n,s,r,i)=>{let o=qt(n);i?this.warnings.push(new Bt(o,s,r)):this.errors.push(new de(o,s,r))},this.directives=new me({version:e.version||"1.2"}),this.options=e}decorate(e,n){let{comment:s,afterEmptyLine:r}=Li(this.prelude);if(s){let i=e.contents;if(n)e.comment=e.comment?`${e.comment}
${s}`:s;else if(r||e.directives.docStart||!i)e.commentBefore=s;else if(I(i)&&!i.flow&&i.items.length>0){let o=i.items[0];T(o)&&(o=o.key);let a=o.commentBefore;o.commentBefore=a?`${s}
${a}`:s}else{let o=i.commentBefore;i.commentBefore=o?`${s}
${o}`:s}}if(n){for(let i=0;i<this.errors.length;++i)e.errors.push(this.errors[i]);for(let i=0;i<this.warnings.length;++i)e.warnings.push(this.warnings[i])}else e.errors=this.errors,e.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:Li(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,n=!1,s=-1){for(let r of e)yield*this.next(r);yield*this.end(n,s)}*next(e){switch(e.type){case"directive":this.directives.add(e.source,(n,s,r)=>{let i=qt(e);i[0]+=n,this.onError(i,"BAD_DIRECTIVE",s,r)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{let n=Ii(this.options,this.directives,e,this.onError);this.atDirectives&&!n.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(n,!1),this.doc&&(yield this.doc),this.doc=n,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{let n=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,s=new de(qt(e),"UNEXPECTED_TOKEN",n);this.atDirectives||!this.doc?this.errors.push(s):this.doc.errors.push(s);break}case"doc-end":{if(!this.doc){let s="Unexpected doc-end without preceding document";this.errors.push(new de(qt(e),"UNEXPECTED_TOKEN",s));break}this.doc.directives.docEnd=!0;let n=ye(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),n.comment){let s=this.doc.comment;this.doc.comment=s?`${s}
${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.push(new de(qt(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,n=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){let s=Object.assign({_directives:this.directives},this.options),r=new De(void 0,s);this.atDirectives&&this.onError(n,"MISSING_CHAR","Missing directives-end indicator line"),r.range=[0,n,n],this.decorate(r,!1),yield r}}};var xs=Symbol("break visit"),Ta=Symbol("skip children"),Pi=Symbol("remove item");function Re(t,e){"type"in t&&t.type==="document"&&(t={start:t.start,value:t.value}),vi(Object.freeze([]),t,e)}Re.BREAK=xs;Re.SKIP=Ta;Re.REMOVE=Pi;Re.itemAtPath=(t,e)=>{let n=t;for(let[s,r]of e){let i=n?.[s];if(i&&"items"in i)n=i.items[r];else return}return n};Re.parentCollection=(t,e)=>{let n=Re.itemAtPath(t,e.slice(0,-1)),s=e[e.length-1][0],r=n?.[s];if(r&&"items"in r)return r;throw new Error("Parent collection not found")};function vi(t,e,n){let s=n(e,t);if(typeof s=="symbol")return s;for(let r of["key","value"]){let i=e[r];if(i&&"items"in i){for(let o=0;o<i.items.length;++o){let a=vi(Object.freeze(t.concat([[r,o]])),i.items[o],n);if(typeof a=="number")o=a-1;else{if(a===xs)return xs;a===Pi&&(i.items.splice(o,1),o-=1)}}typeof s=="function"&&r==="key"&&(s=s(e,t))}}return typeof s=="function"?s(e,t):s}var Ms="\uFEFF",$s="",Bs="",Yn="";function Di(t){switch(t){case Ms:return"byte-order-mark";case $s:return"doc-mode";case Bs:return"flow-error-end";case Yn:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
`:case`\r
`:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(t[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}function le(t){switch(t){case void 0:case" ":case`
`:case"\r":case" ":return!0;default:return!1}}var xi=new Set("0123456789ABCDEFabcdef"),_a=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),Un=new Set(",[]{}"),Ia=new Set(` ,[]{}
\r `),Rs=t=>!t||Ia.has(t),Ft=class{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,n=!1){if(e){if(typeof e!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!n;let s=this.next??"stream";for(;s&&(n||this.hasChars(1));)s=yield*this.parseNext(s)}atLineEnd(){let e=this.pos,n=this.buffer[e];for(;n===" "||n===" ";)n=this.buffer[++e];return!n||n==="#"||n===`
`?!0:n==="\r"?this.buffer[e+1]===`
`:!1}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let n=this.buffer[e];if(this.indentNext>0){let s=0;for(;n===" ";)n=this.buffer[++s+e];if(n==="\r"){let r=this.buffer[s+e+1];if(r===`
`||!r&&!this.atEnd)return e+s+1}return n===`
`||s>=this.indentNext||!n&&!this.atEnd?e+s:-1}if(n==="-"||n==="."){let s=this.buffer.substr(e,3);if((s==="---"||s==="...")&&le(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!="number"||e!==-1&&e<this.pos)&&(e=this.buffer.indexOf(`
`,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]==="\r"&&(e-=1),this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(e===null)return this.setNext("stream");if(e[0]===Ms&&(yield*this.pushCount(1),e=e.substring(1)),e[0]==="%"){let n=e.length,s=e.indexOf("#");for(;s!==-1;){let i=e[s-1];if(i===" "||i===" "){n=s-1;break}else s=e.indexOf("#",s+1)}for(;;){let i=e[n-1];if(i===" "||i===" ")n-=1;else break}let r=(yield*this.pushCount(n))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-r),this.pushNewline(),"stream"}if(this.atLineEnd()){let n=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-n),yield*this.pushNewline(),"stream"}return yield $s,yield*this.parseLineStart()}*parseLineStart(){let e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext("line-start");if(e==="-"||e==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");let n=this.peek(3);if((n==="---"||n==="...")&&le(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,n==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!le(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[e,n]=this.peek(2);if(!n&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&le(n)){let s=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=s,"block-start"}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let e=this.getLine();if(e===null)return this.setNext("doc");let n=yield*this.pushIndicators();switch(e[n]){case"#":yield*this.pushCount(e.length-n);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(Rs),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return n+=yield*this.parseBlockScalarHeader(),n+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-n),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,n,s=-1;do e=yield*this.pushNewline(),e>0?(n=yield*this.pushSpaces(!1),this.indentValue=s=n):n=0,n+=yield*this.pushSpaces(!0);while(e+n>0);let r=this.getLine();if(r===null)return this.setNext("flow");if((s!==-1&&s<this.indentNext&&r[0]!=="#"||s===0&&(r.startsWith("---")||r.startsWith("..."))&&le(r[3]))&&!(s===this.indentNext-1&&this.flowLevel===1&&(r[0]==="]"||r[0]==="}")))return this.flowLevel=0,yield Bs,yield*this.parseLineStart();let i=0;for(;r[i]===",";)i+=yield*this.pushCount(1),i+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(i+=yield*this.pushIndicators(),r[i]){case void 0:return"flow";case"#":return yield*this.pushCount(r.length-i),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(Rs),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let o=this.charAt(1);if(this.flowKey||le(o)||o===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let e=this.charAt(0),n=this.buffer.indexOf(e,this.pos+1);if(e==="'")for(;n!==-1&&this.buffer[n+1]==="'";)n=this.buffer.indexOf("'",n+2);else for(;n!==-1;){let i=0;for(;this.buffer[n-1-i]==="\\";)i+=1;if(i%2===0)break;n=this.buffer.indexOf('"',n+1)}let s=this.buffer.substring(0,n),r=s.indexOf(`
`,this.pos);if(r!==-1){for(;r!==-1;){let i=this.continueScalar(r+1);if(i===-1)break;r=s.indexOf(`
`,i)}r!==-1&&(n=r-(s[r-1]==="\r"?2:1))}if(n===-1){if(!this.atEnd)return this.setNext("quoted-scalar");n=this.buffer.length}return yield*this.pushToIndex(n+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){let n=this.buffer[++e];if(n==="+")this.blockScalarKeep=!0;else if(n>"0"&&n<="9")this.blockScalarIndent=Number(n)-1;else if(n!=="-")break}return yield*this.pushUntil(n=>le(n)||n==="#")}*parseBlockScalar(){let e=this.pos-1,n=0,s;e:for(let i=this.pos;s=this.buffer[i];++i)switch(s){case" ":n+=1;break;case`
`:e=i,n=0;break;case"\r":{let o=this.buffer[i+1];if(!o&&!this.atEnd)return this.setNext("block-scalar");if(o===`
`)break}default:break e}if(!s&&!this.atEnd)return this.setNext("block-scalar");if(n>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=n:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{let i=this.continueScalar(e+1);if(i===-1)break;e=this.buffer.indexOf(`
`,i)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}let r=e+1;for(s=this.buffer[r];s===" ";)s=this.buffer[++r];if(s===" "){for(;s===" "||s===" "||s==="\r"||s===`
`;)s=this.buffer[++r];e=r-1}else if(!this.blockScalarKeep)do{let i=e-1,o=this.buffer[i];o==="\r"&&(o=this.buffer[--i]);let a=i;for(;o===" ";)o=this.buffer[--i];if(o===`
`&&i>=this.pos&&i+1+n>a)e=i;else break}while(!0);return yield Yn,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,n=this.pos-1,s=this.pos-1,r;for(;r=this.buffer[++s];)if(r===":"){let i=this.buffer[s+1];if(le(i)||e&&Un.has(i))break;n=s}else if(le(r)){let i=this.buffer[s+1];if(r==="\r"&&(i===`
`?(s+=1,r=`
`,i=this.buffer[s+1]):n=s),i==="#"||e&&Un.has(i))break;if(r===`
`){let o=this.continueScalar(s+1);if(o===-1)break;s=Math.max(s,o-2)}}else{if(e&&Un.has(r))break;n=s}return!r&&!this.atEnd?this.setNext("plain-scalar"):(yield Yn,yield*this.pushToIndex(n+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,n){let s=this.buffer.slice(this.pos,e);return s?(yield s,this.pos+=s.length,s.length):(n&&(yield""),0)}*pushIndicators(){let e=0;e:for(;;){switch(this.charAt(0)){case"!":e+=yield*this.pushTag(),e+=yield*this.pushSpaces(!0);continue e;case"&":e+=yield*this.pushUntil(Rs),e+=yield*this.pushSpaces(!0);continue e;case"-":case"?":case":":{let n=this.flowLevel>0,s=this.charAt(1);if(le(s)||n&&Un.has(s)){n?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,e+=yield*this.pushCount(1),e+=yield*this.pushSpaces(!0);continue e}}}break e}return e}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2,n=this.buffer[e];for(;!le(n)&&n!==">";)n=this.buffer[++e];return yield*this.pushToIndex(n===">"?e+1:e,!1)}else{let e=this.pos+1,n=this.buffer[e];for(;n;)if(_a.has(n))n=this.buffer[++e];else if(n==="%"&&xi.has(this.buffer[e+1])&&xi.has(this.buffer[e+2]))n=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){let e=this.buffer[this.pos];return e===`
`?yield*this.pushCount(1):e==="\r"&&this.charAt(1)===`
`?yield*this.pushCount(2):0}*pushSpaces(e){let n=this.pos-1,s;do s=this.buffer[++n];while(s===" "||e&&s===" ");let r=n-this.pos;return r>0&&(yield this.buffer.substr(this.pos,r),this.pos=n),r}*pushUntil(e){let n=this.pos,s=this.buffer[n];for(;!e(s);)s=this.buffer[++n];return yield*this.pushToIndex(n,!1)}};var at=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let n=0,s=this.lineStarts.length;for(;n<s;){let i=n+s>>1;this.lineStarts[i]<e?n=i+1:s=i}if(this.lineStarts[n]===e)return{line:n+1,col:1};if(n===0)return{line:0,col:e};let r=this.lineStarts[n-1];return{line:n,col:e-r+1}}}};function Me(t,e){for(let n=0;n<t.length;++n)if(t[n].type===e)return!0;return!1}function Mi(t){for(let e=0;e<t.length;++e)switch(t[e].type){case"space":case"comment":case"newline":break;default:return e}return-1}function Bi(t){switch(t?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function jn(t){switch(t.type){case"document":return t.start;case"block-map":{let e=t.items[t.items.length-1];return e.sep??e.start}case"block-seq":return t.items[t.items.length-1].start;default:return[]}}function lt(t){if(t.length===0)return[];let e=t.length;e:for(;--e>=0;)switch(t[e].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;t[++e]?.type==="space";);return t.splice(e,t.length)}function Vn(t,e){if(e.length<1e5)Array.prototype.push.apply(t,e);else for(let n=0;n<e.length;++n)t.push(e[n])}function $i(t){if(t.start.type==="flow-seq-start")for(let e of t.items)e.sep&&!e.value&&!Me(e.start,"explicit-key-ind")&&!Me(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,Bi(e.value)?e.value.end?Vn(e.value.end,e.sep):e.value.end=e.sep:Vn(e.start,e.sep),delete e.sep)}var ct=class{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new Ft,this.onNewLine=e}*parse(e,n=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(let s of this.lexer.lex(e,n))yield*this.next(s);n||(yield*this.end())}*next(e){if(this.source=e,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}let n=Di(e);if(n)if(n==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=n,yield*this.step(),n){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&e[0]===" "&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{let s=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:s,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let e=this.peek(1);if(this.type==="doc-end"&&e?.type!=="doc-end"){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){let n=e??this.stack.pop();if(!n)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield n;else{let s=this.peek(1);switch(n.type==="block-scalar"?n.indent="indent"in s?s.indent:0:n.type==="flow-collection"&&s.type==="document"&&(n.indent=0),n.type==="flow-collection"&&$i(n),s.type){case"document":s.value=n;break;case"block-scalar":s.props.push(n);break;case"block-map":{let r=s.items[s.items.length-1];if(r.value){s.items.push({start:[],key:n,sep:[]}),this.onKeyLine=!0;return}else if(r.sep)r.value=n;else{Object.assign(r,{key:n,sep:[]}),this.onKeyLine=!r.explicitKey;return}break}case"block-seq":{let r=s.items[s.items.length-1];r.value?s.items.push({start:[],value:n}):r.value=n;break}case"flow-collection":{let r=s.items[s.items.length-1];!r||r.value?s.items.push({start:[],key:n,sep:[]}):r.sep?r.value=n:Object.assign(r,{key:n,sep:[]});return}default:yield*this.pop(),yield*this.pop(n)}if((s.type==="document"||s.type==="block-map"||s.type==="block-seq")&&(n.type==="block-map"||n.type==="block-seq")){let r=n.items[n.items.length-1];r&&!r.sep&&!r.value&&r.start.length>0&&Mi(r.start)===-1&&(n.indent===0||r.start.every(i=>i.type!=="comment"||i.Line truncated
`)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
`,n)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){let n=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,n.value){let s="end"in n.value?n.value.end:void 0;(Array.isArray(s)?s[s.length-1]:void 0)?.type==="comment"?s?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)e.items.push({start:[this.sourceToken]});else if(n.sep)n.sep.push(this.sourceToken);else{if(this.atIndentedComment(n.start,e.indent)){let r=e.items[e.items.length-2]?.value?.end;if(Array.isArray(r)){Vn(r,n.start),r.push(this.sourceToken),e.items.pop();return}}n.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let s=!this.onKeyLine&&this.indent===e.indent,r=s&&(n.sep||n.explicitKey)&&this.type!=="seq-item-ind",i=[];if(r&&n.sep&&!n.value){let o=[];for(let a=0;a<n.sep.length;++a){let l=n.sep[a];switch(l.type){case"newline":o.push(a);break;case"space":break;case"comment":l.indent>e.indent&&(o.length=0);break;default:o.length=0}}o.length>=2&&(i=n.sep.splice(o[1]))}switch(this.type){case"anchor":case"tag":r||n.value?(i.push(this.sourceToken),e.items.push({start:i}),this.onKeyLine=!0):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"explicit-key-ind":!n.sep&&!n.explicitKey?(n.start.push(this.sourceToken),n.explicitKey=!0):r||n.value?(i.push(this.sourceToken),e.items.push({start:i,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(n.explicitKey)if(n.sep)if(n.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Me(n.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]});else if(Bi(n.key)&&!Me(n.sep,"newline")){let o=lt(n.start),a=n.key,l=n.sep;l.push(this.sourceToken),delete n.key,delete n.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:a,sep:l}]})}else i.length>0?n.sep=n.sep.concat(i,this.sourceToken):n.sep.push(this.sourceToken);else if(Me(n.start,"newline"))Object.assign(n,{key:null,sep:[this.sourceToken]});else{let o=lt(n.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:null,sep:[this.sourceToken]}]})}else n.sep?n.value||r?e.items.push({start:i,key:null,sep:[this.sourceToken]}):Me(n.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let o=this.flowScalar(this.type);r||n.value?(e.items.push({start:i,key:o,sep:[]}),this.onKeyLine=!0):n.sep?this.stack.push(o):(Object.assign(n,{key:o,sep:[]}),this.onKeyLine=!0);return}default:{let o=this.startBlockValue(e);if(o){if(o.type==="block-seq"){if(!n.explicitKey&&n.sep&&!Me(n.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else s&&e.items.push({start:i});this.stack.push(o);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){let n=e.items[e.items.length-1];switch(this.type){case"newline":if(n.value){let s="end"in n.value?n.value.end:void 0;(Array.isArray(s)?s[s.length-1]:void 0)?.type==="comment"?s?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(n.start,e.indent)){let r=e.items[e.items.length-2]?.value?.end;if(Array.isArray(r)){Vn(r,n.start),r.push(this.sourceToken),e.items.pop();return}}n.start.push(this.sourceToken)}return;case"anchor":case"tag":if(n.value||this.indent<=e.indent)break;n.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;n.value||Me(n.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return}if(this.indent>e.indent){let s=this.startBlockValue(e);if(s){this.stack.push(s);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let n=e.items[e.items.length-1];if(this.type==="flow-error-end"){let s;do yield*this.pop(),s=this.peek(1);while(s?.type==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!n||n.sep?e.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return;case"map-value-ind":!n||n.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!n||n.value?e.items.pLine truncated
`)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
`,n)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let n=jn(e),s=lt(n);return s.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let n=jn(e),s=lt(n);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,n){return this.type!=="comment"||this.indent<=n?!1:e.every(s=>s.type==="newline"||s.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}};function Ri(t,e,n){let s=t.srcToken;if(!s||s.type!=="flow-collection")throw new Error("Expected flow-collection CST node for flow sequence");let r=t.items.map((o,a)=>{let l=s.items[a];if(Pa(o,l))return Se(se(o.items),l,e,Ct);if(T(o))return Se(o,l,e,Ct);{let c=[];for(let f of q(l.start)){if(ke(f)){c.push(f);continue}if(f.type==="comma")continue;throw new Error(`Unexpected token type in sequence item start: ${f.type}`)}let u=e.transformNode(o,{tokens:c});return Hr(X(u.position.start,u.position.end),u)}});if(t.items.length<s.items.length)for(let o=t.items.length;o<s.items.length;o++){let a=s.items[o];for(let l of v(a.start,e)){if(l.type==="comma")continue;throw new Error(`Unexpected token type in collection item start: ${l.type}`)}}let i=null;for(let o of q(s.end)){if(o.type==="comment"){e.transformComment(o);continue}if(o.type==="flow-seq-end"){i=o;continue}throw new Error(`Unexpected token type in flow seq end: ${o.type}`)}if(!i)throw new Error("Expected flow-seq-end token");return Qr(e.transformRange([s.start.offset,i.offset+i.source.length]),e.transformContentProperties(t,n.tokens),r)}function Pa(t,e){if(t.srcToken)return!1;if(!G(t))return!1;return t.items.length!==1?!1:t.items[0].srcToken===e}function Qn(t,e,n){return{type:"mapping",position:t,leadingComments:[],...e,children:n}}function Hn(t,e,n){return{type:"mappingItem",position:t,leadingComments:[],children:[e,n]}}function qi(t,e,n){let s=t.srcToken;if(!s||s.type!=="block-map")throw new Error("Expected block mapping srcToken");let r=t.items.map((i,o)=>{let a=s.items[o];return Se(i,a,e,Hn)});if(t.items.length<s.items.length)for(let i=t.items.length;i<s.items.length;i++){let o=s.items[i];for(let a of v(o.start,e))throw new Error(`Unexpected token type in collection item start: ${a.type}`)}return Qn(X(r[0].position.start,se(r).position.end),e.transformContentProperties(t,n.tokens),r)}function qs(t,e,n){return{type:"plain",position:t,leadingComments:[],trailingComment:null,...e,value:n}}function Fi(t,e,n){for(let s=e;s>=0;s--)if(n.test(t[s]))return s;return-1}function Ki(t,e,n){if(t.range[0]===t.range[1]){let r=Fi(e.text,t.range[0]-1,/\S/u)+1;return qs(e.transformRange([r,r]),e.transformContentProperties(t,n.tokens),"")}let s=t.srcToken;if(!s||s.type!=="scalar")throw new Error("Expected plain scalar srcToken");for(let r of v(s.end,e))throw new Error(`Unexpected token type in plain scalar end: ${r.type}`);return qs(e.transformRange(t.range),e.transformContentProperties(t,n.tokens),t.source)}function Yi(t){return{...t,type:"quoteDouble"}}function Ui(t,e,n){return{type:"quoteValue",position:t,...e,leadingComments:[],trailingComment:null,value:n}}function Jn(t,e,n,s){for(let r of v(e.end,n))throw new Error(`Unexpected token type in quote value end: ${r.type}`);return Ui(n.transformRange(t.range),n.transformContentProperties(t,s.tokens),t.source)}function ji(t,e,n){let s=t.srcToken;if(!s||s.type!=="double-quoted-scalar")throw new Error("Expected double-quoted scalar srcToken");return Yi(Jn(t,s,e,n))}function Vi(t){return{...t,type:"quoteSingle"}}function Gi(t,e,n){let s=t.srcToken;if(!s||s.type!=="single-quoted-scalar")throw new Error("Expected single-quoted scalar srcToken");return Vi(Jn(t,s,e,n))}function Qi(t,e,n){return{type:"sequence",position:t,leadingComments:[],endComments:[],...e,children:n}}function Hi(t,e){return{type:"sequenceItem",position:t,leadingComments:[],trailingComment:null,endComments:[],children:Line truncated
@@ -0,0 +1,111 @@
import { extend, sorted } from '../../utils/helper.mjs';
import { MatcherBaseClass } from '../../types.mjs';
/*
* ------------------------------------------------------------------------------
* spatial match (qwerty/dvorak/keypad and so on) -----------------------------------------
* ------------------------------------------------------------------------------
*/
class MatchSpatial extends MatcherBaseClass {
constructor() {
super(...arguments);
this.SHIFTED_RX = /[~!@#$%^&*()_+QWERTYUIOP{}|ASDFGHJKL:"ZXCVBNM<>?]/;
}
match({
password
}) {
const matches = [];
Object.keys(this.options.graphs).forEach(graphName => {
const graph = this.options.graphs[graphName];
extend(matches, this.helper(password, graph, graphName));
});
return sorted(matches);
}
checkIfShifted(graphName, password, index) {
if (!graphName.includes('keypad') &&
// initial character is shifted
this.SHIFTED_RX.test(password.charAt(index))) {
return 1;
}
return 0;
}
// eslint-disable-next-line complexity, max-statements
helper(password, graph, graphName) {
let shiftedCount;
const matches = [];
let i = 0;
const passwordLength = password.length;
while (i < passwordLength - 1) {
let j = i + 1;
let lastDirection = null;
let turns = 0;
shiftedCount = this.checkIfShifted(graphName, password, i);
while (true) {
const prevChar = password.charAt(j - 1);
const adjacents = graph[prevChar] || [];
let found = false;
let curDirection = -1;
// consider growing pattern by one character if j hasn't gone over the edge.
if (j < passwordLength) {
const curChar = password.charAt(j);
const adjacentsLength = adjacents.length;
for (let k = 0; k < adjacentsLength; k += 1) {
const adjacent = adjacents[k];
curDirection += 1;
// eslint-disable-next-line max-depth
if (adjacent) {
const adjacentIndex = adjacent.indexOf(curChar);
// eslint-disable-next-line max-depth
if (adjacentIndex !== -1) {
found = true;
// eslint-disable-next-line max-depth
if (adjacentIndex === 1) {
// # index 1 in the adjacency means the key is shifted,
// # 0 means unshifted: A vs a, % vs 5, etc.
// # for example, 'q' is adjacent to the entry '2@'.
// # @ is shifted w/ index 1, 2 is unshifted.
shiftedCount += 1;
}
const foundDirection = curDirection;
// eslint-disable-next-line max-depth
if (lastDirection !== foundDirection) {
// # adding a turn is correct even in the initial
// case when last_direction is null:
// # every spatial pattern starts with a turn.
turns += 1;
lastDirection = foundDirection;
}
break;
}
}
}
}
// if the current pattern continued, extend j and try to grow again
if (found) {
j += 1;
// otherwise push the pattern discovered so far, if any...
} else {
// don't consider length 1 or 2 chains.
if (j - i > 2) {
matches.push({
pattern: 'spatial',
i,
j: j - 1,
token: password.slice(i, j),
graph: graphName,
turns,
shiftedCount
});
}
// ...and then start a new search for the rest of the password.
i = j;
break;
}
}
}
return matches;
}
}
export { MatchSpatial as default };
//# sourceMappingURL=matching.mjs.map
@@ -0,0 +1 @@
{"version":3,"names":["_OverloadYield","require","_awaitAsyncGenerator","value","OverloadYield"],"sources":["../../src/helpers/awaitAsyncGenerator.ts"],"sourcesContent":["/* @minVersion 7.0.0-beta.0 */\n\nimport OverloadYield from \"./OverloadYield.ts\";\n\nexport default function _awaitAsyncGenerator<T>(value: T) {\n return new OverloadYield<T>(value, /* kind: await */ 0);\n}\n"],"mappings":";;;;;;AAEA,IAAAA,cAAA,GAAAC,OAAA;AAEe,SAASC,oBAAoBA,CAAIC,KAAQ,EAAE;EACxD,OAAO,IAAIC,sBAAa,CAAID,KAAK,EAAoB,CAAC,CAAC;AACzD","ignoreList":[]}
@@ -0,0 +1,205 @@
/**
* negotiator
* Copyright(c) 2012 Isaac Z. Schlueter
* Copyright(c) 2014 Federico Romero
* Copyright(c) 2014-2015 Douglas Christopher Wilson
* MIT Licensed
*/
'use strict';
/**
* Module exports.
* @public
*/
module.exports = preferredEncodings;
module.exports.preferredEncodings = preferredEncodings;
/**
* Module variables.
* @private
*/
var simpleEncodingRegExp = /^\s*([^\s;]+)\s*(?:;(.*))?$/;
/**
* Parse the Accept-Encoding header.
* @private
*/
function parseAcceptEncoding(accept) {
var accepts = accept.split(',');
var hasIdentity = false;
var minQuality = 1;
for (var i = 0, j = 0; i < accepts.length; i++) {
var encoding = parseEncoding(accepts[i].trim(), i);
if (encoding) {
accepts[j++] = encoding;
hasIdentity = hasIdentity || specify('identity', encoding);
minQuality = Math.min(minQuality, encoding.q || 1);
}
}
if (!hasIdentity) {
/*
* If identity doesn't explicitly appear in the accept-encoding header,
* it's added to the list of acceptable encoding with the lowest q
*/
accepts[j++] = {
encoding: 'identity',
q: minQuality,
i: i
};
}
// trim accepts
accepts.length = j;
return accepts;
}
/**
* Parse an encoding from the Accept-Encoding header.
* @private
*/
function parseEncoding(str, i) {
var match = simpleEncodingRegExp.exec(str);
if (!match) return null;
var encoding = match[1];
var q = 1;
if (match[2]) {
var params = match[2].split(';');
for (var j = 0; j < params.length; j++) {
var p = params[j].trim().split('=');
if (p[0] === 'q') {
q = parseFloat(p[1]);
break;
}
}
}
return {
encoding: encoding,
q: q,
i: i
};
}
/**
* Get the priority of an encoding.
* @private
*/
function getEncodingPriority(encoding, accepted, index) {
var priority = {encoding: encoding, o: -1, q: 0, s: 0};
for (var i = 0; i < accepted.length; i++) {
var spec = specify(encoding, accepted[i], index);
if (spec && (priority.s - spec.s || priority.q - spec.q || priority.o - spec.o) < 0) {
priority = spec;
}
}
return priority;
}
/**
* Get the specificity of the encoding.
* @private
*/
function specify(encoding, spec, index) {
var s = 0;
if(spec.encoding.toLowerCase() === encoding.toLowerCase()){
s |= 1;
} else if (spec.encoding !== '*' ) {
return null
}
return {
encoding: encoding,
i: index,
o: spec.i,
q: spec.q,
s: s
}
};
/**
* Get the preferred encodings from an Accept-Encoding header.
* @public
*/
function preferredEncodings(accept, provided, preferred) {
var accepts = parseAcceptEncoding(accept || '');
var comparator = preferred ? function comparator (a, b) {
if (a.q !== b.q) {
return b.q - a.q // higher quality first
}
var aPreferred = preferred.indexOf(a.encoding)
var bPreferred = preferred.indexOf(b.encoding)
if (aPreferred === -1 && bPreferred === -1) {
// consider the original specifity/order
return (b.s - a.s) || (a.o - b.o) || (a.i - b.i)
}
if (aPreferred !== -1 && bPreferred !== -1) {
return aPreferred - bPreferred // consider the preferred order
}
return aPreferred === -1 ? 1 : -1 // preferred first
} : compareSpecs;
if (!provided) {
// sorted list of all encodings
return accepts
.filter(isQuality)
.sort(comparator)
.map(getFullEncoding);
}
var priorities = provided.map(function getPriority(type, index) {
return getEncodingPriority(type, accepts, index);
});
// sorted list of accepted encodings
return priorities.filter(isQuality).sort(comparator).map(function getEncoding(priority) {
return provided[priorities.indexOf(priority)];
});
}
/**
* Compare two specs.
* @private
*/
function compareSpecs(a, b) {
return (b.q - a.q) || (b.s - a.s) || (a.o - b.o) || (a.i - b.i);
}
/**
* Get full encoding string.
* @private
*/
function getFullEncoding(spec) {
return spec.encoding;
}
/**
* Check if a spec has any quality.
* @private
*/
function isQuality(spec) {
return spec.q > 0;
}
@@ -0,0 +1,77 @@
#!/usr/bin/env python3
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Unit tests for the ninja.py file."""
import sys
import unittest
from pathlib import Path
from gyp.generator import ninja
from gyp.MSVSVersion import SelectVisualStudioVersion
def _has_visual_studio():
"""Check if Visual Studio can be detected by gyp's registry-based detection."""
if not sys.platform.startswith("win"):
return False
try:
SelectVisualStudioVersion("auto", allow_fallback=False)
return True
except ValueError:
return False
class TestPrefixesAndSuffixes(unittest.TestCase):
@unittest.skipUnless(
_has_visual_studio(),
"requires Windows with a Visual Studio installation detected via the registry",
)
def test_BinaryNamesWindows(self):
writer = ninja.NinjaWriter(
"foo", "wee", ".", ".", "build.ninja", ".", "build.ninja", "win"
)
spec = {"target_name": "wee"}
for key, ext in {
"executable": ".exe",
"shared_library": ".dll",
"static_library": ".lib",
}.items():
self.assertTrue(writer.ComputeOutputFileName(spec, key).endswith(ext))
def test_BinaryNamesLinux(self):
writer = ninja.NinjaWriter(
"foo", "wee", ".", ".", "build.ninja", ".", "build.ninja", "linux"
)
spec = {"target_name": "wee"}
self.assertTrue("." not in writer.ComputeOutputFileName(spec, "executable"))
self.assertTrue(
writer.ComputeOutputFileName(spec, "shared_library").startswith("lib")
)
self.assertTrue(
writer.ComputeOutputFileName(spec, "static_library").startswith("lib")
)
self.assertTrue(
writer.ComputeOutputFileName(spec, "shared_library").endswith(".so")
)
self.assertTrue(
writer.ComputeOutputFileName(spec, "static_library").endswith(".a")
)
def test_GenerateCompileDBWithNinja(self):
build_dir = (
Path(__file__).resolve().parent.parent.parent.parent / "data" / "ninja"
)
compile_db = ninja.GenerateCompileDBWithNinja(build_dir)
assert len(compile_db) == 1
assert compile_db[0]["directory"] == str(build_dir)
assert compile_db[0]["command"] == "cc my.in my.out"
assert compile_db[0]["file"] == "my.in"
assert compile_db[0]["output"] == "my.out"
if __name__ == "__main__":
unittest.main()
@@ -0,0 +1,226 @@
# Undici Module vs. Node.js Built-in Fetch
<!--type=misc-->
Node.js has shipped a built-in `fetch()` implementation powered by undici since
Node.js v18. This guide explains the relationship between the `undici` npm
package and the built-in `fetch`, and when you should install one versus relying
on the other.
## Background
The `fetch()`, `Request`, `Response`, `Headers`, and `FormData` globals in
Node.js v18+ are provided by a version of undici that is bundled into Node.js
itself. You can check which version is bundled with:
```js
console.log(process.versions.undici); // e.g., "7.5.0"
```
When you install undici from npm, you get the full library with all of its
additional APIs, and potentially a newer release than what your Node.js version
bundles.
## Keep `fetch` and `FormData` from the same implementation
When you send a `FormData` body, keep `fetch` and `FormData` together from the
same implementation.
Use one of these patterns:
### Built-in globals
```js
const body = new FormData()
body.set('name', 'some')
body.set('someOtherProperty', '8000')
await fetch('https://example.com', {
method: 'POST',
body
})
```
### `undici` module imports
```js
import { fetch, FormData } from 'undici'
const body = new FormData()
body.set('name', 'some')
body.set('someOtherProperty', '8000')
await fetch('https://example.com', {
method: 'POST',
body
})
```
### `undici.install()` globals
If you want the installed `undici` package to provide the globals, call
[`install()`](../api/GlobalInstallation.md):
```js
import { install } from 'undici'
install()
const body = new FormData()
body.set('name', 'some')
body.set('someOtherProperty', '8000')
await fetch('https://example.com', {
method: 'POST',
body
})
```
`install()` replaces the global `fetch`, `Headers`, `Response`, `Request`, and
`FormData` implementations with undici's versions, and also installs undici's
`WebSocket`, `CloseEvent`, `ErrorEvent`, `MessageEvent`, and `EventSource`
globals.
Avoid mixing implementations in the same request, for example:
```js
import { fetch } from 'undici'
const body = new FormData()
await fetch('https://example.com', {
method: 'POST',
body
})
```
```js
import { FormData } from 'undici'
const body = new FormData()
await fetch('https://example.com', {
method: 'POST',
body
})
```
Those combinations may behave differently across Node.js and undici versions.
Using matching pairs keeps multipart handling predictable.
## When you do NOT need to install undici
If all of the following are true, you can rely on the built-in globals and skip
adding undici to your dependencies:
- You only need the standard Fetch API (`fetch`, `Request`, `Response`,
`Headers`, `FormData`).
- You are running Node.js v18 or later.
- You do not depend on features or bug fixes introduced in a version of undici
newer than the one bundled with your Node.js release.
- You want zero additional runtime dependencies.
- You want cross-platform interoperability with browsers and other runtimes
(Deno, Bun, Cloudflare Workers, etc.) using the same Fetch API surface.
This is common in applications that make straightforward HTTP requests or in
libraries that target multiple JavaScript runtimes.
## When you SHOULD install undici
Install undici from npm when you need capabilities beyond the standard Fetch API:
### Advanced HTTP APIs
undici exposes `request`, `stream`, `pipeline`, and `connect` methods that
provide lower-level control and significantly better performance than `fetch`:
```js
import { request } from 'undici';
const { statusCode, headers, body } = await request('https://example.com');
const data = await body.json();
```
### Connection pooling and dispatchers
`Client`, `Pool`, `BalancedPool`, `Agent`, and their configuration options
let you manage connection lifecycle, keep-alive behavior, pipelining depth,
and concurrency limits:
```js
import { Pool } from 'undici';
const pool = new Pool('https://example.com', { connections: 10 });
const { body } = await pool.request({ path: '/', method: 'GET' });
```
### Proxy support
`ProxyAgent` and `EnvHttpProxyAgent` handle HTTP(S) proxying. Note that
Node.js v22.21.0+ and v24.0.0+ support environment-variable-based proxy
configuration for the built-in `fetch` via the `--use-env-proxy` flag (or
`NODE_USE_ENV_PROXY=1`). However, undici's `ProxyAgent` still provides
programmatic control through the dispatcher API:
```js
import { ProxyAgent, fetch } from 'undici';
const proxyAgent = new ProxyAgent('https://my-proxy.example.com:8080');
const response = await fetch('https://example.com', { dispatcher: proxyAgent });
```
### Testing and mocking
`MockAgent`, `MockClient`, and `MockPool` let you intercept and mock HTTP
requests without patching globals or depending on external libraries:
```js
import { MockAgent, setGlobalDispatcher, fetch } from 'undici';
const mockAgent = new MockAgent();
setGlobalDispatcher(mockAgent);
const pool = mockAgent.get('https://example.com');
pool.intercept({ path: '/api' }).reply(200, { message: 'mocked' });
```
### Interceptors and middleware
Custom dispatchers and interceptors (retry, redirect, cache, DNS) give you
fine-grained control over how requests are processed.
### Newer version than what Node.js bundles
The npm package often includes features, performance improvements, and bug fixes
that have not yet landed in a Node.js release. If you need a specific fix or
feature, you can install a newer version directly.
## Version compatibility
| Node.js version | Bundled undici version | Notes |
|---|---|---|
| v18.x | ~5.x | `fetch` is experimental (behind `--experimental-fetch` in early v18) |
| v20.x | ~6.x | `fetch` is stable |
| v22.x | ~6.x / ~7.x | `fetch` is stable |
| v24.x | ~7.x | `fetch` is stable; env-proxy support via `--use-env-proxy` |
You can always check the exact bundled version at runtime with
`process.versions.undici`.
Installing undici from npm does not replace the built-in globals. If you want
your installed version to replace the global `fetch` and related classes, use
[`install()`](../api/GlobalInstallation.md). Otherwise, import `fetch`
directly from `'undici'`:
```js
import { fetch } from 'undici' // uses your installed version, not the built-in
```
## Further reading
- [API Reference: Fetch](../api/Fetch.md)
- [API Reference: Client](../api/Client.md)
- [API Reference: Pool](../api/Pool.md)
- [API Reference: ProxyAgent](../api/ProxyAgent.md)
- [API Reference: MockAgent](../api/MockAgent.md)
- [API Reference: Global Installation](../api/GlobalInstallation.md)
@@ -0,0 +1 @@
{"version":3,"file":"landmark.js","sources":["../../../src/icons/landmark.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Landmark\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8bGluZSB4MT0iMyIgeDI9IjIxIiB5MT0iMjIiIHkyPSIyMiIgLz4KICA8bGluZSB4MT0iNiIgeDI9IjYiIHkxPSIxOCIgeTI9IjExIiAvPgogIDxsaW5lIHgxPSIxMCIgeDI9IjEwIiB5MT0iMTgiIHkyPSIxMSIgLz4KICA8bGluZSB4MT0iMTQiIHgyPSIxNCIgeTE9IjE4IiB5Mj0iMTEiIC8+CiAgPGxpbmUgeDE9IjE4IiB4Mj0iMTgiIHkxPSIxOCIgeTI9IjExIiAvPgogIDxwb2x5Z29uIHBvaW50cz0iMTIgMiAyMCA3IDQgNyIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/landmark\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Landmark = createLucideIcon('Landmark', [\n ['line', { x1: '3', x2: '21', y1: '22', y2: '22', key: 'j8o0r' }],\n ['line', { x1: '6', x2: '6', y1: '18', y2: '11', key: '10tf0k' }],\n ['line', { x1: '10', x2: '10', y1: '18', y2: '11', key: '54lgf6' }],\n ['line', { x1: '14', x2: '14', y1: '18', y2: '11', key: '380y' }],\n ['line', { x1: '18', x2: '18', y1: '18', y2: '11', key: '1kevvc' }],\n ['polygon', { points: '12 2 20 7 4 7', key: 'jkujk7' }],\n]);\n\nexport default Landmark;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAW,iBAAiB,UAAY,CAAA,CAAA,CAAA;AAAA,CAC5C,CAAA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAE,CAAA,CAAA,CAAA,EAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,SAAS,CAAA,CAAA;AAAA,CAChE,CAAA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAE,CAAA,CAAA,CAAA,EAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,EAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAChE,CAAA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAE,CAAA,CAAA,CAAA,EAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAClE,CAAA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAE,CAAA,CAAA,CAAA,EAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,QAAQ,CAAA,CAAA;AAAA,CAChE,CAAA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAE,CAAA,CAAA,CAAA,EAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAClE,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAW,CAAA,CAAA,CAAA,CAAE,QAAQ,CAAiB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACxD,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,149 @@
{
"id": "http://json-schema.org/draft-04/schema#",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Core schema meta-schema",
"definitions": {
"schemaArray": {
"type": "array",
"minItems": 1,
"items": { "$ref": "#" }
},
"positiveInteger": {
"type": "integer",
"minimum": 0
},
"positiveIntegerDefault0": {
"allOf": [ { "$ref": "#/definitions/positiveInteger" }, { "default": 0 } ]
},
"simpleTypes": {
"enum": [ "array", "boolean", "integer", "null", "number", "object", "string" ]
},
"stringArray": {
"type": "array",
"items": { "type": "string" },
"minItems": 1,
"uniqueItems": true
}
},
"type": "object",
"properties": {
"id": {
"type": "string"
},
"$schema": {
"type": "string"
},
"title": {
"type": "string"
},
"description": {
"type": "string"
},
"default": {},
"multipleOf": {
"type": "number",
"minimum": 0,
"exclusiveMinimum": true
},
"maximum": {
"type": "number"
},
"exclusiveMaximum": {
"type": "boolean",
"default": false
},
"minimum": {
"type": "number"
},
"exclusiveMinimum": {
"type": "boolean",
"default": false
},
"maxLength": { "$ref": "#/definitions/positiveInteger" },
"minLength": { "$ref": "#/definitions/positiveIntegerDefault0" },
"pattern": {
"type": "string",
"format": "regex"
},
"additionalItems": {
"anyOf": [
{ "type": "boolean" },
{ "$ref": "#" }
],
"default": {}
},
"items": {
"anyOf": [
{ "$ref": "#" },
{ "$ref": "#/definitions/schemaArray" }
],
"default": {}
},
"maxItems": { "$ref": "#/definitions/positiveInteger" },
"minItems": { "$ref": "#/definitions/positiveIntegerDefault0" },
"uniqueItems": {
"type": "boolean",
"default": false
},
"maxProperties": { "$ref": "#/definitions/positiveInteger" },
"minProperties": { "$ref": "#/definitions/positiveIntegerDefault0" },
"required": { "$ref": "#/definitions/stringArray" },
"additionalProperties": {
"anyOf": [
{ "type": "boolean" },
{ "$ref": "#" }
],
"default": {}
},
"definitions": {
"type": "object",
"additionalProperties": { "$ref": "#" },
"default": {}
},
"properties": {
"type": "object",
"additionalProperties": { "$ref": "#" },
"default": {}
},
"patternProperties": {
"type": "object",
"additionalProperties": { "$ref": "#" },
"default": {}
},
"dependencies": {
"type": "object",
"additionalProperties": {
"anyOf": [
{ "$ref": "#" },
{ "$ref": "#/definitions/stringArray" }
]
}
},
"enum": {
"type": "array",
"minItems": 1,
"uniqueItems": true
},
"type": {
"anyOf": [
{ "$ref": "#/definitions/simpleTypes" },
{
"type": "array",
"items": { "$ref": "#/definitions/simpleTypes" },
"minItems": 1,
"uniqueItems": true
}
]
},
"format": { "type": "string" },
"allOf": { "$ref": "#/definitions/schemaArray" },
"anyOf": { "$ref": "#/definitions/schemaArray" },
"oneOf": { "$ref": "#/definitions/schemaArray" },
"not": { "$ref": "#" }
},
"dependencies": {
"exclusiveMaximum": [ "maximum" ],
"exclusiveMinimum": [ "minimum" ]
},
"default": {}
}
@@ -0,0 +1,16 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const SquareCheckBig = createLucideIcon("SquareCheckBig", [
["path", { d: "M21 10.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.5", key: "1uzm8b" }],
["path", { d: "m9 11 3 3L22 4", key: "1pflzl" }]
]);
export { SquareCheckBig as default };
//# sourceMappingURL=square-check-big.js.map
@@ -0,0 +1,65 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
let node_stream = require("node:stream");
let node_process = require("node:process");
//#region src/utils/stream.ts
const pr54206Applied = () => {
const [major, minor] = node_process.versions.node.split(".").map((component) => parseInt(component));
return major >= 23 || major === 22 && minor >= 7 || major === 20 && minor >= 18;
};
const useReadableToWeb = pr54206Applied();
const createStreamBody = (stream, useNativeReadableToWeb = useReadableToWeb) => {
if (useNativeReadableToWeb) return node_stream.Readable.toWeb(stream);
let controller;
let settled = false;
const cleanup = () => {
stream.off("data", onData);
stream.off("error", onError);
stream.off("end", onTerminate);
stream.off("close", onTerminate);
};
const settle = (callback) => {
if (settled) return;
settled = true;
cleanup();
callback?.();
};
const onData = (chunk) => {
if (settled || !controller) return;
controller.enqueue(chunk);
if ((controller.desiredSize ?? 0) <= 0) stream.pause();
};
const onError = (error) => {
settle(() => {
controller?.error(error);
});
};
const onTerminate = () => {
settle(() => {
controller?.close();
});
};
return new ReadableStream({
start(streamController) {
controller = streamController;
stream.on("data", onData);
stream.on("error", onError);
stream.on("end", onTerminate);
stream.on("close", onTerminate);
stream.pause();
},
pull() {
if (!settled) stream.resume();
},
cancel() {
settle();
const ignoreError = () => {};
stream.on("error", ignoreError);
stream.once("close", () => stream.off("error", ignoreError));
stream.destroy();
}
});
};
//#endregion
exports.createStreamBody = createStreamBody;
@@ -0,0 +1,76 @@
/**
* Type of jitter to apply to the delay.
* - `"none"`: no jitter is applied
* - `"full"`: full jitter is applied (random value between `0` and `delay`)
*/
export type JitterType = "none" | "full";
export type BackoffOptions = Partial<IBackOffOptions>;
export interface IBackOffOptions {
/**
* Decides whether the `startingDelay` should be applied before the first call.
* If `false`, the first call will occur without a delay.
* @defaultValue `false`
*/
delayFirstAttempt: boolean;
/**
* Decides whether a [jitter](https://aws.amazon.com/blogs/architecture/exponential-backoff-and-jitter/)
* should be applied to the delay. Possible values are `"full"` and `"none"`.
* @defaultValue `"none"`
*/
jitter: JitterType;
/**
* The maximum delay, in milliseconds, between two consecutive attempts.
* @defaultValue `Infinity`
*/
maxDelay: number;
/**
* The maximum number of times to attempt the function.
* Must be at least `1`.
* @defaultValue `10`
*/
numOfAttempts: number;
/**
* The `retry` function can be used to run logic after every failed attempt (e.g. logging a message,
* assessing the last error, etc.).
* It is called with the last error and the upcoming attempt number.
* Returning `true` will retry the function as long as the `numOfAttempts` has not been exceeded.
* Returning `false` will end the execution.
* @defaultValue a function that always returns `true`.
* @param e The last error thrown by the function.
* @param attemptNumber The upcoming attempt number.
* @returns `true` to retry the function, `false` to end the execution
*/
retry: (e: any, attemptNumber: number) => boolean | Promise<boolean>;
/**
* The delay, in milliseconds, before executing the function for the first time.
* @defaultValue `100`
*/
startingDelay: number;
/**
* The `startingDelay` is multiplied by the `timeMultiple` to increase the delay between reattempts.
* @defaultValue `2`
*/
timeMultiple: number;
}
const defaultOptions: IBackOffOptions = {
delayFirstAttempt: false,
jitter: "none",
maxDelay: Infinity,
numOfAttempts: 10,
retry: () => true,
startingDelay: 100,
timeMultiple: 2
};
export function getSanitizedOptions(options: BackoffOptions) {
const sanitized: IBackOffOptions = { ...defaultOptions, ...options };
if (sanitized.numOfAttempts < 1) {
sanitized.numOfAttempts = 1;
}
return sanitized;
}
@@ -0,0 +1 @@
{"version":3,"file":"clock-4.js","sources":["../../../src/icons/clock-4.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Clock4\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSIxMCIgLz4KICA8cG9seWxpbmUgcG9pbnRzPSIxMiA2IDEyIDEyIDE2IDE0IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/clock-4\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Clock4 = createLucideIcon('Clock4', [\n ['circle', { cx: '12', cy: '12', r: '10', key: '1mglay' }],\n ['polyline', { points: '12 6 12 12 16 14', key: '68esgv' }],\n]);\n\nexport default Clock4;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAS,iBAAiB,QAAU,CAAA,CAAA,CAAA;AAAA,CACxC,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CAAA,CACzD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAY,CAAA,CAAA,CAAA,CAAE,QAAQ,CAAoB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC5D,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,41 @@
import { Feature, addDomEvent } from 'motion-dom';
import { pipe } from 'motion-utils';
class FocusGesture extends Feature {
constructor() {
super(...arguments);
this.isActive = false;
}
onFocus() {
let isFocusVisible = false;
/**
* If this element doesn't match focus-visible then don't
* apply whileHover. But, if matches throws that focus-visible
* is not a valid selector then in that browser outline styles will be applied
* to the element by default and we want to match that behaviour with whileFocus.
*/
try {
isFocusVisible = this.node.current.matches(":focus-visible");
}
catch (e) {
isFocusVisible = true;
}
if (!isFocusVisible || !this.node.animationState)
return;
this.node.animationState.setActive("whileFocus", true);
this.isActive = true;
}
onBlur() {
if (!this.isActive || !this.node.animationState)
return;
this.node.animationState.setActive("whileFocus", false);
this.isActive = false;
}
mount() {
this.unmount = pipe(addDomEvent(this.node.current, "focus", () => this.onFocus()), addDomEvent(this.node.current, "blur", () => this.onBlur()));
}
unmount() { }
}
export { FocusGesture };
//# sourceMappingURL=focus.mjs.map
@@ -0,0 +1,111 @@
import * as util from "../core/util.js";
const error = () => {
const Sizable = {
string: { unit: "अक्षर", verb: "हुनुपर्छ" },
file: { unit: "बाइट", verb: "हुनुपर्छ" },
array: { unit: "तत्व", verb: "हुनुपर्छ" },
set: { unit: "तत्व", verb: "हुनुपर्छ" },
map: { unit: "प्रविष्टि", verb: "हुनुपर्छ" },
};
function getSizing(origin) {
return Sizable[origin] ?? null;
}
const FormatDictionary = {
regex: "इनपुट",
email: "इमेल ठेगाना",
url: "URL",
emoji: "इमोजी",
uuid: "UUID",
uuidv4: "UUIDv4",
uuidv6: "UUIDv6",
nanoid: "nanoid",
guid: "GUID",
cuid: "cuid",
cuid2: "cuid2",
ulid: "ULID",
xid: "XID",
ksuid: "KSUID",
datetime: "ISO मिति र समय",
date: "ISO मिति",
time: "ISO समय",
duration: "ISO अवधि",
ipv4: "IPv4 ठेगाना",
ipv6: "IPv6 ठेगाना",
mac: "MAC ठेगाना",
cidrv4: "IPv4 दायरा",
cidrv6: "IPv6 दायरा",
base64: "base64-इन्कोड गरिएको स्ट्रिङ",
base64url: "base64url-इन्कोड गरिएको स्ट्रिङ",
json_string: "JSON स्ट्रिङ",
e164: "E.164 नम्बर",
credit_card: "क्रेडिट कार्ड नम्बर",
currency_code: "मुद्रा कोड",
iban: "IBAN",
jwt: "JWT",
template_literal: "इनपुट",
};
const TypeDictionary = {
nan: "NaN",
};
return (issue) => {
switch (issue.code) {
case "invalid_type": {
const expected = TypeDictionary[issue.expected] ?? issue.expected;
const receivedType = util.parsedType(issue.input);
const received = TypeDictionary[receivedType] ?? receivedType;
return `अमान्य इनपुट: अपेक्षित ${expected}, प्राप्त ${received}`;
}
case "invalid_value":
if (issue.values.length === 1)
return `अमान्य इनपुट: अपेक्षित ${util.stringifyPrimitive(issue.values[0])}`;
return `अमान्य विकल्प: अपेक्षित मानहरू मध्ये एक ${util.joinValues(issue.values, "|")}`;
case "too_big": {
const adj = issue.inclusive ? "<=" : "<";
const sizing = getSizing(issue.origin);
if (sizing)
return `धेरै ठूलो: ${issue.origin ?? "मान"} मा ${adj}${issue.maximum.toString()} ${sizing.unit} ${sizing.verb}`;
return `धेरै ठूलो: ${issue.origin ?? "मान"} ${adj}${issue.maximum.toString()} हुनुपर्छ`;
}
case "too_small": {
const adj = issue.inclusive ? ">=" : ">";
const sizing = getSizing(issue.origin);
if (sizing)
return `धेरै सानो: ${issue.origin} मा ${adj}${issue.minimum.toString()} ${sizing.unit} ${sizing.verb}`;
return `धेरै सानो: ${issue.origin} ${adj}${issue.minimum.toString()} हुनुपर्छ`;
}
case "invalid_format": {
const _issue = issue;
if (_issue.format === "starts_with")
return `अमान्य स्ट्रिङ: "${_issue.prefix}" बाट सुरु हुनुपर्छ`;
if (_issue.format === "ends_with")
return `अमान्य स्ट्रिङ: "${_issue.suffix}" मा समाप्त हुनुपर्छ`;
if (_issue.format === "includes")
return `अमान्य स्ट्रिङ: "${_issue.includes}" समावेश हुनुपर्छ`;
if (_issue.format === "regex")
return `अमान्य स्ट्रिङ: ढाँचा ${_issue.pattern} सँग मेल खानुपर्छ`;
return `अमान्य ${FormatDictionary[_issue.format] ?? issue.format}`;
}
case "not_multiple_of":
return `अमान्य संख्या: ${issue.divisor} को गुणज हुनुपर्छ`;
case "unrecognized_keys":
return `अपरिचित कुञ्जी${issue.keys.length > 1 ? "हरू" : ""}: ${util.joinValues(issue.keys, ", ")}`;
case "invalid_key":
return `अमान्य कुञ्जी: ${issue.origin} मा`;
case "invalid_union":
if (issue.options && Array.isArray(issue.options) && issue.options.length > 0) {
const opts = issue.options.map((o) => `'${o}'`).join(" | ");
return `अमान्य डिस्क्रिमिनेटर मान: अपेक्षित ${opts}`;
}
return "अमान्य इनपुट";
case "invalid_element":
return `अमान्य मान: ${issue.origin} मा`;
default:
return `अमान्य इनपुट`;
}
};
};
export default function () {
return {
localeError: error(),
};
}
@@ -0,0 +1 @@
{"version":3,"file":"network.js","sources":["../../../src/icons/network.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Network\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB4PSIxNiIgeT0iMTYiIHdpZHRoPSI2IiBoZWlnaHQ9IjYiIHJ4PSIxIiAvPgogIDxyZWN0IHg9IjIiIHk9IjE2IiB3aWR0aD0iNiIgaGVpZ2h0PSI2IiByeD0iMSIgLz4KICA8cmVjdCB4PSI5IiB5PSIyIiB3aWR0aD0iNiIgaGVpZ2h0PSI2IiByeD0iMSIgLz4KICA8cGF0aCBkPSJNNSAxNnYtM2ExIDEgMCAwIDEgMS0xaDEyYTEgMSAwIDAgMSAxIDF2MyIgLz4KICA8cGF0aCBkPSJNMTIgMTJWOCIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/network\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Network = createLucideIcon('Network', [\n ['rect', { x: '16', y: '16', width: '6', height: '6', rx: '1', key: '4q2zg0' }],\n ['rect', { x: '2', y: '16', width: '6', height: '6', rx: '1', key: '8cvhb9' }],\n ['rect', { x: '9', y: '2', width: '6', height: '6', rx: '1', key: '1egb70' }],\n ['path', { d: 'M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3', key: '1jsf9p' }],\n ['path', { d: 'M12 12V8', key: '2874zd' }],\n]);\n\nexport default Network;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAU,iBAAiB,SAAW,CAAA,CAAA,CAAA;AAAA,CAAA,CAC1C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAG,MAAM,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,QAAQ,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC9E,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAG,KAAK,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,QAAQ,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC7E,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAG,KAAK,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,CAAO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,QAAQ,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC5E,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA6C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC1E,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC3C,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,23 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const ChartNoAxesCombined = createLucideIcon("ChartNoAxesCombined", [
["path", { d: "M12 16v5", key: "zza2cw" }],
["path", { d: "M16 14v7", key: "1g90b9" }],
["path", { d: "M20 10v11", key: "1iqoj0" }],
[
"path",
{ d: "m22 3-8.646 8.646a.5.5 0 0 1-.708 0L9.354 8.354a.5.5 0 0 0-.707 0L2 15", key: "1fw8x9" }
],
["path", { d: "M4 18v3", key: "1yp0dc" }],
["path", { d: "M8 14v7", key: "n3cwzv" }]
]);
export { ChartNoAxesCombined as default };
//# sourceMappingURL=chart-no-axes-combined.js.map
@@ -0,0 +1,40 @@
import { ESLintUtils } from '@typescript-eslint/utils';
export * from './astUtils';
export * from './baseTypeUtils';
export * from './collectUnusedVariables';
export * from './createRule';
export * from './getBaseTypesOfClassMember';
export * from './getFixOrSuggest';
export * from './getFunctionHeadLoc';
export * from './getOperatorPrecedence';
export * from './getStaticStringValue';
export * from './getStringLength';
export * from './getTextWithParentheses';
export * from './getThisExpression';
export * from './getWrappingFixer';
export * from './hasOverloadSignatures';
export * from './isArrayMethodCallWithPredicate';
export * from './isAssignee';
export * from './isNodeEqual';
export * from './isNullLiteral';
export * from './isStartOfExpressionStatement';
export * from './isUndefinedIdentifier';
export * from './misc';
export * from './needsPrecedingSemiColon';
export * from './objectIterators';
export * from './needsToBeAwaited';
export * from './scopeUtils';
export * from './types';
export * from './getConstraintInfo';
export * from './getValueOfLiteralType';
export * from './isHigherPrecedenceThanAwait';
export * from './skipChainExpression';
export * from './truthinessUtils';
export * from './walkStatements';
export * from '@typescript-eslint/type-utils';
export declare const applyDefault: typeof ESLintUtils.applyDefault, deepMerge: typeof ESLintUtils.deepMerge, getParserServices: typeof ESLintUtils.getParserServices, isObjectNotArray: typeof ESLintUtils.isObjectNotArray, nullThrows: typeof ESLintUtils.nullThrows, NullThrowsReasons: {
readonly MissingParent: "Expected node to have a parent.";
readonly MissingToken: (token: string, thing: string) => string;
};
export type InferMessageIdsTypeFromRule<T> = ESLintUtils.InferMessageIdsTypeFromRule<T>;
export type InferOptionsTypeFromRule<T> = ESLintUtils.InferOptionsTypeFromRule<T>;
@@ -0,0 +1,219 @@
"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: 'class-methods-use-this',
meta: {
type: 'suggestion',
docs: {
description: 'Enforce that class methods utilize `this`',
extendsBaseRule: true,
requiresTypeChecking: false,
},
messages: {
missingThis: "Expected 'this' to be used by class {{name}}.",
},
schema: [
{
type: 'object',
additionalProperties: false,
properties: {
enforceForClassFields: {
type: 'boolean',
description: 'Enforces that functions used as instance field initializers utilize `this`.',
},
exceptMethods: {
type: 'array',
description: 'Allows specified method names to be ignored with this rule.',
items: {
type: 'string',
},
},
ignoreClassesThatImplementAnInterface: {
description: 'Whether to ignore class members that are defined within a class that `implements` a type.',
oneOf: [
{
type: 'boolean',
description: 'Ignore all classes that implement an interface',
},
{
type: 'string',
description: 'Ignore only the public fields of classes that implement an interface',
enum: ['public-fields'],
},
],
},
ignoreOverrideMethods: {
type: 'boolean',
description: 'Whether to ignore members marked with the `override` modifier.',
},
},
},
],
},
defaultOptions: [
{
enforceForClassFields: true,
exceptMethods: [],
ignoreClassesThatImplementAnInterface: false,
ignoreOverrideMethods: false,
},
],
create(context, [{ enforceForClassFields, exceptMethods: exceptMethodsRaw, ignoreClassesThatImplementAnInterface, ignoreOverrideMethods, },]) {
const exceptMethods = new Set(exceptMethodsRaw);
let stack;
function pushContext(member) {
if (member?.parent.type === utils_1.AST_NODE_TYPES.ClassBody) {
stack = {
class: member.parent.parent,
member,
parent: stack,
usesThis: false,
};
}
else {
stack = {
class: null,
member: null,
parent: stack,
usesThis: false,
};
}
}
function enterFunction(node) {
if (node.parent.type === utils_1.AST_NODE_TYPES.MethodDefinition ||
node.parent.type === utils_1.AST_NODE_TYPES.PropertyDefinition ||
node.parent.type === utils_1.AST_NODE_TYPES.AccessorProperty) {
pushContext(node.parent);
}
else {
pushContext();
}
}
/**
* Pop `this` used flag from the stack.
*/
function popContext() {
const oldStack = stack;
stack = stack?.parent;
return oldStack;
}
function isPublicField(accessibility) {
if (!accessibility || accessibility === 'public') {
return true;
}
return false;
}
/**
* Check if the node is an instance method not excluded by config
*/
function isIncludedInstanceMethod(node) {
if (node.static ||
(node.type === utils_1.AST_NODE_TYPES.MethodDefinition &&
node.kind === 'constructor') ||
((node.type === utils_1.AST_NODE_TYPES.PropertyDefinition ||
node.type === utils_1.AST_NODE_TYPES.AccessorProperty) &&
!enforceForClassFields)) {
return false;
}
if (node.computed || exceptMethods.size === 0) {
return true;
}
const hashIfNeeded = node.key.type === utils_1.AST_NODE_TYPES.PrivateIdentifier ? '#' : '';
const name = (0, util_1.getStaticMemberAccessValue)(node, context);
return (typeof name !== 'string' || !exceptMethods.has(hashIfNeeded + name));
}
/**
* Checks if we are leaving a function that is a method, and reports if 'this' has not been used.
* Static methods and the constructor are exempt.
* Then pops the context off the stack.
*/
function exitFunction(node) {
const stackContext = popContext();
if (stackContext?.member == null ||
stackContext.usesThis ||
(ignoreOverrideMethods && stackContext.member.override) ||
(ignoreClassesThatImplementAnInterface === true &&
stackContext.class.implements.length > 0) ||
(ignoreClassesThatImplementAnInterface === 'public-fields' &&
stackContext.class.implements.length > 0 &&
isPublicField(stackContext.member.accessibility))) {
return;
}
if (isIncludedInstanceMethod(stackContext.member)) {
context.report({
loc: (0, util_1.getFunctionHeadLoc)(node, context.sourceCode),
node,
messageId: 'missingThis',
data: {
name: (0, util_1.getFunctionNameWithKind)(node),
},
});
}
}
return {
// function declarations have their own `this` context
FunctionDeclaration() {
pushContext();
},
'FunctionDeclaration:exit'() {
popContext();
},
FunctionExpression(node) {
enterFunction(node);
},
'FunctionExpression:exit'(node) {
exitFunction(node);
},
...(enforceForClassFields
? {
'AccessorProperty > ArrowFunctionExpression.value'(node) {
enterFunction(node);
},
'AccessorProperty > ArrowFunctionExpression.value:exit'(node) {
exitFunction(node);
},
'PropertyDefinition > ArrowFunctionExpression.value'(node) {
enterFunction(node);
},
'PropertyDefinition > ArrowFunctionExpression.value:exit'(node) {
exitFunction(node);
},
}
: {}),
/*
* Class field value are implicit functions.
*/
'AccessorProperty:exit'() {
popContext();
},
'AccessorProperty > *.key:exit'() {
pushContext();
},
'PropertyDefinition:exit'() {
popContext();
},
'PropertyDefinition > *.key:exit'() {
pushContext();
},
/*
* Class static blocks are implicit functions. They aren't required to use `this`,
* but we have to push context so that it captures any use of `this` in the static block
* separately from enclosing contexts, because static blocks have their own `this` and it
* shouldn't count as used `this` in enclosing contexts.
*/
StaticBlock() {
pushContext();
},
'StaticBlock:exit'() {
popContext();
},
'ThisExpression, Super'() {
if (stack) {
stack.usesThis = true;
}
},
};
},
});
@@ -0,0 +1 @@
{"version":3,"file":"active-animations.mjs","sources":["../../../../src/animation/utils/active-animations.ts"],"sourcesContent":["import { NativeAnimation } from \"../NativeAnimation\"\nimport { AnyResolvedKeyframe } from \"../types\"\n\nconst animationMaps = new WeakMap<\n Element,\n Map<string, NativeAnimation<AnyResolvedKeyframe>>\n>()\nexport const animationMapKey = (name: string, pseudoElement: string = \"\") =>\n `${name}:${pseudoElement}`\n\nexport function getAnimationMap(element: Element) {\n let map = animationMaps.get(element)\n if (!map) {\n map = new Map()\n animationMaps.set(element, map)\n }\n return map\n}\n"],"names":[],"mappings":"AAGA,MAAM,aAAa,GAAG,IAAI,OAAO,EAG9B;AACI,MAAM,eAAe,GAAG,CAAC,IAAY,EAAE,aAAA,GAAwB,EAAE,KACpE,CAAA,EAAG,IAAI,CAAA,CAAA,EAAI,aAAa;AAEtB,SAAU,eAAe,CAAC,OAAgB,EAAA;IAC5C,IAAI,GAAG,GAAG,aAAa,CAAC,GAAG,CAAC,OAAO,CAAC;IACpC,IAAI,CAAC,GAAG,EAAE;AACN,QAAA,GAAG,GAAG,IAAI,GAAG,EAAE;AACf,QAAA,aAAa,CAAC,GAAG,CAAC,OAAO,EAAE,GAAG,CAAC;IACnC;AACA,IAAA,OAAO,GAAG;AACd;;;;"}
@@ -0,0 +1 @@
{"version":3,"file":"mcp.d.ts","sourceRoot":"","sources":["../../../src/server/mcp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,EACH,SAAS,EACT,eAAe,EACf,iBAAiB,EACjB,YAAY,EACZ,WAAW,EASd,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACH,cAAc,EAGd,cAAc,EAOd,QAAQ,EACR,mBAAmB,EAYnB,eAAe,EACf,kBAAkB,EAClB,aAAa,EACb,kBAAkB,EAClB,eAAe,EACf,0BAA0B,EAE1B,MAAM,EAMN,aAAa,EAChB,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAGnD,OAAO,EAAE,0BAA0B,EAAE,MAAM,qCAAqC,CAAC;AACjF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAoC3E;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,aAAa,GAAG;IAC3C;;;OAGG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;CACjC,CAAC;AAEF;;;;GAIG;AACH,qBAAa,SAAS;IAClB;;OAEG;IACH,SAAgB,MAAM,EAAE,MAAM,CAAC;IAE/B,OAAO,CAAC,QAAQ,CAAC,qBAAqB,CAAqB;IAE3D,OAAO,CAAC,oBAAoB,CAA6C;IACzE,OAAO,CAAC,4BAA4B,CAE7B;IACP,OAAO,CAAC,gBAAgB,CAA0C;IAClE,OAAO,CAAC,kBAAkB,CAA4C;IACtE,OAAO,CAAC,aAAa,CAAC,CAAwC;gBAElD,UAAU,EAAE,cAAc,EAAE,OAAO,CAAC,EAAE,gBAAgB;IAKlE;;;;;;OAMG;IACH,IAAI,YAAY,IAAI;QAAE,KAAK,EAAE,0BAA0B,CAAA;KAAE,CAOxD;IAED;;;;OAIG;IACG,OAAO,CAAC,SAAS,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC;IAIlD;;OAEG;IACG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAI5B,OAAO,CAAC,wBAAwB,CAAS;IAEzC,OAAO,CAAC,sBAAsB;IAiH9B;;;;;OAKG;IACH,OAAO,CAAC,eAAe;IAYvB;;OAEG;YACW,iBAAiB;IAoC/B;;OAEG;YACW,kBAAkB;IAkChC;;OAEG;YACW,kBAAkB;IAoChC;;OAEG;YACW,0BAA0B;IAqCxC,OAAO,CAAC,6BAA6B,CAAS;IAE9C,OAAO,CAAC,2BAA2B;YA6BrB,sBAAsB;YA4BtB,wBAAwB;IAwBtC,OAAO,CAAC,4BAA4B,CAAS;IAE7C,OAAO,CAAC,0BAA0B;IA+ElC,OAAO,CAAC,0BAA0B,CAAS;IAE3C,OAAO,CAAC,wBAAwB;IA8DhC;;;OAGG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,YAAY,EAAE,oBAAoB,GAAG,kBAAkB;IAE3F;;;OAGG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,gBAAgB,EAAE,YAAY,EAAE,oBAAoB,GAAG,kBAAkB;IAEvH;;;OAGG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,gBAAgB,EAAE,YAAY,EAAE,4BAA4B,GAAG,0BAA0B;IAE1H;;;OAGG;IACH,QAAQ,CACJ,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,gBAAgB,EAC1B,QAAQ,EAAE,gBAAgB,EAC1B,YAAY,EAAE,4BAA4B,GAC3C,0BAA0B;IA6C7B;;;OAGG;IACH,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,EAAE,gBAAgB,EAAE,YAAY,EAAE,oBAAoB,GAAG,kBAAkB;IACvI,gBAAgB,CACZ,IAAI,EAAE,MAAM,EACZ,aAAa,EAAE,gBAAgB,EAC/B,MAAM,EAAE,gBAAgB,EACxB,YAAY,EAAE,4BAA4B,GAC3C,0BAA0B;IA0C7B,OAAO,CAAC,yBAAyB;IAiCjC,OAAO,CAAC,iCAAiC;IAyCzC,OAAO,CAAC,uBAAuB;IA6C/B,OAAO,CAAC,qBAAqB;IAsD7B;;;OAGG;IACH,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,YAAY,GAAG,cAAc;IAEpD;;;OAGG;IACH,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,EAAE,EAAE,YAAY,GAAG,cAAc;IAEzE;;;;;;;OAOG;IACH,IAAI,CAAC,IAAI,SAAS,iBAAiB,EAC/B,IAAI,EAAE,MAAM,EACZ,yBAAyB,EAAE,IAAI,GAAG,eAAe,EACjD,EAAE,EAAE,YAAY,CAAC,IAAI,CAAC,GACvB,cAAc;IAEjB;;;;;;;;OAQG;IACH,IAAI,CAAC,IAAI,SAAS,iBAAiB,EAC/B,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,MAAM,EACnB,yBAAyB,EAAE,IAAI,GAAG,eAAe,EACjD,EAAE,EAAE,YAAY,CAAC,IAAI,CAAC,GACvB,cAAc;IAEjB;;;OAGG;IACH,IAAI,CAAC,IAAI,SAAS,iBAAiB,EAC/B,IAAI,EAAE,MAAM,EACZ,YAAY,EAAE,IAAI,EAClB,WAAW,EAAE,eAAe,EAC5B,EAAE,EAAE,YAAY,CAAC,IAAI,CAAC,GACvB,cAAc;IAEjB;;;OAGG;IACH,IAAI,CAAC,IAAI,SAAS,iBAAiB,EAC/B,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,IAAI,EAClB,WAAW,EAAE,eAAe,EAC5B,EAAE,EAAE,YAAY,CAAC,IAAI,CAAC,GACvB,cAAc;IA6DjB;;OAEG;IACH,YAAY,CAAC,UAAU,SAAS,iBAAiB,GAAG,SAAS,EAAE,SAAS,SAAS,SAAS,GAAG,iBAAiB,GAAG,SAAS,GAAG,SAAS,EAClI,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE;QACJ,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,WAAW,CAAC,EAAE,SAAS,CAAC;QACxB,YAAY,CAAC,EAAE,UAAU,CAAC;QAC1B,WAAW,CAAC,EAAE,eAAe,CAAC;QAC9B,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACnC,EACD,EAAE,EAAE,YAAY,CAAC,SAAS,CAAC,GAC5B,cAAc;IAoBjB;;;OAGG;IACH,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,cAAc,GAAG,gBAAgB;IAE1D;;;OAGG;IACH,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,EAAE,EAAE,cAAc,GAAG,gBAAgB;IAE/E;;;OAGG;IACH,MAAM,CAAC,IAAI,SAAS,kBAAkB,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,EAAE,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,gBAAgB;IAEnH;;;OAGG;IACH,MAAM,CAAC,IAAI,SAAS,kBAAkB,EAClC,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,IAAI,EAChB,EAAE,EAAE,cAAc,CAAC,IAAI,CAAC,GACzB,gBAAgB;IA0BnB;;OAEG;IACH,cAAc,CAAC,IAAI,SAAS,kBAAkB,EAC1C,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE;QACJ,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,UAAU,CAAC,EAAE,IAAI,CAAC;KACrB,EACD,EAAE,EAAE,cAAc,CAAC,IAAI,CAAC,GACzB,gBAAgB;IAqBnB;;;OAGG;IACH,WAAW;IAIX;;;;;;OAMG;IACG,kBAAkB,CAAC,MAAM,EAAE,0BAA0B,CAAC,QAAQ,CAAC,EAAE,SAAS,CAAC,EAAE,MAAM;IAGzF;;OAEG;IACH,uBAAuB;IAMvB;;OAEG;IACH,mBAAmB;IAMnB;;OAEG;IACH,qBAAqB;CAKxB;AAED;;GAEG;AACH,MAAM,MAAM,gCAAgC,GAAG,CAC3C,KAAK,EAAE,MAAM,EACb,OAAO,CAAC,EAAE;IACN,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACtC,KACA,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;AAElC;;;GAGG;AACH,qBAAa,gBAAgB;IAKrB,OAAO,CAAC,UAAU;IAJtB,OAAO,CAAC,YAAY,CAAc;gBAG9B,WAAW,EAAE,MAAM,GAAG,WAAW,EACzB,UAAU,EAAE;QAChB;;WAEG;QACH,IAAI,EAAE,qBAAqB,GAAG,SAAS,CAAC;QAExC;;WAEG;QACH,QAAQ,CAAC,EAAE;YACP,CAAC,QAAQ,EAAE,MAAM,GAAG,gCAAgC,CAAC;SACxD,CAAC;KACL;IAKL;;OAEG;IACH,IAAI,WAAW,IAAI,WAAW,CAE7B;IAED;;OAEG;IACH,ILine truncated
@@ -0,0 +1,903 @@
flf2a$ 4 3 10 0 6
Wavy by Brian Krog 10/05
Includes ISO Latin-1
figlet release 2.2.2 -- 05 Jul 2005
Permission is hereby given to modify this font, as long as the
modifier's name is placed on a comment line.
$$@
$$@
$$@
$$@@
$ @
|$@
o$@
$ @@
$ @
||$@
$ @
$ @@
$ @
_/_/_$@
-/-/-$ @
$ @@
$ @
(I`$@
.I)$@
$ @@
$@
o/$@
/o$@
$ @@
_$ @
\)$@
(X$@
$@@
$ @
|$@
$ @
$ @@
/$@
($ @
\$@
$@@
\$ @
)$@
/$ @
$ @@
$ @
_\/_$@
/\$ @
$ @@
$ @
$_|_$@
$|$ @
$ @@
$ @
$ @
o$@
/$@@
$ @
$__$@
$ @
$ @@
$ @
$ @
o$@
$ @@
$@
/$@
/$ @
$ @@
_$ @
(.\$ @
\_)$@
$ @@
$ @
/($ @
_)_$@
$@@
_$ @
)$@
/_$@
$@@
_$ @
_)$@
_)$@
$ @@
$ @
/_(_$@
)$@
$ @@
__$ @
)_$ @
_)$@
$ @@
_$ @
(__$ @
\_)$@
$ @@
__$ @
)$@
($ @
$ @@
_$ @
(_)$@
(_)$@
$ @@
_$ @
(_\$ @
_)$@
$ @@
$ @
o$@
o$@
$ @@
$ @
o$@
o$@
/$@@
$ @
/$@
\$@
$ @@
$ @
__$@
--$@
$ @@
$ @
\$@
/$@
$ @@
_$ @
)$@
o$ @
$ @@
___$ @
/ _ )$@
( (_($ @
\___/$@@
_$ @
/_)$@
/ /$ @
$ @@
__$ @
)_)$@
/__)$@
$ @@
_$ @
/ `$@
(_.$ @
$ @@
__$ @
) )$@
/_/$ @
$ @@
___$@
)_$ @
(__$ @
$ @@
___$@
)_$ @
($ @
$ @@
_$ @
/ _$@
(__/$@
$ @@
$ @
)_)$@
( ($ @
$ @@
___$@
)$ @
_(_$ @
$ @@
___$ @
($ @
\__)$@
$ @@
$@
)_/$@
/ )$@
$ @@
$ @
)$ @
(__$@
$ @@
$ @
)\/)$@
( ($ @
$ @@
$ @
)\ )$@
( ($ @
$ @@
_$ @
/ )$@
(_/$ @
$ @@
__$ @
)_)$@
/$ @
$ @@
_$ @
/ )$@
(_X$ @
@@
__$ @
)_)$@
/ \$ @
$ @@
__$ @
(_ `$@
.__)$ @
$ @@
___$@
)$ @
($ @
$ @@
@
/ /$@
(_/$ @
$ @@
$@
\ /$@
\/$ @
$ @@
$@
\ X /$@
\/ \/$ @
$ @@
$ @
(/$@
/)$@
$ @@
@
\_)$@
/$ @
$ @@
__$@
/$@
/_$@
$ @@
_$@
|$ @
|_$@
$ @@
$ @
\$ @
\$@
$@@
_$ @
|$@
_|$@
$ @@
$ @
/\$@
$ @
$ @@
$ @
$ @
$ @
__$@@
$ @
\$@
$ @
$ @@
$ @
_$ @
(_($@
$ @@
$ @
( _$ @
)_)$@
$ @@
$ @
_$@
(_$@
$ @@
$ @
_ )$@
(_($ @
$ @@
$ @
_$ @
)_)$@
(_$ @@
$ @
_(_$@
)$@
$ @@
$ @
_$ @
(_($ @
_)$@@
$ @
( _$ @
) )$@
$ @@
$ @
o$@
($@
$ @@
$ @
o$ @
($ @
_)$@@
$ @
( _$@
)\$@
$ @@
$ @
)$@
($ @
$ @@
$ @
_ _$ @
) ) )$@
$ @@
$ @
_$ @
) )$@
$ @@
$ @
_$ @
(_)$@
$ @@
$ @
_$ @
)_)$@
( $ @@
$ @
_$ @
(_($ @
)$@@
$ @
_$@
)$ @
$ @@
$ @
_$@
($ @
_)$@@
$ @
_)_$@
(_$ @
$ @@
$ @
$ @
(_($@
$ @@
$ @
$ @
\)$@
$ @@
$ @
$ @
)_)_)$@
$ @@
$ @
$ @
\)$@
(\$@@
$ @
$ @
(_($ @
_)$@@
$ @
__$ @
)$ @
(__$@@
_$@
_|$ @
|_$@
$ @@
$ @
|$@
|$@
|$@@
_$ @
|_$@
_|$ @
$ @@
$ @
/\/$@
$ @
$ @@
o_o$@
/_)$@
/ /$ @
$ @@
o_o$@
/ )$@
(_/$ @
$ @@
o o$@
/ /$ @
(_/$ @
$ @@
o o$@
_ $@
(_($@
$@@
o o$@
_$ @
(_)$@
$ @@
o o$@
$@
(_($@
$@@
__$ @
) )$@
/ )$@
$ @@
160 NO-BREAK SPACE
$$@
$$@
$$@
$$@@
161 INVERTED EXCLAMATION MARK
$ @
o$@
|$@
$ @@
162 CENT SIGN
$ @
|$ @
(_`$@
|$ @@
163 POUND SIGN
_$ @
_(_`$@
o)_$@
$ @@
164 CURRENCY SIGN
$ @
`o'$@
' `$@
$ @@
165 YEN SIGN
$ @
_\_)_$@
--/--$@
$ @@
166 BROKEN BAR
$ @
|$@
'$@
|$@@
167 SECTION SIGN
_$@
($ @
()$@
_)$@@
168 DIAERESIS
o o$@
$ @
$ @
$ @@
169 COPYRIGHT SIGN
_$ @
(C)$@
$ @
$ @@
170 FEMININE ORDINAL INDICATOR
_ $@
(_($@
---$@
$ @@
171 LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
$@
//$@
\\$@
$@@
172 NOT SIGN
$ @
__$ @
|$@
$ @@
173 SOFT HYPHEN
$ @
_$@
$ @
$ @@
174 REGISTERED SIGN
_$ @
(R)$@
$ @
$ @@
175 MACRON
__$@
$ @
$ @
$ @@
176 DEGREE SIGN
O$@
$ @
$ @
$ @@
177 PLUS-MINUS SIGN
$ @
_|_$@
_|_$@
$ @@
178 SUPERSCRIPT TWO
2$@
@
@
@@
179 SUPERSCRIPT THREE
3$@
$ @
$ @
$ @@
180 ACUTE ACCENT
/$@
$ @
$ @
$ @@
181 MICRO SIGN
$ @
$ @
)_)$@
/$ @@
182 PILCROW SIGN
__$@
(||$@
||$@
$ @@
183 MIDDLE DOT
$ @
o$@
$ @
$ @@
184 CEDILLA
$ @
$ @
$ @
S$@@
185 SUPERSCRIPT ONE
1$@
$ @
$ @
$ @@
186 MASCULINE ORDINAL INDICATOR
_$ @
(_)$@
---$@
$ @@
187 RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
$ @
\\$@
//$@
$ @@
188 VULGAR FRACTION ONE QUARTER
$@
1/$@
/4$@
$ @@
189 VULGAR FRACTION ONE HALF
$@
1/$@
/2$@
$ @@
190 VULGAR FRACTION THREE QUARTERS
$@
3/$@
/4$@
$ @@
191 INVERTED QUESTION MARK
$ @
o$@
(_$@
$ @@
192 LATIN CAPITAL LETTER A WITH GRAVE
\$ @
/_)$@
/ /$ @
$ @@
193 LATIN CAPITAL LETTER A WITH ACUTE
_/$@
/_)$@
/ /$ @
$ @@
194 LATIN CAPITAL LETTER A WITH CIRCUMFLEX
/\$@
/_)$@
/ /$ @
$ @@
195 LATIN CAPITAL LETTER A WITH TILDE
/\/$@
/_)$@
/ /$ @
$ @@
196 LATIN CAPITAL LETTER A WITH DIAERESIS
o_o$@
/_)$@
/ /$ @
$ @@
197 LATIN CAPITAL LETTER A WITH RING ABOVE
O$ @
/_)$@
/ /$ @
$ @@
198 LATIN CAPITAL LETTER AE
____$@
/_)_$ @
/ /__$ @
$ @@
199 LATIN CAPITAL LETTER C WITH CEDILLA
_$ @
/ `$@
(_.$ @
S$ @@
200 LATIN CAPITAL LETTER E WITH GRAVE
_\_$@
)_$ @
(__$ @
$ @@
201 LATIN CAPITAL LETTER E WITH ACUTE
_/_$@
)_$ @
(__$ @
$ @@
202 LATIN CAPITAL LETTER E WITH CIRCUMFLEX
_/\$@
)_$ @
(__$ @
$ @@
203 LATIN CAPITAL LETTER E WITH DIAERESIS
o_o$@
)_$ @
(__$ @
$ @@
204 LATIN CAPITAL LETTER I WITH GRAVE
_\_$@
)$ @
_(_$ @
$ @@
205 LATIN CAPITAL LETTER I WITH ACUTE
_/_$@
)$ @
_(_$ @
$ @@
206 LATIN CAPITAL LETTER I WITH CIRCUMFLEX
_/\$@
)$ @
_(_$ @
$ @@
207 LATIN CAPITAL LETTER I WITH DIAERESIS
o_o$@
)$ @
_(_$ @
@@
208 LATIN CAPITAL LETTER ETH
__$ @
_)_)$@
/_/$ @
$ @@
209 LATIN CAPITAL LETTER N WITH TILDE
/\/$@
)\ )$@
( ($ @
$ @@
210 LATIN CAPITAL LETTER O WITH GRAVE
\$ @
/ )$@
(_/$ @
$ @@
211 LATIN CAPITAL LETTER O WITH ACUTE
_/$@
/ )$@
(_/$ @
$ @@
212 LATIN CAPITAL LETTER O WITH CIRCUMFLEX
/\$@
/ )$@
(_/$ @
$ @@
213 LATIN CAPITAL LETTER O WITH TILDE
/\/$@
/ )$@
(_/$ @
$ @@
214 LATIN CAPITAL LETTER O WITH DIAERESIS
o_o$@
/ )$@
(_/$ @
$ @@
215 MULTIPLICATION SIGN
$ @
X$@
$ @
$ @@
216 LATIN CAPITAL LETTER O WITH STROKE
_$ @
//)$@
(//$ @
$ @@
217 LATIN CAPITAL LETTER U WITH GRAVE
\$ @
/ /$@
(_/$ @
$ @@
218 LATIN CAPITAL LETTER U WITH ACUTE
/$@
/ /$@
(_/$ @
$ @@
219 LATIN CAPITAL LETTER U WITH CIRCUMFLEX
/\$@
/ /$@
(_/$ @
$ @@
220 LATIN CAPITAL LETTER U WITH DIAERESIS
o o$@
/ /$ @
(_/$ @
$ @@
221 LATIN CAPITAL LETTER Y WITH ACUTE
/$ @
\_)$@
/$ @
$ @@
222 LATIN CAPITAL LETTER THORN
( _$ @
)_)$@
($ @
$ @@
223 LATIN SMALL LETTER SHARP S
__$ @
) )$@
/ )$@
$ @@
224 LATIN SMALL LETTER A WITH GRAVE
\$ @
_ $@
(_($@
$@@
225 LATIN SMALL LETTER A WITH ACUTE
/$ @
_ $@
(_($@
$@@
226 LATIN SMALL LETTER A WITH CIRCUMFLEX
/\$@
_ $@
(_($@
$@@
227 LATIN SMALL LETTER A WITH TILDE
/\/$@
_ $@
(_($@
$@@
228 LATIN SMALL LETTER A WITH DIAERESIS
o o$@
_ $@
(_($@
$@@
229 LATIN SMALL LETTER A WITH RING ABOVE
O$ @
_ $@
(_($@
$@@
230 LATIN SMALL LETTER AE
$ @
_ _$ @
_ )_)$@
(_(_$ @@
231 LATIN SMALL LETTER C WITH CEDILLA
$ @
_$@
(_$@
S$@@
232 LATIN SMALL LETTER E WITH GRAVE
\$ @
_$ @
)_)$@
(_$ @@
233 LATIN SMALL LETTER E WITH ACUTE
/$ @
_$ @
)_)$@
(_$ @@
234 LATIN SMALL LETTER E WITH CIRCUMFLEX
/\$ @
_ $@
)_)$@
(_$ @@
235 LATIN SMALL LETTER E WITH DIAERESIS
o o$@
_ $@
)_)$@
(_$ @@
236 LATIN SMALL LETTER I WITH GRAVE
$ @
\$@
($@
$@@
237 LATIN SMALL LETTER I WITH ACUTE
$ @
/$@
($@
$@@
238 LATIN SMALL LETTER I WITH CIRCUMFLEX
$ @
/\$@
($ @
$ @@
239 LATIN SMALL LETTER I WITH DIAERESIS
$ @
oo$@
($ @
$ @@
240 LATIN SMALL LETTER ETH
X$ @
_ )$@
(_($ @
$ @@
241 LATIN SMALL LETTER N WITH TILDE
/\/$@
_$ @
) )$@
$ @@
242 LATIN SMALL LETTER O WITH GRAVE
\$ @
_$ @
(_)$@
$ @@
243 LATIN SMALL LETTER O WITH ACUTE
/$ @
_$ @
(_)$@
$ @@
244 LATIN SMALL LETTER O WITH CIRCUMFLEX
/\$@
_$ @
(_)$@
@@
245 LATIN SMALL LETTER O WITH TILDE
/\/$@
_$ @
(_)$@
$ @@
246 LATIN SMALL LETTER O WITH DIAERESIS
o o$@
_$ @
(_)$@
$ @@
247 DIVISION SIGN
o$ @
---$@
o$ @
$ @@
248 LATIN SMALL LETTER O WITH STROKE
$ @
_$ @
(/)$@
$ @@
249 LATIN SMALL LETTER U WITH GRAVE
\$ @
$@
(_($@
$@@
250 LATIN SMALL LETTER U WITH ACUTE
/$@
$@
(_($@
$@@
251 LATIN SMALL LETTER U WITH CIRCUMFLEX
/\$@
$@
(_($@
$@@
252 LATIN SMALL LETTER U WITH DIAERESIS
o o$@
$@
(_($@
$@@
253 LATIN SMALL LETTER Y WITH ACUTE
/$ @
$ @
(_($ @
_)$@@
254 LATIN SMALL LETTER THORN
$ @
(_$ @
)_)$@
($ @@
255 LATIN SMALL LETTER Y WITH DIAERESIS
o o$ @
$ @
(_($ @
_)$@@
@@ -0,0 +1 @@
{"version":3,"file":"lock-keyhole-open.js","sources":["../../../src/icons/lock-keyhole-open.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name LockKeyholeOpen\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8Y2lyY2xlIGN4PSIxMiIgY3k9IjE2IiByPSIxIiAvPgogIDxyZWN0IHdpZHRoPSIxOCIgaGVpZ2h0PSIxMiIgeD0iMyIgeT0iMTAiIHJ4PSIyIiAvPgogIDxwYXRoIGQ9Ik03IDEwVjdhNSA1IDAgMCAxIDkuMzMtMi41IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/lock-keyhole-open\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst LockKeyholeOpen = createLucideIcon('LockKeyholeOpen', [\n ['circle', { cx: '12', cy: '16', r: '1', key: '1au0dj' }],\n ['rect', { width: '18', height: '12', x: '3', y: '10', rx: '2', key: 'l0tzu3' }],\n ['path', { d: 'M7 10V7a5 5 0 0 1 9.33-2.5', key: 'car5b7' }],\n]);\n\nexport default LockKeyholeOpen;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAkB,iBAAiB,iBAAmB,CAAA,CAAA,CAAA;AAAA,CAC1D,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CAAA,CACxD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,MAAM,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAG,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC/E,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA8B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC7D,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,178 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.checkStrictMode = exports.getErrorPath = exports.Type = exports.useFunc = exports.setEvaluated = exports.evaluatedPropsToName = exports.mergeEvaluated = exports.eachItem = exports.unescapeJsonPointer = exports.escapeJsonPointer = exports.escapeFragment = exports.unescapeFragment = exports.schemaRefOrVal = exports.schemaHasRulesButRef = exports.schemaHasRules = exports.checkUnknownRules = exports.alwaysValidSchema = exports.toHash = void 0;
const codegen_1 = require("./codegen");
const code_1 = require("./codegen/code");
// TODO refactor to use Set
function toHash(arr) {
const hash = {};
for (const item of arr)
hash[item] = true;
return hash;
}
exports.toHash = toHash;
function alwaysValidSchema(it, schema) {
if (typeof schema == "boolean")
return schema;
if (Object.keys(schema).length === 0)
return true;
checkUnknownRules(it, schema);
return !schemaHasRules(schema, it.self.RULES.all);
}
exports.alwaysValidSchema = alwaysValidSchema;
function checkUnknownRules(it, schema = it.schema) {
const { opts, self } = it;
if (!opts.strictSchema)
return;
if (typeof schema === "boolean")
return;
const rules = self.RULES.keywords;
for (const key in schema) {
if (!rules[key])
checkStrictMode(it, `unknown keyword: "${key}"`);
}
}
exports.checkUnknownRules = checkUnknownRules;
function schemaHasRules(schema, rules) {
if (typeof schema == "boolean")
return !schema;
for (const key in schema)
if (rules[key])
return true;
return false;
}
exports.schemaHasRules = schemaHasRules;
function schemaHasRulesButRef(schema, RULES) {
if (typeof schema == "boolean")
return !schema;
for (const key in schema)
if (key !== "$ref" && RULES.all[key])
return true;
return false;
}
exports.schemaHasRulesButRef = schemaHasRulesButRef;
function schemaRefOrVal({ topSchemaRef, schemaPath }, schema, keyword, $data) {
if (!$data) {
if (typeof schema == "number" || typeof schema == "boolean")
return schema;
if (typeof schema == "string")
return (0, codegen_1._) `${schema}`;
}
return (0, codegen_1._) `${topSchemaRef}${schemaPath}${(0, codegen_1.getProperty)(keyword)}`;
}
exports.schemaRefOrVal = schemaRefOrVal;
function unescapeFragment(str) {
return unescapeJsonPointer(decodeURIComponent(str));
}
exports.unescapeFragment = unescapeFragment;
function escapeFragment(str) {
return encodeURIComponent(escapeJsonPointer(str));
}
exports.escapeFragment = escapeFragment;
function escapeJsonPointer(str) {
if (typeof str == "number")
return `${str}`;
return str.replace(/~/g, "~0").replace(/\//g, "~1");
}
exports.escapeJsonPointer = escapeJsonPointer;
function unescapeJsonPointer(str) {
return str.replace(/~1/g, "/").replace(/~0/g, "~");
}
exports.unescapeJsonPointer = unescapeJsonPointer;
function eachItem(xs, f) {
if (Array.isArray(xs)) {
for (const x of xs)
f(x);
}
else {
f(xs);
}
}
exports.eachItem = eachItem;
function makeMergeEvaluated({ mergeNames, mergeToName, mergeValues, resultToName, }) {
return (gen, from, to, toName) => {
const res = to === undefined
? from
: to instanceof codegen_1.Name
? (from instanceof codegen_1.Name ? mergeNames(gen, from, to) : mergeToName(gen, from, to), to)
: from instanceof codegen_1.Name
? (mergeToName(gen, to, from), from)
: mergeValues(from, to);
return toName === codegen_1.Name && !(res instanceof codegen_1.Name) ? resultToName(gen, res) : res;
};
}
exports.mergeEvaluated = {
props: makeMergeEvaluated({
mergeNames: (gen, from, to) => gen.if((0, codegen_1._) `${to} !== true && ${from} !== undefined`, () => {
gen.if((0, codegen_1._) `${from} === true`, () => gen.assign(to, true), () => gen.assign(to, (0, codegen_1._) `${to} || {}`).code((0, codegen_1._) `Object.assign(${to}, ${from})`));
}),
mergeToName: (gen, from, to) => gen.if((0, codegen_1._) `${to} !== true`, () => {
if (from === true) {
gen.assign(to, true);
}
else {
gen.assign(to, (0, codegen_1._) `${to} || {}`);
setEvaluated(gen, to, from);
}
}),
mergeValues: (from, to) => (from === true ? true : { ...from, ...to }),
resultToName: evaluatedPropsToName,
}),
items: makeMergeEvaluated({
mergeNames: (gen, from, to) => gen.if((0, codegen_1._) `${to} !== true && ${from} !== undefined`, () => gen.assign(to, (0, codegen_1._) `${from} === true ? true : ${to} > ${from} ? ${to} : ${from}`)),
mergeToName: (gen, from, to) => gen.if((0, codegen_1._) `${to} !== true`, () => gen.assign(to, from === true ? true : (0, codegen_1._) `${to} > ${from} ? ${to} : ${from}`)),
mergeValues: (from, to) => (from === true ? true : Math.max(from, to)),
resultToName: (gen, items) => gen.var("items", items),
}),
};
function evaluatedPropsToName(gen, ps) {
if (ps === true)
return gen.var("props", true);
const props = gen.var("props", (0, codegen_1._) `{}`);
if (ps !== undefined)
setEvaluated(gen, props, ps);
return props;
}
exports.evaluatedPropsToName = evaluatedPropsToName;
function setEvaluated(gen, props, ps) {
Object.keys(ps).forEach((p) => gen.assign((0, codegen_1._) `${props}${(0, codegen_1.getProperty)(p)}`, true));
}
exports.setEvaluated = setEvaluated;
const snippets = {};
function useFunc(gen, f) {
return gen.scopeValue("func", {
ref: f,
code: snippets[f.code] || (snippets[f.code] = new code_1._Code(f.code)),
});
}
exports.useFunc = useFunc;
var Type;
(function (Type) {
Type[Type["Num"] = 0] = "Num";
Type[Type["Str"] = 1] = "Str";
})(Type || (exports.Type = Type = {}));
function getErrorPath(dataProp, dataPropType, jsPropertySyntax) {
// let path
if (dataProp instanceof codegen_1.Name) {
const isNumber = dataPropType === Type.Num;
return jsPropertySyntax
? isNumber
? (0, codegen_1._) `"[" + ${dataProp} + "]"`
: (0, codegen_1._) `"['" + ${dataProp} + "']"`
: isNumber
? (0, codegen_1._) `"/" + ${dataProp}`
: (0, codegen_1._) `"/" + ${dataProp}.replace(/~/g, "~0").replace(/\\//g, "~1")`; // TODO maybe use global escapePointer
}
return jsPropertySyntax ? (0, codegen_1.getProperty)(dataProp).toString() : "/" + escapeJsonPointer(dataProp);
}
exports.getErrorPath = getErrorPath;
function checkStrictMode(it, msg, mode = it.opts.strictSchema) {
if (!mode)
return;
msg = `strict mode: ${msg}`;
if (mode === true)
throw new Error(msg);
it.self.logger.warn(msg);
}
exports.checkStrictMode = checkStrictMode;
//# sourceMappingURL=util.js.map
@@ -0,0 +1 @@
module.exports={A:{A:{"1":"_V","2":"_b"},B:{"1":"_ZE","516":"_5B"},C:{"1":"_9M _lB","2":"_f","260":"_uF"},D:{"1":"_7D","4":"J"},E:{"1":"_nB","2":"MD","132":"_TQ"},F:{"1":"_oB","2":"F"},G:{"1":"_1O","132":"_sC"},H:{"260":"1D"},I:{"1":"_8B","2":"_n"},J:{"1":"_B"},K:{"1":"H","260":"_D"},L:{"1":"I"},M:{"1":"YC"},N:{"1":"_A"},O:{"1":"bC"},P:{"1":"_F"},Q:{"1":"JE"},R:{"1":"KE"},S:{"1":"_C"}},B:4,C:"SVG in CSS backgrounds",D:true};
@@ -0,0 +1,70 @@
{
"name": "@floating-ui/utils",
"version": "0.2.11",
"description": "Utilities for Floating UI",
"publishConfig": {
"access": "public"
},
"main": "./dist/floating-ui.utils.umd.js",
"module": "./dist/floating-ui.utils.esm.js",
"types": "./dist/floating-ui.utils.d.ts",
"sideEffects": false,
"files": [
"dist",
"dom"
],
"exports": {
"./package.json": "./package.json",
".": {
"import": {
"types": "./dist/floating-ui.utils.d.mts",
"default": "./dist/floating-ui.utils.mjs"
},
"types": "./dist/floating-ui.utils.d.ts",
"module": "./dist/floating-ui.utils.esm.js",
"default": "./dist/floating-ui.utils.umd.js"
},
"./dom": {
"import": {
"types": "./dist/floating-ui.utils.dom.d.mts",
"default": "./dist/floating-ui.utils.dom.mjs"
},
"types": "./dist/floating-ui.utils.dom.d.ts",
"module": "./dist/floating-ui.utils.dom.esm.js",
"default": "./dist/floating-ui.utils.dom.umd.js"
}
},
"author": "atomiks",
"license": "MIT",
"bugs": "https://github.com/floating-ui/floating-ui",
"repository": {
"type": "git",
"url": "https://github.com/floating-ui/floating-ui.git",
"directory": "packages/utils"
},
"homepage": "https://floating-ui.com",
"keywords": [
"tooltip",
"popover",
"dropdown",
"menu",
"popup",
"positioning"
],
"devDependencies": {
"@testing-library/jest-dom": "^6.1.6",
"config": "0.0.0"
},
"scripts": {
"lint": "eslint .",
"format": "prettier --write .",
"clean": "rimraf dist out-tsc dom react",
"test": "vitest run --globals",
"test:watch": "vitest watch --globals",
"dev": "rollup -c -w",
"build": "rollup -c",
"build:api": "build-api --tsc tsconfig.lib.json --aec api-extractor.json --aec api-extractor.dom.json --aec api-extractor.react.json",
"publint": "publint",
"typecheck": "tsc -b"
}
}
@@ -0,0 +1 @@
{"version":3,"file":"inMemory.js","sourceRoot":"","sources":["../../src/inMemory.ts"],"names":[],"mappings":"AASA;;GAEG;AACH,MAAM,OAAO,iBAAiB;IAA9B;QAEY,kBAAa,GAAoB,EAAE,CAAC;IAgDhD,CAAC;IAzCG;;OAEG;IACH,MAAM,CAAC,gBAAgB;QACnB,MAAM,eAAe,GAAG,IAAI,iBAAiB,EAAE,CAAC;QAChD,MAAM,eAAe,GAAG,IAAI,iBAAiB,EAAE,CAAC;QAChD,eAAe,CAAC,eAAe,GAAG,eAAe,CAAC;QAClD,eAAe,CAAC,eAAe,GAAG,eAAe,CAAC;QAClD,OAAO,CAAC,eAAe,EAAE,eAAe,CAAC,CAAC;IAC9C,CAAC;IAED,KAAK,CAAC,KAAK;QACP,gEAAgE;QAChE,OAAO,IAAI,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACnC,MAAM,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC,KAAK,EAAG,CAAC;YAClD,IAAI,CAAC,SAAS,EAAE,CAAC,aAAa,CAAC,OAAO,EAAE,aAAa,CAAC,KAAK,CAAC,CAAC;QACjE,CAAC;IACL,CAAC;IAED,KAAK,CAAC,KAAK;QACP,MAAM,KAAK,GAAG,IAAI,CAAC,eAAe,CAAC;QACnC,IAAI,CAAC,eAAe,GAAG,SAAS,CAAC;QACjC,MAAM,KAAK,EAAE,KAAK,EAAE,CAAC;QACrB,IAAI,CAAC,OAAO,EAAE,EAAE,CAAC;IACrB,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,IAAI,CAAC,OAAuB,EAAE,OAA+D;QAC/F,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE,CAAC;YACxB,MAAM,IAAI,KAAK,CAAC,eAAe,CAAC,CAAC;QACrC,CAAC;QAED,IAAI,IAAI,CAAC,eAAe,CAAC,SAAS,EAAE,CAAC;YACjC,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,CAAC;QAC7E,CAAC;aAAM,CAAC;YACJ,IAAI,CAAC,eAAe,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC;QACjG,CAAC;IACL,CAAC;CACJ"}
@@ -0,0 +1,46 @@
import { AnyNode } from "domhandler";
import { DomSerializerOptions } from "dom-serializer";
/**
* @category Stringify
* @deprecated Use the `dom-serializer` module directly.
* @param node Node to get the outer HTML of.
* @param options Options for serialization.
* @returns `node`'s outer HTML.
*/
export declare function getOuterHTML(node: AnyNode | ArrayLike<AnyNode>, options?: DomSerializerOptions): string;
/**
* @category Stringify
* @deprecated Use the `dom-serializer` module directly.
* @param node Node to get the inner HTML of.
* @param options Options for serialization.
* @returns `node`'s inner HTML.
*/
export declare function getInnerHTML(node: AnyNode, options?: DomSerializerOptions): string;
/**
* Get a node's inner text. Same as `textContent`, but inserts newlines for `<br>` tags. Ignores comments.
*
* @category Stringify
* @deprecated Use `textContent` instead.
* @param node Node to get the inner text of.
* @returns `node`'s inner text.
*/
export declare function getText(node: AnyNode | AnyNode[]): string;
/**
* Get a node's text content. Ignores comments.
*
* @category Stringify
* @param node Node to get the text content of.
* @returns `node`'s text content.
* @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Node/textContent}
*/
export declare function textContent(node: AnyNode | AnyNode[]): string;
/**
* Get a node's inner text, ignoring `<script>` and `<style>` tags. Ignores comments.
*
* @category Stringify
* @param node Node to get the inner text of.
* @returns `node`'s inner text.
* @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Node/innerText}
*/
export declare function innerText(node: AnyNode | AnyNode[]): string;
//# sourceMappingURL=stringify.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"use-presence-data.mjs","sources":["../../../../src/components/AnimatePresence/use-presence-data.ts"],"sourcesContent":["\"use client\"\n\nimport { useContext } from \"react\"\nimport { PresenceContext } from \"../../context/PresenceContext\"\n\nexport function usePresenceData() {\n const context = useContext(PresenceContext)\n return context ? context.custom : undefined\n}\n"],"names":[],"mappings":";;;;;AAMI;;AAEJ;;"}
@@ -0,0 +1,66 @@
'use strict';
var ruleModules = require('../dotjs')
, toHash = require('./util').toHash;
module.exports = function rules() {
var RULES = [
{ type: 'number',
rules: [ { 'maximum': ['exclusiveMaximum'] },
{ 'minimum': ['exclusiveMinimum'] }, 'multipleOf', 'format'] },
{ type: 'string',
rules: [ 'maxLength', 'minLength', 'pattern', 'format' ] },
{ type: 'array',
rules: [ 'maxItems', 'minItems', 'items', 'contains', 'uniqueItems' ] },
{ type: 'object',
rules: [ 'maxProperties', 'minProperties', 'required', 'dependencies', 'propertyNames',
{ 'properties': ['additionalProperties', 'patternProperties'] } ] },
{ rules: [ '$ref', 'const', 'enum', 'not', 'anyOf', 'oneOf', 'allOf', 'if' ] }
];
var ALL = [ 'type', '$comment' ];
var KEYWORDS = [
'$schema', '$id', 'id', '$data', '$async', 'title',
'description', 'default', 'definitions',
'examples', 'readOnly', 'writeOnly',
'contentMediaType', 'contentEncoding',
'additionalItems', 'then', 'else'
];
var TYPES = [ 'number', 'integer', 'string', 'array', 'object', 'boolean', 'null' ];
RULES.all = toHash(ALL);
RULES.types = toHash(TYPES);
RULES.forEach(function (group) {
group.rules = group.rules.map(function (keyword) {
var implKeywords;
if (typeof keyword == 'object') {
var key = Object.keys(keyword)[0];
implKeywords = keyword[key];
keyword = key;
implKeywords.forEach(function (k) {
ALL.push(k);
RULES.all[k] = true;
});
}
ALL.push(keyword);
var rule = RULES.all[keyword] = {
keyword: keyword,
code: ruleModules[keyword],
implements: implKeywords
};
return rule;
});
RULES.all.$comment = {
keyword: '$comment',
code: ruleModules.$comment
};
if (group.type) RULES.types[group.type] = group;
});
RULES.keywords = toHash(ALL.concat(KEYWORDS));
RULES.custom = {};
return RULES;
};
@@ -0,0 +1,622 @@
flf2a$ 6 5 20 0 9 0
ticks.flf (C) 1994 by Victor Parada (vparada@inf.utfsm.cl) 94/09/23.
figlet 2.1 font based on slide.flf.
Try option "-m 1" to smush one "_" between fonts.
Latin fonts a' e' i' o' u' n~ and N~ replaces A" O" U" a" o" u" and B.
____@
____@
____@
____@
____@
____@@
_/\/\_@
_/\/\_@
_/\/\_@
______@
_/\/\_@
______@@
_/\/\/\/\_@
_/\/\/\/\_@
_/\__/\___@
__________@
__________@
__________@@
___/\/\__/\/\___@
_/\/\/\/\/\/\/\_@
___/\/\__/\/\___@
_/\/\/\/\/\/\/\_@
___/\/\__/\/\___@
________________@@
_____/\/\_____@
___/\/\/\/\/\_@
_/\/\/\/\_____@
_____/\/\/\/\_@
_/\/\/\/\/\___@
_____/\/\_____@@
_/\/\____/\/\_@
_/\/\__/\/\___@
_____/\/\_____@
___/\/\__/\/\_@
_/\/\____/\/\_@
______________@@
_____/\/\_______@
_____/\/\_______@
___/\/\/\__/\/\_@
_/\/\____/\/\___@
___/\/\/\__/\/\_@
________________@@
_/\/\_@
_/\/\_@
_/\___@
______@
______@
______@@
___/\/\/\_@
_/\/\/\___@
_/\/\_____@
_/\/\/\___@
___/\/\/\_@
__________@@
_/\/\/\___@
___/\/\/\_@
_____/\/\_@
___/\/\/\_@
_/\/\/\___@
__________@@
___/\/\__/\/\___@
_____/\/\/\_____@
_/\/\/\/\/\/\/\_@
_____/\/\/\_____@
___/\/\__/\/\___@
________________@@
______________@
_____/\/\_____@
_/\/\/\/\/\/\_@
_____/\/\_____@
______________@
______________@@
______@
______@
______@
_/\/\_@
_/\/\_@
_/\___@@
__________@
__________@
_/\/\/\/\_@
__________@
__________@
__________@@
______@
______@
______@
_/\/\_@
_/\/\_@
______@@
_________/\/\_@
_______/\/\___@
_____/\/\_____@
___/\/\_______@
_/\/\_________@
______________@@
___/\/\/\/\___@
_/\/\____/\/\_@
_/\/\__/\/\/\_@
_/\/\/\__/\/\_@
___/\/\/\/\___@
______________@@
___/\/\_@
_/\/\/\_@
___/\/\_@
___/\/\_@
___/\/\_@
________@@
_/\/\/\/\/\___@
_________/\/\_@
___/\/\/\/\___@
_/\/\_________@
_/\/\/\/\/\/\_@
______________@@
_/\/\/\/\/\___@
_________/\/\_@
___/\/\/\/\___@
_________/\/\_@
_/\/\/\/\/\___@
______________@@
_____/\/\/\___@
___/\/\/\/\___@
_/\/\__/\/\___@
_/\/\/\/\/\/\_@
_______/\/\___@
______________@@
_/\/\/\/\/\/\_@
_/\/\_________@
_/\/\/\/\/\___@
_________/\/\_@
_/\/\/\/\/\___@
______________@@
___/\/\/\/\___@
_/\/\_________@
_/\/\/\/\/\___@
_/\/\____/\/\_@
___/\/\/\/\___@
______________@@
_/\/\/\/\/\/\_@
_______/\/\___@
_____/\/\_____@
___/\/\_______@
_/\/\_________@
______________@@
___/\/\/\/\___@
_/\/\____/\/\_@
___/\/\/\/\___@
_/\/\____/\/\_@
___/\/\/\/\___@
______________@@
___/\/\/\/\___@
_/\/\____/\/\_@
___/\/\/\/\/\_@
_________/\/\_@
___/\/\/\/\___@
______________@@
_/\/\_@
_/\/\_@
______@
_/\/\_@
_/\/\_@
______@@
_/\/\_@
_/\/\_@
______@
_/\/\_@
_/\/\_@
_/\___@@
_____/\/\_@
___/\/\___@
_/\/\_____@
___/\/\___@
_____/\/\_@
__________@@
__________@
_/\/\/\/\_@
__________@
_/\/\/\/\_@
__________@
__________@@
_/\/\_____@
___/\/\___@
_____/\/\_@
___/\/\___@
_/\/\_____@
__________@@
_/\/\/\/\/\___@
_________/\/\_@
_____/\/\/\___@
______________@
_____/\/\_____@
______________@@
___/\/\/\/\___@
_/\/\__/\/\/\_@
_/\/\__/\/\/\_@
_/\/\_________@
___/\/\/\/\___@
______________@@
_____/\/\_____@
___/\/\/\/\___@
_/\/\____/\/\_@
_/\/\/\/\/\/\_@
_/\/\____/\/\_@
______________@@
_/\/\/\/\/\___@
_/\/\____/\/\_@
_/\/\/\/\/\___@
_/\/\____/\/\_@
_/\/\/\/\/\___@
______________@@
___/\/\/\/\/\_@
_/\/\_________@
_/\/\_________@
_/\/\_________@
___/\/\/\/\/\_@
______________@@
_/\/\/\/\/\___@
_/\/\____/\/\_@
_/\/\____/\/\_@
_/\/\____/\/\_@
_/\/\/\/\/\___@
______________@@
_/\/\/\/\/\/\_@
_/\___________@
_/\/\/\/\/\___@
_/\/\_________@
_/\/\/\/\/\/\_@
______________@@
_/\/\/\/\/\/\_@
_/\/\_________@
_/\/\/\/\/\___@
_/\/\_________@
_/\/\_________@
______________@@
___/\/\/\/\/\_@
_/\/\_________@
_/\/\__/\/\/\_@
_/\/\____/\/\_@
___/\/\/\/\/\_@
______________@@
_/\/\____/\/\_@
_/\/\____/\/\_@
_/\/\/\/\/\/\_@
_/\/\____/\/\_@
_/\/\____/\/\_@
______________@@
_/\/\/\/\_@
___/\/\___@
___/\/\___@
___/\/\___@
_/\/\/\/\_@
__________@@
_________/\/\_@
_________/\/\_@
_________/\/\_@
_/\/\____/\/\_@
___/\/\/\/\___@
______________@@
_/\/\____/\/\_@
_/\/\__/\/\___@
_/\/\/\/\_____@
_/\/\__/\/\___@
_/\/\____/\/\_@
______________@@
_/\/\_______@
_/\/\_______@
_/\/\_______@
_/\/\_______@
_/\/\/\/\/\_@
____________@@
_/\/\______/\/\_@
_/\/\/\__/\/\/\_@
_/\/\/\/\/\/\/\_@
_/\/\__/\__/\/\_@
_/\/\______/\/\_@
________________@@
_/\/\____/\/\_@
_/\/\/\__/\/\_@
_/\/\/\/\/\/\_@
_/\/\__/\/\/\_@
_/\/\____/\/\_@
______________@@
___/\/\/\/\___@
_/\/\____/\/\_@
_/\/\____/\/\_@
_/\/\____/\/\_@
___/\/\/\/\___@
______________@@
_/\/\/\/\/\___@
_/\/\____/\/\_@
_/\/\/\/\/\___@
_/\/\_________@
_/\/\_________@
______________@@
___/\/\/\/\___@
_/\/\____/\/\_@
_/\/\____/\/\_@
_/\/\__/\/\___@
___/\/\/\/\/\_@
______________@@
_/\/\/\/\/\___@
_/\/\____/\/\_@
_/\/\/\/\/\___@
_/\/\__/\/\___@
_/\/\____/\/\_@
______________@@
___/\/\/\/\/\_@
_/\/\_________@
___/\/\/\/\___@
_________/\/\_@
_/\/\/\/\/\___@
______________@@
_/\/\/\/\/\/\_@
_____/\/\_____@
_____/\/\_____@
_____/\/\_____@
_____/\/\_____@
______________@@
_/\/\____/\/\_@
_/\/\____/\/\_@
_/\/\____/\/\_@
_/\/\____/\/\_@
___/\/\/\/\___@
______________@@
_/\/\____/\/\_@
_/\/\____/\/\_@
_/\/\____/\/\_@
___/\/\/\/\___@
_____/\/\_____@
______________@@
_/\/\______/\/\_@
_/\/\__/\__/\/\_@
_/\/\/\/\/\/\/\_@
_/\/\/\__/\/\/\_@
_/\/\______/\/\_@
________________@@
_/\/\____/\/\_@
___/\/\/\/\___@
_____/\/\_____@
___/\/\/\/\___@
_/\/\____/\/\_@
______________@@
_/\/\____/\/\_@
_/\/\____/\/\_@
___/\/\/\/\___@
_____/\/\_____@
_____/\/\_____@
______________@@
_/\/\/\/\/\/\_@
_______/\/\___@
_____/\/\_____@
___/\/\_______@
_/\/\/\/\/\/\_@
______________@@
_/\/\/\/\_@
_/\/\_____@
_/\/\_____@
_/\/\_____@
_/\/\/\/\_@
__________@@
_/\/\_________@
___/\/\_______@
_____/\/\_____@
_______/\/\___@
_________/\/\_@
______________@@
_/\/\/\/\_@
_____/\/\_@
_____/\/\_@
_____/\/\_@
_/\/\/\/\_@
__________@@
___/\/\___@
_/\/\/\/\_@
_/\____/\_@
__________@
__________@
__________@@
______________@
______________@
______________@
______________@
______________@
_/\/\/\/\/\/\_@@
_/\/\_@
_/\/\_@
___/\_@
______@
______@
______@@
____________@
_/\/\/\_____@
_____/\/\___@
_/\/\/\/\___@
_/\/\/\/\/\_@
____________@@
_/\/\_______@
_/\/\_______@
_/\/\/\/\___@
_/\/\__/\/\_@
_/\/\/\/\___@
____________@@
____________@
___/\/\/\/\_@
_/\/\_______@
_/\/\_______@
___/\/\/\/\_@
____________@@
_______/\/\_@
_______/\/\_@
___/\/\/\/\_@
_/\/\__/\/\_@
___/\/\/\/\_@
____________@@
____________@
___/\/\/\___@
_/\/\/\/\/\_@
_/\/\_______@
___/\/\/\/\_@
____________@@
___/\/\/\_@
_/\/\_____@
_/\/\/\___@
_/\/\_____@
_/\/\_____@
__________@@
____________@
___/\/\/\/\_@
_/\/\__/\/\_@
___/\/\/\/\_@
_______/\/\_@
_/\/\/\/\___@@
_/\/\_______@
_/\/\_______@
_/\/\/\/\___@
_/\/\__/\/\_@
_/\/\__/\/\_@
____________@@
_/\/\___@
________@
_/\/\___@
_/\/\___@
_/\/\/\_@
________@@
_____/\/\_@
__________@
_____/\/\_@
_____/\/\_@
_____/\/\_@
_/\/\/\___@@
_/\/\_______@
_/\/\__/\/\_@
_/\/\/\/\___@
_/\/\/\/\___@
_/\/\__/\/\_@
____________@@
_/\/\___@
_/\/\___@
_/\/\___@
_/\/\___@
_/\/\/\_@
________@@
________________@
_/\/\/\__/\/\___@
_/\/\/\/\/\/\/\_@
_/\/\__/\__/\/\_@
_/\/\______/\/\_@
________________@@
____________@
_/\/\/\/\___@
_/\/\__/\/\_@
_/\/\__/\/\_@
_/\/\__/\/\_@
____________@@
____________@
___/\/\/\___@
_/\/\__/\/\_@
_/\/\__/\/\_@
___/\/\/\___@
____________@@
____________@
_/\/\/\/\___@
_/\/\__/\/\_@
_/\/\/\/\___@
_/\/\_______@
_/\/\_______@@
____________@
___/\/\/\/\_@
_/\/\__/\/\_@
___/\/\/\/\_@
_______/\/\_@
_______/\/\_@@
____________@
_/\/\__/\/\_@
_/\/\/\/\___@
_/\/\_______@
_/\/\_______@
____________@@
____________@
___/\/\/\/\_@
_/\/\/\/\___@
_______/\/\_@
_/\/\/\/\___@
____________@@
___/\/\_____@
_/\/\/\/\/\_@
___/\/\_____@
___/\/\_____@
___/\/\/\___@
____________@@
____________@
_/\/\__/\/\_@
_/\/\__/\/\_@
_/\/\__/\/\_@
___/\/\/\/\_@
____________@@
____________@
_/\/\__/\/\_@
_/\/\__/\/\_@
___/\/\/\___@
_____/\_____@
____________@@
________________@
_/\/\______/\/\_@
_/\/\__/\__/\/\_@
_/\/\/\/\/\/\/\_@
___/\/\__/\/\___@
________________@@
____________@
_/\/\__/\/\_@
___/\/\/\___@
___/\/\/\___@
_/\/\__/\/\_@
____________@@
____________@
_/\/\__/\/\_@
_/\/\__/\/\_@
___/\/\/\/\_@
_______/\/\_@
_/\/\/\/\___@@
____________@
_/\/\/\/\/\_@
_____/\/\___@
___/\/\_____@
_/\/\/\/\/\_@
____________@@
___/\/\/\/\_@
___/\/\_____@
_/\/\_______@
___/\/\_____@
___/\/\/\/\_@
____________@@
_/\/\_@
_/\/\_@
_/\/\_@
_/\/\_@
_/\/\_@
_/\/\_@@
_/\/\/\/\___@
_____/\/\___@
_______/\/\_@
_____/\/\___@
_/\/\/\/\___@
____________@@
___/\/\__/\/\_@
_/\/\/\/\/\/\_@
_/\/\__/\/\___@
______________@
______________@
______________@@
_______/\/\_@
_/\/\/\_____@
_____/\/\___@
_/\/\/\/\___@
_/\/\/\/\/\_@
____________@@
_______/\/\_@
___/\/\/\___@
_/\/\/\/\/\_@
_/\/\_______@
___/\/\/\/\_@
____________@@
___/\/\_@
________@
_/\/\___@
_/\/\___@
_/\/\/\_@
________@@
_______/\/\_@
___/\/\/\___@
_/\/\__/\/\_@
_/\/\__/\/\_@
___/\/\/\___@
____________@@
_______/\/\_@
_/\/\__/\/\_@
_/\/\__/\/\_@
_/\/\__/\/\_@
___/\/\/\/\_@
____________@@
_/\/\/\/\/\_@
____________@
_/\/\/\/\___@
_/\/\__/\/\_@
_/\/\__/\/\_@
____________@@
_/\/\/\/\/\/\_@
______________@
_/\/\/\__/\/\_@
_/\/\__/\/\/\_@
_/\/\____/\/\_@
______________@@
@@ -0,0 +1,29 @@
import Agent from './agent'
import buildConnector from './connector'
import Dispatcher from './dispatcher'
import { IncomingHttpHeaders } from './header'
export default ProxyAgent
declare class ProxyAgent extends Dispatcher {
constructor (options: ProxyAgent.Options | string)
dispatch (options: Agent.DispatchOptions, handler: Dispatcher.DispatchHandler): boolean
close (): Promise<void>
}
declare namespace ProxyAgent {
export interface Options extends Agent.Options {
uri: string;
/**
* @deprecated use opts.token
*/
auth?: string;
token?: string;
headers?: IncomingHttpHeaders;
requestTls?: buildConnector.BuildOptions;
proxyTls?: buildConnector.BuildOptions;
clientFactory?(origin: URL, opts: object): Dispatcher;
proxyTunnel?: boolean;
}
}
@@ -0,0 +1,136 @@
/*!
* fresh
* Copyright(c) 2012 TJ Holowaychuk
* Copyright(c) 2016-2017 Douglas Christopher Wilson
* MIT Licensed
*/
'use strict'
/**
* RegExp to check for no-cache token in Cache-Control.
* @private
*/
var CACHE_CONTROL_NO_CACHE_REGEXP = /(?:^|,)\s*?no-cache\s*?(?:,|$)/
/**
* Module exports.
* @public
*/
module.exports = fresh
/**
* Check freshness of the response using request and response headers.
*
* @param {Object} reqHeaders
* @param {Object} resHeaders
* @return {Boolean}
* @public
*/
function fresh (reqHeaders, resHeaders) {
// fields
var modifiedSince = reqHeaders['if-modified-since']
var noneMatch = reqHeaders['if-none-match']
// unconditional request
if (!modifiedSince && !noneMatch) {
return false
}
// Always return stale when Cache-Control: no-cache
// to support end-to-end reload requests
// https://tools.ietf.org/html/rfc2616#section-14.9.4
var cacheControl = reqHeaders['cache-control']
if (cacheControl && CACHE_CONTROL_NO_CACHE_REGEXP.test(cacheControl)) {
return false
}
// if-none-match takes precedent over if-modified-since
if (noneMatch) {
if (noneMatch === '*') {
return true
}
var etag = resHeaders.etag
if (!etag) {
return false
}
var matches = parseTokenList(noneMatch)
for (var i = 0; i < matches.length; i++) {
var match = matches[i]
if (match === etag || match === 'W/' + etag || 'W/' + match === etag) {
return true
}
}
return false
}
// if-modified-since
if (modifiedSince) {
var lastModified = resHeaders['last-modified']
var modifiedStale = !lastModified || !(parseHttpDate(lastModified) <= parseHttpDate(modifiedSince))
if (modifiedStale) {
return false
}
}
return true
}
/**
* Parse an HTTP Date into a number.
*
* @param {string} date
* @private
*/
function parseHttpDate (date) {
var timestamp = date && Date.parse(date)
// istanbul ignore next: guard against date.js Date.parse patching
return typeof timestamp === 'number'
? timestamp
: NaN
}
/**
* Parse a HTTP token list.
*
* @param {string} str
* @private
*/
function parseTokenList (str) {
var end = 0
var list = []
var start = 0
// gather tokens
for (var i = 0, len = str.length; i < len; i++) {
switch (str.charCodeAt(i)) {
case 0x20: /* */
if (start === end) {
start = end = i + 1
}
break
case 0x2c: /* , */
list.push(str.substring(start, end))
start = end = i + 1
break
default:
end = i + 1
break
}
}
// final token
list.push(str.substring(start, end))
return list
}
@@ -0,0 +1,92 @@
# domhandler [![Build Status](https://travis-ci.com/fb55/domhandler.svg?branch=master)](https://travis-ci.com/fb55/domhandler)
The DOM handler creates a tree containing all nodes of a page.
The tree can be manipulated using the [domutils](https://github.com/fb55/domutils)
or [cheerio](https://github.com/cheeriojs/cheerio) libraries and
rendered using [dom-serializer](https://github.com/cheeriojs/dom-serializer) .
## Usage
```javascript
const handler = new DomHandler([ <func> callback(err, dom), ] [ <obj> options ]);
// const parser = new Parser(handler[, options]);
```
Available options are described below.
## Example
```javascript
const { Parser } = require("htmlparser2");
const { DomHandler } = require("domhandler");
const rawHtml =
"Xyz <script language= javascript>var foo = '<<bar>>';</script><!--<!-- Waah! -- -->";
const handler = new DomHandler((error, dom) => {
if (error) {
// Handle error
} else {
// Parsing completed, do something
console.log(dom);
}
});
const parser = new Parser(handler);
parser.write(rawHtml);
parser.end();
```
Output:
```javascript
[
{
data: "Xyz ",
type: "text",
},
{
type: "script",
name: "script",
attribs: {
language: "javascript",
},
children: [
{
data: "var foo = '<bar>';<",
type: "text",
},
],
},
{
data: "<!-- Waah! -- ",
type: "comment",
},
];
```
## Option: `withStartIndices`
Add a `startIndex` property to nodes.
When the parser is used in a non-streaming fashion, `startIndex` is an integer
indicating the position of the start of the node in the document.
The default value is `false`.
## Option: `withEndIndices`
Add an `endIndex` property to nodes.
When the parser is used in a non-streaming fashion, `endIndex` is an integer
indicating the position of the end of the node in the document.
The default value is `false`.
---
License: BSD-2-Clause
## Security contact information
To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security).
Tidelift will coordinate the fix and disclosure.
## `domhandler` for enterprise
Available as part of the Tidelift Subscription
The maintainers of `domhandler` and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-domhandler?utm_source=npm-domhandler&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)
@@ -0,0 +1,885 @@
flf2a$ 5 4 15 0 8
This font is (c) Michel Eftimakis 1995 -- Version 1.0 -- 27 jan 1995
____________________________________________________________ /`____
| Michel Eftimakis | "Ascii-Artist" '\/ |
| Michel.Eftimakis@ustc.vlsi.com | Boo)- (00) ||
| Tel : (33) 92 96 27 19 | (_`'_) ||
|__ Fax : (33) 92 96 27 01 _________|____ FRANCE ___________ _!!_ ____||
|_____________________________________________________________________|
$@
$ @
$ @
$ @
$ @@
/7@
// @
@
() @
@@
@
/7/7@
$ @
$ @
@@
@
_/7_/7_@
// // @
-//-//- @
@@
_/7@
,' _/@
_\ `. @
/___,' @
// @@
@
()/7@
// @
//()@
@@
_ @
(o) @
,'oV7@
|_n| @
@@
_@
//@
$ @
$ @
@@
_@
,;'@
//$ @
//$ @
|| @@
_ @
||@
$// @
$// @
,;' @@
. ,@
x @
' `@
$ @
@@
@
_/7 @
/_ _7@
// @
@@
@
@
@
()@
/' @@
@
@
___@
/__/@
@@
@
@
@
()$@
@@
_@
//@
// @
// @
@@
_ @
,' \@
/ 0 /@
\_,' @
@@
_@
,'/@
$// @
$// @
@@
___ @
/_ )@
,'c' @
(___7 @
@@
____@
/_ ,'@
__/< @
|__,' @
@@
.@
,'/@
,'o/ @
(___7 @
@@
___@
/ _/@
|_ \@
/__,'@
@@
@
,'7@
/o \@
|_,'@
@@
___@
/_ /@
// @
// @
@@
__ @
/o )@
,'o | @
|__,' @
@@
__ @
,'o |@
|_ / @
// @
@@
@
@
()@
() @
@@
@
@
()@
() @
V @@
_@
//@
<<$@
\\@
@@
@
____@
/___/@
/___/ @
@@
_ @
\\ @
$>>@
// @
@@
___ @
/ o )@
7,' @
$ @
() @@
__ @
,'_ \@
|(o_,'@
$|___7$@
@@
_ @
.' \@
/ o /@
/_n_/ @
@@
___ @
/ o.)@
/ o \ @
/___,' @
@@
__@
,'_/@
/ /_ @
|__/ @
@@
__ @
/ \@
/ o |@
/__,' @
@@
___@
/ _/@
/ _/ @
/___/ @
@@
____@
/ __/@
/ _/ @
/_/ @
@@
__@
,'_/@
/ /_n@
|__,'@
@@
_ __@
/// /@
/ ` / @
/_n_/ @
@@
__@
/ /@
/ / @
/_/ @
@@
__@
/ /@
n_/ / @
\_,' @
@@
_ @
/ //7@
/ ,' @
/_/\\ @
@@
__@
/ /@
/ /_@
/___/@
@@
_ __@
/ \,' /@
/ \,' / @
/_/ /_/ @
@@
_ __@
/ |/ /@
/ || / @
/_/|_/ @
@@
_ @
,' \@
/ o |@
|_,' @
@@
___ @
/ o |@
/ _,' @
/_/ @
@@
_ @
,' \@
/ o |@
|_,\\@
@@
___ @
/ o |@
/ ,' @
/_/`_\ @
@@
___@
,' _/@
_\ `. @
/___,' @
@@
_____@
/_ _/@
/ / @
/_/ @
@@
_ __@
/// /@
/ U / @
\_,' @
@@
_ __@
/// /@
| V / @
|_,' @
@@
_ __@
///7/ /@
| V V / @
|_n_,' @
@@
_ __@
| |/,'@
/ / @
,'_n_\ @
@@
_ __@
| |/,'@
| ,' @
/_/ @
@@
____ @
/_ ,'@
,',' @
,'___/ @
@@
__ @
/ _/@
/ /$ @
/ /$ @
/__/ @@
_ @
\\ @
\\ @
\\@
@@
___@
/_ /@
$/ / @
$/ / @
/__/ @@
_ @
/.\@
$ @
$ @
@@
@
@
@
____@
/___/@@
_ @
\\@
$ @
$ @
@@
@
_ @
,'o|@
|_,7@
@@
@
/7@
/o\@
/_,'@
@@
@
__@
,','@
\_\ @
@@
@
_//@
,'o/ @
|__/ @
@@
@
__@
,'o/@
|_( @
@@
_ @
,'_7@
/_7 @
// @
@@
@
_ @
,'o|@
|_,'@
_// @@
@
/7@
/ \@
/n_/@
@@
@
()@
/7 @
// @
@@
@
()@
/7 @
// @
// @@
@
/7 @
//_7@
//\\ @
@@
@
/7@
// @
// @
@@
@
_ @
/ \'\@
/_nn_/@
@@
@
_ @
/ \/7@
/_n_/ @
@@
@
_ @
,'o|@
|_,'@
@@
@
_ @
/o|@
/_,'@
// @@
@
_ @
,'o|@
|_,'@
// @@
@
_ @
//7@
//$ @
@@
@
__@
(c'@
/__)@
@@
@
/7@
/_7@
// @
@@
@
@
/7/7@
/__/ @
@@
@
@
/7/7@
|,' @
@@
@
@
/7/7/7@
|,^,' @
@@
@
_ __@
\V,'@
,'n\ @
@@
@
_ __@
\V /@
)/ @
// @@
@
____@
/_ ,'@
,'__/@
@@
_@
//@
/|$@
\|$@
\\@@
__@
/ /@
/ / @
/ / @
/_/ @@
_ @
\\ @
$|\@
$|/@
// @@
_ _@
//\//@
$ @
$ @
@@
()_()@
.' \ @
/ o / @
/_n_/ @
@@
()_()@
,' \ @
/ o | @
|_,' @
@@
()_()@
/// / @
/ U / @
\_,' @
@@
@
OO@
,'o|@
|_,7@
@@
@
OO@
,'o|@
|_,'@
@@
@
O O@
/7/7@
/__/ @
@@
__ @
/o )@
/o | @
//_,' @
// @@
160
$@
$ @
$ @
$ @
$ @@
161
()@
@
/7 @
// @
// @@
165
_ __@
| |/,'@
/_ _7 @
/_/ @
@@
166
/7@
// @
@
/7 @
// @@
168
@
()()@
$$ @
$$ @
@@
183
_ @
(_)@
$ @
$ @
@@
192
\\@
.' \@
/ o /@
/_n_/ @
@@
193
//@
.' \@
/ o /@
/_n_/ @
@@
194
/^\@
.' \@
/ o /@
/_n_/ @
@@
195
/\/@
.' \@
/ o /@
/_n_/ @
@@
196
()_()@
.' \ @
/ o / @
/_n_/ @
@@
197
()@
.' \@
/ o /@
/_n_/ @
@@
198
______@
.' \ _/@
/ o _/ @
/_n_/___/ @
@@
199
__@
,'_/@
/ /_ @
|__/ @
// @@
200
_\\@
/ _/@
/ _/ @
/___/ @
@@
201
_//@
/ _/@
/ _/ @
/___/ @
@@
202
/^\@
/ _/@
/ _/ @
/___/ @
@@
203
()_()@
/ _/ @
/ _/ @
/___/ @
@@
204
\\@
/ /@
/ / @
/_/ @
@@
205
//@
/ / @
/ / @
/_/ @
@@
206
/^\@
/ /@
/ / @
/_/ @
@@
207
()()@
/ / @
/ / @
/_/ @
@@
209
_/\/_@
/ |/ /@
/ || / @
/_/|_/ @
@@
210
\\@
,' \@
/ o |@
|_,' @
@@
211
//@
,' \@
/ o |@
|_,' @
@@
212
/^\@
,' \@
/ o |@
|_,' @
@@
213
/\/@
,' \@
/ o |@
|_,' @
@@
214
()_()@
,' \ @
/ o | @
|_,' @
@@
217
_\\_@
/// /@
/ U / @
\_,' @
@@
218
_//_@
/// /@
/ U / @
\_,' @
@@
219
/^\_@
/// /@
/ U / @
\_,' @
@@
220
()_()@
/// / @
/ U / @
\_,' @
@@
223
__ @
/o )@
/o | @
//_,' @
// @@
224
_ @
``@
,'o|@
|_,7@
@@
225
_@
''@
,'o|@
|_,7@
@@
226
@
_^@
,'o|@
|_,7@
@@
227
@
_~@
,'o|@
|_,7@
@@
228
@
OO@
,'o|@
|_,7@
@@
229
@
_O@
,'o|@
|_,7@
@@
230
@
_ __@
,'o|'o/@
|_,7.( @
@@
231
@
__@
,','@
\_\ @
// @@
232
_ @
``@
,'o/@
|_( @
@@
233
_@
''@
,'o/@
|_( @
@@
234
@
_^@
,'o/@
|_( @
@@
235
@
OO@
,'o/@
|_( @
@@
236
_ @
``@
/7 @
// @
@@
237
_@
''@
/7 @
// @
@@
238
@
'`@
/7 @
// @
@@
239
@
OO@
/7 @
// @
@@
241
@
_~ @
/ \/7@
/_n_/ @
@@
242
_ @
``@
,'o|@
|_,'@
@@
243
_@
''@
,'o|@
|_,'@
@@
244
@
_^@
,'o|@
|_,'@
@@
245
@
_~@
,'o|@
|_,'@
@@
246
@
OO@
,'o|@
|_,'@
@@
249
_ @
``@
/7/7@
/__/ @
@@
250
_@
''@
/7/7@
/__/ @
@@
251
@
^ @
/7/7@
/__/ @
@@
252
@
O O@
/7/7@
/__/ @
@@
253
_ @
_''_@
\V /@
)/ @
// @@
255
@
_OO_@
\V /@
)/ @
// @@
@@ -0,0 +1,58 @@
'use strict';
var inspect = require('../');
var test = require('tape');
var hasToStringTag = require('has-tostringtag/shams')();
test('bigint', { skip: typeof BigInt === 'undefined' }, function (t) {
t.test('primitives', function (st) {
st.plan(3);
st.equal(inspect(BigInt(-256)), '-256n');
st.equal(inspect(BigInt(0)), '0n');
st.equal(inspect(BigInt(256)), '256n');
});
t.test('objects', function (st) {
st.plan(3);
st.equal(inspect(Object(BigInt(-256))), 'Object(-256n)');
st.equal(inspect(Object(BigInt(0))), 'Object(0n)');
st.equal(inspect(Object(BigInt(256))), 'Object(256n)');
});
t.test('syntactic primitives', function (st) {
st.plan(3);
/* eslint-disable no-new-func */
st.equal(inspect(Function('return -256n')()), '-256n');
st.equal(inspect(Function('return 0n')()), '0n');
st.equal(inspect(Function('return 256n')()), '256n');
});
t.test('toStringTag', { skip: !hasToStringTag }, function (st) {
st.plan(1);
var faker = {};
faker[Symbol.toStringTag] = 'BigInt';
st.equal(
inspect(faker),
'{ [Symbol(Symbol.toStringTag)]: \'BigInt\' }',
'object lying about being a BigInt inspects as an object'
);
});
t.test('numericSeparator', function (st) {
st.equal(inspect(BigInt(0), { numericSeparator: false }), '0n', '0n, numericSeparator false');
st.equal(inspect(BigInt(0), { numericSeparator: true }), '0n', '0n, numericSeparator true');
st.equal(inspect(BigInt(1234), { numericSeparator: false }), '1234n', '1234n, numericSeparator false');
st.equal(inspect(BigInt(1234), { numericSeparator: true }), '1_234n', '1234n, numericSeparator true');
st.equal(inspect(BigInt(-1234), { numericSeparator: false }), '-1234n', '1234n, numericSeparator false');
st.equal(inspect(BigInt(-1234), { numericSeparator: true }), '-1_234n', '1234n, numericSeparator true');
st.end();
});
t.end();
});
@@ -0,0 +1,42 @@
{
"name": "resolve-pkg-maps",
"version": "1.0.0",
"description": "Resolve package.json exports & imports maps",
"keywords": [
"node.js",
"package.json",
"exports",
"imports"
],
"license": "MIT",
"repository": "privatenumber/resolve-pkg-maps",
"funding": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1",
"author": {
"name": "Hiroki Osame",
"email": "hiroki.osame@gmail.com"
},
"type": "module",
"files": [
"dist"
],
"main": "./dist/index.cjs",
"module": "./dist/index.mjs",
"types": "./dist/index.d.cts",
"exports": {
"require": {
"types": "./dist/index.d.cts",
"default": "./dist/index.cjs"
},
"import": {
"types": "./dist/index.d.mts",
"default": "./dist/index.mjs"
}
},
"imports": {
"#resolve-pkg-maps": {
"types": "./src/index.ts",
"development": "./src/index.ts",
"default": "./dist/index.mjs"
}
}
}
@@ -0,0 +1 @@
{"version":3,"file":"code.js","sources":["../../../src/icons/code.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Code\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cG9seWxpbmUgcG9pbnRzPSIxNiAxOCAyMiAxMiAxNiA2IiAvPgogIDxwb2x5bGluZSBwb2ludHM9IjggNiAyIDEyIDggMTgiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/code\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Code = createLucideIcon('Code', [\n ['polyline', { points: '16 18 22 12 16 6', key: 'z7tu5w' }],\n ['polyline', { points: '8 6 2 12 8 18', key: '1eg1df' }],\n]);\n\nexport default Code;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,iBAAiB,MAAQ,CAAA,CAAA,CAAA;AAAA,CAAA,CACpC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAY,CAAA,CAAA,CAAA,CAAE,QAAQ,CAAoB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC1D,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAY,CAAA,CAAA,CAAA,CAAE,QAAQ,CAAiB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACzD,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,22 @@
'use strict';
const path = require('path');
module.exports = {
entry: path.resolve(__dirname, 'src/index.js'),
output: {
path: path.resolve(__dirname, 'assets'),
filename: 'bundle.js'
},
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader'
}
}
]
}
};
@@ -0,0 +1 @@
{"version":3,"file":"calc-duration.mjs","sources":["../../../../../src/animation/generators/utils/calc-duration.ts"],"sourcesContent":["import { KeyframeGenerator } from \"../../types\"\n\n/**\n * Implement a practical max duration for keyframe generation\n * to prevent infinite loops\n */\nexport const maxGeneratorDuration = 20_000\nexport function calcGeneratorDuration(\n generator: KeyframeGenerator<unknown>\n): number {\n let duration = 0\n const timeStep = 50\n let state = generator.next(duration)\n while (!state.done && duration < maxGeneratorDuration) {\n duration += timeStep\n state = generator.next(duration)\n }\n\n return duration >= maxGeneratorDuration ? Infinity : duration\n}\n"],"names":[],"mappings":"AAEA;;;AAGG;AACI,MAAM,oBAAoB,GAAG;AAC9B,SAAU,qBAAqB,CACjC,SAAqC,EAAA;IAErC,IAAI,QAAQ,GAAG,CAAC;IAChB,MAAM,QAAQ,GAAG,EAAE;IACnB,IAAI,KAAK,GAAG,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC;IACpC,OAAO,CAAC,KAAK,CAAC,IAAI,IAAI,QAAQ,GAAG,oBAAoB,EAAE;QACnD,QAAQ,IAAI,QAAQ;AACpB,QAAA,KAAK,GAAG,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC;IACpC;IAEA,OAAO,QAAQ,IAAI,oBAAoB,GAAG,QAAQ,GAAG,QAAQ;AACjE;;;;"}
@@ -0,0 +1,7 @@
{
"version": 3,
"sources": ["../src/index.ts", "../src/slot.tsx"],
"sourcesContent": ["export {\n Slot,\n Slottable,\n //\n Root,\n createSlot,\n createSlottable,\n} from './slot';\nexport type { SlotProps } from './slot';\n", "import * as React from 'react';\nimport { composeRefs } from '@radix-ui/react-compose-refs';\n\n/* -------------------------------------------------------------------------------------------------\n * Slot\n * -----------------------------------------------------------------------------------------------*/\n\ninterface SlotProps extends React.HTMLAttributes<HTMLElement> {\n children?: React.ReactNode;\n}\n\n/* @__NO_SIDE_EFFECTS__ */ export function createSlot(ownerName: string) {\n const SlotClone = createSlotClone(ownerName);\n const Slot = React.forwardRef<HTMLElement, SlotProps>((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n const childrenArray = React.Children.toArray(children);\n const slottable = childrenArray.find(isSlottable);\n\n if (slottable) {\n // the new element to render is the one passed as a child of `Slottable`\n const newElement = slottable.props.children;\n\n const newChildren = childrenArray.map((child) => {\n if (child === slottable) {\n // because the new element will be the one rendered, we are only interested\n // in grabbing its children (`newElement.props.children`)\n if (React.Children.count(newElement) > 1) return React.Children.only(null);\n return React.isValidElement(newElement)\n ? (newElement.props as { children: React.ReactNode }).children\n : null;\n } else {\n return child;\n }\n });\n\n return (\n <SlotClone {...slotProps} ref={forwardedRef}>\n {React.isValidElement(newElement)\n ? React.cloneElement(newElement, undefined, newChildren)\n : null}\n </SlotClone>\n );\n }\n\n return (\n <SlotClone {...slotProps} ref={forwardedRef}>\n {children}\n </SlotClone>\n );\n });\n\n Slot.displayName = `${ownerName}.Slot`;\n return Slot;\n}\n\nconst Slot = createSlot('Slot');\n\n/* -------------------------------------------------------------------------------------------------\n * SlotClone\n * -----------------------------------------------------------------------------------------------*/\n\ninterface SlotCloneProps {\n children: React.ReactNode;\n}\n\n/* @__NO_SIDE_EFFECTS__ */ function createSlotClone(ownerName: string) {\n const SlotClone = React.forwardRef<any, SlotCloneProps>((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n\n if (React.isValidElement(children)) {\n const childrenRef = getElementRef(children);\n const props = mergeProps(slotProps, children.props as AnyProps);\n // do not pass ref to React.Fragment for React 19 compatibility\n if (children.type !== React.Fragment) {\n props.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;\n }\n return React.cloneElement(children, props);\n }\n\n return React.Children.count(children) > 1 ? React.Children.only(null) : null;\n });\n\n SlotClone.displayName = `${ownerName}.SlotClone`;\n return SlotClone;\n}\n\n/* -------------------------------------------------------------------------------------------------\n * Slottable\n * -----------------------------------------------------------------------------------------------*/\n\nconst SLOTTABLE_IDENTIFIER = Symbol('radix.slottable');\n\ninterface SlottableProps {\n children: React.ReactNode;\n}\n\ninterface SlottableComponent extends React.FC<SlottableProps> {\n __radixId: symbol;\n}\n\n/* @__NO_SIDE_EFFECTS__ */ export function createSlottable(ownerName: string) {\n const Slottable: SlottableComponent = ({ children }) => {\n return <>{children}</>;\n };\n Slottable.displayName = `${ownerName}.Slottable`;\n Slottable.__radixId = SLOTTABLE_IDENTIFIER;\n return Slottable;\n}\n\nconst Slottable = createSlottable('Slottable');\n\n/* ---------------------------------------------------------------------------------------------- */\n\ntype AnyProps = Record<string, any>;\n\nfunction isSlottable(\n child: React.ReactNode\n): child is React.ReactElement<SlottableProps, typeof Slottable> {\n return (\n React.isValidElement(child) &&\n typeof child.type === 'function' &&\n '__radixId' in child.type &&\n child.type.__radixId === SLOTTABLE_IDENTIFIER\n );\n}\n\nfunction mergeProps(slotProps: AnyProps, childProps: AnyProps) {\n // all child props should override\n const overrideProps = { ...childProps };\n\n for (const propName in childProps) {\n const slotPropValue = slotProps[propName];\n const childPropValue = childProps[propName];\n\n const isHandler = /^on[A-Z]/.test(propName);\n if (isHandler) {\n // if the handler exists on both, we compose them\n if (slotPropValue && childPropValue) {\n overrideProps[propName] = (...args: unknown[]) =>Line truncated
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AACvB,gCAA4B;AAmCpB;AAAA;AAzB0B,SAAS,WAAW,WAAmB;AACvE,QAAM,YAAY,gCAAgB,SAAS;AAC3C,QAAMA,QAAa,iBAAmC,CAAC,OAAO,iBAAiB;AAC7E,UAAM,EAAE,UAAU,GAAG,UAAU,IAAI;AACnC,UAAM,gBAAsB,eAAS,QAAQ,QAAQ;AACrD,UAAM,YAAY,cAAc,KAAK,WAAW;AAEhD,QAAI,WAAW;AAEb,YAAM,aAAa,UAAU,MAAM;AAEnC,YAAM,cAAc,cAAc,IAAI,CAAC,UAAU;AAC/C,YAAI,UAAU,WAAW;AAGvB,cAAU,eAAS,MAAM,UAAU,IAAI,EAAG,QAAa,eAAS,KAAK,IAAI;AACzE,iBAAa,qBAAe,UAAU,IACjC,WAAW,MAAwC,WACpD;AAAA,QACN,OAAO;AACL,iBAAO;AAAA,QACT;AAAA,MACF,CAAC;AAED,aACE,4CAAC,aAAW,GAAG,WAAW,KAAK,cAC5B,UAAM,qBAAe,UAAU,IACtB,mBAAa,YAAY,QAAW,WAAW,IACrD,MACN;AAAA,IAEJ;AAEA,WACE,4CAAC,aAAW,GAAG,WAAW,KAAK,cAC5B,UACH;AAAA,EAEJ,CAAC;AAED,EAAAA,MAAK,cAAc,GAAG,SAAS;AAC/B,SAAOA;AACT;AAEA,IAAM,OAAO,2BAAW,MAAM;AAAA;AAUH,SAAS,gBAAgB,WAAmB;AACrE,QAAM,YAAkB,iBAAgC,CAAC,OAAO,iBAAiB;AAC/E,UAAM,EAAE,UAAU,GAAG,UAAU,IAAI;AAEnC,QAAU,qBAAe,QAAQ,GAAG;AAClC,YAAM,cAAc,cAAc,QAAQ;AAC1C,YAAMC,SAAQ,WAAW,WAAW,SAAS,KAAiB;AAE9D,UAAI,SAAS,SAAe,gBAAU;AACpC,QAAAA,OAAM,MAAM,mBAAe,uCAAY,cAAc,WAAW,IAAI;AAAA,MACtE;AACA,aAAa,mBAAa,UAAUA,MAAK;AAAA,IAC3C;AAEA,WAAa,eAAS,MAAM,QAAQ,IAAI,IAAU,eAAS,KAAK,IAAI,IAAI;AAAA,EAC1E,CAAC;AAED,YAAU,cAAc,GAAG,SAAS;AACpC,SAAO;AACT;AAMA,IAAM,uBAAuB,OAAO,iBAAiB;AAAA;AAUnB,SAAS,gBAAgB,WAAmB;AAC5E,QAAMC,aAAgC,CAAC,EAAE,SAAS,MAAM;AACtD,WAAO,2EAAG,UAAS;AAAA,EACrB;AACA,EAAAA,WAAU,cAAc,GAAG,SAAS;AACpC,EAAAA,WAAU,YAAY;AACtB,SAAOA;AACT;AAEA,IAAM,YAAY,gCAAgB,WAAW;AAM7C,SAAS,YACP,OAC+D;AAC/D,SACQ,qBAAe,KAAK,KAC1B,OAAO,MAAM,SAAS,cACtB,eAAe,MAAM,QACrB,MAAM,KAAK,cAAc;AAE7B;AAEA,SAAS,WAAW,WAAqB,YAAsB;AAE7D,QAAM,gBAAgB,EAAE,GAAG,WAAW;AAEtC,aAAW,YAAY,YAAY;AACjC,UAAM,gBAAgB,UAAU,QAAQ;AACxC,UAAM,iBAAiB,WAAW,QAAQ;AAE1C,UAAM,YAAY,WAAW,KAAK,QAAQ;AAC1C,QAAI,WAAW;AAEb,UAAI,iBAAiB,gBAAgB;AACnC,sBAAc,QAAQ,IAAI,IAAI,SAAoB;AAChD,gBAAM,SAAS,eAAe,GAAG,IAAI;AACrC,wBAAc,GAAG,IAAI;AACrB,iBAAO;AAAA,QACT;AAAA,MACF,WAES,eAAe;AACtB,sBAAc,QAAQ,IAAI;AAAA,MAC5B;AAAA,IACF,WAES,aAAa,SAAS;AAC7B,oBAAc,QAAQ,IAAI,EAAE,GAAG,eAAe,GAAG,eAAe;AAAA,IAClE,WAAW,aAAa,aAAa;AACnC,oBAAc,QAAQ,IAAI,CAAC,eAAe,cAAc,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;AAAA,IACpF;AAAA,EACF;AAEA,SAAO,EAAE,GAAG,WAAW,GAAG,cAAc;AAC1C;AAOA,SAAS,cAAc,SAA6B;AAElD,MAAI,SAAS,OAAO,yBAAyB,QAAQ,OAAO,KAAK,GAAG;AACpE,MAAI,UAAU,UAAU,oBAAoB,UAAU,OAAO;AAC7D,MAAI,SAAS;AACX,WAAQ,QAAgB;AAAA,EAC1B;AAGA,WAAS,OAAO,yBAAyB,SAAS,KAAK,GAAG;AAC1D,YAAU,UAAU,oBAAoB,UAAU,OAAO;AACzD,MAAI,SAAS;AACX,WAAQ,QAAQ,MAAuC;AAAA,EACzD;AAGA,SAAQ,QAAQ,MAAuC,OAAQ,QAAgB;AACjF;",
"names": ["Slot", "props", "Slottable"]
}
@@ -0,0 +1,17 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const ChartNoAxesColumn = createLucideIcon("ChartNoAxesColumn", [
["line", { x1: "18", x2: "18", y1: "20", y2: "10", key: "1xfpm4" }],
["line", { x1: "12", x2: "12", y1: "20", y2: "4", key: "be30l9" }],
["line", { x1: "6", x2: "6", y1: "20", y2: "14", key: "1r4le6" }]
]);
export { ChartNoAxesColumn as default };
//# sourceMappingURL=chart-no-axes-column.js.map
@@ -0,0 +1,16 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const CircleSlash2 = createLucideIcon("CircleSlash2", [
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
["path", { d: "M22 2 2 22", key: "y4kqgn" }]
]);
export { CircleSlash2 as default };
//# sourceMappingURL=circle-slash-2.js.map
@@ -0,0 +1,40 @@
{
"packages": {
".": {
"include-component-in-tag": false,
"release-type": "node",
"changelog-sections": [
{ "type": "feat", "section": "Features", "hidden": false },
{ "type": "fix", "section": "Bug Fixes", "hidden": false },
{ "type": "bin", "section": "Core", "hidden": false },
{ "type": "gyp", "section": "Core", "hidden": false },
{ "type": "lib", "section": "Core", "hidden": false },
{ "type": "src", "section": "Core", "hidden": false },
{ "type": "test", "section": "Tests", "hidden": false },
{ "type": "build", "section": "Core", "hidden": false },
{ "type": "clean", "section": "Core", "hidden": false },
{ "type": "configure", "section": "Core", "hidden": false },
{ "type": "install", "section": "Core", "hidden": false },
{ "type": "list", "section": "Core", "hidden": false },
{ "type": "rebuild", "section": "Core", "hidden": false },
{ "type": "remove", "section": "Core", "hidden": false },
{ "type": "deps", "section": "Core", "hidden": false },
{ "type": "python", "section": "Core", "hidden": false },
{ "type": "lin", "section": "Core", "hidden": false },
{ "type": "linux", "section": "Core", "hidden": false },
{ "type": "mac", "section": "Core", "hidden": false },
{ "type": "macos", "section": "Core", "hidden": false },
{ "type": "win", "section": "Core", "hidden": false },
{ "type": "windows", "section": "Core", "hidden": false },
{ "type": "zos", "section": "Core", "hidden": false },
{ "type": "doc", "section": "Doc", "hidden": false },
{ "type": "docs", "section": "Doc", "hidden": false },
{ "type": "readme", "section": "Doc", "hidden": false },
{ "type": "chore", "section": "Miscellaneous", "hidden": false },
{ "type": "refactor", "section": "Miscellaneous", "hidden": false },
{ "type": "ci", "section": "Miscellaneous", "hidden": false },
{ "type": "meta", "section": "Miscellaneous", "hidden": false }
]
}
}
}
@@ -0,0 +1,411 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.ComparisonType = exports.NullishComparisonType = exports.OperandValidity = exports.Yoda = void 0;
exports.gatherLogicalOperands = gatherLogicalOperands;
const utils_1 = require("@typescript-eslint/utils");
const ts_api_utils_1 = require("ts-api-utils");
const ts = __importStar(require("typescript"));
const util_1 = require("../../util");
var Yoda;
(function (Yoda) {
Yoda[Yoda["Yes"] = 0] = "Yes";
Yoda[Yoda["No"] = 1] = "No";
Yoda[Yoda["Unknown"] = 2] = "Unknown";
})(Yoda || (exports.Yoda = Yoda = {}));
var ComparisonValueType;
(function (ComparisonValueType) {
ComparisonValueType["Null"] = "Null";
ComparisonValueType["Undefined"] = "Undefined";
ComparisonValueType["UndefinedStringLiteral"] = "UndefinedStringLiteral";
})(ComparisonValueType || (ComparisonValueType = {}));
var OperandValidity;
(function (OperandValidity) {
OperandValidity["Valid"] = "Valid";
OperandValidity["Last"] = "Last";
OperandValidity["Invalid"] = "Invalid";
})(OperandValidity || (exports.OperandValidity = OperandValidity = {}));
var NullishComparisonType;
(function (NullishComparisonType) {
/** `x != null`, `x != undefined` */
NullishComparisonType["NotEqualNullOrUndefined"] = "NotEqualNullOrUndefined";
/** `x == null`, `x == undefined` */
NullishComparisonType["EqualNullOrUndefined"] = "EqualNullOrUndefined";
/** `x !== null` */
NullishComparisonType["NotStrictEqualNull"] = "NotStrictEqualNull";
/** `x === null` */
NullishComparisonType["StrictEqualNull"] = "StrictEqualNull";
/** `x !== undefined`, `typeof x !== 'undefined'` */
NullishComparisonType["NotStrictEqualUndefined"] = "NotStrictEqualUndefined";
/** `x === undefined`, `typeof x === 'undefined'` */
NullishComparisonType["StrictEqualUndefined"] = "StrictEqualUndefined";
/** `!x` */
NullishComparisonType["NotBoolean"] = "NotBoolean";
/** `x` */
NullishComparisonType["Boolean"] = "Boolean";
})(NullishComparisonType || (exports.NullishComparisonType = NullishComparisonType = {}));
var ComparisonType;
(function (ComparisonType) {
ComparisonType["NotEqual"] = "NotEqual";
ComparisonType["Equal"] = "Equal";
ComparisonType["NotStrictEqual"] = "NotStrictEqual";
ComparisonType["StrictEqual"] = "StrictEqual";
})(ComparisonType || (exports.ComparisonType = ComparisonType = {}));
const NULLISH_FLAGS = ts.TypeFlags.Null | ts.TypeFlags.Undefined;
function isValidFalseBooleanCheckType(node, disallowFalseyLiteral, parserServices, options) {
const type = parserServices.getTypeAtLocation(node);
const types = (0, ts_api_utils_1.unionConstituents)(type);
const primitiveAndObjectParts = types.flatMap(type => (0, ts_api_utils_1.intersectionConstituents)(type));
if (disallowFalseyLiteral &&
/*
```
declare const x: false | {a: string};
x && x.a;
!x || x.a;
```
We don't want to consider these two cases because the boolean expression
narrows out the non-nullish falsy cases - so converting the chain to `x?.a`
would introduce a build error
*/ (primitiveAndObjectParts.some(t => (0, ts_api_utils_1.isBooleanLiteralType)(t) && t.intrinsicName === 'false') ||
primitiveAndObjectParts.some(t => (0, ts_api_utils_1.isStringLiteralType)(t) && t.value === '') ||
primitiveAndObjectParts.some(t => (0, ts_api_utils_1.isNumberLiteralType)(t) && t.value === 0) ||
primitiveAndObjectParts.some(t => (0, ts_api_utils_1.isBigIntLiteralType)(t) && t.value.base10Value === '0'))) {
return false;
}
let allowedFlags = NULLISH_FLAGS | ts.TypeFlags.Object;
if (options.checkAny === true) {
allowedFlags |= ts.TypeFlags.Any;
}
if (options.checkUnknown === true) {
allowedFlags |= ts.TypeFlags.Unknown;
}
if (options.checkString === true) {
allowedFlags |= ts.TypeFlags.StringLike;
}
if (options.checkNumber === true) {
allowedFlags |= ts.TypeFlags.NumberLike;
}
if (options.checkBoolean === true) {
allowedFlags |= ts.TypeFlags.BooleanLike;
}
if (options.checkBigInt === true) {
allowedFlags |= ts.TypeFlags.BigIntLike;
}
return primitiveAndObjectParts.every(t => (0, util_1.isTypeFlagSet)(t, allowedFlags));
}
function gatherLogicalOperands(node, parserServices, sourceCode, options) {
const result = [];
const { newlySeenLogicals, operands } = flattenLogicalOperands(node);
for (const operand of operands) {
const areMoreOperands = operand !== operands.at(-1);
switch (operand.type) {
case utils_1.AST_NODE_TYPES.BinaryExpression: {
// check for "yoda" style logical: null != x
const { comparedExpression, comparedValue, isYoda } = (() => {
// non-yoda checks are by far the most common, so check for them first
const comparedValueRight = getComparisonValueType(operand.right);
if (comparedValueRight) {
return {
comparedExpression: operand.left,
comparedValue: comparedValueRight,
isYoda: false,
};
}
return {
comparedExpression: operand.right,
comparedValue: getComparisonValueType(operand.left),
isYoda: true,
};
})();
if (comparedValue === ComparisonValueType.UndefinedStringLiteral) {
if (comparedExpression.type === utils_1.AST_NODE_TYPES.UnaryExpression &&
comparedExpression.operator === 'typeof') {
const argument = comparedExpression.argument;
if (argument.type === utils_1.AST_NODE_TYPES.Identifier &&
// typeof window === 'undefined'
(0, util_1.isReferenceToGlobalFunction)(argument.name, argument, sourceCode)) {
result.push({ type: OperandValidity.Invalid });
continue;
}
// typeof x.y === 'undefined'
result.push({
comparedName: comparedExpression.argument,
comparisonType: operand.operator.startsWith('!')
? NullishComparisonType.NotStrictEqualUndefined
: NullishComparisonType.StrictEqualUndefined,
isYoda,
node: operand,
type: OperandValidity.Valid,
});
continue;
}
// y === 'undefined'
result.push({ type: OperandValidity.Invalid });
continue;
}
if (operand.operator.startsWith('!') !== (node.operator === '||')) {
switch (operand.operator) {
case '!=':
case '==':
if (comparedValue === ComparisonValueType.Null ||
comparedValue === ComparisonValueType.Undefined) {
// x == null, x == undefined
result.push({
comparedName: comparedExpression,
comparisonType: operand.operator.startsWith('!')
? NullishComparisonType.NotEqualNullOrUndefined
: NullishComparisonType.EqualNullOrUndefined,
isYoda,
node: operand,
type: OperandValidity.Valid,
});
continue;
}
break;
case '!==':
case '===': {
const comparedName = comparedExpression;
switch (comparedValue) {
case ComparisonValueType.Null:
result.push({
comparedName,
comparisonType: operand.operator.startsWith('!')
? NullishComparisonType.NotStrictEqualNull
: NullishComparisonType.StrictEqualNull,
isYoda,
node: operand,
type: OperandValidity.Valid,
});
continue;
case ComparisonValueType.Undefined:
result.push({
comparedName,
comparisonType: operand.operator.startsWith('!')
? NullishComparisonType.NotStrictEqualUndefined
: NullishComparisonType.StrictEqualUndefined,
isYoda,
node: operand,
type: OperandValidity.Valid,
});
continue;
}
}
}
}
// x == something :(
// x === something :(
// x != something :(
// x !== something :(
const binaryComparisonChain = getBinaryComparisonChain(operand);
if (binaryComparisonChain) {
const { comparedName, comparedValue, yoda } = binaryComparisonChain;
switch (operand.operator) {
case '==':
case '===': {
const comparisonType = operand.operator === '=='
? ComparisonType.Equal
: ComparisonType.StrictEqual;
result.push({
comparedName,
comparisonType,
comparisonValue: comparedValue,
node: operand,
type: OperandValidity.Last,
yoda,
});
continue;
}
case '!=':
case '!==': {
const comparisonType = operand.operator === '!='
? ComparisonType.NotEqual
: ComparisonType.NotStrictEqual;
result.push({
comparedName,
comparisonType,
comparisonValue: comparedValue,
node: operand,
type: OperandValidity.Last,
yoda,
});
continue;
}
}
}
result.push({ type: OperandValidity.Invalid });
continue;
}
case utils_1.AST_NODE_TYPES.UnaryExpression:
if (operand.operator === '!' &&
(!areMoreOperands ||
isValidFalseBooleanCheckType(operand.argument, node.operator === '||', parserServices, options))) {
result.push({
comparedName: operand.argument,
comparisonType: NullishComparisonType.NotBoolean,
isYoda: false,
node: operand,
type: OperandValidity.Valid,
});
continue;
}
result.push({ type: OperandValidity.Invalid });
continue;
case utils_1.AST_NODE_TYPES.LogicalExpression:
// explicitly ignore the mixed logical expression cases
result.push({ type: OperandValidity.Invalid });
continue;
default:
if (!areMoreOperands ||
isValidFalseBooleanCheckType(operand, node.operator === '&&', parserServices, options)) {
result.push({
comparedName: operand,
comparisonType: NullishComparisonType.Boolean,
isYoda: false,
node: operand,
type: OperandValidity.Valid,
});
}
else {
result.push({ type: OperandValidity.Invalid });
}
continue;
}
}
return {
newlySeenLogicals,
operands: result,
};
/*
The AST is always constructed such the first element is always the deepest element.
I.e. for this code: `foo && foo.bar && foo.bar.baz && foo.bar.baz.buzz`
The AST will look like this:
{
left: {
left: {
left: foo
right: foo.bar
}
right: foo.bar.baz
}
right: foo.bar.baz.buzz
}
So given any logical expression, we can perform a depth-first traversal to get
the operands in order.
Note that this function purposely does not inspect mixed logical expressions
like `foo || foo.bar && foo.bar.baz` - separate selector
*/
function flattenLogicalOperands(node) {
const operands = [];
const newlySeenLogicals = new Set([node]);
const stack = [node.right, node.left];
let current;
while ((current = stack.pop())) {
if (current.type === utils_1.AST_NODE_TYPES.LogicalExpression &&
current.operator === node.operator) {
newlySeenLogicals.add(current);
stack.push(current.right);
stack.push(current.left);
}
else {
operands.push(current);
}
}
return {
newlySeenLogicals,
operands,
};
}
function getComparisonValueType(node) {
switch (node.type) {
case utils_1.AST_NODE_TYPES.Literal:
// eslint-disable-next-line eqeqeq, @typescript-eslint/internal/eqeq-nullish -- intentional exact comparison against null
if (node.value === null && node.raw === 'null') {
return ComparisonValueType.Null;
}
if (node.value === 'undefined') {
return ComparisonValueType.UndefinedStringLiteral;
}
return null;
case utils_1.AST_NODE_TYPES.Identifier:
if (node.name === 'undefined') {
return ComparisonValueType.Undefined;
}
return null;
}
return null;
}
function isMemberBasedExpression(node) {
if (node.type === utils_1.AST_NODE_TYPES.MemberExpression) {
return true;
}
if (node.type === utils_1.AST_NODE_TYPES.CallExpression &&
node.callee.type === utils_1.AST_NODE_TYPES.MemberExpression) {
return true;
}
return false;
}
function getBinaryComparisonChain(node) {
const { left, right } = node;
const isLeftMemberExpression = isMemberBasedExpression(left);
const isRightMemberExpression = isMemberBasedExpression(right);
if (isLeftMemberExpression && !isRightMemberExpression) {
const [comparedName, comparedValue] = [left, right];
return {
comparedName,
comparedValue,
yoda: Yoda.No,
};
}
if (!isLeftMemberExpression && isRightMemberExpression) {
const [comparedName, comparedValue] = [right, left];
return {
comparedName,
comparedValue,
yoda: Yoda.Yes,
};
}
if (isLeftMemberExpression && isRightMemberExpression) {
return {
comparedName: left,
comparedValue: right,
yoda: Yoda.Unknown,
};
}
return null;
}
}
@@ -0,0 +1,518 @@
export default `flf2a$ 5 5 11 -1 7 0 0 0
Font Author: ?
More Info:
https://web.archive.org/web/20120819044459/http://www.roysac.com/thedrawfonts-tdf.asp
FIGFont created with: http://patorjk.com/figfont-editor
$ $@
$ $@
$ $@
$ $@
$ $@@
▄▄ @
██▌@
▐█·@
.▀ @
▀ @@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
▀ @@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
▄▄▄· @
▐█ ▀█ @
▄█▀▀█ @
▐█ ▪▐▌@
▀ ▀ @@
▄▄▄▄· @
▐█ ▀█▪@
▐█▀▀█▄@
██▄▪▐█@
·▀▀▀▀ @@
▄▄· @
▐█ ▌▪@
██ ▄▄@
▐███▌@
·▀▀▀ @@
·▄▄▄▄ @
██▪ ██ @
▐█· ▐█▌@
██. ██ @
▀▀▀▀▀• @@
▄▄▄ .@
▀▄.▀·@
▐▀▀▪▄@
▐█▄▄▌@
▀▀▀ @@
·▄▄▄@
▐▄▄·@
██▪ @
██▌.@
▀▀▀ @@
▄▄ • @
▐█ ▀ ▪@
▄█ ▀█▄@
▐█▄▪▐█@
·▀▀▀▀ @@
▄ .▄@
██▪▐█@
██▀▐█@
██▌▐▀@
▀▀▀ ·@@
▪ @
██ @
▐█·@
▐█▌@
▀▀▀@@
▐▄▄▄@
·██@
▪▄ ██@
▐▌▐█▌@
▀▀▀•@@
▄ •▄ @
█▌▄▌▪@
▐▀▀▄·@
▐█.█▌@
·▀ ▀@@
▄▄▌ @
██• @
██▪ @
▐█▌▐▌@
.▀▀▀ @@
• ▌ ▄ ·. @
·██ ▐███▪@
▐█ ▌▐▌▐█·@
██ ██▌▐█▌@
▀▀ █▪▀▀▀@@
▐ ▄ @
•█▌▐█@
▐█▐▐▌@
██▐█▌@
▀▀ █▪@@
@
▪ @
▄█▀▄ @
▐█▌.▐▌@
▀█▄▀▪@@
▄▄▄·@
▐█ ▄█@
██▀·@
▐█▪·•@
.▀ @@
.▄▄▄ @
▐▀•▀█ @
█▌·.█▌@
▐█▪▄█·@
·▀▀█. @@
▄▄▄ @
▀▄ █·@
▐▀▀▄ @
▐█•█▌@
.▀ ▀@@
.▄▄ · @
▐█ ▀. @
▄▀▀▀█▄@
▐█▄▪▐█@
▀▀▀▀ @@
▄▄▄▄▄@
•██ @
▐█.▪@
▐█▌·@
▀▀▀ @@
▄• ▄▌@
█▪██▌@
█▌▐█▌@
▐█▄█▌@
▀▀▀ @@
▌ ▐·@
▪█·█▌@
▐█▐█•@
███ @
. ▀ @@
▄▄▌ ▐ ▄▌@
██· █▌▐█@
██▪▐█▐▐▌@
▐█▌██▐█▌@
▀▀▀▀ ▀▪@@
▐▄• ▄ @
█▌█▌▪@
·██· @
▪▐█·█▌@
•▀▀ ▀▀@@
▄· ▄▌@
▐█▪██▌@
▐█▌▐█▪@
▐█▀·.@
▀ • @@
·▄▄▄▄•@
▪▀·.█▌@
▄█▀▀▀•@
█▌▪▄█▀@
·▀▀▀ •@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
▄▄▄· @
▐█ ▀█ @
▄█▀▀█ @
▐█ ▪▐▌@
▀ ▀ @@
▄▄▄▄· @
▐█ ▀█▪@
▐█▀▀█▄@
██▄▪▐█@
·▀▀▀▀ @@
▄▄· @
▐█ ▌▪@
██ ▄▄@
▐███▌@
·▀▀▀ @@
·▄▄▄▄ @
██▪ ██ @
▐█· ▐█▌@
██. ██ @
▀▀▀▀▀• @@
▄▄▄ .@
▀▄.▀·@
▐▀▀▪▄@
▐█▄▄▌@
▀▀▀ @@
·▄▄▄@
▐▄▄·@
██▪ @
██▌.@
▀▀▀ @@
▄▄ • @
▐█ ▀ ▪@
▄█ ▀█▄@
▐█▄▪▐█@
·▀▀▀▀ @@
▄ .▄@
██▪▐█@
██▀▐█@
██▌▐▀@
▀▀▀ ·@@
▪ @
██ @
▐█·@
▐█▌@
▀▀▀@@
▐▄▄▄@
·██@
▪▄ ██@
▐▌▐█▌@
▀▀▀•@@
▄ •▄ @
█▌▄▌▪@
▐▀▀▄·@
▐█.█▌@
·▀ ▀@@
▄▄▌ @
██• @
██▪ @
▐█▌▐▌@
.▀▀▀ @@
• ▌ ▄ ·. @
·██ ▐███▪@
▐█ ▌▐▌▐█·@
██ ██▌▐█▌@
▀▀ █▪▀▀▀@@
▐ ▄ @
•█▌▐█@
▐█▐▐▌@
██▐█▌@
▀▀ █▪@@
@
▪ @
▄█▀▄ @
▐█▌.▐▌@
▀█▄▀▪@@
▄▄▄·@
▐█ ▄█@
██▀·@
▐█▪·•@
.▀ @@
.▄▄▄ @
▐▀•▀█ @
█▌·.█▌@
▐█▪▄█·@
·▀▀█. @@
▄▄▄ @
▀▄ █·@
▐▀▀▄ @
▐█•█▌@
.▀ ▀@@
.▄▄ · @
▐█ ▀. @
▄▀▀▀█▄@
▐█▄▪▐█@
▀▀▀▀ @@
▄▄▄▄▄@
•██ @
▐█.▪@
▐█▌·@
▀▀▀ @@
▄• ▄▌@
█▪██▌@
█▌▐█▌@
▐█▄█▌@
▀▀▀ @@
▌ ▐·@
▪█·█▌@
▐█▐█•@
███ @
. ▀ @@
▄▄▌ ▐ ▄▌@
██· █▌▐█@
██▪▐█▐▐▌@
▐█▌██▐█▌@
▀▀▀▀ ▀▪@@
▐▄• ▄ @
█▌█▌▪@
·██· @
▪▐█·█▌@
•▀▀ ▀▀@@
▄· ▄▌@
▐█▪██▌@
▐█▌▐█▪@
▐█▀·.@
▀ • @@
·▄▄▄▄•@
▪▀·.█▌@
▄█▀▀▀•@
█▌▪▄█▀@
·▀▀▀ •@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@
@
@
@
@
@@`
@@ -0,0 +1,26 @@
// Get the appropriate flag to use for creating files
// We use fmap on Windows platforms for files less than
// 512kb. This is a fairly low limit, but avoids making
// things slower in some cases. Since most of what this
// library is used for is extracting tarballs of many
// relatively small files in npm packages and the like,
// it can be a big boost on Windows platforms.
import fs from 'fs';
const platform = process.env.__FAKE_PLATFORM__ || process.platform;
const isWindows = platform === 'win32';
/* c8 ignore start */
const { O_CREAT, O_NOFOLLOW, O_TRUNC, O_WRONLY } = fs.constants;
const UV_FS_O_FILEMAP = Number(process.env.__FAKE_FS_O_FILENAME__) ||
fs.constants.UV_FS_O_FILEMAP ||
0;
/* c8 ignore stop */
const fMapEnabled = isWindows && !!UV_FS_O_FILEMAP;
const fMapLimit = 512 * 1024;
const fMapFlag = UV_FS_O_FILEMAP | O_TRUNC | O_CREAT | O_WRONLY;
const noFollowFlag = !isWindows && typeof O_NOFOLLOW === 'number' ?
O_NOFOLLOW | O_TRUNC | O_CREAT | O_WRONLY
: null;
export const getWriteFlag = noFollowFlag !== null ? () => noFollowFlag
: !fMapEnabled ? () => 'w'
: (size) => (size < fMapLimit ? fMapFlag : 'w');
//# sourceMappingURL=get-write-flag.js.map
@@ -0,0 +1 @@
{"version":3,"file":"backpack.js","sources":["../../../src/icons/backpack.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Backpack\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNNCAxMGE0IDQgMCAwIDEgNC00aDhhNCA0IDAgMCAxIDQgNHYxMGEyIDIgMCAwIDEtMiAySDZhMiAyIDAgMCAxLTItMnoiIC8+CiAgPHBhdGggZD0iTTggMTBoOCIgLz4KICA8cGF0aCBkPSJNOCAxOGg4IiAvPgogIDxwYXRoIGQ9Ik04IDIydi02YTIgMiAwIDAgMSAyLTJoNGEyIDIgMCAwIDEgMiAydjYiIC8+CiAgPHBhdGggZD0iTTkgNlY0YTIgMiAwIDAgMSAyLTJoMmEyIDIgMCAwIDEgMiAydjIiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/backpack\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Backpack = createLucideIcon('Backpack', [\n [\n 'path',\n { d: 'M4 10a4 4 0 0 1 4-4h8a4 4 0 0 1 4 4v10a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2z', key: '1ol0lm' },\n ],\n ['path', { d: 'M8 10h8', key: 'c7uz4u' }],\n ['path', { d: 'M8 18h8', key: '1no2b1' }],\n ['path', { d: 'M8 22v-6a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v6', key: '1fr6do' }],\n ['path', { d: 'M9 6V4a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2', key: 'donm21' }],\n]);\n\nexport default Backpack;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAW,iBAAiB,UAAY,CAAA,CAAA,CAAA;AAAA,CAC5C,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA,CAAE,CAAA,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAyE,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,QAAS,CAAA,CAAA;AAAA,CAC9F,CAAA,CAAA,CAAA;AAAA,CAAA,CACA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA4C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzE,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA0C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACzE,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,69 @@
//#region src/qss.ts
/**
* Program is a reimplementation of the `qss` package:
* Copyright (c) Luke Edwards luke.edwards05@gmail.com, MIT License
* https://github.com/lukeed/qss/blob/master/license.md
*
* This reimplementation uses modern browser APIs
* (namely URLSearchParams) and TypeScript while still
* maintaining the original functionality and interface.
*
* Update: this implementation has also been mangled to
* fit exactly our use-case (single value per key in encoding).
*/
/**
* Encodes an object into a query string.
* @param obj - The object to encode into a query string.
* @param stringify - An optional custom stringify function.
* @returns The encoded query string.
* @example
* ```
* // Example input: encode({ token: 'foo', key: 'value' })
* // Expected output: "token=foo&key=value"
* ```
*/
function encode(obj, stringify = String) {
const result = new URLSearchParams();
for (const key in obj) {
const val = obj[key];
if (val !== void 0) result.set(key, stringify(val));
}
return result.toString();
}
/**
* Converts a string value to its appropriate type (string, number, boolean).
* @param mix - The string value to convert.
* @returns The converted value.
* @example
* // Example input: toValue("123")
* // Expected output: 123
*/
function toValue(str) {
if (!str) return "";
if (str === "false") return false;
if (str === "true") return true;
return +str * 0 === 0 && +str + "" === str ? +str : str;
}
/**
* Decodes a query string into an object.
* @param str - The query string to decode.
* @returns The decoded key-value pairs in an object format.
* @example
* // Example input: decode("token=foo&key=value")
* // Expected output: { "token": "foo", "key": "value" }
*/
function decode(str) {
const searchParams = new URLSearchParams(str);
const result = Object.create(null);
for (const [key, value] of searchParams.entries()) {
const previousValue = result[key];
if (previousValue == null) result[key] = toValue(value);
else if (Array.isArray(previousValue)) previousValue.push(toValue(value));
else result[key] = [previousValue, toValue(value)];
}
return result;
}
//#endregion
export { decode, encode };
//# sourceMappingURL=qss.js.map
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"_E"},B:{"1":"_mG _OF","2":"_I","1025":"_6R"},C:{"2":"_o _kE _L","260":"_H _WC"},D:{"1":"_ZL _OF","2":"_eO","132":"_MJ _kE","1025":"_4O"},E:{"2":"_3C","772":"_PC"},F:{"1":"_fG","2":"_QS","132":"_TC _oG","1025":"_sQ"},G:{"2":"_0C","772":"_NC"},H:{"2":"1D"},I:{"1":"I","2":"_G"},J:{"2":"_B"},K:{"2":"_D","1025":"H"},L:{"1025":"I"},M:{"260":"YC"},N:{"2":"_A"},O:{"1":"bC"},P:{"1":"_9F","2":"_pC","132":"_pS mC"},Q:{"132":"JE"},R:{"1025":"KE"},S:{"2":"LE","260":"ME"}},B:7,C:"Feature Policy",D:true};
@@ -0,0 +1 @@
{"version":3,"file":"contrast.js","sources":["../../../src/icons/contrast.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Contrast\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSIxMCIgLz4KICA8cGF0aCBkPSJNMTIgMThhNiA2IDAgMCAwIDAtMTJ2MTJ6IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/contrast\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Contrast = createLucideIcon('Contrast', [\n ['circle', { cx: '12', cy: '12', r: '10', key: '1mglay' }],\n ['path', { d: 'M12 18a6 6 0 0 0 0-12v12z', key: 'j4l70d' }],\n]);\n\nexport default Contrast;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAW,iBAAiB,UAAY,CAAA,CAAA,CAAA;AAAA,CAC5C,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CAAA,CACzD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA6B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC5D,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1 @@
{"version":3,"file":"wikipedia.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
@@ -0,0 +1,4 @@
import { Constrain } from './utils.cjs';
export interface OptionalStructuralSharing<TStructuralSharing, TConstraint> {
readonly structuralSharing?: Constrain<TStructuralSharing, TConstraint> | undefined;
}
@@ -0,0 +1,103 @@
/**
* License for programmatically and manually incorporated
* documentation aka. `JSDoc` from https://github.com/nodejs/node/tree/master/doc
*
* Copyright Node.js contributors. All rights reserved.
* 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.
*/
// NOTE: These definitions support Node.js and TypeScript 5.7.
// Reference required TypeScript libraries:
/// <reference lib="es2020" />
/// <reference lib="esnext.disposable" />
// TypeScript library polyfills required for TypeScript 5.7:
/// <reference path="./compatibility/float16array.d.ts" />
// Iterator definitions required for compatibility with TypeScript <5.6:
/// <reference path="../compatibility/iterators.d.ts" />
// Definitions for Node.js modules specific to TypeScript 5.7+:
/// <reference path="../globals.typedarray.d.ts" />
/// <reference path="../buffer.buffer.d.ts" />
// Definitions for Node.js modules that are not specific to any version of TypeScript:
/// <reference path="../globals.d.ts" />
/// <reference path="../web-globals/abortcontroller.d.ts" />
/// <reference path="../web-globals/crypto.d.ts" />
/// <reference path="../web-globals/domexception.d.ts" />
/// <reference path="../web-globals/events.d.ts" />
/// <reference path="../web-globals/fetch.d.ts" />
/// <reference path="../web-globals/navigator.d.ts" />
/// <reference path="../web-globals/storage.d.ts" />
/// <reference path="../web-globals/streams.d.ts" />
/// <reference path="../assert.d.ts" />
/// <reference path="../assert/strict.d.ts" />
/// <reference path="../async_hooks.d.ts" />
/// <reference path="../buffer.d.ts" />
/// <reference path="../child_process.d.ts" />
/// <reference path="../cluster.d.ts" />
/// <reference path="../console.d.ts" />
/// <reference path="../constants.d.ts" />
/// <reference path="../crypto.d.ts" />
/// <reference path="../dgram.d.ts" />
/// <reference path="../diagnostics_channel.d.ts" />
/// <reference path="../dns.d.ts" />
/// <reference path="../dns/promises.d.ts" />
/// <reference path="../domain.d.ts" />
/// <reference path="../events.d.ts" />
/// <reference path="../fs.d.ts" />
/// <reference path="../fs/promises.d.ts" />
/// <reference path="../http.d.ts" />
/// <reference path="../http2.d.ts" />
/// <reference path="../https.d.ts" />
/// <reference path="../inspector.d.ts" />
/// <reference path="../inspector.generated.d.ts" />
/// <reference path="../module.d.ts" />
/// <reference path="../net.d.ts" />
/// <reference path="../os.d.ts" />
/// <reference path="../path.d.ts" />
/// <reference path="../perf_hooks.d.ts" />
/// <reference path="../process.d.ts" />
/// <reference path="../punycode.d.ts" />
/// <reference path="../querystring.d.ts" />
/// <reference path="../readline.d.ts" />
/// <reference path="../readline/promises.d.ts" />
/// <reference path="../repl.d.ts" />
/// <reference path="../sea.d.ts" />
/// <reference path="../sqlite.d.ts" />
/// <reference path="../stream.d.ts" />
/// <reference path="../stream/promises.d.ts" />
/// <reference path="../stream/consumers.d.ts" />
/// <reference path="../stream/web.d.ts" />
/// <reference path="../string_decoder.d.ts" />
/// <reference path="../test.d.ts" />
/// <reference path="../timers.d.ts" />
/// <reference path="../timers/promises.d.ts" />
/// <reference path="../tls.d.ts" />
/// <reference path="../trace_events.d.ts" />
/// <reference path="../tty.d.ts" />
/// <reference path="../url.d.ts" />
/// <reference path="../util.d.ts" />
/// <reference path="../v8.d.ts" />
/// <reference path="../vm.d.ts" />
/// <reference path="../wasi.d.ts" />
/// <reference path="../worker_threads.d.ts" />
/// <reference path="../zlib.d.ts" />