From 6f9e0ff261581a1dc190ac3725bce5f710984ff3 Mon Sep 17 00:00:00 2001 From: MK Date: Sun, 29 Mar 2026 22:17:34 +0800 Subject: [PATCH 1/2] feat: add VP_VERSION env var for vite-plus install script compatibility Set both VP_VERSION (new) and VITE_PLUS_VERSION (legacy) when invoking the install script, so the action works with vite-plus versions before and after the VP_* env var rename. Ref: voidzero-dev/vite-plus#1166 --- dist/index.mjs | 2 +- src/install-viteplus.ts | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/dist/index.mjs b/dist/index.mjs index a2c6581..25eb954 100644 --- a/dist/index.mjs +++ b/dist/index.mjs @@ -165,7 +165,7 @@ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,`$1$2`).replace(/\ `)}t.write(`payload.value = newResult;`),t.write(`return payload;`);let s=t.compile();return(t,n)=>s(e,t,n)},a,o=Sa,s=!ca.jitless,c=s&&Ca.value,l=t.catchall,u;e._zod.parse=(d,f)=>{u??=r.value;let p=d.value;return o(p)?s&&c&&f?.async===!1&&f.jitless!==!0?(a||=i(t.shape),d=a(d,f),l?Ps([],p,d,f,u,e):d):n(d,f):(d.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),d)}});function Ls(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!La(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>Ba(e,r,la())))}),t)}const Rs=z(`$ZodUnion`,(e,t)=>{Zo.init(e,t),ga(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),ga(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),ga(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),ga(e._zod,`pattern`,()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>ma(e.source)).join(`|`)})$`)}});let n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(i,a)=>{if(n)return r(i,a);let o=!1,s=[];for(let e of t.options){let t=e._zod.run({value:i.value,issues:[]},a);if(t instanceof Promise)s.push(t),o=!0;else{if(t.issues.length===0)return t;s.push(t)}}return o?Promise.all(s).then(t=>Ls(t,i,e,a)):Ls(s,i,e,a)}}),zs=z(`$ZodIntersection`,(e,t)=>{Zo.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>Vs(e,t,n)):Vs(e,i,a)}});function Bs(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(wa(e)&&wa(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=Bs(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;re.l&&e.r).map(([e])=>e);if(a.length&&i&&e.issues.push({...i,keys:a}),La(e))return e;let o=Bs(t.value,n.value);if(!o.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}const Hs=z(`$ZodEnum`,(e,t)=>{Zo.init(e,t);let n=ua(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>Ea.has(typeof e)).map(e=>typeof e==`string`?Da(e):e.toString()).join(`|`)})$`),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),Us=z(`$ZodTransform`,(e,t)=>{Zo.init(e,t),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new sa(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n));if(i instanceof Promise)throw new oa;return n.value=i,n}});function Ws(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const Gs=z(`$ZodOptional`,(e,t)=>{Zo.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,ga(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),ga(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${ma(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(t.innerType._zod.optin===`optional`){let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(t=>Ws(t,e.value)):Ws(r,e.value)}return e.value===void 0?e:t.innerType._zod.run(e,n)}}),Ks=z(`$ZodExactOptional`,(e,t)=>{Gs.init(e,t),ga(e._zod,`values`,()=>t.innerType._zod.values),ga(e._zod,`pattern`,()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),qs=z(`$ZodNullable`,(e,t)=>{Zo.init(e,t),ga(e._zod,`optin`,()=>t.innerType._zod.optin),ga(e._zod,`optout`,()=>t.innerType._zod.optout),ga(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${ma(e.source)}|null)$`):void 0}),ga(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),Js=z(`$ZodDefault`,(e,t)=>{Zo.init(e,t),e._zod.optin=`optional`,ga(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>Ys(e,t)):Ys(r,t)}});function Ys(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const Xs=z(`$ZodPrefault`,(e,t)=>{Zo.init(e,t),e._zod.optin=`optional`,ga(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),Zs=z(`$ZodNonOptional`,(e,t)=>{Zo.init(e,t),ga(e._zod,`values`,()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>Qs(t,e)):Qs(i,e)}});function Qs(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}const $s=z(`$ZodCatch`,(e,t)=>{Zo.init(e,t),ga(e._zod,`optin`,()=>t.innerType._zod.optin),ga(e._zod,`optout`,()=>t.innerType._zod.optout),ga(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>Ba(e,n,la()))},input:e.value}),e.issues=[]),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>Ba(e,n,la()))},input:e.value}),e.issues=[]),e)}}),ec=z(`$ZodPipe`,(e,t)=>{Zo.init(e,t),ga(e._zod,`values`,()=>t.in._zod.values),ga(e._zod,`optin`,()=>t.in._zod.optin),ga(e._zod,`optout`,()=>t.out._zod.optout),ga(e._zod,`propValues`,()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>tc(e,t.in,n)):tc(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>tc(e,t.out,n)):tc(r,t.out,n)}});function tc(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const nc=z(`$ZodReadonly`,(e,t)=>{Zo.init(e,t),ga(e._zod,`propValues`,()=>t.innerType._zod.propValues),ga(e._zod,`values`,()=>t.innerType._zod.values),ga(e._zod,`optin`,()=>t.innerType?._zod?.optin),ga(e._zod,`optout`,()=>t.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(rc):rc(r)}});function rc(e){return e.value=Object.freeze(e.value),e}const ic=z(`$ZodCustom`,(e,t)=>{Lo.init(e,t),Zo.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>ac(t,n,r,e));ac(i,n,r,e)}});function ac(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(Ha(e))}}var oc,sc=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function cc(){return new sc}(oc=globalThis).__zod_globalRegistry??(oc.__zod_globalRegistry=cc());const lc=globalThis.__zod_globalRegistry;function uc(e,t){return new e({type:`string`,...B(t)})}function dc(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...B(t)})}function fc(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...B(t)})}function pc(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...B(t)})}function mc(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...B(t)})}function hc(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...B(t)})}function gc(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...B(t)})}function _c(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...B(t)})}function vc(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...B(t)})}function yc(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...B(t)})}function bc(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...B(t)})}function xc(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...B(t)})}function Sc(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...B(t)})}function Cc(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...B(t)})}function wc(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...B(t)})}function Tc(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...B(t)})}function Ec(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...B(t)})}function Dc(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...B(t)})}function Oc(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...B(t)})}function kc(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...B(t)})}function Ac(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...B(t)})}function jc(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...B(t)})}function Mc(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...B(t)})}function Nc(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...B(t)})}function Pc(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...B(t)})}function Fc(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...B(t)})}function Ic(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...B(t)})}function Lc(e,t){return new e({type:`boolean`,...B(t)})}function Rc(e,t){return new e({type:`null`,...B(t)})}function zc(e){return new e({type:`unknown`})}function Bc(e,t){return new e({type:`never`,...B(t)})}function Vc(e,t){return new Ro({check:`max_length`,...B(t),maximum:e})}function Hc(e,t){return new zo({check:`min_length`,...B(t),minimum:e})}function Uc(e,t){return new Bo({check:`length_equals`,...B(t),length:e})}function Wc(e,t){return new Ho({check:`string_format`,format:`regex`,...B(t),pattern:e})}function Gc(e){return new Uo({check:`string_format`,format:`lowercase`,...B(e)})}function Kc(e){return new Wo({check:`string_format`,format:`uppercase`,...B(e)})}function qc(e,t){return new Go({check:`string_format`,format:`includes`,...B(t),includes:e})}function Jc(e,t){return new Ko({check:`string_format`,format:`starts_with`,...B(t),prefix:e})}function Yc(e,t){return new qo({check:`string_format`,format:`ends_with`,...B(t),suffix:e})}function Xc(e){return new Jo({check:`overwrite`,tx:e})}function Zc(e){return Xc(t=>t.normalize(e))}function Qc(){return Xc(e=>e.trim())}function $c(){return Xc(e=>e.toLowerCase())}function el(){return Xc(e=>e.toUpperCase())}function tl(){return Xc(e=>ba(e))}function nl(e,t,n){return new e({type:`array`,element:t,...B(n)})}function rl(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...B(n)})}function il(e){let t=al(n=>(n.addIssue=e=>{if(typeof e==`string`)n.issues.push(Ha(e,n.value,t._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,r.input??=n.value,r.inst??=t,r.continue??=!t._zod.def.abort,n.issues.push(Ha(r))}},e(n.value,n)));return t}function al(e,t){let n=new Lo({check:`custom`,...B(t)});return n._zod.check=e,n}function ol(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??lc,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,external:e?.external??void 0}}function sl(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o);let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,sl(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(o.schema,c),t.io===`input`&&ul(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&o.schema._prefault&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function cl(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${a}`}}if(t[1]===n)return{ref:`#`};let i=`#/${r}/`,a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+a}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/ -Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}}function ll(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Object.assign(i,s),Object.assign(i,a),t._zod.parent===o)for(let e in i)e===`$ref`||e===`allOf`||e in a||delete i[e];if(s.$ref&&n.def)for(let e in i)e===`$ref`||e===`allOf`||e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e===`$ref`||e===`allOf`||e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Object.assign(i,n.def??n.schema);let a=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(a[e.defId]=e.def)}e.external||Object.keys(a).length>0&&(e.target===`draft-2020-12`?i.$defs=a:i.definitions=a);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,`~standard`,{value:{...t[`~standard`],jsonSchema:{input:fl(t,`input`,e.processors),output:fl(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function ul(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return ul(r.element,n);if(r.type===`set`)return ul(r.valueType,n);if(r.type===`lazy`)return ul(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type===`default`||r.type===`prefault`)return ul(r.innerType,n);if(r.type===`intersection`)return ul(r.left,n)||ul(r.right,n);if(r.type===`record`||r.type===`map`)return ul(r.keyType,n)||ul(r.valueType,n);if(r.type===`pipe`)return ul(r.in,n)||ul(r.out,n);if(r.type===`object`){for(let e in r.shape)if(ul(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(ul(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(ul(e,n))return!0;return!!(r.rest&&ul(r.rest,n))}return!1}const dl=(e,t={})=>n=>{let r=ol({...n,processors:t});return sl(e,r),cl(r,e),ll(r,e)},fl=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=ol({...i??{},target:a,io:t,processors:n});return sl(e,o),cl(o,e),ll(o,e)},pl={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},ml=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=pl[s]??s,i.format===``&&delete i.format,s===`time`&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},hl=(e,t,n,r)=>{n.type=`boolean`},gl=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},_l=(e,t,n,r)=>{n.not={}},vl=(e,t,n,r)=>{let i=e._zod.def,a=ua(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},yl=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},bl=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},xl=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=sl(a.element,t,{...r,path:[...r.path,`items`]})},Sl=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`,i.properties={};let o=a.shape;for(let e in o)i.properties[e]=sl(o[e],t,{...r,path:[...r.path,`properties`,e]});let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e]._zod;return t.io===`input`?n.optin===void 0:n.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=sl(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},Cl=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>sl(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},wl=(e,t,n,r)=>{let i=e._zod.def,a=sl(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=sl(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1;n.allOf=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]]},Tl=(e,t,n,r)=>{let i=e._zod.def,a=sl(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},El=(e,t,n,r)=>{let i=e._zod.def;sl(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Dl=(e,t,n,r)=>{let i=e._zod.def;sl(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},Ol=(e,t,n,r)=>{let i=e._zod.def;sl(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,t.io===`input`&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},kl=(e,t,n,r)=>{let i=e._zod.def;sl(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw Error(`Dynamic catch values are not supported in JSON Schema`)}n.default=o},Al=(e,t,n,r)=>{let i=e._zod.def,a=t.io===`input`?i.in._zod.def.type===`transform`?i.out:i.in:i.out;sl(a,t,r);let o=t.seen.get(e);o.ref=a},jl=(e,t,n,r)=>{let i=e._zod.def;sl(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},Ml=(e,t,n,r)=>{let i=e._zod.def;sl(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Nl=z(`ZodISODateTime`,(e,t)=>{ds.init(e,t),ou.init(e,t)});function Pl(e){return Nc(Nl,e)}const Fl=z(`ZodISODate`,(e,t)=>{fs.init(e,t),ou.init(e,t)});function Il(e){return Pc(Fl,e)}const Ll=z(`ZodISOTime`,(e,t)=>{ps.init(e,t),ou.init(e,t)});function Rl(e){return Fc(Ll,e)}const zl=z(`ZodISODuration`,(e,t)=>{ms.init(e,t),ou.init(e,t)});function Bl(e){return Ic(zl,e)}const Vl=(e,t)=>{Wa.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>qa(e,t)},flatten:{value:t=>Ka(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,da,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,da,2)}},isEmpty:{get(){return e.issues.length===0}}})},Hl=z(`ZodError`,Vl),Ul=z(`ZodError`,Vl,{Parent:Error}),Wl=Ja(Ul),Gl=Ya(Ul),Kl=Xa(Ul),ql=Qa(Ul),Jl=eo(Ul),Yl=to(Ul),Xl=no(Ul),Zl=ro(Ul),Ql=io(Ul),$l=ao(Ul),eu=oo(Ul),tu=so(Ul),nu=z(`ZodType`,(e,t)=>(Zo.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:fl(e,`input`),output:fl(e,`output`)}}),e.toJSONSchema=dl(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,`_def`,{value:t}),e.check=(...n)=>e.clone(va(t,{checks:[...t.checks??[],...n.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0}),e.with=e.check,e.clone=(t,n)=>Oa(e,t,n),e.brand=()=>e,e.register=((t,n)=>(t.add(e,n),e)),e.parse=(t,n)=>Wl(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>Kl(e,t,n),e.parseAsync=async(t,n)=>Gl(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>ql(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>Jl(e,t,n),e.decode=(t,n)=>Yl(e,t,n),e.encodeAsync=async(t,n)=>Xl(e,t,n),e.decodeAsync=async(t,n)=>Zl(e,t,n),e.safeEncode=(t,n)=>Ql(e,t,n),e.safeDecode=(t,n)=>$l(e,t,n),e.safeEncodeAsync=async(t,n)=>eu(e,t,n),e.safeDecodeAsync=async(t,n)=>tu(e,t,n),e.refine=(t,n)=>e.check(dd(t,n)),e.superRefine=t=>e.check(fd(t)),e.overwrite=t=>e.check(Xc(t)),e.optional=()=>qu(e),e.exactOptional=()=>Yu(e),e.nullable=()=>Zu(e),e.nullish=()=>qu(Zu(e)),e.nonoptional=t=>rd(e,t),e.array=()=>Fu(e),e.or=t=>zu([e,t]),e.and=t=>Vu(e,t),e.transform=t=>sd(e,Gu(t)),e.default=t=>$u(e,t),e.prefault=t=>td(e,t),e.catch=t=>ad(e,t),e.pipe=t=>sd(e,t),e.readonly=()=>ld(e),e.describe=t=>{let n=e.clone();return lc.add(n,{description:t}),n},Object.defineProperty(e,`description`,{get(){return lc.get(e)?.description},configurable:!0}),e.meta=(...t)=>{if(t.length===0)return lc.get(e);let n=e.clone();return lc.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=t=>t(e),e)),ru=z(`_ZodString`,(e,t)=>{Qo.init(e,t),nu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ml(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...t)=>e.check(Wc(...t)),e.includes=(...t)=>e.check(qc(...t)),e.startsWith=(...t)=>e.check(Jc(...t)),e.endsWith=(...t)=>e.check(Yc(...t)),e.min=(...t)=>e.check(Hc(...t)),e.max=(...t)=>e.check(Vc(...t)),e.length=(...t)=>e.check(Uc(...t)),e.nonempty=(...t)=>e.check(Hc(1,...t)),e.lowercase=t=>e.check(Gc(t)),e.uppercase=t=>e.check(Kc(t)),e.trim=()=>e.check(Qc()),e.normalize=(...t)=>e.check(Zc(...t)),e.toLowerCase=()=>e.check($c()),e.toUpperCase=()=>e.check(el()),e.slugify=()=>e.check(tl())}),iu=z(`ZodString`,(e,t)=>{Qo.init(e,t),ru.init(e,t),e.email=t=>e.check(dc(su,t)),e.url=t=>e.check(_c(uu,t)),e.jwt=t=>e.check(Mc(Tu,t)),e.emoji=t=>e.check(vc(du,t)),e.guid=t=>e.check(fc(cu,t)),e.uuid=t=>e.check(pc(lu,t)),e.uuidv4=t=>e.check(mc(lu,t)),e.uuidv6=t=>e.check(hc(lu,t)),e.uuidv7=t=>e.check(gc(lu,t)),e.nanoid=t=>e.check(yc(fu,t)),e.guid=t=>e.check(fc(cu,t)),e.cuid=t=>e.check(bc(pu,t)),e.cuid2=t=>e.check(xc(mu,t)),e.ulid=t=>e.check(Sc(hu,t)),e.base64=t=>e.check(kc(Su,t)),e.base64url=t=>e.check(Ac(Cu,t)),e.xid=t=>e.check(Cc(gu,t)),e.ksuid=t=>e.check(wc(_u,t)),e.ipv4=t=>e.check(Tc(vu,t)),e.ipv6=t=>e.check(Ec(yu,t)),e.cidrv4=t=>e.check(Dc(bu,t)),e.cidrv6=t=>e.check(Oc(xu,t)),e.e164=t=>e.check(jc(wu,t)),e.datetime=t=>e.check(Pl(t)),e.date=t=>e.check(Il(t)),e.time=t=>e.check(Rl(t)),e.duration=t=>e.check(Bl(t))});function au(e){return uc(iu,e)}const ou=z(`ZodStringFormat`,(e,t)=>{$o.init(e,t),ru.init(e,t)}),su=z(`ZodEmail`,(e,t)=>{ns.init(e,t),ou.init(e,t)}),cu=z(`ZodGUID`,(e,t)=>{es.init(e,t),ou.init(e,t)}),lu=z(`ZodUUID`,(e,t)=>{ts.init(e,t),ou.init(e,t)}),uu=z(`ZodURL`,(e,t)=>{rs.init(e,t),ou.init(e,t)}),du=z(`ZodEmoji`,(e,t)=>{is.init(e,t),ou.init(e,t)}),fu=z(`ZodNanoID`,(e,t)=>{as.init(e,t),ou.init(e,t)}),pu=z(`ZodCUID`,(e,t)=>{os.init(e,t),ou.init(e,t)}),mu=z(`ZodCUID2`,(e,t)=>{ss.init(e,t),ou.init(e,t)}),hu=z(`ZodULID`,(e,t)=>{cs.init(e,t),ou.init(e,t)}),gu=z(`ZodXID`,(e,t)=>{ls.init(e,t),ou.init(e,t)}),_u=z(`ZodKSUID`,(e,t)=>{us.init(e,t),ou.init(e,t)}),vu=z(`ZodIPv4`,(e,t)=>{hs.init(e,t),ou.init(e,t)}),yu=z(`ZodIPv6`,(e,t)=>{gs.init(e,t),ou.init(e,t)}),bu=z(`ZodCIDRv4`,(e,t)=>{_s.init(e,t),ou.init(e,t)}),xu=z(`ZodCIDRv6`,(e,t)=>{vs.init(e,t),ou.init(e,t)}),Su=z(`ZodBase64`,(e,t)=>{bs.init(e,t),ou.init(e,t)}),Cu=z(`ZodBase64URL`,(e,t)=>{Ss.init(e,t),ou.init(e,t)}),wu=z(`ZodE164`,(e,t)=>{Cs.init(e,t),ou.init(e,t)}),Tu=z(`ZodJWT`,(e,t)=>{Ts.init(e,t),ou.init(e,t)}),Eu=z(`ZodBoolean`,(e,t)=>{Es.init(e,t),nu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>hl(e,t,n,r)});function Du(e){return Lc(Eu,e)}const Ou=z(`ZodNull`,(e,t)=>{Ds.init(e,t),nu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>gl(e,t,n,r)});function ku(e){return Rc(Ou,e)}const Au=z(`ZodUnknown`,(e,t)=>{Os.init(e,t),nu.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function ju(){return zc(Au)}const Mu=z(`ZodNever`,(e,t)=>{ks.init(e,t),nu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_l(e,t,n,r)});function Nu(e){return Bc(Mu,e)}const Pu=z(`ZodArray`,(e,t)=>{js.init(e,t),nu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xl(e,t,n,r),e.element=t.element,e.min=(t,n)=>e.check(Hc(t,n)),e.nonempty=t=>e.check(Hc(1,t)),e.max=(t,n)=>e.check(Vc(t,n)),e.length=(t,n)=>e.check(Uc(t,n)),e.unwrap=()=>e.element});function Fu(e,t){return nl(Pu,e,t)}const Iu=z(`ZodObject`,(e,t)=>{Is.init(e,t),nu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Sl(e,t,n,r),ga(e,`shape`,()=>t.shape),e.keyof=()=>Uu(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:ju()}),e.loose=()=>e.clone({...e._zod.def,catchall:ju()}),e.strict=()=>e.clone({...e._zod.def,catchall:Nu()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>Ma(e,t),e.safeExtend=t=>Na(e,t),e.merge=t=>Pa(e,t),e.pick=t=>Aa(e,t),e.omit=t=>ja(e,t),e.partial=(...t)=>Fa(Ku,e,t[0]),e.required=(...t)=>Ia(nd,e,t[0])});function Lu(e,t){return new Iu({type:`object`,shape:e??{},...B(t)})}const Ru=z(`ZodUnion`,(e,t)=>{Rs.init(e,t),nu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Cl(e,t,n,r),e.options=t.options});function zu(e,t){return new Ru({type:`union`,options:e,...B(t)})}const Bu=z(`ZodIntersection`,(e,t)=>{zs.init(e,t),nu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wl(e,t,n,r)});function Vu(e,t){return new Bu({type:`intersection`,left:e,right:t})}const Hu=z(`ZodEnum`,(e,t)=>{Hs.init(e,t),nu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>vl(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new Hu({...t,checks:[],...B(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new Hu({...t,checks:[],...B(r),entries:i})}});function Uu(e,t){return new Hu({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...B(t)})}const Wu=z(`ZodTransform`,(e,t)=>{Us.init(e,t),nu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>bl(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new sa(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(Ha(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(Ha(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function Gu(e){return new Wu({type:`transform`,transform:e})}const Ku=z(`ZodOptional`,(e,t)=>{Gs.init(e,t),nu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ml(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function qu(e){return new Ku({type:`optional`,innerType:e})}const Ju=z(`ZodExactOptional`,(e,t)=>{Ks.init(e,t),nu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ml(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Yu(e){return new Ju({type:`optional`,innerType:e})}const Xu=z(`ZodNullable`,(e,t)=>{qs.init(e,t),nu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Tl(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Zu(e){return new Xu({type:`nullable`,innerType:e})}const Qu=z(`ZodDefault`,(e,t)=>{Js.init(e,t),nu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Dl(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function $u(e,t){return new Qu({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():Ta(t)}})}const ed=z(`ZodPrefault`,(e,t)=>{Xs.init(e,t),nu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ol(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function td(e,t){return new ed({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():Ta(t)}})}const nd=z(`ZodNonOptional`,(e,t)=>{Zs.init(e,t),nu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>El(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function rd(e,t){return new nd({type:`nonoptional`,innerType:e,...B(t)})}const id=z(`ZodCatch`,(e,t)=>{$s.init(e,t),nu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>kl(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function ad(e,t){return new id({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}const od=z(`ZodPipe`,(e,t)=>{ec.init(e,t),nu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Al(e,t,n,r),e.in=t.in,e.out=t.out});function sd(e,t){return new od({type:`pipe`,in:e,out:t})}const cd=z(`ZodReadonly`,(e,t)=>{nc.init(e,t),nu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>jl(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function ld(e){return new cd({type:`readonly`,innerType:e})}const ud=z(`ZodCustom`,(e,t)=>{ic.init(e,t),nu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>yl(e,t,n,r)});function dd(e,t={}){return rl(ud,e,t)}function fd(e){return il(e)}var pd=aa();const md=Lu({cwd:au().optional(),args:Fu(au()).optional()}),hd=zu([ku(),Du(),md,Fu(md)]);let gd=function(e){return e.Npm=`npm`,e.Pnpm=`pnpm`,e.Yarn=`yarn`,e}({}),_d=function(e){return e.IsPost=`IS_POST`,e.CachePrimaryKey=`CACHE_PRIMARY_KEY`,e.CacheMatchedKey=`CACHE_MATCHED_KEY`,e.CachePaths=`CACHE_PATHS`,e.InstalledVersion=`INSTALLED_VERSION`,e}({}),vd=function(e){return e.Version=`version`,e.CacheHit=`cache-hit`,e}({});const yd=`Vite+`;function bd(){return{version:Ar(`version`)||`latest`,nodeVersion:Ar(`node-version`)||void 0,nodeVersionFile:Ar(`node-version-file`)||void 0,workingDirectory:Ar(`working-directory`)||void 0,runInstall:xd(Ar(`run-install`)),cache:jr(`cache`),cacheDependencyPath:Ar(`cache-dependency-path`)||void 0,registryUrl:Ar(`registry-url`)||void 0,scope:Ar(`scope`)||void 0}}function xd(e){if(!e||e===`false`||e===`null`)return[];if(e===`true`)return[{}];let t=(0,pd.parse)(e);try{let e=hd.parse(t);return e?e===!0?[{}]:Array.isArray(e)?e:[e]:[]}catch(e){throw e instanceof Hl?Error(`Invalid run-install input: ${e.issues.map(e=>e.message).join(`, `)}`):e}}function Sd(){return N((process.platform===`win32`?process.env.USERPROFILE:process.env.HOME)||ue(),`.vite-plus`)}function Cd(){return process.env.GITHUB_WORKSPACE||process.cwd()}function wd(e,t){return ee(e)?e:N(t,e)}function Td(e){if(!e.workingDirectory)return Cd();let t=wd(e.workingDirectory,Cd());if(!re(t))throw Error(`working-directory not found: ${e.workingDirectory} (resolved to ${t})`);if(!ae(t).isDirectory())throw Error(`working-directory is not a directory: ${e.workingDirectory} (resolved to ${t})`);return t}function Ed(e,t){return t?wd(t,e):e}const Dd=[{filename:`pnpm-lock.yaml`,type:gd.Pnpm},{filename:`package-lock.json`,type:gd.Npm},{filename:`npm-shrinkwrap.json`,type:gd.Npm},{filename:`yarn.lock`,type:gd.Yarn}];function Od(e,t=Cd()){if(e){let n=wd(e,t);if(re(n)){let e=j(n),t=Dd.find(t=>t.filename===e);return t?{type:t.type,path:n,filename:e}:kd(n,e)}return}let n=ie(t);for(let e of Dd)if(n.includes(e.filename)){let n=N(t,e.filename);return Lr(`Auto-detected lock file: ${e.filename}`),{type:e.type,path:n,filename:e.filename}}}function kd(e,t){return t.includes(`pnpm`)?{type:gd.Pnpm,path:e,filename:t}:t.includes(`yarn`)?{type:gd.Yarn,path:e,filename:t}:{type:gd.Npm,path:e,filename:t}}async function Ad(e,t){switch(e){case gd.Npm:case gd.Pnpm:case gd.Yarn:return Md(t);default:return[]}}async function jd(e,t,n){let r=`${e} ${t.join(` `)}`;try{let i=await Tr(e,t,{cwd:n?.cwd,silent:!0,ignoreReturnCode:!0});if(i.exitCode===0)return i.stdout.trim();R(`Command "${r}" exited with code ${i.exitCode}`);return}catch(e){Ir(`Failed to run "${r}": ${String(e)}`);return}}async function Md(e){let t=await jd(`vp`,[`pm`,`cache`,`dir`],{cwd:e});return t?[t]:[]}async function Nd(e){let{version:t}=e;Lr(`Installing ${yd}@${t}...`);let n={...process.env,VITE_PLUS_VERSION:t},r;if(r=process.platform===`win32`?await wr(`pwsh`,[`-Command`,`& ([scriptblock]::Create((irm https://viteplus.dev/install.ps1)))`],{env:n}):await wr(`bash`,[`-c`,`curl -fsSL https://viteplus.dev/install.sh | bash`],{env:n}),r!==0)throw Error(`Failed to install ${yd}. Exit code: ${r}`);Pd()}function Pd(){let e=N(Sd(),`bin`);process.env.PATH?.includes(e)||kr(e)}async function Fd(e){let t=Td(e);for(let n of e.runInstall){let e=[`install`];n.args&&e.push(...n.args);let r=Ed(t,n.cwd),i=`vp ${e.join(` `)}`;Rr(`Running ${i} in ${r}...`);try{let t=await wr(`vp`,e,{cwd:r,ignoreReturnCode:!0});t===0?Lr(`Successfully ran ${i}`):Nr(`Command "${i}" (cwd: ${r}) exited with code ${t}`)}catch(e){Nr(`Failed to run ${i}: ${String(e)}`)}finally{zr()}}}function Id(e){let t={followSymbolicLinks:!0,implicitDescendants:!0,matchDirectories:!0,omitBrokenSymbolicLinks:!0,excludeHiddenFiles:!1};return e&&(typeof e.followSymbolicLinks==`boolean`&&(t.followSymbolicLinks=e.followSymbolicLinks,R(`followSymbolicLinks '${t.followSymbolicLinks}'`)),typeof e.implicitDescendants==`boolean`&&(t.implicitDescendants=e.implicitDescendants,R(`implicitDescendants '${t.implicitDescendants}'`)),typeof e.matchDirectories==`boolean`&&(t.matchDirectories=e.matchDirectories,R(`matchDirectories '${t.matchDirectories}'`)),typeof e.omitBrokenSymbolicLinks==`boolean`&&(t.omitBrokenSymbolicLinks=e.omitBrokenSymbolicLinks,R(`omitBrokenSymbolicLinks '${t.omitBrokenSymbolicLinks}'`)),typeof e.excludeHiddenFiles==`boolean`&&(t.excludeHiddenFiles=e.excludeHiddenFiles,R(`excludeHiddenFiles '${t.excludeHiddenFiles}'`))),t}const Ld=process.platform===`win32`;function Rd(e){if(e=Ud(e),Ld&&/^\\\\[^\\]+(\\[^\\]+)?$/.test(e))return e;let t=u.dirname(e);return Ld&&/^\\\\[^\\]+\\[^\\]+\\$/.test(t)&&(t=Ud(t)),t}function zd(e,t){if(h(e,`ensureAbsoluteRoot parameter 'root' must not be empty`),h(t,`ensureAbsoluteRoot parameter 'itemPath' must not be empty`),Bd(t))return t;if(Ld){if(t.match(/^[A-Z]:[^\\/]|^[A-Z]:$/i)){let e=process.cwd();return h(e.match(/^[A-Z]:\\/i),`Expected current directory to start with an absolute drive root. Actual '${e}'`),t[0].toUpperCase()===e[0].toUpperCase()?t.length===2?`${t[0]}:\\${e.substr(3)}`:(e.endsWith(`\\`)||(e+=`\\`),`${t[0]}:\\${e.substr(3)}${t.substr(2)}`):`${t[0]}:\\${t.substr(2)}`}else if(Hd(t).match(/^\\$|^\\[^\\]/)){let e=process.cwd();return h(e.match(/^[A-Z]:\\/i),`Expected current directory to start with an absolute drive root. Actual '${e}'`),`${e[0]}:\\${t.substr(1)}`}}return h(Bd(e),`ensureAbsoluteRoot parameter 'root' must have an absolute root`),e.endsWith(`/`)||Ld&&e.endsWith(`\\`)||(e+=u.sep),e+t}function Bd(e){return h(e,`hasAbsoluteRoot parameter 'itemPath' must not be empty`),e=Hd(e),Ld?e.startsWith(`\\\\`)||/^[A-Z]:\\/i.test(e):e.startsWith(`/`)}function Vd(e){return h(e,`isRooted parameter 'itemPath' must not be empty`),e=Hd(e),Ld?e.startsWith(`\\`)||/^[A-Z]:/i.test(e):e.startsWith(`/`)}function Hd(e){return e||=``,Ld?(e=e.replace(/\//g,`\\`),(/^\\\\+[^\\]/.test(e)?`\\`:``)+e.replace(/\\\\+/g,`\\`)):e.replace(/\/\/+/g,`/`)}function Ud(e){return e?(e=Hd(e),!e.endsWith(u.sep)||e===u.sep||Ld&&/^[A-Z]:\\$/i.test(e)?e:e.substr(0,e.length-1)):``}var Wd;(function(e){e[e.None=0]=`None`,e[e.Directory=1]=`Directory`,e[e.File=2]=`File`,e[e.All=3]=`All`})(Wd||={});const Gd=process.platform===`win32`;function Kd(e){e=e.filter(e=>!e.negate);let t={};for(let n of e){let e=Gd?n.searchPath.toUpperCase():n.searchPath;t[e]=`candidate`}let n=[];for(let r of e){let e=Gd?r.searchPath.toUpperCase():r.searchPath;if(t[e]===`included`)continue;let i=!1,a=e,o=Rd(a);for(;o!==a;){if(t[o]){i=!0;break}a=o,o=Rd(a)}i||(n.push(r.searchPath),t[e]=`included`)}return n}function qd(e,t){let n=Wd.None;for(let r of e)r.negate?n&=~r.match(t):n|=r.match(t);return n}function Jd(e,t){return e.some(e=>!e.negate&&e.partialMatch(t))}var Yd=F(((e,t)=>{t.exports=function(e,t){for(var r=[],i=0;i{t.exports=n;function n(e,t,n){e instanceof RegExp&&(e=r(e,n)),t instanceof RegExp&&(t=r(t,n));var a=i(e,t,n);return a&&{start:a[0],end:a[1],pre:n.slice(0,a[0]),body:n.slice(a[0]+e.length,a[1]),post:n.slice(a[1]+t.length)}}function r(e,t){var n=t.match(e);return n?n[0]:null}n.range=i;function i(e,t,n){var r,i,a,o,s,c=n.indexOf(e),l=n.indexOf(t,c+1),u=c;if(c>=0&&l>0){if(e===t)return[c,l];for(r=[],a=n.length;u>=0&&!s;)u==c?(r.push(u),c=n.indexOf(e,u+1)):r.length==1?s=[r.pop(),l]:(i=r.pop(),i=0?c:l;r.length&&(s=[a,o])}return s}})),Zd=F(((e,t)=>{var n=Yd(),r=Xd();t.exports=p;var i=`\0SLASH`+Math.random()+`\0`,a=`\0OPEN`+Math.random()+`\0`,o=`\0CLOSE`+Math.random()+`\0`,s=`\0COMMA`+Math.random()+`\0`,c=`\0PERIOD`+Math.random()+`\0`;function l(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function u(e){return e.split(`\\\\`).join(i).split(`\\{`).join(a).split(`\\}`).join(o).split(`\\,`).join(s).split(`\\.`).join(c)}function d(e){return e.split(i).join(`\\`).split(a).join(`{`).split(o).join(`}`).split(s).join(`,`).split(c).join(`.`)}function f(e){if(!e)return[``];var t=[],n=r(`{`,`}`,e);if(!n)return e.split(`,`);var i=n.pre,a=n.body,o=n.post,s=i.split(`,`);s[s.length-1]+=`{`+a+`}`;var c=f(o);return o.length&&(s[s.length-1]+=c.shift(),s.push.apply(s,c)),t.push.apply(t,s),t}function p(e){return e?(e.substr(0,2)===`{}`&&(e=`\\{\\}`+e.substr(2)),v(u(e),!0).map(d)):[]}function m(e){return`{`+e+`}`}function h(e){return/^-?0\d/.test(e)}function g(e,t){return e<=t}function _(e,t){return e>=t}function v(e,t){var i=[],a=r(`{`,`}`,e);if(!a||/\$$/.test(a.pre))return[e];var s=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(a.body),c=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(a.body),u=s||c,d=a.body.indexOf(`,`)>=0;if(!u&&!d)return a.post.match(/,(?!,).*\}/)?(e=a.pre+`{`+a.body+o+a.post,v(e)):[e];var p;if(u)p=a.body.split(/\.\./);else if(p=f(a.body),p.length===1&&(p=v(p[0],!1).map(m),p.length===1)){var y=a.post.length?v(a.post,!1):[``];return y.map(function(e){return a.pre+p[0]+e})}var b=a.pre,y=a.post.length?v(a.post,!1):[``],x;if(u){var S=l(p[0]),C=l(p[1]),w=Math.max(p[0].length,p[1].length),T=p.length==3?Math.abs(l(p[2])):1,E=g;C0){var j=Array(A+1).join(`0`);k=O<0?`-`+j+k.slice(1):j+k}}x.push(k)}}else x=n(p,function(e){return v(e,!1)});for(var M=0;M{t.exports=h,h.Minimatch=g;var n=function(){try{return I(`path`)}catch{}}()||{sep:`/`};h.sep=n.sep;var r=h.GLOBSTAR=g.GLOBSTAR={},i=Zd(),a={"!":{open:`(?:(?!(?:`,close:`))[^/]*?)`},"?":{open:`(?:`,close:`)?`},"+":{open:`(?:`,close:`)+`},"*":{open:`(?:`,close:`)*`},"@":{open:`(?:`,close:`)`}},o=`[^/]`,s=o+`*?`,c=`(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?`,l=`(?:(?!(?:\\/|^)\\.).)*?`,u=d(`().*{}+?[]^$\\!`);function d(e){return e.split(``).reduce(function(e,t){return e[t]=!0,e},{})}var f=/\/+/;h.filter=p;function p(e,t){return t||={},function(n,r,i){return h(n,e,t)}}function m(e,t){t||={};var n={};return Object.keys(e).forEach(function(t){n[t]=e[t]}),Object.keys(t).forEach(function(e){n[e]=t[e]}),n}h.defaults=function(e){if(!e||typeof e!=`object`||!Object.keys(e).length)return h;var t=h,n=function(n,r,i){return t(n,r,m(e,i))};return n.Minimatch=function(n,r){return new t.Minimatch(n,m(e,r))},n.Minimatch.defaults=function(n){return t.defaults(m(e,n)).Minimatch},n.filter=function(n,r){return t.filter(n,m(e,r))},n.defaults=function(n){return t.defaults(m(e,n))},n.makeRe=function(n,r){return t.makeRe(n,m(e,r))},n.braceExpand=function(n,r){return t.braceExpand(n,m(e,r))},n.match=function(n,r,i){return t.match(n,r,m(e,i))},n},g.defaults=function(e){return h.defaults(e).Minimatch};function h(e,t,n){return x(t),n||={},!n.nocomment&&t.charAt(0)===`#`?!1:new g(t,n).match(e)}function g(e,t){if(!(this instanceof g))return new g(e,t);x(e),t||={},e=e.trim(),!t.allowWindowsEscape&&n.sep!==`/`&&(e=e.split(n.sep).join(`/`)),this.options=t,this.maxGlobstarRecursion=t.maxGlobstarRecursion===void 0?200:t.maxGlobstarRecursion,this.set=[],this.pattern=e,this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.make()}g.prototype.debug=function(){},g.prototype.make=_;function _(){var e=this.pattern,t=this.options;if(!t.nocomment&&e.charAt(0)===`#`){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate();var n=this.globSet=this.braceExpand();t.debug&&(this.debug=function(){console.error.apply(console,arguments)}),this.debug(this.pattern,n),n=this.globParts=n.map(function(e){return e.split(f)}),this.debug(this.pattern,n),n=n.map(function(e,t,n){return e.map(this.parse,this)},this),this.debug(this.pattern,n),n=n.filter(function(e){return e.indexOf(!1)===-1}),this.debug(this.pattern,n),this.set=n}g.prototype.parseNegate=v;function v(){var e=this.pattern,t=!1,n=this.options,r=0;if(!n.nonegate){for(var i=0,a=e.length;ib)throw TypeError(`pattern is too long`)};g.prototype.parse=C;var S={};function C(e,t){x(e);var n=this.options;if(e===`**`)if(n.noglobstar)e=`*`;else return r;if(e===``)return``;var i=``,c=!!n.nocase,l=!1,d=[],f=[],p,m=!1,h=-1,g=-1,_=e.charAt(0)===`.`?``:n.dot?`(?!(?:^|\\/)\\.{1,2}(?:$|\\/))`:`(?!\\.)`,v=this;function y(){if(p){switch(p){case`*`:i+=s,c=!0;break;case`?`:i+=o,c=!0;break;default:i+=`\\`+p;break}v.debug(`clearStateChar %j %j`,p,i),p=!1}}for(var b=0,C=e.length,w;b1&&e.reused===`ref`){a(n);continue}}}function ll(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Object.assign(i,s),Object.assign(i,a),t._zod.parent===o)for(let e in i)e===`$ref`||e===`allOf`||e in a||delete i[e];if(s.$ref&&n.def)for(let e in i)e===`$ref`||e===`allOf`||e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e===`$ref`||e===`allOf`||e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Object.assign(i,n.def??n.schema);let a=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(a[e.defId]=e.def)}e.external||Object.keys(a).length>0&&(e.target===`draft-2020-12`?i.$defs=a:i.definitions=a);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,`~standard`,{value:{...t[`~standard`],jsonSchema:{input:fl(t,`input`,e.processors),output:fl(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function ul(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return ul(r.element,n);if(r.type===`set`)return ul(r.valueType,n);if(r.type===`lazy`)return ul(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type===`default`||r.type===`prefault`)return ul(r.innerType,n);if(r.type===`intersection`)return ul(r.left,n)||ul(r.right,n);if(r.type===`record`||r.type===`map`)return ul(r.keyType,n)||ul(r.valueType,n);if(r.type===`pipe`)return ul(r.in,n)||ul(r.out,n);if(r.type===`object`){for(let e in r.shape)if(ul(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(ul(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(ul(e,n))return!0;return!!(r.rest&&ul(r.rest,n))}return!1}const dl=(e,t={})=>n=>{let r=ol({...n,processors:t});return sl(e,r),cl(r,e),ll(r,e)},fl=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=ol({...i??{},target:a,io:t,processors:n});return sl(e,o),cl(o,e),ll(o,e)},pl={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},ml=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=pl[s]??s,i.format===``&&delete i.format,s===`time`&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},hl=(e,t,n,r)=>{n.type=`boolean`},gl=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},_l=(e,t,n,r)=>{n.not={}},vl=(e,t,n,r)=>{let i=e._zod.def,a=ua(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},yl=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},bl=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},xl=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=sl(a.element,t,{...r,path:[...r.path,`items`]})},Sl=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`,i.properties={};let o=a.shape;for(let e in o)i.properties[e]=sl(o[e],t,{...r,path:[...r.path,`properties`,e]});let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e]._zod;return t.io===`input`?n.optin===void 0:n.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=sl(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},Cl=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>sl(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},wl=(e,t,n,r)=>{let i=e._zod.def,a=sl(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=sl(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1;n.allOf=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]]},Tl=(e,t,n,r)=>{let i=e._zod.def,a=sl(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},El=(e,t,n,r)=>{let i=e._zod.def;sl(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Dl=(e,t,n,r)=>{let i=e._zod.def;sl(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},Ol=(e,t,n,r)=>{let i=e._zod.def;sl(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,t.io===`input`&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},kl=(e,t,n,r)=>{let i=e._zod.def;sl(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw Error(`Dynamic catch values are not supported in JSON Schema`)}n.default=o},Al=(e,t,n,r)=>{let i=e._zod.def,a=t.io===`input`?i.in._zod.def.type===`transform`?i.out:i.in:i.out;sl(a,t,r);let o=t.seen.get(e);o.ref=a},jl=(e,t,n,r)=>{let i=e._zod.def;sl(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},Ml=(e,t,n,r)=>{let i=e._zod.def;sl(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Nl=z(`ZodISODateTime`,(e,t)=>{ds.init(e,t),ou.init(e,t)});function Pl(e){return Nc(Nl,e)}const Fl=z(`ZodISODate`,(e,t)=>{fs.init(e,t),ou.init(e,t)});function Il(e){return Pc(Fl,e)}const Ll=z(`ZodISOTime`,(e,t)=>{ps.init(e,t),ou.init(e,t)});function Rl(e){return Fc(Ll,e)}const zl=z(`ZodISODuration`,(e,t)=>{ms.init(e,t),ou.init(e,t)});function Bl(e){return Ic(zl,e)}const Vl=(e,t)=>{Wa.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>qa(e,t)},flatten:{value:t=>Ka(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,da,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,da,2)}},isEmpty:{get(){return e.issues.length===0}}})},Hl=z(`ZodError`,Vl),Ul=z(`ZodError`,Vl,{Parent:Error}),Wl=Ja(Ul),Gl=Ya(Ul),Kl=Xa(Ul),ql=Qa(Ul),Jl=eo(Ul),Yl=to(Ul),Xl=no(Ul),Zl=ro(Ul),Ql=io(Ul),$l=ao(Ul),eu=oo(Ul),tu=so(Ul),nu=z(`ZodType`,(e,t)=>(Zo.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:fl(e,`input`),output:fl(e,`output`)}}),e.toJSONSchema=dl(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,`_def`,{value:t}),e.check=(...n)=>e.clone(va(t,{checks:[...t.checks??[],...n.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0}),e.with=e.check,e.clone=(t,n)=>Oa(e,t,n),e.brand=()=>e,e.register=((t,n)=>(t.add(e,n),e)),e.parse=(t,n)=>Wl(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>Kl(e,t,n),e.parseAsync=async(t,n)=>Gl(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>ql(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>Jl(e,t,n),e.decode=(t,n)=>Yl(e,t,n),e.encodeAsync=async(t,n)=>Xl(e,t,n),e.decodeAsync=async(t,n)=>Zl(e,t,n),e.safeEncode=(t,n)=>Ql(e,t,n),e.safeDecode=(t,n)=>$l(e,t,n),e.safeEncodeAsync=async(t,n)=>eu(e,t,n),e.safeDecodeAsync=async(t,n)=>tu(e,t,n),e.refine=(t,n)=>e.check(dd(t,n)),e.superRefine=t=>e.check(fd(t)),e.overwrite=t=>e.check(Xc(t)),e.optional=()=>qu(e),e.exactOptional=()=>Yu(e),e.nullable=()=>Zu(e),e.nullish=()=>qu(Zu(e)),e.nonoptional=t=>rd(e,t),e.array=()=>Fu(e),e.or=t=>zu([e,t]),e.and=t=>Vu(e,t),e.transform=t=>sd(e,Gu(t)),e.default=t=>$u(e,t),e.prefault=t=>td(e,t),e.catch=t=>ad(e,t),e.pipe=t=>sd(e,t),e.readonly=()=>ld(e),e.describe=t=>{let n=e.clone();return lc.add(n,{description:t}),n},Object.defineProperty(e,`description`,{get(){return lc.get(e)?.description},configurable:!0}),e.meta=(...t)=>{if(t.length===0)return lc.get(e);let n=e.clone();return lc.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=t=>t(e),e)),ru=z(`_ZodString`,(e,t)=>{Qo.init(e,t),nu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ml(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...t)=>e.check(Wc(...t)),e.includes=(...t)=>e.check(qc(...t)),e.startsWith=(...t)=>e.check(Jc(...t)),e.endsWith=(...t)=>e.check(Yc(...t)),e.min=(...t)=>e.check(Hc(...t)),e.max=(...t)=>e.check(Vc(...t)),e.length=(...t)=>e.check(Uc(...t)),e.nonempty=(...t)=>e.check(Hc(1,...t)),e.lowercase=t=>e.check(Gc(t)),e.uppercase=t=>e.check(Kc(t)),e.trim=()=>e.check(Qc()),e.normalize=(...t)=>e.check(Zc(...t)),e.toLowerCase=()=>e.check($c()),e.toUpperCase=()=>e.check(el()),e.slugify=()=>e.check(tl())}),iu=z(`ZodString`,(e,t)=>{Qo.init(e,t),ru.init(e,t),e.email=t=>e.check(dc(su,t)),e.url=t=>e.check(_c(uu,t)),e.jwt=t=>e.check(Mc(Tu,t)),e.emoji=t=>e.check(vc(du,t)),e.guid=t=>e.check(fc(cu,t)),e.uuid=t=>e.check(pc(lu,t)),e.uuidv4=t=>e.check(mc(lu,t)),e.uuidv6=t=>e.check(hc(lu,t)),e.uuidv7=t=>e.check(gc(lu,t)),e.nanoid=t=>e.check(yc(fu,t)),e.guid=t=>e.check(fc(cu,t)),e.cuid=t=>e.check(bc(pu,t)),e.cuid2=t=>e.check(xc(mu,t)),e.ulid=t=>e.check(Sc(hu,t)),e.base64=t=>e.check(kc(Su,t)),e.base64url=t=>e.check(Ac(Cu,t)),e.xid=t=>e.check(Cc(gu,t)),e.ksuid=t=>e.check(wc(_u,t)),e.ipv4=t=>e.check(Tc(vu,t)),e.ipv6=t=>e.check(Ec(yu,t)),e.cidrv4=t=>e.check(Dc(bu,t)),e.cidrv6=t=>e.check(Oc(xu,t)),e.e164=t=>e.check(jc(wu,t)),e.datetime=t=>e.check(Pl(t)),e.date=t=>e.check(Il(t)),e.time=t=>e.check(Rl(t)),e.duration=t=>e.check(Bl(t))});function au(e){return uc(iu,e)}const ou=z(`ZodStringFormat`,(e,t)=>{$o.init(e,t),ru.init(e,t)}),su=z(`ZodEmail`,(e,t)=>{ns.init(e,t),ou.init(e,t)}),cu=z(`ZodGUID`,(e,t)=>{es.init(e,t),ou.init(e,t)}),lu=z(`ZodUUID`,(e,t)=>{ts.init(e,t),ou.init(e,t)}),uu=z(`ZodURL`,(e,t)=>{rs.init(e,t),ou.init(e,t)}),du=z(`ZodEmoji`,(e,t)=>{is.init(e,t),ou.init(e,t)}),fu=z(`ZodNanoID`,(e,t)=>{as.init(e,t),ou.init(e,t)}),pu=z(`ZodCUID`,(e,t)=>{os.init(e,t),ou.init(e,t)}),mu=z(`ZodCUID2`,(e,t)=>{ss.init(e,t),ou.init(e,t)}),hu=z(`ZodULID`,(e,t)=>{cs.init(e,t),ou.init(e,t)}),gu=z(`ZodXID`,(e,t)=>{ls.init(e,t),ou.init(e,t)}),_u=z(`ZodKSUID`,(e,t)=>{us.init(e,t),ou.init(e,t)}),vu=z(`ZodIPv4`,(e,t)=>{hs.init(e,t),ou.init(e,t)}),yu=z(`ZodIPv6`,(e,t)=>{gs.init(e,t),ou.init(e,t)}),bu=z(`ZodCIDRv4`,(e,t)=>{_s.init(e,t),ou.init(e,t)}),xu=z(`ZodCIDRv6`,(e,t)=>{vs.init(e,t),ou.init(e,t)}),Su=z(`ZodBase64`,(e,t)=>{bs.init(e,t),ou.init(e,t)}),Cu=z(`ZodBase64URL`,(e,t)=>{Ss.init(e,t),ou.init(e,t)}),wu=z(`ZodE164`,(e,t)=>{Cs.init(e,t),ou.init(e,t)}),Tu=z(`ZodJWT`,(e,t)=>{Ts.init(e,t),ou.init(e,t)}),Eu=z(`ZodBoolean`,(e,t)=>{Es.init(e,t),nu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>hl(e,t,n,r)});function Du(e){return Lc(Eu,e)}const Ou=z(`ZodNull`,(e,t)=>{Ds.init(e,t),nu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>gl(e,t,n,r)});function ku(e){return Rc(Ou,e)}const Au=z(`ZodUnknown`,(e,t)=>{Os.init(e,t),nu.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function ju(){return zc(Au)}const Mu=z(`ZodNever`,(e,t)=>{ks.init(e,t),nu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_l(e,t,n,r)});function Nu(e){return Bc(Mu,e)}const Pu=z(`ZodArray`,(e,t)=>{js.init(e,t),nu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xl(e,t,n,r),e.element=t.element,e.min=(t,n)=>e.check(Hc(t,n)),e.nonempty=t=>e.check(Hc(1,t)),e.max=(t,n)=>e.check(Vc(t,n)),e.length=(t,n)=>e.check(Uc(t,n)),e.unwrap=()=>e.element});function Fu(e,t){return nl(Pu,e,t)}const Iu=z(`ZodObject`,(e,t)=>{Is.init(e,t),nu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Sl(e,t,n,r),ga(e,`shape`,()=>t.shape),e.keyof=()=>Uu(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:ju()}),e.loose=()=>e.clone({...e._zod.def,catchall:ju()}),e.strict=()=>e.clone({...e._zod.def,catchall:Nu()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>Ma(e,t),e.safeExtend=t=>Na(e,t),e.merge=t=>Pa(e,t),e.pick=t=>Aa(e,t),e.omit=t=>ja(e,t),e.partial=(...t)=>Fa(Ku,e,t[0]),e.required=(...t)=>Ia(nd,e,t[0])});function Lu(e,t){return new Iu({type:`object`,shape:e??{},...B(t)})}const Ru=z(`ZodUnion`,(e,t)=>{Rs.init(e,t),nu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Cl(e,t,n,r),e.options=t.options});function zu(e,t){return new Ru({type:`union`,options:e,...B(t)})}const Bu=z(`ZodIntersection`,(e,t)=>{zs.init(e,t),nu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wl(e,t,n,r)});function Vu(e,t){return new Bu({type:`intersection`,left:e,right:t})}const Hu=z(`ZodEnum`,(e,t)=>{Hs.init(e,t),nu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>vl(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new Hu({...t,checks:[],...B(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new Hu({...t,checks:[],...B(r),entries:i})}});function Uu(e,t){return new Hu({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...B(t)})}const Wu=z(`ZodTransform`,(e,t)=>{Us.init(e,t),nu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>bl(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new sa(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(Ha(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(Ha(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function Gu(e){return new Wu({type:`transform`,transform:e})}const Ku=z(`ZodOptional`,(e,t)=>{Gs.init(e,t),nu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ml(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function qu(e){return new Ku({type:`optional`,innerType:e})}const Ju=z(`ZodExactOptional`,(e,t)=>{Ks.init(e,t),nu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ml(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Yu(e){return new Ju({type:`optional`,innerType:e})}const Xu=z(`ZodNullable`,(e,t)=>{qs.init(e,t),nu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Tl(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Zu(e){return new Xu({type:`nullable`,innerType:e})}const Qu=z(`ZodDefault`,(e,t)=>{Js.init(e,t),nu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Dl(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function $u(e,t){return new Qu({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():Ta(t)}})}const ed=z(`ZodPrefault`,(e,t)=>{Xs.init(e,t),nu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ol(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function td(e,t){return new ed({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():Ta(t)}})}const nd=z(`ZodNonOptional`,(e,t)=>{Zs.init(e,t),nu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>El(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function rd(e,t){return new nd({type:`nonoptional`,innerType:e,...B(t)})}const id=z(`ZodCatch`,(e,t)=>{$s.init(e,t),nu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>kl(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function ad(e,t){return new id({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}const od=z(`ZodPipe`,(e,t)=>{ec.init(e,t),nu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Al(e,t,n,r),e.in=t.in,e.out=t.out});function sd(e,t){return new od({type:`pipe`,in:e,out:t})}const cd=z(`ZodReadonly`,(e,t)=>{nc.init(e,t),nu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>jl(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function ld(e){return new cd({type:`readonly`,innerType:e})}const ud=z(`ZodCustom`,(e,t)=>{ic.init(e,t),nu.init(e,t),e._zod.processJSONSchema=(t,n,r)=>yl(e,t,n,r)});function dd(e,t={}){return rl(ud,e,t)}function fd(e){return il(e)}var pd=aa();const md=Lu({cwd:au().optional(),args:Fu(au()).optional()}),hd=zu([ku(),Du(),md,Fu(md)]);let gd=function(e){return e.Npm=`npm`,e.Pnpm=`pnpm`,e.Yarn=`yarn`,e}({}),_d=function(e){return e.IsPost=`IS_POST`,e.CachePrimaryKey=`CACHE_PRIMARY_KEY`,e.CacheMatchedKey=`CACHE_MATCHED_KEY`,e.CachePaths=`CACHE_PATHS`,e.InstalledVersion=`INSTALLED_VERSION`,e}({}),vd=function(e){return e.Version=`version`,e.CacheHit=`cache-hit`,e}({});const yd=`Vite+`;function bd(){return{version:Ar(`version`)||`latest`,nodeVersion:Ar(`node-version`)||void 0,nodeVersionFile:Ar(`node-version-file`)||void 0,workingDirectory:Ar(`working-directory`)||void 0,runInstall:xd(Ar(`run-install`)),cache:jr(`cache`),cacheDependencyPath:Ar(`cache-dependency-path`)||void 0,registryUrl:Ar(`registry-url`)||void 0,scope:Ar(`scope`)||void 0}}function xd(e){if(!e||e===`false`||e===`null`)return[];if(e===`true`)return[{}];let t=(0,pd.parse)(e);try{let e=hd.parse(t);return e?e===!0?[{}]:Array.isArray(e)?e:[e]:[]}catch(e){throw e instanceof Hl?Error(`Invalid run-install input: ${e.issues.map(e=>e.message).join(`, `)}`):e}}function Sd(){return N((process.platform===`win32`?process.env.USERPROFILE:process.env.HOME)||ue(),`.vite-plus`)}function Cd(){return process.env.GITHUB_WORKSPACE||process.cwd()}function wd(e,t){return ee(e)?e:N(t,e)}function Td(e){if(!e.workingDirectory)return Cd();let t=wd(e.workingDirectory,Cd());if(!re(t))throw Error(`working-directory not found: ${e.workingDirectory} (resolved to ${t})`);if(!ae(t).isDirectory())throw Error(`working-directory is not a directory: ${e.workingDirectory} (resolved to ${t})`);return t}function Ed(e,t){return t?wd(t,e):e}const Dd=[{filename:`pnpm-lock.yaml`,type:gd.Pnpm},{filename:`package-lock.json`,type:gd.Npm},{filename:`npm-shrinkwrap.json`,type:gd.Npm},{filename:`yarn.lock`,type:gd.Yarn}];function Od(e,t=Cd()){if(e){let n=wd(e,t);if(re(n)){let e=j(n),t=Dd.find(t=>t.filename===e);return t?{type:t.type,path:n,filename:e}:kd(n,e)}return}let n=ie(t);for(let e of Dd)if(n.includes(e.filename)){let n=N(t,e.filename);return Lr(`Auto-detected lock file: ${e.filename}`),{type:e.type,path:n,filename:e.filename}}}function kd(e,t){return t.includes(`pnpm`)?{type:gd.Pnpm,path:e,filename:t}:t.includes(`yarn`)?{type:gd.Yarn,path:e,filename:t}:{type:gd.Npm,path:e,filename:t}}async function Ad(e,t){switch(e){case gd.Npm:case gd.Pnpm:case gd.Yarn:return Md(t);default:return[]}}async function jd(e,t,n){let r=`${e} ${t.join(` `)}`;try{let i=await Tr(e,t,{cwd:n?.cwd,silent:!0,ignoreReturnCode:!0});if(i.exitCode===0)return i.stdout.trim();R(`Command "${r}" exited with code ${i.exitCode}`);return}catch(e){Ir(`Failed to run "${r}": ${String(e)}`);return}}async function Md(e){let t=await jd(`vp`,[`pm`,`cache`,`dir`],{cwd:e});return t?[t]:[]}async function Nd(e){let{version:t}=e;Lr(`Installing ${yd}@${t}...`);let n={...process.env,VP_VERSION:t,VITE_PLUS_VERSION:t},r;if(r=process.platform===`win32`?await wr(`pwsh`,[`-Command`,`& ([scriptblock]::Create((irm https://viteplus.dev/install.ps1)))`],{env:n}):await wr(`bash`,[`-c`,`curl -fsSL https://viteplus.dev/install.sh | bash`],{env:n}),r!==0)throw Error(`Failed to install ${yd}. Exit code: ${r}`);Pd()}function Pd(){let e=N(Sd(),`bin`);process.env.PATH?.includes(e)||kr(e)}async function Fd(e){let t=Td(e);for(let n of e.runInstall){let e=[`install`];n.args&&e.push(...n.args);let r=Ed(t,n.cwd),i=`vp ${e.join(` `)}`;Rr(`Running ${i} in ${r}...`);try{let t=await wr(`vp`,e,{cwd:r,ignoreReturnCode:!0});t===0?Lr(`Successfully ran ${i}`):Nr(`Command "${i}" (cwd: ${r}) exited with code ${t}`)}catch(e){Nr(`Failed to run ${i}: ${String(e)}`)}finally{zr()}}}function Id(e){let t={followSymbolicLinks:!0,implicitDescendants:!0,matchDirectories:!0,omitBrokenSymbolicLinks:!0,excludeHiddenFiles:!1};return e&&(typeof e.followSymbolicLinks==`boolean`&&(t.followSymbolicLinks=e.followSymbolicLinks,R(`followSymbolicLinks '${t.followSymbolicLinks}'`)),typeof e.implicitDescendants==`boolean`&&(t.implicitDescendants=e.implicitDescendants,R(`implicitDescendants '${t.implicitDescendants}'`)),typeof e.matchDirectories==`boolean`&&(t.matchDirectories=e.matchDirectories,R(`matchDirectories '${t.matchDirectories}'`)),typeof e.omitBrokenSymbolicLinks==`boolean`&&(t.omitBrokenSymbolicLinks=e.omitBrokenSymbolicLinks,R(`omitBrokenSymbolicLinks '${t.omitBrokenSymbolicLinks}'`)),typeof e.excludeHiddenFiles==`boolean`&&(t.excludeHiddenFiles=e.excludeHiddenFiles,R(`excludeHiddenFiles '${t.excludeHiddenFiles}'`))),t}const Ld=process.platform===`win32`;function Rd(e){if(e=Ud(e),Ld&&/^\\\\[^\\]+(\\[^\\]+)?$/.test(e))return e;let t=u.dirname(e);return Ld&&/^\\\\[^\\]+\\[^\\]+\\$/.test(t)&&(t=Ud(t)),t}function zd(e,t){if(h(e,`ensureAbsoluteRoot parameter 'root' must not be empty`),h(t,`ensureAbsoluteRoot parameter 'itemPath' must not be empty`),Bd(t))return t;if(Ld){if(t.match(/^[A-Z]:[^\\/]|^[A-Z]:$/i)){let e=process.cwd();return h(e.match(/^[A-Z]:\\/i),`Expected current directory to start with an absolute drive root. Actual '${e}'`),t[0].toUpperCase()===e[0].toUpperCase()?t.length===2?`${t[0]}:\\${e.substr(3)}`:(e.endsWith(`\\`)||(e+=`\\`),`${t[0]}:\\${e.substr(3)}${t.substr(2)}`):`${t[0]}:\\${t.substr(2)}`}else if(Hd(t).match(/^\\$|^\\[^\\]/)){let e=process.cwd();return h(e.match(/^[A-Z]:\\/i),`Expected current directory to start with an absolute drive root. Actual '${e}'`),`${e[0]}:\\${t.substr(1)}`}}return h(Bd(e),`ensureAbsoluteRoot parameter 'root' must have an absolute root`),e.endsWith(`/`)||Ld&&e.endsWith(`\\`)||(e+=u.sep),e+t}function Bd(e){return h(e,`hasAbsoluteRoot parameter 'itemPath' must not be empty`),e=Hd(e),Ld?e.startsWith(`\\\\`)||/^[A-Z]:\\/i.test(e):e.startsWith(`/`)}function Vd(e){return h(e,`isRooted parameter 'itemPath' must not be empty`),e=Hd(e),Ld?e.startsWith(`\\`)||/^[A-Z]:/i.test(e):e.startsWith(`/`)}function Hd(e){return e||=``,Ld?(e=e.replace(/\//g,`\\`),(/^\\\\+[^\\]/.test(e)?`\\`:``)+e.replace(/\\\\+/g,`\\`)):e.replace(/\/\/+/g,`/`)}function Ud(e){return e?(e=Hd(e),!e.endsWith(u.sep)||e===u.sep||Ld&&/^[A-Z]:\\$/i.test(e)?e:e.substr(0,e.length-1)):``}var Wd;(function(e){e[e.None=0]=`None`,e[e.Directory=1]=`Directory`,e[e.File=2]=`File`,e[e.All=3]=`All`})(Wd||={});const Gd=process.platform===`win32`;function Kd(e){e=e.filter(e=>!e.negate);let t={};for(let n of e){let e=Gd?n.searchPath.toUpperCase():n.searchPath;t[e]=`candidate`}let n=[];for(let r of e){let e=Gd?r.searchPath.toUpperCase():r.searchPath;if(t[e]===`included`)continue;let i=!1,a=e,o=Rd(a);for(;o!==a;){if(t[o]){i=!0;break}a=o,o=Rd(a)}i||(n.push(r.searchPath),t[e]=`included`)}return n}function qd(e,t){let n=Wd.None;for(let r of e)r.negate?n&=~r.match(t):n|=r.match(t);return n}function Jd(e,t){return e.some(e=>!e.negate&&e.partialMatch(t))}var Yd=F(((e,t)=>{t.exports=function(e,t){for(var r=[],i=0;i{t.exports=n;function n(e,t,n){e instanceof RegExp&&(e=r(e,n)),t instanceof RegExp&&(t=r(t,n));var a=i(e,t,n);return a&&{start:a[0],end:a[1],pre:n.slice(0,a[0]),body:n.slice(a[0]+e.length,a[1]),post:n.slice(a[1]+t.length)}}function r(e,t){var n=t.match(e);return n?n[0]:null}n.range=i;function i(e,t,n){var r,i,a,o,s,c=n.indexOf(e),l=n.indexOf(t,c+1),u=c;if(c>=0&&l>0){if(e===t)return[c,l];for(r=[],a=n.length;u>=0&&!s;)u==c?(r.push(u),c=n.indexOf(e,u+1)):r.length==1?s=[r.pop(),l]:(i=r.pop(),i=0?c:l;r.length&&(s=[a,o])}return s}})),Zd=F(((e,t)=>{var n=Yd(),r=Xd();t.exports=p;var i=`\0SLASH`+Math.random()+`\0`,a=`\0OPEN`+Math.random()+`\0`,o=`\0CLOSE`+Math.random()+`\0`,s=`\0COMMA`+Math.random()+`\0`,c=`\0PERIOD`+Math.random()+`\0`;function l(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function u(e){return e.split(`\\\\`).join(i).split(`\\{`).join(a).split(`\\}`).join(o).split(`\\,`).join(s).split(`\\.`).join(c)}function d(e){return e.split(i).join(`\\`).split(a).join(`{`).split(o).join(`}`).split(s).join(`,`).split(c).join(`.`)}function f(e){if(!e)return[``];var t=[],n=r(`{`,`}`,e);if(!n)return e.split(`,`);var i=n.pre,a=n.body,o=n.post,s=i.split(`,`);s[s.length-1]+=`{`+a+`}`;var c=f(o);return o.length&&(s[s.length-1]+=c.shift(),s.push.apply(s,c)),t.push.apply(t,s),t}function p(e){return e?(e.substr(0,2)===`{}`&&(e=`\\{\\}`+e.substr(2)),v(u(e),!0).map(d)):[]}function m(e){return`{`+e+`}`}function h(e){return/^-?0\d/.test(e)}function g(e,t){return e<=t}function _(e,t){return e>=t}function v(e,t){var i=[],a=r(`{`,`}`,e);if(!a||/\$$/.test(a.pre))return[e];var s=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(a.body),c=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(a.body),u=s||c,d=a.body.indexOf(`,`)>=0;if(!u&&!d)return a.post.match(/,(?!,).*\}/)?(e=a.pre+`{`+a.body+o+a.post,v(e)):[e];var p;if(u)p=a.body.split(/\.\./);else if(p=f(a.body),p.length===1&&(p=v(p[0],!1).map(m),p.length===1)){var y=a.post.length?v(a.post,!1):[``];return y.map(function(e){return a.pre+p[0]+e})}var b=a.pre,y=a.post.length?v(a.post,!1):[``],x;if(u){var S=l(p[0]),C=l(p[1]),w=Math.max(p[0].length,p[1].length),T=p.length==3?Math.abs(l(p[2])):1,E=g;C0){var j=Array(A+1).join(`0`);k=O<0?`-`+j+k.slice(1):j+k}}x.push(k)}}else x=n(p,function(e){return v(e,!1)});for(var M=0;M{t.exports=h,h.Minimatch=g;var n=function(){try{return I(`path`)}catch{}}()||{sep:`/`};h.sep=n.sep;var r=h.GLOBSTAR=g.GLOBSTAR={},i=Zd(),a={"!":{open:`(?:(?!(?:`,close:`))[^/]*?)`},"?":{open:`(?:`,close:`)?`},"+":{open:`(?:`,close:`)+`},"*":{open:`(?:`,close:`)*`},"@":{open:`(?:`,close:`)`}},o=`[^/]`,s=o+`*?`,c=`(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?`,l=`(?:(?!(?:\\/|^)\\.).)*?`,u=d(`().*{}+?[]^$\\!`);function d(e){return e.split(``).reduce(function(e,t){return e[t]=!0,e},{})}var f=/\/+/;h.filter=p;function p(e,t){return t||={},function(n,r,i){return h(n,e,t)}}function m(e,t){t||={};var n={};return Object.keys(e).forEach(function(t){n[t]=e[t]}),Object.keys(t).forEach(function(e){n[e]=t[e]}),n}h.defaults=function(e){if(!e||typeof e!=`object`||!Object.keys(e).length)return h;var t=h,n=function(n,r,i){return t(n,r,m(e,i))};return n.Minimatch=function(n,r){return new t.Minimatch(n,m(e,r))},n.Minimatch.defaults=function(n){return t.defaults(m(e,n)).Minimatch},n.filter=function(n,r){return t.filter(n,m(e,r))},n.defaults=function(n){return t.defaults(m(e,n))},n.makeRe=function(n,r){return t.makeRe(n,m(e,r))},n.braceExpand=function(n,r){return t.braceExpand(n,m(e,r))},n.match=function(n,r,i){return t.match(n,r,m(e,i))},n},g.defaults=function(e){return h.defaults(e).Minimatch};function h(e,t,n){return x(t),n||={},!n.nocomment&&t.charAt(0)===`#`?!1:new g(t,n).match(e)}function g(e,t){if(!(this instanceof g))return new g(e,t);x(e),t||={},e=e.trim(),!t.allowWindowsEscape&&n.sep!==`/`&&(e=e.split(n.sep).join(`/`)),this.options=t,this.maxGlobstarRecursion=t.maxGlobstarRecursion===void 0?200:t.maxGlobstarRecursion,this.set=[],this.pattern=e,this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.make()}g.prototype.debug=function(){},g.prototype.make=_;function _(){var e=this.pattern,t=this.options;if(!t.nocomment&&e.charAt(0)===`#`){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate();var n=this.globSet=this.braceExpand();t.debug&&(this.debug=function(){console.error.apply(console,arguments)}),this.debug(this.pattern,n),n=this.globParts=n.map(function(e){return e.split(f)}),this.debug(this.pattern,n),n=n.map(function(e,t,n){return e.map(this.parse,this)},this),this.debug(this.pattern,n),n=n.filter(function(e){return e.indexOf(!1)===-1}),this.debug(this.pattern,n),this.set=n}g.prototype.parseNegate=v;function v(){var e=this.pattern,t=!1,n=this.options,r=0;if(!n.nonegate){for(var i=0,a=e.length;ib)throw TypeError(`pattern is too long`)};g.prototype.parse=C;var S={};function C(e,t){x(e);var n=this.options;if(e===`**`)if(n.noglobstar)e=`*`;else return r;if(e===``)return``;var i=``,c=!!n.nocase,l=!1,d=[],f=[],p,m=!1,h=-1,g=-1,_=e.charAt(0)===`.`?``:n.dot?`(?!(?:^|\\/)\\.{1,2}(?:$|\\/))`:`(?!\\.)`,v=this;function y(){if(p){switch(p){case`*`:i+=s,c=!0;break;case`?`:i+=o,c=!0;break;default:i+=`\\`+p;break}v.debug(`clearStateChar %j %j`,p,i),p=!1}}for(var b=0,C=e.length,w;b-1;M--){var ee=f[M],N=i.slice(0,ee.reStart),te=i.slice(ee.reStart,ee.reEnd-8),ne=i.slice(ee.reEnd-8,ee.reEnd),re=i.slice(ee.reEnd);ne+=re;var P=N.split(`(`).length-1,ie=re;for(b=0;b=0&&(a=e[o],!a);o--);for(o=0;o=0;o--)if(t[o]===r){c=o;break}var l=t.slice(a,s),u=n?t.slice(s+1):t.slice(s+1,c),d=n?[]:t.slice(c+1);if(l.length){var f=e.slice(i,i+l.length);if(!this._matchOne(f,l,n,0,0))return!1;i+=l.length}var p=0;if(d.length){if(d.length+i>e.length)return!1;var m=e.length-d.length;if(this._matchOne(e,d,n,m,0))p=d.length;else{if(e[e.length-1]!==``||i+d.length===e.length||(m--,!this._matchOne(e,d,n,m,0)))return!1;p=d.length+1}}if(!u.length){var h=!!p;for(o=i;o0,`Parameter 'itemPath' must not be an empty array`);for(let t=0;te.getLiteral(t)).filter(e=>!o&&!(o=e===``));this.searchPath=new ef(s).toString(),this.rootRegExp=new RegExp(e.regExpEscape(s[0]),nf?`i`:``),this.isImplicitPattern=n;let c={dot:!0,nobrace:!0,nocase:nf,nocomment:!0,noext:!0,nonegate:!0};a=nf?a.replace(/\\/g,`/`):a,this.minimatch=new tf(a,c)}match(e){return this.segments[this.segments.length-1]===`**`?(e=Hd(e),!e.endsWith(u.sep)&&this.isImplicitPattern===!1&&(e=`${e}${u.sep}`)):e=Ud(e),this.minimatch.match(e)?this.trailingSeparator?Wd.Directory:Wd.All:Wd.None}partialMatch(e){return e=Ud(e),Rd(e)===e?this.rootRegExp.test(e):this.minimatch.matchOne(e.split(nf?/\\+/:/\/+/),this.minimatch.set[0],!0)}static globEscape(e){return(nf?e:e.replace(/\\/g,`\\\\`)).replace(/(\[)(?=[^/]+\])/g,`[[]`).replace(/\?/g,`[?]`).replace(/\*/g,`[*]`)}static fixupPattern(n,r){h(n,`pattern cannot be empty`);let i=new ef(n).segments.map(t=>e.getLiteral(t));if(h(i.every((e,t)=>(e!==`.`||t===0)&&e!==`..`),`Invalid pattern '${n}'. Relative pathing '.' and '..' is not allowed.`),h(!Vd(n)||i[0],`Invalid pattern '${n}'. Root segment must not contain globs.`),n=Hd(n),n===`.`||n.startsWith(`.${u.sep}`))n=e.globEscape(process.cwd())+n.substr(1);else if(n===`~`||n.startsWith(`~${u.sep}`))r||=t.homedir(),h(r,`Unable to determine HOME directory`),h(Bd(r),`Expected HOME directory to be a rooted path. Actual '${r}'`),n=e.globEscape(r)+n.substr(1);else if(nf&&(n.match(/^[A-Z]:$/i)||n.match(/^[A-Z]:[^\\]/i))){let t=zd(`C:\\dummy-root`,n.substr(0,2));n.length>2&&!t.endsWith(`\\`)&&(t+=`\\`),n=e.globEscape(t)+n.substr(2)}else if(nf&&(n===`\\`||n.match(/^\\[^\\]/))){let t=zd(`C:\\dummy-root`,`\\`);t.endsWith(`\\`)||(t+=`\\`),n=e.globEscape(t)+n.substr(1)}else n=zd(e.globEscape(process.cwd()),n);return Hd(n)}static getLiteral(e){let t=``;for(let n=0;n=0){if(r.length>1)return``;if(r){t+=r,n=i;continue}}}t+=r}return t}static regExpEscape(e){return e.replace(/[[\\^$.|?*+()]/g,`\\$&`)}},af=class{constructor(e,t){this.path=e,this.level=t}},of=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},sf=function(e){if(!Symbol.asyncIterator)throw TypeError(`Symbol.asyncIterator is not defined.`);var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof __values==`function`?__values(e):e[Symbol.iterator](),n={},r(`next`),r(`throw`),r(`return`),n[Symbol.asyncIterator]=function(){return this},n);function r(t){n[t]=e[t]&&function(n){return new Promise(function(r,a){n=e[t](n),i(r,a,n.done,n.value)})}}function i(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}},cf=function(e){return this instanceof cf?(this.v=e,this):new cf(e)},lf=function(e,t,n){if(!Symbol.asyncIterator)throw TypeError(`Symbol.asyncIterator is not defined.`);var r=n.apply(e,t||[]),i,a=[];return i=Object.create((typeof AsyncIterator==`function`?AsyncIterator:Object).prototype),s(`next`),s(`throw`),s(`return`,o),i[Symbol.asyncIterator]=function(){return this},i;function o(e){return function(t){return Promise.resolve(t).then(e,d)}}function s(e,t){r[e]&&(i[e]=function(t){return new Promise(function(n,r){a.push([e,t,n,r])>1||c(e,t)})},t&&(i[e]=t(i[e])))}function c(e,t){try{l(r[e](t))}catch(e){f(a[0][3],e)}}function l(e){e.value instanceof cf?Promise.resolve(e.value.v).then(u,d):f(a[0][2],e)}function u(e){c(`next`,e)}function d(e){c(`throw`,e)}function f(e,t){e(t),a.shift(),a.length&&c(a[0][0],a[0][1])}};const uf=process.platform===`win32`;var df=class e{constructor(e){this.patterns=[],this.searchPaths=[],this.options=Id(e)}getSearchPaths(){return this.searchPaths.slice()}glob(){return of(this,void 0,void 0,function*(){var e,t,n,r;let i=[];try{for(var a=!0,o=sf(this.globGenerator()),s;s=yield o.next(),e=s.done,!e;a=!0){r=s.value,a=!1;let e=r;i.push(e)}}catch(e){t={error:e}}finally{try{!a&&!e&&(n=o.return)&&(yield n.call(o))}finally{if(t)throw t.error}}return i})}globGenerator(){return lf(this,arguments,function*(){let t=Id(this.options),n=[];for(let e of this.patterns)n.push(e),t.implicitDescendants&&(e.trailingSeparator||e.segments[e.segments.length-1]!==`**`)&&n.push(new rf(e.negate,!0,e.segments.concat(`**`)));let r=[];for(let e of Kd(n)){R(`Search path '${e}'`);try{yield cf(a.promises.lstat(e))}catch(e){if(e.code===`ENOENT`)continue;throw e}r.unshift(new af(e,1))}let i=[];for(;r.length;){let o=r.pop(),s=qd(n,o.path),c=!!s||Jd(n,o.path);if(!s&&!c)continue;let l=yield cf(e.stat(o,t,i));if(l&&!(t.excludeHiddenFiles&&u.basename(o.path).match(/^\./)))if(l.isDirectory()){if(s&Wd.Directory&&t.matchDirectories)yield yield cf(o.path);else if(!c)continue;let e=o.level+1,n=(yield cf(a.promises.readdir(o.path))).map(t=>new af(u.join(o.path,t),e));r.push(...n.reverse())}else s&Wd.File&&(yield yield cf(o.path))}})}static create(t,n){return of(this,void 0,void 0,function*(){let r=new e(n);uf&&(t=t.replace(/\r\n/g,` `),t=t.replace(/\r/g,` `));let i=t.split(` diff --git a/src/install-viteplus.ts b/src/install-viteplus.ts index 85b5874..c4b4db2 100644 --- a/src/install-viteplus.ts +++ b/src/install-viteplus.ts @@ -13,7 +13,9 @@ export async function installVitePlus(inputs: Inputs): Promise { info(`Installing ${DISPLAY_NAME}@${version}...`); - const env = { ...process.env, VITE_PLUS_VERSION: version }; + // TODO: Remove VITE_PLUS_VERSION once vite-plus versions before the VP_* env var + // rename (PR #1166) are no longer supported. + const env = { ...process.env, VP_VERSION: version, VITE_PLUS_VERSION: version }; let exitCode: number; if (process.platform === "win32") { From 1af9a399d514b09d343342d8b84d1b6c7ba496d3 Mon Sep 17 00:00:00 2001 From: "MK (fengmk2)" Date: Sun, 29 Mar 2026 22:22:33 +0800 Subject: [PATCH 2/2] Update src/install-viteplus.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: MK (fengmk2) --- src/install-viteplus.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/install-viteplus.ts b/src/install-viteplus.ts index c4b4db2..224ca5d 100644 --- a/src/install-viteplus.ts +++ b/src/install-viteplus.ts @@ -14,7 +14,7 @@ export async function installVitePlus(inputs: Inputs): Promise { info(`Installing ${DISPLAY_NAME}@${version}...`); // TODO: Remove VITE_PLUS_VERSION once vite-plus versions before the VP_* env var - // rename (PR #1166) are no longer supported. + // rename (see https://github.com/voidzero-dev/vite-plus/pull/1166) are no longer supported. const env = { ...process.env, VP_VERSION: version, VITE_PLUS_VERSION: version }; let exitCode: number;