@solar-icons/codemod 2.1.0 → 2.2.1

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.
Files changed (39) hide show
  1. package/dist/_virtual/_rolldown/runtime.mjs +1 -0
  2. package/dist/cli.d.mts +2 -3
  3. package/dist/cli.mjs +1 -1
  4. package/dist/detect.d.mts +2 -3
  5. package/dist/icon-renames.d.mts +3 -4
  6. package/dist/import-bindings.mjs +1 -1
  7. package/dist/node_modules/.pnpm/buffer-from@1.1.2/node_modules/buffer-from/index.mjs +1 -0
  8. package/dist/node_modules/.pnpm/source-map-support@0.5.21/node_modules/source-map-support/source-map-support.mjs +4 -0
  9. package/dist/node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/array-set.mjs +1 -0
  10. package/dist/node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/base64-vlq.mjs +1 -0
  11. package/dist/node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/base64.mjs +1 -0
  12. package/dist/node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/binary-search.mjs +1 -0
  13. package/dist/node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/mapping-list.mjs +1 -0
  14. package/dist/node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/quick-sort.mjs +1 -0
  15. package/dist/node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/source-map-consumer.mjs +1 -0
  16. package/dist/node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/source-map-generator.mjs +1 -0
  17. package/dist/node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/source-node.mjs +1 -0
  18. package/dist/node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/util.mjs +1 -0
  19. package/dist/node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/source-map.mjs +1 -0
  20. package/dist/node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/typescript.mjs +448 -0
  21. package/dist/package-json.d.mts +2 -3
  22. package/dist/transforms/angular.d.mts +2 -3
  23. package/dist/transforms/angular.mjs +1 -1
  24. package/dist/transforms/nuxt.d.mts +2 -3
  25. package/dist/transforms/nuxt.mjs +1 -1
  26. package/dist/transforms/react-native.d.mts +2 -3
  27. package/dist/transforms/react-native.mjs +2 -2
  28. package/dist/transforms/react-perf.d.mts +2 -3
  29. package/dist/transforms/react-perf.mjs +1 -1
  30. package/dist/transforms/react.d.mts +2 -3
  31. package/dist/transforms/react.mjs +2 -2
  32. package/dist/transforms/solid.d.mts +2 -3
  33. package/dist/transforms/solid.mjs +4 -4
  34. package/dist/transforms/svelte.d.mts +2 -3
  35. package/dist/transforms/svelte.mjs +3 -3
  36. package/dist/transforms/vue.d.mts +2 -3
  37. package/dist/transforms/vue.mjs +3 -3
  38. package/dist/types.d.mts +7 -8
  39. package/package.json +9 -9
@@ -0,0 +1 @@
1
+ import{createRequire as e}from"node:module";var t=Object.create,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.getPrototypeOf,o=Object.prototype.hasOwnProperty,s=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),c=(e,t,a,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var c=i(t),l=0,u=c.length,d;l<u;l++)d=c[l],!o.call(e,d)&&d!==a&&n(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(s=r(t,d))||s.enumerable});return e},l=(e,r,i)=>(i=e==null?{}:t(a(e)),c(r||!e||!e.__esModule||!o.call(e,`default`)?n(i,`default`,{value:e,enumerable:!0}):i,e)),u=/* @__PURE__ */ e(import.meta.url);export{s as __commonJSMin,u as __require,l as __toESM};
package/dist/cli.d.mts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { MigrationOptions, MigrationReport } from "./types.mjs";
2
2
  //#region src/cli.d.ts
