This commit is contained in:
2025-05-09 05:30:08 +02:00
parent 7bb10e7df4
commit 73367bad9e
5322 changed files with 1266973 additions and 313 deletions

View File

@@ -0,0 +1 @@
module.exports={A:{A:{"2":"mC","8":"K D E","129":"A B","161":"F"},B:{"1":"0 9 O P Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB I","129":"C L M G N"},C:{"1":"0 1 2 3 4 5 6 7 8 9 N O P QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB MC wB NC xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC Q H R OC 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 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB I PC EC QC RC oC pC","2":"nC LC","33":"J PB K D E F A B C L M G qC rC"},D:{"1":"0 9 ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB MC wB NC xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC 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 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB I PC EC QC RC","33":"1 2 3 4 5 6 7 8 J PB K D E F A B C L M G N O P QB RB SB TB UB VB WB XB YB"},E:{"1":"F A B C L M G wC TC FC GC xC yC zC UC VC HC 0C IC WC XC YC ZC aC 1C JC bC cC dC eC fC 2C KC gC hC iC jC 3C","33":"J PB K D E sC SC tC uC vC"},F:{"1":"0 4 5 6 7 8 RB SB TB UB VB WB XB YB ZB aB 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 Q H R OC 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 GC","2":"F 4C 5C","33":"1 2 3 B C G N O P QB 6C 7C FC kC 8C"},G:{"1":"ED FD GD HD ID JD KD LD MD ND OD PD QD RD SD UC VC HC TD IC WC XC YC ZC aC UD JC bC cC dC eC fC VD KC gC hC iC jC","33":"E SC 9C lC AD BD CD DD"},H:{"2":"WD"},I:{"1":"I","33":"LC J XD YD ZD aD lC bD cD"},J:{"33":"D A"},K:{"1":"B C H FC kC GC","2":"A"},L:{"1":"I"},M:{"1":"EC"},N:{"1":"A B"},O:{"1":"HC"},P:{"1":"1 2 3 4 5 6 7 8 J dD eD fD gD hD TC iD jD kD lD mD IC JC KC nD"},Q:{"1":"oD"},R:{"1":"pD"},S:{"1":"qD rD"}},B:4,C:"CSS3 2D Transforms",D:true};

View File

@@ -0,0 +1,23 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.finalize = finalize;
exports.flattenToSet = flattenToSet;
function finalize(deepArr) {
return Object.freeze(deepArr);
}
function flattenToSet(arr) {
const result = new Set();
const stack = [arr];
while (stack.length > 0) {
for (const el of stack.pop()) {
if (Array.isArray(el)) stack.push(el);else result.add(el);
}
}
return result;
}
0 && 0;
//# sourceMappingURL=deep-array.js.map

View File

@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F A B mC"},B:{"1":"0 9 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 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB I","2":"C L M G N O P"},C:{"1":"0 1 2 3 4 5 6 7 8 9 J PB K D E F A B C L M G N O P QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB MC wB NC xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC Q H R OC 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 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB I PC EC QC RC oC pC","16":"nC LC qC rC"},D:{"1":"0 9 oB pB qB rB sB tB uB vB MC wB NC xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC 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 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB I PC EC QC RC","16":"J PB K D E F A B C L M","132":"1 2 3 4 5 6 7 8 G N O P QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB"},E:{"1":"B C L M G TC FC GC xC yC zC UC VC HC 0C IC WC XC YC ZC aC 1C JC bC cC dC eC fC 2C KC gC hC iC jC 3C","16":"J PB sC SC","132":"K D E F A tC uC vC wC"},F:{"1":"0 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 Q H R OC 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","16":"F B 4C 5C 6C 7C FC kC","132":"1 2 3 4 5 6 7 8 G N O P QB RB SB TB UB VB WB XB YB ZB aB","260":"C 8C GC"},G:{"1":"HD ID JD KD LD MD ND OD PD QD RD SD UC VC HC TD IC WC XC YC ZC aC UD JC bC cC dC eC fC VD KC gC hC iC jC","16":"SC 9C lC AD BD","132":"E CD DD ED FD GD"},H:{"260":"WD"},I:{"1":"I","16":"LC XD YD ZD","132":"J aD lC bD cD"},J:{"16":"D","132":"A"},K:{"1":"H","16":"A B C FC kC","260":"GC"},L:{"1":"I"},M:{"1":"EC"},N:{"2":"A B"},O:{"1":"HC"},P:{"1":"1 2 3 4 5 6 7 8 dD eD fD gD hD TC iD jD kD lD mD IC JC KC nD","132":"J"},Q:{"1":"oD"},R:{"1":"pD"},S:{"1":"qD rD"}},B:5,C:":default CSS pseudo-class",D:true};

View File

