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,16 @@
"use strict";
// THIS CODE WAS AUTOMATICALLY GENERATED
// DO NOT EDIT THIS CODE BY HAND
// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE:
// npx nx generate-lib repo
Object.defineProperty(exports, "__esModule", { value: true });
exports.es2021_promise = void 0;
const base_config_1 = require("./base-config");
exports.es2021_promise = {
libs: [],
variables: [
['AggregateError', base_config_1.TYPE_VALUE],
['AggregateErrorConstructor', base_config_1.TYPE],
['PromiseConstructor', base_config_1.TYPE],
],
};
@@ -0,0 +1 @@
{"version":3,"file":"ajvProvider-ZaoO9afR.cjs","names":["_a","_addFormats","Ajv2020","declaredDialect","Ajv2019","Draft7Ajv"],"sources":["../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/codegen/code.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/codegen/scope.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/codegen/index.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/util.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/names.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/errors.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/boolSchema.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/rules.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/applicability.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/dataType.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/defaults.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/code.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/keyword.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/subschema.js","../../../node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js","../../../node_modules/.pnpm/json-schema-traverse@1.0.0/node_modules/json-schema-traverse/index.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/resolve.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/index.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/runtime/validation_error.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/ref_error.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/index.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/data.json","../../../node_modules/.pnpm/fast-uri@3.1.0/node_modules/fast-uri/lib/utils.js","../../../node_modules/.pnpm/fast-uri@3.1.0/node_modules/fast-uri/lib/schemes.js","../../../node_modules/.pnpm/fast-uri@3.1.0/node_modules/fast-uri/index.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/runtime/uri.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/core.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/core/id.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/core/ref.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/core/index.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitNumber.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/multipleOf.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/runtime/ucs2length.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitLength.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/pattern.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitProperties.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/required.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitItems.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/runtime/equal.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/const.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/enum.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/index.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/items.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/items2020.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/contains.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/dependencies.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/properties.js","../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/patternProperties.jLine truncated
@@ -0,0 +1 @@
{"version":3,"file":"simpleTaskInteractiveClient.js","sourceRoot":"","sources":["../../../../src/examples/client/simpleTaskInteractiveClient.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;AAEH,oDAA+C;AAC/C,sEAA+E;AAC/E,iDAAgD;AAChD,6CASwB;AAExB,2CAA2C;AAC3C,MAAM,QAAQ,GAAG,IAAA,+BAAe,EAAC;IAC7B,KAAK,EAAE,OAAO,CAAC,KAAK;IACpB,MAAM,EAAE,OAAO,CAAC,MAAM;CACzB,CAAC,CAAC;AAEH,SAAS,QAAQ,CAAC,MAAc;IAC5B,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE;QACzB,QAAQ,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE;YAC/B,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;QAC3B,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC;AAED,SAAS,cAAc,CAAC,MAA2D;IAC/E,MAAM,WAAW,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAoB,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC;IACpF,OAAO,WAAW,EAAE,IAAI,IAAI,WAAW,CAAC;AAC5C,CAAC;AAED,KAAK,UAAU,mBAAmB,CAAC,MAIlC;IACG,OAAO,CAAC,GAAG,CAAC,gCAAgC,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC;IAE9D,iCAAiC;IACjC,MAAM,QAAQ,GAAG,MAAM,QAAQ,CAAC,uBAAuB,CAAC,CAAC;IACzD,MAAM,SAAS,GAAG,CAAC,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC,CAAC;IAE7E,OAAO,CAAC,GAAG,CAAC,0CAA0C,SAAS,EAAE,CAAC,CAAC;IACnE,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jC,OAAO,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC;IAC1C,OAAO,CAAC,GAAG,CAAC,6BAA6B,CAAC,CAAC;IAE3C,MAAM,WAAW,GAAG,MAAM,CAAC,YAAY,CAAC,KAAK,CAAC,cAAc,CACxD,EAAE,IAAI,EAAE,aAAa,EAAE,SAAS,EAAE,EAAE,KAAK,EAAE,eAAe,EAAE,EAAE,EAC9D,+BAAoB,EACpB;QACI,IAAI,EAAE,EAAE,GAAG,EAAE,KAAK,EAAE;KACvB,CACJ,CAAC;IAEF,IAAI,KAAK,EAAE,MAAM,OAAO,IAAI,WAAW,EAAE,CAAC;QACtC,QAAQ,OAAO,CAAC,IAAI,EAAE,CAAC;YACnB,KAAK,aAAa;gBACd,OAAO,CAAC,GAAG,CAAC,iBAAiB,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;gBACpD,MAAM;YACV,KAAK,YAAY;gBACb,OAAO,CAAC,GAAG,CAAC,gBAAgB,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;gBACnD,MAAM;YACV,KAAK,QAAQ;gBACT,OAAO,CAAC,GAAG,CAAC,YAAY,cAAc,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;gBAC1D,MAAM;YACV,KAAK,OAAO;gBACR,OAAO,CAAC,KAAK,CAAC,UAAU,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC;gBACzC,MAAM;QACd,CAAC;IACL,CAACLine truncated
@@ -0,0 +1 @@
{"version":3,"file":"decode-data-xml.js","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["generated/decode-data-xml.ts"],"names":[],"mappings":";AAAA,8CAA8C;;AAE9C,kBAAe,IAAI,WAAW;AAC1B,kBAAkB;AAClB,uFAAuF;KAClF,KAAK,CAAC,EAAE,CAAC;KACT,GAAG,CAAC,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,EAAf,CAAe,CAAC,CACnC,CAAC"}
@@ -0,0 +1,132 @@
tlf2a 1 1 3 -1 15 0 0 0
===============================================================================
This is wideterm.tlf, or “WideTerm”, by Sam Hocevar <sam@hocevar.net>. It was
created on August 2nd, 2007.
This font is free software. It comes without any warranty, to the extent
permitted by applicable law. You can redistribute it and/or modify it under
the terms of the Do What The Fuck You Want To Public License, Version 2,
as published by Sam Hocevar. See http://sam.zoy.org/wtfpl/COPYING for more
details.
Missing: Ä Ö Ü ä ö ü ß
This font is part of TOIlet’s official distribution. More information
on the TOIlet website at http://caca.zoy.org/wiki/toilet
===============================================================================
@
!!
""
##
$$
%%
&&
''
((
))
**
++
,,
--
..
//
00
11
22
33
44
55
66
77
88
99
::
;;
<<
==
>>
??
@@
AA
BB
CC
DD
EE
FF
GG
HH
II
JJ
KK
LL
MM
NN
OO
PP
QQ
RR
SS
TT
UU
VV
WW
XX
YY
ZZ
[[
\\
]]
^^
__
``
aa
bb
cc
dd
ee
ff
gg
hh
ii
jj
kk
ll
mm
nn
oo
pp
qq
rr
ss
tt
uu
vv
ww
xx
yy
zz
{{
||
}}
~~
Ä@
Ö@
Ü@
ä@
ö@
ü@
ß@
0x00a2 ¢ CENT SIGN
¢@
0x00a3 £ POUND SIGN
£@
0x00ac ¬ NOT SIGN
¬@
0x00af ¯ MACRON
 ̄@
0x00a6 ¦ BROKEN BAR
¦@
0x00a5 ¥ YEN SIGN
¥@
0x20a9 ₩ WON SIGN
₩@
@@ -0,0 +1,100 @@
export const elementNames = new Map([
"altGlyph",
"altGlyphDef",
"altGlyphItem",
"animateColor",
"animateMotion",
"animateTransform",
"clipPath",
"feBlend",
"feColorMatrix",
"feComponentTransfer",
"feComposite",
"feConvolveMatrix",
"feDiffuseLighting",
"feDisplacementMap",
"feDistantLight",
"feDropShadow",
"feFlood",
"feFuncA",
"feFuncB",
"feFuncG",
"feFuncR",
"feGaussianBlur",
"feImage",
"feMerge",
"feMergeNode",
"feMorphology",
"feOffset",
"fePointLight",
"feSpecularLighting",
"feSpotLight",
"feTile",
"feTurbulence",
"foreignObject",
"glyphRef",
"linearGradient",
"radialGradient",
"textPath",
].map((val) => [val.toLowerCase(), val]));
export const attributeNames = new Map([
"definitionURL",
"attributeName",
"attributeType",
"baseFrequency",
"baseProfile",
"calcMode",
"clipPathUnits",
"diffuseConstant",
"edgeMode",
"filterUnits",
"glyphRef",
"gradientTransform",
"gradientUnits",
"kernelMatrix",
"kernelUnitLength",
"keyPoints",
"keySplines",
"keyTimes",
"lengthAdjust",
"limitingConeAngle",
"markerHeight",
"markerUnits",
"markerWidth",
"maskContentUnits",
"maskUnits",
"numOctaves",
"pathLength",
"patternContentUnits",
"patternTransform",
"patternUnits",
"pointsAtX",
"pointsAtY",
"pointsAtZ",
"preserveAlpha",
"preserveAspectRatio",
"primitiveUnits",
"refX",
"refY",
"repeatCount",
"repeatDur",
"requiredExtensions",
"requiredFeatures",
"specularConstant",
"specularExponent",
"spreadMethod",
"startOffset",
"stdDeviation",
"stitchTiles",
"surfaceScale",
"systemLanguage",
"tableValues",
"targetX",
"targetY",
"textLength",
"viewBox",
"viewTarget",
"xChannelSelector",
"yChannelSelector",
"zoomAndPan",
].map((val) => [val.toLowerCase(), val]));
@@ -0,0 +1,321 @@
/**
* gridstack-engine.ts 12.6.0
* Copyright (c) 2021-2025 Alain Dumesny - see GridStack root license
*/
import { GridStackNode, GridStackPosition, GridStackMoveOpts, SaveFcn, CompactOptions } from './types';
/** callback to update the DOM attributes since this class is generic (no HTML or other info) for items that changed - see _notify() */
type OnChangeCB = (nodes: GridStackNode[]) => void;
/** options used during creation - similar to GridStackOptions */
export interface GridStackEngineOptions {
column?: number;
maxRow?: number;
float?: boolean;
nodes?: GridStackNode[];
onChange?: OnChangeCB;
}
/**
* Defines the GridStack engine that handles all grid layout calculations and node positioning.
* This is the core engine that performs grid manipulation without any DOM operations.
*
* The engine manages:
* - Node positioning and collision detection
* - Layout algorithms (compact, float, etc.)
* - Grid resizing and column changes
* - Widget movement and resizing logic
*
* NOTE: Values should not be modified directly - use the main GridStack API instead
* to ensure proper DOM updates and event triggers.
*/
export declare class GridStackEngine {
column: number;
maxRow: number;
nodes: GridStackNode[];
addedNodes: GridStackNode[];
removedNodes: GridStackNode[];
batchMode: boolean;
defaultColumn: number;
/** true when grid.load() already cached the layout and can skip out of bound caching info */
skipCacheUpdate?: boolean;
constructor(opts?: GridStackEngineOptions);
/**
* Enable/disable batch mode for multiple operations to optimize performance.
* When enabled, layout updates are deferred until batch mode is disabled.
*
* @param flag true to enable batch mode, false to disable and apply changes
* @param doPack if true (default), pack/compact nodes when disabling batch mode
* @returns the engine instance for chaining
*
* @example
* // Start batch mode for multiple operations
* engine.batchUpdate(true);
* engine.addNode(node1);
* engine.addNode(node2);
* engine.batchUpdate(false); // Apply all changes at once
*/
batchUpdate(flag?: boolean, doPack?: boolean): GridStackEngine;
protected _useEntireRowArea(node: GridStackNode, nn: GridStackPosition): boolean;
/**
* Return the first node that intercepts/collides with the given node or area.
* Used for collision detection during drag and drop operations.
*
* @param skip the node to skip in collision detection (usually the node being moved)
* @param area the area to check for collisions (defaults to skip node's area)
* @param skip2 optional second node to skip in collision detection
* @returns the first colliding node, or undefined if no collision
*
* @example
* const colliding = engine.collide(draggedNode, {x: 2, y: 1, w: 2, h: 1});
* if (colliding) {
* console.log('Would collide with:', colliding.id);
* }
*/
collide(skip: GridStackNode, area?: GridStackNode, skip2?: GridStackNode): GridStackNode | undefined;
/**
* Return all nodes that intercept/collide with the given node or area.
* Similar to collide() but returns all colliding nodes instead of just the first.
*
* @param skip the node to skip in collision detection
* @param area the area to check for collisions (defaults to skip node's area)
* @param skip2 optional second node to skip in collision detection
* @returns array of all colliding nodes
*
* @example
* const allCollisions = engine.collideAll(draggedNode);
* console.log('Colliding with', allCollisions.length, 'nodes');
*/
collideAll(skip: GridStackNode, area?: GridStackNode, skip2?: GridStackNode): GridStackNode[];
/** does a pixel coverage collision based on where we started, returning the node that has the most coverage that is >50% mid line */
protected directionCollideCoverage(node: GridStackNode, o: GridStackMoveOpts, collides: GridStackNode[]): GridStackNode | undefined;
/**
* Attempt to swap the positions of two nodes if they meet swapping criteria.
* Nodes can swap if they are the same size or in the same column/row, not locked, and touching.
*
* @param a first node to swap
* @param b second node to swap
* @returns true if swap was successful, false if not possible, undefined if not applicable
*
* @example
* const swapped = engine.swap(nodeA, nodeB);
* if (swapped) {
* console.log('Nodes swapped successfully');
* }
*/
swap(a: GridStackNode, b: GridStackNode): boolean | undefined;
/**
* Check if the specified rectangular area is empty (no nodes occupy any part of it).
*
* @param x the x coordinate (column) of the area to check
* @param y the y coordinate (row) of the area to check
* @param w the width in columns of the area to check
* @param h the height in rows of the area to check
* @returns true if the area is completely empty, false if any node overlaps
*
* @example
* if (engine.isAreaEmpty(2, 1, 3, 2)) {
* console.log('Area is available for placement');
* }
*/
isAreaEmpty(x: number, y: number, w: number, h: number): boolean;
/**
* Re-layout grid items to reclaim any empty space.
* This optimizes the grid layout by moving items to fill gaps.
*
* @param layout layout algorithm to use:
* - 'compact' (default): find truly empty spaces, may reorder items
* - 'list': keep the sort order exactly the same, move items up sequentially
* @param doSort if true (default), sort nodes by position before compacting
* @returns the engine instance for chaining
*
* @example
* // Compact to fill empty spaces
* engine.compact();
*
* // Compact preserving item order
* engine.compact('list');
*/
compact(layout?: CompactOptions, doSort?: boolean): GridStackEngine;
/**
* Enable/disable floating widgets (default: `false`).
* When floating is enabled, widgets can move up to fill empty spaces.
* See [example](http://gridstackjs.com/demo/float.html)
*
* @param val true to enable floating, false to disable
*
* @example
* engine.float = true; // Enable floating
* engine.float = false; // Disable floating (default)
*/
set float(val: boolean);
/**
* Get the current floating mode setting.
*
* @returns true if floating is enabled, false otherwise
*
* @example
* const isFloating = engine.float;
* console.log('Floating enabled:', isFloating);
*/
get float(): boolean;
/**
* Sort the nodes array from first to last, or reverse.
* This is called during collision/placement operations to enforce a specific order.
*
* @param dir sort direction: 1 for ascending (first to last), -1 for descending (last to first)
* @returns the engine instance for chaining
*
* @example
* engine.sortNodes(); // Sort ascending (default)
* engine.sortNodes(-1); // Sort descending
*/
sortNodes(dir?: 1 | -1): GridStackEngine;
/**
* Prepare and validate a node's coordinates and values for the current grid.
* This ensures the node has valid position, size, and properties before being added to the grid.
*
* @param node the node to prepare and validate
* @param resizing if true, resize the node down if it's out of bounds; if false, move it to fit
* @returns the prepared node with valid coordinates
*
* @example
* const node = { w: 3, h: 2, content: 'Hello' };
* const prepared = engine.prepareNode(node);
* console.log('Node prepared at:', prepared.x, prepared.y);
*/
prepareNode(node: GridStackNode, resizing?: boolean): GridStackNode;
/**
* Part 2 of preparing a node to fit inside the grid - validates and fixes coordinates and dimensions.
* This ensures the node fits within grid boundaries and respects min/max constraints.
*
* @param node the node to validate and fix
* @param resizing if true, resize the node to fit; if false, move the node to fit
* @returns the engine instance for chaining
*
* @example
* // Fix a node that might be out of bounds
* engine.nodeBoundFix(node, true); // Resize to fit
* engine.nodeBoundFix(node, false); // Move to fit
*/
nodeBoundFix(node: GridStackNode, resizing?: boolean): GridStackEngine;
/**
* Returns a list of nodes that have been modified from their original values.
* This is used to track which nodes need DOM updates.
*
* @param verify if true, performs additional verification by comparing current vs original positions
* @returns array of nodes that have been modified
*
* @example
* const changed = engine.getDirtyNodes();
* console.log('Modified nodes:', changed.length);
*
* // Get verified dirty nodes
* const verified = engine.getDirtyNodes(true);
*/
getDirtyNodes(verify?: boolean): GridStackNode[];
/**
* Find the first available empty spot for the given node dimensions.
* Updates the node's x,y attributes with the found position.
*
* @param node the node to find a position for (w,h must be set)
* @param nodeList optional list of nodes to check against (defaults to engine nodes)
* @param column optional column count (defaults to engine column count)
* @param after optional node to start search after (maintains order)
* @returns true if an empty position was found and node was updated
*
* @example
* const node = { w: 2, h: 1 };
* if (engine.findEmptyPosition(node)) {
* console.log('Found position at:', node.x, node.y);
* }
*/
findEmptyPosition(node: GridStackNode, nodeList?: GridStackNode[], column?: number, after?: GridStackNode): boolean;
/**
* Add the given node to the grid, handling collision detection and re-packing.
* This is the main method for adding new widgets to the engine.
*
* @param node the node to add to the grid
* @param triggerAddEvent if true, adds node to addedNodes list for event triggering
* @param after optional node to place this node after (for ordering)
* @returns the added node (or existing node if duplicate)
*
* @example
* const node = { x: 0, y: 0, w: 2, h: 1, content: 'Hello' };
* const added = engine.addNode(node, true);
*/
addNode(node: GridStackNode, triggerAddEvent?: boolean, after?: GridStackNode): GridStackNode;
/**
* Remove the given node from the grid.
*
* @param node the node to remove
* @param removeDOM if true (default), marks node for DOM removal
* @param triggerEvent if true, adds node to removedNodes list for event triggering
* @returns the engine instance for chaining
*
* @example
* engine.removeNode(node, true, true);
*/
removeNode(node: GridStackNode, removeDOM?: boolean, triggerEvent?: boolean): GridStackEngine;
/**
* Remove all nodes from the grid.
*
* @param removeDOM if true (default), marks all nodes for DOM removal
* @param triggerEvent if true (default), triggers removal events
* @returns the engine instance for chaining
*
* @example
* engine.removeAll(); // Remove all nodes
*/
removeAll(removeDOM?: boolean, triggerEvent?: boolean): GridStackEngine;
/**
* Check if a node can be moved to a new position, considering layout constraints.
* This is a safer version of moveNode() that validates the move first.
*
* For complex cases (like maxRow constraints), it simulates the move in a clone first,
* then applies the changes only if they meet all specifications.
*
* @param node the node to move
* @param o move options including target position
* @returns true if the node was successfully moved
*
* @example
* const canMove = engine.moveNodeCheck(node, { x: 2, y: 1 });
* if (canMove) {
* console.log('Node moved successfully');
* }
*/
moveNodeCheck(node: GridStackNode, o: GridStackMoveOpts): boolean;
/** return true if can fit in grid height constrain only (always true if no maxRow) */
willItFit(node: GridStackNode): boolean;
/** true if x,y or w,h are different after clamping to min/max */
changedPosConstrain(node: GridStackNode, p: GridStackPosition): boolean;
/** return true if the passed in node was actually moved (checks for no-op and locked) */
moveNode(node: GridStackNode, o: GridStackMoveOpts): boolean;
getRow(): number;
beginUpdate(node: GridStackNode): GridStackEngine;
endUpdate(): GridStackEngine;
/** saves a copy of the largest column layout (eg 12 even when rendering 1 column) so we don't loose orig layout, unless explicity column
* count to use is given. returning a list of widgets for serialization
* @param saveElement if true (default), the element will be saved to GridStackWidget.el field, else it will be removed.
* @param saveCB callback for each node -> widget, so application can insert additional data to be saved into the widget data structure.
* @param column if provided, the grid will be saved for the given column count (IFF we have matching internal saved layout, or current layout).
* Note: nested grids will ALWAYS save the container w to match overall layouts (parent + child) to be consistent.
*/
save(saveElement?: boolean, saveCB?: SaveFcn, column?: number): GridStackNode[];
/**
* call to cache the given layout internally to the given location so we can restore back when column changes size
* @param nodes list of nodes
* @param column corresponding column index to save it under
* @param clear if true, will force other caches to be removed (default false)
*/
cacheLayout(nodes: GridStackNode[], column: number, clear?: boolean): GridStackEngine;
/**
* call to cache the given node layout internally to the given location so we can restore back when column changes size
* @param node single node to cache
* @param column corresponding column index to save it under
*/
cacheOneLayout(n: GridStackNode, column: number): GridStackEngine;
protected findCacheLayout(n: GridStackNode, column: number): number | undefined;
removeNodeFromLayoutCache(n: GridStackNode): void;
/** called to remove all internal values but the _id */
cleanupNode(node: GridStackNode): GridStackEngine;
}
export {};
@@ -0,0 +1,3 @@
export { AST_NODE_TYPES, AST_TOKEN_TYPES, TSESTree, } from '@typescript-eslint/types';
export type { NodeWithParent } from '@typescript-eslint/types';
export type { ParserServices, ParserServicesWithoutTypeInformation, ParserServicesWithTypeInformation, } from '@typescript-eslint/typescript-estree';
@@ -0,0 +1,12 @@
"use strict";
// on windows, either \ or / are valid directory separators.
// on unix, \ is a valid character in filenames.
// so, on windows, and only on windows, we replace all \ chars with /,
// so that we can use / as our one and only directory separator char.
Object.defineProperty(exports, "__esModule", { value: true });
exports.normalizeWindowsPath = void 0;
const platform = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
exports.normalizeWindowsPath = platform !== 'win32' ?
(p) => String(p)
: (p) => String(p).replaceAll(/\\/g, '/');
//# sourceMappingURL=normalize-windows-path.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 ChartSpline = createLucideIcon("ChartSpline", [
["path", { d: "M3 3v16a2 2 0 0 0 2 2h16", key: "c24i48" }],
["path", { d: "M7 16c.5-2 1.5-7 4-7 2 0 2 3 4 3 2.5 0 4.5-5 5-7", key: "lw07rv" }]
]);
export { ChartSpline as default };
//# sourceMappingURL=chart-spline.js.map
@@ -0,0 +1,459 @@
tlf2a 3 3 8 -1 24 0 0 0
===============================================================================
This is "Future Thin" (Future Thin.flf), based on "Future" (future.tlf) by Sam Hocevar. This variant uses light box drawing characters for a thinner look.
2006/10/01 -- Sam Hocevar <sam@hocevar.net>
font creation
still missing: # % ( ) * / < > \ ^ ~
2006/10/02 -- Sam Hocevar <sam@hocevar.net>
added Unicode block and line glyphs
added: % ( ) * / \ ~
fixed: & 2 5 X
2026/02/19 -- John Goodliff <johng.io>
replaced heavy box drawings with light box drawings
This font is free software. It comes without any warranty, to the extent
permitted by applicable law. You can redistribute it and/or modify it under
the terms of the Do What The Fuck You Want To Public License, Version 2,
as published by Sam Hocevar. See http://sam.zoy.org/wtfpl/COPYING for more
details.
Missing characters: # < > ^
This font is part of TOIlet’s official distribution. More information
on the TOIlet website at http://caca.zoy.org/wiki/toilet
===============================================================================
@
@
@@
╷!
╵!
╵!!
╷╷"
"
""
@
@
#@@
┌┬┐$
└┼┐$
└┴┘$$
┌┐╷%
┌─┘%
╵└┘%%
┌┐ &
│╶┼╴&
└─┘ &&
╷'
'
''
┌╴(
│ (
└╴((
╶┐)
│)
╶┘))
╷ ╷*
╶┼╴*
╵ ╵**
╷ +
╶┼╴+
╵ ++
,
,
┘,,
-
╶─╴-
--
.
.
╵..
╷/
┌┘/
╵ //
┌─┐0
│││0
└─┘00
╶┐ 1
│ 1
╶┴╴11
┌─┐2
┌─┘2
└─╴22
┌─┐3
╶─┤3
└─┘33
╷ ╷4
└─┤4
╵44
┌─╴5
└─┐5
└─┘55
┌─┐6
├─┐6
└─┘66
┌─┐7
│7
╵77
┌─┐8
├─┤8
└─┘88
┌─┐9
└─┤9
└─┘99
:
╵:
╵::
;
╵;
┘;;
@
@
<@@
=
╶─╴=
╶─╴==
@
@
>@@
┌─┐?
╶┘?
╵ ??
┌─┐@
│├┘@
└─╴@@
┌─┐A
├─┤A
╵ ╵AA
┌┐ B
├┴┐B
└─┘BB
┌─╴C
│ C
└─╴CC
╶┬┐D
││D
╶┴┘DD
┌─╴E
├╴ E
└─╴EE
┌─╴F
├╴ F
╵ FF
┌─╴G
│╶┐G
└─┘GG
╷ ╷H
├─┤H
╵ ╵HH
╷I
│I
╵II
┌┐J
│J
└─┘JJ
╷┌ K
├┴┐K
╵ ╵KK
╷ L
│ L
└─╴LL
┌┬┐M
│││M
╵ ╵MM
┌┐╷N
│└┤N
╵ ╵NN
┌─┐O
│ │O
└─┘OO
┌─┐P
├─┘P
╵ PP
┌─┐Q
│┐│Q
└┴┘QQ
┌─┐R
├┬┘R
╵└╴RR
┌─┐S
└─┐S
└─┘SS
╶┬╴T
│ T
╵ TT
╷ ╷U
│ │U
└─┘UU
╷ ╷V
│┌┘V
└┘ VV
╷ ╷W
│╷│W
└┴┘WW
╷ ╷X
┌┼┘X
╵ ╵XX
╷ ╷Y
└┬┘Y
╵ YY
╶─┐Z
┌─┘Z
└─╴ZZ
┌─ [
│ [
└─ [[
╷ \
└┐\
╵\\
─┐]
│]
─┘]]
@
@
^@@
_
_
╶─╴__
┐`
`
``
┌─┐a
├─┤a
╵ ╵aa
┌┐ b
├┴┐b
└─┘bb
┌─╴c
│ c
└─╴cc
╶┬┐d
││d
╶┴┘dd
┌─╴e
├╴ e
└─╴ee
┌─╴f
├╴ f
╵ ff
┌─╴g
│╶┐g
└─┘gg
╷ ╷h
├─┤h
╵ ╵hh
╷i
│i
╵ii
┌┐j
│j
└─┘jj
╷┌ k
├┴┐k
╵ ╵kk
╷ l
│ l
└─╴ll
┌┬┐m
│││m
╵ ╵mm
┌┐╷n
│└┤n
╵ ╵nn
┌─┐o
│ │o
└─┘oo
┌─┐p
├─┘p
╵ pp
┌─┐q
│┐│q
└┴┘qq
┌─┐r
├┬┘r
╵└╴rr
┌─┐s
└─┐s
└─┘ss
╶┬╴t
│ t
╵ tt
╷ ╷u
│ │u
└─┘uu
╷ ╷v
│┌┘v
└┘ vv
╷ ╷w
│╷│w
└┴┘ww
╷ ╷x
┌┼┘x
╵ ╵xx
╷ ╷y
└┬┘y
╵ yy
╶─┐z
┌─┘z
└─╴zz
┌╴{
╶┤ {
└╴{{
╷|
│|
╵||
╶┐ }
├╴}
╶┘ }}
~
┌─┘~
~~
┌─┐┌─╴Ä
├─┤├╴ Ä
╵ ╵└─╴ÄÄ
┌─┐┌─╴Ö
│ │├╴ Ö
└─┘└─╴ÖÖ
╷ ╷┌─╴Ü
│ │├╴ Ü
└─┘└─╴ÜÜ
┌─┐┌─╴ä
├─┤├╴ ä
╵ ╵└─╴ää
┌─┐┌─╴ö
│ │├╴ ö
└─┘└─╴öö
╷ ╷┌─╴ü
│ │├╴ ü
└─┘└─╴üü
┌─┐┌─┐ß
└─┐└─┐ß
└─┘└─┘ßß
0x2500 ─ BOX DRAWINGS LIGHT HORIZONTAL
@
───@
@@
0x2501 ━ BOX DRAWINGS HEAVY HORIZONTAL
@
■■■@
@@
0x2502 │ BOX DRAWINGS LIGHT VERTICAL
│ @
│ @
│@@
0x2503 ┃ BOX DRAWINGS HEAVY VERTICAL
█ @
█ @
█@@
0x250C ┌ BOX DRAWINGS LIGHT DOWN AND RIGHT
@
┌─@
│ @@
0x250F ┏ BOX DRAWINGS HEAVY DOWN AND RIGHT
@
▄■@
█ @@
0x2510 ┐ BOX DRAWINGS LIGHT DOWN AND LEFT
@
─┐ @
│@@
0x2513 ┓ BOX DRAWINGS HEAVY DOWN AND LEFT
@
■▄ @
█@@
0x2514 └ BOX DRAWINGS LIGHT UP AND RIGHT
│ @
└─@
@@
0x2517 ┗ BOX DRAWINGS HEAVY UP AND RIGHT
█ @
▀■@
@@
0x2518 ┘ BOX DRAWINGS LIGHT UP AND LEFT
│ @
─┘ @
@@
0x251B ┛ BOX DRAWINGS HEAVY UP AND LEFT
█ @
■▀ @
@@
0x251c ├ BOX DRAWINGS LIGHT VERTICAL AND RIGHT
│ @
├─@
│ @@
0x2523 ┣ BOX DRAWINGS HEAVY VERTICAL AND RIGHT
█ @
█■@
█ @@
0x2524 ┤ BOX DRAWINGS LIGHT VERTICAL AND LEFT
│ @
─┤ @
│@@
0x252B ┫ BOX DRAWINGS HEAVY VERTICAL AND LEFT
█ @
■█ @
█@@
0x252c ┬ BOX DRAWINGS LIGHT DOWN AND HORIZONTAL
@
─┬─@
│ @@
0x2533 ┳ BOX DRAWINGS HEAVY DOWN AND HORIZONTAL
@
■▄■@
█ @@
0x2534 ┴ BOX DRAWINGS LIGHT UP AND HORIZONTAL
│ @
─┴─@
@@
0x253B ┻ BOX DRAWINGS HEAVY UP AND HORIZONTAL
█ @
■▀■@
@@
0x253c ┼ BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL
│ @
─┼─@
│ @@
0x254B ╋ BOX DRAWINGS HEAVY VERTICAL AND HORIZONTAL
█ @
■█■@
█ @@
0x2578 ╸ BOX DRAWINGS HEAVY LEFT
@
■■ @
@@
0x2579 ╹ BOX DRAWINGS HEAVY UP
█ @
▀ @
@@
0x257A ╺ BOX DRAWINGS HEAVY RIGHT
@
■■@
@@
0x257B ╻ BOX DRAWINGS HEAVY DOWN
@
▄ @
█@@
0x2580 ▀ UPPER HALF BLOCK
███@
▀▀▀@
@@
0x2584 ▄ LOWER HALF BLOCK
@
▄▄▄@
███@
0x2588 █ FULL BLOCK
███@
███@
███@@
0x25A0 ■ BLACK SQUARE
▄▄▄@
███@
▀▀▀@@
0x5350 卐 CJK UNIFIED IDEOGRAPH-5350
╷┌╴@
└┼┐@
╶┘╵@@
0x534D 卍 CJK UNIFIED IDEOGRAPH-534D
╶┐╷@
┌┼┘@
╵└╴@@
@@ -0,0 +1,617 @@
flf2a$ 6 6 20 15 4
5lineobl.flf 11/94 pk6811s@acad.drake.edu, updated 1/95 syb3@ABER.AC.UK
Definitely a 5-line font.
Changes: 6/2001 Markus Gebhard markus@jave.de
Removed topmost line. It IS a 6 line font! Baseline is 6.
$$@
$$@
$$@
$$@
$$@
$$@@
$ @
$//$@
$//$ @
$//$ @
$ $ @
//$ @@
@
$| |$@
$$$ @
$$$ @
$$$ @
$$$ @@
@
$ __/__/_$@
$__/__/_$ @
$ / / $ @
@
@@
@
__//_ @
( // )$@
\\ @
(__//_)$ @
// @@
@
() //$@
// @
// @
// ()$@
@@
@
(( ))$@
\\ // @
$/\\/ $ @
// \\ @
((___\\$ @@
$$ @
$//$@
$$ @
$ @
$ @
@@
@
_ $@
// $ @
// $ @
// $ @
(( $ @@
@
))$@
//$ @
//$ @
//$ @
//$ @@
@
$ @
@
$_\\/_$@
$ //\$ @
$ @@
@
@
$ $@
$_||_$@
$ || $@
$ $@@
@
$$ @
@
@
$$ @
$//$@@
$$$$ @
$$$$ @
$$$$ @
____ $@
$$$$ @
$$$$ @@
@
$ @
$ @
@
$$ @
() @@
@
@
//$@
// @
// @
//$ @@
@
___ @
// ) )$@
// / / @
// / / @
((___/ /$ @@
@
@
/_ /$ @
/ / @
/ / @
/ /$ @@
@
___ @
// ) )$@
___/ / @
/ ____/ @
/ /____$ @@
@
___ @
// ) )$@
__ / / @
) ) @
((___/ /$ @@
@
$@
//___/ / @
/____ / @
/ / @
/ /$ @@
@
____ $@
// @
//__ @
) ) @
((___/ /$ @@
@
____$ @
// @
//__ @
// ) ) @
((___/ /$ @@
@
___ $ @
// / / @
/ / @
/ / @
/ /$ @@
@
__ @
// ) )$@
((_ / / @
// ) ) @
((__/ /$ @@
@
___ @
// / /$ @
((___/ / @
/ / @
/ /$ @@
@
@
@
()$@
()$ @
@@
@
@
@
()$@
@
//$ @@
@
$$ @
//$@
<< @
\\$@
$$ @@
$ $@
$ $@
$ ___$@
$/__/$@
$/__/$@
$ $@@
@
$$ @
\\ $@
>>$@
// $@
$$ @@
@
__ @
(( ) )$@
/ / @
( / @
()$ @@
@
__ $ @
// ) )$ @
// / / $ @
\\ () ) )$@
\\__/ /$ @@
@
// | |$@
//__| | @
/ ___ | @
// | | @
// | |$@@
@
// ) )$@
//___/ / @
/ __ ( @
// ) ) @
//____/ /$ @@
@
// ) )$@
// @
// @
// @
((____/ /$ @@
@
// ) )$@
// / / @
// / / @
// / / @
//____/ /$ @@
@
// / /$@
//____ @
/ ____ @
// @
//____/ /$ @@
@
// / /$@
//___$ @
/ ___ $ @
// @
// @@
@
// ) )$@
// @
// ____$ @
// / / @
((____/ /$ @@
@
// / /$@
//___ / / @
/ ___ / @
// / / @
// / /$ @@
___ ___$@
/ / @
/ / @
/ / @
/ / @
__/ /___$ @@
@
/ /$@
/ / @
/ / @
/ / @
$((___/ /$ @@
@
// / /$@
//__ / / @
//__ /$ @
// \ \ @
// \ \$ @@
@
/ / $ @
/ / @
/ / @
/ / @
/ /____/ /$@@
@
/| //| |$@
//| // | | @
// | // | | @
// | // | | @
// |// | |$@@
@
/| / /$@
//| / / @
// | / / @
// | / / @
// |/ /$ @@
@
// ) )$@
// / / @
// / / @
// / / @
((___/ /$ @@
@
// ) )$@
//___/ / @
/ ____ /$ @
// @
// @@
@
// ) )$@
// / / @
// / / @
// \ \ / @
((____\ \$ @@
@
// ) )$@
//___/ / @
/ ___ ( $ @
// | | @
// | |$ @@
@
// ) )$@
(( @
\\ @
) )$ @
((___ / / @@
@
/__ ___/$@
/ / @
/ / @
/ / @
/ / $ @@
@
// / /$@
// / / @
// / / @
// / / @
((___/ /$ @@
@
|| / /$@
|| / / @
|| / / @
||/ / @
| /$ @@
@
|| / | / /$@
|| / | / / @
|| / /||/ / @
||/ / | / @
| / | /$ @@
@
\\ / /$@
\ / @
/ / @
/ /\\ @
/ / \\$@@
@
\\ / /$@
\\ / / @
\\/ / @
/ / @
/ /$ @@
$___ $@
$ / /$@
/ / @
/ / @
$/ / @
/ /___$ @@
@
__$@
/ / @
/ / @
/ / @
/ /__$ @@
@
$ @
\\ $ @
\\ $ @
\\$ @
\\$@@
@
$___ $@
/ /$@
$/ /$ @
/ /$ @
__/ /$ @@
$@
/ |$@
//| |$@
$@
@
$ @@
$$$$$ @
$$$$$ @
$$$$$ @
$$$$$ @
$$$$$ @
_____$@@
$$ @
$@
\\$@
$@
@
$$ @@
@
@
___ @
// ) )$@
// / / @
((___( ($ @@
@
@
/ __ @
// ) )$@
// / / @
((___/ /$ @@
@
@
___ @
// ) )$@
// @
((____$ @@
@
$@
___ /$ @
// ) /$ @
// / /$ @
((___/ /$ @@
@
@
___ @
//___) )$@
// @
((____$ @@
@
// ) )$@
__//__ $ @
// $ @
// $ @
// $ @@
@
@
___ @
// ) )$@
((___/ / @
//__ $ @@
@
@
/ __ @
// ) )$@
// / / @
// / /$ @@
@
@
( )$ @
/ /$ @
/ / @
/ /$ @@
@
@
( )$ @
/ /$ @
/ / @
(( / /$ @@
@
@
/ ___$ @
//\ \ @
// \ \ @
// \ \$@@
@
$@
//$ @
//$ @
//$ @
//$ @@
@
@
_ __ @
// ) ) ) )$@
// / / / / @
// / / / /$ @@
@
@
__ @
// ) )$@
// / / @
// / /$ @@
@
@
___ @
// ) )$@
// / / @
((___/ /$ @@
@
@
___ @
// ) )$@
//___/ / @
// $ @@
@
@
___ @
// ) )$@
((___/ / @
( ($ @@
@
@
__ @
// ) )$@
// @
// $ @@
@
@
___ @
(( ) )$@
\ \ @
// ) )$ @@
@
@
__ ___$@
$/ / $ @
/ / @
/ / $ @@
@
@
@
// / /$@
// / / @
((___( ($ @@
@
@
@
|| / /$@
|| / / @
||/ /$ @@
@
@
@
// / / / /$@
// / / / / @
((__( (__/ /$ @@
@
@
@
\\ / /$@
\/ / @
/ /\$ @@
@
@
@
// / /$@
((___/ / @
/ /$ @@
@
@
$___ @
$ / /$ @
/ / @
/ /__$ @@
@
_$@
// $@
<< $ @
// $ @
((_$ @@
$@
$@
||$@
||$@
||$@
||$@@
@
_ $@
))$@
//$ @
>>$ @
// $ @@
@
_ _$@
// \ \_// $@
$$$ @
$$$ @
@@
_ _ @
@
// | |$@
//__| | @
/ ___ | @
// | |$@@
_ _ @
___ @
// ) )$@
// / / @
// / / @
((___/ /$ @@
_ _ @
@
// / /$@
// / / @
// / / @
((___/ /$ @@
@
_ _ @
___ @
// ) )$@
// / / @
((___( ($ @@
@
_ _ @
___ @
// ) )$@
// / / @
((___/ /$ @@
@
_ _ @
@
// / /$@
// / / @
((___/ /$ @@
@
// ) )$@
//__ / /$ @
/ __ ( @
//___ ) )$ @
// $ @@
@@ -0,0 +1,727 @@
flf2a$ 7 5 12 -1 12
Tinker-toy by Wendell Hicken 11/93 (whicken@parasoft.com)
Explanation of first line:
flf2 - "magic number" for file identification
a - should always be `a', for now
$ - the "hardblank" -- prints as a blank, but can't be smushed
7 - height of a character
5 - height of a character, not including descenders
5 - max line length (excluding comment lines) + a fudge factor
15 - default smushmode for this font (like "-m 15" on command line)
12 - number of comment lines
$@
$@
$@
$@
$@
$@
$@@
o @
| @
o @
@
O @
@
@@
o o @
| | @
@
@
@
@
@@
| | @
-O-O- @
| | @
-O-O- @
| | @
@
@@
| | @
-O-O- @
o | | @
-O-O- @
| | o @
-O-O- @
| | @@
o O @
/ @
/ @
/ @
O o @
@
@@
@
o @
/| @
o-O-@
| @
@
@@
o @
| @
@
@
@
@
@@
/ @
o @
| @
o @
\ @
@
@@
\ @
o @
| @
o @
/ @
@
@@
@
o | o @
\|/ @
--O-- @
/|\ @
o | o @
@@
@
| @
-o- @
| @
@
@
@@
@
@
@
@
o @
| @
@@
@
@
o-o @
@
@
@
@@
@
@
@
@
O @
@
@@
o@
/ @
o @
/ @
o @
@
@@
o-o @
o /o @
| / | @
o/ o @
o-o @
@
@@
0 @
/| @
o | @
| @
o-o-o @
@
@@
-- @
o o @
/ @
/ @
o--o @
@
@@
o-o @
| @
oo @
| @
o-o @
@
@@
o o @
| | @
o--O @
| @
o @
@
@@
o--o @
| @
o-o @
| @
o-o @
@
@@
o @
/ @
O--o @
o | @
o-o @
@
@@
o---o @
/ @
o @
| @
o @
@
@@
o-o @
| | @
o-o @
| | @
o-o @
@
@@
o-o @
| o @
o--O @
/ @
o @
@
@@
@
O @
@
O @
@
@
@@
@
o @
@
o @
| @
@
@@
o @
/ @
O @
\ @
o @
@
@@
@
@
o--o @
o--o @
@
@
@@
o @
\ @
O @
/ @
o @
@
@@
o-o @
o o @
/ @
o @
@
O @
@@
o @
/ \ @
o O-o @
\ @
o- @
@
@@
O @
/ \ @
o---o@
| |@
o o@
@
@@
o--o @
| | @
O--o @
| | @
o--o @
@
@@
o-o @
/ @
O @
\ @
o-o @
@
@@
o-o @
| \ @
| O @
| / @
o-o @
@
@@
o--o @
| @
O-o @
| @
o--o @
@
@@
o--o @
| @
O-o @
| @
o @
@
@@
o-o @
o @
| -o @
o | @
o-o @
@
@@
o o @
| | @
O--O @
| | @
o o @
@
@@
o-O-o @
| @
| @
| @
o-O-o @
@
@@
o @
| @
| @
\ o @
o-o @
@
@@
o o @
| / @
OO @
| \ @
o o @
@
@@
o @
| @
| @
| @
O---o@
@
@@
o o @
|\ /| @
| O | @
| | @
o o @
@
@@
o o @
|\ | @
| \ | @
| \| @
o o @
@
@@
o-o @
o o @
| | @
o o @
o-o @
@
@@
o--o @
| | @
O--o @
| @
o @
@
@@
o-o @
o o @
| | @
o O @
o-O\ @
@
@@
o--o @
| | @
O-Oo @
| \ @
o o @
@
@@
o-o @
| @
o-o @
| @
o--o @
@
@@
o-O-o @
| @
| @
| @
o @
@
@@
o o @
| | @
| | @
| | @
o-o @
@
@@
o o @
| | @
o o @
\ / @
o @
@
@@
o o @
| | @
o o o @
\ / \ / @
o o @
@
@@
o o @
\ / @
O @
/ \ @
o o @
@
@@
o o @
\ / @
O @
| @
o @
@
@@
o---o @
/ @
-O- @
/ @
o---o @
@
@@
O-o @
| @
| @
| @
O-o @
@
@@
o @
\ @
o @
\ @
o@
@
@@
o-O @
| @
| @
| @
o-O @
@
@@
o @
/ \ @
@
@
@
@
@@
@
@
@
@
@
o---o@
@@
0 @
| @
@
@
@
@
@@
@
@
oo @
| | @
o-o-@
@
@@
o @
| @
O-o @
| | @
o-o @
@
@@
@
@
o-o @
| @
o-o @
@
@@
o @
| @
o-O @
| | @
o-o @
@
@@
@
@
o-o @
|-' @
o-o @
@
@@
o-o@
| @
-O- @
| @
o @
@
@@
@
@
o--o @
| | @
o--O @
| @
o--o @@
o @
| @
O--o @
| | @
o o @
@
@@
@
o @
@
| @
| @
@
@@
@
o @
@
o @
| @
o o @
o-o @@
o @
| / @
OO @
| \ @
o o @
@
@@
o @
| @
| @
| @
o @
@
@@
@
@
o-O-o @
| | | @
o o o @
@
@@
@
@
o-o @
| | @
o o @
@
@@
@
@
o-o @
| | @
o-o @
@
@@
@
@
o-o @
| | @
O-o @
| @
o @@
@
@
o-o @
| | @
o-O @
| @
o @@
@
@
o-o @
| @
o @
@
@@
@
@
o-o @
\ @
o-o @
@
@@
o @
| @
-o- @
| @
o @
@
@@
@
@
o o @
| | @
o--o @
@
@@
@
@
o o @
\ / @
o @
@
@@
@
@
o o o@
\ / \ / @
o o @
@
@@
@
@
\ / @
o @
/ \ @
@
@@
@
@
o o @
| | @
o--O @
| @
o--o @@
@
@
o-o @
/ @
o-o @
@
@@
o-o @
| @
o-O @
| @
o-o @
@
@@
o @
| @
o @
| @
o @
@
@@
o-o @
| @
O-o @
| @
o-o @
@
@@
@
o_ / @
/ o @
@
@
@
@@
o O o@
/ \ @
o---o@
| |@
o o@
@
@@
o o-o o@
o o @
| | @
o o @
o-o @
@
@@
o o o o @
| | @
o o @
\ / @
o-o @
@
@@
o o @
@
oo @
| | @
o-o-@
@
@@
o o @
@
o-o @
| | @
o-o @
@
@@
o o @
@
o o @
| | @
o--o @
@
@@
o--o @
| | @
O--o @
| | @
o--o @
| @
o @@
@@ -0,0 +1,39 @@
// Copyright 2017 Lovell Fuller and others.
// SPDX-License-Identifier: Apache-2.0
'use strict';
const interpreterPath = (elf) => {
if (elf.length < 64) {
return null;
}
if (elf.readUInt32BE(0) !== 0x7F454C46) {
// Unexpected magic bytes
return null;
}
if (elf.readUInt8(4) !== 2) {
// Not a 64-bit ELF
return null;
}
if (elf.readUInt8(5) !== 1) {
// Not little-endian
return null;
}
const offset = elf.readUInt32LE(32);
const size = elf.readUInt16LE(54);
const count = elf.readUInt16LE(56);
for (let i = 0; i < count; i++) {
const headerOffset = offset + (i * size);
const type = elf.readUInt32LE(headerOffset);
if (type === 3) {
const fileOffset = elf.readUInt32LE(headerOffset + 8);
const fileSize = elf.readUInt32LE(headerOffset + 32);
return elf.subarray(fileOffset, fileOffset + fileSize).toString().replace(/\0.*$/g, '');
}
}
return null;
};
module.exports = {
interpreterPath
};
@@ -0,0 +1,30 @@
/**
* @fileoverview Types for this package.
*/
import type { ConfigObject } from "@eslint/core";
/**
* Infinite array type.
*/
export type InfiniteArray<T> = T | InfiniteArray<T>[];
/**
* A config object that may appear inside of `extends`.
* `basePath` and nested `extends` are not allowed on extension config objects.
*/
export type ExtensionConfigObject = Omit<ConfigObject, "basePath"> & {
extends?: never;
};
/**
* The type of array element in the `extends` property after flattening.
*/
export type SimpleExtendsElement = string | ExtensionConfigObject;
/**
* The type of array element in the `extends` property before flattening.
*/
export type ExtendsElement = SimpleExtendsElement | InfiniteArray<ExtensionConfigObject>;
/**
* Config with extends. Valid only inside of `defineConfig()`.
*/
export interface ConfigWithExtends extends ConfigObject {
extends?: ExtendsElement[];
}
export type ConfigWithExtendsArray = InfiniteArray<ConfigWithExtends>[];
@@ -0,0 +1 @@
{"version":3,"file":"arrow-big-left.js","sources":["../../../src/icons/arrow-big-left.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name ArrowBigLeft\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTggMTVoLTZ2NGwtNy03IDctN3Y0aDZ2NnoiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/arrow-big-left\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 ArrowBigLeft = createLucideIcon('ArrowBigLeft', [\n ['path', { d: 'M18 15h-6v4l-7-7 7-7v4h6v6z', key: 'lbrdak' }],\n]);\n\nexport default ArrowBigLeft;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAe,iBAAiB,cAAgB,CAAA,CAAA,CAAA;AAAA,CAAA,CACpD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA+B,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;AAC9D,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,169 @@
'use strict'
const {
PoolBase,
kClients,
kNeedDrain,
kAddClient,
kGetDispatcher,
kHasDispatcher,
kRemoveClient,
kRetireClient,
kDrainQueue
} = require('./pool-base')
const Client = require('./client')
const {
InvalidArgumentError
} = require('../core/errors')
const util = require('../core/util')
const { kUrl, kQueued } = require('../core/symbols')
const buildConnector = require('../core/connect')
const kOptions = Symbol('options')
const kConnections = Symbol('connections')
const kFactory = Symbol('factory')
const kIndex = Symbol('index')
function defaultFactory (origin, opts) {
return new Client(origin, opts)
}
class RoundRobinPool extends PoolBase {
constructor (origin, {
connections,
factory = defaultFactory,
connect,
connectTimeout,
tls,
maxCachedSessions,
socketPath,
autoSelectFamily,
autoSelectFamilyAttemptTimeout,
allowH2,
clientTtl,
...options
} = {}) {
if (connections != null && (!Number.isFinite(connections) || connections < 0)) {
throw new InvalidArgumentError('invalid connections')
}
if (typeof factory !== 'function') {
throw new InvalidArgumentError('factory must be a function.')
}
if (connect != null && typeof connect !== 'function' && typeof connect !== 'object') {
throw new InvalidArgumentError('connect must be a function or an object')
}
if (typeof connect !== 'function') {
connect = buildConnector({
...tls,
maxCachedSessions,
allowH2,
socketPath,
timeout: connectTimeout,
...(typeof autoSelectFamily === 'boolean' ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : undefined),
...connect
})
}
super(options)
this[kConnections] = connections || null
this[kUrl] = util.parseOrigin(origin)
this[kOptions] = { ...util.deepClone(options), connect, allowH2, clientTtl, socketPath }
this[kFactory] = factory
this[kIndex] = -1
this.on('connect', (origin, targets) => {
if (clientTtl != null && clientTtl > 0) {
for (const target of targets) {
Object.assign(target, { ttl: Date.now() })
}
}
})
this.on('connectionError', (origin, targets, error) => {
// Retire (close) the client rather than only dropping it from
// kClients: otherwise its drain listener keeps pulling requests from
// the pool queue onto a client that pool.destroy() can't reach.
for (const target of targets) {
if (this[kClients].includes(target)) {
this[kRetireClient](target)
}
}
// The retired client no longer drains the pool queue, so hand any
// queued requests to another (possibly new) client.
if (this[kQueued] > 0) {
this[kDrainQueue](origin, targets.slice(1))
}
})
}
[kGetDispatcher] () {
const clientTtlOption = this[kOptions].clientTtl
// If we have no clients yet, create one
if (this[kClients].length === 0) {
const dispatcher = this[kFactory](this[kUrl], this[kOptions])
this[kAddClient](dispatcher)
return dispatcher
}
// Round-robin through existing clients
let checked = 0
while (checked < this[kClients].length) {
this[kIndex] = (this[kIndex] + 1) % this[kClients].length
const client = this[kClients][this[kIndex]]
// Check if client is stale (TTL expired)
if (clientTtlOption != null && clientTtlOption > 0 && client.ttl && ((Date.now() - client.ttl) > clientTtlOption)) {
this[kRemoveClient](client)
this[kIndex]--
continue
}
// Return client if it's not draining
if (!client[kNeedDrain]) {
return client
}
checked++
}
// All clients are busy, create a new one if we haven't reached the limit
if (!this[kConnections] || this[kClients].length < this[kConnections]) {
const dispatcher = this[kFactory](this[kUrl], this[kOptions])
this[kAddClient](dispatcher)
return dispatcher
}
}
[kHasDispatcher] () {
const clientTtlOption = this[kOptions].clientTtl
for (let i = 0; i < this[kClients].length; i++) {
const client = this[kClients][i]
if (clientTtlOption != null && clientTtlOption > 0 && client.ttl && ((Date.now() - client.ttl) > clientTtlOption)) {
this[kRemoveClient](client)
if (i <= this[kIndex]) {
this[kIndex]--
}
i--
} else if (!client[kNeedDrain]) {
return true
}
}
if (!this[kConnections] || this[kClients].length < this[kConnections]) {
const dispatcher = this[kFactory](this[kUrl], this[kOptions])
this[kAddClient](dispatcher)
return true
}
return false
}
}
module.exports = RoundRobinPool
@@ -0,0 +1,11 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _objectDestructuringEmpty;
function _objectDestructuringEmpty(obj) {
if (obj == null) throw new TypeError("Cannot destructure " + obj);
}
//# sourceMappingURL=objectDestructuringEmpty.js.map
@@ -0,0 +1,5 @@
import type { CodeKeywordDefinition } from "../../types";
import { DiscrError, DiscrErrorObj } from "../discriminator/types";
export type DiscriminatorError = DiscrErrorObj<DiscrError.Tag> | DiscrErrorObj<DiscrError.Mapping>;
declare const def: CodeKeywordDefinition;
export default def;
@@ -0,0 +1,26 @@
/**
* @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 School = createLucideIcon("School", [
["path", { d: "M14 22v-4a2 2 0 1 0-4 0v4", key: "hhkicm" }],
[
"path",
{
d: "m18 10 3.447 1.724a1 1 0 0 1 .553.894V20a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-7.382a1 1 0 0 1 .553-.894L6 10",
key: "1xqip1"
}
],
["path", { d: "M18 5v17", key: "1sw6gf" }],
["path", { d: "m4 6 7.106-3.553a2 2 0 0 1 1.788 0L20 6", key: "9d2mlk" }],
["path", { d: "M6 5v17", key: "1xfsm0" }],
["circle", { cx: "12", cy: "9", r: "2", key: "1092wv" }]
]);
export { School as default };
//# sourceMappingURL=school.js.map
@@ -0,0 +1,71 @@
{
"name": "@radix-ui/react-collection",
"version": "1.1.7",
"license": "MIT",
"source": "./src/index.ts",
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"files": [
"dist",
"README.md"
],
"sideEffects": false,
"dependencies": {
"@radix-ui/react-compose-refs": "1.1.2",
"@radix-ui/react-context": "1.1.2",
"@radix-ui/react-primitive": "2.1.3",
"@radix-ui/react-slot": "1.2.3"
},
"devDependencies": {
"@types/react": "^19.0.7",
"@types/react-dom": "^19.0.3",
"eslint": "^9.18.0",
"react": "^19.1.0",
"react-dom": "^19.1.0",
"typescript": "^5.7.3",
"@repo/builder": "0.0.0",
"@repo/typescript-config": "0.0.0",
"@repo/eslint-config": "0.0.0"
},
"peerDependencies": {
"@types/react": "*",
"@types/react-dom": "*",
"react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
"react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
},
"peerDependenciesMeta": {
"@types/react": {
"optional": true
},
"@types/react-dom": {
"optional": true
}
},
"homepage": "https://radix-ui.com/primitives",
"repository": {
"type": "git",
"url": "git+https://github.com/radix-ui/primitives.git"
},
"bugs": {
"url": "https://github.com/radix-ui/primitives/issues"
},
"scripts": {
"lint": "eslint --max-warnings 0 src",
"clean": "rm -rf dist",
"typecheck": "tsc --noEmit",
"build": "radix-build"
},
"types": "./dist/index.d.ts",
"exports": {
".": {
"import": {
"types": "./dist/index.d.mts",
"default": "./dist/index.mjs"
},
"require": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
}
}
}
@@ -0,0 +1,7 @@
export { sidecar } from './hoc';
export { useSidecar } from './hook';
export { setConfig } from './config';
export { createMedium, createSidecarMedium } from './medium';
export { renderCar } from './renderProp';
export { exportSidecar } from './exports';
export type { SideCarComponent } from './types';
@@ -0,0 +1 @@
{"version":3,"file":"chart-pie.js","sources":["../../../src/icons/chart-pie.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name ChartPie\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMjEgMTJjLjU1MiAwIDEuMDA1LS40NDkuOTUtLjk5OGExMCAxMCAwIDAgMC04Ljk1My04Ljk1MWMtLjU1LS4wNTUtLjk5OC4zOTgtLjk5OC45NXY4YTEgMSAwIDAgMCAxIDF6IiAvPgogIDxwYXRoIGQ9Ik0yMS4yMSAxNS44OUExMCAxMCAwIDEgMSA4IDIuODMiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/chart-pie\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 ChartPie = createLucideIcon('ChartPie', [\n [\n 'path',\n {\n d: 'M21 12c.552 0 1.005-.449.95-.998a10 10 0 0 0-8.953-8.951c-.55-.055-.998.398-.998.95v8a1 1 0 0 0 1 1z',\n key: 'pzmjnu',\n },\n ],\n ['path', { d: 'M21.21 15.89A10 10 0 1 1 8 2.83', key: 'k2fpak' }],\n]);\n\nexport default ChartPie;\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;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,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,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;AAAA,CACH,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA,CAAA;AAAA,CAAA,CACA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAmC,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;AAClE,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1 @@
{"version":3,"file":"ice-cream-2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -0,0 +1,101 @@
const maxDistance = 3;
function editDistance(a, b) {
// https://en.wikipedia.org/wiki/Damerau–Levenshtein_distance
// Calculating optimal string alignment distance, no substring is edited more than once.
// (Simple implementation.)
// Quick early exit, return worst case.
if (Math.abs(a.length - b.length) > maxDistance)
return Math.max(a.length, b.length);
// distance between prefix substrings of a and b
const d = [];
// pure deletions turn a into empty string
for (let i = 0; i <= a.length; i++) {
d[i] = [i];
}
// pure insertions turn empty string into b
for (let j = 0; j <= b.length; j++) {
d[0][j] = j;
}
// fill matrix
for (let j = 1; j <= b.length; j++) {
for (let i = 1; i <= a.length; i++) {
let cost = 1;
if (a[i - 1] === b[j - 1]) {
cost = 0;
} else {
cost = 1;
}
d[i][j] = Math.min(
d[i - 1][j] + 1, // deletion
d[i][j - 1] + 1, // insertion
d[i - 1][j - 1] + cost, // substitution
);
// transposition
if (i > 1 && j > 1 && a[i - 1] === b[j - 2] && a[i - 2] === b[j - 1]) {
d[i][j] = Math.min(d[i][j], d[i - 2][j - 2] + 1);
}
}
}
return d[a.length][b.length];
}
/**
* Find close matches, restricted to same number of edits.
*
* @param {string} word
* @param {string[]} candidates
* @returns {string}
*/
function suggestSimilar(word, candidates) {
if (!candidates || candidates.length === 0) return '';
// remove possible duplicates
candidates = Array.from(new Set(candidates));
const searchingOptions = word.startsWith('--');
if (searchingOptions) {
word = word.slice(2);
candidates = candidates.map((candidate) => candidate.slice(2));
}
let similar = [];
let bestDistance = maxDistance;
const minSimilarity = 0.4;
candidates.forEach((candidate) => {
if (candidate.length <= 1) return; // no one character guesses
const distance = editDistance(word, candidate);
const length = Math.max(word.length, candidate.length);
const similarity = (length - distance) / length;
if (similarity > minSimilarity) {
if (distance < bestDistance) {
// better edit distance, throw away previous worse matches
bestDistance = distance;
similar = [candidate];
} else if (distance === bestDistance) {
similar.push(candidate);
}
}
});
similar.sort((a, b) => a.localeCompare(b));
if (searchingOptions) {
similar = similar.map((candidate) => `--${candidate}`);
}
if (similar.length > 1) {
return `\n(Did you mean one of ${similar.join(', ')}?)`;
}
if (similar.length === 1) {
return `\n(Did you mean ${similar[0]}?)`;
}
return '';
}
exports.suggestSimilar = suggestSimilar;
@@ -0,0 +1,9 @@
/**
* @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.
*/
export { default } from './circle-arrow-out-down-right.js';
//# sourceMappingURL=arrow-down-right-from-circle.js.map
@@ -0,0 +1,61 @@
{
"name": "postcss-load-config",
"version": "6.0.1",
"description": "Autoload Config for PostCSS",
"main": "src/index.js",
"types": "src/index.d.ts",
"files": [
"src"
],
"engines": {
"node": ">= 18"
},
"funding": [
{
"type": "opencollective",
"url": "https://opencollective.com/postcss/"
},
{
"type": "github",
"url": "https://github.com/sponsors/ai"
}
],
"dependencies": {
"lilconfig": "^3.1.1"
},
"peerDependencies": {
"jiti": ">=1.21.0",
"postcss": ">=8.0.9",
"tsx": "^4.8.1",
"yaml": "^2.4.2"
},
"peerDependenciesMeta": {
"jiti": {
"optional": true
},
"postcss": {
"optional": true
},
"tsx": {
"optional": true
},
"yaml": {
"optional": true
}
},
"keywords": [
"postcss",
"postcssrc",
"postcss.config.js"
],
"author": "Michael Ciniawky <michael.ciniawsky@gmail.com>",
"contributors": [
"Ryan Dunckel",
"Mateusz Derks",
"Dalton Santos",
"Patrick Gilday",
"François Wouts"
],
"repository": "postcss/postcss-load-config",
"license": "MIT"
}
@@ -0,0 +1 @@
{"version":3,"file":"pizza.js","sources":["../../../src/icons/pizza.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Pizza\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJtMTIgMTQtMSAxIiAvPgogIDxwYXRoIGQ9Im0xMy43NSAxOC4yNS0xLjI1IDEuNDIiIC8+CiAgPHBhdGggZD0iTTE3Ljc3NSA1LjY1NGExNS42OCAxNS42OCAwIDAgMC0xMi4xMjEgMTIuMTIiIC8+CiAgPHBhdGggZD0iTTE4LjggOS4zYTEgMSAwIDAgMCAyLjEgNy43IiAvPgogIDxwYXRoIGQ9Ik0yMS45NjQgMjAuNzMyYTEgMSAwIDAgMS0xLjIzMiAxLjIzMmwtMTgtNWExIDEgMCAwIDEtLjY5NS0xLjIzMkExOS42OCAxOS42OCAwIDAgMSAxNS43MzIgMi4wMzdhMSAxIDAgMCAxIDEuMjMyLjY5NXoiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/pizza\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 Pizza = createLucideIcon('Pizza', [\n ['path', { d: 'm12 14-1 1', key: '11onhr' }],\n ['path', { d: 'm13.75 18.25-1.25 1.42', key: '1yisr3' }],\n ['path', { d: 'M17.775 5.654a15.68 15.68 0 0 0-12.121 12.12', key: '1qtqk6' }],\n ['path', { d: 'M18.8 9.3a1 1 0 0 0 2.1 7.7', key: 'fbbbr2' }],\n [\n 'path',\n {\n d: 'M21.964 20.732a1 1 0 0 1-1.232 1.232l-18-5a1 1 0 0 1-.695-1.232A19.68 19.68 0 0 1 15.732 2.037a1 1 0 0 1 1.232.695z',\n key: '1hyfdd',\n },\n ],\n]);\n\nexport default Pizza;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,iBAAiB,OAAS,CAAA,CAAA,CAAA;AAAA,CAAA,CACtC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC3C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA0B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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AAA,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,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACH,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA;AACF,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,123 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.extendErrors = exports.resetErrorsCount = exports.reportExtraError = exports.reportError = exports.keyword$DataError = exports.keywordError = void 0;
const codegen_1 = require("./codegen");
const util_1 = require("./util");
const names_1 = require("./names");
exports.keywordError = {
message: ({ keyword }) => (0, codegen_1.str) `must pass "${keyword}" keyword validation`,
};
exports.keyword$DataError = {
message: ({ keyword, schemaType }) => schemaType
? (0, codegen_1.str) `"${keyword}" keyword must be ${schemaType} ($data)`
: (0, codegen_1.str) `"${keyword}" keyword is invalid ($data)`,
};
function reportError(cxt, error = exports.keywordError, errorPaths, overrideAllErrors) {
const { it } = cxt;
const { gen, compositeRule, allErrors } = it;
const errObj = errorObjectCode(cxt, error, errorPaths);
if (overrideAllErrors !== null && overrideAllErrors !== void 0 ? overrideAllErrors : (compositeRule || allErrors)) {
addError(gen, errObj);
}
else {
returnErrors(it, (0, codegen_1._) `[${errObj}]`);
}
}
exports.reportError = reportError;
function reportExtraError(cxt, error = exports.keywordError, errorPaths) {
const { it } = cxt;
const { gen, compositeRule, allErrors } = it;
const errObj = errorObjectCode(cxt, error, errorPaths);
addError(gen, errObj);
if (!(compositeRule || allErrors)) {
returnErrors(it, names_1.default.vErrors);
}
}
exports.reportExtraError = reportExtraError;
function resetErrorsCount(gen, errsCount) {
gen.assign(names_1.default.errors, errsCount);
gen.if((0, codegen_1._) `${names_1.default.vErrors} !== null`, () => gen.if(errsCount, () => gen.assign((0, codegen_1._) `${names_1.default.vErrors}.length`, errsCount), () => gen.assign(names_1.default.vErrors, null)));
}
exports.resetErrorsCount = resetErrorsCount;
function extendErrors({ gen, keyword, schemaValue, data, errsCount, it, }) {
/* istanbul ignore if */
if (errsCount === undefined)
throw new Error("ajv implementation error");
const err = gen.name("err");
gen.forRange("i", errsCount, names_1.default.errors, (i) => {
gen.const(err, (0, codegen_1._) `${names_1.default.vErrors}[${i}]`);
gen.if((0, codegen_1._) `${err}.instancePath === undefined`, () => gen.assign((0, codegen_1._) `${err}.instancePath`, (0, codegen_1.strConcat)(names_1.default.instancePath, it.errorPath)));
gen.assign((0, codegen_1._) `${err}.schemaPath`, (0, codegen_1.str) `${it.errSchemaPath}/${keyword}`);
if (it.opts.verbose) {
gen.assign((0, codegen_1._) `${err}.schema`, schemaValue);
gen.assign((0, codegen_1._) `${err}.data`, data);
}
});
}
exports.extendErrors = extendErrors;
function addError(gen, errObj) {
const err = gen.const("err", errObj);
gen.if((0, codegen_1._) `${names_1.default.vErrors} === null`, () => gen.assign(names_1.default.vErrors, (0, codegen_1._) `[${err}]`), (0, codegen_1._) `${names_1.default.vErrors}.push(${err})`);
gen.code((0, codegen_1._) `${names_1.default.errors}++`);
}
function returnErrors(it, errs) {
const { gen, validateName, schemaEnv } = it;
if (schemaEnv.$async) {
gen.throw((0, codegen_1._) `new ${it.ValidationError}(${errs})`);
}
else {
gen.assign((0, codegen_1._) `${validateName}.errors`, errs);
gen.return(false);
}
}
const E = {
keyword: new codegen_1.Name("keyword"),
schemaPath: new codegen_1.Name("schemaPath"), // also used in JTD errors
params: new codegen_1.Name("params"),
propertyName: new codegen_1.Name("propertyName"),
message: new codegen_1.Name("message"),
schema: new codegen_1.Name("schema"),
parentSchema: new codegen_1.Name("parentSchema"),
};
function errorObjectCode(cxt, error, errorPaths) {
const { createErrors } = cxt.it;
if (createErrors === false)
return (0, codegen_1._) `{}`;
return errorObject(cxt, error, errorPaths);
}
function errorObject(cxt, error, errorPaths = {}) {
const { gen, it } = cxt;
const keyValues = [
errorInstancePath(it, errorPaths),
errorSchemaPath(cxt, errorPaths),
];
extraErrorProps(cxt, error, keyValues);
return gen.object(...keyValues);
}
function errorInstancePath({ errorPath }, { instancePath }) {
const instPath = instancePath
? (0, codegen_1.str) `${errorPath}${(0, util_1.getErrorPath)(instancePath, util_1.Type.Str)}`
: errorPath;
return [names_1.default.instancePath, (0, codegen_1.strConcat)(names_1.default.instancePath, instPath)];
}
function errorSchemaPath({ keyword, it: { errSchemaPath } }, { schemaPath, parentSchema }) {
let schPath = parentSchema ? errSchemaPath : (0, codegen_1.str) `${errSchemaPath}/${keyword}`;
if (schemaPath) {
schPath = (0, codegen_1.str) `${schPath}${(0, util_1.getErrorPath)(schemaPath, util_1.Type.Str)}`;
}
return [E.schemaPath, schPath];
}
function extraErrorProps(cxt, { params, message }, keyValues) {
const { keyword, data, schemaValue, it } = cxt;
const { opts, propertyName, topSchemaRef, schemaPath } = it;
keyValues.push([E.keyword, keyword], [E.params, typeof params == "function" ? params(cxt) : params || (0, codegen_1._) `{}`]);
if (opts.messages) {
keyValues.push([E.message, typeof message == "function" ? message(cxt) : message]);
}
if (opts.verbose) {
keyValues.push([E.schema, schemaValue], [E.parentSchema, (0, codegen_1._) `${topSchemaRef}${schemaPath}`], [names_1.default.data, data]);
}
if (propertyName)
keyValues.push([E.propertyName, propertyName]);
}
//# sourceMappingURL=errors.js.map
@@ -0,0 +1 @@
{"version":3,"names":["File","node","program","print","interpreter","Program","_node$directives","printInnerComments","directivesLen","directives","length","_node$directives$trai","newline","body","printSequence","undefined","trailingComments","BlockStatement","_node$directives2","token","oldNoLineTerminatorAfterNode","enterDelimited","_node$directives$trai2","_noLineTerminatorAfterNode","rightBrace","Directive","value","semicolon","unescapedSingleQuoteRE","unescapedDoubleQuoteRE","DirectiveLiteral","raw","getPossibleRaw","format","minified","test","Error","InterpreterDirective","_newline","Placeholder","name","expectedNode"],"sources":["../../src/generators/base.ts"],"sourcesContent":["import type Printer from \"../printer.ts\";\nimport type * as t from \"@babel/types\";\n\nexport function File(this: Printer, node: t.File) {\n if (node.program) {\n // Print this here to ensure that Program node 'leadingComments' still\n // get printed after the hashbang.\n this.print(node.program.interpreter);\n }\n\n this.print(node.program);\n}\n\nexport function Program(this: Printer, node: t.Program) {\n // An empty Program doesn't have any inner tokens, so\n // we must explicitly print its inner comments.\n this.printInnerComments(false);\n\n const directivesLen = node.directives?.length;\n if (directivesLen) {\n const newline = node.body.length ? 2 : 1;\n this.printSequence(node.directives, undefined, undefined, newline);\n if (!node.directives[directivesLen - 1].trailingComments?.length) {\n this.newline(newline);\n }\n }\n\n this.printSequence(node.body);\n}\n\nexport function BlockStatement(this: Printer, node: t.BlockStatement) {\n this.token(\"{\");\n const oldNoLineTerminatorAfterNode = this.enterDelimited();\n\n const directivesLen = node.directives?.length;\n if (directivesLen) {\n const newline = node.body.length ? 2 : 1;\n this.printSequence(node.directives, true, true, newline);\n if (!node.directives[directivesLen - 1].trailingComments?.length) {\n this.newline(newline);\n }\n }\n\n this.printSequence(node.body, true, true);\n\n this._noLineTerminatorAfterNode = oldNoLineTerminatorAfterNode;\n this.rightBrace(node);\n}\n\nexport function Directive(this: Printer, node: t.Directive) {\n this.print(node.value);\n this.semicolon();\n}\n\n// These regexes match an even number of \\ followed by a quote\nconst unescapedSingleQuoteRE = /(?:^|[^\\\\])(?:\\\\\\\\)*'/;\nconst unescapedDoubleQuoteRE = /(?:^|[^\\\\])(?:\\\\\\\\)*\"/;\n\nexport function DirectiveLiteral(this: Printer, node: t.DirectiveLiteral) {\n const raw = this.getPossibleRaw(node);\n if (!this.format.minified && raw !== undefined) {\n this.token(raw);\n return;\n }\n\n const { value } = node;\n\n // NOTE: In directives we can't change escapings,\n // because they change the behavior.\n // e.g. \"us\\x65 strict\" (\\x65 is e) is not a \"use strict\" directive.\n\n if (!unescapedDoubleQuoteRE.test(value)) {\n this.token(`\"${value}\"`);\n } else if (!unescapedSingleQuoteRE.test(value)) {\n this.token(`'${value}'`);\n } else {\n throw new Error(\n \"Malformed AST: it is not possible to print a directive containing\" +\n \" both unescaped single and double quotes.\",\n );\n }\n}\n\nexport function InterpreterDirective(\n this: Printer,\n node: t.InterpreterDirective,\n) {\n this.token(`#!${node.value}`);\n this._newline();\n}\n\nexport function Placeholder(this: Printer, node: t.Placeholder) {\n this.token(\"%%\");\n this.print(node.name);\n this.token(\"%%\");\n\n if (node.expectedNode === \"Statement\") {\n this.semicolon();\n }\n}\n"],"mappings":";;;;;;;;;;;;AAGO,SAASA,IAAIA,CAAgBC,IAAY,EAAE;EAChD,IAAIA,IAAI,CAACC,OAAO,EAAE;IAGhB,IAAI,CAACC,KAAK,CAACF,IAAI,CAACC,OAAO,CAACE,WAAW,CAAC;EACtC;EAEA,IAAI,CAACD,KAAK,CAACF,IAAI,CAACC,OAAO,CAAC;AAC1B;AAEO,SAASG,OAAOA,CAAgBJ,IAAe,EAAE;EAAA,IAAAK,gBAAA;EAGtD,IAAI,CAACC,kBAAkB,CAAC,KAAK,CAAC;EAE9B,MAAMC,aAAa,IAAAF,gBAAA,GAAGL,IAAI,CAACQ,UAAU,qBAAfH,gBAAA,CAAiBI,MAAM;EAC7C,IAAIF,aAAa,EAAE;IAAA,IAAAG,qBAAA;IACjB,MAAMC,OAAO,GAAGX,IAAI,CAACY,IAAI,CAACH,MAAM,GAAG,CAAC,GAAG,CAAC;IACxC,IAAI,CAACI,aAAa,CAACb,IAAI,CAACQ,UAAU,EAAEM,SAAS,EAAEA,SAAS,EAAEH,OAAO,CAAC;IAClE,IAAI,GAAAD,qBAAA,GAACV,IAAI,CAACQ,UAAU,CAACD,aAAa,GAAG,CAAC,CAAC,CAACQ,gBAAgB,aAAnDL,qBAAA,CAAqDD,MAAM,GAAE;MAChE,IAAI,CAACE,OAAO,CAACA,OAAO,CAAC;IACvB;EACF;EAEA,IAAI,CAACE,aAAa,CAACb,IAAI,CAACY,IAAI,CAAC;AAC/B;AAEO,SAASI,cAAcA,CAAgBhB,IAAsB,EAAE;EAAA,IAAAiB,iBAAA;EACpE,IAAI,CAACC,SAAK,IAAI,CAAC;EACf,MAAMC,4BAA4B,GAAG,IAAI,CAACC,cAAc,CAAC,CAAC;EAE1D,MAAMb,aAAa,IAAAU,iBAAA,GAAGjB,IAAI,CAACQ,UAAU,qBAAfS,iBAAA,CAAiBR,MAAM;EAC7C,IAAIF,aAAa,EAAE;IAAA,IAAAc,sBAAA;IACjB,MAAMV,OAAO,GAAGX,IAAI,CAACY,IAAI,CAACH,MAAM,GAAG,CAAC,GAAG,CAAC;IACxC,IAAI,CAACI,aAAa,CAACb,IAAI,CAACQ,UAAU,EAAE,IAAI,EAAE,IAAI,EAAEG,OAAO,CAAC;IACxD,IAAI,GAAAU,sBAAA,GAACrB,IAAI,CAACQ,UAAU,CAACD,aAAa,GAAG,CAAC,CAAC,CAACQ,gBAAgB,aAAnDM,sBAAA,CAAqDZ,MAAM,GAAE;MAChE,IAAI,CAACE,OAAO,CALine truncated
@@ -0,0 +1,18 @@
/**
* @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 CupSoda = createLucideIcon("CupSoda", [
["path", { d: "m6 8 1.75 12.28a2 2 0 0 0 2 1.72h4.54a2 2 0 0 0 2-1.72L18 8", key: "8166m8" }],
["path", { d: "M5 8h14", key: "pcz4l3" }],
["path", { d: "M7 15a6.47 6.47 0 0 1 5 0 6.47 6.47 0 0 0 5 0", key: "yjz344" }],
["path", { d: "m12 8 1-6h2", key: "3ybfa4" }]
]);
export { CupSoda as default };
//# sourceMappingURL=cup-soda.js.map
@@ -0,0 +1,14 @@
export * from './clear-caches';
export * from './create-program/getScriptKind';
export { getCanonicalFileName } from './create-program/shared';
export { createProgramFromConfigFile as createProgram } from './create-program/useProvidedPrograms';
export * from './getModifiers';
export { TSError } from './node-utils';
export { type AST, parse, parseAndGenerateServices, type ParseAndGenerateServicesResult, } from './parser';
export type { ParserServices, ParserServicesWithoutTypeInformation, ParserServicesWithTypeInformation, TSESTreeOptions, } from './parser-options';
export { addCandidateTSConfigRootDir, clearCandidateTSConfigRootDirs, } from './parseSettings/candidateTSConfigRootDirs';
export { simpleTraverse } from './simple-traverse';
export * from './ts-estree';
export { typescriptVersionIsAtLeast } from './version-check';
export { version } from './version';
export { withoutProjectParserOptions } from './withoutProjectParserOptions';
@@ -0,0 +1,673 @@
(function() {
var expandIPv6, ipaddr, ipv4Part, ipv4Regexes, ipv6Part, ipv6Regexes, matchCIDR, root, zoneIndex;
ipaddr = {};
root = this;
if ((typeof module !== "undefined" && module !== null) && module.exports) {
module.exports = ipaddr;
} else {
root['ipaddr'] = ipaddr;
}
matchCIDR = function(first, second, partSize, cidrBits) {
var part, shift;
if (first.length !== second.length) {
throw new Error("ipaddr: cannot match CIDR for objects with different lengths");
}
part = 0;
while (cidrBits > 0) {
shift = partSize - cidrBits;
if (shift < 0) {
shift = 0;
}
if (first[part] >> shift !== second[part] >> shift) {
return false;
}
cidrBits -= partSize;
part += 1;
}
return true;
};
ipaddr.subnetMatch = function(address, rangeList, defaultName) {
var k, len, rangeName, rangeSubnets, subnet;
if (defaultName == null) {
defaultName = 'unicast';
}
for (rangeName in rangeList) {
rangeSubnets = rangeList[rangeName];
if (rangeSubnets[0] && !(rangeSubnets[0] instanceof Array)) {
rangeSubnets = [rangeSubnets];
}
for (k = 0, len = rangeSubnets.length; k < len; k++) {
subnet = rangeSubnets[k];
if (address.kind() === subnet[0].kind()) {
if (address.match.apply(address, subnet)) {
return rangeName;
}
}
}
}
return defaultName;
};
ipaddr.IPv4 = (function() {
function IPv4(octets) {
var k, len, octet;
if (octets.length !== 4) {
throw new Error("ipaddr: ipv4 octet count should be 4");
}
for (k = 0, len = octets.length; k < len; k++) {
octet = octets[k];
if (!((0 <= octet && octet <= 255))) {
throw new Error("ipaddr: ipv4 octet should fit in 8 bits");
}
}
this.octets = octets;
}
IPv4.prototype.kind = function() {
return 'ipv4';
};
IPv4.prototype.toString = function() {
return this.octets.join(".");
};
IPv4.prototype.toNormalizedString = function() {
return this.toString();
};
IPv4.prototype.toByteArray = function() {
return this.octets.slice(0);
};
IPv4.prototype.match = function(other, cidrRange) {
var ref;
if (cidrRange === void 0) {
ref = other, other = ref[0], cidrRange = ref[1];
}
if (other.kind() !== 'ipv4') {
throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one");
}
return matchCIDR(this.octets, other.octets, 8, cidrRange);
};
IPv4.prototype.SpecialRanges = {
unspecified: [[new IPv4([0, 0, 0, 0]), 8]],
broadcast: [[new IPv4([255, 255, 255, 255]), 32]],
multicast: [[new IPv4([224, 0, 0, 0]), 4]],
linkLocal: [[new IPv4([169, 254, 0, 0]), 16]],
loopback: [[new IPv4([127, 0, 0, 0]), 8]],
carrierGradeNat: [[new IPv4([100, 64, 0, 0]), 10]],
"private": [[new IPv4([10, 0, 0, 0]), 8], [new IPv4([172, 16, 0, 0]), 12], [new IPv4([192, 168, 0, 0]), 16]],
reserved: [[new IPv4([192, 0, 0, 0]), 24], [new IPv4([192, 0, 2, 0]), 24], [new IPv4([192, 88, 99, 0]), 24], [new IPv4([198, 51, 100, 0]), 24], [new IPv4([203, 0, 113, 0]), 24], [new IPv4([240, 0, 0, 0]), 4]]
};
IPv4.prototype.range = function() {
return ipaddr.subnetMatch(this, this.SpecialRanges);
};
IPv4.prototype.toIPv4MappedAddress = function() {
return ipaddr.IPv6.parse("::ffff:" + (this.toString()));
};
IPv4.prototype.prefixLengthFromSubnetMask = function() {
var cidr, i, k, octet, stop, zeros, zerotable;
zerotable = {
0: 8,
128: 7,
192: 6,
224: 5,
240: 4,
248: 3,
252: 2,
254: 1,
255: 0
};
cidr = 0;
stop = false;
for (i = k = 3; k >= 0; i = k += -1) {
octet = this.octets[i];
if (octet in zerotable) {
zeros = zerotable[octet];
if (stop && zeros !== 0) {
return null;
}
if (zeros !== 8) {
stop = true;
}
cidr += zeros;
} else {
return null;
}
}
return 32 - cidr;
};
return IPv4;
})();
ipv4Part = "(0?\\d+|0x[a-f0-9]+)";
ipv4Regexes = {
fourOctet: new RegExp("^" + ipv4Part + "\\." + ipv4Part + "\\." + ipv4Part + "\\." + ipv4Part + "$", 'i'),
longValue: new RegExp("^" + ipv4Part + "$", 'i')
};
ipaddr.IPv4.parser = function(string) {
var match, parseIntAuto, part, shift, value;
parseIntAuto = function(string) {
if (string[0] === "0" && string[1] !== "x") {
return parseInt(string, 8);
} else {
return parseInt(string);
}
};
if (match = string.match(ipv4Regexes.fourOctet)) {
return (function() {
var k, len, ref, results;
ref = match.slice(1, 6);
results = [];
for (k = 0, len = ref.length; k < len; k++) {
part = ref[k];
results.push(parseIntAuto(part));
}
return results;
})();
} else if (match = string.match(ipv4Regexes.longValue)) {
value = parseIntAuto(match[1]);
if (value > 0xffffffff || value < 0) {
throw new Error("ipaddr: address outside defined range");
}
return ((function() {
var k, results;
results = [];
for (shift = k = 0; k <= 24; shift = k += 8) {
results.push((value >> shift) & 0xff);
}
return results;
})()).reverse();
} else {
return null;
}
};
ipaddr.IPv6 = (function() {
function IPv6(parts, zoneId) {
var i, k, l, len, part, ref;
if (parts.length === 16) {
this.parts = [];
for (i = k = 0; k <= 14; i = k += 2) {
this.parts.push((parts[i] << 8) | parts[i + 1]);
}
} else if (parts.length === 8) {
this.parts = parts;
} else {
throw new Error("ipaddr: ipv6 part count should be 8 or 16");
}
ref = this.parts;
for (l = 0, len = ref.length; l < len; l++) {
part = ref[l];
if (!((0 <= part && part <= 0xffff))) {
throw new Error("ipaddr: ipv6 part should fit in 16 bits");
}
}
if (zoneId) {
this.zoneId = zoneId;
}
}
IPv6.prototype.kind = function() {
return 'ipv6';
};
IPv6.prototype.toString = function() {
return this.toNormalizedString().replace(/((^|:)(0(:|$))+)/, '::');
};
IPv6.prototype.toRFC5952String = function() {
var bestMatchIndex, bestMatchLength, match, regex, string;
regex = /((^|:)(0(:|$)){2,})/g;
string = this.toNormalizedString();
bestMatchIndex = 0;
bestMatchLength = -1;
while ((match = regex.exec(string))) {
if (match[0].length > bestMatchLength) {
bestMatchIndex = match.index;
bestMatchLength = match[0].length;
}
}
if (bestMatchLength < 0) {
return string;
}
return string.substring(0, bestMatchIndex) + '::' + string.substring(bestMatchIndex + bestMatchLength);
};
IPv6.prototype.toByteArray = function() {
var bytes, k, len, part, ref;
bytes = [];
ref = this.parts;
for (k = 0, len = ref.length; k < len; k++) {
part = ref[k];
bytes.push(part >> 8);
bytes.push(part & 0xff);
}
return bytes;
};
IPv6.prototype.toNormalizedString = function() {
var addr, part, suffix;
addr = ((function() {
var k, len, ref, results;
ref = this.parts;
results = [];
for (k = 0, len = ref.length; k < len; k++) {
part = ref[k];
results.push(part.toString(16));
}
return results;
}).call(this)).join(":");
suffix = '';
if (this.zoneId) {
suffix = '%' + this.zoneId;
}
return addr + suffix;
};
IPv6.prototype.toFixedLengthString = function() {
var addr, part, suffix;
addr = ((function() {
var k, len, ref, results;
ref = this.parts;
results = [];
for (k = 0, len = ref.length; k < len; k++) {
part = ref[k];
results.push(part.toString(16).padStart(4, '0'));
}
return results;
}).call(this)).join(":");
suffix = '';
if (this.zoneId) {
suffix = '%' + this.zoneId;
}
return addr + suffix;
};
IPv6.prototype.match = function(other, cidrRange) {
var ref;
if (cidrRange === void 0) {
ref = other, other = ref[0], cidrRange = ref[1];
}
if (other.kind() !== 'ipv6') {
throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one");
}
return matchCIDR(this.parts, other.parts, 16, cidrRange);
};
IPv6.prototype.SpecialRanges = {
unspecified: [new IPv6([0, 0, 0, 0, 0, 0, 0, 0]), 128],
linkLocal: [new IPv6([0xfe80, 0, 0, 0, 0, 0, 0, 0]), 10],
multicast: [new IPv6([0xff00, 0, 0, 0, 0, 0, 0, 0]), 8],
loopback: [new IPv6([0, 0, 0, 0, 0, 0, 0, 1]), 128],
uniqueLocal: [new IPv6([0xfc00, 0, 0, 0, 0, 0, 0, 0]), 7],
ipv4Mapped: [new IPv6([0, 0, 0, 0, 0, 0xffff, 0, 0]), 96],
rfc6145: [new IPv6([0, 0, 0, 0, 0xffff, 0, 0, 0]), 96],
rfc6052: [new IPv6([0x64, 0xff9b, 0, 0, 0, 0, 0, 0]), 96],
'6to4': [new IPv6([0x2002, 0, 0, 0, 0, 0, 0, 0]), 16],
teredo: [new IPv6([0x2001, 0, 0, 0, 0, 0, 0, 0]), 32],
reserved: [[new IPv6([0x2001, 0xdb8, 0, 0, 0, 0, 0, 0]), 32]]
};
IPv6.prototype.range = function() {
return ipaddr.subnetMatch(this, this.SpecialRanges);
};
IPv6.prototype.isIPv4MappedAddress = function() {
return this.range() === 'ipv4Mapped';
};
IPv6.prototype.toIPv4Address = function() {
var high, low, ref;
if (!this.isIPv4MappedAddress()) {
throw new Error("ipaddr: trying to convert a generic ipv6 address to ipv4");
}
ref = this.parts.slice(-2), high = ref[0], low = ref[1];
return new ipaddr.IPv4([high >> 8, high & 0xff, low >> 8, low & 0xff]);
};
IPv6.prototype.prefixLengthFromSubnetMask = function() {
var cidr, i, k, part, stop, zeros, zerotable;
zerotable = {
0: 16,
32768: 15,
49152: 14,
57344: 13,
61440: 12,
63488: 11,
64512: 10,
65024: 9,
65280: 8,
65408: 7,
65472: 6,
65504: 5,
65520: 4,
65528: 3,
65532: 2,
65534: 1,
65535: 0
};
cidr = 0;
stop = false;
for (i = k = 7; k >= 0; i = k += -1) {
part = this.parts[i];
if (part in zerotable) {
zeros = zerotable[part];
if (stop && zeros !== 0) {
return null;
}
if (zeros !== 16) {
stop = true;
}
cidr += zeros;
} else {
return null;
}
}
return 128 - cidr;
};
return IPv6;
})();
ipv6Part = "(?:[0-9a-f]+::?)+";
zoneIndex = "%[0-9a-z]{1,}";
ipv6Regexes = {
zoneIndex: new RegExp(zoneIndex, 'i'),
"native": new RegExp("^(::)?(" + ipv6Part + ")?([0-9a-f]+)?(::)?(" + zoneIndex + ")?$", 'i'),
transitional: new RegExp(("^((?:" + ipv6Part + ")|(?:::)(?:" + ipv6Part + ")?)") + (ipv4Part + "\\." + ipv4Part + "\\." + ipv4Part + "\\." + ipv4Part) + ("(" + zoneIndex + ")?$"), 'i')
};
expandIPv6 = function(string, parts) {
var colonCount, lastColon, part, replacement, replacementCount, zoneId;
if (string.indexOf('::') !== string.lastIndexOf('::')) {
return null;
}
zoneId = (string.match(ipv6Regexes['zoneIndex']) || [])[0];
if (zoneId) {
zoneId = zoneId.substring(1);
string = string.replace(/%.+$/, '');
}
colonCount = 0;
lastColon = -1;
while ((lastColon = string.indexOf(':', lastColon + 1)) >= 0) {
colonCount++;
}
if (string.substr(0, 2) === '::') {
colonCount--;
}
if (string.substr(-2, 2) === '::') {
colonCount--;
}
if (colonCount > parts) {
return null;
}
replacementCount = parts - colonCount;
replacement = ':';
while (replacementCount--) {
replacement += '0:';
}
string = string.replace('::', replacement);
if (string[0] === ':') {
string = string.slice(1);
}
if (string[string.length - 1] === ':') {
string = string.slice(0, -1);
}
parts = (function() {
var k, len, ref, results;
ref = string.split(":");
results = [];
for (k = 0, len = ref.length; k < len; k++) {
part = ref[k];
results.push(parseInt(part, 16));
}
return results;
})();
return {
parts: parts,
zoneId: zoneId
};
};
ipaddr.IPv6.parser = function(string) {
var addr, k, len, match, octet, octets, zoneId;
if (ipv6Regexes['native'].test(string)) {
return expandIPv6(string, 8);
} else if (match = string.match(ipv6Regexes['transitional'])) {
zoneId = match[6] || '';
addr = expandIPv6(match[1].slice(0, -1) + zoneId, 6);
if (addr.parts) {
octets = [parseInt(match[2]), parseInt(match[3]), parseInt(match[4]), parseInt(match[5])];
for (k = 0, len = octets.length; k < len; k++) {
octet = octets[k];
if (!((0 <= octet && octet <= 255))) {
return null;
}
}
addr.parts.push(octets[0] << 8 | octets[1]);
addr.parts.push(octets[2] << 8 | octets[3]);
return {
parts: addr.parts,
zoneId: addr.zoneId
};
}
}
return null;
};
ipaddr.IPv4.isIPv4 = ipaddr.IPv6.isIPv6 = function(string) {
return this.parser(string) !== null;
};
ipaddr.IPv4.isValid = function(string) {
var e;
try {
new this(this.parser(string));
return true;
} catch (error1) {
e = error1;
return false;
}
};
ipaddr.IPv4.isValidFourPartDecimal = function(string) {
if (ipaddr.IPv4.isValid(string) && string.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/)) {
return true;
} else {
return false;
}
};
ipaddr.IPv6.isValid = function(string) {
var addr, e;
if (typeof string === "string" && string.indexOf(":") === -1) {
return false;
}
try {
addr = this.parser(string);
new this(addr.parts, addr.zoneId);
return true;
} catch (error1) {
e = error1;
return false;
}
};
ipaddr.IPv4.parse = function(string) {
var parts;
parts = this.parser(string);
if (parts === null) {
throw new Error("ipaddr: string is not formatted like ip address");
}
return new this(parts);
};
ipaddr.IPv6.parse = function(string) {
var addr;
addr = this.parser(string);
if (addr.parts === null) {
throw new Error("ipaddr: string is not formatted like ip address");
}
return new this(addr.parts, addr.zoneId);
};
ipaddr.IPv4.parseCIDR = function(string) {
var maskLength, match, parsed;
if (match = string.match(/^(.+)\/(\d+)$/)) {
maskLength = parseInt(match[2]);
if (maskLength >= 0 && maskLength <= 32) {
parsed = [this.parse(match[1]), maskLength];
Object.defineProperty(parsed, 'toString', {
value: function() {
return this.join('/');
}
});
return parsed;
}
}
throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range");
};
ipaddr.IPv4.subnetMaskFromPrefixLength = function(prefix) {
var filledOctetCount, j, octets;
prefix = parseInt(prefix);
if (prefix < 0 || prefix > 32) {
throw new Error('ipaddr: invalid IPv4 prefix length');
}
octets = [0, 0, 0, 0];
j = 0;
filledOctetCount = Math.floor(prefix / 8);
while (j < filledOctetCount) {
octets[j] = 255;
j++;
}
if (filledOctetCount < 4) {
octets[filledOctetCount] = Math.pow(2, prefix % 8) - 1 << 8 - (prefix % 8);
}
return new this(octets);
};
ipaddr.IPv4.broadcastAddressFromCIDR = function(string) {
var cidr, error, i, ipInterfaceOctets, octets, subnetMaskOctets;
try {
cidr = this.parseCIDR(string);
ipInterfaceOctets = cidr[0].toByteArray();
subnetMaskOctets = this.subnetMaskFromPrefixLength(cidr[1]).toByteArray();
octets = [];
i = 0;
while (i < 4) {
octets.push(parseInt(ipInterfaceOctets[i], 10) | parseInt(subnetMaskOctets[i], 10) ^ 255);
i++;
}
return new this(octets);
} catch (error1) {
error = error1;
throw new Error('ipaddr: the address does not have IPv4 CIDR format');
}
};
ipaddr.IPv4.networkAddressFromCIDR = function(string) {
var cidr, error, i, ipInterfaceOctets, octets, subnetMaskOctets;
try {
cidr = this.parseCIDR(string);
ipInterfaceOctets = cidr[0].toByteArray();
subnetMaskOctets = this.subnetMaskFromPrefixLength(cidr[1]).toByteArray();
octets = [];
i = 0;
while (i < 4) {
octets.push(parseInt(ipInterfaceOctets[i], 10) & parseInt(subnetMaskOctets[i], 10));
i++;
}
return new this(octets);
} catch (error1) {
error = error1;
throw new Error('ipaddr: the address does not have IPv4 CIDR format');
}
};
ipaddr.IPv6.parseCIDR = function(string) {
var maskLength, match, parsed;
if (match = string.match(/^(.+)\/(\d+)$/)) {
maskLength = parseInt(match[2]);
if (maskLength >= 0 && maskLength <= 128) {
parsed = [this.parse(match[1]), maskLength];
Object.defineProperty(parsed, 'toString', {
value: function() {
return this.join('/');
}
});
return parsed;
}
}
throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range");
};
ipaddr.isValid = function(string) {
return ipaddr.IPv6.isValid(string) || ipaddr.IPv4.isValid(string);
};
ipaddr.parse = function(string) {
if (ipaddr.IPv6.isValid(string)) {
return ipaddr.IPv6.parse(string);
} else if (ipaddr.IPv4.isValid(string)) {
return ipaddr.IPv4.parse(string);
} else {
throw new Error("ipaddr: the address has neither IPv6 nor IPv4 format");
}
};
ipaddr.parseCIDR = function(string) {
var e;
try {
return ipaddr.IPv6.parseCIDR(string);
} catch (error1) {
e = error1;
try {
return ipaddr.IPv4.parseCIDR(string);
} catch (error1) {
e = error1;
throw new Error("ipaddr: the address has neither IPv6 nor IPv4 CIDR format");
}
}
};
ipaddr.fromByteArray = function(bytes) {
var length;
length = bytes.length;
if (length === 4) {
return new ipaddr.IPv4(bytes);
} else if (length === 16) {
return new ipaddr.IPv6(bytes);
} else {
throw new Error("ipaddr: the binary input is neither an IPv6 nor IPv4 address");
}
};
ipaddr.process = function(string) {
var addr;
addr = this.parse(string);
if (addr.kind() === 'ipv6' && addr.isIPv4MappedAddress()) {
return addr.toIPv4Address();
} else {
return addr;
}
};
}).call(this);
@@ -0,0 +1,24 @@
//#region src/middleware/powered-by/index.ts
/**
* Powered By Middleware for Hono.
*
* @param options - The options for the Powered By Middleware.
* @returns {MiddlewareHandler} The middleware handler function.
*
* @example
* ```ts
* import { poweredBy } from 'hono/powered-by'
*
* const app = new Hono()
*
* app.use(poweredBy()) // With options: poweredBy({ serverName: "My Server" })
* ```
*/
const poweredBy = (options) => {
return async function poweredBy(c, next) {
await next();
c.res.headers.set("X-Powered-By", options?.serverName ?? "Hono");
};
};
//#endregion
export { poweredBy };
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2017 Anton Korzunov
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
@@ -0,0 +1,146 @@
/*!
* statuses
* Copyright(c) 2014 Jonathan Ong
* Copyright(c) 2016 Douglas Christopher Wilson
* MIT Licensed
*/
'use strict'
/**
* Module dependencies.
* @private
*/
var codes = require('./codes.json')
/**
* Module exports.
* @public
*/
module.exports = status
// status code to message map
status.message = codes
// status message (lower-case) to code map
status.code = createMessageToStatusCodeMap(codes)
// array of status codes
status.codes = createStatusCodeList(codes)
// status codes for redirects
status.redirect = {
300: true,
301: true,
302: true,
303: true,
305: true,
307: true,
308: true
}
// status codes for empty bodies
status.empty = {
204: true,
205: true,
304: true
}
// status codes for when you should retry the request
status.retry = {
502: true,
503: true,
504: true
}
/**
* Create a map of message to status code.
* @private
*/
function createMessageToStatusCodeMap (codes) {
var map = {}
Object.keys(codes).forEach(function forEachCode (code) {
var message = codes[code]
var status = Number(code)
// populate map
map[message.toLowerCase()] = status
})
return map
}
/**
* Create a list of all status codes.
* @private
*/
function createStatusCodeList (codes) {
return Object.keys(codes).map(function mapCode (code) {
return Number(code)
})
}
/**
* Get the status code for given message.
* @private
*/
function getStatusCode (message) {
var msg = message.toLowerCase()
if (!Object.prototype.hasOwnProperty.call(status.code, msg)) {
throw new Error('invalid status message: "' + message + '"')
}
return status.code[msg]
}
/**
* Get the status message for given code.
* @private
*/
function getStatusMessage (code) {
if (!Object.prototype.hasOwnProperty.call(status.message, code)) {
throw new Error('invalid status code: ' + code)
}
return status.message[code]
}
/**
* Get the status code.
*
* Given a number, this will throw if it is not a known status
* code, otherwise the code will be returned. Given a string,
* the string will be parsed for a number and return the code
* if valid, otherwise will lookup the code assuming this is
* the status message.
*
* @param {string|number} code
* @returns {number}
* @public
*/
function status (code) {
if (typeof code === 'number') {
return getStatusMessage(code)
}
if (typeof code !== 'string') {
throw new TypeError('code must be a number or string')
}
// '403'
var n = parseInt(code, 10)
if (!isNaN(n)) {
return getStatusMessage(n)
}
return getStatusCode(code)
}
@@ -0,0 +1,30 @@
import { useMatch } from "./useMatch.js";
//#region src/useParams.tsx
/**
* Access the current route's path parameters with type-safety.
*
* Options:
* - `from`/`strict`: Specify the matched route and whether to enforce strict typing
* - `select`: Project the params object to a derived value for memoized renders
* - `structuralSharing`: Enable structural sharing for stable references
* - `shouldThrow`: Throw if the route is not found in strict contexts
*
* @returns The params object (or selected value) for the matched route.
* @link https://tanstack.com/router/latest/docs/framework/react/api/router/useParamsHook
*/
function useParams(opts) {
return useMatch({
from: opts.from,
shouldThrow: opts.shouldThrow,
structuralSharing: opts.structuralSharing,
strict: opts.strict,
select: (match) => {
const params = opts.strict === false ? match.params : match._strictParams;
return opts.select ? opts.select(params) : params;
}
});
}
//#endregion
export { useParams };
//# sourceMappingURL=useParams.js.map
@@ -0,0 +1 @@
{"version":3,"file":"message-square-diff.js","sources":["../../../src/icons/message-square-diff.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name MessageSquareDiff\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJtNSAxOS0yIDJWNWEyIDIgMCAwIDEgMi0yaDE0YTIgMiAwIDAgMSAyIDJ2MTBhMiAyIDAgMCAxLTIgMiIgLz4KICA8cGF0aCBkPSJNOSAxMGg2IiAvPgogIDxwYXRoIGQ9Ik0xMiA3djYiIC8+CiAgPHBhdGggZD0iTTkgMTdoNiIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/message-square-diff\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 MessageSquareDiff = createLucideIcon('MessageSquareDiff', [\n ['path', { d: 'm5 19-2 2V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2', key: '1xuzuj' }],\n ['path', { d: 'M9 10h6', key: '9gxzsh' }],\n ['path', { d: 'M12 7v6', key: 'lw1j43' }],\n ['path', { d: 'M9 17h6', key: 'r8uit2' }],\n]);\n\nexport default MessageSquareDiff;\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,CAAA,CAAA,CAAoB,iBAAiB,mBAAqB,CAAA,CAAA,CAAA;AAAA,CAAA,CAC9D,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA+D,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,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC5F,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,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC1C,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,9 @@
/**
* @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.
*/
export { default } from './arrow-up-narrow-wide.js';
//# sourceMappingURL=sort-asc.js.map
@@ -0,0 +1,154 @@
import type { TSESLint } from '@typescript-eslint/utils';
import type { CompatibleConfig, CompatibleConfigArray, CompatibleParser, CompatiblePlugin } from './compatibility-types';
import { config } from './config-helper';
export type { FlatConfig } from '@typescript-eslint/utils/ts-eslint';
export declare const parser: CompatibleParser;
export declare const plugin: CompatiblePlugin;
export declare const configs: {
/**
* Enables each the rules provided as a part of typescript-eslint. Note that many rules are not applicable in all codebases, or are meant to be configured.
* @see {@link https://typescript-eslint.io/users/configs#all}
*/
all: CompatibleConfigArray;
/**
* A minimal ruleset that sets only the required parser and plugin options needed to run typescript-eslint.
* We don't recommend using this directly; instead, extend from an earlier recommended rule.
* @see {@link https://typescript-eslint.io/users/configs#base}
*/
base: CompatibleConfig;
/**
* A utility ruleset that will disable type-aware linting and all type-aware rules available in our project.
* @see {@link https://typescript-eslint.io/users/configs#disable-type-checked}
*/
disableTypeChecked: CompatibleConfig;
/**
* This is a compatibility ruleset that:
* - disables rules from eslint:recommended which are already handled by TypeScript.
* - enables rules that make sense due to TS's typechecking / transpilation.
* @see {@link https://typescript-eslint.io/users/configs/#eslint-recommended}
*/
eslintRecommended: CompatibleConfig;
/**
* Recommended rules for code correctness that you can drop in without additional configuration.
* @see {@link https://typescript-eslint.io/users/configs#recommended}
*/
recommended: CompatibleConfigArray;
/**
* Contains all of `recommended` along with additional recommended rules that require type information.
* @see {@link https://typescript-eslint.io/users/configs#recommended-type-checked}
*/
recommendedTypeChecked: CompatibleConfigArray;
/**
* A version of `recommended` that only contains type-checked rules and disables of any corresponding core ESLint rules.
* @see {@link https://typescript-eslint.io/users/configs#recommended-type-checked-only}
*/
recommendedTypeCheckedOnly: CompatibleConfigArray;
/**
* Contains all of `recommended`, as well as additional strict rules that can also catch bugs.
* @see {@link https://typescript-eslint.io/users/configs#strict}
*/
strict: CompatibleConfigArray;
/**
* Contains all of `recommended`, `recommended-type-checked`, and `strict`, along with additional strict rules that require type information.
* @see {@link https://typescript-eslint.io/users/configs#strict-type-checked}
*/
strictTypeChecked: CompatibleConfigArray;
/**
* A version of `strict` that only contains type-checked rules and disables of any corresponding core ESLint rules.
* @see {@link https://typescript-eslint.io/users/configs#strict-type-checked-only}
*/
strictTypeCheckedOnly: CompatibleConfigArray;
/**
* Rules considered to be best practice for modern TypeScript codebases, but that do not impact program logic.
* @see {@link https://typescript-eslint.io/users/configs#stylistic}
*/
stylistic: CompatibleConfigArray;
/**
* Contains all of `stylistic`, along with additional stylistic rules that require type information.
* @see {@link https://typescript-eslint.io/users/configs#stylistic-type-checked}
*/
stylisticTypeChecked: CompatibleConfigArray;
/**
* A version of `stylistic` that only contains type-checked rules and disables of any corresponding core ESLint rules.
* @see {@link https://typescript-eslint.io/users/configs#stylistic-type-checked-only}
*/
stylisticTypeCheckedOnly: CompatibleConfigArray;
};
export type Config = TSESLint.FlatConfig.ConfigFile;
declare const _default: {
config: typeof config;
configs: {
/**
* Enables each the rules provided as a part of typescript-eslint. Note that many rules are not applicable in all codebases, or are meant to be configured.
* @see {@link https://typescript-eslint.io/users/configs#all}
*/
all: CompatibleConfigArray;
/**
* A minimal ruleset that sets only the required parser and plugin options needed to run typescript-eslint.
* We don't recommend using this directly; instead, extend from an earlier recommended rule.
* @see {@link https://typescript-eslint.io/users/configs#base}
*/
base: CompatibleConfig;
/**
* A utility ruleset that will disable type-aware linting and all type-aware rules available in our project.
* @see {@link https://typescript-eslint.io/users/configs#disable-type-checked}
*/
disableTypeChecked: CompatibleConfig;
/**
* This is a compatibility ruleset that:
* - disables rules from eslint:recommended which are already handled by TypeScript.
* - enables rules that make sense due to TS's typechecking / transpilation.
* @see {@link https://typescript-eslint.io/users/configs/#eslint-recommended}
*/
eslintRecommended: CompatibleConfig;
/**
* Recommended rules for code correctness that you can drop in without additional configuration.
* @see {@link https://typescript-eslint.io/users/configs#recommended}
*/
recommended: CompatibleConfigArray;
/**
* Contains all of `recommended` along with additional recommended rules that require type information.
* @see {@link https://typescript-eslint.io/users/configs#recommended-type-checked}
*/
recommendedTypeChecked: CompatibleConfigArray;
/**
* A version of `recommended` that only contains type-checked rules and disables of any corresponding core ESLint rules.
* @see {@link https://typescript-eslint.io/users/configs#recommended-type-checked-only}
*/
recommendedTypeCheckedOnly: CompatibleConfigArray;
/**
* Contains all of `recommended`, as well as additional strict rules that can also catch bugs.
* @see {@link https://typescript-eslint.io/users/configs#strict}
*/
strict: CompatibleConfigArray;
/**
* Contains all of `recommended`, `recommended-type-checked`, and `strict`, along with additional strict rules that require type information.
* @see {@link https://typescript-eslint.io/users/configs#strict-type-checked}
*/
strictTypeChecked: CompatibleConfigArray;
/**
* A version of `strict` that only contains type-checked rules and disables of any corresponding core ESLint rules.
* @see {@link https://typescript-eslint.io/users/configs#strict-type-checked-only}
*/
strictTypeCheckedOnly: CompatibleConfigArray;
/**
* Rules considered to be best practice for modern TypeScript codebases, but that do not impact program logic.
* @see {@link https://typescript-eslint.io/users/configs#stylistic}
*/
stylistic: CompatibleConfigArray;
/**
* Contains all of `stylistic`, along with additional stylistic rules that require type information.
* @see {@link https://typescript-eslint.io/users/configs#stylistic-type-checked}
*/
stylisticTypeChecked: CompatibleConfigArray;
/**
* A version of `stylistic` that only contains type-checked rules and disables of any corresponding core ESLint rules.
* @see {@link https://typescript-eslint.io/users/configs#stylistic-type-checked-only}
*/
stylisticTypeCheckedOnly: CompatibleConfigArray;
};
parser: CompatibleParser;
plugin: CompatiblePlugin;
};
export default _default;
export { config, type ConfigWithExtends, type InfiniteDepthConfigWithExtends, type ConfigArray, } from './config-helper';
@@ -0,0 +1,7 @@
{
"version": 3,
"sources": ["../src/popover.tsx"],
"sourcesContent": ["import * as React from 'react';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { DismissableLayer } from '@radix-ui/react-dismissable-layer';\nimport { useFocusGuards } from '@radix-ui/react-focus-guards';\nimport { FocusScope } from '@radix-ui/react-focus-scope';\nimport { useId } from '@radix-ui/react-id';\nimport * as PopperPrimitive from '@radix-ui/react-popper';\nimport { createPopperScope } from '@radix-ui/react-popper';\nimport { Portal as PortalPrimitive } from '@radix-ui/react-portal';\nimport { Presence } from '@radix-ui/react-presence';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { createSlot } from '@radix-ui/react-slot';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { hideOthers } from 'aria-hidden';\nimport { RemoveScroll } from 'react-remove-scroll';\n\nimport type { Scope } from '@radix-ui/react-context';\n\n/* -------------------------------------------------------------------------------------------------\n * Popover\n * -----------------------------------------------------------------------------------------------*/\n\nconst POPOVER_NAME = 'Popover';\n\ntype ScopedProps<P> = P & { __scopePopover?: Scope };\nconst [createPopoverContext, createPopoverScope] = createContextScope(POPOVER_NAME, [\n createPopperScope,\n]);\nconst usePopperScope = createPopperScope();\n\ntype PopoverContextValue = {\n triggerRef: React.RefObject<HTMLButtonElement | null>;\n contentId: string;\n open: boolean;\n onOpenChange(open: boolean): void;\n onOpenToggle(): void;\n hasCustomAnchor: boolean;\n onCustomAnchorAdd(): void;\n onCustomAnchorRemove(): void;\n modal: boolean;\n};\n\nconst [PopoverProvider, usePopoverContext] =\n createPopoverContext<PopoverContextValue>(POPOVER_NAME);\n\ninterface PopoverProps {\n children?: React.ReactNode;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean) => void;\n modal?: boolean;\n}\n\nconst Popover: React.FC<PopoverProps> = (props: ScopedProps<PopoverProps>) => {\n const {\n __scopePopover,\n children,\n open: openProp,\n defaultOpen,\n onOpenChange,\n modal = false,\n } = props;\n const popperScope = usePopperScope(__scopePopover);\n const triggerRef = React.useRef<HTMLButtonElement>(null);\n const [hasCustomAnchor, setHasCustomAnchor] = React.useState(false);\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: onOpenChange,\n caller: POPOVER_NAME,\n });\n\n return (\n <PopperPrimitive.Root {...popperScope}>\n <PopoverProvider\n scope={__scopePopover}\n contentId={useId()}\n triggerRef={triggerRef}\n open={open}\n onOpenChange={setOpen}\n onOpenToggle={React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen])}\n hasCustomAnchor={hasCustomAnchor}\n onCustomAnchorAdd={React.useCallback(() => setHasCustomAnchor(true), [])}\n onCustomAnchorRemove={React.useCallback(() => setHasCustomAnchor(false), [])}\n modal={modal}\n >\n {children}\n </PopoverProvider>\n </PopperPrimitive.Root>\n );\n};\n\nPopover.displayName = POPOVER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * PopoverAnchor\n * -----------------------------------------------------------------------------------------------*/\n\nconst ANCHOR_NAME = 'PopoverAnchor';\n\ntype PopoverAnchorElement = React.ComponentRef<typeof PopperPrimitive.Anchor>;\ntype PopperAnchorProps = React.ComponentPropsWithoutRef<typeof PopperPrimitive.Anchor>;\ninterface PopoverAnchorProps extends PopperAnchorProps {}\n\nconst PopoverAnchor = React.forwardRef<PopoverAnchorElement, PopoverAnchorProps>(\n (props: ScopedProps<PopoverAnchorProps>, forwardedRef) => {\n const { __scopePopover, ...anchorProps } = props;\n const context = usePopoverContext(ANCHOR_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n const { onCustomAnchorAdd, onCustomAnchorRemove } = context;\n\n React.useEffect(() => {\n onCustomAnchorAdd();\n return () => onCustomAnchorRemove();\n }, [onCustomAnchorAdd, onCustomAnchorRemove]);\n\n return <PopperPrimitive.Anchor {...popperScope} {...anchorProps} ref={forwardedRef} />;\n }\n);\n\nPopoverAnchor.displayName = ANCHOR_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * PopoverTrigger\n * -----------------------------------------------------------------------------------------------*/\n\nconst TRIGGER_NAME = 'PopoverTrigger';\n\ntype PopoverTriggerElement = React.ComponentRef<typeof Primitive.button>;\ntype PrimitiveButtonProps = React.ComponentPropsWithoutRef<typeoLine truncated
"mappings": ";;;AAAA,YAAY,WAAW;AACvB,SAAS,4BAA4B;AACrC,SAAS,uBAAuB;AAChC,SAAS,0BAA0B;AACnC,SAAS,wBAAwB;AACjC,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAC3B,SAAS,aAAa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AAS,MAAM;AACrB,gBAAM,kBAAkB,QAAQ,WAAW,SAAS,SAAS,MAAM;AACnE,cAAI,gBAAiB,OAAM,eAAe;AAM1C,cAAI,MAAM,OAAO,cAAc,SAAS,aAAa,yBAAyB,SAAS;AACrF,kBAAM,eAAe;AAAA,UACvB;AAAA,QACF;AAAA;AAAA,IACF;AAAA,EAEJ;AACF;AA8BA,IAAM,qBAA2B;AAAA,EAC/B,CAAC,OAA6C,iBAAiB;AAC7D,UAAM;AAAA,MACJ;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,GAAG;AAAA,IACL,IAAI;AACJ,UAAM,UAAU,kBAAkB,cAAc,cAAc;AAC9D,UAAM,cAAc,eAAe,cAAc;AAIjD,mBAAe;AAEf,WACE;AAAA,MAAC;AAAA;AAAA,QACC,SAAO;AAAA,QACP,MAAI;AAAA,QACJ,SAAS;AAAA,QACT,kBAAkB;AAAA,QAClB,oBAAoB;AAAA,QAEpB;AAAA,UAAC;AAAA;AAAA,YACC,SAAO;AAAA,YACP;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA,WLine truncated
"names": ["Root", "Anchor", "Content", "Arrow"]
}
@@ -0,0 +1,94 @@
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABILITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
/// <reference lib="es2024.collection" />
interface ReadonlySetLike<T> {
/**
* Despite its name, returns an iterator of the values in the set-like.
*/
keys(): Iterator<T>;
/**
* @returns a boolean indicating whether an element with the specified value exists in the set-like or not.
*/
has(value: T): boolean;
/**
* @returns the number of (unique) elements in the set-like.
*/
readonly size: number;
}
interface Set<T> {
/**
* @returns a new Set containing all the elements in this Set and also all the elements in the argument.
*/
union<U>(other: ReadonlySetLike<U>): Set<T | U>;
/**
* @returns a new Set containing all the elements which are both in this Set and in the argument.
*/
intersection<U>(other: ReadonlySetLike<U>): Set<T & U>;
/**
* @returns a new Set containing all the elements in this Set which are not also in the argument.
*/
difference<U>(other: ReadonlySetLike<U>): Set<T>;
/**
* @returns a new Set containing all the elements which are in either this Set or in the argument, but not in both.
*/
symmetricDifference<U>(other: ReadonlySetLike<U>): Set<T | U>;
/**
* @returns a boolean indicating whether all the elements in this Set are also in the argument.
*/
isSubsetOf(other: ReadonlySetLike<unknown>): boolean;
/**
* @returns a boolean indicating whether all the elements in the argument are also in this Set.
*/
isSupersetOf(other: ReadonlySetLike<unknown>): boolean;
/**
* @returns a boolean indicating whether this Set has no elements in common with the argument.
*/
isDisjointFrom(other: ReadonlySetLike<unknown>): boolean;
}
interface ReadonlySet<T> {
/**
* @returns a new Set containing all the elements in this Set and also all the elements in the argument.
*/
union<U>(other: ReadonlySetLike<U>): Set<T | U>;
/**
* @returns a new Set containing all the elements which are both in this Set and in the argument.
*/
intersection<U>(other: ReadonlySetLike<U>): Set<T & U>;
/**
* @returns a new Set containing all the elements in this Set which are not also in the argument.
*/
difference<U>(other: ReadonlySetLike<U>): Set<T>;
/**
* @returns a new Set containing all the elements which are in either this Set or in the argument, but not in both.
*/
symmetricDifference<U>(other: ReadonlySetLike<U>): Set<T | U>;
/**
* @returns a boolean indicating whether all the elements in this Set are also in the argument.
*/
isSubsetOf(other: ReadonlySetLike<unknown>): boolean;
/**
* @returns a boolean indicating whether all the elements in the argument are also in this Set.
*/
isSupersetOf(other: ReadonlySetLike<unknown>): boolean;
/**
* @returns a boolean indicating whether this Set has no elements in common with the argument.
*/
isDisjointFrom(other: ReadonlySetLike<unknown>): boolean;
}
@@ -0,0 +1,2 @@
import { n as CfWorkerSchemaDraft, t as CfWorkerJsonSchemaValidator } from "../cfWorkerProvider-C03CSigr.mjs";
export { CfWorkerJsonSchemaValidator, type CfWorkerSchemaDraft };
@@ -0,0 +1,4 @@
'use strict';
/** @type {import('./syntax')} */
module.exports = SyntaxError;
@@ -0,0 +1,20 @@
//#region src/hash-scroll.ts
/**
* @private
* Handles hash-based scrolling after navigation completes.
* To be used in framework-specific <Transitioner> components during the onResolved event.
*/
function handleHashScroll(router) {
if (typeof document !== "undefined" && document.querySelector) {
const location = router.stores.location.get();
const hashScrollIntoViewOptions = location.state.__hashScrollIntoViewOptions ?? true;
if (hashScrollIntoViewOptions && location.hash !== "") {
const el = document.getElementById(location.hash);
if (el) el.scrollIntoView(hashScrollIntoViewOptions);
}
}
}
//#endregion
export { handleHashScroll };
//# sourceMappingURL=hash-scroll.js.map
@@ -0,0 +1 @@
{"version":3,"file":"path-reservations.js","sourceRoot":"","sources":["../../src/path-reservations.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,iCAAiC;AACjC,qDAAqD;AACrD,mDAAmD;AACnD,EAAE;AACF,yDAAyD;AACzD,qDAAqD;AAErD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AACzD,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAA;AAElE,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,yBAAyB,IAAI,OAAO,CAAC,QAAQ,CAAA;AAC1E,MAAM,SAAS,GAAG,QAAQ,KAAK,OAAO,CAAA;AAStC,+CAA+C;AAC/C,0DAA0D;AAC1D,MAAM,OAAO,GAAG,CAAC,IAAY,EAAE,EAAE;IAC/B,MAAM,IAAI,GAAG,IAAI;SACd,KAAK,CA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AED,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;YACvB,MAAM,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;YAC/B,MAAM,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA;YACjB,uCAAuC;YACvC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,YAAY,GAAG,CAAC;gBAAE,SAAQ;YACxC,IAAI,EAAE,Line truncated
@@ -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 SunMoon = createLucideIcon("SunMoon", [
["path", { d: "M12 8a2.83 2.83 0 0 0 4 4 4 4 0 1 1-4-4", key: "1fu5g2" }],
["path", { d: "M12 2v2", key: "tus03m" }],
["path", { d: "M12 20v2", key: "1lh1kg" }],
["path", { d: "m4.9 4.9 1.4 1.4", key: "b9915j" }],
["path", { d: "m17.7 17.7 1.4 1.4", key: "qc3ed3" }],
["path", { d: "M2 12h2", key: "1t8f8n" }],
["path", { d: "M20 12h2", key: "1q8mjw" }],
["path", { d: "m6.3 17.7-1.4 1.4", key: "5gca6" }],
["path", { d: "m19.1 4.9-1.4 1.4", key: "wpu9u6" }]
]);
export { SunMoon as default };
//# sourceMappingURL=sun-moon.js.map
@@ -0,0 +1,16 @@
import { supportsLinearEasing } from '../../../utils/supports/linear-easing.mjs';
import { isGenerator } from '../../generators/utils/is-generator.mjs';
function applyGeneratorOptions({ type, ...options }) {
if (isGenerator(type) && supportsLinearEasing()) {
return type.applyToOptions(options);
}
else {
options.duration ?? (options.duration = 300);
options.ease ?? (options.ease = "easeOut");
}
return options;
}
export { applyGeneratorOptions };
//# sourceMappingURL=apply-generator.mjs.map
@@ -0,0 +1,74 @@
import { Address4 } from './ipv4';
import { Address6 } from './ipv6';
export interface ReverseFormOptions {
omitSuffix?: boolean;
}
/**
* Returns whether this address's *network* is contained within `address`,
* i.e. whether every address this one can represent also falls inside
* `address`. A network wider than `address` is not contained in it, so
* `10.0.0.0/8` is not in `10.0.0.0/16`.
*
* To ask whether the address itself falls inside a range, ignoring any CIDR
* suffix it was written with, use {@link isHostInSubnet} instead. That is the
* question the special-use classifiers ask.
*/
export declare function isInSubnet(this: Address4 | Address6, address: Address4 | Address6): boolean;
/**
* Returns whether this address's host bits fall inside `address`, ignoring
* this address's own subnet mask.
*
* This is the primitive the special-use classifiers (`isLoopback`,
* `isPrivate`, `isLinkLocal`, `getType`, …) are built on: they answer a
* question about the address, so the answer must not change with the CIDR
* suffix the caller happened to write. Use this rather than
* {@link isInSubnet} when classifying a single address — notably when the
* address came from untrusted input and the result backs a trust-boundary
* decision such as an SSRF allow/deny filter.
*
* An address of one family is never inside a network of the other, so an
* `Address4` against an `Address6` (or the reverse) is `false`. To compare
* across families, convert first: `Address6.fromAddress4()`, `to4()`, or
* `toAddress4Nat64()`.
*/
export declare function isHostInSubnet(this: Address4 | Address6, address: Address4 | Address6): boolean;
/**
* One parsed row of an IANA special-purpose address registry: the block, and
* whether the registry marks it globally reachable (`null` when the column is
* blank, in which case the containing block answers).
*/
export interface SpecialPurposeEntry<A extends Address4 | Address6> {
subnet: A;
reachable: boolean | null;
}
/**
* Returns whether the registry marks this address globally reachable: the
* answer of the most specific entry containing it that has one, or `true`
* when no entry contains it.
*/
export declare function isGloballyReachable<A extends Address4 | Address6>(this: A, entries: ReadonlyArray<SpecialPurposeEntry<A>>): boolean;
/**
* Adds `n` to `value` and returns the result, throwing `AddressError` unless
* `n` is an integer and the result stays within `[0, 2**bits - 1]`.
*/
export declare function offsetBigInt(value: bigint, n: number | bigint, bits: number, family: string): bigint;
export declare function isCorrect(defaultBits: number): (this: Address4 | Address6) => boolean;
/**
* Returns the prefix length (number of leading 1 bits) of a contiguous
* subnet mask. Throws `AddressError` if the mask is non-contiguous (e.g.
* `255.0.255.0`).
*/
export declare function prefixLengthFromMask(value: bigint, totalBits: number): number;
/**
* Throws `AddressError` unless `bytes` holds exactly `byteCount` integers,
* each from `minimum` to 255. Pass a `minimum` of `-128` where signed bytes
* are accepted and folded to unsigned, and `0` where they are not.
*/
export declare function assertByteArray(bytes: number[], byteCount: number, family: 'IPv4' | 'IPv6', minimum: number): void;
export declare function numberToPaddedHex(number: number): string;
export declare function stringToPaddedHex(numberString: string): string;
/**
* @param binaryValue Binary representation of a value (e.g. `10`)
* @param position Byte position, where 0 is the least significant bit
*/
export declare function testBit(binaryValue: string, position: number): boolean;
@@ -0,0 +1,92 @@
import { expect, test } from "vitest";
import * as z from "zod/v4";
const beforeBenchmarkDate = new Date(Date.UTC(2022, 10, 4));
const benchmarkDate = new Date(Date.UTC(2022, 10, 5));
const afterBenchmarkDate = new Date(Date.UTC(2022, 10, 6));
const minCheck = z.date().min(benchmarkDate);
const maxCheck = z.date().max(benchmarkDate);
test("passing validations", () => {
minCheck.parse(benchmarkDate);
minCheck.parse(afterBenchmarkDate);
maxCheck.parse(benchmarkDate);
maxCheck.parse(beforeBenchmarkDate);
});
test("date min", () => {
const result = minCheck.safeParse(beforeBenchmarkDate);
expect(result.success).toEqual(false);
expect(result.error!.issues).toMatchInlineSnapshot(`
[
{
"code": "too_small",
"inclusive": true,
"message": "Too small: expected date to be >=1667606400000",
"minimum": 1667606400000,
"origin": "date",
"path": [],
},
]
`);
});
test("date max", () => {
const result = maxCheck.safeParse(afterBenchmarkDate);
expect(result.success).toEqual(false);
expect(result.error!.issues).toMatchInlineSnapshot(`
[
{
"code": "too_big",
"inclusive": true,
"maximum": 1667606400000,
"message": "Too big: expected date to be <=1667606400000",
"origin": "date",
"path": [],
},
]
`);
});
test("date min/max origin with numeric bound", () => {
const minRes = z.date().min(benchmarkDate.getTime()).safeParse(beforeBenchmarkDate);
expect(minRes.error!.issues).toMatchInlineSnapshot(`
[
{
"code": "too_small",
"inclusive": true,
"message": "Too small: expected date to be >=1667606400000",
"minimum": 1667606400000,
"origin": "date",
"path": [],
},
]
`);
const maxRes = z.date().max(benchmarkDate.getTime()).safeParse(afterBenchmarkDate);
expect(maxRes.error!.issues).toMatchInlineSnapshot(`
[
{
"code": "too_big",
"inclusive": true,
"maximum": 1667606400000,
"message": "Too big: expected date to be <=1667606400000",
"origin": "date",
"path": [],
},
]
`);
});
test("min max getters", () => {
expect(minCheck.minDate).toEqual(benchmarkDate);
expect(minCheck.min(afterBenchmarkDate).minDate).toEqual(afterBenchmarkDate);
expect(maxCheck.maxDate).toEqual(benchmarkDate);
expect(maxCheck.max(beforeBenchmarkDate).maxDate).toEqual(beforeBenchmarkDate);
});
@@ -0,0 +1 @@
{"version":3,"file":"blake2.d.ts","sourceRoot":"","sources":["src/blake2.ts"],"names":[],"mappings":"AASA,OAAO,EAKL,KAAK,KAAK,EACV,KAAK,IAAI,EACT,KAAK,IAAI,EACT,KAAK,IAAI,EACV,MAAM,YAAY,CAAC;AAEpB;;;;GAIG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB,6FAA6F;IAC7F,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wBAAwB;IACxB,GAAG,CAAC,EAAE,UAAU,CAAC;IACjB,+CAA+C;IAC/C,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,sCAAsC;IACtC,eAAe,CAAC,EAAE,UAAU,CAAC;CAC9B,CAAC;AAiFF,sCAAsC;AACtC,8BAAsB,OAAO,CAAC,CAAC,SAAS,OAAO,CAAC,CAAC,CAAC,CAAE,YAAW,IAAI,CAAC,CAAC,CAAC;IACpE,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,GAAG,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,GAAG,IAAI;IACpF,SAAS,CAAC,QAAQ,CAAC,GAAG,IAAI,MAAM,EAAE;IAClC,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,IAAI,EAAE,MAAM,EAAE,GAAG,IAAI;IAC/C,QAAQ,CAAC,OAAO,IA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EAAE,CAAiB;gBAEf,IAAI,GAAE,UAAe;IAgCjC,SAAS,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;IAKjF,SAAS,CAAC,GAAG,CACX,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAC7F,IAAI;IAUP,SAAS,CAAC,QAAQ,CAAC,GAAG,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,GAAG,IAAI;IAoB3E,OAAO,IAAI,IAAI;CAKhB;AAED;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,UAAU,CAAC,CAErD,CAAC"}
@@ -0,0 +1,306 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const require_runtime = require("../../../_virtual/_rolldown/runtime.js");
const require_jsx_context = require("../../context.js");
const require_jsx_intrinsic_element_common = require("../../intrinsic-element/common.js");
const require_jsx_dom_render = require("../render.js");
const require_jsx_hooks_index = require("../../hooks/index.js");
const require_jsx_dom_hooks_index = require("../hooks/index.js");
//#region src/jsx/dom/intrinsic-element/components.ts
var components_exports = /* @__PURE__ */ require_runtime.__exportAll({
button: () => button,
clearCache: () => clearCache,
composeRef: () => composeRef,
form: () => form,
input: () => input,
link: () => link,
meta: () => meta,
script: () => script,
style: () => style,
title: () => title
});
const clearCache = () => {
blockingPromiseMap = Object.create(null);
createdElements = Object.create(null);
};
const composeRef = (ref, cb) => {
return require_jsx_hooks_index.useMemo(() => (e) => {
let refCleanup;
if (ref) {
if (typeof ref === "function") refCleanup = ref(e) || (() => {
ref(null);
});
else if (ref && "current" in ref) {
ref.current = e;
refCleanup = () => {
ref.current = null;
};
}
}
const cbCleanup = cb(e);
return () => {
cbCleanup?.();
refCleanup?.();
};
}, [ref]);
};
let blockingPromiseMap = Object.create(null);
let createdElements = Object.create(null);
const documentMetadataTag = (tag, props, preserveNodeType, supportSort, supportBlocking) => {
if (props?.itemProp) return {
tag,
props,
type: tag,
ref: props.ref
};
const head = document.head;
let { onLoad, onError, precedence, blocking, ...restProps } = props;
let element = null;
let created = false;
const deDupeKeys = require_jsx_intrinsic_element_common.deDupeKeyMap[tag];
const deDupeByKey = require_jsx_intrinsic_element_common.shouldDeDupeByKey(tag, supportSort);
const isDeDupeCandidateLink = (e) => e.getAttribute("rel") === "stylesheet" && e.getAttribute("data-precedence") !== null;
let existingElements = void 0;
if (deDupeByKey) {
const tags = head.querySelectorAll(tag);
LOOP: for (const e of tags) {
if (tag === "link" && !isDeDupeCandidateLink(e)) continue;
for (const key of deDupeKeys) if (e.getAttribute(key) === props[key]) {
element = e;
break LOOP;
}
}
if (!element) {
const cacheKey = deDupeKeys.reduce((acc, key) => props[key] === void 0 ? acc : `${acc}-${key}-${props[key]}`, tag);
created = !createdElements[cacheKey];
element = createdElements[cacheKey] ||= (() => {
const e = document.createElement(tag);
for (const key of deDupeKeys) if (props[key] !== void 0) e.setAttribute(key, props[key]);
if (props.rel) e.setAttribute("rel", props.rel);
return e;
})();
}
} else existingElements = head.querySelectorAll(tag);
precedence = supportSort ? precedence ?? "" : void 0;
if (supportSort) restProps[require_jsx_intrinsic_element_common.dataPrecedenceAttr] = precedence;
const insert = require_jsx_hooks_index.useCallback((e) => {
if (deDupeByKey) {
if (tag === "link" && precedence !== void 0) {
let found = false;
for (const existingElement of head.querySelectorAll(tag)) {
const existingPrecedence = existingElement.getAttribute(require_jsx_intrinsic_element_common.dataPrecedenceAttr);
if (existingPrecedence === null) {
head.insertBefore(e, existingElement);
return;
}
if (found && existingPrecedence !== precedence) {
head.insertBefore(e, existingElement);
return;
}
if (existingPrecedence === precedence) found = true;
}
head.appendChild(e);
return;
}
let found = false;
for (const existingElement of head.querySelectorAll(tag)) {
if (found && existingElement.getAttribute("data-precedence") !== precedence) {
head.insertBefore(e, existingElement);
return;
}
if (existingElement.getAttribute("data-precedence") === precedence) found = true;
}
head.appendChild(e);
} else if (tag === "link") {
if (!head.contains(e)) head.appendChild(e);
} else if (existingElements) {
let found = false;
for (const existingElement of existingElements) if (existingElement === e) {
found = true;
break;
}
if (!found) head.insertBefore(e, head.contains(existingElements[0]) ? existingElements[0] : head.querySelector(tag));
existingElements = void 0;
}
}, [
deDupeByKey,
precedence,
tag
]);
const ref = composeRef(props.ref, (e) => {
const key = deDupeKeys[0];
if (preserveNodeType === 2) e.innerHTML = "";
if (created || existingElements) insert(e);
if (!onError && !onLoad) return;
if (!key) return;
let promise = blockingPromiseMap[e.getAttribute(key)] ||= new Promise((resolve, reject) => {
e.addEventListener("load", resolve);
e.addEventListener("error", reject);
});
if (onLoad) promise = promise.then(onLoad);
if (onError) promise = promise.catch(onError);
promise.catch(() => {});
});
if (supportBlocking && blocking === "render") {
const key = require_jsx_intrinsic_element_common.deDupeKeyMap[tag][0];
if (key && props[key]) {
const value = props[key];
const promise = blockingPromiseMap[value] ||= new Promise((resolve, reject) => {
insert(element);
element.addEventListener("load", resolve);
element.addEventListener("error", reject);
});
require_jsx_hooks_index.use(promise);
}
}
const jsxNode = {
tag,
type: tag,
props: {
...restProps,
ref
},
ref
};
jsxNode.p = preserveNodeType;
if (element) jsxNode.e = element;
return require_jsx_dom_render.createPortal(jsxNode, head);
};
const title = (props) => {
const nameSpaceContext = require_jsx_dom_render.getNameSpaceContext();
if ((nameSpaceContext && require_jsx_context.useContext(nameSpaceContext))?.endsWith("svg")) return {
tag: "title",
props,
type: "title",
ref: props.ref
};
return documentMetadataTag("title", props, void 0, false, false);
};
const script = (props) => {
if (!props || ["src", "async"].some((k) => !props[k])) return {
tag: "script",
props,
type: "script",
ref: props.ref
};
return documentMetadataTag("script", props, 1, false, true);
};
const style = (props) => {
if (!props || !["href", "precedence"].every((k) => k in props)) return {
tag: "style",
props,
type: "style",
ref: props.ref
};
props["data-href"] = props.href;
delete props.href;
return documentMetadataTag("style", props, 2, true, true);
};
const link = (props) => {
if (!props || ["onLoad", "onError"].some((k) => k in props) || props.rel === "stylesheet" && (!("precedence" in props) || "disabled" in props)) return {
tag: "link",
props,
type: "link",
ref: props.ref
};
return documentMetadataTag("link", props, 1, require_jsx_intrinsic_element_common.isStylesheetLinkWithPrecedence(props), true);
};
const meta = (props) => {
return documentMetadataTag("meta", props, void 0, false, false);
};
const customEventFormAction = Symbol();
const form = (props) => {
const { action, ...restProps } = props;
if (typeof action !== "function") restProps.action = action;
const [state, setState] = require_jsx_hooks_index.useState([null, false]);
const onSubmit = require_jsx_hooks_index.useCallback(async (ev) => {
const currentAction = ev.isTrusted ? action : ev.detail[customEventFormAction];
if (typeof currentAction !== "function") return;
ev.preventDefault();
const formData = new FormData(ev.target);
setState([formData, true]);
const actionRes = currentAction(formData);
if (actionRes instanceof Promise) {
require_jsx_dom_hooks_index.registerAction(actionRes);
await actionRes;
}
setState([null, true]);
}, []);
const ref = composeRef(props.ref, (el) => {
el.addEventListener("submit", onSubmit);
return () => {
el.removeEventListener("submit", onSubmit);
};
});
const [data, isDirty] = state;
state[1] = false;
return {
tag: require_jsx_dom_hooks_index.FormContext,
props: {
value: {
pending: data !== null,
data,
method: data ? "post" : null,
action: data ? action : null
},
children: {
tag: "form",
props: {
...restProps,
ref
},
type: "form",
ref
}
},
f: isDirty
};
};
const formActionableElement = (tag, { formAction, ...props }) => {
if (typeof formAction === "function") {
const onClick = require_jsx_hooks_index.useCallback((ev) => {
ev.preventDefault();
ev.currentTarget.form.dispatchEvent(new CustomEvent("submit", { detail: { [customEventFormAction]: formAction } }));
}, []);
props.ref = composeRef(props.ref, (el) => {
el.addEventListener("click", onClick);
return () => {
el.removeEventListener("click", onClick);
};
});
}
return {
tag,
props,
type: tag,
ref: props.ref
};
};
const input = (props) => formActionableElement("input", props);
const button = (props) => formActionableElement("button", props);
Object.assign(require_jsx_intrinsic_element_common.domRenderers, {
title,
script,
style,
link,
meta,
form,
input,
button
});
//#endregion
exports.button = button;
exports.clearCache = clearCache;
Object.defineProperty(exports, "components_exports", {
enumerable: true,
get: function() {
return components_exports;
}
});
exports.composeRef = composeRef;
exports.form = form;
exports.input = input;
exports.link = link;
exports.meta = meta;
exports.script = script;
exports.style = style;
exports.title = title;
@@ -0,0 +1 @@
{"version":3,"file":"bundle-cjs.js","sources":["../src/lib/utils.ts","../src/lib/class-group-utils.ts","../src/lib/lru-cache.ts","../src/lib/parse-class-name.ts","../src/lib/sort-modifiers.ts","../src/lib/config-utils.ts","../src/lib/merge-classlist.ts","../src/lib/tw-join.ts","../src/lib/create-tailwind-merge.ts","../src/lib/from-theme.ts","../src/lib/validators.ts","../src/lib/default-config.ts","../src/lib/merge-configs.ts","../src/lib/extend-tailwind-merge.ts","../src/lib/tw-merge.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],"names":["concatArrays","array1","array2","combinedArray","Array","length","i","createClassValidatorObject","classGroupId","validator","createClassPartObject","nextPart","Map","validators","CLASS_PART_SEPARATOR","EMPTY_CONFLICTS","ARBITRARY_PROPERTY_PREFIX","createClassGroupUtils","config","classMap","createClassMap","conflictingClassGroups","conflictingClassGroupModifiers","getClassGroupId","className","startsWith","endsWith","getGroupIdForArbitraryProperty","classParts","split","startIndex","getGroupRecursive","getConflictingClassGroupIds","hasPostfixModifier","modifierConflicts","baseConflicts","classPartObject","classPathsLength","currentClassPart","nextClassPartObject","get","result","undefined","classRest","join","slice","validatorsLength","validatorObj","indexOf","content","colonIndex","property","theme","classGroups","processClassGroups","group","processClassesRecursively","classGroup","len","classDefinition","processClassDefinition","processStringDefinition","processFunctionDefinition","processObjectDefinition","classPartObjectToEdit","getPart","isThemeGetter","push","entries","Object","key","value","path","current","parts","part","next","set","func","createLruCache","maxCacheSize","cacheSize","cache","create","previousCache","update","IMPORTANT_MODIFIER","MODIFIER_SEPARATOR","EMPTY_MODIFIERS","createResultObject","modifiers","hasImportantModifier","baseClassName","maybePostfixModifierPosition","isExternal","createParseClassName","prefix","experimentalParseClassName","parseClassName","bracketDepth","parenDepth","modifierStart","postfixModifierPosition","index","currentCharacter","baseClassNameWithImportantModifier","fullPrefix","parseClassNameOriginal","createSortModifiers","modifierWeights","orderSensitiveModifiers","forEach","mod","currentSegment","modifier","isArbitrary","isOrderSensitive","has","sort","createConfigUtils","sortModifiers","SPLIT_CLASSES_REGEX","mergeClassList","classList","configUtils","classGroupsInConflict","classNames","trim","originalClassName","substring","variantModifier","modifierId","classId","conflictGroups","twJoin","classLists","argument","resolvedValue","string","toValue","mix","k","createTailwindMerge","createConfigFirst","createConfigRest","cacheGet","cacheSet","functionToCall","initTailwindMerge","reduce","previousConfig","createConfigCurrent","tailwindMerge","cachedResult","args","fallbackThemeArr","fromTheme","themeGetter","arbitraryValueRegex","arbitraryVariableRegex","fractionRegex","tshirtUnitRegex","lengthUnitRegex","colorFunctionRegex","shadowRegex","imageRegex","isFraction","test","isNumber","Number","isNaN","isInteger","isPercent","isTshirtSize","isAny","isLengthOnly","isNever","isShadow","isImage","isAnyNonArbitrary","isArbitraryValue","isArbitraryVariable","isArbitrarySize","getIsArbitraryValue","isLabelSize","isArbitraryLength","isLabelLength","isArbitraryNumber","isLabelNumber","isArbitraryWeight","isLabelWeight","isArbitraryFamilyName","isLabelFamilyName","isArbitraryPosition","isLabelPosition","isArbitraryImage","isLabelImage","isArbitraryShadow","isLabelShadow","isArbitraryVariableLength","getIsArbitraryVariable","isArbitraryVariableFamilyName","isArbitraryVariablePosition","isArbitraryVariableSize","isArbitraryVariableImage","isArbitraryVariableShadow","isArbitraryVariableWeight","testLabel","testValue","exec","shouldMatchNoLabel","label","getDefaultConfig","themeColor","themeFont","themeText","themeFontWeight","themeTracking","themeLeading","themeBreakpoint","themeContainer","themeSpacing","themeRadius","themeShadow","themeInsetShadow","themeTextShadow","themeDropShadow","themeBlur","themePerspective","themeAspect","themeEase","themeAnimate","scaleBreak","scalePosition","scalePositionWithArbitrary","scaleOverflow","scaleOverscroll","scaleUnambiguousSpacing","scaleInset","scaleGridTemplateColsRows","scaleGridColRowStartAndEnd","span","scaleGridColRowStartOrEnd","scaleGridAutoColsRows","scaleAlignPrimaryAxis","scaleAlignSecondaryAxis","scaleMargin","scaleSizing","scaleSizingInline","scaleSizingBlock","scaleColor","scaleBgPosition","position","scaleBgRepeat","repeat","scaleBgSize","size","scaleGradientStopPosition","scaleRadius","scaleBorderWidth","scaleLineStyle","scaleBlendMode","scaleMaskImagePosition","scaleBlur","scaleRotate","scaleScale","scaleSkew","scaleTranslate","animate","aspect","blur","breakpoint","color","container","ease","font","leading","perspective","radLine truncated
@@ -0,0 +1,34 @@
#ifndef INOTIFY_H
#define INOTIFY_H
#include <unordered_map>
#include <sys/inotify.h>
#include "../shared/BruteForceBackend.hh"
#include "../DirTree.hh"
#include "../Signal.hh"
struct InotifySubscription {
std::shared_ptr<DirTree> tree;
std::string path;
WatcherRef watcher;
};
class InotifyBackend : public BruteForceBackend {
public:
void start() override;
~InotifyBackend();
void subscribe(WatcherRef watcher) override;
void unsubscribe(WatcherRef watcher) override;
private:
int mPipe[2];
int mInotify;
std::unordered_multimap<int, std::shared_ptr<InotifySubscription>> mSubscriptions;
Signal mEndedSignal;
bool watchDir(WatcherRef watcher, std::string path, std::shared_ptr<DirTree> tree);
void handleEvents();
void handleEvent(struct inotify_event *event, std::unordered_set<WatcherRef> &watchers);
bool handleSubscription(struct inotify_event *event, std::shared_ptr<InotifySubscription> sub);
};
#endif
@@ -0,0 +1,655 @@
"use strict";
// this[BUFFER] is the remainder of a chunk if we're waiting for
// the full 512 bytes of a header to come in. We will Buffer.concat()
// it to the next write(), which is a mem copy, but a small one.
//
// this[QUEUE] is a list of entries that haven't been emitted
// yet this can only get filled up if the user keeps write()ing after
// a write() returns false, or does a write() with more than one entry
//
// We don't buffer chunks, we always parse them and either create an
// entry, or push it into the active entry. The ReadEntry class knows
// to throw data away if .ignore=true
//
// Shift entry off the buffer when it emits 'end', and emit 'entry' for
// the next one in the list.
//
// At any time, we're pushing body chunks into the entry at WRITEENTRY,
// and waiting for 'end' on the entry at READENTRY
//
// ignored entries get .resume() called on them straight away
Object.defineProperty(exports, "__esModule", { value: true });
exports.Parser = void 0;
const events_1 = require("events");
const minizlib_1 = require("minizlib");
const header_js_1 = require("./header.js");
const pax_js_1 = require("./pax.js");
const read_entry_js_1 = require("./read-entry.js");
const warn_method_js_1 = require("./warn-method.js");
const maxMetaEntrySize = 1024 * 1024;
const gzipHeader = Buffer.from([0x1f, 0x8b]);
const zstdHeader = Buffer.from([0x28, 0xb5, 0x2f, 0xfd]);
const ZIP_HEADER_LEN = Math.max(gzipHeader.length, zstdHeader.length);
const STATE = Symbol('state');
const WRITEENTRY = Symbol('writeEntry');
const READENTRY = Symbol('readEntry');
const NEXTENTRY = Symbol('nextEntry');
const PROCESSENTRY = Symbol('processEntry');
const EX = Symbol('extendedHeader');
const GEX = Symbol('globalExtendedHeader');
const META = Symbol('meta');
const EMITMETA = Symbol('emitMeta');
const BUFFER = Symbol('buffer');
const QUEUE = Symbol('queue');
const ENDED = Symbol('ended');
const EMITTEDEND = Symbol('emittedEnd');
const EMIT = Symbol('emit');
const UNZIP = Symbol('unzip');
const CONSUMECHUNK = Symbol('consumeChunk');
const CONSUMECHUNKSUB = Symbol('consumeChunkSub');
const CONSUMEBODY = Symbol('consumeBody');
const CONSUMEMETA = Symbol('consumeMeta');
const CONSUMEHEADER = Symbol('consumeHeader');
const CONSUMING = Symbol('consuming');
const BUFFERCONCAT = Symbol('bufferConcat');
const MAYBEEND = Symbol('maybeEnd');
const WRITING = Symbol('writing');
const ABORTED = Symbol('aborted');
const DONE = Symbol('onDone');
const SAW_VALID_ENTRY = Symbol('sawValidEntry');
const SAW_NULL_BLOCK = Symbol('sawNullBlock');
const SAW_EOF = Symbol('sawEOF');
const CLOSESTREAM = Symbol('closeStream');
const MAX_DECOMPRESSION_RATIO = 1000;
const COMPRESSEDBYTESREAD = Symbol('compressedBytesRead');
const DECOMPRESSEDBYTESREAD = Symbol('decompressedBytesRead');
const CHECKDECOMPRESSIONRATIO = Symbol('checkDecompressionRatio');
const noop = () => true;
class Parser extends events_1.EventEmitter {
file;
strict;
maxMetaEntrySize;
filter;
brotli;
zstd;
maxDecompressionRatio;
writable = true;
readable = false;
[QUEUE] = [];
[BUFFER];
[READENTRY];
[WRITEENTRY];
[STATE] = 'begin';
[META] = '';
[EX];
[GEX];
[ENDED] = false;
[UNZIP];
[ABORTED] = false;
[SAW_VALID_ENTRY];
[SAW_NULL_BLOCK] = false;
[SAW_EOF] = false;
[WRITING] = false;
[CONSUMING] = false;
[EMITTEDEND] = false;
[COMPRESSEDBYTESREAD] = 0;
[DECOMPRESSEDBYTESREAD] = 0;
constructor(opt = {}) {
super();
this.file = opt.file || '';
// these BADARCHIVE errors can't be detected early. listen on DONE.
this.on(DONE, () => {
if (this[STATE] === 'begin' || this[SAW_VALID_ENTRY] === false) {
// either less than 1 block of data, or all entries were invalid.
// Either way, probably not even a tarball.
this.warn('TAR_BAD_ARCHIVE', 'Unrecognized archive format');
}
});
if (opt.ondone) {
this.on(DONE, opt.ondone);
}
else {
this.on(DONE, () => {
this.emit('prefinish');
this.emit('finish');
this.emit('end');
});
}
this.strict = !!opt.strict;
this.maxDecompressionRatio =
typeof opt.maxDecompressionRatio === 'number' ?
opt.maxDecompressionRatio
: MAX_DECOMPRESSION_RATIO;
this.maxMetaEntrySize = opt.maxMetaEntrySize || maxMetaEntrySize;
this.filter = typeof opt.filter === 'function' ? opt.filter : noop;
// Unlike gzip, brotli doesn't have any magic bytes to identify it
// Users need to explicitly tell us they're extracting a brotli file
// Or we infer from the file extension
const isTBR = opt.file &&
(opt.file.endsWith('.tar.br') || opt.file.endsWith('.tbr'));
// if it's a tbr file it MIGHT be brotli, but we don't know until
// we look at it and verify it's not a valid tar file.
this.brotli =
!(opt.gzip || opt.zstd) && opt.brotli !== undefined ? opt.brotli
: isTBR ? undefined
: false;
// zstd has magic bytes to identify it, but we also support explicit options
// and file extension detection
const isTZST = opt.file &&
(opt.file.endsWith('.tar.zst') || opt.file.endsWith('.tzst'));
this.zstd =
!(opt.gzip || opt.brotli) && opt.zstd !== undefined ? opt.zstd
: isTZST ? true
: undefined;
// have to set this so that streams are ok piping into it
this.on('end', () => this[CLOSESTREAM]());
if (typeof opt.onwarn === 'function') {
this.on('warn', opt.onwarn);
}
if (typeof opt.onReadEntry === 'function') {
this.on('entry', opt.onReadEntry);
}
}
warn(code, message, data = {}) {
(0, warn_method_js_1.warnMethod)(this, code, message, data);
}
[CONSUMEHEADER](chunk, position) {
if (this[SAW_VALID_ENTRY] === undefined) {
this[SAW_VALID_ENTRY] = false;
}
let header;
try {
header = new header_js_1.Header(chunk, position, this[EX], this[GEX]);
}
catch (er) {
return this.warn('TAR_ENTRY_INVALID', er);
}
if (header.nullBlock) {
if (this[SAW_NULL_BLOCK]) {
this[SAW_EOF] = true;
// ending an archive with no entries. pointless, but legal.
if (this[STATE] === 'begin') {
this[STATE] = 'header';
}
this[EMIT]('eof');
}
else {
this[SAW_NULL_BLOCK] = true;
this[EMIT]('nullBlock');
}
}
else {
this[SAW_NULL_BLOCK] = false;
if (!header.cksumValid) {
this.warn('TAR_ENTRY_INVALID', 'checksum failure', { header });
}
else if (!header.path) {
this.warn('TAR_ENTRY_INVALID', 'path is required', { header });
}
else {
const type = header.type;
if (/^(Symbolic)?Link$/.test(type) && !header.linkpath) {
this.warn('TAR_ENTRY_INVALID', 'linkpath required', {
header,
});
}
else if (!/^(Symbolic)?Link$/.test(type) &&
!/^(Global)?ExtendedHeader$/.test(type) &&
header.linkpath) {
this.warn('TAR_ENTRY_INVALID', 'linkpath forbidden', {
header,
});
}
else {
const entry = (this[WRITEENTRY] = new read_entry_js_1.ReadEntry(header, this[EX], this[GEX]));
// we do this for meta & ignored entries as well, because they
// are still valid tar, or else we wouldn't know to ignore them
if (!this[SAW_VALID_ENTRY]) {
if (entry.remain) {
// this might be the one!
const onend = () => {
if (!entry.invalid) {
this[SAW_VALID_ENTRY] = true;
}
};
entry.on('end', onend);
}
else {
this[SAW_VALID_ENTRY] = true;
}
}
if (entry.meta) {
if (entry.size > this.maxMetaEntrySize) {
entry.ignore = true;
this[EMIT]('ignoredEntry', entry);
this[STATE] = 'ignore';
entry.resume();
}
else if (entry.size > 0) {
this[META] = '';
entry.on('data', c => (this[META] += c));
this[STATE] = 'meta';
}
}
else {
this[EX] = undefined;
entry.ignore = entry.ignore || !this.filter(entry.path, entry);
if (entry.ignore) {
// probably valid, just not something we care about
this[EMIT]('ignoredEntry', entry);
this[STATE] = entry.remain ? 'ignore' : 'header';
entry.resume();
}
else {
if (entry.remain) {
this[STATE] = 'body';
}
else {
this[STATE] = 'header';
entry.end();
}
if (!this[READENTRY]) {
this[QUEUE].push(entry);
this[NEXTENTRY]();
}
else {
this[QUEUE].push(entry);
}
}
}
}
}
}
}
[CLOSESTREAM]() {
queueMicrotask(() => this.emit('close'));
}
[PROCESSENTRY](entry) {
let go = true;
if (!entry) {
this[READENTRY] = undefined;
go = false;
}
else if (Array.isArray(entry)) {
const [ev, ...args] = entry;
this.emit(ev, ...args);
}
else {
this[READENTRY] = entry;
this.emit('entry', entry);
if (!entry.emittedEnd) {
entry.on('end', () => this[NEXTENTRY]());
go = false;
}
}
return go;
}
[NEXTENTRY]() {
do { } while (this[PROCESSENTRY](this[QUEUE].shift()));
if (this[QUEUE].length === 0) {
// At this point, there's nothing in the queue, but we may have an
// entry which is being consumed (readEntry).
// If we don't, then we definitely can handle more data.
// If we do, and either it's flowing, or it has never had any data
// written to it, then it needs more.
// The only other possibility is that it has returned false from a
// write() call, so we wait for the next drain to continue.
const re = this[READENTRY];
const drainNow = !re || re.flowing || re.size === re.remain;
if (drainNow) {
if (!this[WRITING]) {
this.emit('drain');
}
}
else {
re.once('drain', () => this.emit('drain'));
}
}
}
[CONSUMEBODY](chunk, position) {
// write up to but no more than writeEntry.blockRemain
const entry = this[WRITEENTRY];
/* c8 ignore start */
if (!entry) {
throw new Error('attempt to consume body without entry??');
}
const br = entry.blockRemain ?? 0;
/* c8 ignore stop */
const c = br >= chunk.length && position === 0 ?
chunk
: chunk.subarray(position, position + br);
entry.write(c);
if (!entry.blockRemain) {
this[STATE] = 'header';
this[WRITEENTRY] = undefined;
entry.end();
}
return c.length;
}
[CONSUMEMETA](chunk, position) {
const entry = this[WRITEENTRY];
const ret = this[CONSUMEBODY](chunk, position);
// if we finished, then the entry is reset
if (!this[WRITEENTRY] && entry) {
this[EMITMETA](entry);
}
return ret;
}
[EMIT](ev, data, extra) {
if (this[QUEUE].length === 0 && !this[READENTRY]) {
this.emit(ev, data, extra);
}
else {
this[QUEUE].push([ev, data, extra]);
}
}
[EMITMETA](entry) {
this[EMIT]('meta', this[META]);
switch (entry.type) {
case 'ExtendedHeader':
case 'OldExtendedHeader':
this[EX] = pax_js_1.Pax.parse(this[META], this[EX], false);
break;
case 'GlobalExtendedHeader':
this[GEX] = pax_js_1.Pax.parse(this[META], this[GEX], true);
break;
case 'NextFileHasLongPath':
case 'OldGnuLongPath': {
const ex = this[EX] ?? Object.create(null);
this[EX] = ex;
ex.path = this[META].replace(/\0.*/, '');
break;
}
case 'NextFileHasLongLinkpath': {
const ex = this[EX] || Object.create(null);
this[EX] = ex;
ex.linkpath = this[META].replace(/\0.*/, '');
break;
}
/* c8 ignore start */
default:
throw new Error('unknown meta: ' + entry.type);
/* c8 ignore stop */
}
}
abort(error) {
if (this[ABORTED]) {
return;
}
if (this[UNZIP]) {
// fully nerf the decompressor and close its underlying binding
const u = this[UNZIP];
/* c8 ignore start */
u.write = () => true;
u.end = () => u;
u.emit = () => false;
/* c8 ignore stop */
u.destroy?.();
}
this[ABORTED] = true;
this.emit('abort', error);
// always throws, even in non-strict mode
this.warn('TAR_ABORT', error, { recoverable: false });
}
[CHECKDECOMPRESSIONRATIO](chunk) {
this[DECOMPRESSEDBYTESREAD] += chunk.length;
const ratio = this[DECOMPRESSEDBYTESREAD] / this[COMPRESSEDBYTESREAD];
if (ratio > this.maxDecompressionRatio) {
this.abort(new Error(`max decompression ratio exceeded: ${ratio.toFixed(2)} > ${this.maxDecompressionRatio}`));
return false;
}
return true;
}
write(chunk, encoding, cb) {
if (typeof encoding === 'function') {
cb = encoding;
encoding = undefined;
}
if (typeof chunk === 'string') {
chunk = Buffer.from(chunk,
/* c8 ignore next */
typeof encoding === 'string' ? encoding : 'utf8');
}
if (this[ABORTED]) {
/* c8 ignore next */
cb?.();
return false;
}
// first write, might be gzipped, zstd, or brotli compressed
const needSniff = this[UNZIP] === undefined ||
(this.brotli === undefined && this[UNZIP] === false);
if (needSniff && chunk) {
if (this[BUFFER]) {
chunk = Buffer.concat([this[BUFFER], chunk]);
this[BUFFER] = undefined;
}
if (chunk.length < ZIP_HEADER_LEN) {
this[BUFFER] = chunk;
/* c8 ignore next */
cb?.();
return true;
}
// look for gzip header
for (let i = 0; this[UNZIP] === undefined && i < gzipHeader.length; i++) {
if (chunk[i] !== gzipHeader[i]) {
this[UNZIP] = false;
}
}
// look for zstd header if gzip header not found
let isZstd = false;
if (this[UNZIP] === false && this.zstd !== false) {
isZstd = true;
for (let i = 0; i < zstdHeader.length; i++) {
if (chunk[i] !== zstdHeader[i]) {
isZstd = false;
break;
}
}
}
const maybeBrotli = this.brotli === undefined && !isZstd;
if (this[UNZIP] === false && maybeBrotli) {
// read the first header to see if it's a valid tar file. If so,
// we can safely assume that it's not actually brotli, despite the
// .tbr or .tar.br file extension.
// if we ended before getting a full chunk, yes, def brotli
if (chunk.length < 512) {
if (this[ENDED]) {
this.brotli = true;
}
else {
this[BUFFER] = chunk;
/* c8 ignore next */
cb?.();
return true;
}
}
else {
// if it's tar, it's pretty reliably not brotli, chances of
// that happening are astronomical.
try {
new header_js_1.Header(chunk.subarray(0, 512));
this.brotli = false;
}
catch (_) {
this.brotli = true;
}
}
}
if (this[UNZIP] === undefined ||
(this[UNZIP] === false && (this.brotli || isZstd))) {
const ended = this[ENDED];
this[ENDED] = false;
this[UNZIP] =
this[UNZIP] === undefined ? new minizlib_1.Unzip({})
: isZstd ? new minizlib_1.ZstdDecompress({})
: new minizlib_1.BrotliDecompress({});
this[UNZIP].on('data', chunk => {
if (this[CHECKDECOMPRESSIONRATIO](chunk)) {
this[CONSUMECHUNK](chunk);
}
});
this[UNZIP].on('error', er => {
if (!this[ABORTED]) {
this.abort(er);
}
});
this[UNZIP].on('end', () => {
this[ENDED] = true;
this[CONSUMECHUNK]();
});
this[WRITING] = true;
this[COMPRESSEDBYTESREAD] += chunk.length;
const ret = !!this[UNZIP][ended ? 'end' : 'write'](chunk);
this[WRITING] = false;
cb?.();
return ret;
}
}
this[WRITING] = true;
if (this[UNZIP]) {
this[COMPRESSEDBYTESREAD] += chunk.length;
this[UNZIP].write(chunk);
}
else {
this[CONSUMECHUNK](chunk);
}
this[WRITING] = false;
// return false if there's a queue, or if the current entry isn't flowing
const ret = this[QUEUE].length > 0 ? false
: this[READENTRY] ? this[READENTRY].flowing
: true;
// if we have no queue, then that means a clogged READENTRY
if (!ret && this[QUEUE].length === 0) {
this[READENTRY]?.once('drain', () => this.emit('drain'));
}
/* c8 ignore next */
cb?.();
return ret;
}
[BUFFERCONCAT](c) {
if (c && !this[ABORTED]) {
this[BUFFER] = this[BUFFER] ? Buffer.concat([this[BUFFER], c]) : c;
}
}
[MAYBEEND]() {
if (this[ENDED] &&
!this[EMITTEDEND] &&
!this[ABORTED] &&
!this[CONSUMING]) {
this[EMITTEDEND] = true;
const entry = this[WRITEENTRY];
if (entry?.blockRemain) {
// truncated, likely a damaged file
const have = this[BUFFER] ? this[BUFFER].length : 0;
this.warn('TAR_BAD_ARCHIVE', `Truncated input (needed ${entry.blockRemain} more bytes, only ${have} available)`, { entry });
if (this[BUFFER]) {
entry.write(this[BUFFER]);
}
entry.end();
}
this[EMIT](DONE);
}
}
[CONSUMECHUNK](chunk) {
if (this[CONSUMING] && chunk) {
this[BUFFERCONCAT](chunk);
}
else if (!chunk && !this[BUFFER]) {
this[MAYBEEND]();
}
else if (chunk) {
this[CONSUMING] = true;
if (this[BUFFER]) {
this[BUFFERCONCAT](chunk);
const c = this[BUFFER];
this[BUFFER] = undefined;
this[CONSUMECHUNKSUB](c);
}
else {
this[CONSUMECHUNKSUB](chunk);
}
while (this[BUFFER] &&
this[BUFFER]?.length >= 512 &&
!this[ABORTED] &&
!this[SAW_EOF]) {
const c = this[BUFFER];
this[BUFFER] = undefined;
this[CONSUMECHUNKSUB](c);
}
this[CONSUMING] = false;
}
if (!this[BUFFER] || this[ENDED]) {
this[MAYBEEND]();
}
}
[CONSUMECHUNKSUB](chunk) {
// we know that we are in CONSUMING mode, so anything written goes into
// the buffer. Advance the position and put any remainder in the buffer.
let position = 0;
const length = chunk.length;
while (position + 512 <= length && !this[ABORTED] && !this[SAW_EOF]) {
switch (this[STATE]) {
case 'begin':
case 'header':
this[CONSUMEHEADER](chunk, position);
position += 512;
break;
case 'ignore':
case 'body':
position += this[CONSUMEBODY](chunk, position);
break;
case 'meta':
position += this[CONSUMEMETA](chunk, position);
break;
/* c8 ignore start */
default:
throw new Error('invalid state: ' + this[STATE]);
/* c8 ignore stop */
}
}
if (position < length) {
this[BUFFER] =
this[BUFFER] ?
Buffer.concat([chunk.subarray(position), this[BUFFER]])
: chunk.subarray(position);
}
}
end(chunk, encoding, cb) {
if (typeof chunk === 'function') {
cb = chunk;
encoding = undefined;
chunk = undefined;
}
if (typeof encoding === 'function') {
cb = encoding;
encoding = undefined;
}
if (typeof chunk === 'string') {
chunk = Buffer.from(chunk, encoding);
}
if (cb)
this.once('finish', cb);
if (!this[ABORTED]) {
if (this[UNZIP]) {
/* c8 ignore start */
if (chunk) {
this[COMPRESSEDBYTESREAD] += chunk.length;
this[UNZIP].write(chunk);
}
/* c8 ignore stop */
this[UNZIP].end();
}
else {
this[ENDED] = true;
if (this.brotli === undefined || this.zstd === undefined)
chunk = chunk || Buffer.alloc(0);
if (chunk)
this.write(chunk);
this[MAYBEEND]();
}
}
return this;
}
}
exports.Parser = Parser;
//# sourceMappingURL=parse.js.map
@@ -0,0 +1,441 @@
flf2a$ 4 4 7 -1 32 0 0 0
Author : Lukasz Tyrala (lt.)
Date : 2004/4/12 12:28:23
Version: 1.2 (full)
URL : http://home.autocom.pl/bjt/lt
e-mail : luty@autocom.pl
--------------------------------------------
..xx.. (C) COPYRIGHTS MMIV by
.xXXXXXXx Lukasz Tyrala (lt.)
/ xXXXXx
.` xDXXx Permission is hereby given to
C Xx modify this font, as long as
\ x the modifier's name is placed
`---/| on a comment line.
lt. | | For comercial use of this font
please contact with me (lt.).
--------------------------------------------
This font has been created using JavE's
FIGlet font export assistant.
---- Have a look at: http://www.jave.de ----
Visit polish a-a usenet at------------------
-----------------------news:pl.rec.ascii-art
$ #
$ #
$ #
$ ##
___ #
| \ #
|___\#
|__/ ##
_ _ #
\|\| #
#
##
_||| #
|_'_]#
|_'_]#
||| ##
|| #
,||= #
'||=,#
=||' ##
__ #
\ \[\#
\ \ #
|]\/ ##
___ #
| .\ #
/ .(/#
\__/\##
_ #
|/ #
#
##
___ #
| / #
|/ #
|\ ##
__ #
\ | #
\| #
/| ##
#
\||/#
|_ ]#
/||\##
__ #
_| | #
|_ _]#
|_| ##
#
#
,-. #
'-/ ##
#
___ #
|___\#
##
#
#
,-. #
'-' ##
__#
/ /#
/ / #
/_/ ##
____ #
| |#
| \ |#
|___|##
__#
/ |#
/_ |#
\|##
____ #
| \#
'-'_/#
|___]##
____ #
|__ \#
_[ |#
|___/##
_ #
/ / #
/_ ]#
|/ ##
____ #
| __|#
_\_ \#
|___/##
____ #
| __\#
| .\#
|___/##
____ #
|__ |#
/ /#
/_/ ##
____ #
| . /#
>.< #
|___/##
____ #
| . \#
|__ |#
\__/##
__ #
|_] #
,-. #
'-' ##
__ #
|_] #
,-. #
'-/ ##
__ #
/ / #
\ \ #
\_\ ##
___ #
|___]#
|__/ #
##
__ #
\ \#
/ /#
/_/ ##
____ #
| \#
|/\_/#
|] ##
_ #
,'_`.#
;(_\/#
`._, ##
___ #
| \ #
| . \#
|/\_/##
___ #
| .\ #
| .<_#
|___/##
____ #
| __\#
| \__#
|___/##
___ #
| \ #
| . \#
|___/##
____ #
| __\#
| ]_#
|___/##
____ #
| _\#
| _\ #
|/ ##
____ #
| _\#
| [ \#
|___/##
_ _ #
||_|\#
| _ |#
|/ |/##
____ #
|___\#
| / #
|/ ##
____ #
|_ \#
,_/ /#
\__/ ##
__ _ #
| V \#
| <_#
|/\_/##
__ #
| | #
| |__#
|___/##
_ #
|\/\ #
| \#
|/v\/##
__ #
| \|\#
| \|#
|/\_/##
____ #
| |#
| . |#
|___/##
____ #
| . \#
| __/#
|/ ##
____ #
| |#
| . |#
|___\##
____ #
| . \#
| <_#
|/\_/##
___ #
| _\ #
[__ \#
|___/##
____ #
|_ _\#
|| #
|/ ##
_ #
|| \ #
||_|\#
|___/##
_ _ #
|| |\#
||/ /#
|__/ ##
_ _ #
||| \#
||\ /#
|/\/ ##
_ _ #
|\/_\#
_><__#
|/\_/##
_ #
||_/\#
| __/#
|/ ##
___ #
|_ \ #
| __]#
|___/##
___ #
| _] #
||_ #
|__] ##
__ #
\ \ #
\ \ #
\_\##
___ #
|_ | #
_|| #
|__| ##
#
/\ #
//\\ #
##
#
#
____ #
|___]##
_ #
\| #
#
##
___ #
| \ #
| . \#
|/\_/##
___ #
| .\ #
| .<_#
|___/##
____ #
| __\#
| \__#
|___/##
___ #
| \ #
| . \#
|___/##
____ #
| __\#
| ]_#
|___/##
____ #
| _\#
| _\ #
|/ ##
____ #
| _\#
| [ \#
|___/##
_ _ #
||_|\#
| _ |#
|/ |/##
____ #
|___\#
| / #
|/ ##
____ #
|_ \#
,_/ /#
\__/ ##
__ _ #
| V \#
| <_#
|/\_/##
__ #
| | #
| |__#
|___/##
_ #
|\/\ #
| \#
|/v\/##
__ #
| \|\#
| \|#
|/\_/##
____ #
| |#
| . |#
|___/##
____ #
| . \#
| __/#
|/ ##
____ #
| |#
| . |#
|___\##
____ #
| . \#
| <_#
|/\_/##
___ #
| _\ #
[__ \#
|___/##
____ #
|_ _\#
|| #
|/ ##
_ #
|| \ #
||_|\#
|___/##
_ _ #
|| |\#
||/ /#
|__/ ##
_ _ #
||| \#
||\ /#
|/\/ ##
_ _ #
|\/_\#
_><__#
|/\_/##
_ #
||_/\#
| __/#
|/ ##
___ #
|_ \ #
| __]#
|___/##
{#
#
#
##
__ #
| | #
| | #
|_| ##
}#
#
#
##
#
_,-.,#
|,-.'#
##
___ #
| \ #
| . \#
|/\_/##
____ #
| |#
| . |#
|___/##
_ #
|| \ #
||_|\#
|___/##
___ #
| \ #
| . \#
|/\_/##
____ #
| |#
| . |#
|___/##
_ #
|| \ #
||_|\#
|___/##
ß#
#
#
##
@@ -0,0 +1,270 @@
'use strict'
const SINGLE_QUOTE = "'".charCodeAt(0)
const DOUBLE_QUOTE = '"'.charCodeAt(0)
const BACKSLASH = '\\'.charCodeAt(0)
const SLASH = '/'.charCodeAt(0)
const NEWLINE = '\n'.charCodeAt(0)
const SPACE = ' '.charCodeAt(0)
const FEED = '\f'.charCodeAt(0)
const TAB = '\t'.charCodeAt(0)
const CR = '\r'.charCodeAt(0)
const OPEN_SQUARE = '['.charCodeAt(0)
const CLOSE_SQUARE = ']'.charCodeAt(0)
const OPEN_PARENTHESES = '('.charCodeAt(0)
const CLOSE_PARENTHESES = ')'.charCodeAt(0)
const OPEN_CURLY = '{'.charCodeAt(0)
const CLOSE_CURLY = '}'.charCodeAt(0)
const SEMICOLON = ';'.charCodeAt(0)
const ASTERISK = '*'.charCodeAt(0)
const COLON = ':'.charCodeAt(0)
const AT = '@'.charCodeAt(0)
const RE_AT_END = /[\t\n\f\r "#'()/;[\\\]{}]/g
const RE_WORD_END = /[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g
const RE_BAD_BRACKET = /.[\r\n"'(/\\]/
const RE_HEX_ESCAPE = /[\da-f]/i
module.exports = function tokenizer(input, options = {}) {
let css = input.css.valueOf()
let ignore = options.ignoreErrors
let code, content, escape, next, quote
let currentToken, escaped, escapePos, n, prev
let length = css.length
let pos = 0
let buffer = []
let returned = []
let lastBadParen = -1
function position() {
return pos
}
function unclosed(what) {
throw input.error('Unclosed ' + what, pos)
}
function endOfFile() {
return returned.length === 0 && pos >= length
}
function nextToken(opts) {
if (returned.length) return returned.pop()
if (pos >= length) return
let ignoreUnclosed = opts ? opts.ignoreUnclosed : false
code = css.charCodeAt(pos)
switch (code) {
case NEWLINE:
case SPACE:
case TAB:
case CR:
case FEED: {
next = pos
do {
next += 1
code = css.charCodeAt(next)
} while (
code === SPACE ||
code === NEWLINE ||
code === TAB ||
code === CR ||
code === FEED
)
currentToken = ['space', css.slice(pos, next)]
pos = next - 1
break
}
case OPEN_SQUARE:
case CLOSE_SQUARE:
case OPEN_CURLY:
case CLOSE_CURLY:
case COLON:
case SEMICOLON:
case CLOSE_PARENTHESES: {
let controlChar = String.fromCharCode(code)
currentToken = [controlChar, controlChar, pos]
break
}
case OPEN_PARENTHESES: {
prev = buffer.length ? buffer.pop()[1] : ''
n = css.charCodeAt(pos + 1)
if (
prev === 'url' &&
n !== SINGLE_QUOTE &&
n !== DOUBLE_QUOTE &&
n !== SPACE &&
n !== NEWLINE &&
n !== TAB &&
n !== FEED &&
n !== CR
) {
next = pos
do {
escaped = false
next = css.indexOf(')', next + 1)
if (next === -1) {
if (ignore || ignoreUnclosed) {
next = pos
break
} else {
unclosed('bracket')
}
}
escapePos = next
while (css.charCodeAt(escapePos - 1) === BACKSLASH) {
escapePos -= 1
escaped = !escaped
}
} while (escaped)
currentToken = ['brackets', css.slice(pos, next + 1), pos, next]
pos = next
} else if (pos <= lastBadParen) {
currentToken = ['(', '(', pos]
} else {
next = css.indexOf(')', pos + 1)
content = css.slice(pos, next + 1)
if (next === -1 || RE_BAD_BRACKET.test(content)) {
lastBadParen = next === -1 ? length : next
currentToken = ['(', '(', pos]
} else {
currentToken = ['brackets', content, pos, next]
pos = next
}
}
break
}
case SINGLE_QUOTE:
case DOUBLE_QUOTE: {
quote = code === SINGLE_QUOTE ? "'" : '"'
next = pos
do {
escaped = false
next = css.indexOf(quote, next + 1)
if (next === -1) {
if (ignore || ignoreUnclosed) {
next = pos + 1
break
} else {
unclosed('string')
}
}
escapePos = next
while (css.charCodeAt(escapePos - 1) === BACKSLASH) {
escapePos -= 1
escaped = !escaped
}
} while (escaped)
currentToken = ['string', css.slice(pos, next + 1), pos, next]
pos = next
break
}
case AT: {
RE_AT_END.lastIndex = pos + 1
RE_AT_END.test(css)
if (RE_AT_END.lastIndex === 0) {
next = css.length - 1
} else {
next = RE_AT_END.lastIndex - 2
}
currentToken = ['at-word', css.slice(pos, next + 1), pos, next]
pos = next
break
}
case BACKSLASH: {
next = pos
escape = true
while (css.charCodeAt(next + 1) === BACKSLASH) {
next += 1
escape = !escape
}
code = css.charCodeAt(next + 1)
if (
escape &&
code !== SLASH &&
code !== SPACE &&
code !== NEWLINE &&
code !== TAB &&
code !== CR &&
code !== FEED
) {
next += 1
if (RE_HEX_ESCAPE.test(css.charAt(next))) {
while (RE_HEX_ESCAPE.test(css.charAt(next + 1))) {
next += 1
}
if (css.charCodeAt(next + 1) === SPACE) {
next += 1
}
}
}
currentToken = ['word', css.slice(pos, next + 1), pos, next]
pos = next
break
}
default: {
if (code === SLASH && css.charCodeAt(pos + 1) === ASTERISK) {
next = css.indexOf('*/', pos + 2) + 1
if (next === 0) {
if (ignore || ignoreUnclosed) {
next = css.length
} else {
unclosed('comment')
}
}
currentToken = ['comment', css.slice(pos, next + 1), pos, next]
pos = next
} else {
RE_WORD_END.lastIndex = pos + 1
RE_WORD_END.test(css)
if (RE_WORD_END.lastIndex === 0) {
next = css.length - 1
} else {
next = RE_WORD_END.lastIndex - 2
}
currentToken = ['word', css.slice(pos, next + 1), pos, next]
buffer.push(currentToken)
pos = next
}
break
}
}
pos++
return currentToken
}
function back(token) {
returned.push(token)
}
return {
back,
endOfFile,
nextToken,
position
}
}
@@ -0,0 +1 @@
{"version":3,"file":"briefcase-conveyor-belt.js","sources":["../../../src/icons/briefcase-conveyor-belt.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name BriefcaseConveyorBelt\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTAgMjB2MiIgLz4KICA8cGF0aCBkPSJNMTQgMjB2MiIgLz4KICA8cGF0aCBkPSJNMTggMjB2MiIgLz4KICA8cGF0aCBkPSJNMjEgMjBIMyIgLz4KICA8cGF0aCBkPSJNNiAyMHYyIiAvPgogIDxwYXRoIGQ9Ik04IDE2VjRhMiAyIDAgMCAxIDItMmg0YTIgMiAwIDAgMSAyIDJ2MTIiIC8+CiAgPHJlY3QgeD0iNCIgeT0iNiIgd2lkdGg9IjE2IiBoZWlnaHQ9IjEwIiByeD0iMiIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/briefcase-conveyor-belt\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 BriefcaseConveyorBelt = createLucideIcon('BriefcaseConveyorBelt', [\n ['path', { d: 'M10 20v2', key: '1n8e1g' }],\n ['path', { d: 'M14 20v2', key: '1lq872' }],\n ['path', { d: 'M18 20v2', key: '10uadw' }],\n ['path', { d: 'M21 20H3', key: 'kdqkdp' }],\n ['path', { d: 'M6 20v2', key: 'a9bc87' }],\n ['path', { d: 'M8 16V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v12', key: '17n9tx' }],\n ['rect', { x: '4', y: '6', width: '16', height: '10', rx: '2', key: '1097i5' }],\n]);\n\nexport default BriefcaseConveyorBelt;\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,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAwB,iBAAiB,uBAAyB,CAAA,CAAA,CAAA;AAAA,CAAA,CACtE,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,CAAA;AAAA,CAAA,CACzC,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,CAAA;AAAA,CAAA,CACzC,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,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,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ace?: string;
};
type Unregister = () => void;
type ScopedRequire = (id: string, fromFile: string | URL) => any;
type ScopedResolve = (id: string, fromFile: string | URL, resolveOptions?: {
paths?: string[] | undefined;
}) => string;
type NamespacedUnregister = Unregister & {
require: ScopedRequire;
resolve: ScopedResolve;
unregister: Unregister;
};
type Register = {
(options: RequiredProperty<RegisterOptions, 'namespace'>): NamespacedUnregister;
(options?: RegisterOptions): Unregister;
};
declare const register: Register;
declare const tsxRequire: {
(id: string, fromFile: string | URL): any;
resolve: {
(id: string, fromFile: string | URL, options?: {
paths?: string[] | undefined;
}): string;
paths: (request: string) => string[] | null;
};
main: NodeJS.Module | undefined;
extensions: NodeJS.RequireExtensions;
cache: NodeJS.Dict<NodeJS.Module>;
};
export { register, tsxRequire as require };
@@ -0,0 +1,6 @@
function ensureType(value, checked) {
return checked;
}
export {
ensureType
};
@@ -0,0 +1,144 @@
import { getSafeTimers } from '@vitest/utils/timers';
import { c as createBirpc } from './index.Chj8NDwU.js';
import { g as getWorkerState } from './utils.BX5Fg8C4.js';
/* Ported from https://github.com/boblauer/MockDate/blob/master/src/mockdate.ts */
/*
The MIT License (MIT)
Copyright (c) 2014 Bob Lauer
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.
*/
const RealDate = Date;
let now = null;
class MockDate extends RealDate {
constructor(y, m, d, h, M, s, ms) {
super();
let date;
switch (arguments.length) {
case 0:
if (now !== null) date = new RealDate(now.valueOf());
else date = new RealDate();
break;
case 1:
date = new RealDate(y);
break;
default:
d = typeof d === "undefined" ? 1 : d;
h = h || 0;
M = M || 0;
s = s || 0;
ms = ms || 0;
date = new RealDate(y, m, d, h, M, s, ms);
break;
}
Object.setPrototypeOf(date, MockDate.prototype);
return date;
}
}
MockDate.UTC = RealDate.UTC;
MockDate.now = function() {
return new MockDate().valueOf();
};
MockDate.parse = function(dateString) {
return RealDate.parse(dateString);
};
MockDate.toString = function() {
return RealDate.toString();
};
function mockDate(date) {
const dateObj = new RealDate(date.valueOf());
if (Number.isNaN(dateObj.getTime())) throw new TypeError(`mockdate: The time set is an invalid date: ${date}`);
// @ts-expect-error global
globalThis.Date = MockDate;
now = dateObj.valueOf();
}
function resetDate() {
globalThis.Date = RealDate;
}
const { get } = Reflect;
function withSafeTimers(fn) {
const { setTimeout, clearTimeout, nextTick, setImmediate, clearImmediate } = getSafeTimers();
const currentSetTimeout = globalThis.setTimeout;
const currentClearTimeout = globalThis.clearTimeout;
const currentSetImmediate = globalThis.setImmediate;
const currentClearImmediate = globalThis.clearImmediate;
const currentNextTick = globalThis.process?.nextTick;
try {
globalThis.setTimeout = setTimeout;
globalThis.clearTimeout = clearTimeout;
if (setImmediate) globalThis.setImmediate = setImmediate;
if (clearImmediate) globalThis.clearImmediate = clearImmediate;
if (globalThis.process && nextTick) globalThis.process.nextTick = nextTick;
return fn();
} finally {
globalThis.setTimeout = currentSetTimeout;
globalThis.clearTimeout = currentClearTimeout;
globalThis.setImmediate = currentSetImmediate;
globalThis.clearImmediate = currentClearImmediate;
if (globalThis.process && nextTick) nextTick(() => {
globalThis.process.nextTick = currentNextTick;
});
}
}
const promises = /* @__PURE__ */ new Set();
async function rpcDone() {
if (!promises.size) return;
const awaitable = Array.from(promises);
return Promise.all(awaitable);
}
const onCancelCallbacks = [];
function onCancel(callback) {
onCancelCallbacks.push(callback);
}
function createRuntimeRpc(options) {
return createSafeRpc(createBirpc({ async onCancel(reason) {
await Promise.all(onCancelCallbacks.map((fn) => fn(reason)));
} }, {
eventNames: ["onCancel"],
timeout: -1,
...options
}));
}
function createSafeRpc(rpc) {
return new Proxy(rpc, { get(target, p, handler) {
// keep $rejectPendingCalls as sync function
if (p === "$rejectPendingCalls") return rpc.$rejectPendingCalls;
const sendCall = get(target, p, handler);
const safeSendCall = (...args) => withSafeTimers(async () => {
const result = sendCall(...args);
promises.add(result);
try {
return await result;
} finally {
promises.delete(result);
}
});
safeSendCall.asEvent = sendCall.asEvent;
return safeSendCall;
} });
}
function rpc() {
const { rpc } = getWorkerState();
return rpc;
}
export { RealDate as R, rpcDone as a, resetDate as b, createRuntimeRpc as c, mockDate as m, onCancel as o, rpc as r };
@@ -0,0 +1,56 @@
'use strict';
module.exports = function generate_const(it, $keyword, $ruleType) {
var out = ' ';
var $lvl = it.level;
var $dataLvl = it.dataLevel;
var $schema = it.schema[$keyword];
var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
var $breakOnError = !it.opts.allErrors;
var $data = 'data' + ($dataLvl || '');
var $valid = 'valid' + $lvl;
var $isData = it.opts.$data && $schema && $schema.$data,
$schemaValue;
if ($isData) {
out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
$schemaValue = 'schema' + $lvl;
} else {
$schemaValue = $schema;
}
if (!$isData) {
out += ' var schema' + ($lvl) + ' = validate.schema' + ($schemaPath) + ';';
}
out += 'var ' + ($valid) + ' = equal(' + ($data) + ', schema' + ($lvl) + '); if (!' + ($valid) + ') { ';
var $$outStack = $$outStack || [];
$$outStack.push(out);
out = ''; /* istanbul ignore else */
if (it.createErrors !== false) {
out += ' { keyword: \'' + ('const') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { allowedValue: schema' + ($lvl) + ' } ';
if (it.opts.messages !== false) {
out += ' , message: \'should be equal to constant\' ';
}
if (it.opts.verbose) {
out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
}
out += ' } ';
} else {
out += ' {} ';
}
var __err = out;
out = $$outStack.pop();
if (!it.compositeRule && $breakOnError) {
/* istanbul ignore if */
if (it.async) {
out += ' throw new ValidationError([' + (__err) + ']); ';
} else {
out += ' validate.errors = [' + (__err) + ']; return false; ';
}
} else {
out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
}
out += ' }';
if ($breakOnError) {
out += ' else { ';
}
return out;
}
@@ -0,0 +1,96 @@
import { File as WebFile } from "@web-std/file";
import { afterEach, beforeEach, expect, expectTypeOf, test } from "vitest";
import * as z from "zod/v4";
const minCheck = z.file().min(5);
const maxCheck = z.file().max(8);
const mimeCheck = z.file().mime(["text/plain", "application/json"]);
const originalFile = global.File;
beforeEach(async () => {
if (!globalThis.File) globalThis.File = WebFile;
});
afterEach(() => {
if (globalThis.File !== originalFile) {
globalThis.File = originalFile;
}
});
test("passing validations", () => {
minCheck.safeParse(new File(["12345"], "test.txt"));
maxCheck.safeParse(new File(["12345678"], "test.txt"));
mimeCheck.safeParse(new File([""], "test.csv", { type: "text/plain" }));
expect(() => mimeCheck.parse(new File([""], "test.txt"))).toThrow();
expect(() => mimeCheck.parse(new File([""], "test.txt", { type: "text/csv" }))).toThrow();
});
test("types", () => {
expectTypeOf(z.file().parse(new File([], "test.txt"))).toEqualTypeOf(new File([], "test.txt"));
});
test("failing validations", () => {
expect(minCheck.safeParse(new File(["1234"], "test.txt"))).toMatchInlineSnapshot(`
{
"error": [ZodError: [
{
"origin": "file",
"code": "too_small",
"minimum": 5,
"inclusive": true,
"path": [],
"message": "Too small: expected file to have >=5 bytes"
}
]],
"success": false,
}
`);
expect(maxCheck.safeParse(new File(["123456789"], "test.txt"))).toMatchInlineSnapshot(`
{
"error": [ZodError: [
{
"origin": "file",
"code": "too_big",
"maximum": 8,
"inclusive": true,
"path": [],
"message": "Too big: expected file to have <=8 bytes"
}
]],
"success": false,
}
`);
expect(mimeCheck.safeParse(new File([""], "test.csv"))).toMatchInlineSnapshot(`
{
"error": [ZodError: [
{
"code": "invalid_value",
"values": [
"text/plain",
"application/json"
],
"path": [],
"message": "Invalid option: expected one of \\"text/plain\\"|\\"application/json\\""
}
]],
"success": false,
}
`);
expect(mimeCheck.safeParse(new File([""], "test.csv", { type: "text/csv" }))).toMatchInlineSnapshot(`
{
"error": [ZodError: [
{
"code": "invalid_value",
"values": [
"text/plain",
"application/json"
],
"path": [],
"message": "Invalid option: expected one of \\"text/plain\\"|\\"application/json\\""
}
]],
"success": false,
}
`);
});
@@ -0,0 +1,30 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.dynamicAnchor = void 0;
const codegen_1 = require("../../compile/codegen");
const names_1 = require("../../compile/names");
const compile_1 = require("../../compile");
const ref_1 = require("../core/ref");
const def = {
keyword: "$dynamicAnchor",
schemaType: "string",
code: (cxt) => dynamicAnchor(cxt, cxt.schema),
};
function dynamicAnchor(cxt, anchor) {
const { gen, it } = cxt;
it.schemaEnv.root.dynamicAnchors[anchor] = true;
const v = (0, codegen_1._) `${names_1.default.dynamicAnchors}${(0, codegen_1.getProperty)(anchor)}`;
const validate = it.errSchemaPath === "#" ? it.validateName : _getValidate(cxt);
gen.if((0, codegen_1._) `!${v}`, () => gen.assign(v, validate));
}
exports.dynamicAnchor = dynamicAnchor;
function _getValidate(cxt) {
const { schemaEnv, schema, self } = cxt.it;
const { root, baseId, localRefs, meta } = schemaEnv.root;
const { schemaId } = self.opts;
const sch = new compile_1.SchemaEnv({ schema, schemaId, root, baseId, localRefs, meta });
compile_1.compileSchema.call(self, sch);
return (0, ref_1.getValidate)(cxt, sch);
}
exports.default = def;
//# sourceMappingURL=dynamicAnchor.js.map
@@ -0,0 +1,12 @@
"use strict";
// THIS CODE WAS AUTOMATICALLY GENERATED
// DO NOT EDIT THIS CODE BY HAND
// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE:
// npx nx generate-lib repo
Object.defineProperty(exports, "__esModule", { value: true });
exports.esnext_promise = void 0;
const base_config_1 = require("./base-config");
exports.esnext_promise = {
libs: [],
variables: [['PromiseConstructor', base_config_1.TYPE]],
};
@@ -0,0 +1,284 @@
/**
* Blake3 fast hash is Blake2 with reduced security (round count). Can also be used as MAC & KDF.
*
* It is advertised as "the fastest cryptographic hash". However, it isn't true in JS.
* Why is this so slow? While it must be 6x faster than blake2b, perf diff is only 20%:
*
* * There is only 30% reduction in number of rounds from blake2s
* * Speed-up comes from tree structure, which is parallelized using SIMD & threading.
* These features are not present in JS, so we only get overhead from trees.
* * Parallelization only happens on 1024-byte chunks: there is no benefit for small inputs.
* * It is still possible to make it faster using: a) loop unrolling b) web workers c) wasm
* @module
*/
import { SHA256_IV } from "./_md.js";
import { fromBig } from "./_u64.js";
import { _BLAKE2, compress } from "./blake2.js";
// prettier-ignore
import { abytes, aexists, anumber, aoutput, clean, copyBytes, createHasher, swap32IfBE, u32, u8 } from "./utils.js";
// Constructor-time mode flags (`KEYED_HASH`, `DERIVE_*`) plus per-node tree
// flags (`CHUNK_*`, `PARENT`, `ROOT`).
const B3_Flags = {
CHUNK_START: 0b1,
CHUNK_END: 0b10,
PARENT: 0b100,
ROOT: 0b1000,
KEYED_HASH: 0b10000,
DERIVE_KEY_CONTEXT: 0b100000,
DERIVE_KEY_MATERIAL: 0b1000000,
};
// Default BLAKE3 IV, cloned from the shared BLAKE2s / SHA-256 IV basis.
const B3_IV = /* @__PURE__ */ SHA256_IV.slice();
// Seven 16-word rounds of BLAKE3 message schedule, generated by repeatedly
// permuting the identity row.
const B3_SIGMA = /* @__PURE__ */ (() => {
const Id = Array.from({ length: 16 }, (_, i) => i);
const permute = (arr) => [2, 6, 3, 10, 7, 0, 4, 13, 1, 11, 12, 5, 9, 14, 15, 8].map((i) => arr[i]);
const res = [];
for (let i = 0, v = Id; i < 7; i++, v = permute(v))
res.push(...v);
return Uint8Array.from(res);
})();
/** Blake3 hash. Can be used as MAC and KDF with caller-encoded context bytes. */
export class _BLAKE3 extends _BLAKE2 {
canXOF = true;
chunkPos = 0; // Position of current block in chunk
// How many chunks we already have; exact while this stays within
// JS's safe-integer range.
chunksDone = 0;
flags = 0 | 0;
IV;
state;
stack = [];
// Output
posOut = 0;
bufferOut32 = new Uint32Array(16);
bufferOut;
// Index of output chunk; exact while this stays within JS's
// safe-integer range.
chunkOut = 0;
enableXOF = true;
constructor(opts = {}, flags = 0) {
super(64, opts.dkLen === undefined ? 32 : opts.dkLen);
const { key, context } = opts;
const hasContext = context !== undefined;
if (key !== undefined) {
if (hasContext)
throw new Error('Only "key" or "context" can be specified at same time');
abytes(key, 32, 'key');
const k = copyBytes(key);
this.IV = u32(k);
swap32IfBE(this.IV);
this.flags = flags | B3_Flags.KEYED_HASH;
}
else if (hasContext) {
abytes(context, undefined, 'context');
const ctx = context;
const contextKey = new _BLAKE3({ dkLen: 32 }, B3_Flags.DERIVE_KEY_CONTEXT)
.update(ctx)
.digest();
this.IV = u32(contextKey);
swap32IfBE(this.IV);
this.flags = flags | B3_Flags.DERIVE_KEY_MATERIAL;
}
else {
this.IV = B3_IV.slice();
this.flags = flags;
}
this.state = this.IV.slice();
this.bufferOut = u8(this.bufferOut32);
}
// _BLAKE2's scalar-state hooks are unused here: BLAKE3 keeps its tree/XOF state in arrays and
// copies it directly in _cloneInto().
get() {
return [];
}
set() { }
// Truncated chunk/parent compression: seed v8..v15 as IV[0..3], t0, t1,
// block length, and flags, then keep only the first 8 output words.
b2Compress(counter, flags, buf, bufPos = 0) {
const { state: s, pos } = this;
const { h, l } = fromBig(BigInt(counter), true);
// prettier-ignore
const { v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15 } = compress(B3_SIGMA, bufPos, buf, 7, s[0], s[1], s[2], s[3], s[4], s[5], s[6], s[7], B3_IV[0], B3_IV[1], B3_IV[2], B3_IV[3], h, l, pos, flags);
s[0] = v0 ^ v8;
s[1] = v1 ^ v9;
s[2] = v2 ^ v10;
s[3] = v3 ^ v11;
s[4] = v4 ^ v12;
s[5] = v5 ^ v13;
s[6] = v6 ^ v14;
s[7] = v7 ^ v15;
}
compress(buf, bufPos = 0, isLast = false) {
// Compress last block
let flags = this.flags;
if (!this.chunkPos)
flags |= B3_Flags.CHUNK_START;
if (this.chunkPos === 15 || isLast)
flags |= B3_Flags.CHUNK_END;
if (!isLast)
this.pos = this.blockLen;
this.b2Compress(this.chunksDone, flags, buf, bufPos);
this.chunkPos += 1;
// If current block is last in chunk (16 blocks), then compress chunks
if (this.chunkPos === 16 || isLast) {
let chunk = this.state;
this.state = this.IV.slice();
// If not the last one, compress only when there are trailing zeros in chunk counter
// Chunks are used as a binary tree where the current stack is the path.
// Zero means the current leaf is finished and can be compressed.
// 1 (001) - leaf not finished (just push current chunk to stack)
// 2 (010) - leaf finished at depth=1 (merge with last elm on stack and push back)
// 3 (011) - last leaf not finished
// 4 (100) - leafs finished at depth=1 and depth=2
for (let last, chunks = this.chunksDone + 1; isLast || !(chunks & 1); chunks >>= 1) {
if (!(last = this.stack.pop()))
break;
this.buffer32.set(last, 0);
this.buffer32.set(chunk, 8);
this.pos = this.blockLen;
this.b2Compress(0, this.flags | B3_Flags.PARENT, this.buffer32, 0);
chunk = this.state;
this.state = this.IV.slice();
}
this.chunksDone++;
this.chunkPos = 0;
this.stack.push(chunk);
}
this.pos = 0;
}
_cloneInto(to) {
to = super._cloneInto(to);
const { IV, flags, state, chunkPos, posOut, chunkOut, stack, chunksDone } = this;
to.state.set(state.slice());
// Clone each CV stack entry by value so extending or destroying the clone
// cannot alias the source tree state.
to.stack = stack.map((i) => Uint32Array.from(i));
to.IV.set(IV);
to.flags = flags;
to.chunkPos = chunkPos;
to.chunksDone = chunksDone;
to.posOut = posOut;
to.chunkOut = chunkOut;
to.enableXOF = this.enableXOF;
to.bufferOut32.set(this.bufferOut32);
return to;
}
destroy() {
this.destroyed = true;
clean(this.state, this.buffer32, this.IV, this.bufferOut32);
clean(...this.stack);
}
// Root/XOF compression: rerun the same ROOT inputs with incrementing output
// counter `t` and materialize all 16 output words.
// Same as b2Compress, but doesn't modify state and returns 16 u32 array (instead of 8)
b2CompressOut() {
const { state: s, pos, flags, buffer32, bufferOut32: out32 } = this;
const { h, l } = fromBig(BigInt(this.chunkOut++));
swap32IfBE(buffer32);
// prettier-ignore
const { v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15 } = compress(B3_SIGMA, 0, buffer32, 7, s[0], s[1], s[2], s[3], s[4], s[5], s[6], s[7], B3_IV[0], B3_IV[1], B3_IV[2], B3_IV[3], l, h, pos, flags);
out32[0] = v0 ^ v8;
out32[1] = v1 ^ v9;
out32[2] = v2 ^ v10;
out32[3] = v3 ^ v11;
out32[4] = v4 ^ v12;
out32[5] = v5 ^ v13;
out32[6] = v6 ^ v14;
out32[7] = v7 ^ v15;
out32[8] = s[0] ^ v8;
out32[9] = s[1] ^ v9;
out32[10] = s[2] ^ v10;
out32[11] = s[3] ^ v11;
out32[12] = s[4] ^ v12;
out32[13] = s[5] ^ v13;
out32[14] = s[6] ^ v14;
out32[15] = s[7] ^ v15;
swap32IfBE(buffer32);
swap32IfBE(out32);
this.posOut = 0;
}
finish() {
if (this.finished)
return;
this.finished = true;
// Padding
clean(this.buffer.subarray(this.pos));
// Process last chunk
let flags = this.flags | B3_Flags.ROOT;
if (this.stack.length) {
// Finalize the current chunk first, then rerun the last parent
// compression as ROOT with t = 0 and b = 64.
flags |= B3_Flags.PARENT;
swap32IfBE(this.buffer32);
this.compress(this.buffer32, 0, true);
swap32IfBE(this.buffer32);
this.chunksDone = 0;
this.pos = this.blockLen;
}
else {
flags |= (!this.chunkPos ? B3_Flags.CHUNK_START : 0) | B3_Flags.CHUNK_END;
}
this.flags = flags;
this.b2CompressOut();
}
writeInto(out) {
aexists(this, false);
abytes(out);
this.finish();
const { blockLen, bufferOut } = this;
for (let pos = 0, len = out.length; pos < len;) {
if (this.posOut >= blockLen)
this.b2CompressOut();
const take = Math.min(blockLen - this.posOut, len - pos);
out.set(bufferOut.subarray(this.posOut, this.posOut + take), pos);
this.posOut += take;
pos += take;
}
return out;
}
xofInto(out) {
if (!this.enableXOF)
throw new Error('XOF is not possible after digest call');
return this.writeInto(out);
}
xof(bytes) {
anumber(bytes);
return this.xofInto(new Uint8Array(bytes));
}
digestInto(out) {
aoutput(out, this);
if (this.finished)
throw new Error('digest() was already called');
this.enableXOF = false;
// `aoutput(...)` allows oversized buffers; digestInto() must fill only the configured digest.
this.writeInto(out.subarray(0, this.outputLen));
this.destroy();
}
digest() {
const out = new Uint8Array(this.outputLen);
this.digestInto(out);
return out;
}
}
/**
* BLAKE3 hash function. Can be used as MAC and KDF.
* @param msg - message that would be hashed
* @param opts - Optional output, MAC, or KDF configuration. `key` must be
* exactly 32 bytes, `context` is caller-encoded bytes, and `dkLen` can be
* 0..2^64-1 via the XOF-backed output path. See {@link Blake3Opts}.
* @returns Digest bytes.
* @example
* Hash, MAC, or derive key material with BLAKE3.
* ```ts
* import { blake3 } from '@noble/hashes/blake3.js';
* import { utf8ToBytes } from '@noble/hashes/utils.js';
* const data = new Uint8Array(32);
* const hash = blake3(data);
* const mac = blake3(data, { key: new Uint8Array(32) });
* const kdf = blake3(data, { context: utf8ToBytes('application name') });
* ```
*/
export const blake3 = /* @__PURE__ */ createHasher((opts = {}) => new _BLAKE3(opts));
//# sourceMappingURL=blake3.js.map
@@ -0,0 +1,8 @@
export var zeroRightClassName = 'right-scroll-bar-position';
export var fullWidthClassName = 'width-before-scroll-bar';
export var noScrollbarsClassName = 'with-scroll-bars-hidden';
/**
* Name of a CSS variable containing the amount of "hidden" scrollbar
* ! might be undefined ! use will fallback!
*/
export var removedBarSizeVariable = '--removed-body-scroll-bar-size';
@@ -0,0 +1,16 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getValueOfLiteralType = void 0;
const valueIsPseudoBigInt = (value) => {
return typeof value === 'object';
};
const pseudoBigIntToBigInt = (value) => {
return BigInt((value.negative ? '-' : '') + value.base10Value);
};
const getValueOfLiteralType = (type) => {
if (valueIsPseudoBigInt(type.value)) {
return pseudoBigIntToBigInt(type.value);
}
return type.value;
};
exports.getValueOfLiteralType = getValueOfLiteralType;
@@ -0,0 +1,115 @@
"use strict";
const node_fs = require("node:fs");
const node_path = require("node:path");
const isWhatType = require("is-what-type");
const tinyglobby = require("tinyglobby");
const vpRuntimeHelper = require("vp-runtime-helper");
const promises = require("node:fs/promises");
const node_util = require("node:util");
const fsExtra = require("fs-extra");
const name = "vite-plugin-cp";
const PLUGIN_NAME = name;
const logger = vpRuntimeHelper.logFactory.getLogger(PLUGIN_NAME);
function stringify(value) {
return node_util.inspect(value, { breakLength: Infinity });
}
function changeName(name2, rename) {
if (typeof rename === "function") {
return rename(name2) || name2;
}
return rename || name2;
}
function makeCopy(transform) {
return typeof transform === "function" ? function(from, to) {
return promises.readFile(from).then((buf) => transform(buf, from)).then((data) => {
return fsExtra.outputFile(to, data);
});
} : fsExtra.copy;
}
async function doCopy(config, cwd, globOptions, copyOptions) {
const { src, rename, flatten, transform } = config;
let { dest } = config;
if (!src || !dest) {
throw new Error(`${stringify(config)} target must have "src" and "dest" properties.`);
}
dest = vpRuntimeHelper.toAbsolutePath(dest, cwd);
const cpFile = makeCopy(transform);
const run = async (source) => {
const absSource = vpRuntimeHelper.toAbsolutePath(source, cwd);
let isNotFlatten = false;
try {
isNotFlatten = node_fs.statSync(absSource).isDirectory() && !flatten;
} catch (e) {
}
const matchedPaths = await tinyglobby.glob(absSource, globOptions);
if (!matchedPaths.length) {
logger.warn(`Could not find files with "${source}".`);
return null;
}
await Promise.all(matchedPaths.map((matchedPath) => {
let targetFileName;
let destDir = dest;
if (isNotFlatten) {
const tmp = node_path.parse(node_path.relative(absSource, matchedPath));
targetFileName = tmp.base;
destDir = node_path.join(destDir, tmp.dir);
} else {
targetFileName = node_path.parse(matchedPath).base;
}
const destPath = node_path.join(destDir, changeName(targetFileName, rename));
return cpFile(matchedPath, destPath, copyOptions).then(() => {
logger.trace(`Copied "${matchedPath}" to "${destPath}".`);
}, (e) => {
logger.warn(`Could not copy "${matchedPath}" to "${destPath}".`, e);
});
}));
};
if (typeof src === "string") {
await run(src);
} else if (Array.isArray(src)) {
await Promise.all(src.map(run));
}
}
function pluginCp(opts) {
const { hook = "closeBundle", enforce, targets, cwd = process.cwd(), globOptions, copyOptions, logLevel, delay, enableBanner } = opts || {};
if (!Array.isArray(targets) || !targets.length) {
logger.warn("No targets specified.");
return;
}
if (enableBanner) {
vpRuntimeHelper.banner(PLUGIN_NAME);
}
if (logLevel) {
logger.level = logLevel;
}
const plugin = {
name: PLUGIN_NAME
};
if (enforce) {
plugin.enforce = enforce;
}
let called = false;
plugin[hook] = async function() {
if (called) {
return;
}
if (delay !== void 0) {
await vpRuntimeHelper.sleep(delay);
}
called = true;
const startTime = Date.now();
await Promise.all(targets.map((target) => {
if (!isWhatType.isObject(target)) {
throw new TypeError(`${stringify(target)} target must be an object`);
}
return doCopy(target, cwd, Object.assign({}, globOptions, target.globOptions, {
absolute: true,
expandDirectories: true,
onlyFiles: true
}), Object.assign({}, copyOptions, target.copyOptions));
}));
logger.info(`Done in ${vpRuntimeHelper.displayTime(Date.now() - startTime)}`);
};
return plugin;
}
module.exports = pluginCp;
@@ -0,0 +1 @@
{"version":3,"file":"croissant.js","sources":["../../../src/icons/croissant.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Croissant\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJtNC42IDEzLjExIDUuNzktMy4yMWMxLjg5LTEuMDUgNC43OSAxLjc4IDMuNzEgMy43MWwtMy4yMiA1LjgxQzguOCAyMy4xNi43OSAxNS4yMyA0LjYgMTMuMTFaIiAvPgogIDxwYXRoIGQ9Im0xMC41IDkuNS0xLTIuMjlDOS4yIDYuNDggOC44IDYgOCA2SDQuNUMyLjc5IDYgMiA2LjUgMiA4LjVhNy43MSA3LjcxIDAgMCAwIDIgNC44MyIgLz4KICA8cGF0aCBkPSJNOCA2YzAtMS41NS4yNC00LTItNC0yIDAtMi41IDIuMTctMi41IDQiIC8+CiAgPHBhdGggZD0ibTE0LjUgMTMuNSAyLjI5IDFjLjczLjMgMS4yMS43IDEuMjEgMS41djMuNWMwIDEuNzEtLjUgMi41LTIuNSAyLjVhNy43MSA3LjcxIDAgMCAxLTQuODMtMiIgLz4KICA8cGF0aCBkPSJNMTggMTZjMS41NSAwIDQtLjI0IDQgMiAwIDItMi4xNyAyLjUtNCAyLjUiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/croissant\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 Croissant = createLucideIcon('Croissant', [\n [\n 'path',\n {\n d: 'm4.6 13.11 5.79-3.21c1.89-1.05 4.79 1.78 3.71 3.71l-3.22 5.81C8.8 23.16.79 15.23 4.6 13.11Z',\n key: '1ozxlb',\n },\n ],\n [\n 'path',\n {\n d: 'm10.5 9.5-1-2.29C9.2 6.48 8.8 6 8 6H4.5C2.79 6 2 6.5 2 8.5a7.71 7.71 0 0 0 2 4.83',\n key: 'ffuyb5',\n },\n ],\n ['path', { d: 'M8 6c0-1.55.24-4-2-4-2 0-2.5 2.17-2.5 4', key: 'osnpzi' }],\n [\n 'path',\n {\n d: 'm14.5 13.5 2.29 1c.73.3 1.21.7 1.21 1.5v3.5c0 1.71-.5 2.5-2.5 2.5a7.71 7.71 0 0 1-4.83-2',\n key: '1vubaw',\n },\n ],\n ['path', { d: 'M18 16c1.55 0 4-.24 4 2 0 2-2.17 2.5-4 2.5', key: 'wxr772' }],\n]);\n\nexport default Croissant;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAY,iBAAiB,WAAa,CAAA,CAAA,CAAA;AAAA,CAC9C,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,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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CAAA,CAAA,CAAA;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA,CAAA;AAAA,CAAA,CACA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CLine truncated
@@ -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 RemoveFormatting = createLucideIcon("RemoveFormatting", [
["path", { d: "M4 7V4h16v3", key: "9msm58" }],
["path", { d: "M5 20h6", key: "1h6pxn" }],
["path", { d: "M13 4 8 20", key: "kqq6aj" }],
["path", { d: "m15 15 5 5", key: "me55sn" }],
["path", { d: "m20 15-5 5", key: "11p7ol" }]
]);
export { RemoveFormatting as default };
//# sourceMappingURL=remove-formatting.js.map