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,26 @@
'use strict';
var V = require('tailwindcss/resolveConfig');
var w = require('fs');
var O = require('path');
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
var V__default = /*#__PURE__*/_interopDefault(V);
var w__default = /*#__PURE__*/_interopDefault(w);
var O__default = /*#__PURE__*/_interopDefault(O);
var S=t=>{w__default.default.writeFileSync(O__default.default.join(__dirname,"generated.d.ts"),t);},C=t=>`export type TVGeneratedScreens = ${Object.keys(t).map(e=>`"${e}"`).join(" | ")};
`,v=t=>{queueMicrotask(()=>{if(t!=null&&t.screens){let e=C(t.screens);S(e);}});};var u={tv:/tv\s*\((.*?)\)/gs,tvExtend:/extend:\s*\w+(,| )\s*/,comment:/\/\*[\s\S]*?\*\/|([^\\:]|^)\/\/.*$/gm,blankLine:/^\s*$(?:\r\n?|\n)/gm,extension:/\.\w+/g},l=t=>Array.isArray(t),E=t=>typeof t=="string",p=t=>typeof t=="object",$=t=>typeof t=="boolean",y=t=>typeof t=="function",c=t=>!!(!t||l(t)&&t.length===0||E(t)&&t.length===0||p(t)&&Object.keys(t).length===0),k=(t,e)=>{let n={},r=e.length,s=Object.prototype.hasOwnProperty;for(let i=0;i<r;i++){let o=e[i];s.call(t,o)&&(n[o]=t[o]);}return n},A=(t,e)=>{let n="https://github.com/nextui-org/tailwind-variants/issues/new/choose";console.log("\x1B[31m%s\x1B[0m",`${t}: ${e.message}`),console.log(`If you think this is an issue, please submit it at ${n}`);},x=(...t)=>e=>t.reduce((n,r)=>r(n),e),F=t=>{let n=t.replace(u.comment,"$1").toString().replace(u.blankLine,"").toString(),r=s=>s[1].replace(u.tvExtend,"").toString();return Array.from(n.matchAll(u.tv),r)},B=t=>{let e=F(t);if(!c(e))return e.map(n=>n.includes("responsiveVariants")?new Function(`
const [options, config] = [${n.toString()}];
return {options, config};
`)():{})},h=t=>t.flatMap(e=>e).toString().replaceAll(","," ").split(" "),D=(t,e)=>{let n={};for(let[r,s]of Object.entries(t))n[r]={},n[r].original=s,!c(s)&&(n.temp=l(s)?h(s):s.split(" "),e.forEach(i=>{let o="";n.temp.forEach(a=>{o+=`${i}:${a} `;}),n[r][i]=o.trimEnd();}),delete n.temp);return n},L=(t,e)=>E(t)?t.split(" "):l(t)?h(t):p(t)?D(t,e):t,b=(t,e)=>{let n={};for(let[r,s]of Object.entries(t))if(n[r]={},!c(s))for(let[i,o]of Object.entries(s)){if(n[r][i]={},n[r][i].original=o,c(o))continue;let a=L(o,e);if(!c(a)){if(!l(a)){n[r][i]=a;continue}e.forEach(m=>{let f="";a.forEach(d=>{f+=`${m}:${d} `;}),n[r][i][m]=f.trimEnd();});}}return n},T=({options:t,config:e},n)=>{var i,o;let r=(i=t==null?void 0:t.variants)!=null?i:{},s=(o=e==null?void 0:e.responsiveVariants)!=null?o:!1;if(!(!s||c(r))){if($(s))return b(r,n);if(l(s))return b(r,s);if(p(s)){let a=[];for(let[m,f]of Object.entries(s)){if(!f||c(f))continue;let j={options:{variants:k(r,[m])},config:{responsiveVariants:f}};a.push(T(j,n));}return a}}},N=(t,e)=>{try{if(!t.includes("tailwind-variants"))return t;let n=B(t);if(c(n))return t;let r=JSON.stringify(n.map(o=>T(o,e)),void 0,2),s=`
/* Tailwind Variants Transformed Content Start
`,i=`
Tailwind Variants Transformed Content End */
`;return t.concat(s+r+i)}catch(n){return A("Tailwind Variants Transform Failed",n),t}},g=t=>{let e=t.map(n=>{if(p(n)&&n.extension)return n.extension;let r=n.match(u.extension);return r||(r=n.split("{"),r=r.pop().replace("}","").split(",")),r.map(s=>s.replace(".","").split(".")).flat()}).flatMap(n=>n);return Array.from(new Set(e)).filter(n=>n!=="html")},G=t=>{var s;let e=V__default.default(t);if(v(e.theme),c((s=e.content)==null?void 0:s.files)||!l(e.content.files))return e;let n=i=>{var o,a;return N(i,Object.keys((a=(o=e.theme)==null?void 0:o.screens)!=null?a:{}))},r=e.content.transform;if(c(r)){let o=g(e.content.files).map(a=>[a,n]);return e.content.transform=Object.fromEntries(o),e}if(y(r)){let o=g(e.content.files).map(a=>[a,x(n,r)]);return e.content.transform=Object.fromEntries(o),e}if(p(r)){let o=g(e.content.files).map(a=>y(r[a])?[a,x(n,r[a])]:[a,n]);return e.content.transform=Object.fromEntries(o),e}return e};
exports.tvTransformer = N;
exports.withTV = G;
@@ -0,0 +1,14 @@
# EditorConfig is awesome: http://EditorConfig.org
# top-most EditorConfig file
root = true
# Copied from Node.js to ease compatibility in PR.
[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
quote_type = single
@@ -0,0 +1,108 @@
var $4393d9b86d3ad278$exports = require("./ar-AE.main.js");
var $254224013ae06959$exports = require("./bg-BG.main.js");
var $55d3567b59d09782$exports = require("./cs-CZ.main.js");
var $0e419a7be7773c16$exports = require("./da-DK.main.js");
var $be606513c8356c34$exports = require("./de-DE.main.js");
var $7d99787e5bd26f87$exports = require("./el-GR.main.js");
var $0360f2a6534752c1$exports = require("./en-US.main.js");
var $92bf4fdecfeb6a61$exports = require("./es-ES.main.js");
var $7c02fa9b9c598043$exports = require("./et-EE.main.js");
var $ba53535dcca59343$exports = require("./fi-FI.main.js");
var $2fbbcddf7d252cb7$exports = require("./fr-FR.main.js");
var $0a1f0520e07d3596$exports = require("./he-IL.main.js");
var $f7be5df1487823a9$exports = require("./hr-HR.main.js");
var $8dbe4363bfbba3f9$exports = require("./hu-HU.main.js");
var $90a445da1ad273e7$exports = require("./it-IT.main.js");
var $e1ebf18259c9b1ee$exports = require("./ja-JP.main.js");
var $765893642f3b4f72$exports = require("./ko-KR.main.js");
var $af73ba24f63febd1$exports = require("./lt-LT.main.js");
var $97aac9f6740ee412$exports = require("./lv-LV.main.js");
var $92fbe76e196d7e0a$exports = require("./nb-NO.main.js");
var $44399897afb701ce$exports = require("./nl-NL.main.js");
var $d679e258664d7384$exports = require("./pl-PL.main.js");
var $b51fc2992648966b$exports = require("./pt-BR.main.js");
var $6abbc540dcd5f78c$exports = require("./pt-PT.main.js");
var $6cbc0c9bf574473b$exports = require("./ro-RO.main.js");
var $009edbe58be6525b$exports = require("./ru-RU.main.js");
var $01cf6095489e78f7$exports = require("./sk-SK.main.js");
var $33fd5a1a3753e83f$exports = require("./sl-SI.main.js");
var $6b9373a558e74e84$exports = require("./sr-SP.main.js");
var $90008194c3db7fce$exports = require("./sv-SE.main.js");
var $e29d21290b4ce15c$exports = require("./tr-TR.main.js");
var $96139c59e8ba3f85$exports = require("./uk-UA.main.js");
var $052554192ea8e826$exports = require("./zh-CN.main.js");
var $3f3b5d798a5abdbc$exports = require("./zh-TW.main.js");
module.exports = {
"ar-AE": $4393d9b86d3ad278$exports,
"bg-BG": $254224013ae06959$exports,
"cs-CZ": $55d3567b59d09782$exports,
"da-DK": $0e419a7be7773c16$exports,
"de-DE": $be606513c8356c34$exports,
"el-GR": $7d99787e5bd26f87$exports,
"en-US": $0360f2a6534752c1$exports,
"es-ES": $92bf4fdecfeb6a61$exports,
"et-EE": $7c02fa9b9c598043$exports,
"fi-FI": $ba53535dcca59343$exports,
"fr-FR": $2fbbcddf7d252cb7$exports,
"he-IL": $0a1f0520e07d3596$exports,
"hr-HR": $f7be5df1487823a9$exports,
"hu-HU": $8dbe4363bfbba3f9$exports,
"it-IT": $90a445da1ad273e7$exports,
"ja-JP": $e1ebf18259c9b1ee$exports,
"ko-KR": $765893642f3b4f72$exports,
"lt-LT": $af73ba24f63febd1$exports,
"lv-LV": $97aac9f6740ee412$exports,
"nb-NO": $92fbe76e196d7e0a$exports,
"nl-NL": $44399897afb701ce$exports,
"pl-PL": $d679e258664d7384$exports,
"pt-BR": $b51fc2992648966b$exports,
"pt-PT": $6abbc540dcd5f78c$exports,
"ro-RO": $6cbc0c9bf574473b$exports,
"ru-RU": $009edbe58be6525b$exports,
"sk-SK": $01cf6095489e78f7$exports,
"sl-SI": $33fd5a1a3753e83f$exports,
"sr-SP": $6b9373a558e74e84$exports,
"sv-SE": $90008194c3db7fce$exports,
"tr-TR": $e29d21290b4ce15c$exports,
"uk-UA": $96139c59e8ba3f85$exports,
"zh-CN": $052554192ea8e826$exports,
"zh-TW": $3f3b5d798a5abdbc$exports
};
//# sourceMappingURL=intlStrings.main.js.map
@@ -0,0 +1,2 @@
import type { LibDefinition } from '../variable';
export declare const es2020_bigint: LibDefinition;
@@ -0,0 +1,5 @@
'use strict';
var implementation = require('./implementation');
module.exports = Function.prototype.bind || implementation;
@@ -0,0 +1,136 @@
# import/no-unused-modules
<!-- end auto-generated rule header -->
Reports:
- modules without any exports
- individual exports not being statically `import`ed or `require`ed from other modules in the same project
- dynamic imports are supported if argument is a literal string
## Rule Details
### Usage
In order for this plugin to work, at least one of the options `missingExports` or `unusedExports` must be enabled (see "Options" section below). In the future, these options will be enabled by default (see <https://github.com/import-js/eslint-plugin-import/issues/1324>)
Example:
```json
"rules": {
...otherRules,
"import/no-unused-modules": [1, {"unusedExports": true}]
}
```
### Options
This rule takes the following option:
- **`missingExports`**: if `true`, files without any exports are reported (defaults to `false`)
- **`unusedExports`**: if `true`, exports without any static usage within other modules are reported (defaults to `false`)
- **`ignoreUnusedTypeExports`**: if `true`, TypeScript type exports without any static usage within other modules are reported (defaults to `false` and has no effect unless `unusedExports` is `true`)
- **`src`**: an array with files/paths to be analyzed. It only applies to unused exports. Defaults to `process.cwd()`, if not provided
- **`ignoreExports`**: an array with files/paths for which unused exports will not be reported (e.g module entry points in a published package)
### Example for missing exports
#### The following will be reported
```js
const class MyClass { /*...*/ }
function makeClass() { return new MyClass(...arguments) }
```
#### The following will not be reported
```js
export default function () { /*...*/ }
```
```js
export const foo = function () { /*...*/ }
```
```js
export { foo, bar }
```
```js
export { foo as bar }
```
### Example for unused exports
given file-f:
```js
import { e } from 'file-a'
import { f } from 'file-b'
import * as fileC from 'file-c'
export { default, i0 } from 'file-d' // both will be reported
export const j = 99 // will be reported
```
and file-d:
```js
export const i0 = 9 // will not be reported
export const i1 = 9 // will be reported
export default () => {} // will not be reported
```
and file-c:
```js
export const h = 8 // will not be reported
export default () => {} // will be reported, as export * only considers named exports and ignores default exports
```
and file-b:
```js
import two, { b, c, doAnything } from 'file-a'
export const f = 6 // will not be reported
```
and file-a:
```js
const b = 2
const c = 3
const d = 4
export const a = 1 // will be reported
export { b, c } // will not be reported
export { d as e } // will not be reported
export function doAnything() {
// some code
} // will not be reported
export default 5 // will not be reported
```
### Unused exports with `ignoreUnusedTypeExports` set to `true`
The following will not be reported:
```ts
export type Foo = {}; // will not be reported
export interface Foo = {}; // will not be reported
export enum Foo {}; // will not be reported
```
#### Important Note
Exports from files listed as a main file (`main`, `browser`, or `bin` fields in `package.json`) will be ignored by default. This only applies if the `package.json` is not set to `private: true`
## When not to use
If you don't mind having unused files or dead code within your codebase, you can disable this rule
@@ -0,0 +1 @@
{"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;AASD,MAAM,gCAAU;AAChB,MAAM,gCAAU;AAChB,MAAM,qCAAe;AACrB,MAAM,2CAAqB;AAC3B,MAAM,oCAAc;AACpB,MAAM,8CACF;AACJ,MAAM,mDAA6B;IAAC;IAAS;IAAW;CAAU;AAClE,MAAM,+CAAyB;IAAC;IAAS;IAAU;IAAS;OAAW;CAA2B;AAG3F,SAAS,0CAAU,KAAa;IACrC,IAAI,IAAI,MAAM,KAAK,CAAC;IACpB,IAAI,CAAC,GACH,MAAM,IAAI,MAAM,mCAAmC;IAGrD,OAAO,IAAI,CAAA,GAAA,8BAAG,EACZ,kCAAY,CAAC,CAAC,EAAE,EAAE,GAAG,KACrB,CAAC,CAAC,EAAE,GAAG,kCAAY,CAAC,CAAC,EAAE,EAAE,GAAG,MAAM,GAClC,CAAC,CAAC,EAAE,GAAG,kCAAY,CAAC,CAAC,EAAE,EAAE,GAAG,MAAM,GAClC,CAAC,CAAC,EAAE,GAAG,kCAAY,CAAC,CAAC,EAAE,EAAE,GAAG,YAAY,OAAO;AAEnD;AAGO,SAAS,yCAAU,KAAa;IACrC,IAAI,IAAI,MAAM,KAAK,CAAC;IACpB,IAAI,CAAC,GACH,MAAM,IAAI,MAAM,mCAAmC;IAGrD,IAAI,OAA8B,IAAI,CAAA,GAAA,sCAAW,EAC/C,kCAAY,CAAC,CAAC,EAAE,EAAE,GAAG,OACrB,kCAAY,CAAC,CAAC,EAAE,EAAE,GAAG,KACrB;IAGF,KAAK,GAAG,GAAG,kCAAY,CAAC,CAAC,EAAE,EAAE,GAAG,KAAK,QAAQ,CAAC,cAAc,CAAC;IAC7D,OAAO;AACT;AAGO,SAAS,0CAAc,KAAa;IACzC,IAAI,IAAI,MAAM,KAAK,CAAC;IACpB,IAAI,CAAC,GACH,MAAM,IAAI,MAAM,wCAAwC;IAG1D,IAAI,OAAO,kCAAY,CAAC,CAAC,EAAE,EAAE,OAAO;IACpC,IAAI,MAAM,OAAO,IAAI,OAAO;IAE5B,IAAI,OAAkC,IAAI,CAAA,GAAA,0CAAe,EACvD,KACA,OAAO,IAAI,CAAC,OAAO,IAAI,MACvB,kCAAY,CAAC,CAAC,EAAE,EAAE,GAAG,KACrB,GACA,CAAC,CAAC,EAAE,GAAG,kCAAY,CAAC,CAAC,EAAE,EAAE,GAAG,MAAM,GAClC,CAAC,CAAC,EAAE,GAAG,kCAAY,CAAC,CAAC,EAAE,EAAE,GAAG,MAAM,GAClC,CAAC,CAAC,EAAE,GAAG,kCAAY,CAAC,CAAC,EAAE,EAAE,GAAG,MAAM,GAClC,CAAC,CAAC,EAAE,GAAG,kCAAY,CAAC,CAAC,EAAE,EAAE,GAAG,YAAY,OAAO;IAGjD,KAAK,GAAG,GAAG,kCAAY,CAAC,CAAC,EAAE,EAAE,GAAG,KAAK,QAAQ,CAAC,cAAc,CAAC;IAC7D,OAAO;AACT;AAQO,SAAS,0CAAmB,KAAa,EAAE,cAA+B;IAC/E,IAAI,IAAI,MAAM,KAAK,CAAC;IACpB,IAAI,CAAC,GACH,MAAM,IAAI,MAAM,wCAAwC;IAG1D,IAAI,OAAO,kCAAY,CAAC,CAAC,EAAE,EAAE,OAAO;IACpC,IAAI,MAAM,OAAO,IAAI,OAAO;IAE5B,IAAI,OAA+B,IAAI,CAAA,GAAA,uCAAY,EACjD,KACA,OAAO,IAAI,CAAC,OAAO,IAAI,MACvB,kCAAY,CAAC,CAAC,EAAE,EAAE,GAAG,KACrB,GACA,CAAC,CAAC,GAAG,EACL,GACA,CAAC,CAAC,EAAE,GAAG,kCAAY,CAAC,CAAC,EAAE,EAAE,GAAG,MAAM,GAClC,CAAC,CAAC,EAAE,GAAG,kCAAY,CAAC,CAAC,EAAE,EAAE,GAAG,MAAM,GAClC,CAAC,CAAC,EAAE,GAAG,kCAAY,CAAC,CAAC,EAAE,EAAE,GAAG,MAAM,GAClC,CAAC,CAAC,EAAE,GAAG,kCAAY,CAAC,CAAC,EAAE,EAAE,GAAG,YAAY,OAAO;IAGjD,KAAK,GAAG,GAAG,kCAAY,CAAC,CAAC,EAAE,EAAE,GAAG,KAAK,QAAQ,CAAC,cAAc,CAAC;IAE7D,IAAI,gBAAgB,CAAA,GAAA,4CAAiB,EAAE;IAEvC,IAAI;IACJ,IAAI,CAAC,CAAC,EAAE,EAAE;YACgE;QAAxE,KAAK,MAAM,GAAG,kCAAY,CAAC,CAAC,EAAE,EAAE,KAAK,MAAvB,UAA8C,kCAAY,CAAA,MAAA,CAAC,CAAC,EAAE,cAAJ,iBAAA,MAAQ,KAAK,GAAG,MAA5B;QAC5D,KAAK,CAAA,GAAA,uCAAY,EAAE,QAAyB,KAAK,MAAM;QAEvD,uCAAuC;QACvC,IAAI,YAAY,CAAA,GAAA,2CAAgB,EAAE,eAAe,KAAK,QAAQ;QAC9D,IAAI,CAAC,UAAU,QAAQ,CAAC,KACtB,MAAM,IAAI,MAAM,CAAC,OAAO,EAAE,qCAAe,KAAK,MAAM,EAAE,gBAAgB,EAAE,0CAAiB,MAAM,IAAI,EAAE,KAAK,QAAQ,EAAE;IAExH,OACE,gEAAgE;IAChE,KAAK,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,4CAAiB,EAAE,gBAAgB,KAAK,QAAQ,EAAE;IAGpE,OAAO,CAAA,GAAA,sCAAW,EAAE,IAAI,KAAK,QAAQ;AACvC;AAMO,SAAS,0CAAc,KAAa,EAAE,QAAgB;IAC3D,IAAI,IAAI,MAAM,KAAK,CAAC;IACpB,IAAI,CAAC,GACH,MAAM,IAAI,MAAM,wCAAwC;IAG1D,IAAI,OAAO,kCAAY,CAAC,CAAC,EAAE,EAAE,OAAO;IACpC,IAAI,MAAM,OAAO,IAAI,OAAO;IAE5B,IAAI,OAA+B,IAAI,CAAA,GAAA,uCAAY,EACjD,KACA,OAAO,IAAI,CAAC,OAAO,IAAI,MACvB,kCAAY,CAAC,CAAC,EAAE,EAAE,GAAG,KACrB,GACA,UACA,GACA,CAAC,CAAC,EAAE,GAAG,kCAAY,CAAC,CAAC,EAAE,EAAE,GAAG,MAAM,GAClC,CAAC,CAAC,EAAE,GAAG,kCAAY,CAAC,CAAC,EAAE,EAAE,GAAG,MAAM,GAClC,CAAC,CAAC,EAAE,GAAG,kCAAY,CAAC,CAAC,EAAE,EAAE,GAAG,MAAM,GAClC,CAAC,CAAC,EAAE,GAAG,kCAAY,CAAC,CAAC,EAAE,EAAE,GAAG,YAAY,OAAO;IAGjD,KAAK,GAAG,GAAG,kCAAY,CAAC,CAAC,EAAE,EAAE,GAAG,KAAK,QAAQ,CAAC,cAAc,CAAC;QAGa;IAD1E,IAAI,CAAC,CAAC,EAAE,EACN,KAAK,MAAM,GAAG,kCAAY,CAAC,CAAC,EAAE,EAAE,KAAK,MAAvB,UAA8C,kCAAY,CAAA,MAAA,CAAC,CAAC,EAAE,cAAJ,iBAAA,MAAQ,KAAK,GAAG,MAA5B;IAG9D,OAAO,CAAA,GAAA,oCAAS,EAAE,MAAuB;AAC3C;AAMO,SAAS,0CAAqB,KAAa;IAChD,OAAO,0CAAc,OAAO,CAAA,GAAA,0CAAe;AAC7C;AAEA,SAAS,kCAAY,KAAa,EAAE,GAAW,EAAE,GAAW;IAC1D,IAAI,MAAM,OAAO;IACjB,IAAI,MAAM,OAAO,MAAM,KACrB,MAAM,IAAI,WAAW,CAAC,oBAAoB,EAAE,IAAI,IAAI,EAAE,IAAI,IAAI,EAAE,KAAK;IAGvE,OAAO;AACT;AAEO,SAAS,0CAAa,IAAU;IACrC,OAAO,GAAG,OAAO,KAAK,IAAI,EAAE,QAAQ,CAAC,GAAG,KAAK,CAAC,EAAE,OAAO,KAAK,MAAM,EAAE,QAAQ,CAAC,GAAG,KAAK,CAAC,EAAE,OAAO,KAAK,MAAM,EAAE,QAAQ,CAAC,GAAG,OAAO,KAAK,WAAW,GAAG,OAAO,KAAK,WAAW,GAAG,MAAM,KAAK,CAAC,KAAK,IAAI;AACnM;AAEO,SAAS,0CAAa,IAAkB;IAC7C,IAAI,gBAAgB,CAAA,GAAA,oCAAS,EAAE,MAAM,IAAI,CAAA,GAAA,2CAAgB;IACzD,IAAI;IACJ,IAAI,cAAc,GAAG,KAAK,MACxB,OAAO,cAAc,IAAI,KAAK,IAC1B,SACA,MAAM,OAAO,KAAK,GAAG,CAAC,IAAI,cAAc,IAAI,GAAG,QAAQ,CAAC,GAAG;SAE/D,OAAO,OAAO,cAAc,IAAI,EAAE,QAAQ,CAAC,GAAG;IAEhD,OAAO,GAAG,KAAK,CAAC,EAAE,OAAO,cAAc,KAAK,EAAE,QAAQ,CAAC,GAAG,KAAK,CAAC,EAAE,OAAO,cAAc,GAAG,EAAE,QAAQ,CAAC,GAAG,MAAM;AAChH;AAEO,SAAS,0CAAiB,IAAiB;IAChD,aAAa;IACb,OAAO,GAAG,0CAAa,MAAM,CAAC,EAAE,0CAAa,OAAO;AACtD;AAEA,SAAS,qCAAe,MAAc;IACpC,IAAI,OAAO,KAAK,IAAI,CAAC,UAAU,IAAI,MAAM;IACzC,SAAS,KAAK,GAAG,CAAC;IAClB,IAAI,cAAc,KAAK,KAAK,CAAC,SAAU;IACvC,IAAI,gBAAgB,AAAC,SAAU,UAAoB;IACnD,OAAO,GAAG,OAAO,OAAO,aAAa,QAAQ,CAAC,GAAG,KAAK,CAAC,EAAE,OAAO,eAAe,QAAQ,CAAC,GAAG,MAAM;AACnG;AAEO,SAAS,0CAAsB,IAAmB;IACvD,OAAO,GAAG,0CAAiB,QAAQ,qCAAe,KAAK,MAAM,EAAE,CAAC,EAAE,KAAK,QAAQ,CAAC,CAAC,CAAC;AACpF;AAOO,Line truncated
@@ -0,0 +1 @@
module.exports={C:{"4":0.00972,"115":0.05345,"128":0.02915,"134":0.00486,"135":0.00486,"136":0.00486,"137":0.01458,"138":0.01944,"139":0.05345,"140":0.05831,"141":0.01458,"142":0.16035,"143":0.94265,"144":0.74343,_:"2 3 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 129 130 131 132 133 145 146 147 3.5 3.6"},D:{"29":0.00486,"39":0.00972,"40":0.00486,"41":0.00972,"42":0.00972,"43":0.00972,"44":0.00972,"45":0.00486,"46":0.00972,"47":0.00972,"48":0.00972,"49":0.00972,"50":0.00972,"51":0.00972,"52":0.00972,"53":0.00972,"54":0.00972,"55":0.01458,"56":0.00972,"57":0.00972,"58":0.00972,"59":0.00972,"60":0.00486,"65":0.00486,"69":0.00486,"73":0.00486,"75":0.00486,"79":0.01944,"81":0.00486,"83":0.00972,"85":0.00486,"86":0.00972,"87":0.05831,"88":0.00486,"91":0.00486,"93":0.00486,"94":0.00486,"97":0.01458,"98":0.01458,"99":0.00486,"102":0.00486,"103":0.03401,"106":0.00486,"108":0.01458,"109":0.39844,"110":0.00486,"111":0.04859,"112":2.22056,"114":0.03887,"116":0.0243,"117":0.00486,"118":0.00972,"119":0.00972,"120":0.0243,"121":0.00972,"122":0.0243,"123":0.00972,"124":0.00972,"125":6.94351,"126":0.26239,"127":0.06317,"128":0.0243,"129":0.00486,"130":0.00486,"131":0.10204,"132":0.01458,"133":0.05345,"134":0.04373,"135":0.13119,"136":0.05345,"137":0.05831,"138":0.17978,"139":0.20408,"140":5.43236,"141":12.37587,"142":0.21866,_:"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 30 31 32 33 34 35 36 37 38 61 62 63 64 66 67 68 70 71 72 74 76 77 78 80 84 89 90 92 95 96 100 101 104 105 107 113 115 143 144 145"},F:{"91":0.00486,"92":0.03887,"95":0.00486,"120":0.04859,"121":0.24295,"122":1.07384,_:"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 88 89 90 93 94 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 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:{"16":0.01458,"18":0.00486,"84":0.00486,"92":0.0243,"100":0.00486,"109":0.00972,"114":0.76772,"119":0.00486,"122":0.01458,"125":0.00486,"126":0.00486,"127":0.00486,"128":0.00486,"131":0.00486,"132":0.00486,"133":0.00486,"134":0.04859,"135":0.01458,"136":0.00972,"137":0.01944,"138":0.02915,"139":0.07774,"140":0.8892,"141":4.81527,"142":0.00486,_:"12 13 14 15 17 79 80 81 83 85 86 87 88 89 90 91 93 94 95 96 97 98 99 101 102 103 104 105 106 107 108 110 111 112 113 115 116 117 118 120 121 123 124 129 130"},E:{"13":0.00486,_:"0 4 5 6 7 8 9 10 11 12 14 15 3.1 3.2 6.1 7.1 9.1 10.1 11.1 12.1 13.1 14.1 15.2-15.3 15.4 15.5 16.0 16.1 16.2 16.4 16.5 17.0 17.3 17.4 18.2 26.2","5.1":0.02915,"15.1":0.04859,"15.6":0.01944,"16.3":0.00486,"16.6":0.02915,"17.1":0.01458,"17.2":0.01458,"17.5":0.01944,"17.6":0.05345,"18.0":0.01458,"18.1":0.02915,"18.3":0.01458,"18.4":0.00486,"18.5-18.6":0.03401,"26.0":0.30126,"26.1":0.00972},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.0007,"5.0-5.1":0,"6.0-6.1":0.00281,"7.0-7.1":0.00211,"8.1-8.4":0,"9.0-9.2":0,"9.3":0.00632,"10.0-10.2":0.0007,"10.3":0.01194,"11.0-11.2":0.17694,"11.3-11.4":0.00421,"12.0-12.1":0.0014,"12.2-12.5":0.0344,"13.0-13.1":0,"13.2":0.00351,"13.3":0.0014,"13.4-13.7":0.00562,"14.0-14.4":0.01194,"14.5-14.8":0.01264,"15.0-15.1":0.01194,"15.2-15.3":0.00913,"15.4":0.01053,"15.5":0.01194,"15.6-15.8":0.15587,"16.0":0.02106,"16.1":0.03932,"16.2":0.02036,"16.3":0.03651,"16.4":0.00913,"16.5":0.01615,"16.6-16.7":0.20853,"17.0":0.01474,"17.1":0.02247,"17.2":0.01615,"17.3":0.02387,"17.4":0.04213,"17.5":0.07232,"17.6-17.7":0.18255,"18.0":0.04143,"18.1":0.08566,"18.2":0.04634,"18.3":0.14885,"18.4":0.07653,"18.5-18.6":3.90241,"26.0":0.48236,"26.1":0.01755},P:{"4":0.0206,"21":0.0103,"22":0.0206,"23":0.03091,"24":0.06181,"25":0.06181,"26":0.23695,"27":0.11332,"28":1.59685,"29":0.08242,_:"20 5.0-5.4 6.2-6.4 8.2 9.2 10.1 12.0 14.0 15.0 17.0 18.0","7.2-7.4":0.08242,"11.1-11.2":0.0103,"13.0":0.0103,"16.0":0.0103,"19.0":0.03091},I:{"0":0.0308,"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.00002},K:{"0":0.31868,_:"10 11 12 11.1 11.5 12.1"},A:{"8":0.02885,"9":0.00577,"10":0.00577,"11":0.05193,_:"6 7 5.5"},S:{"2.5":0.00514,_:"3.0-3.1"},J:{_:"7 10"},N:{_:"10 11"},R:{_:"0"},M:{"0":0.14906},Q:{"14.9":0.00514},O:{"0":0.0771},H:{"0":0},L:{"0":47.32973}};
@@ -0,0 +1,36 @@
export default (function (_, c, dayjs) {
var proto = c.prototype;
var parseDate = function parseDate(cfg) {
var date = cfg.date,
utc = cfg.utc;
if (typeof date === 'string' && date.charAt(0) === '-') {
var normalData = date.slice(1);
var newDate = dayjs(normalData);
if (utc) {
newDate = dayjs.utc(normalData);
} else {
newDate = dayjs(normalData);
}
var fullYear = newDate.year();
if (date.indexOf("-" + fullYear) !== -1) {
return dayjs(newDate).subtract(fullYear * 2, 'year').toDate();
}
return date;
}
return date;
};
var oldParse = proto.parse;
proto.parse = function (cfg) {
cfg.date = parseDate.bind(this)(cfg);
oldParse.bind(this)(cfg);
};
});
@@ -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_nz=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),n={name:"en-nz",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){var a=["th","st","nd","rd"],t=e%100;return"["+e+(a[(t-20)%10]||a[t]||a[0])+"]"},formats:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},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(n,null,!0),n}));
@@ -0,0 +1,17 @@
import { TSESTree } from '@typescript-eslint/utils';
import type { InferMessageIdsTypeFromRule, InferOptionsTypeFromRule } from '../util';
declare const baseRule: import("@typescript-eslint/utils/ts-eslint").RuleModule<"unusedExpression", [{
allowShortCircuit?: boolean;
allowTaggedTemplates?: boolean;
allowTernary?: boolean;
}], unknown, {
ExpressionStatement(node: TSESTree.ExpressionStatement): void;
}>;
export type MessageIds = InferMessageIdsTypeFromRule<typeof baseRule>;
export type Options = InferOptionsTypeFromRule<typeof baseRule>;
declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"unusedExpression", [{
allowShortCircuit?: boolean;
allowTaggedTemplates?: boolean;
allowTernary?: boolean;
}], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
export default _default;
@@ -0,0 +1,91 @@
{
"name": "@eslint-community/regexpp",
"version": "4.12.2",
"description": "Regular expression parser for ECMAScript.",
"keywords": [
"regexp",
"regular",
"expression",
"parser",
"validator",
"ast",
"abstract",
"syntax",
"tree",
"ecmascript",
"es2015",
"es2016",
"es2017",
"es2018",
"es2019",
"es2020",
"es2021",
"annexB"
],
"homepage": "https://github.com/eslint-community/regexpp#readme",
"bugs": {
"url": "https://github.com/eslint-community/regexpp/issues"
},
"repository": {
"type": "git",
"url": "https://github.com/eslint-community/regexpp"
},
"license": "MIT",
"author": "Toru Nagashima",
"exports": {
".": {
"types": "./index.d.ts",
"import": "./index.mjs",
"default": "./index.js"
},
"./package.json": "./package.json"
},
"main": "index",
"files": [
"index.*"
],
"scripts": {
"prebuild": "npm run -s clean",
"build": "run-s build:*",
"build:tsc": "tsc --module es2015",
"build:rollup": "rollup -c",
"build:dts": "npm run -s build:tsc -- --removeComments false && dts-bundle --name @eslint-community/regexpp --main .temp/index.d.ts --out ../index.d.ts && prettier --write index.d.ts",
"clean": "rimraf .temp index.*",
"lint": "eslint . --ext .ts",
"test": "nyc _mocha \"test/*.ts\" --reporter dot --timeout 10000",
"debug": "mocha --require ts-node/register/transpile-only \"test/*.ts\" --reporter dot --timeout 10000",
"update:test": "ts-node scripts/update-fixtures.ts",
"update:unicode": "run-s update:unicode:*",
"update:unicode:ids": "ts-node scripts/update-unicode-ids.ts",
"update:unicode:props": "ts-node scripts/update-unicode-properties.ts",
"update:test262:extract": "ts-node -T scripts/extract-test262.ts",
"preversion": "npm test && npm run -s build",
"postversion": "git push && git push --tags",
"prewatch": "npm run -s clean",
"watch": "_mocha \"test/*.ts\" --require ts-node/register --reporter dot --timeout 10000 --watch-extensions ts --watch --growl"
},
"dependencies": {},
"devDependencies": {
"@eslint-community/eslint-plugin-mysticatea": "^15.5.1",
"@rollup/plugin-node-resolve": "^14.1.0",
"@types/eslint": "^8.44.3",
"@types/jsdom": "^16.2.15",
"@types/mocha": "^9.1.1",
"@types/node": "^12.20.55",
"dts-bundle": "^0.7.3",
"eslint": "^8.50.0",
"js-tokens": "^8.0.2",
"jsdom": "^19.0.0",
"mocha": "^9.2.2",
"npm-run-all2": "^6.2.2",
"nyc": "^14.1.1",
"rimraf": "^3.0.2",
"rollup": "^2.79.1",
"rollup-plugin-sourcemaps": "^0.6.3",
"ts-node": "^10.9.1",
"typescript": "~5.0.2"
},
"engines": {
"node": "^12.0.0 || ^14.0.0 || >=16.0.0"
}
}
@@ -0,0 +1,17 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var GridRole = {
relatedConcepts: [{
module: 'ARIA',
concept: {
name: 'grid'
}
}],
type: 'widget'
};
var _default = GridRole;
exports.default = _default;
@@ -0,0 +1,63 @@
var $b6837c2f80a3c32f$exports = require("./useSelectableCollection.main.js");
var $836f880b12dcae5c$exports = require("./ListKeyboardDelegate.main.js");
var $lm2JY$reactariai18n = require("@react-aria/i18n");
var $lm2JY$react = require("react");
function $parcel$export(e, n, v, s) {
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
}
$parcel$export(module.exports, "useSelectableList", () => $bd230acee196f50c$export$b95089534ab7c1fd);
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
function $bd230acee196f50c$export$b95089534ab7c1fd(props) {
let { selectionManager: selectionManager, collection: collection, disabledKeys: disabledKeys, ref: ref, keyboardDelegate: keyboardDelegate, layoutDelegate: layoutDelegate } = props;
// By default, a KeyboardDelegate is provided which uses the DOM to query layout information (e.g. for page up/page down).
// When virtualized, the layout object will be passed in as a prop and override this.
let collator = (0, $lm2JY$reactariai18n.useCollator)({
usage: 'search',
sensitivity: 'base'
});
let disabledBehavior = selectionManager.disabledBehavior;
let delegate = (0, $lm2JY$react.useMemo)(()=>keyboardDelegate || new (0, $836f880b12dcae5c$exports.ListKeyboardDelegate)({
collection: collection,
disabledKeys: disabledKeys,
disabledBehavior: disabledBehavior,
ref: ref,
collator: collator,
layoutDelegate: layoutDelegate
}), [
keyboardDelegate,
layoutDelegate,
collection,
disabledKeys,
ref,
collator,
disabledBehavior
]);
let { collectionProps: collectionProps } = (0, $b6837c2f80a3c32f$exports.useSelectableCollection)({
...props,
ref: ref,
selectionManager: selectionManager,
keyboardDelegate: delegate
});
return {
listProps: collectionProps
};
}
//# sourceMappingURL=useSelectableList.main.js.map
@@ -0,0 +1,129 @@
import {
IProduce,
IProduceWithPatches,
Immer,
Draft,
Immutable
} from "./internal"
export {
Draft,
WritableDraft,
Immutable,
Patch,
PatchListener,
Producer,
original,
current,
isDraft,
isDraftable,
NOTHING as nothing,
DRAFTABLE as immerable,
freeze,
Objectish,
StrictMode
} from "./internal"
const immer = new Immer()
/**
* The `produce` function takes a value and a "recipe function" (whose
* return value often depends on the base state). The recipe function is
* free to mutate its first argument however it wants. All mutations are
* only ever applied to a __copy__ of the base state.
*
* Pass only a function to create a "curried producer" which relieves you
* from passing the recipe function every time.
*
* Only plain objects and arrays are made mutable. All other objects are
* considered uncopyable.
*
* Note: This function is __bound__ to its `Immer` instance.
*
* @param {any} base - the initial state
* @param {Function} producer - function that receives a proxy of the base state as first argument and which can be freely modified
* @param {Function} patchListener - optional function that will be called with all the patches produced here
* @returns {any} a new state, or the initial state if nothing was modified
*/
export const produce: IProduce = /* @__PURE__ */ immer.produce
/**
* Like `produce`, but `produceWithPatches` always returns a tuple
* [nextState, patches, inversePatches] (instead of just the next state)
*/
export const produceWithPatches: IProduceWithPatches = /* @__PURE__ */ immer.produceWithPatches.bind(
immer
)
/**
* Pass true to automatically freeze all copies created by Immer.
*
* Always freeze by default, even in production mode
*/
export const setAutoFreeze = /* @__PURE__ */ immer.setAutoFreeze.bind(immer)
/**
* Pass true to enable strict shallow copy.
*
* By default, immer does not copy the object descriptors such as getter, setter and non-enumrable properties.
*/
export const setUseStrictShallowCopy = /* @__PURE__ */ immer.setUseStrictShallowCopy.bind(
immer
)
/**
* Pass false to use loose iteration that only processes enumerable string properties.
* This skips symbols and non-enumerable properties for maximum performance.
*
* By default, strict iteration is enabled (includes all own properties).
*/
export const setUseStrictIteration = /* @__PURE__ */ immer.setUseStrictIteration.bind(
immer
)
/**
* Apply an array of Immer patches to the first argument.
*
* This function is a producer, which means copy-on-write is in effect.
*/
export const applyPatches = /* @__PURE__ */ immer.applyPatches.bind(immer)
/**
* Create an Immer draft from the given base state, which may be a draft itself.
* The draft can be modified until you finalize it with the `finishDraft` function.
*/
export const createDraft = /* @__PURE__ */ immer.createDraft.bind(immer)
/**
* Finalize an Immer draft from a `createDraft` call, returning the base state
* (if no changes were made) or a modified copy. The draft must *not* be
* mutated afterwards.
*
* Pass a function as the 2nd argument to generate Immer patches based on the
* changes that were made.
*/
export const finishDraft = /* @__PURE__ */ immer.finishDraft.bind(immer)
/**
* This function is actually a no-op, but can be used to cast an immutable type
* to an draft type and make TypeScript happy
*
* @param value
*/
export function castDraft<T>(value: T): Draft<T> {
return value as any
}
/**
* This function is actually a no-op, but can be used to cast a mutable type
* to an immutable type and make TypeScript happy
* @param value
*/
export function castImmutable<T>(value: T): Immutable<T> {
return value as any
}
export {Immer}
export {enablePatches} from "./plugins/patches"
export {enableMapSet} from "./plugins/mapset"
@@ -0,0 +1,105 @@
/**
* Is the given value a valid oneof group?
*
* We represent protobuf `oneof` as algebraic data types (ADT) in generated
* code. But when working with messages of unknown type, the ADT does not
* help us.
*
* This type guard checks if the given object adheres to the ADT rules, which
* are as follows:
*
* 1) Must be an object.
*
* 2) Must have a "oneofKind" discriminator property.
*
* 3) If "oneofKind" is `undefined`, no member field is selected. The object
* must not have any other properties.
*
* 4) If "oneofKind" is a `string`, the member field with this name is
* selected.
*
* 5) If a member field is selected, the object must have a second property
* with this name. The property must not be `undefined`.
*
* 6) No extra properties are allowed. The object has either one property
* (no selection) or two properties (selection).
*
*/
export function isOneofGroup(any) {
if (typeof any != 'object' || any === null || !any.hasOwnProperty('oneofKind')) {
return false;
}
switch (typeof any.oneofKind) {
case "string":
if (any[any.oneofKind] === undefined)
return false;
return Object.keys(any).length == 2;
case "undefined":
return Object.keys(any).length == 1;
default:
return false;
}
}
/**
* Returns the value of the given field in a oneof group.
*/
export function getOneofValue(oneof, kind) {
return oneof[kind];
}
export function setOneofValue(oneof, kind, value) {
if (oneof.oneofKind !== undefined) {
delete oneof[oneof.oneofKind];
}
oneof.oneofKind = kind;
if (value !== undefined) {
oneof[kind] = value;
}
}
export function setUnknownOneofValue(oneof, kind, value) {
if (oneof.oneofKind !== undefined) {
delete oneof[oneof.oneofKind];
}
oneof.oneofKind = kind;
if (value !== undefined && kind !== undefined) {
oneof[kind] = value;
}
}
/**
* Removes the selected field in a oneof group.
*
* Note that the recommended way to modify a oneof group is to set
* a new object:
*
* ```ts
* message.result = { oneofKind: undefined };
* ```
*/
export function clearOneofValue(oneof) {
if (oneof.oneofKind !== undefined) {
delete oneof[oneof.oneofKind];
}
oneof.oneofKind = undefined;
}
/**
* Returns the selected value of the given oneof group.
*
* Not that the recommended way to access a oneof group is to check
* the "oneofKind" property and let TypeScript narrow down the union
* type for you:
*
* ```ts
* if (message.result.oneofKind === "error") {
* message.result.error; // string
* }
* ```
*
* In the rare case you just need the value, and do not care about
* which protobuf field is selected, you can use this function
* for convenience.
*/
export function getSelectedOneofValue(oneof) {
if (oneof.oneofKind === undefined) {
return undefined;
}
return oneof[oneof.oneofKind];
}
@@ -0,0 +1,19 @@
import {characterEntities} from 'character-entities'
// To do: next major: use `Object.hasOwn`.
const own = {}.hasOwnProperty
/**
* Decode a single character reference (without the `&` or `;`).
* You probably only need this when you’re building parsers yourself that follow
* different rules compared to HTML.
* This is optimized to be tiny in browsers.
*
* @param {string} value
* `notin` (named), `#123` (deci), `#x123` (hexa).
* @returns {string|false}
* Decoded reference.
*/
export function decodeNamedCharacterReference(value) {
return own.call(characterEntities, value) ? characterEntities[value] : false
}
@@ -0,0 +1,33 @@
export declare function decodeProfileLikeTip(buffer: Uint8Array): import("napcat-protobuf").any;
subType: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.INT32, false, false>;
content: import("napcat-protobuf").MessageProtoFieldType<() => {
msg: import("napcat-protobuf").MessageProtoFieldType<() => {
times: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.INT32, false, false>;
time: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.INT32, false, false>;
detail: import("napcat-protobuf").MessageProtoFieldType<() => {
txt: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, false, false>;
uin: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.INT64, false, false>;
nickname: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, false, false>;
}, false, false>;
}, false, false>;
}, false, false>;
}>;
export declare function decodeSysMessage(buffer: Uint8Array): import("napcat-protobuf").any {
PeerNumber: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
PeerString: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, false, false>;
Uin: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
Uid: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, true, false>;
}, false, true>;
msgSpec: import("napcat-protobuf").MessageProtoFieldType<() => {
msgType: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
subType: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
subSubType: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
msgSeq: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
time: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
msgId: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT64, false, false>;
other: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
}, false, true>;
bodyWrapper: import("napcat-protobuf").MessageProtoFieldType<() => {
wrappedBody: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.BYTES, false, false>;
}, false, false>;
}>;
@@ -0,0 +1,6 @@
import {
MonitorMobileIcon
} from "./chunk-UMZA7SPC.mjs";
export {
MonitorMobileIcon
};
@@ -0,0 +1 @@
{"name":"content-type","version":"1.0.5","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532088704,"integrity":"sha512-kUNaSudr3oFelR5CZj+LZI645SXrXybwmMu3E9V/JfRHYL4ydGdNrdTEB/F0xUkqq5sp6AX8JPXg07nfFh3F5Q==","mode":420,"size":1089},"index.js":{"checkedAt":1794532088705,"integrity":"sha512-1Fj4li9E7DC/UZpUrvBjlg2crCqVRJM4P8LvRngcMkR0DxjH2vGCG04Lq71Ws1Yij3JHzkDenzJ23pGnHGbHjA==","mode":420,"size":5002},"package.json":{"checkedAt":1794532088705,"integrity":"sha512-nzJAgGevp0ivjSO0u74mV+VmAXQ11OrR5jttEvi+u2ceqCNTowI0C7bxzNSFKjy47TQKOor5zQWL02ZTs81Lyw==","mode":420,"size":1075},"HISTORY.md":{"checkedAt":1794532088705,"integrity":"sha512-FCZrOZJ5TpWebO0JrvSJEvh6j1ndYHDOzJI9XKhrnrSCHy/l61B4wB24Mu6f9Y9spwrmh6nh0d5hRMr+RKD2yg==","mode":420,"size":523},"README.md":{"checkedAt":1794532088706,"integrity":"sha512-WJkdncxHL1bZO/abZe9sXQsfStCglKgSQR510yrb6aVP+zc53etx3O1ZG/K+IgdAvBev9+kIcGnA3OlKmbNGjw==","mode":420,"size":2782}}}
@@ -0,0 +1,290 @@
var DuplexStream = require('readable-stream/duplex')
, util = require('util')
, Buffer = require('safe-buffer').Buffer
function BufferList (callback) {
if (!(this instanceof BufferList))
return new BufferList(callback)
this._bufs = []
this.length = 0
if (typeof callback == 'function') {
this._callback = callback
var piper = function piper (err) {
if (this._callback) {
this._callback(err)
this._callback = null
}
}.bind(this)
this.on('pipe', function onPipe (src) {
src.on('error', piper)
})
this.on('unpipe', function onUnpipe (src) {
src.removeListener('error', piper)
})
} else {
this.append(callback)
}
DuplexStream.call(this)
}
util.inherits(BufferList, DuplexStream)
BufferList.prototype._offset = function _offset (offset) {
var tot = 0, i = 0, _t
if (offset === 0) return [ 0, 0 ]
for (; i < this._bufs.length; i++) {
_t = tot + this._bufs[i].length
if (offset < _t || i == this._bufs.length - 1)
return [ i, offset - tot ]
tot = _t
}
}
BufferList.prototype.append = function append (buf) {
var i = 0
if (Buffer.isBuffer(buf)) {
this._appendBuffer(buf);
} else if (Array.isArray(buf)) {
for (; i < buf.length; i++)
this.append(buf[i])
} else if (buf instanceof BufferList) {
// unwrap argument into individual BufferLists
for (; i < buf._bufs.length; i++)
this.append(buf._bufs[i])
} else if (buf != null) {
// coerce number arguments to strings, since Buffer(number) does
// uninitialized memory allocation
if (typeof buf == 'number')
buf = buf.toString()
this._appendBuffer(Buffer.from(buf));
}
return this
}
BufferList.prototype._appendBuffer = function appendBuffer (buf) {
this._bufs.push(buf)
this.length += buf.length
}
BufferList.prototype._write = function _write (buf, encoding, callback) {
this._appendBuffer(buf)
if (typeof callback == 'function')
callback()
}
BufferList.prototype._read = function _read (size) {
if (!this.length)
return this.push(null)
size = Math.min(size, this.length)
this.push(this.slice(0, size))
this.consume(size)
}
BufferList.prototype.end = function end (chunk) {
DuplexStream.prototype.end.call(this, chunk)
if (this._callback) {
this._callback(null, this.slice())
this._callback = null
}
}
BufferList.prototype.get = function get (index) {
return this.slice(index, index + 1)[0]
}
BufferList.prototype.slice = function slice (start, end) {
if (typeof start == 'number' && start < 0)
start += this.length
if (typeof end == 'number' && end < 0)
end += this.length
return this.copy(null, 0, start, end)
}
BufferList.prototype.copy = function copy (dst, dstStart, srcStart, srcEnd) {
if (typeof srcStart != 'number' || srcStart < 0)
srcStart = 0
if (typeof srcEnd != 'number' || srcEnd > this.length)
srcEnd = this.length
if (srcStart >= this.length)
return dst || Buffer.alloc(0)
if (srcEnd <= 0)
return dst || Buffer.alloc(0)
var copy = !!dst
, off = this._offset(srcStart)
, len = srcEnd - srcStart
, bytes = len
, bufoff = (copy && dstStart) || 0
, start = off[1]
, l
, i
// copy/slice everything
if (srcStart === 0 && srcEnd == this.length) {
if (!copy) { // slice, but full concat if multiple buffers
return this._bufs.length === 1
? this._bufs[0]
: Buffer.concat(this._bufs, this.length)
}
// copy, need to copy individual buffers
for (i = 0; i < this._bufs.length; i++) {
this._bufs[i].copy(dst, bufoff)
bufoff += this._bufs[i].length
}
return dst
}
// easy, cheap case where it's a subset of one of the buffers
if (bytes <= this._bufs[off[0]].length - start) {
return copy
? this._bufs[off[0]].copy(dst, dstStart, start, start + bytes)
: this._bufs[off[0]].slice(start, start + bytes)
}
if (!copy) // a slice, we need something to copy in to
dst = Buffer.allocUnsafe(len)
for (i = off[0]; i < this._bufs.length; i++) {
l = this._bufs[i].length - start
if (bytes > l) {
this._bufs[i].copy(dst, bufoff, start)
bufoff += l
} else {
this._bufs[i].copy(dst, bufoff, start, start + bytes)
bufoff += l
break
}
bytes -= l
if (start)
start = 0
}
// safeguard so that we don't return uninitialized memory
if (dst.length > bufoff) return dst.slice(0, bufoff)
return dst
}
BufferList.prototype.shallowSlice = function shallowSlice (start, end) {
start = start || 0
end = end || this.length
if (start < 0)
start += this.length
if (end < 0)
end += this.length
var startOffset = this._offset(start)
, endOffset = this._offset(end)
, buffers = this._bufs.slice(startOffset[0], endOffset[0] + 1)
if (endOffset[1] == 0)
buffers.pop()
else
buffers[buffers.length-1] = buffers[buffers.length-1].slice(0, endOffset[1])
if (startOffset[1] != 0)
buffers[0] = buffers[0].slice(startOffset[1])
return new BufferList(buffers)
}
BufferList.prototype.toString = function toString (encoding, start, end) {
return this.slice(start, end).toString(encoding)
}
BufferList.prototype.consume = function consume (bytes) {
// first, normalize the argument, in accordance with how Buffer does it
bytes = Math.trunc(bytes)
// do nothing if not a positive number
if (Number.isNaN(bytes) || bytes <= 0) return this
while (this._bufs.length) {
if (bytes >= this._bufs[0].length) {
bytes -= this._bufs[0].length
this.length -= this._bufs[0].length
this._bufs.shift()
} else {
this._bufs[0] = this._bufs[0].slice(bytes)
this.length -= bytes
break
}
}
return this
}
BufferList.prototype.duplicate = function duplicate () {
var i = 0
, copy = new BufferList()
for (; i < this._bufs.length; i++)
copy.append(this._bufs[i])
return copy
}
BufferList.prototype.destroy = function destroy () {
this._bufs.length = 0
this.length = 0
this.push(null)
}
;(function () {
var methods = {
'readDoubleBE' : 8
, 'readDoubleLE' : 8
, 'readFloatBE' : 4
, 'readFloatLE' : 4
, 'readInt32BE' : 4
, 'readInt32LE' : 4
, 'readUInt32BE' : 4
, 'readUInt32LE' : 4
, 'readInt16BE' : 2
, 'readInt16LE' : 2
, 'readUInt16BE' : 2
, 'readUInt16LE' : 2
, 'readInt8' : 1
, 'readUInt8' : 1
}
for (var m in methods) {
(function (m) {
BufferList.prototype[m] = function (offset) {
return this.slice(offset, offset + methods[m])[m](0)
}
}(m))
}
}())
module.exports = BufferList
@@ -0,0 +1,309 @@
# CHANGELOG
### [2.5.1](https://github.com/winstonjs/logform/compare/v2.5.0...v2.5.1)
**2023/02/07**
## Bugfix
The triple-beam types package has been promoted to a full dependency, by first-time contributor @carboneater (Thanks!)
in https://github.com/winstonjs/logform/pull/243 to fix https://github.com/winstonjs/logform/issues/242.
### [2.5.0](https://github.com/winstonjs/logform/compare/v2.4.2...v2.5.0)
**2023/02/06**
## Most Important:
* Now incompatible with TypeScript < 4.4 due to [PR #240](https://github.com/winstonjs/logform/pull/240), as pointed out in [#244](https://github.com/winstonjs/logform/issues/244).
## Improvements
All the improvements in this release are from first-time contributors - thanks for your contributions!
* Feature - optionally include Error.cause property by @davidnbooth in https://github.com/winstonjs/logform/pull/226
* Add triple beam properties to types by @robinpokorny in https://github.com/winstonjs/logform/pull/194
* TransformableInfo should support symbols as keys by @dancrumb in https://github.com/winstonjs/logform/pull/240
## Dependency updates by @dependabot
* Bump @babel/cli from 7.18.6 to 7.19.3 by @dependabot in https://github.com/winstonjs/logform/pull/214
* Bump @babel/core from 7.18.6 to 7.20.12 by @dependabot in https://github.com/winstonjs/logform/pull/212
and https://github.com/winstonjs/logform/pull/237
* Bump @babel/preset-env from 7.18.6 to 7.20.2 by @dependabot in https://github.com/winstonjs/logform/pull/217
and https://github.com/winstonjs/logform/pull/225
* Bump eslint from 8.19.0 to 8.33.0 by @dependabot in https://github.com/winstonjs/logform/pull/215
and https://github.com/winstonjs/logform/pull/241
* Bump mocha from 10.0.0 to 10.2.0 by @dependabot in https://github.com/winstonjs/logform/pull/218
and https://github.com/winstonjs/logform/pull/232
* Bump safe-stable-stringify from 2.3.1 to 2.4.2 by @dependabot in https://github.com/winstonjs/logform/pull/206
and https://github.com/winstonjs/logform/pull/235
### [2.4.2](https://github.com/winstonjs/logform/compare/v2.4.1...v2.4.2)
**2022/07/05**
## Bugfixes
This patch-level release includes a fix for a crash on attempt to uncolorize Symbol.
Thanks to @Alexsey for that first contribution in https://github.com/winstonjs/logform/pull/188.
## Maintainability updates:
Line break styles were changed to be LF (instead of CRLF) more consistently so that linter warnings
aren't drowned out by notes about that.
## Dependency updates by @dependabot
* @babel/cli from 7.17.10 to 7.18.6 in https://github.com/winstonjs/logform/pull/187
* @babel/core from 7.18.5 to 7.18.6 in https://github.com/winstonjs/logform/pull/185
* @babel/preset-env from 7.18.2 to 7.18.6 in https://github.com/winstonjs/logform/pull/184
* eslint from 8.18.0 to 8.19.0 in https://github.com/winstonjs/logform/pull/186
### 2.4.1
**2022/06/21**
- [#178] Change TransformableInfo message prop to any: Loosening types to fix #172 (thanks, @gregbair!)
- [#149] Adopted issue templates for reporting issues, affects GitHub project management only (thanks, @maverick1872!)
- Updated dependencies, from dependabot
### 2.4.0
**2022/02/12**
- Updated all dependencies
- [#135] Use CLI levels (not NPM levels) in `CliFormat` (this was likely a typo originally)
- [#134] Expose `safe-stable-stringify` 2.x options as parameters in `JsonOptions`
### 2.3.2
**2022/01/09**
This update, which also used up version number 2.3.1, pinned the version of the `colors` dependency
due to vandalism by a developer of that package, as noted [here](https://www.bleepingcomputer.com/news/security/dev-corrupts-npm-libs-colors-and-faker-breaking-thousands-of-apps/).
[As discussed in the `winston` package](https://github.com/winstonjs/winston/issues/2011), all users should update to this (or a later version, should one exist) ASAP.
### 2.3.0
**2021/09/21**
- Update dependencies
- Removing some superfluous semicolons & commas lint
- Avoid dynamic requires [#117]
- Replace JSON stringify library "fast-safe-stringify" by "safe-stable-stringify" [#98]
- More correctly format errors even if the “message” property is enumerable [#101]
- Fix errors and ms export for browsers [#106]
### 2.2.0
**2020/06/21**
- [#90], [#91] Add option for using stable stringify when formatting as JSON.
- [#84] Add replacer for BigInt on JSON formatter.
- [#79] Timestamp format type definitions can accept functions.
- Update dependencies and fix most of the oustanding npm audit notices.
### 2.1.2
**2019/01/31**
- [#74] Remove all internal symbols before invoking `util.inspect`.
- Related to [#31].
### 2.1.1
**2019/01/29**
- [#71] Bump logform to be consistent with winston.
- Fixes https://github.com/winstonjs/winston/issues/1584
### 2.1.0
**2019/01/07**
- [#59], [#68], [#69] Add error normalizing format.
- [#65] When MESSAGE symbol has a value and `{ all: true }` is set, colorize the entire serialized message.
### 2.0.0
**2018/12/23**
- **BREAKING** [#57] Try better fix for [winston#1485]. See:
[New `splat` behavior`](#new-splat-behavior) below.
- [#54] Fix typo in `README.md`
- [#55] Strip info[LEVEL] in prettyPrint. Fixes [#31].
- [#56] Document built-in formats.
- [#64] Add TypeScript definitions for all format options.
Relates to [#9] and [#48].
#### New `splat` behavior
Previously `splat` would have added a `meta` property for any additional
`info[SPLAT]` beyond the expected number of tokens.
**As of `logform@2.0.0`,** `format.splat` assumes additional splat paramters
(aka "metas") are objects and merges enumerable properties into the `info`.
e.g.
``` js
const { format } = require('logform');
const { splat } = format;
const { MESSAGE, LEVEL, SPLAT } = require('triple-beam');
console.log(
// Expects two tokens, but three splat parameters provided.
splat().transform({
level: 'info',
message: 'Let us %s for %j',
[LEVEL]: 'info',
[MESSAGE]: 'Let us %s for %j',
[SPLAT]: ['objects', { label: 'sure' }, { thisIsMeta: 'wut' }]
})
);
// logform@1.x behavior:
// Added "meta" property.
//
// { level: 'info',
// message: 'Let us objects for {"label":"sure"}',
// meta: { thisIsMeta: 'wut' },
// [Symbol(level)]: 'info',
// [Symbol(message)]: 'Let us %s for %j',
// [Symbol(splat)]: [ 'objects', { label: 'sure' } ] }
// logform@2.x behavior:
// Enumerable properties assigned into `info`.
//
// { level: 'info',
// message: 'Let us objects for {"label":"sure"}',
// thisIsMeta: 'wut',
// [Symbol(level)]: 'info',
// [Symbol(message)]: 'Let us %s for %j',
// [Symbol(splat)]: [ 'objects', { label: 'sure' } ] }
```
The reason for this change is to be consistent with how `winston` itself
handles `meta` objects in its variable-arity conventions.
**BE ADVISED** previous "metas" that _were not objects_ will very likely lead
to odd behavior. e.g.
``` js
const { format } = require('logform');
const { splat } = format;
const { MESSAGE, LEVEL, SPLAT } = require('triple-beam');
console.log(
// Expects two tokens, but three splat parameters provided.
splat().transform({
level: 'info',
message: 'Let us %s for %j',
[LEVEL]: 'info',
[MESSAGE]: 'Let us %s for %j',
// !!NOTICE!! Additional parameters are a string and an Array
[SPLAT]: ['objects', { label: 'sure' }, 'lol', ['ok', 'why']]
})
);
// logform@1.x behavior:
// Added "meta" property.
//
// { level: 'info',
// message: 'Let us objects for {"label":"sure"}',
// meta: ['lol', ['ok', 'why']],
// [Symbol(level)]: 'info',
// [Symbol(message)]: 'Let us %s for %j',
// [Symbol(splat)]: [ 'objects', { label: 'sure' } ] }
// logform@2.x behavior: Enumerable properties assigned into `info`.
// **Strings and Arrays only have NUMERIC enumerable properties!**
//
// { '0': 'ok',
// '1': 'why',
// '2': 'l',
// level: 'info',
// message: 'Let us objects for {"label":"sure"}',
// [Symbol(level)]: 'info',
// [Symbol(message)]: 'Let us %s for %j',
// [Symbol(splat)]: [ 'objects', { label: 'sure' } ] }
```
### 1.10.0
**2018/09/17**
- [#52] Add types field in package.json.
- [#46], [#49] Changes for splat when there are no tokens present and no splat present.
- [#47], [#53] Expose transpiled code for Browser-only scenarios.
### 1.9.1
**2018/06/26**
- [#39] Don't break when there are % placeholders but no values.
- [#42] Only set `meta` when non-zero additional `SPLAT` arguments are
provided. (Fixes [winstonjs/winston#1358]).
### 1.9.0
**2018/06/12**
- [#38] Migrate functionality from winston Logger to splat format.
- [#37] Match expectations from `winston@2.x` for padLevels. Create a correct `Cli` format with initial state. (Fixes [#36]).
### 1.8.0
**2018/06/11**
- [#35] Use `fast-safe-stringify` for perf and to support circular refs.
- [#34] Colorize level symbol.
### 1.7.0
**2018/05/24**
- [#28] Use more es6-features across the board.
- [#30] Fix combine return value.
- [#29] Add metadata function to format namespace.
### 1.6.0
**2018/04/25**
- [#25] Implement padLevels format.
- [#26] Update `dependencies` and add `node@10` to the travis build of the project.
- [#27] Refactor logform to use triple-beam.
### 1.5.0
**2018/04/22**
- [#23], (@ChrisAlderson) Add ms format to support '+N ms' format. Fixes #20.
- [#24], (@aneilbaboo) Fix `webpack` warnings.
- Add `.travis.yml`.
### 1.4.2
**2018/04/19**
- [#22], (@Jasu) Fix compilation on Babel 6.
### 1.4.1
**2018/04/06**
- [#21], (@dabh) Add tsconfig.json. Fixes #19.
### 1.4.0
**2018/03/23**
- [#14] @iamkirkbater Added Initial Metadata Support.
- Correct JSDoc for printf.js. Fixes #10.
### 1.3.0
**2018/03/16**
- [#18] Expose browser.js for rollup and the like. Fixes [#5].
- [#13] @dabh Use new version of colors.
- [#15] @dabh Add Typescript typings (ported from DefinitelyTyped).
- [#17], [#16] Fix error messages other typos.
### 1.2.2
**2017/12/05**
- [#4], [#11] Fix timestamp and replace `date-fns` with `fecha` (with test cases) [`@ChrisAlderson`].
### 1.2.1
**2017/10/01**
- [#3] Strip `info.splat` in `format.simple` to avoid double inclusion.
### 1.2.0
**2017/09/30**
- Transition from `info.raw` to `info[Symbol.for('message')]`.
- Finish `README.md` except for full list of all built-in formats.
- 100% coverage for everything except for `{ align, cli, padLevels }`.
### 1.1.0
**2017/09/29**
- [#2] Add baseline expected formats that were previously exposed as options to `common.log` in `winston@2.x` and below.
- [#2] Introduce `format.combine` to remove inconsistency in behavior between `format(fn0)` and `format(fn0, ...moreFns)`.
- [#2] `README.md` now covers all of the basics for `logform`.
### 1.0.0
**2017/09/26**
- Initial release.
[winstonjs/winston#1358]: https://github.com/winstonjs/winston/issues/1358
@@ -0,0 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=BindingConstraints.js.map
@@ -0,0 +1,27 @@
import {useLayoutEffect as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c} from "./useLayoutEffect.mjs";
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
function $e7801be82b4b2a53$export$4debdb1a3f0fa79e(context, ref) {
(0, $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c)(()=>{
if (context && context.ref && ref) {
context.ref.current = ref.current;
return ()=>{
if (context.ref) context.ref.current = null;
};
}
});
}
export {$e7801be82b4b2a53$export$4debdb1a3f0fa79e as useSyncRef};
//# sourceMappingURL=useSyncRef.module.js.map
@@ -0,0 +1,35 @@
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [v1.0.2](https://github.com/inspect-js/is-data-view/compare/v1.0.1...v1.0.2) - 2024-12-11
### Commits
- [types] use shared config [`3a80072`](https://github.com/inspect-js/is-data-view/commit/3a800720dd322ea4656f29d28f1d28117fb94537)
- [actions] split out node 10-20, and 20+ [`e2f37fd`](https://github.com/inspect-js/is-data-view/commit/e2f37fdf421c4629730406c2b61d5481dce4e448)
- [Dev Deps] update `@ljharb/eslint-config`, `@ljharb/tsconfig`, `@types/node`, `@types/object-inspect`, `@types/tape`, `auto-changelog`, `es-value-fixtures`, `object-inspect`, `tape` [`6f8e9dd`](https://github.com/inspect-js/is-data-view/commit/6f8e9dda376e421d30dd94e891bea3fbae7967ee)
- [Dev Deps] update `@types/node`, `available-typed-arrays`, `tape` [`37be591`](https://github.com/inspect-js/is-data-view/commit/37be59163c8df9abb016bbb4c7d76f3af549f1d2)
- [Fix] add missing dependencies; use `call-bound` directly [`34de4b5`](https://github.com/inspect-js/is-data-view/commit/34de4b5f5448ca1bb95c34686c51b5351904a317)
- [Tests] replace `aud` with `npm audit` [`aa7060a`](https://github.com/inspect-js/is-data-view/commit/aa7060ad77c9ba2d500b124b73662c3b069fc721)
- [Dev Deps] add missing peer dep [`3d302d7`](https://github.com/inspect-js/is-data-view/commit/3d302d7dbf99d75fcf4a3de14687e423ec88728f)
## [v1.0.1](https://github.com/inspect-js/is-data-view/compare/v1.0.0...v1.0.1) - 2024-02-02
### Commits
- [patch] add types [`c2728ef`](https://github.com/inspect-js/is-data-view/commit/c2728ef20064bba2588eed503a0c2e36985b638a)
- [Dev Deps] update `aud`, `available-typed-arrays`, `has-tostringtag`, `npmignore`, `object-inspect`, `tape` [`e7f9ebc`](https://github.com/inspect-js/is-data-view/commit/e7f9ebccf9aacdc112dd4f665271c96417ddfa64)
- [Deps] update `is-typed-array` [`2ca9333`](https://github.com/inspect-js/is-data-view/commit/2ca9333516afac321431ddae02d6791d50e8d5c2)
## v1.0.0 - 2024-01-31
### Commits
- Initial implementation, tests, readme [`6f7e424`](https://github.com/inspect-js/is-data-view/commit/6f7e4244ae9d766309b8f050c0b786e9c0692825)
- Initial commit [`4b7ea57`](https://github.com/inspect-js/is-data-view/commit/4b7ea57d6942dd268bcda990a96b8cd663b19eb8)
- npm init [`25130e2`](https://github.com/inspect-js/is-data-view/commit/25130e2dbecc91d398cf74c39878aa89f5e604ab)
- Only apps should have lockfiles [`18cde47`](https://github.com/inspect-js/is-data-view/commit/18cde474201a292ebdaa704d232127c814cb1d0e)
@@ -0,0 +1,205 @@
import * as proto from '../../../packet/transformer/proto';
import { OidbPacket, PacketTransformer } from '../../../packet/transformer/base';
import { IndexNode } from '../../../packet/transformer/proto';
declare class DownloadVideo extends PacketTransformer<typeof proto.NTV2RichMediaResp> {
build(selfUid: string, node: any): OidbPacket;
parse(data: Buffer): import("napcat-protobuf").any {
common: import("napcat-protobuf").MessageProtoFieldType<() => {
RequestId: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
Command: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
}, false, false>;
retCode: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
message: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, false, false>;
}, false, false>;
upload: import("napcat-protobuf").MessageProtoFieldType<() => {
uKey: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, true, false>;
uKeyTtlSecond: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
ipv4s: import("napcat-protobuf").MessageProtoFieldType<() => {
outIP: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
outPort: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
inIP: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
inPort: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
ipType: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
}, false, true>;
ipv6s: import("napcat-protobuf").MessageProtoFieldType<() => {
outIP: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
outPort: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
inIP: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
inPort: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
ipType: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
}, false, true>;
msgSeq: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT64, false, false>;
msgInfo: import("napcat-protobuf").MessageProtoFieldType<() => {
MsgInfoBody: import("napcat-protobuf").MessageProtoFieldType<() => {
Index: import("napcat-protobuf").MessageProtoFieldType<() => {
Info: import("napcat-protobuf").MessageProtoFieldType<() => {
FileSize: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
FileHash: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, false, false>;
FileSha1: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, false, false>;
FileName: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, false, false>;
Type: import("napcat-protobuf").MessageProtoFieldType<() => {
Type: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
PicFormat: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
VideoFormat: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
VoiceFormat: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
}, false, false>;
Width: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
Height: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
Time: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
Original: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
}, false, false>;
FileUuid: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, false, false>;
StoreId: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
UploadTime: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
Ttl: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
SubType: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
}, false, false>;
Picture: import("napcat-protobuf").MessageProtoFieldType<() => {
UrlPath: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, false, false>;
Ext: import("napcat-protobuf").MessageProtoFieldType<() => {
OriginalParameter: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, false, false>;
BigParameter: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, false, false>;
ThumbParameter: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, false, false>;
}, false, false>;
Domain: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, false, false>;
}, false, false>;
Video: import("napcat-protobuf").MessageProtoFieldType<() => {}, false, false>;
Audio: import("napcat-protobuf").MessageProtoFieldType<() => {}, false, false>;
FileExist: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BOOL, false, false>;
HashSum: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
}, false, true>;
ExtBizInfo: import("napcat-protobuf").MessageProtoFieldType<() => {
Pic: import("napcat-protobuf").MessageProtoFieldType<() => {
BizType: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
TextSummary: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, false, false>;
BytesPbReserveC2c: import("napcat-protobuf").MessageProtoFieldType<() => {
subType: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
field3: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
field4: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
field8: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, false, false>;
field10: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
field12: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, false, false>;
field18: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, false, false>;
field19: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, false, false>;
field20: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
}, false, false>;
BytesPbReserveTroop: import("napcat-protobuf").MessageProtoFieldType<() => {
subType: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
field3: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
field4: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
field9: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, false, false>;
field10: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
field12: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, false, false>;
field18: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, false, false>;
field19: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, false, false>;
field21: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
}, false, false>;
FromScene: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
ToScene: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
OldFileId: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
}, false, false>;
Video: import("napcat-protobuf").MessageProtoFieldType<() => {
FromScene: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
ToScene: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
BytesPbReserve: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
}, false, false>;
Ptt: import("napcat-protobuf").MessageProtoFieldType<() => {
SrcUin: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT64, false, false>;
PttScene: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
PttType: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
ChangeVoice: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
Waveform: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
AutoConvertText: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
BytesReserve: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
BytesPbReserve: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
BytesGeneralFlags: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
}, false, false>;
BusiType: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
}, false, false>;
}, false, false>;
ext: import("napcat-protobuf").MessageProtoFieldType<() => {
subType: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
extType: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
extValue: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
}, false, true>;
compatQMsg: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
subFileInfos: import("napcat-protobuf").MessageProtoFieldType<() => {
subType: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
uKey: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, false, false>;
uKeyTtlSecond: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
ipv4s: import("napcat-protobuf").MessageProtoFieldType<() => {
outIP: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
outPort: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
inIP: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
inPort: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
ipType: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
}, false, true>;
ipv6s: import("napcat-protobuf").MessageProtoFieldType<() => {
outIP: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
outPort: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
inIP: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
inPort: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
ipType: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
}, false, true>;
}, false, true>;
}, false, false>;
download: import("napcat-protobuf").MessageProtoFieldType<() => {
rKeyParam: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, false, false>;
rKeyTtlSecond: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
info: import("napcat-protobuf").MessageProtoFieldType<() => {
domain: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, false, false>;
urlPath: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, false, false>;
httpsPort: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
ipv4s: import("napcat-protobuf").MessageProtoFieldType<() => {
outIP: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
outPort: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
inIP: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
inPort: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
ipType: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
}, false, true>;
ipv6s: import("napcat-protobuf").MessageProtoFieldType<() => {
outIP: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
outPort: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
inIP: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
inPort: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
ipType: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
}, false, true>;
picUrlExtInfo: import("napcat-protobuf").MessageProtoFieldType<() => {
OriginalParameter: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, false, false>;
BigParameter: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, false, false>;
ThumbParameter: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, false, false>;
}, false, false>;
videoExtInfo: import("napcat-protobuf").MessageProtoFieldType<() => {
VideoCodecFormat: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
}, false, false>;
}, false, false>;
rKeyCreateTime: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
}, false, false>;
downloadRKey: import("napcat-protobuf").MessageProtoFieldType<() => {
rKeys: import("napcat-protobuf").MessageProtoFieldType<() => {
rkey: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, false, false>;
rkeyTtlSec: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT64, false, false>;
storeId: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
rkeyCreateTime: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, true, false>;
type: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, true, false>;
}, false, true>;
}, false, false>;
delete: import("napcat-protobuf").MessageProtoFieldType<() => {}, false, false>;
uploadCompleted: import("napcat-protobuf").MessageProtoFieldType<() => {
msgSeq: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT64, false, false>;
}, false, false>;
msgInfoAuth: import("napcat-protobuf").MessageProtoFieldType<() => {
authCode: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT32, false, false>;
msg: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, false, false>;
resultTime: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT64, false, false>;
}, false, false>;
uploadKeyRenewal: import("napcat-protobuf").MessageProtoFieldType<() => {
ukey: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.STRING, false, false>;
ukeyTtlSec: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.UINT64, false, false>;
}, false, false>;
downloadSafe: import("napcat-protobuf").MessageProtoFieldType<() => {}, false, false>;
extension: import("napcat-protobuf").ScalarProtoFieldType<import("napcat-protobuf").ScalarType.BYTES, true, false>;
}>;
}
declare const _default: DownloadVideo;
export default _default;
@@ -0,0 +1,21 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.NullThrowsReasons = void 0;
exports.nullThrows = nullThrows;
/**
* A set of common reasons for calling nullThrows
*/
exports.NullThrowsReasons = {
MissingParent: 'Expected node to have a parent.',
MissingToken: (token, thing) => `Expected to find a ${token} for the ${thing}.`,
};
/**
* Assert that a value must not be null or undefined.
* This is a nice explicit alternative to the non-null assertion operator.
*/
function nullThrows(value, message) {
if (value == null) {
throw new Error(`Non-null Assertion Failed: ${message}`);
}
return value;
}
@@ -0,0 +1,40 @@
'use strict';
const os = require('os');
const extractPathRegex = /\s+at.*(?:\(|\s)(.*)\)?/;
const pathRegex = /^(?:(?:(?:node|(?:internal\/[\w/]*|.*node_modules\/(?:babel-polyfill|pirates)\/.*)?\w+)\.js:\d+:\d+)|native)/;
const homeDir = typeof os.homedir === 'undefined' ? '' : os.homedir();
module.exports = (stack, options) => {
options = Object.assign({pretty: false}, options);
return stack.replace(/\\/g, '/')
.split('\n')
.filter(line => {
const pathMatches = line.match(extractPathRegex);
if (pathMatches === null || !pathMatches[1]) {
return true;
}
const match = pathMatches[1];
// Electron
if (
match.includes('.app/Contents/Resources/electron.asar') ||
match.includes('.app/Contents/Resources/default_app.asar')
) {
return false;
}
return !pathRegex.test(match);
})
.filter(line => line.trim() !== '')
.map(line => {
if (options.pretty) {
return line.replace(extractPathRegex, (m, p1) => m.replace(p1, p1.replace(homeDir, '~')));
}
return line;
})
.join('\n');
};
@@ -0,0 +1,11 @@
export { Section as BaseSection } from '@react-stately/collections';
import { SectionProps as SectionProps$1 } from '@react-types/shared';
import { As, HTMLHeroUIProps } from '@heroui/system';
/**
* A modified version of the SectionProps from @react-types/shared, with the addition of the HeroUI props.
*
*/
type SectionProps<Type extends As = "div", T extends object = {}> = SectionProps$1<T> & Omit<HTMLHeroUIProps<Type>, "children">;
export type { SectionProps };
@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('sortedLastIndexOf', require('../sortedLastIndexOf'));
func.placeholder = require('./placeholder');
module.exports = func;
@@ -0,0 +1,22 @@
The MIT License (MIT)
Copyright (c) 2015-2025 Remo H. Jansen
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,30 @@
{
"root": true,
"extends": "@ljharb",
"rules": {
"id-length": "off",
"new-cap": ["error", {
"capIsNewExceptions": [
"IsRegExp",
"RequireObjectCoercible",
"ToIntegerOrInfinity",
"ToString",
],
}],
"no-magic-numbers": "off",
},
"overrides": [
{
"files": "tests/**/*",
"rules": {
"func-style": "off",
"max-lines-per-function": "off",
"max-statements-per-line": "off",
"no-magic-numbers": "off",
},
},
]
}
@@ -0,0 +1,12 @@
'use strict';
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/11.0/#sec-numeric-types-number-subtract
module.exports = function NumberSubtract(x, y) {
if (typeof x !== 'number' || typeof y !== 'number') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers');
}
return x - y;
};
@@ -0,0 +1,6 @@
/** @license
* eventsource.js
* Available under MIT License (MIT)
* https://github.com/Yaffle/EventSource/
*/
!function(e){"use strict";var r,H=e.setTimeout,N=e.clearTimeout,j=e.XMLHttpRequest,o=e.XDomainRequest,t=e.ActiveXObject,n=e.EventSource,i=e.document,w=e.Promise,d=e.fetch,a=e.Response,h=e.TextDecoder,s=e.TextEncoder,p=e.AbortController;function c(){this.bitsNeeded=0,this.codePoint=0}"undefined"==typeof window||void 0===i||"readyState"in i||null!=i.body||(i.readyState="loading",window.addEventListener("load",function(e){i.readyState="complete"},!1)),null==j&&null!=t&&(j=function(){return new t("Microsoft.XMLHTTP")}),null==Object.create&&(Object.create=function(e){function t(){}return t.prototype=e,new t}),Date.now||(Date.now=function(){return(new Date).getTime()}),null==p&&(r=d,d=function(e,t){var n=t.signal;return r(e,{headers:t.headers,credentials:t.credentials,cache:t.cache}).then(function(e){var t=e.body.getReader();return n._reader=t,n._aborted&&n._reader.cancel(),{status:e.status,statusText:e.statusText,headers:e.headers,body:{getReader:function(){return t}}}})},p=function(){this.signal={_reader:null,_aborted:!1},this.abort=function(){null!=this.signal._reader&&this.signal._reader.cancel(),this.signal._aborted=!0}}),c.prototype.decode=function(e){function t(e,t,n){if(1===n)return 128>>t<=e&&e<<t<=2047;if(2===n)return 2048>>t<=e&&e<<t<=55295||57344>>t<=e&&e<<t<=65535;if(3===n)return 65536>>t<=e&&e<<t<=1114111;throw new Error}function n(e,t){if(6===e)return 15<t>>6?3:31<t?2:1;if(12===e)return 15<t?3:2;if(18===e)return 3;throw new Error}for(var r="",o=this.bitsNeeded,i=this.codePoint,a=0;a<e.length;a+=1){var s=e[a];0!==o&&(s<128||191<s||!t(i<<6|63&s,o-6,n(o,i)))&&(o=0,i=65533,r+=String.fromCharCode(i)),0===o?(i=0<=s&&s<=127?(o=0,s):192<=s&&s<=223?(o=6,31&s):224<=s&&s<=239?(o=12,15&s):240<=s&&s<=247?(o=18,7&s):(o=0,65533),0===o||t(i,o,n(o,i))||(o=0,i=65533)):(o-=6,i=i<<6|63&s),0===o&&(i<=65535?r+=String.fromCharCode(i):r=(r+=String.fromCharCode(55296+(i-65535-1>>10)))+String.fromCharCode(56320+(i-65535-1&1023)))}return this.bitsNeeded=o,this.codePoint=i,r};function u(){}null!=h&&null!=s&&function(){try{return"test"===(new h).decode((new s).encode("test"),{stream:!0})}catch(e){}return!1}()||(h=c);function I(e){this.withCredentials=!1,this.readyState=0,this.status=0,this.statusText="",this.responseText="",this.onprogress=u,this.onload=u,this.onerror=u,this.onreadystatechange=u,this._contentType="",this._xhr=e,this._sendTimeout=0,this._abort=u}function l(e){return e.replace(/[A-Z]/g,function(e){return String.fromCharCode(e.charCodeAt(0)+32)})}function f(e){for(var t=Object.create(null),n=e.split("\r\n"),r=0;r<n.length;r+=1){var o=n[r].split(": "),i=o.shift(),o=o.join(": ");t[l(i)]=o}this._map=t}function P(){}function y(e){this._headers=e}function L(){}function M(){this._listeners=Object.create(null)}function b(e){H(function(){throw e},0)}function v(e){this.type=e,this.target=void 0}function $(e,t){v.call(this,e),this.data=t.data,this.lastEventId=t.lastEventId}function q(e,t){v.call(this,e),this.status=t.status,this.statusText=t.statusText,this.headers=t.headers}function F(e,t){v.call(this,e),this.error=t.error}I.prototype.open=function(e,t){this._abort(!0);var o=this,i=this._xhr,a=1,n=0,r=(this._abort=function(e){0!==o._sendTimeout&&(N(o._sendTimeout),o._sendTimeout=0),1!==a&&2!==a&&3!==a||(a=4,i.onload=u,i.onerror=u,i.onabort=u,i.onprogress=u,i.onreadystatechange=u,i.abort(),0!==n&&(N(n),n=0),e||(o.readyState=4,o.onabort(null),o.onreadystatechange())),a=0},function(){if(1===a){var t=0,n="",r=void 0;if("contentType"in i)t=200,n="OK",r=i.contentType;else try{t=i.status,n=i.statusText,r=i.getResponseHeader("Content-Type")}catch(e){n="",r=void(t=0)}0!==t&&(a=2,o.readyState=2,o.status=t,o.statusText=n,o._contentType=r,o.onreadystatechange())}}),s=function(){if(r(),2===a||3===a){a=3;var e="";try{e=i.responseText}catch(e){}o.readyState=3,o.responseText=e,o.onprogress()}},c=function(e,t){if(null!=t&&null!=t.preventDefault||(t={preventDefault:u}),s(),1===a||2===a||3===a){if(a=4,0!==n&&(N(n),n=0),o.readyState=4,"load"===e)o.onload(t);else if("error"===e)o.onerror(t);else{if("abort"!==e)throw new TypeError;o.onabort(t)}o.onreadystatechange()}},l=function(){n=H(function(){l()},500),3===i.readyState&&s()};"onload"in i&&(i.onload=function(e){c("load",e)}),"onerror"in i&&(i.onerror=function(e){c("error",e)}),"onabort"in i&&(i.onabort=function(e){c("abort",e)}),"onprogress"in i&&(i.onprogress=s),"onreadystatechange"in i&&(i.onreadystatechange=function(e){e=e,null!=i&&(4===i.readyState?"onload"in i&&"onerror"in i&&"onabort"in i||c(""===i.responseText?"error":"load",e):3===i.readyState?"onprogress"in i||s():2===i.readyState&&r())}),!("contentType"in i)&&"ontimeout"in j.prototype||(t+=(-1===t.indexOf("?")?"?":"&")+"padding=true"),i.open(e,t,!0),"readyState"in i&&(n=H(function(){l()},0))},I.prototype.abort=function(){this._abort(!1)},I.prototype.getResponseHeader=function(e){return this._contentType},I.prototype.setRequestHeader=function(e,t){var n=this._xhr;"setRequestHeader"in n&&n.setRequestHeader(e,t)},I.prototype.getAllReLine truncated
@@ -0,0 +1,10 @@
"use client";
// src/base/table-column.tsx
import { Column } from "@react-stately/table";
var TableColumn = Column;
var table_column_default = TableColumn;
export {
table_column_default
};
@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('pullAll', require('../pullAll'));
func.placeholder = require('./placeholder');
module.exports = func;
@@ -0,0 +1 @@
module.exports={A:{D:{"1":"TB UB VB WB XB YB I XC MC YC","2":"J ZB K D E F A B C L M G N","33":"0 1 2 3 4 5 6 7 8 9 O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB"},L:{"1":"I"},B:{"1":"TB UB VB WB XB YB I","2":"C L M G N O P","33":"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"},C:{"1":"0 1 2 3 4 5 g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC yC zC","2":"6 7 8 9 xC TC J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB 0C 1C","33":"tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f"},M:{"1":"MC"},A:{"2":"K D E F A B wC"},F:{"1":"4 5","2":"F B C FD GD HD ID NC uC JD OC","33":"0 1 2 3 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 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"},K:{"2":"A B C NC uC OC","33":"H"},E:{"1":"cC PC AD QC dC eC fC gC hC BD RC iC jC kC lC mC CD SC nC oC pC qC rC sC tC DD","2":"J ZB 2C ZC 3C ED","33":"K D E F A B C L M G 4C 5C 6C aC NC OC 7C 8C 9C bC"},G:{"1":"cC PC eD QC dC eC fC gC hC fD RC iC jC kC lC mC gD SC nC oC pC qC rC sC tC","2":"ZC KD vC LD","33":"E MD ND OD PD QD RD SD TD UD VD WD XD YD ZD aD bD cD dD bC"},P:{"1":"FB","33":"6 7 8 9 J AB BB CB DB EB oD pD qD rD sD aC tD uD vD wD xD QC RC SC yD"},I:{"1":"I","2":"TC J iD jD kD lD vC","33":"mD nD"}},B:6,C:"print-color-adjust property",D:undefined};
@@ -0,0 +1 @@
{"mappings":"AAAA,iBAAiB;IAAG,kBAAkB,CAAC,OAAS,CAAC,QAAQ,EAAE,KAAK,IAAI,CAAC,oBAAc,CAAC;IAClF,qBAAqB,CAAC,qEAAmD,CAAC;IAC1E,UAAU,CAAC,aAAO,CAAC;IACnB,eAAe,CAAC,4BAAsB,CAAC;IACvC,iBAAiB,CAAC,MAAM,YAAc,GAAG,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE;YAAC,MAAM,CAAC,kCAA4B,CAAC;YAAE,KAAK,IAAM,CAAC,+BAAyB,EAAE,UAAU,MAAM,CAAC,KAAK,KAAK,GAAG;YAAE,OAAO,IAAM,CAAC,+BAAyB,EAAE,UAAU,MAAM,CAAC,KAAK,KAAK,GAAG;QAAA,GAAG,CAAC,CAAC;IAChQ,gBAAgB,CAAC,OAAS,CAAC,uBAAiB,EAAE,KAAK,IAAI,CAAC,CAAC,CAAC;AAC5D","sources":["packages/@react-aria/grid/intl/lv-LV.json"],"sourcesContent":["{\n \"deselectedItem\": \"Vienums {item} nav atlasīts.\",\n \"longPressToSelect\": \"Ilgi turiet nospiestu. lai ieslēgtu atlases režīmu.\",\n \"select\": \"Atlasīt\",\n \"selectedAll\": \"Atlasīti visi vienumi.\",\n \"selectedCount\": \"{count, plural, =0 {Nav atlasīts neviens vienums} one {Atlasīto vienumu skaits: #} other {Atlasīto vienumu skaits: #}}.\",\n \"selectedItem\": \"Atlasīts vienums {item}.\"\n}\n"],"names":[],"version":3,"file":"lv-LV.main.js.map"}
@@ -0,0 +1,12 @@
# These are supported funding model platforms
github: [ljharb]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: npm/resolve
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
@@ -0,0 +1,115 @@
/**
* @fileoverview Really small utility functions that didn't deserve their own files
*/
import type { TSESLint, TSESTree } from '@typescript-eslint/utils';
import type { RuleContext } from '@typescript-eslint/utils/ts-eslint';
import * as ts from 'typescript';
/**
* Check if the context file name is *.d.ts or *.d.tsx
*/
export declare function isDefinitionFile(fileName: string): boolean;
/**
* Upper cases the first character or the string
*/
export declare function upperCaseFirst(str: string): string;
export declare function arrayGroupByToMap<T, Key extends number | string>(array: T[], getKey: (item: T) => Key): Map<Key, T[]>;
/** Return true if both parameters are equal. */
export type Equal<T> = (a: T, b: T) => boolean;
export declare function arraysAreEqual<T>(a: T[] | undefined, b: T[] | undefined, eq: (a: T, b: T) => boolean): boolean;
/** Returns the first non-`undefined` result. */
export declare function findFirstResult<T, U>(inputs: T[], getResult: (t: T) => U | undefined): U | undefined;
/**
* Gets a string representation of the name of the index signature.
*/
export declare function getNameFromIndexSignature(node: TSESTree.TSIndexSignature): string;
export declare enum MemberNameType {
Private = 1,
Quoted = 2,
Normal = 3,
Expression = 4
}
/**
* Gets a string name representation of the name of the given MethodDefinition
* or PropertyDefinition node, with handling for computed property names.
*/
export declare function getNameFromMember(member: TSESTree.AccessorProperty | TSESTree.MethodDefinition | TSESTree.Property | TSESTree.PropertyDefinition | TSESTree.TSAbstractAccessorProperty | TSESTree.TSAbstractMethodDefinition | TSESTree.TSAbstractPropertyDefinition | TSESTree.TSMethodSignature | TSESTree.TSPropertySignature, sourceCode: TSESLint.SourceCode): {
name: string;
type: MemberNameType;
};
export type ExcludeKeys<Obj extends Record<string, unknown>, Keys extends keyof Obj> = {
[k in Exclude<keyof Obj, Keys>]: Obj[k];
};
export type RequireKeys<Obj extends Record<string, unknown>, Keys extends keyof Obj> = {
[k in Keys]-?: Exclude<Obj[k], undefined>;
} & ExcludeKeys<Obj, Keys>;
export declare function getEnumNames<T extends string>(myEnum: Record<T, unknown>): T[];
/**
* Given an array of words, returns an English-friendly concatenation, separated with commas, with
* the `and` clause inserted before the last item.
*
* Example: ['foo', 'bar', 'baz' ] returns the string "foo, bar, and baz".
*/
export declare function formatWordList(words: string[]): string;
/**
* Iterates the array in reverse and returns the index of the first element it
* finds which passes the predicate function.
*
* @returns Returns the index of the element if it finds it or -1 otherwise.
*/
export declare function findLastIndex<T>(members: T[], predicate: (member: T) => boolean | null | undefined): number;
export declare function typeNodeRequiresParentheses(node: TSESTree.TypeNode, text: string): boolean;
export declare function isRestParameterDeclaration(decl: ts.Declaration): boolean;
export declare function isParenlessArrowFunction(node: TSESTree.ArrowFunctionExpression, sourceCode: TSESLint.SourceCode): boolean;
export type NodeWithKey = TSESTree.AccessorProperty | TSESTree.MemberExpression | TSESTree.MethodDefinition | TSESTree.Property | TSESTree.PropertyDefinition | TSESTree.TSAbstractMethodDefinition | TSESTree.TSAbstractPropertyDefinition;
/**
* Gets a member being accessed or declared if its value can be determined statically, and
* resolves it to the string or symbol value that will be used as the actual member
* access key at runtime. Otherwise, returns `undefined`.
*
* ```ts
* x.member // returns 'member'
* ^^^^^^^^
*
* x?.member // returns 'member' (optional chaining is treated the same)
* ^^^^^^^^^
*
* x['value'] // returns 'value'
* ^^^^^^^^^^
*
* x[Math.random()] // returns undefined (not a static value)
* ^^^^^^^^^^^^^^^^
*
* arr[0] // returns '0' (NOT 0)
* ^^^^^^
*
* arr[0n] // returns '0' (NOT 0n)
* ^^^^^^^
*
* const s = Symbol.for('symbolName')
* x[s] // returns `Symbol.for('symbolName')` (since it's a static/global symbol)
* ^^^^
*
* const us = Symbol('symbolName')
* x[us] // returns undefined (since it's a unique symbol, so not statically analyzable)
* ^^^^^
*
* var object = {
* 1234: '4567', // returns '1234' (NOT 1234)
* ^^^^^^^^^^^^
* method() { } // returns 'method'
* ^^^^^^^^^^^^
* }
*
* class WithMembers {
* foo: string // returns 'foo'
* ^^^^^^^^^^^
* }
* ```
*/
export declare function getStaticMemberAccessValue(node: NodeWithKey, { sourceCode }: RuleContext<string, unknown[]>): string | symbol | undefined;
/**
* Answers whether the member expression looks like
* `x.value`, `x['value']`,
* or even `const v = 'value'; x[v]` (or optional variants thereof).
*/
export declare const isStaticMemberAccessOfValue: (memberExpression: NodeWithKey, context: RuleContext<string, unknown[]>, ...values: (string | symbol)[]) => boolean;
@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('assignInAll', require('../assignIn'));
func.placeholder = require('./placeholder');
module.exports = func;
@@ -0,0 +1,43 @@
import {useLocale as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7} from "./context.mjs";
import {MessageDictionary as $eZWU1$MessageDictionary, MessageFormatter as $eZWU1$MessageFormatter} from "@internationalized/message";
import {useMemo as $eZWU1$useMemo, useCallback as $eZWU1$useCallback} from "react";
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
const $321bc95feeb923dd$var$cache = new WeakMap();
function $321bc95feeb923dd$var$getCachedDictionary(strings) {
let dictionary = $321bc95feeb923dd$var$cache.get(strings);
if (!dictionary) {
dictionary = new (0, $eZWU1$MessageDictionary)(strings);
$321bc95feeb923dd$var$cache.set(strings, dictionary);
}
return dictionary;
}
function $321bc95feeb923dd$export$ec23bf898b1eed85(strings) {
let { locale: locale } = (0, $18f2051aff69b9bf$export$43bb16f9c6d9e3f7)();
let dictionary = (0, $eZWU1$useMemo)(()=>$321bc95feeb923dd$var$getCachedDictionary(strings), [
strings
]);
let formatter = (0, $eZWU1$useMemo)(()=>new (0, $eZWU1$MessageFormatter)(locale, dictionary), [
locale,
dictionary
]);
return (0, $eZWU1$useCallback)((key, variables)=>formatter.format(key, variables), [
formatter
]);
}
export {$321bc95feeb923dd$export$ec23bf898b1eed85 as useMessageFormatter};
//# sourceMappingURL=useMessageFormatter.module.js.map
@@ -0,0 +1 @@
{"name":"unbox-primitive","version":"1.1.0","requiresBuild":false,"files":{".editorconfig":{"checkedAt":1794532096675,"integrity":"sha512-gD3iQtgC7ZgFS97pyZqR0FPjMNyRAfat8dipbSL28iiJ6B1MP5dDeDYeEnP5sYMTz8whQIk3E5vltk2kcyJJEQ==","mode":420,"size":286},".eslintrc":{"checkedAt":1794532097719,"integrity":"sha512-4+yheARSL/pPQeg25245ejEKIOgmGjgRW2fotkREQVMDnQQZj7Rw9FvimX0senKxW9R3GgLHQbPLwHLqbvQy6Q==","mode":420,"size":43},".nycrc":{"checkedAt":1794532097719,"integrity":"sha512-42sgwWzusJB1Dzhl78jX/Zg65Oi0HDDMOGXS/Uklv1kCYn4fHtRsD/JFPwdu+d40vome9XdUspzRWEQAcTGEeQ==","mode":420,"size":216},"LICENSE":{"checkedAt":1794532097719,"integrity":"sha512-d2fjYr50p8QKjqC0qhH5nWv3sgAsKHHicw91kVzLPCZ54cpPIRw8zJk+nn45Y6q/yJ/T/xdxK77zBLuAvFgmVg==","mode":420,"size":1071},"index.js":{"checkedAt":1794532097719,"integrity":"sha512-w7ZLJ0uixQEw5fR93+HX6nQiwYbsIxfQQOPKD8OZR1Ue42ZVLMCggBQVnwaJCWFtROGxQO/KIThrvhyKt/Mtwg==","mode":420,"size":1532},"test/index.js":{"checkedAt":1794532097720,"integrity":"sha512-mH6fyQqUL0PYkAGCGqpSg1TgoV/ThiP2CGszHaU3SvINBibFQhjxsbhiow+ek8BbErvi/39KYu7WG6gXHUlZ0g==","mode":420,"size":1310},"package.json":{"checkedAt":1794532097720,"integrity":"sha512-YXcnK2L2SegiwlClPqrQ6xFf6kPEtsv27u9xCREqjC2obePk0i8Kh34x9CNDeySpa+G9N82r3ZI+3YX0/CVn4A==","mode":420,"size":2250},"tsconfig.json":{"checkedAt":1794532096676,"integrity":"sha512-5PVN2QwCdipEf/HqvEISP+T5Gs9JXgtkGqTuUVQ9gcH8p19OsuwIu4siAi50e9gFenuWIPWZcwc87TV1vj2u1A==","mode":420,"size":68},"CHANGELOG.md":{"checkedAt":1794532097720,"integrity":"sha512-AR/QOeVCPHeVWTcJG8mCqwh/1fMW36vzCIDoWyB+TyNB502pBmVtV+wBpMwIDS7CbEs1Vse7Lewe9gNp/3PVCA==","mode":420,"size":8556},"README.md":{"checkedAt":1794532097720,"integrity":"sha512-xAVrw68GCugMDwjDw4fBo4X0n9gL0b7I//sBCig44+gmx+n/0/j6xxtF2w8zrdoyMpp7KBzXSXRz9NT5wJje6g==","mode":420,"size":2140},"index.d.ts":{"checkedAt":1794532097720,"integrity":"sha512-3QPWSGvC3FcCPA1xYUDgi+AKKmdcDfUGAhNE4WbrVE987YBpfu97yMzQwag5Q46BlWyOeZrJ1HtYDwTFf9Yc0Q==","mode":420,"size":449},".github/FUNDING.yml":{"checkedAt":1794532097721,"integrity":"sha512-C00EE+6XV2kDPbcT9f6Eqrf/NCu3aFAG3AT7/WMfW/CbDNviFkb7OIYTpCQwgi+WdyJCmdjHxFJY5QhJuIHvEg==","mode":420,"size":586}}}
@@ -0,0 +1,4 @@
export function tap(value, mutator) {
mutator(value)
return value
}
@@ -0,0 +1,170 @@
'use strict'
const globals = require('globals')
const eslintPluginImportX = require('eslint-plugin-import-x')
const eslintPluginN = require('eslint-plugin-n')
// @ts-ignore
const eslintPluginPromise = require('eslint-plugin-promise')
module.exports = /** @satisfies {import('eslint').Linter.Config} */ ({
name: 'neostandard/base',
languageOptions: {
ecmaVersion: 2022,
sourceType: 'module',
globals: {
...globals.es2022,
...globals.node,
document: 'readonly',
navigator: 'readonly',
window: 'readonly',
},
},
plugins: {
'import-x': /** @type {import('eslint').ESLint.Plugin} */ (/** @type {unknown} */ (eslintPluginImportX)),
n: eslintPluginN,
promise: eslintPluginPromise,
},
rules: {
'no-var': 'warn',
'object-shorthand': ['warn', 'properties'],
'accessor-pairs': ['error', { setWithoutGet: true, enforceForClassMembers: true }],
'array-callback-return': ['error', {
allowImplicit: false,
checkForEach: false,
}],
camelcase: ['error', {
allow: ['^UNSAFE_'],
properties: 'never',
ignoreGlobals: true,
}],
'constructor-super': 'error',
curly: ['error', 'multi-line'],
'default-case-last': 'error',
'dot-notation': ['error', { allowKeywords: true }],
eqeqeq: ['error', 'always', { null: 'ignore' }],
'new-cap': ['error', { newIsCap: true, capIsNew: false, properties: true }],
'no-array-constructor': 'error',
'no-async-promise-executor': 'error',
'no-caller': 'error',
'no-case-declarations': 'error',
'no-class-assign': 'error',
'no-compare-neg-zero': 'error',
'no-cond-assign': 'error',
'no-const-assign': 'error',
'no-constant-condition': ['error', { checkLoops: false }],
'no-control-regex': 'error',
'no-debugger': 'error',
'no-delete-var': 'error',
'no-dupe-args': 'error',
'no-dupe-class-members': 'error',
'no-dupe-keys': 'error',
'no-duplicate-case': 'error',
'no-useless-backreference': 'error',
'no-empty': ['error', { allowEmptyCatch: true }],
'no-empty-character-class': 'error',
'no-empty-pattern': 'error',
'no-eval': 'error',
'no-ex-assign': 'error',
'no-extend-native': 'error',
'no-extra-bind': 'error',
'no-extra-boolean-cast': 'error',
'no-fallthrough': 'error',
'no-func-assign': 'error',
'no-global-assign': 'error',
'no-implied-eval': 'error',
'no-import-assign': 'error',
'no-invalid-regexp': 'error',
'no-irregular-whitespace': 'error',
'no-iterator': 'error',
'no-labels': ['error', { allowLoop: false, allowSwitch: false }],
'no-lone-blocks': 'error',
'no-loss-of-precision': 'error',
'no-misleading-character-class': 'error',
'no-prototype-builtins': 'error',
'no-useless-catch': 'error',
'no-multi-str': 'error',
'no-new': 'error',
'no-new-func': 'error',
'no-object-constructor': 'error',
'no-new-native-nonconstructor': 'error',
'no-new-wrappers': 'error',
'no-obj-calls': 'error',
'no-octal': 'error',
'no-octal-escape': 'error',
'no-proto': 'error',
'no-redeclare': ['error', { builtinGlobals: false }],
'no-regex-spaces': 'error',
'no-return-assign': ['error', 'except-parens'],
'no-self-assign': ['error', { props: true }],
'no-self-compare': 'error',
'no-sequences': 'error',
'no-shadow-restricted-names': 'error',
'no-sparse-arrays': 'error',
'no-template-curly-in-string': 'error',
'no-this-before-super': 'error',
'no-throw-literal': 'error',
'no-undef': 'error',
'no-undef-init': 'error',
'no-unexpected-multiline': 'error',
'no-unmodified-loop-condition': 'error',
'no-unneeded-ternary': ['error', { defaultAssignment: false }],
'no-unreachable': 'error',
'no-unreachable-loop': 'error',
'no-unsafe-finally': 'error',
'no-unsafe-negation': 'error',
'no-unused-expressions': ['error', {
allowShortCircuit: true,
allowTernary: true,
allowTaggedTemplates: true,
}],
'no-unused-vars': ['error', {
args: 'none',
caughtErrors: 'none',
ignoreRestSiblings: true,
vars: 'all',
}],
'no-use-before-define': ['error', { functions: false, classes: false, variables: false }],
'no-useless-call': 'error',
'no-useless-computed-key': 'error',
'no-useless-constructor': 'error',
'no-useless-escape': 'error',
'no-useless-rename': 'error',
'no-useless-return': 'error',
'no-void': 'error',
'no-with': 'error',
'one-var': ['error', { initialized: 'never' }],
'prefer-const': ['error', { destructuring: 'all' }],
'prefer-promise-reject-errors': 'error',
'prefer-regex-literals': ['error', { disallowRedundantWrapping: true }],
'symbol-description': 'error',
'unicode-bom': ['error', 'never'],
'use-isnan': ['error', {
enforceForSwitchCase: true,
enforceForIndexOf: true,
}],
'valid-typeof': ['error', { requireStringLiterals: true }],
yoda: ['error', 'never'],
'import-x/export': 'error',
'import-x/first': 'error',
'import-x/no-absolute-path': ['error', { esmodule: true, commonjs: true, amd: false }],
'import-x/no-duplicates': 'error',
'import-x/no-named-default': 'error',
'import-x/no-webpack-loader-syntax': 'error',
// TODO: Should only be active for server side scripts
'n/handle-callback-err': ['error', '^(err|error)$'],
'n/no-callback-literal': 'error',
'n/no-deprecated-api': 'error',
'n/no-exports-assign': 'error',
'n/no-new-require': 'error',
'n/no-path-concat': 'error',
'n/process-exit-as-throw': 'error',
'promise/param-names': 'error',
},
})
@@ -0,0 +1,31 @@
'use strict';
const Benchmark = require('benchmark');
const suite = new Benchmark.Suite;
const testData = require('./test.json');
const stringifyPackages = {
// 'JSON.stringify': JSON.stringify,
'fast-json-stable-stringify': require('../index'),
'json-stable-stringify': true,
'fast-stable-stringify': true,
'faster-stable-stringify': true
};
for (const name in stringifyPackages) {
let func = stringifyPackages[name];
if (func === true) func = require(name);
suite.add(name, function() {
func(testData);
});
}
suite
.on('cycle', (event) => console.log(String(event.target)))
.on('complete', function () {
console.log('The fastest is ' + this.filter('fastest').map('name'));
})
.run({async: true});
@@ -0,0 +1,10 @@
import { defineInjectionTokenMetadata } from "../reflection-helpers";
function inject(token, options) {
const data = {
token,
multiple: false,
isOptional: options && options.isOptional
};
return defineInjectionTokenMetadata(data);
}
export default inject;
@@ -0,0 +1,8 @@
import React from 'react';
import type { UniqueIdentifier } from '../../../../types';
export declare type Animation = (key: UniqueIdentifier, node: HTMLElement) => Promise<void> | void;
export interface Props {
animation: Animation;
children: React.ReactElement | null;
}
export declare function AnimationManager({ animation, children }: Props): JSX.Element;
@@ -0,0 +1 @@
{"mappings":";;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;AAOD,mFAAmF;AACnF,IAAI,kCAAY,QACd,OAAO,WAAW,eAClB,OAAO,QAAQ,IACf,OAAO,QAAQ,CAAC,aAAa;AAGxB,IAAI,4CAA2D,IAAI;AAC1E,8EAA8E;AAC9E,6EAA6E;AAC7E,6EAA6E;AAC7E,IAAI;AACJ,IAAI,OAAO,yBAAyB,aAClC,iCAAW,IAAI,qBAA6B,CAAC;IAC3C,0CAAc,MAAM,CAAC;AACvB;AAOK,SAAS,0CAAM,SAAkB;IACtC,IAAI,CAAC,OAAO,SAAS,GAAG,CAAA,GAAA,qBAAO,EAAE;IACjC,IAAI,SAAS,CAAA,GAAA,mBAAK,EAAE;IAEpB,IAAI,MAAM,CAAA,GAAA,gCAAW,EAAE;IACvB,IAAI,aAAa,CAAA,GAAA,mBAAK,EAAE;IAExB,IAAI,gCACF,+BAAS,QAAQ,CAAC,YAAY;IAGhC,IAAI,iCAAW;QACb,MAAM,aAAa,0CAAc,GAAG,CAAC;QACrC,IAAI,cAAc,CAAC,WAAW,QAAQ,CAAC,SACrC,WAAW,IAAI,CAAC;aAEhB,0CAAc,GAAG,CAAC,KAAK;YAAC;SAAO;IAEnC;IAEA,CAAA,GAAA,yCAAc,EAAE;QACd,IAAI,IAAI;QACR,OAAO;YACL,sDAAsD;YACtD,oEAAoE;YACpE,IAAI,gCACF,+BAAS,UAAU,CAAC;YAEtB,0CAAc,MAAM,CAAC;QACvB;IACF,GAAG;QAAC;KAAI;IAER,2EAA2E;IAC3E,2BAA2B;IAC3B,CAAA,GAAA,sBAAQ,EAAE;QACR,IAAI,QAAQ,OAAO,OAAO;QAC1B,IAAI,OAAS,SAAS;QAEtB,OAAO;YACL,IAAI,OAAS,OAAO,OAAO,GAAG;QAChC;IACF;IAEA,OAAO;AACT;AAMO,SAAS,0CAAS,GAAW,EAAE,GAAW;IAC/C,IAAI,QAAQ,KACV,OAAO;IAGT,IAAI,UAAU,0CAAc,GAAG,CAAC;IAChC,IAAI,SAAS;QACX,QAAQ,OAAO,CAAC,CAAA,MAAQ,IAAI,OAAO,GAAG;QACtC,OAAO;IACT;IAEA,IAAI,UAAU,0CAAc,GAAG,CAAC;IAChC,IAAI,SAAS;QACX,QAAQ,OAAO,CAAC,CAAC,MAAS,IAAI,OAAO,GAAG;QACxC,OAAO;IACT;IAEA,OAAO;AACT;AAOO,SAAS,0CAAU,WAA+B,EAAE;IACzD,IAAI,KAAK;IACT,IAAI,CAAC,YAAY,cAAc,GAAG,CAAA,GAAA,wCAAa,EAAE;IACjD,IAAI,WAAW,CAAA,GAAA,wBAAU,EAAE;QACzB,cAAc;YACZ,MAAM;YAEN,MAAM,SAAS,cAAc,CAAC,MAAM,KAAK;QAC3C;IACF,GAAG;QAAC;QAAI;KAAc;IAEtB,CAAA,GAAA,yCAAc,EAAE,UAAU;QAAC;QAAI;WAAa;KAAS;IAErD,OAAO;AACT","sources":["packages/@react-aria/utils/src/useId.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 {useCallback, useEffect, useRef, useState} from 'react';\nimport {useLayoutEffect} from './useLayoutEffect';\nimport {useSSRSafeId} from '@react-aria/ssr';\nimport {useValueEffect} from './';\n\n// copied from SSRProvider.tsx to reduce exports, if needed again, consider sharing\nlet canUseDOM = Boolean(\n typeof window !== 'undefined' &&\n window.document &&\n window.document.createElement\n);\n\nexport let idsUpdaterMap: Map<string, { current: string | null }[]> = new Map();\n// This allows us to clean up the idsUpdaterMap when the id is no longer used.\n// Map is a strong reference, so unused ids wouldn't be cleaned up otherwise.\n// This can happen in suspended components where mount/unmount is not called.\nlet registry;\nif (typeof FinalizationRegistry !== 'undefined') {\n registry = new FinalizationRegistry<string>((heldValue) => {\n idsUpdaterMap.delete(heldValue);\n });\n}\n\n/**\n * If a default is not provided, generate an id.\n * @param defaultId - Default component id.\n */\nexport function useId(defaultId?: string): string {\n let [value, setValue] = useState(defaultId);\n let nextId = useRef(null);\n\n let res = useSSRSafeId(value);\n let cleanupRef = useRef(null);\n\n if (registry) {\n registry.register(cleanupRef, res);\n }\n\n if (canUseDOM) {\n const cacheIdRef = idsUpdaterMap.get(res);\n if (cacheIdRef && !cacheIdRef.includes(nextId)) {\n cacheIdRef.push(nextId);\n } else {\n idsUpdaterMap.set(res, [nextId]);\n }\n }\n\n useLayoutEffect(() => {\n let r = res;\n return () => {\n // In Suspense, the cleanup function may be not called\n // when it is though, also remove it from the finalization registry.\n if (registry) {\n registry.unregister(cleanupRef);\n }\n idsUpdaterMap.delete(r);\n };\n }, [res]);\n\n // This cannot cause an infinite loop because the ref is always cleaned up.\n // eslint-disable-next-line\n useEffect(() => {\n let newId = nextId.current;\n if (newId) { setValue(newId); }\n\n return () => {\n if (newId) { nextId.current = null; }\n };\n });\n\n return res;\n}\n\n/**\n * Merges two ids.\n * Different ids will trigger a side-effect and re-render components hooked up with `useId`.\n */\nexport function mergeIds(idA: string, idB: string): string {\n if (idA === idB) {\n return idA;\n }\n\n let setIdsA = idsUpdaterMap.get(idA);\n if (setIdsA) {\n setIdsA.forEach(ref => (ref.current = idB));\n return idB;\n }\n\n let setIdsB = idsUpdaterMap.get(idB);\n if (setIdsB) {\n setIdsB.forEach((ref) => (ref.current = idA));\n return idA;\n }\n\n return idB;\n}\n\n/**\n * Used to generate an id, and after render, check if that id iLine truncated
@@ -0,0 +1,106 @@
var defaultIsMergeableObject = require('is-mergeable-object')
function emptyTarget(val) {
return Array.isArray(val) ? [] : {}
}
function cloneUnlessOtherwiseSpecified(value, options) {
return (options.clone !== false && options.isMergeableObject(value))
? deepmerge(emptyTarget(value), value, options)
: value
}
function defaultArrayMerge(target, source, options) {
return target.concat(source).map(function(element) {
return cloneUnlessOtherwiseSpecified(element, options)
})
}
function getMergeFunction(key, options) {
if (!options.customMerge) {
return deepmerge
}
var customMerge = options.customMerge(key)
return typeof customMerge === 'function' ? customMerge : deepmerge
}
function getEnumerableOwnPropertySymbols(target) {
return Object.getOwnPropertySymbols
? Object.getOwnPropertySymbols(target).filter(function(symbol) {
return Object.propertyIsEnumerable.call(target, symbol)
})
: []
}
function getKeys(target) {
return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target))
}
function propertyIsOnObject(object, property) {
try {
return property in object
} catch(_) {
return false
}
}
// Protects from prototype poisoning and unexpected merging up the prototype chain.
function propertyIsUnsafe(target, key) {
return propertyIsOnObject(target, key) // Properties are safe to merge if they don't exist in the target yet,
&& !(Object.hasOwnProperty.call(target, key) // unsafe if they exist up the prototype chain,
&& Object.propertyIsEnumerable.call(target, key)) // and also unsafe if they're nonenumerable.
}
function mergeObject(target, source, options) {
var destination = {}
if (options.isMergeableObject(target)) {
getKeys(target).forEach(function(key) {
destination[key] = cloneUnlessOtherwiseSpecified(target[key], options)
})
}
getKeys(source).forEach(function(key) {
if (propertyIsUnsafe(target, key)) {
return
}
if (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {
destination[key] = getMergeFunction(key, options)(target[key], source[key], options)
} else {
destination[key] = cloneUnlessOtherwiseSpecified(source[key], options)
}
})
return destination
}
function deepmerge(target, source, options) {
options = options || {}
options.arrayMerge = options.arrayMerge || defaultArrayMerge
options.isMergeableObject = options.isMergeableObject || defaultIsMergeableObject
// cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge()
// implementations can use it. The caller may not replace it.
options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified
var sourceIsArray = Array.isArray(source)
var targetIsArray = Array.isArray(target)
var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray
if (!sourceAndTargetTypesMatch) {
return cloneUnlessOtherwiseSpecified(source, options)
} else if (sourceIsArray) {
return options.arrayMerge(target, source, options)
} else {
return mergeObject(target, source, options)
}
}
deepmerge.all = function deepmergeAll(array, options) {
if (!Array.isArray(array)) {
throw new Error('first argument should be an array')
}
return array.reduce(function(prev, next) {
return deepmerge(prev, next, options)
}, {})
}
module.exports = deepmerge
@@ -0,0 +1 @@
{"version":3,"file":"isNotParentBindingConstraintsWithTag.js","sourceRoot":"","sources":["../../../../src/binding/calculations/isNotParentBindingConstraintsWithTag.ts"],"names":[],"mappings":";;AAKA,oFAKC;AARD,+EAA4E;AAC5E,mFAAgF;AAEhF,SAAgB,oCAAoC,CAClD,GAAgB,EAChB,KAAc;IAEd,OAAO,IAAA,6DAA6B,EAAC,IAAA,yDAA2B,EAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC;AAChF,CAAC"}
@@ -0,0 +1,19 @@
* text=auto
*.bat text eol=crlf
*.c text
*.cc text
*.gyp text
*.gypi text
*.h text
*.ps1 text eol=crlf
*.rst text
*.sh text
*.txt text
.gitignore text
.gitattributes text
Makefile text
configure text
*.sh eol=lf
configure eol=lf
VERSION.txt eol=lf
@@ -0,0 +1,131 @@
import type { $ZodStringFormats } from "../core/checks.js";
import type * as errors from "../core/errors.js";
import * as util from "../core/util.js";
const error: () => errors.$ZodErrorMap = () => {
const Sizable: Record<string, { unit: string; verb: string }> = {
string: { unit: "문자", verb: "to have" },
file: { unit: "바이트", verb: "to have" },
array: { unit: "개", verb: "to have" },
set: { unit: "개", verb: "to have" },
};
function getSizing(origin: string): { unit: string; verb: string } | null {
return Sizable[origin] ?? null;
}
const parsedType = (data: any): string => {
const t = typeof data;
switch (t) {
case "number": {
return Number.isNaN(data) ? "NaN" : "number";
}
case "object": {
if (Array.isArray(data)) {
return "array";
}
if (data === null) {
return "null";
}
if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
return data.constructor.name;
}
}
}
return t;
};
const Nouns: {
[k in $ZodStringFormats | (string & {})]?: string;
} = {
regex: "입력",
email: "이메일 주소",
url: "URL",
emoji: "이모지",
uuid: "UUID",
uuidv4: "UUIDv4",
uuidv6: "UUIDv6",
nanoid: "nanoid",
guid: "GUID",
cuid: "cuid",
cuid2: "cuid2",
ulid: "ULID",
xid: "XID",
ksuid: "KSUID",
datetime: "ISO 날짜시간",
date: "ISO 날짜",
time: "ISO 시간",
duration: "ISO 기간",
ipv4: "IPv4 주소",
ipv6: "IPv6 주소",
cidrv4: "IPv4 범위",
cidrv6: "IPv6 범위",
base64: "base64 인코딩 문자열",
base64url: "base64url 인코딩 문자열",
json_string: "JSON 문자열",
e164: "E.164 번호",
jwt: "JWT",
template_literal: "입력",
};
return (issue) => {
switch (issue.code) {
case "invalid_type":
return `잘못된 입력: 예상 타입은 ${issue.expected}, 받은 타입은 ${parsedType(issue.input)}입니다`;
case "invalid_value":
if (issue.values.length === 1)
return `잘못된 입력: 값은 ${util.stringifyPrimitive(issue.values[0])} 이어야 합니다`;
return `잘못된 옵션: ${util.joinValues(issue.values, "또는 ")} 중 하나여야 합니다`;
case "too_big": {
const adj = issue.inclusive ? "이하" : "미만";
const suffix = adj === "미만" ? "이어야 합니다" : "여야 합니다";
const sizing = getSizing(issue.origin);
const unit = sizing?.unit ?? "요소";
if (sizing) return `${issue.origin ?? "값"}이 너무 큽니다: ${issue.maximum.toString()}${unit} ${adj}${suffix}`;
return `${issue.origin ?? "값"}이 너무 큽니다: ${issue.maximum.toString()} ${adj}${suffix}`;
}
case "too_small": {
const adj = issue.inclusive ? "이상" : "초과";
const suffix = adj === "이상" ? "이어야 합니다" : "여야 합니다";
const sizing = getSizing(issue.origin);
const unit = sizing?.unit ?? "요소";
if (sizing) {
return `${issue.origin ?? "값"}이 너무 작습니다: ${issue.minimum.toString()}${unit} ${adj}${suffix}`;
}
return `${issue.origin ?? "값"}이 너무 작습니다: ${issue.minimum.toString()} ${adj}${suffix}`;
}
case "invalid_format": {
const _issue = issue as errors.$ZodStringFormatIssues;
if (_issue.format === "starts_with") {
return `잘못된 문자열: "${_issue.prefix}"(으)로 시작해야 합니다`;
}
if (_issue.format === "ends_with") return `잘못된 문자열: "${_issue.suffix}"(으)로 끝나야 합니다`;
if (_issue.format === "includes") return `잘못된 문자열: "${_issue.includes}"을(를) 포함해야 합니다`;
if (_issue.format === "regex") return `잘못된 문자열: 정규식 ${_issue.pattern} 패턴과 일치해야 합니다`;
return `잘못된 ${Nouns[_issue.format] ?? issue.format}`;
}
case "not_multiple_of":
return `잘못된 숫자: ${issue.divisor}의 배수여야 합니다`;
case "unrecognized_keys":
return `인식할 수 없는 키: ${util.joinValues(issue.keys, ", ")}`;
case "invalid_key":
return `잘못된 키: ${issue.origin}`;
case "invalid_union":
return `잘못된 입력`;
case "invalid_element":
return `잘못된 값: ${issue.origin}`;
default:
return `잘못된 입력`;
}
};
};
export default function (): { localeError: errors.$ZodErrorMap } {
return {
localeError: error(),
};
}
@@ -0,0 +1,29 @@
var baseGt = require('./_baseGt'),
createRelationalOperation = require('./_createRelationalOperation');
/**
* Checks if `value` is greater than `other`.
*
* @static
* @memberOf _
* @since 3.9.0
* @category Lang
* @param {*} value The value to compare.
* @param {*} other The other value to compare.
* @returns {boolean} Returns `true` if `value` is greater than `other`,
* else `false`.
* @see _.lt
* @example
*
* _.gt(3, 1);
* // => true
*
* _.gt(3, 3);
* // => false
*
* _.gt(1, 3);
* // => false
*/
var gt = createRelationalOperation(baseGt);
module.exports = gt;
@@ -0,0 +1,321 @@
/**
* @file OS/2表
* @author mengke01(kekee000@gmail.com)
*
* http://www.microsoft.com/typography/otspec/os2.htm
*/
import table from './table';
import struct from './struct';
export default table.create(
'OS/2',
[
['version', struct.Uint16],
['xAvgCharWidth', struct.Int16],
['usWeightClass', struct.Uint16],
['usWidthClass', struct.Uint16],
['fsType', struct.Uint16],
['ySubscriptXSize', struct.Uint16],
['ySubscriptYSize', struct.Uint16],
['ySubscriptXOffset', struct.Uint16],
['ySubscriptYOffset', struct.Uint16],
['ySuperscriptXSize', struct.Uint16],
['ySuperscriptYSize', struct.Uint16],
['ySuperscriptXOffset', struct.Uint16],
['ySuperscriptYOffset', struct.Uint16],
['yStrikeoutSize', struct.Uint16],
['yStrikeoutPosition', struct.Uint16],
['sFamilyClass', struct.Uint16],
// Panose
['bFamilyType', struct.Uint8],
['bSerifStyle', struct.Uint8],
['bWeight', struct.Uint8],
['bProportion', struct.Uint8],
['bContrast', struct.Uint8],
['bStrokeVariation', struct.Uint8],
['bArmStyle', struct.Uint8],
['bLetterform', struct.Uint8],
['bMidline', struct.Uint8],
['bXHeight', struct.Uint8],
// unicode range
['ulUnicodeRange1', struct.Uint32],
['ulUnicodeRange2', struct.Uint32],
['ulUnicodeRange3', struct.Uint32],
['ulUnicodeRange4', struct.Uint32],
// char 4
['achVendID', struct.String, 4],
['fsSelection', struct.Uint16],
['usFirstCharIndex', struct.Uint16],
['usLastCharIndex', struct.Uint16],
['sTypoAscender', struct.Int16],
['sTypoDescender', struct.Int16],
['sTypoLineGap', struct.Int16],
['usWinAscent', struct.Uint16],
['usWinDescent', struct.Uint16],
// version 0 above 39
['ulCodePageRange1', struct.Uint32],
['ulCodePageRange2', struct.Uint32],
// version 1 above 41
['sxHeight', struct.Int16],
['sCapHeight', struct.Int16],
['usDefaultChar', struct.Uint16],
['usBreakChar', struct.Uint16],
['usMaxContext', struct.Uint16]
// version 2,3,4 above 46
],
{
read(reader, ttf) {
const format = reader.readUint16(this.offset);
let struct = this.struct;
// format2
if (format === 0) {
struct = struct.slice(0, 39);
}
else if (format === 1) {
struct = struct.slice(0, 41);
}
const OS2Head = table.create('os2head', struct);
const tbl = new OS2Head(this.offset).read(reader, ttf);
// 补齐其他version的字段
const os2Fields = {
ulCodePageRange1: 1,
ulCodePageRange2: 0,
sxHeight: 0,
sCapHeight: 0,
usDefaultChar: 0,
usBreakChar: 32,
usMaxContext: 0
};
return Object.assign(os2Fields, tbl);
},
size(ttf) {
// 更新其他表的统计信息
// header
let xMin = 16384;
let yMin = 16384;
let xMax = -16384;
let yMax = -16384;
// hhea
let advanceWidthMax = -1;
let minLeftSideBearing = 16384;
let minRightSideBearing = 16384;
let xMaxExtent = -16384;
// os2 count
let xAvgCharWidth = 0;
let usFirstCharIndex = 0x10FFFF;
let usLastCharIndex = -1;
// maxp
let maxPoints = 0;
let maxContours = 0;
let maxCompositePoints = 0;
let maxCompositeContours = 0;
let maxSizeOfInstructions = 0;
let maxComponentElements = 0;
let glyfNotEmpty = 0; // 非空glyf
const hinting = ttf.writeOptions ? ttf.writeOptions.hinting : false;
// 计算instructions和functiondefs
if (hinting) {
if (ttf.cvt) {
maxSizeOfInstructions = Math.max(maxSizeOfInstructions, ttf.cvt.length);
}
if (ttf.prep) {
maxSizeOfInstructions = Math.max(maxSizeOfInstructions, ttf.prep.length);
}
if (ttf.fpgm) {
maxSizeOfInstructions = Math.max(maxSizeOfInstructions, ttf.fpgm.length);
}
}
ttf.glyf.forEach((glyf) => {
// 统计control point信息
if (glyf.compound) {
let compositeContours = 0;
let compositePoints = 0;
glyf.glyfs.forEach((g) => {
const cglyf = ttf.glyf[g.glyphIndex];
if (!cglyf) {
return;
}
compositeContours += cglyf.contours ? cglyf.contours.length : 0;
if (cglyf.contours && cglyf.contours.length) {
cglyf.contours.forEach((contour) => {
compositePoints += contour.length;
});
}
});
maxComponentElements = Math.max(maxComponentElements, glyf.glyfs.length);
maxCompositePoints = Math.max(maxCompositePoints, compositePoints);
maxCompositeContours = Math.max(maxCompositeContours, compositeContours);
}
// 简单图元
else if (glyf.contours && glyf.contours.length) {
maxContours = Math.max(maxContours, glyf.contours.length);
let points = 0;
glyf.contours.forEach((contour) => {
points += contour.length;
});
maxPoints = Math.max(maxPoints, points);
}
if (hinting && glyf.instructions) {
maxSizeOfInstructions = Math.max(maxSizeOfInstructions, glyf.instructions.length);
}
// 统计边界信息
if (null != glyf.xMin && glyf.xMin < xMin) {
xMin = glyf.xMin;
}
if (null != glyf.yMin && glyf.yMin < yMin) {
yMin = glyf.yMin;
}
if (null != glyf.xMax && glyf.xMax > xMax) {
xMax = glyf.xMax;
}
if (null != glyf.yMax && glyf.yMax > yMax) {
yMax = glyf.yMax;
}
advanceWidthMax = Math.max(advanceWidthMax, glyf.advanceWidth);
minLeftSideBearing = Math.min(minLeftSideBearing, glyf.leftSideBearing);
if (null != glyf.xMax) {
minRightSideBearing = Math.min(minRightSideBearing, glyf.advanceWidth - glyf.xMax);
xMaxExtent = Math.max(xMaxExtent, glyf.xMax);
}
if (null != glyf.advanceWidth) {
xAvgCharWidth += glyf.advanceWidth;
glyfNotEmpty++;
}
let unicodes = glyf.unicode;
if (typeof glyf.unicode === 'number') {
unicodes = [glyf.unicode];
}
if (Array.isArray(unicodes)) {
unicodes.forEach((unicode) => {
if (unicode !== 0xFFFF) {
usFirstCharIndex = Math.min(usFirstCharIndex, unicode);
usLastCharIndex = Math.max(usLastCharIndex, unicode);
}
});
}
});
// 重新设置version 4
ttf['OS/2'].version = 0x4;
ttf['OS/2'].achVendID = (ttf['OS/2'].achVendID + ' ').slice(0, 4);
ttf['OS/2'].xAvgCharWidth = xAvgCharWidth / (glyfNotEmpty || 1);
ttf['OS/2'].ulUnicodeRange2 = 268435456;
ttf['OS/2'].usFirstCharIndex = usFirstCharIndex;
ttf['OS/2'].usLastCharIndex = usLastCharIndex;
// rewrite hhea
ttf.hhea.version = ttf.hhea.version || 0x1;
ttf.hhea.advanceWidthMax = advanceWidthMax;
ttf.hhea.minLeftSideBearing = minLeftSideBearing;
ttf.hhea.minRightSideBearing = minRightSideBearing;
ttf.hhea.xMaxExtent = xMaxExtent;
// rewrite head
ttf.head.version = ttf.head.version || 0x1;
ttf.head.lowestRecPPEM = ttf.head.lowestRecPPEM || 0x8;
ttf.head.xMin = xMin;
ttf.head.yMin = yMin;
ttf.head.xMax = xMax;
ttf.head.yMax = yMax;
// head rewrite
if (ttf.support.head) {
const {xMin, yMin, xMax, yMax} = ttf.support.head;
if (xMin != null) {
ttf.head.xMin = xMin;
}
if (yMin != null) {
ttf.head.yMin = yMin;
}
if (xMax != null) {
ttf.head.xMax = xMax;
}
if (yMax != null) {
ttf.head.yMax = yMax;
}
}
// hhea rewrite
if (ttf.support.hhea) {
const {advanceWidthMax, xMaxExtent, minLeftSideBearing, minRightSideBearing} = ttf.support.hhea;
if (advanceWidthMax != null) {
ttf.hhea.advanceWidthMax = advanceWidthMax;
}
if (xMaxExtent != null) {
ttf.hhea.xMaxExtent = xMaxExtent;
}
if (minLeftSideBearing != null) {
ttf.hhea.minLeftSideBearing = minLeftSideBearing;
}
if (minRightSideBearing != null) {
ttf.hhea.minRightSideBearing = minRightSideBearing;
}
}
// 这里根据存储的maxp来设置新的maxp,避免重复计算maxp
ttf.maxp = ttf.maxp || {};
ttf.support.maxp = {
version: 1.0,
numGlyphs: ttf.glyf.length,
maxPoints,
maxContours,
maxCompositePoints,
maxCompositeContours,
maxZones: ttf.maxp.maxZones || 0,
maxTwilightPoints: ttf.maxp.maxTwilightPoints || 0,
maxStorage: ttf.maxp.maxStorage || 0,
maxFunctionDefs: ttf.maxp.maxFunctionDefs || 0,
maxStackElements: ttf.maxp.maxStackElements || 0,
maxSizeOfInstructions,
maxComponentElements,
maxComponentDepth: maxComponentElements ? 1 : 0
};
return table.size.call(this, ttf);
}
}
);
@@ -0,0 +1,65 @@
"use strict";
exports.__esModule = true;
exports.universal = exports.tag = exports.string = exports.selector = exports.root = exports.pseudo = exports.nesting = exports.id = exports.comment = exports.combinator = exports.className = exports.attribute = void 0;
var _attribute = _interopRequireDefault(require("./attribute"));
var _className = _interopRequireDefault(require("./className"));
var _combinator = _interopRequireDefault(require("./combinator"));
var _comment = _interopRequireDefault(require("./comment"));
var _id = _interopRequireDefault(require("./id"));
var _nesting = _interopRequireDefault(require("./nesting"));
var _pseudo = _interopRequireDefault(require("./pseudo"));
var _root = _interopRequireDefault(require("./root"));
var _selector = _interopRequireDefault(require("./selector"));
var _string = _interopRequireDefault(require("./string"));
var _tag = _interopRequireDefault(require("./tag"));
var _universal = _interopRequireDefault(require("./universal"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var attribute = function attribute(opts) {
return new _attribute["default"](opts);
};
exports.attribute = attribute;
var className = function className(opts) {
return new _className["default"](opts);
};
exports.className = className;
var combinator = function combinator(opts) {
return new _combinator["default"](opts);
};
exports.combinator = combinator;
var comment = function comment(opts) {
return new _comment["default"](opts);
};
exports.comment = comment;
var id = function id(opts) {
return new _id["default"](opts);
};
exports.id = id;
var nesting = function nesting(opts) {
return new _nesting["default"](opts);
};
exports.nesting = nesting;
var pseudo = function pseudo(opts) {
return new _pseudo["default"](opts);
};
exports.pseudo = pseudo;
var root = function root(opts) {
return new _root["default"](opts);
};
exports.root = root;
var selector = function selector(opts) {
return new _selector["default"](opts);
};
exports.selector = selector;
var string = function string(opts) {
return new _string["default"](opts);
};
exports.string = string;
var tag = function tag(opts) {
return new _tag["default"](opts);
};
exports.tag = tag;
var universal = function universal(opts) {
return new _universal["default"](opts);
};
exports.universal = universal;
@@ -0,0 +1,74 @@
{
"name": "escalade",
"version": "3.2.0",
"repository": "lukeed/escalade",
"description": "A tiny (183B to 210B) and fast utility to ascend parent directories",
"module": "dist/index.mjs",
"main": "dist/index.js",
"types": "index.d.ts",
"license": "MIT",
"author": {
"name": "Luke Edwards",
"email": "luke.edwards05@gmail.com",
"url": "https://lukeed.com"
},
"exports": {
".": [
{
"import": {
"types": "./index.d.mts",
"default": "./dist/index.mjs"
},
"require": {
"types": "./index.d.ts",
"default": "./dist/index.js"
}
},
"./dist/index.js"
],
"./sync": [
{
"import": {
"types": "./sync/index.d.mts",
"default": "./sync/index.mjs"
},
"require": {
"types": "./sync/index.d.ts",
"default": "./sync/index.js"
}
},
"./sync/index.js"
]
},
"files": [
"*.d.mts",
"*.d.ts",
"dist",
"sync"
],
"modes": {
"sync": "src/sync.js",
"default": "src/async.js"
},
"engines": {
"node": ">=6"
},
"scripts": {
"build": "bundt",
"pretest": "npm run build",
"test": "uvu -r esm test -i fixtures"
},
"keywords": [
"find",
"parent",
"parents",
"directory",
"search",
"walk"
],
"devDependencies": {
"bundt": "1.1.1",
"esm": "3.2.25",
"uvu": "0.3.3"
}
}
@@ -0,0 +1,8 @@
import { transformProps } from 'motion-dom';
const appearStoreId = (elementId, valueName) => {
const key = transformProps.has(valueName) ? "transform" : valueName;
return `${elementId}: ${key}`;
};
export { appearStoreId };
@@ -0,0 +1,16 @@
import { GeneralName, Attribute } from "@peculiar/asn1-x509";
/**
* ```asn1
* ACClearAttrs ::= SEQUENCE {
* acIssuer GeneralName,
* acSerial INTEGER,
* attrs SEQUENCE OF Attribute
* }
* ```
*/
export declare class ACClearAttrs {
acIssuer: GeneralName;
acSerial: number;
attrs: Attribute[];
constructor(params?: Partial<ACClearAttrs>);
}
@@ -0,0 +1 @@
{"version":3,"names":["_t","require","isFor","isForStatement","isIfStatement","isStatement","WithStatement","node","word","space","token","print","object","printBlock","IfStatement","test","needsBlock","alternate","getLastStatement","consequent","newline","indent","printAndIndentOnComments","dedent","endsWith","statement","body","ForStatement","exit","enterForStatementInit","init","update","WhileStatement","ForXStatement","isForOf","type","await","noIndentInnerCommentsHere","enterForXStatementInit","left","right","ForInStatement","exports","ForOfStatement","DoWhileStatement","semicolon","printStatementAfterKeyword","printer","printTerminatorless","BreakStatement","label","ContinueStatement","ReturnStatement","argument","ThrowStatement","LabeledStatement","TryStatement","block","handlers","handler","finalizer","CatchClause","param","typeAnnotation","SwitchStatement","discriminant","printSequence","cases","rightBrace","SwitchCase","length","DebuggerStatement","VariableDeclaration","parent","declare","kind","hasInits","declar","declarations","printList","undefined","occurrenceCount","VariableDeclarator","id","definite"],"sources":["../../src/generators/statements.ts"],"sourcesContent":["import type Printer from \"../printer.ts\";\nimport {\n isFor,\n isForStatement,\n isIfStatement,\n isStatement,\n} from \"@babel/types\";\nimport type * as t from \"@babel/types\";\n\n// We inline this package\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport * as charCodes from \"charcodes\";\n\nexport function WithStatement(this: Printer, node: t.WithStatement) {\n this.word(\"with\");\n this.space();\n this.token(\"(\");\n this.print(node.object);\n this.token(\")\");\n this.printBlock(node);\n}\n\nexport function IfStatement(this: Printer, node: t.IfStatement) {\n this.word(\"if\");\n this.space();\n this.token(\"(\");\n this.print(node.test);\n this.token(\")\");\n this.space();\n\n const needsBlock =\n node.alternate && isIfStatement(getLastStatement(node.consequent));\n if (needsBlock) {\n this.token(\"{\");\n this.newline();\n this.indent();\n }\n\n this.printAndIndentOnComments(node.consequent);\n\n if (needsBlock) {\n this.dedent();\n this.newline();\n this.token(\"}\");\n }\n\n if (node.alternate) {\n if (this.endsWith(charCodes.rightCurlyBrace)) this.space();\n this.word(\"else\");\n this.space();\n this.printAndIndentOnComments(node.alternate);\n }\n}\n\n// Recursively get the last statement.\nfunction getLastStatement(statement: t.Statement): t.Statement {\n // @ts-expect-error: If statement.body is empty or not a Node, isStatement will return false\n const { body } = statement;\n if (isStatement(body) === false) {\n return statement;\n }\n\n return getLastStatement(body);\n}\n\nexport function ForStatement(this: Printer, node: t.ForStatement) {\n this.word(\"for\");\n this.space();\n this.token(\"(\");\n\n {\n const exit = this.enterForStatementInit();\n this.print(node.init);\n exit();\n }\n\n this.token(\";\");\n\n if (node.test) {\n this.space();\n this.print(node.test);\n }\n this.token(\";\", false, 1);\n\n if (node.update) {\n this.space();\n this.print(node.update);\n }\n\n this.token(\")\");\n this.printBlock(node);\n}\n\nexport function WhileStatement(this: Printer, node: t.WhileStatement) {\n this.word(\"while\");\n this.space();\n this.token(\"(\");\n this.print(node.test);\n this.token(\")\");\n this.printBlock(node);\n}\n\nfunction ForXStatement(this: Printer, node: t.ForXStatement) {\n this.word(\"for\");\n this.space();\n const isForOf = node.type === \"ForOfStatement\";\n if (isForOf && node.await) {\n this.word(\"await\");\n this.space();\n }\n this.noIndentInnerCommentsHere();\n this.token(\"(\");\n {\n const exit = this.enterForXStatementInit(isForOf);\n this.print(node.left);\n exit?.();\n }\n this.space();\n this.word(isForOf ? \"of\" : \"in\");\n this.space();\n this.print(node.right);\n this.token(\")\");\n this.printBlock(node);\n}\n\nexport const ForInStatement = ForXStatement;\nexport const ForOfStatement = ForXStatement;\n\nexport function DoWhileStatement(this: Printer, node: t.DoWhileStatement) {\n this.word(\"do\");\n this.space();\n this.print(node.body);\n this.space();\n this.word(\"while\");\n this.space();\n this.token(\"(\");\n this.print(node.test);\n this.token(\")\");\n this.semicolon();\n}\n\nfunction printStatementAfterKeyword(\n printer: Printer,\n node: t.Node | null | undefined,\n) {\n if (node) {\n printer.space();\n printer.printTerminatorless(node);\n }\n\n printer.semicolon();\n}\n\nexport function BreakStatement(this: Printer, node: t.ContinueStatement) {\n this.word(\"break\");\n printStatementAfterKeyword(this, node.label);\n}\n\nexport function ContinueStatement(this: Printer, node: t.ContinueStatement) {\n this.word(\"continue\");\n printStatementAfterKeyword(this, node.label);\n}\Line truncated
@@ -0,0 +1,40 @@
'use strict';var _builder = require('../exportMap/builder');var _builder2 = _interopRequireDefault(_builder);
var _docsUrl = require('../docsUrl');var _docsUrl2 = _interopRequireDefault(_docsUrl);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { 'default': obj };}
module.exports = {
meta: {
type: 'problem',
docs: {
category: 'Static analysis',
description: 'Ensure a default export is present, given a default import.',
url: (0, _docsUrl2['default'])('default') },
schema: [] },
create: function () {function create(context) {
function checkDefault(specifierType, node) {
var defaultSpecifier = node.specifiers.find(
function (specifier) {return specifier.type === specifierType;});
if (!defaultSpecifier) {return;}
var imports = _builder2['default'].get(node.source.value, context);
if (imports == null) {return;}
if (imports.errors.length) {
imports.reportErrors(context, node);
} else if (imports.get('default') === undefined) {
context.report({
node: defaultSpecifier,
message: 'No default export found in imported module "' + String(node.source.value) + '".' });
}
}
return {
ImportDeclaration: checkDefault.bind(null, 'ImportDefaultSpecifier'),
ExportNamedDeclaration: checkDefault.bind(null, 'ExportDefaultSpecifier') };
}return create;}() };
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9kZWZhdWx0LmpzIl0sIm5hbWVzIjpbIm1vZHVsZSIsImV4cG9ydHMiLCJtZXRhIiwidHlwZSIsImRvY3MiLCJjYXRlZ29yeSIsImRlc2NyaXB0aW9uIiwidXJsIiwic2NoZW1hIiwiY3JlYXRlIiwiY29udGV4dCIsImNoZWNrRGVmYXVsdCIsInNwZWNpZmllclR5cGUiLCJub2RlIiwiZGVmYXVsdFNwZWNpZmllciIsInNwZWNpZmllcnMiLCJmaW5kIiwic3BlY2lmaWVyIiwiaW1wb3J0cyIsIkV4cG9ydE1hcEJ1aWxkZXIiLCJnZXQiLCJzb3VyY2UiLCJ2YWx1ZSIsImVycm9ycyIsImxlbmd0aCIsInJlcG9ydEVycm9ycyIsInVuZGVmaW5lZCIsInJlcG9ydCIsIm1lc3NhZ2UiLCJJbXBvcnREZWNsYXJhdGlvbiIsImJpbmQiLCJFeHBvcnROYW1lZERlY2xhcmF0aW9uIl0sIm1hcHBpbmdzIjoiYUFBQSwrQztBQUNBLHFDOztBQUVBQSxPQUFPQyxPQUFQLEdBQWlCO0FBQ2ZDLFFBQU07QUFDSkMsVUFBTSxTQURGO0FBRUpDLFVBQU07QUFDSkMsZ0JBQVUsaUJBRE47QUFFSkMsbUJBQWEsNkRBRlQ7QUFHSkMsV0FBSywwQkFBUSxTQUFSLENBSEQsRUFGRjs7QUFPSkMsWUFBUSxFQVBKLEVBRFM7OztBQVdmQyxRQVhlLCtCQVdSQyxPQVhRLEVBV0M7QUFDZCxlQUFTQyxZQUFULENBQXNCQyxhQUF0QixFQUFxQ0MsSUFBckMsRUFBMkM7QUFDekMsWUFBTUMsbUJBQW1CRCxLQUFLRSxVQUFMLENBQWdCQyxJQUFoQjtBQUN2QixrQkFBQ0MsU0FBRCxVQUFlQSxVQUFVZCxJQUFWLEtBQW1CUyxhQUFsQyxFQUR1QixDQUF6Qjs7O0FBSUEsWUFBSSxDQUFDRSxnQkFBTCxFQUF1QixDQUFFLE9BQVM7QUFDbEMsWUFBTUksVUFBVUMscUJBQWlCQyxHQUFqQixDQUFxQlAsS0FBS1EsTUFBTCxDQUFZQyxLQUFqQyxFQUF3Q1osT0FBeEMsQ0FBaEI7QUFDQSxZQUFJUSxXQUFXLElBQWYsRUFBcUIsQ0FBRSxPQUFTOztBQUVoQyxZQUFJQSxRQUFRSyxNQUFSLENBQWVDLE1BQW5CLEVBQTJCO0FBQ3pCTixrQkFBUU8sWUFBUixDQUFxQmYsT0FBckIsRUFBOEJHLElBQTlCO0FBQ0QsU0FGRCxNQUVPLElBQUlLLFFBQVFFLEdBQVIsQ0FBWSxTQUFaLE1BQTJCTSxTQUEvQixFQUEwQztBQUMvQ2hCLGtCQUFRaUIsTUFBUixDQUFlO0FBQ2JkLGtCQUFNQyxnQkFETztBQUViYyw2RUFBd0RmLEtBQUtRLE1BQUwsQ0FBWUMsS0FBcEUsUUFGYSxFQUFmOztBQUlEO0FBQ0Y7O0FBRUQsYUFBTztBQUNMTywyQkFBbUJsQixhQUFhbUIsSUFBYixDQUFrQixJQUFsQixFQUF3Qix3QkFBeEIsQ0FEZDtBQUVMQyxnQ0FBd0JwQixhQUFhbUIsSUFBYixDQUFrQixJQUFsQixFQUF3Qix3QkFBeEIsQ0FGbkIsRUFBUDs7QUFJRCxLQW5DYyxtQkFBakIiLCJmaWxlIjoiZGVmYXVsdC5qcyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBFeHBvcnRNYXBCdWlsZGVyIGZyb20gJy4uL2V4cG9ydE1hcC9idWlsZGVyJztcbmltcG9ydCBkb2NzVXJsIGZyb20gJy4uL2RvY3NVcmwnO1xuXG5tb2R1bGUuZXhwb3J0cyA9IHtcbiAgbWV0YToge1xuICAgIHR5cGU6ICdwcm9ibGVtJyxcbiAgICBkb2NzOiB7XG4gICAgICBjYXRlZ29yeTogJ1N0YXRpYyBhbmFseXNpcycsXG4gICAgICBkZXNjcmlwdGlvbjogJ0Vuc3VyZSBhIGRlZmF1bHQgZXhwb3J0IGlzIHByZXNlbnQsIGdpdmVuIGEgZGVmYXVsdCBpbXBvcnQuJyxcbiAgICAgIHVybDogZG9jc1VybCgnZGVmYXVsdCcpLFxuICAgIH0sXG4gICAgc2NoZW1hOiBbXSxcbiAgfSxcblxuICBjcmVhdGUoY29udGV4dCkge1xuICAgIGZ1bmN0aW9uIGNoZWNrRGVmYXVsdChzcGVjaWZpZXJUeXBlLCBub2RlKSB7XG4gICAgICBjb25zdCBkZWZhdWx0U3BlY2lmaWVyID0gbm9kZS5zcGVjaWZpZXJzLmZpbmQoXG4gICAgICAgIChzcGVjaWZpZXIpID0+IHNwZWNpZmllci50eXBlID09PSBzcGVjaWZpZXJUeXBlLFxuICAgICAgKTtcblxuICAgICAgaWYgKCFkZWZhdWx0U3BlY2lmaWVyKSB7IHJldHVybjsgfVxuICAgICAgY29uc3QgaW1wb3J0cyA9IEV4cG9ydE1hcEJ1aWxkZXIuZ2V0KG5vZGUuc291cmNlLnZhbHVlLCBjb250ZXh0KTtcbiAgICAgIGlmIChpbXBvcnRzID09IG51bGwpIHsgcmV0dXJuOyB9XG5cbiAgICAgIGlmIChpbXBvcnRzLmVycm9ycy5sZW5ndGgpIHtcbiAgICAgICAgaW1wb3J0cy5yZXBvcnRFcnJvcnMoY29udGV4dCwgbm9kZSk7XG4gICAgICB9IGVsc2UgaWYgKGltcG9ydHMuZ2V0KCdkZWZhdWx0JykgPT09IHVuZGVmaW5lZCkge1xuICAgICAgICBjb250ZXh0LnJlcG9ydCh7XG4gICAgICAgICAgbm9kZTogZGVmYXVsdFNwZWNpZmllcixcbiAgICAgICAgICBtZXNzYWdlOiBgTm8gZGVmYXVsdCBleHBvcnQgZm91bmQgaW4gaW1wb3J0ZWQgbW9kdWxlIFwiJHtub2RlLnNvdXJjZS52YWx1ZX1cIi5gLFxuICAgICAgICB9KTtcbiAgICAgIH1cbiAgICB9XG5cbiAgICByZXR1cm4ge1xuICAgICAgSW1wb3J0RGVjbGFyYXRpb246IGNoZWNrRGVmYXVsdC5iaW5kKG51bGwsICdJbXBvcnREZWZhdWx0U3BlY2lmaWVyJyksXG4gICAgICBFeHBvcnROYW1lZERlY2xhcmF0aW9uOiBjaGVja0RlZmF1bHQuYmluZChudWxsLCAnRXhwb3J0RGVmYXVsdFNwZWNpZmllcicpLFxuICAgIH07XG4gIH0sXG59O1xuIl19
@@ -0,0 +1,4 @@
import { renderHook } from '@testing-library/react';
export * from '@testing-library/react';
declare const customRender: typeof renderHook;
export { customRender as renderHook };
@@ -0,0 +1,140 @@
"use client";
import { useContext, useRef, useInsertionEffect, useEffect } from 'react';
import { optimizedAppearDataAttribute } from '../../animation/optimized-appear/data-id.mjs';
import { LazyContext } from '../../context/LazyContext.mjs';
import { MotionConfigContext } from '../../context/MotionConfigContext.mjs';
import { MotionContext } from '../../context/MotionContext/index.mjs';
import { PresenceContext } from '../../context/PresenceContext.mjs';
import { SwitchLayoutGroupContext } from '../../context/SwitchLayoutGroupContext.mjs';
import { isRefObject } from '../../utils/is-ref-object.mjs';
import { useIsomorphicLayoutEffect } from '../../utils/use-isomorphic-effect.mjs';
function useVisualElement(Component, visualState, props, createVisualElement, ProjectionNodeConstructor) {
const { visualElement: parent } = useContext(MotionContext);
const lazyContext = useContext(LazyContext);
const presenceContext = useContext(PresenceContext);
const reducedMotionConfig = useContext(MotionConfigContext).reducedMotion;
const visualElementRef = useRef(null);
/**
* If we haven't preloaded a renderer, check to see if we have one lazy-loaded
*/
createVisualElement =
createVisualElement ||
lazyContext.renderer;
if (!visualElementRef.current && createVisualElement) {
visualElementRef.current = createVisualElement(Component, {
visualState,
parent,
props,
presenceContext,
blockInitialAnimation: presenceContext
? presenceContext.initial === false
: false,
reducedMotionConfig,
});
}
const visualElement = visualElementRef.current;
/**
* Load Motion gesture and animation features. These are rendered as renderless
* components so each feature can optionally make use of React lifecycle methods.
*/
const initialLayoutGroupConfig = useContext(SwitchLayoutGroupContext);
if (visualElement &&
!visualElement.projection &&
ProjectionNodeConstructor &&
(visualElement.type === "html" || visualElement.type === "svg")) {
createProjectionNode(visualElementRef.current, props, ProjectionNodeConstructor, initialLayoutGroupConfig);
}
const isMounted = useRef(false);
useInsertionEffect(() => {
/**
* Check the component has already mounted before calling
* `update` unnecessarily. This ensures we skip the initial update.
*/
if (visualElement && isMounted.current) {
visualElement.update(props, presenceContext);
}
});
/**
* Cache this value as we want to know whether HandoffAppearAnimations
* was present on initial render - it will be deleted after this.
*/
const optimisedAppearId = props[optimizedAppearDataAttribute];
const wantsHandoff = useRef(Boolean(optimisedAppearId) &&
!window.MotionHandoffIsComplete?.(optimisedAppearId) &&
window.MotionHasOptimisedAnimation?.(optimisedAppearId));
useIsomorphicLayoutEffect(() => {
if (!visualElement)
return;
isMounted.current = true;
window.MotionIsMounted = true;
visualElement.updateFeatures();
visualElement.scheduleRenderMicrotask();
/**
* Ideally this function would always run in a useEffect.
*
* However, if we have optimised appear animations to handoff from,
* it needs to happen synchronously to ensure there's no flash of
* incorrect styles in the event of a hydration error.
*
* So if we detect a situtation where optimised appear animations
* are running, we use useLayoutEffect to trigger animations.
*/
if (wantsHandoff.current && visualElement.animationState) {
visualElement.animationState.animateChanges();
}
});
useEffect(() => {
if (!visualElement)
return;
if (!wantsHandoff.current && visualElement.animationState) {
visualElement.animationState.animateChanges();
}
if (wantsHandoff.current) {
// This ensures all future calls to animateChanges() in this component will run in useEffect
queueMicrotask(() => {
window.MotionHandoffMarkAsComplete?.(optimisedAppearId);
});
wantsHandoff.current = false;
}
/**
* Now we've finished triggering animations for this element we
* can wipe the enteringChildren set for the next render.
*/
visualElement.enteringChildren = undefined;
});
return visualElement;
}
function createProjectionNode(visualElement, props, ProjectionNodeConstructor, initialPromotionConfig) {
const { layoutId, layout, drag, dragConstraints, layoutScroll, layoutRoot, layoutCrossfade, } = props;
visualElement.projection = new ProjectionNodeConstructor(visualElement.latestValues, props["data-framer-portal-id"]
? undefined
: getClosestProjectingNode(visualElement.parent));
visualElement.projection.setOptions({
layoutId,
layout,
alwaysMeasureLayout: Boolean(drag) || (dragConstraints && isRefObject(dragConstraints)),
visualElement,
/**
* TODO: Update options in an effect. This could be tricky as it'll be too late
* to update by the time layout animations run.
* We also need to fix this safeToRemove by linking it up to the one returned by usePresence,
* ensuring it gets called if there's no potential layout animations.
*
*/
animationType: typeof layout === "string" ? layout : "both",
initialPromotionConfig,
crossfade: layoutCrossfade,
layoutScroll,
layoutRoot,
});
}
function getClosestProjectingNode(visualElement) {
if (!visualElement)
return undefined;
return visualElement.options.allowProjection !== false
? visualElement.projection
: getClosestProjectingNode(visualElement.parent);
}
export { useVisualElement };
@@ -0,0 +1,63 @@
import * as asn1js from "asn1js";
import { BufferSourceConverter } from "pvtsutils";
export class BitString {
constructor(params, unusedBits = 0) {
this.unusedBits = 0;
this.value = new ArrayBuffer(0);
if (params) {
if (typeof params === "number") {
this.fromNumber(params);
}
else if (BufferSourceConverter.isBufferSource(params)) {
this.unusedBits = unusedBits;
this.value = BufferSourceConverter.toArrayBuffer(params);
}
else {
throw TypeError("Unsupported type of 'params' argument for BitString");
}
}
}
fromASN(asn) {
if (!(asn instanceof asn1js.BitString)) {
throw new TypeError("Argument 'asn' is not instance of ASN.1 BitString");
}
this.unusedBits = asn.valueBlock.unusedBits;
this.value = asn.valueBlock.valueHex;
return this;
}
toASN() {
return new asn1js.BitString({ unusedBits: this.unusedBits, valueHex: this.value });
}
toSchema(name) {
return new asn1js.BitString({ name });
}
toNumber() {
let res = "";
const uintArray = new Uint8Array(this.value);
for (const octet of uintArray) {
res += octet.toString(2).padStart(8, "0");
}
res = res.split("").reverse().join("");
if (this.unusedBits) {
res = res.slice(this.unusedBits).padStart(this.unusedBits, "0");
}
return parseInt(res, 2);
}
fromNumber(value) {
let bits = value.toString(2);
const octetSize = (bits.length + 7) >> 3;
this.unusedBits = (octetSize << 3) - bits.length;
const octets = new Uint8Array(octetSize);
bits = bits
.padStart(octetSize << 3, "0")
.split("")
.reverse()
.join("");
let index = 0;
while (index < octetSize) {
octets[index] = parseInt(bits.slice(index << 3, (index << 3) + 8), 2);
index++;
}
this.value = octets.buffer;
}
}
@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('sampleSize', require('../sampleSize'));
func.placeholder = require('./placeholder');
module.exports = func;
@@ -0,0 +1,5 @@
export function keyName(event: Event): string;
export const base: {[keyCode: number]: string};
export const shift: {[keyCode: number]: string};
@@ -0,0 +1,79 @@
#!/usr/bin/env node
const spawn = require('child_process').spawnSync;
const filesToCheck = '*.js';
const FORMAT_START = process.env.FORMAT_START || 'main';
const IS_WIN = process.platform === 'win32';
const ESLINT_PATH = IS_WIN ? 'node_modules\\.bin\\eslint.cmd' : 'node_modules/.bin/eslint';
function main (args) {
let fix = false;
while (args.length > 0) {
switch (args[0]) {
case '-f':
case '--fix':
fix = true;
break;
default:
}
args.shift();
}
// Check js files that change on unstaged file
const fileUnStaged = spawn(
'git',
['diff', '--name-only', '--diff-filter=d', FORMAT_START, filesToCheck],
{
encoding: 'utf-8'
}
);
// Check js files that change on staged file
const fileStaged = spawn(
'git',
['diff', '--name-only', '--cached', '--diff-filter=d', FORMAT_START, filesToCheck],
{
encoding: 'utf-8'
}
);
const options = [
...fileStaged.stdout.split('\n').filter((f) => f !== ''),
...fileUnStaged.stdout.split('\n').filter((f) => f !== '')
];
if (fix) {
options.push('--fix');
}
const result = spawn(ESLINT_PATH, [...options], {
encoding: 'utf-8'
});
if (result.error && result.error.errno === 'ENOENT') {
console.error('Eslint not found! Eslint is supposed to be found at ', ESLINT_PATH);
return 2;
}
if (result.status === 1) {
console.error('Eslint error:', result.stdout);
const fixCmd = 'npm run lint:fix';
console.error(`ERROR: please run "${fixCmd}" to format changes in your commit
Note that when running the command locally, please keep your local
main branch and working branch up to date with nodejs/node-addon-api
to exclude un-related complains.
Or you can run "env FORMAT_START=upstream/main ${fixCmd}".
Also fix JS files by yourself if necessary.`);
return 1;
}
if (result.stderr) {
console.error('Error running eslint:', result.stderr);
return 2;
}
}
if (require.main === module) {
process.exitCode = main(process.argv.slice(2));
}
@@ -0,0 +1,131 @@
'use strict'
var licenses = []
.concat(require('spdx-license-ids'))
.concat(require('spdx-license-ids/deprecated'))
var exceptions = require('spdx-exceptions')
module.exports = function (source) {
var index = 0
function hasMore () {
return index < source.length
}
// `value` can be a regexp or a string.
// If it is recognized, the matching source string is returned and
// the index is incremented. Otherwise `undefined` is returned.
function read (value) {
if (value instanceof RegExp) {
var chars = source.slice(index)
var match = chars.match(value)
if (match) {
index += match[0].length
return match[0]
}
} else {
if (source.indexOf(value, index) === index) {
index += value.length
return value
}
}
}
function skipWhitespace () {
read(/[ ]*/)
}
function operator () {
var string
var possibilities = ['WITH', 'AND', 'OR', '(', ')', ':', '+']
for (var i = 0; i < possibilities.length; i++) {
string = read(possibilities[i])
if (string) {
break
}
}
if (string === '+' && index > 1 && source[index - 2] === ' ') {
throw new Error('Space before `+`')
}
return string && {
type: 'OPERATOR',
string: string
}
}
function idstring () {
return read(/[A-Za-z0-9-.]+/)
}
function expectIdstring () {
var string = idstring()
if (!string) {
throw new Error('Expected idstring at offset ' + index)
}
return string
}
function documentRef () {
if (read('DocumentRef-')) {
var string = expectIdstring()
return { type: 'DOCUMENTREF', string: string }
}
}
function licenseRef () {
if (read('LicenseRef-')) {
var string = expectIdstring()
return { type: 'LICENSEREF', string: string }
}
}
function identifier () {
var begin = index
var string = idstring()
if (licenses.indexOf(string) !== -1) {
return {
type: 'LICENSE',
string: string
}
} else if (exceptions.indexOf(string) !== -1) {
return {
type: 'EXCEPTION',
string: string
}
}
index = begin
}
// Tries to read the next token. Returns `undefined` if no token is
// recognized.
function parseToken () {
// Ordering matters
return (
operator() ||
documentRef() ||
licenseRef() ||
identifier()
)
}
var tokens = []
while (hasMore()) {
skipWhitespace()
if (!hasMore()) {
break
}
var token = parseToken()
if (!token) {
throw new Error('Unexpected `' + source[index] +
'` at offset ' + index)
}
tokens.push(token)
}
return tokens
}
@@ -0,0 +1,124 @@
'use strict';
module.exports = function generate_ref(it, $keyword, $ruleType) {
var out = ' ';
var $lvl = it.level;
var $dataLvl = it.dataLevel;
var $schema = it.schema[$keyword];
var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
var $breakOnError = !it.opts.allErrors;
var $data = 'data' + ($dataLvl || '');
var $valid = 'valid' + $lvl;
var $async, $refCode;
if ($schema == '#' || $schema == '#/') {
if (it.isRoot) {
$async = it.async;
$refCode = 'validate';
} else {
$async = it.root.schema.$async === true;
$refCode = 'root.refVal[0]';
}
} else {
var $refVal = it.resolveRef(it.baseId, $schema, it.isRoot);
if ($refVal === undefined) {
var $message = it.MissingRefError.message(it.baseId, $schema);
if (it.opts.missingRefs == 'fail') {
it.logger.error($message);
var $$outStack = $$outStack || [];
$$outStack.push(out);
out = ''; /* istanbul ignore else */
if (it.createErrors !== false) {
out += ' { keyword: \'' + ('$ref') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { ref: \'' + (it.util.escapeQuotes($schema)) + '\' } ';
if (it.opts.messages !== false) {
out += ' , message: \'can\\\'t resolve reference ' + (it.util.escapeQuotes($schema)) + '\' ';
}
if (it.opts.verbose) {
out += ' , schema: ' + (it.util.toQuotedString($schema)) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
}
out += ' } ';
} else {
out += ' {} ';
}
var __err = out;
out = $$outStack.pop();
if (!it.compositeRule && $breakOnError) {
/* istanbul ignore if */
if (it.async) {
out += ' throw new ValidationError([' + (__err) + ']); ';
} else {
out += ' validate.errors = [' + (__err) + ']; return false; ';
}
} else {
out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
}
if ($breakOnError) {
out += ' if (false) { ';
}
} else if (it.opts.missingRefs == 'ignore') {
it.logger.warn($message);
if ($breakOnError) {
out += ' if (true) { ';
}
} else {
throw new it.MissingRefError(it.baseId, $schema, $message);
}
} else if ($refVal.inline) {
var $it = it.util.copy(it);
$it.level++;
var $nextValid = 'valid' + $it.level;
$it.schema = $refVal.schema;
$it.schemaPath = '';
$it.errSchemaPath = $schema;
var $code = it.validate($it).replace(/validate\.schema/g, $refVal.code);
out += ' ' + ($code) + ' ';
if ($breakOnError) {
out += ' if (' + ($nextValid) + ') { ';
}
} else {
$async = $refVal.$async === true || (it.async && $refVal.$async !== false);
$refCode = $refVal.code;
}
}
if ($refCode) {
var $$outStack = $$outStack || [];
$$outStack.push(out);
out = '';
if (it.opts.passContext) {
out += ' ' + ($refCode) + '.call(this, ';
} else {
out += ' ' + ($refCode) + '( ';
}
out += ' ' + ($data) + ', (dataPath || \'\')';
if (it.errorPath != '""') {
out += ' + ' + (it.errorPath);
}
var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData',
$parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty';
out += ' , ' + ($parentData) + ' , ' + ($parentDataProperty) + ', rootData) ';
var __callValidate = out;
out = $$outStack.pop();
if ($async) {
if (!it.async) throw new Error('async schema referenced by sync schema');
if ($breakOnError) {
out += ' var ' + ($valid) + '; ';
}
out += ' try { await ' + (__callValidate) + '; ';
if ($breakOnError) {
out += ' ' + ($valid) + ' = true; ';
}
out += ' } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ';
if ($breakOnError) {
out += ' ' + ($valid) + ' = false; ';
}
out += ' } ';
if ($breakOnError) {
out += ' if (' + ($valid) + ') { ';
}
} else {
out += ' if (!' + (__callValidate) + ') { if (vErrors === null) vErrors = ' + ($refCode) + '.errors; else vErrors = vErrors.concat(' + ($refCode) + '.errors); errors = vErrors.length; } ';
if ($breakOnError) {
out += ' else { ';
}
}
}
return out;
}
@@ -0,0 +1,3 @@
const MotionGlobalConfig = {};
export { MotionGlobalConfig };
@@ -0,0 +1,64 @@
# call-bind <sup>[![Version Badge][npm-version-svg]][package-url]</sup>
[![github actions][actions-image]][actions-url]
[![coverage][codecov-image]][codecov-url]
[![dependency status][deps-svg]][deps-url]
[![dev dependency status][dev-deps-svg]][dev-deps-url]
[![License][license-image]][license-url]
[![Downloads][downloads-image]][downloads-url]
[![npm badge][npm-badge-png]][package-url]
Robustly `.call.bind()` a function.
## Getting started
```sh
npm install --save call-bind
```
## Usage/Examples
```js
const assert = require('assert');
const callBind = require('call-bind');
const callBound = require('call-bind/callBound');
function f(a, b) {
assert.equal(this, 1);
assert.equal(a, 2);
assert.equal(b, 3);
assert.equal(arguments.length, 2);
}
const fBound = callBind(f);
const slice = callBound('Array.prototype.slice');
delete Function.prototype.call;
delete Function.prototype.bind;
fBound(1, 2, 3);
assert.deepEqual(slice([1, 2, 3, 4], 1, -1), [2, 3]);
```
## Tests
Clone the repo, `npm install`, and run `npm test`
[package-url]: https://npmjs.org/package/call-bind
[npm-version-svg]: https://versionbadg.es/ljharb/call-bind.svg
[deps-svg]: https://david-dm.org/ljharb/call-bind.svg
[deps-url]: https://david-dm.org/ljharb/call-bind
[dev-deps-svg]: https://david-dm.org/ljharb/call-bind/dev-status.svg
[dev-deps-url]: https://david-dm.org/ljharb/call-bind#info=devDependencies
[npm-badge-png]: https://nodei.co/npm/call-bind.png?downloads=true&stars=true
[license-image]: https://img.shields.io/npm/l/call-bind.svg
[license-url]: LICENSE
[downloads-image]: https://img.shields.io/npm/dm/call-bind.svg
[downloads-url]: https://npm-stat.com/charts.html?package=call-bind
[codecov-image]: https://codecov.io/gh/ljharb/call-bind/branch/main/graphs/badge.svg
[codecov-url]: https://app.codecov.io/gh/ljharb/call-bind/
[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/call-bind
[actions-url]: https://github.com/ljharb/call-bind/actions
@@ -0,0 +1,197 @@
import * as fs from 'node:fs';
import { join, normalize, resolve, sep } from 'node:path';
import { totalist } from 'totalist/sync';
import { parse } from '@polka/url';
import { lookup } from 'mrmime';
const noop = () => {};
function isMatch(uri, arr) {
for (let i=0; i < arr.length; i++) {
if (arr[i].test(uri)) return true;
}
}
function toAssume(uri, extns) {
let i=0, x, len=uri.length - 1;
if (uri.charCodeAt(len) === 47) {
uri = uri.substring(0, len);
}
let arr=[], tmp=`${uri}/index`;
for (; i < extns.length; i++) {
x = extns[i] ? `.${extns[i]}` : '';
if (uri) arr.push(uri + x);
arr.push(tmp + x);
}
return arr;
}
function viaCache(cache, uri, extns) {
let i=0, data, arr=toAssume(uri, extns);
for (; i < arr.length; i++) {
if (data = cache[arr[i]]) return data;
}
}
function viaLocal(dir, isEtag, uri, extns) {
let i=0, arr=toAssume(uri, extns);
let abs, stats, name, headers;
for (; i < arr.length; i++) {
abs = normalize(
join(dir, name=arr[i])
);
if (abs.startsWith(dir) && fs.existsSync(abs)) {
stats = fs.statSync(abs);
if (stats.isDirectory()) continue;
headers = toHeaders(name, stats, isEtag);
headers['Cache-Control'] = isEtag ? 'no-cache' : 'no-store';
return { abs, stats, headers };
}
}
}
function is404(req, res) {
return (res.statusCode=404,res.end());
}
function send(req, res, file, stats, headers) {
let code=200, tmp, opts={};
headers = { ...headers };
for (let key in headers) {
tmp = res.getHeader(key);
if (tmp) headers[key] = tmp;
}
if (tmp = res.getHeader('content-type')) {
headers['Content-Type'] = tmp;
}
if (req.headers.range) {
code = 206;
let [x, y] = req.headers.range.replace('bytes=', '').split('-');
let end = opts.end = parseInt(y, 10) || stats.size - 1;
let start = opts.start = parseInt(x, 10) || 0;
if (end >= stats.size) {
end = stats.size - 1;
}
if (start >= stats.size) {
res.setHeader('Content-Range', `bytes */${stats.size}`);
res.statusCode = 416;
return res.end();
}
headers['Content-Range'] = `bytes ${start}-${end}/${stats.size}`;
headers['Content-Length'] = (end - start + 1);
headers['Accept-Ranges'] = 'bytes';
}
res.writeHead(code, headers);
fs.createReadStream(file, opts).pipe(res);
}
const ENCODING = {
'.br': 'br',
'.gz': 'gzip',
};
function toHeaders(name, stats, isEtag) {
let enc = ENCODING[name.slice(-3)];
let ctype = lookup(name.slice(0, enc && -3)) || '';
if (ctype === 'text/html') ctype += ';charset=utf-8';
let headers = {
'Content-Length': stats.size,
'Content-Type': ctype,
'Last-Modified': stats.mtime.toUTCString(),
};
if (enc) headers['Content-Encoding'] = enc;
if (isEtag) headers['ETag'] = `W/"${stats.size}-${stats.mtime.getTime()}"`;
return headers;
}
export default function (dir, opts={}) {
dir = resolve(dir || '.');
let isNotFound = opts.onNoMatch || is404;
let setHeaders = opts.setHeaders || noop;
let extensions = opts.extensions || ['html', 'htm'];
let gzips = opts.gzip && extensions.map(x => `${x}.gz`).concat('gz');
let brots = opts.brotli && extensions.map(x => `${x}.br`).concat('br');
const FILES = {};
let fallback = '/';
let isEtag = !!opts.etag;
let isSPA = !!opts.single;
if (typeof opts.single === 'string') {
let idx = opts.single.lastIndexOf('.');
fallback += !!~idx ? opts.single.substring(0, idx) : opts.single;
}
let ignores = [];
if (opts.ignores !== false) {
ignores.push(/[/]([A-Za-z\s\d~$._-]+\.\w+){1,}$/); // any extn
if (opts.dotfiles) ignores.push(/\/\.\w/);
else ignores.push(/\/\.well-known/);
[].concat(opts.ignores || []).forEach(x => {
ignores.push(new RegExp(x, 'i'));
});
}
let cc = opts.maxAge != null && `public,max-age=${opts.maxAge}`;
if (cc && opts.immutable) cc += ',immutable';
else if (cc && opts.maxAge === 0) cc += ',must-revalidate';
if (!opts.dev) {
totalist(dir, (name, abs, stats) => {
if (/\.well-known[\\+\/]/.test(name)) {} // keep
else if (!opts.dotfiles && /(^\.|[\\+|\/+]\.)/.test(name)) return;
let headers = toHeaders(name, stats, isEtag);
if (cc) headers['Cache-Control'] = cc;
FILES['/' + name.normalize().replace(/\\+/g, '/')] = { abs, stats, headers };
});
}
let lookup = opts.dev ? viaLocal.bind(0, dir + sep, isEtag) : viaCache.bind(0, FILES);
return function (req, res, next) {
let extns = [''];
let pathname = parse(req).pathname;
let val = req.headers['accept-encoding'] || '';
if (gzips && val.includes('gzip')) extns.unshift(...gzips);
if (brots && /(br|brotli)/i.test(val)) extns.unshift(...brots);
extns.push(...extensions); // [...br, ...gz, orig, ...exts]
if (pathname.indexOf('%') !== -1) {
try { pathname = decodeURI(pathname) }
catch (err) { /* malform uri */ }
}
let data = lookup(pathname, extns) || isSPA && !isMatch(pathname, ignores) && lookup(fallback, extns);
if (!data) return next ? next() : isNotFound(req, res);
if (isEtag && req.headers['if-none-match'] === data.headers['ETag']) {
res.writeHead(304);
return res.end();
}
if (gzips || brots) {
res.setHeader('Vary', 'Accept-Encoding');
}
setHeaders(res, pathname, data.stats);
send(req, res, data.abs, data.stats, data.headers);
};
}
@@ -0,0 +1,6 @@
module.exports = {
"breadcrumbs": `Breadcrumb`
};
//# sourceMappingURL=it-IT.main.js.map
@@ -0,0 +1,42 @@
var wrappy = require('wrappy')
module.exports = wrappy(once)
module.exports.strict = wrappy(onceStrict)
once.proto = once(function () {
Object.defineProperty(Function.prototype, 'once', {
value: function () {
return once(this)
},
configurable: true
})
Object.defineProperty(Function.prototype, 'onceStrict', {
value: function () {
return onceStrict(this)
},
configurable: true
})
})
function once (fn) {
var f = function () {
if (f.called) return f.value
f.called = true
return f.value = fn.apply(this, arguments)
}
f.called = false
return f
}
function onceStrict (fn) {
var f = function () {
if (f.called)
throw new Error(f.onceError)
f.called = true
return f.value = fn.apply(this, arguments)
}
var name = fn.name || 'Function wrapped with `once`'
f.onceError = name + " shouldn't be called more than once"
f.called = false
return f
}
@@ -0,0 +1,133 @@
#!/usr/bin/env zx
import { $, fs, glob } from "zx";
import { ast_grep } from "./ast_grep.js";
import { errors } from "./errors.js";
import { root } from "./utils.js";
// clear generated content
await Promise.all([
fs.remove(root("cjs")),
fs.remove(root("_")),
fs.remove(root("src")),
]);
let modules = await glob("*.js", { cwd: root("esm") });
const task_queue = [];
const NO_MODIFY = [
"/* This file is automatically generated and should not be manually edited. */",
"/* To modify this file, please run the `npm run build` command instead. */",
];
// generate index.js
const indexESM = [...NO_MODIFY, ""];
const indexCJS = [`"use strict";`, "", ...NO_MODIFY, ""];
const cjs_export_list = [];
const cjs_module_lexer = [];
const main_package_json = fs.readJSONSync(root("package.json"));
main_package_json.exports = {
"./package.json": "./package.json",
"./esm/*": "./esm/*",
"./cjs/*": "./cjs/*",
"./src/*": "./src/*",
".": {
"module-sync": "./esm/index.js",
webpack: "./esm/index.js",
import: "./esm/index.js",
default: "./cjs/index.cjs",
},
"./_": {
"module-sync": "./esm/index.js",
webpack: "./esm/index.js",
import: "./esm/index.js",
default: "./cjs/index.cjs",
},
};
modules.forEach((p) => {
const importBinding = p.slice(0, -3);
main_package_json.exports[`./_/${importBinding}`] = {
"module-sync": `./esm/${importBinding}.js`,
webpack: `./esm/${importBinding}.js`,
import: `./esm/${importBinding}.js`,
default: `./cjs/${importBinding}.cjs`,
};
const alias_package = {
main: `../../cjs/${importBinding}.cjs`,
module: `../../esm/${importBinding}.js`,
};
task_queue.push(
fs.outputJSON(root("_", importBinding, "package.json"), alias_package, {
encoding: "utf-8",
spaces: 4,
}),
);
if (importBinding === "index") {
return;
}
task_queue.push(
fs.outputFile(root("src", `${importBinding}.mjs`), re_export_esm(importBinding), {
encoding: "utf-8",
}),
);
indexESM.push(`export { _ as ${importBinding} } from "./${importBinding}.js";`);
cjs_module_lexer.push(`${importBinding}: null,`);
cjs_export_list.push(`get ${importBinding}() {
return require("./${importBinding}.cjs")._;
},`);
});
indexCJS.push(
`0 && (module.exports = {`,
"/* @Annotate_start: the CommonJS named exports for ESM import in node */",
...cjs_module_lexer,
"/* @Annotate_end */",
`});`,
`module.exports = {`,
...cjs_export_list,
`};`,
);
task_queue.push(
fs.outputJSON(root("package.json"), main_package_json, { spaces: 4 }),
fs.outputFile(root("esm", "index.js"), indexESM.join("\n") + "\n", {
encoding: "utf-8",
}),
fs.outputFile(root("cjs", "index.cjs"), indexCJS.join("\n") + "\n", {
encoding: "utf-8",
}),
fs.outputFile(root("src", "index.mjs"), `export * from "../esm/index.js"`, {
encoding: "utf-8",
}),
);
task_queue.push(...ast_grep());
await Promise.all(task_queue);
if (errors.length > 0) {
errors.forEach((e) => {
console.error(e);
});
process.exitCode = 1;
} else {
$.cwd = root(".");
await $`dprint fmt`;
await $`dprint fmt "scripts/*.js" -c scripts/.dprint.json`;
}
function re_export_esm(importBinding) {
return `export { _ as default } from "../esm/${importBinding}.js"`;
}
@@ -0,0 +1,53 @@
import { AsnArray, OctetString } from "@peculiar/asn1-schema";
import { SignerIdentifier } from "./signer_identifier";
import { CMSVersion, SignatureAlgorithmIdentifier, DigestAlgorithmIdentifier } from "./types";
import { Attribute } from "./attribute";
/**
* ```asn
* SignedAttributes ::= SET SIZE (1..MAX) OF Attribute
* ```
*/
export type SignedAttributes = Attribute[];
/**
* ```asn
* UnsignedAttributes ::= SET SIZE (1..MAX) OF Attribute
* ```
*/
export type UnsignedAttributes = Attribute[];
/**
* ```asn
* SignatureValue ::= OCTET STRING
* ```
*/
export type SignatureValue = OctetString;
/**
* ```asn
* SignerInfo ::= SEQUENCE {
* version CMSVersion,
* sid SignerIdentifier,
* digestAlgorithm DigestAlgorithmIdentifier,
* signedAttrs [0] IMPLICIT SignedAttributes OPTIONAL,
* signatureAlgorithm SignatureAlgorithmIdentifier,
* signature SignatureValue,
* unsignedAttrs [1] IMPLICIT UnsignedAttributes OPTIONAL }
* ```
*/
export declare class SignerInfo {
version: CMSVersion;
sid: SignerIdentifier;
digestAlgorithm: DigestAlgorithmIdentifier;
signedAttrs?: SignedAttributes;
signedAttrsRaw?: ArrayBuffer;
signatureAlgorithm: SignatureAlgorithmIdentifier;
signature: SignatureValue;
unsignedAttrs?: UnsignedAttributes;
constructor(params?: Partial<SignerInfo>);
}
/**
* ```asn
* SignerInfos ::= SET OF SignerInfo
* ```
*/
export declare class SignerInfos extends AsnArray<SignerInfo> {
constructor(items?: SignerInfo[]);
}
@@ -0,0 +1,4 @@
'use strict'
// XXX remove in v8 or beyond
module.exports = require('./index.js')
@@ -0,0 +1,30 @@
/**
* @author Toru Nagashima <https://github.com/mysticatea>
* See LICENSE file in root directory for full license.
*/
"use strict"
module.exports = {
meta: {
docs: {
description: "disallow async function declarations.",
category: "ES2017",
recommended: false,
url:
"http://mysticatea.github.io/eslint-plugin-es/rules/no-async-functions.html",
},
fixable: null,
messages: {
forbidden: "ES2017 async function declarations are forbidden.",
},
schema: [],
type: "problem",
},
create(context) {
return {
":function[async=true]"(node) {
context.report({ node, messageId: "forbidden" })
},
}
},
}
@@ -0,0 +1,38 @@
import { isPressing } from './state.mjs';
/**
* Filter out events that are not "Enter" keys.
*/
function filterEvents(callback) {
return (event) => {
if (event.key !== "Enter")
return;
callback(event);
};
}
function firePointerEvent(target, type) {
target.dispatchEvent(new PointerEvent("pointer" + type, { isPrimary: true, bubbles: true }));
}
const enableKeyboardPress = (focusEvent, eventOptions) => {
const element = focusEvent.currentTarget;
if (!element)
return;
const handleKeydown = filterEvents(() => {
if (isPressing.has(element))
return;
firePointerEvent(element, "down");
const handleKeyup = filterEvents(() => {
firePointerEvent(element, "up");
});
const handleBlur = () => firePointerEvent(element, "cancel");
element.addEventListener("keyup", handleKeyup, eventOptions);
element.addEventListener("blur", handleBlur, eventOptions);
});
element.addEventListener("keydown", handleKeydown, eventOptions);
/**
* Add an event listener that fires on blur to remove the keydown events.
*/
element.addEventListener("blur", () => element.removeEventListener("keydown", handleKeydown), eventOptions);
};
export { enableKeyboardPress };
@@ -0,0 +1,26 @@
var baseFlatten = require('./_baseFlatten'),
baseRest = require('./_baseRest'),
baseUniq = require('./_baseUniq'),
isArrayLikeObject = require('./isArrayLikeObject');
/**
* Creates an array of unique values, in order, from all given arrays using
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
* for equality comparisons.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Array
* @param {...Array} [arrays] The arrays to inspect.
* @returns {Array} Returns the new array of combined values.
* @example
*
* _.union([2], [1, 2]);
* // => [2, 1]
*/
var union = baseRest(function(arrays) {
return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));
});
module.exports = union;
@@ -0,0 +1,119 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var genericRole = {
abstract: false,
accessibleNameRequired: false,
baseConcepts: [],
childrenPresentational: false,
nameFrom: ['prohibited'],
prohibitedProps: ['aria-label', 'aria-labelledby'],
props: {},
relatedConcepts: [{
concept: {
name: 'a'
},
module: 'HTML'
}, {
concept: {
name: 'area'
},
module: 'HTML'
}, {
concept: {
name: 'aside'
},
module: 'HTML'
}, {
concept: {
name: 'b'
},
module: 'HTML'
}, {
concept: {
name: 'bdo'
},
module: 'HTML'
}, {
concept: {
name: 'body'
},
module: 'HTML'
}, {
concept: {
name: 'data'
},
module: 'HTML'
}, {
concept: {
name: 'div'
},
module: 'HTML'
}, {
concept: {
constraints: ['scoped to the main element', 'scoped to a sectioning content element', 'scoped to a sectioning root element other than body'],
name: 'footer'
},
module: 'HTML'
}, {
concept: {
constraints: ['scoped to the main element', 'scoped to a sectioning content element', 'scoped to a sectioning root element other than body'],
name: 'header'
},
module: 'HTML'
}, {
concept: {
name: 'hgroup'
},
module: 'HTML'
}, {
concept: {
name: 'i'
},
module: 'HTML'
}, {
concept: {
name: 'pre'
},
module: 'HTML'
}, {
concept: {
name: 'q'
},
module: 'HTML'
}, {
concept: {
name: 'samp'
},
module: 'HTML'
}, {
concept: {
name: 'section'
},
module: 'HTML'
}, {
concept: {
name: 'small'
},
module: 'HTML'
}, {
concept: {
name: 'span'
},
module: 'HTML'
}, {
concept: {
name: 'u'
},
module: 'HTML'
}],
requireContextRole: [],
requiredContextRole: [],
requiredOwnedElements: [],
requiredProps: {},
superClass: [['roletype', 'structure']]
};
var _default = exports.default = genericRole;
@@ -0,0 +1,53 @@
import baseIteratee from './_baseIteratee.js';
import basePullAt from './_basePullAt.js';
/**
* Removes all elements from `array` that `predicate` returns truthy for
* and returns an array of the removed elements. The predicate is invoked
* with three arguments: (value, index, array).
*
* **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull`
* to pull elements from an array by value.
*
* @static
* @memberOf _
* @since 2.0.0
* @category Array
* @param {Array} array The array to modify.
* @param {Function} [predicate=_.identity] The function invoked per iteration.
* @returns {Array} Returns the new array of removed elements.
* @example
*
* var array = [1, 2, 3, 4];
* var evens = _.remove(array, function(n) {
* return n % 2 == 0;
* });
*
* console.log(array);
* // => [1, 3]
*
* console.log(evens);
* // => [2, 4]
*/
function remove(array, predicate) {
var result = [];
if (!(array && array.length)) {
return result;
}
var index = -1,
indexes = [],
length = array.length;
predicate = baseIteratee(predicate, 3);
while (++index < length) {
var value = array[index];
if (predicate(value, index, array)) {
result.push(value);
indexes.push(index);
}
}
basePullAt(array, indexes);
return result;
}
export default remove;
@@ -0,0 +1,16 @@
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $String = GetIntrinsic('%String%');
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/11.0/#sec-numeric-types-number-tostring
module.exports = function NumberToString(x) {
if (typeof x !== 'number') {
throw new $TypeError('Assertion failed: `x` must be a Number');
}
return $String(x);
};
@@ -0,0 +1,8 @@
"use strict";
var _overload_yield = require("./_overload_yield.cjs");
function _await_async_generator(value) {
return new _overload_yield._(value, /* kind: await */ 0);
}
exports._ = _await_async_generator;
@@ -0,0 +1,242 @@
"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 });
const regexpp_1 = require("@eslint-community/regexpp");
const utils_1 = require("@typescript-eslint/utils");
const ts = __importStar(require("typescript"));
const util_1 = require("../util");
exports.default = (0, util_1.createRule)({
name: 'prefer-includes',
meta: {
type: 'suggestion',
docs: {
description: 'Enforce `includes` method over `indexOf` method',
recommended: 'stylistic',
requiresTypeChecking: true,
},
fixable: 'code',
messages: {
preferIncludes: "Use 'includes()' method instead.",
preferStringIncludes: 'Use `String#includes()` method with a string instead.',
},
schema: [],
},
defaultOptions: [],
create(context) {
const globalScope = context.sourceCode.getScope(context.sourceCode.ast);
const services = (0, util_1.getParserServices)(context);
const checker = services.program.getTypeChecker();
function isNumber(node, value) {
const evaluated = (0, util_1.getStaticValue)(node, globalScope);
return evaluated?.value === value;
}
function isPositiveCheck(node) {
switch (node.operator) {
case '!==':
case '!=':
case '>':
return isNumber(node.right, -1);
case '>=':
return isNumber(node.right, 0);
default:
return false;
}
}
function isNegativeCheck(node) {
switch (node.operator) {
case '===':
case '==':
case '<=':
return isNumber(node.right, -1);
case '<':
return isNumber(node.right, 0);
default:
return false;
}
}
function hasSameParameters(nodeA, nodeB) {
if (!ts.isFunctionLike(nodeA) || !ts.isFunctionLike(nodeB)) {
return false;
}
const paramsA = nodeA.parameters;
const paramsB = nodeB.parameters;
if (paramsA.length !== paramsB.length) {
return false;
}
for (let i = 0; i < paramsA.length; ++i) {
const paramA = paramsA[i];
const paramB = paramsB[i];
// Check name, type, and question token once.
if (paramA.getText() !== paramB.getText()) {
return false;
}
}
return true;
}
/**
* Parse a given node if it's a `RegExp` instance.
* @param node The node to parse.
*/
function parseRegExp(node) {
const evaluated = (0, util_1.getStaticValue)(node, globalScope);
if (evaluated == null || !(evaluated.value instanceof RegExp)) {
return null;
}
const { flags, pattern } = (0, regexpp_1.parseRegExpLiteral)(evaluated.value);
if (pattern.alternatives.length !== 1 ||
flags.ignoreCase ||
flags.global) {
return null;
}
// Check if it can determine a unique string.
const chars = pattern.alternatives[0].elements;
if (!chars.every(c => c.type === 'Character')) {
return null;
}
// To string.
return String.fromCodePoint(...chars.map(c => c.value));
}
function escapeString(str) {
const EscapeMap = {
'\0': '\\0',
'\t': '\\t',
'\n': '\\n',
'\v': '\\v',
'\f': '\\f',
'\r': '\\r',
"'": "\\'",
'\\': '\\\\',
// "\b" cause unexpected replacements
// '\b': '\\b',
};
const replaceRegex = new RegExp(Object.values(EscapeMap).join('|'), 'g');
return str.replaceAll(replaceRegex, char => EscapeMap[char]);
}
function checkArrayIndexOf(node, allowFixing) {
if (!(0, util_1.isStaticMemberAccessOfValue)(node, context, 'indexOf')) {
return;
}
// Check if the comparison is equivalent to `includes()`.
const callNode = node.parent;
const compareNode = (callNode.parent.type === utils_1.AST_NODE_TYPES.ChainExpression
? callNode.parent.parent
: callNode.parent);
const negative = isNegativeCheck(compareNode);
if (!negative && !isPositiveCheck(compareNode)) {
return;
}
// Get the symbol of `indexOf` method.
const indexofMethodDeclarations = services
.getSymbolAtLocation(node.property)
?.getDeclarations();
if (indexofMethodDeclarations == null ||
indexofMethodDeclarations.length === 0) {
return;
}
// Check if every declaration of `indexOf` method has `includes` method
// and the two methods have the same parameters.
for (const instanceofMethodDecl of indexofMethodDeclarations) {
const typeDecl = instanceofMethodDecl.parent;
const type = checker.getTypeAtLocation(typeDecl);
const includesMethodDecl = type
.getProperty('includes')
?.getDeclarations();
if (!includesMethodDecl?.some(includesMethodDecl => hasSameParameters(includesMethodDecl, instanceofMethodDecl))) {
return;
}
}
// Report it.
context.report({
node: compareNode,
messageId: 'preferIncludes',
...(allowFixing && {
*fix(fixer) {
if (negative) {
yield fixer.insertTextBefore(callNode, '!');
}
yield fixer.replaceText(node.property, 'includes');
yield fixer.removeRange([callNode.range[1], compareNode.range[1]]);
},
}),
});
}
return {
// a.indexOf(b) !== 1
'BinaryExpression > CallExpression.left > MemberExpression'(node) {
checkArrayIndexOf(node, /* allowFixing */ true);
},
// a?.indexOf(b) !== 1
'BinaryExpression > ChainExpression.left > CallExpression > MemberExpression'(node) {
checkArrayIndexOf(node, /* allowFixing */ false);
},
// /bar/.test(foo)
'CallExpression[arguments.length=1] > MemberExpression.callee[property.name="test"][computed=false]'(node) {
const callNode = node.parent;
const text = parseRegExp(node.object);
if (text == null) {
return;
}
//check the argument type of test methods
const argument = callNode.arguments[0];
const type = (0, util_1.getConstrainedTypeAtLocation)(services, argument);
const includesMethodDecl = type
.getProperty('includes')
?.getDeclarations();
if (includesMethodDecl == null) {
return;
}
context.report({
node: callNode,
messageId: 'preferStringIncludes',
*fix(fixer) {
const argNode = callNode.arguments[0];
const needsParen = argNode.type !== utils_1.AST_NODE_TYPES.Literal &&
argNode.type !== utils_1.AST_NODE_TYPES.TemplateLiteral &&
argNode.type !== utils_1.AST_NODE_TYPES.Identifier &&
argNode.type !== utils_1.AST_NODE_TYPES.MemberExpression &&
argNode.type !== utils_1.AST_NODE_TYPES.CallExpression;
yield fixer.removeRange([callNode.range[0], argNode.range[0]]);
yield fixer.removeRange([argNode.range[1], callNode.range[1]]);
if (needsParen) {
yield fixer.insertTextBefore(argNode, '(');
yield fixer.insertTextAfter(argNode, ')');
}
yield fixer.insertTextAfter(argNode, `${node.optional ? '?.' : '.'}includes('${escapeString(text)}')`);
},
});
},
};
},
});
@@ -0,0 +1,210 @@
import "../chunk-3ZVSVLZD.mjs";
import {
spacer
} from "../chunk-AKXXHKTO.mjs";
import {
spinner
} from "../chunk-DBPAK7QN.mjs";
import {
table
} from "../chunk-C3HKPBNA.mjs";
import {
tabs
} from "../chunk-TYZBTYGB.mjs";
import {
toggle
} from "../chunk-URLJLYFZ.mjs";
import {
user
} from "../chunk-ETLZPM2W.mjs";
import {
popover
} from "../chunk-RQR2LIP2.mjs";
import {
circularProgress,
progress
} from "../chunk-6KWI4IHE.mjs";
import {
radio,
radioGroup
} from "../chunk-USWAYQNP.mjs";
import {
scrollShadow
} from "../chunk-AN5I7NTT.mjs";
import {
select
} from "../chunk-CRDAR2QA.mjs";
import {
skeleton
} from "../chunk-OAHW4NON.mjs";
import {
slider
} from "../chunk-C2ZKHLLE.mjs";
import {
snippet
} from "../chunk-SC2SILVU.mjs";
import {
input
} from "../chunk-3ZDIPBHM.mjs";
import {
kbd
} from "../chunk-VX7HAPUO.mjs";
import {
link,
linkAnchorClasses
} from "../chunk-UEWXQXTA.mjs";
import "../chunk-YJLQTC7L.mjs";
import {
menu,
menuItem,
menuSection
} from "../chunk-6B2RD5MH.mjs";
import {
modal
} from "../chunk-5WML3KKH.mjs";
import {
navbar
} from "../chunk-PMUB6T6D.mjs";
import {
pagination
} from "../chunk-QG4TODGA.mjs";
import {
divider
} from "../chunk-AXSF7SRE.mjs";
import {
drawer
} from "../chunk-EP7KPCL3.mjs";
import {
drip
} from "../chunk-BWPOLXFL.mjs";
import {
dropdown,
dropdownItem,
dropdownMenu,
dropdownSection
} from "../chunk-3UH6HA4R.mjs";
import {
form
} from "../chunk-E257OVH3.mjs";
import {
image
} from "../chunk-TOQXZATI.mjs";
import {
inputOtp
} from "../chunk-PTQZLHJA.mjs";
import {
button,
buttonGroup
} from "../chunk-FIMGFFVI.mjs";
import {
calendar
} from "../chunk-ZMRVZUDN.mjs";
import {
card
} from "../chunk-CLS6PP7O.mjs";
import {
checkbox,
checkboxGroup
} from "../chunk-2CFQPGZ4.mjs";
import {
chip
} from "../chunk-GH4RNLJX.mjs";
import {
code
} from "../chunk-JE6SPRGQ.mjs";
import {
dateInput
} from "../chunk-A3NXEE2Q.mjs";
import {
datePicker,
dateRangePicker
} from "../chunk-QFGVVQRM.mjs";
import {
accordion,
accordionItem
} from "../chunk-UGMXQ6TV.mjs";
import {
alert
} from "../chunk-423W5XJQ.mjs";
import {
autocomplete
} from "../chunk-ZZ2VSLD6.mjs";
import {
avatar,
avatarGroup
} from "../chunk-4MXK6CQJ.mjs";
import {
badge
} from "../chunk-XQI5RD6S.mjs";
import {
breadcrumbItem,
breadcrumbs
} from "../chunk-EYPT3KBI.mjs";
import "../chunk-CWYZ2GEH.mjs";
import "../chunk-GQT3YUX3.mjs";
import "../chunk-46U6G7UJ.mjs";
import "../chunk-DGTYPKBN.mjs";
import "../chunk-UWE6H66T.mjs";
import "../chunk-GIXI35A3.mjs";
import "../chunk-GH5E4FQB.mjs";
export {
accordion,
accordionItem,
alert,
autocomplete,
avatar,
avatarGroup,
badge,
breadcrumbItem,
breadcrumbs,
button,
buttonGroup,
calendar,
card,
checkbox,
checkboxGroup,
chip,
circularProgress,
code,
dateInput,
datePicker,
dateRangePicker,
divider,
drawer,
drip,
dropdown,
dropdownItem,
dropdownMenu,
dropdownSection,
form,
image,
input,
inputOtp,
kbd,
link,
linkAnchorClasses,
menu as listbox,
menuItem as listboxItem,
menuSection as listboxSection,
menu,
menuItem,
menuSection,
modal,
navbar,
pagination,
popover,
progress,
radio,
radioGroup,
scrollShadow,
select,
skeleton,
slider,
snippet,
spacer,
spinner,
table,
tabs,
toggle,
user
};
@@ -0,0 +1,11 @@
export type Either<TLeft, TRight> = Left<TLeft> | Right<TRight>;
export interface BaseEither<T> {
value: T;
}
export interface Left<T> extends BaseEither<T> {
isRight: false;
}
export interface Right<T> extends BaseEither<T> {
isRight: true;
}
//# sourceMappingURL=Either.d.ts.map
@@ -0,0 +1,186 @@
"use strict"
const { READ } = require("@eslint-community/eslint-utils")
/**
* @satisfies {import('../types.js').SupportVersionTraceMap}
*/
const process = {
allowedNodeEnvironmentFlags: { [READ]: { supported: ["10.10.0"] } },
availableMemory: {
[READ]: { experimental: ["22.0.0", "20.13.0"], supported: ["22.16.0"] },
},
arch: { [READ]: { supported: ["0.5.0"] } },
argv: { [READ]: { supported: ["0.1.27"] } },
argv0: { [READ]: { supported: ["6.4.0"] } },
channel: { [READ]: { supported: ["7.1.0"] } },
config: { [READ]: { supported: ["0.7.7"] } },
connected: { [READ]: { supported: ["0.7.2"] } },
debugPort: { [READ]: { supported: ["0.7.2"] } },
env: { [READ]: { supported: ["0.1.27"] } },
execArgv: { [READ]: { supported: ["0.7.7"] } },
execPath: { [READ]: { supported: ["0.1.100"] } },
execve: { [READ]: { experimental: ["22.15.0", "23.11.0"] } },
exitCode: { [READ]: { supported: ["0.11.8"] } },
features: {
cached_builtins: { [READ]: { supported: ["12.0.0"] } },
debug: { [READ]: { supported: ["0.5.5"] } },
inspector: { [READ]: { supported: ["11.10.0"] } },
ipv6: {
[READ]: {
supported: ["0.5.3"],
deprecated: ["22.13.0", "23.4.0"],
},
},
require_module: {
[READ]: { supported: ["23.0.0", "22.10.0", "20.19.0"] },
},
tls: {
[READ]: { supported: ["0.5.3"], deprecated: ["22.13.0", "23.4.0"] },
},
tls_alpn: {
[READ]: { supported: ["4.8.0"], deprecated: ["22.13.0", "23.4.0"] },
},
tls_ocsp: {
[READ]: {
supported: ["0.11.13"],
deprecated: ["22.13.0", "23.4.0"],
},
},
tls_sni: {
[READ]: { supported: ["0.5.3"], deprecated: ["22.13.0", "23.4.0"] },
},
typescript: { [READ]: { experimental: ["23.0.0", "22.10.0"] } },
uv: {
[READ]: { supported: ["0.5.3"], deprecated: ["22.13.0", "23.4.0"] },
},
},
finalization: {
register: { [READ]: { experimental: ["22.5.0"] } },
registerBeforeExit: { [READ]: { experimental: ["22.5.0"] } },
unregister: { [READ]: { experimental: ["22.5.0"] } },
},
getBuiltinModule: { [READ]: { supported: ["22.3.0", "20.16.0"] } },
mainModule: {
[READ]: {
supported: ["0.1.17"],
deprecated: ["14.0.0"],
},
},
noDeprecation: { [READ]: { supported: ["0.8.0"] } },
permission: { [READ]: { supported: ["20.0.0"] } },
pid: { [READ]: { supported: ["0.1.15"] } },
platform: { [READ]: { supported: ["0.1.16"] } },
ppid: { [READ]: { supported: ["9.2.0", "8.10.0", "6.13.0"] } },
ref: { [READ]: { experimental: ["22.14.0", "23.6.0"] } },
release: { [READ]: { supported: ["3.0.0"] } },
report: {
[READ]: {
experimental: ["11.8.0"],
supported: ["13.12.0", "12.17.0"],
},
excludeEnv: { [READ]: { supported: ["23.3.0", "22.13.0"] } },
},
sourceMapsEnabled: { [READ]: { experimental: ["20.7.0"] } },
stdin: {
[READ]: { supported: ["0.1.3"] },
// tty.ReadStream
isRaw: { [READ]: { supported: ["0.7.7"] } },
isTTY: { [READ]: { supported: ["0.5.8"] } },
setRawMode: { [READ]: { supported: ["0.7.7"] } },
},
stdout: {
[READ]: { supported: ["0.1.3"] },
// tty.WriteStream
clearLine: { [READ]: { supported: ["0.7.7"] } },
clearScreenDown: { [READ]: { supported: ["0.7.7"] } },
columns: { [READ]: { supported: ["0.7.7"] } },
cursorTo: { [READ]: { supported: ["0.7.7"] } },
getColorDepth: { [READ]: { supported: ["9.9.0"] } },
getWindowSize: { [READ]: { supported: ["0.7.7"] } },
hasColors: { [READ]: { supported: ["11.13.0", "10.16.0"] } },
isTTY: { [READ]: { supported: ["0.5.8"] } },
moveCursor: { [READ]: { supported: ["0.7.7"] } },
rows: { [READ]: { supported: ["0.7.7"] } },
},
stderr: {
[READ]: { supported: ["0.1.3"] },
// tty.WriteStream
clearLine: { [READ]: { supported: ["0.7.7"] } },
clearScreenDown: { [READ]: { supported: ["0.7.7"] } },
columns: { [READ]: { supported: ["0.7.7"] } },
cursorTo: { [READ]: { supported: ["0.7.7"] } },
getColorDepth: { [READ]: { supported: ["9.9.0"] } },
getWindowSize: { [READ]: { supported: ["0.7.7"] } },
hasColors: { [READ]: { supported: ["11.13.0", "10.16.0"] } },
isTTY: { [READ]: { supported: ["0.5.8"] } },
moveCursor: { [READ]: { supported: ["0.7.7"] } },
rows: { [READ]: { supported: ["0.7.7"] } },
},
threadCpuUsage: { [READ]: { supported: ["22.19.0", "23.9.0"] } },
throwDeprecation: { [READ]: { supported: ["0.9.12"] } },
title: { [READ]: { supported: ["0.1.104"] } },
traceDeprecation: { [READ]: { supported: ["0.8.0"] } },
version: { [READ]: { supported: ["0.1.3"] } },
versions: { [READ]: { supported: ["0.2.0"] } },
abort: { [READ]: { supported: ["0.7.0"] } },
chdir: { [READ]: { supported: ["0.1.17"] } },
constrainedMemory: {
[READ]: { experimental: ["19.6.0", "18.15.0"], supported: ["22.16.0"] },
},
cpuUsage: { [READ]: { supported: ["6.1.0"] } },
cwd: { [READ]: { supported: ["0.1.8"] } },
disconnect: { [READ]: { supported: ["0.7.2"] } },
dlopen: { [READ]: { supported: ["0.1.16"] } },
emitWarning: { [READ]: { supported: ["6.0.0"] } },
exit: { [READ]: { supported: ["0.1.13"] } },
getActiveResourcesInfo: {
[READ]: { experimental: ["17.3.0", "16.14.0"], supported: ["22.16.0"] },
},
getegid: { [READ]: { supported: ["2.0.0"] } },
geteuid: { [READ]: { supported: ["2.0.0"] } },
getgid: { [READ]: { supported: ["0.1.31"] } },
getgroups: { [READ]: { supported: ["0.9.4"] } },
getuid: { [READ]: { supported: ["0.1.28"] } },
hasUncaughtExceptionCaptureCallback: { [READ]: { supported: ["9.3.0"] } },
hrtime: {
[READ]: { supported: ["0.7.6"] },
bigint: { [READ]: { supported: ["10.7.0"] } },
},
initgroups: { [READ]: { supported: ["0.9.4"] } },
kill: { [READ]: { supported: ["0.0.6"] } },
loadEnvFile: { [READ]: { supported: ["20.12.0", "21.7.0"] } },
memoryUsage: { [READ]: { supported: ["0.1.16"] } },
rss: { [READ]: { supported: ["15.6.0", "14.18.0"] } },
nextTick: { [READ]: { supported: ["0.1.26"] } },
resourceUsage: { [READ]: { supported: ["12.6.0"] } },
send: { [READ]: { supported: ["0.5.9"] } },
setegid: { [READ]: { supported: ["2.0.0"] } },
seteuid: { [READ]: { supported: ["2.0.0"] } },
setgid: { [READ]: { supported: ["0.1.31"] } },
setgroups: { [READ]: { supported: ["0.9.4"] } },
setuid: { [READ]: { supported: ["0.1.28"] } },
setSourceMapsEnabled: { [READ]: { experimental: ["16.6.0", "14.18.0"] } },
setUncaughtExceptionCaptureCallback: { [READ]: { supported: ["9.3.0"] } },
umask: { [READ]: { supported: ["0.1.19"] } },
unref: { [READ]: { experimental: ["22.14.0", "23.6.0"] } },
uptime: { [READ]: { supported: ["0.5.0"] } },
}
/**
* @satisfies {import('../types.js').SupportVersionTraceMap}
*/
module.exports = {
process: {
[READ]: { supported: ["0.1.3"] },
...process,
},
"node:process": {
[READ]: { supported: ["14.13.1", "12.20.0"] },
...process,
},
}
@@ -0,0 +1,140 @@
declare function addUniqueItem<T>(arr: T[], item: T): void;
declare function removeItem<T>(arr: T[], item: T): void;
declare function moveItem<T>([...arr]: T[], fromIndex: number, toIndex: number): T[];
declare const clamp: (min: number, max: number, v: number) => number;
type DevMessage = (check: boolean, message: string, errorCode?: string) => void;
declare let warning: DevMessage;
declare let invariant: DevMessage;
declare const MotionGlobalConfig: {
skipAnimations?: boolean;
instantAnimations?: boolean;
useManualTiming?: boolean;
WillChange?: any;
mix?: <T>(a: T, b: T) => (p: number) => T;
};
/**
* Check if value is a numerical string, ie a string that is purely a number eg "100" or "-100.1"
*/
declare const isNumericalString: (v: string) => boolean;
declare function isObject(value: unknown): value is object;
/**
* Check if the value is a zero value string like "0px" or "0%"
*/
declare const isZeroValueString: (v: string) => boolean;
declare function memo<T extends any>(callback: () => T): () => T;
declare const noop: <T>(any: T) => T;
declare const pipe: (...transformers: Function[]) => Function;
declare const progress: (from: number, to: number, value: number) => number;
type GenericHandler = (...args: any) => void;
declare class SubscriptionManager<Handler extends GenericHandler> {
private subscriptions;
add(handler: Handler): VoidFunction;
notify(a?: Parameters<Handler>[0], b?: Parameters<Handler>[1], c?: Parameters<Handler>[2]): void;
getSize(): number;
clear(): void;
}
/**
* Converts seconds to milliseconds
*
* @param seconds - Time in seconds.
* @return milliseconds - Converted time in milliseconds.
*/
declare const secondsToMilliseconds: (seconds: number) => number;
declare const millisecondsToSeconds: (milliseconds: number) => number;
declare function velocityPerSecond(velocity: number, frameDuration: number): number;
declare function hasWarned(message: string): boolean;
declare function warnOnce(condition: boolean, message: string, errorCode?: string): void;
declare const wrap: (min: number, max: number, v: number) => number;
declare const anticipate: (p: number) => number;
declare const backOut: (t: number) => number;
declare const backIn: EasingFunction;
declare const backInOut: EasingFunction;
type EasingFunction = (v: number) => number;
type EasingModifier = (easing: EasingFunction) => EasingFunction;
type BezierDefinition = readonly [number, number, number, number];
type EasingDefinition = BezierDefinition | "linear" | "easeIn" | "easeOut" | "easeInOut" | "circIn" | "circOut" | "circInOut" | "backIn" | "backOut" | "backInOut" | "anticipate";
/**
* The easing function to use. Set as one of:
*
* - The name of an in-built easing function.
* - An array of four numbers to define a cubic bezier curve.
* - An easing function, that accepts and returns a progress value between `0` and `1`.
*
* @public
*/
type Easing = EasingDefinition | EasingFunction;
declare const circIn: EasingFunction;
declare const circOut: EasingFunction;
declare const circInOut: EasingFunction;
declare function cubicBezier(mX1: number, mY1: number, mX2: number, mY2: number): (t: number) => number;
declare const easeIn: (t: number) => number;
declare const easeOut: (t: number) => number;
declare const easeInOut: (t: number) => number;
declare const mirrorEasing: EasingModifier;
declare const reverseEasing: EasingModifier;
type Direction = "start" | "end";
declare function steps(numSteps: number, direction?: Direction): EasingFunction;
declare function getEasingForSegment(easing: Easing | Easing[], i: number): Easing;
declare const isBezierDefinition: (easing: Easing | Easing[]) => easing is BezierDefinition;
declare const isEasingArray: (ease: any) => ease is Easing[];
declare const easingDefinitionToFunction: (definition: Easing) => EasingFunction;
interface Point {
x: number;
y: number;
}
interface Axis {
min: number;
max: number;
}
interface Box {
x: Axis;
y: Axis;
}
interface BoundingBox {
top: number;
right: number;
bottom: number;
left: number;
}
interface AxisDelta {
translate: number;
scale: number;
origin: number;
originPoint: number;
}
interface Delta {
x: AxisDelta;
y: AxisDelta;
}
type TransformPoint = (point: Point) => Point;
export { type Axis, type AxisDelta, type BezierDefinition, type BoundingBox, type Box, type Delta, type DevMessage, type Direction, type Easing, type EasingDefinition, type EasingFunction, type EasingModifier, MotionGlobalConfig, type Point, SubscriptionManager, type TransformPoint, addUniqueItem, anticipate, backIn, backInOut, backOut, circIn, circInOut, circOut, clamp, cubicBezier, easeIn, easeInOut, easeOut, easingDefinitionToFunction, getEasingForSegment, hasWarned, invariant, isBezierDefinition, isEasingArray, isNumericalString, isObject, isZeroValueString, memo, millisecondsToSeconds, mirrorEasing, moveItem, noop, pipe, progress, removeItem, reverseEasing, secondsToMilliseconds, steps, velocityPerSecond, warnOnce, warning, wrap };
@@ -0,0 +1,33 @@
import {charCodes} from "./charcodes";
// https://tc39.github.io/ecma262/#sec-white-space
export const WHITESPACE_CHARS = [
0x0009,
0x000b,
0x000c,
charCodes.space,
charCodes.nonBreakingSpace,
charCodes.oghamSpaceMark,
0x2000, // EN QUAD
0x2001, // EM QUAD
0x2002, // EN SPACE
0x2003, // EM SPACE
0x2004, // THREE-PER-EM SPACE
0x2005, // FOUR-PER-EM SPACE
0x2006, // SIX-PER-EM SPACE
0x2007, // FIGURE SPACE
0x2008, // PUNCTUATION SPACE
0x2009, // THIN SPACE
0x200a, // HAIR SPACE
0x202f, // NARROW NO-BREAK SPACE
0x205f, // MEDIUM MATHEMATICAL SPACE
0x3000, // IDEOGRAPHIC SPACE
0xfeff, // ZERO WIDTH NO-BREAK SPACE
];
export const skipWhiteSpace = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g;
export const IS_WHITESPACE = new Uint8Array(65536);
for (const char of WHITESPACE_CHARS) {
IS_WHITESPACE[char] = 1;
}
@@ -0,0 +1 @@
{"mappings":"AAAA,iBAAiB;IAAG,WAAW,CAAC,OAAO,CAAC;AACxC","sources":["packages/@react-aria/overlays/intl/en-US.json"],"sourcesContent":["{\n \"dismiss\": \"Dismiss\"\n}\n"],"names":[],"version":3,"file":"en-US.main.js.map"}
@@ -0,0 +1,7 @@
"use client";
import {
table_column_header_default
} from "./chunk-SAU5MAVM.mjs";
export {
table_column_header_default as default
};
@@ -0,0 +1,4 @@
declare function markFieldsDirty<T>(data: T, fields?: Record<string, any>): Record<string, any>;
export default function getDirtyFields<T>(data: T, formValues: T, dirtyFieldsFromValues?: Record<Extract<keyof T, string>, ReturnType<typeof markFieldsDirty> | boolean>): Record<Extract<keyof T, string>, boolean | Record<string, any>>;
export {};
//# sourceMappingURL=getDirtyFields.d.ts.map
Loaded 100 of 35554 files, more files were not shown because too many files have changed in this diff. Show more