docs: 仓库链接指向本镜像仓库
Build NapCat Artifacts / Type Check & Test (push) Waiting to run

This commit is contained in:
TanTan committed 2026-11-13 09:25:58 +08:00
1 parent f954252a34
commit e311ca3275
35554 files changed
+6229626 -4

No files matched your search

@@ -0,0 +1,10 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.AsnSchemaValidationError = void 0;
class AsnSchemaValidationError extends Error {
constructor() {
super(...arguments);
this.schemas = [];
}
}
exports.AsnSchemaValidationError = AsnSchemaValidationError;
@@ -0,0 +1,12 @@
import { type COSEALG, type COSEPublicKeyEC2 } from '../../cose.js';
import type { Uint8Array_ } from '../../../types/index.js';
/**
* Verify a signature using an EC2 public key
*/
export declare function verifyEC2(opts: {
cosePublicKey: COSEPublicKeyEC2;
signature: Uint8Array_;
data: Uint8Array_;
shaHashOverride?: COSEALG;
}): Promise<boolean>;
//# sourceMappingURL=verifyEC2.d.ts.map
@@ -0,0 +1,10 @@
import toPropertyKey from "./toPropertyKey.js";
function _defineProperty(e, r, t) {
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
value: t,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[r] = t, e;
}
export { _defineProperty as default };
@@ -0,0 +1 @@
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],n):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_fy=n(e.dayjs)}(this,(function(e){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=n(e),t={name:"fy",weekdays:"snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon".split("_"),months:"jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber".split("_"),monthsShort:"jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.".split("_"),weekStart:1,weekdaysShort:"si._mo._ti._wo._to._fr._so.".split("_"),weekdaysMin:"Si_Mo_Ti_Wo_To_Fr_So".split("_"),ordinal:function(e){return e},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},relativeTime:{future:"oer %s",past:"%s lyn",s:"in pear sekonden",m:"ien minút",mm:"%d minuten",h:"ien oere",hh:"%d oeren",d:"ien dei",dd:"%d dagen",M:"ien moanne",MM:"%d moannen",y:"ien jier",yy:"%d jierren"}};return i.default.locale(t,null,!0),t}));
@@ -0,0 +1,229 @@
"use strict";
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.render = void 0;
/*
* Module dependencies
*/
var ElementType = __importStar(require("domelementtype"));
var entities_1 = require("entities");
/**
* Mixed-case SVG and MathML tags & attributes
* recognized by the HTML parser.
*
* @see https://html.spec.whatwg.org/multipage/parsing.html#parsing-main-inforeign
*/
var foreignNames_js_1 = require("./foreignNames.js");
var unencodedElements = new Set([
"style",
"script",
"xmp",
"iframe",
"noembed",
"noframes",
"plaintext",
"noscript",
]);
function replaceQuotes(value) {
return value.replace(/"/g, "&quot;");
}
/**
* Format attributes
*/
function formatAttributes(attributes, opts) {
var _a;
if (!attributes)
return;
var encode = ((_a = opts.encodeEntities) !== null && _a !== void 0 ? _a : opts.decodeEntities) === false
? replaceQuotes
: opts.xmlMode || opts.encodeEntities !== "utf8"
? entities_1.encodeXML
: entities_1.escapeAttribute;
return Object.keys(attributes)
.map(function (key) {
var _a, _b;
var value = (_a = attributes[key]) !== null && _a !== void 0 ? _a : "";
if (opts.xmlMode === "foreign") {
/* Fix up mixed-case attribute names */
key = (_b = foreignNames_js_1.attributeNames.get(key)) !== null && _b !== void 0 ? _b : key;
}
if (!opts.emptyAttrs && !opts.xmlMode && value === "") {
return key;
}
return "".concat(key, "=\"").concat(encode(value), "\"");
})
.join(" ");
}
/**
* Self-enclosing tags
*/
var singleTag = new Set([
"area",
"base",
"basefont",
"br",
"col",
"command",
"embed",
"frame",
"hr",
"img",
"input",
"isindex",
"keygen",
"link",
"meta",
"param",
"source",
"track",
"wbr",
]);
/**
* Renders a DOM node or an array of DOM nodes to a string.
*
* Can be thought of as the equivalent of the `outerHTML` of the passed node(s).
*
* @param node Node to be rendered.
* @param options Changes serialization behavior
*/
function render(node, options) {
if (options === void 0) { options = {}; }
var nodes = "length" in node ? node : [node];
var output = "";
for (var i = 0; i < nodes.length; i++) {
output += renderNode(nodes[i], options);
}
return output;
}
exports.render = render;
exports.default = render;
function renderNode(node, options) {
switch (node.type) {
case ElementType.Root:
return render(node.children, options);
// @ts-expect-error We don't use `Doctype` yet
case ElementType.Doctype:
case ElementType.Directive:
return renderDirective(node);
case ElementType.Comment:
return renderComment(node);
case ElementType.CDATA:
return renderCdata(node);
case ElementType.Script:
case ElementType.Style:
case ElementType.Tag:
return renderTag(node, options);
case ElementType.Text:
return renderText(node, options);
}
}
var foreignModeIntegrationPoints = new Set([
"mi",
"mo",
"mn",
"ms",
"mtext",
"annotation-xml",
"foreignObject",
"desc",
"title",
]);
var foreignElements = new Set(["svg", "math"]);
function renderTag(elem, opts) {
var _a;
// Handle SVG / MathML in HTML
if (opts.xmlMode === "foreign") {
/* Fix up mixed-case element names */
elem.name = (_a = foreignNames_js_1.elementNames.get(elem.name)) !== null && _a !== void 0 ? _a : elem.name;
/* Exit foreign mode at integration points */
if (elem.parent &&
foreignModeIntegrationPoints.has(elem.parent.name)) {
opts = __assign(__assign({}, opts), { xmlMode: false });
}
}
if (!opts.xmlMode && foreignElements.has(elem.name)) {
opts = __assign(__assign({}, opts), { xmlMode: "foreign" });
}
var tag = "<".concat(elem.name);
var attribs = formatAttributes(elem.attribs, opts);
if (attribs) {
tag += " ".concat(attribs);
}
if (elem.children.length === 0 &&
(opts.xmlMode
? // In XML mode or foreign mode, and user hasn't explicitly turned off self-closing tags
opts.selfClosingTags !== false
: // User explicitly asked for self-closing tags, even in HTML mode
opts.selfClosingTags && singleTag.has(elem.name))) {
if (!opts.xmlMode)
tag += " ";
tag += "/>";
}
else {
tag += ">";
if (elem.children.length > 0) {
tag += render(elem.children, opts);
}
if (opts.xmlMode || !singleTag.has(elem.name)) {
tag += "</".concat(elem.name, ">");
}
}
return tag;
}
function renderDirective(elem) {
return "<".concat(elem.data, ">");
}
function renderText(elem, opts) {
var _a;
var data = elem.data || "";
// If entities weren't decoded, no need to encode them back
if (((_a = opts.encodeEntities) !== null && _a !== void 0 ? _a : opts.decodeEntities) !== false &&
!(!opts.xmlMode &&
elem.parent &&
unencodedElements.has(elem.parent.name))) {
data =
opts.xmlMode || opts.encodeEntities !== "utf8"
? (0, entities_1.encodeXML)(data)
: (0, entities_1.escapeText)(data);
}
return data;
}
function renderCdata(elem) {
return "<![CDATA[".concat(elem.children[0].data, "]]>");
}
function renderComment(elem) {
return "<!--".concat(elem.data, "-->");
}
@@ -0,0 +1,41 @@
var concat = require('../')
var stream = require('stream')
var test = require('tape')
test('basic', function (t) {
t.plan(2)
var s = new stream.PassThrough()
concat(s, function (err, buf) {
t.error(err)
t.deepEqual(buf, Buffer.from('abc123456789'))
})
s.write('abc')
setTimeout(function () {
s.write('123')
}, 10)
setTimeout(function () {
s.write('456')
}, 20)
setTimeout(function () {
s.end('789')
}, 30)
})
test('error', function (t) {
t.plan(2)
var s = new stream.PassThrough()
concat(s, function (err, buf) {
t.ok(err, 'got expected error')
t.ok(!buf)
})
s.write('abc')
setTimeout(function () {
s.write('123')
}, 10)
setTimeout(function () {
s.write('456')
}, 20)
setTimeout(function () {
s.emit('error', new Error('error'))
}, 30)
})
@@ -0,0 +1,20 @@
'use strict';
var toPrimitive = require('../');
var ES5 = require('../es5');
var ES6 = require('../es6');
var ES2015 = require('../es2015');
var test = require('tape');
test('default export', function (t) {
t.equal(toPrimitive, ES2015, 'default export is ES2015');
t.equal(toPrimitive.ES5, ES5, 'ES5 property has ES5 method');
t.equal(toPrimitive.ES6, ES6, 'ES6 property has ES6 method');
t.equal(toPrimitive.ES2015, ES2015, 'ES2015 property has ES2015 method');
t.end();
});
require('./es5');
require('./es6');
require('./es2015');
@@ -0,0 +1,62 @@
var Promise = require('any-promise')
var fs
try {
fs = require('graceful-fs')
} catch(err) {
fs = require('fs')
}
var api = [
'appendFile',
'chmod',
'chown',
'close',
'fchmod',
'fchown',
'fdatasync',
'fstat',
'fsync',
'ftruncate',
'futimes',
'lchown',
'link',
'lstat',
'mkdir',
'open',
'read',
'readFile',
'readdir',
'readlink',
'realpath',
'rename',
'rmdir',
'stat',
'symlink',
'truncate',
'unlink',
'utimes',
'write',
'writeFile'
]
typeof fs.access === 'function' && api.push('access')
typeof fs.copyFile === 'function' && api.push('copyFile')
typeof fs.mkdtemp === 'function' && api.push('mkdtemp')
require('thenify-all').withCallback(fs, exports, api)
exports.exists = function (filename, callback) {
// callback
if (typeof callback === 'function') {
return fs.stat(filename, function (err) {
callback(null, !err);
})
}
// or promise
return new Promise(function (resolve) {
fs.stat(filename, function (err) {
resolve(!err)
})
})
}
@@ -0,0 +1,49 @@
{
"compilerOptions": {
/* Visit https://aka.ms/tsconfig to read more about this file */
/* Projects */
/* Language and Environment */
"target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
// "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
// "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
"useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
// "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
/* Modules */
"module": "commonjs", /* Specify what module code is generated. */
// "rootDir": "./", /* Specify the root folder within your source files. */
// "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
// "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
"typeRoots": ["types"], /* Specify multiple folders that act like './node_modules/@types'. */
"resolveJsonModule": true, /* Enable importing .json files. */
// "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */
/* JavaScript Support */
"allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */
"checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
"maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
/* Emit */
"declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
"declarationMap": true, /* Create sourcemaps for d.ts files. */
"noEmit": true, /* Disable emitting files from a compilation. */
/* Interop Constraints */
"allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
"esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */
"forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */
/* Type Checking */
"strict": true, /* Enable all strict type-checking options. */
/* Completeness */
//"skipLibCheck": true /* Skip type checking all .d.ts files. */
},
"exclude": [
"coverage"
]
}
@@ -0,0 +1,2 @@
import type { LibDefinition } from '../variable';
export declare const es2016_array_include: LibDefinition;
@@ -0,0 +1,48 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var complementaryRole = {
abstract: false,
accessibleNameRequired: false,
baseConcepts: [],
childrenPresentational: false,
nameFrom: ['author'],
prohibitedProps: [],
props: {},
relatedConcepts: [{
concept: {
constraints: ['scoped to the body element', 'scoped to the main element'],
name: 'aside'
},
module: 'HTML'
}, {
concept: {
attributes: [{
constraints: ['set'],
name: 'aria-label'
}],
constraints: ['scoped to a sectioning content element', 'scoped to a sectioning root element other than body'],
name: 'aside'
},
module: 'HTML'
}, {
concept: {
attributes: [{
constraints: ['set'],
name: 'aria-labelledby'
}],
constraints: ['scoped to a sectioning content element', 'scoped to a sectioning root element other than body'],
name: 'aside'
},
module: 'HTML'
}],
requireContextRole: [],
requiredContextRole: [],
requiredOwnedElements: [],
requiredProps: {},
superClass: [['roletype', 'structure', 'section', 'landmark']]
};
var _default = exports.default = complementaryRole;
@@ -0,0 +1 @@
module.exports={C:{"115":0.03613,"125":0.03613,"128":0.00516,"132":0.55233,"140":0.01549,"141":0.00516,"142":0.01032,"143":0.6246,"144":0.12905,_:"2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 116 117 118 119 120 121 122 123 124 126 127 129 130 131 133 134 135 136 137 138 139 145 146 147 3.5 3.6"},D:{"39":0.00516,"40":0.00516,"41":0.00516,"42":0.00516,"43":0.00516,"44":0.00516,"45":0.00516,"46":0.00516,"47":0.00516,"48":0.00516,"49":0.00516,"50":0.00516,"51":0.00516,"52":0.00516,"53":0.00516,"54":0.00516,"55":0.00516,"56":0.00516,"57":0.00516,"58":0.00516,"59":0.00516,"60":0.00516,"65":0.00516,"66":0.00516,"70":0.00516,"75":0.01032,"79":0.07227,"80":0.00516,"83":0.02065,"86":0.00516,"87":0.07743,"89":0.01032,"94":0.00516,"98":0.00516,"99":0.00516,"100":0.01032,"101":0.00516,"103":0.00516,"104":0.00516,"105":0.00516,"106":0.00516,"107":0.00516,"108":0.01032,"109":1.36277,"110":0.00516,"111":0.02581,"112":7.25777,"113":0.00516,"114":0.00516,"115":0.00516,"116":0.01549,"117":0.00516,"119":0.00516,"120":0.00516,"121":0.01032,"122":0.02581,"123":0.01032,"124":0.00516,"125":16.53905,"126":0.59363,"127":0.01032,"128":0.01549,"129":0.01032,"130":0.30456,"131":0.06194,"132":0.01549,"133":0.05162,"134":0.02065,"135":0.02065,"136":0.02065,"137":0.0413,"138":0.22713,"139":0.49039,"140":3.42757,"141":9.70972,"142":0.1084,"143":0.00516,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 61 62 63 64 67 68 69 71 72 73 74 76 77 78 81 84 85 88 90 91 92 93 95 96 97 102 118 144 145"},F:{"46":0.01549,"79":0.01549,"85":0.11873,"91":0.02581,"92":0.05678,"93":0.00516,"95":0.12389,"114":0.38715,"120":0.06194,"121":0.03097,"122":0.69687,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 47 48 49 50 51 52 53 54 55 56 57 58 60 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 80 81 82 83 84 86 87 88 89 90 94 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 115 116 117 118 119 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"18":0.00516,"89":0.00516,"92":0.01032,"109":0.00516,"114":0.18067,"121":0.01032,"122":0.00516,"131":0.00516,"133":0.00516,"134":0.00516,"136":0.00516,"137":0.00516,"138":0.01032,"139":0.01549,"140":0.26842,"141":1.3989,_:"12 13 14 15 16 17 79 80 81 83 84 85 86 87 88 90 91 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 110 111 112 113 115 116 117 118 119 120 123 124 125 126 127 128 129 130 132 135 142"},E:{_:"0 4 5 6 7 8 9 10 11 12 13 14 15 3.1 3.2 5.1 6.1 7.1 9.1 10.1 11.1 12.1 13.1 15.1 15.2-15.3 15.4 15.5 16.0 16.2 16.3 16.5 17.0 26.2","14.1":0.01549,"15.6":0.06194,"16.1":0.00516,"16.4":0.00516,"16.6":0.01549,"17.1":0.01032,"17.2":0.00516,"17.3":0.01032,"17.4":0.01032,"17.5":0.01549,"17.6":0.02065,"18.0":0.06711,"18.1":0.00516,"18.2":0.03097,"18.3":0.03613,"18.4":0.03097,"18.5-18.6":0.07743,"26.0":0.27359,"26.1":0.00516},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00069,"5.0-5.1":0,"6.0-6.1":0.00275,"7.0-7.1":0.00206,"8.1-8.4":0,"9.0-9.2":0,"9.3":0.00618,"10.0-10.2":0.00069,"10.3":0.01168,"11.0-11.2":0.17312,"11.3-11.4":0.00412,"12.0-12.1":0.00137,"12.2-12.5":0.03366,"13.0-13.1":0,"13.2":0.00343,"13.3":0.00137,"13.4-13.7":0.0055,"14.0-14.4":0.01168,"14.5-14.8":0.01237,"15.0-15.1":0.01168,"15.2-15.3":0.00893,"15.4":0.0103,"15.5":0.01168,"15.6-15.8":0.15251,"16.0":0.02061,"16.1":0.03847,"16.2":0.01992,"16.3":0.03572,"16.4":0.00893,"16.5":0.0158,"16.6-16.7":0.20404,"17.0":0.01443,"17.1":0.02198,"17.2":0.0158,"17.3":0.02336,"17.4":0.04122,"17.5":0.07076,"17.6-17.7":0.17862,"18.0":0.04053,"18.1":0.08381,"18.2":0.04534,"18.3":0.14564,"18.4":0.07488,"18.5-18.6":3.81832,"26.0":0.47197,"26.1":0.01717},P:{"4":0.13234,"20":0.01018,"21":0.01018,"22":0.01018,"23":0.02036,"24":0.02036,"25":0.03054,"26":0.08144,"27":0.0509,"28":1.78149,"29":0.1527,"5.0-5.4":0.02036,"6.2-6.4":0.03054,"7.2-7.4":0.06108,_:"8.2 9.2 10.1 11.1-11.2 12.0 13.0 14.0 15.0 16.0 18.0","17.0":0.02036,"19.0":0.01018},I:{"0":0.00483,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0,"4.4":0,"4.4.3-4.4.4":0},K:{"0":1.15144,_:"10 11 12 11.1 11.5 12.1"},A:{"8":0.01549,"11":0.05678,_:"6 7 9 10 5.5"},S:{_:"2.5 3.0-3.1"},J:{_:"7 10"},N:{_:"10 11"},R:{_:"0"},M:{"0":0.18868},Q:{_:"14.9"},O:{"0":0.12579},H:{"0":0},L:{"0":40.51259}};
@@ -0,0 +1,24 @@
# @heroui/use-data-scroll-overflow
A Quick description of the component
> This is an internal utility, not intended for public usage.
## Installation
```sh
yarn add @heroui/use-data-scroll-overflow
# or
npm i @heroui/use-data-scroll-overflow
```
## Contribution
Yes please! See the
[contributing guidelines](https://github.com/frontio-ai/heroui/blob/master/CONTRIBUTING.md)
for details.
## License
This project is licensed under the terms of the
[MIT license](https://github.com/frontio-ai/heroui/blob/master/LICENSE).
@@ -0,0 +1 @@
{"name":"concat-map","version":"0.0.1","requiresBuild":false,"files":{"package.json":{"checkedAt":1794532092782,"integrity":"sha512-FfXkh5jbKRra//noBP8JUaVnAmK/EuKyQ1BendZK3iRtbYwBZp/ptwngGLFETr8q71GQ2ySODVheqCWVTLEx0A==","mode":420,"size":989},"LICENSE":{"checkedAt":1794532092782,"integrity":"sha512-UYETA37gNUDKrmMFiphSX5pKZ0Jb2MNZb2l77Vrh0gU/5292uFpO77gMxRn3sD02jPS0RSiMTKfKy151I/M5Yg==","mode":420,"size":1073},"index.js":{"checkedAt":1794532092782,"integrity":"sha512-zsdwYPlc0mqiiVHbhHRdQFzoqPRXYdKvEdxgLrdVeP3bPg1/ReEtF1CkWtrshFK2SAIXc0iNyPSSNfx1uBmlsg==","mode":420,"size":345},".travis.yml":{"checkedAt":1794532092782,"integrity":"sha512-JPDxYlXgtBZT64mvPpxhYlNhGMN+T6AD5iPo05ElvOjSWB8++XiJkVM/RilMIf+7+q9V1EFQs+YqaGKB2D258w==","mode":420,"size":43},"README.markdown":{"checkedAt":1794532092783,"integrity":"sha512-xwe0LALQ+iqrmjKDUJX8FaJWHC0vzoWhFiC5l3lxzQRb+0fCIvYtIbDSBnb/7mnDgPAHpIS1LT3hucGyL3PBZw==","mode":420,"size":1165},"example/map.js":{"checkedAt":1794532092783,"integrity":"sha512-y+SbjCyA2FpPw8TWF2VU9cRN9CvdABwQHYhuPHzNAJXL2Ml70B/3jzzMRZv2aPL7y1bSuc/fUB05+NmaFi/2mQ==","mode":420,"size":171},"test/map.js":{"checkedAt":1794532092783,"integrity":"sha512-DQagHkGnV4aJYpeZKQzOOrkQpzLXADZ1skbDiJmVGI1A6blGymW9n9pzjyqK1dkzJ/cgjyVb1vQRCOuQPrQg1w==","mode":420,"size":1075}}}
@@ -0,0 +1,8 @@
import {
DEFAULT_TRANSITION_DURATION,
transition_default
} from "../chunk-WN6AL2BX.mjs";
export {
DEFAULT_TRANSITION_DURATION,
transition_default as default
};
@@ -0,0 +1,46 @@
{
"name": "has-flag",
"version": "4.0.0",
"description": "Check if argv has a specific flag",
"license": "MIT",
"repository": "sindresorhus/has-flag",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
},
"engines": {
"node": ">=8"
},
"scripts": {
"test": "xo && ava && tsd"
},
"files": [
"index.js",
"index.d.ts"
],
"keywords": [
"has",
"check",
"detect",
"contains",
"find",
"flag",
"cli",
"command-line",
"argv",
"process",
"arg",
"args",
"argument",
"arguments",
"getopt",
"minimist",
"optimist"
],
"devDependencies": {
"ava": "^1.4.1",
"tsd": "^0.7.2",
"xo": "^0.24.0"
}
}
@@ -0,0 +1,72 @@
# resolve-from [![Build Status](https://travis-ci.org/sindresorhus/resolve-from.svg?branch=master)](https://travis-ci.org/sindresorhus/resolve-from)
> Resolve the path of a module like [`require.resolve()`](https://nodejs.org/api/globals.html#globals_require_resolve) but from a given path
## Install
```
$ npm install resolve-from
```
## Usage
```js
const resolveFrom = require('resolve-from');
// There is a file at `./foo/bar.js`
resolveFrom('foo', './bar');
//=> '/Users/sindresorhus/dev/test/foo/bar.js'
```
## API
### resolveFrom(fromDir, moduleId)
Like `require()`, throws when the module can't be found.
### resolveFrom.silent(fromDir, moduleId)
Returns `null` instead of throwing when the module can't be found.
#### fromDir
Type: `string`
Directory to resolve from.
#### moduleId
Type: `string`
What you would use in `require()`.
## Tip
Create a partial using a bound function if you want to resolve from the same `fromDir` multiple times:
```js
const resolveFromFoo = resolveFrom.bind(null, 'foo');
resolveFromFoo('./bar');
resolveFromFoo('./baz');
```
## Related
- [resolve-cwd](https://github.com/sindresorhus/resolve-cwd) - Resolve the path of a module from the current working directory
- [import-from](https://github.com/sindresorhus/import-from) - Import a module from a given path
- [import-cwd](https://github.com/sindresorhus/import-cwd) - Import a module from the current working directory
- [resolve-pkg](https://github.com/sindresorhus/resolve-pkg) - Resolve the path of a package regardless of it having an entry point
- [import-lazy](https://github.com/sindresorhus/import-lazy) - Import a module lazily
- [resolve-global](https://github.com/sindresorhus/resolve-global) - Resolve the path of a globally installed module
## License
MIT © [Sindre Sorhus](https://sindresorhus.com)
@@ -0,0 +1,70 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.getConstraintInfo = getConstraintInfo;
const tsutils = __importStar(require("ts-api-utils"));
/**
* Returns whether the type is a generic and what its constraint is.
*
* If the type is not a generic, `isTypeParameter` will be `false`, and
* `constraintType` will be the same as the input type.
*
* If the type is a generic, and it is constrained, `isTypeParameter` will be
* `true`, and `constraintType` will be the constraint type.
*
* If the type is a generic, but it is not constrained, `constraintType` will be
* `undefined` (rather than an `unknown` type), due to https://github.com/microsoft/TypeScript/issues/60475
*
* Successor to {@link getConstrainedTypeAtLocation} due to https://github.com/typescript-eslint/typescript-eslint/issues/10438
*
* This is considered internal since it is unstable for now and may have breaking changes at any time.
* Use at your own risk.
*
* @internal
*
*/
function getConstraintInfo(checker, type) {
if (tsutils.isTypeParameter(type)) {
const constraintType = checker.getBaseConstraintOfType(type);
return {
constraintType,
isTypeParameter: true,
};
}
return {
constraintType: type,
isTypeParameter: false,
};
}
@@ -0,0 +1,99 @@
import path from 'node:path';
import { createRule, moduleVisitor, resolve, getFileExtensions, } from '../utils/index.js';
function toRelativePath(relativePath) {
const stripped = relativePath.replaceAll(/\/$/g, '');
return /^((\.\.)|(\.))($|\/)/.test(stripped) ? stripped : `./${stripped}`;
}
function normalize(filepath) {
return toRelativePath(path.posix.normalize(filepath));
}
function countRelativeParents(pathSegments) {
return pathSegments.filter(x => x === '..').length;
}
export default createRule({
name: 'no-useless-path-segments',
meta: {
type: 'suggestion',
docs: {
category: 'Static analysis',
description: 'Forbid unnecessary path segments in import and require statements.',
},
fixable: 'code',
schema: [
{
type: 'object',
properties: {
commonjs: { type: 'boolean' },
noUselessIndex: { type: 'boolean' },
},
additionalProperties: false,
},
],
messages: {
useless: 'Useless path segments for "{{importPath}}", should be "{{proposedPath}}"',
},
},
defaultOptions: [],
create(context) {
const currentDir = path.dirname(context.physicalFilename);
const options = context.options[0] || {};
return moduleVisitor(source => {
const { value: importPath } = source;
function reportWithProposedPath(proposedPath) {
context.report({
node: source,
messageId: 'useless',
data: {
importPath,
proposedPath,
},
fix: fixer => proposedPath
? fixer.replaceText(source, JSON.stringify(proposedPath))
: null,
});
}
if (!importPath.startsWith('.')) {
return;
}
const resolvedPath = resolve(importPath, context);
const normedPath = normalize(importPath);
const resolvedNormedPath = resolve(normedPath, context);
if (normedPath !== importPath && resolvedPath === resolvedNormedPath) {
return reportWithProposedPath(normedPath);
}
const fileExtensions = getFileExtensions(context.settings);
const regexUnnecessaryIndex = new RegExp(`.*\\/index(\\${[...fileExtensions].join('|\\')})?$`);
if (options.noUselessIndex && regexUnnecessaryIndex.test(importPath)) {
const parentDirectory = path.dirname(importPath);
if (parentDirectory !== '.' && parentDirectory !== '..') {
for (const fileExtension of fileExtensions) {
if (resolve(`${parentDirectory}${fileExtension}`, context)) {
return reportWithProposedPath(`${parentDirectory}/`);
}
}
}
return reportWithProposedPath(parentDirectory);
}
if (importPath.startsWith('./')) {
return;
}
if (resolvedPath === undefined) {
return;
}
const expected = path.relative(currentDir, resolvedPath);
const expectedSplit = expected.split(path.sep);
const importPathSplit = importPath.replace(/^\.\//, '').split('/');
const countImportPathRelativeParents = countRelativeParents(importPathSplit);
const countExpectedRelativeParents = countRelativeParents(expectedSplit);
const diff = countImportPathRelativeParents - countExpectedRelativeParents;
if (diff <= 0) {
return;
}
return reportWithProposedPath(toRelativePath([
...importPathSplit.slice(0, countExpectedRelativeParents),
...importPathSplit.slice(countImportPathRelativeParents + diff),
].join('/')));
}, options);
},
});
//# sourceMappingURL=no-useless-path-segments.js.map
@@ -0,0 +1 @@
{"mappings":";;;;;;;;;AAAA;;;;;;;;;;CAUC;AAeM,SAAS,0CAAe,KAAgC;IAC7D,0BAA0B;IAC1B,IAAI,AAAC,MAAc,cAAc,KAAK,KAAK,MAAM,SAAS,EACxD,OAAO;IAGT,oIAAoI;IACpI,oIAAoI;IACpI,qCAAqC;IACrC,IAAI,CAAA,GAAA,mCAAQ,OAAO,AAAC,MAAuB,WAAW,EACpD,OAAO,MAAM,IAAI,KAAK,WAAW,MAAM,OAAO,KAAK;IAGrD,OAAO,MAAM,MAAM,KAAK,KAAK,CAAC,AAAC,MAAuB,WAAW;AACnE;AAEO,SAAS,0CAAsB,KAAmB;IACvD,yEAAyE;IACzE,uFAAuF;IACvF,kGAAkG;IAClG,mHAAmH;IACnH,oHAAoH;IACpH,8DAA8D;IAC9D,OACE,AAAC,CAAC,CAAA,GAAA,mCAAQ,OAAO,MAAM,KAAK,KAAK,KAAK,MAAM,MAAM,KAAK,KACtD,MAAM,KAAK,KAAK,KACf,MAAM,MAAM,KAAK,KACjB,MAAM,QAAQ,KAAK,KACnB,MAAM,MAAM,KAAK,KACjB,MAAM,WAAW,KAAK;AAG5B","sources":["packages/@react-aria/utils/src/isVirtualEvent.ts"],"sourcesContent":["/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {isAndroid} from './platform';\n\n// Original licensing for the following method can be found in the\n// NOTICE file in the root directory of this source tree.\n// See https://github.com/facebook/react/blob/3c713d513195a53788b3f8bb4b70279d68b15bcc/packages/react-interactions/events/src/dom/shared/index.js#L74-L87\n\n// Keyboards, Assistive Technologies, and element.click() all produce a \"virtual\"\n// click event. This is a method of inferring such clicks. Every browser except\n// IE 11 only sets a zero value of \"detail\" for click events that are \"virtual\".\n// However, IE 11 uses a zero value for all click events. For IE 11 we rely on\n// the quirk that it produces click events that are of type PointerEvent, and\n// where only the \"virtual\" click lacks a pointerType field.\n\nexport function isVirtualClick(event: MouseEvent | PointerEvent): boolean {\n // JAWS/NVDA with Firefox.\n if ((event as any).mozInputSource === 0 && event.isTrusted) {\n return true;\n }\n\n // Android TalkBack's detail value varies depending on the event listener providing the event so we have specific logic here instead\n // If pointerType is defined, event is from a click listener. For events from mousedown listener, detail === 0 is a sufficient check\n // to detect TalkBack virtual clicks.\n if (isAndroid() && (event as PointerEvent).pointerType) {\n return event.type === 'click' && event.buttons === 1;\n }\n\n return event.detail === 0 && !(event as PointerEvent).pointerType;\n}\n\nexport function isVirtualPointerEvent(event: PointerEvent) {\n // If the pointer size is zero, then we assume it's from a screen reader.\n // Android TalkBack double tap will sometimes return a event with width and height of 1\n // and pointerType === 'mouse' so we need to check for a specific combination of event attributes.\n // Cannot use \"event.pressure === 0\" as the sole check due to Safari pointer events always returning pressure === 0\n // instead of .5, see https://bugs.webkit.org/show_bug.cgi?id=206216. event.pointerType === 'mouse' is to distingush\n // Talkback double tap from Windows Firefox touch screen press\n return (\n (!isAndroid() && event.width === 0 && event.height === 0) ||\n (event.width === 1 &&\n event.height === 1 &&\n event.pressure === 0 &&\n event.detail === 0 &&\n event.pointerType === 'mouse'\n )\n );\n}\n"],"names":[],"version":3,"file":"isVirtualEvent.main.js.map"}
@@ -0,0 +1 @@
{"name":"cssesc","version":"3.0.0","requiresBuild":false,"files":{"package.json":{"checkedAt":1794532105871,"integrity":"sha512-jr5IgcyztjFCoheyM4rRc0fiZfpU7/pLa/tIRRSM0mNIvjIyaTIlthzdOa9CNcXAFuoX1i1zHMztO7r9lUg1Tw==","mode":420,"size":1252},"cssesc.js":{"checkedAt":1794532105871,"integrity":"sha512-eZt7x7YSl+s/w/3XteCAOBzhyv+HMITPSvluZ2eJJuUS5BGPPy737GDyKCjf+28m6+II6z+wvZ1RIJIvhqVcew==","mode":420,"size":3514},"LICENSE-MIT.txt":{"checkedAt":1794532105871,"integrity":"sha512-fWtEu2WGJSgbSBlOWj06B0Ur6h8lZQbdFveiGUHvPw0lnhvNDMYgJkK/H9EpvBh+ajkh04LVaNMSvYPzAjl5oA==","mode":420,"size":1077},"README.md":{"checkedAt":1794532105871,"integrity":"sha512-cWna2e+BRKXlMQrSdwIXCFi0id9RN9cP3X45b4XAN8cMdaJNuWhMDvQev1nWhyz9kcx8/B+Hzx3m/lu9yw+C3w==","mode":420,"size":6585},"bin/cssesc":{"checkedAt":1794532105872,"integrity":"sha512-jnfXCZOY5Jfrqu9tcnwk3sVvuH9mjljytcA4ATbqkvSMZCPHKm3avoCBiMFb24FrAp3wvl0KjDs7fRA5jIm+SA==","mode":493,"size":3103},"man/cssesc.1":{"checkedAt":1794532105872,"integrity":"sha512-1T5G6rN6eAqtQmtZjoMzC0f+62UPRTvE8SvED9PnqdzctbcogQLd0V/YIjEepGCXELVuN5fYBFvCQYloQ3WC5A==","mode":420,"size":1957}}}
@@ -0,0 +1,39 @@
let Declaration = require('../declaration')
let flexSpec = require('./flex-spec')
class FlexShrink extends Declaration {
/**
* Return property name by final spec
*/
normalize() {
return 'flex-shrink'
}
/**
* Return flex property for 2012 spec
*/
prefixed(prop, prefix) {
let spec
;[spec, prefix] = flexSpec(prefix)
if (spec === 2012) {
return prefix + 'flex-negative'
}
return super.prefixed(prop, prefix)
}
/**
* Ignore 2009 spec and use flex property for 2012
*/
set(decl, prefix) {
let spec
;[spec, prefix] = flexSpec(prefix)
if (spec === 2012 || spec === 'final') {
return super.set(decl, prefix)
}
return undefined
}
}
FlexShrink.names = ['flex-shrink', 'flex-negative']
module.exports = FlexShrink
@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) James Talmage <james@talmage.io> (github.com/jamestalmage)
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,28 @@
"use strict"
const { getPackageJson } = require("../util/get-package-json")
const moduleConfig = require("./recommended-module")
const scriptConfig = require("./recommended-script")
const packageJson = getPackageJson()
const isModule =
packageJson != null &&
typeof packageJson === "object" &&
"type" in packageJson &&
packageJson.type === "module"
const recommendedConfig = isModule ? moduleConfig : scriptConfig
/**
* https://eslint.org/docs/latest/use/configure/configuration-files
* @type {import('eslint').ESLint.ConfigData}
*/
module.exports.eslintrc = {
...recommendedConfig.eslintrc,
overrides: [
{ files: ["*.cjs", ".*.cjs"], ...scriptConfig.eslintrc },
{ files: ["*.mjs", ".*.mjs"], ...moduleConfig.eslintrc },
],
}
module.exports.flat = recommendedConfig.flat
@@ -0,0 +1,206 @@
"use client";
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/card.tsx
var card_exports = {};
__export(card_exports, {
default: () => card_default
});
module.exports = __toCommonJS(card_exports);
var import_system2 = require("@heroui/system");
var import_ripple2 = require("@heroui/ripple");
// src/card-context.ts
var import_react_utils = require("@heroui/react-utils");
var [CardProvider, useCardContext] = (0, import_react_utils.createContext)({
name: "CardContext",
strict: true,
errorMessage: "useCardContext: `context` is undefined. Seems you forgot to wrap component within <Card />"
});
// src/use-card.ts
var import_theme = require("@heroui/theme");
var import_react = require("react");
var import_utils = require("@react-aria/utils");
var import_focus = require("@react-aria/focus");
var import_interactions = require("@react-aria/interactions");
var import_use_aria_button = require("@heroui/use-aria-button");
var import_system = require("@heroui/system");
var import_shared_utils = require("@heroui/shared-utils");
var import_react_utils2 = require("@heroui/react-utils");
var import_react_utils3 = require("@heroui/react-utils");
var import_ripple = require("@heroui/ripple");
function useCard(originalProps) {
var _a, _b, _c, _d;
const globalContext = (0, import_system.useProviderContext)();
const [props, variantProps] = (0, import_system.mapPropsVariants)(originalProps, import_theme.card.variantKeys);
const {
ref,
as,
children,
onClick,
onPress,
autoFocus,
className,
classNames,
allowTextSelectionOnPress = true,
...otherProps
} = props;
const domRef = (0, import_react_utils3.useDOMRef)(ref);
const Component = as || (originalProps.isPressable ? "button" : "div");
const shouldFilterDOMProps = typeof Component === "string";
const disableAnimation = (_b = (_a = originalProps.disableAnimation) != null ? _a : globalContext == null ? void 0 : globalContext.disableAnimation) != null ? _b : false;
const disableRipple = (_d = (_c = originalProps.disableRipple) != null ? _c : globalContext == null ? void 0 : globalContext.disableRipple) != null ? _d : false;
const baseStyles = (0, import_shared_utils.clsx)(classNames == null ? void 0 : classNames.base, className);
const { onClear: onClearRipple, onPress: onRipplePressHandler, ripples } = (0, import_ripple.useRipple)();
const handlePress = (0, import_react.useCallback)(
(e) => {
if (disableRipple || disableAnimation)
return;
domRef.current && onRipplePressHandler(e);
},
[disableRipple, disableAnimation, domRef, onRipplePressHandler]
);
const { buttonProps, isPressed } = (0, import_use_aria_button.useAriaButton)(
{
onPress: (0, import_utils.chain)(onPress, handlePress),
elementType: as,
isDisabled: !originalProps.isPressable,
onClick,
allowTextSelectionOnPress,
...otherProps
},
domRef
);
const { hoverProps, isHovered } = (0, import_interactions.useHover)({
isDisabled: !originalProps.isHoverable,
...otherProps
});
const { isFocusVisible, isFocused, focusProps } = (0, import_focus.useFocusRing)({
autoFocus
});
const slots = (0, import_react.useMemo)(
() => (0, import_theme.card)({
...variantProps,
disableAnimation
}),
[(0, import_shared_utils.objectToDeps)(variantProps), disableAnimation]
);
const context = (0, import_react.useMemo)(
() => ({
slots,
classNames,
disableAnimation,
isDisabled: originalProps.isDisabled,
isFooterBlurred: originalProps.isFooterBlurred,
fullWidth: originalProps.fullWidth
}),
[
slots,
classNames,
originalProps.isDisabled,
originalProps.isFooterBlurred,
disableAnimation,
originalProps.fullWidth
]
);
const getCardProps = (0, import_react.useCallback)(
(props2 = {}) => {
return {
ref: domRef,
className: slots.base({ class: baseStyles }),
tabIndex: originalProps.isPressable ? 0 : -1,
"data-hover": (0, import_shared_utils.dataAttr)(isHovered),
"data-pressed": (0, import_shared_utils.dataAttr)(isPressed),
"data-focus": (0, import_shared_utils.dataAttr)(isFocused),
"data-focus-visible": (0, import_shared_utils.dataAttr)(isFocusVisible),
"data-disabled": (0, import_shared_utils.dataAttr)(originalProps.isDisabled),
...(0, import_utils.mergeProps)(
originalProps.isPressable ? { ...buttonProps, ...focusProps, role: "button" } : {},
originalProps.isHoverable ? hoverProps : {},
(0, import_react_utils2.filterDOMProps)(otherProps, {
enabled: shouldFilterDOMProps
}),
(0, import_react_utils2.filterDOMProps)(props2)
)
};
},
[
domRef,
slots,
baseStyles,
shouldFilterDOMProps,
originalProps.isPressable,
originalProps.isHoverable,
originalProps.isDisabled,
isHovered,
isPressed,
isFocusVisible,
buttonProps,
focusProps,
hoverProps,
otherProps
]
);
const getRippleProps = (0, import_react.useCallback)(
() => ({ ripples, onClear: onClearRipple }),
[ripples, onClearRipple]
);
return {
context,
domRef,
Component,
classNames,
children,
isHovered,
isPressed,
disableAnimation,
isPressable: originalProps.isPressable,
isHoverable: originalProps.isHoverable,
disableRipple,
handlePress,
isFocusVisible,
getCardProps,
getRippleProps
};
}
// src/card.tsx
var import_jsx_runtime = require("react/jsx-runtime");
var Card = (0, import_system2.forwardRef)((props, ref) => {
const {
children,
context,
Component,
isPressable,
disableAnimation,
disableRipple,
getCardProps,
getRippleProps
} = useCard({ ...props, ref });
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Component, { ...getCardProps(), children: [
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(CardProvider, { value: context, children }),
isPressable && !disableAnimation && !disableRipple && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ripple2.Ripple, { ...getRippleProps() })
] });
});
Card.displayName = "HeroUI.Card";
var card_default = Card;
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {});
@@ -0,0 +1,21 @@
{
"name": "lodash-es",
"version": "4.17.21",
"description": "Lodash exported as ES modules.",
"keywords": "es6, modules, stdlib, util",
"homepage": "https://lodash.com/custom-builds",
"bugs": "https://github.com/lodash/lodash-cli/issues",
"repository": "lodash/lodash",
"license": "MIT",
"type": "module",
"jsnext:main": "lodash.js",
"main": "lodash.js",
"module": "lodash.js",
"sideEffects": false,
"author": "John-David Dalton <john.david.dalton@gmail.com>",
"contributors": [
"John-David Dalton <john.david.dalton@gmail.com>",
"Mathias Bynens <mathias@qiwi.be>"
],
"scripts": { "test": "echo \"See https://travis-ci.org/lodash-archive/lodash-cli for testing details.\"" }
}
@@ -0,0 +1,15 @@
export function lazyPostcss() {
return require('postcss')
}
export function lazyPostcssImport() {
return require('postcss-import')
}
export function lazyAutoprefixer() {
return require('autoprefixer')
}
export function lazyCssnano() {
return require('cssnano')
}
@@ -0,0 +1,21 @@
var duplexify = require('duplexify')
var http = require('http')
var request = function(opts) {
var req = http.request(opts)
var dup = duplexify()
dup.setWritable(req)
req.on('response', function(res) {
dup.setReadable(res)
})
return dup
}
var req = request({
method: 'GET',
host: 'www.google.com',
port: 80
})
req.end()
req.pipe(process.stdout)
@@ -0,0 +1,21 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Intersect = Intersect;
const type_1 = require("../create/type");
const index_1 = require("../never/index");
const intersect_create_1 = require("./intersect-create");
// ------------------------------------------------------------------
// TypeGuard
// ------------------------------------------------------------------
const kind_1 = require("../guard/kind");
/** `[Json]` Creates an evaluated Intersect type */
function Intersect(types, options) {
if (types.length === 1)
return (0, type_1.CreateType)(types[0], options);
if (types.length === 0)
return (0, index_1.Never)(options);
if (types.some((schema) => (0, kind_1.IsTransform)(schema)))
throw new Error('Cannot intersect transform types');
return (0, intersect_create_1.IntersectCreate)(types, options);
}
@@ -0,0 +1,127 @@
/*
@license
Rollup.js v4.53.2
Mon, 10 Nov 2025 08:56:08 GMT - commit d8b0150971681d9efa4f173de5edd2c79a6e03d9
https://github.com/rollup/rollup
Released under the MIT License.
*/
'use strict';
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const rollup = require('./shared/rollup.js');
const parseAst_js = require('./shared/parseAst.js');
const fseventsImporter = require('./shared/fsevents-importer.js');
require('node:process');
require('node:path');
require('path');
require('./native.js');
require('node:perf_hooks');
require('node:fs/promises');
class WatchEmitter {
constructor() {
this.currentHandlers = Object.create(null);
this.persistentHandlers = Object.create(null);
}
// Will be overwritten by Rollup
async close() { }
emit(event, ...parameters) {
return Promise.all([...this.getCurrentHandlers(event), ...this.getPersistentHandlers(event)].map(handler => handler(...parameters)));
}
off(event, listener) {
const listeners = this.persistentHandlers[event];
if (listeners) {
// A hack stolen from "mitt": ">>> 0" does not change numbers >= 0, but -1
// (which would remove the last array element if used unchanged) is turned
// into max_int, which is outside the array and does not change anything.
listeners.splice(listeners.indexOf(listener) >>> 0, 1);
}
return this;
}
on(event, listener) {
this.getPersistentHandlers(event).push(listener);
return this;
}
onCurrentRun(event, listener) {
this.getCurrentHandlers(event).push(listener);
return this;
}
once(event, listener) {
const selfRemovingListener = (...parameters) => {
this.off(event, selfRemovingListener);
return listener(...parameters);
};
this.on(event, selfRemovingListener);
return this;
}
removeAllListeners() {
this.removeListenersForCurrentRun();
this.persistentHandlers = Object.create(null);
return this;
}
removeListenersForCurrentRun() {
this.currentHandlers = Object.create(null);
return this;
}
getCurrentHandlers(event) {
return this.currentHandlers[event] || (this.currentHandlers[event] = []);
}
getPersistentHandlers(event) {
return this.persistentHandlers[event] || (this.persistentHandlers[event] = []);
}
}
function watch(configs) {
const emitter = new WatchEmitter();
watchInternal(configs, emitter).catch(error => {
rollup.handleError(error);
});
return emitter;
}
function ensureTrailingSlash(path) {
if (path[path.length - 1] !== '/') {
return `${path}/`;
}
return path;
}
function checkWatchConfig(config) {
for (const item of config) {
if (typeof item.watch !== 'boolean' && item.watch?.allowInputInsideOutputPath) {
break;
}
if (item.input && item.output) {
const input = typeof item.input === 'string' ? rollup.ensureArray(item.input) : item.input;
const outputs = rollup.ensureArray(item.output);
for (const index in input) {
const inputPath = input[index];
if (typeof inputPath !== 'string') {
continue;
}
const outputWithInputAsSubPath = outputs.find(({ dir }) => dir && ensureTrailingSlash(inputPath).startsWith(ensureTrailingSlash(dir)));
if (outputWithInputAsSubPath) {
parseAst_js.error(parseAst_js.logInvalidOption('watch', parseAst_js.URL_WATCH, `the input "${inputPath}" is a subpath of the output "${outputWithInputAsSubPath.dir}"`));
}
}
}
}
}
async function watchInternal(configs, emitter) {
const optionsList = await Promise.all(rollup.ensureArray(configs).map(config => rollup.mergeOptions(config, true)));
const watchOptionsList = optionsList.filter(config => config.watch !== false);
if (watchOptionsList.length === 0) {
return parseAst_js.error(parseAst_js.logInvalidOption('watch', parseAst_js.URL_WATCH, 'there must be at least one config where "watch" is not set to "false"'));
}
checkWatchConfig(watchOptionsList);
await fseventsImporter.loadFsEvents();
const { Watcher } = await Promise.resolve().then(() => require('./shared/watch.js'));
new Watcher(watchOptionsList, emitter);
}
exports.VERSION = rollup.version;
exports.defineConfig = rollup.defineConfig;
exports.rollup = rollup.rollup;
exports.watch = watch;
//# sourceMappingURL=rollup.js.map
@@ -0,0 +1 @@
{"version":3,"file":"Container.js","sourceRoot":"","sources":["../../../../src/container/services/Container.ts"],"names":[],"mappings":";;;AACA,4CAa2B;AAO3B,qDAAkD;AAClD,qEAAkE;AAClE,2EAAwE;AACxE,+EAA4E;AAC5E,qEAAkE;AAClE,mDAAgD;AAChD,uEAAoE;AACpE,yEAAsE;AACtE,uDAAoD;AAEpD,MAAM,qBAAqB,GAAiB,yBAAkB,CAAC,SAAS,CAAC;AAEzE,MAAa,SAAS;IACX,eAAe,CAAiB;IAChC,uBAAuB,CAAyB;IAChD,cAAc,CAAgB;IAC9B,wBAAwB,CAA0B;IAClD,yBAAyB,CAA2B;IACpD,gBAAgB,CAAkB;IAE3C,YAAY,OAA0B;QACpC,MAAM,QAAQ,GAAY,OAAO,EAAE,QAAQ,IAAI,KAAK,CAAC;QACrD,MAAM,YAAY,GAChB,OAAO,EAAE,YAAY,IAAI,qBAAqB,CAAC;QAEjD,IAAI,CAAC,wBAAwB,GAAG,IAAI,CAAC,6BAA6B,CAChE,OAAO,EACP,QAAQ,EACR,YAAY,CACb,CAAC;QAEF,MAAM,2BAA2B,GAC/B,IAAI,yDAA2B,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC;QAEjE,MAAM,sBAAsB,GAC1B,IAAI,+CAAsB,CACxB,2BAA2B,EAC3B,IAAI,CAAC,wBAAwB,CAC9B,CAAC;QAEJ,MAAM,yBAAyB,GAC7B,IAAI,qDAAyB,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC;QAE/D,IAAI,CAAC,eAAe,GAAG,IAAI,+BAAc,CACvC,yBAAyB,CAAC,kBAAkB,EAC5C,YAAY,EACZ,sBAAsB,EACtB,IAAI,CAAC,wBAAwB,CAC9B,CAAC;QACF,IAAI,CAAC,uBAAuB,GAAG,IAAI,+CAAsB,CACvD,IAAI,CAAC,eAAe,EACpB,yBAAyB,CAAC,kBAAkB,EAC5C,YAAY,EACZ,sBAAsB,EACtB,IAAI,CAAC,wBAAwB,CAC9B,CAAC;QACF,IAAI,CAAC,yBAAyB,GAAG,IAAI,mDAAwB,CAC3D,2BAA2B,EAC3B,IAAI,CAAC,wBAAwB,EAC7B,QAAQ,EACR,YAAY,CACb,CAAC;QACF,IAAI,CAAC,cAAc,GAAG,IAAI,6BAAa,CACrC,IAAI,EACJ,IAAI,CAAC,wBAAwB,EAC7B,IAAI,CAAC,yBAAyB,CAC/B,CAAC;QAEF,IAAI,CAAC,gBAAgB,GAAG,IAAI,iCAAe,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC;IAC7E,CAAC;IAEM,IAAI,CACT,iBAAuC;QAEvC,OAAO,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;IACtD,CAAC;IAUM,GAAG,CACR,iBAAuC,EACvC,OAAoB;QAEpB,OAAO,IAAI,CAAC,yBAAyB,CAAC,GAAG,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAC;IACxE,CAAC;IAEM,MAAM,CACX,iBAAuC,EACvC,OAAuB;QAEvB,OAAO,IAAI,CAAC,yBAAyB,CAAC,MAAM,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAC;IAC3E,CAAC;IAEM,KAAK,CAAC,WAAW,CACtB,iBAAuC,EACvC,OAAuB;QAEvB,OAAO,IAAI,CAAC,yBAAyB,CAAC,WAAW,CAC/C,iBAAiB,EACjB,OAAO,CACR,CAAC;IACJ,CAAC;IAUM,KAAK,CAAC,QAAQ,CACnB,iBAAuC,EACvC,OAAoB;QAEpB,OAAO,IAAI,CAAC,yBAAyB,CAAC,QAAQ,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAC;IAC7E,CAAC;IAEM,OAAO,CACZ,iBAAoC,EACpC,OAAwB;QAExB,OAAO,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAC;IAClE,CAAC;IAEM,cAAc,CACnB,iBAAoC,EACpC,OAAwB;QAExB,OAAO,IAAI,CAAC,eAAe,CAAC,cAAc,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAC;IACzE,CAAC;IAEM,KAAK,CAAC,IAAI,CAAC,GAAG,OAA0B;QAC7C,OAAO,IAAI,CAAC,uBAAuB,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,CAAC;IACvD,CAAC;IAEM,QAAQ,CAAC,GAAG,OAA0B;QAC3C,IAAI,CAAC,uBAAuB,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,CAAC;IACpD,CAAC;IAEM,YAAY,CACjB,iBAAuC,EACvC,UAAgC;QAEhC,IAAI,CAAC,wBAAwB,CAAC,iBAAiB,CAAC,GAAG,CACjD,UAA+B,EAC/B;YACE,SAAS,EAAE,iBAAiB;SAC7B,CACF,CAAC;IACJ,CAAC;IAEM,cAAc,CACnB,iBAAuC,EACvC,YAAoC;QAEpC,IAAI,CAAC,wBAAwB,CAAC,mBAAmB,CAAC,GAAG,CACnD,YAAmC,EACnC;YACE,SAAS,EAAE,iBAAiB;SAC7B,CACF,CAAC;IACJ,CAAC;IAEM,QAAQ,CAAC,iBAA0B;QACxC,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,IAAI,EAAE,iBAAiB,CAAC,CAAC;IACxD,CAAC;IAEM,OAAO;QACZ,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,CAAC;IAClC,CAAC;IAEM,KAAK,CAAC,MAAM,CACjB,iBAAuC;QAEvC,OAAO,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC;IACxD,CAAC;IAEM,UAAU,CACf,iBAAuC;QAEvC,OAAO,IAAI,CAAC,eAAe,CAAC,UAAU,CAAC,iBAAiB,CAAC,CAAC;IAC5D,CAAC;IAEM,QAAQ;QACb,IAAI,CAAC,gBAAgB,CAAC,QAAQ,EAAE,CAAC;IACnC,CAAC;IAEM,KAAK,CAAC,MAAM,CACjB,UAAiD;QAEjD,MAAM,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;IAChD,CAAC;IAEM,KAAK,CAAC,SAAS;QACpB,OAAO,IAAI,CAAC,eAAe,CAAC,SAAS,EAAE,CAAC;IAC1C,CAAC;IAEM,UAAU,CAAC,UAAiD;QACjE,IAAI,CAAC,eAAe,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;IAC9C,CAAC;IAEM,KAAK,CAAC,MAAM,CAAC,GAAG,OAA0B;QAC/C,OAAO,IAAI,CAAC,uBAAuB,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC,CAAC;IACzD,CAAC;IAEM,UAAU,CAAC,GAAG,OAA0B;QAC7C,IAAI,CAAC,uBAAuB,CAAC,UAAU,CAAC,GAAG,OAAO,CAAC,CAAC;IACtD,CAAC;IAED,qBAAqB,CACnB,QAAiB,EACjB,YAA0B;QAE1B,IAAI,QAAQ,EAAE,CAAC;YACb,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,CAAC;QACjC,CAAC;QAED,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,6BAA6B,CAC3B,OAAqC,EACrC,QAAiB,EACjB,YAA0B;QAE1B,MAAM,eAAe,GACnB,IAAI,CAAC,qBAAqB,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;QAErD,IAAI,OAAO,EAAE,MAAM,KAAK,SAAS,EAAE,CAAC;YAClC,OAAO,IAAI,iDAAuB,CAChC,yBAAkB,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,EACzC,qBAAc,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,SAAS,EAAE,eAAe,CAAC,EACtD,2BAAoB,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,EAC3C,IAAI,6BAAsB,EAAE,CAC7B,CAAC;QACJ,CAAC;QAED,MAAM,sBAAsB,GAC1B,IAAI,6BAAsB,EAAE,CAAC;QAE/B,MAAM,MAAM,GAAc,OAAO,CAAC,MAAM,CAAC;QAEzC,MAAM,CAAC,wBAAwB,CAAC,sBAAsB,CAAC,SAAS,CAC9D,sBAAsB,CACvB,CAAC;QAEF,OAAO,IAAI,iDAAuB,CAChC,yBAAkB,CAAC,KAAK,CACtB,GAAG,EAAE,CAAC,MAAM,CAAC,wBAAwB,CAAC,iBAAiB,CACxD,EACD,qBAAc,CAAC,KAAK,CAClB,GAAG,EAAE,CAAC,MAAM,CAAC,wBAAwB,CAAC,cAAc,EACpD,eAAe,CAChB,EACD,2BAAoB,CAAC,KAAK,CACxB,GAAG,EAAE,CAAC,MAAM,CAAC,wBAAwB,CAAC,mBAAmB,CAC1D,EACD,sBAAsB,CACvB,CAAC;IACJ,CAAC;CACF;AA/PD,8BA+PC"}
@@ -0,0 +1,17 @@
/**
* Implement a practical max duration for keyframe generation
* to prevent infinite loops
*/
const maxGeneratorDuration = 20000;
function calcGeneratorDuration(generator) {
let duration = 0;
const timeStep = 50;
let state = generator.next(duration);
while (!state.done && duration < maxGeneratorDuration) {
duration += timeStep;
state = generator.next(duration);
}
return duration >= maxGeneratorDuration ? Infinity : duration;
}
export { calcGeneratorDuration, maxGeneratorDuration };
@@ -0,0 +1,45 @@
var baseIteratee = require('./_baseIteratee'),
baseWhile = require('./_baseWhile');
/**
* Creates a slice of `array` with elements taken from the end. Elements are
* taken until `predicate` returns falsey. The predicate is invoked with
* three arguments: (value, index, array).
*
* @static
* @memberOf _
* @since 3.0.0
* @category Array
* @param {Array} array The array to query.
* @param {Function} [predicate=_.identity] The function invoked per iteration.
* @returns {Array} Returns the slice of `array`.
* @example
*
* var users = [
* { 'user': 'barney', 'active': true },
* { 'user': 'fred', 'active': false },
* { 'user': 'pebbles', 'active': false }
* ];
*
* _.takeRightWhile(users, function(o) { return !o.active; });
* // => objects for ['fred', 'pebbles']
*
* // The `_.matches` iteratee shorthand.
* _.takeRightWhile(users, { 'user': 'pebbles', 'active': false });
* // => objects for ['pebbles']
*
* // The `_.matchesProperty` iteratee shorthand.
* _.takeRightWhile(users, ['active', false]);
* // => objects for ['fred', 'pebbles']
*
* // The `_.property` iteratee shorthand.
* _.takeRightWhile(users, 'active');
* // => []
*/
function takeRightWhile(array, predicate) {
return (array && array.length)
? baseWhile(array, baseIteratee(predicate, 3), false, true)
: [];
}
module.exports = takeRightWhile;
@@ -0,0 +1 @@
{"name":"@reduxjs/toolkit","version":"2.10.1","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532110936,"integrity":"sha512-heV2hl4ldWgKcKm+YEFFiJ1DO46IXmT9frkYLz41+DmR5QcYke2YCW4eCR/L954KY73XET0QohBVEU4osDd5ZA==","mode":420,"size":1090},"dist/react/cjs/redux-toolkit-react.development.cjs":{"checkedAt":1794532110936,"integrity":"sha512-+MJC4aULNnDzgZISOngGpWXIHjIDyNp8O0Whrc5ldAYtLHbZb1VRmk3ZeUgmzK1C7MJF0OPc0WXtTUcQfg/A9Q==","mode":420,"size":2406},"dist/react/cjs/redux-toolkit-react.production.min.cjs":{"checkedAt":1794532110936,"integrity":"sha512-Ww3gVO1zjJM7C31Ez18p52ghDKrP88ENGuf2u3qtcr6wOL35vw47b/BTuJC0qGTYN989wev9y8HT3Ny0J9P8pA==","mode":420,"size":1107},"dist/cjs/redux-toolkit.development.cjs":{"checkedAt":1794532110937,"integrity":"sha512-IGTTqF+ta1VJLXOJLu+cs9hOQuyvHDoBGJRVnrPBLpYG7c0jNHwenBowPeevQdE+0CacjNfyXUovUx6lz+UvQg==","mode":420,"size":81991},"dist/cjs/redux-toolkit.production.min.cjs":{"checkedAt":1794532110937,"integrity":"sha512-iLakKxT8XD+VBgf8o7la5b+uhPBX1Pk+D0cHEjWtiP6g2XTyt3LeJCZZaOrWI74yjRJJb9OX6dy+WLAIwKi0Hw==","mode":420,"size":24908},"dist/query/react/cjs/rtk-query-react.development.cjs":{"checkedAt":1794532110937,"integrity":"sha512-DDJAxzZrRWXESkJUGWiNR/cJS1AYqZ3bSLsdh3tSgviJB4s6Qiby7SBIvWnj52+4BRIk5VOS0pi3sQIMvZ7n4w==","mode":420,"size":27860},"dist/query/react/cjs/rtk-query-react.production.min.cjs":{"checkedAt":1794532110937,"integrity":"sha512-JwtQHBKNvsa0LjwDLLA8mfhTf6yRGcC50jua36RytgBIGcjAt84eB7Pd2BF0TbF0jXHzoirNx87aZ263mRaueg==","mode":420,"size":9968},"dist/query/cjs/rtk-query.development.cjs":{"checkedAt":1794532110938,"integrity":"sha512-U78KbLAAcc45/GBxjgWjVpblkupZq4iNLs0+gQq/S62u6/DvI+MVm5ZwJtCu99Lkc0IaYpIqSLmsFnOR0drb4w==","mode":420,"size":103103},"dist/query/cjs/rtk-query.production.min.cjs":{"checkedAt":1794532110938,"integrity":"sha512-h0vIIe4fMyHXq5TntdGCUY3+qld3v2E8whgfOwCOaLb+MzMZOweoEfGHQaIJ0mUhu16Xzjxy4SuWIfCh8now8g==","mode":420,"size":37908},"dist/cjs/index.js":{"checkedAt":1794532110938,"integrity":"sha512-lN+VOO/wBnL1gW/3vYxJBXdvII30a1dhbL1rK4Jkp36LjCuknnDwxtWXgDN8O7gKcFhH/1kVuGI0spNdGf16AQ==","mode":420,"size":195},"dist/query/cjs/index.js":{"checkedAt":1794532110938,"integrity":"sha512-bJMK4Cn1gSkDiMWqOLPOzQMbJwCLu8DwjwwGY0dvWkCITrQI/B1luvCR6Kcjt+nZMwJn+owcbSeeDdrYDL6nJQ==","mode":420,"size":187},"dist/query/react/cjs/index.js":{"checkedAt":1794532110938,"integrity":"sha512-AQ8XFV0rBaGtBXZBdZQHtcHkPFUUz1/IIahQxtpiKWjUWdkqV567BzSkJcF/xugs8y1M+/KVBuK8KkPR+Vyu2w==","mode":420,"size":199},"dist/react/cjs/index.js":{"checkedAt":1794532110938,"integrity":"sha512-OhePcdlKOuFyIO9Fj1LprdNWUXjsVs/0rKdRPlootJv98L4jZ5u3CGg7aXIo4Rjfjw39SiuyvmJnHNY5CmPCLw==","mode":420,"size":207},"dist/react/redux-toolkit-react.legacy-esm.js":{"checkedAt":1794532110939,"integrity":"sha512-V+vIhE0W6pYnddm5WxuLgGjKrpER+K6fVYKr9CTX25cO+v49M4YsUC4rDiRItuxzqI5JqjBduNsQoz9HDs4oNg==","mode":420,"size":1990},"dist/redux-toolkit.legacy-esm.js":{"checkedAt":1794532110939,"integrity":"sha512-SiHg5SFE3QXqClcczWwGN1QVl6/muGfR3puaIHYfp77E+BGGNXOw5rYx8oRTnaL2z/EoiIrHFz6eGjmardKxsA==","mode":420,"size":82628},"dist/query/react/rtk-query-react.legacy-esm.js":{"checkedAt":1794532110939,"integrity":"sha512-ykXI6wx2vd0lKPf4GGD5B+LXmugP0XQgMsPXce42nGUKbttEzrbhQxlr2nP1fZ48zZlv3n03ZwLmsEsgL+1Deg==","mode":420,"size":27790},"dist/query/rtk-query.legacy-esm.js":{"checkedAt":1794532110939,"integrity":"sha512-cXAk/CutVdohEvzTpAi/8Ksgyjeboiorv7GO1feSzBkZu9Fb7QviA7RJgSHuEg8QxqZkJFbjFzAbo1oW0JTbtQ==","mode":420,"size":107213},"package.json":{"checkedAt":1794532110940,"integrity":"sha512-jhwuVQkiEzzKmZGxQpwBA015LtFfyOUnpwxYG9IwugUkQXI1J6ivNt75nuLKttt0B0+huHWy/xkUNe2Gcgha2w==","mode":420,"size":8537},"query/package.json":{"checkedAt":1794532110940,"integrity":"sha512-GFU5qlkp6CCEyL6zT1t5NFb8LhkuhjfiF+93ZOgKXIdan2v4ynghpmA+GVjMQHKB639M74e+Jt56/i99SN1u9g==","mode":420,"size":397},"query/react/package.json":{"checkedAt":1794532110940,"integrity":"sha512-zev8WZZh0GmFGOBoMsZuYDkIzdeC0eTUAnZn/cHsbp9hGx/LzcvHWgzmEJVC49ZE7EEZcv7PHQfKVRfaKUzgkQ==","mode":420,"size":451},"react/package.json":{"checkedAt":1794532110940,"integrity":"sha512-yzMfpzcjfzQNks+unZmmshH4DipHRpC32tE54p1LI7vCS12Ji8/b702OGQAO1CzhsnDGBuVsIXtb42FV/BDyKw==","mode":420,"size":434},"dist/react/redux-toolkit-react.browser.mjs.map":{"checkedAt":1794532110940,"integrity":"sha512-WlIfLAc6rSxB5u0Y8bvL8oeJJWdoMYODibjPitaU19Iud6+6Bf5DXImtSXxRx8wNK1OS8RGnDY8zVx2FajX77A==","mode":420,"size":4163},"dist/react/cjs/redux-toolkit-react.development.cjs.map":{"checkedAt":1794532110940,"integrity":"sha512-XtYxWwfNOwfMFcOvDLmwpJf04LSSPnF4dJyZ/7fMHjWo163uanqozfTlimUmEyScR4p0TY4IVzCKFCFjVBJxwg==","mode":420,"size":4054},"dist/react/redux-toolkit-react.legacy-esm.js.map":{"checkedAt":1794532110941,"integrity":"sha512-kRP9SByAeAQzrQ1V7S2tKZelQiI4fkpZcuUCDhnJTNYHlcyQnmvQg/i/YImbk9K2IBRBQrpHrqjHYUJd4+WasA==","mode":420,"size":4005},"dist/react/redux-toolkit-react.modern.mjs.map":{"checkedAt":1794532110941,"integrity":"sha512-AXhhmlBoMolXv5tMmqrIb7gJUER5CSy5cudXJUfNZLine truncated
@@ -0,0 +1,14 @@
/**
*
* @param {array} val
* @param {string} by
* @returns
*/
function join(val, by=" "){
if(isArray(val)){
val.join(by)
}
return val;
}
module.exports = join;
@@ -0,0 +1,15 @@
# `@img/colour`
The latest version of the
[color](https://www.npmjs.com/package/color)
package is now ESM-only,
however some JavaScript runtimes do not yet support this,
which includes versions of Node.js prior to 20.19.0.
This package converts the `color` package and its dependencies,
all of which are MIT-licensed, to CommonJS.
- [color](https://www.npmjs.com/package/color)
- [color-convert](https://www.npmjs.com/package/color-convert)
- [color-string](https://www.npmjs.com/package/color-string)
- [color-name](https://www.npmjs.com/package/color-name)
@@ -0,0 +1,22 @@
var on=Object.defineProperty;var un=t=>{throw TypeError(t)};var Ai=(t,e,r)=>e in t?on(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var ln=(t,e)=>{for(var r in e)on(t,r,{get:e[r],enumerable:!0})};var lr=(t,e,r)=>Ai(t,typeof e!="symbol"?e+"":e,r),cn=(t,e,r)=>e.has(t)||un("Cannot "+r);var R=(t,e,r)=>(cn(t,e,"read from private field"),r?r.call(t):e.get(t)),At=(t,e,r)=>e.has(t)?un("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),pn=(t,e,r,n)=>(cn(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r);var rn={};ln(rn,{languages:()=>Hs,options:()=>Us,parsers:()=>tn,printers:()=>uu});var Di=(t,e,r,n)=>{if(!(t&&e==null))return e.replaceAll?e.replaceAll(r,n):r.global?e.replace(r,n):e.split(r).join(n)},w=Di;var we="string",ze="array",Ye="cursor",be="indent",Te="align",je="trim",xe="group",ke="fill",ce="if-break",Be="indent-if-break",Ke="line-suffix",Xe="line-suffix-boundary",j="line",Qe="label",Le="break-parent",Dt=new Set([Ye,be,Te,je,xe,ke,ce,Be,Ke,Xe,j,Qe,Le]);var vi=(t,e,r)=>{if(!(t&&e==null))return Array.isArray(e)||typeof e=="string"?e[r<0?e.length+r:r]:e.at(r)},K=vi;function yi(t){if(typeof t=="string")return we;if(Array.isArray(t))return ze;if(!t)return;let{type:e}=t;if(Dt.has(e))return e}var Fe=yi;var wi=t=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(t);function bi(t){let e=t===null?"null":typeof t;if(e!=="string"&&e!=="object")return`Unexpected doc '${e}',
Expected it to be 'string' or 'object'.`;if(Fe(t))throw new Error("doc is valid.");let r=Object.prototype.toString.call(t);if(r!=="[object Object]")return`Unexpected doc '${r}'.`;let n=wi([...Dt].map(s=>`'${s}'`));return`Unexpected doc.type '${t.type}'.
Expected it to be ${n}.`}var cr=class extends Error{name="InvalidDocError";constructor(e){super(bi(e)),this.doc=e}},pr=cr;function hr(t,e){if(typeof t=="string")return e(t);let r=new Map;return n(t);function n(i){if(r.has(i))return r.get(i);let a=s(i);return r.set(i,a),a}function s(i){switch(Fe(i)){case ze:return e(i.map(n));case ke:return e({...i,parts:i.parts.map(n)});case ce:return e({...i,breakContents:n(i.breakContents),flatContents:n(i.flatContents)});case xe:{let{expandedStates:a,contents:o}=i;return a?(a=a.map(n),o=a[0]):o=n(o),e({...i,contents:o,expandedStates:a})}case Te:case be:case Be:case Qe:case Ke:return e({...i,contents:n(i.contents)});case we:case Ye:case je:case Xe:case j:case Le:return e(i);default:throw new pr(i)}}}function B(t,e=hn){return hr(t,r=>typeof r=="string"?H(e,r.split(`
`)):r)}var mr=()=>{},re=mr,fr=mr,mn=mr;function k(t){return re(t),{type:be,contents:t}}function fn(t,e){return re(e),{type:Te,contents:e,n:t}}function E(t,e={}){return re(t),fr(e.expandedStates,!0),{type:xe,id:e.id,contents:t,break:!!e.shouldBreak,expandedStates:e.expandedStates}}function dn(t){return fn(Number.NEGATIVE_INFINITY,t)}function gn(t){return fn({type:"root"},t)}function vt(t){return mn(t),{type:ke,parts:t}}function pe(t,e="",r={}){return re(t),e!==""&&re(e),{type:ce,breakContents:t,flatContents:e,groupId:r.groupId}}function Cn(t,e){return re(t),{type:Be,contents:t,groupId:e.groupId,negate:e.negate}}var ne={type:Le};var xi={type:j,hard:!0},ki={type:j,hard:!0,literal:!0},_={type:j},v={type:j,soft:!0},S=[xi,ne],hn=[ki,ne];function H(t,e){re(t),fr(e);let r=[];for(let n=0;n<e.length;n++)n!==0&&r.push(t),r.push(e[n]);return r}var yt="'",Sn='"';function Bi(t,e){let r=e===!0||e===yt?yt:Sn,n=r===yt?Sn:yt,s=0,i=0;for(let a of t)a===r?s++:a===n&&i++;return s>i?n:r}var _n=Bi;function dr(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var V,gr=class{constructor(e){At(this,V);pn(this,V,new Set(e))}getLeadingWhitespaceCount(e){let r=R(this,V),n=0;for(let s=0;s<e.length&&r.has(e.charAt(s));s++)n++;return n}getTrailingWhitespaceCount(e){let r=R(this,V),n=0;for(let s=e.length-1;s>=0&&r.has(e.charAt(s));s--)n++;return n}getLeadingWhitespace(e){let r=this.getLeadingWhitespaceCount(e);return e.slice(0,r)}getTrailingWhitespace(e){let r=this.getTrailingWhitespaceCount(e);return e.slice(e.length-r)}hasLeadingWhitespace(e){return R(this,V).has(e.charAt(0))}hasTrailingWhitespace(e){return R(this,V).has(K(!1,e,-1))}trimStart(e){let r=this.getLeadingWhitespaceCount(e);return e.slice(r)}trimEnd(e){let r=this.getTrailingWhitespaceCount(e);return e.slice(0,e.length-r)}trim(e){return this.trimEnd(this.trimStart(e))}split(e,r=!1){let n=`[${dr([...R(this,V)].join(""))}]+`,s=new RegExp(r?`(${n})`:n,"u");return e.split(s)}hasWhitespaceCharacter(e){let r=R(this,V);return Array.prototype.some.call(e,n=>r.has(n))}hasNonWhitespaceCharacter(e){let r=R(this,V);return Array.prototype.some.call(e,n=>!r.has(n))}isWhitespaceOnly(e){let r=R(this,V);return Array.prototype.every.call(e,n=>r.has(n))}};V=new WeakMap;var En=gr;var Li=[" ",`
`,"\f","\r"," "],Fi=new En(Li),O=Fi;var Cr=class extends Error{name="UnexpectedNodeError";constructor(e,r,n="type"){super(`Unexpected ${r} node ${n}: ${JSON.stringify(e[n])}.`),this.node=e}},An=Cr;function Pi(t){return(t==null?void 0:t.type)==="front-matter"}var Pe=Pi;var Ni=new Set(["sourceSpan","startSourceSpan","endSourceSpan","nameSpan","valueSpan","keySpan","tagDefinition","tokens","valueTokens","switchValueSourceSpan","expSourceSpan","valueSourceSpan"]),Ii=new Set(["if","else if","for","switch","case"]);function Dn(t,e){var r;if(t.type==="text"||t.type==="comment"||Pe(t)||t.type==="yaml"||t.type==="toml")return null;if(t.type==="attribute"&&delete e.value,t.type==="docType"&&delete e.value,t.type==="angularControlFlowBlock"&&((r=t.parameters)!=null&&r.children))for(let n of e.parameters.children)Ii.has(t.name)?delete n.expression:n.expression=n.expression.trim();t.type==="angularIcuExpression"&&(e.switchValue=t.switchValue.trim()),t.type==="angularLetDeclarationInitializer"&&delete e.value}Dn.ignoredProperties=Ni;var vn=Dn;async function Ri(t,e){if(t.language==="yaml"){let r=t.value.trim(),n=r?await e(r,{parser:"yaml"}):"";return gn([t.startDelimiter,t.explicitLanguage,S,n,n?S:"",t.endDelimiter])}}var yn=Ri;function he(t,e=!0){return[k([v,t]),e?v:""]}function X(t,e){let r=t.type==="NGRoot"?t.node.type==="NGMicrosyntax"&&t.node.body.length===1&&t.node.body[0].type==="NGMicrosyntaxExpression"?t.node.body[0].expression:t.node:t.type==="JsExpressionRoot"?t.node:t;return r&&(r.type==="ObjectExpression"||r.type==="ArrayExpression"||(e.parser==="__vue_expression"||e.parser==="__vue_ts_expression")&&(r.type==="TemplateLiteral"||r.type==="StringLiteral"))}async function T(t,e,r,n){r={__isInHtmlAttribute:!0,__embeddedInHtml:!0,...r};let s=!0;n&&(r.__onHtmlBindingRoot=(a,o)=>{s=n(a,o)});let i=await e(t,r,e);return s?E(i):he(i)}function $i(t,e,r,n){let{node:s}=r,i=n.originalText.slice(s.sourceSpan.start.offset,s.sourceSpan.end.offset);return/^\s*$/u.test(i)?"":T(i,t,{parser:"__ng_directive",__isInHtmlAttribute:!1},X)}var wn=$i;var Oi=(t,e)=>{if(!(t&&e==null))return e.toReversed||!Array.isArray(e)?e.toReversed():[...e].reverse()},bn=Oi;function Mi(t){return Array.isArray(t)&&t.length>0}var me=Mi;var Tn,xn,kn,Bn,Ln,qi=((Tn=globalThis.Deno)==null?void 0:Tn.build.os)==="windows"||((kn=(xn=globalThis.navigator)==null?void 0:xn.platform)==null?void 0:kn.startsWith("Win"))||((Ln=(Bn=globalThis.process)==null?void 0:Bn.platform)==null?void 0:Ln.startsWith("win"))||!1;function Fn(t){if(t=t instanceof URL?t:new URL(t),t.protocol!=="file:")throw new TypeError(`URL must be a file URL: received "${t.protocol}"`);return t}function Hi(t){return t=Fn(t),decodeURIComponent(t.pathname.replace(/%(?![0-9A-Fa-f]{2})/g,"%25"))}function Vi(t){t=Fn(t);let e=decodeURIComponent(t.pathname.replace(/\//g,"\\").replace(/%(?![0-9A-Fa-f]{2})/g,"%25")).replace(/^\\*([A-Za-z]:)(\\|$)/,"$1\\");return t.hostname!==""&&(e=`\\\\${t.hostname}${e}`),e}function Pn(t){return qi?Vi(t):Hi(t)}var Nn=Pn;var Ui=t=>String(t).split(/[/\\]/u).pop();function In(t,e){if(!e)return;let r=Ui(e).toLowerCase();return t.find(({filenames:n})=>n==null?void 0:n.some(s=>s.toLowerCase()===r))??t.find(({extensions:n})=>n==null?void 0:n.some(s=>r.endsWith(s)))}function Wi(t,e){if(e)return t.find(({name:r})=>r.toLowerCase()===e)??t.find(({aliases:r})=>r==null?void 0:r.includes(e))??t.find(({extensions:r})=>r==null?void 0:r.includes(`.${e}`))}function Rn(t,e){if(e){if(String(e).startsWith("file:"))try{e=Nn(e)}catch{return}if(typeof e=="string")return t.find(({isSupported:r})=>r==null?void 0:r({filepath:e}))}}function Gi(t,e){let r=bn(!1,t.plugins).flatMap(s=>s.languages??[]),n=Wi(r,e.language)??In(r,e.physicalFile)??In(r,e.file)??Rn(r,e.physicalFile)??Rn(r,e.file)??(e.physicalFile,void 0);return n==null?void 0:n.parsers[0]}var Ne=Gi;var $n="inline",Sr={area:"none",base:"none",basefont:"none",datalist:"none",head:"none",link:"none",meta:"none",noembed:"none",noframes:"none",param:"block",rp:"none",script:"block",style:"none",template:"inline",title:"none",html:"block",body:"block",address:"block",blockquote:"block",center:"block",dialog:"block",div:"block",figure:"block",figcaption:"block",footer:"block",form:"block",header:"block",hr:"block",legend:"block",listing:"block",main:"block",p:"block",plaintext:"block",pre:"block",search:"block",xmp:"block",slot:"contents",ruby:"ruby",rt:"ruby-text",article:"block",aside:"block",h1:"block",h2:"block",h3:"block",h4:"block",h5:"block",h6:"block",hgroup:"block",nav:"block",section:"block",dir:"block",dd:"block",dl:"block",dt:"block",menu:"block",ol:"block",ul:"block",li:"list-item",table:"table",caption:"table-caption",colgroup:"table-column-group",col:"table-column",thead:"table-header-group",tbody:"table-row-group",tfoot:"table-footer-group",tr:"table-row",td:"table-cell",th:"table-cell",input:"inline-block",button:"inline-block",fieldset:"block",details:"block",summary:"block",marquee:"inline-block",source:"block",track:"block",meterLine truncated
`)){if(r.length===0)continue;let n=O.getLeadingWhitespaceCount(r);if(n===0)return 0;r.length!==n&&n<e&&(e=n)}return e===Number.POSITIVE_INFINITY?0:e}function yr(t,e=aa(t)){return e===0?t:t.split(`
`).map(r=>r.slice(e)).join(`
`)}function wr(t){return w(!1,w(!1,t,"&apos;","'"),"&quot;",'"')}function P(t){return wr(t.value)}var oa=new Set(["template","style","script"]);function et(t,e){return Ce(t,e)&&!oa.has(t.fullName)}function Ce(t,e){return e.parser==="vue"&&t.type==="element"&&t.parent.type==="root"&&t.fullName.toLowerCase()!=="html"}function xt(t,e){return Ce(t,e)&&(et(t,e)||t.attrMap.lang&&t.attrMap.lang!=="html")}function Zn(t){let e=t.fullName;return e.charAt(0)==="#"||e==="slot-scope"||e==="v-slot"||e.startsWith("v-slot:")}function es(t,e){let r=t.parent;if(!Ce(r,e))return!1;let n=r.fullName,s=t.fullName;return n==="script"&&s==="setup"||n==="style"&&s==="vars"}function kt(t,e=t.value){return t.parent.isWhitespaceSensitive?t.parent.isIndentationSensitive?B(e):B(yr(Er(e)),S):H(_,O.split(e))}function Bt(t,e){return Ce(t,e)&&t.name==="script"}var br=/\{\{(.+?)\}\}/su;async function ts(t,e){let r=[];for(let[n,s]of t.split(br).entries())if(n%2===0)r.push(B(s));else try{r.push(E(["{{",k([_,await T(s,e,{parser:"__ng_interpolation",__isInHtmlInterpolation:!0})]),_,"}}"]))}catch{r.push("{{",B(s),"}}")}return r}function Tr({parser:t}){return(e,r,n)=>T(P(n.node),e,{parser:t},X)}var ua=Tr({parser:"__ng_action"}),la=Tr({parser:"__ng_binding"}),ca=Tr({parser:"__ng_directive"});function pa(t,e){if(e.parser!=="angular")return;let{node:r}=t,n=r.fullName;if(n.startsWith("(")&&n.endsWith(")")||n.startsWith("on-"))return ua;if(n.startsWith("[")&&n.endsWith("]")||/^bind(?:on)?-/u.test(n)||/^ng-(?:if|show|hide|class|style)$/u.test(n))return la;if(n.startsWith("*"))return ca;let s=P(r);if(/^i18n(?:-.+)?$/u.test(n))return()=>he(vt(kt(r,s.trim())),!s.includes("@@"));if(br.test(s))return i=>ts(s,i)}var rs=pa;function ha(t,e){let{node:r}=t,n=P(r);if(r.fullName==="class"&&!e.parentParser&&!n.includes("{{"))return()=>n.trim().split(/\s+/u).join(" ")}var ns=ha;function ss(t){return t===" "||t===`
`||t==="\f"||t==="\r"||t===" "}var ma=/^[ \t\n\r\u000c]+/,fa=/^[, \t\n\r\u000c]+/,da=/^[^ \t\n\r\u000c]+/,ga=/[,]+$/,is=/^\d+$/,Ca=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/;function Sa(t){let e=t.length,r,n,s,i,a,o=0,u;function p(C){let A,D=C.exec(t.substring(o));if(D)return[A]=D,o+=A.length,A}let l=[];for(;;){if(p(fa),o>=e){if(l.length===0)throw new Error("Must contain one or more image candidate strings.");return l}u=o,r=p(da),n=[],r.slice(-1)===","?(r=r.replace(ga,""),f()):m()}function m(){for(p(ma),s="",i="in descriptor";;){if(a=t.charAt(o),i==="in descriptor")if(ss(a))s&&(n.push(s),s="",i="after descriptor");else if(a===","){o+=1,s&&n.push(s),f();return}else if(a==="(")s+=a,i="in parens";else if(a===""){s&&n.push(s),f();return}else s+=a;else if(i==="in parens")if(a===")")s+=a,i="in descriptor";else if(a===""){n.push(s),f();return}else s+=a;else if(i==="after descriptor"&&!ss(a))if(a===""){f();return}else i="in descriptor",o-=1;o+=1}}function f(){let C=!1,A,D,I,F,c={},g,y,q,x,U;for(F=0;F<n.length;F++)g=n[F],y=g[g.length-1],q=g.substring(0,g.length-1),x=parseInt(q,10),U=parseFloat(q),is.test(q)&&y==="w"?((A||D)&&(C=!0),x===0?C=!0:A=x):Ca.test(q)&&y==="x"?((A||D||I)&&(C=!0),U<0?C=!0:D=U):is.test(q)&&y==="h"?((I||D)&&(C=!0),x===0?C=!0:I=x):C=!0;if(!C)c.source={value:r,startOffset:u},A&&(c.width={value:A}),D&&(c.density={value:D}),I&&(c.height={value:I}),l.push(c);else throw new Error(`Invalid srcset descriptor found in "${t}" at "${g}".`)}}var as=Sa;function _a(t){if(t.node.fullName==="srcset"&&(t.parent.fullName==="img"||t.parent.fullName==="source"))return()=>Aa(P(t.node))}var os={width:"w",height:"h",density:"x"},Ea=Object.keys(os);function Aa(t){let e=as(t),r=Ea.filter(l=>e.some(m=>Object.prototype.hasOwnProperty.call(m,l)));if(r.length>1)throw new Error("Mixed descriptor in srcset is not supported");let[n]=r,s=os[n],i=e.map(l=>l.source.value),a=Math.max(...i.map(l=>l.length)),o=e.map(l=>l[n]?String(l[n].value):""),u=o.map(l=>{let m=l.indexOf(".");return m===-1?l.length:m}),p=Math.max(...u);return he(H([",",_],i.map((l,m)=>{let f=[l],C=o[m];if(C){let A=a-l.length+1,D=p-u[m],I=" ".repeat(A+D);f.push(pe(I," "),C+s)}return f})))}var us=_a;function ls(t,e){let{node:r}=t,n=P(t.node).trim();if(r.fullName==="style"&&!e.parentParser&&!n.includes("{{"))return async s=>he(await s(n,{parser:"css",__isHTMLStyleAttribute:!0}))}var xr=new WeakMap;function Da(t,e){let{root:r}=t;return xr.has(r)||xr.set(r,r.children.some(n=>Bt(n,e)&&["ts","typescript"].includes(n.attrMap.lang))),xr.get(r)}var Ie=Da;function cs(t,e,r){let{node:n}=r,s=P(n);return T(`type T<${s}> = any`,t,{parser:"babel-ts",__isEmbeddedTypescriptGenericParameters:!0},X)}function ps(t,e,{parseWithTs:r}){return T(`function _(${t}) {}`,e,{parser:r?"babel-ts":"babel",__isVueBindings:!0})}async function hs(t,e,r,n){let s=P(r.node),{left:i,operator:a,right:o}=va(s),u=Ie(r,n);return[E(await T(`function _(${i}) {}`,t,{parser:u?"babel-ts":"babel",__isVueForBindingLeft:!0}))," ",a," ",await T(o,t,{parser:u?"__ts_expression":"__js_expression"})]}function va(t){let e=/(.*?)\s+(in|of)\s+(.*)/su,r=/,([^,\]}]*)(?:,([^,\]}]*))?$/u,n=/^\(|\)$/gu,s=t.match(e);if(!s)return;let i={};if(i.for=s[3].trim(),!i.for)return;let a=w(!1,s[1].trim(),n,""),o=a.match(r);o?(i.alias=a.replace(r,""),i.iterator1=o[1].trim(),o[2]&&(i.iterator2=o[2].trim())):i.alias=a;let u=[i.alias,i.iterator1,i.iterator2];if(!u.some((p,l)=>!p&&(l===0||u.slice(l+1).some(Boolean))))return{left:u.filter(Boolean).join(","),operator:s[2],right:i.for}}function ya(t,e){if(e.parser!=="vue")return;let{node:r}=t,n=r.fullName;if(n==="v-for")return hs;if(n==="generic"&&Bt(r.parent,e))return cs;let s=P(r),i=Ie(t,e);if(Zn(r)||es(r,e))return a=>ps(s,a,{parseWithTs:i});if(n.startsWith("@")||n.startsWith("v-on:"))return a=>wa(s,a,{parseWithTs:i});if(n.startsWith(":")||n.startsWith(".")||n.startsWith("v-bind:"))return a=>ba(s,a,{parseWithTs:i});if(n.startsWith("v-"))return a=>ms(s,a,{parseWithTs:i})}async function wa(t,e,{parseWithTs:r}){var n;try{return await ms(t,e,{parseWithTs:r})}catch(s){if(((n=s.cause)==null?void 0:n.code)!=="BABEL_PARSER_SYNTAX_ERROR")throw s}return T(t,e,{parser:r?"__vue_ts_event_binding":"__vue_event_binding"},X)}function ba(t,e,{parseWithTs:r}){return T(t,e,{parser:r?"__vue_ts_expression":"__vue_expression"},X)}function ms(t,e,{parseWithTs:r}){return T(t,e,{parser:r?"__ts_expression":"__js_expression"},X)}var fs=ya;function Ta(t,e){let{node:r}=t;if(r.value){if(/^PRETTIER_HTML_PLACEHOLDER_\d+_\d+_IN_JS$/u.test(e.originalText.slice(r.valueSpan.start.offset,r.valueSpan.end.offset))||e.parser==="lwc"&&r.value.startsWith("{")&&r.value.endsWith("}"))return[r.rawName,"=",r.value];for(let n of[us,ls,ns,fs,rs]){let s=n(t,e);if(s)return xa(s)}}}function xa(t){return async(e,r,n,s)=>{let i=await t(e,r,n,s);if(i)return i=hr(i,a=>typeof a=="string"?w(!1,a,'"',"&quot;"):a),[n.node.rawName,'="',E(i),'"']}}var ds=Ta;var ka=new Proxy(()=>{},{get:()=>ka});function J(t){return t.sourceSpan.start.offset}fuLine truncated
${t}`}var xs=new Map([["if",new Set(["else if","else"])],["else if",new Set(["else if","else"])],["for",new Set(["empty"])],["defer",new Set(["placeholder","error","loading"])],["placeholder",new Set(["placeholder","error","loading"])],["error",new Set(["placeholder","error","loading"])],["loading",new Set(["placeholder","error","loading"])]]);function ks(t){let e=se(t);return t.type==="element"&&!t.endSourceSpan&&me(t.children)?Math.max(e,ks(K(!1,t.children,-1))):e}function ot(t,e,r){let n=t.node;if(ge(n)){let s=ks(n);return[z(n,e),B(O.trimEnd(e.originalText.slice(J(n)+(n.prev&&rt(n.prev)?Ft(n).length:0),s-(n.next&&Q(n.next)?_e(n,e).length:0)))),G(n,e)]}return r()}function It(t,e){return $(t)&&$(e)?t.isTrailingSpaceSensitive?t.hasTrailingSpaces?bt(e)?S:_:"":bt(e)?S:v:rt(t)&&(ge(e)||e.firstChild||e.isSelfClosing||e.type==="element"&&e.attrs.length>0)||t.type==="element"&&t.isSelfClosing&&Q(e)?"":!e.isLeadingSpaceSensitive||bt(e)||Q(e)&&t.lastChild&&Ae(t.lastChild)&&t.lastChild.lastChild&&Ae(t.lastChild.lastChild)?S:e.hasLeadingSpaces?_:v}function Re(t,e,r){let{node:n}=t;if(Dr(n))return[ne,...t.map(i=>{let a=i.node,o=a.prev?It(a.prev,a):"";return[o?[o,Je(a.prev)?S:""]:"",ot(i,e,r)]},"children")];let s=n.children.map(()=>Symbol(""));return t.map((i,a)=>{let o=i.node;if($(o)){if(o.prev&&$(o.prev)){let A=It(o.prev,o);if(A)return Je(o.prev)?[S,S,ot(i,e,r)]:[A,ot(i,e,r)]}return ot(i,e,r)}let u=[],p=[],l=[],m=[],f=o.prev?It(o.prev,o):"",C=o.next?It(o,o.next):"";return f&&(Je(o.prev)?u.push(S,S):f===S?u.push(S):$(o.prev)?p.push(f):p.push(pe("",v,{groupId:s[a-1]}))),C&&(Je(o)?$(o.next)&&m.push(S,S):C===S?$(o.next)&&m.push(S):l.push(C)),[...u,E([...p,E([ot(i,e,r),...l],{id:s[a]})]),...m]},"children")}function Bs(t,e,r){let{node:n}=t,s=[];Va(t)&&s.push("} "),s.push("@",n.name),n.parameters&&s.push(" (",E(r("parameters")),")"),s.push(" {");let i=Ls(n);return n.children.length>0?(n.firstChild.hasLeadingSpaces=!0,n.lastChild.hasTrailingSpaces=!0,s.push(k([S,Re(t,e,r)])),i&&s.push(S,"}")):i&&s.push("}"),E(s,{shouldBreak:!0})}function Ls(t){var e,r;return!(((e=t.next)==null?void 0:e.type)==="angularControlFlowBlock"&&((r=xs.get(t.name))!=null&&r.has(t.next.name)))}function Va(t){let{previous:e}=t;return(e==null?void 0:e.type)==="angularControlFlowBlock"&&!ge(e)&&!Ls(e)}function Fs(t,e,r){return[k([v,H([";",_],t.map(r,"children"))]),v]}function Ps(t,e,r){let{node:n}=t;return[De(n,e),E([n.switchValue.trim(),", ",n.clause,n.cases.length>0?[",",k([_,H(_,t.map(r,"cases"))])]:"",v]),Se(n,e)]}function Ns(t,e,r){let{node:n}=t;return[n.value," {",E([k([v,t.map(({node:s,isLast:i})=>{let a=[r()];return s.type==="text"&&(s.hasLeadingSpaces&&a.unshift(_),s.hasTrailingSpaces&&!i&&a.push(_)),a},"expression")]),v]),"}"]}function Is(t,e,r){let{node:n}=t;if(wt(n,e))return[z(n,e),E(st(t,e,r)),B(Nt(n,e)),...tt(n,e),G(n,e)];let s=n.children.length===1&&(n.firstChild.type==="interpolation"||n.firstChild.type==="angularIcuExpression")&&n.firstChild.isLeadingSpaceSensitive&&!n.firstChild.hasLeadingSpaces&&n.lastChild.isTrailingSpaceSensitive&&!n.lastChild.hasTrailingSpaces,i=Symbol("element-attr-group-id"),a=l=>E([E(st(t,e,r),{id:i}),l,tt(n,e)]),o=l=>s?Cn(l,{groupId:i}):(W(n,e)||et(n,e))&&n.parent.type==="root"&&e.parser==="vue"&&!e.vueIndentScriptAndStyle?l:k(l),u=()=>s?pe(v,"",{groupId:i}):n.firstChild.hasLeadingSpaces&&n.firstChild.isLeadingSpaceSensitive?_:n.firstChild.type==="text"&&n.isWhitespaceSensitive&&n.isIndentationSensitive?dn(v):v,p=()=>(n.next?Q(n.next):Ee(n.parent))?n.lastChild.hasTrailingSpaces&&n.lastChild.isTrailingSpaceSensitive?" ":"":s?pe(v,"",{groupId:i}):n.lastChild.hasTrailingSpaces&&n.lastChild.isTrailingSpaceSensitive?_:(n.lastChild.type==="comment"||n.lastChild.type==="text"&&n.isWhitespaceSensitive&&n.isIndentationSensitive)&&new RegExp(`\\n[\\t ]{${e.tabWidth*(t.ancestors.length-1)}}$`,"u").test(n.lastChild.value)?"":v;return n.children.length===0?a(n.hasDanglingSpaces&&n.isDanglingSpaceSensitive?_:""):a([Gn(n)?ne:"",o([u(),Re(t,e,r)]),p()])}function ut(t){return t>=9&&t<=32||t==160}function Rt(t){return 48<=t&&t<=57}function lt(t){return t>=97&&t<=122||t>=65&&t<=90}function Rs(t){return t>=97&&t<=102||t>=65&&t<=70||Rt(t)}function $t(t){return t===10||t===13}function Br(t){return 48<=t&&t<=55}function Ot(t){return t===39||t===34||t===96}var Ua=/-+([a-z0-9])/g;function Os(t){return t.replace(Ua,(...e)=>e[1].toUpperCase())}var ie=class t{constructor(e,r,n,s){this.file=e,this.offset=r,this.line=n,this.col=s}toString(){return this.offset!=null?`${this.file.url}@${this.line}:${this.col}`:this.file.url}moveBy(e){let r=this.file.content,n=r.length,s=this.offset,i=this.line,a=this.col;for(;s>0&&e<0;)if(s--,e++,r.charCodeAt(s)==10){i--;let u=r.substring(0,s-1).lastIndexOf(String.fromCharCode(10));a=u>0?s-u:s}else a--;for(;s<n&&e>0;){let o=r.charCodeAt(s);s++,e--,o==10?(i++,a=0):a++}return new t(this.file,s,i,a)}getContext(e,r){let n=this.file.content,s=this.offset;if(s!=null){s>n.length-1&&(s=n.length-1);let i=s,a=0,o=0;for(Line truncated
`&&++o==r)););for(a=0,o=0;a<e&&i<n.length-1&&(i++,a++,!(n[i]==`
`&&++o==r)););return{before:n.substring(s,this.offset),after:n.substring(this.offset,i+1)}}return null}},ve=class{constructor(e,r){this.content=e,this.url=r}},h=class{constructor(e,r,n=e,s=null){this.start=e,this.end=r,this.fullStart=n,this.details=s}toString(){return this.start.file.content.substring(this.start.offset,this.end.offset)}},Mt;(function(t){t[t.WARNING=0]="WARNING",t[t.ERROR=1]="ERROR"})(Mt||(Mt={}));var Oe=class{constructor(e,r,n=Mt.ERROR,s){this.span=e,this.msg=r,this.level=n,this.relatedError=s}contextualMessage(){let e=this.span.start.getContext(100,3);return e?`${this.msg} ("${e.before}[${Mt[this.level]} ->]${e.after}")`:this.msg}toString(){let e=this.span.details?`, ${this.span.details}`:"";return`${this.contextualMessage()}: ${this.span.start}${e}`}};var Wa=[za,Ya,Ka,Qa,Ja,to,Za,eo,ro,Xa];function Ga(t,e){for(let r of Wa)r(t,e);return t}function za(t){t.walk(e=>{if(e.type==="element"&&e.tagDefinition.ignoreFirstLf&&e.children.length>0&&e.children[0].type==="text"&&e.children[0].value[0]===`
`){let r=e.children[0];r.value.length===1?e.removeChild(r):r.value=r.value.slice(1)}})}function Ya(t){let e=r=>{var n,s;return r.type==="element"&&((n=r.prev)==null?void 0:n.type)==="ieConditionalStartComment"&&r.prev.sourceSpan.end.offset===r.startSourceSpan.start.offset&&((s=r.firstChild)==null?void 0:s.type)==="ieConditionalEndComment"&&r.firstChild.sourceSpan.start.offset===r.startSourceSpan.end.offset};t.walk(r=>{if(r.children)for(let n=0;n<r.children.length;n++){let s=r.children[n];if(!e(s))continue;let i=s.prev,a=s.firstChild;r.removeChild(i),n--;let o=new h(i.sourceSpan.start,a.sourceSpan.end),u=new h(o.start,s.sourceSpan.end);s.condition=i.condition,s.sourceSpan=u,s.startSourceSpan=o,s.removeChild(a)}})}function ja(t,e,r){t.walk(n=>{if(n.children)for(let s=0;s<n.children.length;s++){let i=n.children[s];if(i.type!=="text"&&!e(i))continue;i.type!=="text"&&(i.type="text",i.value=r(i));let a=i.prev;!a||a.type!=="text"||(a.value+=i.value,a.sourceSpan=new h(a.sourceSpan.start,i.sourceSpan.end),n.removeChild(i),s--)}})}function Ka(t){return ja(t,e=>e.type==="cdata",e=>`<![CDATA[${e.value}]]>`)}function Xa(t){let e=r=>{var n,s;return r.type==="element"&&r.attrs.length===0&&r.children.length===1&&r.firstChild.type==="text"&&!O.hasWhitespaceCharacter(r.children[0].value)&&!r.firstChild.hasLeadingSpaces&&!r.firstChild.hasTrailingSpaces&&r.isLeadingSpaceSensitive&&!r.hasLeadingSpaces&&r.isTrailingSpaceSensitive&&!r.hasTrailingSpaces&&((n=r.prev)==null?void 0:n.type)==="text"&&((s=r.next)==null?void 0:s.type)==="text"};t.walk(r=>{if(r.children)for(let n=0;n<r.children.length;n++){let s=r.children[n];if(!e(s))continue;let i=s.prev,a=s.next;i.value+=`<${s.rawName}>`+s.firstChild.value+`</${s.rawName}>`+a.value,i.sourceSpan=new h(i.sourceSpan.start,a.sourceSpan.end),i.isTrailingSpaceSensitive=a.isTrailingSpaceSensitive,i.hasTrailingSpaces=a.hasTrailingSpaces,r.removeChild(s),n--,r.removeChild(a)}})}function Qa(t,e){if(e.parser==="html")return;let r=/\{\{(.+?)\}\}/su;t.walk(n=>{if(qn(n,e))for(let s of n.children){if(s.type!=="text")continue;let i=s.sourceSpan.start,a=null,o=s.value.split(r);for(let u=0;u<o.length;u++,i=a){let p=o[u];if(u%2===0){a=i.moveBy(p.length),p.length>0&&n.insertChildBefore(s,{type:"text",value:p,sourceSpan:new h(i,a)});continue}a=i.moveBy(p.length+4),n.insertChildBefore(s,{type:"interpolation",sourceSpan:new h(i,a),children:p.length===0?[]:[{type:"text",value:p,sourceSpan:new h(i.moveBy(2),a.moveBy(-2))}]})}n.removeChild(s)}})}function Ja(t,e){t.walk(r=>{let n=r.$children;if(!n)return;if(n.length===0||n.length===1&&n[0].type==="text"&&O.trim(n[0].value).length===0){r.hasDanglingSpaces=n.length>0,r.$children=[];return}let s=Hn(r,e),i=Ar(r);if(!s)for(let a=0;a<n.length;a++){let o=n[a];if(o.type!=="text")continue;let{leadingWhitespace:u,text:p,trailingWhitespace:l}=Mn(o.value),m=o.prev,f=o.next;p?(o.value=p,o.sourceSpan=new h(o.sourceSpan.start.moveBy(u.length),o.sourceSpan.end.moveBy(-l.length)),u&&(m&&(m.hasTrailingSpaces=!0),o.hasLeadingSpaces=!0),l&&(o.hasTrailingSpaces=!0,f&&(f.hasLeadingSpaces=!0))):(r.removeChild(o),a--,(u||l)&&(m&&(m.hasTrailingSpaces=!0),f&&(f.hasLeadingSpaces=!0)))}r.isWhitespaceSensitive=s,r.isIndentationSensitive=i})}function Za(t){t.walk(e=>{e.isSelfClosing=!e.children||e.type==="element"&&(e.tagDefinition.isVoid||e.endSourceSpan&&e.startSourceSpan.start===e.endSourceSpan.start&&e.startSourceSpan.end===e.endSourceSpan.end)})}function eo(t,e){t.walk(r=>{r.type==="element"&&(r.hasHtmComponentClosingTag=r.endSourceSpan&&/^<\s*\/\s*\/\s*>$/u.test(e.originalText.slice(r.endSourceSpan.start.offset,r.endSourceSpan.end.offset)))})}function to(t,e){t.walk(r=>{r.cssDisplay=Qn(r,e)})}function ro(t,e){t.walk(r=>{let{children:n}=r;if(n){if(n.length===0){r.isDanglingSpaceSensitive=Wn(r,e);return}for(let s of n)s.isLeadingSpaceSensitive=Vn(s,e),s.isTrailingSpaceSensitive=Un(s,e);for(let s=0;s<n.length;s++){let i=n[s];i.isLeadingSpaceSensitive=(s===0||i.prev.isTrailingSpaceSensitive)&&i.isLeadingSpaceSensitive,i.isTrailingSpaceSensitive=(s===n.length-1||i.next.isLeadingSpaceSensitive)&&i.isTrailingSpaceSensitive}}})}var Ms=Ga;function no(t,e,r){let{node:n}=t;switch(n.type){case"front-matter":return B(n.raw);case"root":return e.__onHtmlRoot&&e.__onHtmlRoot(n),[E(Re(t,e,r)),S];case"element":case"ieConditionalComment":return Is(t,e,r);case"angularControlFlowBlock":return Bs(t,e,r);case"angularControlFlowBlockParameters":return Fs(t,e,r);case"angularControlFlowBlockParameter":return O.trim(n.expression);case"angularLetDeclaration":return E(["@let ",E([n.id," =",E(k([_,r("init")]))]),";"]);case"angularLetDeclarationInitializer":return n.value;case"angularIcuExpression":return Ps(t,e,r);case"angularIcuCase":return Ns(t,e,r);case"ieConditionalStartComment":case"ieConditionalEndComment":return[De(n),Se(n)];case"interpolation":return[De(n,e),...t.map(r,"children"),Se(n,e)];case"text":{if(n.parent.type==="interpolation"){let o=/\n[^\S\n]*$/u,u=o.test(n.value),p=u?n.value.replace(o,""):n.vaLine truncated
If '${e}' is a directive input, make sure the directive is imported by the current module.`}:{error:!1}}validateAttribute(e){return e.toLowerCase().startsWith("on")?{error:!0,msg:`Binding to event attribute '${e}' is disallowed for security reasons, please use (${e.slice(2)})=...`}:{error:!1}}allKnownElementNames(){return Array.from(this._schema.keys())}allKnownAttributesOfElement(e){let r=this._schema.get(e.toLowerCase())||this._schema.get("unknown");return Array.from(r.keys()).map(n=>po.get(n)??n)}allKnownEventsOfElement(e){return Array.from(this._eventSchema.get(e.toLowerCase())??[])}normalizeAnimationStyleProperty(e){return Os(e)}normalizeAnimationStyleValue(e,r,n){let s="",i=n.toString().trim(),a=null;if(ho(e)&&n!==0&&n!=="0")if(typeof n=="number")s="px";else{let o=n.match(/^[+-]?[\d\.]+([a-z]*)$/);o&&o[1].length==0&&(a=`Please provide a CSS unit value for ${r}:${n}`)}return{error:a,value:i+s}}};function ho(t){switch(t){case"width":case"height":case"minWidth":case"minHeight":case"maxWidth":case"maxHeight":case"left":case"top":case"bottom":case"right":case"fontSize":case"outlineWidth":case"outlineOffset":case"paddingTop":case"paddingLeft":case"paddingBottom":case"paddingRight":case"marginTop":case"marginLeft":case"marginBottom":case"marginRight":case"borderRadius":case"borderWidth":case"borderTopWidth":case"borderLeftWidth":case"borderRightWidth":case"borderBottomWidth":case"textIndent":return!0;default:return!1}}var d=class{constructor({closedByChildren:e,implicitNamespacePrefix:r,contentType:n=N.PARSABLE_DATA,closedByParent:s=!1,isVoid:i=!1,ignoreFirstLf:a=!1,preventNamespaceInheritance:o=!1,canSelfClose:u=!1}={}){this.closedByChildren={},this.closedByParent=!1,e&&e.length>0&&e.forEach(p=>this.closedByChildren[p]=!0),this.isVoid=i,this.closedByParent=s||i,this.implicitNamespacePrefix=r||null,this.contentType=n,this.ignoreFirstLf=a,this.preventNamespaceInheritance=o,this.canSelfClose=u??i}isClosedByChild(e){return this.isVoid||e.toLowerCase()in this.closedByChildren}getContentType(e){return typeof this.contentType=="object"?(e===void 0?void 0:this.contentType[e])??this.contentType.default:this.contentType}},Ks,pt;function He(t){return pt||(Ks=new d({canSelfClose:!0}),pt=Object.assign(Object.create(null),{base:new d({isVoid:!0}),meta:new d({isVoid:!0}),area:new d({isVoid:!0}),embed:new d({isVoid:!0}),link:new d({isVoid:!0}),img:new d({isVoid:!0}),input:new d({isVoid:!0}),param:new d({isVoid:!0}),hr:new d({isVoid:!0}),br:new d({isVoid:!0}),source:new d({isVoid:!0}),track:new d({isVoid:!0}),wbr:new d({isVoid:!0}),p:new d({closedByChildren:["address","article","aside","blockquote","div","dl","fieldset","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","main","nav","ol","p","pre","section","table","ul"],closedByParent:!0}),thead:new d({closedByChildren:["tbody","tfoot"]}),tbody:new d({closedByChildren:["tbody","tfoot"],closedByParent:!0}),tfoot:new d({closedByChildren:["tbody"],closedByParent:!0}),tr:new d({closedByChildren:["tr"],closedByParent:!0}),td:new d({closedByChildren:["td","th"],closedByParent:!0}),th:new d({closedByChildren:["td","th"],closedByParent:!0}),col:new d({isVoid:!0}),svg:new d({implicitNamespacePrefix:"svg"}),foreignObject:new d({implicitNamespacePrefix:"svg",preventNamespaceInheritance:!0}),math:new d({implicitNamespacePrefix:"math"}),li:new d({closedByChildren:["li"],closedByParent:!0}),dt:new d({closedByChildren:["dt","dd"]}),dd:new d({closedByChildren:["dt","dd"],closedByParent:!0}),rb:new d({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rt:new d({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rtc:new d({closedByChildren:["rb","rtc","rp"],closedByParent:!0}),rp:new d({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),optgroup:new d({closedByChildren:["optgroup"],closedByParent:!0}),option:new d({closedByChildren:["option","optgroup"],closedByParent:!0}),pre:new d({ignoreFirstLf:!0}),listing:new d({ignoreFirstLf:!0}),style:new d({contentType:N.RAW_TEXT}),script:new d({contentType:N.RAW_TEXT}),title:new d({contentType:{default:N.ESCAPABLE_RAW_TEXT,svg:N.PARSABLE_DATA}}),textarea:new d({contentType:N.ESCAPABLE_RAW_TEXT,ignoreFirstLf:!0})}),new Ut().allKnownElementNames().forEach(e=>{!pt[e]&&Me(e)===null&&(pt[e]=new d({canSelfClose:!1}))})),pt[t]??Ks}var ae=class{constructor(e,r){this.sourceSpan=e,this.i18n=r}},Wt=class extends ae{constructor(e,r,n,s){super(r,s),this.value=e,this.tokens=n,this.type="text"}visit(e,r){return e.visitText(this,r)}},Gt=class extends ae{constructor(e,r,n,s){super(r,s),this.value=e,this.tokens=n,this.type="cdata"}visit(e,r){return e.visitCdata(this,r)}},zt=class extends ae{constructor(e,r,n,s,i,a){super(s,a),this.switchValue=e,this.type=r,this.cases=n,this.switchValueSourceSpan=i}visit(e,r){return e.visitExpansion(this,r)}},Yt=class{constructor(e,r,n,s,i){this.value=e,this.expression=r,this.sourceSpan=n,this.valueSourceSpan=s,this.expSourceSpan=i,this.type="expansionCase"}visit(e,r){return e.visitExpansLine truncated
`,Nfr:"\u{1D511}",NoBreak:"\u2060",NonBreakingSpace:"\xA0",nbsp:"\xA0",Nopf:"\u2115",naturals:"\u2115",Not:"\u2AEC",NotCongruent:"\u2262",nequiv:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",npar:"\u2226",nparallel:"\u2226",nshortparallel:"\u2226",nspar:"\u2226",NotElement:"\u2209",notin:"\u2209",notinva:"\u2209",NotEqual:"\u2260",ne:"\u2260",NotEqualTilde:"\u2242\u0338",nesim:"\u2242\u0338",NotExists:"\u2204",nexist:"\u2204",nexists:"\u2204",NotGreater:"\u226F",ngt:"\u226F",ngtr:"\u226F",NotGreaterEqual:"\u2271",nge:"\u2271",ngeq:"\u2271",NotGreaterFullEqual:"\u2267\u0338",ngE:"\u2267\u0338",ngeqq:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",nGtv:"\u226B\u0338",NotGreaterLess:"\u2279",ntgl:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",ngeqslant:"\u2A7E\u0338",nges:"\u2A7E\u0338",NotGreaterTilde:"\u2275",ngsim:"\u2275",NotHumpDownHump:"\u224E\u0338",nbump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",nbumpe:"\u224F\u0338",NotLeftTriangle:"\u22EA",nltri:"\u22EA",ntriangleleft:"\u22EA",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangleEqual:"\u22EC",nltrie:"\u22EC",ntrianglelefteq:"\u22EC",NotLess:"\u226E",nless:"\u226E",nlt:"\u226E",NotLessEqual:"\u2270",nle:"\u2270",nleq:"\u2270",NotLessGreater:"\u2278",ntlg:"\u2278",NotLessLess:"\u226A\u0338",nLtv:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",nleqslant:"\u2A7D\u0338",nles:"\u2A7D\u0338",NotLessTilde:"\u2274",nlsim:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",NotPrecedes:"\u2280",npr:"\u2280",nprec:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",npre:"\u2AAF\u0338",npreceq:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",nprcue:"\u22E0",NotReverseElement:"\u220C",notni:"\u220C",notniva:"\u220C",NotRightTriangle:"\u22EB",nrtri:"\u22EB",ntriangleright:"\u22EB",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangleEqual:"\u22ED",nrtrie:"\u22ED",ntrianglerighteq:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",nsqsube:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",nsqsupe:"\u22E3",NotSubset:"\u2282\u20D2",nsubset:"\u2282\u20D2",vnsub:"\u2282\u20D2",NotSubsetEqual:"\u2288",nsube:"\u2288",nsubseteq:"\u2288",NotSucceeds:"\u2281",nsc:"\u2281",nsucc:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",nsce:"\u2AB0\u0338",nsucceq:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",nsccue:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",nsupset:"\u2283\u20D2",vnsup:"\u2283\u20D2",NotSupersetEqual:"\u2289",nsupe:"\u2289",nsupseteq:"\u2289",NotTilde:"\u2241",nsim:"\u2241",NotTildeEqual:"\u2244",nsime:"\u2244",nsimeq:"\u2244",NotTildeFullEqual:"\u2247",ncong:"\u2247",NotTildeTilde:"\u2249",nap:"\u2249",napprox:"\u2249",NotVerticalBar:"\u2224",nmid:"\u2224",nshortmid:"\u2224",nsmid:"\u2224",Nscr:"\u{1D4A9}",Ntilde:"\xD1",Nu:"\u039D",OElig:"\u0152",Oacute:"\xD3",Ocirc:"\xD4",Ocy:"\u041E",Odblac:"\u0150",Ofr:"\u{1D512}",Ograve:"\xD2",Omacr:"\u014C",Omega:"\u03A9",ohm:"\u03A9",Omicron:"\u039F",Oopf:"\u{1D546}",OpenCurlyDoubleQuote:"\u201C",ldquo:"\u201C",OpenCurlyQuote:"\u2018",lsquo:"\u2018",Or:"\u2A54",Oscr:"\u{1D4AA}",Oslash:"\xD8",Otilde:"\xD5",Otimes:"\u2A37",Ouml:"\xD6",OverBar:"\u203E",oline:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4",tbrk:"\u23B4",OverParenthesis:"\u23DC",PartialD:"\u2202",part:"\u2202",Pcy:"\u041F",Pfr:"\u{1D513}",Phi:"\u03A6",Pi:"\u03A0",PlusMinus:"\xB1",plusmn:"\xB1",pm:"\xB1",Popf:"\u2119",primes:"\u2119",Pr:"\u2ABB",Precedes:"\u227A",pr:"\u227A",prec:"\u227A",PrecedesEqual:"\u2AAF",pre:"\u2AAF",preceq:"\u2AAF",PrecedesSlantEqual:"\u227C",prcue:"\u227C",preccurlyeq:"\u227C",PrecedesTilde:"\u227E",precsim:"\u227E",prsim:"\u227E",Prime:"\u2033",Product:"\u220F",prod:"\u220F",Proportional:"\u221D",prop:"\u221D",propto:"\u221D",varpropto:"\u221D",vprop:"\u221D",Pscr:"\u{1D4AB}",Psi:"\u03A8",QUOT:'"',quot:'"',Qfr:"\u{1D514}",Qopf:"\u211A",rationals:"\u211A",Qscr:"\u{1D4AC}",RBarr:"\u2910",drbkarow:"\u2910",REG:"\xAE",circledR:"\xAE",reg:"\xAE",Racute:"\u0154",Rang:"\u27EB",Rarr:"\u21A0",twoheadrightarrow:"\u21A0",Rarrtl:"\u2916",Rcaron:"\u0158",Rcedil:"\u0156",Rcy:"\u0420",Re:"\u211C",Rfr:"\u211C",real:"\u211C",realpart:"\u211C",ReverseElement:"\u220B",SuchThat:"\u220B",ni:"\u220B",niv:"\u220B",ReverseEquilibrium:"\u21CB",leftrightharpoons:"\u21CB",lrhar:"\u21CB",ReverseUpEquilibrium:"\u296F",duhar:"\u296F",Rho:"\u03A1",RightAngleBracket:"\u27E9",rang:"\u27E9",rangle:"\u27E9",RightArrow:"\u2192",ShortRightArrow:"\u2192",rarr:"\u2192",rightarrow:"\u2192",srarr:"\u2192",RightArrowBar:"\u21E5",rarrb:"\u21E5",RightArrowLeftArrow:"\u21C4",rightleftarrows:"\u21C4",rlarr:"\u21C4",RightCeiling:"\u2309",rceil:"\u2309",RightDoubleBracket:"\u27E7",robrk:"\u27E7",RightDownTeeVector:"\u295D",RightDownVector:"\u21C2",dharr:"\u21C2",downharpoonright:"\u21C2",RightDownVectorBar:"\u2955",RightFloor:"\u230B",rfloor:"\u230B",RightTee:"\u22A2",vdash:"\u22A2",RightTeeArrow:"\u21A6",map:"\u21A6",mapsto:"\u21A6",RightTeeVector:"\u295B",RightTriangle:"\u22B3",vartriangleright:"\u22B3",vLine truncated
`)}tokenize(){for(;this._cursor.peek()!==0;){let e=this._cursor.clone();try{if(this._attemptCharCode(60))if(this._attemptCharCode(33))this._attemptStr("[CDATA[")?this._consumeCdata(e):this._attemptStr("--")?this._consumeComment(e):this._attemptStrCaseInsensitive("doctype")?this._consumeDocType(e):this._consumeBogusComment(e);else if(this._attemptCharCode(47))this._consumeTagClose(e);else{let r=this._cursor.clone();this._attemptCharCode(63)?(this._cursor=r,this._consumeBogusComment(e)):this._consumeTagOpen(e)}else this._tokenizeLet&&this._cursor.peek()===64&&!this._inInterpolation&&this._attemptStr("@let")?this._consumeLetDeclaration(e):this._tokenizeBlocks&&this._attemptCharCode(64)?this._consumeBlockStart(e):this._tokenizeBlocks&&!this._inInterpolation&&!this._isInExpansionCase()&&!this._isInExpansionForm()&&this._attemptCharCode(125)?this._consumeBlockEnd(e):this._tokenizeIcu&&this._tokenizeExpansionForm()||this._consumeWithInterpolation(5,8,()=>this._isTextEnd(),()=>this._isTagStart())}catch(r){this.handleError(r)}}this._beginToken(34),this._endToken([])}_getBlockName(){let e=!1,r=this._cursor.clone();return this._attemptCharCodeUntilFn(n=>ut(n)?!e:si(n)?(e=!0,!1):!0),this._cursor.getChars(r).trim()}_consumeBlockStart(e){this._beginToken(25,e);let r=this._endToken([this._getBlockName()]);if(this._cursor.peek()===40)if(this._cursor.advance(),this._consumeBlockParameters(),this._attemptCharCodeUntilFn(b),this._attemptCharCode(41))this._attemptCharCodeUntilFn(b);else{r.type=29;return}this._attemptCharCode(123)?(this._beginToken(26),this._endToken([])):r.type=29}_consumeBlockEnd(e){this._beginToken(27,e),this._endToken([])}_consumeBlockParameters(){for(this._attemptCharCodeUntilFn(ii);this._cursor.peek()!==41&&this._cursor.peek()!==0;){this._beginToken(28);let e=this._cursor.clone(),r=null,n=0;for(;this._cursor.peek()!==59&&this._cursor.peek()!==0||r!==null;){let s=this._cursor.peek();if(s===92)this._cursor.advance();else if(s===r)r=null;else if(r===null&&Ot(s))r=s;else if(s===40&&r===null)n++;else if(s===41&&r===null){if(n===0)break;n>0&&n--}this._cursor.advance()}this._endToken([this._cursor.getChars(e)]),this._attemptCharCodeUntilFn(ii)}}_consumeLetDeclaration(e){if(this._beginToken(30,e),ut(this._cursor.peek()))this._attemptCharCodeUntilFn(b);else{let s=this._endToken([this._cursor.getChars(e)]);s.type=33;return}let r=this._endToken([this._getLetDeclarationName()]);if(this._attemptCharCodeUntilFn(b),!this._attemptCharCode(61)){r.type=33;return}this._attemptCharCodeUntilFn(s=>b(s)&&!$t(s)),this._consumeLetDeclarationValue(),this._cursor.peek()===59?(this._beginToken(32),this._endToken([]),this._cursor.advance()):(r.type=33,r.sourceSpan=this._cursor.getSpan(e))}_getLetDeclarationName(){let e=this._cursor.clone(),r=!1;return this._attemptCharCodeUntilFn(n=>lt(n)||n===36||n===95||r&&Rt(n)?(r=!0,!1):!0),this._cursor.getChars(e).trim()}_consumeLetDeclarationValue(){let e=this._cursor.clone();for(this._beginToken(31,e);this._cursor.peek()!==0;){let r=this._cursor.peek();if(r===59)break;Ot(r)&&(this._cursor.advance(),this._attemptCharCodeUntilFn(n=>n===92?(this._cursor.advance(),!1):n===r)),this._cursor.advance()}this._endToken([this._cursor.getChars(e)])}_tokenizeExpansionForm(){if(this.isExpansionFormStart())return this._consumeExpansionFormStart(),!0;if(qo(this._cursor.peek())&&this._isInExpansionForm())return this._consumeExpansionCaseStart(),!0;if(this._cursor.peek()===125){if(this._isInExpansionCase())return this._consumeExpansionCaseEnd(),!0;if(this._isInExpansionForm())return this._consumeExpansionFormEnd(),!0}return!1}_beginToken(e,r=this._cursor.clone()){this._currentTokenStart=r,this._currentTokenType=e}_endToken(e,r){if(this._currentTokenStart===null)throw new gt("Programming error - attempted to end a token when there was no start to the token",this._currentTokenType,this._cursor.getSpan(r));if(this._currentTokenType===null)throw new gt("Programming error - attempted to end a token which has no token type",null,this._cursor.getSpan(this._currentTokenStart));let n={type:this._currentTokenType,parts:e,sourceSpan:(r??this._cursor).getSpan(this._currentTokenStart,this._leadingTriviaCodePoints)};return this.tokens.push(n),this._currentTokenStart=null,this._currentTokenType=null,n}_createError(e,r){this._isInExpansionForm()&&(e+=` (Do you have an unescaped "{" in your template? Use "{{ '{' }}") to escape it.)`);let n=new gt(e,this._currentTokenType,r);return this._currentTokenStart=null,this._currentTokenType=null,new Ct(n)}handleError(e){if(e instanceof St&&(e=this._createError(e.msg,this._cursor.getSpan(e.cursor))),e instanceof Ct)this.errors.push(e.error);else throw e}_attemptCharCode(e){return this._cursor.peek()===e?(this._cursor.advance(),!0):!1}_attemptCharCodeCaseInsensitive(e){return Ho(this._cursor.peek(),e)?(this._cursor.advance(),!0):!1}_requireCharCode(e){let r=this._cursor.clone();if(!this._attemptCharCode(e))throw this._createError(Ue(this._cursor.peek()),this._cursor.getSpan(r))}_attemptSLine truncated
`){let n=this._getClosestParentElement();n!=null&&n.children.length==0&&this.getTagDefinition(n.name).ignoreFirstLf&&(r=r.substring(1))}return r}_consumeText(e){let r=[e],n=e.sourceSpan,s=e.parts[0];if(s.length>0&&s[0]===`
`){let i=this._getContainer();i!=null&&i.children.length===0&&this.getTagDefinition(i.name).ignoreFirstLf&&(s=s.substring(1),r[0]={type:e.type,sourceSpan:e.sourceSpan,parts:[s]})}for(;this._peek.type===8||this._peek.type===5||this._peek.type===9;)e=this._advance(),r.push(e),e.type===8?s+=e.parts.join("").replace(/&([^;]+);/g,pi):e.type===9?s+=e.parts[0]:s+=e.parts.join("");if(s.length>0){let i=e.sourceSpan;this._addToParent(new Wt(s,new h(n.start,i.end,n.fullStart,n.details),r))}}_closeVoidElement(){let e=this._getContainer();e instanceof Y&&this.getTagDefinition(e.name).isVoid&&this._containerStack.pop()}_consumeStartTag(e){let[r,n]=e.parts,s=[];for(;this._peek.type===14;)s.push(this._consumeAttr(this._advance()));let i=this._getElementFullName(r,n,this._getClosestParentElement()),a=!1;if(this._peek.type===2){this._advance(),a=!0;let C=this.getTagDefinition(i);this.canSelfClose||C.canSelfClose||Me(i)!==null||C.isVoid||this.errors.push(L.create(i,e.sourceSpan,`Only void, custom and foreign elements can be self closed "${e.parts[1]}"`))}else this._peek.type===1&&(this._advance(),a=!1);let o=this._peek.sourceSpan.fullStart,u=new h(e.sourceSpan.start,o,e.sourceSpan.fullStart),p=new h(e.sourceSpan.start,o,e.sourceSpan.fullStart),l=new h(e.sourceSpan.start.moveBy(1),e.sourceSpan.end),m=new Y(i,s,[],u,p,void 0,l),f=this._getContainer();this._pushContainer(m,f instanceof Y&&this.getTagDefinition(f.name).isClosedByChild(m.name)),a?this._popContainer(i,Y,u):e.type===4&&(this._popContainer(i,Y,null),this.errors.push(L.create(i,u,`Opening tag "${i}" not terminated.`)))}_pushContainer(e,r){r&&this._containerStack.pop(),this._addToParent(e),this._containerStack.push(e)}_consumeEndTag(e){let r=this.allowHtmComponentClosingTags&&e.parts.length===0?null:this._getElementFullName(e.parts[0],e.parts[1],this._getClosestParentElement());if(r&&this.getTagDefinition(r).isVoid)this.errors.push(L.create(r,e.sourceSpan,`Void elements do not have end tags "${e.parts[1]}"`));else if(!this._popContainer(r,Y,e.sourceSpan)){let n=`Unexpected closing tag "${r}". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags`;this.errors.push(L.create(r,e.sourceSpan,n))}}_popContainer(e,r,n){let s=!1;for(let i=this._containerStack.length-1;i>=0;i--){let a=this._containerStack[i];if(Me(a.name)?a.name===e:(e==null||a.name.toLowerCase()===e.toLowerCase())&&a instanceof r)return a.endSourceSpan=n,a.sourceSpan.end=n!==null?n.end:a.sourceSpan.end,this._containerStack.splice(i,this._containerStack.length-i),!s;(a instanceof ee||a instanceof Y&&!this.getTagDefinition(a.name).closedByParent)&&(s=!0)}return!1}_consumeAttr(e){let r=qe(e.parts[0],e.parts[1]),n=e.sourceSpan.end,s;this._peek.type===15&&(s=this._advance());let i="",a=[],o,u;if(this._peek.type===16)for(o=this._peek.sourceSpan,u=this._peek.sourceSpan.end;this._peek.type===16||this._peek.type===17||this._peek.type===9;){let m=this._advance();a.push(m),m.type===17?i+=m.parts.join("").replace(/&([^;]+);/g,pi):m.type===9?i+=m.parts[0]:i+=m.parts.join(""),u=n=m.sourceSpan.end}this._peek.type===15&&(u=n=this._advance().sourceSpan.end);let l=o&&u&&new h((s==null?void 0:s.sourceSpan.start)??o.start,u,(s==null?void 0:s.sourceSpan.fullStart)??o.fullStart);return new jt(r,i,new h(e.sourceSpan.start,n,e.sourceSpan.fullStart),e.sourceSpan,l,a.length>0?a:void 0,void 0)}_consumeBlockOpen(e){let r=[];for(;this._peek.type===28;){let o=this._advance();r.push(new ht(o.parts[0],o.sourceSpan))}this._peek.type===26&&this._advance();let n=this._peek.sourceSpan.fullStart,s=new h(e.sourceSpan.start,n,e.sourceSpan.fullStart),i=new h(e.sourceSpan.start,n,e.sourceSpan.fullStart),a=new ee(e.parts[0],r,[],s,e.sourceSpan,i);this._pushContainer(a,!1)}_consumeBlockClose(e){this._popContainer(null,ee,e.sourceSpan)||this.errors.push(L.create(null,e.sourceSpan,'Unexpected closing block. The block may have been closed earlier. If you meant to write the } character, you should use the "&#125;" HTML entity instead.'))}_consumeIncompleteBlock(e){let r=[];for(;this._peek.type===28;){let o=this._advance();r.push(new ht(o.parts[0],o.sourceSpan))}let n=this._peek.sourceSpan.fullStart,s=new h(e.sourceSpan.start,n,e.sourceSpan.fullStart),i=new h(e.sourceSpan.start,n,e.sourceSpan.fullStart),a=new ee(e.parts[0],r,[],s,e.sourceSpan,i);this._pushContainer(a,!1),this._popContainer(null,ee,null),this.errors.push(L.create(e.parts[0],s,`Incomplete block "${e.parts[0]}". If you meant to write the @ character, you should use the "&#64;" HTML entity instead.`))}_consumeLet(e){let r=e.parts[0],n,s;if(this._peek.type!==31){this.errors.push(L.create(e.parts[0],e.sourceSpan,`Invalid @let declaration "${r}". Declaration must have a value.`));return}else n=this._advance();if(this._peek.type!==32){this.errors.push(L.create(e.parts[0],e.sourceSpan,`Unterminated @let declaration "${r}". Declaration must be terminated with a semicolon.`));return}elseLine truncated
`,_t);if(r===-1)return;let n=t.slice(_t,r).trim(),s=t.indexOf(`
${e}`,r),i=n;if(i||(i=e==="+++"?"toml":"yaml"),s===-1&&e==="---"&&i==="yaml"&&(s=t.indexOf(`
...`,r)),s===-1)return;let a=s+1+_t,o=t.charAt(a+1);if(!/\s?/u.test(o))return;let u=t.slice(0,a);return{type:"front-matter",language:i,explicitLanguage:n,value:t.slice(r+1,s),startDelimiter:e,endDelimiter:u.slice(-_t),raw:u}}function zo(t){let e=Go(t);if(!e)return{content:t};let{raw:r}=e;return{frontMatter:e,content:w(!1,r,/[^\n]/gu," ")+t.slice(r.length)}}var mi=zo;var ar={attrs:!0,children:!0,cases:!0,expression:!0},fi=new Set(["parent"]),le,Jr,Zr,Ge=class Ge{constructor(e={}){At(this,le);lr(this,"type");lr(this,"parent");for(let r of new Set([...fi,...Object.keys(e)]))this.setProperty(r,e[r])}setProperty(e,r){if(this[e]!==r){if(e in ar&&(r=r.map(n=>this.createChild(n))),!fi.has(e)){this[e]=r;return}Object.defineProperty(this,e,{value:r,enumerable:!1,configurable:!0})}}map(e){let r;for(let n in ar){let s=this[n];if(s){let i=Yo(s,a=>a.map(e));r!==s&&(r||(r=new Ge({parent:this.parent})),r.setProperty(n,i))}}if(r)for(let n in this)n in ar||(r[n]=this[n]);return e(r||this)}walk(e){for(let r in ar){let n=this[r];if(n)for(let s=0;s<n.length;s++)n[s].walk(e)}e(this)}createChild(e){let r=e instanceof Ge?e.clone():new Ge(e);return r.setProperty("parent",this),r}insertChildBefore(e,r){let n=this.$children;n.splice(n.indexOf(e),0,this.createChild(r))}removeChild(e){let r=this.$children;r.splice(r.indexOf(e),1)}replaceChild(e,r){let n=this.$children;n[n.indexOf(e)]=this.createChild(r)}clone(){return new Ge(this)}get $children(){return this[R(this,le,Jr)]}set $children(e){this[R(this,le,Jr)]=e}get firstChild(){var e;return(e=this.$children)==null?void 0:e[0]}get lastChild(){return K(!0,this.$children,-1)}get prev(){let e=R(this,le,Zr);return e[e.indexOf(this)-1]}get next(){let e=R(this,le,Zr);return e[e.indexOf(this)+1]}get rawName(){return this.hasExplicitNamespace?this.fullName:this.name}get fullName(){return this.namespace?this.namespace+":"+this.name:this.name}get attrMap(){return Object.fromEntries(this.attrs.map(e=>[e.fullName,e.value]))}};le=new WeakSet,Jr=function(){return this.type==="angularIcuCase"?"expression":this.type==="angularIcuExpression"?"cases":"children"},Zr=function(){var e;return((e=this.parent)==null?void 0:e.$children)??[]};var or=Ge;function Yo(t,e){let r=t.map(e);return r.some((n,s)=>n!==t[s])?r:t}var jo=[{regex:/^(\[if([^\]]*)\]>)(.*?)<!\s*\[endif\]$/su,parse:Ko},{regex:/^\[if([^\]]*)\]><!$/u,parse:Xo},{regex:/^<!\s*\[endif\]$/u,parse:Qo}];function di(t,e){if(t.value)for(let{regex:r,parse:n}of jo){let s=t.value.match(r);if(s)return n(t,e,s)}return null}function Ko(t,e,r){let[,n,s,i]=r,a=4+n.length,o=t.sourceSpan.start.moveBy(a),u=o.moveBy(i.length),[p,l]=(()=>{try{return[!0,e(i,o).children]}catch{return[!1,[{type:"text",value:i,sourceSpan:new h(o,u)}]]}})();return{type:"ieConditionalComment",complete:p,children:l,condition:w(!1,s.trim(),/\s+/gu," "),sourceSpan:t.sourceSpan,startSourceSpan:new h(t.sourceSpan.start,o),endSourceSpan:new h(u,t.sourceSpan.end)}}function Xo(t,e,r){let[,n]=r;return{type:"ieConditionalStartComment",condition:w(!1,n.trim(),/\s+/gu," "),sourceSpan:t.sourceSpan}}function Qo(t){return{type:"ieConditionalEndComment",sourceSpan:t.sourceSpan}}var ur=new Map([["*",new Set(["accesskey","autocapitalize","autofocus","class","contenteditable","dir","draggable","enterkeyhint","hidden","id","inert","inputmode","is","itemid","itemprop","itemref","itemscope","itemtype","lang","nonce","popover","slot","spellcheck","style","tabindex","title","translate","writingsuggestions"])],["a",new Set(["charset","coords","download","href","hreflang","name","ping","referrerpolicy","rel","rev","shape","target","type"])],["applet",new Set(["align","alt","archive","code","codebase","height","hspace","name","object","vspace","width"])],["area",new Set(["alt","coords","download","href","hreflang","nohref","ping","referrerpolicy","rel","shape","target","type"])],["audio",new Set(["autoplay","controls","crossorigin","loop","muted","preload","src"])],["base",new Set(["href","target"])],["basefont",new Set(["color","face","size"])],["blockquote",new Set(["cite"])],["body",new Set(["alink","background","bgcolor","link","text","vlink"])],["br",new Set(["clear"])],["button",new Set(["disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","name","popovertarget","popovertargetaction","type","value"])],["canvas",new Set(["height","width"])],["caption",new Set(["align"])],["col",new Set(["align","char","charoff","span","valign","width"])],["colgroup",new Set(["align","char","charoff","span","valign","width"])],["data",new Set(["value"])],["del",new Set(["cite","datetime"])],["details",new Set(["name","open"])],["dialog",new Set(["open"])],["dir",new Set(["compact"])],["div",new Set(["align"])],["dl",new Set(["compact"])],["embed",new Set(["height","src","type","width"])],["fieldset",new Set(["disabled","form","name"])],["font",new Set(["color","face","size"])],["form",new Set(["accept","accept-charset","action","autocomplete","enctype","method","name","novalidate","target"])],["Line truncated
@@ -0,0 +1,28 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.injectFrom = injectFrom;
const reflect_metadata_utils_1 = require("@inversifyjs/reflect-metadata-utils");
const classMetadataReflectKey_1 = require("../../reflectMetadata/data/classMetadataReflectKey");
const getClassMetadata_1 = require("../calculations/getClassMetadata");
const getDefaultClassMetadata_1 = require("../calculations/getDefaultClassMetadata");
const getExtendedConstructorArguments_1 = require("../calculations/getExtendedConstructorArguments");
const getExtendedLifecycle_1 = require("../calculations/getExtendedLifecycle");
const getExtendedProperties_1 = require("../calculations/getExtendedProperties");
function injectFrom(options) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
const decorator = (target) => {
const baseTypeClassMetadata = (0, getClassMetadata_1.getClassMetadata)(options.type);
(0, reflect_metadata_utils_1.updateOwnReflectMetadata)(target, classMetadataReflectKey_1.classMetadataReflectKey, getDefaultClassMetadata_1.getDefaultClassMetadata, composeUpdateReflectMetadataCallback(options, baseTypeClassMetadata));
};
return decorator;
}
function composeUpdateReflectMetadataCallback(options, baseTypeClassMetadata) {
const callback = (typeMetadata) => ({
constructorArguments: (0, getExtendedConstructorArguments_1.getExtendedConstructorArguments)(options, baseTypeClassMetadata, typeMetadata),
lifecycle: (0, getExtendedLifecycle_1.getExtendedLifecycle)(options, baseTypeClassMetadata, typeMetadata),
properties: (0, getExtendedProperties_1.getExtendedProperties)(options, baseTypeClassMetadata, typeMetadata),
scope: typeMetadata.scope,
});
return callback;
}
//# sourceMappingURL=injectFrom.js.map
@@ -0,0 +1,17 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var TabRole = {
relatedConcepts: [{
module: 'ARIA',
concept: {
name: 'tab'
}
}],
type: 'widget'
};
var _default = TabRole;
exports.default = _default;
@@ -0,0 +1,29 @@
var baseNth = require('./_baseNth'),
toInteger = require('./toInteger');
/**
* Gets the element at index `n` of `array`. If `n` is negative, the nth
* element from the end is returned.
*
* @static
* @memberOf _
* @since 4.11.0
* @category Array
* @param {Array} array The array to query.
* @param {number} [n=0] The index of the element to return.
* @returns {*} Returns the nth element of `array`.
* @example
*
* var array = ['a', 'b', 'c', 'd'];
*
* _.nth(array, 1);
* // => 'b'
*
* _.nth(array, -2);
* // => 'c';
*/
function nth(array, n) {
return (array && array.length) ? baseNth(array, toInteger(n)) : undefined;
}
module.exports = nth;
@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,mDAAmD;AACnD,oBAAY,WAAW;IACnB,8CAA8C;IAC9C,IAAI,SAAS;IACb,oBAAoB;IACpB,IAAI,SAAS;IACb,yBAAyB;IACzB,SAAS,cAAc;IACvB,4BAA4B;IAC5B,OAAO,YAAY;IACnB,6BAA6B;IAC7B,MAAM,WAAW;IACjB,4BAA4B;IAC5B,KAAK,UAAU;IACf,uBAAuB;IACvB,GAAG,QAAQ;IACX,iCAAiC;IACjC,KAAK,UAAU;IACf,8BAA8B;IAC9B,OAAO,YAAY;CACtB;AAED;;;;GAIG;AACH,wBAAgB,KAAK,CAAC,IAAI,EAAE;IAAE,IAAI,EAAE,WAAW,CAAA;CAAE,GAAG,OAAO,CAM1D;AAGD,8CAA8C;AAC9C,eAAO,MAAM,IAAI,mBAAmB,CAAC;AACrC,oBAAoB;AACpB,eAAO,MAAM,IAAI,mBAAmB,CAAC;AACrC,yBAAyB;AACzB,eAAO,MAAM,SAAS,wBAAwB,CAAC;AAC/C,4BAA4B;AAC5B,eAAO,MAAM,OAAO,sBAAsB,CAAC;AAC3C,6BAA6B;AAC7B,eAAO,MAAM,MAAM,qBAAqB,CAAC;AACzC,4BAA4B;AAC5B,eAAO,MAAM,KAAK,oBAAoB,CAAC;AACvC,uBAAuB;AACvB,eAAO,MAAM,GAAG,kBAAkB,CAAC;AACnC,iCAAiC;AACjC,eAAO,MAAM,KAAK,oBAAoB,CAAC;AACvC,8BAA8B;AAC9B,eAAO,MAAM,OAAO,sBAAsB,CAAC"}
@@ -0,0 +1,11 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.updateOwnReflectMetadata = updateOwnReflectMetadata;
const getOwnReflectMetadata_1 = require("./getOwnReflectMetadata");
function updateOwnReflectMetadata(target, metadataKey, buildDefaultValue, callback, propertyKey) {
const metadata = (0, getOwnReflectMetadata_1.getOwnReflectMetadata)(target, metadataKey, propertyKey) ??
buildDefaultValue();
const updatedMetadata = callback(metadata);
Reflect.defineMetadata(metadataKey, updatedMetadata, target, propertyKey);
}
//# sourceMappingURL=updateOwnReflectMetadata.js.map
@@ -0,0 +1,54 @@
{
"name": "uint8array-extras",
"version": "1.5.0",
"description": "Useful utilities for working with Uint8Array (and Buffer)",
"license": "MIT",
"repository": "sindresorhus/uint8array-extras",
"funding": "https://github.com/sponsors/sindresorhus",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "https://sindresorhus.com"
},
"type": "module",
"exports": {
"types": "./index.d.ts",
"default": "./index.js"
},
"sideEffects": false,
"engines": {
"node": ">=18"
},
"scripts": {
"test": "xo && ava && tsc index.d.ts"
},
"files": [
"index.js",
"index.d.ts"
],
"keywords": [
"uint8array",
"uint8",
"typedarray",
"buffer",
"typedarray",
"arraybuffer",
"is",
"assert",
"concat",
"equals",
"compare",
"base64",
"string",
"atob",
"btoa",
"hex",
"hexadecimal"
],
"devDependencies": {
"ava": "^6.0.1",
"typescript": "^5.3.3",
"xo": "^0.56.0",
"benchmark": "2.1.4"
}
}
@@ -0,0 +1,22 @@
import type { ESLintSettings } from "./types";
export type CacheKey = unknown;
export type CacheObject = {
result: unknown;
lastSeen: ReturnType<typeof process.hrtime>;
};
declare class ModuleCache {
map: Map<CacheKey, CacheObject>;
constructor(map?: Map<CacheKey, CacheObject>);
get<T>(cacheKey: CacheKey, settings: ESLintSettings): T | undefined;
set<T>(cacheKey: CacheKey, result: T): T;
static getSettings(settings: ESLintSettings): { lifetime: number } & Omit<ESLintSettings['import/cache'], 'lifetime'>;
}
export default ModuleCache;
export type { ModuleCache }
@@ -0,0 +1,41 @@
module.exports = isexe
isexe.sync = sync
var fs = require('fs')
function isexe (path, options, cb) {
fs.stat(path, function (er, stat) {
cb(er, er ? false : checkStat(stat, options))
})
}
function sync (path, options) {
return checkStat(fs.statSync(path), options)
}
function checkStat (stat, options) {
return stat.isFile() && checkMode(stat, options)
}
function checkMode (stat, options) {
var mod = stat.mode
var uid = stat.uid
var gid = stat.gid
var myUid = options.uid !== undefined ?
options.uid : process.getuid && process.getuid()
var myGid = options.gid !== undefined ?
options.gid : process.getgid && process.getgid()
var u = parseInt('100', 8)
var g = parseInt('010', 8)
var o = parseInt('001', 8)
var ug = u | g
var ret = (mod & o) ||
(mod & g) && gid === myGid ||
(mod & u) && uid === myUid ||
(mod & ug) && myUid === 0
return ret
}
@@ -0,0 +1,18 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getParentFunctionNode = getParentFunctionNode;
const utils_1 = require("@typescript-eslint/utils");
function getParentFunctionNode(node) {
let current = node.parent;
while (current) {
if (current.type === utils_1.AST_NODE_TYPES.ArrowFunctionExpression ||
current.type === utils_1.AST_NODE_TYPES.FunctionDeclaration ||
current.type === utils_1.AST_NODE_TYPES.FunctionExpression) {
return current;
}
current = current.parent;
}
// this shouldn't happen in correct code, but someone may attempt to parse bad code
// the parser won't error, so we shouldn't throw here
/* istanbul ignore next */ return null;
}
@@ -0,0 +1,628 @@
import { merge } from 'lodash-es';
import * as Parchment from 'parchment';
import Delta from 'quill-delta';
import Editor from './editor.js';
import Emitter from './emitter.js';
import instances from './instances.js';
import logger from './logger.js';
import Module from './module.js';
import Selection, { Range } from './selection.js';
import Composition from './composition.js';
import Theme from './theme.js';
import scrollRectIntoView from './utils/scrollRectIntoView.js';
import createRegistryWithFormats from './utils/createRegistryWithFormats.js';
const debug = logger('quill');
const globalRegistry = new Parchment.Registry();
Parchment.ParentBlot.uiClass = 'ql-ui';
/**
* Options for initializing a Quill instance
*/
/**
* Similar to QuillOptions, but with all properties expanded to their default values,
* and all selectors resolved to HTMLElements.
*/
class Quill {
static DEFAULTS = {
bounds: null,
modules: {
clipboard: true,
keyboard: true,
history: true,
uploader: true
},
placeholder: '',
readOnly: false,
registry: globalRegistry,
theme: 'default'
};
static events = Emitter.events;
static sources = Emitter.sources;
static version = typeof "2.0.3" === 'undefined' ? 'dev' : "2.0.3";
static imports = {
delta: Delta,
parchment: Parchment,
'core/module': Module,
'core/theme': Theme
};
static debug(limit) {
if (limit === true) {
limit = 'log';
}
logger.level(limit);
}
static find(node) {
let bubble = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
return instances.get(node) || globalRegistry.find(node, bubble);
}
static import(name) {
if (this.imports[name] == null) {
debug.error(`Cannot import ${name}. Are you sure it was registered?`);
}
return this.imports[name];
}
static register() {
if (typeof (arguments.length <= 0 ? undefined : arguments[0]) !== 'string') {
const target = arguments.length <= 0 ? undefined : arguments[0];
const overwrite = !!(arguments.length <= 1 ? undefined : arguments[1]);
const name = 'attrName' in target ? target.attrName : target.blotName;
if (typeof name === 'string') {
// Shortcut for formats:
// register(Blot | Attributor, overwrite)
this.register(`formats/${name}`, target, overwrite);
} else {
Object.keys(target).forEach(key => {
this.register(key, target[key], overwrite);
});
}
} else {
const path = arguments.length <= 0 ? undefined : arguments[0];
const target = arguments.length <= 1 ? undefined : arguments[1];
const overwrite = !!(arguments.length <= 2 ? undefined : arguments[2]);
if (this.imports[path] != null && !overwrite) {
debug.warn(`Overwriting ${path} with`, target);
}
this.imports[path] = target;
if ((path.startsWith('blots/') || path.startsWith('formats/')) && target && typeof target !== 'boolean' && target.blotName !== 'abstract') {
globalRegistry.register(target);
}
if (typeof target.register === 'function') {
target.register(globalRegistry);
}
}
}
constructor(container) {
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
this.options = expandConfig(container, options);
this.container = this.options.container;
if (this.container == null) {
debug.error('Invalid Quill container', container);
return;
}
if (this.options.debug) {
Quill.debug(this.options.debug);
}
const html = this.container.innerHTML.trim();
this.container.classList.add('ql-container');
this.container.innerHTML = '';
instances.set(this.container, this);
this.root = this.addContainer('ql-editor');
this.root.classList.add('ql-blank');
this.emitter = new Emitter();
const scrollBlotName = Parchment.ScrollBlot.blotName;
const ScrollBlot = this.options.registry.query(scrollBlotName);
if (!ScrollBlot || !('blotName' in ScrollBlot)) {
throw new Error(`Cannot initialize Quill without "${scrollBlotName}" blot`);
}
this.scroll = new ScrollBlot(this.options.registry, this.root, {
emitter: this.emitter
});
this.editor = new Editor(this.scroll);
this.selection = new Selection(this.scroll, this.emitter);
this.composition = new Composition(this.scroll, this.emitter);
this.theme = new this.options.theme(this, this.options); // eslint-disable-line new-cap
this.keyboard = this.theme.addModule('keyboard');
this.clipboard = this.theme.addModule('clipboard');
this.history = this.theme.addModule('history');
this.uploader = this.theme.addModule('uploader');
this.theme.addModule('input');
this.theme.addModule('uiNode');
this.theme.init();
this.emitter.on(Emitter.events.EDITOR_CHANGE, type => {
if (type === Emitter.events.TEXT_CHANGE) {
this.root.classList.toggle('ql-blank', this.editor.isBlank());
}
});
this.emitter.on(Emitter.events.SCROLL_UPDATE, (source, mutations) => {
const oldRange = this.selection.lastRange;
const [newRange] = this.selection.getRange();
const selectionInfo = oldRange && newRange ? {
oldRange,
newRange
} : undefined;
modify.call(this, () => this.editor.update(null, mutations, selectionInfo), source);
});
this.emitter.on(Emitter.events.SCROLL_EMBED_UPDATE, (blot, delta) => {
const oldRange = this.selection.lastRange;
const [newRange] = this.selection.getRange();
const selectionInfo = oldRange && newRange ? {
oldRange,
newRange
} : undefined;
modify.call(this, () => {
const change = new Delta().retain(blot.offset(this)).retain({
[blot.statics.blotName]: delta
});
return this.editor.update(change, [], selectionInfo);
}, Quill.sources.USER);
});
if (html) {
const contents = this.clipboard.convert({
html: `${html}<p><br></p>`,
text: '\n'
});
this.setContents(contents);
}
this.history.clear();
if (this.options.placeholder) {
this.root.setAttribute('data-placeholder', this.options.placeholder);
}
if (this.options.readOnly) {
this.disable();
}
this.allowReadOnlyEdits = false;
}
addContainer(container) {
let refNode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
if (typeof container === 'string') {
const className = container;
container = document.createElement('div');
container.classList.add(className);
}
this.container.insertBefore(container, refNode);
return container;
}
blur() {
this.selection.setRange(null);
}
deleteText(index, length, source) {
// @ts-expect-error
[index, length,, source] = overload(index, length, source);
return modify.call(this, () => {
return this.editor.deleteText(index, length);
}, source, index, -1 * length);
}
disable() {
this.enable(false);
}
editReadOnly(modifier) {
this.allowReadOnlyEdits = true;
const value = modifier();
this.allowReadOnlyEdits = false;
return value;
}
enable() {
let enabled = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
this.scroll.enable(enabled);
this.container.classList.toggle('ql-disabled', !enabled);
}
focus() {
let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
this.selection.focus();
if (!options.preventScroll) {
this.scrollSelectionIntoView();
}
}
format(name, value) {
let source = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : Emitter.sources.API;
return modify.call(this, () => {
const range = this.getSelection(true);
let change = new Delta();
if (range == null) return change;
if (this.scroll.query(name, Parchment.Scope.BLOCK)) {
change = this.editor.formatLine(range.index, range.length, {
[name]: value
});
} else if (range.length === 0) {
this.selection.format(name, value);
return change;
} else {
change = this.editor.formatText(range.index, range.length, {
[name]: value
});
}
this.setSelection(range, Emitter.sources.SILENT);
return change;
}, source);
}
formatLine(index, length, name, value, source) {
let formats;
// eslint-disable-next-line prefer-const
[index, length, formats, source] = overload(index, length,
// @ts-expect-error
name, value, source);
return modify.call(this, () => {
return this.editor.formatLine(index, length, formats);
}, source, index, 0);
}
formatText(index, length, name, value, source) {
let formats;
// eslint-disable-next-line prefer-const
[index, length, formats, source] = overload(
// @ts-expect-error
index, length, name, value, source);
return modify.call(this, () => {
return this.editor.formatText(index, length, formats);
}, source, index, 0);
}
getBounds(index) {
let length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
let bounds = null;
if (typeof index === 'number') {
bounds = this.selection.getBounds(index, length);
} else {
bounds = this.selection.getBounds(index.index, index.length);
}
if (!bounds) return null;
const containerBounds = this.container.getBoundingClientRect();
return {
bottom: bounds.bottom - containerBounds.top,
height: bounds.height,
left: bounds.left - containerBounds.left,
right: bounds.right - containerBounds.left,
top: bounds.top - containerBounds.top,
width: bounds.width
};
}
getContents() {
let index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
let length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.getLength() - index;
[index, length] = overload(index, length);
return this.editor.getContents(index, length);
}
getFormat() {
let index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.getSelection(true);
let length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
if (typeof index === 'number') {
return this.editor.getFormat(index, length);
}
return this.editor.getFormat(index.index, index.length);
}
getIndex(blot) {
return blot.offset(this.scroll);
}
getLength() {
return this.scroll.length();
}
getLeaf(index) {
return this.scroll.leaf(index);
}
getLine(index) {
return this.scroll.line(index);
}
getLines() {
let index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
let length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Number.MAX_VALUE;
if (typeof index !== 'number') {
return this.scroll.lines(index.index, index.length);
}
return this.scroll.lines(index, length);
}
getModule(name) {
return this.theme.modules[name];
}
getSelection() {
let focus = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
if (focus) this.focus();
this.update(); // Make sure we access getRange with editor in consistent state
return this.selection.getRange()[0];
}
getSemanticHTML() {
let index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
let length = arguments.length > 1 ? arguments[1] : undefined;
if (typeof index === 'number') {
length = length ?? this.getLength() - index;
}
// @ts-expect-error
[index, length] = overload(index, length);
return this.editor.getHTML(index, length);
}
getText() {
let index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
let length = arguments.length > 1 ? arguments[1] : undefined;
if (typeof index === 'number') {
length = length ?? this.getLength() - index;
}
// @ts-expect-error
[index, length] = overload(index, length);
return this.editor.getText(index, length);
}
hasFocus() {
return this.selection.hasFocus();
}
insertEmbed(index, embed, value) {
let source = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : Quill.sources.API;
return modify.call(this, () => {
return this.editor.insertEmbed(index, embed, value);
}, source, index);
}
insertText(index, text, name, value, source) {
let formats;
// eslint-disable-next-line prefer-const
// @ts-expect-error
[index,, formats, source] = overload(index, 0, name, value, source);
return modify.call(this, () => {
return this.editor.insertText(index, text, formats);
}, source, index, text.length);
}
isEnabled() {
return this.scroll.isEnabled();
}
off() {
return this.emitter.off(...arguments);
}
on() {
return this.emitter.on(...arguments);
}
once() {
return this.emitter.once(...arguments);
}
removeFormat(index, length, source) {
[index, length,, source] = overload(index, length, source);
return modify.call(this, () => {
return this.editor.removeFormat(index, length);
}, source, index);
}
scrollRectIntoView(rect) {
scrollRectIntoView(this.root, rect);
}
/**
* @deprecated Use Quill#scrollSelectionIntoView() instead.
*/
scrollIntoView() {
console.warn('Quill#scrollIntoView() has been deprecated and will be removed in the near future. Please use Quill#scrollSelectionIntoView() instead.');
this.scrollSelectionIntoView();
}
/**
* Scroll the current selection into the visible area.
* If the selection is already visible, no scrolling will occur.
*/
scrollSelectionIntoView() {
const range = this.selection.lastRange;
const bounds = range && this.selection.getBounds(range.index, range.length);
if (bounds) {
this.scrollRectIntoView(bounds);
}
}
setContents(delta) {
let source = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Emitter.sources.API;
return modify.call(this, () => {
delta = new Delta(delta);
const length = this.getLength();
// Quill will set empty editor to \n
const delete1 = this.editor.deleteText(0, length);
const applied = this.editor.insertContents(0, delta);
// Remove extra \n from empty editor initialization
const delete2 = this.editor.deleteText(this.getLength() - 1, 1);
return delete1.compose(applied).compose(delete2);
}, source);
}
setSelection(index, length, source) {
if (index == null) {
// @ts-expect-error https://github.com/microsoft/TypeScript/issues/22609
this.selection.setRange(null, length || Quill.sources.API);
} else {
// @ts-expect-error
[index, length,, source] = overload(index, length, source);
this.selection.setRange(new Range(Math.max(0, index), length), source);
if (source !== Emitter.sources.SILENT) {
this.scrollSelectionIntoView();
}
}
}
setText(text) {
let source = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Emitter.sources.API;
const delta = new Delta().insert(text);
return this.setContents(delta, source);
}
update() {
let source = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : Emitter.sources.USER;
const change = this.scroll.update(source); // Will update selection before selection.update() does if text changes
this.selection.update(source);
// TODO this is usually undefined
return change;
}
updateContents(delta) {
let source = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Emitter.sources.API;
return modify.call(this, () => {
delta = new Delta(delta);
return this.editor.applyDelta(delta);
}, source, true);
}
}
function resolveSelector(selector) {
return typeof selector === 'string' ? document.querySelector(selector) : selector;
}
function expandModuleConfig(config) {
return Object.entries(config ?? {}).reduce((expanded, _ref) => {
let [key, value] = _ref;
return {
...expanded,
[key]: value === true ? {} : value
};
}, {});
}
function omitUndefinedValuesFromOptions(obj) {
return Object.fromEntries(Object.entries(obj).filter(entry => entry[1] !== undefined));
}
function expandConfig(containerOrSelector, options) {
const container = resolveSelector(containerOrSelector);
if (!container) {
throw new Error('Invalid Quill container');
}
const shouldUseDefaultTheme = !options.theme || options.theme === Quill.DEFAULTS.theme;
const theme = shouldUseDefaultTheme ? Theme : Quill.import(`themes/${options.theme}`);
if (!theme) {
throw new Error(`Invalid theme ${options.theme}. Did you register it?`);
}
const {
modules: quillModuleDefaults,
...quillDefaults
} = Quill.DEFAULTS;
const {
modules: themeModuleDefaults,
...themeDefaults
} = theme.DEFAULTS;
let userModuleOptions = expandModuleConfig(options.modules);
// Special case toolbar shorthand
if (userModuleOptions != null && userModuleOptions.toolbar && userModuleOptions.toolbar.constructor !== Object) {
userModuleOptions = {
...userModuleOptions,
toolbar: {
container: userModuleOptions.toolbar
}
};
}
const modules = merge({}, expandModuleConfig(quillModuleDefaults), expandModuleConfig(themeModuleDefaults), userModuleOptions);
const config = {
...quillDefaults,
...omitUndefinedValuesFromOptions(themeDefaults),
...omitUndefinedValuesFromOptions(options)
};
let registry = options.registry;
if (registry) {
if (options.formats) {
debug.warn('Ignoring "formats" option because "registry" is specified');
}
} else {
registry = options.formats ? createRegistryWithFormats(options.formats, config.registry, debug) : config.registry;
}
return {
...config,
registry,
container,
theme,
modules: Object.entries(modules).reduce((modulesWithDefaults, _ref2) => {
let [name, value] = _ref2;
if (!value) return modulesWithDefaults;
const moduleClass = Quill.import(`modules/${name}`);
if (moduleClass == null) {
debug.error(`Cannot load ${name} module. Are you sure you registered it?`);
return modulesWithDefaults;
}
return {
...modulesWithDefaults,
// @ts-expect-error
[name]: merge({}, moduleClass.DEFAULTS || {}, value)
};
}, {}),
bounds: resolveSelector(config.bounds)
};
}
// Handle selection preservation and TEXT_CHANGE emission
// common to modification APIs
function modify(modifier, source, index, shift) {
if (!this.isEnabled() && source === Emitter.sources.USER && !this.allowReadOnlyEdits) {
return new Delta();
}
let range = index == null ? null : this.getSelection();
const oldDelta = this.editor.delta;
const change = modifier();
if (range != null) {
if (index === true) {
index = range.index; // eslint-disable-line prefer-destructuring
}
if (shift == null) {
range = shiftRange(range, change, source);
} else if (shift !== 0) {
// @ts-expect-error index should always be number
range = shiftRange(range, index, shift, source);
}
this.setSelection(range, Emitter.sources.SILENT);
}
if (change.length() > 0) {
const args = [Emitter.events.TEXT_CHANGE, change, oldDelta, source];
this.emitter.emit(Emitter.events.EDITOR_CHANGE, ...args);
if (source !== Emitter.sources.SILENT) {
this.emitter.emit(...args);
}
}
return change;
}
function overload(index, length, name, value, source) {
let formats = {};
// @ts-expect-error
if (typeof index.index === 'number' && typeof index.length === 'number') {
// Allow for throwaway end (used by insertText/insertEmbed)
if (typeof length !== 'number') {
// @ts-expect-error
source = value;
value = name;
name = length;
// @ts-expect-error
length = index.length; // eslint-disable-line prefer-destructuring
// @ts-expect-error
index = index.index; // eslint-disable-line prefer-destructuring
} else {
// @ts-expect-error
length = index.length; // eslint-disable-line prefer-destructuring
// @ts-expect-error
index = index.index; // eslint-disable-line prefer-destructuring
}
} else if (typeof length !== 'number') {
// @ts-expect-error
source = value;
value = name;
name = length;
length = 0;
}
// Handle format being object, two format name/value strings or excluded
if (typeof name === 'object') {
// @ts-expect-error Fix me later
formats = name;
// @ts-expect-error
source = value;
} else if (typeof name === 'string') {
if (value != null) {
formats[name] = value;
} else {
// @ts-expect-error
source = name;
}
}
// Handle optional source
source = source || Emitter.sources.API;
// @ts-expect-error
return [index, length, formats, source];
}
function shiftRange(range, index, lengthOrSource, source) {
const length = typeof lengthOrSource === 'number' ? lengthOrSource : 0;
if (range == null) return null;
let start;
let end;
// @ts-expect-error -- TODO: add a better type guard around `index`
if (index && typeof index.transformPosition === 'function') {
[start, end] = [range.index, range.index + range.length].map(pos =>
// @ts-expect-error -- TODO: add a better type guard around `index`
index.transformPosition(pos, source !== Emitter.sources.USER));
} else {
[start, end] = [range.index, range.index + range.length].map(pos => {
// @ts-expect-error -- TODO: add a better type guard around `index`
if (pos < index || pos === index && source === Emitter.sources.USER) return pos;
if (length >= 0) {
return pos + length;
}
// @ts-expect-error -- TODO: add a better type guard around `index`
return Math.max(index, pos + length);
});
}
return new Range(start, end - start);
}
export { Parchment, Range };
export { globalRegistry, expandConfig, overload, Quill as default };
//# sourceMappingURL=quill.js.map
@@ -0,0 +1,3 @@
import type { AntdTableOptions, Data, Params, Service, AntdTableResult } from './types';
declare const useAntdTable: <TData extends Data, TParams extends Params>(service: Service<TData, TParams>, options?: AntdTableOptions<TData, TParams>) => AntdTableResult<TData, TParams>;
export default useAntdTable;
@@ -0,0 +1 @@
{"mappings":";;;;AAAA;;;;;;;;;;CAUC;;;AAQD,SAAS,gCAAU,IAAI,EAAE,IAAI;IAC3B,IAAI,KAAK,IAAI,KAAK,KAAK,IAAI,EACzB,OAAO;IAGT,KAAK,IAAI,QAAQ,KAAM;QACrB,IAAI,CAAC,KAAK,GAAG,CAAC,OACZ,OAAO;IAEX;IAEA,OAAO;AACT;AAcO,SAAS,0CAA0B,KAAkC;IAC1E,IAAI,iBACF,gBAAgB,gCAChB,yBAAyB,sCACzB,6BAA6B,EAC7B,mBAAmB,wBAAwB,QAAQ,oBACnD,mBAAmB,OACpB,GAAG;IAEJ,8FAA8F;IAC9F,kGAAkG;IAClG,IAAI,eAAe,CAAA,GAAA,aAAK,EAAE;IAC1B,IAAI,GAAG,WAAW,GAAG,CAAA,GAAA,eAAO,EAAE;IAC9B,IAAI,gBAAgB,CAAA,GAAA,aAAK,EAAc;IACvC,IAAI,wBAAwB,CAAA,GAAA,aAAK,EAAwB;IACzD,IAAI,GAAG,cAAc,GAAG,CAAA,GAAA,eAAO,EAAc;IAC7C,IAAI,mBAAmB,CAAA,GAAA,cAAM,EAAE,IAAM,uCAAiB,MAAM,YAAY,GAAG;QAAC,MAAM,YAAY;KAAC;IAC/F,IAAI,sBAAsB,CAAA,GAAA,cAAM,EAAE,IAAM,uCAAiB,MAAM,mBAAmB,EAAE,IAAI,CAAA,GAAA,yCAAQ,MAAM;QAAC,MAAM,mBAAmB;KAAC;IACjI,IAAI,CAAC,cAAc,gBAAgB,GAAG,CAAA,GAAA,yBAAiB,EACrD,kBACA,qBACA,MAAM,iBAAiB;IAEzB,IAAI,mBAAmB,CAAA,GAAA,cAAM,EAAE,IAC7B,MAAM,YAAY,GAAG,IAAI,IAAI,MAAM,YAAY,IAAI,IAAI,OACvD;QAAC,MAAM,YAAY;KAAC;IACtB,IAAI,CAAC,mBAAmB,qBAAqB,GAAG,CAAA,GAAA,eAAO,EAAE;IAEzD,2GAA2G;IAC3G,oGAAoG;IACpG,IAAI,0BAA0B,aAAa,sBAAsB,YAAY,OAAO,iBAAiB,YAAY,aAAa,IAAI,KAAK,GACrI,qBAAqB;IAGvB,mEAAmE;IACnE,IAAI,wBAAwB,CAAA,GAAA,aAAK,EAAE;IACnC,CAAA,GAAA,gBAAQ,EAAE;QACR,IAAI,0BAA0B,sBAAsB,OAAO,EAAE;YAC3D,qBAAqB;YACrB,sBAAsB,OAAO,GAAG;QAClC;IACF,GAAG;QAAC;KAAsB;IAE1B,OAAO;uBACL;gCACA;2BACA;8BACA;QACA,IAAI,aAAY;YACd,OAAO,aAAa,OAAO;QAC7B;QACA,YAAW,CAAC;YACV,aAAa,OAAO,GAAG;YACvB,WAAW;QACb;QACA,IAAI,cAAa;YACf,OAAO,cAAc,OAAO;QAC9B;QACA,IAAI,sBAAqB;YACvB,OAAO,sBAAsB,OAAO;QACtC;QACA,eAAc,CAAC,EAAE,qBAAqB,OAAO;YAC3C,cAAc,OAAO,GAAG;YACxB,sBAAsB,OAAO,GAAG;YAChC,cAAc;QAChB;sBACA;QACA,iBAAgB,IAAI;YAClB,IAAI,iCAAiC,CAAC,gCAAU,MAAM,eACpD,gBAAgB;QAEpB;QACA,cAAc;0BACd;IACF;AACF;AAEA,SAAS,uCAAiB,SAAmD,EAAE,YAAwB;IACrG,IAAI,CAAC,WACH,OAAO;IAGT,OAAO,cAAc,QACjB,QACA,IAAI,CAAA,GAAA,yCAAQ,EAAE;AACpB","sources":["packages/@react-stately/selection/src/useMultipleSelectionState.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {DisabledBehavior, FocusStrategy, Key, MultipleSelection, SelectionBehavior, SelectionMode} from '@react-types/shared';\nimport {MultipleSelectionState} from './types';\nimport {Selection} from './Selection';\nimport {useControlledState} from '@react-stately/utils';\nimport {useEffect, useMemo, useRef, useState} from 'react';\n\nfunction equalSets(setA, setB) {\n if (setA.size !== setB.size) {\n return false;\n }\n\n for (let item of setA) {\n if (!setB.has(item)) {\n return false;\n }\n }\n\n return true;\n}\n\nexport interface MultipleSelectionStateProps extends MultipleSelection {\n /** How multiple selection should behave in the collection. */\n selectionBehavior?: SelectionBehavior,\n /** Whether onSelectionChange should fire even if the new set of keys is the same as the last. */\n allowDuplicateSelectionEvents?: boolean,\n /** Whether `disabledKeys` applies to all interactions, or only selection. */\n disabledBehavior?: DisabledBehavior\n}\n\n/**\n * Manages state for multiple selection and focus in a collection.\n */\nexport function useMultipleSelectionState(props: MultipleSelectionStateProps): MultipleSelectionState {\n let {\n selectionMode = 'none' as SelectionMode,\n disallowEmptySelection = false,\n allowDuplicateSelectionEvents,\n selectionBehavior: selectionBehaviorProp = 'toggle',\n disabledBehavior = 'all'\n } = props;\n\n // We want synchronous updates to `isFocused` and `focusedKey` after their setters are called.\n // But we also need to trigger a react re-render. So, we have both a ref (sync) and state (async).\n let isFocusedRef = useRef(false);\n let [, setFocused] = useState(false);\n let focusedKeyRef = useRef<Key | null>(null);\n let childFocusStrategyRef = useRef<FocusStrategy | null>(null);\n let [, setFocusedKey] = useState<Key | null>(null);\n let selectedKeysProp = useMemo(() => convertSelection(props.selectedKeys), [props.selectedKeys]);\n let defaultSelectedKeys = useMemo(() => convertSelection(props.defaultSelectedKeys, new Selection()), [props.defaultSelectedKeys]);\n let [selectedKeys, setSelectedKeys] = useControlledState(\n selectedKeysProp,\n defaultSelectedKeys!,\n props.onSelectionChange\n );\n let disabledKeysProp = useMemo(() =>\n props.disabledKeys ? new Set(props.disabledKeys) : new Set<Key>()\n , [props.disabledKeys]);\n let [selectionBehavior, setSelectionBehavior] = useState(selectLine truncated
@@ -0,0 +1 @@
{"version":3,"file":"inject.js","sourceRoot":"","sources":["../../../../src/metadata/decorators/inject.ts"],"names":[],"mappings":";;AASA,wBAWC;AAlBD,sGAAmG;AACnG,yIAAsI;AAEtI,iFAA8E;AAE9E,6CAA0C;AAE1C,SAAgB,MAAM,CACpB,iBAA4D;IAE5D,MAAM,cAAc,GAEQ,IAAA,qGAAiD,EAC3E,mDAAwB,CAAC,eAAe,EACxC,iBAAiB,CAClB,CAAC;IAEF,OAAO,IAAA,uBAAU,EAAC,cAAc,EAAE,uEAAkC,CAAC,CAAC;AACxE,CAAC"}
@@ -0,0 +1,93 @@
export default function collapseDuplicateDeclarations() {
return (root) => {
root.walkRules((node) => {
let seen = new Map()
let droppable = new Set([])
let byProperty = new Map()
node.walkDecls((decl) => {
// This could happen if we have nested selectors. In that case the
// parent will loop over all its declarations but also the declarations
// of nested rules. With this we ensure that we are shallowly checking
// declarations.
if (decl.parent !== node) {
return
}
if (seen.has(decl.prop)) {
// Exact same value as what we have seen so far
if (seen.get(decl.prop).value === decl.value) {
// Keep the last one, drop the one we've seen so far
droppable.add(seen.get(decl.prop))
// Override the existing one with the new value. This is necessary
// so that if we happen to have more than one declaration with the
// same value, that we keep removing the previous one. Otherwise we
// will only remove the *first* one.
seen.set(decl.prop, decl)
return
}
// Not the same value, so we need to check if we can merge it so
// let's collect it first.
if (!byProperty.has(decl.prop)) {
byProperty.set(decl.prop, new Set())
}
byProperty.get(decl.prop).add(seen.get(decl.prop))
byProperty.get(decl.prop).add(decl)
}
seen.set(decl.prop, decl)
})
// Drop all the duplicate declarations with the exact same value we've
// already seen so far.
for (let decl of droppable) {
decl.remove()
}
// Analyze the declarations based on its unit, drop all the declarations
// with the same unit but the last one in the list.
for (let declarations of byProperty.values()) {
let byUnit = new Map()
for (let decl of declarations) {
let unit = resolveUnit(decl.value)
if (unit === null) {
// We don't have a unit, so should never try and collapse this
// value. This is because we can't know how to do it in a correct
// way (e.g.: overrides for older browsers)
continue
}
if (!byUnit.has(unit)) {
byUnit.set(unit, new Set())
}
byUnit.get(unit).add(decl)
}
for (let declarations of byUnit.values()) {
// Get all but the last one
let removableDeclarations = Array.from(declarations).slice(0, -1)
for (let decl of removableDeclarations) {
decl.remove()
}
}
}
})
}
}
let UNITLESS_NUMBER = Symbol('unitless-number')
function resolveUnit(input) {
let result = /^-?\d*.?\d+([\w%]+)?$/g.exec(input)
if (result) {
return result[1] ?? UNITLESS_NUMBER
}
return null
}
@@ -0,0 +1 @@
{"mappings":"AAAA,iBAAiB;IAAG,eAAe,CAAC,kBAAkB,CAAC;AACvD","sources":["packages/@react-aria/breadcrumbs/intl/sr-SP.json"],"sourcesContent":["{\n \"breadcrumbs\": \"Putanje navigacije\"\n}\n"],"names":[],"version":3,"file":"sr-SP.main.js.map"}
@@ -0,0 +1,13 @@
# http://editorconfig.org
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[*.md]
trim_trailing_whitespace = false
@@ -0,0 +1,3 @@
# @react-aria/overlays
This package is part of [react-spectrum](https://github.com/adobe/react-spectrum). See the repo for more details.
@@ -0,0 +1,52 @@
'use strict';
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var forEach = require('../helpers/forEach');
var isLeadingSurrogate = require('../helpers/isLeadingSurrogate');
var isTrailingSurrogate = require('../helpers/isTrailingSurrogate');
var $charCodeAt = callBound('String.prototype.charCodeAt');
var $strSplit = callBound('String.prototype.split');
var UnicodeEscape = require('./UnicodeEscape');
var UTF16DecodeString = require('./UTF16DecodeString');
var UTF16Encoding = require('./UTF16Encoding');
var hasOwn = require('hasown');
// https://262.ecma-international.org/11.0/#sec-quotejsonstring
var escapes = {
'\u0008': '\\b',
'\u0009': '\\t',
'\u000A': '\\n',
'\u000C': '\\f',
'\u000D': '\\r',
'\u0022': '\\"',
'\u005c': '\\\\'
};
module.exports = function QuoteJSONString(value) {
if (typeof value !== 'string') {
throw new $TypeError('Assertion failed: `value` must be a String');
}
var product = '"';
if (value) {
forEach($strSplit(UTF16DecodeString(value), ''), function (C) {
if (hasOwn(escapes, C)) {
product += escapes[C];
} else {
var cCharCode = $charCodeAt(C, 0);
if (cCharCode < 0x20 || isLeadingSurrogate(cCharCode) || isTrailingSurrogate(cCharCode)) {
product += UnicodeEscape(C);
} else {
product += UTF16Encoding(cCharCode);
}
}
});
}
product += '"';
return product;
};
@@ -0,0 +1 @@
{"version":3,"file":"sortable.esm.js","sources":["../src/utilities/arrayMove.ts","../src/utilities/arraySwap.ts","../src/utilities/getSortedRects.ts","../src/utilities/isValidIndex.ts","../src/utilities/itemsEqual.ts","../src/utilities/normalizeDisabled.ts","../src/strategies/horizontalListSorting.ts","../src/strategies/rectSorting.ts","../src/strategies/rectSwapping.ts","../src/strategies/verticalListSorting.ts","../src/components/SortableContext.tsx","../src/hooks/defaults.ts","../src/hooks/utilities/useDerivedTransform.ts","../src/hooks/useSortable.ts","../src/types/type-guard.ts","../src/sensors/keyboard/sortableKeyboardCoordinates.ts"],"sourcesContent":["/**\n * Move an array item to a different position. Returns a new array with the item moved to the new position.\n */\nexport function arrayMove<T>(array: T[], from: number, to: number): T[] {\n const newArray = array.slice();\n newArray.splice(\n to < 0 ? newArray.length + to : to,\n 0,\n newArray.splice(from, 1)[0]\n );\n\n return newArray;\n}\n","/**\n * Swap an array item to a different position. Returns a new array with the item swapped to the new position.\n */\nexport function arraySwap<T>(array: T[], from: number, to: number): T[] {\n const newArray = array.slice();\n\n newArray[from] = array[to];\n newArray[to] = array[from];\n\n return newArray;\n}\n","import type {\n ClientRect,\n UniqueIdentifier,\n UseDndContextReturnValue,\n} from '@dnd-kit/core';\n\nexport function getSortedRects(\n items: UniqueIdentifier[],\n rects: UseDndContextReturnValue['droppableRects']\n) {\n return items.reduce<ClientRect[]>((accumulator, id, index) => {\n const rect = rects.get(id);\n\n if (rect) {\n accumulator[index] = rect;\n }\n\n return accumulator;\n }, Array(items.length));\n}\n","export function isValidIndex(index: number | null): index is number {\n return index !== null && index >= 0;\n}\n","import type {UniqueIdentifier} from '@dnd-kit/core';\n\nexport function itemsEqual(a: UniqueIdentifier[], b: UniqueIdentifier[]) {\n if (a === b) {\n return true;\n }\n\n if (a.length !== b.length) {\n return false;\n }\n\n for (let i = 0; i < a.length; i++) {\n if (a[i] !== b[i]) {\n return false;\n }\n }\n\n return true;\n}\n","import type {Disabled} from '../types';\n\nexport function normalizeDisabled(disabled: boolean | Disabled): Disabled {\n if (typeof disabled === 'boolean') {\n return {\n draggable: disabled,\n droppable: disabled,\n };\n }\n\n return disabled;\n}\n","import type {ClientRect} from '@dnd-kit/core';\nimport type {SortingStrategy} from '../types';\n\n// To-do: We should be calculating scale transformation\nconst defaultScale = {\n scaleX: 1,\n scaleY: 1,\n};\n\nexport const horizontalListSortingStrategy: SortingStrategy = ({\n rects,\n activeNodeRect: fallbackActiveRect,\n activeIndex,\n overIndex,\n index,\n}) => {\n const activeNodeRect = rects[activeIndex] ?? fallbackActiveRect;\n\n if (!activeNodeRect) {\n return null;\n }\n\n const itemGap = getItemGap(rects, index, activeIndex);\n\n if (index === activeIndex) {\n const newIndexRect = rects[overIndex];\n\n if (!newIndexRect) {\n return null;\n }\n\n return {\n x:\n activeIndex < overIndex\n ? newIndexRect.left +\n newIndexRect.width -\n (activeNodeRect.left + activeNodeRect.width)\n : newIndexRect.left - activeNodeRect.left,\n y: 0,\n ...defaultScale,\n };\n }\n\n if (index > activeIndex && index <= overIndex) {\n return {\n x: -activeNodeRect.width - itemGap,\n y: 0,\n ...defaultScale,\n };\n }\n\n if (index < activeIndex && index >= overIndex) {\n return {\n x: activeNodeRect.width + itemGap,\n y: 0,\n ...defaultScale,\n };\n }\n\n return {\n x: 0,\n y: 0,\n ...defaultScale,\n };\n};\n\nfunction getItemGap(rects: ClientRect[], index: number, activeIndex: number) {\n const currentRect: ClientRect | undefined = rects[index];\n const previousRect: ClientRect | undefined = rects[index - 1];\n const nextRect: ClientRect | undefined = rects[index + 1];\n\n if (!currentRect || (!previousRect && !nextRect)) {\n return 0;\n }\n\n if (activeIndex < index) {\n return previousRect\n ? currentRect.left - (previousRect.left + previousRect.width)\n : nextRect.left - (currentRect.left + currentRect.width);\n }\n\n return nextRect\n ? nextRect.left - (currentRect.left + currentRect.width)\n : currentRect.left - (previousRect.left + previousRect.width);\n}\n","import {arrayMove} from '../utilities';\nimport type {SortingStrategy} from '../types';\n\nexport const rectSortingStrategy: SortingStrategy = ({\n rects,\n activeIndex,\n overIndex,\n index,\n}) => {\n const newRects = arrayMove(rects, overIndex, activeIndex);\n\n const oldRect = rects[index];\n const newRect = newRects[index];\n\n if (!newRect || !oldRect) {\n return Line truncated
@@ -0,0 +1,9 @@
support
test
examples
example
*.sock
dist
yarn.lock
coverage
bower.json
@@ -0,0 +1,44 @@
/** Used to compose unicode character classes. */
var rsAstralRange = '\\ud800-\\udfff',
rsComboMarksRange = '\\u0300-\\u036f',
reComboHalfMarksRange = '\\ufe20-\\ufe2f',
rsComboSymbolsRange = '\\u20d0-\\u20ff',
rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
rsVarRange = '\\ufe0e\\ufe0f';
/** Used to compose unicode capture groups. */
var rsAstral = '[' + rsAstralRange + ']',
rsCombo = '[' + rsComboRange + ']',
rsFitz = '\\ud83c[\\udffb-\\udfff]',
rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
rsNonAstral = '[^' + rsAstralRange + ']',
rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
rsZWJ = '\\u200d';
/** Used to compose unicode regexes. */
var reOptMod = rsModifier + '?',
rsOptVar = '[' + rsVarRange + ']?',
rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
rsSeq = rsOptVar + reOptMod + rsOptJoin,
rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';
/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');
/**
* Gets the size of a Unicode `string`.
*
* @private
* @param {string} string The string inspect.
* @returns {number} Returns the string size.
*/
function unicodeSize(string) {
var result = reUnicode.lastIndex = 0;
while (reUnicode.test(string)) {
++result;
}
return result;
}
export default unicodeSize;
@@ -0,0 +1,9 @@
"use client";
import {
button_default
} from "./chunk-XJ3PDX4B.mjs";
import "./chunk-JLZ7IZPR.mjs";
import "./chunk-3SAWKTTV.mjs";
export {
button_default as default
};
@@ -0,0 +1 @@
{"name":"@lezer/lr","version":"1.4.5","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532103731,"integrity":"sha512-gvt9sHbEYJ9eND2/ECfBm5PbMpRZRxl8cNXkbvjuuAZAMxSM7d3D/lkcco8BBIs1SvmGpWAsNIFW2sxifiq1yw==","mode":420,"size":1113},"dist/index.cjs":{"checkedAt":1794532103802,"integrity":"sha512-tuUfJw36yO8jwkubBbxSjsv/d6D+cjoGaMC8T0jg6aG9qqfASqNnoHWMSp2GD6mAlOiCXSt8RCzZUCm7K2K4ZQ==","mode":420,"size":71429},"dist/index.d.cts":{"checkedAt":1794532103802,"integrity":"sha512-s+Tpyra4N5jLUJsNiz1gmDVcfazm7CsLADv2HZ3S6QaytAJsoJpm8EOTOfmT4+AcT/NqFr38blSQywqosQY9lQ==","mode":420,"size":9642},"dist/constants.js":{"checkedAt":1794532103802,"integrity":"sha512-i8m0J1z48tSh90jL4j3aqCcphdM3MvdAjasa3q59ouYCJp7/jlkcNGrz4OZo+YQg/zF2RzitEeIaXcuirpnIUg==","mode":420,"size":240},"dist/index.js":{"checkedAt":1794532103803,"integrity":"sha512-Tyx6Vrjndw/f1SQeh8gXeLnlHllqtQnCKXyQQrtjk8W2QlmEyKxzSMkXsAqUNpDF2lj3YDjXfqBNLLwdcQvXVw==","mode":420,"size":71272},"package.json":{"checkedAt":1794532103803,"integrity":"sha512-hFFeGjikSjUY8zSdEYfy9UoKHBGEa3RG9LSS1XXUlBfLz84KT0GgZdpZm9QaH09rTXZYKnW+X+kUvxMriSlphg==","mode":420,"size":803},"README.md":{"checkedAt":1794532103803,"integrity":"sha512-yx4QuEo4dMtlv0RU7sRJeX5YDH8rJJVRG4DMyamGBGFpCzgbv076HxzOd23UUZtQFyq4gd20xY54qT6G93qyJQ==","mode":420,"size":1161},"dist/constants.d.ts":{"checkedAt":1794532103803,"integrity":"sha512-6FPggXzNcZmC1gtTWQ6fxZ4kJNS104uX2fDpmfp3IxAdumI/yHksGqM7BoF6NQaKkWSV5MZbTZl+2gfaO9fB+g==","mode":420,"size":831},"dist/index.d.ts":{"checkedAt":1794532103802,"integrity":"sha512-s+Tpyra4N5jLUJsNiz1gmDVcfazm7CsLADv2HZ3S6QaytAJsoJpm8EOTOfmT4+AcT/NqFr38blSQywqosQY9lQ==","mode":420,"size":9642}}}
@@ -0,0 +1 @@
!function(e,a){"object"==typeof exports&&"undefined"!=typeof module?module.exports=a(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],a):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_en_sg=a(e.dayjs)}(this,(function(e){"use strict";function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var t=a(e),_={name:"en-sg",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),weekStart:1,weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),ordinal:function(e){return e},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"}};return t.default.locale(_,null,!0),_}));
@@ -0,0 +1,35 @@
import { __read, __spreadArray } from "tslib";
import { debounce } from '../utils/lodash-polyfill';
import { useMemo } from 'react';
import useLatest from '../useLatest';
import useUnmount from '../useUnmount';
import { isFunction } from '../utils';
import isDev from '../utils/isDev';
function useDebounceFn(fn, options) {
var _a;
if (isDev) {
if (!isFunction(fn)) {
console.error("useDebounceFn expected parameter is a function, got ".concat(typeof fn));
}
}
var fnRef = useLatest(fn);
var wait = (_a = options === null || options === void 0 ? void 0 : options.wait) !== null && _a !== void 0 ? _a : 1000;
var debounced = useMemo(function () {
return debounce(function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
return fnRef.current.apply(fnRef, __spreadArray([], __read(args), false));
}, wait, options);
}, []);
useUnmount(function () {
debounced.cancel();
});
return {
run: debounced,
cancel: debounced.cancel,
flush: debounced.flush,
};
}
export default useDebounceFn;
@@ -0,0 +1 @@
{"version":3,"file":"flags.d.ts","sourceRoot":"","sources":["flags.js"],"names":[],"mappings":"AACA,2BADW,MAAM,CAAC,MAAM,GAAG,SAAS,EAAE,OAAO,mBAAmB,EAAE,WAAW,CAAC,CAY5E"}
@@ -0,0 +1,77 @@
import { htmlTrie } from "./generated/encode-html.js";
import { xmlReplacer, getCodePoint } from "./escape.js";
const htmlReplacer = /[\t\n\f!-,./:-@[-`{-}\u0080-\uFFFF]/g;
/**
* Encodes all characters in the input using HTML entities. This includes
* characters that are valid ASCII characters in HTML documents, such as `#`.
*
* To get a more compact output, consider using the `encodeNonAsciiHTML`
* function, which will only encode characters that are not valid in HTML
* documents, as well as non-ASCII characters.
*
* If a character has no equivalent entity, a numeric hexadecimal reference
* (eg. `&#xfc;`) will be used.
*/
export function encodeHTML(input: string): string {
return encodeHTMLTrieRe(htmlReplacer, input);
}
/**
* Encodes all non-ASCII characters, as well as characters not valid in HTML
* documents using HTML entities. This function will not encode characters that
* are valid in HTML documents, such as `#`.
*
* If a character has no equivalent entity, a numeric hexadecimal reference
* (eg. `&#xfc;`) will be used.
*/
export function encodeNonAsciiHTML(input: string): string {
return encodeHTMLTrieRe(xmlReplacer, input);
}
function encodeHTMLTrieRe(regExp: RegExp, input: string): string {
let returnValue = "";
let lastIndex = 0;
let match;
while ((match = regExp.exec(input)) !== null) {
const { index } = match;
returnValue += input.substring(lastIndex, index);
const char = input.charCodeAt(index);
let next = htmlTrie.get(char);
if (typeof next === "object") {
// We are in a branch. Try to match the next char.
if (index + 1 < input.length) {
const nextChar = input.charCodeAt(index + 1);
const value =
typeof next.n === "number"
? next.n === nextChar
? next.o
: undefined
: next.n.get(nextChar);
if (value !== undefined) {
returnValue += value;
lastIndex = regExp.lastIndex += 1;
continue;
}
}
next = next.v;
}
// We might have a tree node without a value; skip and use a numeric entity.
if (next === undefined) {
const cp = getCodePoint(input, index);
returnValue += `&#x${cp.toString(16)};`;
// Increase by 1 if we have a surrogate pair
lastIndex = regExp.lastIndex += Number(cp !== char);
} else {
returnValue += next;
lastIndex = index + 1;
}
}
return returnValue + input.substr(lastIndex);
}
@@ -0,0 +1,34 @@
"use strict";
var SafeContents_1;
Object.defineProperty(exports, "__esModule", { value: true });
exports.SafeContents = exports.SafeBag = void 0;
const tslib_1 = require("tslib");
const asn1_schema_1 = require("@peculiar/asn1-schema");
const attribute_1 = require("./attribute");
class SafeBag {
constructor(params = {}) {
this.bagId = "";
this.bagValue = new ArrayBuffer(0);
Object.assign(this, params);
}
}
exports.SafeBag = SafeBag;
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: asn1_schema_1.AsnPropTypes.ObjectIdentifier })
], SafeBag.prototype, "bagId", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: asn1_schema_1.AsnPropTypes.Any, context: 0 })
], SafeBag.prototype, "bagValue", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: attribute_1.PKCS12Attribute, repeated: "set", optional: true })
], SafeBag.prototype, "bagAttributes", void 0);
let SafeContents = SafeContents_1 = class SafeContents extends asn1_schema_1.AsnArray {
constructor(items) {
super(items);
Object.setPrototypeOf(this, SafeContents_1.prototype);
}
};
exports.SafeContents = SafeContents;
exports.SafeContents = SafeContents = SafeContents_1 = tslib_1.__decorate([
(0, asn1_schema_1.AsnType)({ type: asn1_schema_1.AsnTypeTypes.Sequence, itemType: SafeBag })
], SafeContents);
@@ -0,0 +1,13 @@
@echo off
REM -- Echo the git commit hash. If git isn't available for some reason,
REM -- output nothing instead.
git rev-parse HEAD >NUL 2>NUL && (
git rev-parse HEAD
) || (
echo none
)
REM -- Set ERRORLEVEL to 0 using this cryptic syntax.
(call )
@@ -0,0 +1,20 @@
/**
* Get the type of a JSON value.
* Distinguishes between array, null and object.
*/
export function typeofJsonValue(value) {
let t = typeof value;
if (t == "object") {
if (Array.isArray(value))
return "array";
if (value === null)
return "null";
}
return t;
}
/**
* Is this a JSON object (instead of an array or null)?
*/
export function isJsonObject(value) {
return value !== null && typeof value == "object" && !Array.isArray(value);
}
@@ -0,0 +1,12 @@
'use strict';
var ES5ToInteger = require('../5/ToInteger');
var ToNumber = require('./ToNumber');
// https://262.ecma-international.org/6.0/#sec-tointeger
module.exports = function ToInteger(value) {
var number = ToNumber(value);
return ES5ToInteger(number);
};
@@ -0,0 +1,62 @@
'use strict';
var callBound = require('call-bound');
var $TypeError = require('es-errors/type');
var isInteger = require('math-intrinsics/isInteger');
var isObject = require('es-object-atoms/isObject');
var DeletePropertyOrThrow = require('./DeletePropertyOrThrow');
var Get = require('./Get');
var HasProperty = require('./HasProperty');
var Set = require('./Set');
var ToString = require('./ToString');
var isAbstractClosure = require('../helpers/isAbstractClosure');
var $sort = callBound('Array.prototype.sort');
// https://262.ecma-international.org/13.0/#sec-sortindexedproperties
module.exports = function SortIndexedProperties(obj, len, SortCompare) {
if (!isObject(obj)) {
throw new $TypeError('Assertion failed: Type(obj) is not Object');
}
if (!isInteger(len) || len < 0) {
throw new $TypeError('Assertion failed: `len` must be an integer >= 0');
}
if (!isAbstractClosure(SortCompare) || SortCompare.length !== 2) {
throw new $TypeError('Assertion failed: `SortCompare` must be an abstract closure taking 2 arguments');
}
var items = []; // step 1
var k = 0; // step 2
while (k < len) { // step 3
var Pk = ToString(k);
var kPresent = HasProperty(obj, Pk);
if (kPresent) {
var kValue = Get(obj, Pk);
items[items.length] = kValue;
}
k += 1;
}
var itemCount = items.length; // step 4
$sort(items, SortCompare); // step 5
var j = 0; // step 6
while (j < itemCount) { // step 7
Set(obj, ToString(j), items[j], true);
j += 1;
}
while (j < len) { // step 8
DeletePropertyOrThrow(obj, ToString(j));
j += 1;
}
return obj; // step 9
};
@@ -0,0 +1 @@
{"version":3,"sources":["../src/core/types.ts","../src/core/utils.ts","../src/core/store.ts","../src/core/toast.ts","../src/core/use-toaster.ts","../src/components/toast-bar.tsx","../src/components/toast-icon.tsx","../src/components/error.tsx","../src/components/loader.tsx","../src/components/checkmark.tsx","../src/components/toaster.tsx","../src/index.ts"],"sourcesContent":["import { CSSProperties } from 'react';\n\nexport type ToastType = 'success' | 'error' | 'loading' | 'blank' | 'custom';\nexport type ToastPosition =\n | 'top-left'\n | 'top-center'\n | 'top-right'\n | 'bottom-left'\n | 'bottom-center'\n | 'bottom-right';\n\nexport type Renderable = React.ReactElement | string | null;\n\nexport interface IconTheme {\n primary: string;\n secondary: string;\n}\n\nexport type ValueFunction<TValue, TArg> = (arg: TArg) => TValue;\nexport type ValueOrFunction<TValue, TArg> =\n | TValue\n | ValueFunction<TValue, TArg>;\n\nconst isFunction = <TValue, TArg>(\n valOrFunction: ValueOrFunction<TValue, TArg>\n): valOrFunction is ValueFunction<TValue, TArg> =>\n typeof valOrFunction === 'function';\n\nexport const resolveValue = <TValue, TArg>(\n valOrFunction: ValueOrFunction<TValue, TArg>,\n arg: TArg\n): TValue => (isFunction(valOrFunction) ? valOrFunction(arg) : valOrFunction);\n\nexport interface Toast {\n type: ToastType;\n id: string;\n toasterId?: string;\n message: ValueOrFunction<Renderable, Toast>;\n icon?: Renderable;\n duration?: number;\n pauseDuration: number;\n position?: ToastPosition;\n removeDelay?: number;\n\n ariaProps: {\n role: 'status' | 'alert';\n 'aria-live': 'assertive' | 'off' | 'polite';\n };\n\n style?: CSSProperties;\n className?: string;\n iconTheme?: IconTheme;\n\n createdAt: number;\n visible: boolean;\n dismissed: boolean;\n height?: number;\n}\n\nexport type ToastOptions = Partial<\n Pick<\n Toast,\n | 'id'\n | 'icon'\n | 'duration'\n | 'ariaProps'\n | 'className'\n | 'style'\n | 'position'\n | 'iconTheme'\n | 'toasterId'\n | 'removeDelay'\n >\n>;\n\nexport type DefaultToastOptions = ToastOptions & {\n [key in ToastType]?: ToastOptions;\n};\n\nexport interface ToasterProps {\n position?: ToastPosition;\n toastOptions?: DefaultToastOptions;\n reverseOrder?: boolean;\n gutter?: number;\n containerStyle?: React.CSSProperties;\n containerClassName?: string;\n toasterId?: string;\n children?: (toast: Toast) => React.ReactElement;\n}\n\nexport interface ToastWrapperProps {\n id: string;\n className?: string;\n style?: React.CSSProperties;\n onHeightUpdate: (id: string, height: number) => void;\n children?: React.ReactNode;\n}\n","export const genId = (() => {\n let count = 0;\n return () => {\n return (++count).toString();\n };\n})();\n\nexport const prefersReducedMotion = (() => {\n // Cache result\n let shouldReduceMotion: boolean | undefined = undefined;\n\n return () => {\n if (shouldReduceMotion === undefined && typeof window !== 'undefined') {\n const mediaQuery = matchMedia('(prefers-reduced-motion: reduce)');\n shouldReduceMotion = !mediaQuery || mediaQuery.matches;\n }\n return shouldReduceMotion;\n };\n})();\n","import { useEffect, useState, useRef } from 'react';\nimport { DefaultToastOptions, Toast, ToastType } from './types';\n\nexport const TOAST_EXPIRE_DISMISS_DELAY = 1000;\nexport const TOAST_LIMIT = 20;\nexport const DEFAULT_TOASTER_ID = 'default';\n\ninterface ToasterSettings {\n toastLimit: number;\n}\n\nexport enum ActionType {\n ADD_TOAST,\n UPDATE_TOAST,\n UPSERT_TOAST,\n DISMISS_TOAST,\n REMOVE_TOAST,\n START_PAUSE,\n END_PAUSE,\n}\n\nexport type Action =\n | {\n type: ActionType.ADD_TOAST;\n toast: Toast;\n }\n | {\n type: ActionType.UPSERT_TOAST;\n toast: Toast;\n }\n | {\n type: ActionType.UPDATE_TOAST;\n toast: Partial<Toast>;\n }\n | {\n type: ActionType.DISMISS_TOAST;\n toastId?: string;\n }\n | {\n type: ActionType.REMOVE_TOAST;\n toastId?: string;\n }\n | {\n type: ActionType.START_PAUSE;\n time: number;\n }\n | {\n type: ActionType.END_PAUSE;\n time: number;\n };\n\ninterface ToasterState {\n toasts: Toast[];\n settings: ToasterSettings;\n pausedAt: number | undefined;\n}\n\ninterface State {\n [toasterId: string]: ToasterState;\n}\n\nexport const reducer = (state: ToasterState, action: Action): ToasterState => {\n const { toastLimit } = state.settings;\n\n switch (action.type) {\n case ActionType.ADD_TOAST:\n return {\n ...state,\n toasts: [action.toast, ...state.toasts].slice(0, toastLimit),\n };\n\n case ActionType.UPDATE_TOAST:\n return {\n ...state,\n toasts: state.toasts.map((t) =>\n t.id === action.toast.id ? { ...t, ...action.toast } : t\n ),\n };\n\n case ActionType.UPSERT_TOAST:\n const { toast } = action;\n return reducer(state, {\n Line truncated
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F A B wC"},B:{"2":"C L M G N O","260":"0 1 2 3 4 5 Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I","3138":"P"},C:{"1":"0 1 2 3 4 5 zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC yC zC","2":"xC TC","132":"6 7 8 9 J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB 0C 1C","644":"sB tB uB vB wB xB yB"},D:{"2":"6 7 8 9 J ZB K D E F A B C L M G N O P aB","260":"0 1 2 3 4 5 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC","292":"AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB"},E:{"2":"J ZB K 2C ZC 3C 4C","260":"M G 7C 8C 9C bC cC PC AD QC dC eC fC gC hC BD RC iC jC kC lC mC CD SC nC oC pC qC rC sC tC DD ED","292":"D E F A B C L 5C 6C aC NC OC"},F:{"2":"F B C FD GD HD ID NC uC JD OC","260":"0 1 2 3 4 5 nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z","292":"6 7 8 9 G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB"},G:{"2":"ZC KD vC LD MD","260":"XD YD ZD aD bD cD dD bC cC PC eD QC dC eC fC gC hC fD RC iC jC kC lC mC gD SC nC oC pC qC rC sC tC","292":"E ND OD PD QD RD SD TD UD VD WD"},H:{"2":"hD"},I:{"2":"TC J iD jD kD lD vC","260":"I","292":"mD nD"},J:{"2":"D A"},K:{"2":"A B C NC uC OC","260":"H"},L:{"260":"I"},M:{"1":"MC"},N:{"2":"A B"},O:{"260":"PC"},P:{"260":"6 7 8 9 AB BB CB DB EB FB pD qD rD sD aC tD uD vD wD xD QC RC SC yD","292":"J oD"},Q:{"260":"zD"},R:{"260":"0D"},S:{"1":"2D","644":"1D"}},B:4,C:"CSS clip-path property (for HTML)",D:true};
@@ -0,0 +1 @@
{"name":"typedarray","version":"0.0.6","requiresBuild":false,"files":{"package.json":{"checkedAt":1794532103432,"integrity":"sha512-ViH7RfLe9uYKy53OOXF0Gf8gnKN5vvXtZ3QpGQdpNmztxUChuepRAYvjD7YDz12K6q+r53+jfaqUR82C0R0u4w==","mode":420,"size":1162},"LICENSE":{"checkedAt":1794532103432,"integrity":"sha512-MoSEaMTDlNpx9eK1MpGtOTeNfcm948johFpDRvtKDXH6hR2UoCWKDJuQJ8/m4qyOPFQKveMsxK6rXlsHuLQj7Q==","mode":420,"size":1565},"index.js":{"checkedAt":1794532103433,"integrity":"sha512-RSbCep2qIAg7wbg9GAeVONDOE+8b7jMzNr9hGosKlpHAeh2gnj6JqOauWOEMQQlquYATJKw+g35J9a8wPlWmcA==","mode":420,"size":21325},".travis.yml":{"checkedAt":1794532103433,"integrity":"sha512-G+4vN/bNPR0azSHZo1UnPVGWGpOvlA4p7IB/UtRUf1BGXLZpPHiBX4nQH25am3P3SN1wLxGWAjpWpnVOP/lmag==","mode":420,"size":48},"example/tarray.js":{"checkedAt":1794532103433,"integrity":"sha512-K+AJk3vc3jCkQC0zLuaT9l4XyDsSOJZC9jrm58qqjBkXqEx+lf/rplNbF6bgT2pZPwKWcXJBbxbgRCTlg9NXow==","mode":420,"size":110},"readme.markdown":{"checkedAt":1794532103433,"integrity":"sha512-daGlIDKdGNqMESudYv0kJZGoeXwOjk7kcSTZXBwvPKOXrtNjsuaq3bk9hJ5eESXtD/2uhz/mEe2ayq42VJWzjw==","mode":420,"size":1060},"test/tarray.js":{"checkedAt":1794532103433,"integrity":"sha512-hN/4LXUaagHKNFt8kcpIMiyzfdtbOYREFJFwZAlEsikFjh4x0fvnqM/sjtsIHPrx/fp5y9Um7AtGG5yNTf5qqg==","mode":420,"size":217},"test/server/undef_globals.js":{"checkedAt":1794532103434,"integrity":"sha512-3MG4ABTSm1MpwUo5vGJsbIdkQHJDRwDxyGqos876NhIaLK2kvwETGci+WmAAKxm3VhCm0NCJBIFZL9Av2saecQ==","mode":420,"size":468}}}
@@ -0,0 +1,23 @@
/**
* Gets the first element of `array`.
*
* @static
* @memberOf _
* @since 0.1.0
* @alias first
* @category Array
* @param {Array} array The array to query.
* @returns {*} Returns the first element of `array`.
* @example
*
* _.head([1, 2, 3]);
* // => 1
*
* _.head([]);
* // => undefined
*/
function head(array) {
return (array && array.length) ? array[0] : undefined;
}
module.exports = head;
@@ -0,0 +1,11 @@
"use strict";
exports.__esModule = true;
exports["default"] = sortAscending;
function sortAscending(list) {
return list.sort(function (a, b) {
return a - b;
});
}
;
module.exports = exports.default;
@@ -0,0 +1,168 @@
# jsx-a11y/alt-text
💼 This rule is enabled in the following configs: ☑️ `recommended`, 🔒 `strict`.
<!-- end auto-generated rule header -->
Enforce that all elements that require alternative text have meaningful information to relay back to the end user. This is a critical component of accessibility for screen reader users in order for them to understand the content's purpose on the page. By default, this rule checks for alternative text on the following elements: `<img>`, `<area>`, `<input type="image">`, and `<object>`.
## How to resolve
### `<img>`
An `<img>` must have the `alt` prop set with meaningful text or as an empty string to indicate that it is an image for decoration.
For images that are being used as icons for a button or control, the `alt` prop should be set to an empty string (`alt=""`).
```jsx
<button>
<img src="icon.png" alt="" />
Save
</button>
```
The content of an `alt` attribute is used to calculate the accessible label of an element, whereas the text content is used to produce a label for the element. For this reason, adding a label to an icon can produce a confusing or duplicated label on a control that already has appropriate text content.
### `<object>`
Add alternative text to all embedded `<object>` elements using either inner text, setting the `title` prop, or using the `aria-label` or `aria-labelledby` props.
### `<input type="image">`
All `<input type="image">` elements must have a non-empty `alt` prop set with a meaningful description of the image or have the `aria-label` or `aria-labelledby` props set.
### `<area>`
All clickable `<area>` elements within an image map have an `alt`, `aria-label` or `aria-labelledby` prop that describes the purpose of the link.
## Rule options
This rule takes one optional object argument of type object:
```json
{
"rules": {
"jsx-a11y/alt-text": [ 2, {
"elements": [ "img", "object", "area", "input[type=\"image\"]" ],
"img": ["Image"],
"object": ["Object"],
"area": ["Area"],
"input[type=\"image\"]": ["InputImage"]
}],
}
}
```
The `elements` option is a whitelist for DOM elements to check for alternative text. If an element is removed from the default set of elements (noted above), any custom components for that component will also be ignored. In order to indicate any custom wrapper components that should be checked, you can map the DOM element to an array of JSX custom components. This is a good use case when you have a wrapper component that simply renders an `img` element, for instance (like in React):
```jsx
// Image.js
const Image = props => {
const {
alt,
...otherProps
} = props;
return (
<img alt={alt} {...otherProps} />
);
}
...
// Header.js (for example)
...
return (
<header>
<Image alt="Logo" src="logo.jpg" />
</header>
);
```
Note that passing props as spread attribute without explicitly the necessary accessibility props defined will cause this rule to fail. Explicitly pass down the set of props needed for rule to pass. Use `Image` component above as a reference for destructuring and applying the prop. **It is a good thing to explicitly pass props that you expect to be passed for self-documentation.** For example:
#### Bad
```jsx
function Foo(props) {
return <img {...props} />
}
```
#### Good
```jsx
function Foo({ alt, ...props}) {
return <img alt={alt} {...props} />
}
// OR
function Foo(props) {
const {
alt,
...otherProps
} = props;
return <img alt={alt} {...otherProps} />
}
```
### Succeed
```jsx
<img src="foo" alt="Foo eating a sandwich." />
<img src="foo" alt={"Foo eating a sandwich."} />
<img src="foo" alt={altText} />
<img src="foo" alt={`${person} smiling`} />
<img src="foo" alt="" />
<object aria-label="foo" />
<object aria-labelledby="id1" />
<object>Meaningful description</object>
<object title="An object" />
<area aria-label="foo" />
<area aria-labelledby="id1" />
<area alt="This is descriptive!" />
<input type="image" alt="This is descriptive!" />
<input type="image" aria-label="foo" />
<input type="image" aria-labelledby="id1" />
```
### Fail
```jsx
<img src="foo" />
<img {...props} />
<img {...props} alt /> // Has no value
<img {...props} alt={undefined} /> // Has no value
<img {...props} alt={`${undefined}`} /> // Has no value
<img src="foo" role="presentation" /> // Avoid ARIA if it can be achieved without
<img src="foo" role="none" /> // Avoid ARIA if it can be achieved without
<object {...props} />
<area {...props} />
<input type="image" {...props} />
```
## Accessibility guidelines
- [WCAG 1.1.1](https://www.w3.org/WAI/WCAG21/Understanding/non-text-content.html)
### Resources
- [axe-core, object-alt](https://dequeuniversity.com/rules/axe/3.2/object-alt)
- [axe-core, image-alt](https://dequeuniversity.com/rules/axe/3.2/image-alt)
- [axe-core, input-image-alt](https://dequeuniversity.com/rules/axe/3.2/input-image-alt)
- [axe-core, area-alt](https://dequeuniversity.com/rules/axe/3.2/area-alt)
@@ -0,0 +1,103 @@
/**
* @fileoverview require default case in switch statements
* @author Aliaksei Shytkin
*/
"use strict";
const DEFAULT_COMMENT_PATTERN = /^no default$/iu;
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
type: "suggestion",
defaultOptions: [{}],
docs: {
description: "Require `default` cases in `switch` statements",
recommended: false,
url: "https://eslint.org/docs/latest/rules/default-case",
},
schema: [
{
type: "object",
properties: {
commentPattern: {
type: "string",
},
},
additionalProperties: false,
},
],
messages: {
missingDefaultCase: "Expected a default case.",
},
},
create(context) {
const [options] = context.options;
const commentPattern = options.commentPattern
? new RegExp(options.commentPattern, "u")
: DEFAULT_COMMENT_PATTERN;
const sourceCode = context.sourceCode;
//--------------------------------------------------------------------------
// Helpers
//--------------------------------------------------------------------------
/**
* Shortcut to get last element of array
* @param {*[]} collection Array
* @returns {any} Last element
*/
function last(collection) {
return collection.at(-1);
}
//--------------------------------------------------------------------------
// Public
//--------------------------------------------------------------------------
return {
SwitchStatement(node) {
if (!node.cases.length) {
/*
* skip check of empty switch because there is no easy way
* to extract comments inside it now
*/
return;
}
const hasDefault = node.cases.some(v => v.test === null);
if (!hasDefault) {
let comment;
const lastCase = last(node.cases);
const comments = sourceCode.getCommentsAfter(lastCase);
if (comments.length) {
comment = last(comments);
}
if (
!comment ||
!commentPattern.test(comment.value.trim())
) {
context.report({
node,
messageId: "missingDefaultCase",
});
}
}
},
};
},
};
@@ -0,0 +1,8 @@
import {
divider_default
} from "./chunk-IHO36JMK.mjs";
import "./chunk-TS7K35D7.mjs";
import "./chunk-D2EG5U3Q.mjs";
export {
divider_default as default
};
@@ -0,0 +1,17 @@
var $79e6d900d6a4f82d$exports = {};
$79e6d900d6a4f82d$exports = {
"deselectedItem": (args)=>`Nevybrat\xe9 polo\u{17E}ky: ${args.item}.`,
"longPressToSelect": `Dlh\u{161}\xedm stla\u{10D}en\xedm prejdite do re\u{17E}imu v\xfdberu.`,
"select": `Vybra\u{165}`,
"selectedAll": `V\u{161}etky vybrat\xe9 polo\u{17E}ky.`,
"selectedCount": (args, formatter)=>`${formatter.plural(args.count, {
"=0": `\u{17D}iadne vybrat\xe9 polo\u{17E}ky`,
one: ()=>`${formatter.number(args.count)} vybrat\xe1 polo\u{17E}ka`,
other: ()=>`Po\u{10D}et vybrat\xfdch polo\u{17E}iek:${formatter.number(args.count)}`
})}.`,
"selectedItem": (args)=>`Vybrat\xe9 polo\u{17E}ky: ${args.item}.`
};
export {$79e6d900d6a4f82d$exports as default};
//# sourceMappingURL=sk-SK.module.js.map
@@ -0,0 +1,47 @@
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/ class $d7fd61009c21d0bb$export$7e0eeb9da702a085 {
/**
* Returns a copy of the LayoutInfo.
*/ copy() {
let res = new $d7fd61009c21d0bb$export$7e0eeb9da702a085(this.type, this.key, this.rect.copy());
res.estimatedSize = this.estimatedSize;
res.opacity = this.opacity;
res.transform = this.transform;
res.parentKey = this.parentKey;
res.content = this.content;
res.isSticky = this.isSticky;
res.zIndex = this.zIndex;
res.allowOverflow = this.allowOverflow;
return res;
}
/**
* @param type The type of element represented by this LayoutInfo. Should match the `type` of the corresponding collection node.
* @param key A unique key for this LayoutInfo. Should match the `key` of the corresponding collection node.
* @param rect The rectangle describing the size and position of this element.
*/ constructor(type, key, rect){
this.type = type;
this.key = key;
this.parentKey = null;
this.content = null;
this.rect = rect;
this.estimatedSize = false;
this.isSticky = false;
this.opacity = 1;
this.transform = null;
this.zIndex = 0;
this.allowOverflow = false;
}
}
export {$d7fd61009c21d0bb$export$7e0eeb9da702a085 as LayoutInfo};
//# sourceMappingURL=LayoutInfo.module.js.map
@@ -0,0 +1,602 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.collectVariables = collectVariables;
const scope_manager_1 = require("@typescript-eslint/scope-manager");
const utils_1 = require("@typescript-eslint/utils");
const isTypeImport_1 = require("./isTypeImport");
const referenceContainsTypeQuery_1 = require("./referenceContainsTypeQuery");
/**
* This class leverages an AST visitor to mark variables as used via the
* `eslintUsed` property.
*/
class UnusedVarsVisitor extends scope_manager_1.Visitor {
/**
* We keep a weak cache so that multiple rules can share the calculation
*/
static RESULTS_CACHE = new WeakMap();
ClassDeclaration = this.visitClass;
ClassExpression = this.visitClass;
ForInStatement = this.visitForInForOf;
ForOfStatement = this.visitForInForOf;
//#region HELPERS
FunctionDeclaration = this.visitFunction;
FunctionExpression = this.visitFunction;
MethodDefinition = this.visitSetter;
Property = this.visitSetter;
TSCallSignatureDeclaration = this.visitFunctionTypeSignature;
TSConstructorType = this.visitFunctionTypeSignature;
TSConstructSignatureDeclaration = this.visitFunctionTypeSignature;
TSDeclareFunction = this.visitFunctionTypeSignature;
TSEmptyBodyFunctionExpression = this.visitFunctionTypeSignature;
//#endregion HELPERS
//#region VISITORS
// NOTE - This is a simple visitor - meaning it does not support selectors
TSFunctionType = this.visitFunctionTypeSignature;
TSMethodSignature = this.visitFunctionTypeSignature;
#scopeManager;
constructor(scopeManager) {
super({
visitChildrenEvenIfSelectorExists: true,
});
this.#scopeManager = scopeManager;
}
static collectUnusedVariables(program, scopeManager) {
const cached = this.RESULTS_CACHE.get(program);
if (cached) {
return cached;
}
const visitor = new this(scopeManager);
visitor.visit(program);
const unusedVars = visitor.collectUnusedVariables(visitor.getScope(program));
this.RESULTS_CACHE.set(program, unusedVars);
return unusedVars;
}
Identifier(node) {
const scope = this.getScope(node);
if (scope.type === utils_1.TSESLint.Scope.ScopeType.function &&
node.name === 'this' &&
// this parameters should always be considered used as they're pseudo-parameters
'params' in scope.block &&
scope.block.params.includes(node)) {
this.markVariableAsUsed(node);
}
}
TSEnumDeclaration(node) {
// enum members create variables because they can be referenced within the enum,
// but they obviously aren't unused variables for the purposes of this rule.
const scope = this.getScope(node);
for (const variable of scope.variables) {
this.markVariableAsUsed(variable);
}
}
TSMappedType(node) {
// mapped types create a variable for their type name, but it's not necessary to reference it,
// so we shouldn't consider it as unused for the purpose of this rule.
this.markVariableAsUsed(node.key);
}
TSModuleDeclaration(node) {
// -- global augmentation can be in any file, and they do not need exports
if (node.kind === 'global') {
this.markVariableAsUsed('global', node.parent);
}
}
TSParameterProperty(node) {
let identifier = null;
switch (node.parameter.type) {
case utils_1.AST_NODE_TYPES.AssignmentPattern:
if (node.parameter.left.type === utils_1.AST_NODE_TYPES.Identifier) {
identifier = node.parameter.left;
}
break;
case utils_1.AST_NODE_TYPES.Identifier:
identifier = node.parameter;
break;
}
if (identifier) {
this.markVariableAsUsed(identifier);
}
}
collectUnusedVariables(scope, variables = {
unusedVariables: new Set(),
usedVariables: new Set(),
}) {
if (
// skip function expression names
// this scope is created just to house the variable that allows a function
// expression to self-reference if it has a name defined
!scope.functionExpressionScope) {
for (const variable of scope.variables) {
// cases that we don't want to treat as used or unused
if (
// implicit lib variables (from @typescript-eslint/scope-manager)
// these aren't variables that should be checked ever
variable instanceof scope_manager_1.ImplicitLibVariable) {
continue;
}
if (
// variables marked with markVariableAsUsed()
variable.eslintUsed ||
// basic exported variables
isExported(variable) ||
// variables implicitly exported via a merged declaration
isMergeableExported(variable) ||
// used variables
isUsedVariable(variable)) {
variables.usedVariables.add(variable);
}
else {
variables.unusedVariables.add(variable);
}
}
}
for (const childScope of scope.childScopes) {
this.collectUnusedVariables(childScope, variables);
}
return variables;
}
getScope(currentNode) {
// On Program node, get the outermost scope to avoid return Node.js special function scope or ES modules scope.
const inner = currentNode.type !== utils_1.AST_NODE_TYPES.Program;
let node = currentNode;
while (node) {
const scope = this.#scopeManager.acquire(node, inner);
if (scope) {
if (scope.type === scope_manager_1.ScopeType.functionExpressionName) {
return scope.childScopes[0];
}
return scope;
}
node = node.parent;
}
return this.#scopeManager.scopes[0];
}
markVariableAsUsed(variableOrIdentifierOrName, parent) {
if (typeof variableOrIdentifierOrName !== 'string' &&
!('type' in variableOrIdentifierOrName)) {
variableOrIdentifierOrName.eslintUsed = true;
return;
}
let name;
let node;
if (typeof variableOrIdentifierOrName === 'string') {
name = variableOrIdentifierOrName;
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
node = parent;
}
else {
name = variableOrIdentifierOrName.name;
node = variableOrIdentifierOrName;
}
let currentScope = this.getScope(node);
while (currentScope) {
const variable = currentScope.variables.find(scopeVar => scopeVar.name === name);
if (variable) {
variable.eslintUsed = true;
return;
}
currentScope = currentScope.upper;
}
}
visitClass(node) {
// skip a variable of class itself name in the class scope
const scope = this.getScope(node);
for (const variable of scope.variables) {
if (variable.identifiers[0] === scope.block.id) {
this.markVariableAsUsed(variable);
return;
}
}
}
visitForInForOf(node) {
/**
* (Brad Zacher): I hate that this has to exist.
* But it is required for compat with the base ESLint rule.
*
* In 2015, ESLint decided to add an exception for these two specific cases
* ```
* for (var key in object) return;
*
* var key;
* for (key in object) return;
* ```
*
* I disagree with it, but what are you going to do...
*
* https://github.com/eslint/eslint/issues/2342
*/
let idOrVariable;
if (node.left.type === utils_1.AST_NODE_TYPES.VariableDeclaration) {
const variable = this.#scopeManager.getDeclaredVariables(node.left).at(0);
if (!variable) {
return;
}
idOrVariable = variable;
}
if (node.left.type === utils_1.AST_NODE_TYPES.Identifier) {
idOrVariable = node.left;
}
if (idOrVariable == null) {
return;
}
let body = node.body;
if (node.body.type === utils_1.AST_NODE_TYPES.BlockStatement) {
if (node.body.body.length !== 1) {
return;
}
body = node.body.body[0];
}
if (body.type !== utils_1.AST_NODE_TYPES.ReturnStatement) {
return;
}
this.markVariableAsUsed(idOrVariable);
}
visitFunction(node) {
const scope = this.getScope(node);
// skip implicit "arguments" variable
const variable = scope.set.get('arguments');
if (variable?.defs.length === 0) {
this.markVariableAsUsed(variable);
}
}
visitFunctionTypeSignature(node) {
// function type signature params create variables because they can be referenced within the signature,
// but they obviously aren't unused variables for the purposes of this rule.
for (const param of node.params) {
this.visitPattern(param, name => {
this.markVariableAsUsed(name);
});
}
}
visitSetter(node) {
if (node.kind === 'set') {
// ignore setter parameters because they're syntactically required to exist
for (const param of node.value.params) {
this.visitPattern(param, id => {
this.markVariableAsUsed(id);
});
}
}
}
}
//#region private helpers
/**
* Checks the position of given nodes.
* @param inner A node which is expected as inside.
* @param outer A node which is expected as outside.
* @returns `true` if the `inner` node exists in the `outer` node.
*/
function isInside(inner, outer) {
return inner.range[0] >= outer.range[0] && inner.range[1] <= outer.range[1];
}
/**
* Determine if an identifier is referencing an enclosing name.
* This only applies to declarations that create their own scope (modules, functions, classes)
* @param ref The reference to check.
* @param nodes The candidate function nodes.
* @returns True if it's a self-reference, false if not.
*/
function isSelfReference(ref, nodes) {
let scope = ref.from;
while (scope) {
if (nodes.has(scope.block)) {
return true;
}
scope = scope.upper;
}
return false;
}
const MERGEABLE_TYPES = new Set([
utils_1.AST_NODE_TYPES.ClassDeclaration,
utils_1.AST_NODE_TYPES.FunctionDeclaration,
utils_1.AST_NODE_TYPES.TSInterfaceDeclaration,
utils_1.AST_NODE_TYPES.TSModuleDeclaration,
utils_1.AST_NODE_TYPES.TSTypeAliasDeclaration,
]);
/**
* Determine if the variable is directly exported
* @param variable the variable to check
*/
function isMergeableExported(variable) {
// If all of the merged things are of the same type, TS will error if not all of them are exported - so we only need to find one
for (const def of variable.defs) {
// parameters can never be exported.
// their `node` prop points to the function decl, which can be exported
// so we need to special case them
if (def.type === utils_1.TSESLint.Scope.DefinitionType.Parameter) {
continue;
}
if ((MERGEABLE_TYPES.has(def.node.type) &&
def.node.parent.type === utils_1.AST_NODE_TYPES.ExportNamedDeclaration) ||
def.node.parent.type === utils_1.AST_NODE_TYPES.ExportDefaultDeclaration) {
return true;
}
}
return false;
}
/**
* Determines if a given variable is being exported from a module.
* @param variable eslint-scope variable object.
* @returns True if the variable is exported, false if not.
*/
function isExported(variable) {
return variable.defs.some(definition => {
let node = definition.node;
if (node.type === utils_1.AST_NODE_TYPES.VariableDeclarator) {
node = node.parent;
}
else if (definition.type === utils_1.TSESLint.Scope.DefinitionType.Parameter) {
return false;
}
return node.parent.type.startsWith('Export');
});
}
const LOGICAL_ASSIGNMENT_OPERATORS = new Set(['??=', '&&=', '||=']);
/**
* Determines if the variable is used.
* @param variable The variable to check.
* @returns True if the variable is used
*/
function isUsedVariable(variable) {
/**
* Gets a list of function definitions for a specified variable.
* @param variable eslint-scope variable object.
* @returns Function nodes.
*/
function getFunctionDefinitions(variable) {
const functionDefinitions = new Set();
variable.defs.forEach(def => {
// FunctionDeclarations
if (def.type === utils_1.TSESLint.Scope.DefinitionType.FunctionName) {
functionDefinitions.add(def.node);
}
// FunctionExpressions
if (def.type === utils_1.TSESLint.Scope.DefinitionType.Variable &&
(def.node.init?.type === utils_1.AST_NODE_TYPES.FunctionExpression ||
def.node.init?.type === utils_1.AST_NODE_TYPES.ArrowFunctionExpression)) {
functionDefinitions.add(def.node.init);
}
});
return functionDefinitions;
}
function getTypeDeclarations(variable) {
const nodes = new Set();
variable.defs.forEach(def => {
if (def.node.type === utils_1.AST_NODE_TYPES.TSInterfaceDeclaration ||
def.node.type === utils_1.AST_NODE_TYPES.TSTypeAliasDeclaration) {
nodes.add(def.node);
}
});
return nodes;
}
function getModuleDeclarations(variable) {
const nodes = new Set();
variable.defs.forEach(def => {
if (def.node.type === utils_1.AST_NODE_TYPES.TSModuleDeclaration) {
nodes.add(def.node);
}
});
return nodes;
}
function getEnumDeclarations(variable) {
const nodes = new Set();
variable.defs.forEach(def => {
if (def.node.type === utils_1.AST_NODE_TYPES.TSEnumDeclaration) {
nodes.add(def.node);
}
});
return nodes;
}
/**
* Checks if the ref is contained within one of the given nodes
*/
function isInsideOneOf(ref, nodes) {
for (const node of nodes) {
if (isInside(ref.identifier, node)) {
return true;
}
}
return false;
}
/**
* Checks whether a given node is unused expression or not.
* @param node The node itself
* @returns The node is an unused expression.
*/
function isUnusedExpression(node) {
const parent = node.parent;
if (parent.type === utils_1.AST_NODE_TYPES.ExpressionStatement) {
return true;
}
if (parent.type === utils_1.AST_NODE_TYPES.SequenceExpression) {
const isLastExpression = parent.expressions[parent.expressions.length - 1] === node;
if (!isLastExpression) {
return true;
}
return isUnusedExpression(parent);
}
return false;
}
/**
* If a given reference is left-hand side of an assignment, this gets
* the right-hand side node of the assignment.
*
* In the following cases, this returns null.
*
* - The reference is not the LHS of an assignment expression.
* - The reference is inside of a loop.
* - The reference is inside of a function scope which is different from
* the declaration.
* @param ref A reference to check.
* @param prevRhsNode The previous RHS node.
* @returns The RHS node or null.
*/
function getRhsNode(ref, prevRhsNode) {
/**
* Checks whether the given node is in a loop or not.
* @param node The node to check.
* @returns `true` if the node is in a loop.
*/
function isInLoop(node) {
let currentNode = node;
while (currentNode) {
if (utils_1.ASTUtils.isFunction(currentNode)) {
break;
}
if (utils_1.ASTUtils.isLoop(currentNode)) {
return true;
}
currentNode = currentNode.parent;
}
return false;
}
const id = ref.identifier;
const parent = id.parent;
const refScope = ref.from.variableScope;
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const varScope = ref.resolved.scope.variableScope;
const canBeUsedLater = refScope !== varScope || isInLoop(id);
/*
* Inherits the previous node if this reference is in the node.
* This is for `a = a + a`-like code.
*/
if (prevRhsNode && isInside(id, prevRhsNode)) {
return prevRhsNode;
}
if (parent.type === utils_1.AST_NODE_TYPES.AssignmentExpression &&
isUnusedExpression(parent) &&
id === parent.left &&
!canBeUsedLater) {
return parent.right;
}
return null;
}
/**
* Checks whether a given reference is a read to update itself or not.
* @param ref A reference to check.
* @param rhsNode The RHS node of the previous assignment.
* @returns The reference is a read to update itself.
*/
function isReadForItself(ref, rhsNode) {
/**
* Checks whether a given Identifier node exists inside of a function node which can be used later.
*
* "can be used later" means:
* - the function is assigned to a variable.
* - the function is bound to a property and the object can be used later.
* - the function is bound as an argument of a function call.
*
* If a reference exists in a function which can be used later, the reference is read when the function is called.
* @param id An Identifier node to check.
* @param rhsNode The RHS node of the previous assignment.
* @returns `true` if the `id` node exists inside of a function node which can be used later.
*/
function isInsideOfStorableFunction(id, rhsNode) {
/**
* Finds a function node from ancestors of a node.
* @param node A start node to find.
* @returns A found function node.
*/
function getUpperFunction(node) {
let currentNode = node;
while (currentNode) {
if (utils_1.ASTUtils.isFunction(currentNode)) {
return currentNode;
}
currentNode = currentNode.parent;
}
return null;
}
/**
* Checks whether a given function node is stored to somewhere or not.
* If the function node is stored, the function can be used later.
* @param funcNode A function node to check.
* @param rhsNode The RHS node of the previous assignment.
* @returns `true` if under the following conditions:
* - the funcNode is assigned to a variable.
* - the funcNode is bound as an argument of a function call.
* - the function is bound to a property and the object satisfies above conditions.
*/
function isStorableFunction(funcNode, rhsNode) {
let node = funcNode;
let parent = funcNode.parent;
while (parent && isInside(parent, rhsNode)) {
switch (parent.type) {
case utils_1.AST_NODE_TYPES.SequenceExpression:
if (parent.expressions[parent.expressions.length - 1] !== node) {
return false;
}
break;
case utils_1.AST_NODE_TYPES.CallExpression:
case utils_1.AST_NODE_TYPES.NewExpression:
return parent.callee !== node;
case utils_1.AST_NODE_TYPES.AssignmentExpression:
case utils_1.AST_NODE_TYPES.TaggedTemplateExpression:
case utils_1.AST_NODE_TYPES.YieldExpression:
return true;
default:
if (parent.type.endsWith('Statement') ||
parent.type.endsWith('Declaration')) {
/*
* If it encountered statements, this is a complex pattern.
* Since analyzing complex patterns is hard, this returns `true` to avoid false positive.
*/
return true;
}
}
node = parent;
parent = parent.parent;
}
return false;
}
const funcNode = getUpperFunction(id);
return (!!funcNode &&
isInside(funcNode, rhsNode) &&
isStorableFunction(funcNode, rhsNode));
}
const id = ref.identifier;
const parent = id.parent;
return (ref.isRead() && // in RHS of an assignment for itself. e.g. `a = a + 1`
// self update. e.g. `a += 1`, `a++`
((parent.type === utils_1.AST_NODE_TYPES.AssignmentExpression &&
!LOGICAL_ASSIGNMENT_OPERATORS.has(parent.operator) &&
isUnusedExpression(parent) &&
parent.left === id) ||
(parent.type === utils_1.AST_NODE_TYPES.UpdateExpression &&
isUnusedExpression(parent)) ||
(!!rhsNode &&
isInside(id, rhsNode) &&
!isInsideOfStorableFunction(id, rhsNode))));
}
const functionNodes = getFunctionDefinitions(variable);
const isFunctionDefinition = functionNodes.size > 0;
const typeDeclNodes = getTypeDeclarations(variable);
const isTypeDecl = typeDeclNodes.size > 0;
const moduleDeclNodes = getModuleDeclarations(variable);
const isModuleDecl = moduleDeclNodes.size > 0;
const enumDeclNodes = getEnumDeclarations(variable);
const isEnumDecl = enumDeclNodes.size > 0;
const isImportedAsType = variable.defs.every(isTypeImport_1.isTypeImport);
let rhsNode = null;
return variable.references.some(ref => {
const forItself = isReadForItself(ref, rhsNode);
rhsNode = getRhsNode(ref, rhsNode);
return (ref.isRead() &&
!forItself &&
!(!isImportedAsType && (0, referenceContainsTypeQuery_1.referenceContainsTypeQuery)(ref.identifier)) &&
!(isFunctionDefinition && isSelfReference(ref, functionNodes)) &&
!(isTypeDecl && isInsideOneOf(ref, typeDeclNodes)) &&
!(isModuleDecl && isSelfReference(ref, moduleDeclNodes)) &&
!(isEnumDecl && isSelfReference(ref, enumDeclNodes)));
});
}
//#endregion private helpers
/**
* Collects the set of unused variables for a given context.
*
* Due to complexity, this does not take into consideration:
* - variables within declaration files
* - variables within ambient module declarations
*/
function collectVariables(context) {
return UnusedVarsVisitor.collectUnusedVariables(context.sourceCode.ast, utils_1.ESLintUtils.nullThrows(context.sourceCode.scopeManager, 'Missing required scope manager'));
}
@@ -0,0 +1 @@
module.exports={A:{D:{"1":"0 1 2 3 4 5 tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC","2":"J ZB K D E F A B C L M G","33":"6 7 8 9 N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB"},L:{"1":"I"},B:{"1":"0 1 2 3 4 5 Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I","2":"C L M G N O P"},C:{"1":"0 1 2 3 4 5 vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC yC zC","2":"xC TC J ZB K D E F 0C 1C","33":"6 7 8 9 A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB"},M:{"1":"MC"},A:{"2":"K D E F A B wC"},F:{"1":"0 1 2 3 4 5 gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z","2":"F B C FD GD HD ID NC uC JD OC","33":"6 7 8 9 G N O P aB AB BB CB DB EB FB bB cB dB eB fB"},K:{"1":"H","2":"A B C NC uC OC"},E:{"1":"B C L M G NC OC 7C 8C 9C bC cC PC AD QC dC eC fC gC hC BD RC iC jC kC lC mC CD SC nC oC pC qC rC sC tC DD","2":"J ZB 2C ZC 3C ED","33":"K D E F A 4C 5C 6C aC"},G:{"1":"TD UD VD WD XD YD ZD aD bD cD dD bC cC PC eD QC dC eC fC gC hC fD RC iC jC kC lC mC gD SC nC oC pC qC rC sC tC","2":"ZC KD vC LD","33":"E MD ND OD PD QD RD SD"},P:{"1":"6 7 8 9 AB BB CB DB EB FB oD pD qD rD sD aC tD uD vD wD xD QC RC SC yD","2":"J"},I:{"1":"I","2":"TC J iD jD kD lD vC mD nD"}},B:6,C:"isolate from unicode-bidi",D:undefined};
@@ -0,0 +1,7 @@
import { D as DiffOptions } from './types.d-BCElaP-c.js';
export { serializeValue as serializeError } from './serialize.js';
import '@vitest/pretty-format';
declare function processError(_err: any, diffOptions?: DiffOptions, seen?: WeakSet<WeakKey>): any;
export { processError };
@@ -0,0 +1,612 @@
# eslint-plugin-import
[![github actions][actions-image]][actions-url]
[![travis-ci](https://travis-ci.org/import-js/eslint-plugin-import.svg?branch=main)](https://travis-ci.org/import-js/eslint-plugin-import)
[![coverage][codecov-image]][codecov-url]
[![win32 build status](https://ci.appveyor.com/api/projects/status/3mw2fifalmjlqf56/branch/main?svg=true)](https://ci.appveyor.com/project/import-js/eslint-plugin-import/branch/main)
[![npm](https://img.shields.io/npm/v/eslint-plugin-import.svg)](https://www.npmjs.com/package/eslint-plugin-import)
[![npm downloads](https://img.shields.io/npm/dt/eslint-plugin-import.svg?maxAge=2592000)](https://www.npmtrends.com/eslint-plugin-import)
This plugin intends to support linting of ES2015+ (ES6+) import/export syntax, and prevent issues with misspelling of file paths and import names. All the goodness that the ES2015+ static module syntax intends to provide, marked up in your editor.
**IF YOU ARE USING THIS WITH SUBLIME**: see the [bottom section](#sublimelinter-eslint) for important info.
## Rules
<!-- begin auto-generated rules list -->
💼 Configurations enabled in.\
⚠️ Configurations set to warn in.\
🚫 Configurations disabled in.\
❗ Set in the `errors` configuration.\
☑️ Set in the `recommended` configuration.\
⌨️ Set in the `typescript` configuration.\
🚸 Set in the `warnings` configuration.\
🔧 Automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/user-guide/command-line-interface#--fix).\
💡 Manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions).\
❌ Deprecated.
### Helpful warnings
| Name                       | Description | 💼 | ⚠️ | 🚫 | 🔧 | 💡 | ❌ |
| :--------------------------------------------------------------------- | :------------------------------------------------------------------------------------ | :--- | :---- | :- | :- | :- | :- |
| [export](docs/rules/export.md) | Forbid any invalid exports, i.e. re-export of the same name. | ❗ ☑️ | | | | | |
| [no-deprecated](docs/rules/no-deprecated.md) | Forbid imported names marked with `@deprecated` documentation tag. | | | | | | |
| [no-empty-named-blocks](docs/rules/no-empty-named-blocks.md) | Forbid empty named import blocks. | | | | 🔧 | 💡 | |
| [no-extraneous-dependencies](docs/rules/no-extraneous-dependencies.md) | Forbid the use of extraneous packages. | | | | | | |
| [no-mutable-exports](docs/rules/no-mutable-exports.md) | Forbid the use of mutable exports with `var` or `let`. | | | | | | |
| [no-named-as-default](docs/rules/no-named-as-default.md) | Forbid use of exported name as identifier of default export. | | ☑️ 🚸 | | | | |
| [no-named-as-default-member](docs/rules/no-named-as-default-member.md) | Forbid use of exported name as property of default export. | | ☑️ 🚸 | | | | |
| [no-unused-modules](docs/rules/no-unused-modules.md) | Forbid modules without exports, or exports without matching import in another module. | | | | | | |
### Module systems
| Name                     | Description | 💼 | ⚠️ | 🚫 | 🔧 | 💡 | ❌ |
| :----------------------------------------------------------------- | :------------------------------------------------------------------- | :- | :- | :- | :- | :- | :- |
| [no-amd](docs/rules/no-amd.md) | Forbid AMD `require` and `define` calls. | | | | | | |
| [no-commonjs](docs/rules/no-commonjs.md) | Forbid CommonJS `require` calls and `module.exports` or `exports.*`. | | | | | | |
| [no-import-module-exports](docs/rules/no-import-module-exports.md) | Forbid import statements with CommonJS module.exports. | | | | 🔧 | | |
| [no-nodejs-modules](docs/rules/no-nodejs-modules.md) | Forbid Node.js builtin modules. | | | | | | |
| [unambiguous](docs/rules/unambiguous.md) | Forbid potentially ambiguous parse goal (`script` vs. `module`). | | | | | | |
### Static analysis
| Name                        | Description | 💼 | ⚠️ | 🚫 | 🔧 | 💡 | ❌ |
| :----------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------- | :--- | :- | :- | :- | :- | :- |
| [default](docs/rules/default.md) | Ensure a default export is present, given a default import. | ❗ ☑️ | | | | | |
| [enforce-node-protocol-usage](docs/rules/enforce-node-protocol-usage.md) | Enforce either using, or omitting, the `node:` protocol when importing Node.js builtin modules. | | | | 🔧 | | |
| [named](docs/rules/named.md) | Ensure named imports correspond to a named export in the remote file. | ❗ ☑️ | | ⌨️ | | | |
| [namespace](docs/rules/namespace.md) | Ensure imported namespaces contain dereferenced properties as they are dereferenced. | ❗ ☑️ | | | | | |
| [no-absolute-path](docs/rules/no-absolute-path.md) | Forbid import of modules using absolute paths. | | | | 🔧 | | |
| [no-cycle](docs/rules/no-cycle.md) | Forbid a module from importing a module with a dependency path back to itself. | | | | | | |
| [no-dynamic-require](docs/rules/no-dynamic-require.md) | Forbid `require()` calls with expressions. | | | | | | |
| [no-internal-modules](docs/rules/no-internal-modules.md) | Forbid importing the submodules of other modules. | | | | | | |
| [no-relative-packages](docs/rules/no-relative-packages.md) | Forbid importing packages through relative paths. | | | | 🔧 | | |
| [no-relative-parent-imports](docs/rules/no-relative-parent-imports.md) | Forbid importing modules from parent directories. | | | | | | |
| [no-restricted-paths](docs/rules/no-restricted-paths.md) | Enforce which files can be imported in a given folder. | | | | | | |
| [no-self-import](docs/rules/no-self-import.md) | Forbid a module from importing itself. | | | | | | |
| [no-unresolved](docs/rules/no-unresolved.md) | Ensure imports point to a file/module that can be resolved. | ❗ ☑️ | | | | | |
| [no-useless-path-segments](docs/rules/no-useless-path-segments.md) | Forbid unnecessary path segments in import and require statements. | | | | 🔧 | | |
| [no-webpack-loader-syntax](docs/rules/no-webpack-loader-syntax.md) | Forbid webpack loader syntax in imports. | | | | | | |
### Style guide
| Name                            | Description | 💼 | ⚠️ | 🚫 | 🔧 | 💡 | ❌ |
| :------------------------------------------------------------------------------- | :------------------------------------------------------------------------- | :- | :---- | :- | :- | :- | :- |
| [consistent-type-specifier-style](docs/rules/consistent-type-specifier-style.md) | Enforce or ban the use of inline type-only markers for named imports. | | | | 🔧 | | |
| [dynamic-import-chunkname](docs/rules/dynamic-import-chunkname.md) | Enforce a leading comment with the webpackChunkName for dynamic imports. | | | | | 💡 | |
| [exports-last](docs/rules/exports-last.md) | Ensure all exports appear after other statements. | | | | | | |
| [extensions](docs/rules/extensions.md) | Ensure consistent use of file extension within the import path. | | | | | | |
| [first](docs/rules/first.md) | Ensure all imports appear before other statements. | | | | 🔧 | | |
| [group-exports](docs/rules/group-exports.md) | Prefer named exports to be grouped together in a single export declaration | | | | | | |
| [imports-first](docs/rules/imports-first.md) | Replaced by `import/first`. | | | | 🔧 | | ❌ |
| [max-dependencies](docs/rules/max-dependencies.md) | Enforce the maximum number of dependencies a module can have. | | | | | | |
| [newline-after-import](docs/rules/newline-after-import.md) | Enforce a newline after import statements. | | | | 🔧 | | |
| [no-anonymous-default-export](docs/rules/no-anonymous-default-export.md) | Forbid anonymous values as default exports. | | | | | | |
| [no-default-export](docs/rules/no-default-export.md) | Forbid default exports. | | | | | | |
| [no-duplicates](docs/rules/no-duplicates.md) | Forbid repeated import of the same module in multiple places. | | ☑️ 🚸 | | 🔧 | | |
| [no-named-default](docs/rules/no-named-default.md) | Forbid named default exports. | | | | | | |
| [no-named-export](docs/rules/no-named-export.md) | Forbid named exports. | | | | | | |
| [no-namespace](docs/rules/no-namespace.md) | Forbid namespace (a.k.a. "wildcard" `*`) imports. | | | | 🔧 | | |
| [no-unassigned-import](docs/rules/no-unassigned-import.md) | Forbid unassigned imports | | | | | | |
| [order](docs/rules/order.md) | Enforce a convention in module import order. | | | | 🔧 | | |
| [prefer-default-export](docs/rules/prefer-default-export.md) | Prefer a default export if module exports a single name or multiple names. | | | | | | |
<!-- end auto-generated rules list -->
## `eslint-plugin-import` for enterprise
Available as part of the Tidelift Subscription.
The maintainers of `eslint-plugin-import` and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-eslint-plugin-import?utm_source=npm-eslint-plugin-import&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)
## Installation
```sh
# inside your project's working tree
npm install eslint-plugin-import --save-dev
```
### Config - Legacy (`.eslintrc`)
All rules are off by default. However, you may extend one of the preset configs, or configure them manually in your `.eslintrc.(yml|json|js)`.
- Extending a preset config:
```jsonc
{
"extends": [
"eslint:recommended",
"plugin:import/recommended",
],
}
```
- Configuring manually:
```jsonc
{
"rules": {
"import/no-unresolved": ["error", { "commonjs": true, "amd": true }],
"import/named": "error",
"import/namespace": "error",
"import/default": "error",
"import/export": "error",
// etc...
},
},
```
### Config - Flat (`eslint.config.js`)
All rules are off by default. However, you may configure them manually in your `eslint.config.(js|cjs|mjs)`, or extend one of the preset configs:
```js
import importPlugin from 'eslint-plugin-import';
import js from '@eslint/js';
export default [
js.configs.recommended,
importPlugin.flatConfigs.recommended,
{
files: ['**/*.{js,mjs,cjs}'],
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
},
rules: {
'no-unused-vars': 'off',
'import/no-dynamic-require': 'warn',
'import/no-nodejs-modules': 'warn',
},
},
];
```
## TypeScript
You may use the following snippet or assemble your own config using the granular settings described below it.
Make sure you have installed [`@typescript-eslint/parser`] and [`eslint-import-resolver-typescript`] which are used in the following configuration.
```jsonc
{
"extends": [
"eslint:recommended",
"plugin:import/recommended",
// the following lines do the trick
"plugin:import/typescript",
],
"settings": {
"import/resolver": {
// You will also need to install and configure the TypeScript resolver
// See also https://github.com/import-js/eslint-import-resolver-typescript#configuration
"typescript": true,
"node": true,
},
},
}
```
[`@typescript-eslint/parser`]: https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser
[`eslint-import-resolver-typescript`]: https://github.com/import-js/eslint-import-resolver-typescript
### Config - Flat with `config()` in `typescript-eslint`
If you are using the `config` method from [`typescript-eslint`](https://github.com/typescript-eslint/typescript-eslint), ensure that the `flatConfig` is included within the `extends` array.
```js
import tseslint from 'typescript-eslint';
import importPlugin from 'eslint-plugin-import';
import js from '@eslint/js';
export default tseslint.config(
js.configs.recommended,
// other configs...
{
files: ['**/*.{ts,tsx}'],
extends: [importPlugin.flatConfigs.recommended, importPlugin.flatConfigs.typescript],
// other configs...
}
);
```
## Resolvers
With the advent of module bundlers and the current state of modules and module
syntax specs, it's not always obvious where `import x from 'module'` should look
to find the file behind `module`.
Up through v0.10ish, this plugin has directly used substack's [`resolve`] plugin,
which implements Node's import behavior. This works pretty well in most cases.
However, webpack allows a number of things in import module source strings that
Node does not, such as loaders (`import 'file!./whatever'`) and a number of
aliasing schemes, such as [`externals`]: mapping a module id to a global name at
runtime (allowing some modules to be included more traditionally via script tags).
In the interest of supporting both of these, v0.11 introduces resolvers.
Currently [Node] and [webpack] resolution have been implemented, but the
resolvers are just npm packages, so [third party packages are supported](https://github.com/import-js/eslint-plugin-import/wiki/Resolvers) (and encouraged!).
You can reference resolvers in several ways (in order of precedence):
- as a conventional `eslint-import-resolver` name, like `eslint-import-resolver-foo`:
```jsonc
// .eslintrc
{
"settings": {
// uses 'eslint-import-resolver-foo':
"import/resolver": "foo",
},
}
```
```yaml
# .eslintrc.yml
settings:
# uses 'eslint-import-resolver-foo':
import/resolver: foo
```
```js
// .eslintrc.js
module.exports = {
settings: {
'import/resolver': {
foo: { someConfig: value }
}
}
}
```
- with a full npm module name, like `my-awesome-npm-module`:
```jsonc
// .eslintrc
{
"settings": {
"import/resolver": "my-awesome-npm-module",
},
}
```
```yaml
# .eslintrc.yml
settings:
import/resolver: 'my-awesome-npm-module'
```
```js
// .eslintrc.js
module.exports = {
settings: {
'import/resolver': {
'my-awesome-npm-module': { someConfig: value }
}
}
}
```
- with a filesystem path to resolver, defined in this example as a `computed property` name:
```js
// .eslintrc.js
module.exports = {
settings: {
'import/resolver': {
[path.resolve('../../../my-resolver')]: { someConfig: value }
}
}
}
```
Relative paths will be resolved relative to the source's nearest `package.json` or
the process's current working directory if no `package.json` is found.
If you are interesting in writing a resolver, see the [spec](./resolvers/README.md) for more details.
[`resolve`]: https://www.npmjs.com/package/resolve
[`externals`]: https://webpack.github.io/docs/library-and-externals.html
[Node]: https://www.npmjs.com/package/eslint-import-resolver-node
[webpack]: https://www.npmjs.com/package/eslint-import-resolver-webpack
## Settings
You may set the following settings in your `.eslintrc`:
### `import/extensions`
A list of file extensions that will be parsed as modules and inspected for
`export`s.
This defaults to `['.js']`, unless you are using the `react` shared config,
in which case it is specified as `['.js', '.jsx']`. Despite the default,
if you are using TypeScript (without the `plugin:import/typescript` config
described above) you must specify the new extensions (`.ts`, and also `.tsx`
if using React).
```js
"settings": {
"import/extensions": [
".js",
".jsx"
]
}
```
If you require more granular extension definitions, you can use:
```js
"settings": {
"import/resolver": {
"node": {
"extensions": [
".js",
".jsx"
]
}
}
}
```
Note that this is different from (and likely a subset of) any `import/resolver`
extensions settings, which may include `.json`, `.coffee`, etc. which will still
factor into the `no-unresolved` rule.
Also, the following `import/ignore` patterns will overrule this list.
### `import/ignore`
A list of regex strings that, if matched by a path, will
not report the matching module if no `export`s are found.
In practice, this means rules other than [`no-unresolved`](./docs/rules/no-unresolved.md#ignore) will not report on any
`import`s with (absolute filesystem) paths matching this pattern.
`no-unresolved` has its own [`ignore`](./docs/rules/no-unresolved.md#ignore) setting.
```jsonc
{
"settings": {
"import/ignore": [
"\.coffee$", // fraught with parse errors
"\.(scss|less|css)$", // can't parse unprocessed CSS modules, either
],
},
}
```
### `import/core-modules`
An array of additional modules to consider as "core" modules--modules that should
be considered resolved but have no path on the filesystem. Your resolver may
already define some of these (for example, the Node resolver knows about `fs` and
`path`), so you need not redefine those.
For example, Electron exposes an `electron` module:
```js
import 'electron' // without extra config, will be flagged as unresolved!
```
that would otherwise be unresolved. To avoid this, you may provide `electron` as a
core module:
```jsonc
// .eslintrc
{
"settings": {
"import/core-modules": ["electron"],
},
}
```
In Electron's specific case, there is a shared config named `electron`
that specifies this for you.
Contribution of more such shared configs for other platforms are welcome!
### `import/external-module-folders`
An array of folders. Resolved modules only from those folders will be considered as "external". By default - `["node_modules"]`. Makes sense if you have configured your path or webpack to handle your internal paths differently and want to consider modules from some folders, for example `bower_components` or `jspm_modules`, as "external".
This option is also useful in a monorepo setup: list here all directories that contain monorepo's packages and they will be treated as external ones no matter which resolver is used.
If you are using `yarn` PnP as your package manager, add the `.yarn` folder and all your installed dependencies will be considered as `external`, instead of `internal`.
Each item in this array is either a folder's name, its subpath, or its absolute prefix path:
- `jspm_modules` will match any file or folder named `jspm_modules` or which has a direct or non-direct parent named `jspm_modules`, e.g. `/home/me/project/jspm_modules` or `/home/me/project/jspm_modules/some-pkg/index.js`.
- `packages/core` will match any path that contains these two segments, for example `/home/me/project/packages/core/src/utils.js`.
- `/home/me/project/packages` will only match files and directories inside this directory, and the directory itself.
Please note that incomplete names are not allowed here so `components` won't match `bower_components` and `packages/ui` won't match `packages/ui-utils` (but will match `packages/ui/utils`).
### `import/parsers`
A map from parsers to file extension arrays. If a file extension is matched, the
dependency parser will require and use the map key as the parser instead of the
configured ESLint parser. This is useful if you're inter-op-ing with TypeScript
directly using webpack, for example:
```jsonc
// .eslintrc
{
"settings": {
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"],
},
},
}
```
In this case, [`@typescript-eslint/parser`](https://www.npmjs.com/package/@typescript-eslint/parser)
must be installed and require-able from the running `eslint` module's location
(i.e., install it as a peer of ESLint).
This is currently only tested with `@typescript-eslint/parser` (and its predecessor,
`typescript-eslint-parser`) but should theoretically work with any moderately
ESTree-compliant parser.
It's difficult to say how well various plugin features will be supported, too,
depending on how far down the rabbit hole goes. Submit an issue if you find strange
behavior beyond here, but steel your heart against the likely outcome of closing
with `wontfix`.
### `import/resolver`
See [resolvers](#resolvers).
### `import/cache`
Settings for cache behavior. Memoization is used at various levels to avoid the copious amount of `fs.statSync`/module parse calls required to correctly report errors.
For normal `eslint` console runs, the cache lifetime is irrelevant, as we can strongly assume that files should not be changing during the lifetime of the linter process (and thus, the cache in memory)
For long-lasting processes, like [`eslint_d`] or [`eslint-loader`], however, it's important that there be some notion of staleness.
If you never use [`eslint_d`] or [`eslint-loader`], you may set the cache lifetime to `Infinity` and everything should be fine:
```jsonc
// .eslintrc
{
"settings": {
"import/cache": {
"lifetime": "∞", // or Infinity, in a JS config
},
},
}
```
Otherwise, set some integer, and cache entries will be evicted after that many seconds have elapsed:
```jsonc
// .eslintrc
{
"settings": {
"import/cache": {
"lifetime": 5, // 30 is the default
},
},
}
```
[`eslint_d`]: https://www.npmjs.com/package/eslint_d
[`eslint-loader`]: https://www.npmjs.com/package/eslint-loader
### `import/internal-regex`
A regex for packages should be treated as internal. Useful when you are utilizing a monorepo setup or developing a set of packages that depend on each other.
By default, any package referenced from [`import/external-module-folders`](#importexternal-module-folders) will be considered as "external", including packages in a monorepo like yarn workspace or lerna environment. If you want to mark these packages as "internal" this will be useful.
For example, if your packages in a monorepo are all in `@scope`, you can configure `import/internal-regex` like this
```jsonc
// .eslintrc
{
"settings": {
"import/internal-regex": "^@scope/",
},
}
```
### `import/node-version`
A string that represents the version of Node.js that you are using.
A falsy value will imply the version of Node.js that you are running ESLint with.
```jsonc
// .eslintrc
{
"settings": {
"import/node-version": "22.3.4",
},
}
```
## SublimeLinter-eslint
SublimeLinter-eslint introduced a change to support `.eslintignore` files
which altered the way file paths are passed to ESLint when linting during editing.
This change sends a relative path instead of the absolute path to the file (as ESLint
normally provides), which can make it impossible for this plugin to resolve dependencies
on the filesystem.
This workaround should no longer be necessary with the release of ESLint 2.0, when
`.eslintignore` will be updated to work more like a `.gitignore`, which should
support proper ignoring of absolute paths via `--stdin-filename`.
In the meantime, see [roadhump/SublimeLinter-eslint#58](https://github.com/roadhump/SublimeLinter-eslint/issues/58)
for more details and discussion, but essentially, you may find you need to add the following
`SublimeLinter` config to your Sublime project file:
```json
{
"folders":
[
{
"path": "code"
}
],
"SublimeLinter":
{
"linters":
{
"eslint":
{
"chdir": "${project}/code"
}
}
}
}
```
Note that `${project}/code` matches the `code` provided at `folders[0].path`.
The purpose of the `chdir` setting, in this case, is to set the working directory
from which ESLint is executed to be the same as the directory on which SublimeLinter-eslint
bases the relative path it provides.
See the SublimeLinter docs on [`chdir`](https://www.sublimelinter.com/en/latest/linter_settings.html#chdir)
for more information, in case this does not work with your project.
If you are not using `.eslintignore`, or don't have a Sublime project file, you can also
do the following via a `.sublimelinterrc` file in some ancestor directory of your
code:
```json
{
"linters": {
"eslint": {
"args": ["--stdin-filename", "@"]
}
}
}
```
I also found that I needed to set `rc_search_limit` to `null`, which removes the file
hierarchy search limit when looking up the directory tree for `.sublimelinterrc`:
In Package Settings / SublimeLinter / User Settings:
```json
{
"user": {
"rc_search_limit": null
}
}
```
I believe this defaults to `3`, so you may not need to alter it depending on your
project folder max depth.
[codecov-image]: https://codecov.io/gh/import-js/eslint-plugin-import/branch/main/graphs/badge.svg
[codecov-url]: https://app.codecov.io/gh/import-js/eslint-plugin-import/
[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/import-js/eslint-plugin-import
[actions-url]: https://github.com/import-js/eslint-plugin-import
@@ -0,0 +1,16 @@
import type { TSchema, SchemaOptions } from '../schema/index.mjs';
import type { Static } from '../static/index.mjs';
import { Kind } from '../symbols/index.mjs';
type TupleStatic<T extends TSchema[], P extends unknown[], Acc extends unknown[] = []> = T extends [infer L extends TSchema, ...infer R extends TSchema[]] ? TupleStatic<R, P, [...Acc, Static<L, P>]> : Acc;
export interface TTuple<T extends TSchema[] = TSchema[]> extends TSchema {
[Kind]: 'Tuple';
static: TupleStatic<T, this['params']>;
type: 'array';
items?: T;
additionalItems?: false;
minItems: number;
maxItems: number;
}
/** `[Json]` Creates a Tuple type */
export declare function Tuple<Types extends TSchema[]>(types: [...Types], options?: SchemaOptions): TTuple<Types>;
export {};
@@ -0,0 +1,54 @@
// @ts-check
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "build", {
enumerable: true,
get: function() {
return build;
}
});
const _fs = /*#__PURE__*/ _interop_require_default(require("fs"));
const _path = /*#__PURE__*/ _interop_require_default(require("path"));
const _resolveConfigPath = require("../../util/resolveConfigPath.js");
const _plugin = require("./plugin.js");
function _interop_require_default(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
async function build(args) {
let input = args["--input"];
let shouldWatch = args["--watch"];
// TODO: Deprecate this in future versions
if (!input && args["_"][1]) {
console.error("[deprecation] Running tailwindcss without -i, please provide an input file.");
input = args["--input"] = args["_"][1];
}
if (input && input !== "-" && !_fs.default.existsSync(input = _path.default.resolve(input))) {
console.error(`Specified input file ${args["--input"]} does not exist.`);
process.exit(9);
}
if (args["--config"] && !_fs.default.existsSync(args["--config"] = _path.default.resolve(args["--config"]))) {
console.error(`Specified config file ${args["--config"]} does not exist.`);
process.exit(9);
}
// TODO: Reference the @config path here if exists
let configPath = args["--config"] ? args["--config"] : (0, _resolveConfigPath.resolveDefaultConfigPath)();
let processor = await (0, _plugin.createProcessor)(args, configPath);
if (shouldWatch) {
// Abort the watcher if stdin is closed to avoid zombie processes
// You can disable this behavior with --watch=always
if (args["--watch"] !== "always") {
process.stdin.on("end", ()=>process.exit(0));
}
process.stdin.resume();
await processor.watch();
} else {
await processor.build().catch((e)=>{
console.error(e);
process.exit(1);
});
}
}
@@ -0,0 +1,212 @@
/**
* @import {
* CompileContext,
* Extension as FromMarkdownExtension,
* Handle as FromMarkdownHandle
* } from 'mdast-util-from-markdown'
* @import {ToMarkdownOptions} from 'mdast-util-gfm-footnote'
* @import {
* Handle as ToMarkdownHandle,
* Map,
* Options as ToMarkdownExtension
* } from 'mdast-util-to-markdown'
* @import {FootnoteDefinition, FootnoteReference} from 'mdast'
*/
import {ok as assert} from 'devlop'
import {normalizeIdentifier} from 'micromark-util-normalize-identifier'
footnoteReference.peek = footnoteReferencePeek
/**
* @this {CompileContext}
* @type {FromMarkdownHandle}
*/
function enterFootnoteCallString() {
this.buffer()
}
/**
* @this {CompileContext}
* @type {FromMarkdownHandle}
*/
function enterFootnoteCall(token) {
this.enter({type: 'footnoteReference', identifier: '', label: ''}, token)
}
/**
* @this {CompileContext}
* @type {FromMarkdownHandle}
*/
function enterFootnoteDefinitionLabelString() {
this.buffer()
}
/**
* @this {CompileContext}
* @type {FromMarkdownHandle}
*/
function enterFootnoteDefinition(token) {
this.enter(
{type: 'footnoteDefinition', identifier: '', label: '', children: []},
token
)
}
/**
* @this {CompileContext}
* @type {FromMarkdownHandle}
*/
function exitFootnoteCallString(token) {
const label = this.resume()
const node = this.stack[this.stack.length - 1]
assert(node.type === 'footnoteReference')
node.identifier = normalizeIdentifier(
this.sliceSerialize(token)
).toLowerCase()
node.label = label
}
/**
* @this {CompileContext}
* @type {FromMarkdownHandle}
*/
function exitFootnoteCall(token) {
this.exit(token)
}
/**
* @this {CompileContext}
* @type {FromMarkdownHandle}
*/
function exitFootnoteDefinitionLabelString(token) {
const label = this.resume()
const node = this.stack[this.stack.length - 1]
assert(node.type === 'footnoteDefinition')
node.identifier = normalizeIdentifier(
this.sliceSerialize(token)
).toLowerCase()
node.label = label
}
/**
* @this {CompileContext}
* @type {FromMarkdownHandle}
*/
function exitFootnoteDefinition(token) {
this.exit(token)
}
/** @type {ToMarkdownHandle} */
function footnoteReferencePeek() {
return '['
}
/**
* @type {ToMarkdownHandle}
* @param {FootnoteReference} node
*/
function footnoteReference(node, _, state, info) {
const tracker = state.createTracker(info)
let value = tracker.move('[^')
const exit = state.enter('footnoteReference')
const subexit = state.enter('reference')
value += tracker.move(
state.safe(state.associationId(node), {after: ']', before: value})
)
subexit()
exit()
value += tracker.move(']')
return value
}
/**
* Create an extension for `mdast-util-from-markdown` to enable GFM footnotes
* in markdown.
*
* @returns {FromMarkdownExtension}
* Extension for `mdast-util-from-markdown`.
*/
export function gfmFootnoteFromMarkdown() {
return {
enter: {
gfmFootnoteCallString: enterFootnoteCallString,
gfmFootnoteCall: enterFootnoteCall,
gfmFootnoteDefinitionLabelString: enterFootnoteDefinitionLabelString,
gfmFootnoteDefinition: enterFootnoteDefinition
},
exit: {
gfmFootnoteCallString: exitFootnoteCallString,
gfmFootnoteCall: exitFootnoteCall,
gfmFootnoteDefinitionLabelString: exitFootnoteDefinitionLabelString,
gfmFootnoteDefinition: exitFootnoteDefinition
}
}
}
/**
* Create an extension for `mdast-util-to-markdown` to enable GFM footnotes
* in markdown.
*
* @param {ToMarkdownOptions | null | undefined} [options]
* Configuration (optional).
* @returns {ToMarkdownExtension}
* Extension for `mdast-util-to-markdown`.
*/
export function gfmFootnoteToMarkdown(options) {
// To do: next major: change default.
let firstLineBlank = false
if (options && options.firstLineBlank) {
firstLineBlank = true
}
return {
handlers: {footnoteDefinition, footnoteReference},
// This is on by default already.
unsafe: [{character: '[', inConstruct: ['label', 'phrasing', 'reference']}]
}
/**
* @type {ToMarkdownHandle}
* @param {FootnoteDefinition} node
*/
function footnoteDefinition(node, _, state, info) {
const tracker = state.createTracker(info)
let value = tracker.move('[^')
const exit = state.enter('footnoteDefinition')
const subexit = state.enter('label')
value += tracker.move(
state.safe(state.associationId(node), {before: value, after: ']'})
)
subexit()
value += tracker.move(']:')
if (node.children && node.children.length > 0) {
tracker.shift(4)
value += tracker.move(
(firstLineBlank ? '\n' : ' ') +
state.indentLines(
state.containerFlow(node, tracker.current()),
firstLineBlank ? mapAll : mapExceptFirst
)
)
}
exit()
return value
}
}
/** @type {Map} */
function mapExceptFirst(line, index, blank) {
return index === 0 ? line : mapAll(line, index, blank)
}
/** @type {Map} */
function mapAll(line, index, blank) {
return (blank ? '' : ' ') + line
}
@@ -0,0 +1 @@
{"version":3,"names":["_checkInRHS","require","_setFunctionName","_toPropertyKey","applyDecs2305","targetClass","memberDecs","classDecs","classDecsHaveThis","instanceBrand","parentClass","_bindPropCall","obj","name","before","_this","value","call","runInitializers","initializers","i","length","assertCallable","fn","hint1","hint2","throwUndefined","TypeError","applyDec","Class","decInfo","decoratorsHaveThis","kind","metadata","ret","isStatic","isPrivate","isField","isAccessor","hasPrivateBrand","assertInstanceIfPrivate","target","decs","decVal","_","isClass","Array","isArray","desc","init","key","get","setFunctionName","set","Object","getOwnPropertyDescriptor","newValue","dec","decThis","decoratorFinishedRef","ctx","addInitializer","initializer","v","Error","push","bind","access","has","instance","defineProperty","applyMemberDecs","decInfos","protoInitializers","staticInitializers","staticBrand","checkInRHS","existingNonFields","Map","pushInitializers","existingKind","prototype","toPropertyKey","defineMetadata","Symbol","configurable","enumerable","arguments","parentMetadata","create","e","c"],"sources":["../../src/helpers/applyDecs2305.ts"],"sourcesContent":["/* @minVersion 7.21.0 */\n/* @mangleFns */\n/* @onlyBabel7 */\n\nimport checkInRHS from \"./checkInRHS.ts\";\nimport setFunctionName from \"./setFunctionName.ts\";\nimport toPropertyKey from \"./toPropertyKey.ts\";\n\nconst enum PROP_KIND {\n FIELD = 0,\n ACCESSOR = 1,\n METHOD = 2,\n GETTER = 3,\n SETTER = 4,\n CLASS = 5,\n\n STATIC = 8,\n\n DECORATORS_HAVE_THIS = 16,\n}\n\ntype DecoratorFinishedRef = { v?: boolean };\ntype DecoratorContextAccess = {\n get?: (target: object) => any;\n set?: (target: object, value: any) => void;\n has: (target: object) => boolean;\n};\ntype DecoratorContext = {\n kind: \"accessor\" | \"method\" | \"getter\" | \"setter\" | \"field\" | \"class\";\n name: string;\n static?: boolean;\n private?: boolean;\n access?: DecoratorContextAccess;\n metadata?: any;\n addInitializer?: (initializer: Function) => void;\n};\ntype DecoratorInfo =\n | [\n decs: Function | Function[],\n kind: PROP_KIND,\n name: string,\n any?,\n Function?,\n ]\n | [classDecs: Function[]];\n\n/**\n Basic usage:\n\n applyDecs(\n Class,\n [\n // member decorators\n [\n decs, // dec, or array of decs, or array of this values and decs\n 0, // kind of value being decorated\n 'prop', // name of public prop on class containing the value being decorated,\n '#p', // the name of the private property (if is private, void 0 otherwise),\n ]\n ],\n [\n // class decorators\n dec1, dec2\n ]\n )\n ```\n\n Fully transpiled example:\n\n ```js\n @dec\n class Class {\n @dec\n a = 123;\n\n @dec\n #a = 123;\n\n @dec\n @dec2\n accessor b = 123;\n\n @dec\n accessor #b = 123;\n\n @dec\n c() { console.log('c'); }\n\n @dec\n #c() { console.log('privC'); }\n\n @dec\n get d() { console.log('d'); }\n\n @dec\n get #d() { console.log('privD'); }\n\n @dec\n set e(v) { console.log('e'); }\n\n @dec\n set #e(v) { console.log('privE'); }\n }\n\n\n // becomes\n let initializeInstance;\n let initializeClass;\n\n let initA;\n let initPrivA;\n\n let initB;\n let initPrivB, getPrivB, setPrivB;\n\n let privC;\n let privD;\n let privE;\n\n let Class;\n class _Class {\n static {\n let ret = applyDecs(\n this,\n [\n [dec, 0, 'a'],\n [dec, 0, 'a', (i) => i.#a, (i, v) => i.#a = v],\n [[dec, dec2], 1, 'b'],\n [dec, 1, 'b', (i) => i.#privBData, (i, v) => i.#privBData = v],\n [dec, 2, 'c'],\n [dec, 2, 'c', () => console.log('privC')],\n [dec, 3, 'd'],\n [dec, 3, 'd', () => console.log('privD')],\n [dec, 4, 'e'],\n [dec, 4, 'e', () => console.log('privE')],\n ],\n [\n dec\n ]\n );\n\n initA = ret[0];\n\n initPrivA = ret[1];\n\n initB = ret[2];\n\n initPrivB = ret[3];\n getPrivB = ret[4];\n setPrivB = ret[5];\n\n privC = ret[6];\n\n privD = ret[7];\n\n privE = ret[8];\n\n initializeInstance = ret[9];\n\n Class = ret[10]\n\n initializeClass = ret[11];\n }\n\n a = (initializeInstance(this), initA(this, 123));\n\n #a = initPrivA(this, 123);\n\n #bData = initB(this, 123);\n get b() { return this.#bData }\n set b(v) { this.#bData = v }\n\n #privBData = initPrivB(this, 123);\n get #b() { return getPrivB(this); }\n set #b(v) { setPrivB(this, v); }\n\n c() { console.log('c'); }\n\n #c(...args) { return privC(this, ...args) }\n\n get d() { console.log('d'); }\n\n get #d() { return privD(this); }\n\n set e(v) { console.log('e'); }\n\n set #e(v) { privE(this, v); }\n }\n\n initializeClass(Class);\n */\n\nexport defaulLine truncated
@@ -0,0 +1,12 @@
/**
* Get the cleaned case insensitive form of an attribute or property.
*
* @param {string} value
* An attribute-like or property-like name.
* @returns {string}
* Value that can be used to look up the properly cased property on a
* `Schema`.
*/
export function normalize(value) {
return value.toLowerCase()
}
@@ -0,0 +1,106 @@
/**
* @fileoverview Enforce ES5 or ES6 class for returning value in render function.
* @author Mark Orel
*/
'use strict';
const values = require('object.values');
const Components = require('../util/Components');
const astUtil = require('../util/ast');
const componentUtil = require('../util/componentUtil');
const docsUrl = require('../util/docsUrl');
const report = require('../util/report');
const getAncestors = require('../util/eslint').getAncestors;
// ------------------------------------------------------------------------------
// Rule Definition
// ------------------------------------------------------------------------------
const messages = {
noRenderReturn: 'Your render method should have a return statement',
};
/** @type {import('eslint').Rule.RuleModule} */
module.exports = {
meta: {
docs: {
description: 'Enforce ES5 or ES6 class for returning value in render function',
category: 'Possible Errors',
recommended: true,
url: docsUrl('require-render-return'),
},
messages,
schema: [],
},
create: Components.detect((context, components) => {
/**
* Mark a return statement as present
* @param {ASTNode} node The AST node being checked.
*/
function markReturnStatementPresent(node) {
components.set(node, {
hasReturnStatement: true,
});
}
/**
* Find render method in a given AST node
* @param {ASTNode} node The component to find render method.
* @returns {ASTNode} Method node if found, undefined if not.
*/
function findRenderMethod(node) {
const properties = astUtil.getComponentProperties(node);
return properties
.filter((property) => astUtil.getPropertyName(property) === 'render' && property.value)
.find((property) => astUtil.isFunctionLikeExpression(property.value));
}
return {
ReturnStatement(node) {
const ancestors = getAncestors(context, node).reverse();
let depth = 0;
ancestors.forEach((ancestor) => {
if (/Function(Expression|Declaration)$/.test(ancestor.type)) {
depth += 1;
}
if (
/(MethodDefinition|Property|ClassProperty|PropertyDefinition)$/.test(ancestor.type)
&& astUtil.getPropertyName(ancestor) === 'render'
&& depth <= 1
) {
markReturnStatementPresent(node);
}
});
},
ArrowFunctionExpression(node) {
if (node.expression === false || astUtil.getPropertyName(node.parent) !== 'render') {
return;
}
markReturnStatementPresent(node);
},
'Program:exit'() {
values(components.list())
.filter((component) => (
findRenderMethod(component.node)
&& !component.hasReturnStatement
&& (
componentUtil.isES5Component(component.node, context)
|| componentUtil.isES6Component(component.node, context)
)
))
.forEach((component) => {
report(context, messages.noRenderReturn, 'noRenderReturn', {
node: findRenderMethod(component.node),
});
});
},
};
}),
};
@@ -0,0 +1,24 @@
# @heroui/link
Links allow users to click their way from page to page. This component is styled to resemble a hyperlink and semantically renders an `<a>` tag.
Please refer to the [documentation](https://heroui.com/docs/components/link) for more information.
## Installation
```sh
yarn add @heroui/link
# or
npm i @heroui/link
```
## Contribution
Yes please! See the
[contributing guidelines](https://github.com/frontio-ai/heroui/blob/master/CONTRIBUTING.md)
for details.
## License
This project is licensed under the terms of the
[MIT license](https://github.com/frontio-ai/heroui/blob/master/LICENSE).
@@ -0,0 +1 @@
module.exports={C:{"115":0.07396,"140":0.0037,"142":0.01479,"143":0.20709,"144":0.45116,_:"2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 141 145 146 147 3.5 3.6"},D:{"41":0.0074,"42":0.0037,"43":0.0037,"45":0.0037,"47":0.0074,"50":0.0074,"53":0.01109,"57":0.0074,"58":0.0037,"60":0.0037,"70":0.01109,"86":0.02589,"89":0.02958,"94":0.01109,"95":0.01109,"103":0.05177,"104":0.0037,"107":0.01479,"108":0.29584,"109":0.11094,"110":0.01109,"111":0.01109,"114":0.03328,"116":0.0037,"119":0.02958,"120":0.02219,"121":0.05917,"122":0.09985,"123":0.0037,"124":0.0037,"125":0.64345,"126":0.0037,"127":0.02958,"128":0.0074,"129":0.02219,"130":0.01479,"131":0.07026,"132":0.01479,"133":0.05177,"134":0.01479,"135":0.0074,"136":0.01849,"137":0.13683,"138":0.14052,"139":0.22928,"140":4.84808,"141":8.15409,"142":0.10724,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 44 46 48 49 51 52 54 55 56 59 61 62 63 64 65 66 67 68 69 71 72 73 74 75 76 77 78 79 80 81 83 84 85 87 88 90 91 92 93 96 97 98 99 100 101 102 105 106 112 113 115 117 118 143 144 145"},F:{"88":0.0037,"91":0.01109,"92":0.01109,"120":0.15162,"122":0.97257,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 60 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 89 90 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 121 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"14":0.0074,"15":0.01479,"16":0.02958,"17":0.01479,"18":0.01109,"84":0.0037,"92":0.02958,"100":0.01109,"103":0.01109,"109":0.0037,"114":0.01109,"120":0.0037,"121":0.0037,"122":0.01109,"123":0.0037,"125":0.0037,"127":0.01109,"129":0.01109,"130":0.0037,"131":0.02958,"132":0.02589,"133":0.0037,"134":0.10354,"135":0.09615,"136":0.01849,"137":0.05177,"138":0.17381,"139":0.13683,"140":1.59014,"141":6.8487,_:"12 13 79 80 81 83 85 86 87 88 89 90 91 93 94 95 96 97 98 99 101 102 104 105 106 107 108 110 111 112 113 115 116 117 118 119 124 126 128 142"},E:{_:"0 4 5 6 7 8 9 10 11 12 13 14 15 3.1 3.2 5.1 6.1 7.1 9.1 10.1 11.1 12.1 14.1 15.1 15.2-15.3 15.4 15.5 16.0 16.1 16.2 16.3 16.4 16.5 17.0 17.1 17.2 17.4 17.5 18.0 18.1 18.4 26.1 26.2","13.1":0.01109,"15.6":0.05547,"16.6":0.02589,"17.3":0.0037,"17.6":0.03328,"18.2":0.0037,"18.3":0.01109,"18.5-18.6":0.09245,"26.0":0.08505},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00033,"5.0-5.1":0,"6.0-6.1":0.00133,"7.0-7.1":0.001,"8.1-8.4":0,"9.0-9.2":0,"9.3":0.00299,"10.0-10.2":0.00033,"10.3":0.00565,"11.0-11.2":0.08369,"11.3-11.4":0.00199,"12.0-12.1":0.00066,"12.2-12.5":0.01627,"13.0-13.1":0,"13.2":0.00166,"13.3":0.00066,"13.4-13.7":0.00266,"14.0-14.4":0.00565,"14.5-14.8":0.00598,"15.0-15.1":0.00565,"15.2-15.3":0.00432,"15.4":0.00498,"15.5":0.00565,"15.6-15.8":0.07373,"16.0":0.00996,"16.1":0.0186,"16.2":0.00963,"16.3":0.01727,"16.4":0.00432,"16.5":0.00764,"16.6-16.7":0.09864,"17.0":0.00697,"17.1":0.01063,"17.2":0.00764,"17.3":0.01129,"17.4":0.01993,"17.5":0.03421,"17.6-17.7":0.08635,"18.0":0.01959,"18.1":0.04052,"18.2":0.02192,"18.3":0.07041,"18.4":0.0362,"18.5-18.6":1.8459,"26.0":0.22816,"26.1":0.0083},P:{"21":0.05191,"23":0.15573,"24":0.01038,"25":0.07267,"26":0.02076,"27":0.16611,"28":1.19392,"29":0.07267,_:"4 20 22 5.0-5.4 6.2-6.4 8.2 9.2 10.1 11.1-11.2 12.0 13.0 14.0 15.0 16.0 17.0 18.0 19.0","7.2-7.4":0.05191},I:{"0":0.05035,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0.00001,"4.4":0,"4.4.3-4.4.4":0.00003},K:{"0":1.29821,_:"10 11 12 11.1 11.5 12.1"},A:{"10":0.02681,"11":0.08043,_:"6 7 8 9 5.5"},S:{"2.5":0.06302,_:"3.0-3.1"},J:{_:"7 10"},N:{_:"10 11"},R:{_:"0"},M:{"0":0.11974},Q:{"14.9":0.05672},O:{"0":0.6239},H:{"0":0},L:{"0":65.34266}};
@@ -0,0 +1,9 @@
import * as react_jsx_runtime from 'react/jsx-runtime';
interface MenuSelectedIconProps {
isSelected: boolean;
disableAnimation?: boolean;
}
declare function MenuSelectedIcon(props: MenuSelectedIconProps): react_jsx_runtime.JSX.Element;
export { MenuSelectedIcon, MenuSelectedIconProps };
@@ -0,0 +1 @@
{"name":"p-map","version":"4.0.0","requiresBuild":false,"files":{"license":{"checkedAt":1794532127584,"integrity":"sha512-0fM2/ycrxrltyaBKfQ748Ck23VlPUUBgNAR47ldf4B1V/HoXTfWBSk+vcshGKwEpmOynu4mOP5o+hyBfuRNa8g==","mode":420,"size":1117},"index.js":{"checkedAt":1794532127584,"integrity":"sha512-X50LejB61/UdTKnk4nqgYn4gdL2bYmChQt7FmT0S+OfZB4Muql96a/Q2lvKJFhF78GrFlwVpm7Ggc8Uc/7MUsA==","mode":420,"size":1640},"package.json":{"checkedAt":1794532127584,"integrity":"sha512-a9GOeVtgBrnq5+dNSQuiosH97BioeTi4yW+P/9Jcg086vBZPtuqzJ7LA1fmUwNiJf4yykX47fNKOCJfAq7cuew==","mode":420,"size":911},"readme.md":{"checkedAt":1794532127584,"integrity":"sha512-nH25GrF2p9B3QI7QlTOGyGKXiK4V0peaJWcFjL/zqFJmDD9tRe6QPFy5vIQ8HHyfkQFWHEzPKeaXe3EJzMKGJQ==","mode":420,"size":3029},"index.d.ts":{"checkedAt":1794532127584,"integrity":"sha512-Lw0o13byEB3qaHw0IyzPEQgmmtaEs4n38uRjUDGaR3Zo22P4phMGAyIRnyo61qqXPmb4Kxvh/mskMPevfpXOww==","mode":420,"size":1990}}}
@@ -0,0 +1,6 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getWrappedCode = getWrappedCode;
function getWrappedCode(text, nodePrecedence, parentPrecedence) {
return nodePrecedence > parentPrecedence ? text : `(${text})`;
}
@@ -0,0 +1,17 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var NoteRole = {
relatedConcepts: [{
module: 'ARIA',
concept: {
name: 'note'
}
}],
type: 'structure'
};
var _default = NoteRole;
exports.default = _default;
@@ -0,0 +1,8 @@
import Inline from '../blots/inline.js';
declare class Script extends Inline {
static blotName: string;
static tagName: string[];
static create(value: 'super' | 'sub' | (string & {})): HTMLElement;
static formats(domNode: HTMLElement): "super" | "sub" | undefined;
}
export default Script;
@@ -0,0 +1,45 @@
/**
* @author Yosuke Ota
* See LICENSE file in root directory for full license.
*/
"use strict"
const { getSourceCode } = require("eslint-compat-utils")
const { getRegExpCalls } = require("../utils")
module.exports = {
meta: {
docs: {
description: "disallow RegExp `d` flag.",
category: "ES2022",
recommended: false,
url: "http://eslint-community.github.io/eslint-plugin-es-x/rules/no-regexp-d-flag.html",
},
fixable: null,
messages: {
forbidden: "ES2022 RegExp 'd' flag is forbidden.",
},
schema: [],
type: "problem",
},
create(context) {
return {
"Literal[regex]"(node) {
if (node.regex.flags.includes("d")) {
context.report({ node, messageId: "forbidden" })
}
},
"Program:exit"(program) {
const sourceCode = getSourceCode(context)
const scope = sourceCode.getScope(program)
for (const { node, flags } of getRegExpCalls(scope)) {
if (flags && flags.includes("d")) {
context.report({ node, messageId: "forbidden" })
}
}
},
}
},
}
@@ -0,0 +1 @@
{"mappings":";;;;;;AAAA;;;;;;;;;;CAUC,GAED,uEAAuE;AACvE,6EAA6E;AAC7E,iFAAiF;AACjF,mFAAmF;AACnF,mFAAmF;AACnF,wCAAwC;AACxC,IAAI,6CAAuB,IAAI;AAE/B,wEAAwE;AACxE,IAAI,4CAAsB,IAAI;AAE9B,SAAS;IACP,IAAI,OAAO,WAAW,aACpB;IAGF,SAAS,kBAAkB,KAAY;QACrC,OAAO,kBAAkB;IAC3B;IAEA,IAAI,oBAAoB,CAAC;QACvB,IAAI,CAAC,kBAAkB,MAAM,CAAC,EAAE,MAAM,EACpC;QAEF,+DAA+D;QAC/D,IAAI,cAAc,2CAAqB,GAAG,CAAC,EAAE,MAAM;QACnD,IAAI,CAAC,aAAa;YAChB,cAAc,IAAI;YAClB,2CAAqB,GAAG,CAAC,EAAE,MAAM,EAAE;YAEnC,+FAA+F;YAC/F,yGAAyG;YACzG,mGAAmG;YACnG,EAAE,MAAM,CAAC,gBAAgB,CAAC,oBAAoB,iBAAiB;gBAC7D,MAAM;YACR;QACF;QAEA,YAAY,GAAG,CAAC,EAAE,YAAY;IAChC;IAEA,IAAI,kBAAkB,CAAC;QACrB,IAAI,CAAC,kBAAkB,MAAM,CAAC,EAAE,MAAM,EACpC;QAEF,yDAAyD;QACzD,IAAI,aAAa,2CAAqB,GAAG,CAAC,EAAE,MAAM;QAClD,IAAI,CAAC,YACH;QAGF,WAAW,MAAM,CAAC,EAAE,YAAY;QAEhC,2GAA2G;QAC3G,IAAI,WAAW,IAAI,KAAK,GAAG;YACzB,EAAE,MAAM,CAAC,mBAAmB,CAAC,oBAAoB;YACjD,2CAAqB,MAAM,CAAC,EAAE,MAAM;QACtC;QAEA,kEAAkE;QAClE,IAAI,2CAAqB,IAAI,KAAK,GAAG;YACnC,KAAK,IAAI,MAAM,0CACb;YAGF,0CAAoB,KAAK;QAC3B;IACF;IAEA,SAAS,IAAI,CAAC,gBAAgB,CAAC,iBAAiB;IAChD,SAAS,IAAI,CAAC,gBAAgB,CAAC,iBAAiB;AAClD;AAEA,IAAI,OAAO,aAAa;IACtB,IAAI,SAAS,UAAU,KAAK,WAC1B;SAEA,SAAS,gBAAgB,CAAC,oBAAoB;;AAI3C,SAAS,0CAAmB,EAAc;IAC/C,4EAA4E;IAC5E,sBAAsB;QACpB,gEAAgE;QAChE,+EAA+E;QAC/E,IAAI,2CAAqB,IAAI,KAAK,GAChC;aAEA,0CAAoB,GAAG,CAAC;IAE5B;AACF","sources":["packages/@react-aria/utils/src/runAfterTransition.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n// We store a global list of elements that are currently transitioning,\n// mapped to a set of CSS properties that are transitioning for that element.\n// This is necessary rather than a simple count of transitions because of browser\n// bugs, e.g. Chrome sometimes fires both transitionend and transitioncancel rather\n// than one or the other. So we need to track what's actually transitioning so that\n// we can ignore these duplicate events.\nlet transitionsByElement = new Map<EventTarget, Set<string>>();\n\n// A list of callbacks to call once there are no transitioning elements.\nlet transitionCallbacks = new Set<() => void>();\n\nfunction setupGlobalEvents() {\n if (typeof window === 'undefined') {\n return;\n }\n\n function isTransitionEvent(event: Event): event is TransitionEvent {\n return 'propertyName' in event;\n }\n\n let onTransitionStart = (e: Event) => {\n if (!isTransitionEvent(e) || !e.target) {\n return;\n }\n // Add the transitioning property to the list for this element.\n let transitions = transitionsByElement.get(e.target);\n if (!transitions) {\n transitions = new Set();\n transitionsByElement.set(e.target, transitions);\n\n // The transitioncancel event must be registered on the element itself, rather than as a global\n // event. This enables us to handle when the node is deleted from the document while it is transitioning.\n // In that case, the cancel event would have nowhere to bubble to so we need to handle it directly.\n e.target.addEventListener('transitioncancel', onTransitionEnd, {\n once: true\n });\n }\n\n transitions.add(e.propertyName);\n };\n\n let onTransitionEnd = (e: Event) => {\n if (!isTransitionEvent(e) || !e.target) {\n return;\n }\n // Remove property from list of transitioning properties.\n let properties = transitionsByElement.get(e.target);\n if (!properties) {\n return;\n }\n\n properties.delete(e.propertyName);\n\n // If empty, remove transitioncancel event, and remove the element from the list of transitioning elements.\n if (properties.size === 0) {\n e.target.removeEventListener('transitioncancel', onTransitionEnd);\n transitionsByElement.delete(e.target);\n }\n\n // If no transitioning elements, call all of the queued callbacks.\n if (transitionsByElement.size === 0) {\n for (let cb of transitionCallbacks) {\n cb();\n }\n\n transitionCallbacks.clear();\n }\n };\n\n document.body.addEventListener('transitionrun', onTransitionStart);\n document.body.addEventListener('transitionend', onTransitionEnd);\n}\n\nif (typeof document !== 'undefined') {\n if (document.readyState !== 'loading') {\n setupGlobalEvents();\n } else {\n document.addEventListener('DOMContentLoaded', setupGlobalEvents);\n }\n}\n\nexport function runAfterTransition(fn: () => void) {\n // Wait one frame to see if an animation Line truncated
@@ -0,0 +1,48 @@
import { PluginFunc } from 'dayjs'
declare const plugin: PluginFunc
export = plugin
declare module 'dayjs' {
interface Dayjs {
set(argument: object): Dayjs
add(argument: object): Dayjs
subtract(argument: object): Dayjs
}
interface ConfigTypeMap {
objectSupport: {
years?: number | string;
year?: number | string;
y?: number | string;
months?: number | string;
month?: number | string;
M?: number | string;
days?: number | string;
day?: number | string;
d?: number | string;
dates?: number | string;
date?: number | string;
D?: number | string;
hours?: number | string;
hour?: number | string;
h?: number | string;
minutes?: number | string;
minute?: number | string;
m?: number | string;
seconds?: number | string;
second?: number | string;
s?: number | string;
milliseconds?: number | string;
millisecond?: number | string;
ms?: number | string;
}
}
}
Loaded 100 of 35554 files, more files were not shown because too many files have changed in this diff. Show more