3
- declare function runMigration({ cwd, reactV1Mode, targetVersion, vueV1Mode, write }: MigrationOptions): Promise<MigrationReport>;
4
- //#endregion
5
- export { runMigration };
3
+ export declare function runMigration({ cwd, reactV1Mode, targetVersion, vueV1Mode, write }: MigrationOptions): Promise<MigrationReport>;
4
+ //#endregion
package/dist/cli.mjs CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{detectFrameworks as e}from"./detect.mjs";import{transformPackageJson as t}from"./package-json.mjs";import{collectAngularSelectorRenames as n,transformAngular as r,transformAngularTemplate as i}from"./transforms/angular.mjs";import{transformNuxt as a}from"./transforms/nuxt.mjs";import{transformReactNative as o}from"./transforms/react-native.mjs";import{transformReactPerf as s}from"./transforms/react-perf.mjs";import{transformReact as c}from"./transforms/react.mjs";import{transformSolid as l}from"./transforms/solid.mjs";import{transformSvelte as u}from"./transforms/svelte.mjs";import{transformVue as d}from"./transforms/vue.mjs";import{readFile as f,readdir as p,writeFile as m}from"node:fs/promises";import{extname as h,join as g,resolve as _}from"node:path";import{realpathSync as v}from"node:fs";import{pathToFileURL as y}from"node:url";import*as b from"@clack/prompts";import{Command as x,InvalidArgumentError as S}from"commander";import C from"picocolors";const w=new Set([`.html`,`.js`,`.jsx`,`.mjs`,`.ts`,`.tsx`,`.svelte`,`.vue`]),T=new Set([`.git`,`.next`,`.nuxt`,`.svelte-kit`,`coverage`,`dist`,`node_modules`]);async function E(e){let t=await p(e,{withFileTypes:!0});return(await Promise.all(t.map(async t=>{let n=g(e,t.name);return t.isDirectory()?T.has(t.name)?[]:E(n):t.isFile()&&w.has(h(t.name))?[n]:[]}))).flat()}async function D({cwd:p,reactV1Mode:h=`static`,targetVersion:_,vueV1Mode:v=`static`,write:y=!1}){let b=await e(p),x=await E(p),S=new Map(await Promise.all(x.map(async e=>[e,await f(e,`utf8`)]))),C=new Map;for(let[e,t]of S)for(let[r,i]of n(t,e))C.set(r,i);let w=new Set(x),T=[],D=[];for(let e of x){let t=S.get(e),n=s(t,e),f=c(n.code,e,h),p=o(f.code,e),g=d(p.code,e,v),_=a(g.code,e),b=u(_.code,e),x=l(b.code,e),E=r(x.code,e,w),O=i(E.code,C);D.push(...n.diagnostics,...f.diagnostics,...p.diagnostics,...g.diagnostics,..._.diagnostics,...b.diagnostics,...x.diagnostics,...E.diagnostics,...O.diagnostics),(n.changed||f.changed||p.changed||g.changed||_.changed||b.changed||x.changed||E.changed||O.changed)&&(T.push(e),y&&await m(e,O.code))}let O=g(p,`package.json`),k=t(await f(O,`utf8`),_);return k.changed&&(T.push(O),y&&await m(O,k.code)),{changedFiles:T,diagnostics:D,detectedFrameworks:b}}function O(e){if(e===`static`||e===`dynamic`)return e;throw new S(`Expected either "static" or "dynamic".`)}function k(e){let t=e.file&&e.line?`${e.file}:${e.line}:${e.column??1}`:e.file,n=e.severity===`error`?C.red(`error`):C.yellow(`warning`);return`${C.dim(t??`solar-icons`)} ${n} ${C.bold(`[${e.code}]`)} ${e.message}`}function A(e,t){console.info(`${C.cyan(`Detected frameworks:`)} ${e.detectedFrameworks.join(`, `)||`none`}`),console.info(`${t?C.green(`Migrated`):C.cyan(`Would migrate`)} ${C.bold(String(e.changedFiles.length))} file(s).`);for(let t of e.diagnostics)console.warn(k(t));!t&&e.changedFiles.length>0&&console.info(C.dim(`Run again with --write to apply these changes.`))}async function j(e){let t=await b.select({message:`${e} migration strategy`,options:[{value:`static`,label:`Static (recommended)`,hint:`one style per import and the smallest bundle`},{value:`dynamic`,label:`Dynamic`,hint:`preserve runtime style switching`}]});if(!b.isCancel(t))return t}async function M(t){b.intro(C.bgCyan(C.black(` Solar Icons v2 migration `)));let n=await e(t);b.log.info(`Detected: ${n.join(`, `)||`no supported framework`}`);let r=n.includes(`react`)?await j(`React`):void 0;if(n.includes(`react`)&&!r){b.cancel(`Migration cancelled.`);return}let i=n.includes(`vue`)?await j(`Vue`):void 0;if(n.includes(`vue`)&&!i){b.cancel(`Migration cancelled.`);return}let a=await b.select({message:`Choose an action`,options:[{value:`preview`,label:`Preview changes`,hint:`does not modify files`},{value:`write`,label:`Apply changes`,hint:`writes the migration to disk`}]});if(b.isCancel(a)){b.cancel(`Migration cancelled.`);return}let o=a===`write`;if(o){let e=await b.confirm({message:`Write the migration to this project?`,initialValue:!1});if(b.isCancel(e)||!e){b.cancel(`Migration cancelled.`);return}}return{reactV1Mode:r,vueV1Mode:i,write:o}}async function N(){let e=new x().name(`solar-icons-migrate`).description(`Migrate a Solar Icons project from the pre-v2 API to v2.`).argument(`[directory]`,`project directory, defaults to the current directory`).option(`-C, --cwd <path>`,`project directory, kept for backwards compatibility`).option(`-i, --interactive`,`guide the migration with prompts`).option(`-w, --write`,`apply changes instead of previewing them`).option(`--react-v1-mode <mode>`,`React strategy: static or dynamic`,O).option(`--vue-v1-mode <mode>`,`Vue strategy: static or dynamic`,O).option(`--target-version <version>`,`Solar Icons v2 version to add to package.json`).option(`--json`,`write a machine-readable report to stdout`).showHelpAfterError().showSuggestionAfterError();e.action(async(t,n)=>{t&&n.cwd&&e.error(`Use either [directory] or --cwd, not both.`,{exitCode:2}),n.interactive&&n.json&&e.error(`--interactive cannot be combined with --json.`,{exitCode:2});let r=_(n.cwd??t??process.cwd()),i=n.interactive?await M(r):void 0;if(n.interactive&&!i)return;let a={cwd:r,reactV1Mode:i?.reactV1Mode??n.reactV1Mode,targetVersion:n.targetVersion,vueV1Mode:i?.vueV1Mode??n.vueV1Mode,write:i?.write??n.write},o=await D(a);n.json?console.info(JSON.stringify(o,null,2)):A(o,!!a.write),n.interactive&&b.outro(`Migration complete.`)}),await e.parseAsync()}const P=process.argv[1]?v(process.argv[1]):void 0;P&&import.meta.url===y(P).href&&N();export{D as runMigration};
2
+ import{detectFrameworks as e}from"./detect.mjs";import{transformPackageJson as t}from"./package-json.mjs";import{collectAngularSelectorRenames as n,transformAngular as r,transformAngularTemplate as i}from"./transforms/angular.mjs";import{transformNuxt as a}from"./transforms/nuxt.mjs";import{transformReactNative as o}from"./transforms/react-native.mjs";import{transformReactPerf as s}from"./transforms/react-perf.mjs";import{transformReact as c}from"./transforms/react.mjs";import{transformSolid as l}from"./transforms/solid.mjs";import{transformSvelte as u}from"./transforms/svelte.mjs";import{transformVue as d}from"./transforms/vue.mjs";import{readFile as f,readdir as p,writeFile as m}from"node:fs/promises";import{extname as h,join as g,resolve as _}from"node:path";import{realpathSync as v}from"node:fs";import{pathToFileURL as y}from"node:url";import*as b from"@clack/prompts";import{Command as x,InvalidArgumentError as S}from"commander";import C from"picocolors";const w=/* @__PURE__ */ new Set([`.html`,`.js`,`.jsx`,`.mjs`,`.ts`,`.tsx`,`.svelte`,`.vue`]),T=/* @__PURE__ */ new Set([`.git`,`.next`,`.nuxt`,`.svelte-kit`,`coverage`,`dist`,`node_modules`]);async function E(e){let t=await p(e,{withFileTypes:!0});return(await Promise.all(t.map(async t=>{let n=g(e,t.name);return t.isDirectory()?T.has(t.name)?[]:E(n):t.isFile()&&w.has(h(t.name))?[n]:[]}))).flat()}async function D({cwd:p,reactV1Mode:h=`static`,targetVersion:_,vueV1Mode:v=`static`,write:y=!1}){let b=await e(p),x=await E(p),S=new Map(await Promise.all(x.map(async e=>[e,await f(e,`utf8`)]))),C=/* @__PURE__ */ new Map;for(let[e,t]of S)for(let[r,i]of n(t,e))C.set(r,i);let w=new Set(x),T=[],D=[];for(let e of x){let t=S.get(e),n=s(t,e),f=c(n.code,e,h),p=o(f.code,e),g=d(p.code,e,v),_=a(g.code,e),b=u(_.code,e),x=l(b.code,e),E=r(x.code,e,w),O=i(E.code,C);D.push(...n.diagnostics,...f.diagnostics,...p.diagnostics,...g.diagnostics,..._.diagnostics,...b.diagnostics,...x.diagnostics,...E.diagnostics,...O.diagnostics),(n.changed||f.changed||p.changed||g.changed||_.changed||b.changed||x.changed||E.changed||O.changed)&&(T.push(e),y&&await m(e,O.code))}let O=g(p,`package.json`),k=t(await f(O,`utf8`),_);return k.changed&&(T.push(O),y&&await m(O,k.code)),{changedFiles:T,diagnostics:D,detectedFrameworks:b}}function O(e){if(e===`static`||e===`dynamic`)return e;throw new S(`Expected either "static" or "dynamic".`)}function k(e){let t=e.file&&e.line?`${e.file}:${e.line}:${e.column??1}`:e.file,n=e.severity===`error`?C.red(`error`):C.yellow(`warning`);return`${C.dim(t??`solar-icons`)} ${n} ${C.bold(`[${e.code}]`)} ${e.message}`}function A(e,t){console.info(`${C.cyan(`Detected frameworks:`)} ${e.detectedFrameworks.join(`, `)||`none`}`),console.info(`${t?C.green(`Migrated`):C.cyan(`Would migrate`)} ${C.bold(String(e.changedFiles.length))} file(s).`);for(let t of e.diagnostics)console.warn(k(t));!t&&e.changedFiles.length>0&&console.info(C.dim(`Run again with --write to apply these changes.`))}async function j(e){let t=await b.select({message:`${e} migration strategy`,options:[{value:`static`,label:`Static (recommended)`,hint:`one style per import and the smallest bundle`},{value:`dynamic`,label:`Dynamic`,hint:`preserve runtime style switching`}]});if(!b.isCancel(t))return t}async function M(t){b.intro(C.bgCyan(C.black(` Solar Icons v2 migration `)));let n=await e(t);b.log.info(`Detected: ${n.join(`, `)||`no supported framework`}`);let r=n.includes(`react`)?await j(`React`):void 0;if(n.includes(`react`)&&!r){b.cancel(`Migration cancelled.`);return}let i=n.includes(`vue`)?await j(`Vue`):void 0;if(n.includes(`vue`)&&!i){b.cancel(`Migration cancelled.`);return}let a=await b.select({message:`Choose an action`,options:[{value:`preview`,label:`Preview changes`,hint:`does not modify files`},{value:`write`,label:`Apply changes`,hint:`writes the migration to disk`}]});if(b.isCancel(a)){b.cancel(`Migration cancelled.`);return}let o=a===`write`;if(o){let e=await b.confirm({message:`Write the migration to this project?`,initialValue:!1});if(b.isCancel(e)||!e){b.cancel(`Migration cancelled.`);return}}return{reactV1Mode:r,vueV1Mode:i,write:o}}async function N(){let e=new x().name(`solar-icons-migrate`).description(`Migrate a Solar Icons project from the pre-v2 API to v2.`).argument(`[directory]`,`project directory, defaults to the current directory`).option(`-C, --cwd <path>`,`project directory, kept for backwards compatibility`).option(`-i, --interactive`,`guide the migration with prompts`).option(`-w, --write`,`apply changes instead of previewing them`).option(`--react-v1-mode <mode>`,`React strategy: static or dynamic`,O).option(`--vue-v1-mode <mode>`,`Vue strategy: static or dynamic`,O).option(`--target-version <version>`,`Solar Icons v2 version to add to package.json`).option(`--json`,`write a machine-readable report to stdout`).showHelpAfterError().showSuggestionAfterError();e.action(async(t,n)=>{t&&n.cwd&&e.error(`Use either [directory] or --cwd, not both.`,{exitCode:2}),n.interactive&&n.json&&e.error(`--interactive cannot be combined with --json.`,{exitCode:2});let r=_(n.cwd??t??process.cwd()),i=n.interactive?await M(r):void 0;if(n.interactive&&!i)return;let a={cwd:r,reactV1Mode:i?.reactV1Mode??n.reactV1Mode,targetVersion:n.targetVersion,vueV1Mode:i?.vueV1Mode??n.vueV1Mode,write:i?.write??n.write},o=await D(a);n.json?console.info(JSON.stringify(o,null,2)):A(o,!!a.write),n.interactive&&b.outro(`Migration complete.`)}),await e.parseAsync()}const P=process.argv[1]?v(process.argv[1]):void 0;P&&import.meta.url===y(P).href&&N();export{D as runMigration};
package/dist/detect.d.mts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { Framework } from "./types.mjs";
2
2
  //#region src/detect.d.ts