@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F A B mC"},B:{"1":"0 9 N O P Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB I","2":"C L M G"},C:{"1":"0 9 mB nB oB pB qB rB sB tB uB vB MC wB NC xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC Q H R OC 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 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB I PC EC QC RC oC pC","2":"1 2 3 4 5 6 7 8 nC LC J PB K D E F A B C L M G N O P QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB qC rC"},D:{"1":"0 9 oB pB qB rB sB tB uB vB MC wB NC xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC 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 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB I PC EC QC RC","2":"1 2 3 4 5 6 7 8 J PB K D E F A B C L M G N O P QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB"},E:{"1":"A B C L M G TC FC GC xC yC zC UC VC HC 0C IC WC XC YC ZC aC 1C JC bC cC dC eC fC 2C KC gC hC iC jC 3C","2":"J PB K D E F sC SC tC uC vC wC"},F:{"1":"0 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 Q H R OC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z","2":"1 2 3 4 5 6 7 8 F B C G N O P QB RB SB TB UB VB WB XB YB ZB aB 4C 5C 6C 7C FC kC 8C GC"},G:{"1":"GD HD ID JD KD LD MD ND OD PD QD RD SD UC VC HC TD IC WC XC YC ZC aC UD JC bC cC dC eC fC VD KC gC hC iC jC","2":"E SC 9C lC AD BD CD DD ED FD"},H:{"2":"WD"},I:{"1":"I","2":"LC J XD YD ZD aD lC bD cD"},J:{"2":"D A"},K:{"1":"H","2":"A B C FC kC GC"},L:{"1":"I"},M:{"1":"EC"},N:{"2":"A B"},O:{"1":"HC"},P:{"1":"1 2 3 4 5 6 7 8 dD eD fD gD hD TC iD jD kD lD mD IC JC KC nD","2":"J"},Q:{"1":"oD"},R:{"1":"pD"},S:{"1":"rD","2":"qD"}},B:1,C:"Passive event listeners",D:true};

View File

@@ -0,0 +1 @@
{"version":3,"names":["_defineAccessor","type","obj","key","fn","desc","configurable","enumerable","Object","defineProperty"],"sources":["../../src/helpers/defineAccessor.ts"],"sourcesContent":["/* @minVersion 7.20.7 */\n\nexport default function _defineAccessor<Type extends \"get\" | \"set\">(\n type: Type,\n obj: any,\n key: string | symbol,\n fn: PropertyDescriptor[Type],\n) {\n var desc: PropertyDescriptor = { configurable: true, enumerable: true };\n desc[type] = fn;\n return Object.defineProperty(obj, key, desc);\n}\n"],"mappings":";;;;;;AAEe,SAASA,eAAeA,CACrCC,IAAU,EACVC,GAAQ,EACRC,GAAoB,EACpBC,EAA4B,EAC5B;EACA,IAAIC,IAAwB,GAAG;IAAEC,YAAY,EAAE,IAAI;IAAEC,UAAU,EAAE;EAAK,CAAC;EACvEF,IAAI,CAACJ,IAAI,CAAC,GAAGG,EAAE;EACf,OAAOI,MAAM,CAACC,cAAc,CAACP,GAAG,EAAEC,GAAG,EAAEE,IAAI,CAAC;AAC9C","ignoreList":[]}

View File

