pickier 0.1.72 → 0.1.73

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/bin/cli.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env bun
2
2
  // @bun
3
- async function I(){let i=process.argv.slice(2),a=i[0]??"",h=a==="run",v=h||a==="lint"||a==="format"?1:0,c=h?"auto":a==="format"?"format":"lint",f=!1,m=!1,x=!1,w=!1,k,b,u=!1,d,p=[],y=!i.some((e)=>e==="version"||e==="help"||e==="--version"||e==="-v"||e==="--help"||e==="-h");for(let e=v;e<i.length;e++){let t=i[e];if(t==="--mode")c=i[++e]||"auto";else if(t==="--format")x=!0,c="format";else if(t==="--check")f=!0;else if(t==="--write")m=!0;else if(t==="--config")k=i[++e];else if(t==="--verbose")w=!0;else if(t==="--ext")b=i[++e];else if(t==="--ignore-path")e++;else if(t==="--cache")u=!0;else if(t==="--reporter"){let o=i[++e];d=o==="json"||o==="compact"?o:"stylish"}else if(t==="--fix"||t==="--dry-run"||t==="--max-warnings"){y=!1,p.length=0;break}else if(t.startsWith("--"));else p.push(t)}if(x&&!f)m=!0;if(y&&(c==="format"||c==="auto"||c==="lint")&&p.length>0){let{runUnified:e}=await import("../chunk-cscys77z.js"),t=await e(p,{mode:c,check:f,write:m,verbose:w,config:k,ext:b,...u&&{cache:u},...d&&{reporter:d}});process.exit(t)}let{CLI:C}=await import("../chunk-p0j2ra3t.js"),{version:U}=await import("../chunk-m9saxre0.js"),r=new C("pickier"),l=(e)=>{let[t,o]=e;return[Array.isArray(t)?t.filter((g)=>typeof g==="string"):[],o&&typeof o==="object"?o:{}]};r.command("[...globs]","Lint files (default)").option("--fix","Auto-fix lint problems").option("--format","Format files instead of linting").option("--dry-run","Simulate fixes without writing").option("--check","Check formatting without writing (CI-friendly)").option("--max-warnings <n>","Max warnings before non-zero exit",{default:-1}).option("--reporter <name>","stylish|json|compact",{default:"stylish"}).option("--config <path>","Path to pickier config").option("--ignore-path <file>","Ignore file (like .gitignore)").option("--ext <exts>","Comma-separated extensions").option("--cache","Enable cache").option("--verbose","Verbose output").example("pickier .").example("pickier . --fix").example("pickier . --format").example("pickier src --fix --verbose").action(async(...e)=>{let[t,o]=l(e);if(t.length===0){r.outputHelp();return}let{runUnified:s}=await import("../chunk-cscys77z.js"),n;if(o.format){if(n="format",!o.check)o.write=!0}else n="lint";let g=await s(t,{...o,mode:n});process.exit(g)}),r.command("lint [...globs]","[DEPRECATION] Use `pickier [...globs]` instead. Lint files").option("--fix","Auto-fix problems").option("--dry-run","Simulate fixes without writing").option("--max-warnings <n>","Max warnings before non-zero exit",{default:-1}).option("--reporter <name>","stylish|json|compact",{default:"stylish"}).option("--config <path>","Path to pickier config").option("--ignore-path <file>","Ignore file (like .gitignore)").option("--ext <exts>","Comma-separated extensions").option("--cache","Enable cache").option("--verbose","Verbose output").example("pickier lint .").example("pickier lint src --fix").example('pickier lint "src/**/*.{ts,tsx}" --reporter json').action(async(...e)=>{let[t,o]=l(e),{runUnified:s}=await import("../chunk-cscys77z.js"),n=await s(t,{...o,mode:"lint"});process.exit(n)}),r.command("format [...globs]","[DEPRECATION] Use `pickier [...globs] --format` instead. Format files").option("--write","Write changes to files").option("--check","Check without writing (CI-friendly)").option("--config <path>","Path to pickier config").option("--ignore-path <file>","Ignore file").option("--ext <exts>","Comma-separated extensions").option("--verbose","Verbose output").example("pickier format . --write").example("pickier format . --check").action(async(...e)=>{let[t,o]=l(e),{runUnified:s}=await import("../chunk-cscys77z.js"),n=await s(t,{...o,mode:"format"});process.exit(n)}),r.command("run [...globs]","Unified mode (auto, lint, or format)").option("--mode <mode>","auto|lint|format",{default:"auto"}).option("--fix","Auto-fix problems (lint mode)").option("--dry-run","Simulate fixes without writing (lint mode)").option("--max-warnings <n>","Max warnings before non-zero exit (lint mode)",{default:-1}).option("--reporter <name>","stylish|json|compact (lint mode)",{default:"stylish"}).option("--write","Write changes to files (format mode)").option("--check","Check without writing (format mode)").option("--config <path>","Path to pickier config").option("--ignore-path <file>","Ignore file (like .gitignore)").option("--ext <exts>","Comma-separated extensions").option("--cache","Enable cache (lint mode)").option("--verbose","Verbose output").example("pickier run . --mode lint --fix").example("pickier run . --mode format --write").action(async(...e)=>{let[t,o]=l(e),{runUnified:s}=await import("../chunk-cscys77z.js"),n=await s(t,o);process.exit(n)}),r.command("version","Show the version of the CLI").action(async()=>{let{version:e}=await import("../chunk-m9saxre0.js");process.stdout.write(`${e}
3
+ async function I(){let i=process.argv.slice(2),a=i[0]??"",h=a==="run",v=h||a==="lint"||a==="format"?1:0,c=h?"auto":a==="format"?"format":"lint",f=!1,m=!1,x=!1,w=!1,k,b,u=!1,d,p=[],y=!i.some((e)=>e==="version"||e==="help"||e==="--version"||e==="-v"||e==="--help"||e==="-h");for(let e=v;e<i.length;e++){let t=i[e];if(t==="--mode")c=i[++e]||"auto";else if(t==="--format")x=!0,c="format";else if(t==="--check")f=!0;else if(t==="--write")m=!0;else if(t==="--config")k=i[++e];else if(t==="--verbose")w=!0;else if(t==="--ext")b=i[++e];else if(t==="--ignore-path")e++;else if(t==="--cache")u=!0;else if(t==="--reporter"){let o=i[++e];d=o==="json"||o==="compact"?o:"stylish"}else if(t==="--fix"||t==="--dry-run"||t==="--max-warnings"){y=!1,p.length=0;break}else if(t.startsWith("--"));else p.push(t)}if(x&&!f)m=!0;if(y&&(c==="format"||c==="auto"||c==="lint")&&p.length>0){let{runUnified:e}=await import("../chunk-3d4jgaj2.js"),t=await e(p,{mode:c,check:f,write:m,verbose:w,config:k,ext:b,...u&&{cache:u},...d&&{reporter:d}});process.exit(t)}let{CLI:C}=await import("../chunk-p0j2ra3t.js"),{version:U}=await import("../chunk-7ydmmwjq.js"),r=new C("pickier"),l=(e)=>{let[t,o]=e;return[Array.isArray(t)?t.filter((g)=>typeof g==="string"):[],o&&typeof o==="object"?o:{}]};r.command("[...globs]","Lint files (default)").option("--fix","Auto-fix lint problems").option("--format","Format files instead of linting").option("--dry-run","Simulate fixes without writing").option("--check","Check formatting without writing (CI-friendly)").option("--max-warnings <n>","Max warnings before non-zero exit",{default:-1}).option("--reporter <name>","stylish|json|compact",{default:"stylish"}).option("--config <path>","Path to pickier config").option("--ignore-path <file>","Ignore file (like .gitignore)").option("--ext <exts>","Comma-separated extensions").option("--cache","Enable cache").option("--verbose","Verbose output").example("pickier .").example("pickier . --fix").example("pickier . --format").example("pickier src --fix --verbose").action(async(...e)=>{let[t,o]=l(e);if(t.length===0){r.outputHelp();return}let{runUnified:s}=await import("../chunk-3d4jgaj2.js"),n;if(o.format){if(n="format",!o.check)o.write=!0}else n="lint";let g=await s(t,{...o,mode:n});process.exit(g)}),r.command("lint [...globs]","[DEPRECATION] Use `pickier [...globs]` instead. Lint files").option("--fix","Auto-fix problems").option("--dry-run","Simulate fixes without writing").option("--max-warnings <n>","Max warnings before non-zero exit",{default:-1}).option("--reporter <name>","stylish|json|compact",{default:"stylish"}).option("--config <path>","Path to pickier config").option("--ignore-path <file>","Ignore file (like .gitignore)").option("--ext <exts>","Comma-separated extensions").option("--cache","Enable cache").option("--verbose","Verbose output").example("pickier lint .").example("pickier lint src --fix").example('pickier lint "src/**/*.{ts,tsx}" --reporter json').action(async(...e)=>{let[t,o]=l(e),{runUnified:s}=await import("../chunk-3d4jgaj2.js"),n=await s(t,{...o,mode:"lint"});process.exit(n)}),r.command("format [...globs]","[DEPRECATION] Use `pickier [...globs] --format` instead. Format files").option("--write","Write changes to files").option("--check","Check without writing (CI-friendly)").option("--config <path>","Path to pickier config").option("--ignore-path <file>","Ignore file").option("--ext <exts>","Comma-separated extensions").option("--verbose","Verbose output").example("pickier format . --write").example("pickier format . --check").action(async(...e)=>{let[t,o]=l(e),{runUnified:s}=await import("../chunk-3d4jgaj2.js"),n=await s(t,{...o,mode:"format"});process.exit(n)}),r.command("run [...globs]","Unified mode (auto, lint, or format)").option("--mode <mode>","auto|lint|format",{default:"auto"}).option("--fix","Auto-fix problems (lint mode)").option("--dry-run","Simulate fixes without writing (lint mode)").option("--max-warnings <n>","Max warnings before non-zero exit (lint mode)",{default:-1}).option("--reporter <name>","stylish|json|compact (lint mode)",{default:"stylish"}).option("--write","Write changes to files (format mode)").option("--check","Check without writing (format mode)").option("--config <path>","Path to pickier config").option("--ignore-path <file>","Ignore file (like .gitignore)").option("--ext <exts>","Comma-separated extensions").option("--cache","Enable cache (lint mode)").option("--verbose","Verbose output").example("pickier run . --mode lint --fix").example("pickier run . --mode format --write").action(async(...e)=>{let[t,o]=l(e),{runUnified:s}=await import("../chunk-3d4jgaj2.js"),n=await s(t,o);process.exit(n)}),r.command("version","Show the version of the CLI").action(async()=>{let{version:e}=await import("../chunk-7ydmmwjq.js");process.stdout.write(`${e}
4
4
  `)}),r.version(U),r.help(),r.parse()}I().catch((i)=>{let a=i instanceof Error?i.message:String(i);process.stderr.write(`pickier: ${a}
5
5
  `),process.exit(1)});
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{W,A,U,V,v,K}from"./chunk-dnn0da5m.js";import"./chunk-rx0b7k57.js";import"./chunk-ra9jn7j5.js";export{A as fixText,v as lintFileForRun,W as lintText,V as plannedCheckRules,K as runLint,U as runLintProgrammatic};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{B}from"./chunk-d1qeak2x.js";import"./chunk-rx0b7k57.js";export{B as runUnified};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{oe,ae,F,le,ce,ue,fe,me,he,de,pe,ge,ye,be,we,xe,ke,Re,$e,ve}from"./chunk-bf41tx1b.js";export{ce as author,be as bin,he as bugs,ve as default,ke as dependencies,le as description,$e as devDependencies,pe as exports,we as files,fe as homepage,de as keywords,ue as license,ge as module,oe as name,Re as optionalDependencies,me as repository,xe as scripts,ae as type,ye as types,F as version};
2
+ import{oe,ae,F,le,ce,ue,fe,me,he,de,pe,ge,ye,be,we,xe,ke,Re,$e,ve}from"./chunk-ra9jn7j5.js";export{ce as author,be as bin,he as bugs,ve as default,ke as dependencies,le as description,$e as devDependencies,pe as exports,we as files,fe as homepage,de as keywords,ue as license,ge as module,oe as name,Re as optionalDependencies,me as repository,xe as scripts,ae as type,ye as types,F as version};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{p,u}from"./chunk-hx0z7dzw.js";import{readFileSync as O,statSync as y,writeFileSync as x}from"fs";import{isAbsolute as d,resolve as l}from"path";function o(r){return r.write===!0||r.fix===!0}async function B(r,t){let a=t.mode||"auto";if(a==="format"&&r.length===1&&!/[*?[\]{}()!]/.test(r[0]))try{let n=r[0],i=d(n)?n:l(process.cwd(),n);if(y(i).isFile()){let m=await u(t.config),f=O(i,"utf8"),c=p(f,m,i);if(c===f)return 0;if(o(t))return x(i,c,"utf8"),0}}catch{}let{runLint:e}=await import("./chunk-50z6kpcq.js");if(a==="lint")return e(r,t);if(a==="format"){let n={...t,fix:!0,dryRun:!o(t),ext:t.ext,_formatOnly:!0};return e(r,n)}if(!(t.fix===!0||t.write===!0||t.check===!0))return e(r,t);let s={...t,fix:!0,dryRun:!!t.check,ext:t.ext};return e(r,s)}
2
+ import{p,u}from"./chunk-rx0b7k57.js";import{readFileSync as O,statSync as y,writeFileSync as x}from"fs";import{isAbsolute as d,resolve as l}from"path";function o(r){return r.write===!0||r.fix===!0}async function B(r,t){let a=t.mode||"auto";if(a==="format"&&r.length===1&&!/[*?[\]{}()!]/.test(r[0]))try{let n=r[0],i=d(n)?n:l(process.cwd(),n);if(y(i).isFile()){let m=await u(t.config),f=O(i,"utf8"),c=p(f,m,i);if(c===f)return 0;if(o(t))return x(i,c,"utf8"),0}}catch{}let{runLint:e}=await import("./chunk-2ja6xfzf.js");if(a==="lint")return e(r,t);if(a==="format"){let n={...t,fix:!0,dryRun:!o(t),ext:t.ext,_formatOnly:!0};return e(r,n)}if(!(t.fix===!0||t.write===!0||t.check===!0))return e(r,t);let s={...t,fix:!0,dryRun:!!t.check,ext:t.ext};return e(r,s)}
3
3
  export{B};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{g,I,q,G,c,S,p,O,M,C,L,f,r,m,N,o,t,u,x,T,h,d}from"./chunk-hx0z7dzw.js";import{F}from"./chunk-bf41tx1b.js";import{e,k}from"./chunk-qq03kpe0.js";import{readdirSync as qo,readFileSync as Hn,statSync as $n,writeFileSync as Kn}from"fs";import{isAbsolute as Ye,join as zo,relative as Cn,resolve as Xe,sep as Zo}from"path";import{readFileSync as mo,writeFileSync as cc}from"fs";import{isAbsolute as ac,relative as uo,resolve as uc}from"path";var On=Promise.resolve();function lt(y){let b=null,s=null,l=()=>(s??=import("./chunk-dxrcbgyc.js").then((i)=>(b=new i.Logger(y,{showTags:!1}),b)),s),n=(i,w)=>{if(b){b[i](...w);return}On=On.then(l).then((a)=>{a[i](...w)}).catch(()=>{})};return{debug:(...i)=>n("debug",i),info:(...i)=>n("info",i),warn:(...i)=>n("warn",i),error:(...i)=>n("error",i),ready:async()=>{await l()}}}function R(){return On}var ct={meta:{docs:"Enforce return statements in callbacks of array methods",recommended:!0},check:(y,b)=>{let s=[],l=y.split(/\r?\n/),i=new RegExp(`\\.(${["map","filter","find","findIndex","findLast","findLastIndex","every","some","reduce","reduceRight","sort","flatMap"].join("|")})\\s*\\(`,"g");for(let w=0;w<l.length;w++){let a=l[w],P;for(P=i.exec(a);P!==null;P=i.exec(a)){let E=P[1],_=P.index+P[0].length,D=a.slice(_),j=D.match(/^\s*(?:\(([^)]*)\)|([a-z_$][\w$]*))\s*=>/i),B=D.match(/^\s*function\s*(?:[a-zA-Z_$][\w$]*\s*)?\(/);if(j){let Z=D.slice(j[0].length).trim();if(Z.startsWith("{")){let z=!1,Y=0,X=Z,J=w;while(J<l.length){let ie=J===w?X:l[J];for(let Q=0;Q<ie.length;Q++){let ee=ie[Q];if(ee==="{")Y++;if(ee==="}"){if(Y--,Y===0){if(!z)s.push({filePath:b.filePath,line:w+1,column:P.index+1,ruleId:"eslint/array-callback-return",message:`Array method '${E}' callback should return a value`,severity:"error"});break}}}if(ie.match(new RegExp("\\breturn\\s+[^;]")))z=!0;if(Y===0)break;J++,X=l[J]||""}}}else if(B){let Z=!1,z=0,Y=w,X=!1;while(Y<l.length){let J=l[Y];for(let ie=0;ie<J.length;ie++){let Q=J[ie];if(Q==="{")z++,X=!0;else if(Q==="}"){if(z--,z===0&&X){if(!Z)s.push({filePath:b.filePath,line:w+1,column:P.index+1,ruleId:"eslint/array-callback-return",message:`Array method '${E}' callback should return a value`,severity:"error"});break}}}if(X&&J.match(new RegExp("\\breturn\\s+[^;]")))Z=!0;if(z===0&&X)break;Y++}}}}return s}};var at={meta:{docs:"Require super() calls in constructors of derived classes",recommended:!0},check:(y,b)=>{let s=[],l=y.split(/\r?\n/),n=!1,i=!1,w=0,a=0,P=!1;for(let E=0;E<l.length;E++){let _=l[E];if(_.match(/\bclass\s+\w+\s+extends\s+\w+/))n=!0;if(n&&_.match(/\bconstructor\s*\(/))i=!0,w=E+1,a=0,P=!1;if(i){for(let D of _){if(D==="{")a++;if(D==="}")a--}if(_.match(/\bsuper\s*\(/))P=!0;if(a===0&&_.includes("}")){if(!P)s.push({filePath:b.filePath,line:w,column:1,ruleId:"eslint/constructor-super",message:"Constructors of derived classes must call super()",severity:"error"});i=!1,n=!1}}}return s}};var ut={meta:{docs:'Enforce "for" loop update clause moving counter in the right direction',recommended:!0},check:(y,b)=>{let s=[],l=y.split(/\r?\n/);for(let n=0;n<l.length;n++){let i=l[n],w=new RegExp("\\bfor\\s*\\(\\s*(?:(?:let|var|const)\\s*)?(\\w+)\\s*=[^;]+;\\s*(\\w+)\\s*([<>]=?)[^;]+;\\s*(\\w+)(\\+\\+|--|[\\s+-]=)"),a=i.match(w);if(a){let P=a[1],E=a[2],_=a[3],D=a[4],j=a[5];if(P===E&&E===D){let B=j.includes("+"),Z=_.includes("<");if(Z&&!B||!Z&&B)s.push({filePath:b.filePath,line:n+1,column:1,ruleId:"eslint/for-direction",message:"The update clause in this loop moves the variable in the wrong direction",severity:"error"})}}}return s}};var ft={meta:{docs:"Enforce return statements in getters",recommended:!0},check:(y,b)=>{let s=[],l=y.split(/\r?\n/);for(let n=0;n<l.length;n++){let w=l[n].match(/\bget\s+(\w+)\s*\(/);if(w){let a=w[1],P=!1,E=0,_=n;while(_<l.length){let D=l[_];for(let B of D){if(B==="{")E++;if(B==="}"){if(E--,E===0){if(!P)s.push({filePath:b.filePath,line:n+1,column:1,ruleId:"eslint/getter-return",message:`Getter '${a}' must return a value`,severity:"error"});break}}}let j=new RegExp("\\breturn\\s+[^;]");if(D.match(j))P=!0;if(E===0)break;_++}}}return s}};var mt={meta:{docs:"Disallow async functions as Promise executor",recommended:!0},check:(y,b)=>{let s=[],l=y.split(/\r?\n/);for(let n=0;n<l.length;n++){let i=l[n],w=/new\s+Promise\s*\(\s*async\s*(?:\(|function)/g,a;for(a=w.exec(i);a!==null;a=w.exec(i))s.push({filePath:b.filePath,line:n+1,column:a.index+1,ruleId:"eslint/no-async-promise-executor",message:"Promise executor functions should not be async",severity:"error"})}return s}};var pt={meta:{docs:"Disallow comparing against -0",recommended:!0},check:(y,b)=>{let s=[],l=y.split(/\r?\n/);for(let n=0;n<l.length;n++){let i=l[n],w=/([!=]==?)\s*-0\b|\b-0\s*([!=]==?)/g,a;for(a=w.exec(i);a!==null;a=w.exec(i))s.push({filePath:b.filePath,line:n+1,column:a.index+1,ruleId:"eslint/no-compare-neg-zero",message:"Do not use the '-0' literal in comparisons",severity:"error"})}return s}};var dt={meta:{docs:"Disallow assignment operators in conditional expressions",recommended:!0},check:(y,b)=>{let s=[],l=y.split(/\r?\n/);for(let n=0;n<l.length;n++){let i=l[n],w=/\b(if|while)\s*\([^)]*\b(\w+)\s*=\s*(?!=)[^)]*\)/g,a;for(a=w.exec(i);a!==null;a=w.exec(i)){let P=a[0];if(/===|==/.test(P))continue;if(i.substring(0,a.index).includes("//"))continue;s.push({filePath:b.filePath,line:n+1,column:Math.max(1,a.index+1),ruleId:"eslint/no-cond-assign",message:"Expected a conditional expression and instead saw an assignment",severity:"error"})}}return s}};var ht={meta:{docs:"Disallow reassigning const variables",recommended:!0},check:(y,b)=>{let s=[],l=y.split(/\r?\n/),n=new Map;for(let i=0;i<l.length;i++){let w=l[i],a=w.match(/\bconst\s+(\w+)/);if(a)n.set(a[1],i);let P=/\b(\w+)\s*=(?!=)/g,E;for(E=P.exec(w);E!==null;E=P.exec(w)){let _=E[1],D=w.substring(0,E.index);if(!/\b(?:const|let|var)\s*$/.test(D)&&n.has(_))s.push({filePath:b.filePath,line:i+1,column:Math.max(1,E.index+1),ruleId:"eslint/no-const-assign",message:`'${_}' is constant`,severity:"error"})}}return s}};var gt={meta:{docs:"Disallow constant expressions in conditions",recommended:!0},check:(y,b)=>{let s=[],l=y.split(/\r?\n/);for(let n=0;n<l.length;n++){let i=l[n],w=[{pattern:/\b(if|while)\s*\(\s*(true|false)\s*\)/g,type:"boolean"},{pattern:/\b(if|while)\s*\(\s*(\d+)\s*\)/g,type:"number"},{pattern:/\b(if|while)\s*\(\s*(['"`][^'"`]*['"`])\s*\)/g,type:"string"}];for(let{pattern:a,type:P}of w){let E;while((E=a.exec(i))!==null){let _=E[1];if(i.substring(0,E.index).includes("//"))continue;s.push({filePath:b.filePath,line:n+1,column:Math.max(1,E.index+_.length+2),ruleId:"eslint/no-constant-condition",message:"Unexpected constant condition",severity:"error"})}}}return s}};var yt={meta:{docs:"Disallow duplicate class members",recommended:!0},check:(y,b)=>{let s=[],l=y.split(/\r?\n/),n=!1,i=new Set,w=0;for(let a=0;a<l.length;a++){let P=l[a];if(P.match(/\bclass\s+\w+/))n=!0,i=new Set,w=0;if(n){for(let _ of P){if(_==="{")w++;if(_==="}"){if(w--,w===0)n=!1}}let E=[...P.matchAll(/^\s*(?:(?:public|private|protected|static|readonly|async)\s*)?(?:get|set)?\s*(\w+)\s*\(/g),...P.matchAll(/^\s*(?:(?:public|private|protected|static|readonly)\s*)?(\w+)\s*[:=]/g)];for(let _ of E){let D=_[1];if(i.has(D))s.push({filePath:b.filePath,line:a+1,column:1,ruleId:"eslint/no-dupe-class-members",message:`Duplicate class member '${D}'`,severity:"error"});else i.add(D)}}}return s}};var Je={meta:{docs:"Disallow duplicate keys in object literals",recommended:!0},check:(y,b)=>{let s=[],l=y.split(/\r?\n/),n=/\{\s*$/,i=/^\s*(?:(['"`])(.+?)\1|(\w+))\s*:/;for(let w=0;w<l.length;w++){let a=l[w];if(!n.test(a)&&!a.includes("{"))continue;let P=new Map,E=(a.match(/\{/g)||[]).length-(a.match(/\}/g)||[]).length,_=w;for(let D=w+1;D<l.length&&E>0;D++){let j=l[D];E+=(j.match(/\{/g)||[]).length,E-=(j.match(/\}/g)||[]).length;let B=j.match(i);if(B){let Z=B[2]||B[3];if(Z)if(P.get(Z)!==void 0)s.push({filePath:b.filePath,line:D+1,column:Math.max(1,j.search(/\S/)+1),ruleId:"eslint/no-dupe-keys",message:`Duplicate key '${Z}'`,severity:"error"});else P.set(Z,D)}if(E===0)break}}return s},fix:(y,b)=>{let s=Je.check(y,b);if(s.length===0)return y;let l=y.split(/\r?\n/),n=new Set(s.map((w)=>w.line-1));return l.filter((w,a)=>!n.has(a)).join(`
2
+ import{g,I,q,G,c,S,p,O,M,C,L,f,r,m,N,o,t,u,x,T,h,d}from"./chunk-rx0b7k57.js";import{F}from"./chunk-ra9jn7j5.js";import{e,k}from"./chunk-qq03kpe0.js";import{readdirSync as qo,readFileSync as Hn,statSync as $n,writeFileSync as Kn}from"fs";import{isAbsolute as Ye,join as zo,relative as Cn,resolve as Xe,sep as Zo}from"path";import{readFileSync as mo,writeFileSync as cc}from"fs";import{isAbsolute as ac,relative as uo,resolve as uc}from"path";var On=Promise.resolve();function lt(y){let b=null,s=null,l=()=>(s??=import("./chunk-dxrcbgyc.js").then((i)=>(b=new i.Logger(y,{showTags:!1}),b)),s),n=(i,w)=>{if(b){b[i](...w);return}On=On.then(l).then((a)=>{a[i](...w)}).catch(()=>{})};return{debug:(...i)=>n("debug",i),info:(...i)=>n("info",i),warn:(...i)=>n("warn",i),error:(...i)=>n("error",i),ready:async()=>{await l()}}}function R(){return On}var ct={meta:{docs:"Enforce return statements in callbacks of array methods",recommended:!0},check:(y,b)=>{let s=[],l=y.split(/\r?\n/),i=new RegExp(`\\.(${["map","filter","find","findIndex","findLast","findLastIndex","every","some","reduce","reduceRight","sort","flatMap"].join("|")})\\s*\\(`,"g");for(let w=0;w<l.length;w++){let a=l[w],P;for(P=i.exec(a);P!==null;P=i.exec(a)){let E=P[1],_=P.index+P[0].length,D=a.slice(_),j=D.match(/^\s*(?:\(([^)]*)\)|([a-z_$][\w$]*))\s*=>/i),B=D.match(/^\s*function\s*(?:[a-zA-Z_$][\w$]*\s*)?\(/);if(j){let Z=D.slice(j[0].length).trim();if(Z.startsWith("{")){let z=!1,Y=0,X=Z,J=w;while(J<l.length){let ie=J===w?X:l[J];for(let Q=0;Q<ie.length;Q++){let ee=ie[Q];if(ee==="{")Y++;if(ee==="}"){if(Y--,Y===0){if(!z)s.push({filePath:b.filePath,line:w+1,column:P.index+1,ruleId:"eslint/array-callback-return",message:`Array method '${E}' callback should return a value`,severity:"error"});break}}}if(ie.match(new RegExp("\\breturn\\s+[^;]")))z=!0;if(Y===0)break;J++,X=l[J]||""}}}else if(B){let Z=!1,z=0,Y=w,X=!1;while(Y<l.length){let J=l[Y];for(let ie=0;ie<J.length;ie++){let Q=J[ie];if(Q==="{")z++,X=!0;else if(Q==="}"){if(z--,z===0&&X){if(!Z)s.push({filePath:b.filePath,line:w+1,column:P.index+1,ruleId:"eslint/array-callback-return",message:`Array method '${E}' callback should return a value`,severity:"error"});break}}}if(X&&J.match(new RegExp("\\breturn\\s+[^;]")))Z=!0;if(z===0&&X)break;Y++}}}}return s}};var at={meta:{docs:"Require super() calls in constructors of derived classes",recommended:!0},check:(y,b)=>{let s=[],l=y.split(/\r?\n/),n=!1,i=!1,w=0,a=0,P=!1;for(let E=0;E<l.length;E++){let _=l[E];if(_.match(/\bclass\s+\w+\s+extends\s+\w+/))n=!0;if(n&&_.match(/\bconstructor\s*\(/))i=!0,w=E+1,a=0,P=!1;if(i){for(let D of _){if(D==="{")a++;if(D==="}")a--}if(_.match(/\bsuper\s*\(/))P=!0;if(a===0&&_.includes("}")){if(!P)s.push({filePath:b.filePath,line:w,column:1,ruleId:"eslint/constructor-super",message:"Constructors of derived classes must call super()",severity:"error"});i=!1,n=!1}}}return s}};var ut={meta:{docs:'Enforce "for" loop update clause moving counter in the right direction',recommended:!0},check:(y,b)=>{let s=[],l=y.split(/\r?\n/);for(let n=0;n<l.length;n++){let i=l[n],w=new RegExp("\\bfor\\s*\\(\\s*(?:(?:let|var|const)\\s*)?(\\w+)\\s*=[^;]+;\\s*(\\w+)\\s*([<>]=?)[^;]+;\\s*(\\w+)(\\+\\+|--|[\\s+-]=)"),a=i.match(w);if(a){let P=a[1],E=a[2],_=a[3],D=a[4],j=a[5];if(P===E&&E===D){let B=j.includes("+"),Z=_.includes("<");if(Z&&!B||!Z&&B)s.push({filePath:b.filePath,line:n+1,column:1,ruleId:"eslint/for-direction",message:"The update clause in this loop moves the variable in the wrong direction",severity:"error"})}}}return s}};var ft={meta:{docs:"Enforce return statements in getters",recommended:!0},check:(y,b)=>{let s=[],l=y.split(/\r?\n/);for(let n=0;n<l.length;n++){let w=l[n].match(/\bget\s+(\w+)\s*\(/);if(w){let a=w[1],P=!1,E=0,_=n;while(_<l.length){let D=l[_];for(let B of D){if(B==="{")E++;if(B==="}"){if(E--,E===0){if(!P)s.push({filePath:b.filePath,line:n+1,column:1,ruleId:"eslint/getter-return",message:`Getter '${a}' must return a value`,severity:"error"});break}}}let j=new RegExp("\\breturn\\s+[^;]");if(D.match(j))P=!0;if(E===0)break;_++}}}return s}};var mt={meta:{docs:"Disallow async functions as Promise executor",recommended:!0},check:(y,b)=>{let s=[],l=y.split(/\r?\n/);for(let n=0;n<l.length;n++){let i=l[n],w=/new\s+Promise\s*\(\s*async\s*(?:\(|function)/g,a;for(a=w.exec(i);a!==null;a=w.exec(i))s.push({filePath:b.filePath,line:n+1,column:a.index+1,ruleId:"eslint/no-async-promise-executor",message:"Promise executor functions should not be async",severity:"error"})}return s}};var pt={meta:{docs:"Disallow comparing against -0",recommended:!0},check:(y,b)=>{let s=[],l=y.split(/\r?\n/);for(let n=0;n<l.length;n++){let i=l[n],w=/([!=]==?)\s*-0\b|\b-0\s*([!=]==?)/g,a;for(a=w.exec(i);a!==null;a=w.exec(i))s.push({filePath:b.filePath,line:n+1,column:a.index+1,ruleId:"eslint/no-compare-neg-zero",message:"Do not use the '-0' literal in comparisons",severity:"error"})}return s}};var dt={meta:{docs:"Disallow assignment operators in conditional expressions",recommended:!0},check:(y,b)=>{let s=[],l=y.split(/\r?\n/);for(let n=0;n<l.length;n++){let i=l[n],w=/\b(if|while)\s*\([^)]*\b(\w+)\s*=\s*(?!=)[^)]*\)/g,a;for(a=w.exec(i);a!==null;a=w.exec(i)){let P=a[0];if(/===|==/.test(P))continue;if(i.substring(0,a.index).includes("//"))continue;s.push({filePath:b.filePath,line:n+1,column:Math.max(1,a.index+1),ruleId:"eslint/no-cond-assign",message:"Expected a conditional expression and instead saw an assignment",severity:"error"})}}return s}};var ht={meta:{docs:"Disallow reassigning const variables",recommended:!0},check:(y,b)=>{let s=[],l=y.split(/\r?\n/),n=new Map;for(let i=0;i<l.length;i++){let w=l[i],a=w.match(/\bconst\s+(\w+)/);if(a)n.set(a[1],i);let P=/\b(\w+)\s*=(?!=)/g,E;for(E=P.exec(w);E!==null;E=P.exec(w)){let _=E[1],D=w.substring(0,E.index);if(!/\b(?:const|let|var)\s*$/.test(D)&&n.has(_))s.push({filePath:b.filePath,line:i+1,column:Math.max(1,E.index+1),ruleId:"eslint/no-const-assign",message:`'${_}' is constant`,severity:"error"})}}return s}};var gt={meta:{docs:"Disallow constant expressions in conditions",recommended:!0},check:(y,b)=>{let s=[],l=y.split(/\r?\n/);for(let n=0;n<l.length;n++){let i=l[n],w=[{pattern:/\b(if|while)\s*\(\s*(true|false)\s*\)/g,type:"boolean"},{pattern:/\b(if|while)\s*\(\s*(\d+)\s*\)/g,type:"number"},{pattern:/\b(if|while)\s*\(\s*(['"`][^'"`]*['"`])\s*\)/g,type:"string"}];for(let{pattern:a,type:P}of w){let E;while((E=a.exec(i))!==null){let _=E[1];if(i.substring(0,E.index).includes("//"))continue;s.push({filePath:b.filePath,line:n+1,column:Math.max(1,E.index+_.length+2),ruleId:"eslint/no-constant-condition",message:"Unexpected constant condition",severity:"error"})}}}return s}};var yt={meta:{docs:"Disallow duplicate class members",recommended:!0},check:(y,b)=>{let s=[],l=y.split(/\r?\n/),n=!1,i=new Set,w=0;for(let a=0;a<l.length;a++){let P=l[a];if(P.match(/\bclass\s+\w+/))n=!0,i=new Set,w=0;if(n){for(let _ of P){if(_==="{")w++;if(_==="}"){if(w--,w===0)n=!1}}let E=[...P.matchAll(/^\s*(?:(?:public|private|protected|static|readonly|async)\s*)?(?:get|set)?\s*(\w+)\s*\(/g),...P.matchAll(/^\s*(?:(?:public|private|protected|static|readonly)\s*)?(\w+)\s*[:=]/g)];for(let _ of E){let D=_[1];if(i.has(D))s.push({filePath:b.filePath,line:a+1,column:1,ruleId:"eslint/no-dupe-class-members",message:`Duplicate class member '${D}'`,severity:"error"});else i.add(D)}}}return s}};var Je={meta:{docs:"Disallow duplicate keys in object literals",recommended:!0},check:(y,b)=>{let s=[],l=y.split(/\r?\n/),n=/\{\s*$/,i=/^\s*(?:(['"`])(.+?)\1|(\w+))\s*:/;for(let w=0;w<l.length;w++){let a=l[w];if(!n.test(a)&&!a.includes("{"))continue;let P=new Map,E=(a.match(/\{/g)||[]).length-(a.match(/\}/g)||[]).length,_=w;for(let D=w+1;D<l.length&&E>0;D++){let j=l[D];E+=(j.match(/\{/g)||[]).length,E-=(j.match(/\}/g)||[]).length;let B=j.match(i);if(B){let Z=B[2]||B[3];if(Z)if(P.get(Z)!==void 0)s.push({filePath:b.filePath,line:D+1,column:Math.max(1,j.search(/\S/)+1),ruleId:"eslint/no-dupe-keys",message:`Duplicate key '${Z}'`,severity:"error"});else P.set(Z,D)}if(E===0)break}}return s},fix:(y,b)=>{let s=Je.check(y,b);if(s.length===0)return y;let l=y.split(/\r?\n/),n=new Set(s.map((w)=>w.line-1));return l.filter((w,a)=>!n.has(a)).join(`
3
3
  `)}};var bt={meta:{docs:"Disallow duplicate case labels in switch statements",recommended:!0},check:(y,b)=>{let s=[],l=y.split(/\r?\n/),n=!1,i=new Set,w=-1;for(let a=0;a<l.length;a++){let P=l[a],E=P.trim();if(/\bswitch\s*\(/.test(E)){n=!0,i=new Set,w=a;continue}if(n&&E==="}"&&a>w){let _=l[w].match(/^\s*/)?.[0].length||0;if((P.match(/^\s*/)?.[0].length||0)<=_+2)n=!1,i=new Set}if(n){let _=E.match(/^case\s+(.+?)\s*:/);if(_){let D=_[1].trim();if(i.has(D))s.push({filePath:b.filePath,line:a+1,column:Math.max(1,P.indexOf("case")+1),ruleId:"eslint/no-duplicate-case",message:`Duplicate case label '${D}'`,severity:"error"});else i.add(D)}}}return s}};var xt={meta:{docs:"Disallow empty destructuring patterns",recommended:!0},check:(y,b)=>{let s=[],l=y.split(/\r?\n/);for(let n=0;n<l.length;n++){let i=l[n],w=/\{\s*\}\s*=/g,a=/\[\s*\]\s*=/g,P;for(P=w.exec(i);P!==null;P=w.exec(i)){if(i.substring(0,P.index).includes("//"))continue;s.push({filePath:b.filePath,line:n+1,column:Math.max(1,P.index+1),ruleId:"eslint/no-empty-pattern",message:"Unexpected empty object pattern",severity:"error"})}for(P=a.exec(i);P!==null;P=a.exec(i)){if(i.substring(0,P.index).includes("//"))continue;s.push({filePath:b.filePath,line:n+1,column:Math.max(1,P.index+1),ruleId:"eslint/no-empty-pattern",message:"Unexpected empty array pattern",severity:"error"})}}return s}};var Rt={meta:{docs:"Disallow fallthrough of case statements",recommended:!0},check:(y,b)=>{let s=[],l=y.split(/\r?\n/),n=!1,i=-1,w=!1;for(let a=0;a<l.length;a++){let E=l[a].trim();if(/\bswitch\s*\(/.test(E)){n=!0;continue}if(n){if(/^case\s+/.test(E)||/^default\s*:/.test(E)){if(i>=0&&w){if(!(/\/\/.*falls?\s*through|\/\*.*falls?\s*through/i.test(l[i])||a>0&&/\/\/.*falls?\s*through|\/\*.*falls?\s*through/i.test(l[a-1])))s.push({filePath:b.filePath,line:i+1,column:Math.max(1,l[i].indexOf("case")+1),ruleId:"eslint/no-fallthrough",message:"Expected a 'break' statement before 'case'",severity:"error"})}i=a,w=!0}if(/\b(?:break|return|throw|continue)\b/.test(E))w=!1;if(E==="}")n=!1,i=-1,w=!1}}return s}};var wt={meta:{docs:"Disallow number literals that lose precision",recommended:!0},check:(y,b)=>{let s=[],l=y.split(/\r?\n/);for(let n=0;n<l.length;n++){let i=l[n],w=/\b(\d{17,}(?:\.\d+)?|\d+\.\d{17,})\b/g,a;for(a=w.exec(i);a!==null;a=w.exec(i)){let P=a[1];if(Number(P).toString()!==P)s.push({filePath:b.filePath,line:n+1,column:a.index+1,ruleId:"eslint/no-loss-of-precision",message:"This number literal will lose precision at runtime",severity:"error"})}}return s}};var kt={meta:{docs:"Disallow returning values from Promise executor functions",recommended:!0},check:(y,b)=>{let s=[],l=y.split(/\r?\n/);for(let n=0;n<l.length;n++)if(l[n].match(/new\s+Promise\s*\(/)){let a=0,P=!1,E=n;while(E<l.length){let _=l[E];for(let j of _){if(j==="{")a++,P=!0;if(j==="}"){if(a--,a===0&&P)break}}let D=new RegExp("\\breturn\\s+[^;]");if(P&&_.match(D))s.push({filePath:b.filePath,line:E+1,column:1,ruleId:"eslint/no-promise-executor-return",message:"Return values from promise executor functions cannot be read",severity:"error"});if(a===0&&P)break;E++}}return s}};var It={meta:{docs:"Disallow variable redeclaration",recommended:!0},check:(y,b)=>{let s=[],l=y.split(/\r?\n/),n=new Map;for(let i=0;i<l.length;i++){let w=l[i],a=/\b(var|let|const)\s+(\w+)/g,P;for(P=a.exec(w);P!==null;P=a.exec(w)){let _=P[2];if(n.get(_)!==void 0)s.push({filePath:b.filePath,line:i+1,column:Math.max(1,P.index+1),ruleId:"eslint/no-redeclare",message:`'${_}' is already defined`,severity:"error"});else n.set(_,i)}let E=/\bfunction\s+(\w+)/g;for(P=E.exec(w);P!==null;P=E.exec(w)){let _=P[1];if(n.get(_)!==void 0)s.push({filePath:b.filePath,line:i+1,column:Math.max(1,P.index+1),ruleId:"eslint/no-redeclare",message:`'${_}' is already defined`,severity:"error"});else n.set(_,i)}}return s}};var Qe={meta:{docs:"Disallow assignments where both sides are identical",recommended:!0},check:(y,b)=>{let s=[],l=y.split(/\r?\n/);for(let n=0;n<l.length;n++){let i=l[n],w=new RegExp("\\b(\\w+)\\s*=\\s*(\\w+)\\s*(?:;\\s*)?(?:\\/\\/.*)?$"),a=i.match(w);if(a&&a[1]===a[2]){s.push({filePath:b.filePath,line:n+1,column:Math.max(1,i.indexOf(a[1])+1),ruleId:"eslint/no-self-assign",message:`'${a[1]}' is assigned to itself`,severity:"error"});continue}let P=i.match(/([\w.]+)\s*=\s*([\w.]+)/);if(P&&P[1]===P[2]){s.push({filePath:b.filePath,line:n+1,column:Math.max(1,i.indexOf(P[1])+1),ruleId:"eslint/no-self-assign",message:`'${P[1]}' is assigned to itself`,severity:"error"});continue}let E=i.match(/(\w+\[[^\]]+\])\s*=\s*(\w+\[[^\]]+\])/);if(E){let _=E[1].replace(/\s/g,""),D=E[2].replace(/\s/g,"");if(_===D)s.push({filePath:b.filePath,line:n+1,column:Math.max(1,i.indexOf(E[1])+1),ruleId:"eslint/no-self-assign",message:`'${E[1]}' is assigned to itself`,severity:"error"})}}return s},fix:(y,b)=>{let s=Qe.check(y,b);if(s.length===0)return y;let l=y.split(/\r?\n/),n=new Set(s.map((w)=>w.line-1));return l.map((w,a)=>{if(n.has(a)){let P=w.trim();if(new RegExp("^\\w+(?:\\.\\w+|\\[[^\\]]+\\])?\\s*=\\s*\\w+(?:\\.\\w+|\\[[^\\]]+\\])?;?\\s*$").test(P))return""}return w}).filter((w,a,P)=>{if(w===""&&n.has(a)){let E=a>0&&P[a-1].trim()!=="",_=a<P.length-1&&P[a+1]&&P[a+1].trim()!=="";if(!E||!_)return!1}return!0}).join(`
4
4
  `)}};var Pt={meta:{docs:"Disallow comparisons where both sides are identical",recommended:!0},check:(y,b)=>{let s=[],l=y.split(/\r?\n/);for(let n=0;n<l.length;n++){let i=l[n],w=/([\w.\[\]]+)\s*(===|!==|==|!=|<|>|<=|>=)\s*([\w.\[\]]+)/g,a;for(a=w.exec(i);a!==null;a=w.exec(i)){let P=a[1].replace(/\s/g,""),E=a[2],_=a[3].replace(/\s/g,"");if(P===_)s.push({filePath:b.filePath,line:n+1,column:Math.max(1,a.index+1),ruleId:"eslint/no-self-compare",message:`Comparing '${a[1]}' to itself is potentially pointless`,severity:"error"})}}return s}};var Mt={meta:{docs:"Disallow sparse arrays (arrays with empty slots)",recommended:!0},check:(y,b)=>{let s=[],l=y.split(/\r?\n/);for(let n=0;n<l.length;n++){let i=l[n],w=/\[([^\]]*)\]/g,a;for(a=w.exec(i);a!==null;a=w.exec(i)){let P=a[1];if(/,\s*,/.test(P))s.push({filePath:b.filePath,line:n+1,column:Math.max(1,a.index+1),ruleId:"eslint/no-sparse-arrays",message:"Unexpected sparse array",severity:"error"})}}return s},fix:(y,b)=>{let s=y.split(/\r?\n/),l=!1,n=s.map((i)=>{let w=i;return w=w.replace(/\[([^\]]*)\]/g,(a,P)=>{if(/,\s*,/.test(P))return l=!0,`[${P.replace(/,(\s*),/g,", undefined,")}]`;return a}),w});return l?n.join(`
5
5
  `):y}};var vt={meta:{docs:"Disallow undeclared variables",recommended:!0,wip:!0},check:(y,b)=>[]};var $t={meta:{docs:"Disallow unreachable code after return, throw, continue, or break",recommended:!0},check:(y,b)=>{let s=[],l=y.split(/\r?\n/);for(let n=0;n<l.length;n++){let i=l[n],w=i.trim();if(/^\s*(?:return|throw|break|continue)\b/.test(i))for(let a=n+1;a<l.length;a++){let P=l[a],E=P.trim();if(E===""||E.startsWith("//")||E.startsWith("/*"))continue;if(E==="}"||E.startsWith("}"))break;if(/^(?:case\b|default\s*:)/.test(E))break;s.push({filePath:b.filePath,line:a+1,column:Math.max(1,P.search(/\S/)+1),ruleId:"eslint/no-unreachable",message:"Unreachable code",severity:"error"});break}}return s}};var Ct={meta:{docs:"Disallow negation of the left operand of relational operators",recommended:!0},check:(y,b)=>{let s=[],l=y.split(/\r?\n/);for(let n=0;n<l.length;n++){let i=l[n],w=/!\s*\w+\s+in\s+/g,a=/!\s*\w+\s+instanceof\s+/g,P;for(P=w.exec(i);P!==null;P=w.exec(i))s.push({filePath:b.filePath,line:n+1,column:P.index+1,ruleId:"eslint/no-unsafe-negation",message:"Unexpected negation of 'in' operand",severity:"error"});for(P=a.exec(i);P!==null;P=a.exec(i))s.push({filePath:b.filePath,line:n+1,column:P.index+1,ruleId:"eslint/no-unsafe-negation",message:"Unexpected negation of 'instanceof' operand",severity:"error"})}return s},fix:(y)=>{let b=y;return b=b.replace(/!\s*(\w+)\s+in\s+/g,"!($1 in "),b=b.replace(/!\s*(\w+)\s+instanceof\s+/g,"!($1 instanceof "),b}};var Lt={meta:{docs:"Disallow unnecessary catch clauses",recommended:!0},check:(y,b)=>{let s=[],l=y.split(/\r?\n/);for(let n=0;n<l.length;n++){let i=l[n],w=i.match(/catch\s*\(\s*(\w+)\s*\)/);if(!w)continue;let a=w[1];for(let P=n+1;P<Math.min(n+5,l.length);P++){let E=l[P].trim();if(E===`throw ${a}`||E===`throw ${a};`){let _=!1;for(let D=n+1;D<P;D++){let j=l[D].trim();if(j!==""&&j!=="{"&&!j.startsWith("//")){_=!0;break}}if(!_)s.push({filePath:b.filePath,line:n+1,column:Math.max(1,i.indexOf("catch")+1),ruleId:"eslint/no-useless-catch",message:"Unnecessary catch clause",severity:"error"});break}if(E==="}")break}}return s}};var St={meta:{docs:"Require isNaN() when checking for NaN",recommended:!0},check:(y,b)=>{let s=[],l=y.split(/\r?\n/);for(let n=0;n<l.length;n++){let i=l[n],w=/\b([\w.\[\]]+)\s*(===|!==|==|!=)\s*NaN\b|\bNaN\s*(===|!==|==|!=)\s*([\w.\[\]]+)/g,a;for(a=w.exec(i);a!==null;a=w.exec(i)){let P=a[1]||a[4];s.push({filePath:b.filePath,line:n+1,column:Math.max(1,a.index+1),ruleId:"eslint/use-isnan",message:"Use isNaN() to compare with NaN",severity:"error"})}}return s},fix:(y,b)=>{let s=y.split(/\r?\n/),l=!1,n=s.map((i)=>{let w=i;return w=w.replace(/\b([\w.\[\]]+)\s*===\s*NaN\b/g,(a,P)=>(l=!0,`isNaN(${P})`)),w=w.replace(/\bNaN\s*===\s*([\w.\[\]]+)\b/g,(a,P)=>(l=!0,`isNaN(${P})`)),w=w.replace(/\b([\w.\[\]]+)\s*!==\s*NaN\b/g,(a,P)=>(l=!0,`!isNaN(${P})`)),w=w.replace(/\bNaN\s*!==\s*([\w.\[\]]+)\b/g,(a,P)=>(l=!0,`!isNaN(${P})`)),w=w.replace(/\b([\w.\[\]]+)\s*==\s*NaN\b/g,(a,P)=>(l=!0,`isNaN(${P})`)),w=w.replace(/\bNaN\s*==\s*([\w.\[\]]+)\b/g,(a,P)=>(l=!0,`isNaN(${P})`)),w=w.replace(/\b([\w.\[\]]+)\s*!=\s*NaN\b/g,(a,P)=>(l=!0,`!isNaN(${P})`)),w=w.replace(/\bNaN\s*!=\s*([\w.\[\]]+)\b/g,(a,P)=>(l=!0,`!isNaN(${P})`)),w});return l?n.join(`
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{l,ne,z}from"./chunk-rx0b7k57.js";export{z as config,l as defaultConfig,ne as getConfig};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- var oe="pickier",ae="module",F="0.1.72",le="Format, lint and more in a fraction of seconds.",ce="Chris Breuer <chris@stacksjs.org>",ue="MIT",fe="https://github.com/pickier/pickier#readme",me={type:"git",url:"git+https://github.com/pickier/pickier.git"},he={url:"https://github.com/pickier/pickier/issues"},de=["pickier","linter","formatter","bun","fast"],pe={".":{types:"./dist/src/index.d.ts",import:"./dist/src/index.js"},"./*":{import:"./dist/*"}},ge="./dist/src/index.js",ye="./dist/src/index.d.ts",be={pickier:"./dist/bin/cli.js"},we=["README.md","dist"],xe={build:"bun --bun build.ts","build:bin":"bun --bun build.ts && bun run compile","build:native":"bun scripts/build-native.ts",compile:"bun build ./bin/cli.ts --compile --minify --outfile bin/pickier","compile:all":"bun run compile:linux-x64 && bun run compile:linux-arm64 && bun run compile:linux-x64-musl && bun run compile:linux-arm64-musl && bun run compile:windows-x64 && bun run compile:windows-arm64 && bun run compile:darwin-x64 && bun run compile:darwin-arm64","compile:linux-x64":"bun build ./bin/cli.ts --compile --minify --target=bun-linux-x64 --outfile bin/pickier-linux-x64","compile:linux-arm64":"bun build ./bin/cli.ts --compile --minify --target=bun-linux-arm64 --outfile bin/pickier-linux-arm64","compile:linux-x64-musl":"bun build ./bin/cli.ts --compile --minify --target=bun-linux-x64-musl --outfile bin/pickier-linux-x64-musl","compile:linux-arm64-musl":"bun build ./bin/cli.ts --compile --minify --target=bun-linux-arm64-musl --outfile bin/pickier-linux-arm64-musl","compile:windows-x64":"bun build ./bin/cli.ts --compile --minify --target=bun-windows-x64 --outfile bin/pickier-windows-x64.exe","compile:windows-arm64":"bun build ./bin/cli.ts --compile --minify --target=bun-windows-arm64 --outfile bin/pickier-windows-arm64.exe","compile:darwin-x64":"bun build ./bin/cli.ts --compile --minify --target=bun-darwin-x64 --outfile bin/pickier-darwin-x64","compile:darwin-arm64":"bun build ./bin/cli.ts --compile --minify --target=bun-darwin-arm64 --outfile bin/pickier-darwin-arm64",zip:"bun run zip:all","zip:all":"bun run zip:linux-x64 && bun run zip:linux-arm64 && bun run zip:linux-x64-musl && bun run zip:linux-arm64-musl && bun run zip:windows-x64 && bun run zip:windows-arm64 && bun run zip:darwin-x64 && bun run zip:darwin-arm64","zip:linux-x64":"zip -j bin/pickier-linux-x64.zip bin/pickier-linux-x64","zip:linux-arm64":"zip -j bin/pickier-linux-arm64.zip bin/pickier-linux-arm64","zip:linux-x64-musl":"zip -j bin/pickier-linux-x64-musl.zip bin/pickier-linux-x64-musl","zip:linux-arm64-musl":"zip -j bin/pickier-linux-arm64-musl.zip bin/pickier-linux-arm64-musl","zip:windows-x64":"zip -j bin/pickier-windows-x64.zip bin/pickier-windows-x64.exe","zip:windows-arm64":"zip -j bin/pickier-windows-arm64.zip bin/pickier-windows-arm64.exe","zip:darwin-x64":"zip -j bin/pickier-darwin-x64.zip bin/pickier-darwin-x64","zip:darwin-arm64":"zip -j bin/pickier-darwin-arm64.zip bin/pickier-darwin-arm64",prepublishOnly:"bun --bun run build && bun scripts/build-native.ts --required && bun run compile:all && bun run zip",test:"PICKIER_NO_AUTO_CONFIG=1 bun test --coverage","test:core":"PICKIER_NO_AUTO_CONFIG=1 bun test test/core","test:format":"PICKIER_NO_AUTO_CONFIG=1 bun test test/format","test:lint":"PICKIER_NO_AUTO_CONFIG=1 bun test test/lint","test:rules":"PICKIER_NO_AUTO_CONFIG=1 bun test test/rules","test:rules:sort":"PICKIER_NO_AUTO_CONFIG=1 bun test test/rules/sort","test:rules:style":"PICKIER_NO_AUTO_CONFIG=1 bun test test/rules/style","test:rules:quality":"PICKIER_NO_AUTO_CONFIG=1 bun test test/rules/quality","test:rules:imports":"PICKIER_NO_AUTO_CONFIG=1 bun test test/rules/imports","test:rules:typescript":"PICKIER_NO_AUTO_CONFIG=1 bun test test/rules/typescript","test:rules:regexp":"PICKIER_NO_AUTO_CONFIG=1 bun test test/rules/regexp","test:plugin":"PICKIER_NO_AUTO_CONFIG=1 bun test test/plugin","test:watch":"PICKIER_NO_AUTO_CONFIG=1 bun test --watch"},ke={"@stacksjs/clarity":"^0.3.24","@stacksjs/clapp":"^0.2.3"},Re={"@stacksjs/ts-spell-check":"^0.1.0"},$e={bunfig:"^0.15.13"},ve={name:oe,type:ae,version:F,description:le,author:ce,license:ue,homepage:fe,repository:me,bugs:he,keywords:de,exports:pe,module:ge,types:ye,bin:be,files:we,scripts:xe,dependencies:ke,optionalDependencies:Re,devDependencies:$e};
2
+ var oe="pickier",ae="module",F="0.1.73",le="Format, lint and more in a fraction of seconds.",ce="Chris Breuer <chris@stacksjs.org>",ue="MIT",fe="https://github.com/pickier/pickier#readme",me={type:"git",url:"git+https://github.com/pickier/pickier.git"},he={url:"https://github.com/pickier/pickier/issues"},de=["pickier","linter","formatter","bun","fast"],pe={".":{types:"./dist/src/index.d.ts",import:"./dist/src/index.js"},"./*":{import:"./dist/*"}},ge="./dist/src/index.js",ye="./dist/src/index.d.ts",be={pickier:"./dist/bin/cli.js"},we=["README.md","dist"],xe={build:"bun --bun build.ts","build:bin":"bun --bun build.ts && bun run compile","build:native":"bun scripts/build-native.ts",compile:"bun build ./bin/cli.ts --compile --minify --outfile bin/pickier","compile:all":"bun run compile:linux-x64 && bun run compile:linux-arm64 && bun run compile:linux-x64-musl && bun run compile:linux-arm64-musl && bun run compile:windows-x64 && bun run compile:windows-arm64 && bun run compile:darwin-x64 && bun run compile:darwin-arm64","compile:linux-x64":"bun build ./bin/cli.ts --compile --minify --target=bun-linux-x64 --outfile bin/pickier-linux-x64","compile:linux-arm64":"bun build ./bin/cli.ts --compile --minify --target=bun-linux-arm64 --outfile bin/pickier-linux-arm64","compile:linux-x64-musl":"bun build ./bin/cli.ts --compile --minify --target=bun-linux-x64-musl --outfile bin/pickier-linux-x64-musl","compile:linux-arm64-musl":"bun build ./bin/cli.ts --compile --minify --target=bun-linux-arm64-musl --outfile bin/pickier-linux-arm64-musl","compile:windows-x64":"bun build ./bin/cli.ts --compile --minify --target=bun-windows-x64 --outfile bin/pickier-windows-x64.exe","compile:windows-arm64":"bun build ./bin/cli.ts --compile --minify --target=bun-windows-arm64 --outfile bin/pickier-windows-arm64.exe","compile:darwin-x64":"bun build ./bin/cli.ts --compile --minify --target=bun-darwin-x64 --outfile bin/pickier-darwin-x64","compile:darwin-arm64":"bun build ./bin/cli.ts --compile --minify --target=bun-darwin-arm64 --outfile bin/pickier-darwin-arm64",zip:"bun run zip:all","zip:all":"bun run zip:linux-x64 && bun run zip:linux-arm64 && bun run zip:linux-x64-musl && bun run zip:linux-arm64-musl && bun run zip:windows-x64 && bun run zip:windows-arm64 && bun run zip:darwin-x64 && bun run zip:darwin-arm64","zip:linux-x64":"zip -j bin/pickier-linux-x64.zip bin/pickier-linux-x64","zip:linux-arm64":"zip -j bin/pickier-linux-arm64.zip bin/pickier-linux-arm64","zip:linux-x64-musl":"zip -j bin/pickier-linux-x64-musl.zip bin/pickier-linux-x64-musl","zip:linux-arm64-musl":"zip -j bin/pickier-linux-arm64-musl.zip bin/pickier-linux-arm64-musl","zip:windows-x64":"zip -j bin/pickier-windows-x64.zip bin/pickier-windows-x64.exe","zip:windows-arm64":"zip -j bin/pickier-windows-arm64.zip bin/pickier-windows-arm64.exe","zip:darwin-x64":"zip -j bin/pickier-darwin-x64.zip bin/pickier-darwin-x64","zip:darwin-arm64":"zip -j bin/pickier-darwin-arm64.zip bin/pickier-darwin-arm64",prepublishOnly:"bun --bun run build && bun scripts/build-native.ts --required && bun run compile:all && bun run zip",test:"PICKIER_NO_AUTO_CONFIG=1 bun test --coverage","test:core":"PICKIER_NO_AUTO_CONFIG=1 bun test test/core","test:format":"PICKIER_NO_AUTO_CONFIG=1 bun test test/format","test:lint":"PICKIER_NO_AUTO_CONFIG=1 bun test test/lint","test:rules":"PICKIER_NO_AUTO_CONFIG=1 bun test test/rules","test:rules:sort":"PICKIER_NO_AUTO_CONFIG=1 bun test test/rules/sort","test:rules:style":"PICKIER_NO_AUTO_CONFIG=1 bun test test/rules/style","test:rules:quality":"PICKIER_NO_AUTO_CONFIG=1 bun test test/rules/quality","test:rules:imports":"PICKIER_NO_AUTO_CONFIG=1 bun test test/rules/imports","test:rules:typescript":"PICKIER_NO_AUTO_CONFIG=1 bun test test/rules/typescript","test:rules:regexp":"PICKIER_NO_AUTO_CONFIG=1 bun test test/rules/regexp","test:plugin":"PICKIER_NO_AUTO_CONFIG=1 bun test test/plugin","test:watch":"PICKIER_NO_AUTO_CONFIG=1 bun test --watch"},ke={"@stacksjs/clarity":"^0.3.24","@stacksjs/clapp":"^0.2.3"},Re={"@stacksjs/ts-spell-check":"^0.1.0"},$e={bunfig:"^0.15.13"},ve={name:oe,type:ae,version:F,description:le,author:ce,license:ue,homepage:fe,repository:me,bugs:he,keywords:de,exports:pe,module:ge,types:ye,bin:be,files:we,scripts:xe,dependencies:ke,optionalDependencies:Re,devDependencies:$e};
3
3
  export{oe,ae,F,le,ce,ue,fe,me,he,de,pe,ge,ye,be,we,xe,ke,Re,$e,ve};
@@ -1,29 +1,29 @@
1
1
  // @bun
2
- import{i,b}from"./chunk-0rxvmb2a.js";import{readdirSync as fn,readFileSync as un}from"fs";import{homedir as dn}from"os";import{join as we}from"path";var je=["code-style","lint"],l={ignores:["**/node_modules/**","**/.pnpm/**","**/.yarn/**","**/dist/**","**/build/**","**/out/**","**/.output/**","**/.next/**","**/.nuxt/**","**/.vite/**","**/.turbo/**","**/.cache/**","**/coverage/**","**/vendor/**","**/pantry/**","**/tmp/**","**/.git/**","**/.idea/**","**/.vscode/**","**/.zed/**","**/.cursor/**","**/.claude/**","**/.github/**","**/*.test.ts","**/*.spec.ts","**/.bunpress/**","**/.vitepress/cache/**","**/storage/framework/stx/**","**/storage/framework/runtime/**","**/storage/cloud/**","**/*.lock","**/package-lock.json","**/pnpm-lock.yaml"],lint:{extensions:["ts","js","html","css","json","jsonc","md","yaml","yml","stx","sh","bash","zsh"],reporter:"stylish",cache:!1,maxWarnings:-1},format:{extensions:["ts","js","html","css","json","jsonc","md","yaml","yml","stx","sh","bash","zsh"],trimTrailingWhitespace:!0,maxConsecutiveBlankLines:1,finalNewline:"one",indent:2,indentStyle:"spaces",preserveCodeIndentation:!1,quotes:"single",semi:!1},rules:{noDebugger:"error",noConsole:"warn"},pluginRules:{"style/brace-style":"warn","style/curly":"off","style/if-newline":"off","style/max-statements-per-line":"warn","pickier/import-dedupe":"warn","pickier/no-import-node-modules-by-path":"error","pickier/no-import-dist":"error","pickier/prefer-const":"error","pickier/prefer-template":"warn","pickier/no-unused-vars":"error","pickier/no-unused-imports":"error","pickier/sort-tailwind-classes":"warn","regexp/no-unused-capturing-group":"error","regexp/no-super-linear-backtracking":"error","regexp/no-useless-lazy":"error","ts/no-top-level-await":"error","ts/member-delimiter-style":"off","ts/type-annotation-spacing":"off","style/comma-dangle":"off","style/keyword-spacing":"off","style/arrow-spacing":"off","style/space-infix-ops":"off","style/object-curly-spacing":"off","style/spaced-comment":"off","style/block-spacing":"off","style/space-before-blocks":"off","style/comma-spacing":"off","style/semi-spacing":"off","style/rest-spread-spacing":"off","style/key-spacing":"off","style/computed-property-spacing":"off","style/array-bracket-spacing":"off","style/space-in-parens":"off","style/template-curly-spacing":"off","style/space-unary-ops":"off","style/switch-colon-spacing":"off","style/arrow-parens":"off","style/space-before-function-paren":"off","style/quote-props":"off","style/no-floating-decimal":"off","style/new-parens":"off","style/no-extra-parens":"off","style/wrap-iife":"off","style/comma-style":"off","style/dot-location":"off","style/operator-linebreak":"off","style/multiline-ternary":"off","style/padded-blocks":"off","style/lines-between-class-members":"off","style/no-tabs":"off","style/no-mixed-spaces-and-tabs":"off","style/generator-star-spacing":"off","style/yield-star-spacing":"off","style/function-call-spacing":"off","style/template-tag-spacing":"off","style/no-whitespace-before-property":"off","style/no-mixed-operators":"off","style/indent-binary-ops":"off","ts/type-generic-spacing":"off","ts/type-named-tuple-spacing":"off","markdown/heading-increment":"warn","markdown/heading-style":"warn","markdown/no-missing-space-atx":"error","markdown/no-multiple-space-atx":"error","markdown/no-missing-space-closed-atx":"error","markdown/no-multiple-space-closed-atx":"error","markdown/blanks-around-headings":"warn","markdown/heading-start-left":"warn","markdown/no-duplicate-heading":"warn","markdown/single-title":"warn","markdown/no-trailing-punctuation":"warn","markdown/ul-style":"warn","markdown/list-indent":"error","markdown/ul-indent":"warn","markdown/ol-prefix":"warn","markdown/list-marker-space":"error","markdown/blanks-around-lists":"warn","markdown/no-trailing-spaces":"error","markdown/no-hard-tabs":"error","markdown/no-multiple-blanks":"warn","markdown/no-multiple-space-blockquote":"error","markdown/no-blanks-blockquote":"warn","markdown/blanks-around-fences":"warn","markdown/single-trailing-newline":"error","markdown/blanks-around-tables":"warn","markdown/no-reversed-links":"error","markdown/no-bare-urls":"warn","markdown/no-space-in-links":"error","markdown/no-empty-links":"error","markdown/link-fragments":"warn","markdown/reference-links-images":"warn","markdown/link-image-reference-definitions":"warn","markdown/link-image-style":"warn","markdown/descriptive-link-text":"warn","markdown/line-length":"off","markdown/commands-show-output":"warn","markdown/fenced-code-language":"warn","markdown/code-block-style":"off","markdown/code-fence-style":"warn","markdown/no-emphasis-as-heading":"warn","markdown/no-space-in-emphasis":"warn","markdown/no-space-in-code":"warn","markdown/emphasis-style":"warn","markdown/strong-style":"warn","markdown/no-inline-html":"off","markdown/hr-style":"warn","markdown/first-line-heading":"off","markdown/required-headings":"off","markdown/proper-names":"off","markdown/no-alt-text":"warn","markdown/table-pipe-style":"warn","markdown/table-column-count":"warn","markdown/table-column-style":"warn","lockfile/validate-host":["warn",{allowedHosts:["npm","yarn"]}],"lockfile/validate-https":"error","lockfile/validate-integrity":["warn",{requiredAlgorithm:"sha512"}],"lockfile/validate-package-names":"error","lockfile/validate-scheme":["error",{allowedSchemes:["https:","git+https:","git+ssh:"]}],"publint/exports-types-should-be-first":"error","publint/exports-default-should-be-last":"error","publint/exports-module-should-precede-require":"error","publint/exports-value-invalid":"error","publint/imports-key-invalid":"error","publint/imports-value-invalid":"error","publint/imports-default-should-be-last":"error","publint/imports-module-should-precede-require":"error","publint/use-type":"warn","publint/deprecated-field-jsnext":"warn","publint/field-invalid-value-type":"error","publint/local-dependency":"error","publint/has-module-but-no-exports":"warn","publint/exports-missing-root-entrypoint":"warn","publint/exports-fallback-array-use":"warn","publint/file-does-not-exist":"warn","publint/file-invalid-format":"warn","publint/module-should-be-esm":"error","publint/bin-file-not-executable":"error","publint/exports-module-should-be-esm":"error","shell/command-substitution":"error","shell/quote-variables":"warn","shell/no-cd-without-check":"warn","shell/no-eval":"error","shell/no-useless-cat":"warn","shell/shebang":"warn","shell/indent":"warn","shell/function-style":"warn","shell/operator-spacing":"warn","shell/keyword-spacing":"warn","shell/no-trailing-semicolons":"warn","shell/no-trailing-whitespace":"error","shell/prefer-double-brackets":"warn","shell/set-options":"off","shell/prefer-printf":"warn","shell/consistent-case-terminators":"warn","shell/no-broken-redirect":"error","shell/heredoc-indent":"warn","shell/no-ls-parsing":"warn","shell/no-variable-in-single-quotes":"warn","shell/no-exit-in-subshell":"warn","spell/check":"off","spell/check-comments":"off","spell/check-markdown":"off"},verbose:!0},pn=new Set(["PICKIER_CONCURRENCY","PICKIER_DIAGNOSTICS","PICKIER_FAIL_ON_WARNINGS","PICKIER_NO_AUTO_CONFIG","PICKIER_RULE_TIMEOUT_MS","PICKIER_TIMEOUT_MS","PICKIER_TRACE","PICKIER_WORKERS"]),mn=/^\.?(?:pickier|code-style|lint|config)(?:\.(?:pickier|code-style|lint|config))*\.(?:ts|js|mjs|cjs|mts|cts|json|jsonc)$/i,gn=new Set(["pickier",...je]);function hn(e){for(let k of Object.keys(process.env))if(k.startsWith("PICKIER_")&&!pn.has(k))return!0;let a=dn(),n=[e,we(e,"config"),we(e,".config"),we(a,".config","pickier"),we(a,".config"),a];for(let k of n){let R;try{R=fn(k,{withFileTypes:!0})}catch{continue}for(let v of R){if(v.isDirectory())continue;if(mn.test(v.name))return!0}}let s;try{s=un(we(e,"package.json"),"utf8")}catch{return!1}try{let k=JSON.parse(s);return k!==null&&typeof k==="object"&&Object.keys(k).some((R)=>gn.has(R))}catch{return!0}}var Ee=null;async function ne(){if(!Ee)if(!hn(process.cwd()))Ee=l;else{let{loadConfig:e}=await import("./chunk-t0w79bj5.js");Ee=await e({name:"pickier",alias:[...je],defaultConfig:l})}return Ee}var z=l;var yn=new Set(["return","typeof","instanceof","in","of","new","delete","void","case","do","else","yield","await","throw"]);function Oe(e){return e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57||e===95||e===36||e>=160}function ke(e){return e===`
3
- `||e==="\r"||e==="\u2028"||e==="\u2029"}function wn(e,a){let n=a+1,s=!1;while(n<e.length){let k=e[n];if(ke(k))return-1;if(k==="\\"){if(ke(e[n+1]))return-1;n+=2;continue}if(s){if(k==="]")s=!1}else if(k==="[")s=!0;else if(k==="/"){n+=1;while(n<e.length&&Oe(e.charCodeAt(n)))n+=1;return n}n+=1}return-1}var be=null;function g(e){if(be!==null&&be.text===e)return be.result;let a=bn(e);return be={text:e,result:a},a}function bn(e){let a=[],n=[],s=e.length,k=[],R=-1,v="operator",A=0;if(e.startsWith("#!")){let P=2;while(P<s&&!ke(e[P]))P+=1;a.push({kind:"comment",start:2,end:P}),A=P}let U=(P)=>{if(k.length===0)R=P;k.push(-1)},K=()=>{let P=A;while(A<s){let H=e[A];if(H==="\\"){A+=2;continue}if(H==="`"){if(a.push({kind:"template",start:P,end:A}),k.pop(),k.length===0)n.push([R,A]);A+=1,v="value";return}if(H==="$"&&e[A+1]==="{"){a.push({kind:"template",start:P,end:A}),k.push(0),A+=2,v="operator";return}A+=1}A=Math.min(A,s),a.push({kind:"template",start:P,end:A}),k.length=0,n.push([R,s])};while(A<s){if(k.length>0&&k[k.length-1]===-1){K();continue}let P=e[A],H=e[A+1];if(P==="/"&&H==="/"){let W=A+2;while(W<s&&!ke(e[W]))W+=1;a.push({kind:"comment",start:A+2,end:W}),A=W;continue}if(P==="/"&&H==="*"){let W=e.indexOf("*/",A+2),j=W<0?s:W;a.push({kind:"comment",start:A+2,end:j}),A=W<0?s:W+2;continue}if(P==="'"||P==='"'){let W=A+1,j=W;while(j<s){let B=e[j];if(B==="\\"){j+=e[j+1]==="\r"&&e[j+2]===`
4
- `?3:2;continue}if(B===P||ke(B))break;j+=1}j=Math.min(j,s),a.push({kind:"string",start:W,end:j}),A=e[j]===P?j+1:j,v="value";continue}if(P==="`"){U(A),A+=1;continue}if(P==="/"){let W=v==="operator"?wn(e,A):-1;if(W>0){let j=W;while(j>A&&e[j-1]!=="/")j-=1;a.push({kind:"regex",start:A+1,end:j-1}),A=W,v="value";continue}A+=1,v="operator";continue}if(k.length>0){if(P==="{"){k[k.length-1]+=1,A+=1,v="operator";continue}if(P==="}"){let W=k[k.length-1];if(W>0)k[k.length-1]=W-1,v="operator";else k.pop();A+=1;continue}}if(Oe(e.charCodeAt(A))){let W=A+1;while(W<s&&Oe(e.charCodeAt(W)))W+=1;let j=e.slice(A,W);v=yn.has(j)?"operator":"value",A=W;continue}if(P===")"||P==="]")v="value";else if(!(P===" "||P>="\t"&&P<="\r"))v="operator";A+=1}return{regions:a,templates:n}}function I(e,a={comments:!0},n=g(e)){let s=new Set;if(a.comments)s.add("comment");if(a.strings)s.add("string");if(a.templates)s.add("template");if(a.regex)s.add("regex");if(s.size===0)return e;let k=(a.comments?1:0)|(a.strings?2:0)|(a.templates?4:0)|(a.regex?8:0),R=ve.get(k);if(R!==void 0&&R.text===e)return R.masked;let v=kn(e,s,n);return ve.set(k,{text:e,masked:v}),v}var ve=new Map;function q(){be=null,ve.clear()}function kn(e,a,n){let s="",k=0;for(let R of n.regions){if(!a.has(R.kind))continue;let v=Math.max(R.start,k),A=Math.min(R.end,e.length);if(v>=A)continue;s+=e.slice(k,v)+xn(e.slice(v,A)),k=A}return k===0?e:s+e.slice(k)}var Cn=/[^\n\r\u2028\u2029]/g;function xn(e){return e.replace(Cn," ")}function G(e){return I(e,{comments:!0})}function c(e){return I(e,{comments:!0,strings:!0,templates:!0,regex:!0})}function S(e,a=g(e)){let n=[0];for(let v=e.indexOf(`
2
+ import{i,b}from"./chunk-0rxvmb2a.js";import{readdirSync as fn,readFileSync as un}from"fs";import{homedir as dn}from"os";import{join as we}from"path";var je=["code-style","lint"],l={ignores:["**/node_modules/**","**/.pnpm/**","**/.yarn/**","**/dist/**","**/build/**","**/out/**","**/.output/**","**/.next/**","**/.nuxt/**","**/.vite/**","**/.turbo/**","**/.cache/**","**/coverage/**","**/vendor/**","**/pantry/**","**/tmp/**","**/.git/**","**/.idea/**","**/.vscode/**","**/.zed/**","**/.cursor/**","**/.claude/**","**/.github/**","**/*.test.ts","**/*.spec.ts","**/.bunpress/**","**/.vitepress/cache/**","**/storage/framework/stx/**","**/storage/framework/runtime/**","**/storage/cloud/**","**/*.lock","**/package-lock.json","**/pnpm-lock.yaml"],lint:{extensions:["ts","js","html","css","json","jsonc","md","yaml","yml","stx","sh","bash","zsh"],reporter:"stylish",cache:!1,maxWarnings:-1},format:{extensions:["ts","js","html","css","json","jsonc","md","yaml","yml","stx","sh","bash","zsh"],trimTrailingWhitespace:!0,maxConsecutiveBlankLines:1,finalNewline:"one",indent:2,indentStyle:"spaces",preserveCodeIndentation:!1,quotes:"single",semi:!1},rules:{noDebugger:"error",noConsole:"warn"},pluginRules:{"style/brace-style":"warn","style/curly":"off","style/if-newline":"off","style/max-statements-per-line":"warn","pickier/import-dedupe":"warn","pickier/no-import-node-modules-by-path":"error","pickier/no-import-dist":"error","pickier/prefer-const":"error","pickier/prefer-template":"warn","pickier/no-unused-vars":"error","pickier/no-unused-imports":"error","pickier/sort-tailwind-classes":"warn","regexp/no-unused-capturing-group":"error","regexp/no-super-linear-backtracking":"error","regexp/no-useless-lazy":"error","ts/no-top-level-await":"error","ts/member-delimiter-style":"off","ts/type-annotation-spacing":"off","style/comma-dangle":"off","style/keyword-spacing":"off","style/arrow-spacing":"off","style/space-infix-ops":"off","style/object-curly-spacing":"off","style/spaced-comment":"off","style/block-spacing":"off","style/space-before-blocks":"off","style/comma-spacing":"off","style/semi-spacing":"off","style/rest-spread-spacing":"off","style/key-spacing":"off","style/computed-property-spacing":"off","style/array-bracket-spacing":"off","style/space-in-parens":"off","style/template-curly-spacing":"off","style/space-unary-ops":"off","style/switch-colon-spacing":"off","style/arrow-parens":"off","style/space-before-function-paren":"off","style/quote-props":"off","style/no-floating-decimal":"off","style/new-parens":"off","style/no-extra-parens":"off","style/wrap-iife":"off","style/comma-style":"off","style/dot-location":"off","style/operator-linebreak":"off","style/multiline-ternary":"off","style/padded-blocks":"off","style/lines-between-class-members":"off","style/no-tabs":"off","style/no-mixed-spaces-and-tabs":"off","style/generator-star-spacing":"off","style/yield-star-spacing":"off","style/function-call-spacing":"off","style/template-tag-spacing":"off","style/no-whitespace-before-property":"off","style/no-mixed-operators":"off","style/indent-binary-ops":"off","ts/type-generic-spacing":"off","ts/type-named-tuple-spacing":"off","markdown/heading-increment":"warn","markdown/heading-style":"warn","markdown/no-missing-space-atx":"error","markdown/no-multiple-space-atx":"error","markdown/no-missing-space-closed-atx":"error","markdown/no-multiple-space-closed-atx":"error","markdown/blanks-around-headings":"warn","markdown/heading-start-left":"warn","markdown/no-duplicate-heading":"warn","markdown/single-title":"warn","markdown/no-trailing-punctuation":"warn","markdown/ul-style":"warn","markdown/list-indent":"error","markdown/ul-indent":"warn","markdown/ol-prefix":"warn","markdown/list-marker-space":"error","markdown/blanks-around-lists":"warn","markdown/no-trailing-spaces":"error","markdown/no-hard-tabs":"error","markdown/no-multiple-blanks":"warn","markdown/no-multiple-space-blockquote":"error","markdown/no-blanks-blockquote":"warn","markdown/blanks-around-fences":"warn","markdown/single-trailing-newline":"error","markdown/blanks-around-tables":"warn","markdown/no-reversed-links":"error","markdown/no-bare-urls":"warn","markdown/no-space-in-links":"error","markdown/no-empty-links":"error","markdown/link-fragments":"warn","markdown/reference-links-images":"warn","markdown/link-image-reference-definitions":"warn","markdown/link-image-style":"warn","markdown/descriptive-link-text":"warn","markdown/line-length":"off","markdown/commands-show-output":"warn","markdown/fenced-code-language":"warn","markdown/code-block-style":"off","markdown/code-fence-style":"warn","markdown/no-emphasis-as-heading":"warn","markdown/no-space-in-emphasis":"warn","markdown/no-space-in-code":"warn","markdown/emphasis-style":"warn","markdown/strong-style":"warn","markdown/no-inline-html":"off","markdown/hr-style":"warn","markdown/first-line-heading":"off","markdown/required-headings":"off","markdown/proper-names":"off","markdown/no-alt-text":"warn","markdown/table-pipe-style":"warn","markdown/table-column-count":"warn","markdown/table-column-style":"warn","lockfile/validate-host":["warn",{allowedHosts:["npm","yarn"]}],"lockfile/validate-https":"error","lockfile/validate-integrity":["warn",{requiredAlgorithm:"sha512"}],"lockfile/validate-package-names":"error","lockfile/validate-scheme":["error",{allowedSchemes:["https:","git+https:","git+ssh:"]}],"publint/exports-types-should-be-first":"error","publint/exports-default-should-be-last":"error","publint/exports-module-should-precede-require":"error","publint/exports-value-invalid":"error","publint/imports-key-invalid":"error","publint/imports-value-invalid":"error","publint/imports-default-should-be-last":"error","publint/imports-module-should-precede-require":"error","publint/use-type":"warn","publint/deprecated-field-jsnext":"warn","publint/field-invalid-value-type":"error","publint/local-dependency":"error","publint/has-module-but-no-exports":"warn","publint/exports-missing-root-entrypoint":"warn","publint/exports-fallback-array-use":"warn","publint/file-does-not-exist":"warn","publint/file-invalid-format":"warn","publint/module-should-be-esm":"error","publint/bin-file-not-executable":"error","publint/exports-module-should-be-esm":"error","shell/command-substitution":"error","shell/quote-variables":"warn","shell/no-cd-without-check":"warn","shell/no-eval":"error","shell/no-useless-cat":"warn","shell/shebang":"warn","shell/indent":"warn","shell/function-style":"warn","shell/operator-spacing":"warn","shell/keyword-spacing":"warn","shell/no-trailing-semicolons":"warn","shell/no-trailing-whitespace":"error","shell/prefer-double-brackets":"warn","shell/set-options":"off","shell/prefer-printf":"warn","shell/consistent-case-terminators":"warn","shell/no-broken-redirect":"error","shell/heredoc-indent":"warn","shell/no-ls-parsing":"warn","shell/no-variable-in-single-quotes":"warn","shell/no-exit-in-subshell":"warn","spell/check":"off","spell/check-comments":"off","spell/check-markdown":"off"},verbose:!0},pn=new Set(["PICKIER_CONCURRENCY","PICKIER_DIAGNOSTICS","PICKIER_FAIL_ON_WARNINGS","PICKIER_NO_AUTO_CONFIG","PICKIER_RULE_TIMEOUT_MS","PICKIER_TIMEOUT_MS","PICKIER_TRACE","PICKIER_WORKERS"]),mn=/^\.?(?:pickier|code-style|lint|config)(?:\.(?:pickier|code-style|lint|config))*\.(?:ts|js|mjs|cjs|mts|cts|json|jsonc)$/i,gn=new Set(["pickier",...je]);function hn(e){for(let k of Object.keys(process.env))if(k.startsWith("PICKIER_")&&!pn.has(k))return!0;let a=dn(),n=[e,we(e,"config"),we(e,".config"),we(a,".config","pickier"),we(a,".config"),a];for(let k of n){let R;try{R=fn(k,{withFileTypes:!0})}catch{continue}for(let v of R){if(v.isDirectory())continue;if(mn.test(v.name))return!0}}let s;try{s=un(we(e,"package.json"),"utf8")}catch{return!1}try{let k=JSON.parse(s);return k!==null&&typeof k==="object"&&Object.keys(k).some((R)=>gn.has(R))}catch{return!0}}var Ee=null;async function ne(){if(!Ee)if(!hn(process.cwd()))Ee=l;else{let{loadConfig:e}=await import("./chunk-t0w79bj5.js");Ee=await e({name:"pickier",alias:[...je],defaultConfig:l})}return Ee}var z=l;var yn=new Set(["return","typeof","instanceof","in","of","new","delete","void","case","do","else","yield","await","throw"]);function ve(e){return e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57||e===95||e===36||e>=160}function ke(e){return e===`
3
+ `||e==="\r"||e==="\u2028"||e==="\u2029"}function wn(e,a){let n=a+1,s=!1;while(n<e.length){let k=e[n];if(ke(k))return-1;if(k==="\\"){if(ke(e[n+1]))return-1;n+=2;continue}if(s){if(k==="]")s=!1}else if(k==="[")s=!0;else if(k==="/"){n+=1;while(n<e.length&&ve(e.charCodeAt(n)))n+=1;return n}n+=1}return-1}var be=null;function g(e){if(be!==null&&be.text===e)return be.result;let a=bn(e);return be={text:e,result:a},a}function bn(e){let a=[],n=[],s=e.length,k=[],R=-1,v="operator",A=0;if(e.startsWith("#!")){let F=2;while(F<s&&!ke(e[F]))F+=1;a.push({kind:"comment",start:2,end:F}),A=F}let W=(F)=>{if(k.length===0)R=F;k.push(-1)},K=()=>{let F=A;while(A<s){let B=e[A];if(B==="\\"){A+=2;continue}if(B==="`"){if(a.push({kind:"template",start:F,end:A}),k.pop(),k.length===0)n.push([R,A]);A+=1,v="value";return}if(B==="$"&&e[A+1]==="{"){a.push({kind:"template",start:F,end:A}),k.push(0),A+=2,v="operator";return}A+=1}A=Math.min(A,s),a.push({kind:"template",start:F,end:A}),k.length=0,n.push([R,s])};while(A<s){if(k.length>0&&k[k.length-1]===-1){K();continue}let F=e[A],B=e[A+1];if(F==="/"&&B==="/"){let U=A+2;while(U<s&&!ke(e[U]))U+=1;a.push({kind:"comment",start:A+2,end:U}),A=U;continue}if(F==="/"&&B==="*"){let U=e.indexOf("*/",A+2),P=U<0?s:U;a.push({kind:"comment",start:A+2,end:P}),A=U<0?s:U+2;continue}if(F==="'"||F==='"'){let U=A+1,P=U;while(P<s){let V=e[P];if(V==="\\"){P+=e[P+1]==="\r"&&e[P+2]===`
4
+ `?3:2;continue}if(V===F||ke(V))break;P+=1}P=Math.min(P,s),a.push({kind:"string",start:U,end:P}),A=e[P]===F?P+1:P,v="value";continue}if(F==="`"){W(A),A+=1;continue}if(F==="/"){let U=v==="operator"?wn(e,A):-1;if(U>0){let P=U;while(P>A&&e[P-1]!=="/")P-=1;a.push({kind:"regex",start:A+1,end:P-1}),A=U,v="value";continue}A+=1,v="operator";continue}if(k.length>0){if(F==="{"){k[k.length-1]+=1,A+=1,v="operator";continue}if(F==="}"){let U=k[k.length-1];if(U>0)k[k.length-1]=U-1,v="operator";else k.pop();A+=1;continue}}if(ve(e.charCodeAt(A))){let U=A+1;while(U<s&&ve(e.charCodeAt(U)))U+=1;let P=e.slice(A,U);v=yn.has(P)?"operator":"value",A=U;continue}if(F===")"||F==="]")v="value";else if(!(F===" "||F>="\t"&&F<="\r"))v="operator";A+=1}return{regions:a,templates:n}}function I(e,a={comments:!0},n=g(e)){let s=new Set;if(a.comments)s.add("comment");if(a.strings)s.add("string");if(a.templates)s.add("template");if(a.regex)s.add("regex");if(s.size===0)return e;let k=(a.comments?1:0)|(a.strings?2:0)|(a.templates?4:0)|(a.regex?8:0),R=Ae.get(k);if(R!==void 0&&R.text===e)return R.masked;let v=kn(e,s,n);return Ae.set(k,{text:e,masked:v}),v}var Ae=new Map;function q(){be=null,Ae.clear()}function kn(e,a,n){let s="",k=0;for(let R of n.regions){if(!a.has(R.kind))continue;let v=Math.max(R.start,k),A=Math.min(R.end,e.length);if(v>=A)continue;s+=e.slice(k,v)+xn(e.slice(v,A)),k=A}return k===0?e:s+e.slice(k)}var Cn=/[^\n\r\u2028\u2029]/g;function xn(e){return e.replace(Cn," ")}function G(e){return I(e,{comments:!0})}function c(e){return I(e,{comments:!0,strings:!0,templates:!0,regex:!0})}function S(e,a=g(e)){let n=[0];for(let v=e.indexOf(`
5
5
  `);v!==-1;v=e.indexOf(`
6
- `,v+1))n.push(v+1);let s=Array.from({length:n.length}).fill(!1),k=a.regions.filter((v)=>v.kind==="template"),R=0;for(let v=0;v<n.length;v+=1){let A=n[v];while(R<k.length&&k[R].end<A)R+=1;let U=k[R];s[v]=U!==void 0&&U.start<=A&&A<=U.end&&A>0}return s}var En=new Set([".ts",".js"]),Sn=new Set([".json",".jsonc"]),Rn=new Set([".yaml",".yml"]),_n=new Set([".sh",".bash",".zsh",".ksh",".dash"]),In=new Set([".md",".mdx",".markdown"]),On=/^#!\s*(?:\/usr\/bin\/env\s+)?(?:ba|z|k|da)?sh\b/;var vn=/^[}\])]/,An=/\s*\/\/.*$/,Tn=/^(?:if|else\s+if|for|while)\s*\(/,Nn=/^(?:if|else|for|while|do)\b/,Pn=/^(?:\.[\w$[]|\?[\s.:]|:\s|&&|\|\|)/;function $n(e){let a=e.charCodeAt(0);if(a!==105&&a!==101&&a!==102&&a!==119&&a!==100)return!1;let n=Tn.exec(e);if(!n)return/^(?:else|do)\s*$/.test(e);let s=0,k=null;for(let R=n[0].length-1;R<e.length;R++){let v=e[R];if(k){if(v==="\\"){R++;continue}if(v===k)k=null;continue}if(v==="'"||v==='"'||v==="`"){k=v;continue}if(v==="(")s++;else if(v===")"){if(s--,s===0)return e.slice(R+1).trim().length===0}}return!1}var Mn=/^\s*for\s*\(/,Ln=new RegExp("^\\s*;\\s*$"),jn=new RegExp(";{2,}\\s*$"),Fn=/([\w)])\{/g,Dn=/\{(return|if|for|while|switch|const|let|var|function)\b/g,Wn=/,(\S)/g,Un=/(?<![=!<>+\-*/%&|^?])=(?![=><])/g,Gn=/(\w)\+(\w)/g,Kn=/(\w)-(\w)/g,Bn=/(\w)\*(\w)/g,zn=/(\w)\/(\w)/g,Hn=new RegExp("(?<=\\S);([^\\s;])","g"),Jn=/([\w)\]])<(\d)/g,qn=/([\w)\]])>(\d)/g,Fe=/\s{2,}/g,De=/^\s*$/,Yn=/^\s*\/\//,We=/^\s*\/\*/,Xn=/^\s*import\b/,Ue=/\bfrom\s*['"][^'"]+['"]|^\s*import\s+['"][^'"]+['"]/,Qn=/package\.json$/i,Vn=/[jt]sconfig(?:\..+)?\.json$/i,ye=/[ \t]+$/,Zn=/^\n+/;function xe(e){let a=e.lastIndexOf(".");return a>=0?e.slice(a):""}function Se(e){return En.has(xe(e))}function et(e){return Sn.has(xe(e))}function nt(e){return Rn.has(xe(e))}function tt(e){return In.has(xe(e))}function rt(e){return _n.has(xe(e))}function st(e,a){return rt(e)||On.test(a)}function ot(e,a){let n=e.split(`
7
- `),s=n.length,k=Array(s),R=a.format.indent,v=a.format.indentStyle==="tabs",A=0,U=new b,K=!1,P="",H=!1,W=0;for(let j=0;j<s;j++){let B=n[j];if(B.length===0||/^\s*$/.test(B)){k[j]="";continue}if(K){if(k[j]=B,B.trim()===P)K=!1,P="";continue}let ae=i(B);if(ae)K=!0,P=ae;let ue=0;while(ue<B.length&&(B.charCodeAt(ue)===32||B.charCodeAt(ue)===9))ue++;let V=B.slice(ue).trimEnd();if(V.startsWith("#")&&j>0){let D=v?"\t".repeat(A):" ".repeat(A*R);k[j]=D+V;continue}let ce=U.read(V);if(/^case\b/.test(V)&&/\bin\s*$/.test(V))W++,H=!0;if(/^esac\b/.test(V)){if(W=Math.max(0,W-1),W===0)H=!1}let me=H&&/\)\s*$/.test(V)&&!/\$\(/.test(V)&&!/^\s*\(/.test(V)&&!V.startsWith("#"),le=/^;[;&]\s*$/.test(V),ge=/^(?:fi|done|esac|elif|else)\b/.test(V)||/^\}/.test(V);if(!ce.continuation&&ge)A=Math.max(0,A-1);if(!ce.continuation&&le)A=Math.max(0,A-1);let he=A+Number(ce.continuation),de=v?"\t".repeat(he):" ".repeat(he*R);if(k[j]=de+V,ce.continuation){if(ce.closesHeader)A++;continue}if(/^then\b/.test(V)||/^do\b/.test(V)||/^else\b/.test(V))A++;else if(/^if\b/.test(V)&&/\bthen\s*$/.test(V))A++;else if(/^elif\b/.test(V)&&/\bthen\s*$/.test(V))A++;else if(/^(?:while|for|until)\b/.test(V)&&/\bdo\s*$/.test(V))A++;else if(/^case\b/.test(V)&&/\bin\s*$/.test(V))A++;else if(me)A++;else if(/\{\s*$/.test(V)&&!V.startsWith("#"))A++}return k.join(`
6
+ `,v+1))n.push(v+1);let s=Array.from({length:n.length}).fill(!1),k=a.regions.filter((v)=>v.kind==="template"),R=0;for(let v=0;v<n.length;v+=1){let A=n[v];while(R<k.length&&k[R].end<A)R+=1;let W=k[R];s[v]=W!==void 0&&W.start<=A&&A<=W.end&&A>0}return s}var En=new Set([".ts",".js"]),Sn=new Set([".json",".jsonc"]),Rn=new Set([".yaml",".yml"]),_n=new Set([".sh",".bash",".zsh",".ksh",".dash"]),In=new Set([".md",".mdx",".markdown"]),On=/^#!\s*(?:\/usr\/bin\/env\s+)?(?:ba|z|k|da)?sh\b/;var vn=/^[}\])]/,An=/\s*\/\/.*$/,Tn=/^(?:if|else\s+if|for|while)\s*\(/,Nn=/^(?:if|else|for|while|do)\b/,Pn=/^(?:\.[\w$[]|\?[\s.:]|:\s|&&|\|\|)/;function $n(e){let a=e.charCodeAt(0);if(a!==105&&a!==101&&a!==102&&a!==119&&a!==100)return!1;let n=Tn.exec(e);if(!n)return/^(?:else|do)\s*$/.test(e);let s=0,k=null;for(let R=n[0].length-1;R<e.length;R++){let v=e[R];if(k){if(v==="\\"){R++;continue}if(v===k)k=null;continue}if(v==="'"||v==='"'||v==="`"){k=v;continue}if(v==="(")s++;else if(v===")"){if(s--,s===0)return e.slice(R+1).trim().length===0}}return!1}var Mn=/^\s*for\s*\(/,Ln=new RegExp("^\\s*;\\s*$"),jn=new RegExp(";{2,}\\s*$"),Dn=/([\w)])\{/g,Fn=/\{(return|if|for|while|switch|const|let|var|function)\b/g,Wn=/,(\S)/g,Un=/(?<![=!<>+\-*/%&|^?])=(?![=><])/g,Gn=/(\w)\+(\w)/g,Kn=/(\w)-(\w)/g,Bn=/(\w)\*(\w)/g,zn=/(\w)\/(\w)/g,Hn=new RegExp("(?<=\\S);([^\\s;])","g"),Jn=/([\w)\]])<(\d)/g,qn=/([\w)\]])>(\d)/g,De=/\s{2,}/g,Fe=/^\s*$/,Yn=/^\s*\/\//,We=/^\s*\/\*/,Xn=/^\s*import\b/,Ue=/\bfrom\s*['"][^'"]+['"]|^\s*import\s+['"][^'"]+['"]/,Qn=/package\.json$/i,Vn=/[jt]sconfig(?:\..+)?\.json$/i,ye=/[ \t]+$/,Zn=/^\n+/;function xe(e){let a=e.lastIndexOf(".");return a>=0?e.slice(a):""}function Se(e){return En.has(xe(e))}function et(e){return Sn.has(xe(e))}function nt(e){return Rn.has(xe(e))}function tt(e){return In.has(xe(e))}function rt(e){return _n.has(xe(e))}function st(e,a){return rt(e)||On.test(a)}function ot(e,a){let n=e.split(`
7
+ `),s=n.length,k=Array(s),R=a.format.indent,v=a.format.indentStyle==="tabs",A=0,W=new b,K=!1,F="",B=!1,U=0;for(let P=0;P<s;P++){let V=n[P];if(V.length===0||/^\s*$/.test(V)){k[P]="";continue}if(K){if(k[P]=V,V.trim()===F)K=!1,F="";continue}let oe=i(V);if(oe)K=!0,F=oe;let le=0;while(le<V.length&&(V.charCodeAt(le)===32||V.charCodeAt(le)===9))le++;let H=V.slice(le).trimEnd();if(H.startsWith("#")&&P>0){let D=v?"\t".repeat(A):" ".repeat(A*R);k[P]=D+H;continue}let fe=W.read(H);if(/^case\b/.test(H)&&/\bin\s*$/.test(H))U++,B=!0;if(/^esac\b/.test(H)){if(U=Math.max(0,U-1),U===0)B=!1}let me=B&&/\)\s*$/.test(H)&&!/\$\(/.test(H)&&!/^\s*\(/.test(H)&&!H.startsWith("#"),ce=/^;[;&]\s*$/.test(H),ge=/^(?:fi|done|esac|elif|else)\b/.test(H)||/^\}/.test(H);if(!fe.continuation&&ge)A=Math.max(0,A-1);if(!fe.continuation&&ce)A=Math.max(0,A-1);let he=A+Number(fe.continuation),de=v?"\t".repeat(he):" ".repeat(he*R);if(k[P]=de+H,fe.continuation){if(fe.closesHeader)A++;continue}if(/^then\b/.test(H)||/^do\b/.test(H)||/^else\b/.test(H))A++;else if(/^if\b/.test(H)&&/\bthen\s*$/.test(H))A++;else if(/^elif\b/.test(H)&&/\bthen\s*$/.test(H))A++;else if(/^(?:while|for|until)\b/.test(H)&&/\bdo\s*$/.test(H))A++;else if(/^case\b/.test(H)&&/\bin\s*$/.test(H))A++;else if(me)A++;else if(/\{\s*$/.test(H)&&!H.startsWith("#"))A++}return k.join(`
8
8
  `)}var it=/(?:^|\s)#/;function lt(e,a){if(it.test(e))return e;try{let n=Bun.YAML.parse(e),s=a.format.indentStyle==="tabs"?"\t":a.format.indent;return Bun.YAML.stringify(n,null,s).split(`
9
9
  `).map((R)=>R.replace(/[ \t]+$/,"")).join(`
10
10
  `)}catch{return e}}var Ge=Array.from({length:129},(e,a)=>" ".repeat(a));function at(e){if(e<=0)return"";return e<Ge.length?Ge[e]:" ".repeat(e)}function ct(e,a){if((a.format.indentStyle||"spaces")==="tabs")return"\t".repeat(Math.max(0,e));return at(Math.max(0,e*a.format.indent))}function ft(e){return`'${e.slice(1,-1).replace(/\\"/g,'"')}'`}function ut(e){return`"${e.slice(1,-1).replace(/\\'/g,"'")}"`}function dt(e,a){for(let n=0;n<e.length;n++){if(e[n]==="\\"){n++;continue}if(e[n]===a)return!0}return!1}function pt(e,a,n){if(!Se(n))return e;let s=e.split(`
11
11
  `);for(let k=0;k<s.length;k++)s[k]=Xe(s[k],a);return s.join(`
12
- `)}function Xe(e,a){let n=a==="single";if(n?!e.includes('"'):!e.includes("'"))return e;let s=[],k=0,R=0,v=0,A=0;while(k<e.length){let U=e[k];if(v===0){if(U==="/"){let K=e[k+1];if(K==="/")break;if(K==="*"){let P=e.indexOf("*/",k+2);k=P===-1?e.length:P+2;continue}if(Ne(e,k)){let P=Pe(e,k);if(P!==-1){k=P;continue}}k++;continue}if(U==='"'){v=2,A=k,k++;continue}if(U==="'"){v=1,A=k,k++;continue}if(U==="`"){v=3,k++;continue}k++}else if(v===3){if(U==="\\"){k+=2;continue}if(U==="`")v=0;k++}else{if(U==="\\"){k+=2;continue}if(U===(v===1?"'":'"')){let P=e.slice(A+1,k);if((v===2&&n||v===1&&!n)&&!dt(P,n?"'":'"')){if(A>R)s.push(e.slice(R,A));if(v===2)s.push(ft(`"${P}"`));else s.push(ut(`'${P}'`));R=k+1}v=0,k++;continue}k++}}if(s.length===0)return e;if(R<e.length)s.push(e.slice(R));return s.join("")}function mt(e){return e===123||e===44||e===61||e===43||e===45||e===42||e===47||e===59||e===60||e===62}var gt=/\s/;function ht(e,a){let n=!1;for(let s=a;s<e.length;s++){let k=e.charCodeAt(s),R=k===32||k>=9&&k<=13||k>=128&&gt.test(e[s]);if(R&&n)return!0;n=R}return!1}var Qe=1,Ve=2,Ze=4,en=8,nn=16,tn=32;function Ae(e){return e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57||e===95}function yt(e){let a=0;for(let n=1;n<e.length-1;n++){let s=e.charCodeAt(n);if(s===43||s===45||s===42||s===47){if(Ae(e.charCodeAt(n-1))&&Ae(e.charCodeAt(n+1)))a|=s===43?Qe:s===45?Ve:s===42?Ze:en}else if(s===60||s===62){let k=e.charCodeAt(n+1),R=e.charCodeAt(n-1);if(k>=48&&k<=57&&(Ae(R)||R===41||R===93))a|=s===60?nn:tn}}return a}function wt(e,a){if(a+e.length<4)return e;let n=0;while(n<e.length&&(e[n]===" "||e[n]==="\t"))n++;if(n<e.length){let U=e[n];if(U==="/"&&(e[n+1]==="/"||e[n+1]==="*"))return e;if(U==="*")return e}let s=!1;for(let U=n;U<e.length;U++)if(mt(e.charCodeAt(U))){s=!0;break}if(!s)return e;let{text:k,strings:R}=Et(e),v=k;if(v.includes("{"))v=v.replace(Fn,"$1 {"),v=v.replace(Dn,"{ $1");if(v.includes(","))v=v.replace(Wn,", $1");if(v.includes("="))v=v.replace(Un," = ");let A=yt(v);if(A&Qe)v=v.replace(Gn,"$1 + $2");if(A&Ve)v=v.replace(Kn,"$1 - $2");if(A&Ze)v=v.replace(Bn,"$1 * $2");if(A&en)v=v.replace(zn,"$1 / $2");if(v.includes(";"))v=v.replace(Hn,"; $1");if(A&nn)v=v.replace(Jn,"$1 < $2");if(A&tn)v=v.replace(qn,"$1 > $2");if(ht(v,n))if(n>0){let U=v.slice(n);v=v.slice(0,n)+U.replace(Fe," ")}else v=v.replace(Fe," ");return R.length>0?St(v,R):v}function Re(e){let a=e[e.length-1];return a!==void 0&&a.t==="tmpl"}function rn(e,a,n){a++;while(a<e.length){let s=e[a];if(s==="\\"){a+=2;continue}if(s===n)return a+1;a++}return a}function Te(e,a){for(let s of a)if(s.t==="tmpl")s.start=-1;let n=0;while(n<e.length){let s=a[a.length-1],k=e[n];if(s===void 0||s.t==="interp"){if(k==="`"){a.push({t:"tmpl",start:n}),n++;continue}if(k==="'"||k==='"'){n=rn(e,n,k);continue}if(k==="/"){if(e[n+1]==="/")break;if(e[n+1]==="*"){let R=e.indexOf("*/",n+2);if(R===-1)break;n=R+2;continue}if(Ne(e,n)){let R=Pe(e,n);if(R!==-1){n=R;continue}}n++;continue}if(s!==void 0){if(k==="{"){s.braces++,n++;continue}if(k==="}"){if(s.braces===0)a.pop();else s.braces--;n++;continue}}n++}else{if(k==="\\"){n+=2;continue}if(k==="`"){a.pop(),n++;continue}if(k==="$"&&e[n+1]==="{"){a.push({t:"interp",braces:0}),n+=2;continue}n++}}if(Re(a)){for(let s of a)if(s.t==="tmpl"&&s.start>=0)return s.start}return-1}function Ke(e,a){let n=a,s=null,k=0;while(k<e.length){let R=e[k];if(n){if(R==="*"&&e[k+1]==="/"){n=!1,k+=2;continue}k++;continue}if(s){if(R==="\\"){k+=2;continue}if(R===s)s=null;k++;continue}if(R==="'"||R==='"'||R==="`"){s=R,k++;continue}if(R==="/"){if(e[k+1]==="/")break;if(e[k+1]==="*"){n=!0,k+=2;continue}}k++}return n}function Be(e,a){let n=e.length,s=Array(n),k=a.format.quotes,R=a.format.semi===!0,v=0,A=0,U=!1,K=[],P=0,H=[];for(let W=0;W<n;W++){let j=e[W];if(U){U=Ke(j,!0),s[W]=j;continue}let B=Re(H),ae=-1;if(H.length>0||j.indexOf("`")!==-1)ae=Te(j,H);if(B){s[W]=j;continue}if(ae<0&&H.length===0)U=j.includes("/*")&&Ke(j,!1);let ue="",V=!1,ce="";if(ae>=0){ue=j.slice(ae);let te=j.slice(0,ae);if(te.length===0){s[W]=ue;continue}if(V=ye.test(te),te.trim().length===0)ce=te;j=te}if(j.length===0){s[W]="";continue}j=Xe(j,k);let me=0;while(me<j.length&&(j.charCodeAt(me)===32||j.charCodeAt(me)===9))me++;let le=j.slice(me).trimEnd(),ge=0;if(vn.test(le))v=Math.max(0,v-1),ge=K.pop()??0;let he=Pn.test(le)?1:0,de=a.format.preserveCodeIndentation?j.slice(0,me):ct(v+P+A+he,a);P-=ge;let D=le.charCodeAt(le.length-1);if(D===123||D===91||D===40){v+=1;let te=he===1&&le.charCodeAt(0)===46?1:0;K.push(te),P+=te,A=0}else if(!le.startsWith("//")&&!le.startsWith("*")&&!le.startsWith("/*"))if(!Nn.test(le))A=0;else{let te=c(le),fe=te.includes("//")?te.replace(An,""):te;A=$n(fe)?A+1:0}let F=wt(le,de.length),oe=!1;if(R){if(!Mn.test(F))if(Ln.test(F))oe=!0;else F=F.replace(jn,";")}if(oe)j="";else if(a.format.trimTrailingWhitespace)F=F.trimEnd(),j=F.length===0?"":de+F;else j=de+F;if(ae>=0){if(ce)j=ce;else if(V&&!ye.test(j))j+=" ";j+=ue}s[W]=j}return s}var ze=/^[ \t]*(`{3,}|~{3,})(.*)$/,bt=/^ {0,3}#{1,6}(?:[ \t]|$)/;function kt(e,a){let n=a.format.trimTrailingWhitespace,s=Math.max(0,a.format.maxConsecutiveBlankLines),k=[],R=0,v="",A=0;for(let U=0;U<e.length;U++){let K=e[U];if(v!==""){let B=K.indexOf(v)!==-1?ze.exec(K):null;if(B&&B[1][0]===v&&B[1].length>=A&&B[2].trim()==="")v="",k.push(n?K.replace(ye,""):K);else k.push(K);continue}if(K.length===0||K.trim()===""){if(R++,R<=s)k.push("");continue}if(R=0,K.indexOf("```")!==-1||K.indexOf("~~~")!==-1){let B=ze.exec(K);if(B&&!(B[1][0]==="`"&&B[2].includes("`"))){v=B[1][0],A=B[1].length,k.push(n?K.replace(ye,""):K);continue}}let P=K.charCodeAt(K.length-1);if(!n||P!==32&&P!==9){k.push(K);continue}let H=K.replace(ye,""),W=e[U+1],j=K.endsWith(" ")&&W!==void 0&&W.trim()!==""&&!bt.test(K);k.push(j?`${H} `:H)}return k}function Ct(e,a){let n=[],s=0,k=[];for(let R of e){let v=Re(k);if(k.length>0||R.indexOf("`")!==-1)Te(R,k);if(v){n.push(R),s=0;continue}if(R===""){if(s++,s<=a)n.push("")}else s=0,n.push(R)}return n}function p(e,a,n){if(e.length===0)return"";let k=(e.includes("\r")?e.replace(/\r\n/g,`
12
+ `)}function Xe(e,a){let n=a==="single";if(n?!e.includes('"'):!e.includes("'"))return e;let s=[],k=0,R=0,v=0,A=0;while(k<e.length){let W=e[k];if(v===0){if(W==="/"){let K=e[k+1];if(K==="/")break;if(K==="*"){let F=e.indexOf("*/",k+2);k=F===-1?e.length:F+2;continue}if(Pe(e,k)){let F=$e(e,k);if(F!==-1){k=F;continue}}k++;continue}if(W==='"'){v=2,A=k,k++;continue}if(W==="'"){v=1,A=k,k++;continue}if(W==="`"){v=3,k++;continue}k++}else if(v===3){if(W==="\\"){k+=2;continue}if(W==="`")v=0;k++}else{if(W==="\\"){k+=2;continue}if(W===(v===1?"'":'"')){let F=e.slice(A+1,k);if((v===2&&n||v===1&&!n)&&!dt(F,n?"'":'"')){if(A>R)s.push(e.slice(R,A));if(v===2)s.push(ft(`"${F}"`));else s.push(ut(`'${F}'`));R=k+1}v=0,k++;continue}k++}}if(s.length===0)return e;if(R<e.length)s.push(e.slice(R));return s.join("")}function mt(e){return e===123||e===44||e===61||e===43||e===45||e===42||e===47||e===59||e===60||e===62}var gt=/\s/;function ht(e,a){let n=!1;for(let s=a;s<e.length;s++){let k=e.charCodeAt(s),R=k===32||k>=9&&k<=13||k>=128&&gt.test(e[s]);if(R&&n)return!0;n=R}return!1}var Qe=1,Ve=2,Ze=4,en=8,nn=16,tn=32;function Te(e){return e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57||e===95}function yt(e){let a=0;for(let n=1;n<e.length-1;n++){let s=e.charCodeAt(n);if(s===43||s===45||s===42||s===47){if(Te(e.charCodeAt(n-1))&&Te(e.charCodeAt(n+1)))a|=s===43?Qe:s===45?Ve:s===42?Ze:en}else if(s===60||s===62){let k=e.charCodeAt(n+1),R=e.charCodeAt(n-1);if(k>=48&&k<=57&&(Te(R)||R===41||R===93))a|=s===60?nn:tn}}return a}function wt(e,a){if(a+e.length<4)return e;let n=0;while(n<e.length&&(e[n]===" "||e[n]==="\t"))n++;if(n<e.length){let W=e[n];if(W==="/"&&(e[n+1]==="/"||e[n+1]==="*"))return e;if(W==="*")return e}let s=!1;for(let W=n;W<e.length;W++)if(mt(e.charCodeAt(W))){s=!0;break}if(!s)return e;let{text:k,strings:R}=Et(e),v=k;if(v.includes("{"))v=v.replace(Dn,"$1 {"),v=v.replace(Fn,"{ $1");if(v.includes(","))v=v.replace(Wn,", $1");if(v.includes("="))v=v.replace(Un," = ");let A=yt(v);if(A&Qe)v=v.replace(Gn,"$1 + $2");if(A&Ve)v=v.replace(Kn,"$1 - $2");if(A&Ze)v=v.replace(Bn,"$1 * $2");if(A&en)v=v.replace(zn,"$1 / $2");if(v.includes(";"))v=v.replace(Hn,"; $1");if(A&nn)v=v.replace(Jn,"$1 < $2");if(A&tn)v=v.replace(qn,"$1 > $2");if(ht(v,n))if(n>0){let W=v.slice(n);v=v.slice(0,n)+W.replace(De," ")}else v=v.replace(De," ");return R.length>0?St(v,R):v}function Re(e){let a=e[e.length-1];return a!==void 0&&a.t==="tmpl"}function rn(e,a,n){a++;while(a<e.length){let s=e[a];if(s==="\\"){a+=2;continue}if(s===n)return a+1;a++}return a}function Ne(e,a){for(let s of a)if(s.t==="tmpl")s.start=-1;let n=0;while(n<e.length){let s=a[a.length-1],k=e[n];if(s===void 0||s.t==="interp"){if(k==="`"){a.push({t:"tmpl",start:n}),n++;continue}if(k==="'"||k==='"'){n=rn(e,n,k);continue}if(k==="/"){if(e[n+1]==="/")break;if(e[n+1]==="*"){let R=e.indexOf("*/",n+2);if(R===-1)break;n=R+2;continue}if(Pe(e,n)){let R=$e(e,n);if(R!==-1){n=R;continue}}n++;continue}if(s!==void 0){if(k==="{"){s.braces++,n++;continue}if(k==="}"){if(s.braces===0)a.pop();else s.braces--;n++;continue}}n++}else{if(k==="\\"){n+=2;continue}if(k==="`"){a.pop(),n++;continue}if(k==="$"&&e[n+1]==="{"){a.push({t:"interp",braces:0}),n+=2;continue}n++}}if(Re(a)){for(let s of a)if(s.t==="tmpl"&&s.start>=0)return s.start}return-1}function Ke(e,a){let n=a,s=null,k=0;while(k<e.length){let R=e[k];if(n){if(R==="*"&&e[k+1]==="/"){n=!1,k+=2;continue}k++;continue}if(s){if(R==="\\"){k+=2;continue}if(R===s)s=null;k++;continue}if(R==="'"||R==='"'||R==="`"){s=R,k++;continue}if(R==="/"){if(e[k+1]==="/")break;if(e[k+1]==="*"){n=!0,k+=2;continue}}k++}return n}function Be(e,a){let n=e.length,s=Array(n),k=a.format.quotes,R=a.format.semi===!0,v=0,A=0,W=!1,K=[],F=0,B=[];for(let U=0;U<n;U++){let P=e[U];if(W){W=Ke(P,!0),s[U]=P;continue}let V=Re(B),oe=-1;if(B.length>0||P.indexOf("`")!==-1)oe=Ne(P,B);if(V){s[U]=P;continue}if(oe<0&&B.length===0)W=P.includes("/*")&&Ke(P,!1);let le="",H=!1,fe="";if(oe>=0){le=P.slice(oe);let te=P.slice(0,oe);if(te.length===0){s[U]=le;continue}if(H=ye.test(te),te.trim().length===0)fe=te;P=te}if(P.length===0){s[U]="";continue}P=Xe(P,k);let me=0;while(me<P.length&&(P.charCodeAt(me)===32||P.charCodeAt(me)===9))me++;let ce=P.slice(me).trimEnd(),ge=0;if(vn.test(ce))v=Math.max(0,v-1),ge=K.pop()??0;let he=Pn.test(ce)?1:0,de=a.format.preserveCodeIndentation?P.slice(0,me):ct(v+F+A+he,a);F-=ge;let D=ce.charCodeAt(ce.length-1);if(D===123||D===91||D===40){v+=1;let te=he===1&&ce.charCodeAt(0)===46?1:0;K.push(te),F+=te,A=0}else if(!ce.startsWith("//")&&!ce.startsWith("*")&&!ce.startsWith("/*"))if(!Nn.test(ce))A=0;else{let te=c(ce),ue=te.includes("//")?te.replace(An,""):te;A=$n(ue)?A+1:0}let j=wt(ce,de.length),ae=!1;if(R){if(!Mn.test(j))if(Ln.test(j))ae=!0;else j=j.replace(jn,";")}if(ae)P="";else if(a.format.trimTrailingWhitespace)j=j.trimEnd(),P=j.length===0?"":de+j;else P=de+j;if(oe>=0){if(fe)P=fe;else if(H&&!ye.test(P))P+=" ";P+=le}s[U]=P}return s}var ze=/^[ \t]*(`{3,}|~{3,})(.*)$/,bt=/^ {0,3}#{1,6}(?:[ \t]|$)/;function kt(e,a){let n=a.format.trimTrailingWhitespace,s=Math.max(0,a.format.maxConsecutiveBlankLines),k=[],R=0,v="",A=0;for(let W=0;W<e.length;W++){let K=e[W];if(v!==""){let V=K.indexOf(v)!==-1?ze.exec(K):null;if(V&&V[1][0]===v&&V[1].length>=A&&V[2].trim()==="")v="",k.push(n?K.replace(ye,""):K);else k.push(K);continue}if(K.length===0||K.trim()===""){if(R++,R<=s)k.push("");continue}if(R=0,K.indexOf("```")!==-1||K.indexOf("~~~")!==-1){let V=ze.exec(K);if(V&&!(V[1][0]==="`"&&V[2].includes("`"))){v=V[1][0],A=V[1].length,k.push(n?K.replace(ye,""):K);continue}}let F=K.charCodeAt(K.length-1);if(!n||F!==32&&F!==9){k.push(K);continue}let B=K.replace(ye,""),U=e[W+1],P=K.endsWith(" ")&&U!==void 0&&U.trim()!==""&&!bt.test(K);k.push(P?`${B} `:B)}return k}function Ct(e,a){let n=[],s=0,k=[];for(let R of e){let v=Re(k);if(k.length>0||R.indexOf("`")!==-1)Ne(R,k);if(v){n.push(R),s=0;continue}if(R===""){if(s++,s<=a)n.push("")}else s=0,n.push(R)}return n}function p(e,a,n){if(e.length===0)return"";let k=(e.includes("\r")?e.replace(/\r\n/g,`
13
13
  `):e).split(`
14
- `),R;if(tt(n))R=kt(k,a);else if(a.format.trimTrailingWhitespace){R=[];let A=0,U=Math.max(0,a.format.maxConsecutiveBlankLines),K=[];for(let P of k){let H=Re(K),W=!1;if(K.length>0||P.indexOf("`")!==-1)W=Te(P,K)>=0;if(H||W){R.push(P),A=0;continue}let j=P[P.length-1],B=j===" "||j==="\t"?P.replace(ye,""):P;if(B===""){if(A++,A<=U)R.push("")}else A=0,R.push(B)}}else R=Ct(k,Math.max(0,a.format.maxConsecutiveBlankLines));let v;if(Se(n)&&!(R.length>0&&R[0].startsWith("#!"))){let A=0;while(A<R.length&&R[A]==="")A++;if(A>0)R=R.slice(A);return R=on(R)??R,v=Be(R,a).join(`
14
+ `),R;if(tt(n))R=kt(k,a);else if(a.format.trimTrailingWhitespace){R=[];let A=0,W=Math.max(0,a.format.maxConsecutiveBlankLines),K=[];for(let F of k){let B=Re(K),U=!1;if(K.length>0||F.indexOf("`")!==-1)U=Ne(F,K)>=0;if(B||U){R.push(F),A=0;continue}let P=F[F.length-1],V=P===" "||P==="\t"?F.replace(ye,""):F;if(V===""){if(A++,A<=W)R.push("")}else A=0,R.push(V)}}else R=Ct(k,Math.max(0,a.format.maxConsecutiveBlankLines));let v;if(Se(n)&&!(R.length>0&&R[0].startsWith("#!"))){let A=0;while(A<R.length&&R[A]==="")A++;if(A>0)R=R.slice(A);return R=on(R)??R,v=Be(R,a).join(`
15
15
  `),He(v,a)}if(v=R.join(`
16
16
  `),v=v.replace(Zn,""),Se(n))v=C(v);if(nt(n)){let A=lt(v,a);if(A!==v)v=A}if(et(n)){let A=Ot(v,n);if(A!=null)v=A}if(st(n,v))v=ot(v,a);else if(Se(n))v=Be(v.split(`
17
17
  `),a).join(`
18
18
  `);else v=pt(v,a.format.quotes,n);return He(v,a)}function He(e,a){let n=e.length;while(n>0&&e.charCodeAt(n-1)===10)n--;if(a.format.finalNewline==="none")return n===e.length?e:e.slice(0,n);let s=a.format.finalNewline==="two"?`
19
19
 
20
20
  `:`
21
- `;if(e.length-n===s.length)return e;return e.slice(0,n)+s}function Je(e,a,n,s){for(let k=a+1;k<e.length;k++){let R=e[k];if(R==="\\"){k++;continue}if(R===n)return!0;if(R===s)return!1}return!0}function O(e,a){if(/^\s*\/\/\/\s*<reference/.test(e))return[];let n=[],s=null,k=!1;for(let R=0;R<e.length;R++){let v=e[R];if(k){k=!1;continue}if(v==="\\"){k=!0;continue}if(!s){if(v==="/"&&e[R+1]==="/")break;if(v==="'"){if(a==="double"&&Je(e,R,"'",'"'))n.push(R);s="single";continue}else if(v==='"'){if(a==="single"&&Je(e,R,'"',"'"))n.push(R);s="double";continue}else if(v==="`"){s="template";continue}}else if(s==="single"&&v==="'"||s==="double"&&v==='"'||s==="template"&&v==="`"){s=null;continue}}return n}function M(e,a,n="spaces",s){if(n==="tabs")return/[^\t]/.test(e);if(/\t/.test(e))return!0;let k=e.length;if(s&&k%a===1){let R=s.trimStart();if(R.startsWith("* ")||R.startsWith("*/")||R==="*")return!1}return k%a!==0}function sn(e,a){let n=a+1;while(n<e.length){let s=e[n];if(s==="\\"){n+=2;continue}if(s==="`")return n+1;if(s==="$"&&e[n+1]==="{"){n+=2;let k=1;while(n<e.length&&k>0){let R=e[n];if(R==="\\"){n+=2;continue}if(R==="`"){n=sn(e,n);continue}if(R==="'"||R==='"'){n=rn(e,n,R);continue}if(R==="{")k++;else if(R==="}")k--;n++}continue}n++}return n}var xt=new Set(["return","typeof","instanceof","in","of","new","delete","void","do","else","case","yield","await"]);function Ne(e,a){let n=a-1;while(n>=0&&(e[n]===" "||e[n]==="\t"))n--;if(n<0)return!0;let s=e[n];if("(,=:[!&|?;{}<>+-*%^~".includes(s))return!0;if(/[\w$]/.test(s)){let k=n;while(k>=0&&/[\w$]/.test(e[k]))k--;return xt.has(e.slice(k+1,n+1))}return!1}function Pe(e,a){let n=a+1,s=!1,k=-1;while(n<e.length){let R=e[n];if(R==="\\"){n+=2;continue}if(R==="["&&!s)s=!0,k=n;else if(R==="]"&&s){let v=e[k+1]==="^"?k+2:k+1;if(n!==v)s=!1}else if(R==="/"&&!s){n++;while(n<e.length&&/[a-z]/i.test(e[n]))n++;return n}n++}return-1}function Et(e){if(!e.includes("'")&&!e.includes('"')&&!e.includes("`")&&!e.includes("/"))return{text:e,strings:[]};let a=[],n=[],s=0,k=0;while(s<e.length){let R=e[s];if(R==="/"){let v=e[s+1];if(v==="/"){if(s>k)n.push(e.slice(k,s));a.push(e.slice(s)),n.push(`@@S${a.length-1}@@`),k=e.length;break}if(v==="*"){let A=e.indexOf("*/",s+2),U=A===-1?e.length:A+2;if(s>k)n.push(e.slice(k,s));a.push(e.slice(s,U)),n.push(`@@S${a.length-1}@@`),s=U,k=s;continue}if(Ne(e,s)){let A=Pe(e,s);if(A!==-1){if(s>k)n.push(e.slice(k,s));a.push(e.slice(s,A)),n.push(`@@S${a.length-1}@@`),s=A,k=s;continue}}s++;continue}if(R==="'"||R==='"'||R==="`"){if(s>k)n.push(e.slice(k,s));let v=s;if(R==="`")s=sn(e,s);else{let A=R;s++;while(s<e.length){if(e[s]==="\\"){s+=2;continue}if(e[s]===A){s++;break}s++}}a.push(e.slice(v,s)),n.push(`@@S${a.length-1}@@`),k=s;continue}s++}if(k<e.length)n.push(e.slice(k));return{text:n.join(""),strings:a}}function St(e,a){if(a.length===0)return e;let n="",s=0,k=e.indexOf("@@S");while(k!==-1){let R=k+3;while(R<e.length&&e.charCodeAt(R)>=48&&e.charCodeAt(R)<=57)R++;if(R>k+3&&e.charCodeAt(R)===64&&e.charCodeAt(R+1)===64)n+=e.slice(s,k)+(a[Number(e.slice(k+3,R))]??""),s=R+2,k=e.indexOf("@@S",s);else k=e.indexOf("@@S",k+1)}return s===0?e:n+e.slice(s)}function qe(e){return e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57||e===95||e===36}function Rt(e,a){let n=0;while(!0){let s=e.indexOf(a,n);if(s===-1)return!1;if(n=s+1,qe(e.charCodeAt(s+a.length)))continue;let k=s-1,R=!0;while(k>=0){let v=e.charCodeAt(k);if(!qe(v))break;if(v<48||v>57){R=!1;break}k--}if(R)return!0}}function C(e){let a=e[0];if(a!=="i"&&a!==" "&&a!=="\t"&&a!=="/"&&a!==`
21
+ `;if(e.length-n===s.length)return e;return e.slice(0,n)+s}function Je(e,a,n,s){for(let k=a+1;k<e.length;k++){let R=e[k];if(R==="\\"){k++;continue}if(R===n)return!0;if(R===s)return!1}return!0}function O(e,a){if(/^\s*\/\/\/\s*<reference/.test(e))return[];let n=[],s=null,k=!1;for(let R=0;R<e.length;R++){let v=e[R];if(k){k=!1;continue}if(v==="\\"){k=!0;continue}if(!s){if(v==="/"&&e[R+1]==="/")break;if(v==="'"){if(a==="double"&&Je(e,R,"'",'"'))n.push(R);s="single";continue}else if(v==='"'){if(a==="single"&&Je(e,R,'"',"'"))n.push(R);s="double";continue}else if(v==="`"){s="template";continue}}else if(s==="single"&&v==="'"||s==="double"&&v==='"'||s==="template"&&v==="`"){s=null;continue}}return n}function M(e,a,n="spaces",s){if(n==="tabs")return/[^\t]/.test(e);if(/\t/.test(e))return!0;let k=e.length;if(s&&k%a===1){let R=s.trimStart();if(R.startsWith("* ")||R.startsWith("*/")||R==="*")return!1}return k%a!==0}function sn(e,a){let n=a+1;while(n<e.length){let s=e[n];if(s==="\\"){n+=2;continue}if(s==="`")return n+1;if(s==="$"&&e[n+1]==="{"){n+=2;let k=1;while(n<e.length&&k>0){let R=e[n];if(R==="\\"){n+=2;continue}if(R==="`"){n=sn(e,n);continue}if(R==="'"||R==='"'){n=rn(e,n,R);continue}if(R==="{")k++;else if(R==="}")k--;n++}continue}n++}return n}var xt=new Set(["return","typeof","instanceof","in","of","new","delete","void","do","else","case","yield","await"]);function Pe(e,a){let n=a-1;while(n>=0&&(e[n]===" "||e[n]==="\t"))n--;if(n<0)return!0;let s=e[n];if("(,=:[!&|?;{}<>+-*%^~".includes(s))return!0;if(/[\w$]/.test(s)){let k=n;while(k>=0&&/[\w$]/.test(e[k]))k--;return xt.has(e.slice(k+1,n+1))}return!1}function $e(e,a){let n=a+1,s=!1,k=-1;while(n<e.length){let R=e[n];if(R==="\\"){n+=2;continue}if(R==="["&&!s)s=!0,k=n;else if(R==="]"&&s){let v=e[k+1]==="^"?k+2:k+1;if(n!==v)s=!1}else if(R==="/"&&!s){n++;while(n<e.length&&/[a-z]/i.test(e[n]))n++;return n}n++}return-1}function Et(e){if(!e.includes("'")&&!e.includes('"')&&!e.includes("`")&&!e.includes("/"))return{text:e,strings:[]};let a=[],n=[],s=0,k=0;while(s<e.length){let R=e[s];if(R==="/"){let v=e[s+1];if(v==="/"){if(s>k)n.push(e.slice(k,s));a.push(e.slice(s)),n.push(`@@S${a.length-1}@@`),k=e.length;break}if(v==="*"){let A=e.indexOf("*/",s+2),W=A===-1?e.length:A+2;if(s>k)n.push(e.slice(k,s));a.push(e.slice(s,W)),n.push(`@@S${a.length-1}@@`),s=W,k=s;continue}if(Pe(e,s)){let A=$e(e,s);if(A!==-1){if(s>k)n.push(e.slice(k,s));a.push(e.slice(s,A)),n.push(`@@S${a.length-1}@@`),s=A,k=s;continue}}s++;continue}if(R==="'"||R==='"'||R==="`"){if(s>k)n.push(e.slice(k,s));let v=s;if(R==="`")s=sn(e,s);else{let A=R;s++;while(s<e.length){if(e[s]==="\\"){s+=2;continue}if(e[s]===A){s++;break}s++}}a.push(e.slice(v,s)),n.push(`@@S${a.length-1}@@`),k=s;continue}s++}if(k<e.length)n.push(e.slice(k));return{text:n.join(""),strings:a}}function St(e,a){if(a.length===0)return e;let n="",s=0,k=e.indexOf("@@S");while(k!==-1){let R=k+3;while(R<e.length&&e.charCodeAt(R)>=48&&e.charCodeAt(R)<=57)R++;if(R>k+3&&e.charCodeAt(R)===64&&e.charCodeAt(R+1)===64)n+=e.slice(s,k)+(a[Number(e.slice(k+3,R))]??""),s=R+2,k=e.indexOf("@@S",s);else k=e.indexOf("@@S",k+1)}return s===0?e:n+e.slice(s)}function qe(e){return e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57||e===95||e===36}function Rt(e,a){let n=0;while(!0){let s=e.indexOf(a,n);if(s===-1)return!1;if(n=s+1,qe(e.charCodeAt(s+a.length)))continue;let k=s-1,R=!0;while(k>=0){let v=e.charCodeAt(k);if(!qe(v))break;if(v<48||v>57){R=!1;break}k--}if(R)return!0}}function C(e){let a=e[0];if(a!=="i"&&a!==" "&&a!=="\t"&&a!=="/"&&a!==`
22
22
  `)return e;let n=on(e.split(`
23
23
  `));return n===null?e:n.join(`
24
24
  `)}function on(e){let a=e.length===0?void 0:e[0].length>0?e[0][0]:e.length>1?`
25
25
  `:void 0;if(a!=="i"&&a!==" "&&a!=="\t"&&a!=="/"&&a!==`
26
- `)return null;let n=[],s=[],k=[],R=0,v=0,A=-1,U=!1;while(R<e.length){let D=e[R];if(De.test(D)){R++;continue}if(Yn.test(D)||We.test(D)){let fe=R;if(We.test(D)){while(R<e.length&&!e[R].includes("*/"))R++;R++}else R++;if(!U){for(let pe=fe;pe<R&&pe<e.length;pe++)s.push(e[pe]);v=R}else if(A<0)A=fe;continue}if(!Xn.test(D))break;let F=D.trim(),oe=R+1;while(!Ue.test(F)&&oe<e.length&&oe-R<50)F+=` ${e[oe].trim()}`,oe++;if(!Ue.test(F))return null;let te=It(F);if(!te)return null;if(A>=0){let fe=[];for(let pe=A;pe<R;pe++)if(!De.test(e[pe]))fe.push(e[pe]);if(fe.length>0)te.comments=fe;A=-1}n.push(te),R=oe,v=R,U=!0}if(n.length===0)return null;let K=A>=0?A:v,P=e.slice(K),H=0;while(H<P.length&&P[H]==="")H++;let W=H===0?P:P.slice(H),j=new Map,B=(D)=>{let F=j.get(D);if(F===void 0){F=!1;for(let oe of P)if(Rt(oe,D)){F=!0;break}j.set(D,F)}return F};for(let D of n){if(D.kind!=="value")continue;D.named=D.named.filter((F)=>{if(F.alias)return!0;return B(F.name)})}let ae=n.filter((D)=>{if(D.kind==="side-effect")return!0;if(D.kind==="type")return D.namedTypes.length>0;return Boolean(D.defaultName||D.namespaceName||D.named.length>0)}),ue=new Set(ae),V=[];for(let D of n){let F=V.length>0?[...V,...D.comments??[]]:D.comments;if(!ue.has(D)){V=F??[];continue}if(F&&F.length>0)D.comments=F;V=[]}if(V.length>0)k.push(...V);let ce=new Map,me=(D,F)=>{if(!F.comments)return;D.comments=D.comments?[...D.comments,...F.comments]:[...F.comments]};for(let D of ae){let F=ce.get(D.source)||{};if(D.kind==="side-effect")F.side=F.side||[],F.side.push(D);else if(D.kind==="type"){if(!F.type)F.type={kind:"type",source:D.source,named:[],namedTypes:[],original:""};me(F.type,D),F.type.namedTypes=(F.type.namedTypes||[]).concat(D.namedTypes)}else{if(!F.value)F.value={kind:"value",source:D.source,named:[],namedTypes:[],original:""};if(me(F.value,D),D.defaultName)F.value.defaultName=D.defaultName;if(D.namespaceName)F.value.namespaceName=D.namespaceName;if(F.value.named=(F.value.named||[]).concat(D.named),D.namedTypes.length>0){if(!F.type)F.type={kind:"type",source:D.source,named:[],namedTypes:[],original:""};F.type.namedTypes=F.type.namedTypes.concat(D.namedTypes)}}ce.set(D.source,F)}let le=[];for(let[D,F]of ce){if(F.side)le.push(...F.side);if(F.value)F.value.named.sort((oe,te)=>oe.name.localeCompare(te.name)),le.push(F.value);if(F.type&&F.type.namedTypes.length>0){let oe=new Set;F.type.namedTypes=F.type.namedTypes.filter((te)=>{let fe=`${te.name}|${te.alias||""}`;if(oe.has(fe))return!1;return oe.add(fe),!0}),F.type.namedTypes.sort((te,fe)=>te.name.localeCompare(fe.name)),le.push(F.type)}}let ge=(D)=>D.startsWith(".")?2:D.startsWith("node:")?0:1,he=(D)=>{if(D.kind!=="value")return 99;if(D.defaultName)return 0;if(D.namespaceName)return 1;return 2};if(le.sort((D,F)=>{if(D.kind!==F.kind){if(D.kind==="type")return-1;if(F.kind==="type")return 1;if(D.kind==="side-effect")return-1;if(F.kind==="side-effect")return 1}if(D.kind==="type"&&F.kind==="type"){let oe=ge(D.source),te=ge(F.source);if(oe!==te)return oe-te;return D.source.localeCompare(F.source)}if(D.kind==="value"&&F.kind==="value"){let oe=ge(D.source),te=ge(F.source);if(oe!==te)return oe-te;let fe=he(D),pe=he(F);if(fe!==pe)return fe-pe;return D.source.localeCompare(F.source)}return D.source.localeCompare(F.source)}),le.length===0){if(s.length>0||k.length>0)return[...s,...k,...W.length>0?W:[""]];return W}let de=[...s];for(let D of le){if(D.comments)de.push(...D.comments);let F=_t(D);if(F.includes(`
27
- `))de.push(...F.split(`
28
- `));else de.push(F)}if(k.length>0)de.push(""),de.push(...k);return de.push(""),de.push(...W),de}function _t(e){if(e.kind==="side-effect")return`import '${e.source}'`;if(e.kind==="type")return`import type { ${e.namedTypes.map((k)=>k.alias?`${k.name} as ${k.alias}`:k.name).join(", ")} } from '${e.source}'`;let a=[];if(e.defaultName)a.push(e.defaultName);if(e.namespaceName)a.push(`* as ${e.namespaceName}`);if(e.named.length>0){let s=e.named.map((k)=>k.alias?`${k.name} as ${k.alias}`:k.name).join(", ");a.push(`{ ${s} }`)}return`import ${a.join(", ")} from '${e.source}'`}function It(e){let a=e.match(/^\s*import\s+['"]([^'"]+)['"]/);if(a)return{kind:"side-effect",source:a[1],named:[],namedTypes:[],original:e};if(a=e.match(/^\s*import\s+type\s+\{([^}]*)\}\s+from\s+['"]([^'"]+)['"]/),a){let W=a[1],j=a[2],B=W.split(",").map((ae)=>ae.trim()).filter(Boolean).map((ae)=>{let ue=ae.match(/^(\w+)(?:\s+as\s+(\w+))?$/);return{name:ue?.[1]||ae,alias:ue?.[2]}});return{kind:"type",source:j,named:[],namedTypes:B,original:e}}let n=e.match(/^\s*import\s+/),s=new RegExp(`\\sfrom\\s+['"]([^'"]+)['"]\\s*;?$`),k=e.match(s);if(!n||!k)return;let R=k[1],v=e.slice(n[0].length,k.index).trim(),A,U,K=[],P=[],H=v.match(/\{([^}]*)\}/);if(H){let j=H[1].split(",").map((B)=>B.trim()).filter(Boolean);for(let B of j){let ae=/^type\s+/.test(B),V=B.replace(/^type\s+/,"").match(/^(\w+)(?:\s+as\s+(\w+))?$/);if(!V)continue;let ce={name:V[1],alias:V[2]};if(ae)P.push(ce);else K.push(ce)}v=v.replace(/\{[\s\S]*?\}/,"").trim()}if(v.length>0){let W=v.split(",").map((j)=>j.trim()).filter(Boolean);for(let j of W)if(j.startsWith("* as "))U=j.slice(5).trim();else if(/^\w+$/.test(j))A=j}return{kind:"value",source:R,defaultName:A,namespaceName:U,named:K,namedTypes:P,original:e}}function Ot(e,a){if(Qn.test(a))return vt(e);if(Vn.test(a))return At(e);return null}function ln(e){try{return JSON.parse(e)}catch{return null}}function Ce(e,a,n=[]){let s={};for(let R of a)if(Object.prototype.hasOwnProperty.call(e,R))s[R]=e[R];for(let R of n){let v=Object.keys(e).filter((A)=>R.test(A)&&!(A in s)).sort();for(let A of v)s[A]=e[A]}let k=Object.keys(e).filter((R)=>!(R in s)).sort();for(let R of k)s[R]=e[R];return s}function Ye(e){let a={};for(let n of Object.keys(e).sort())a[n]=e[n];return a}function vt(e){let a=ln(e);if(!a||typeof a!=="object")return e;let s=Ce(a,["publisher","name","displayName","type","version","private","packageManager","description","author","contributors","license","funding","homepage","repository","bugs","keywords","categories","sideEffects","imports","exports","main","module","unpkg","jsdelivr","types","typesVersions","bin","icon","files","engines","activationEvents","contributes","scripts","peerDependencies","peerDependenciesMeta","dependencies","optionalDependencies","devDependencies","pnpm","overrides","resolutions","husky","simple-git-hooks","lint-staged","eslintConfig"]);if(Array.isArray(s.files)){if(s.files.every((v)=>typeof v==="string"))s.files=[...s.files].sort()}for(let R of Object.keys(s))if(/^(?:dev|peer|optional|bundled)?[Dd]ependencies(?:Meta)?$/.test(R)||/^(?:resolutions|overrides|pnpm\.overrides)$/.test(R)){if(s[R]&&typeof s[R]==="object")s[R]=Ye(s[R])}if(s.pnpm&&typeof s.pnpm==="object"&&s.pnpm.overrides&&typeof s.pnpm.overrides==="object")s.pnpm.overrides=Ye(s.pnpm.overrides);if(s.exports&&typeof s.exports==="object"){let R=s.exports,v=["types","import","require","default"];if(!Array.isArray(R)){let A={};for(let U of Object.keys(R)){let K=R[U];if(K&&typeof K==="object"&&!Array.isArray(K))A[U]=Ce(K,v);else A[U]=K}s.exports=A}}let k=["pre-commit","prepare-commit-msg","commit-msg","post-commit","pre-rebase","post-rewrite","post-checkout","post-merge","pre-push","pre-auto-gc"];for(let R of["gitHooks","husky","simple-git-hooks"])if(s[R]&&typeof s[R]==="object")s[R]=Ce(s[R],k);return JSON.stringify(s,null,2)}function At(e){let a=ln(e);if(!a||typeof a!=="object")return e;let s=Ce(a,["extends","compilerOptions","references","files","include","exclude"]);if(s.compilerOptions&&typeof s.compilerOptions==="object"){let k=["incremental","composite","tsBuildInfoFile","disableSourceOfProjectReferenceRedirect","disableSolutionSearching","disableReferencedProjectLoad","target","jsx","jsxFactory","jsxFragmentFactory","jsxImportSource","lib","moduleDetection","noLib","reactNamespace","useDefineForClassFields","emitDecoratorMetadata","experimentalDecorators","libReplacement","baseUrl","rootDir","rootDirs","customConditions","module","moduleResolution","moduleSuffixes","noResolve","paths","resolveJsonModule","resolvePackageJsonExports","resolvePackageJsonImports","typeRoots","types","allowArbitraryExtensions","allowImportingTsExtensions","allowUmdGlobalAccess","allowJs","checkJs","maxNodeModuleJsDepth","strict","strictBindCallApply","strictFunctionTypes","strictNullChecks","strictPropertyInitialization","allowUnreachableCode","allowUnusedLabels","alwaysStrict","exactOptionalPropertyTypes","noFallthroughCasesInSwitch","noImplicitAny","noImplicitOverride","noImplicitReturns","noImplicitThis","noPropertyAccessFromIndexSignature","noUncheckedIndexedAccess","noUnusedLocals","noUnusedParameters","useUnknownInCatchVariables","declaration","declarationDir","declarationMap","downlevelIteration","emitBOM","emitDeclarationOnly","importHelpers","importsNotUsedAsValues","inlineSourceMap","inlineSources","mapRoot","newLine","noEmit","noEmitHelpers","noEmitOnError","outDir","outFile","preserveConstEnums","preserveValueImports","removeComments","sourceMap","sourceRoot","stripInternal","allowSyntheticDefaultImports","esModuleInterop","forceConsistentCasingInFileNames","isolatedDeclarations","isolatedModules","preserveSymlinks","verbatimModuleSyntax","erasableSyntaxOnly","skipDefaultLibCheck","skipLibCheck"];s.compilerOptions=Ce(s.compilerOptions,k)}return JSON.stringify(s,null,2)}import{readdirSync as Tt,readFileSync as Nt,statSync as Me}from"fs";import{extname as Pt,isAbsolute as _e,join as Ie,resolve as $t}from"path";var L=5;function Mt(e){let a="",n=0;while(n<e.length){let s=e[n];if(s==="*")if(e[n+1]==="*"){if(a+=".*",n+=2,e[n]==="/")n++}else a+="[^/]*",n++;else if(s==="?")a+="[^/]",n++;else if(s==="["){let k=e.indexOf("]",n);if(k===-1)a+="\\[",n++;else a+=e.slice(n,k+1),n=k+1}else if(".+^${}()|\\".includes(s))a+=`\\${s}`,n++;else a+=s,n++}return new RegExp(`^${a}$`)}function*cn(e,a,n){let s;try{s=Tt(e)}catch{return}for(let k of s){if(!n&&k.startsWith("."))continue;let R=Ie(e,k);if(a(R))continue;let v;try{v=Me(R)}catch{continue}if(v.isDirectory())yield*cn(R,a,n);else yield R}}function*an(e,a,n,s){yield*cn(e,d(a,s),n)}async function f(e,a={}){let n=a.cwd??process.cwd(),s=a.ignore??[],k=a.dot??!1,R=a.absolute??!0,v=d(s,n);if(typeof globalThis.Bun?.Glob<"u"){let U=globalThis.Bun.Glob,K=[];for(let P of e){if(!/[*?[{]/.test(P)){let W=_e(P)?P:Ie(n,P);if(Me(W,{throwIfNoEntry:!1})?.isFile()){if(!v(W))K.push(R?W:W.startsWith(`${n}/`)?W.slice(n.length+1):W);continue}}let H=new U(P);for await(let W of H.scan({cwd:n,dot:k,onlyFiles:a.onlyFiles??!0,followSymlinks:!1})){let j=_e(W)?W:Ie(n,W),B=j.startsWith(`${n}/`)?j.slice(n.length+1):j;if(v(j))continue;K.push(R?j:B)}}return K}let A=[];for(let U of e){if(!/[*?[{]/.test(U)){let P=_e(U)?U:Ie(n,U);try{if(!Me(P).isDirectory()){let W=P.startsWith(`${n}/`)?P.slice(n.length+1):P;if(!v(P))A.push(R?P:W)}else for(let W of an(P,s,k,n))A.push(R?W:W.startsWith(`${n}/`)?W.slice(n.length+1):W)}catch{}continue}let K=Mt(U);for(let P of an(n,s,k,n)){let H=P.startsWith(`${n}/`)?P.slice(n.length+1):P;if(K.test(H)||K.test(H.replace(/\\/g,"/")))A.push(R?P:H)}}return A}function se(e){let a=0,n=[],s=()=>{if(n.length>0&&a<e)a++,n.shift()()};return(k)=>new Promise((R,v)=>{let A=()=>{k().then((U)=>{a--,R(U),s()},(U)=>{a--,v(U),s()})};if(a<e)a++,A();else n.push(A)})}var r={get TRACE(){return process.env.PICKIER_TRACE==="1"},get TIMEOUT_MS(){return Number(process.env.PICKIER_TIMEOUT_MS||"8000")},get RULE_TIMEOUT_MS(){return Number(process.env.PICKIER_RULE_TIMEOUT_MS||"5000")},get CONCURRENCY(){return Number(process.env.PICKIER_CONCURRENCY)||8},get DIAGNOSTICS(){return process.env.PICKIER_DIAGNOSTICS==="1"},get FAIL_ON_WARNINGS(){return process.env.PICKIER_FAIL_ON_WARNINGS==="1"},get NO_AUTO_CONFIG(){return process.env.PICKIER_NO_AUTO_CONFIG==="1"},get WORKERS(){let e=process.env.PICKIER_WORKERS;if(e===void 0||e==="")return null;let a=Number(e);return Number.isFinite(a)?Math.max(0,Math.floor(a)):null}},_=["**/node_modules/**","**/.git/**"],m=["**/node_modules/**","**/dist/**","**/build/**","**/.git/**","**/.next/**","**/.nuxt/**","**/.output/**","**/.vercel/**","**/.netlify/**","**/.cache/**","**/.turbo/**","**/.vscode/**","**/.idea/**","**/.zed/**","**/.cursor/**","**/.claude/**","**/.github/**","**/coverage/**","**/.nyc_output/**","**/.tmp/**","**/.temp/**","**/vendor/**","**/pantry/**","**/target/**","**/zig-cache/**","**/zig-out/**","**/.zig-cache/**","**/__pycache__/**","**/.pytest_cache/**","**/venv/**","**/.venv/**","**/out/**","**/.DS_Store","**/Thumbs.db"];function N(e,a){let n=e[a];if(n===void 0){let R=a.indexOf("/");if(R>0){let v=a.slice(0,R),A=a.slice(R+1),U=v==="general"?"pickier":v==="pickier"?"general":null;if(U)n=e[`${U}/${A}`];if(n===void 0)n=e[A]}}let s,k;if(typeof n==="string"){if(n==="error")s="error";else if(n==="warn"||n==="warning")s="warning"}else if(Array.isArray(n)&&typeof n[0]==="string"){let R=n[0];if(R==="error")s="error";else if(R==="warn"||R==="warning")s="warning";k=n[1]}return{enabled:!!s,severity:s,options:k}}function E(e){let a=Array.isArray(e)?e[0]:e;if(typeof a!=="string")return;if(a==="off")return"off";if(a==="error")return"error";if(a==="warn"||a==="warning")return"warning";return}function o(e,a,n=[],s){for(let R of[a,...n]){let v=E(e.rules?.[R])??E(e.pluginRules?.[R]);if(v)return v==="off"?void 0:v}let k=E(s);return k==="off"?void 0:k}function re(e,a){return E(e.rules?.[a])==="off"||E(e.pluginRules?.[a])==="off"}function w(e,a){return`\x1B[${e}m${a}\x1B[0m`}function J(e){return w("32",e)}function Y(e){return w("31",e)}function Z(e){return w("33",e)}function X(e){return w("34",e)}function Q(e){return w("90",e)}function ee(e){return w("1",e)}var t={green:J,red:Y,yellow:Z,blue:X,gray:Q,bold:ee};function y(e,a){let n=a.ignores?[...new Set([...e.ignores||[],...a.ignores])]:e.ignores,s={...e.pluginRules||{},...a.pluginRules||{}};if((a.tailwind??e.tailwind)?.enabled&&!Object.prototype.hasOwnProperty.call(s,"pickier/sort-tailwind-classes"))s["pickier/sort-tailwind-classes"]="warn";return{...e,...a,verbose:a.verbose??e.verbose,ignores:n,lint:{...e.lint,...a.lint||{}},format:{...e.format,...a.format||{}},rules:{...e.rules,...a.rules||{}},pluginRules:s}}var $e=null;async function u(e){if(!e){if(r.NO_AUTO_CONFIG){if(!$e)$e=y(l,{});return $e}try{let{getConfig:s}=await import("./chunk-1vnz0vyr.js"),k=await s();return y(l,k)}catch{}return y(l,{})}let a=_e(e)?e:$t(process.cwd(),e);if(Pt(a).toLowerCase()===".json")try{let s=Nt(a,"utf8");return y(l,JSON.parse(s))}catch{return console.warn(`[pickier:warn] Config file not found: ${a}. Using default config values.`),y(l,{})}try{let s=await import(a);return y(l,s.default||s)}catch{return console.warn(`[pickier:warn] Config file not found: ${a}. Using default config values.`),y(l,{})}}function x(e){return e.map((a)=>{if(/[*?[\]{}()!]/.test(a))return a;if(/\.[A-Z0-9]+$/i.test(a))return a;return`${a.replace(/\/$/,"")}/**/*`})}function T(e,a){let n=e.lastIndexOf(".");if(n<0)return!1;let s=e.slice(n);return a.has(s)}function Le(e){if(!e.includes("\\")&&!e.includes("//"))return e;return e.replace(/\\/g,"/").replace(/\/+/g,"/")}function Lt(e){let a=[];for(let n of e){let s=Le(n.trim());if(!s)continue;let k=s.match(/\*\*\/\*\.(.+)$/);if(k){a.push({raw:s,kind:"extension",value:k[1]});continue}let R=s.match(/\*\*\/(.+?)\/\*\*$/);if(R){a.push({raw:s,kind:"segment",value:R[1]});continue}let v=s.match(/\*\*\/(.+)$/);if(v)a.push({raw:s,kind:"suffix",value:v[1].replace(/\/$/,"")})}return a}function h(e){return[...new Set([..._,...e])]}function d(e,a=process.cwd()){let n=Lt([..._,...e]);if(n.length===0)return()=>!1;let s=new Set([...m,..._]),k=Le(a).replace(/\/$/,""),R=`${k}/`,v=n.map((A)=>({pattern:A,universal:s.has(A.raw),suffix:A.kind==="extension"?`.${A.value}`:`/${A.value}`,inner:`/${A.value}/`}));return(A)=>{let U=Le(A),K=U!==k&&!U.startsWith(R),P=K?U:U.slice(k.length);for(let{pattern:H,universal:W,suffix:j,inner:B}of v){if(K&&!W)continue;if(H.kind==="extension"){if(P.endsWith(j))return!0;continue}if(H.kind==="segment"||H.kind==="suffix"){if(P.includes(B)||P.endsWith(j))return!0}}return!1}}function ie(e,a){return d(a)(e)}
26
+ `)return null;let n=[],s=[],k=[],R=0,v=0,A=-1,W=!1;while(R<e.length){let D=e[R];if(Fe.test(D)){R++;continue}if(Yn.test(D)||We.test(D)){let ue=R;if(We.test(D)){while(R<e.length&&!e[R].includes("*/"))R++;R++}else R++;if(!W){for(let pe=ue;pe<R&&pe<e.length;pe++)s.push(e[pe]);v=R}else if(A<0)A=ue;continue}if(!Xn.test(D))break;let j=D.trim(),ae=R+1;while(!Ue.test(j)&&ae<e.length&&ae-R<50)j+=` ${e[ae].trim()}`,ae++;if(!Ue.test(j))return null;let te=It(j);if(!te)return null;if(A>=0){let ue=[];for(let pe=A;pe<R;pe++)if(!Fe.test(e[pe]))ue.push(e[pe]);if(ue.length>0)te.comments=ue;A=-1}n.push(te),R=ae,v=R,W=!0}if(n.length===0)return null;let K=A>=0?A:v,F=e.slice(K),B=0;while(B<F.length&&F[B]==="")B++;let U=B===0?F:F.slice(B),P=new Map,V=(D)=>{let j=P.get(D);if(j===void 0){j=!1;for(let ae of F)if(Rt(ae,D)){j=!0;break}P.set(D,j)}return j};for(let D of n){if(D.kind!=="value")continue;D.named=D.named.filter((j)=>{if(j.alias)return!0;return V(j.name)})}let oe=n.filter((D)=>{if(D.kind==="side-effect")return!0;if(D.kind==="type")return D.namedTypes.length>0;return Boolean(D.defaultName||D.namespaceName||D.named.length>0)}),le=new Set(oe),H=[];for(let D of n){let j=H.length>0?[...H,...D.comments??[]]:D.comments;if(!le.has(D)){H=j??[];continue}if(j&&j.length>0)D.comments=j;H=[]}if(H.length>0)k.push(...H);let fe=new Map,me=(D,j)=>{if(!j.comments)return;D.comments=D.comments?[...D.comments,...j.comments]:[...j.comments]};for(let D of oe){let j=fe.get(D.source)||{};if(D.kind==="side-effect")j.side=j.side||[],j.side.push(D);else if(D.kind==="type"){if(!j.type)j.type={kind:"type",source:D.source,named:[],namedTypes:[],original:""};me(j.type,D),j.type.namedTypes=(j.type.namedTypes||[]).concat(D.namedTypes)}else{if(!j.value)j.value={kind:"value",source:D.source,named:[],namedTypes:[],original:""};if(me(j.value,D),D.defaultName)j.value.defaultName=D.defaultName;if(D.namespaceName)j.value.namespaceName=D.namespaceName;if(j.value.named=(j.value.named||[]).concat(D.named),D.namedTypes.length>0){if(!j.type)j.type={kind:"type",source:D.source,named:[],namedTypes:[],original:""};j.type.namedTypes=j.type.namedTypes.concat(D.namedTypes)}}fe.set(D.source,j)}let ce=[];for(let[D,j]of fe){if(j.side)ce.push(...j.side);if(j.value)j.value.named.sort((ae,te)=>ae.name.localeCompare(te.name)),ce.push(j.value);if(j.type&&j.type.namedTypes.length>0){let ae=new Set;j.type.namedTypes=j.type.namedTypes.filter((te)=>{let ue=`${te.name}|${te.alias||""}`;if(ae.has(ue))return!1;return ae.add(ue),!0}),j.type.namedTypes.sort((te,ue)=>te.name.localeCompare(ue.name)),ce.push(j.type)}}let ge=(D)=>D.startsWith(".")?2:D.startsWith("node:")?0:1,he=(D)=>{if(D.kind!=="value")return 99;if(D.defaultName)return 0;if(D.namespaceName)return 1;return 2};if(ce.sort((D,j)=>{if(D.kind!==j.kind){if(D.kind==="type")return-1;if(j.kind==="type")return 1;if(D.kind==="side-effect")return-1;if(j.kind==="side-effect")return 1}if(D.kind==="type"&&j.kind==="type"){let ae=ge(D.source),te=ge(j.source);if(ae!==te)return ae-te;return D.source.localeCompare(j.source)}if(D.kind==="value"&&j.kind==="value"){let ae=ge(D.source),te=ge(j.source);if(ae!==te)return ae-te;let ue=he(D),pe=he(j);if(ue!==pe)return ue-pe;return D.source.localeCompare(j.source)}return D.source.localeCompare(j.source)}),ce.length===0){if(s.length>0||k.length>0)return[...s,...k,...U.length>0?U:[""]];return U}let de=[...s];for(let D of ce){if(D.comments)de.push(...D.comments);let j=_t(D);if(j.includes(`
27
+ `))de.push(...j.split(`
28
+ `));else de.push(j)}if(k.length>0)de.push(""),de.push(...k);return de.push(""),de.push(...U),de}function _t(e){if(e.kind==="side-effect")return`import '${e.source}'`;if(e.kind==="type")return`import type { ${e.namedTypes.map((k)=>k.alias?`${k.name} as ${k.alias}`:k.name).join(", ")} } from '${e.source}'`;let a=[];if(e.defaultName)a.push(e.defaultName);if(e.namespaceName)a.push(`* as ${e.namespaceName}`);if(e.named.length>0){let s=e.named.map((k)=>k.alias?`${k.name} as ${k.alias}`:k.name).join(", ");a.push(`{ ${s} }`)}return`import ${a.join(", ")} from '${e.source}'`}function It(e){let a=e.match(/^\s*import\s+['"]([^'"]+)['"]/);if(a)return{kind:"side-effect",source:a[1],named:[],namedTypes:[],original:e};if(a=e.match(/^\s*import\s+type\s+\{([^}]*)\}\s+from\s+['"]([^'"]+)['"]/),a){let U=a[1],P=a[2],V=U.split(",").map((oe)=>oe.trim()).filter(Boolean).map((oe)=>{let le=oe.match(/^(\w+)(?:\s+as\s+(\w+))?$/);return{name:le?.[1]||oe,alias:le?.[2]}});return{kind:"type",source:P,named:[],namedTypes:V,original:e}}let n=e.match(/^\s*import\s+/),s=new RegExp(`\\sfrom\\s+['"]([^'"]+)['"]\\s*;?$`),k=e.match(s);if(!n||!k)return;let R=k[1],v=e.slice(n[0].length,k.index).trim(),A,W,K=[],F=[],B=v.match(/\{([^}]*)\}/);if(B){let P=B[1].split(",").map((V)=>V.trim()).filter(Boolean);for(let V of P){let oe=/^type\s+/.test(V),H=V.replace(/^type\s+/,"").match(/^(\w+)(?:\s+as\s+(\w+))?$/);if(!H)continue;let fe={name:H[1],alias:H[2]};if(oe)F.push(fe);else K.push(fe)}v=v.replace(/\{[\s\S]*?\}/,"").trim()}if(v.length>0){let U=v.split(",").map((P)=>P.trim()).filter(Boolean);for(let P of U)if(P.startsWith("* as "))W=P.slice(5).trim();else if(/^\w+$/.test(P))A=P}return{kind:"value",source:R,defaultName:A,namespaceName:W,named:K,namedTypes:F,original:e}}function Ot(e,a){if(Qn.test(a))return vt(e);if(Vn.test(a))return At(e);return null}function ln(e){try{return JSON.parse(e)}catch{return null}}function Ce(e,a,n=[]){let s={};for(let R of a)if(Object.prototype.hasOwnProperty.call(e,R))s[R]=e[R];for(let R of n){let v=Object.keys(e).filter((A)=>R.test(A)&&!(A in s)).sort();for(let A of v)s[A]=e[A]}let k=Object.keys(e).filter((R)=>!(R in s)).sort();for(let R of k)s[R]=e[R];return s}function Ye(e){let a={};for(let n of Object.keys(e).sort())a[n]=e[n];return a}function vt(e){let a=ln(e);if(!a||typeof a!=="object")return e;let s=Ce(a,["publisher","name","displayName","type","version","private","packageManager","description","author","contributors","license","funding","homepage","repository","bugs","keywords","categories","sideEffects","imports","exports","main","module","unpkg","jsdelivr","types","typesVersions","bin","icon","files","engines","activationEvents","contributes","scripts","peerDependencies","peerDependenciesMeta","dependencies","optionalDependencies","devDependencies","pnpm","overrides","resolutions","husky","simple-git-hooks","lint-staged","eslintConfig"]);if(Array.isArray(s.files)){if(s.files.every((v)=>typeof v==="string"))s.files=[...s.files].sort()}for(let R of Object.keys(s))if(/^(?:dev|peer|optional|bundled)?[Dd]ependencies(?:Meta)?$/.test(R)||/^(?:resolutions|overrides|pnpm\.overrides)$/.test(R)){if(s[R]&&typeof s[R]==="object")s[R]=Ye(s[R])}if(s.pnpm&&typeof s.pnpm==="object"&&s.pnpm.overrides&&typeof s.pnpm.overrides==="object")s.pnpm.overrides=Ye(s.pnpm.overrides);if(s.exports&&typeof s.exports==="object"){let R=s.exports,v=["types","import","require","default"];if(!Array.isArray(R)){let A={};for(let W of Object.keys(R)){let K=R[W];if(K&&typeof K==="object"&&!Array.isArray(K))A[W]=Ce(K,v);else A[W]=K}s.exports=A}}let k=["pre-commit","prepare-commit-msg","commit-msg","post-commit","pre-rebase","post-rewrite","post-checkout","post-merge","pre-push","pre-auto-gc"];for(let R of["gitHooks","husky","simple-git-hooks"])if(s[R]&&typeof s[R]==="object")s[R]=Ce(s[R],k);return JSON.stringify(s,null,2)}function At(e){let a=ln(e);if(!a||typeof a!=="object")return e;let s=Ce(a,["extends","compilerOptions","references","files","include","exclude"]);if(s.compilerOptions&&typeof s.compilerOptions==="object"){let k=["incremental","composite","tsBuildInfoFile","disableSourceOfProjectReferenceRedirect","disableSolutionSearching","disableReferencedProjectLoad","target","jsx","jsxFactory","jsxFragmentFactory","jsxImportSource","lib","moduleDetection","noLib","reactNamespace","useDefineForClassFields","emitDecoratorMetadata","experimentalDecorators","libReplacement","baseUrl","rootDir","rootDirs","customConditions","module","moduleResolution","moduleSuffixes","noResolve","paths","resolveJsonModule","resolvePackageJsonExports","resolvePackageJsonImports","typeRoots","types","allowArbitraryExtensions","allowImportingTsExtensions","allowUmdGlobalAccess","allowJs","checkJs","maxNodeModuleJsDepth","strict","strictBindCallApply","strictFunctionTypes","strictNullChecks","strictPropertyInitialization","allowUnreachableCode","allowUnusedLabels","alwaysStrict","exactOptionalPropertyTypes","noFallthroughCasesInSwitch","noImplicitAny","noImplicitOverride","noImplicitReturns","noImplicitThis","noPropertyAccessFromIndexSignature","noUncheckedIndexedAccess","noUnusedLocals","noUnusedParameters","useUnknownInCatchVariables","declaration","declarationDir","declarationMap","downlevelIteration","emitBOM","emitDeclarationOnly","importHelpers","importsNotUsedAsValues","inlineSourceMap","inlineSources","mapRoot","newLine","noEmit","noEmitHelpers","noEmitOnError","outDir","outFile","preserveConstEnums","preserveValueImports","removeComments","sourceMap","sourceRoot","stripInternal","allowSyntheticDefaultImports","esModuleInterop","forceConsistentCasingInFileNames","isolatedDeclarations","isolatedModules","preserveSymlinks","verbatimModuleSyntax","erasableSyntaxOnly","skipDefaultLibCheck","skipLibCheck"];s.compilerOptions=Ce(s.compilerOptions,k)}return JSON.stringify(s,null,2)}import{readdirSync as Tt,readFileSync as Nt,statSync as _e}from"fs";import{extname as Pt,isAbsolute as Ie,join as Oe,resolve as $t}from"path";var L=5;function Mt(e){let a="",n=0;while(n<e.length){let s=e[n];if(s==="*")if(e[n+1]==="*"){if(a+=".*",n+=2,e[n]==="/")n++}else a+="[^/]*",n++;else if(s==="?")a+="[^/]",n++;else if(s==="["){let k=e.indexOf("]",n);if(k===-1)a+="\\[",n++;else a+=e.slice(n,k+1),n=k+1}else if(".+^${}()|\\".includes(s))a+=`\\${s}`,n++;else a+=s,n++}return new RegExp(`^${a}$`)}function*cn(e,a,n){let s;try{s=Tt(e)}catch{return}for(let k of s){if(!n&&k.startsWith("."))continue;let R=Oe(e,k);if(a(R))continue;let v;try{v=_e(R)}catch{continue}if(v.isDirectory())yield*cn(R,a,n);else yield R}}function*an(e,a,n,s){yield*cn(e,d(a,s),n)}async function f(e,a={}){let n=a.cwd??process.cwd(),s=a.ignore??[],k=a.dot??!1,R=a.absolute??!0,v=d(s,n);if(typeof globalThis.Bun?.Glob<"u"){let W=globalThis.Bun.Glob,K=[];for(let F of e){let B=Ie(F)?F:Oe(n,F),U=_e(B,{throwIfNoEntry:!1});if(U?.isFile()){if(!v(B))K.push(R?B:B.startsWith(`${n}/`)?B.slice(n.length+1):B);continue}let P=U?.isDirectory()?B:n,V=new W(U?.isDirectory()?"**/*":F);for await(let oe of V.scan({cwd:P,dot:k,onlyFiles:a.onlyFiles??!0,followSymlinks:!1})){let le=Ie(oe)?oe:Oe(P,oe),H=le.startsWith(`${n}/`)?le.slice(n.length+1):le;if(v(le))continue;K.push(R?le:H)}}return K}let A=[];for(let W of e){let K=Ie(W)?W:Oe(n,W);if(_e(K,{throwIfNoEntry:!1})||!/[*?[{]/.test(W)){try{if(!_e(K).isDirectory()){let P=K.startsWith(`${n}/`)?K.slice(n.length+1):K;if(!v(K))A.push(R?K:P)}else for(let P of an(K,s,k,n))A.push(R?P:P.startsWith(`${n}/`)?P.slice(n.length+1):P)}catch{}continue}let B=Mt(W);for(let U of an(n,s,k,n)){let P=U.startsWith(`${n}/`)?U.slice(n.length+1):U;if(B.test(P)||B.test(P.replace(/\\/g,"/")))A.push(R?U:P)}}return A}function se(e){let a=0,n=[],s=()=>{if(n.length>0&&a<e)a++,n.shift()()};return(k)=>new Promise((R,v)=>{let A=()=>{k().then((W)=>{a--,R(W),s()},(W)=>{a--,v(W),s()})};if(a<e)a++,A();else n.push(A)})}var r={get TRACE(){return process.env.PICKIER_TRACE==="1"},get TIMEOUT_MS(){return Number(process.env.PICKIER_TIMEOUT_MS||"8000")},get RULE_TIMEOUT_MS(){return Number(process.env.PICKIER_RULE_TIMEOUT_MS||"5000")},get CONCURRENCY(){return Number(process.env.PICKIER_CONCURRENCY)||8},get DIAGNOSTICS(){return process.env.PICKIER_DIAGNOSTICS==="1"},get FAIL_ON_WARNINGS(){return process.env.PICKIER_FAIL_ON_WARNINGS==="1"},get NO_AUTO_CONFIG(){return process.env.PICKIER_NO_AUTO_CONFIG==="1"},get WORKERS(){let e=process.env.PICKIER_WORKERS;if(e===void 0||e==="")return null;let a=Number(e);return Number.isFinite(a)?Math.max(0,Math.floor(a)):null}},_=["**/node_modules/**","**/.git/**"],m=["**/node_modules/**","**/dist/**","**/build/**","**/.git/**","**/.next/**","**/.nuxt/**","**/.output/**","**/.vercel/**","**/.netlify/**","**/.cache/**","**/.turbo/**","**/.vscode/**","**/.idea/**","**/.zed/**","**/.cursor/**","**/.claude/**","**/.github/**","**/coverage/**","**/.nyc_output/**","**/.tmp/**","**/.temp/**","**/vendor/**","**/pantry/**","**/target/**","**/zig-cache/**","**/zig-out/**","**/.zig-cache/**","**/__pycache__/**","**/.pytest_cache/**","**/venv/**","**/.venv/**","**/out/**","**/.DS_Store","**/Thumbs.db"];function N(e,a){let n=e[a];if(n===void 0){let R=a.indexOf("/");if(R>0){let v=a.slice(0,R),A=a.slice(R+1),W=v==="general"?"pickier":v==="pickier"?"general":null;if(W)n=e[`${W}/${A}`];if(n===void 0)n=e[A]}}let s,k;if(typeof n==="string"){if(n==="error")s="error";else if(n==="warn"||n==="warning")s="warning"}else if(Array.isArray(n)&&typeof n[0]==="string"){let R=n[0];if(R==="error")s="error";else if(R==="warn"||R==="warning")s="warning";k=n[1]}return{enabled:!!s,severity:s,options:k}}function E(e){let a=Array.isArray(e)?e[0]:e;if(typeof a!=="string")return;if(a==="off")return"off";if(a==="error")return"error";if(a==="warn"||a==="warning")return"warning";return}function o(e,a,n=[],s){for(let R of[a,...n]){let v=E(e.rules?.[R])??E(e.pluginRules?.[R]);if(v)return v==="off"?void 0:v}let k=E(s);return k==="off"?void 0:k}function re(e,a){return E(e.rules?.[a])==="off"||E(e.pluginRules?.[a])==="off"}function w(e,a){return`\x1B[${e}m${a}\x1B[0m`}function J(e){return w("32",e)}function Y(e){return w("31",e)}function Z(e){return w("33",e)}function X(e){return w("34",e)}function Q(e){return w("90",e)}function ee(e){return w("1",e)}var t={green:J,red:Y,yellow:Z,blue:X,gray:Q,bold:ee};function y(e,a){let n=a.ignores?[...new Set([...e.ignores||[],...a.ignores])]:e.ignores,s={...e.pluginRules||{},...a.pluginRules||{}};if((a.tailwind??e.tailwind)?.enabled&&!Object.prototype.hasOwnProperty.call(s,"pickier/sort-tailwind-classes"))s["pickier/sort-tailwind-classes"]="warn";return{...e,...a,verbose:a.verbose??e.verbose,ignores:n,lint:{...e.lint,...a.lint||{}},format:{...e.format,...a.format||{}},rules:{...e.rules,...a.rules||{}},pluginRules:s}}var Me=null;async function u(e){if(!e){if(r.NO_AUTO_CONFIG){if(!Me)Me=y(l,{});return Me}try{let{getConfig:s}=await import("./chunk-fn87cp4c.js"),k=await s();return y(l,k)}catch{}return y(l,{})}let a=Ie(e)?e:$t(process.cwd(),e);if(Pt(a).toLowerCase()===".json")try{let s=Nt(a,"utf8");return y(l,JSON.parse(s))}catch{return console.warn(`[pickier:warn] Config file not found: ${a}. Using default config values.`),y(l,{})}try{let s=await import(a);return y(l,s.default||s)}catch{return console.warn(`[pickier:warn] Config file not found: ${a}. Using default config values.`),y(l,{})}}function x(e){return e.map((a)=>{if(/[*?[\]{}()!]/.test(a))return a;if(/\.[A-Z0-9]+$/i.test(a))return a;return`${a.replace(/\/$/,"")}/**/*`})}function T(e,a){let n=e.lastIndexOf(".");if(n<0)return!1;let s=e.slice(n);return a.has(s)}function Le(e){if(!e.includes("\\")&&!e.includes("//"))return e;return e.replace(/\\/g,"/").replace(/\/+/g,"/")}function Lt(e){let a=[];for(let n of e){let s=Le(n.trim());if(!s)continue;let k=s.match(/\*\*\/\*\.(.+)$/);if(k){a.push({raw:s,kind:"extension",value:k[1]});continue}let R=s.match(/\*\*\/(.+?)\/\*\*$/);if(R){a.push({raw:s,kind:"segment",value:R[1]});continue}let v=s.match(/\*\*\/(.+)$/);if(v)a.push({raw:s,kind:"suffix",value:v[1].replace(/\/$/,"")})}return a}function h(e){return[...new Set([..._,...e])]}function d(e,a=process.cwd()){let n=Lt([..._,...e]);if(n.length===0)return()=>!1;let s=new Set([...m,..._]),k=Le(a).replace(/\/$/,""),R=`${k}/`,v=n.map((A)=>({pattern:A,universal:s.has(A.raw),suffix:A.kind==="extension"?`.${A.value}`:`/${A.value}`,inner:`/${A.value}/`}));return(A)=>{let W=Le(A),K=W!==k&&!W.startsWith(R),F=K?W:W.slice(k.length);for(let{pattern:B,universal:U,suffix:P,inner:V}of v){if(K&&!U)continue;if(B.kind==="extension"){if(F.endsWith(P))return!0;continue}if(B.kind==="segment"||B.kind==="suffix"){if(F.includes(V)||F.endsWith(P))return!0}}return!1}}function ie(e,a){return d(a)(e)}
29
29
  export{l,ne,z,g,I,q,G,c,S,p,O,M,C,L,f,se,r,_,m,N,E,o,re,w,J,Y,Z,X,Q,ee,t,y,u,x,T,h,d,ie};
package/dist/src/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{l,z,p,O,M,C,L,f,se,r,_,m,N,E,o,re,w,J,Y,Z,X,Q,ee,t,y,u,x,T,h,d,ie}from"../chunk-hx0z7dzw.js";import{H,W,A,U,K}from"../chunk-mfns8s7h.js";import"../chunk-bf41tx1b.js";import{B}from"../chunk-mgry8xhx.js";export{_ as ALWAYS_IGNORES,r as ENV,L as MAX_FIXER_PASSES,m as UNIVERSAL_IGNORES,X as blue,ee as bold,w as colorize,t as colors,z as config,d as createIgnoreMatcher,se as createLimiter,l as defaultConfig,O as detectQuoteIssues,x as expandPatterns,A as fixText,p as formatCode,C as formatImports,N as getRuleSetting,f as glob,Q as gray,J as green,M as hasIndentIssue,T as isCodeFile,re as isRuleOff,W as lintText,u as loadConfigFromPath,y as mergeConfig,E as normalizeRuleSeverity,Y as red,o as resolveRuleSeverity,B as run,H as runFormat,K as runLint,U as runLintProgrammatic,ie as shouldIgnorePath,h as withAlwaysIgnores,Z as yellow};
2
+ import{l,z,p,O,M,C,L,f,se,r,_,m,N,E,o,re,w,J,Y,Z,X,Q,ee,t,y,u,x,T,h,d,ie}from"../chunk-rx0b7k57.js";import{H,W,A,U,K}from"../chunk-dnn0da5m.js";import"../chunk-ra9jn7j5.js";import{B}from"../chunk-d1qeak2x.js";export{_ as ALWAYS_IGNORES,r as ENV,L as MAX_FIXER_PASSES,m as UNIVERSAL_IGNORES,X as blue,ee as bold,w as colorize,t as colors,z as config,d as createIgnoreMatcher,se as createLimiter,l as defaultConfig,O as detectQuoteIssues,x as expandPatterns,A as fixText,p as formatCode,C as formatImports,N as getRuleSetting,f as glob,Q as gray,J as green,M as hasIndentIssue,T as isCodeFile,re as isRuleOff,W as lintText,u as loadConfigFromPath,y as mergeConfig,E as normalizeRuleSeverity,Y as red,o as resolveRuleSeverity,B as run,H as runFormat,K as runLint,U as runLintProgrammatic,ie as shouldIgnorePath,h as withAlwaysIgnores,Z as yellow};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{u}from"../chunk-hx0z7dzw.js";import{R,v}from"../chunk-mfns8s7h.js";import"../chunk-bf41tx1b.js";var s,i=null;self.onmessage=async(n)=>{let t=n.data;if(t.type==="init"){s=t.options,i=u(s.config);return}try{let e=await i,o=[];for(let[r,a]of t.batch)o.push([r,await v(a,e,s)]);await R(),postMessage({type:"done",results:o})}catch(e){await R(),postMessage({type:"error",message:e?.message||String(e)})}};
2
+ import{u}from"../chunk-rx0b7k57.js";import{R,v}from"../chunk-dnn0da5m.js";import"../chunk-ra9jn7j5.js";var s,i=null;self.onmessage=async(n)=>{let t=n.data;if(t.type==="init"){s=t.options,i=u(s.config);return}try{let e=await i,o=[];for(let[r,a]of t.batch)o.push([r,await v(a,e,s)]);await R(),postMessage({type:"done",results:o})}catch(e){await R(),postMessage({type:"error",message:e?.message||String(e)})}};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pickier",
3
3
  "type": "module",
4
- "version": "0.1.72",
4
+ "version": "0.1.73",
5
5
  "description": "Format, lint and more in a fraction of seconds.",
6
6
  "author": "Chris Breuer <chris@stacksjs.org>",
7
7
  "license": "MIT",
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{l,ne,z}from"./chunk-hx0z7dzw.js";export{z as config,l as defaultConfig,ne as getConfig};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{W,A,U,V,v,K}from"./chunk-mfns8s7h.js";import"./chunk-hx0z7dzw.js";import"./chunk-bf41tx1b.js";export{A as fixText,v as lintFileForRun,W as lintText,V as plannedCheckRules,K as runLint,U as runLintProgrammatic};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{B}from"./chunk-mgry8xhx.js";import"./chunk-hx0z7dzw.js";export{B as runUnified};