3
- declare function detectFrameworks(cwd: string): Promise<Framework[]>;
4
- //#endregion
5
- export { detectFrameworks };
3
+ export declare function detectFrameworks(cwd: string): Promise<Framework[]>;
4
+ //#endregion
@@ -1,6 +1,5 @@
1
1
  //#region src/icon-renames.d.ts
2
2
  /** Complete v1-to-v2 breaking rename table. */
3
- declare const iconRenames: Record<string, string>;
4
- declare function renameIcon(name: string): string;
5
- //#endregion
6
- export { iconRenames, renameIcon };
3
+ export declare const iconRenames: Record<string, string>;
4
+ export declare function renameIcon(name: string): string;
5
+ //#endregion
@@ -1 +1 @@
1
- import e from"typescript";function t(t,n,r){if(r.size===0)return[];let i={allowJs:!0,jsx:e.JsxEmit.ReactJSX,noResolve:!0,target:e.ScriptTarget.Latest},a=e.createSourceFile(n,t,e.ScriptTarget.Latest,!0),o=e.createCompilerHost(i),s=o.getSourceFile.bind(o);o.getSourceFile=(e,t,r,i)=>e===n?a:s(e,t,r,i);let c=e.createProgram([n],i,o),l=c.getSourceFile(n);if(!l)return[];let u=c.getTypeChecker(),d=new Map;for(let t of l.statements){if(!e.isImportDeclaration(t))continue;let n=t.importClause?.namedBindings;if(n&&e.isNamedImports(n))for(let e of n.elements){let t=e.name.text;if(!r.has(t))continue;let n=u.getSymbolAtLocation(e.name);n&&d.set(t,n)}}let f=[],p=t=>{if(e.isIdentifier(t)&&!e.isImportSpecifier(t.parent)){let e=r.get(t.text),n=d.get(t.text);e&&n&&u.getSymbolAtLocation(t)===n&&f.push({end:t.getEnd(),start:t.getStart(l),text:e})}e.forEachChild(t,p)};return e.forEachChild(l,p),f}export{t as renameImportedBindingReferences};
1
+ import{__toESM as e}from"./_virtual/_rolldown/runtime.mjs";import{require_typescript as t}from"./node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/typescript.mjs";var n=/* @__PURE__ */ e(t(),1);function r(e,t,r){if(r.size===0)return[];let i={allowJs:!0,jsx:n.default.JsxEmit.ReactJSX,noResolve:!0,target:n.default.ScriptTarget.Latest},a=n.default.createSourceFile(t,e,n.default.ScriptTarget.Latest,!0),o=n.default.createCompilerHost(i),s=o.getSourceFile.bind(o);o.getSourceFile=(e,n,r,i)=>e===t?a:s(e,n,r,i);let c=n.default.createProgram([t],i,o),l=c.getSourceFile(t);if(!l)return[];let u=c.getTypeChecker(),d=/* @__PURE__ */ new Map;for(let e of l.statements){if(!n.default.isImportDeclaration(e))continue;let t=e.importClause?.namedBindings;if(t&&n.default.isNamedImports(t))for(let e of t.elements){let t=e.name.text;if(!r.has(t))continue;let n=u.getSymbolAtLocation(e.name);n&&d.set(t,n)}}let f=[],p=e=>{if(n.default.isIdentifier(e)&&!n.default.isImportSpecifier(e.parent)){let t=r.get(e.text),n=d.get(e.text);t&&n&&u.getSymbolAtLocation(e)===n&&f.push({end:e.getEnd(),start:e.getStart(l),text:t})}n.default.forEachChild(e,p)};return n.default.forEachChild(l,p),f}export{r as renameImportedBindingReferences};
@@ -0,0 +1 @@
1
+ import{__commonJSMin as e}from"../../../../../_virtual/_rolldown/runtime.mjs";var t=/* @__PURE__ */ e(((e,t)=>{var n=Object.prototype.toString,r=typeof Buffer<`u`&&typeof Buffer.alloc==`function`&&typeof Buffer.allocUnsafe==`function`&&typeof Buffer.from==`function`;function i(e){return n.call(e).slice(8,-1)===`ArrayBuffer`}function a(e,t,n){t>>>=0;var i=e.byteLength-t;if(i<0)throw RangeError(`'offset' is out of bounds`);if(n===void 0)n=i;else if(n>>>=0,n>i)throw RangeError(`'length' is out of bounds`);return r?Buffer.from(e.slice(t,t+n)):new Buffer(new Uint8Array(e.slice(t,t+n)))}function o(e,t){if((typeof t!=`string`||t===``)&&(t=`utf8`),!Buffer.isEncoding(t))throw TypeError(`"encoding" must be a valid string encoding`);return r?Buffer.from(e,t):new Buffer(e,t)}function s(e,t,n){if(typeof e==`number`)throw TypeError(`"value" argument must not be a number`);return i(e)?a(e,t,n):typeof e==`string`?o(e,t):r?Buffer.from(e):new Buffer(e)}t.exports=s}));export default t();export{t as require_buffer_from};
@@ -0,0 +1,4 @@
1
+ import{__commonJSMin as e,__require as t}from"../../../../../_virtual/_rolldown/runtime.mjs";import{require_source_map as n}from"../../../source-map@0.6.1/node_modules/source-map/source-map.mjs";import{require_buffer_from as r}from"../../../buffer-from@1.1.2/node_modules/buffer-from/index.mjs";var i=/* @__PURE__ */ e(((e,i)=>{var a=n().SourceMapConsumer,o=t(`path`),s;try{s=t(`fs`),(!s.existsSync||!s.readFileSync)&&(s=null)}catch{}var c=r();function l(e,t){return e.require(t)}var u=!1,d=!1,f=!1,p=`auto`,m={},h={},g=/^data:application\/json[^,]+base64,/,_=[],v=[];function y(){return p===`browser`||p!==`node`&&typeof window<`u`&&typeof XMLHttpRequest==`function`&&!(window.require&&window.module&&window.process&&window.process.type===`renderer`)}function b(){return typeof process==`object`&&process!==null&&typeof process.on==`function`}function x(){return typeof process==`object`&&process!==null?process.version:``}function S(){if(typeof process==`object`&&process!==null)return process.stderr}function C(e){if(typeof process==`object`&&process!==null&&typeof process.exit==`function`)return process.exit(e)}function w(e){return function(t){for(var n=0;n<e.length;n++){var r=e[n](t);if(r)return r}return null}}var T=w(_);_.push(function(e){if(e=e.trim(),/^file:/.test(e)&&(e=e.replace(/file:\/\/\/(\w:)?/,function(e,t){return t?``:`/`})),e in m)return m[e];var t=``;try{if(s)s.existsSync(e)&&(t=s.readFileSync(e,`utf8`));else{var n=new XMLHttpRequest;n.open(`GET`,e,!1),n.send(null),n.readyState===4&&n.status===200&&(t=n.responseText)}}catch{}return m[e]=t});function E(e,t){if(!e)return t;var n=o.dirname(e),r=/^\w+:\/\/[^\/]*/.exec(n),i=r?r[0]:``,a=n.slice(i.length);return i&&/^\/\w\:/.test(a)?(i+=`/`,i+o.resolve(n.slice(i.length),t).replace(/\\/g,`/`)):i+o.resolve(n.slice(i.length),t)}function D(e){var t;if(y())try{var n=new XMLHttpRequest;n.open(`GET`,e,!1),n.send(null),t=n.readyState===4?n.responseText:null;var r=n.getResponseHeader(`SourceMap`)||n.getResponseHeader(`X-SourceMap`);if(r)return r}catch{}t=T(e);for(var i=/(?:\/\/[@#][\s]*sourceMappingURL=([^\s'"]+)[\s]*$)|(?:\/\*[@#][\s]*sourceMappingURL=([^\s*'"]+)[\s]*(?:\*\/)[\s]*$)/gm,a,o;o=i.exec(t);)a=o;return a?a[1]:null}var O=w(v);v.push(function(e){var t=D(e);if(!t)return null;var n;return g.test(t)?(n=c(t.slice(t.indexOf(`,`)+1),`base64`).toString(),t=e):(t=E(e,t),n=T(t)),n?{url:t,map:n}:null});function k(e){var t=h[e.source];if(!t){var n=O(e.source);n?(t=h[e.source]={url:n.url,map:new a(n.map)},t.map.sourcesContent&&t.map.sources.forEach(function(e,n){var r=t.map.sourcesContent[n];if(r){var i=E(t.url,e);m[i]=r}})):t=h[e.source]={url:null,map:null}}if(t&&t.map&&typeof t.map.originalPositionFor==`function`){var r=t.map.originalPositionFor(e);if(r.source!==null)return r.source=E(t.url,r.source),r}return e}function A(e){var t=/^eval at ([^(]+) \((.+):(\d+):(\d+)\)$/.exec(e);if(t){var n=k({source:t[2],line:+t[3],column:t[4]-1});return`eval at `+t[1]+` (`+n.source+`:`+n.line+`:`+(n.column+1)+`)`}return t=/^eval at ([^(]+) \((.+)\)$/.exec(e),t?`eval at `+t[1]+` (`+A(t[2])+`)`:e}function j(){var e,t=``;if(this.isNative())t=`native`;else{e=this.getScriptNameOrSourceURL(),!e&&this.isEval()&&(t=this.getEvalOrigin(),t+=`, `),t+=e||`<anonymous>`;var n=this.getLineNumber();if(n!=null){t+=`:`+n;var r=this.getColumnNumber();r&&(t+=`:`+r)}}var i=``,a=this.getFunctionName(),o=!0,s=this.isConstructor();if(this.isToplevel()||s)s?i+=`new `+(a||`<anonymous>`):a?i+=a:(i+=t,o=!1);else{var c=this.getTypeName();c===`[object Object]`&&(c=`null`);var l=this.getMethodName();a?(c&&a.indexOf(c)!=0&&(i+=c+`.`),i+=a,l&&a.indexOf(`.`+l)!=a.length-l.length-1&&(i+=` [as `+l+`]`)):i+=c+`.`+(l||`<anonymous>`)}return o&&(i+=` (`+t+`)`),i}function M(e){var t={};return Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(function(n){t[n]=/^(?:is|get)/.test(n)?function(){return e[n].call(e)}:e[n]}),t.toString=j,t}function N(e,t){if(t===void 0&&(t={nextPosition:null,curPosition:null}),e.isNative())return t.curPosition=null,e;var n=e.getFileName()||e.getScriptNameOrSourceURL();if(n){var r=e.getLineNumber(),i=e.getColumnNumber()-1,a=/^v(10\.1[6-9]|10\.[2-9][0-9]|10\.[0-9]{3,}|1[2-9]\d*|[2-9]\d|\d{3,}|11\.11)/.test(x())?0:62;r===1&&i>a&&!y()&&!e.isEval()&&(i-=a);var o=k({source:n,line:r,column:i});t.curPosition=o,e=M(e);var s=e.getFunctionName;return e.getFunctionName=function(){return t.nextPosition==null?s():t.nextPosition.name||s()},e.getFileName=function(){return o.source},e.getLineNumber=function(){return o.line},e.getColumnNumber=function(){return o.column+1},e.getScriptNameOrSourceURL=function(){return o.source},e}var c=e.isEval()&&e.getEvalOrigin();return c?(c=A(c),e=M(e),e.getEvalOrigin=function(){return c},e):e}function P(e,t){f&&(m={},h={});for(var n=e.name||`Error`,r=e.message||``,i=n+`: `+r,a={nextPosition:null,curPosition:null},o=[],s=t.length-1;s>=0;s--)o.push(`
2
+ at `+N(t[s],a)),a.nextPosition=a.curPosition;return a.curPosition=a.nextPosition=null,i+o.reverse().join(``)}function F(e){var t=/\n at [^(]+ \((.*):(\d+):(\d+)\)/.exec(e.stack);if(t){var n=t[1],r=+t[2],i=+t[3],a=m[n];if(!a&&s&&s.existsSync(n))try{a=s.readFileSync(n,`utf8`)}catch{a=``}if(a){var o=a.split(/(?:\r\n|\r|\n)/)[r-1];if(o)return n+`:`+r+`
3
+ `+o+`
4
+ `+Array(i).join(` `)+`^`}}return null}function I(e){var t=F(e),n=S();n&&n._handle&&n._handle.setBlocking&&n._handle.setBlocking(!0),t&&(console.error(),console.error(t)),console.error(e.stack),C(1)}function L(){var e=process.emit;process.emit=function(t){if(t===`uncaughtException`){var n=arguments[1]&&arguments[1].stack,r=this.listeners(t).length>0;if(n&&!r)return I(arguments[1])}return e.apply(this,arguments)}}var R=_.slice(0),z=v.slice(0);e.wrapCallSite=N,e.getErrorSource=F,e.mapSourcePosition=k,e.retrieveSourceMap=O,e.install=function(e){if(e=e||{},e.environment&&(p=e.environment,[`node`,`browser`,`auto`].indexOf(p)===-1))throw Error(`environment `+p+` was unknown. Available options are {auto, browser, node}`);if(e.retrieveFile&&(e.overrideRetrieveFile&&(_.length=0),_.unshift(e.retrieveFile)),e.retrieveSourceMap&&(e.overrideRetrieveSourceMap&&(v.length=0),v.unshift(e.retrieveSourceMap)),e.hookRequire&&!y()){var t=l(i,`module`),n=t.prototype._compile;n.__sourceMapSupport||(t.prototype._compile=function(e,t){return m[t]=e,h[t]=void 0,n.call(this,e,t)},t.prototype._compile.__sourceMapSupport=!0)}if(f||(f=`emptyCacheBetweenOperations`in e&&e.emptyCacheBetweenOperations),u||(u=!0,Error.prepareStackTrace=P),!d){var r=`handleUncaughtExceptions`in e?e.handleUncaughtExceptions:!0;try{l(i,`worker_threads`).isMainThread===!1&&(r=!1)}catch{}r&&b()&&(d=!0,L())}},e.resetRetrieveHandlers=function(){_.length=0,v.length=0,_=R.slice(0),v=z.slice(0),O=w(v),T=w(_)}}));export default i();export{i as require_source_map_support};
@@ -0,0 +1 @@
1
+ import{__commonJSMin as e}from"../../../../../../_virtual/_rolldown/runtime.mjs";import{require_util as t}from"./util.mjs";var n=/* @__PURE__ */ e((e=>{var n=t(),r=Object.prototype.hasOwnProperty,i=typeof Map<`u`;function a(){this._array=[],this._set=i?/* @__PURE__ */ new Map:Object.create(null)}a.fromArray=function(e,t){for(var n=new a,r=0,i=e.length;r<i;r++)n.add(e[r],t);return n},a.prototype.size=function(){return i?this._set.size:Object.getOwnPropertyNames(this._set).length},a.prototype.add=function(e,t){var a=i?e:n.toSetString(e),o=i?this.has(e):r.call(this._set,a),s=this._array.length;(!o||t)&&this._array.push(e),o||(i?this._set.set(e,s):this._set[a]=s)},a.prototype.has=function(e){if(i)return this._set.has(e);var t=n.toSetString(e);return r.call(this._set,t)},a.prototype.indexOf=function(e){if(i){var t=this._set.get(e);if(t>=0)return t}else{var a=n.toSetString(e);if(r.call(this._set,a))return this._set[a]}throw Error(`"`+e+`" is not in the set.`)},a.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw Error(`No element indexed by `+e)},a.prototype.toArray=function(){return this._array.slice()},e.ArraySet=a}));export default n();export{n as require_array_set};
@@ -0,0 +1 @@
1
+ import{__commonJSMin as e}from"../../../../../../_virtual/_rolldown/runtime.mjs";import{require_base64 as t}from"./base64.mjs";var n=/* @__PURE__ */ e((e=>{var n=t(),r=5,i=1<<r,a=i-1,o=i;function s(e){return e<0?(-e<<1)+1:(e<<1)+0}function c(e){var t=(e&1)==1,n=e>>1;return t?-n:n}e.encode=function(e){var t=``,i,c=s(e);do i=c&a,c>>>=r,c>0&&(i|=o),t+=n.encode(i);while(c>0);return t},e.decode=function(e,t,i){var s=e.length,l=0,u=0,d,f;do{if(t>=s)throw Error(`Expected more digits in base 64 VLQ value.`);if(f=n.decode(e.charCodeAt(t++)),f===-1)throw Error(`Invalid base64 digit: `+e.charAt(t-1));d=!!(f&o),f&=a,l+=f<<u,u+=r}while(d);i.value=c(l),i.rest=t}}));export default n();export{n as require_base64_vlq};
@@ -0,0 +1 @@
1
+ import{__commonJSMin as e}from"../../../../../../_virtual/_rolldown/runtime.mjs";var t=/* @__PURE__ */ e((e=>{var t=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`.split(``);e.encode=function(e){if(0<=e&&e<t.length)return t[e];throw TypeError(`Must be between 0 and 63: `+e)},e.decode=function(e){var t=65,n=90,r=97,i=122,a=48;return t<=e&&e<=n?e-t:r<=e&&e<=i?e-r+26:a<=e&&e<=57?e-a+52:e==43?62:e==47?63:-1}}));export default t();export{t as require_base64};
@@ -0,0 +1 @@
1
+ import{__commonJSMin as e}from"../../../../../../_virtual/_rolldown/runtime.mjs";var t=/* @__PURE__ */ e((e=>{e.GREATEST_LOWER_BOUND=1,e.LEAST_UPPER_BOUND=2;function t(n,r,i,a,o,s){var c=Math.floor((r-n)/2)+n,l=o(i,a[c],!0);return l===0?c:l>0?r-c>1?t(c,r,i,a,o,s):s==e.LEAST_UPPER_BOUND?r<a.length?r:-1:c:c-n>1?t(n,c,i,a,o,s):s==e.LEAST_UPPER_BOUND?c:n<0?-1:n}e.search=function(n,r,i,a){if(r.length===0)return-1;var o=t(-1,r.length,n,r,i,a||e.GREATEST_LOWER_BOUND);if(o<0)return-1;for(;o-1>=0&&i(r[o],r[o-1],!0)===0;)--o;return o}}));export default t();export{t as require_binary_search};
@@ -0,0 +1 @@
1
+ import{__commonJSMin as e}from"../../../../../../_virtual/_rolldown/runtime.mjs";import{require_util as t}from"./util.mjs";var n=/* @__PURE__ */ e((e=>{var n=t();function r(e,t){var r=e.generatedLine,i=t.generatedLine,a=e.generatedColumn,o=t.generatedColumn;return i>r||i==r&&o>=a||n.compareByGeneratedPositionsInflated(e,t)<=0}function i(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}i.prototype.unsortedForEach=function(e,t){this._array.forEach(e,t)},i.prototype.add=function(e){r(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))},i.prototype.toArray=function(){return this._sorted||(this._array.sort(n.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},e.MappingList=i}));export default n();export{n as require_mapping_list};
@@ -0,0 +1 @@
1
+ import{__commonJSMin as e}from"../../../../../../_virtual/_rolldown/runtime.mjs";var t=/* @__PURE__ */ e((e=>{function t(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function n(e,t){return Math.round(e+Math.random()*(t-e))}function r(e,i,a,o){if(a<o){var s=n(a,o),c=a-1;t(e,s,o);for(var l=e[o],u=a;u<o;u++)i(e[u],l)<=0&&(c+=1,t(e,c,u));t(e,c+1,u);var d=c+1;r(e,i,a,d-1),r(e,i,d+1,o)}}e.quickSort=function(e,t){r(e,t,0,e.length-1)}}));export default t();export{t as require_quick_sort};
@@ -0,0 +1 @@
1
+ import{__commonJSMin as e}from"../../../../../../_virtual/_rolldown/runtime.mjs";import{require_base64_vlq as t}from"./base64-vlq.mjs";import{require_util as n}from"./util.mjs";import{require_array_set as r}from"./array-set.mjs";import{require_binary_search as i}from"./binary-search.mjs";import{require_quick_sort as a}from"./quick-sort.mjs";var o=/* @__PURE__ */ e((e=>{var o=n(),s=i(),c=r().ArraySet,l=t(),u=a().quickSort;function d(e,t){var n=e;return typeof e==`string`&&(n=o.parseSourceMapInput(e)),n.sections==null?new f(n,t):new m(n,t)}d.fromSourceMap=function(e,t){return f.fromSourceMap(e,t)},d.prototype._version=3,d.prototype.__generatedMappings=null,Object.defineProperty(d.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),d.prototype.__originalMappings=null,Object.defineProperty(d.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),d.prototype._charIsMappingSeparator=function(e,t){var n=e.charAt(t);return n===`;`||n===`,`},d.prototype._parseMappings=function(e,t){throw Error(`Subclasses must implement _parseMappings`)},d.GENERATED_ORDER=1,d.ORIGINAL_ORDER=2,d.GREATEST_LOWER_BOUND=1,d.LEAST_UPPER_BOUND=2,d.prototype.eachMapping=function(e,t,n){var r=t||null,i=n||d.GENERATED_ORDER,a;switch(i){case d.GENERATED_ORDER:a=this._generatedMappings;break;case d.ORIGINAL_ORDER:a=this._originalMappings;break;default:throw Error(`Unknown order of iteration.`)}var s=this.sourceRoot;a.map(function(e){var t=e.source===null?null:this._sources.at(e.source);return t=o.computeSourceURL(s,t,this._sourceMapURL),{source:t,generatedLine:e.generatedLine,generatedColumn:e.generatedColumn,originalLine:e.originalLine,originalColumn:e.originalColumn,name:e.name===null?null:this._names.at(e.name)}},this).forEach(e,r)},d.prototype.allGeneratedPositionsFor=function(e){var t=o.getArg(e,`line`),n={source:o.getArg(e,`source`),originalLine:t,originalColumn:o.getArg(e,`column`,0)};if(n.source=this._findSourceIndex(n.source),n.source<0)return[];var r=[],i=this._findMapping(n,this._originalMappings,`originalLine`,`originalColumn`,o.compareByOriginalPositions,s.LEAST_UPPER_BOUND);if(i>=0){var a=this._originalMappings[i];if(e.column===void 0)for(var c=a.originalLine;a&&a.originalLine===c;)r.push({line:o.getArg(a,`generatedLine`,null),column:o.getArg(a,`generatedColumn`,null),lastColumn:o.getArg(a,`lastGeneratedColumn`,null)}),a=this._originalMappings[++i];else for(var l=a.originalColumn;a&&a.originalLine===t&&a.originalColumn==l;)r.push({line:o.getArg(a,`generatedLine`,null),column:o.getArg(a,`generatedColumn`,null),lastColumn:o.getArg(a,`lastGeneratedColumn`,null)}),a=this._originalMappings[++i]}return r},e.SourceMapConsumer=d;function f(e,t){var n=e;typeof e==`string`&&(n=o.parseSourceMapInput(e));var r=o.getArg(n,`version`),i=o.getArg(n,`sources`),a=o.getArg(n,`names`,[]),s=o.getArg(n,`sourceRoot`,null),l=o.getArg(n,`sourcesContent`,null),u=o.getArg(n,`mappings`),d=o.getArg(n,`file`,null);if(r!=this._version)throw Error(`Unsupported version: `+r);s&&(s=o.normalize(s)),i=i.map(String).map(o.normalize).map(function(e){return s&&o.isAbsolute(s)&&o.isAbsolute(e)?o.relative(s,e):e}),this._names=c.fromArray(a.map(String),!0),this._sources=c.fromArray(i,!0),this._absoluteSources=this._sources.toArray().map(function(e){return o.computeSourceURL(s,e,t)}),this.sourceRoot=s,this.sourcesContent=l,this._mappings=u,this._sourceMapURL=t,this.file=d}f.prototype=Object.create(d.prototype),f.prototype.consumer=d,f.prototype._findSourceIndex=function(e){var t=e;if(this.sourceRoot!=null&&(t=o.relative(this.sourceRoot,t)),this._sources.has(t))return this._sources.indexOf(t);for(var n=0;n<this._absoluteSources.length;++n)if(this._absoluteSources[n]==e)return n;return-1},f.fromSourceMap=function(e,t){var n=Object.create(f.prototype),r=n._names=c.fromArray(e._names.toArray(),!0),i=n._sources=c.fromArray(e._sources.toArray(),!0);n.sourceRoot=e._sourceRoot,n.sourcesContent=e._generateSourcesContent(n._sources.toArray(),n.sourceRoot),n.file=e._file,n._sourceMapURL=t,n._absoluteSources=n._sources.toArray().map(function(e){return o.computeSourceURL(n.sourceRoot,e,t)});for(var a=e._mappings.toArray().slice(),s=n.__generatedMappings=[],l=n.__originalMappings=[],d=0,m=a.length;d<m;d++){var h=a[d],g=new p;g.generatedLine=h.generatedLine,g.generatedColumn=h.generatedColumn,h.source&&(g.source=i.indexOf(h.source),g.originalLine=h.originalLine,g.originalColumn=h.originalColumn,h.name&&(g.name=r.indexOf(h.name)),l.push(g)),s.push(g)}return u(n.__originalMappings,o.compareByOriginalPositions),n},f.prototype._version=3,Object.defineProperty(f.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function p(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}f.prototype._parseMappings=function(e,t){for(var n=1,r=0,i=0,a=0,s=0,c=0,d=e.length,f=0,m={},h={},g=[],_=[],v,y,b,x,S;f<d;)if(e.charAt(f)===`;`)n++,f++,r=0;else if(e.charAt(f)===`,`)f++;else{for(v=new p,v.generatedLine=n,x=f;x<d&&!this._charIsMappingSeparator(e,x);x++);if(y=e.slice(f,x),b=m[y],b)f+=y.length;else{for(b=[];f<x;)l.decode(e,f,h),S=h.value,f=h.rest,b.push(S);if(b.length===2)throw Error(`Found a source, but no line and column`);if(b.length===3)throw Error(`Found a source and line, but no column`);m[y]=b}v.generatedColumn=r+b[0],r=v.generatedColumn,b.length>1&&(v.source=s+b[1],s+=b[1],v.originalLine=i+b[2],i=v.originalLine,v.originalLine+=1,v.originalColumn=a+b[3],a=v.originalColumn,b.length>4&&(v.name=c+b[4],c+=b[4])),_.push(v),typeof v.originalLine==`number`&&g.push(v)}u(_,o.compareByGeneratedPositionsDeflated),this.__generatedMappings=_,u(g,o.compareByOriginalPositions),this.__originalMappings=g},f.prototype._findMapping=function(e,t,n,r,i,a){if(e[n]<=0)throw TypeError(`Line must be greater than or equal to 1, got `+e[n]);if(e[r]<0)throw TypeError(`Column must be greater than or equal to 0, got `+e[r]);return s.search(e,t,i,a)},f.prototype.computeColumnSpans=function(){for(var e=0;e<this._generatedMappings.length;++e){var t=this._generatedMappings[e];if(e+1<this._generatedMappings.length){var n=this._generatedMappings[e+1];if(t.generatedLine===n.generatedLine){t.lastGeneratedColumn=n.generatedColumn-1;continue}}t.lastGeneratedColumn=1/0}},f.prototype.originalPositionFor=function(e){var t={generatedLine:o.getArg(e,`line`),generatedColumn:o.getArg(e,`column`)},n=this._findMapping(t,this._generatedMappings,`generatedLine`,`generatedColumn`,o.compareByGeneratedPositionsDeflated,o.getArg(e,`bias`,d.GREATEST_LOWER_BOUND));if(n>=0){var r=this._generatedMappings[n];if(r.generatedLine===t.generatedLine){var i=o.getArg(r,`source`,null);i!==null&&(i=this._sources.at(i),i=o.computeSourceURL(this.sourceRoot,i,this._sourceMapURL));var a=o.getArg(r,`name`,null);return a!==null&&(a=this._names.at(a)),{source:i,line:o.getArg(r,`originalLine`,null),column:o.getArg(r,`originalColumn`,null),name:a}}}return{source:null,line:null,column:null,name:null}},f.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return e==null}):!1},f.prototype.sourceContentFor=function(e,t){if(!this.sourcesContent)return null;var n=this._findSourceIndex(e);if(n>=0)return this.sourcesContent[n];var r=e;this.sourceRoot!=null&&(r=o.relative(this.sourceRoot,r));var i;if(this.sourceRoot!=null&&(i=o.urlParse(this.sourceRoot))){var a=r.replace(/^file:\/\//,``);if(i.scheme==`file`&&this._sources.has(a))return this.sourcesContent[this._sources.indexOf(a)];if((!i.path||i.path==`/`)&&this._sources.has(`/`+r))return this.sourcesContent[this._sources.indexOf(`/`+r)]}if(t)return null;throw Error(`"`+r+`" is not in the SourceMap.`)},f.prototype.generatedPositionFor=function(e){var t=o.getArg(e,`source`);if(t=this._findSourceIndex(t),t<0)return{line:null,column:null,lastColumn:null};var n={source:t,originalLine:o.getArg(e,`line`),originalColumn:o.getArg(e,`column`)},r=this._findMapping(n,this._originalMappings,`originalLine`,`originalColumn`,o.compareByOriginalPositions,o.getArg(e,`bias`,d.GREATEST_LOWER_BOUND));if(r>=0){var i=this._originalMappings[r];if(i.source===n.source)return{line:o.getArg(i,`generatedLine`,null),column:o.getArg(i,`generatedColumn`,null),lastColumn:o.getArg(i,`lastGeneratedColumn`,null)}}return{line:null,column:null,lastColumn:null}},e.BasicSourceMapConsumer=f;function m(e,t){var n=e;typeof e==`string`&&(n=o.parseSourceMapInput(e));var r=o.getArg(n,`version`),i=o.getArg(n,`sections`);if(r!=this._version)throw Error(`Unsupported version: `+r);this._sources=new c,this._names=new c;var a={line:-1,column:0};this._sections=i.map(function(e){if(e.url)throw Error(`Support for url field in sections not implemented.`);var n=o.getArg(e,`offset`),r=o.getArg(n,`line`),i=o.getArg(n,`column`);if(r<a.line||r===a.line&&i<a.column)throw Error(`Section offsets must be ordered and non-overlapping.`);return a=n,{generatedOffset:{generatedLine:r+1,generatedColumn:i+1},consumer:new d(o.getArg(e,`map`),t)}})}m.prototype=Object.create(d.prototype),m.prototype.constructor=d,m.prototype._version=3,Object.defineProperty(m.prototype,"sources",{get:function(){for(var e=[],t=0;t<this._sections.length;t++)for(var n=0;n<this._sections[t].consumer.sources.length;n++)e.push(this._sections[t].consumer.sources[n]);return e}}),m.prototype.originalPositionFor=function(e){var t={generatedLine:o.getArg(e,`line`),generatedColumn:o.getArg(e,`column`)},n=s.search(t,this._sections,function(e,t){return e.generatedLine-t.generatedOffset.generatedLine||e.generatedColumn-t.generatedOffset.generatedColumn}),r=this._sections[n];return r?r.consumer.originalPositionFor({line:t.generatedLine-(r.generatedOffset.generatedLine-1),column:t.generatedColumn-(r.generatedOffset.generatedLine===t.generatedLine?r.generatedOffset.generatedColumn-1:0),bias:e.bias}):{source:null,line:null,column:null,name:null}},m.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(e){return e.consumer.hasContentsOfAllSources()})},m.prototype.sourceContentFor=function(e,t){for(var n=0;n<this._sections.length;n++){var r=this._sections[n].consumer.sourceContentFor(e,!0);if(r)return r}if(t)return null;throw Error(`"`+e+`" is not in the SourceMap.`)},m.prototype.generatedPositionFor=function(e){for(var t=0;t<this._sections.length;t++){var n=this._sections[t];if(n.consumer._findSourceIndex(o.getArg(e,`source`))!==-1){var r=n.consumer.generatedPositionFor(e);if(r)return{line:r.line+(n.generatedOffset.generatedLine-1),column:r.column+(n.generatedOffset.generatedLine===r.line?n.generatedOffset.generatedColumn-1:0)}}}return{line:null,column:null}},m.prototype._parseMappings=function(e,t){this.__generatedMappings=[],this.__originalMappings=[];for(var n=0;n<this._sections.length;n++)for(var r=this._sections[n],i=r.consumer._generatedMappings,a=0;a<i.length;a++){var s=i[a],c=r.consumer._sources.at(s.source);c=o.computeSourceURL(r.consumer.sourceRoot,c,this._sourceMapURL),this._sources.add(c),c=this._sources.indexOf(c);var l=null;s.name&&(l=r.consumer._names.at(s.name),this._names.add(l),l=this._names.indexOf(l));var d={source:c,generatedLine:s.generatedLine+(r.generatedOffset.generatedLine-1),generatedColumn:s.generatedColumn+(r.generatedOffset.generatedLine===s.generatedLine?r.generatedOffset.generatedColumn-1:0),originalLine:s.originalLine,originalColumn:s.originalColumn,name:l};this.__generatedMappings.push(d),typeof d.originalLine==`number`&&this.__originalMappings.push(d)}u(this.__generatedMappings,o.compareByGeneratedPositionsDeflated),u(this.__originalMappings,o.compareByOriginalPositions)},e.IndexedSourceMapConsumer=m}));export default o();export{o as require_source_map_consumer};
@@ -0,0 +1 @@
1
+ import{__commonJSMin as e}from"../../../../../../_virtual/_rolldown/runtime.mjs";import{require_base64_vlq as t}from"./base64-vlq.mjs";import{require_util as n}from"./util.mjs";import{require_array_set as r}from"./array-set.mjs";import{require_mapping_list as i}from"./mapping-list.mjs";var a=/* @__PURE__ */ e((e=>{var a=t(),o=n(),s=r().ArraySet,c=i().MappingList;function l(e){e||(e={}),this._file=o.getArg(e,`file`,null),this._sourceRoot=o.getArg(e,`sourceRoot`,null),this._skipValidation=o.getArg(e,`skipValidation`,!1),this._sources=new s,this._names=new s,this._mappings=new c,this._sourcesContents=null}l.prototype._version=3,l.fromSourceMap=function(e){var t=e.sourceRoot,n=new l({file:e.file,sourceRoot:t});return e.eachMapping(function(e){var r={generated:{line:e.generatedLine,column:e.generatedColumn}};e.source!=null&&(r.source=e.source,t!=null&&(r.source=o.relative(t,r.source)),r.original={line:e.originalLine,column:e.originalColumn},e.name!=null&&(r.name=e.name)),n.addMapping(r)}),e.sources.forEach(function(r){var i=r;t!==null&&(i=o.relative(t,r)),n._sources.has(i)||n._sources.add(i);var a=e.sourceContentFor(r);a!=null&&n.setSourceContent(r,a)}),n},l.prototype.addMapping=function(e){var t=o.getArg(e,`generated`),n=o.getArg(e,`original`,null),r=o.getArg(e,`source`,null),i=o.getArg(e,`name`,null);this._skipValidation||this._validateMapping(t,n,r,i),r!=null&&(r=String(r),this._sources.has(r)||this._sources.add(r)),i!=null&&(i=String(i),this._names.has(i)||this._names.add(i)),this._mappings.add({generatedLine:t.line,generatedColumn:t.column,originalLine:n!=null&&n.line,originalColumn:n!=null&&n.column,source:r,name:i})},l.prototype.setSourceContent=function(e,t){var n=e;this._sourceRoot!=null&&(n=o.relative(this._sourceRoot,n)),t==null?this._sourcesContents&&(delete this._sourcesContents[o.toSetString(n)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null)):(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[o.toSetString(n)]=t)},l.prototype.applySourceMap=function(e,t,n){var r=t;if(t==null){if(e.file==null)throw Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);r=e.file}var i=this._sourceRoot;i!=null&&(r=o.relative(i,r));var a=new s,c=new s;this._mappings.unsortedForEach(function(t){if(t.source===r&&t.originalLine!=null){var s=e.originalPositionFor({line:t.originalLine,column:t.originalColumn});s.source!=null&&(t.source=s.source,n!=null&&(t.source=o.join(n,t.source)),i!=null&&(t.source=o.relative(i,t.source)),t.originalLine=s.line,t.originalColumn=s.column,s.name!=null&&(t.name=s.name))}var l=t.source;l!=null&&!a.has(l)&&a.add(l);var u=t.name;u!=null&&!c.has(u)&&c.add(u)},this),this._sources=a,this._names=c,e.sources.forEach(function(t){var r=e.sourceContentFor(t);r!=null&&(n!=null&&(t=o.join(n,t)),i!=null&&(t=o.relative(i,t)),this.setSourceContent(t,r))},this)},l.prototype._validateMapping=function(e,t,n,r){if(t&&typeof t.line!=`number`&&typeof t.column!=`number`)throw Error(`original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.`);if(!(e&&`line`in e&&`column`in e&&e.line>0&&e.column>=0&&!t&&!n&&!r)&&!(e&&`line`in e&&`column`in e&&t&&`line`in t&&`column`in t&&e.line>0&&e.column>=0&&t.line>0&&t.column>=0&&n))throw Error(`Invalid mapping: `+JSON.stringify({generated:e,source:n,original:t,name:r}))},l.prototype._serializeMappings=function(){for(var e=0,t=1,n=0,r=0,i=0,s=0,c=``,l,u,d,f,p=this._mappings.toArray(),m=0,h=p.length;m<h;m++){if(u=p[m],l=``,u.generatedLine!==t)for(e=0;u.generatedLine!==t;)l+=`;`,t++;else if(m>0){if(!o.compareByGeneratedPositionsInflated(u,p[m-1]))continue;l+=`,`}l+=a.encode(u.generatedColumn-e),e=u.generatedColumn,u.source!=null&&(f=this._sources.indexOf(u.source),l+=a.encode(f-s),s=f,l+=a.encode(u.originalLine-1-r),r=u.originalLine-1,l+=a.encode(u.originalColumn-n),n=u.originalColumn,u.name!=null&&(d=this._names.indexOf(u.name),l+=a.encode(d-i),i=d)),c+=l}return c},l.prototype._generateSourcesContent=function(e,t){return e.map(function(e){if(!this._sourcesContents)return null;t!=null&&(e=o.relative(t,e));var n=o.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,n)?this._sourcesContents[n]:null},this)},l.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(e.file=this._file),this._sourceRoot!=null&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},l.prototype.toString=function(){return JSON.stringify(this.toJSON())},e.SourceMapGenerator=l}));export default a();export{a as require_source_map_generator};
@@ -0,0 +1 @@
1
+ import{__commonJSMin as e}from"../../../../../../_virtual/_rolldown/runtime.mjs";import{require_util as t}from"./util.mjs";import{require_source_map_generator as n}from"./source-map-generator.mjs";var r=/* @__PURE__ */ e((e=>{var r=n().SourceMapGenerator,i=t(),a=/(\r?\n)/,o=10,s=`$$$isSourceNode$$$`;function c(e,t,n,r,i){this.children=[],this.sourceContents={},this.line=e??null,this.column=t??null,this.source=n??null,this.name=i??null,this[s]=!0,r!=null&&this.add(r)}c.fromStringWithSourceMap=function(e,t,n){var r=new c,o=e.split(a),s=0,l=function(){return e()+(e()||``);function e(){return s<o.length?o[s++]:void 0}},u=1,d=0,f=null;return t.eachMapping(function(e){if(f!==null){if(u<e.generatedLine)p(f,l()),u++,d=0;else{var t=o[s]||``,n=t.substr(0,e.generatedColumn-d);o[s]=t.substr(e.generatedColumn-d),d=e.generatedColumn,p(f,n),f=e;return}}for(;u<e.generatedLine;)r.add(l()),u++;if(d<e.generatedColumn){var t=o[s]||``;r.add(t.substr(0,e.generatedColumn)),o[s]=t.substr(e.generatedColumn),d=e.generatedColumn}f=e},this),s<o.length&&(f&&p(f,l()),r.add(o.splice(s).join(``))),t.sources.forEach(function(e){var a=t.sourceContentFor(e);a!=null&&(n!=null&&(e=i.join(n,e)),r.setSourceContent(e,a))}),r;function p(e,t){if(e===null||e.source===void 0)r.add(t);else{var a=n?i.join(n,e.source):e.source;r.add(new c(e.originalLine,e.originalColumn,a,t,e.name))}}},c.prototype.add=function(e){if(Array.isArray(e))e.forEach(function(e){this.add(e)},this);else if(e[s]||typeof e==`string`)e&&this.children.push(e);else throw TypeError(`Expected a SourceNode, string, or an array of SourceNodes and strings. Got `+e);return this},c.prototype.prepend=function(e){if(Array.isArray(e))for(var t=e.length-1;t>=0;t--)this.prepend(e[t]);else if(e[s]||typeof e==`string`)this.children.unshift(e);else throw TypeError(`Expected a SourceNode, string, or an array of SourceNodes and strings. Got `+e);return this},c.prototype.walk=function(e){for(var t,n=0,r=this.children.length;n<r;n++)t=this.children[n],t[s]?t.walk(e):t!==``&&e(t,{source:this.source,line:this.line,column:this.column,name:this.name})},c.prototype.join=function(e){var t,n,r=this.children.length;if(r>0){for(t=[],n=0;n<r-1;n++)t.push(this.children[n]),t.push(e);t.push(this.children[n]),this.children=t}return this},c.prototype.replaceRight=function(e,t){var n=this.children[this.children.length-1];return n[s]?n.replaceRight(e,t):typeof n==`string`?this.children[this.children.length-1]=n.replace(e,t):this.children.push(``.replace(e,t)),this},c.prototype.setSourceContent=function(e,t){this.sourceContents[i.toSetString(e)]=t},c.prototype.walkSourceContents=function(e){for(var t=0,n=this.children.length;t<n;t++)this.children[t][s]&&this.children[t].walkSourceContents(e);for(var r=Object.keys(this.sourceContents),t=0,n=r.length;t<n;t++)e(i.fromSetString(r[t]),this.sourceContents[r[t]])},c.prototype.toString=function(){var e=``;return this.walk(function(t){e+=t}),e},c.prototype.toStringWithSourceMap=function(e){var t={code:``,line:1,column:0},n=new r(e),i=!1,a=null,s=null,c=null,l=null;return this.walk(function(e,r){t.code+=e,r.source!==null&&r.line!==null&&r.column!==null?((a!==r.source||s!==r.line||c!==r.column||l!==r.name)&&n.addMapping({source:r.source,original:{line:r.line,column:r.column},generated:{line:t.line,column:t.column},name:r.name}),a=r.source,s=r.line,c=r.column,l=r.name,i=!0):i&&(n.addMapping({generated:{line:t.line,column:t.column}}),a=null,i=!1);for(var u=0,d=e.length;u<d;u++)e.charCodeAt(u)===o?(t.line++,t.column=0,u+1===d?(a=null,i=!1):i&&n.addMapping({source:r.source,original:{line:r.line,column:r.column},generated:{line:t.line,column:t.column},name:r.name})):t.column++}),this.walkSourceContents(function(e,t){n.setSourceContent(e,t)}),{code:t.code,map:n}},e.SourceNode=c}));export default r();export{r as require_source_node};
@@ -0,0 +1 @@
1
+ import{__commonJSMin as e}from"../../../../../../_virtual/_rolldown/runtime.mjs";var t=/* @__PURE__ */ e((e=>{function t(e,t,n){if(t in e)return e[t];if(arguments.length===3)return n;throw Error(`"`+t+`" is a required argument.`)}e.getArg=t;var n=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,r=/^data:.+\,.+$/;function i(e){var t=e.match(n);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}e.urlParse=i;function a(e){var t=``;return e.scheme&&(t+=e.scheme+`:`),t+=`//`,e.auth&&(t+=e.auth+`@`),e.host&&(t+=e.host),e.port&&(t+=`:`+e.port),e.path&&(t+=e.path),t}e.urlGenerate=a;function o(t){var n=t,r=i(t);if(r){if(!r.path)return t;n=r.path}for(var o=e.isAbsolute(n),s=n.split(/\/+/),c,l=0,u=s.length-1;u>=0;u--)c=s[u],c===`.`?s.splice(u,1):c===`..`?l++:l>0&&(c===``?(s.splice(u+1,l),l=0):(s.splice(u,2),l--));return n=s.join(`/`),n===``&&(n=o?`/`:`.`),r?(r.path=n,a(r)):n}e.normalize=o;function s(e,t){e===``&&(e=`.`),t===``&&(t=`.`);var n=i(t),s=i(e);if(s&&(e=s.path||`/`),n&&!n.scheme)return s&&(n.scheme=s.scheme),a(n);if(n||t.match(r))return t;if(s&&!s.host&&!s.path)return s.host=t,a(s);var c=t.charAt(0)===`/`?t:o(e.replace(/\/+$/,``)+`/`+t);return s?(s.path=c,a(s)):c}e.join=s,e.isAbsolute=function(e){return e.charAt(0)===`/`||n.test(e)};function c(e,t){e===``&&(e=`.`),e=e.replace(/\/$/,``);for(var n=0;t.indexOf(e+`/`)!==0;){var r=e.lastIndexOf(`/`);if(r<0||(e=e.slice(0,r),e.match(/^([^\/]+:\/)?\/*$/)))return t;++n}return Array(n+1).join(`../`)+t.substr(e.length+1)}e.relative=c;var l=function(){return!(`__proto__`in Object.create(null))}();function u(e){return e}function d(e){return p(e)?`$`+e:e}e.toSetString=l?u:d;function f(e){return p(e)?e.slice(1):e}e.fromSetString=l?u:f;function p(e){if(!e)return!1;var t=e.length;if(t<9||e.charCodeAt(t-1)!==95||e.charCodeAt(t-2)!==95||e.charCodeAt(t-3)!==111||e.charCodeAt(t-4)!==116||e.charCodeAt(t-5)!==111||e.charCodeAt(t-6)!==114||e.charCodeAt(t-7)!==112||e.charCodeAt(t-8)!==95||e.charCodeAt(t-9)!==95)return!1;for(var n=t-10;n>=0;n--)if(e.charCodeAt(n)!==36)return!1;return!0}function m(e,t,n){var r=g(e.source,t.source);return r!==0||(r=e.originalLine-t.originalLine,r!==0)||(r=e.originalColumn-t.originalColumn,r!==0||n)||(r=e.generatedColumn-t.generatedColumn,r!==0)||(r=e.generatedLine-t.generatedLine,r!==0)?r:g(e.name,t.name)}e.compareByOriginalPositions=m;function h(e,t,n){var r=e.generatedLine-t.generatedLine;return r!==0||(r=e.generatedColumn-t.generatedColumn,r!==0||n)||(r=g(e.source,t.source),r!==0)||(r=e.originalLine-t.originalLine,r!==0)||(r=e.originalColumn-t.originalColumn,r!==0)?r:g(e.name,t.name)}e.compareByGeneratedPositionsDeflated=h;function g(e,t){return e===t?0:e===null?1:t===null?-1:e>t?1:-1}function _(e,t){var n=e.generatedLine-t.generatedLine;return n!==0||(n=e.generatedColumn-t.generatedColumn,n!==0)||(n=g(e.source,t.source),n!==0)||(n=e.originalLine-t.originalLine,n!==0)||(n=e.originalColumn-t.originalColumn,n!==0)?n:g(e.name,t.name)}e.compareByGeneratedPositionsInflated=_;function v(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,``))}e.parseSourceMapInput=v;function y(e,t,n){if(t=t||``,e&&(e[e.length-1]!==`/`&&t[0]!==`/`&&(e+=`/`),t=e+t),n){var r=i(n);if(!r)throw Error(`sourceMapURL could not be parsed`);if(r.path){var c=r.path.lastIndexOf(`/`);c>=0&&(r.path=r.path.substring(0,c+1))}t=s(a(r),t)}return o(t)}e.computeSourceURL=y}));export default t();export{t as require_util};
@@ -0,0 +1 @@
1
+ import{__commonJSMin as e}from"../../../../../_virtual/_rolldown/runtime.mjs";import{require_source_map_generator as t}from"./lib/source-map-generator.mjs";import{require_source_map_consumer as n}from"./lib/source-map-consumer.mjs";import{require_source_node as r}from"./lib/source-node.mjs";var i=/* @__PURE__ */ e((e=>{e.SourceMapGenerator=t().SourceMapGenerator,e.SourceMapConsumer=n().SourceMapConsumer,e.SourceNode=r().SourceNode}));export default i();export{i as require_source_map};