@@ -0,0 +1 @@
module.exports={C:{"48":0.004,"52":0.008,"59":0.02401,"78":0.01201,"82":0.004,"88":0.01201,"93":0.004,"94":0.02001,"101":0.004,"113":0.004,"115":0.10805,"125":0.008,"127":0.004,"128":0.04402,"131":0.004,"132":0.01201,"133":0.01601,"134":0.02801,"135":0.4082,"136":1.06453,"137":0.004,_:"2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 49 50 51 53 54 55 56 57 58 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 79 80 81 83 84 85 86 87 89 90 91 92 95 96 97 98 99 100 102 103 104 105 106 107 108 109 110 111 112 114 116 117 118 119 120 121 122 123 124 126 129 130 138 139 140 3.5 3.6"},D:{"39":0.008,"40":0.008,"41":0.008,"42":0.008,"43":0.008,"44":0.008,"45":0.008,"46":0.008,"47":0.008,"48":0.008,"49":0.01601,"50":0.008,"51":0.008,"52":0.01201,"53":0.008,"54":0.008,"55":0.008,"56":0.008,"57":0.008,"58":0.01201,"59":0.008,"60":0.008,"66":0.10405,"68":0.004,"70":0.004,"72":0.004,"74":0.01201,"75":0.004,"76":0.008,"77":0.004,"78":0.004,"79":0.01601,"80":0.004,"81":0.01601,"83":0.004,"84":0.004,"85":0.01601,"86":0.004,"87":0.02401,"88":0.02401,"89":0.004,"90":0.004,"91":0.01601,"92":0.004,"93":0.01201,"94":0.01201,"95":0.004,"96":0.004,"102":0.004,"103":0.09205,"104":0.01201,"105":0.004,"106":0.004,"107":0.01601,"108":0.01201,"109":0.42421,"110":0.004,"111":0.008,"112":0.008,"113":0.008,"114":0.02801,"115":0.04402,"116":0.09205,"117":0.004,"118":0.008,"119":0.01601,"120":0.8084,"121":0.01601,"122":0.09205,"123":0.02001,"124":0.07204,"125":0.09605,"126":0.12406,"127":0.06803,"128":0.13607,"129":0.04402,"130":0.10405,"131":0.54427,"132":0.71636,"133":5.81891,"134":10.14107,"135":0.01201,"136":0.004,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 61 62 63 64 65 67 69 71 73 97 98 99 100 101 137 138"},F:{"46":0.008,"87":0.008,"88":0.004,"95":0.008,"102":0.004,"114":0.004,"115":0.004,"116":0.28814,"117":0.64032,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 47 48 49 50 51 52 53 54 55 56 57 58 60 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 89 90 91 92 93 94 96 97 98 99 100 101 103 104 105 106 107 108 109 110 111 112 113 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"17":0.01201,"85":0.008,"92":0.004,"95":0.004,"109":0.03602,"114":0.004,"120":0.004,"121":0.004,"122":0.02401,"123":0.004,"124":0.004,"125":0.004,"126":0.04402,"127":0.004,"128":0.004,"129":0.01201,"130":0.05203,"131":0.05603,"132":0.16808,"133":2.58529,"134":5.93897,_:"12 13 14 15 16 18 79 80 81 83 84 86 87 88 89 90 91 93 94 96 97 98 99 100 101 102 103 104 105 106 107 108 110 111 112 113 115 116 117 118 119"},E:{"13":0.004,"14":0.02401,"15":0.004,_:"0 4 5 6 7 8 9 10 11 12 3.1 3.2 5.1 6.1 7.1 10.1","9.1":0.008,"11.1":0.02401,"12.1":0.008,"13.1":0.04402,"14.1":0.07204,"15.1":0.008,"15.2-15.3":0.008,"15.4":0.01201,"15.5":0.02801,"15.6":0.36418,"16.0":0.06003,"16.1":0.03602,"16.2":0.03602,"16.3":0.07604,"16.4":0.02001,"16.5":0.02801,"16.6":0.51626,"17.0":0.02401,"17.1":0.38819,"17.2":0.02801,"17.3":0.03602,"17.4":0.08804,"17.5":0.1961,"17.6":0.51226,"18.0":0.06003,"18.1":0.25613,"18.2":0.10405,"18.3":3.30965,"18.4":0.02801},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00513,"5.0-5.1":0,"6.0-6.1":0.01539,"7.0-7.1":0.01026,"8.1-8.4":0,"9.0-9.2":0.0077,"9.3":0.03591,"10.0-10.2":0.00257,"10.3":0.059,"11.0-11.2":0.27193,"11.3-11.4":0.01796,"12.0-12.1":0.01026,"12.2-12.5":0.25397,"13.0-13.1":0.00513,"13.2":0.0077,"13.3":0.01026,"13.4-13.7":0.03591,"14.0-14.4":0.08979,"14.5-14.8":0.10774,"15.0-15.1":0.059,"15.2-15.3":0.059,"15.4":0.07183,"15.5":0.08209,"15.6-15.8":1.01075,"16.0":0.14366,"16.1":0.29501,"16.2":0.15392,"16.3":0.2668,"16.4":0.059,"16.5":0.11031,"16.6-16.7":1.19802,"17.0":0.07183,"17.1":0.12827,"17.2":0.09748,"17.3":0.13596,"17.4":0.27193,"17.5":0.60542,"17.6-17.7":1.75726,"18.0":0.49255,"18.1":1.61104,"18.2":0.72086,"18.3":15.06627,"18.4":0.22318},P:{"4":0.01092,"20":0.01092,"21":0.03276,"22":0.03276,"23":0.1638,"24":0.04368,"25":0.04368,"26":0.12012,"27":4.07309,_:"5.0-5.4 6.2-6.4 7.2-7.4 8.2 9.2 10.1 11.1-11.2 12.0 14.0 15.0 16.0 18.0","13.0":0.01092,"17.0":0.01092,"19.0":0.01092},I:{"0":0.02394,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0.00001,"4.4":0,"4.4.3-4.4.4":0.00003},K:{"0":0.18594,_:"10 11 12 11.1 11.5 12.1"},A:{"9":0.00473,"11":0.09932,_:"6 7 8 10 5.5"},S:{_:"2.5 3.0-3.1"},J:{_:"7 10"},N:{_:"10 11"},R:{_:"0"},M:{"0":0.38387},Q:{"14.9":0.006},O:{"0":0.05998},H:{"0":0},L:{"0":29.55301}};

View File

@@ -0,0 +1 @@
{"version":3,"file":"searchMiddleware.js","sources":["../../src/searchMiddleware.ts"],"sourcesContent":["import { deepEqual } from './utils'\nimport type { NoInfer, PickOptional } from './utils'\nimport type { SearchMiddleware } from './route'\nimport type { IsRequiredParams } from './link'\n\nexport function retainSearchParams<TSearchSchema extends object>(\n keys: Array<keyof TSearchSchema> | true,\n): SearchMiddleware<TSearchSchema> {\n return ({ search, next }) => {\n const result = next(search)\n if (keys === true) {\n return { ...search, ...result }\n }\n // add missing keys from search to result\n keys.forEach((key) => {\n if (!(key in result)) {\n result[key] = search[key]\n }\n })\n return result\n }\n}\n\nexport function stripSearchParams<\n TSearchSchema,\n TOptionalProps = PickOptional<NoInfer<TSearchSchema>>,\n const TValues =\n | Partial<NoInfer<TOptionalProps>>\n | Array<keyof TOptionalProps>,\n const TInput = IsRequiredParams<TSearchSchema> extends never\n ? TValues | true\n : TValues,\n>(input: NoInfer<TInput>): SearchMiddleware<TSearchSchema> {\n return ({ search, next }) => {\n if (input === true) {\n return {}\n }\n const result = next(search) as Record<string, unknown>\n if (Array.isArray(input)) {\n input.forEach((key) => {\n delete result[key]\n })\n } else {\n Object.entries(input as Record<string, unknown>).forEach(\n ([key, value]) => {\n if (deepEqual(result[key], value)) {\n delete result[key]\n }\n },\n )\n }\n return result as any\n }\n}\n"],"names":[],"mappings":";AAKO,SAAS,mBACd,MACiC;AACjC,SAAO,CAAC,EAAE,QAAQ,WAAW;AACrB,UAAA,SAAS,KAAK,MAAM;AAC1B,QAAI,SAAS,MAAM;AACjB,aAAO,EAAE,GAAG,QAAQ,GAAG,OAAO;AAAA,IAAA;AAG3B,SAAA,QAAQ,CAAC,QAAQ;AAChB,UAAA,EAAE,OAAO,SAAS;AACb,eAAA,GAAG,IAAI,OAAO,GAAG;AAAA,MAAA;AAAA,IAC1B,CACD;AACM,WAAA;AAAA,EACT;AACF;AAEO,SAAS,kBASd,OAAyD;AACzD,SAAO,CAAC,EAAE,QAAQ,WAAW;AAC3B,QAAI,UAAU,MAAM;AAClB,aAAO,CAAC;AAAA,IAAA;AAEJ,UAAA,SAAS,KAAK,MAAM;AACtB,QAAA,MAAM,QAAQ,KAAK,GAAG;AAClB,YAAA,QAAQ,CAAC,QAAQ;AACrB,eAAO,OAAO,GAAG;AAAA,MAAA,CAClB;AAAA,IAAA,OACI;AACE,aAAA,QAAQ,KAAgC,EAAE;AAAA,QAC/C,CAAC,CAAC,KAAK,KAAK,MAAM;AAChB,cAAI,UAAU,OAAO,GAAG,GAAG,KAAK,GAAG;AACjC,mBAAO,OAAO,GAAG;AAAA,UAAA;AAAA,QACnB;AAAA,MAEJ;AAAA,IAAA;AAEK,WAAA;AAAA,EACT;AACF;"}

View File

@@ -0,0 +1 @@
{"version":3,"names":["_classApplyDescriptorSet","require","_classPrivateFieldGet","_classPrivateFieldSet","receiver","privateMap","value","descriptor","classPrivateFieldGet2","classApplyDescriptorSet"],"sources":["../../src/helpers/classPrivateFieldSet.js"],"sourcesContent":["/* @minVersion 7.0.0-beta.0 */\n/* @onlyBabel7 */\n\nimport classApplyDescriptorSet from \"classApplyDescriptorSet\";\nimport classPrivateFieldGet2 from \"classPrivateFieldGet2\";\nexport default function _classPrivateFieldSet(receiver, privateMap, value) {\n var descriptor = classPrivateFieldGet2(privateMap, receiver);\n classApplyDescriptorSet(receiver, descriptor, value);\n return value;\n}\n"],"mappings":";;;;;;AAGA,IAAAA,wBAAA,GAAAC,OAAA;AACA,IAAAC,qBAAA,GAAAD,OAAA;AACe,SAASE,qBAAqBA,CAACC,QAAQ,EAAEC,UAAU,EAAEC,KAAK,EAAE;EACzE,IAAIC,UAAU,GAAGC,qBAAqB,CAACH,UAAU,EAAED,QAAQ,CAAC;EAC5DK,wBAAuB,CAACL,QAAQ,EAAEG,UAAU,EAAED,KAAK,CAAC;EACpD,OAAOA,KAAK;AACd","ignoreList":[]}

View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2018 Toru Nagashima
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.

View File

@@ -0,0 +1,259 @@
/**
* @fileoverview Rule to flag creation of function inside a loop
* @author Ilya Volodin
*/
"use strict";
//------------------------------------------------------------------------------
// Helpers
//------------------------------------------------------------------------------
/**
* Identifies is a node is a FunctionExpression which is part of an IIFE
* @param {ASTNode} node Node to test
* @returns {boolean} True if it's an IIFE
*/
function isIIFE(node) {
return (
(node.type === "FunctionExpression" ||
node.type === "ArrowFunctionExpression") &&
node.parent &&
node.parent.type === "CallExpression" &&
node.parent.callee === node
);
}
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../shared/types').Rule} */
module.exports = {
meta: {
type: "suggestion",
docs: {
description:
"Disallow function declarations that contain unsafe references inside loop statements",
recommended: false,
url: "https://eslint.org/docs/latest/rules/no-loop-func",
},
schema: [],
messages: {
unsafeRefs:
"Function declared in a loop contains unsafe references to variable(s) {{ varNames }}.",
},
},
create(context) {
const SKIPPED_IIFE_NODES = new Set();
const sourceCode = context.sourceCode;
/**
* Gets the containing loop node of a specified node.
*
* We don't need to check nested functions, so this ignores those, with the exception of IIFE.
* `Scope.through` contains references of nested functions.
* @param {ASTNode} node An AST node to get.
* @returns {ASTNode|null} The containing loop node of the specified node, or
* `null`.
*/
function getContainingLoopNode(node) {
for (
let currentNode = node;
currentNode.parent;
currentNode = currentNode.parent
) {
const parent = currentNode.parent;
switch (parent.type) {
case "WhileStatement":
case "DoWhileStatement":
return parent;
case "ForStatement":
// `init` is outside of the loop.
if (parent.init !== currentNode) {
return parent;
}
break;
case "ForInStatement":
case "ForOfStatement":
// `right` is outside of the loop.
if (parent.right !== currentNode) {
return parent;
}
break;
case "ArrowFunctionExpression":
case "FunctionExpression":
case "FunctionDeclaration":
// We need to check nested functions only in case of IIFE.
if (SKIPPED_IIFE_NODES.has(parent)) {
break;
}
return null;
default:
break;
}
}
return null;
}
/**
* Gets the containing loop node of a given node.
* If the loop was nested, this returns the most outer loop.
* @param {ASTNode} node A node to get. This is a loop node.
* @param {ASTNode|null} excludedNode A node that the result node should not
* include.
* @returns {ASTNode} The most outer loop node.
*/
function getTopLoopNode(node, excludedNode) {
const border = excludedNode ? excludedNode.range[1] : 0;
let retv = node;
let containingLoopNode = node;
while (
containingLoopNode &&
containingLoopNode.range[0] >= border
) {
retv = containingLoopNode;
containingLoopNode = getContainingLoopNode(containingLoopNode);
}
return retv;
}
/**
* Checks whether a given reference which refers to an upper scope's variable is
* safe or not.
* @param {ASTNode} loopNode A containing loop node.
* @param {eslint-scope.Reference} reference A reference to check.
* @returns {boolean} `true` if the reference is safe or not.
*/
function isSafe(loopNode, reference) {
const variable = reference.resolved;
const definition = variable && variable.defs[0];
const declaration = definition && definition.parent;
const kind =
declaration && declaration.type === "VariableDeclaration"
? declaration.kind
: "";
// Variables which are declared by `const` is safe.
if (kind === "const") {
return true;
}
/*
* Variables which are declared by `let` in the loop is safe.
* It's a different instance from the next loop step's.
*/
if (
kind === "let" &&
declaration.range[0] > loopNode.range[0] &&
declaration.range[1] < loopNode.range[1]
) {
return true;
}
/*
* WriteReferences which exist after this border are unsafe because those
* can modify the variable.
*/
const border = getTopLoopNode(
loopNode,
kind === "let" ? declaration : null,
).range[0];
/**
* Checks whether a given reference is safe or not.
* The reference is every reference of the upper scope's variable we are
* looking now.
*
* It's safe if the reference matches one of the following condition.
* - is readonly.
* - doesn't exist inside a local function and after the border.
* @param {eslint-scope.Reference} upperRef A reference to check.
* @returns {boolean} `true` if the reference is safe.
*/
function isSafeReference(upperRef) {
const id = upperRef.identifier;
return (
!upperRef.isWrite() ||
(variable.scope.variableScope ===
upperRef.from.variableScope &&
id.range[0] < border)
);
}
return (
Boolean(variable) && variable.references.every(isSafeReference)
);
}
/**
* Reports functions which match the following condition:
*
* - has a loop node in ancestors.
* - has any references which refers to an unsafe variable.
* @param {ASTNode} node The AST node to check.
* @returns {void}
*/
function checkForLoops(node) {
const loopNode = getContainingLoopNode(node);
if (!loopNode) {
return;
}
const references = sourceCode.getScope(node).through;
// Check if the function is not asynchronous or a generator function
if (!(node.async || node.generator)) {
if (isIIFE(node)) {
const isFunctionExpression =
node.type === "FunctionExpression";
// Check if the function is referenced elsewhere in the code
const isFunctionReferenced =
isFunctionExpression && node.id
? references.some(
r => r.identifier.name === node.id.name,
)
: false;
if (!isFunctionReferenced) {
SKIPPED_IIFE_NODES.add(node);
return;
}
}
}
const unsafeRefs = references
.filter(r => r.resolved && !isSafe(loopNode, r))
.map(r => r.identifier.name);
if (unsafeRefs.length > 0) {
context.report({
node,
messageId: "unsafeRefs",
data: { varNames: `'${unsafeRefs.join("', '")}'` },
});
}
}
return {
ArrowFunctionExpression: checkForLoops,
FunctionExpression: checkForLoops,
FunctionDeclaration: checkForLoops,
};
},
};

View File

@@ -0,0 +1 @@
{"version":3,"names":["_checkPrivateRedeclaration","obj","privateCollection","has","TypeError"],"sources":["../../src/helpers/checkPrivateRedeclaration.ts"],"sourcesContent":["/* @minVersion 7.14.1 */\n\nexport default function _checkPrivateRedeclaration(\n obj: object,\n privateCollection: WeakMap<object, unknown> | WeakSet<object>,\n) {\n if (privateCollection.has(obj)) {\n throw new TypeError(\n \"Cannot initialize the same private elements twice on an object\",\n );\n }\n}\n"],"mappings":";;;;;;AAEe,SAASA,0BAA0BA,CAChDC,GAAW,EACXC,iBAA6D,EAC7D;EACA,IAAIA,iBAAiB,CAACC,GAAG,CAACF,GAAG,CAAC,EAAE;IAC9B,MAAM,IAAIG,SAAS,CACjB,gEACF,CAAC;EACH;AACF","ignoreList":[]}

View File

@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2020 Vercel, Inc.
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.

View File

@@ -0,0 +1,69 @@
{
"name": "canvas",
"description": "Canvas graphics API backed by Cairo",
"version": "3.1.0",
"author": "TJ Holowaychuk <tj@learnboost.com>",
"main": "index.js",
"browser": "browser.js",
"types": "index.d.ts",
"contributors": [
"Nathan Rajlich <nathan@tootallnate.net>",
"Rod Vagg <r@va.gg>",
"Juriy Zaytsev <kangax@gmail.com>"
],
"keywords": [
"canvas",
"graphic",
"graphics",
"pixman",
"cairo",
"image",
"images",
"pdf"
],
"homepage": "https://github.com/Automattic/node-canvas",
"repository": "git://github.com/Automattic/node-canvas.git",
"scripts": {
"prebenchmark": "node-gyp build",
"benchmark": "node benchmarks/run.js",
"lint": "standard examples/*.js test/server.js test/public/*.js benchmarks/run.js lib/context2d.js util/has_lib.js browser.js index.js",
"test": "mocha test/*.test.js",
"pretest-server": "node-gyp build",
"test-server": "node test/server.js",
"generate-wpt": "node ./test/wpt/generate.js",
"test-wpt": "mocha test/wpt/generated/*.js",
"install": "prebuild-install -r napi || node-gyp rebuild",
"tsd": "tsd"
},
"files": [
"binding.gyp",
"browser.js",
"index.d.ts",
"index.js",
"lib/",
"src/",
"util/"
],
"dependencies": {
"node-addon-api": "^7.0.0",
"prebuild-install": "^7.1.1"
},
"devDependencies": {
"@types/node": "^10.12.18",
"assert-rejects": "^1.0.0",
"express": "^4.16.3",
"js-yaml": "^4.1.0",
"mocha": "^5.2.0",
"pixelmatch": "^4.0.2",
"standard": "^12.0.1",
"tsd": "^0.29.0",
"typescript": "^4.2.2"
},
"engines": {
"node": "^18.12.0 || >= 20.9.0"
},
"binary": {
"napi_versions": [7]
},
"license": "MIT"
}

View File

@@ -0,0 +1,17 @@
import {IncomingMessage} from 'http';
/**
Mimic a [Node.js HTTP response stream](https://nodejs.org/api/http.html#http_class_http_incomingmessage)
Makes `toStream` include the properties from `fromStream`.
@param fromStream - The stream to copy the properties from.
@param toStream - The stream to copy the properties to.
@return The same object as `toStream`.
*/
declare function mimicResponse<T extends NodeJS.ReadableStream>(
fromStream: IncomingMessage, // eslint-disable-line @typescript-eslint/prefer-readonly-parameter-types
toStream: T,
): T & IncomingMessage;
export = mimicResponse;

View File

@@ -0,0 +1,31 @@
{
"name": "@babel/helper-validator-identifier",
"version": "7.25.9",
"description": "Validate identifier/keywords name",
"repository": {
"type": "git",
"url": "https://github.com/babel/babel.git",
"directory": "packages/babel-helper-validator-identifier"
},
"license": "MIT",
"publishConfig": {
"access": "public"
},
"main": "./lib/index.js",
"exports": {
".": {
"types": "./lib/index.d.ts",
"default": "./lib/index.js"
},
"./package.json": "./package.json"
},
"devDependencies": {
"@unicode/unicode-16.0.0": "^1.0.0",
"charcodes": "^0.2.0"
},
"engines": {
"node": ">=6.9.0"
},
"author": "The Babel Team (https://babel.dev/team)",
"type": "commonjs"
}

View File

@@ -0,0 +1,47 @@
{
"name": "@tanstack/history",
"version": "1.114.29",
"description": "Modern and scalable routing for React applications",
"author": "Tanner Linsley",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/TanStack/router.git",
"directory": "packages/history"
},
"homepage": "https://tanstack.com/router",
"funding": {
"type": "github",
"url": "https://github.com/sponsors/tannerlinsley"
},
"keywords": [
"history",
"typescript"
],
"type": "module",
"types": "dist/esm/index.d.ts",
"main": "dist/cjs/index.cjs",
"module": "dist/esm/index.js",
"exports": {
".": {
"import": {
"types": "./dist/esm/index.d.ts",
"default": "./dist/esm/index.js"
},
"require": {
"types": "./dist/cjs/index.d.cts",
"default": "./dist/cjs/index.cjs"
}
},
"./package.json": "./package.json"
},
"sideEffects": false,
"files": [
"dist",
"src"
],
"engines": {
"node": ">=12"
},
"scripts": {}
}

View File

@@ -0,0 +1 @@
{"version":3,"names":["_defineProperty","require","_objectSpread","target","i","arguments","length","source","Object","ownKeys","keys","getOwnPropertySymbols","push","apply","filter","sym","getOwnPropertyDescriptor","enumerable","forEach","key","defineProperty"],"sources":["../../src/helpers/objectSpread.ts"],"sourcesContent":["/* @minVersion 7.0.0-beta.0 */\n/* @onlyBabel7 */\n\nimport defineProperty from \"./defineProperty.ts\";\n\ntype Intersection<R extends any[]> = R extends [infer H, ...infer S]\n ? H & Intersection<S>\n : unknown;\n\nexport default function _objectSpread<T extends object, U extends unknown[]>(\n target: T,\n ...sources: U\n): T & Intersection<U>;\nexport default function _objectSpread(target: object) {\n for (var i = 1; i < arguments.length; i++) {\n var source: object = arguments[i] != null ? Object(arguments[i]) : {};\n var ownKeys: PropertyKey[] = Object.keys(source);\n if (typeof Object.getOwnPropertySymbols === \"function\") {\n ownKeys.push.apply(\n ownKeys,\n Object.getOwnPropertySymbols(source).filter(function (sym) {\n // sym already comes from `Object.getOwnPropertySymbols`, so getOwnPropertyDescriptor should always be defined\n return Object.getOwnPropertyDescriptor(source, sym)!.enumerable;\n }),\n );\n }\n ownKeys.forEach(function (key) {\n defineProperty(target, key, source[key as keyof typeof source]);\n });\n }\n return target;\n}\n"],"mappings":";;;;;;AAGA,IAAAA,eAAA,GAAAC,OAAA;AAUe,SAASC,aAAaA,CAACC,MAAc,EAAE;EACpD,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGC,SAAS,CAACC,MAAM,EAAEF,CAAC,EAAE,EAAE;IACzC,IAAIG,MAAc,GAAGF,SAAS,CAACD,CAAC,CAAC,IAAI,IAAI,GAAGI,MAAM,CAACH,SAAS,CAACD,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;IACrE,IAAIK,OAAsB,GAAGD,MAAM,CAACE,IAAI,CAACH,MAAM,CAAC;IAChD,IAAI,OAAOC,MAAM,CAACG,qBAAqB,KAAK,UAAU,EAAE;MACtDF,OAAO,CAACG,IAAI,CAACC,KAAK,CAChBJ,OAAO,EACPD,MAAM,CAACG,qBAAqB,CAACJ,MAAM,CAAC,CAACO,MAAM,CAAC,UAAUC,GAAG,EAAE;QAEzD,OAAOP,MAAM,CAACQ,wBAAwB,CAACT,MAAM,EAAEQ,GAAG,CAAC,CAAEE,UAAU;MACjE,CAAC,CACH,CAAC;IACH;IACAR,OAAO,CAACS,OAAO,CAAC,UAAUC,GAAG,EAAE;MAC7B,IAAAC,uBAAc,EAACjB,MAAM,EAAEgB,GAAG,EAAEZ,MAAM,CAACY,GAAG,CAAwB,CAAC;IACjE,CAAC,CAAC;EACJ;EACA,OAAOhB,MAAM;AACf","ignoreList":[]}

View File

@@ -0,0 +1 @@
module.exports={A:{A:{"1":"A B","2":"K D E F mC"},B:{"1":"0 9 C L M G N O P Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB I"},C:{"1":"0 1 2 3 4 5 6 7 8 9 N O P QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB MC wB NC xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC Q H R OC 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 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB I PC EC QC RC oC pC","2":"nC LC qC","33":"J PB K D E F A B C L M G rC"},D:{"1":"0 7 8 9 RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB MC wB NC xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC 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 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB I PC EC QC RC","2":"J PB K D E F","33":"1 2 3 4 5 6 A B C L M G N O P QB"},E:{"1":"D E F A B C L M G uC vC wC TC FC GC xC yC zC UC VC HC 0C IC WC XC YC ZC aC 1C JC bC cC dC eC fC 2C KC gC hC iC jC 3C","2":"J PB sC SC","33":"K tC"},F:{"1":"0 1 2 3 4 5 6 7 8 G N O P QB RB SB TB UB VB WB XB YB ZB aB 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 Q H R OC 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 GC","2":"F B 4C 5C 6C 7C","33":"C 8C","36":"FC kC"},G:{"1":"E CD DD ED FD GD HD ID JD KD LD MD ND OD PD QD RD SD UC VC HC TD IC WC XC YC ZC aC UD JC bC cC dC eC fC VD KC gC hC iC jC","2":"SC 9C lC","33":"AD BD"},H:{"2":"WD"},I:{"1":"I bD cD","2":"LC XD YD ZD","33":"J aD lC"},J:{"1":"A","2":"D"},K:{"1":"H GC","2":"A B","33":"C","36":"FC kC"},L:{"1":"I"},M:{"1":"EC"},N:{"1":"A B"},O:{"1":"HC"},P:{"1":"1 2 3 4 5 6 7 8 J dD eD fD gD hD TC iD jD kD lD mD IC JC KC nD"},Q:{"1":"oD"},R:{"1":"pD"},S:{"1":"qD rD"}},B:4,C:"CSS Repeating Gradients",D:true};

View File

@@ -0,0 +1,57 @@
{
"name": "@humanfs/node",
"version": "0.16.6",
"description": "The Node.js bindings of the humanfs library.",
"type": "module",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"exports": {
"import": {
"types": "./dist/index.d.ts",
"default": "./src/index.js"
}
},
"files": [
"dist",
"src"
],
"scripts": {
"build": "tsc",
"prepare": "npm run build",
"pretest": "npm run build",
"test": "mocha ./tests/"
},
"repository": {
"type": "git",
"url": "git+https://github.com/humanwhocodes/humanfs.git"
},
"publishConfig": {
"access": "public"
},
"keywords": [
"filesystem",
"fs",
"hfs",
"files"
],
"author": "Nicholas C. Zakas",
"license": "Apache-2.0",
"bugs": {
"url": "https://github.com/humanwhocodes/humanfs/issues"
},
"homepage": "https://github.com/humanwhocodes/humanfs#readme",
"engines": {
"node": ">=18.18.0"
},
"devDependencies": {
"@types/node": "^20.9.4",
"@humanfs/test": "^0.15.0",
"@humanfs/types": "^0.15.0",
"mocha": "^10.2.0",
"typescript": "^5.2.2"
},
"dependencies": {
"@humanwhocodes/retry": "^0.3.0",
"@humanfs/core": "^0.19.1"
}
}

View File

@@ -0,0 +1,22 @@
// This file is an augmentation to the built-in ImportMeta interface
// Thus cannot contain any top-level imports
// <https://www.typescriptlang.org/docs/handbook/declaration-merging.html#module-augmentation>
interface ImportMetaEnv {
[key: string]: any
BASE_URL: string
MODE: string
DEV: boolean
PROD: boolean
SSR: boolean
}
interface ImportMeta {
url: string
readonly hot?: import('./hot').ViteHotContext
readonly env: ImportMetaEnv
glob: import('./importGlob').ImportGlobFunction
}