@xaendar/cli 0.9.18 → 0.9.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +28 -2917
- package/package.json +8 -2
- package/dist/api-BQOKPGRV.js +0 -90
- package/dist/build-GBGQNBHY.js +0 -25
- package/dist/chunk-4TR6Q4JL.js +0 -628
- package/dist/chunk-JDYMX3OY.js +0 -3
- package/dist/chunk-KNI7SFGP.js +0 -3
- package/dist/chunk-MMVDHF5O.js +0 -47
- package/dist/chunk-OL5QH2XE.js +0 -3
- package/dist/dist-H2NBAJAI.js +0 -3
- package/dist/dist-JMGYIFWH.js +0 -3
- package/dist/false-QKAHAALV.js +0 -3
- package/dist/lexer-DQCqS3nf-43JHI7TC.js +0 -5
- package/dist/main-BEZFE5MG.js +0 -68
- package/dist/node-RONF2ICS.js +0 -3
- package/dist/postcss-INPVFW34.js +0 -35
- package/dist/postcss-import-KX43CMCJ.js +0 -6
- package/dist/prompt-CH6TK0bC-7PB4PZOW.js +0 -47
package/dist/chunk-4TR6Q4JL.js
DELETED
|
@@ -1,628 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'node:module';
|
|
2
|
-
const require = createRequire(import.meta.url);
|
|
3
|
-
import{a as ks,b as Ts,c as or,d as Os,e as Bs,f as je,g as ar,h as bt,i as Fo,j as jo,k as Fu,l as ju,m as Qo,o as Uo,p as Ho,q as Wo,s as $s}from"./chunk-MMVDHF5O.js";import{a as Qu}from"./chunk-OL5QH2XE.js";import{d as at,f as Lu}from"./chunk-KNI7SFGP.js";var cr=at((aF,Zu)=>{"use strict";var Vu="[^\\\\/]",fE="(?=.)",qu="[^/]",ra="(?:\\/|$)",Yu="(?:^|\\/)",sa=`\\.{1,2}${ra}`,dE="(?!\\.)",pE=`(?!${Yu}${sa})`,hE=`(?!\\.{0,1}${ra})`,mE=`(?!${sa})`,gE="[^.\\/]",yE=`${qu}*?`,AE="/",Xu={DOT_LITERAL:"\\.",PLUS_LITERAL:"\\+",QMARK_LITERAL:"\\?",SLASH_LITERAL:"\\/",ONE_CHAR:fE,QMARK:qu,END_ANCHOR:ra,DOTS_SLASH:sa,NO_DOT:dE,NO_DOTS:pE,NO_DOT_SLASH:hE,NO_DOTS_SLASH:mE,QMARK_NO_DOT:gE,STAR:yE,START_ANCHOR:Yu,SEP:AE},wE={...Xu,SLASH_LITERAL:"[\\\\/]",QMARK:Vu,STAR:`${Vu}*?`,DOTS_SLASH:"\\.{1,2}(?:[\\\\/]|$)",NO_DOT:"(?!\\.)",NO_DOTS:"(?!(?:^|[\\\\/])\\.{1,2}(?:[\\\\/]|$))",NO_DOT_SLASH:"(?!\\.{0,1}(?:[\\\\/]|$))",NO_DOTS_SLASH:"(?!\\.{1,2}(?:[\\\\/]|$))",QMARK_NO_DOT:"[^.\\\\/]",START_ANCHOR:"(?:^|[\\\\/])",END_ANCHOR:"(?:[\\\\/]|$)",SEP:"\\"},EE={__proto__:null,alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};Zu.exports={DEFAULT_MAX_EXTGLOB_RECURSION:0,MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:EE,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{__proto__:null,"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars(e){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${e.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(e){return e===!0?wE:Xu}}});var ur=at(Ve=>{"use strict";var{REGEX_BACKSLASH:vE,REGEX_REMOVE_BACKSLASH:_E,REGEX_SPECIAL_CHARS:bE,REGEX_SPECIAL_CHARS_GLOBAL:SE}=cr();Ve.isObject=e=>e!==null&&typeof e=="object"&&!Array.isArray(e);Ve.hasRegexChars=e=>bE.test(e);Ve.isRegexChar=e=>e.length===1&&Ve.hasRegexChars(e);Ve.escapeRegex=e=>e.replace(SE,"\\$1");Ve.toPosixSlashes=e=>e.replace(vE,"/");Ve.isWindows=()=>{if(typeof navigator<"u"&&navigator.platform){let e=navigator.platform.toLowerCase();return e==="win32"||e==="windows"}return typeof process<"u"&&process.platform?process.platform==="win32":!1};Ve.removeBackslashes=e=>e.replace(_E,t=>t==="\\"?"":t);Ve.escapeLast=(e,t,n)=>{let r=e.lastIndexOf(t,n);return r===-1?e:e[r-1]==="\\"?Ve.escapeLast(e,t,r-1):`${e.slice(0,r)}\\${e.slice(r)}`};Ve.removePrefix=(e,t={})=>{let n=e;return n.startsWith("./")&&(n=n.slice(2),t.prefix="./"),n};Ve.wrapOutput=(e,t={},n={})=>{let r=n.contains?"":"^",s=n.contains?"":"$",i=`${r}(?:${e})${s}`;return t.negated===!0&&(i=`(?:^(?!${i}).*$)`),i};Ve.basename=(e,{windows:t}={})=>{let n=e.split(t?/[\\/]/:"/"),r=n[n.length-1];return r===""?n[n.length-2]:r}});var lf=at((cF,af)=>{"use strict";var ef=ur(),{CHAR_ASTERISK:ia,CHAR_AT:xE,CHAR_BACKWARD_SLASH:fr,CHAR_COMMA:CE,CHAR_DOT:oa,CHAR_EXCLAMATION_MARK:aa,CHAR_FORWARD_SLASH:of,CHAR_LEFT_CURLY_BRACE:la,CHAR_LEFT_PARENTHESES:ca,CHAR_LEFT_SQUARE_BRACKET:IE,CHAR_PLUS:RE,CHAR_QUESTION_MARK:tf,CHAR_RIGHT_CURLY_BRACE:kE,CHAR_RIGHT_PARENTHESES:nf,CHAR_RIGHT_SQUARE_BRACKET:TE}=cr(),rf=e=>e===of||e===fr,sf=e=>{e.isPrefix!==!0&&(e.depth=e.isGlobstar?1/0:1)},OE=(e,t)=>{let n=t||{},r=e.length-1,s=n.parts===!0||n.scanToEnd===!0,i=[],a=[],o=[],l=e,c=-1,u=0,f=0,d=!1,p=!1,h=!1,y=!1,m=!1,w=!1,A=!1,g=!1,E=!1,v=!1,S=0,b,_,C={value:"",depth:0,isGlob:!1},x=()=>c>=r,T=()=>l.charCodeAt(c+1),k=()=>(b=_,l.charCodeAt(++c));for(;c<r;){_=k();let B;if(_===fr){A=C.backslashes=!0,_=k(),_===la&&(w=!0);continue}if(w===!0||_===la){for(S++;x()!==!0&&(_=k());){if(_===fr){A=C.backslashes=!0,k();continue}if(_===la){S++;continue}if(w!==!0&&_===oa&&(_=k())===oa){if(d=C.isBrace=!0,h=C.isGlob=!0,v=!0,s===!0)continue;break}if(w!==!0&&_===CE){if(d=C.isBrace=!0,h=C.isGlob=!0,v=!0,s===!0)continue;break}if(_===kE&&(S--,S===0)){w=!1,d=C.isBrace=!0,v=!0;break}}if(s===!0)continue;break}if(_===of){if(i.push(c),a.push(C),C={value:"",depth:0,isGlob:!1},v===!0)continue;if(b===oa&&c===u+1){u+=2;continue}f=c+1;continue}if(n.noext!==!0&&(_===RE||_===xE||_===ia||_===tf||_===aa)===!0&&T()===ca){if(h=C.isGlob=!0,y=C.isExtglob=!0,v=!0,_===aa&&c===u&&(E=!0),s===!0){for(;x()!==!0&&(_=k());){if(_===fr){A=C.backslashes=!0,_=k();continue}if(_===nf){h=C.isGlob=!0,v=!0;break}}continue}break}if(_===ia){if(b===ia&&(m=C.isGlobstar=!0),h=C.isGlob=!0,v=!0,s===!0)continue;break}if(_===tf){if(h=C.isGlob=!0,v=!0,s===!0)continue;break}if(_===IE){for(;x()!==!0&&(B=k());){if(B===fr){A=C.backslashes=!0,k();continue}if(B===TE){p=C.isBracket=!0,h=C.isGlob=!0,v=!0;break}}if(s===!0)continue;break}if(n.nonegate!==!0&&_===aa&&c===u){g=C.negated=!0,u++;continue}if(n.noparen!==!0&&_===ca){if(h=C.isGlob=!0,s===!0){for(;x()!==!0&&(_=k());){if(_===ca){A=C.backslashes=!0,_=k();continue}if(_===nf){v=!0;break}}continue}break}if(h===!0){if(v=!0,s===!0)continue;break}}n.noext===!0&&(y=!1,h=!1);let O=l,R="",I="";u>0&&(R=l.slice(0,u),l=l.slice(u),f-=u),O&&h===!0&&f>0?(O=l.slice(0,f),I=l.slice(f)):h===!0?(O="",I=l):O=l,O&&O!==""&&O!=="/"&&O!==l&&rf(O.charCodeAt(O.length-1))&&(O=O.slice(0,-1)),n.unescape===!0&&(I&&(I=ef.removeBackslashes(I)),O&&A===!0&&(O=ef.removeBackslashes(O)));let M={prefix:R,input:e,start:u,base:O,glob:I,isBrace:d,isBracket:p,isGlob:h,isExtglob:y,isGlobstar:m,negated:g,negatedExtglob:E};if(n.tokens===!0&&(M.maxDepth=0,rf(_)||a.push(C),M.tokens=a),n.parts===!0||n.tokens===!0){let B;for(let U=0;U<i.length;U++){let V=B?B+1:u,te=i[U],Q=e.slice(V,te);n.tokens&&(U===0&&u!==0?(a[U].isPrefix=!0,a[U].value=R):a[U].value=Q,sf(a[U]),M.maxDepth+=a[U].depth),(U!==0||Q!=="")&&o.push(Q),B=te}if(B&&B+1<e.length){let U=e.slice(B+1);o.push(U),n.tokens&&(a[a.length-1].value=U,sf(a[a.length-1]),M.maxDepth+=a[a.length-1].depth)}M.slashes=i,M.parts=o}return M};af.exports=OE});var df=at((uF,ff)=>{"use strict";var dr=cr(),rt=ur(),{MAX_LENGTH:Ds,POSIX_REGEX_SOURCE:BE,REGEX_NON_SPECIAL_CHARS:$E,REGEX_SPECIAL_CHARS_BACKREF:ME,REPLACEMENTS:cf}=dr,DE=(e,t)=>{if(typeof t.expandRange=="function")return t.expandRange(...e,t);e.sort();let n=`[${e.join("-")}]`;try{new RegExp(n)}catch{return e.map(s=>rt.escapeRegex(s)).join("..")}return n},Cn=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,uf=e=>{let t=[],n=0,r=0,s=0,i="",a=!1;for(let o of e){if(a===!0){i+=o,a=!1;continue}if(o==="\\"){i+=o,a=!0;continue}if(o==='"'){s=s===1?0:1,i+=o;continue}if(s===0){if(o==="[")n++;else if(o==="]"&&n>0)n--;else if(n===0){if(o==="(")r++;else if(o===")"&&r>0)r--;else if(o==="|"&&r===0){t.push(i),i="";continue}}}i+=o}return t.push(i),t},PE=e=>{let t=!1;for(let n of e){if(t===!0){t=!1;continue}if(n==="\\"){t=!0;continue}if(/[?*+@!()[\]{}]/.test(n))return!1}return!0},fa=e=>{let t=e.trim(),n=!0;for(;n===!0;)n=!1,/^@\([^\\()[\]{}|]+\)$/.test(t)&&(t=t.slice(2,-1),n=!0);if(PE(t))return t.replace(/\\(.)/g,"$1")},NE=e=>{let t=e.map(fa).filter(Boolean);for(let n=0;n<t.length;n++)for(let r=n+1;r<t.length;r++){let s=t[n],i=t[r],a=s[0];if(!(!a||s!==a.repeat(s.length)||i!==a.repeat(i.length))&&(s===i||s.startsWith(i)||i.startsWith(s)))return!0}return!1},ua=(e,t=!0)=>{if(e[0]!=="+"&&e[0]!=="*"||e[1]!=="(")return;let n=0,r=0,s=0,i=!1;for(let a=1;a<e.length;a++){let o=e[a];if(i===!0){i=!1;continue}if(o==="\\"){i=!0;continue}if(o==='"'){s=s===1?0:1;continue}if(s!==1){if(o==="["){n++;continue}if(o==="]"&&n>0){n--;continue}if(!(n>0)){if(o==="("){r++;continue}if(o===")"&&(r--,r===0))return t===!0&&a!==e.length-1?void 0:{type:e[0],body:e.slice(2,a),end:a}}}}},LE=e=>`${e.length===1?rt.escapeRegex(e[0]):`[${e.map(n=>rt.escapeRegex(n)).join("")}]`}*`,FE=e=>{let t=0,n=[];for(;t<e.length;){let r=ua(e.slice(t),!1);if(!r||r.type!=="*")return;let s=uf(r.body).map(a=>a.trim());if(s.length!==1)return;let i=fa(s[0]);if(!i||i.length!==1)return;n.push(i),t+=r.end+1}if(!(n.length<1))return n},jE=e=>{let t=0,n=e.trim(),r=ua(n);for(;r;)t++,n=r.body.trim(),r=ua(n);return t},QE=(e,t)=>{if(t.maxExtglobRecursion===!1)return{risky:!1};let n=typeof t.maxExtglobRecursion=="number"?t.maxExtglobRecursion:dr.DEFAULT_MAX_EXTGLOB_RECURSION,r=uf(e).map(o=>o.trim());if(r.length>1&&(r.some(o=>o==="")||r.some(o=>/^[*?]+$/.test(o))||NE(r)))return{risky:!0};let s=[],i=!1,a=!0;for(let o of r){let l=FE(o);if(l){i=!0,s.push(...l);continue}let c=fa(o);if(c&&c.length===1){s.push(c);continue}if(a=!1,jE(o)>n)return{risky:!0}}return i?a?{risky:!0,safeOutput:LE([...new Set(s)])}:{risky:!0}:{risky:!1}},da=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");e=cf[e]||e;let n={...t},r=typeof n.maxLength=="number"?Math.min(Ds,n.maxLength):Ds,s=e.length;if(s>r)throw new SyntaxError(`Input length: ${s}, exceeds maximum allowed length: ${r}`);let i={type:"bos",value:"",output:n.prepend||""},a=[i],o=n.capture?"":"?:",l=dr.globChars(n.windows),c=dr.extglobChars(l),{DOT_LITERAL:u,PLUS_LITERAL:f,SLASH_LITERAL:d,ONE_CHAR:p,DOTS_SLASH:h,NO_DOT:y,NO_DOT_SLASH:m,NO_DOTS_SLASH:w,QMARK:A,QMARK_NO_DOT:g,STAR:E,START_ANCHOR:v}=l,S=$=>`(${o}(?:(?!${v}${$.dot?h:u}).)*?)`,b=n.dot?"":y,_=n.dot?A:g,C=n.bash===!0?S(n):E;n.capture&&(C=`(${C})`),typeof n.noext=="boolean"&&(n.noextglob=n.noext);let x={input:e,index:-1,start:0,dot:n.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:a};e=rt.removePrefix(e,x),s=e.length;let T=[],k=[],O=[],R=i,I,M=()=>x.index===s-1,B=x.peek=($=1)=>e[x.index+$],U=x.advance=()=>e[++x.index]||"",V=()=>e.slice(x.index+1),te=($="",J=0)=>{x.consumed+=$,x.index+=J},Q=$=>{x.output+=$.output!=null?$.output:$.value,te($.value)},Z=()=>{let $=1;for(;B()==="!"&&(B(2)!=="("||B(3)==="?");)U(),x.start++,$++;return $%2===0?!1:(x.negated=!0,x.start++,!0)},F=$=>{x[$]++,O.push($)},G=$=>{x[$]--,O.pop()},P=$=>{if(R.type==="globstar"){let J=x.braces>0&&($.type==="comma"||$.type==="brace"),D=$.extglob===!0||T.length&&($.type==="pipe"||$.type==="paren");$.type!=="slash"&&$.type!=="paren"&&!J&&!D&&(x.output=x.output.slice(0,-R.output.length),R.type="star",R.value="*",R.output=C,x.output+=R.output)}if(T.length&&$.type!=="paren"&&(T[T.length-1].inner+=$.value),($.value||$.output)&&Q($),R&&R.type==="text"&&$.type==="text"){R.output=(R.output||R.value)+$.value,R.value+=$.value;return}$.prev=R,a.push($),R=$},z=($,J)=>{let D={...c[J],conditions:1,inner:""};D.prev=R,D.parens=x.parens,D.output=x.output,D.startIndex=x.index,D.tokensIndex=a.length;let N=(n.capture?"(":"")+D.open;F("parens"),P({type:$,value:J,output:x.output?"":p}),P({type:"paren",extglob:!0,value:U(),output:N}),T.push(D)},H=$=>{let J=e.slice($.startIndex,x.index+1),D=e.slice($.startIndex+2,x.index),N=QE(D,n);if(($.type==="plus"||$.type==="star")&&N.risky){let X=N.safeOutput?($.output?"":p)+(n.capture?`(${N.safeOutput})`:N.safeOutput):void 0,se=a[$.tokensIndex];se.type="text",se.value=J,se.output=X||rt.escapeRegex(J);for(let ie=$.tokensIndex+1;ie<a.length;ie++)a[ie].value="",a[ie].output="",delete a[ie].suffix;x.output=$.output+se.output,x.backtrack=!0,P({type:"paren",extglob:!0,value:I,output:""}),G("parens");return}let K=$.close+(n.capture?")":""),ee;if($.type==="negate"){let X=C;if($.inner&&$.inner.length>1&&$.inner.includes("/")&&(X=S(n)),(X!==C||M()||/^\)+$/.test(V()))&&(K=$.close=`)$))${X}`),$.inner.includes("*")&&(ee=V())&&/^\.[^\\/.]+$/.test(ee)){let se=da(ee,{...t,fastpaths:!1}).output;K=$.close=`)${se})${X})`}$.prev.type==="bos"&&(x.negatedExtglob=!0)}P({type:"paren",extglob:!0,value:I,output:K}),G("parens")};if(n.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(e)){let $=!1,J=e.replace(ME,(D,N,K,ee,X,se)=>ee==="\\"?($=!0,D):ee==="?"?N?N+ee+(X?A.repeat(X.length):""):se===0?_+(X?A.repeat(X.length):""):A.repeat(K.length):ee==="."?u.repeat(K.length):ee==="*"?N?N+ee+(X?C:""):C:N?D:`\\${D}`);return $===!0&&(n.unescape===!0?J=J.replace(/\\/g,""):J=J.replace(/\\+/g,D=>D.length%2===0?"\\\\":D?"\\":"")),J===e&&n.contains===!0?(x.output=e,x):(x.output=rt.wrapOutput(J,x,t),x)}for(;!M();){if(I=U(),I==="\0")continue;if(I==="\\"){let D=B();if(D==="/"&&n.bash!==!0||D==="."||D===";")continue;if(!D){I+="\\",P({type:"text",value:I});continue}let N=/^\\+/.exec(V()),K=0;if(N&&N[0].length>2&&(K=N[0].length,x.index+=K,K%2!==0&&(I+="\\")),n.unescape===!0?I=U():I+=U(),x.brackets===0){P({type:"text",value:I});continue}}if(x.brackets>0&&(I!=="]"||R.value==="["||R.value==="[^")){if(n.posix!==!1&&I===":"){let D=R.value.slice(1);if(D.includes("[")&&(R.posix=!0,D.includes(":"))){let N=R.value.lastIndexOf("["),K=R.value.slice(0,N),ee=R.value.slice(N+2),X=BE[ee];if(X){R.value=K+X,x.backtrack=!0,U(),!i.output&&a.indexOf(R)===1&&(i.output=p);continue}}}(I==="["&&B()!==":"||I==="-"&&B()==="]")&&(I=`\\${I}`),I==="]"&&(R.value==="["||R.value==="[^")&&(I=`\\${I}`),n.posix===!0&&I==="!"&&R.value==="["&&(I="^"),R.value+=I,Q({value:I});continue}if(x.quotes===1&&I!=='"'){I=rt.escapeRegex(I),R.value+=I,Q({value:I});continue}if(I==='"'){x.quotes=x.quotes===1?0:1,n.keepQuotes===!0&&P({type:"text",value:I});continue}if(I==="("){F("parens"),P({type:"paren",value:I});continue}if(I===")"){if(x.parens===0&&n.strictBrackets===!0)throw new SyntaxError(Cn("opening","("));let D=T[T.length-1];if(D&&x.parens===D.parens+1){H(T.pop());continue}P({type:"paren",value:I,output:x.parens?")":"\\)"}),G("parens");continue}if(I==="["){if(n.nobracket===!0||!V().includes("]")){if(n.nobracket!==!0&&n.strictBrackets===!0)throw new SyntaxError(Cn("closing","]"));I=`\\${I}`}else F("brackets");P({type:"bracket",value:I});continue}if(I==="]"){if(n.nobracket===!0||R&&R.type==="bracket"&&R.value.length===1){P({type:"text",value:I,output:`\\${I}`});continue}if(x.brackets===0){if(n.strictBrackets===!0)throw new SyntaxError(Cn("opening","["));P({type:"text",value:I,output:`\\${I}`});continue}G("brackets");let D=R.value.slice(1);if(R.posix!==!0&&D[0]==="^"&&!D.includes("/")&&(I=`/${I}`),R.value+=I,Q({value:I}),n.literalBrackets===!1||rt.hasRegexChars(D))continue;let N=rt.escapeRegex(R.value);if(x.output=x.output.slice(0,-R.value.length),n.literalBrackets===!0){x.output+=N,R.value=N;continue}R.value=`(${o}${N}|${R.value})`,x.output+=R.value;continue}if(I==="{"&&n.nobrace!==!0){F("braces");let D={type:"brace",value:I,output:"(",outputIndex:x.output.length,tokensIndex:x.tokens.length};k.push(D),P(D);continue}if(I==="}"){let D=k[k.length-1];if(n.nobrace===!0||!D){P({type:"text",value:I,output:I});continue}let N=")";if(D.dots===!0){let K=a.slice(),ee=[];for(let X=K.length-1;X>=0&&(a.pop(),K[X].type!=="brace");X--)K[X].type!=="dots"&&ee.unshift(K[X].value);N=DE(ee,n),x.backtrack=!0}if(D.comma!==!0&&D.dots!==!0){let K=x.output.slice(0,D.outputIndex),ee=x.tokens.slice(D.tokensIndex);D.value=D.output="\\{",I=N="\\}",x.output=K;for(let X of ee)x.output+=X.output||X.value}P({type:"brace",value:I,output:N}),G("braces"),k.pop();continue}if(I==="|"){T.length>0&&T[T.length-1].conditions++,P({type:"text",value:I});continue}if(I===","){let D=I,N=k[k.length-1];N&&O[O.length-1]==="braces"&&(N.comma=!0,D="|"),P({type:"comma",value:I,output:D});continue}if(I==="/"){if(R.type==="dot"&&x.index===x.start+1){x.start=x.index+1,x.consumed="",x.output="",a.pop(),R=i;continue}P({type:"slash",value:I,output:d});continue}if(I==="."){if(x.braces>0&&R.type==="dot"){R.value==="."&&(R.output=u);let D=k[k.length-1];R.type="dots",R.output+=I,R.value+=I,D.dots=!0;continue}if(x.braces+x.parens===0&&R.type!=="bos"&&R.type!=="slash"){P({type:"text",value:I,output:u});continue}P({type:"dot",value:I,output:u});continue}if(I==="?"){if(!(R&&R.value==="(")&&n.noextglob!==!0&&B()==="("&&B(2)!=="?"){z("qmark",I);continue}if(R&&R.type==="paren"){let N=B(),K=I;(R.value==="("&&!/[!=<:]/.test(N)||N==="<"&&!/<([!=]|\w+>)/.test(V()))&&(K=`\\${I}`),P({type:"text",value:I,output:K});continue}if(n.dot!==!0&&(R.type==="slash"||R.type==="bos")){P({type:"qmark",value:I,output:g});continue}P({type:"qmark",value:I,output:A});continue}if(I==="!"){if(n.noextglob!==!0&&B()==="("&&(B(2)!=="?"||!/[!=<:]/.test(B(3)))){z("negate",I);continue}if(n.nonegate!==!0&&x.index===0){Z();continue}}if(I==="+"){if(n.noextglob!==!0&&B()==="("&&B(2)!=="?"){z("plus",I);continue}if(R&&R.value==="("||n.regex===!1){P({type:"plus",value:I,output:f});continue}if(R&&(R.type==="bracket"||R.type==="paren"||R.type==="brace")||x.parens>0){P({type:"plus",value:I});continue}P({type:"plus",value:f});continue}if(I==="@"){if(n.noextglob!==!0&&B()==="("&&B(2)!=="?"){P({type:"at",extglob:!0,value:I,output:""});continue}P({type:"text",value:I});continue}if(I!=="*"){(I==="$"||I==="^")&&(I=`\\${I}`);let D=$E.exec(V());D&&(I+=D[0],x.index+=D[0].length),P({type:"text",value:I});continue}if(R&&(R.type==="globstar"||R.star===!0)){R.type="star",R.star=!0,R.value+=I,R.output=C,x.backtrack=!0,x.globstar=!0,te(I);continue}let $=V();if(n.noextglob!==!0&&/^\([^?]/.test($)){z("star",I);continue}if(R.type==="star"){if(n.noglobstar===!0){te(I);continue}let D=R.prev,N=D.prev,K=D.type==="slash"||D.type==="bos",ee=N&&(N.type==="star"||N.type==="globstar");if(n.bash===!0&&(!K||$[0]&&$[0]!=="/")){P({type:"star",value:I,output:""});continue}let X=x.braces>0&&(D.type==="comma"||D.type==="brace"),se=T.length&&(D.type==="pipe"||D.type==="paren");if(!K&&D.type!=="paren"&&!X&&!se){P({type:"star",value:I,output:""});continue}for(;$.slice(0,3)==="/**";){let ie=e[x.index+4];if(ie&&ie!=="/")break;$=$.slice(3),te("/**",3)}if(D.type==="bos"&&M()){R.type="globstar",R.value+=I,R.output=S(n),x.output=R.output,x.globstar=!0,te(I);continue}if(D.type==="slash"&&D.prev.type!=="bos"&&!ee&&M()){x.output=x.output.slice(0,-(D.output+R.output).length),D.output=`(?:${D.output}`,R.type="globstar",R.output=S(n)+(n.strictSlashes?")":"|$)"),R.value+=I,x.globstar=!0,x.output+=D.output+R.output,te(I);continue}if(D.type==="slash"&&D.prev.type!=="bos"&&$[0]==="/"){let ie=$[1]!==void 0?"|$":"";x.output=x.output.slice(0,-(D.output+R.output).length),D.output=`(?:${D.output}`,R.type="globstar",R.output=`${S(n)}${d}|${d}${ie})`,R.value+=I,x.output+=D.output+R.output,x.globstar=!0,te(I+U()),P({type:"slash",value:"/",output:""});continue}if(D.type==="bos"&&$[0]==="/"){R.type="globstar",R.value+=I,R.output=`(?:^|${d}|${S(n)}${d})`,x.output=R.output,x.globstar=!0,te(I+U()),P({type:"slash",value:"/",output:""});continue}x.output=x.output.slice(0,-R.output.length),R.type="globstar",R.output=S(n),R.value+=I,x.output+=R.output,x.globstar=!0,te(I);continue}let J={type:"star",value:I,output:C};if(n.bash===!0){J.output=".*?",(R.type==="bos"||R.type==="slash")&&(J.output=b+J.output),P(J);continue}if(R&&(R.type==="bracket"||R.type==="paren")&&n.regex===!0){J.output=I,P(J);continue}(x.index===x.start||R.type==="slash"||R.type==="dot")&&(R.type==="dot"?(x.output+=m,R.output+=m):n.dot===!0?(x.output+=w,R.output+=w):(x.output+=b,R.output+=b),B()!=="*"&&(x.output+=p,R.output+=p)),P(J)}for(;x.brackets>0;){if(n.strictBrackets===!0)throw new SyntaxError(Cn("closing","]"));x.output=rt.escapeLast(x.output,"["),G("brackets")}for(;x.parens>0;){if(n.strictBrackets===!0)throw new SyntaxError(Cn("closing",")"));x.output=rt.escapeLast(x.output,"("),G("parens")}for(;x.braces>0;){if(n.strictBrackets===!0)throw new SyntaxError(Cn("closing","}"));x.output=rt.escapeLast(x.output,"{"),G("braces")}if(n.strictSlashes!==!0&&(R.type==="star"||R.type==="bracket")&&P({type:"maybe_slash",value:"",output:`${d}?`}),x.backtrack===!0){x.output="";for(let $ of x.tokens)x.output+=$.output!=null?$.output:$.value,$.suffix&&(x.output+=$.suffix)}return x};da.fastpaths=(e,t)=>{let n={...t},r=typeof n.maxLength=="number"?Math.min(Ds,n.maxLength):Ds,s=e.length;if(s>r)throw new SyntaxError(`Input length: ${s}, exceeds maximum allowed length: ${r}`);e=cf[e]||e;let{DOT_LITERAL:i,SLASH_LITERAL:a,ONE_CHAR:o,DOTS_SLASH:l,NO_DOT:c,NO_DOTS:u,NO_DOTS_SLASH:f,STAR:d,START_ANCHOR:p}=dr.globChars(n.windows),h=n.dot?u:c,y=n.dot?f:c,m=n.capture?"":"?:",w={negated:!1,prefix:""},A=n.bash===!0?".*?":d;n.capture&&(A=`(${A})`);let g=b=>b.noglobstar===!0?A:`(${m}(?:(?!${p}${b.dot?l:i}).)*?)`,E=b=>{switch(b){case"*":return`${h}${o}${A}`;case".*":return`${i}${o}${A}`;case"*.*":return`${h}${A}${i}${o}${A}`;case"*/*":return`${h}${A}${a}${o}${y}${A}`;case"**":return h+g(n);case"**/*":return`(?:${h}${g(n)}${a})?${y}${o}${A}`;case"**/*.*":return`(?:${h}${g(n)}${a})?${y}${A}${i}${o}${A}`;case"**/.*":return`(?:${h}${g(n)}${a})?${i}${o}${A}`;default:{let _=/^(.*?)\.(\w+)$/.exec(b);if(!_)return;let C=E(_[1]);return C?C+i+_[2]:void 0}}},v=rt.removePrefix(e,w),S=E(v);return S&&n.strictSlashes!==!0&&(S+=`${a}?`),S};ff.exports=da});var mf=at((fF,hf)=>{"use strict";var UE=lf(),pa=df(),pf=ur(),HE=cr(),WE=e=>e&&typeof e=="object"&&!Array.isArray(e),Be=(e,t,n=!1)=>{if(Array.isArray(e)){let u=e.map(d=>Be(d,t,n));return d=>{for(let p of u){let h=p(d);if(h)return h}return!1}}let r=WE(e)&&e.tokens&&e.input;if(e===""||typeof e!="string"&&!r)throw new TypeError("Expected pattern to be a non-empty string");let s=t||{},i=s.windows,a=r?Be.compileRe(e,t):Be.makeRe(e,t,!1,!0),o=a.state;delete a.state;let l=()=>!1;if(s.ignore){let u={...t,ignore:null,onMatch:null,onResult:null};l=Be(s.ignore,u,n)}let c=(u,f=!1)=>{let{isMatch:d,match:p,output:h}=Be.test(u,a,t,{glob:e,posix:i}),y={glob:e,state:o,regex:a,posix:i,input:u,output:h,match:p,isMatch:d};return typeof s.onResult=="function"&&s.onResult(y),d===!1?(y.isMatch=!1,f?y:!1):l(u)?(typeof s.onIgnore=="function"&&s.onIgnore(y),y.isMatch=!1,f?y:!1):(typeof s.onMatch=="function"&&s.onMatch(y),f?y:!0)};return n&&(c.state=o),c};Be.test=(e,t,n,{glob:r,posix:s}={})=>{if(typeof e!="string")throw new TypeError("Expected input to be a string");if(e==="")return{isMatch:!1,output:""};let i=n||{},a=i.format||(s?pf.toPosixSlashes:null),o=e===r,l=o&&a?a(e):e;return o===!1&&(l=a?a(e):e,o=l===r),(o===!1||i.capture===!0)&&(i.matchBase===!0||i.basename===!0?o=Be.matchBase(e,t,n,s):o=t.exec(l)),{isMatch:!!o,match:o,output:l}};Be.matchBase=(e,t,n,r=n&&n.windows)=>(t instanceof RegExp?t:Be.makeRe(t,n)).test(pf.basename(e,{windows:r}));Be.isMatch=(e,t,n)=>Be(t,n)(e);Be.parse=(e,t)=>Array.isArray(e)?e.map(n=>Be.parse(n,t)):pa(e,{...t,fastpaths:!1});Be.scan=(e,t)=>UE(e,t);Be.compileRe=(e,t,n=!1,r=!1)=>{if(n===!0)return e.output;let s=t||{},i=s.contains?"":"^",a=s.contains?"":"$",o=`${i}(?:${e.output})${a}`;e&&e.negated===!0&&(o=`^(?!${o}).*$`);let l=Be.toRegex(o,t);return r===!0&&(l.state=e),l};Be.makeRe=(e,t={},n=!1,r=!1)=>{if(!e||typeof e!="string")throw new TypeError("Expected a non-empty string");let s={negated:!1,fastpaths:!0};return t.fastpaths!==!1&&(e[0]==="."||e[0]==="*")&&(s.output=pa.fastpaths(e,t)),s.output||(s=pa(e,t)),Be.compileRe(s,t,n,r)};Be.toRegex=(e,t)=>{try{let n=t||{};return new RegExp(e,n.flags||(n.nocase?"i":""))}catch(n){if(t&&t.debug===!0)throw n;return/$^/}};Be.constants=HE;hf.exports=Be});var wf=at((dF,Af)=>{"use strict";var gf=mf(),GE=ur();function yf(e,t,n=!1){return t&&(t.windows===null||t.windows===void 0)&&(t={...t,windows:GE.isWindows()}),gf(e,t,n)}Object.assign(yf,gf);Af.exports=yf});var pr=at((_F,Df)=>{"use strict";var Of="[^\\\\/]",Gv="(?=.)",Bf="[^/]",ga="(?:\\/|$)",$f="(?:^|\\/)",ya=`\\.{1,2}${ga}`,zv="(?!\\.)",Jv=`(?!${$f}${ya})`,Kv=`(?!\\.{0,1}${ga})`,Vv=`(?!${ya})`,qv="[^.\\/]",Yv=`${Bf}*?`,Xv="/",Mf={DOT_LITERAL:"\\.",PLUS_LITERAL:"\\+",QMARK_LITERAL:"\\?",SLASH_LITERAL:"\\/",ONE_CHAR:Gv,QMARK:Bf,END_ANCHOR:ga,DOTS_SLASH:ya,NO_DOT:zv,NO_DOTS:Jv,NO_DOT_SLASH:Kv,NO_DOTS_SLASH:Vv,QMARK_NO_DOT:qv,STAR:Yv,START_ANCHOR:$f,SEP:Xv},Zv={...Mf,SLASH_LITERAL:"[\\\\/]",QMARK:Of,STAR:`${Of}*?`,DOTS_SLASH:"\\.{1,2}(?:[\\\\/]|$)",NO_DOT:"(?!\\.)",NO_DOTS:"(?!(?:^|[\\\\/])\\.{1,2}(?:[\\\\/]|$))",NO_DOT_SLASH:"(?!\\.{0,1}(?:[\\\\/]|$))",NO_DOTS_SLASH:"(?!\\.{1,2}(?:[\\\\/]|$))",QMARK_NO_DOT:"[^.\\\\/]",START_ANCHOR:"(?:^|[\\\\/])",END_ANCHOR:"(?:[\\\\/]|$)",SEP:"\\"},e_={__proto__:null,alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};Df.exports={DEFAULT_MAX_EXTGLOB_RECURSION:0,MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:e_,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{__proto__:null,"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars(e){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${e.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(e){return e===!0?Zv:Mf}}});var hr=at(qe=>{"use strict";var{REGEX_BACKSLASH:t_,REGEX_REMOVE_BACKSLASH:n_,REGEX_SPECIAL_CHARS:r_,REGEX_SPECIAL_CHARS_GLOBAL:s_}=pr();qe.isObject=e=>e!==null&&typeof e=="object"&&!Array.isArray(e);qe.hasRegexChars=e=>r_.test(e);qe.isRegexChar=e=>e.length===1&&qe.hasRegexChars(e);qe.escapeRegex=e=>e.replace(s_,"\\$1");qe.toPosixSlashes=e=>e.replace(t_,"/");qe.isWindows=()=>{if(typeof navigator<"u"&&navigator.platform){let e=navigator.platform.toLowerCase();return e==="win32"||e==="windows"}return typeof process<"u"&&process.platform?process.platform==="win32":!1};qe.removeBackslashes=e=>e.replace(n_,t=>t==="\\"?"":t);qe.escapeLast=(e,t,n)=>{let r=e.lastIndexOf(t,n);return r===-1?e:e[r-1]==="\\"?qe.escapeLast(e,t,r-1):`${e.slice(0,r)}\\${e.slice(r)}`};qe.removePrefix=(e,t={})=>{let n=e;return n.startsWith("./")&&(n=n.slice(2),t.prefix="./"),n};qe.wrapOutput=(e,t={},n={})=>{let r=n.contains?"":"^",s=n.contains?"":"$",i=`${r}(?:${e})${s}`;return t.negated===!0&&(i=`(?:^(?!${i}).*$)`),i};qe.basename=(e,{windows:t}={})=>{let n=e.split(t?/[\\/]/:"/"),r=n[n.length-1];return r===""?n[n.length-2]:r}});var Hf=at((SF,Uf)=>{"use strict";var Pf=hr(),{CHAR_ASTERISK:Aa,CHAR_AT:i_,CHAR_BACKWARD_SLASH:mr,CHAR_COMMA:o_,CHAR_DOT:wa,CHAR_EXCLAMATION_MARK:Ea,CHAR_FORWARD_SLASH:Qf,CHAR_LEFT_CURLY_BRACE:va,CHAR_LEFT_PARENTHESES:_a,CHAR_LEFT_SQUARE_BRACKET:a_,CHAR_PLUS:l_,CHAR_QUESTION_MARK:Nf,CHAR_RIGHT_CURLY_BRACE:c_,CHAR_RIGHT_PARENTHESES:Lf,CHAR_RIGHT_SQUARE_BRACKET:u_}=pr(),Ff=e=>e===Qf||e===mr,jf=e=>{e.isPrefix!==!0&&(e.depth=e.isGlobstar?1/0:1)},f_=(e,t)=>{let n=t||{},r=e.length-1,s=n.parts===!0||n.scanToEnd===!0,i=[],a=[],o=[],l=e,c=-1,u=0,f=0,d=!1,p=!1,h=!1,y=!1,m=!1,w=!1,A=!1,g=!1,E=!1,v=!1,S=0,b,_,C={value:"",depth:0,isGlob:!1},x=()=>c>=r,T=()=>l.charCodeAt(c+1),k=()=>(b=_,l.charCodeAt(++c));for(;c<r;){_=k();let B;if(_===mr){A=C.backslashes=!0,_=k(),_===va&&(w=!0);continue}if(w===!0||_===va){for(S++;x()!==!0&&(_=k());){if(_===mr){A=C.backslashes=!0,k();continue}if(_===va){S++;continue}if(w!==!0&&_===wa&&(_=k())===wa){if(d=C.isBrace=!0,h=C.isGlob=!0,v=!0,s===!0)continue;break}if(w!==!0&&_===o_){if(d=C.isBrace=!0,h=C.isGlob=!0,v=!0,s===!0)continue;break}if(_===c_&&(S--,S===0)){w=!1,d=C.isBrace=!0,v=!0;break}}if(s===!0)continue;break}if(_===Qf){if(i.push(c),a.push(C),C={value:"",depth:0,isGlob:!1},v===!0)continue;if(b===wa&&c===u+1){u+=2;continue}f=c+1;continue}if(n.noext!==!0&&(_===l_||_===i_||_===Aa||_===Nf||_===Ea)===!0&&T()===_a){if(h=C.isGlob=!0,y=C.isExtglob=!0,v=!0,_===Ea&&c===u&&(E=!0),s===!0){for(;x()!==!0&&(_=k());){if(_===mr){A=C.backslashes=!0,_=k();continue}if(_===Lf){h=C.isGlob=!0,v=!0;break}}continue}break}if(_===Aa){if(b===Aa&&(m=C.isGlobstar=!0),h=C.isGlob=!0,v=!0,s===!0)continue;break}if(_===Nf){if(h=C.isGlob=!0,v=!0,s===!0)continue;break}if(_===a_){for(;x()!==!0&&(B=k());){if(B===mr){A=C.backslashes=!0,k();continue}if(B===u_){p=C.isBracket=!0,h=C.isGlob=!0,v=!0;break}}if(s===!0)continue;break}if(n.nonegate!==!0&&_===Ea&&c===u){g=C.negated=!0,u++;continue}if(n.noparen!==!0&&_===_a){if(h=C.isGlob=!0,s===!0){for(;x()!==!0&&(_=k());){if(_===_a){A=C.backslashes=!0,_=k();continue}if(_===Lf){v=!0;break}}continue}break}if(h===!0){if(v=!0,s===!0)continue;break}}n.noext===!0&&(y=!1,h=!1);let O=l,R="",I="";u>0&&(R=l.slice(0,u),l=l.slice(u),f-=u),O&&h===!0&&f>0?(O=l.slice(0,f),I=l.slice(f)):h===!0?(O="",I=l):O=l,O&&O!==""&&O!=="/"&&O!==l&&Ff(O.charCodeAt(O.length-1))&&(O=O.slice(0,-1)),n.unescape===!0&&(I&&(I=Pf.removeBackslashes(I)),O&&A===!0&&(O=Pf.removeBackslashes(O)));let M={prefix:R,input:e,start:u,base:O,glob:I,isBrace:d,isBracket:p,isGlob:h,isExtglob:y,isGlobstar:m,negated:g,negatedExtglob:E};if(n.tokens===!0&&(M.maxDepth=0,Ff(_)||a.push(C),M.tokens=a),n.parts===!0||n.tokens===!0){let B;for(let U=0;U<i.length;U++){let V=B?B+1:u,te=i[U],Q=e.slice(V,te);n.tokens&&(U===0&&u!==0?(a[U].isPrefix=!0,a[U].value=R):a[U].value=Q,jf(a[U]),M.maxDepth+=a[U].depth),(U!==0||Q!=="")&&o.push(Q),B=te}if(B&&B+1<e.length){let U=e.slice(B+1);o.push(U),n.tokens&&(a[a.length-1].value=U,jf(a[a.length-1]),M.maxDepth+=a[a.length-1].depth)}M.slashes=i,M.parts=o}return M};Uf.exports=f_});var Kf=at((xF,Jf)=>{"use strict";var gr=pr(),st=hr(),{MAX_LENGTH:Ns,POSIX_REGEX_SOURCE:d_,REGEX_NON_SPECIAL_CHARS:p_,REGEX_SPECIAL_CHARS_BACKREF:h_,REPLACEMENTS:Wf}=gr,m_=(e,t)=>{if(typeof t.expandRange=="function")return t.expandRange(...e,t);e.sort();let n=`[${e.join("-")}]`;try{new RegExp(n)}catch{return e.map(s=>st.escapeRegex(s)).join("..")}return n},In=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,Gf=e=>{let t=[],n=0,r=0,s=0,i="",a=!1;for(let o of e){if(a===!0){i+=o,a=!1;continue}if(o==="\\"){i+=o,a=!0;continue}if(o==='"'){s=s===1?0:1,i+=o;continue}if(s===0){if(o==="[")n++;else if(o==="]"&&n>0)n--;else if(n===0){if(o==="(")r++;else if(o===")"&&r>0)r--;else if(o==="|"&&r===0){t.push(i),i="";continue}}}i+=o}return t.push(i),t},g_=e=>{let t=!1;for(let n of e){if(t===!0){t=!1;continue}if(n==="\\"){t=!0;continue}if(/[?*+@!()[\]{}]/.test(n))return!1}return!0},zf=e=>{let t=e.trim(),n=!0;for(;n===!0;)n=!1,/^@\([^\\()[\]{}|]+\)$/.test(t)&&(t=t.slice(2,-1),n=!0);if(g_(t))return t.replace(/\\(.)/g,"$1")},y_=e=>{let t=e.map(zf).filter(Boolean);for(let n=0;n<t.length;n++)for(let r=n+1;r<t.length;r++){let s=t[n],i=t[r],a=s[0];if(!(!a||s!==a.repeat(s.length)||i!==a.repeat(i.length))&&(s===i||s.startsWith(i)||i.startsWith(s)))return!0}return!1},ba=(e,t=!0)=>{if(e[0]!=="+"&&e[0]!=="*"||e[1]!=="(")return;let n=0,r=0,s=0,i=!1;for(let a=1;a<e.length;a++){let o=e[a];if(i===!0){i=!1;continue}if(o==="\\"){i=!0;continue}if(o==='"'){s=s===1?0:1;continue}if(s!==1){if(o==="["){n++;continue}if(o==="]"&&n>0){n--;continue}if(!(n>0)){if(o==="("){r++;continue}if(o===")"&&(r--,r===0))return t===!0&&a!==e.length-1?void 0:{type:e[0],body:e.slice(2,a),end:a}}}}},A_=e=>{let t=0,n=[];for(;t<e.length;){let s=ba(e.slice(t),!1);if(!s||s.type!=="*")return;let i=Gf(s.body).map(o=>o.trim());if(i.length!==1)return;let a=zf(i[0]);if(!a||a.length!==1)return;n.push(a),t+=s.end+1}return n.length<1?void 0:`${n.length===1?st.escapeRegex(n[0]):`[${n.map(s=>st.escapeRegex(s)).join("")}]`}*`},w_=e=>{let t=0,n=e.trim(),r=ba(n);for(;r;)t++,n=r.body.trim(),r=ba(n);return t},E_=(e,t)=>{if(t.maxExtglobRecursion===!1)return{risky:!1};let n=typeof t.maxExtglobRecursion=="number"?t.maxExtglobRecursion:gr.DEFAULT_MAX_EXTGLOB_RECURSION,r=Gf(e).map(s=>s.trim());if(r.length>1&&(r.some(s=>s==="")||r.some(s=>/^[*?]+$/.test(s))||y_(r)))return{risky:!0};for(let s of r){let i=A_(s);if(i)return{risky:!0,safeOutput:i};if(w_(s)>n)return{risky:!0}}return{risky:!1}},Sa=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");e=Wf[e]||e;let n={...t},r=typeof n.maxLength=="number"?Math.min(Ns,n.maxLength):Ns,s=e.length;if(s>r)throw new SyntaxError(`Input length: ${s}, exceeds maximum allowed length: ${r}`);let i={type:"bos",value:"",output:n.prepend||""},a=[i],o=n.capture?"":"?:",l=gr.globChars(n.windows),c=gr.extglobChars(l),{DOT_LITERAL:u,PLUS_LITERAL:f,SLASH_LITERAL:d,ONE_CHAR:p,DOTS_SLASH:h,NO_DOT:y,NO_DOT_SLASH:m,NO_DOTS_SLASH:w,QMARK:A,QMARK_NO_DOT:g,STAR:E,START_ANCHOR:v}=l,S=$=>`(${o}(?:(?!${v}${$.dot?h:u}).)*?)`,b=n.dot?"":y,_=n.dot?A:g,C=n.bash===!0?S(n):E;n.capture&&(C=`(${C})`),typeof n.noext=="boolean"&&(n.noextglob=n.noext);let x={input:e,index:-1,start:0,dot:n.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:a};e=st.removePrefix(e,x),s=e.length;let T=[],k=[],O=[],R=i,I,M=()=>x.index===s-1,B=x.peek=($=1)=>e[x.index+$],U=x.advance=()=>e[++x.index]||"",V=()=>e.slice(x.index+1),te=($="",J=0)=>{x.consumed+=$,x.index+=J},Q=$=>{x.output+=$.output!=null?$.output:$.value,te($.value)},Z=()=>{let $=1;for(;B()==="!"&&(B(2)!=="("||B(3)==="?");)U(),x.start++,$++;return $%2===0?!1:(x.negated=!0,x.start++,!0)},F=$=>{x[$]++,O.push($)},G=$=>{x[$]--,O.pop()},P=$=>{if(R.type==="globstar"){let J=x.braces>0&&($.type==="comma"||$.type==="brace"),D=$.extglob===!0||T.length&&($.type==="pipe"||$.type==="paren");$.type!=="slash"&&$.type!=="paren"&&!J&&!D&&(x.output=x.output.slice(0,-R.output.length),R.type="star",R.value="*",R.output=C,x.output+=R.output)}if(T.length&&$.type!=="paren"&&(T[T.length-1].inner+=$.value),($.value||$.output)&&Q($),R&&R.type==="text"&&$.type==="text"){R.output=(R.output||R.value)+$.value,R.value+=$.value;return}$.prev=R,a.push($),R=$},z=($,J)=>{let D={...c[J],conditions:1,inner:""};D.prev=R,D.parens=x.parens,D.output=x.output,D.startIndex=x.index,D.tokensIndex=a.length;let N=(n.capture?"(":"")+D.open;F("parens"),P({type:$,value:J,output:x.output?"":p}),P({type:"paren",extglob:!0,value:U(),output:N}),T.push(D)},H=$=>{let J=e.slice($.startIndex,x.index+1),D=e.slice($.startIndex+2,x.index),N=E_(D,n);if(($.type==="plus"||$.type==="star")&&N.risky){let X=N.safeOutput?($.output?"":p)+(n.capture?`(${N.safeOutput})`:N.safeOutput):void 0,se=a[$.tokensIndex];se.type="text",se.value=J,se.output=X||st.escapeRegex(J);for(let ie=$.tokensIndex+1;ie<a.length;ie++)a[ie].value="",a[ie].output="",delete a[ie].suffix;x.output=$.output+se.output,x.backtrack=!0,P({type:"paren",extglob:!0,value:I,output:""}),G("parens");return}let K=$.close+(n.capture?")":""),ee;if($.type==="negate"){let X=C;if($.inner&&$.inner.length>1&&$.inner.includes("/")&&(X=S(n)),(X!==C||M()||/^\)+$/.test(V()))&&(K=$.close=`)$))${X}`),$.inner.includes("*")&&(ee=V())&&/^\.[^\\/.]+$/.test(ee)){let se=Sa(ee,{...t,fastpaths:!1}).output;K=$.close=`)${se})${X})`}$.prev.type==="bos"&&(x.negatedExtglob=!0)}P({type:"paren",extglob:!0,value:I,output:K}),G("parens")};if(n.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(e)){let $=!1,J=e.replace(h_,(D,N,K,ee,X,se)=>ee==="\\"?($=!0,D):ee==="?"?N?N+ee+(X?A.repeat(X.length):""):se===0?_+(X?A.repeat(X.length):""):A.repeat(K.length):ee==="."?u.repeat(K.length):ee==="*"?N?N+ee+(X?C:""):C:N?D:`\\${D}`);return $===!0&&(n.unescape===!0?J=J.replace(/\\/g,""):J=J.replace(/\\+/g,D=>D.length%2===0?"\\\\":D?"\\":"")),J===e&&n.contains===!0?(x.output=e,x):(x.output=st.wrapOutput(J,x,t),x)}for(;!M();){if(I=U(),I==="\0")continue;if(I==="\\"){let D=B();if(D==="/"&&n.bash!==!0||D==="."||D===";")continue;if(!D){I+="\\",P({type:"text",value:I});continue}let N=/^\\+/.exec(V()),K=0;if(N&&N[0].length>2&&(K=N[0].length,x.index+=K,K%2!==0&&(I+="\\")),n.unescape===!0?I=U():I+=U(),x.brackets===0){P({type:"text",value:I});continue}}if(x.brackets>0&&(I!=="]"||R.value==="["||R.value==="[^")){if(n.posix!==!1&&I===":"){let D=R.value.slice(1);if(D.includes("[")&&(R.posix=!0,D.includes(":"))){let N=R.value.lastIndexOf("["),K=R.value.slice(0,N),ee=R.value.slice(N+2),X=d_[ee];if(X){R.value=K+X,x.backtrack=!0,U(),!i.output&&a.indexOf(R)===1&&(i.output=p);continue}}}(I==="["&&B()!==":"||I==="-"&&B()==="]")&&(I=`\\${I}`),I==="]"&&(R.value==="["||R.value==="[^")&&(I=`\\${I}`),n.posix===!0&&I==="!"&&R.value==="["&&(I="^"),R.value+=I,Q({value:I});continue}if(x.quotes===1&&I!=='"'){I=st.escapeRegex(I),R.value+=I,Q({value:I});continue}if(I==='"'){x.quotes=x.quotes===1?0:1,n.keepQuotes===!0&&P({type:"text",value:I});continue}if(I==="("){F("parens"),P({type:"paren",value:I});continue}if(I===")"){if(x.parens===0&&n.strictBrackets===!0)throw new SyntaxError(In("opening","("));let D=T[T.length-1];if(D&&x.parens===D.parens+1){H(T.pop());continue}P({type:"paren",value:I,output:x.parens?")":"\\)"}),G("parens");continue}if(I==="["){if(n.nobracket===!0||!V().includes("]")){if(n.nobracket!==!0&&n.strictBrackets===!0)throw new SyntaxError(In("closing","]"));I=`\\${I}`}else F("brackets");P({type:"bracket",value:I});continue}if(I==="]"){if(n.nobracket===!0||R&&R.type==="bracket"&&R.value.length===1){P({type:"text",value:I,output:`\\${I}`});continue}if(x.brackets===0){if(n.strictBrackets===!0)throw new SyntaxError(In("opening","["));P({type:"text",value:I,output:`\\${I}`});continue}G("brackets");let D=R.value.slice(1);if(R.posix!==!0&&D[0]==="^"&&!D.includes("/")&&(I=`/${I}`),R.value+=I,Q({value:I}),n.literalBrackets===!1||st.hasRegexChars(D))continue;let N=st.escapeRegex(R.value);if(x.output=x.output.slice(0,-R.value.length),n.literalBrackets===!0){x.output+=N,R.value=N;continue}R.value=`(${o}${N}|${R.value})`,x.output+=R.value;continue}if(I==="{"&&n.nobrace!==!0){F("braces");let D={type:"brace",value:I,output:"(",outputIndex:x.output.length,tokensIndex:x.tokens.length};k.push(D),P(D);continue}if(I==="}"){let D=k[k.length-1];if(n.nobrace===!0||!D){P({type:"text",value:I,output:I});continue}let N=")";if(D.dots===!0){let K=a.slice(),ee=[];for(let X=K.length-1;X>=0&&(a.pop(),K[X].type!=="brace");X--)K[X].type!=="dots"&&ee.unshift(K[X].value);N=m_(ee,n),x.backtrack=!0}if(D.comma!==!0&&D.dots!==!0){let K=x.output.slice(0,D.outputIndex),ee=x.tokens.slice(D.tokensIndex);D.value=D.output="\\{",I=N="\\}",x.output=K;for(let X of ee)x.output+=X.output||X.value}P({type:"brace",value:I,output:N}),G("braces"),k.pop();continue}if(I==="|"){T.length>0&&T[T.length-1].conditions++,P({type:"text",value:I});continue}if(I===","){let D=I,N=k[k.length-1];N&&O[O.length-1]==="braces"&&(N.comma=!0,D="|"),P({type:"comma",value:I,output:D});continue}if(I==="/"){if(R.type==="dot"&&x.index===x.start+1){x.start=x.index+1,x.consumed="",x.output="",a.pop(),R=i;continue}P({type:"slash",value:I,output:d});continue}if(I==="."){if(x.braces>0&&R.type==="dot"){R.value==="."&&(R.output=u);let D=k[k.length-1];R.type="dots",R.output+=I,R.value+=I,D.dots=!0;continue}if(x.braces+x.parens===0&&R.type!=="bos"&&R.type!=="slash"){P({type:"text",value:I,output:u});continue}P({type:"dot",value:I,output:u});continue}if(I==="?"){if(!(R&&R.value==="(")&&n.noextglob!==!0&&B()==="("&&B(2)!=="?"){z("qmark",I);continue}if(R&&R.type==="paren"){let N=B(),K=I;(R.value==="("&&!/[!=<:]/.test(N)||N==="<"&&!/<([!=]|\w+>)/.test(V()))&&(K=`\\${I}`),P({type:"text",value:I,output:K});continue}if(n.dot!==!0&&(R.type==="slash"||R.type==="bos")){P({type:"qmark",value:I,output:g});continue}P({type:"qmark",value:I,output:A});continue}if(I==="!"){if(n.noextglob!==!0&&B()==="("&&(B(2)!=="?"||!/[!=<:]/.test(B(3)))){z("negate",I);continue}if(n.nonegate!==!0&&x.index===0){Z();continue}}if(I==="+"){if(n.noextglob!==!0&&B()==="("&&B(2)!=="?"){z("plus",I);continue}if(R&&R.value==="("||n.regex===!1){P({type:"plus",value:I,output:f});continue}if(R&&(R.type==="bracket"||R.type==="paren"||R.type==="brace")||x.parens>0){P({type:"plus",value:I});continue}P({type:"plus",value:f});continue}if(I==="@"){if(n.noextglob!==!0&&B()==="("&&B(2)!=="?"){P({type:"at",extglob:!0,value:I,output:""});continue}P({type:"text",value:I});continue}if(I!=="*"){(I==="$"||I==="^")&&(I=`\\${I}`);let D=p_.exec(V());D&&(I+=D[0],x.index+=D[0].length),P({type:"text",value:I});continue}if(R&&(R.type==="globstar"||R.star===!0)){R.type="star",R.star=!0,R.value+=I,R.output=C,x.backtrack=!0,x.globstar=!0,te(I);continue}let $=V();if(n.noextglob!==!0&&/^\([^?]/.test($)){z("star",I);continue}if(R.type==="star"){if(n.noglobstar===!0){te(I);continue}let D=R.prev,N=D.prev,K=D.type==="slash"||D.type==="bos",ee=N&&(N.type==="star"||N.type==="globstar");if(n.bash===!0&&(!K||$[0]&&$[0]!=="/")){P({type:"star",value:I,output:""});continue}let X=x.braces>0&&(D.type==="comma"||D.type==="brace"),se=T.length&&(D.type==="pipe"||D.type==="paren");if(!K&&D.type!=="paren"&&!X&&!se){P({type:"star",value:I,output:""});continue}for(;$.slice(0,3)==="/**";){let ie=e[x.index+4];if(ie&&ie!=="/")break;$=$.slice(3),te("/**",3)}if(D.type==="bos"&&M()){R.type="globstar",R.value+=I,R.output=S(n),x.output=R.output,x.globstar=!0,te(I);continue}if(D.type==="slash"&&D.prev.type!=="bos"&&!ee&&M()){x.output=x.output.slice(0,-(D.output+R.output).length),D.output=`(?:${D.output}`,R.type="globstar",R.output=S(n)+(n.strictSlashes?")":"|$)"),R.value+=I,x.globstar=!0,x.output+=D.output+R.output,te(I);continue}if(D.type==="slash"&&D.prev.type!=="bos"&&$[0]==="/"){let ie=$[1]!==void 0?"|$":"";x.output=x.output.slice(0,-(D.output+R.output).length),D.output=`(?:${D.output}`,R.type="globstar",R.output=`${S(n)}${d}|${d}${ie})`,R.value+=I,x.output+=D.output+R.output,x.globstar=!0,te(I+U()),P({type:"slash",value:"/",output:""});continue}if(D.type==="bos"&&$[0]==="/"){R.type="globstar",R.value+=I,R.output=`(?:^|${d}|${S(n)}${d})`,x.output=R.output,x.globstar=!0,te(I+U()),P({type:"slash",value:"/",output:""});continue}x.output=x.output.slice(0,-R.output.length),R.type="globstar",R.output=S(n),R.value+=I,x.output+=R.output,x.globstar=!0,te(I);continue}let J={type:"star",value:I,output:C};if(n.bash===!0){J.output=".*?",(R.type==="bos"||R.type==="slash")&&(J.output=b+J.output),P(J);continue}if(R&&(R.type==="bracket"||R.type==="paren")&&n.regex===!0){J.output=I,P(J);continue}(x.index===x.start||R.type==="slash"||R.type==="dot")&&(R.type==="dot"?(x.output+=m,R.output+=m):n.dot===!0?(x.output+=w,R.output+=w):(x.output+=b,R.output+=b),B()!=="*"&&(x.output+=p,R.output+=p)),P(J)}for(;x.brackets>0;){if(n.strictBrackets===!0)throw new SyntaxError(In("closing","]"));x.output=st.escapeLast(x.output,"["),G("brackets")}for(;x.parens>0;){if(n.strictBrackets===!0)throw new SyntaxError(In("closing",")"));x.output=st.escapeLast(x.output,"("),G("parens")}for(;x.braces>0;){if(n.strictBrackets===!0)throw new SyntaxError(In("closing","}"));x.output=st.escapeLast(x.output,"{"),G("braces")}if(n.strictSlashes!==!0&&(R.type==="star"||R.type==="bracket")&&P({type:"maybe_slash",value:"",output:`${d}?`}),x.backtrack===!0){x.output="";for(let $ of x.tokens)x.output+=$.output!=null?$.output:$.value,$.suffix&&(x.output+=$.suffix)}return x};Sa.fastpaths=(e,t)=>{let n={...t},r=typeof n.maxLength=="number"?Math.min(Ns,n.maxLength):Ns,s=e.length;if(s>r)throw new SyntaxError(`Input length: ${s}, exceeds maximum allowed length: ${r}`);e=Wf[e]||e;let{DOT_LITERAL:i,SLASH_LITERAL:a,ONE_CHAR:o,DOTS_SLASH:l,NO_DOT:c,NO_DOTS:u,NO_DOTS_SLASH:f,STAR:d,START_ANCHOR:p}=gr.globChars(n.windows),h=n.dot?u:c,y=n.dot?f:c,m=n.capture?"":"?:",w={negated:!1,prefix:""},A=n.bash===!0?".*?":d;n.capture&&(A=`(${A})`);let g=b=>b.noglobstar===!0?A:`(${m}(?:(?!${p}${b.dot?l:i}).)*?)`,E=b=>{switch(b){case"*":return`${h}${o}${A}`;case".*":return`${i}${o}${A}`;case"*.*":return`${h}${A}${i}${o}${A}`;case"*/*":return`${h}${A}${a}${o}${y}${A}`;case"**":return h+g(n);case"**/*":return`(?:${h}${g(n)}${a})?${y}${o}${A}`;case"**/*.*":return`(?:${h}${g(n)}${a})?${y}${A}${i}${o}${A}`;case"**/.*":return`(?:${h}${g(n)}${a})?${i}${o}${A}`;default:{let _=/^(.*?)\.(\w+)$/.exec(b);if(!_)return;let C=E(_[1]);return C?C+i+_[2]:void 0}}},v=st.removePrefix(e,w),S=E(v);return S&&n.strictSlashes!==!0&&(S+=`${a}?`),S};Jf.exports=Sa});var Yf=at((CF,qf)=>{"use strict";var v_=Hf(),xa=Kf(),Vf=hr(),__=pr(),b_=e=>e&&typeof e=="object"&&!Array.isArray(e),$e=(e,t,n=!1)=>{if(Array.isArray(e)){let u=e.map(d=>$e(d,t,n));return d=>{for(let p of u){let h=p(d);if(h)return h}return!1}}let r=b_(e)&&e.tokens&&e.input;if(e===""||typeof e!="string"&&!r)throw new TypeError("Expected pattern to be a non-empty string");let s=t||{},i=s.windows,a=r?$e.compileRe(e,t):$e.makeRe(e,t,!1,!0),o=a.state;delete a.state;let l=()=>!1;if(s.ignore){let u={...t,ignore:null,onMatch:null,onResult:null};l=$e(s.ignore,u,n)}let c=(u,f=!1)=>{let{isMatch:d,match:p,output:h}=$e.test(u,a,t,{glob:e,posix:i}),y={glob:e,state:o,regex:a,posix:i,input:u,output:h,match:p,isMatch:d};return typeof s.onResult=="function"&&s.onResult(y),d===!1?(y.isMatch=!1,f?y:!1):l(u)?(typeof s.onIgnore=="function"&&s.onIgnore(y),y.isMatch=!1,f?y:!1):(typeof s.onMatch=="function"&&s.onMatch(y),f?y:!0)};return n&&(c.state=o),c};$e.test=(e,t,n,{glob:r,posix:s}={})=>{if(typeof e!="string")throw new TypeError("Expected input to be a string");if(e==="")return{isMatch:!1,output:""};let i=n||{},a=i.format||(s?Vf.toPosixSlashes:null),o=e===r,l=o&&a?a(e):e;return o===!1&&(l=a?a(e):e,o=l===r),(o===!1||i.capture===!0)&&(i.matchBase===!0||i.basename===!0?o=$e.matchBase(e,t,n,s):o=t.exec(l)),{isMatch:!!o,match:o,output:l}};$e.matchBase=(e,t,n)=>(t instanceof RegExp?t:$e.makeRe(t,n)).test(Vf.basename(e));$e.isMatch=(e,t,n)=>$e(t,n)(e);$e.parse=(e,t)=>Array.isArray(e)?e.map(n=>$e.parse(n,t)):xa(e,{...t,fastpaths:!1});$e.scan=(e,t)=>v_(e,t);$e.compileRe=(e,t,n=!1,r=!1)=>{if(n===!0)return e.output;let s=t||{},i=s.contains?"":"^",a=s.contains?"":"$",o=`${i}(?:${e.output})${a}`;e&&e.negated===!0&&(o=`^(?!${o}).*$`);let l=$e.toRegex(o,t);return r===!0&&(l.state=e),l};$e.makeRe=(e,t={},n=!1,r=!1)=>{if(!e||typeof e!="string")throw new TypeError("Expected a non-empty string");let s={negated:!1,fastpaths:!0};return t.fastpaths!==!1&&(e[0]==="."||e[0]==="*")&&(s.output=xa.fastpaths(e,t)),s.output||(s=xa(e,t)),$e.compileRe(s,t,n,r)};$e.toRegex=(e,t)=>{try{let n=t||{};return new RegExp(e,n.flags||(n.nocase?"i":""))}catch(n){if(t&&t.debug===!0)throw n;return/$^/}};$e.constants=__;qf.exports=$e});var td=at((IF,ed)=>{"use strict";var Xf=Yf(),S_=hr();function Zf(e,t,n=!1){return t&&(t.windows===null||t.windows===void 0)&&(t={...t,windows:S_.isWindows()}),Xf(e,t,n)}Object.assign(Zf,Xf);ed.exports=Zf});import{Module as Ti,builtinModules as Rm,createRequire as Zn}from"module";function Go(e){return new je("builtin:vite-module-preload-polyfill",e)}function zo(e){return e&&(e.include=bt(e.include),e.exclude=bt(e.exclude)),new je("builtin:vite-dynamic-import-vars",e)}function Jo(e){return new je("builtin:vite-import-glob",e)}function Ko(e){return new je("builtin:vite-reporter",e)}function Vo(){return new je("builtin:vite-load-fallback")}function qo(e){let t=new je("builtin:vite-json",e);return ar(t)}function Yo(e){return new je("builtin:vite-build-import-analysis",e)}function Xo(e){let t=new je("builtin:vite-resolve",{...e,yarnPnp:typeof process=="object"&&!!process.versions?.pnp});return ar(t)}function Zo(){return new je("builtin:vite-web-worker-post")}function Ms(e){let t=new je("builtin:esm-external-require",e);return t.enforce="pre",t}function ea(){let e=new je("builtin:oxc-runtime");return ar(e)}var ta=ks(Ts(),1);var lE=typeof process=="object"&&!!process.versions?.pnp;function cE(e){return e.type==="JsError"?e.field0:{code:e.field0.kind,message:e.field0.message,id:e.field0.id,exporter:e.field0.exporter,loc:e.field0.loc,pos:e.field0.pos}}function xn(e,t,n,r){let s=(0,ta.enhancedTransformSync)(e,t,n,r,lE);return{...s,errors:s.errors.map(Fu),warnings:s.warnings.map(cE)}}var Uu=typeof process=="object"&&!!process.versions?.pnp,lr=class extends ta.TsconfigCache{constructor(e){super(Uu,e)}};function na(e,t){return(0,ta.resolveTsconfig)(e,t,Uu)}var zu=[],Ju=[],Ku=[];for(let e=27;e!==0;e--)zu.push(0);for(let e=138;e!==0;e--)Ju.push(0),Ku.push(0);zu.length=0;Ju.length=0;Ku.length=0;var Pt=Lu(wf(),1);import*as er from"fs";import pe,{existsSync as CS,readFileSync as IS}from"fs";import L,{basename as RS,dirname as eo,extname as kS,isAbsolute as TS,join as zt,normalize as OS,posix as Qe,relative as BS,resolve as cs,sep as jd}from"path";import Ee,{constants as km}from"fs/promises";import{URL as $S,fileURLToPath as kt,pathToFileURL as tt}from"url";import{format as MS,formatWithOptions as DS,inspect as Wn,parseEnv as PS,promisify as An,stripVTControlCharacters as za}from"util";import{performance as Je}from"perf_hooks";import to from"crypto";import{MessageChannel as Ul,Worker as Qd}from"worker_threads";import{readdir as x_,readdirSync as C_,realpath as I_,realpathSync as R_,stat as k_,statSync as T_}from"fs";import{isAbsolute as O_,posix as Vt,resolve as B_}from"path";import{fileURLToPath as $_}from"url";import{createRequire as zE}from"module";import{basename as JE,dirname as ma,normalize as KE,relative as VE,resolve as qE,sep as _f}from"path";import*as YE from"fs";var Ef=zE(import.meta.url);function XE(e){let t=KE(e);return t.length>1&&t[t.length-1]===_f&&(t=t.substring(0,t.length-1)),t}var ZE=/[\\/]/g;function bf(e,t){return e.replace(ZE,t)}var ev=/^[a-z]:[\\/]$/i;function tv(e){return e==="/"||ev.test(e)}function ha(e,t){let{resolvePaths:n,normalizePath:r,pathSeparator:s}=t,i=process.platform==="win32"&&e.includes("/")||e.startsWith(".");if(n&&(e=qE(e)),(r||i)&&(e=XE(e)),e===".")return"";let a=e[e.length-1]!==s;return bf(a?e+s:e,s)}function Sf(e,t){return t+e}function nv(e,t){return function(n,r){return r.startsWith(e)?r.slice(e.length)+n:bf(VE(e,r),t.pathSeparator)+t.pathSeparator+n}}function rv(e){return e}function sv(e,t,n){return t+e+n}function iv(e,t){let{relativePaths:n,includeBasePath:r}=t;return n&&e?nv(e,t):r?Sf:rv}function ov(e){return function(t,n){n.push(t.substring(e.length)||".")}}function av(e){return function(t,n,r){let s=t.substring(e.length)||".";r.every(i=>i(s,!0))&&n.push(s)}}var lv=(e,t)=>{t.push(e||".")},cv=(e,t,n)=>{let r=e||".";n.every(s=>s(r,!0))&&t.push(r)},uv=()=>{};function fv(e,t){let{includeDirs:n,filters:r,relativePaths:s}=t;return n?s?r&&r.length?av(e):ov(e):r&&r.length?cv:lv:uv}var dv=(e,t,n,r)=>{r.every(s=>s(e,!1))&&n.files++},pv=(e,t,n,r)=>{r.every(s=>s(e,!1))&&t.push(e)},hv=(e,t,n,r)=>{n.files++},mv=(e,t)=>{t.push(e)},gv=()=>{};function yv(e){let{excludeFiles:t,filters:n,onlyCounts:r}=e;return t?gv:n&&n.length?r?dv:pv:r?hv:mv}var Av=e=>e,wv=()=>[""].slice(0,0);function Ev(e){return e.group?wv:Av}var vv=(e,t,n)=>{e.push({directory:t,files:n,dir:t})},_v=()=>{};function bv(e){return e.group?vv:_v}var Sv=function(e,t,n){let{queue:r,fs:s,options:{suppressErrors:i}}=t;r.enqueue(),s.realpath(e,(a,o)=>{if(a)return r.dequeue(i?null:a,t);s.stat(o,(l,c)=>{if(l)return r.dequeue(i?null:l,t);if(c.isDirectory()&&xf(e,o,t))return r.dequeue(null,t);n(c,o),r.dequeue(null,t)})})},xv=function(e,t,n){let{queue:r,fs:s,options:{suppressErrors:i}}=t;r.enqueue();try{let a=s.realpathSync(e),o=s.statSync(a);if(o.isDirectory()&&xf(e,a,t))return;n(o,a)}catch(a){if(!i)throw a}};function Cv(e,t){return!e.resolveSymlinks||e.excludeSymlinks?null:t?xv:Sv}function xf(e,t,n){if(n.options.useRealPaths)return Iv(t,n);let r=ma(e),s=1;for(;r!==n.root&&s<2;){let i=n.symlinks.get(r);!!i&&(i===t||i.startsWith(t)||t.startsWith(i))?s++:r=ma(r)}return n.symlinks.set(e,t),s>1}function Iv(e,t){return t.visited.includes(e+t.options.pathSeparator)}var Rv=e=>e.counts,kv=e=>e.groups,Tv=e=>e.paths,Ov=e=>e.paths.slice(0,e.options.maxFiles),Bv=(e,t,n)=>(Ps(t,n,e.counts,e.options.suppressErrors),null),$v=(e,t,n)=>(Ps(t,n,e.paths,e.options.suppressErrors),null),Mv=(e,t,n)=>(Ps(t,n,e.paths.slice(0,e.options.maxFiles),e.options.suppressErrors),null),Dv=(e,t,n)=>(Ps(t,n,e.groups,e.options.suppressErrors),null);function Ps(e,t,n,r){t(e&&!r?e:null,n)}function Pv(e,t){let{onlyCounts:n,group:r,maxFiles:s}=e;return n?t?Rv:Bv:r?t?kv:Dv:s?t?Ov:Mv:t?Tv:$v}var Cf={withFileTypes:!0},Nv=(e,t,n,r,s)=>{if(e.queue.enqueue(),r<0)return e.queue.dequeue(null,e);let{fs:i}=e;e.visited.push(t),e.counts.directories++,i.readdir(t||".",Cf,(a,o=[])=>{s(o,n,r),e.queue.dequeue(e.options.suppressErrors?null:a,e)})},Lv=(e,t,n,r,s)=>{let{fs:i}=e;if(r<0)return;e.visited.push(t),e.counts.directories++;let a=[];try{a=i.readdirSync(t||".",Cf)}catch(o){if(!e.options.suppressErrors)throw o}s(a,n,r)};function Fv(e){return e?Lv:Nv}var jv=class{count=0;constructor(e){this.onQueueEmpty=e}enqueue(){return this.count++,this.count}dequeue(e,t){this.onQueueEmpty&&(--this.count<=0||e)&&(this.onQueueEmpty(e,t),e&&(t.controller.abort(),this.onQueueEmpty=void 0))}},Qv=class{_files=0;_directories=0;set files(e){this._files=e}get files(){return this._files}set directories(e){this._directories=e}get directories(){return this._directories}get dirs(){return this._directories}},Uv=class{aborted=!1;abort(){this.aborted=!0}},If=class{root;isSynchronous;state;joinPath;pushDirectory;pushFile;getArray;groupFiles;resolveSymlink;walkDirectory;callbackInvoker;constructor(e,t,n){this.isSynchronous=!n,this.callbackInvoker=Pv(t,this.isSynchronous),this.root=ha(e,t),this.state={root:tv(this.root)?this.root:this.root.slice(0,-1),paths:[""].slice(0,0),groups:[],counts:new Qv,options:t,queue:new jv((r,s)=>this.callbackInvoker(s,r,n)),symlinks:new Map,visited:[""].slice(0,0),controller:new Uv,fs:t.fs||YE},this.joinPath=iv(this.root,t),this.pushDirectory=fv(this.root,t),this.pushFile=yv(t),this.getArray=Ev(t),this.groupFiles=bv(t),this.resolveSymlink=Cv(t,this.isSynchronous),this.walkDirectory=Fv(this.isSynchronous)}start(){return this.pushDirectory(this.root,this.state.paths,this.state.options.filters),this.walkDirectory(this.state,this.root,this.root,this.state.options.maxDepth,this.walk),this.isSynchronous?this.callbackInvoker(this.state,null):null}walk=(e,t,n)=>{let{paths:r,options:{filters:s,resolveSymlinks:i,excludeSymlinks:a,exclude:o,maxFiles:l,signal:c,useRealPaths:u,pathSeparator:f},controller:d}=this.state;if(d.aborted||c&&c.aborted||l&&r.length>l)return;let p=this.getArray(this.state.paths);for(let h=0;h<e.length;++h){let y=e[h];if(y.isFile()||y.isSymbolicLink()&&!i&&!a){let m=this.joinPath(y.name,t);this.pushFile(m,p,this.state.counts,s)}else if(y.isDirectory()){let m=sv(y.name,t,this.state.options.pathSeparator);if(o&&o(y.name,m))continue;this.pushDirectory(m,r,s),this.walkDirectory(this.state,m,m,n-1,this.walk)}else if(this.resolveSymlink&&y.isSymbolicLink()){let m=Sf(y.name,t);this.resolveSymlink(m,this.state,(w,A)=>{if(w.isDirectory()){if(A=ha(A,this.state.options),o&&o(y.name,u?A:m+f))return;this.walkDirectory(this.state,A,u?A:m+f,n-1,this.walk)}else{A=u?A:m;let g=JE(A),E=ha(ma(A),this.state.options);A=this.joinPath(g,E),this.pushFile(A,p,this.state.counts,s)}})}}this.groupFiles(this.state.groups,t,p)}};function Hv(e,t){return new Promise((n,r)=>{Rf(e,t,(s,i)=>{if(s)return r(s);n(i)})})}function Rf(e,t,n){new If(e,t,n).start()}function Wv(e,t){return new If(e,t).start()}var vf=class{constructor(e,t){this.root=e,this.options=t}withPromise(){return Hv(this.root,this.options)}withCallback(e){Rf(this.root,this.options,e)}sync(){return Wv(this.root,this.options)}},kf=null;try{Ef.resolve("picomatch"),kf=Ef("picomatch")}catch{}var Tf=class{globCache={};options={maxDepth:1/0,suppressErrors:!0,pathSeparator:_f,filters:[]};globFunction;constructor(e){this.options={...this.options,...e},this.globFunction=this.options.globFunction}group(){return this.options.group=!0,this}withPathSeparator(e){return this.options.pathSeparator=e,this}withBasePath(){return this.options.includeBasePath=!0,this}withRelativePaths(){return this.options.relativePaths=!0,this}withDirs(){return this.options.includeDirs=!0,this}withMaxDepth(e){return this.options.maxDepth=e,this}withMaxFiles(e){return this.options.maxFiles=e,this}withFullPaths(){return this.options.resolvePaths=!0,this.options.includeBasePath=!0,this}withErrors(){return this.options.suppressErrors=!1,this}withSymlinks({resolvePaths:e=!0}={}){return this.options.resolveSymlinks=!0,this.options.useRealPaths=e,this.withFullPaths()}withAbortSignal(e){return this.options.signal=e,this}normalize(){return this.options.normalizePath=!0,this}filter(e){return this.options.filters.push(e),this}onlyDirs(){return this.options.excludeFiles=!0,this.options.includeDirs=!0,this}exclude(e){return this.options.exclude=e,this}onlyCounts(){return this.options.onlyCounts=!0,this}crawl(e){return new vf(e||".",this.options)}withGlobFunction(e){return this.globFunction=e,this}crawlWithOptions(e,t){return this.options={...this.options,...t},new vf(e||".",this.options)}glob(...e){return this.globFunction?this.globWithOptions(e):this.globWithOptions(e,{dot:!0})}globWithOptions(e,...t){let n=this.globFunction||kf;if(!n)throw new Error("Please specify a glob function to use glob matching.");var r=this.globCache[e.join("\0")];return r||(r=n(e,...t),this.globCache[e.join("\0")]=r),this.options.filters.push(s=>r(s)),this}};var Rn=Lu(td(),1),M_=Array.isArray,id=/\\/g,D_=/^[A-Za-z]:$/,od=process.platform==="win32",P_=/^(\/?\.\.)+$/;function N_(e,t={}){let n=e.length,r=Array(n),s=Array(n),i,a;for(i=0;i<n;i++){let o=ad(e[i]);r[i]=o;let l=o.length,c=Array(l);for(a=0;a<l;a++)c[a]=(0,Rn.default)(o[a],t);s[i]=c}return o=>{let l=o.split("/");if(l[0]===".."&&P_.test(o))return!0;for(i=0;i<n;i++){let c=r[i],u=s[i],f=l.length,d=Math.min(f,c.length);for(a=0;a<d;){let p=c[a];if(p.includes("/"))return!0;if(!u[a](l[a]))break;if(!t.noglobstar&&p==="**")return!0;a++}if(a===f)return!0}return!1}}var L_=/^[A-Z]:\/$/i,F_=od?e=>L_.test(e):e=>e==="/";function nd(e,t,n){if(e===t||t.startsWith(`${e}/`)){if(n){let s=e.length+ +!F_(e);return(i,a)=>i.slice(s,a?-1:void 0)||"."}let r=t.slice(e.length+1);return r?(s,i)=>{if(s===".")return r;let a=`${r}/${s}`;return i?a.slice(0,-1):a}:(s,i)=>i&&s!=="."?s.slice(0,-1):s}return n?r=>Vt.relative(e,r)||".":r=>Vt.relative(e,`${t}/${r}`)||"."}function j_(e,t){if(t.startsWith(`${e}/`)){let n=t.slice(e.length+1);return r=>`${n}/${r}`}return n=>{let r=Vt.relative(e,`${t}/${n}`);return n[n.length-1]==="/"&&r!==""?`${r}/`:r||"."}}function rd(e){return e.replace(D_,t=>`${t}/`)}var Q_={parts:!0};function ad(e){var t;let n=Rn.default.scan(e,Q_);return!((t=n.parts)===null||t===void 0)&&t.length?n.parts:[e]}var U_=/(?<!\\)([()[\]{}*?|]|^!|[!+@](?=\()|\\(?![()[\]{}!*+?@|]))/g,H_=/(?<!\\)([()[\]{}]|^!|[!+@](?=\())/g,W_=e=>e.replace(U_,"\\$&"),G_=e=>e.replace(H_,"\\$&"),kn=od?G_:W_;function Ar(e,t){if(t?.caseSensitiveMatch===!1)return!0;let n=Rn.default.scan(e);return n.isGlob||n.negated}function yr(...e){console.log(`[tinyglobby ${new Date().toLocaleTimeString("es")}]`,...e)}function ld(e){return typeof e=="string"?[e]:e??[]}var z_=/^(\/?\.\.)+/,J_=/\\(?=[()[\]{}!*+?@|])/g;function Ca(e,t,n,r){var s;let i=t.cwd,a=e;e[e.length-1]==="/"&&(a=e.slice(0,-1)),a[a.length-1]!=="*"&&t.expandDirectories&&(a+="/**");let o=kn(i);a=O_(a.replace(J_,""))?Vt.relative(o,a):Vt.normalize(a);let l=(s=z_.exec(a))===null||s===void 0?void 0:s[0],c=ad(a);if(l){let f=(l.length+1)/3,d=0,p=o.split("/");for(;d<f&&c[d+f]===p[p.length+d-f];)a=a.slice(0,(f-d-1)*3)+a.slice((f-d)*3+c[d+f].length+1)||".",d++;let h=Vt.join(i,l.slice(d*3));h[0]!=="."&&n.root.length>h.length&&(n.root=rd(h),n.depthOffset=-f+d)}if(!r&&n.depthOffset>=0){var u;(u=n.commonPath)!==null&&u!==void 0||(n.commonPath=c);let f=[],d=Math.min(n.commonPath.length,c.length);for(let p=0;p<d;p++){let h=c[p];if(h==="**"&&!c[p+1]){f.pop();break}if(p===c.length-1||h!==n.commonPath[p]||Ar(h))break;f.push(h)}n.depthOffset=f.length,n.commonPath=f,n.root=rd(f.length>0?Vt.join(i,...f):i)}return a}function K_(e,t,n){let r=[],s=[];for(let i of e.ignore)i&&(i[0]!=="!"||i[1]==="(")&&s.push(Ca(i,e,n,!0));for(let i of t)i&&(i[0]!=="!"||i[1]==="("?r.push(Ca(i,e,n,!1)):(i[1]!=="!"||i[2]==="(")&&s.push(Ca(i.slice(1),e,n,!0)));return{match:r,ignore:s}}function V_(e,t){let n=e.cwd,r={root:n,depthOffset:0},s=K_(e,t,r);e.debug&&yr("internal processing patterns:",s);let{absolute:i,caseSensitiveMatch:a,debug:o,dot:l,followSymbolicLinks:c,onlyDirectories:u}=e,f=r.root.replace(id,""),d={dot:l,nobrace:e.braceExpansion===!1,nocase:!a,noextglob:e.extglob===!1,noglobstar:e.globstar===!1,posix:!0},p=(0,Rn.default)(s.match,d),h=(0,Rn.default)(s.ignore,d),y=N_(s.match,d),m=nd(n,f,i),w=i?m:nd(n,f,!0),A=(v,S)=>{let b=w(S,!0);return b!=="."&&!y(b)||h(b)},g;e.deep!==void 0&&(g=Math.round(e.deep-r.depthOffset));let E=new Tf({filters:[o?(v,S)=>{let b=m(v,S),_=p(b)&&!h(b);return _&&yr(`matched ${b}`),_}:(v,S)=>{let b=m(v,S);return p(b)&&!h(b)}],exclude:o?(v,S)=>{let b=A(v,S);return yr(`${b?"skipped":"crawling"} ${S}`),b}:A,fs:e.fs,pathSeparator:"/",relativePaths:!i,resolvePaths:i,includeBasePath:i,resolveSymlinks:c,excludeSymlinks:!c,excludeFiles:u,includeDirs:u||!e.onlyFiles,maxDepth:g,signal:e.signal}).crawl(f);return e.debug&&yr("internal properties:",{...r,root:f}),[E,n!==f&&!i&&j_(n,f)]}function cd(e,t){if(t)for(let n=e.length-1;n>=0;n--)e[n]=t(e[n]);return e}var sd={caseSensitiveMatch:!0,debug:!!process.env.TINYGLOBBY_DEBUG,expandDirectories:!0,followSymbolicLinks:!0,onlyFiles:!0};function q_(e){let t=Object.assign({},e);for(let n in sd)t[n]===void 0&&Object.assign(t,{[n]:sd[n]});return t.cwd=(t.cwd instanceof URL?$_(t.cwd):B_(t.cwd||process.cwd())).replace(id,"/"),t.ignore=ld(t.ignore),t.fs&&(t.fs={readdir:t.fs.readdir||x_,readdirSync:t.fs.readdirSync||C_,realpath:t.fs.realpath||I_,realpathSync:t.fs.realpathSync||R_,stat:t.fs.stat||k_,statSync:t.fs.statSync||T_}),t.debug&&yr("globbing with options:",t),t}function ud(e,t={}){var n;if(e&&t?.patterns)throw new Error("Cannot pass patterns as both an argument and an option");let r=M_(e)||typeof e=="string",s=ld((n=r?e:e.patterns)!==null&&n!==void 0?n:"**/*"),i=q_(r?t:e);return s.length>0?V_(i,s):[]}async function wr(e,t){let[n,r]=ud(e,t);return n?cd(await n.withPromise(),r):[]}function Tn(e,t){let[n,r]=ud(e,t);return n?cd(n.sync(),r):[]}import zr from"os";import Oi from"net";import Tm,{exec as Om,execFile as no,execSync as Ud}from"child_process";import{promises as Js}from"dns";import{isatty as NS}from"tty";import LS,{isAbsolute as FS,join as Ja,posix as Bm,resolve as $m,win32 as jS}from"path";function St(e,t){return new RegExp(`^${dd(e)}$`,t)}function On(e,t){return new RegExp(`^${dd(e)}`,t)}var Y_=/[-/\\^$*+?.()|[\]{}]/g;function dd(e){return e.replace(Y_,"\\$&")}function Ia(e){return Array.isArray(e)?e.map(t=>fd(t)):fd(e)}function fd(e){return typeof e=="string"?`${e}{?*,}`:X_(e)}function X_(e){return new RegExp(e.source.replace(/(?<!\\)\$/g,"(?:\\?.*)?$"),e.flags)}import{pathToFileURL as KF}from"url";var Ge=ks(Ts(),1),Z_=class{#e;constructor(e){this.#e=e}getModuleInfo(e){return this.#e.getModuleInfo(e)??null}getModuleIds(){return this.#e.getModuleIds()}},eb=class pd{#e;#t=null;#n=!1;moduleGraph;static async create(t,n={},r={}){t=await Uo.callOptionsHook(t);let s=await Wo(t,n,!1),i=r.onHmrUpdates,a=i?function(d){let p=jo(d);if(p instanceof Error){i(p);return}let[h,y]=p;i({updates:h,changedFiles:y})}:void 0,o=r.onOutput,l=o?function(d){let p=jo(d);if(p instanceof Error){o(p);return}o(Qo(p))}:void 0,c=r.onAdditionalAssets,u={onHmrUpdates:a,onOutput:l,onAdditionalAssets:c?function(d){c(Qo(d))}:void 0,rebuildStrategy:r.rebuildStrategy?r.rebuildStrategy==="always"?Ge.BindingRebuildStrategy.Always:Ge.BindingRebuildStrategy.Never:void 0,watch:r.watch&&{enabled:r.watch.enabled,skipWrite:r.watch.skipWrite,usePolling:r.watch.usePolling,pollInterval:r.watch.pollInterval,useDebounce:r.watch.useDebounce,debounceDuration:r.watch.debounceDuration,compareContentsForPolling:r.watch.compareContentsForPolling,debounceTickRate:r.watch.debounceTickRate,include:bt(r.watch.include),exclude:bt(r.watch.exclude)}},f=new Ge.BindingDevEngine(s.bundlerOptions,u);return(0,Ge.startAsyncRuntime)(),new pd(f)}constructor(t){this.#e=t,this.moduleGraph=new Z_(t)}async run(){await this.#e.run()}async ensureCurrentBuildFinish(){if(this.#t)return this.#t;let t=this.#e.ensureCurrentBuildFinish().then(()=>{this.#t=null});return this.#t=t,t}async getBundleState(){return this.#e.getBundleState()}async ensureLatestBuildOutput(){Fo(await this.#e.ensureLatestBuildOutput())}triggerFullBuild(){this.#e.triggerFullBuild()}async registerClient(t){await this.#e.registerClient(t)}async notifyPayloadDelivered(t){await this.#e.notifyPayloadDelivered(t)}async removeClient(t){await this.#e.removeClient(t)}async close(){let t=!this.#n;this.#n=!0;try{await this.#e.close()}finally{t&&(0,Ge.shutdownAsyncRuntime)()}}async compileEntry(t,n){return this.#e.compileEntry(t,n)}},hd=(...e)=>eb.create(...e);var md=async(e,t={})=>{Ho("input",e),Ho("output",t);let n=await Uo.callOptionsHook(e),r=await Wo(n,t,!1),s=new Ge.BindingBundler;(0,Ge.startAsyncRuntime)();let i=!1;async function a(){if(!i){i=!0;try{await s.close(),await r.stopWorkers?.()}finally{(0,Ge.shutdownAsyncRuntime)()}}}let o=Promise.resolve();try{let l=await s.scan(r.bundlerOptions);Fo(l)}catch(l){throw await a(),l}finally{o=a()}return o};function gd(e){return new je("builtin:vite-alias",e)}function yd(e){return new je("builtin:vite-transform",{...e,include:bt(e.include),exclude:bt(e.exclude),jsxRefreshInclude:bt(e.jsxRefreshInclude),jsxRefreshExclude:bt(e.jsxRefreshExclude),yarnPnp:typeof process=="object"&&!!process.versions?.pnp})}function Ad(e){return new je("builtin:vite-manifest",e)}var VF=Ge.BindingRebuildStrategy,qF=Ge.ResolverFactory,YF=Ge.getNativeMemoryStats,XF=Ge.isolatedDeclaration,ZF=Ge.isolatedDeclarationSync,ej=Ge.moduleRunnerTransform,tj=Ge.resetNativeMemoryStats;import Hl from"readline";import an from"assert";import At from"process";import QS from"v8";import{EventEmitter as Wl}from"events";import{STATUS_CODES as US,createServer as HS,get as WS}from"http";import{createServer as GS,get as zS}from"https";import{readdirSync as JS,statSync as KS}from"fs";var ja="sourceMa";ja+="ppingURL";var Bn=typeof process<"u"&&process.platform==="win32";function Ba(e){return e.startsWith("/@id/")?e.slice(5).replace("__x00__","\0"):e}var tb=/\\/g;function Qs(e){return e.replace(tb,"/")}var nb=/[?#].*$/;function Cd(e){return e.replace(nb,"")}function rb(e){return!e||typeof e!="object"&&typeof e!="function"}var Id=async function(){}.constructor,Ra;function sb(){if(Ra===void 0){let e="/*code*/",t=new Id("a","b",e).toString();Ra=t.slice(0,t.indexOf(e)).split(`
|
|
4
|
-
`).length-1}return Ra}function ib(){let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}var ob=/^[A-Za-z]:\//;function Rd(e=""){return e&&e.replace(/\\/g,"/").replace(ob,t=>t.toUpperCase())}var ab=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/,lb=/^[A-Za-z]:$/;function cb(){return typeof process<"u"&&typeof process.cwd=="function"?process.cwd().replace(/\\/g,"/"):"/"}var ub=function(...e){e=e.map(r=>Rd(r));let t="",n=!1;for(let r=e.length-1;r>=-1&&!n;r--){let s=r>=0?e[r]:cb();!s||s.length===0||(t=`${s}/${t}`,n=$a(s))}return t=fb(t,!n),n&&!$a(t)?`/${t}`:t.length>0?t:"."};function fb(e,t){let n="",r=0,s=-1,i=0,a=null;for(let o=0;o<=e.length;++o){if(o<e.length)a=e[o];else{if(a==="/")break;a="/"}if(a==="/"){if(s!==o-1&&i!==1)if(i===2){if(n.length<2||r!==2||n[n.length-1]!=="."||n[n.length-2]!=="."){if(n.length>2){let l=n.lastIndexOf("/");l===-1?(n="",r=0):(n=n.slice(0,l),r=n.length-1-n.lastIndexOf("/")),s=o,i=0;continue}if(n.length>0){n="",r=0,s=o,i=0;continue}}t&&(n+=n.length>0?"/..":"..",r=2)}else n.length>0?n+=`/${e.slice(s+1,o)}`:n=e.slice(s+1,o),r=o-s-1;s=o,i=0}else a==="."&&i!==-1?++i:i=-1}return n}var $a=function(e){return ab.test(e)},db=function(e){let t=Rd(e).replace(/\/$/,"").split("/").slice(0,-1);return t.length===1&&lb.test(t[0])&&(t[0]+="/"),t.join("/")||($a(e)?"/":".")},pb=new TextDecoder,kd=(()=>{let e=typeof Buffer=="function"?Buffer:void 0;return e&&typeof e.from=="function"?t=>e.from(t,"base64").toString("utf-8"):t=>pb.decode(Uint8Array.from(atob(t),n=>n.charCodeAt(0)))})(),hb=/%/g,mb=/\\/g,gb=/\n/g,yb=/\r/g,Ab=/\t/g,wb=/\?/g,Eb=/#/g;function vb(e){return e.includes("%")&&(e=e.replace(hb,"%25")),!Bn&&e.includes("\\")&&(e=e.replace(mb,"%5C")),e.includes(`
|
|
5
|
-
`)&&(e=e.replace(gb,"%0A")),e.includes("\r")&&(e=e.replace(yb,"%0D")),e.includes(" ")&&(e=e.replace(Ab,"%09")),e}var Gs=db,vr=ub;function Td(e){let t=vr(e),n=e.charCodeAt(e.length-1);return(n===47||Bn&&n===92)&&t[t.length-1]!=="/"&&(t+="/"),t=vb(t),t.includes("?")&&(t=t.replace(wb,"%3F")),t.includes("#")&&(t=t.replace(Eb,"%23")),new URL(`file://${t}`).href}function wd(e){return e.replace(/\//g,"\\")}var _b=44,Ed="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bb=new Uint8Array(64),Od=new Uint8Array(128);for(let e=0;e<Ed.length;e++){let t=Ed.charCodeAt(e);bb[e]=t,Od[t]=e}function Er(e,t){let n=0,r=0,s=0;do s=Od[e.next()],n|=(s&31)<<r,r+=5;while(s&32);let i=n&1;return n>>>=1,i&&(n=-2147483648|-n),t+n}function vd(e,t){return e.pos>=t?!1:e.peek()!==_b}var Sb=class{constructor(e){this.pos=0,this.buffer=e}next(){return this.buffer.charCodeAt(this.pos++)}peek(){return this.buffer.charCodeAt(this.pos)}indexOf(e){let{buffer:t,pos:n}=this,r=t.indexOf(e,n);return r===-1?t.length:r}};function xb(e){let{length:t}=e,n=new Sb(e),r=[],s=0,i=0,a=0,o=0,l=0;do{let c=n.indexOf(";"),u=[],f=!0,d=0;for(s=0;n.pos<c;){let p;s=Er(n,s),s<d&&(f=!1),d=s,vd(n,c)?(i=Er(n,i),a=Er(n,a),o=Er(n,o),vd(n,c)?(l=Er(n,l),p=[s,i,a,o,l]):p=[s,i,a,o]):p=[s],u.push(p),n.pos++}f||Cb(u),r.push(u),n.pos=c+1}while(n.pos<=t);return r}function Cb(e){e.sort(Ib)}function Ib(e,t){return e[0]-t[0]}var zs=0,Rb=1,kb=2,Tb=3,Ob=4,Us=!1;function Bb(e,t,n,r){for(;n<=r;){let s=n+(r-n>>1),i=e[s][zs]-t;if(i===0)return Us=!0,s;i<0?n=s+1:r=s-1}return Us=!1,n-1}function $b(e,t,n){for(let r=n+1;r<e.length&&e[r][zs]===t;n=r++);return n}function Mb(e,t,n){for(let r=n-1;r>=0&&e[r][zs]===t;n=r--);return n}function Db(e,t,n,r){let{lastKey:s,lastNeedle:i,lastIndex:a}=n,o=0,l=e.length-1;if(r===s){if(t===i)return Us=a!==-1&&e[a][zs]===t,a;t>=i?o=a===-1?0:a:l=a}return n.lastKey=r,n.lastNeedle=t,n.lastIndex=Bb(e,t,o,l)}var Pb="`line` must be greater than 0 (lines start at line 1)",Nb="`column` must be greater than or equal to 0 (columns start at column 0)";function Lb(e){var t;return(t=e)._decoded||(t._decoded=xb(e._encoded))}function Fb(e,t){let{line:n,column:r,bias:s}=t;if(n--,n<0)throw Error(Pb);if(r<0)throw Error(Nb);let i=Lb(e);if(n>=i.length)return Ls(null,null,null,null);let a=i[n],o=jb(a,e._decodedMemo,n,r,s||1);if(o===-1)return Ls(null,null,null,null);let l=a[o];if(l.length===1)return Ls(null,null,null,null);let{names:c,resolvedSources:u}=e;return Ls(u[l[Rb]],l[kb]+1,l[Tb],l.length===5?c[l[Ob]]:null)}function Ls(e,t,n,r){return{source:e,line:t,column:n,name:r}}function jb(e,t,n,r,s){let i=Db(e,r,t,n);return Us?i=(s===-1?$b:Mb)(e,r,i):s===-1&&i++,i===-1||i===e.length?-1:i}var Bd=class{map;_encoded;_decoded;_decodedMemo;url;file;version;names=[];resolvedSources;constructor(e,t){this.map=e;let{mappings:n,names:r,sources:s}=e;this.version=e.version,this.names=r||[],this._encoded=n||"",this._decodedMemo=Qb(),this.url=t,this.file=t;let i=Gs(t);this.resolvedSources=(s||[]).map(a=>vr(i,a||""))}};function Qb(){return{lastKey:-1,lastNeedle:-1,lastIndex:-1}}function Ub(e,t){let n=Fb(e,t);return n.column==null?null:n}var Hb=RegExp(`//# ${ja}=data:application/json;base64,(.+)`),Wb=class{id;url;importers=new Set;imports=new Set;evaluated=!1;meta;promise;exports;file;map;constructor(e,t){this.id=e,this.url=t,this.file=Cd(e)}},Gb=class{idToModuleMap=new Map;fileToModulesMap=new Map;urlToIdModuleMap=new Map;getModuleById(e){return this.idToModuleMap.get(e)}getModulesByFile(e){return this.fileToModulesMap.get(e)}getModuleByUrl(e){return this.urlToIdModuleMap.get(Ba(e))}ensureModule(e,t){if(e=Jb(e),this.idToModuleMap.has(e)){let s=this.idToModuleMap.get(e);return this.urlToIdModuleMap.set(t,s),s}let n=new Wb(e,t);this.idToModuleMap.set(e,n),this.urlToIdModuleMap.set(t,n);let r=this.fileToModulesMap.get(n.file)||new Set;return r.add(n),this.fileToModulesMap.set(n.file,r),n}invalidateModule(e){e.evaluated=!1,e.meta=void 0,e.map=void 0,e.promise=void 0,e.exports=void 0,e.imports.clear()}getModuleSourceMapById(e){let t=this.getModuleById(e);if(!t)return null;if(t.map)return t.map;if(!t.meta||!("code"in t.meta))return null;let n=`//# ${ja}=data:application/json;base64,`,r=t.meta.code.lastIndexOf(n);if(r===-1)return null;let s=Hb.exec(t.meta.code.slice(r))?.[1];return s?(t.map=new Bd(JSON.parse(kd(s)),t.file),t.map):null}clear(){this.idToModuleMap.clear(),this.fileToModulesMap.clear(),this.urlToIdModuleMap.clear()}},zb=new Set(["node:sea","node:sqlite","node:test","node:test/reporters"]);function Jb(e){return zb.has(e)?e:Qs(e).replace(/^\/@fs\//,Bn?"":"/").replace(/^node:/,"").replace(/^\/+/,"/").replace(/^file:\/+/,Bn?"":"/")}var Kb=class{hmrClient;ownerPath;newListeners;constructor(e,t){this.hmrClient=e,this.ownerPath=t,e.dataMap.has(t)||e.dataMap.set(t,{});let n=e.hotModulesMap.get(t);n&&(n.callbacks=[]);let r=e.ctxToListenersMap.get(t);if(r)for(let[s,i]of r){let a=e.customListenersMap.get(s);a&&e.customListenersMap.set(s,a.filter(o=>!i.includes(o)))}this.newListeners=new Map,e.ctxToListenersMap.set(t,this.newListeners)}get data(){return this.hmrClient.dataMap.get(this.ownerPath)}accept(e,t){if(typeof e=="function"||!e)this.acceptDeps([this.ownerPath],([n])=>e?.(n));else if(typeof e=="string")this.acceptDeps([e],([n])=>t?.(n));else if(Array.isArray(e))this.acceptDeps(e,t);else throw Error("invalid hot.accept() usage.")}acceptExports(e,t){this.acceptDeps([this.ownerPath],([n])=>t?.(n))}dispose(e){this.hmrClient.disposeMap.set(this.ownerPath,e)}prune(e){this.hmrClient.pruneMap.set(this.ownerPath,e)}decline(){}invalidate(e){let t=this.hmrClient.currentFirstInvalidatedBy??this.ownerPath;this.hmrClient.notifyListeners("vite:invalidate",{path:this.ownerPath,message:e,firstInvalidatedBy:t}),this.send("vite:invalidate",{path:this.ownerPath,message:e,firstInvalidatedBy:t}),this.hmrClient.logger.debug(`invalidate ${this.ownerPath}${e?`: ${e}`:""}`)}on(e,t){let n=r=>{let s=r.get(e)||[];s.push(t),r.set(e,s)};n(this.hmrClient.customListenersMap),n(this.newListeners)}off(e,t){let n=r=>{let s=r.get(e);if(s===void 0)return;let i=s.filter(a=>a!==t);if(i.length===0){r.delete(e);return}r.set(e,i)};n(this.hmrClient.customListenersMap),n(this.newListeners)}send(e,t){this.hmrClient.send({type:"custom",event:e,data:t})}acceptDeps(e,t=()=>{}){let n=this.hmrClient.hotModulesMap.get(this.ownerPath)||{id:this.ownerPath,callbacks:[]};n.callbacks.push({deps:e,fn:t}),this.hmrClient.hotModulesMap.set(this.ownerPath,n)}},Vb=class{logger;transport;importUpdatedModule;hotModulesMap=new Map;disposeMap=new Map;pruneMap=new Map;dataMap=new Map;customListenersMap=new Map;ctxToListenersMap=new Map;currentFirstInvalidatedBy;constructor(e,t,n){this.logger=e,this.transport=t,this.importUpdatedModule=n}async notifyListeners(e,t){let n=this.customListenersMap.get(e);n&&await Promise.allSettled(n.map(r=>r(t)))}send(e){this.transport.send(e).catch(t=>{this.logger.error(t)})}clear(){this.hotModulesMap.clear(),this.disposeMap.clear(),this.pruneMap.clear(),this.dataMap.clear(),this.customListenersMap.clear(),this.ctxToListenersMap.clear()}async prunePaths(e){try{await Promise.all(e.map(t=>{let n=this.disposeMap.get(t);if(n)return n(this.dataMap.get(t))})),await Promise.all(e.map(t=>{let n=this.pruneMap.get(t);if(n)return n(this.dataMap.get(t))}))}finally{e.forEach(t=>this.dataMap.delete(t))}}warnFailedUpdate(e,t){(!(e instanceof Error)||!e.message.includes("fetch"))&&this.logger.error(e),this.logger.error(`Failed to reload ${t}. This could be due to syntax errors or importing non-existent modules. (see errors above)`)}updateQueue=[];pendingUpdateQueue=!1;async queueUpdate(e){if(this.updateQueue.push(this.fetchUpdate(e)),!this.pendingUpdateQueue){this.pendingUpdateQueue=!0,await Promise.resolve(),this.pendingUpdateQueue=!1;let t=[...this.updateQueue];this.updateQueue=[],(await Promise.all(t)).forEach(n=>n&&n())}}async fetchUpdate(e){let{path:t,acceptedPath:n,firstInvalidatedBy:r}=e,s=this.hotModulesMap.get(t);if(!s)return;let i,a=t===n,o=s.callbacks.filter(({deps:l})=>l.includes(n));if(a||o.length>0){let l=this.disposeMap.get(n);l&&await l(this.dataMap.get(n));try{i=await this.importUpdatedModule(e)}catch(c){this.warnFailedUpdate(c,n)}}return()=>{try{this.currentFirstInvalidatedBy=r;for(let{deps:c,fn:u}of o)u(c.map(f=>f===n?i:void 0));let l=a?t:`${n} via ${t}`;this.logger.debug(`hot updated: ${l}`)}finally{this.currentFirstInvalidatedBy=void 0}}}};function qb(e,t,n,r){if(!r?.isDynamicImport&&r?.importedNames?.length){let s=r.importedNames.filter(i=>!(i in e));if(s.length){let i=s[s.length-1];throw SyntaxError(n==="module"?`[vite] The requested module '${t}' does not provide an export named '${i}'`:`[vite] Named export '${i}' not found. The requested module '${t}' is a CommonJS module, which may not support all module.exports as named exports.
|
|
6
|
-
CommonJS modules can always be imported via the default export, for example using:
|
|
7
|
-
|
|
8
|
-
import pkg from '${t}';
|
|
9
|
-
const {${s.join(", ")}} = pkg;
|
|
10
|
-
`)}}}var Yb=(e=21)=>{let t="",n=e|0;for(;n-- >0;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[Math.random()*64|0];return t};function _d(e){let t=Error(e.message||"Unknown invoke error");return Object.assign(t,e,{runnerError:Error("RunnerError")}),t}var Xb=e=>{if(e.invoke)return{...e,async invoke(n,r){let s=await e.invoke({type:"custom",event:"vite:invoke",data:{id:"send",name:n,data:r}});if("error"in s)throw _d(s.error);return s.result}};if(!e.send||!e.connect)throw Error("transport must implement send and connect when invoke is not implemented");let t=new Map;return{...e,connect({onMessage:n,onDisconnection:r}){return e.connect({onMessage(s){if(s.type==="custom"&&s.event==="vite:invoke"){let i=s.data;if(i.id.startsWith("response:")){let a=i.id.slice(9),o=t.get(a);if(!o)return;o.timeoutId&&clearTimeout(o.timeoutId),t.delete(a);let{error:l,result:c}=i.data;l?o.reject(l):o.resolve(c);return}}n(s)},onDisconnection:r})},disconnect(){return t.forEach(n=>{n.reject(Error(`transport was disconnected, cannot call ${JSON.stringify(n.name)}`))}),t.clear(),e.disconnect?.()},send(n){return e.send(n)},async invoke(n,r){let s=Yb(),i={type:"custom",event:"vite:invoke",data:{name:n,id:`send:${s}`,data:r}},a=e.send(i),{promise:o,resolve:l,reject:c}=ib(),u=e.timeout??6e4,f;u>0&&(f=setTimeout(()=>{t.delete(s),c(Error(`transport invoke timed out after ${u}ms (data: ${JSON.stringify(i)})`))},u),f?.unref?.()),t.set(s,{resolve:l,reject:c,name:n,timeoutId:f}),a&&a.catch(d=>{clearTimeout(f),t.delete(s),c(d)});try{return await o}catch(d){throw _d(d)}}}},Zb=e=>{let t=Xb(e),n=!t.connect,r;return{...e,...t.connect?{async connect(s){if(n)return;if(r){await r;return}let i=t.connect({onMessage:s??(()=>{}),onDisconnection(){n=!1}});i&&(r=i,await r,r=void 0),n=!0}}:{},...t.disconnect?{async disconnect(){n&&(r&&await r,n=!1,await t.disconnect())}}:{},async send(s){if(t.send){if(!n)if(r)await r;else throw new bd("send was called before connect");await t.send(s)}},async invoke(s,i){if(!n)if(r)await r;else throw new bd("invoke was called before connect");return t.invoke(s,i)}}},bd=class extends Error{constructor(e){super(e),this.name="SendBeforeConnectError"}};function eS(e){let t=new Set(e.filter(r=>typeof r=="string")),n=e.filter(r=>typeof r!="string");return r=>t.has(r)||n.some(s=>s.test(r))}var Fs="__vite_ssr_exports__",Ma="__vite_ssr_import__",Da="__vite_ssr_dynamic_import__",Pa="__vite_ssr_exportAll__",Na="__vite_ssr_exportName__",La="__vite_ssr_import_meta__",Sd=()=>{},tS={debug:Sd,error:Sd},nS={debug:(...e)=>console.log("[vite]",...e),error:e=>console.log("[vite]",e)};function rS(e){let t=new sS;return n=>t.enqueue(()=>e(n))}var sS=class{queue=[];pending=!1;enqueue(e){return new Promise((t,n)=>{this.queue.push({promise:e,resolve:t,reject:n}),this.dequeue()})}dequeue(){if(this.pending)return!1;let e=this.queue.shift();return e?(this.pending=!0,e.promise().then(e.resolve).catch(e.reject).finally(()=>{this.pending=!1,this.dequeue()}),!0):!1}};function iS(e){return rS(async t=>{let n=e.hmrClient;if(!(!n||e.isClosed()))switch(t.type){case"connected":n.logger.debug("connected.");break;case"update":await n.notifyListeners("vite:beforeUpdate",t),await Promise.all(t.updates.map(async r=>{if(r.type==="js-update")return r.acceptedPath=Ba(r.acceptedPath),r.path=Ba(r.path),n.queueUpdate(r);n.logger.error("css hmr is not supported in runner mode.")})),await n.notifyListeners("vite:afterUpdate",t);break;case"custom":await n.notifyListeners(t.event,t.data);break;case"full-reload":{let{triggeredBy:r}=t,s=r?$d(e,oS(e,Qs(r))):aS(e);if(!s.size)break;n.logger.debug("program reload"),await n.notifyListeners("vite:beforeFullReload",t),e.evaluatedModules.clear();for(let i of s){if(e.isClosed())break;try{await e.import(i)}catch(a){if(e.isClosed())break;a.code!=="ERR_OUTDATED_OPTIMIZED_DEP"&&n.logger.error(`An error happened during full reload
|
|
11
|
-
${a.message}
|
|
12
|
-
${a.stack}`)}}break}case"prune":await n.notifyListeners("vite:beforePrune",t),await n.prunePaths(t.paths);break;case"error":{await n.notifyListeners("vite:error",t);let r=t.err;n.logger.error(`Internal Server Error
|
|
13
|
-
${r.message}
|
|
14
|
-
${r.stack}`);break}case"ping":break;case"bundled-dev-update":break;default:return t}})}function oS(e,t){let n=e.evaluatedModules.getModulesByFile(t);return n?[...n].map(r=>r.id):[]}function $d(e,t,n=new Set,r=new Set){for(let s of t){if(n.has(s))continue;n.add(s);let i=e.evaluatedModules.getModuleById(s);if(i){if(!i.importers.size){r.add(i.url);continue}for(let a of i.importers)$d(e,[a],n,r)}}return r}function aS(e,t=new Set){for(let n of e.evaluatedModules.idToModuleMap.values())n.importers.size||t.add(n.url);return t}var ka={},js={},Hs=new Set,Qa=new Set,Ua=new Set,Md=e=>((...t)=>{for(let n of e){let r=n(...t);if(r)return r}return null}),lS=Md(Qa),cS=Md(Ua),Dd=!1,uS=Error.prepareStackTrace;function fS(e,t){Hs.delete(e.evaluatedModules),t.retrieveFile&&Qa.delete(t.retrieveFile),t.retrieveSourceMap&&Ua.delete(t.retrieveSourceMap),Hs.size===0&&(Error.prepareStackTrace=uS,Dd=!1)}function dS(e,t={}){return Dd||=(Error.prepareStackTrace=wS,!0),Hs.add(e.evaluatedModules),t.retrieveFile&&Qa.add(t.retrieveFile),t.retrieveSourceMap&&Ua.add(t.retrieveSourceMap),()=>fS(e,t)}function Fa(e,t){if(!e)return t;let n=Gs(Qs(e)),r=/^\w+:\/\/[^/]*/.exec(n),s=r?r[0]:"",i=n.slice(s.length);return s&&/^\/\w:/.test(i)?(s+="/",s+Qs(vr(i,t))):s+vr(i,t)}function pS(e){for(let t of Hs){let n=t.getModuleSourceMapById(e.source);if(n)return{url:e.source,map:n,vite:!0}}return null}function Pd(e){if(e in js)return js[e];let t=lS(e);return typeof t=="string"?(js[e]=t,t):null}function hS(e){let t=Pd(e);if(!t)return null;let n=/\/\/[@#]\s*sourceMappingURL=([^\s'"]+)\s*$|\/\*[@#]\s*sourceMappingURL=[^\s*'"]+\s*\*\/\s*$/gm,r,s;for(;s=n.exec(t);)r=s;return r?r[1]:null}var mS=/^data:application\/json[^,]+base64,/;function gS(e){let t=cS(e);if(t)return t;let n=hS(e);if(!n)return null;let r;if(mS.test(n)){let s=n.slice(n.indexOf(",")+1);r=kd(s),n=e}else n=Fa(e,n),r=Pd(n);return r?{url:n,map:r}:null}function Nd(e){if(!e.source)return e;let t=pS(e);if(t||=ka[e.source],!t){let n=gS(e.source);if(n&&n.map){let r=n.url;t=ka[e.source]={url:r,map:new Bd(typeof n.map=="string"?JSON.parse(n.map):n.map,r)};let s=t.map?.map.sourcesContent;t.map&&s&&t.map.resolvedSources.forEach((i,a)=>{let o=s[a];if(o&&i&&r){let l=Fa(r,i);js[l]=o}})}else t=ka[e.source]={url:null,map:null}}if(t.map&&t.url){let n=Ub(t.map,e);if(n&&n.source!=null)return n.source=Fa(t.url,n.source),t.vite&&(n._vite=!0),n}return e}function Ld(e){let t=/^eval at ([^(]+) \((.+):(\d+):(\d+)\)$/.exec(e);if(t){let n=Nd({name:null,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]} (${Ld(t[2])})`:e}function yS(){let e,t="";if(this.isNative())t="native";else{e=this.getScriptNameOrSourceURL(),!e&&this.isEval()&&(t=this.getEvalOrigin(),t+=", "),t+=e||"<anonymous>";let a=this.getLineNumber();if(a!=null){t+=`:${a}`;let o=this.getColumnNumber();o&&(t+=`:${o}`)}}let n="",r=this.getFunctionName(),s=!0,i=this.isConstructor();if(this.isToplevel()||i)i?n+=`new ${r||"<anonymous>"}`:r?n+=r:(n+=t,s=!1);else{let a=this.getTypeName();a==="[object Object]"&&(a="null");let o=this.getMethodName();r?(a&&r.indexOf(a)!==0&&(n+=`${a}.`),n+=r,o&&r.indexOf(`.${o}`)!==r.length-o.length-1&&(n+=` [as ${o}]`)):n+=`${a}.${o||"<anonymous>"}`}return s&&(n+=` (${t})`),n}function xd(e){let t=Object.create(null);return Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{let r=n;t[r]=/^(?:is|get)/.test(n)?function(){return e[r].call(e)}:e[r]}),t.toString=yS,t}function AS(e,t){if(t===void 0&&(t={nextPosition:null,curPosition:null}),e.isNative())return t.curPosition=null,e;let n=e.getFileName()||e.getScriptNameOrSourceURL();if(n){let s=Nd({name:null,source:n,line:e.getLineNumber()??0,column:(e.getColumnNumber()??1)-1});t.curPosition=s,e=xd(e);let i=e.getFunctionName;return e.getFunctionName=function(){let a=t.nextPosition==null?i():t.nextPosition.name||i();return a==="eval"&&"_vite"in s?null:a},e.getFileName=function(){return s.source??null},e.getLineNumber=function(){return s.line},e.getColumnNumber=function(){return s.column+1},e.getScriptNameOrSourceURL=function(){return s.source},e}let r=e.isEval()&&e.getEvalOrigin();return r&&(r=Ld(r),e=xd(e),e.getEvalOrigin=function(){return r||void 0}),e}function wS(e,t){let n=`${e.name||"Error"}: ${e.message||""}`,r={nextPosition:null,curPosition:null},s=[];for(let i=t.length-1;i>=0;i--)s.push(`
|
|
15
|
-
at ${AS(t[i],r)}`),r.nextPosition=r.curPosition;return r.curPosition=r.nextPosition=null,n+s.reverse().join("")}function ES(e){if(e.options.sourcemapInterceptor==="node"){if(typeof process>"u")throw TypeError(`Cannot use "sourcemapInterceptor: 'node'" because global "process" variable is not available.`);if(typeof process.setSourceMapsEnabled!="function")throw TypeError(`Cannot use "sourcemapInterceptor: 'node'" because "process.setSourceMapsEnabled" function is not available. Please use Node >= 16.6.0.`);let t=process.sourceMapsEnabled??!1;return process.setSourceMapsEnabled(!0),()=>!t&&process.setSourceMapsEnabled(!1)}return dS(e,typeof e.options.sourcemapInterceptor=="object"?e.options.sourcemapInterceptor:void 0)}var Ha=class{startOffset=sb()+1;async runInlinedModule(e,t){await new Id(Fs,La,Ma,Da,Pa,Na,`"use strict";
|
|
16
|
-
`+t)(e[Fs],e[La],e[Ma],e[Da],e[Pa],e[Na]),Object.seal(e[Fs])}runExternalModule(e){return import(e)}},Ws="vite-module-runner:import-meta-resolve/v1/",vS=`
|
|
17
|
-
|
|
18
|
-
export async function resolve(specifier, context, nextResolve) {
|
|
19
|
-
if (specifier.startsWith(${JSON.stringify(Ws)})) {
|
|
20
|
-
const data = specifier.slice(${JSON.stringify(Ws)}.length)
|
|
21
|
-
const [parsedSpecifier, parsedImporter] = JSON.parse(data)
|
|
22
|
-
specifier = parsedSpecifier
|
|
23
|
-
context.parentURL = parsedImporter
|
|
24
|
-
}
|
|
25
|
-
return nextResolve(specifier, context)
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
`;function _S(e,t,n){if(e.startsWith(Ws)){let r=e.slice(42),[s,i]=JSON.parse(r);e=s,t.parentURL=i}return n(e,t)}var Ta=!1;function bS(){if(Ta)return Oa;let e;try{e=typeof process<"u"?process.getBuiltinModule("node:module").Module:void 0}catch{return}if(e){if(e.registerHooks)return e.registerHooks({resolve:_S}),Ta=!0,Oa;if(e.register){try{let t=`data:text/javascript,${encodeURI(vS)}`;e.register(t)}catch(t){if("code"in t&&t.code==="ERR_NETWORK_IMPORT_DISALLOWED")return;throw t}return Ta=!0,Oa}}}function Oa(e,t){return import.meta.resolve(`${Ws}${JSON.stringify([e,t])}`)}var SS=new Proxy({},{get(e,t){throw Error(`[module runner] Dynamic access of "import.meta.env" is not supported. Please, use "import.meta.env.${String(t)}" instead.`)}});function Fd(e){let t=Td(e),n=e,r=Gs(e);return{filename:Bn?wd(n):n,dirname:Bn?wd(r):r,url:t,env:SS,resolve(s,i){throw Error('[module runner] "import.meta.resolve" is not supported.')},glob(){throw Error('[module runner] "import.meta.glob" is statically replaced during file transformation. Make sure to reference it by the full name.')}}}function Wa(e){let t=Fd(e),n=t.url,r=bS();return{...t,main:!1,resolve(s,i){return(r??t.resolve)(s,i??n)}}}var Ga=class{options;evaluator;debug;evaluatedModules;hmrClient;transport;resetSourceMapSupport;concurrentModuleNodePromises=new Map;isBuiltin;builtinsPromise;closed=!1;constructor(e,t=new Ha,n){if(this.options=e,this.evaluator=t,this.debug=n,this.evaluatedModules=e.evaluatedModules??new Gb,this.transport=Zb(e.transport),e.hmr!==!1){let r=e.hmr??!0,s=r===!0||r.logger===void 0?nS:r.logger===!1?tS:r.logger;if(this.hmrClient=new Vb(s,this.transport,({acceptedPath:i})=>this.import(i)),!this.transport.connect)throw Error("HMR is not supported by this runner transport, but `hmr` option was set to true");this.transport.connect(iS(this))}else this.transport.connect?.();e.sourcemapInterceptor!==!1&&(this.resetSourceMapSupport=ES(this))}async import(e){let t=await this.cachedModule(e);return await this.cachedRequest(e,t)}clearCache(){this.evaluatedModules.clear(),this.hmrClient?.clear()}async close(){this.resetSourceMapSupport?.(),this.clearCache(),this.hmrClient=void 0,this.closed=!0,await this.transport.disconnect?.()}isClosed(){return this.closed}processImport(e,t,n){if(!("externalize"in t))return e;let{url:r,type:s}=t;return s!=="module"&&s!=="commonjs"||qb(e,r,s,n),e}isCircularRequest(e,t,n=new Set){if(n.has(e.id))return!1;n.add(e.id);for(let r of e.imports){let s=this.evaluatedModules.getModuleById(r);if(!(!s?.promise||s.evaluated)&&(t.includes(r)||this.isCircularRequest(s,t,n)))return!0}return!1}async cachedRequest(e,t,n=[],r){let s=t.meta,i=s.id,a=n[n.length-1];if(a&&t.importers.add(a),t.evaluated&&t.promise)return this.processImport(await t.promise,s,r);if(t.promise)return t.exports&&(n.includes(i)||this.isCircularRequest(t,n))?this.processImport(t.exports,s,r):this.processImport(await t.promise,s,r);let o;this.debug&&(o=setTimeout(()=>{this.debug(`[module runner] module ${i} takes over 2s to load.
|
|
29
|
-
${`stack:
|
|
30
|
-
${[...n,i].reverse().map(l=>` - ${l}`).join(`
|
|
31
|
-
`)}`}`)},2e3));try{let l=this.directRequest(e,t,n);return t.promise=l,t.evaluated=!1,this.processImport(await l,s,r)}finally{t.evaluated=!0,o&&clearTimeout(o)}}async cachedModule(e,t){let n=this.concurrentModuleNodePromises.get(e);if(n)this.debug?.("[module runner] using cached module info for",e);else{let r=this.evaluatedModules.getModuleByUrl(e);n=this.getModuleInformation(e,t,r).finally(()=>{this.concurrentModuleNodePromises.delete(e)}),this.concurrentModuleNodePromises.set(e,n)}return n}ensureBuiltins(){if(!this.isBuiltin)return this.builtinsPromise??=(async()=>{try{this.debug?.("[module runner] fetching builtins from server");let e=(await this.transport.invoke("getBuiltins",[])).map(t=>typeof t=="object"&&t&&"type"in t?t.type==="string"?t.value:new RegExp(t.source,t.flags):t);this.isBuiltin=eS(e),this.debug?.("[module runner] builtins loaded:",e)}finally{this.builtinsPromise=void 0}})(),this.builtinsPromise}async getModuleInformation(e,t,n){if(this.closed)throw Error("Vite module runner has been closed.");await this.ensureBuiltins(),this.debug?.("[module runner] fetching",e);let r=!!(typeof n=="object"&&n.meta),s=e.startsWith("data:")||this.isBuiltin?.(e)?{externalize:e,type:"builtin"}:await this.transport.invoke("fetchModule",[e,t,{cached:r,startOffset:this.evaluator.startOffset}]);if("cache"in s){if(!n||!n.meta)throw Error(`Module "${e}" was mistakenly invalidated during fetch phase.`);return n}let i="externalize"in s?s.externalize:s.id,a="url"in s?s.url:e,o=this.evaluatedModules.ensureModule(i,a);return"invalidate"in s&&s.invalidate&&this.evaluatedModules.invalidateModule(o),s.url=a,s.id=i,o.meta=s,o}async directRequest(e,t,n){let r=t.meta,s=r.id,i=[...n,s],a=async(w,A)=>{let g="file"in r&&r.file||s,E=await this.cachedModule(w,g);return E.importers.add(s),t.imports.add(E.id),this.cachedRequest(w,E,i,A)},o=async w=>(w=String(w),w[0]==="."&&(w=vr(Gs(e),w)),a(w,{isDynamicImport:!0}));if("externalize"in r){let{externalize:w}=r;this.debug?.("[module runner] externalizing",w);let A=await this.evaluator.runExternalModule(w);return t.exports=A,A}let{code:l,file:c}=r;if(l==null){let w=i[i.length-2];throw Error(`[module runner] Failed to load "${e}"${w?` imported from ${w}`:""}`)}let u=this.options.createImportMeta??Fd,f=Cd(c||s),d=Td(f),p=await u(f),h=Object.create(null);Object.defineProperty(h,Symbol.toStringTag,{value:"Module",enumerable:!1,configurable:!1}),t.exports=h;let y;this.hmrClient&&Object.defineProperty(p,"hot",{enumerable:!0,get:()=>{if(!this.hmrClient)throw Error("[module runner] HMR client was closed.");return this.debug?.("[module runner] creating hmr context for",t.url),y||=new Kb(this.hmrClient,t.url),y},set:w=>{y=w}});let m={[Ma]:a,[Da]:o,[Fs]:h,[Pa]:w=>xS(h,w),[Na]:(w,A)=>Object.defineProperty(h,w,{enumerable:!0,configurable:!0,get:A}),[La]:p};return this.debug?.("[module runner] executing",d),await this.evaluator.runInlinedModule(m,l,t),h}};function xS(e,t){if(e!==t&&!(rb(t)||Array.isArray(t)||t instanceof Promise)){for(let n in t)if(n!=="default"&&n!=="__esModule"&&!(n in e))try{Object.defineProperty(e,n,{enumerable:!0,configurable:!0,get:()=>t[n]})}catch{}}}import{Buffer as Dc}from"buffer";import*as Mm from"querystring";import{setTimeout as VS}from"timers/promises";var qS=Object.create,Jr=Object.defineProperty,YS=Object.getOwnPropertyDescriptor,XS=Object.getOwnPropertyNames,ZS=Object.getPrototypeOf,Pc=Object.prototype.hasOwnProperty,Dm=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(r){throw n=[r],r}},le=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),ex=(e,t)=>{let n={};for(var r in e)Jr(n,r,{get:e[r],enumerable:!0});return t||Jr(n,Symbol.toStringTag,{value:"Module"}),n},Pm=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(var s=XS(t),i=0,a=s.length,o;i<a;i++)o=s[i],!Pc.call(e,o)&&o!==n&&Jr(e,o,{get:(l=>t[l]).bind(null,o),enumerable:!(r=YS(t,o))||r.enumerable});return e},nt=(e,t,n)=>(n=e!=null?qS(ZS(e)):{},Pm(t||!e||!e.__esModule||!Pc.call(e,"default")?Jr(n,"default",{value:e,enumerable:!0}):n,e)),us=e=>Pc.call(e,"module.exports")?e["module.exports"]:Pm(Jr({},"__esModule",{value:!0}),e),ce=Zn(import.meta.url),$n;function fs(){if($n!==void 0)return $n;try{let e=process.env.VP_RUN_NODE_CLIENT_PATH;if(e)return $n=Zn(import.meta.url)(e).load(),$n}catch{}return $n=null,$n}function Nc(e){fs()?.ignoreInput(e)}function Nm(e){fs()?.ignoreOutput(e)}function tx(){fs()?.disableCache()}function nx(e,t){let n=fs();if(n)return n.getEnv(e,t)}function rx(e,t){let n=fs();return n?n.getEnvs(e,t):{}}var Lm=le(((e,t)=>{let n=process||{},r=n.argv||[],s=n.env||{},i=!(s.NO_COLOR||r.includes("--no-color"))&&(!!s.FORCE_COLOR||r.includes("--color")||n.platform==="win32"||(n.stdout||{}).isTTY&&s.TERM!=="dumb"||!!s.CI),a=(c,u,f=c)=>d=>{let p=""+d,h=p.indexOf(u,c.length);return~h?c+o(p,u,f,h)+u:c+p+u},o=(c,u,f,d)=>{let p="",h=0;do p+=c.substring(h,d)+f,h=d+u.length,d=c.indexOf(u,h);while(~d);return p+c.substring(h)},l=(c=i)=>{let u=c?a:()=>String;return{isColorSupported:c,reset:u("\x1B[0m","\x1B[0m"),bold:u("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:u("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:u("\x1B[3m","\x1B[23m"),underline:u("\x1B[4m","\x1B[24m"),inverse:u("\x1B[7m","\x1B[27m"),hidden:u("\x1B[8m","\x1B[28m"),strikethrough:u("\x1B[9m","\x1B[29m"),black:u("\x1B[30m","\x1B[39m"),red:u("\x1B[31m","\x1B[39m"),green:u("\x1B[32m","\x1B[39m"),yellow:u("\x1B[33m","\x1B[39m"),blue:u("\x1B[34m","\x1B[39m"),magenta:u("\x1B[35m","\x1B[39m"),cyan:u("\x1B[36m","\x1B[39m"),white:u("\x1B[37m","\x1B[39m"),gray:u("\x1B[90m","\x1B[39m"),bgBlack:u("\x1B[40m","\x1B[49m"),bgRed:u("\x1B[41m","\x1B[49m"),bgGreen:u("\x1B[42m","\x1B[49m"),bgYellow:u("\x1B[43m","\x1B[49m"),bgBlue:u("\x1B[44m","\x1B[49m"),bgMagenta:u("\x1B[45m","\x1B[49m"),bgCyan:u("\x1B[46m","\x1B[49m"),bgWhite:u("\x1B[47m","\x1B[49m"),blackBright:u("\x1B[90m","\x1B[39m"),redBright:u("\x1B[91m","\x1B[39m"),greenBright:u("\x1B[92m","\x1B[39m"),yellowBright:u("\x1B[93m","\x1B[39m"),blueBright:u("\x1B[94m","\x1B[39m"),magentaBright:u("\x1B[95m","\x1B[39m"),cyanBright:u("\x1B[96m","\x1B[39m"),whiteBright:u("\x1B[97m","\x1B[39m"),bgBlackBright:u("\x1B[100m","\x1B[49m"),bgRedBright:u("\x1B[101m","\x1B[49m"),bgGreenBright:u("\x1B[102m","\x1B[49m"),bgYellowBright:u("\x1B[103m","\x1B[49m"),bgBlueBright:u("\x1B[104m","\x1B[49m"),bgMagentaBright:u("\x1B[105m","\x1B[49m"),bgCyanBright:u("\x1B[106m","\x1B[49m"),bgWhiteBright:u("\x1B[107m","\x1B[49m")}};t.exports=l(),t.exports.createColors=l})),sx=Math.random().toString(36).slice(2),ix=/^\.{1,2}(?:\/|\\)/;function ox(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Fm(){return`fresh-import-${sx}`}function ax(e){return new RegExp(`(?:\\?|&)${ox(e)}=(\\d+),([^&]+)(?:&|$)`)}function jm(e,t,n){return`?${e}=${t},${n}`}function lx(e,t,n,r,s,i){let a=ix.test(e);if(n.format==="builtin"||!a||!t.parentURL||s.test(n.url)||!n.url.startsWith("file:"))return n;let o=s.exec(t.parentURL);if(o){let[,l,c]=o;i(c,n.url),n.url=n.url.replace(/(\?)|$/,(u,f)=>`?${r}=${l},${c}${f==="?"?"&":""}`)}return n}var cx='data:text/javascript,Math.random().toString(36).slice(2);%0Aconst relativeImportRE = /^\\.{1,2}(%3F:\\/|\\\\)/;%0Afunction escapeRegExp(value) {%0A%09return value.replace(/[.*+%3F^${}()|[\\]\\\\]/g, "\\\\$&");%0A}%0A/**%0A* Build the regex that matches the tracking query `%3F<name>=<id>,<context>`%0A* (or the `&<name>=...` form).%0A*/%0Afunction buildQueryRE(queryName) {%0A%09return new RegExp(`(%3F:\\\\%3F|&)${escapeRegExp(queryName)}=(\\\\d+),([^&]+)(%3F:&|$)`);%0A}%0A/**%0A* Shared body of the resolve hook for both the on-thread and off-thread%0A* importers. Given an already-resolved `result`, decides whether it is a tracked%0A* relative file dependency; if so, reports it via `onDependency` and tags the%0A* URL so the query propagates to its own dependencies.%0A*%0A* The sync/async difference between the two hooks lives entirely in the caller%0A* (which awaits `nextResolve` or not); this function performs no I/O. `result`%0A* is mutated in place and returned.%0A*/%0Afunction trackResolved(specifier, context, result, queryName, queryRE, onDependency) {%0A%09const isRelativeImport = relativeImportRE.test(specifier);%0A%09if (result.format === "builtin" || !isRelativeImport) return result;%0A%09if (!context.parentURL || queryRE.test(result.url) || !result.url.startsWith("file:")) return result;%0A%09const m = queryRE.exec(context.parentURL);%0A%09if (m) {%0A%09%09const [, id, contextFile] = m;%0A%09%09onDependency(contextFile, result.url);%0A%09%09result.url = result.url.replace(/(\\%3F)|$/, (_n, n1) => `%3F${queryName}=${id},${contextFile}${n1 === "%3F" %3F "&" : ""}`);%0A%09}%0A%09return result;%0A}%0A//%23endregion%0A//%23region src/off-thread/loader.ts%0Alet port;%0Alet queryName;%0Alet queryRE;%0Aconst initialize = async (data) => {%0A%09port = data.port;%0A%09queryName = data.queryName;%0A%09queryRE = buildQueryRE(queryName);%0A};%0Aconst resolve = async (specifier, context, nextResolve) => {%0A%09return trackResolved(specifier, context, await nextResolve(specifier, context), queryName, queryRE, (ctx, url) => {%0A%09%09port.postMessage({%0A%09%09%09context: ctx,%0A%09%09%09url%0A%09%09});%0A%09});%0A};%0A//%23endregion%0Aexport { initialize, resolve };%0A',ux=0;function fx(){let e=Fm(),{port1:t,port2:n}=new Ul;return Ti.register(cx,{data:{port:n,queryName:e},transferList:[n]}),t.unref(),{async collect(r){let s=ux++,i=new Set,a=o=>{o.context===r&&i.add(o.url)};t.on("message",a),t.unref();try{let o=await import(r+jm(e,s,r));return await new Promise(l=>setImmediate(l)),{result:o,dependencies:[...i].filter(l=>l.startsWith("file:")).map(l=>kt(l))}}finally{t.off("message",a)}}}}var dx=0;function px(){let e=new Map,t=Fm(),n=ax(t),r=(s,i,a)=>lx(s,i,a(s,i),t,n,(o,l)=>{e.get(o)?.add(l)});return Ti.registerHooks({resolve:r}),{async collect(s){let i=dx++,a=new Set;e.set(s,a);try{return{result:await import(s+jm(t,i,s)),dependencies:[...a].filter(o=>o.startsWith("file:")).map(o=>kt(o))}}finally{e.delete(s)}}}}function hx(){if(Ti.registerHooks)return px();if(Ti.register)return fx()}var Hd,Wd=!1;function mx(e){return Wd||(Hd=hx(),Wd=!0),Hd?.collect(e)}var Kr="/@id/",Vr="__x00__",Lc="sourceMa";Lc+="ppingURL";var gx="//# sourceMappingSource=vite-generated",yx="ERR_OUTDATED_OPTIMIZED_DEP",$t=typeof process<"u"&&process.platform==="win32";function ro(e){return e.startsWith(Kr)?e:Kr+e.replace("\0",Vr)}function Qt(e){return e.startsWith(Kr)?e.slice(Kr.length).replace(Vr,"\0"):e}var Ax=/\\/g;function De(e){return e.replace(Ax,"/")}var wx=/[?#].*$/;function he(e){return e.replace(wx,"")}function dn(e){let t=he(e);return{file:t,postfix:e.slice(t.length)}}function Me(e){return e[e.length-1]!=="/"?`${e}/`:e}function Gl(){let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}var qr="vite-module-runner:import-meta-resolve/v1/",Ex=`
|
|
32
|
-
|
|
33
|
-
export async function resolve(specifier, context, nextResolve) {
|
|
34
|
-
if (specifier.startsWith(${JSON.stringify(qr)})) {
|
|
35
|
-
const data = specifier.slice(${JSON.stringify(qr)}.length)
|
|
36
|
-
const [parsedSpecifier, parsedImporter] = JSON.parse(data)
|
|
37
|
-
specifier = parsedSpecifier
|
|
38
|
-
context.parentURL = parsedImporter
|
|
39
|
-
}
|
|
40
|
-
return nextResolve(specifier, context)
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
`;function vx(e,t,n){if(e.startsWith(qr)){let r=e.slice(42),[s,i]=JSON.parse(r);e=s,t.parentURL=i}return n(e,t)}var Ka=!1;function _x(){if(Ka)return Va;let e;try{e=typeof process<"u"?process.getBuiltinModule("node:module").Module:void 0}catch{return}if(e){if(e.registerHooks)return e.registerHooks({resolve:vx}),Ka=!0,Va;if(e.register){try{let t=`data:text/javascript,${encodeURI(Ex)}`;e.register(t)}catch(t){if("code"in t&&t.code==="ERR_NETWORK_IMPORT_DISALLOWED")return;throw t}return Ka=!0,Va}}}function Va(e,t){return import.meta.resolve(`${qr}${JSON.stringify([e,t])}`)}var bx=`
|
|
44
|
-
|
|
45
|
-
(() => {
|
|
46
|
-
const resolve = 'resolve'
|
|
47
|
-
return (specifier, importer) =>
|
|
48
|
-
import.meta[resolve](
|
|
49
|
-
\`${qr}\${JSON.stringify([specifier, importer])}\`,
|
|
50
|
-
)
|
|
51
|
-
})()
|
|
52
|
-
|
|
53
|
-
`,Sx="8.2.2",xx=["options","buildStart","buildEnd","renderStart","renderError","renderChunk","writeBundle","generateBundle","banner","footer","augmentChunkHash","outputOptions","intro","outro","closeBundle","closeWatcher","load","moduleParsed","watchChange","resolveDynamicImport","resolveId","transform","onLog"],Qm=Sx,Um=["browser","module","jsnext:main","jsnext"],Cx=Object.freeze(Um),Ix=Object.freeze(Um.filter(e=>e!=="browser")),Nr="development|production",Hm=["module","browser","node",Nr],Rx=Object.freeze(Hm.filter(e=>e!=="node")),kx=Object.freeze(Hm.filter(e=>e!=="browser")),Tx=Object.freeze(["node","module-sync"]),Wm=[".mjs",".js",".mts",".ts",".jsx",".tsx",".json"],Fc=["chrome111","edge111","firefox114","safari16.4","ios16.4"],Ox=["vite.config.js","vite.config.mjs","vite.config.ts","vite.config.cjs","vite.config.mts","vite.config.cts"],so=/\.(?:j|t)sx?$|\.mjs$/,dt=/\.(css|less|sass|scss|styl|stylus|pcss|postcss|sss)(?:$|\?)/,Bx=/\.[cm]?[jt]s$/,wn=/[?&](?:worker|sharedworker|raw|url)\b/,Fe="/@fs/",ds="/@vite/client",zl="/@vite/env",io=cs(kt(new URL("../../../src/node/constants.ts",import.meta.url)),"../../.."),Ct=cs(io,"dist/client/client.mjs"),$x=cs(io,"dist/client/bundledDevClient.mjs"),Gm="bundledDevClient.mjs",oo=cs(io,"dist/client/env.mjs"),jc=L.dirname(Ct),Qc=["apng","bmp","png","jpe?g","jfif","pjpeg","pjp","gif","svg","ico","webp","avif","cur","jxl","mp4","webm","ogg","mp3","wav","flac","aac","opus","mov","m4a","vtt","woff2?","eot","ttf","otf","webmanifest","pdf","txt"],Jl=new RegExp("\\.("+Qc.join("|")+")(\\?.*)?$","i"),Gn=/[?&](v=[\w.-]+)\b/,Mx=new Set(["localhost","127.0.0.1","::1","0000:0000:0000:0000:0000:0000:0000:0001"]),ao=new Set(["0.0.0.0","::","0000:0000:0000:0000:0000:0000:0000:0000"]),Dx=5173,Px=4173,zm=4096,Nx=/^https?:\/\/(?:(?:[^:]+\.)?localhost|127\.0\.0\.1|\[::1\])(?::\d+)?$/,Kl="_metadata.json",Lx="ERR_OPTIMIZE_DEPS_PROCESSING_ERROR",Fx="ERR_FILE_NOT_FOUND_IN_OPTIMIZED_DEP_DIR",Jm=44,jx=59,Gd="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Km=new Uint8Array(64),Vm=new Uint8Array(128);for(let e=0;e<Gd.length;e++){let t=Gd.charCodeAt(e);Km[e]=t,Vm[t]=e}function _r(e,t){let n=0,r=0,s=0;do s=Vm[e.next()],n|=(s&31)<<r,r+=5;while(s&32);let i=n&1;return n>>>=1,i&&(n=-2147483648|-n),t+n}function br(e,t,n){let r=t-n;r=r<0?-r<<1|1:r<<1;do{let s=r&31;r>>>=5,r>0&&(s|=32),e.write(Km[s])}while(r>0);return t}function zd(e,t){return e.pos>=t?!1:e.peek()!==Jm}var Jd=16384,Kd=typeof TextDecoder<"u"?new TextDecoder:typeof Buffer<"u"?{decode(e){return Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString()}}:{decode(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return t}},Qx=class{constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(Jd)}write(e){let{buffer:t}=this;t[this.pos++]=e,this.pos===Jd&&(this.out+=Kd.decode(t),this.pos=0)}flush(){let{buffer:e,out:t,pos:n}=this;return n>0?t+Kd.decode(e.subarray(0,n)):t}},Ux=class{constructor(e){this.pos=0,this.buffer=e}next(){return this.buffer.charCodeAt(this.pos++)}peek(){return this.buffer.charCodeAt(this.pos)}indexOf(e){let{buffer:t,pos:n}=this,r=t.indexOf(e,n);return r===-1?t.length:r}};function Hx(e){let{length:t}=e,n=new Ux(e),r=[],s=0,i=0,a=0,o=0,l=0;do{let c=n.indexOf(";"),u=[],f=!0,d=0;for(s=0;n.pos<c;){let p;s=_r(n,s),s<d&&(f=!1),d=s,zd(n,c)?(i=_r(n,i),a=_r(n,a),o=_r(n,o),zd(n,c)?(l=_r(n,l),p=[s,i,a,o,l]):p=[s,i,a,o]):p=[s],u.push(p),n.pos++}f||Wx(u),r.push(u),n.pos=c+1}while(n.pos<=t);return r}function Wx(e){e.sort(Gx)}function Gx(e,t){return e[0]-t[0]}function qm(e){let t=new Qx,n=0,r=0,s=0,i=0;for(let a=0;a<e.length;a++){let o=e[a];if(a>0&&t.write(jx),o.length===0)continue;let l=0;for(let c=0;c<o.length;c++){let u=o[c];c>0&&t.write(Jm),l=br(t,u[0],l),u.length!==1&&(n=br(t,u[1],n),r=br(t,u[2],r),s=br(t,u[3],s),u.length!==4&&(i=br(t,u[4],i)))}}return t.flush()}var zx=/^[\w+.-]+:\/\//,Jx=/^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/,Kx=/^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i;function Vx(e){return zx.test(e)}function qx(e){return e.startsWith("//")}function Ym(e){return e.startsWith("/")}function Yx(e){return e.startsWith("file:")}function Vd(e){return/^[.?#]/.test(e)}function Ks(e){let t=Jx.exec(e);return Xm(t[1],t[2]||"",t[3],t[4]||"",t[5]||"/",t[6]||"",t[7]||"")}function Xx(e){let t=Kx.exec(e),n=t[2];return Xm("file:","",t[1]||"","",Ym(n)?n:"/"+n,t[3]||"",t[4]||"")}function Xm(e,t,n,r,s,i,a){return{scheme:e,user:t,host:n,port:r,path:s,query:i,hash:a,type:7}}function qd(e){if(qx(e)){let n=Ks("http:"+e);return n.scheme="",n.type=6,n}if(Ym(e)){let n=Ks("http://foo.com"+e);return n.scheme="",n.host="",n.type=5,n}if(Yx(e))return Xx(e);if(Vx(e))return Ks(e);let t=Ks("http://foo.com/"+e);return t.scheme="",t.host="",t.type=e?e.startsWith("?")?3:e.startsWith("#")?2:4:1,t}function Zx(e){if(e.endsWith("/.."))return e;let t=e.lastIndexOf("/");return e.slice(0,t+1)}function eC(e,t){Zm(t,t.type),e.path==="/"?e.path=t.path:e.path=Zx(t.path)+e.path}function Zm(e,t){let n=t<=4,r=e.path.split("/"),s=1,i=0,a=!1;for(let l=1;l<r.length;l++){let c=r[l];if(!c){a=!0;continue}if(a=!1,c!=="."){if(c===".."){i?(a=!0,i--,s--):n&&(r[s++]=c);continue}r[s++]=c,i++}}let o="";for(let l=1;l<s;l++)o+="/"+r[l];(!o||a&&!o.endsWith("/.."))&&(o+="/"),e.path=o}function tC(e,t){if(!e&&!t)return"";let n=qd(e),r=n.type;if(t&&r!==7){let i=qd(t),a=i.type;switch(r){case 1:n.hash=i.hash;case 2:n.query=i.query;case 3:case 4:eC(n,i);case 5:n.user=i.user,n.host=i.host,n.port=i.port;case 6:n.scheme=i.scheme}a>r&&(r=a)}Zm(n,r);let s=n.query+n.hash;switch(r){case 2:case 3:return s;case 4:{let i=n.path.slice(1);return i?Vd(t||e)&&!Vd(i)?"./"+i+s:i+s:s||"."}case 5:return n.path+s;default:return n.scheme+"//"+n.user+n.host+n.port+n.path+s}}function nC(e){if(!e)return"";let t=e.lastIndexOf("/");return e.slice(0,t+1)}function rC(e,t){let n=nC(e),r=t?t+"/":"";return s=>tC(r+(s||""),n)}var Ut=0,sC=1,iC=2,oC=3,aC=4;function lC(e,t){let n=Yd(e,0);if(n===e.length)return e;t||(e=e.slice());for(let r=n;r<e.length;r=Yd(e,r+1))e[r]=uC(e[r],t);return e}function Yd(e,t){for(let n=t;n<e.length;n++)if(!cC(e[n]))return n;return e.length}function cC(e){for(let t=1;t<e.length;t++)if(e[t][Ut]<e[t-1][Ut])return!1;return!0}function uC(e,t){return t||(e=e.slice()),e.sort(fC)}function fC(e,t){return e[Ut]-t[Ut]}var Bi=!1;function dC(e,t,n,r){for(;n<=r;){let s=n+(r-n>>1),i=e[s][Ut]-t;if(i===0)return Bi=!0,s;i<0?n=s+1:r=s-1}return Bi=!1,n-1}function pC(e,t,n){for(let r=n+1;r<e.length&&e[r][Ut]===t;n=r++);return n}function hC(e,t,n){for(let r=n-1;r>=0&&e[r][Ut]===t;n=r--);return n}function mC(){return{lastKey:-1,lastNeedle:-1,lastIndex:-1}}function gC(e,t,n,r){let{lastKey:s,lastNeedle:i,lastIndex:a}=n,o=0,l=e.length-1;if(r===s){if(t===i)return Bi=a!==-1&&e[a][Ut]===t,a;t>=i?o=a===-1?0:a:l=a}return n.lastKey=r,n.lastNeedle=t,n.lastIndex=dC(e,t,o,l)}function yC(e){return typeof e=="string"?JSON.parse(e):e}var AC="`line` must be greater than 0 (lines start at line 1)",wC="`column` must be greater than or equal to 0 (columns start at column 0)",lo=class{constructor(e,t){let n=typeof e=="string";if(!n&&e._decodedMemo)return e;let r=yC(e),{version:s,file:i,names:a,sourceRoot:o,sources:l,sourcesContent:c}=r;this.version=s,this.file=i,this.names=a||[],this.sourceRoot=o,this.sources=l,this.sourcesContent=c,this.ignoreList=r.ignoreList||r.x_google_ignoreList||void 0;let u=rC(t,o);this.resolvedSources=l.map(u);let{mappings:f}=r;if(typeof f=="string")this._encoded=f,this._decoded=void 0;else if(Array.isArray(f))this._encoded=void 0,this._decoded=lC(f,n);else throw r.sections?new Error("TraceMap passed sectioned source map, please use FlattenMap export instead"):new Error(`invalid source map: ${JSON.stringify(r)}`);this._decodedMemo=mC(),this._bySources=void 0,this._bySourceMemos=void 0}};function Uc(e){var t;return(t=e)._decoded||(t._decoded=Hx(e._encoded))}function EC(e,t,n){let r=Uc(e);if(t>=r.length)return null;let s=r[t],i=tg(s,e._decodedMemo,t,n,1);return i===-1?null:s[i]}function eg(e,t){let{line:n,column:r,bias:s}=t;if(n--,n<0)throw new Error(AC);if(r<0)throw new Error(wC);let i=Uc(e);if(n>=i.length)return Vs(null,null,null,null);let a=i[n],o=tg(a,e._decodedMemo,n,r,s||1);if(o===-1)return Vs(null,null,null,null);let l=a[o];if(l.length===1)return Vs(null,null,null,null);let{names:c,resolvedSources:u}=e;return Vs(u[l[sC]],l[iC]+1,l[oC],l.length===5?c[l[aC]]:null)}function Vs(e,t,n,r){return{source:e,line:t,column:n,name:r}}function tg(e,t,n,r,s){let i=gC(e,r,t,n);return Bi?i=(s===-1?pC:hC)(e,r,i):s===-1&&i++,i===-1||i===e.length?-1:i}var qa=class{constructor(){this._indexes={__proto__:null},this.array=[]}};function ng(e,t){return e._indexes[t]}function Yr(e,t){let n=ng(e,t);if(n!==void 0)return n;let{array:r,_indexes:s}=e;return s[t]=r.push(t)-1}function vC(e,t){let n=ng(e,t);if(n===void 0)return;let{array:r,_indexes:s}=e;for(let i=n+1;i<r.length;i++){let a=r[i];r[i-1]=a,s[a]--}s[t]=void 0,r.pop()}var _C=0,bC=1,SC=2,xC=3,CC=4,rg=-1,IC=class{constructor({file:e,sourceRoot:t}={}){this._names=new qa,this._sources=new qa,this._sourcesContent=[],this._mappings=[],this.file=e,this.sourceRoot=t,this._ignoreList=new qa}};var RC=(e,t,n,r,s,i,a,o)=>BC(!0,e,t,n,r,s,i,a,o);function kC(e,t,n){let{_sources:r,_sourcesContent:s}=e,i=Yr(r,t);s[i]=n}function TC(e,t,n=!0){let{_sources:r,_sourcesContent:s,_ignoreList:i}=e,a=Yr(r,t);a===s.length&&(s[a]=null),n?Yr(i,a):vC(i,a)}function sg(e){let{_mappings:t,_sources:n,_sourcesContent:r,_names:s,_ignoreList:i}=e;return DC(t),{version:3,file:e.file||void 0,names:s.array,sourceRoot:e.sourceRoot||void 0,sources:n.array,sourcesContent:r,mappings:t,ignoreList:i.array}}function OC(e){let t=sg(e);return Object.assign({},t,{mappings:qm(t.mappings)})}function BC(e,t,n,r,s,i,a,o,l){let{_mappings:c,_sources:u,_sourcesContent:f,_names:d}=t,p=$C(c,n),h=MC(p,r);if(!s)return e&&PC(p,h)?void 0:Xd(p,h,[r]);let y=Yr(u,s),m=o?Yr(d,o):rg;if(y===f.length&&(f[y]=l??null),!(e&&NC(p,h,y,i,a,m)))return Xd(p,h,o?[r,y,i,a,m]:[r,y,i,a])}function $C(e,t){for(let n=e.length;n<=t;n++)e[n]=[];return e[t]}function MC(e,t){let n=e.length;for(let r=n-1;r>=0&&!(t>=e[r][_C]);n=r--);return n}function Xd(e,t,n){for(let r=e.length;r>t;r--)e[r]=e[r-1];e[t]=n}function DC(e){let{length:t}=e,n=t;for(let r=n-1;r>=0&&!(e[r].length>0);n=r,r--);n<t&&(e.length=n)}function PC(e,t){return t===0?!0:e[t-1].length===1}function NC(e,t,n,r,s,i){if(t===0)return!1;let a=e[t-1];return a.length===1?!1:n===a[bC]&&r===a[SC]&&s===a[xC]&&i===(a.length===5?a[CC]:rg)}var ig=og("",-1,-1,"",null,!1),LC=[];function og(e,t,n,r,s,i){return{source:e,line:t,column:n,name:r,content:s,ignore:i}}function ag(e,t,n,r,s){return{map:e,sources:t,source:n,content:r,ignore:s}}function lg(e,t){return ag(e,t,"",null,!1)}function FC(e,t,n){return ag(null,LC,e,t,n)}function jC(e){let t=new IC({file:e.map.file}),{sources:n,map:r}=e,s=r.names,i=Uc(r);for(let a=0;a<i.length;a++){let o=i[a];for(let l=0;l<o.length;l++){let c=o[l],u=c[0],f=ig;if(c.length!==1){let A=n[c[1]];if(f=cg(A,c[2],c[3],c.length===5?s[c[4]]:""),f==null)continue}let{column:d,line:p,name:h,content:y,source:m,ignore:w}=f;RC(t,a,u,m,p,d,h),m&&y!=null&&kC(t,m,y),w&&TC(t,m,!0)}}return t}function cg(e,t,n,r){if(!e.map)return og(e.source,t,n,r,e.content,e.ignore);let s=EC(e.map,t,n);return s==null?null:s.length===1?ig:cg(e.sources[s[1]],s[2],s[3],s.length===5?e.map.names[s[4]]:r)}function QC(e){return Array.isArray(e)?e:[e]}function UC(e,t){let n=QC(e).map(i=>new lo(i,"")),r=n.pop();for(let i=0;i<n.length;i++)if(n[i].sources.length>1)throw new Error(`Transformation map ${i} must have exactly one source file.
|
|
54
|
-
Did you specify these with the most recent transformation maps first?`);let s=ug(r,t,"",0);for(let i=n.length-1;i>=0;i--)s=lg(n[i],[s]);return s}function ug(e,t,n,r){let{resolvedSources:s,sourcesContent:i,ignoreList:a}=e,o=r+1;return lg(e,s.map((l,c)=>{let u={importer:n,depth:o,source:l||"",content:void 0,ignore:void 0},f=t(u.source,u),{source:d,content:p,ignore:h}=u;return f?ug(new lo(f,d),t,d,o):FC(d,p!==void 0?p:i?i[c]:null,h!==void 0?h:a?a.includes(c):!1)}))}var HC=class{constructor(e,t){let n=t.decodedMappings?sg(e):OC(e);this.version=n.version,this.file=n.file,this.mappings=n.mappings,this.names=n.names,this.ignoreList=n.ignoreList,this.sourceRoot=n.sourceRoot,this.sources=n.sources,t.excludeContent||(this.sourcesContent=n.sourcesContent)}toString(){return JSON.stringify(this)}};function Zd(e,t,n){let r=typeof n=="object"?n:{excludeContent:!!n,decodedMappings:!1};return new HC(jC(UC(e,t)),r)}function WC(e){return e instanceof Error?e.stack||e.message:e}function ep(e,t){let n=0;for(let r=0;r<t.length;r++)n=(n<<5)-n+t.charCodeAt(r),n|=0;return e[Math.abs(n)%e.length]}function tp(e,t){let n=0,r=0,s=-1,i=0;for(;n<e.length;)if(r<t.length&&(t[r]===e[n]||t[r]==="*"))t[r]==="*"?(s=r,i=n,r++):(n++,r++);else if(s!==-1)r=s+1,i++,n=i;else return!1;for(;r<t.length&&t[r]==="*";)r++;return r===t.length}function GC(e){return e>=1e3?`${(e/1e3).toFixed(1)}s`:`${e}ms`}function zC(e,t,n,r,s,i,a){let o=f=>{let d,p,h,y,m=(...A)=>{if(!m.enabled)return;let g=Date.now();m.diff=g-(d||g),m.prev=d,m.curr=g,d=g,A[0]=WC(A[0]),typeof A[0]!="string"&&A.unshift("%O");let E=0;A[0]=A[0].replace(/%([a-z%])/gi,(v,S)=>{if(v==="%%")return"%";E++;let b=o.formatters[S];return typeof b=="function"&&(v=b.call(m,A[E]),A.splice(E,1),E--),v}),o.formatArgs.call(m,A),(m.log||o.log).apply(m,A)};function w(A,g=":"){let E=o(this.namespace+g+A);return E.log=this.log,E}return m.namespace=f,m.useColors=e,m.color=ep(t,f),m.extend=w,m.log=n,Object.defineProperty(m,"enabled",{enumerable:!0,configurable:!1,get:()=>p??(h!==o.namespaces&&(h=o.namespaces,y=o.enabled(f)),y),set:A=>{p=A}}),a&&a(m),m};function l(f){s(f),o.namespaces=f,o.names=[],o.skips=[];let d=f.trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let p of d)p[0]==="-"?o.skips.push(p.slice(1)):o.names.push(p)}function c(){let f=[...o.names,...o.skips.map(d=>`-${d}`)].join(",");return o.enable(""),f}function u(f){for(let d of o.skips)if(tp(f,d))return!1;for(let d of o.names)if(tp(f,d))return!0;return!1}return o.namespaces="",o.formatters={},o.enable=l,o.disable=c,o.enabled=u,o.names=[],o.skips=[],o.selectColor=f=>ep(t,f),o.formatArgs=i,o.log=n,o.enable(r()),o}var JC=Dm((()=>{})),ps=ex({createDebug:()=>mt,default:()=>Hc,formatArgs:()=>dg,log:()=>fg,"module.exports":()=>mt});function fg(...e){process.stderr.write(`${DS(pn,...e)}
|
|
55
|
-
`)}function KC(){return process.env.DEBUG||""}function VC(e){e?process.env.DEBUG=e:delete process.env.DEBUG}function qC(){return"colors"in pn?!!pn.colors:NS(process.stderr.fd)}function dg(e){let{namespace:t,useColors:n}=this;if(n){let r=this.color,s=`\x1B[3${r<8?r:`8;5;${r}`}`,i=` ${s};1m${t} \x1B[0m`;e[0]=i+e[0].split(`
|
|
56
|
-
`).join(`
|
|
57
|
-
${i}`),e.push(`${s}m+${Vl(this.diff)}\x1B[0m`)}else e[0]=`${YC()}${t} ${e[0]}`}function YC(){return pn.hideDate?"":`${new Date().toISOString()} `}function XC(e){e.inspectOpts=Object.assign({},pn)}var np,rp,pn,Vl,mt,Hc,tr=Dm((()=>{JC(),np=Zn(import.meta.url),rp=process.stderr.getColorDepth&&process.stderr.getColorDepth()>2?[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221]:[6,2,3,4,5,1],pn=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let n=t.slice(6).toLowerCase().replace(/_([a-z])/g,(s,i)=>i.toUpperCase()),r=process.env[t];return r==="null"?r=null:/^yes|on|true|enabled$/i.test(r)?r=!0:/^no|off|false|disabled$/i.test(r)?r=!1:r=Number(r),e[n]=r,e},{});try{Vl=np("ms")}catch{Vl=GC}mt=zC(qC(),rp,fg,KC,VC,dg,XC),mt.inspectOpts=pn,mt.formatters.o=function(e){return this.inspectOpts.colors=this.useColors,Wn(e,this.inspectOpts).split(`
|
|
58
|
-
`).map(t=>t.trim()).join(" ")},mt.formatters.O=function(e){return this.inspectOpts.colors=this.useColors,Wn(e,this.inspectOpts)},Hc=mt,mt.default=mt,mt.debug=mt}));function ZC(e){return Array.isArray(e)}function sp(e){return ZC(e)?e:e==null?[]:[e]}var e0=new RegExp(`\\${jS.sep}`,"g"),ai=function(t){return t.replace(e0,Bm.sep)};function t0(e,t){if(t===!1||FS(e)||e.startsWith("**"))return ai(e);let n=ai($m(t||"")).replace(/[-^$*+?.()|[\]{}]/g,"\\$&");return Bm.join(n,ai(e))}var n0=function(t,n,r){let s=r&&r.resolve,i=l=>l instanceof RegExp?l:{test:c=>{let u=t0(l,s);return(0,Pt.default)(u,{dot:!0})(c)}},a=sp(t).map(i),o=sp(n).map(i);return!a.length&&!o.length?l=>typeof l=="string"&&!l.includes("\0"):function(c){if(typeof c!="string"||c.includes("\0"))return!1;let u=ai(c);for(let f=0;f<o.length;++f){let d=o[f];if(d instanceof RegExp&&(d.lastIndex=0),d.test(u))return!1}for(let f=0;f<a.length;++f){let d=a[f];if(d instanceof RegExp&&(d.lastIndex=0),d.test(u))return!0}return!a.length}},pg=new Set("break case class catch const continue debugger default delete do else export extends finally for function if import in instanceof let new return super switch this throw try typeof var void while with yield enum await implements package protected static interface private public arguments Infinity NaN undefined null true false eval uneval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Symbol Error EvalError InternalError RangeError ReferenceError SyntaxError TypeError URIError Number Math Date String RegExp Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array Map Set WeakMap WeakSet SIMD ArrayBuffer DataView JSON Promise Generator GeneratorFunction Reflect Proxy Intl".split(" "));pg.add("");var $i=function(t){let n=t.replace(/-(\w)/g,(r,s)=>s.toUpperCase()).replace(/[^$_a-zA-Z0-9]/g,"_");return(/\d/.test(n[0])||pg.has(n))&&(n=`_${n}`),n||"_"};function Mi(e){return(JSON.stringify(e)||"undefined").replace(/[\u2028\u2029]/g,t=>`\\u${`000${t.charCodeAt(0).toString(16)}`.slice(-4)}`)}function r0(e,t,n){let r="[",s=t?`
|
|
59
|
-
${n}${t}`:"";for(let i=0;i<e.length;i++){let a=e[i];r+=`${i>0?",":""}${s}${Nn(a,t,n+t)}`}return`${r}${t?`
|
|
60
|
-
${n}`:""}]`}function s0(e,t,n){let r="{",s=t?`
|
|
61
|
-
${n}${t}`:"",i=Object.entries(e);for(let a=0;a<i.length;a++){let[o,l]=i[a],c=$i(o)===o?o:Mi(o);r+=`${a>0?",":""}${s}${c}:${t?" ":""}${Nn(l,t,n+t)}`}return`${r}${t?`
|
|
62
|
-
${n}`:""}}`}function Nn(e,t,n){if(typeof e=="object"&&e!==null)return Array.isArray(e)?r0(e,t,n):e instanceof Date?`new Date(${e.getTime()})`:e instanceof RegExp?e.toString():s0(e,t,n);if(typeof e=="number"){if(e===1/0)return"Infinity";if(e===-1/0)return"-Infinity";if(e===0)return 1/e===1/0?"0":"-0";if(e!==e)return"NaN"}if(typeof e=="symbol"){let r=Symbol.keyFor(e);if(r!==void 0)return`Symbol.for(${Mi(r)})`}return typeof e=="bigint"?`${e}n`:Mi(e)}var i0="isWellFormed"in String.prototype;function o0(e){return i0?e.isWellFormed():!/\p{Surrogate}/u.test(e)}var a0=/^[$_\p{ID_Start}][$\u200c\u200d\p{ID_Continue}]*$/u,l0=function(t,n={}){var r,s;let i=n.compact?"":"indent"in n?n.indent:" ",a=n.compact?"":" ",o=n.compact?"":`
|
|
63
|
-
`,l=n.preferConst?"const":"var";if(n.namedExports===!1||typeof t!="object"||Array.isArray(t)||t instanceof Date||t instanceof RegExp||t===null){let m=Nn(t,n.compact?null:i,"");return`export default${a||(/^[{[\-\/]/.test(m)?"":" ")}${m};`}let c=0;for(let m of Object.keys(t)){let w=(s=(r=/^(_+)/.exec(m))===null||r===void 0?void 0:r[0].length)!==null&&s!==void 0?s:0;w>c&&(c=w)}let u=`${"_".repeat(c+1)}arbitrary`,f="",d=[],p=[];for(let[m,w]of Object.entries(t))if(m===$i(m))n.objectShorthand?d.push(m):d.push(`${m}:${a}${m}`),f+=`export ${l} ${m}${a}=${a}${Nn(w,n.compact?null:i,"")};${o}`;else if(d.push(`${Mi(m)}:${a}${Nn(w,n.compact?null:i,"")}`),m!=="default"){let A=a0.test(m);if(A||n.includeArbitraryNames&&o0(m)){let g=`${u}${p.length}`;f+=`${l} ${g}${a}=${a}${Nn(w,n.compact?null:i,"")};${o}`,p.push(`${g} as ${A?m:JSON.stringify(m)}`)}}let h=p.length>0?`export${a}{${o}${i}${p.join(`,${o}${i}`)}${o}};${o}`:"",y=`export default${a}{${o}${i}${d.join(`,${o}${i}`)}${o}};${o}`;return`${f}${h}${y}`};function c0(e){let t=new Set(e.filter(r=>typeof r=="string")),n=e.filter(r=>typeof r!="string");return r=>t.has(r)||n.some(s=>s.test(r))}var ql;if(process.versions.pnp)try{ql=Zn(import.meta.url)("pnpapi")}catch{}function u0(e,t){let n=re(L.dirname(t));e.forEach((r,s)=>{r.dir===n&&e.delete(s)})}function co(e,t,n=!1,r){if(ql){let i=Xr(e,t,n);if(r?.has(i))return r.get(i);try{let a=ql.resolveToUnqualified(e,t,{considerBuiltins:!1});if(!a)return null;let o=Di(L.join(a,"package.json"));return r?.set(i,o),o}catch{return null}}let s=t;for(;t;){if(r){let o=p0(r,e,t,s,n);if(o)return o}let i=L.join(t,"node_modules",e,"package.json");try{if(pe.existsSync(i)){let o=Di(n?i:cn(i));return r&&h0(r,o,e,t,s,n),o}}catch{}let a=L.dirname(t);if(a===t)break;t=a}return null}function Jt(e,t){let n=e;for(;e;){if(t){let i=m0(t,e,n);if(i)return i}let r=L.join(e,"package.json");if(_t(r)?.isFile())try{let i=Di(r);return t&&g0(t,i,e,n),i}catch{}let s=L.dirname(e);if(s===e)break;e=s}return null}function hs(e,t){let n=Jt(e,t);return n&&(n.data.name?n:hs(L.dirname(n.dir),t))}function Di(e){let t=JSON.parse(Jc(pe.readFileSync(e,"utf-8"))),n=re(L.dirname(e)),{sideEffects:r}=t,s;if(typeof r=="boolean")s=()=>r;else if(Array.isArray(r))if(r.length<=0)s=()=>!1;else{let a=r.map(o=>o.includes("/")?o:`**/${o}`);s=hn(a,null,{resolve:n})}else s=()=>null;let i={};return{dir:n,data:t,hasSideEffects:s,setResolvedCache(a,o,l){i[ip(a,l)]=o},getResolvedCache(a,o){return i[ip(a,o)]}}}function ip(e,t){return[e,t.isRequire?"1":"0",t.conditions.join("_"),t.extensions.join("_"),t.mainFields.join("_")].join("|")}function f0(e){for(;e;){let t=L.join(e,"node_modules");if(_t(t)?.isDirectory())return t;let n=L.dirname(e);if(n===e)break;e=n}return null}function d0(e){let t=new Set,n=new Set,r=a=>{t.add(a)},s=r,i=e.set.bind(e);return e.set=(a,o)=>(!Ke(o.dir)&&!n.has(o.dir)&&(n.add(o.dir),s(L.join(o.dir,"package.json"))),i(a,o)),{name:"vite:watch-package-data",buildStart(){s=this.addWatchFile.bind(this),t.forEach(s),t.clear()},buildEnd(){s=r},watchChange(a){a.endsWith("/package.json")&&u0(e,L.normalize(a))}}}function p0(e,t,n,r,s){let i=Xr(t,n,s),a=e.get(i);if(a)return uo(r,n,o=>{e.set(Xr(t,o,s),a)}),a}function h0(e,t,n,r,s,i){e.set(Xr(n,r,i),t),uo(s,r,a=>{e.set(Xr(n,a,i),t)})}function Xr(e,t,n){return`rpd_${e}_${t}_${n}`}function m0(e,t,n){let r=Pi(t),s=e.get(r);if(s)return uo(n,t,i=>{e.set(Pi(i),s)}),s}function g0(e,t,n,r){e.set(Pi(n),t),uo(r,n,s=>{e.set(Pi(s),t)})}function Pi(e){return`fnpd_${e}`}function uo(e,t,n){for(;e!==t;)n(e),e=L.dirname(e)}var j=nt(Lm(),1);tr();var hn=n0,y0=/[\u0000-\u001F"#$%&*+,:;<=>?[\]^`{|}\u007F]/g,hg=/\s*>\s*/g,fo=e=>w0(e.replaceAll(/_+/g,"$&__").replaceAll("/","_").replaceAll(".","__").replace(hg,"_n_").replace(y0,t=>"_0"+t.charCodeAt(0).toString(16)+"_")),A0=170,w0=(e,t=A0)=>e.length<=t?e:e.slice(0,t-9)+"_"+We(e),E0=e=>e.replace(hg," > "),mg="node:",v0="bun:",gg=Rm.filter(e=>!e.includes(":")),op=new WeakMap;function nr(e,t){let n=op.get(e);return n||(n=c0(e),op.set(e,n)),n(t)}var Wc=[...gg,new RegExp(`^${mg}`),new RegExp(`^${v0}`)];function _0(e){return nr(Wc,e)}function yg(e){return e.startsWith(mg)?!0:gg.includes(e)}function Ke(e){return e.includes("node_modules")}function po(e,t){return e?.some(n=>n===t||t.startsWith(Me(n)))}function mn(e,t){let{extensions:n}=t;return Bx.test(e)||(n?.some(r=>e.endsWith(r))??!1)}var Zr=/^(?![a-zA-Z]:)[\w@](?!.*:\/\/)/,Ag=/^([^@][^/]*)\/|^(@[^/]+\/[^/]+)\//,wg=L.dirname(kt(import.meta.url)),b0="4.23.0",ap=process.env.VITE_DEBUG_FILTER,S0=process.env.DEBUG;function Re(e,t={}){let n=Hc(e),{onlyWhenFocused:r,depth:s}=t;s&&n.inspectOpts&&n.inspectOpts.depth==null&&(n.inspectOpts.depth=t.depth);let i=n.enabled;if(i&&r&&(i=!!S0?.includes(typeof r=="string"?r:e)),i)return(...a)=>{(!ap||a.some(o=>o?.includes?.(ap)))&&n(...a)}}function x0(){if(!Ct.endsWith("client.mjs"))throw new Error("cannot test case insensitive FS, CLIENT_ENTRY const doesn't contain client.mjs");if(!pe.existsSync(Ct))throw new Error("cannot test case insensitive FS, CLIENT_ENTRY does not point to an existing file: "+Ct);return pe.existsSync(Ct.replace("client.mjs","cLiEnT.mjs"))}var Eg=x0(),C0=/^[A-Z]:/i;function re(e){return L.posix.normalize($t?De(e):e)}function rr(e){let t=re(e.startsWith(Fe)?e.slice(Fe.length):e);return t[0]==="/"||C0.test(t)?t:`/${t}`}function I0(e){return rr(he(e))}function En(e,t){return e=Me(e),t.startsWith(e)||Eg&&t.toLowerCase().startsWith(e.toLowerCase())}function R0(e,t){return e===t||Eg&&e.toLowerCase()===t.toLowerCase()}var vg=/^([a-z]+:)?\/\//,ft=e=>vg.test(e),_g=/^\s*data:/i,gn=e=>_g.test(e),Ya=/^virtual-module:.*/,Xa="virtual-module:",k0=/\.(?:[jt]sx?|m[jt]s|vue|marko|svelte|astro|imba|mdx)(?:$|\?)/,ho=e=>(e=he(e),!!(k0.test(e)||!L.extname(e)&&e[e.length-1]!=="/")),Mt=e=>dt.test(e),bg=/(\?|&)import=?(?:&|$)/,T0=/(\?|&)direct=?(?:&|$)/,O0=new RegExp(`^(?:${[Fe,Kr,ds,zl].join("|")})`),mo=/[?&]$/,Yl=e=>bg.test(e),Sg=e=>O0.test(e);function ln(e){return e.replace(bg,"$1").replace(mo,"")}function xg(e){return e.replace(T0,"$1").replace(mo,"")}var It=/(\?|&)url(?:&|$)/,Xl=/(\?|&)raw(?:&|$)/;function Cg(e){return e.replace(It,"$1").replace(mo,"")}function Le(e,t){let{file:n,postfix:r}=dn(e);return`${$t?De(n):n}?${t}${r[0]==="?"?`&${r.slice(1)}`:r}`}var B0=/\bt=\d{13}&?\b/;function yt(e){return e.replace(B0,"").replace(mo,"")}async function go(e,t,n){let r,s=e,i="";for(;r=t.exec(s);)i+=s.slice(0,r.index),i+=await n(r),s=s.slice(r.index+r[0].length);return i+=s,i}function Rt(e,t=0){let n=Je.now()-e-t,r=(n.toFixed(2)+"ms").padEnd(5," ");return n<10?j.default.green(r):n<50?j.default.yellow(r):j.default.red(r)}function ut(e,t){e=yt(e);let n=e.startsWith(t);if(n||e.startsWith(Fe)){let r=L.posix.relative(t,n?e:rr(e));return j.default.dim(r)}else return j.default.dim(e)}function ke(e){return Object.prototype.toString.call(e)==="[object Object]"}function Ig(e){return e!=null}function _t(e){try{return pe.statSync(e,{throwIfNoEntry:!1})}catch{}}function $0(e,t){for(;e;){for(let r of t){let s=L.join(e,r);if(_t(s)?.isFile())return s}let n=L.dirname(e);if(n===e)return;e=n}}function yo(e,t){if(/\.m[jt]s$/.test(e))return!0;if(/\.c[jt]s$/.test(e))return!1;if(e.startsWith("\0"))return!0;if(L.isAbsolute(e))try{return Jt(L.dirname(e),t)?.data.type==="module"}catch{return!1}else return!1}function M0(e,t){if(/\.[mc][jt]s$/.test(e)||e.startsWith("\0"))return!0;if(!L.isAbsolute(e))return!1;try{let n=Jt(L.dirname(e),t);return n?.data.type==="module"||n?.data.type==="commonjs"}catch{return!1}}var Ao=/\r?\n/g,Za=2;function lp(e,t=2){return e.split(Ao).map(n=>" ".repeat(t)+n).join(`
|
|
64
|
-
`)}function cp(e,t){if(typeof t=="number")return t;let n=e.split(Ao),{line:r,column:s}=t,i=0;for(let a=0;a<r-1&&a<n.length;a++)i+=n[a].length+1;return i+s}function Dt(e,t){if(typeof t!="number")return t;if(t>e.length)throw new Error(`offset is longer than source length! offset ${t} > length ${e.length}`);let n=e.slice(0,t).split(Ao);return{line:n.length,column:n[n.length-1].length}}var qt=120,up="...";function Ue(e,t=0,n){t=Math.max(cp(e,t),0),n=Math.min(n!==void 0?cp(e,n):t,e.length);let r=n!==void 0?Dt(e,n).line:Dt(e,t).line+Za,s=Math.max(3,String(r).length+1),i=e.split(Ao),a=0,o=[];for(let l=0;l<i.length;l++){if(a+=i[l].length,a>=t){for(let c=l-Za;c<=l+Za||n>a;c++){if(c<0||c>=i.length)continue;let u=c+1,f=i[c].length,d=Math.max(t-(a-f),0),p=Math.max(1,n>a?f-d:n-t),h=i[c],y=d;if(f>qt){let m=0;if(c===l){if(p>qt)m=d;else{let E=d+Math.floor(p/2);m=Math.max(0,E-Math.floor(qt/2))}y=Math.max(0,d-m)+(m>0?3:0)}let w=m>0?up:"",A=f-m>qt?up:"",g=qt-w.length-A.length;h=w+h.slice(m,m+g)+A}if(o.push(`${u}${" ".repeat(s-String(u).length)}| ${h}`),c===l){let m="^".repeat(Math.min(p,qt));o.push(`${" ".repeat(s)}| `+" ".repeat(y)+m)}else if(c>l){if(n>a){let m=Math.max(Math.min(n-a,f),1),w="^".repeat(Math.min(m,qt));o.push(`${" ".repeat(s)}| `+w)}a+=f+1}}break}a++}return o.join(`
|
|
65
|
-
`)}function Gc(e){if(!_t(e))return!1;try{return pe.accessSync(e,pe.constants.R_OK),!0}catch{return!1}}var D0=/(.+?)[\\/](.+)/;function Rg(e,t){let n=[],r=null;if(t?.length)for(let s of t)if(L.dirname(s)!=="."){let i=D0.exec(s);if(i){r??=new Map;let[,a,o]=i,l=r.get(a);l||(l=[],r.set(a,l)),l.includes(o)||l.push(o)}}else n.push(s);for(let s of pe.readdirSync(e))n.includes(s)||(r?.has(s)?Rg(L.resolve(e,s),r.get(s)):pe.rmSync(L.resolve(e,s),{recursive:!0,force:!0}))}function kg(e,t){pe.mkdirSync(t,{recursive:!0});for(let n of pe.readdirSync(e)){let r=L.resolve(e,n);if(r===t)continue;let s=L.resolve(t,n);pe.statSync(r).isDirectory()?kg(r,s):pe.copyFileSync(r,s)}}var P0="ERR_SYMLINK_IN_RECURSIVE_READDIR";async function Tg(e){if(!pe.existsSync(e))return[];let t;try{t=await Ee.readdir(e,{withFileTypes:!0})}catch(n){if(n.code==="EACCES")return[];throw n}if(t.some(n=>n.isSymbolicLink())){let n=new Error("Symbolic links are not supported in recursiveReaddir");throw n.code=P0,n}return(await Promise.all(t.map(n=>{let r=L.resolve(e,n.name);return n.isDirectory()?Tg(r):re(r)}))).flat(1)}var cn=$t?F0:pe.realpathSync.native,Zl=new Map;function N0(e){let t=pe.realpathSync.native(e);if(t.startsWith("\\\\")){for(let[n,r]of Zl)if(t.startsWith(n))return t.replace(n,r)}return t}var L0=/^\w* +(\w:) +([^ ]+)\s/,fp=!1;function F0(e){return fp||(j0(),fp=!0),pe.realpathSync(e)}function j0(){try{pe.realpathSync.native(L.resolve("./"))}catch(e){if(e.message.includes("EISDIR: illegal operation on a directory")){cn=pe.realpathSync;return}}Om("net use",{windowsHide:!0},(e,t)=>{if(e)return;let n=t.split(`
|
|
66
|
-
`);for(let r of n){let s=L0.exec(r);s&&Zl.set(s[2],s[1])}Zl.size===0?cn=pe.realpathSync.native:cn=N0})}function zn(e,t,n){t&&!t.startsWith(Me(n))&&!t.includes("\0")&&pe.existsSync(t)&&e.add(L.resolve(t))}function Og(e){return e.map(({url:t,descriptor:n})=>t+(n?` ${n}`:"")).join(", ")}var Q0=/(?:^|\s|(?<=,))(?<url>[\w-]+\([^)]*\)|"[^"]*"|'[^']*'|[^,]\S*[^,])\s*(?:\s(?<descriptor>\w[^,]+))?(?:,|$)/g,U0=/(?: |\\t|\\n|\\f|\\r)+/g;function Bg(e){let t=e.trim().replace(U0," ").replace(/\r?\n/,"").replace(/,\s+/,", ").replaceAll(/\s+/g," ").matchAll(Q0);return Array.from(t,({groups:n})=>({url:n?.url?.trim()??"",descriptor:n?.descriptor?.trim()??""})).filter(({url:n})=>!!n)}function $g(e,t){return Promise.all(Bg(e).map(async({url:n,descriptor:r})=>({url:await t({url:n,descriptor:r}),descriptor:r}))).then(Og)}function H0(e,t){return Og(Bg(e).map(({url:n,descriptor:r})=>({url:t({url:n,descriptor:r}),descriptor:r})))}var W0=/^[A-Z]:/,G0=/^([A-Z]):\//,z0=/^\/[^/]/;function el(e){return W0.test(e)?e.replace(G0,"/windows/$1/"):z0.test(e)?`/linux${e}`:e}var J0=/^\/windows\/([A-Z])\//;function K0(e){return e.startsWith("/linux/")?e.slice(6):e.startsWith("/windows/")?e.replace(J0,"$1:/"):e}var V0={names:[],sources:[],mappings:"",version:3};function ms(e,t){if(t.length===0||t.every(i=>i.sources.length===0))return{...V0};t=t.map(i=>{let a={...i};return a.sources=i.sources.map(o=>o?el(o):null),i.sourceRoot&&(a.sourceRoot=el(i.sourceRoot)),a});let n=el(e),r,s=1;return t.slice(0,-1).find(i=>i.sources.length!==1)===void 0?r=Zd(t,()=>null):r=Zd(t[0],function(a){return a===n&&t[s]?t[s++]:null}),r.file||delete r.file,r.sources=r.sources.map(i=>i&&K0(i)),r.file=e,r}function Jn(e){return Array.from(new Set(e))}function q0(){if(!(Js.getDefaultResultOrder&&Js.getDefaultResultOrder()==="verbatim"))return Promise.all([Js.lookup("localhost"),Js.lookup("localhost",{verbatim:!0})]).then(([e,t])=>e.family===t.family&&e.address===t.address?void 0:e.address)}function Y0(e,t){return!(e===t||e&&t&&wp(e.local,t.local)&&wp(e.network,t.network))}async function zc(e){let t;e===void 0||e===!1?t="localhost":e===!0?t=void 0:t=e;let n=t===void 0||ao.has(t)?"localhost":t;if(t==="localhost"){let r=await q0();r&&(n=r)}return{host:t,name:n}}function X0(e){let t=e?He(e):[];return t.length===0?[]:Jn(t.map(n=>{try{return new to.X509Certificate(n)}catch{return null}}).flatMap(n=>n?.subjectAltName?eI(n.subjectAltName):[]))}function Z0(e,t,n,r,s){let i=e.address();if(!(h=>h?.address)(i))return{local:[],network:[],networkInterfaceNames:[]};let o=[],l=[],c=[],u=t.https?"https":"http",f=i.port,d=s.rawBase==="./"||s.rawBase===""?"/":s.rawBase;if(n.host!==void 0&&!ao.has(n.host)){let h=n.name;h.includes(":")&&(h=`[${h}]`);let y=`${u}://${h}:${f}${d}`;if(Mx.has(n.host))o.push(y);else{l.push(y);let m;if(n.host){let w=zr.networkInterfaces();e:for(let[A,g]of Object.entries(w))for(let E of g??[])if(E.address===n.host){m=A;break e}}c.push(m)}}else Object.entries(zr.networkInterfaces()).forEach(([h,y])=>{(y??[]).filter(m=>m.address&&m.family==="IPv4").forEach(m=>{let w=m.address.replace("127.0.0.1",n.name);w.includes(":")&&(w=`[${w}]`);let A=`${u}://${w}:${f}${d}`;m.address.includes("127.0.0.1")?o.push(A):(l.push(A),c.push(h))})});let p=X0(r?.cert);if(p.length>0){let h=new Set([...o,...l]);o.push(...p.map(y=>`${u}://${y}:${f}${d}`).filter(y=>!h.has(y)))}return{local:o,network:l,networkInterfaceNames:c}}function eI(e){let t=[],n=e;for(;n;){let r=n.indexOf(":"),s=n.slice(0,r);if(n=n.slice(r+1),!n)break;let i=n[0]==='"',a;if(i){let o=n.indexOf('"',1);a=JSON.parse(n.slice(0,o+1)),n=n.slice(o+1)}else{let o=n.indexOf(","),l=o===-1?n.length:o;a=n.slice(0,l),n=n.slice(l)}n=n.slice(1).trimStart(),s==="DNS"&&a!=="[::1]"&&!(a.startsWith("*.")&&Oi.isIPv4(a.slice(2)))&&t.push(a.replace("*","vite"))}return t}function He(e){return Array.isArray(e)?e:[e]}var Mg=/\/\*[^*]*\*+(?:[^/*][^*]*\*+)*\//g,tI=/\/\/.*/g,nI=/\?(?!.*[/|}])/,rI=/\\?\?(?!.*[/|}])/,Dg=e=>" ".repeat(e.length);function We(e,t=8){let n=to.hash("sha256",e,"hex").substring(0,t);return t<=64?n:n.padEnd(t,"_")}function sI(e){return e.replace(Mg,Dg)}function dp(e){return Array.isArray(e)?e:typeof e=="function"?e():[]}function es(e){if(Array.isArray(e))return e.map(t=>es(t));if(ke(e)){let t={};for(let n in e)t[n]=es(e[n]);return t}if(typeof e=="function")return e;if(e instanceof RegExp)return new RegExp(e);if(typeof e=="object"&&e!=null)throw new Error("Cannot deep clone non-plain object");return e}function Pg(e,t){let n=e;for(let r in t){let s=t[r];if(s===void 0)continue;let i=n[r];if(i===void 0){n[r]=s;continue}if(ke(i)&&ke(s)){n[r]=Pg(i,s);continue}n[r]=s}return n}var iI=/^environments\.[^.]+$/;function vt(e,t){return Pg(es(e),t)}var pp=new Set(["optimizeDeps","ssr.optimizeDeps"]),hp=()=>{let e=process.env.VITE_DEPRECATION_TRACE?"trace":"warn";console[e]("`optimizeDeps.rollupOptions` / `ssr.optimizeDeps.rollupOptions` is deprecated. Use `optimizeDeps.rolldownOptions` instead. Note that this option may be set by a plugin. "+(e==="trace"?"Showing trace because VITE_DEPRECATION_TRACE is set.":"Set VITE_DEPRECATION_TRACE=1 to see where it is called."))};function xt(e,t){e.rolldownOptions??=e.rollupOptions,pp.has(t)&&e.rollupOptions&&e.rolldownOptions!==e.rollupOptions&&hp(),Object.defineProperty(e,"rollupOptions",{get(){return e.rolldownOptions},set(n){pp.has(t)&&hp(),e.rolldownOptions=n},configurable:!0,enumerable:!0})}var mp=new Set(["build","worker","optimizeDeps","ssr.optimizeDeps"]);function gp(e){if(!ke(e))return e;let t={...e};return ke(t.build)&&xt(t.build,"build"),t}function oI(e){for(let t of[e.build,e.worker,e.optimizeDeps,e.ssr?.optimizeDeps])if(t!=null&&t.rollupOptions!=null&&t.rolldownOptions!=null&&t.rollupOptions!==t.rolldownOptions)return!0;return!1}var ec=["protocol","host","port","clientPort","path","timeout","server"],aI=(()=>{let e=!1;return()=>{if(e)return;e=!0;let t=process.env.VITE_DEPRECATION_TRACE?"trace":"warn";console[t]("`server.hmr.protocol/host/port/path/clientPort/timeout/server` is deprecated. Use `server.ws.*` instead. Note that this option may be set by a plugin. "+(t==="trace"?"Showing trace because VITE_DEPRECATION_TRACE is set.":"Set VITE_DEPRECATION_TRACE=1 to see where it is called."))}})();function Ng(e){if(e.hmr===!1||e.ws===!1)return;e.hmr===!0&&(e.hmr={});let t=e.hmr,n=e.ws?{...e.ws}:{};if(t)for(let s of ec)t[s]!==void 0&&(n[s]??=t[s]);e.ws=n;let r=t||{};for(let s of ec)Object.defineProperty(r,s,{get(){return e.ws?.[s]},set(i){aI(),typeof e.ws=="object"&&(e.ws[s]=i)},configurable:!0,enumerable:!0});e.hmr=r}function Lg(e,t,n){let r={...e};if(mp.has(n)&&xt(r,n),n==="server"&&Ng(r),n==="server.hmr")for(let s of ec)Object.defineProperty(r,s,Object.getOwnPropertyDescriptor(e,s));for(let s in t){let i=t[s];if(i==null)continue;let a=r[s];if(s==="rollupOptions"&&mp.has(n)){if(t.rolldownOptions)continue;a=r.rolldownOptions}if(a==null){if(n===""&&s==="environments"&&ke(i)){let o={...i};for(let l in o)o[l]=gp(o[l]);r[s]=o}else n==="environments"?r[s]=gp(i):r[s]=i;continue}if(s==="input"&&n===""){r[s]=lI(a,i);continue}else if(s==="alias"&&(n==="resolve"||n==="")){r[s]=Fg(a,i);continue}else if(s==="assetsInclude"&&n===""){r[s]=[].concat(a,i);continue}else if(((s==="noExternal"||s==="external")&&(n==="ssr"||n==="resolve")||s==="allowedHosts"&&n==="server")&&(a===!0||i===!0)){r[s]=!0;continue}else if(s==="plugins"&&n==="worker"){r[s]=()=>[...dp(a),...dp(i)];continue}else if(s==="server"&&(n==="server.hmr"||n==="server.ws")){r[s]=i;continue}if(Array.isArray(a)||Array.isArray(i)){r[s]=[...He(a),...He(i)];continue}if(ke(a)&&ke(i)){r[s]=Lg(a,i,n&&!iI.test(n)?`${n}.${s}`:s);continue}r[s]=i}return r}function gt(e,t,n=!0){if(typeof e=="function"||typeof t=="function")throw new Error("Cannot merge config in form of callback");return Lg(e,t,n?"":".")}function lI(e,t){return e?t?typeof e=="string"&&typeof t=="string"?[e,t]:Array.isArray(e)&&(typeof t=="string"||Array.isArray(t))?[...e,...Array.isArray(t)?t:[t]]:Array.isArray(t)&&(typeof e=="string"||Array.isArray(e))?[...Array.isArray(e)?e:[e],...t]:typeof e!="string"&&!Array.isArray(e)?{...e,...yp(t)}:{...yp(e),...t}:e:t}function yp(e){return typeof e=="string"?{[L.basename(e,L.extname(e))]:e}:Array.isArray(e)?Object.fromEntries(e.map(t=>[L.basename(t,L.extname(t)),t])):e}function Fg(e,t){return e?t?ke(e)&&ke(t)?{...e,...t}:[...tc(t),...tc(e)]:e:t}function tc(e=[]){return Array.isArray(e)?e.map(Ap):Object.keys(e).map(t=>Ap({find:t,replacement:e[t]}))}function Ap({find:e,replacement:t,customResolver:n}){typeof e=="string"&&e.endsWith("/")&&t.endsWith("/")&&(e=e.slice(0,e.length-1),t=t.slice(0,t.length-1));let r={find:e,replacement:t};return n&&(r.customResolver=n),r}function gs(e,t,n){return{code:e.toString(),map:n.command==="build"&&n.build.sourcemap?e.generateMap({hires:"boundary",source:t}):null}}async function Ht(e){do e=(await Promise.all(e)).flat(1/0);while(e.some(t=>t?.then));return e}function Jc(e){return e.charCodeAt(0)===65279?e.slice(1):e}function ze(e,t){return!e||!t?e||t||"":(e.endsWith("/")&&(e=e.substring(0,e.length-1)),t[0]!=="/"&&(t="/"+t),e+t)}function wo(e){return e[0]==="/"?e.slice(1):e}function un(e,t){if(e===t)return"/";let n=Me(t);return e.startsWith(n)?e.slice(n.length-1):e}function wp(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function jg(e){return new Function(`
|
|
67
|
-
var console, exports, global, module, process, require
|
|
68
|
-
return (
|
|
69
|
-
${e}
|
|
70
|
-
)
|
|
71
|
-
`)()}function Eo(e){let t=e.split("/");return t[0][0]==="@"?t[1]?`${t[0]}/${t[1]}`:null:t[0]}function Qg(e){return e[0]==="@"?e.split("/")[1]:e}var cI=/[-/\\^$*+?.()|[\]{}]/g;function vo(e){return e.replace(cI,"\\$&")}function uI(e="install"){let t=process.env.npm_config_user_agent?.split(" ")[0].split("/")[0]||"npm";switch(e){case"install":return t==="npm"?"npm install":`${t} add`;case"uninstall":return t==="npm"?"npm uninstall":`${t} remove`;case"update":return t==="yarn"?"yarn upgrade":`${t} update`;default:throw new TypeError(`Unknown command type: ${e}`)}}function Ug(e){return"pluginContainer"in e}function tl(){let e;return{async run(t){let n=t(),r=Promise.all([e,n]);e=r;let[,s]=await r;return e===r&&(e=void 0),s}}}function Hg(e){let t={};for(let n of Object.keys(e).sort())t[n]=e[n];return t}function Tt(e){if(e.startsWith("data:"))return e;let t=he(e),n=t!==e?e.slice(t.length):"";return encodeURI(t)+n}function Lt(e){if(e.startsWith("data:"))return e;let t=he(e),n=t!==e?e.slice(t.length):"";return t.replaceAll("%","%25")+n}function Ni(e){try{return decodeURI(e)}catch{return}}var ts=new Set,Li=async(e,t)=>{await Promise.all([...ts].map(n=>n(e,t)))},fI=e=>{ts.size===0&&(process.once("SIGTERM",Li),process.env.CI!=="true"&&process.stdin.on("end",Li)),ts.add(e)},dI=e=>{ts.delete(e),ts.size===0&&(process.off("SIGTERM",Li),process.env.CI!=="true"&&process.stdin.off("end",Li))};function pI(e,t){if(typeof t=="string"){let n=[...e?.local??[],...e?.network??[]].find(r=>r.includes(t));if(n)return n}return e?.local[0]??e?.network[0]}var Sr=0;function Wt(){let e=Date.now();return e>Sr?(Sr=e,Sr):(Sr++,Sr)}function Wg(e){let n="",r=!1;for(let s=0;s<e.length;s++){let i=e[s];if(n==="")n=i;else if(n.length+2+i.length<500)n+=", "+i;else{n+=` and ${e.length-s} more`,r=!0;break}}return{formatted:n,truncated:r}}var Gg=/[\r\n\u2028\u2029]$/,hI=/^#![^\r\n\u2028\u2029]*(?:\r\n|[\r\n\u2028\u2029])?/;function ys(e){return hI.exec(e)?.[0].length??0}async function Ep(e){let t=[];for(let n of e.getTopLevelConfig().plugins){if(n.applyToEnvironment){let r=await n.applyToEnvironment(e);if(!r)continue;if(r!==!0){t.push(...(await Ht(He(r))).filter(Boolean));continue}}t.push(n)}return t}function As(e,t){return{name:e,applyToEnvironment:t}}var Lr={silent:0,error:1,warn:2,info:3},vp,_p,nl=0;function mI(){let e=process.stdout.rows-2,t=e>0?`
|
|
72
|
-
`.repeat(e):"";console.log(t),Hl.cursorTo(process.stdout,0,0),Hl.clearScreenDown(process.stdout)}var bp;function gI(){return bp??=new Intl.DateTimeFormat(void 0,{hour:"numeric",minute:"numeric",second:"numeric"}),bp}function _o(e="info",t={}){if(t.customLogger)return t.customLogger;let n=new WeakSet,{prefix:r="[vite]",allowClearScreen:s=!0,console:i=globalThis.console}=t,a=Lr[e],o=s&&process.stdout.isTTY&&!process.env.CI,l=o?mI:()=>{};function c(p,h,y={}){if(y.timestamp){let m="";p==="info"?m=j.default.cyan(j.default.bold(r)):p==="warn"?m=j.default.yellow(j.default.bold(r)):m=j.default.red(j.default.bold(r));let w=y.environment?y.environment+" ":"";return`${j.default.dim(gI().format(new Date))} ${m} ${w}${h}`}else return h}function u(p,h,y={}){if(a>=Lr[p]){let m=p==="info"?"log":p;y.error&&n.add(y.error),o?p===vp&&h===_p?(nl++,l(),i[m](c(p,h,y),j.default.yellow(`(x${nl+1})`))):(nl=0,_p=h,vp=p,y.clear&&l(),i[m](c(p,h,y))):i[m](c(p,h,y))}}let f=new Set,d={hasWarned:!1,info(p,h){u("info",p,h)},warn(p,h){d.hasWarned=!0,u("warn",p,h)},warnOnce(p,h){f.has(p)||(d.hasWarned=!0,u("warn",p,h),f.add(p))},error(p,h){d.hasWarned=!0,u("error",p,h)},clearScreen(p){a>=Lr[p]&&l()},hasErrorLogged(p){return n.has(p)}};return d}var yI=20;function AI(e,t,n){let r=i=>j.default.cyan(i.replace(/:(\d+)\//,(a,o)=>`:${j.default.bold(o)}/`));for(let i of e.local)n(` ${j.default.green("\u279C")} ${j.default.bold("Local")}: ${r(i)}`);let s=Math.max(...e.network.map(i=>i.length),0);e.network.forEach((i,a)=>{let o=e.networkInterfaceNames?.[a],l="";if(o){let c=o.length>yI?`${o.slice(0,19)}\u2026`:o;l=" ".repeat(s-i.length+2)+j.default.dim(c)}n(` ${j.default.green("\u279C")} ${j.default.bold("Network")}: ${r(i)}${l}`)}),e.network.length===0&&t===void 0&&n(j.default.dim(` ${j.default.green("\u279C")} ${j.default.bold("Network")}: use `)+j.default.bold("--host")+j.default.dim(" to expose"))}function wI(e){return As("native:reporter",t=>{let n=process.stdout.isTTY&&!process.env.CI,r=Lr[e.logLevel||"info"]>=Lr.info,s=L.join(t.config.build.assetsDir,"/");return Ko({root:t.config.root,isTty:!!n,isLib:!!t.config.build.lib,assetsDir:s,chunkLimit:t.config.build.chunkSizeWarningLimit,logInfo:r?i=>t.logger.info(i):void 0,reportCompressedSize:t.config.build.reportCompressedSize,warnLargeChunks:t.config.build.minify&&!t.config.build.lib&&t.config.consumer==="client"})})}var EI=Re("vite:esbuild"),vI=/(?:const|var)\s+\S+\s*=\s*\(?function\([^()]*\)\s*\{\s*"use strict";/,_I=/\.\w+$/,bI={"dynamic-import":!0,"import-meta":!0},Sp,SI=()=>(Sp||=import("./main-BEZFE5MG.js"),Sp),xp=!1,xI=()=>{xp||(xp=!0,console.warn(j.default.yellow("`transformWithEsbuild` is deprecated and will be removed in the future. Please migrate to `transformWithOxc`.")))};async function CI(e,t,n,r,s,i,a=!1){let o=n?.loader;if(!o){let f=L.extname(_I.test(t)?t:he(t)).slice(1);f==="cjs"||f==="mjs"?o="js":f==="cts"||f==="mts"?o="ts":o=f}let l=n?.tsconfigRaw;if(typeof l!="string"){let f=["alwaysStrict","experimentalDecorators","importsNotUsedAsValues","jsx","jsxFactory","jsxFragmentFactory","jsxImportSource","preserveValueImports","target","useDefineForClassFields","verbatimModuleSyntax"],d={};if(o==="ts"||o==="tsx"){let h=na(t,Kc(s));if(h){let{tsconfig:y,tsconfigFilePaths:m}=h;if(i&&s)for(let A of m)zn(i,A,s.root);let w=y.compilerOptions??{};for(let A of f)A in w&&(d[A]=w[A])}}let p={...d,...l?.compilerOptions};p.useDefineForClassFields===void 0&&p.target===void 0&&(p.useDefineForClassFields=!1),n&&(n.jsx&&(p.jsx=void 0),n.jsxFactory&&(p.jsxFactory=void 0),n.jsxFragment&&(p.jsxFragmentFactory=void 0),n.jsxImportSource&&(p.jsxImportSource=void 0)),l={...l,compilerOptions:p}}let c={sourcemap:!0,sourcefile:t,...n,loader:o,tsconfigRaw:l};delete c.include,delete c.exclude,delete c.jsxInject;let u;try{u=(await SI()).transform}catch(f){throw new Error("Failed to load `transformWithEsbuild`. It is deprecated and it now requires esbuild to be installed separately. If you are a package author, please migrate to `transformWithOxc` instead.",{cause:f})}a||xI();try{let f=await u(e,c),d;if(r&&c.sourcemap){let p=JSON.parse(f.map);p.sourcesContent=[],d=ms(t,[p,r])}else d=c.sourcemap&&c.sourcemap!=="inline"?JSON.parse(f.map):{mappings:""};return{...f,map:d}}catch(f){throw EI?.("esbuild error with options used: ",c),f.errors&&(f.frame="",f.errors.forEach(d=>{(d.text==="Experimental decorators are not currently enabled"||d.text==="Parameter decorators only work when experimental decorators are enabled")&&(d.text+='. Vite 5 now uses esbuild 0.18 and you need to enable them by adding "experimentalDecorators": true in your "tsconfig.json" file.'),f.frame+=`
|
|
73
|
-
`+OI(d,e)}),f.loc=f.errors[0].location),f}}var II={es:"esm",cjs:"cjs",iife:void 0},RI=(e,t)=>{let n=t==="iife"?Math.max(e.search(vI),0):t==="umd"?e.indexOf("(function("):0;if(n>0){let r=e.slice(0,n);return e.slice(n).replace('"use strict";',s=>s+r)}return e},kI=()=>({name:"vite:esbuild-transpile",applyToEnvironment(e){return e.config.esbuild!==!1},async renderChunk(e,t,n){if(this.environment.config.isOutputOptionsForLegacyChunks?.(n))return null;let r=this.environment.config,s=TI(r,n.format);if(!s)return null;let i=await CI(e,t.fileName,s,void 0,r,void 0,!0);return r.build.lib&&(i.code=RI(i.code,n.format)),i}});function TI(e,t){let n=e.build.target,r=e.build.minify==="esbuild";if((!n||n==="esnext")&&!r)return null;let s=e.build.lib&&t==="es",i=e.esbuild||{},a={...i,loader:"js",target:n||void 0,format:II[t],supported:{...bI,...i.supported}};return r?a.minifyIdentifiers!=null||a.minifySyntax!=null||a.minifyWhitespace!=null?s?{...a,minify:!1,minifyIdentifiers:a.minifyIdentifiers??!0,minifySyntax:a.minifySyntax??!0,minifyWhitespace:!1,treeShaking:!0}:{...a,minify:!1,minifyIdentifiers:a.minifyIdentifiers??!0,minifySyntax:a.minifySyntax??!0,minifyWhitespace:a.minifyWhitespace??!0,treeShaking:!0}:s?{...a,minify:!1,minifyIdentifiers:!0,minifySyntax:!0,minifyWhitespace:!1,treeShaking:!0}:{...a,minify:!0,treeShaking:!0}:{...a,minify:!1,minifyIdentifiers:!1,minifySyntax:!1,minifyWhitespace:!1,treeShaking:!1}}function OI(e,t){let n=j.default.yellow(e.text);return e.location&&(n+=`
|
|
74
|
-
`+Ue(t,e.location)),n+`
|
|
75
|
-
`}var BI,Cp=new WeakMap;function Kc(e){if(!e)return BI??=new lr;let t=Cp.get(e);return t||(t=new lr,Cp.set(e,t)),t}function Ip(e,t){if(t.endsWith(".json")){let n=Kc(e.config);if(t.endsWith("/tsconfig.json")){e.config.logger.info(`changed tsconfig file detected: ${t} - Clearing cache and forcing full-reload to ensure TypeScript is compiled with updated config values.`,{clear:e.config.clearScreen,timestamp:!0});for(let r of Object.values(e.environments))r.moduleGraph.invalidateAll();n.clear();for(let r of Object.values(e.environments))r.hot.send({type:"full-reload",path:"*"})}}}var $I=async function(){}.constructor,MI=e=>`data:application/javascript,${encodeURIComponent(e+`
|
|
76
|
-
//# sourceURL=[worker-eval(artichokie)]`)}`,zg="__vite_ssr_dynamic_import__",Jg="\u{1D422}\u{1D426}\u{1D429}\u{1D428}\u{1D42B}\u{1D42D}",DI=class{_isModule;_code;_parentFunctions;_max;_pool;_idlePool;_queue;constructor(e,t={}){this._isModule=t.type==="module",this._code=NI(e,this._isModule,5e3,t.parentFunctions??{}),this._parentFunctions=t.parentFunctions??{};let n=Math.max(1,(zr.availableParallelism?.()??zr.cpus().length)-1);this._max=t.max||n,this._pool=[],this._idlePool=[],this._queue=[]}async run(...e){let t=await this._getAvailableWorker();return new Promise((n,r)=>{t.currentResolve=n,t.currentReject=r,t.postMessage({args:e})})}stop(){this._pool.forEach(e=>e.unref()),this._queue.forEach(([,e])=>e(new Error("Main worker pool stopped before a worker was available."))),this._pool=[],this._idlePool=[],this._queue=[]}_createWorker(e,t,n){let r={workerData:[e,t,n],transferList:[e,t]};return this._isModule?new Qd(new URL(MI(this._code)),r):new Qd(this._code,{...r,eval:!0})}async _getAvailableWorker(){if(this._idlePool.length)return this._idlePool.shift();if(this._pool.length<this._max){let r=PI(this._parentFunctions),s=this._createWorker(r.workerPorts.sync,r.workerPorts.async,r.lockState);return s.on("message",async i=>{"result"in i?(s.currentResolve?.(i.result),s.currentResolve=null):(i.error instanceof ReferenceError&&(i.error.message+=". Maybe you forgot to pass the function to parentFunction?"),s.currentReject?.(i.error),s.currentReject=null),this._assignDoneWorker(s)}),s.on("error",i=>{s.currentReject?.(i),s.currentReject=null,r.close()}),s.on("exit",i=>{let a=this._pool.indexOf(s);a>-1&&this._pool.splice(a,1),i!==0&&s.currentReject&&(s.currentReject(new Error(`Worker stopped with non-0 exit code ${i}`)),s.currentReject=null,r.close())}),this._pool.push(s),s}let e,t,n=new Promise((r,s)=>{e=r,t=s});return this._queue.push([e,t]),n}_assignDoneWorker(e){if(this._queue.length){let[t]=this._queue.shift();t(e);return}this._idlePool.push(e)}};function PI(e){let t=new Int32Array(new SharedArrayBuffer(4)),n=()=>{Atomics.store(t,0,0),Atomics.notify(t,0)},r=new Ul,s=new Ul,i=r.port1,a=s.port1,o=l=>{i.postMessage(l),n()};return i.on("message",async l=>{let c;try{c=e[l.name](...l.args)}catch(u){o({id:l.id,error:u});return}if(!(typeof c=="object"&&c!==null&&"then"in c&&typeof c.then=="function")){o({id:l.id,result:c});return}o({id:l.id,isAsync:!0});try{let u=await c;a.postMessage({id:l.id,result:u})}catch(u){a.postMessage({id:l.id,error:u})}}),i.unref(),{close:()=>{i.close(),a.close()},lockState:t,workerPorts:{sync:r.port2,async:s.port2}}}function NI(e,t,n,r){let s=(o,l)=>({lock:()=>{Atomics.store(l,0,1)},waitUnlock:()=>{let c;for(;;){let u=Atomics.wait(l,0,1,n);if(u==="timed-out"){if(c===void 0){c=o.eventLoopUtilization();continue}if(c=o.eventLoopUtilization(c),c.utilization>.9)continue;throw new Error(u)}break}}}),i=(o,l,c,u)=>{let f=0,d=new Map,p=h=>(...y)=>{f++,u.lock(),o.postMessage({id:f,name:h,args:y}),u.waitUnlock();let m;for(let A=0;A<10&&(m=c(o),m===void 0);A++);if(m===void 0)throw new Error("Failed to receive message from sync port after 10 attempts");let w=m.message;if(w.isAsync){let A,g,E=new Promise((v,S)=>{A=v,g=S});return d.set(f,{resolve:A,reject:g}),E}if("error"in w)throw w.error;return w.result};return l.on("message",h=>{let y=h.id;if(d.has(y)){let{resolve:m,reject:w}=d.get(y);d.delete(y),"result"in h?m(h.result):w(h.error)}}),{call:p}},a=e.toString().replaceAll(Jg,"import").replaceAll(zg,"import");return`
|
|
77
|
-
${t?"import { parentPort, receiveMessageOnPort, workerData } from 'worker_threads'":"const { parentPort, receiveMessageOnPort, workerData } = require('worker_threads')"}
|
|
78
|
-
${t?"import { performance } from 'node:perf_hooks'":"const { performance } = require('node:perf_hooks')"}
|
|
79
|
-
const [parentFunctionSyncMessagePort, parentFunctionAsyncMessagePort, lockState] = workerData
|
|
80
|
-
const waitTimeout = ${n}
|
|
81
|
-
const createLock = ${s.toString()}
|
|
82
|
-
const parentFunctionRequester = (${i.toString()})(
|
|
83
|
-
parentFunctionSyncMessagePort,
|
|
84
|
-
parentFunctionAsyncMessagePort,
|
|
85
|
-
receiveMessageOnPort,
|
|
86
|
-
createLock(performance, lockState)
|
|
87
|
-
)
|
|
88
|
-
|
|
89
|
-
const doWorkPromise = (async () => {
|
|
90
|
-
${Object.keys(r).map(o=>`const ${o} = parentFunctionRequester.call(${JSON.stringify(o)});`).join(`
|
|
91
|
-
`)}
|
|
92
|
-
return await (${a})()
|
|
93
|
-
})()
|
|
94
|
-
let doWork
|
|
95
|
-
|
|
96
|
-
parentPort.on('message', async (args) => {
|
|
97
|
-
doWork ||= await doWorkPromise
|
|
98
|
-
|
|
99
|
-
try {
|
|
100
|
-
const res = await doWork(...args.args)
|
|
101
|
-
parentPort.postMessage({ result: res })
|
|
102
|
-
} catch (e) {
|
|
103
|
-
parentPort.postMessage({ error: e })
|
|
104
|
-
}
|
|
105
|
-
})
|
|
106
|
-
`}var LI=/\bimport\s*\(/g,qs="__artichokie_local_import__",FI=class{_fn;constructor(e,t={}){let n=t.type!=="module",r=jI(e,n,t.parentFunctions??{}),s=a=>import(a),i=[...n?[Zn(import.meta.url)]:[],s,t.parentFunctions];this._fn=new $I(...r)(...i)}async run(...e){try{return await(await this._fn)(...e)}catch(t){throw t instanceof ReferenceError&&(t.message+=". Maybe you forgot to pass the function to parentFunction?"),t}}stop(){}};function jI(e,t,n){let r=e.toString().replace(LI,`${qs}(`).replaceAll(Jg,qs).replaceAll(zg,qs);return[...t?["require"]:[],qs,"parentFunctions",`
|
|
107
|
-
${Object.keys(n).map(s=>`const ${s} = parentFunctions[${JSON.stringify(s)}];`).join(`
|
|
108
|
-
`)}
|
|
109
|
-
return await (${r})()
|
|
110
|
-
`]}var Vc=class{_disableReal;_realWorker;_fakeWorker;_shouldUseFake;constructor(e,t){this._disableReal=t.max!==void 0&&t.max<=0,this._realWorker=new DI(e,t),this._fakeWorker=new FI(e,t),this._shouldUseFake=t.shouldUseFake}async run(...e){let t=this._disableReal||this._shouldUseFake(...e);return this[t?"_fakeWorker":"_realWorker"].run(...e)}stop(){this._realWorker.stop(),this._fakeWorker.stop()}};function Rp(e,t,n){throw new Error(n?`No known conditions for "${t}" specifier in "${e}" package`:`Missing "${t}" specifier in "${e}" package`)}function Kg(e,t,n,r){let s,i,a=QI(e,n),o=(function(c){let u=new Set(["default",...c.conditions||[]]);return c.unsafe||u.add(c.require?"require":"import"),c.unsafe||u.add(c.browser?"browser":"node"),u})(r||{}),l=t[a];if(l===void 0){let c,u,f,d;for(d in t)u&&d.length<u.length||(d[d.length-1]==="/"&&a.startsWith(d)?(i=a.substring(d.length),u=d):d.length>1&&(f=d.indexOf("*",1),~f&&(c=RegExp("^"+d.substring(0,f)+"(.*)"+d.substring(1+f)+"$").exec(a),c&&c[1]&&(i=c[1],u=d))));l=t[u]}return l||Rp(e,a),s=nc(l,o),s||Rp(e,a,1),i&&(function(c,u){let f,d=0,p=c.length,h=/[*]/g,y=/[/]$/;for(;d<p;d++)c[d]=h.test(f=c[d])?f.replace(h,u):y.test(f)?f+u:f})(s,i),s}function QI(e,t,n){if(e===t||t===".")return".";let r=e+"/",s=r.length,i=t.slice(0,s)===r,a=i?t.slice(s):t;return a[0]==="#"?a:i||!n?a.slice(0,2)==="./"?a:"./"+a:a}function nc(e,t,n){if(e){if(typeof e=="string")return n&&n.add(e),[e];let r,s;if(Array.isArray(e)){for(s=n||new Set,r=0;r<e.length;r++)nc(e[r],t,s);if(!n&&s.size)return[...s]}else for(r in e)if(t.has(r))return nc(e[r],t,n)}}function UI(e,t,n){let r,s=e.exports;if(s){if(typeof s=="string")s={".":s};else for(r in s){r[0]!=="."&&(s={".":s});break}return Kg(e.name,s,t||".",n)}}function HI(e,t,n){if(e.imports)return Kg(e.name,e.imports,t,n)}(function(e){return e[e.Static=1]="Static",e[e.Dynamic=2]="Dynamic",e[e.ImportMeta=3]="ImportMeta",e[e.StaticSourcePhase=4]="StaticSourcePhase",e[e.DynamicSourcePhase=5]="DynamicSourcePhase",e[e.StaticDeferPhase=6]="StaticDeferPhase",e[e.DynamicDeferPhase=7]="DynamicDeferPhase",e})({});var WI=new Uint8Array(new Uint16Array([1]).buffer)[0]===1;function wt(e,t="@"){if(!xe)return vn.then(()=>wt(e));let n=e.length+1,r=(xe.__heap_base.value||xe.__heap_base)+4*n-xe.memory.buffer.byteLength;r>0&&xe.memory.grow(Math.ceil(r/65536));let s=xe.sa(n-1);if(typeof Buffer<"u"?Buffer.from(xe.memory.buffer,s,2*(n-1)).write(e,"utf16le"):(WI?zI:GI)(e,new Uint16Array(xe.memory.buffer,s,n)),!xe.parse())throw Object.assign(new Error(`Parse error ${t}:${e.slice(0,xe.e()).split(`
|
|
111
|
-
`).length}:${xe.e()-e.lastIndexOf(`
|
|
112
|
-
`,xe.e()-1)}`),{idx:xe.e()});let i=[],a=[];for(;xe.ri();){let c=xe.is(),u=xe.ie(),f=xe.it(),d=xe.ai(),p=xe.id(),h=xe.ss(),y=xe.se(),m;xe.ip()&&(m=o(e.slice(p===-1?c-1:c,p===-1?u+1:u)));let w=null;for(w=[],xe.rsa();xe.ra();){let A=xe.aks(),g=xe.ake(),E=xe.avs(),v=xe.ave();w.push([l(e.slice(A,g)),l(e.slice(E,v))])}w.length===0&&(w=null),i.push({n:m,t:f,s:c,e:u,ss:h,se:y,d:p,a:d,at:w})}for(;xe.re();){let c=xe.es(),u=xe.ee(),f=xe.els(),d=xe.ele(),p=f<0?void 0:l(e.slice(f,d)),h=l(e.slice(c,u));a.push({s:c,e:u,ls:f,le:d,ss:xe.ess(),n:h,ln:p})}function o(c){try{return(0,eval)(c)}catch{}}function l(c){if(!c)return c;let u=c[0];return(u==='"'||u==="'")&&o(c)||c}return[i,a,!!xe.f(),!!xe.ms()]}function GI(e,t){let n=e.length,r=0;for(;r<n;){let s=e.charCodeAt(r);t[r++]=(255&s)<<8|s>>>8}}function zI(e,t){let n=e.length,r=0;for(;r<n;)t[r]=e.charCodeAt(r++)}var xe,JI=()=>{return e="AGFzbQEAAAABKwhgAAF/YAF/AX9gAABgAn9/AX9gBH9/f38AYAN/f38Bf2ABfwBgA39/fwADPj0CAgEEBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgABBQICAgYBAQYBAQEFAQEBAQECAgIBAQEDAQEHAQMDBAUBcAECAgUHAQGCAoCAAgYPAn8BQaCLBAt/AEGgiwQLB80BHgZtZW1vcnkCAAJzYQACAWUABQJpcwAGAmllAAcCc3MACAJzZQAJAml0AAoCYWkACwJpZAAMAmlwAA0CZXMADgJlZQAPA2VscwAQA2VsZQARA2VzcwASAnJpABMCcmUAFAFmABUCbXMAFgJyYQAXA2FrcwAYA2FrZQAZA2F2cwAaA2F2ZQAbA3JzYQAcBXBhcnNlAB0LX19oZWFwX2Jhc2UDAQtfaW5pdGlhbGl6ZQABGV9faW5kaXJlY3RfZnVuY3Rpb25fdGFibGUBAAkHAQBBAQsBAAwBAQrcVD0oAEHYCkGAwAA2AgBB0ApBoIsENgIAQbgKQSo2AgBB1ApBgIAENgIACwQAEAALWQBB6AkgADYCACAAQQF0IgBBADsBoIsEQewJIABBoosEajYCAEHECUEANgIAQdQJQQA2AgBBzAlBADYCAEHICUEANgIAQdwJQQA2AgBB0AlBADYCAEGgiwQLuAEBAn9B7AlB7AkoAgAiBEEoajYCAAJAQdQJKAIAIgVFBEBBxAkgBDYCAAwBCyAFIAQ2AiQLQdQJIAQ2AgBB2AkgBTYCACAEIAA2AgggBEIANwIgIAQgA0EBRiIAOgAYIAQgAzYCFCAEQQA2AhAgBCACNgIEIAQgATYCACAEQQNBAUECIAAbIANBAkYiARs2AhwgBCACIAJBAmpBACAAGyABGzYCDCADQQFrQQFNBEBB8AlBAToAAAsLdwECf0HsCUHsCSgCACIEQRhqNgIAAkBB3AkoAgAiBUUEQEHICSAENgIADAELIAUgBDYCFAtB3AkgBDYCACAEIAM2AgwgBCACNgIIIAQgATYCBCAEIAA2AgBB4AkoAgAhACAEQQA2AhQgBCAANgIQQfAJQQE6AAALCABB9AkoAgALEwBBzAkoAgAoAgBBoIsEa0EBdQscAQF/QcwJKAIAKAIEIgBBoIsEa0EBdUF/IAAbCxMAQcwJKAIAKAIIQaCLBGtBAXULHAEBf0HMCSgCACgCDCIAQaCLBGtBAXVBfyAAGwsLAEHMCSgCACgCHAscAQF/QcwJKAIAKAIQIgBBoIsEa0EBdUF/IAAbCzUBAn9BfyEAAkACQAJAQcwJKAIAKAIUIgFBAWsOAgIBAAsgAUGgiwRrQQF1DwtBfiEACyAACwsAQcwJKAIALQAYCxMAQdAJKAIAKAIAQaCLBGtBAXULEwBB0AkoAgAoAgRBoIsEa0EBdQscAQF/QdAJKAIAKAIIIgBBoIsEa0EBdUF/IAAbCxwBAX9B0AkoAgAoAgwiAEGgiwRrQQF1QX8gABsLEwBB0AkoAgAoAhBBoIsEa0EBdQslAQF/QcwJQcwJKAIAIgBBJGpBxAkgABsoAgAiADYCACAAQQBHCyUBAX9B0AlB0AkoAgAiAEEUakHICSAAGygCACIANgIAIABBAEcLCABB+AktAAALCABB8AktAAALKwEBf0H8CUH8CSgCACIAQRBqQcwJKAIAQSBqIAAbKAIAIgA2AgAgAEEARwsTAEH8CSgCACgCAEGgiwRrQQF1CxMAQfwJKAIAKAIEQaCLBGtBAXULEwBB/AkoAgAoAghBoIsEa0EBdQsTAEH8CSgCACgCDEGgiwRrQQF1CwoAQfwJQQA2AgALow4BBn8jAEGA0ABrIgQkAEH4CUEBOgAAQYAIIQBBhApBgAg2AgBBnApBnosEIgFB6AkoAgBBAXRqIgU2AgBB8AlBADoAAEGACkEAOwEAQYIKQQA7AQBBiApBADoAAEH0CUEANgIAQeQJQQA6AABBjAogBEGAEGo2AgBBkAogBDYCAEGUCkEAOgAAA0AgACECQZgKIAFBAmoiADYCAAJAAkACfwJAAkAgASAFSQRAIAAvAQAiA0EJa0EFSQ0EAkACQAJAAkACQCADQeUAaw4FAQYGBgIACyADQSBGDQggA0EvRg0DIANBO0YNAgwFC0GCCi8BAA0BIAAQHkUNASABQQRqQYIIQQoQHw0BECBBmAooAgAhAEH4CS0AAA0BQYQKIAA2AgAgACICIQEMBQsgAS8BBEHtAEcNACAAEB5FDQAgASkABkLwgLyDoI6AOlINABAhQZgKKAIAIQALQYQKIAA2AgAMBgsgAS8BBCIAQSpHBEAgAEEvRw0CECIMBQtBARAjDAQLIAAhAUEAQeQJLQAADQIaDAELQfgJQQA6AAALA0ACQEGYCiABQQJqIgA2AgACQAJAAkAgASAFSQRAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIAAvAQAiA0Egaw4QDw4IDg4ODggBBQ4OBA4OCQALAkACQAJAAkAgA0HbAGsODwURBhERDRERAxEBERERAgALIANBCWtBBUkNESADQfsAaw4DCBAJEAtBggovAQANDyAAEB5FDQ8gAUEEakGCCEEKEB8NDxAgDA8LIAEvAQRB7QBHDQ4gABAeRQ0OIAEpAAZC8IC8g6COgDpSDQ4QIQwOCyABLwEEQewARw0NIAAQHkUNDSABQQZqQbIIQQYQHw0NIAEvAQwQJEUNDUGUCkEBOgAADA0LQYIKQYIKLwEAIgBBAWo7AQAgBEGAEGogAEEDdGoiAEEBNgIAIAAgAjYCBAwMC0GCCkGCCi8BACIAQQFqOwEAIARBgBBqIABBA3RqIgBBCDYCACAAIAI2AgQMCwtBggovAQAiAEUNDEGCCiAAQQFrOwEADAoLQYAKLwEAIgBFDQlBggovAQAiA0UNCSADQQN0IARqQfgPaigCAEEFRw0JIAQgAEECdGpBBGsoAgAiACgCBA0JIAAgAkECajYCBEGYCiABQQRqNgIAQQEQJRogAEGYCigCACIANgIQQZgKIABBAms2AgAMCQtBggovAQAiAEUNCkGCCiAAQQFrIgM7AQBBgAovAQAiAEUNCCAEQYAQaiADQf//A3FBA3RqKAIAQQVHDQggBCAAQQJ0akEEaygCACIDKAIERQRAIAMgAkECajYCBAsgAyABQQRqNgIMQYAKIABBAWs7AQAMCAsCQCACLwEAQSlHDQBB1AkoAgAiAEUNACAAKAIMIAJBAmpHDQBB1AlB2AkoAgAiADYCACAABEAgAEEANgIkDAELQcQJQQA2AgALQYIKQYIKLwEAIgBBAWo7AQAgBEGAEGogAEEDdGoiAEEGQQJBlAotAAAbNgIAIAAgAjYCBEGUCkEAOgAADAcLQYIKLwEAIgBFDQhBggogAEEBayIAOwEAIARBgBBqIABB//8DcUEDdGooAgBBBEYNAwwGCyADECYMBQsCQCABLwEEIgBBKkcEQCAAQS9HDQEQIgwHC0EBECMMBgsCQCACLwEAIgEQJwRAAkACQAJAIAFBK2sOBAEIAgAICyACQQJrLwEAQTBrQf//A3FBCkkNAwwHCyACQQJrLwEAQStGDQIMBgsgAkECay8BAEEtRg0BDAULIAFBKUcNACAEQYAQakGCCi8BAEEDdGooAgQQKA0ECwJAAkBBggovAQAiAEUgAUHmAEdyDQAgBEGAEGogAEEDdGoiA0EIaygCAEEBRw0AIAJBAmsvAQBB7wBHDQEgAkEEaxApRQ0BIANBBGsoAgBBnglBAxAqRQ0BDAULIAFB/QBHDQAgBEGAEGogAEEDdGoiACgCBBArDQQgACgCAEEGRg0ECyACECwNA0GICi0AACABQS9GcSABQQBHc0UNAwJAQdwJKAIAIgBFDQAgAiAAKAIASQ0AIAIgACgCBE0NBAsDQCACQaCLBEsEQEGECiACQQJrIgI2AgAgAi8BACIBEC1FDQELCyABQf//A3EQLgRAA0AgAkGgiwRLBEBBhAogAkECayICNgIAIAIvAQAQLg0BCwsgAhAvDQQLQYgKQQE6AAAMBAtBggpBggovAQAiAEEBajsBACAEQYAQaiAAQQN0aiIAIAI2AgQgAEEDNgIACxAwDAILQYAKLwEARUGCCi8BAEVB5AktAABBf3NxcQwFCxAxQYgKQQA6AAALQYQKQZgKKAIAIgI2AgALQZgKKAIAIQEMAQsLEDJBAAshAyAEQYDQAGokACADDwsgAiEAC0GYCigCACEBDAALAAsWACAAQaCLBEYEQEEBDwsgAEECaxAzC0MBA38CQCACRQ0AA0AgAC0AACIEIAEtAAAiBUYEQCABQQFqIQEgAEEBaiEAIAJBAWsiAg0BDAILCyAEIAVrIQMLIAML0ggBBX9BmApBmAooAgAiBEEMaiIBNgIAQdwJKAIAIQNBARAlIQICQAJAAkACQAJAAkAgAUGYCigCACIARgRAIAIQNEUNAQtB4AkgBDYCAAJAAkACQCACQSpHBEAgAkH7AEcNAUGYCiAAQQJqNgIAQQEQJSECQZwKKAIAIQFBmAooAgAhAANAAkAgAkH//wNxIgJBIkYgAkEnRnJFBEAgAhA1GkGYCigCACECDAELIAIQJkGYCkGYCigCAEECaiICNgIAC0EBECUaIAAgAhA2IgJBLEYEQEGYCkGYCigCAEECajYCAEEBECUhAgsgAkH9AEYNAyAAQZgKKAIAIgBGDQggACABTQ0ACwwHC0GYCiAAQQJqNgIAQQEQJRpBmAooAgAiACAAEDYaDAILQfgJQQA6AAACQAJAAkACQAJAAkAgAkHhAGsODAIIBAEIAwgICAgIBQALIAJB9gBGDQQMBwtBmAogAEEOaiIENgIAAkACQAJAAkBBARAlQeEAaw4GAAwCDAwBDAtBmAooAgAiASkAAkLzgOSD4I3AMVINCyABLwEKEC5FDQtBmAogAUEKajYCAEEAECUaC0GYCigCACIDQQJqQaIIQQ4QHw0KAkAgAy8BECIBECQNACABQShrDgMACwALC0GYCiADQRBqNgIAQQEQJSIBQSpGBEBBmApBmAooAgBBAmo2AgBBARAlIQELIAFBKEcNAQwKC0GYCigCACIDKQACQuyAhIOwjsA5Ug0JIAMvAQoiARAkRSABQfsAR3ENCUGYCiADQQpqNgIAQQEQJSIBQfsARg0JC0GYCigCACEDIAEQNRpBmAooAgAiASADTQ0IIAAgBCADIAEQBAwKC0GYCiAAQQpqNgIAQQAQJRpBmAooAgAhAAtBmAogAEEQajYCAEEBECUiAEEqRgRAQZgKQZgKKAIAQQJqNgIAQQEQJSEACwwJCwJAIAApAAJC7ICEg7COwDlSDQAgAC8BChAtRQ0AQZgKIABBCmo2AgBBARAlIQAMCQsgAEEEaiEAC0GYCiAAQQZqNgIAQZwKKAIAIQMDQEEBECUhAEGYCigCACIBIANLDQcgABA3IQJBmAooAgAiACABRg0EIAJBPUYEQEEBEDghAkGYCigCACEACyACQSxHDQRBmAogAEECajYCAAwACwALQfAJQQE6AABBmApBmAooAgBBAmo2AgALQQEQJSEAQZgKKAIAIQECQCAAQeYARw0AIAFBAmpBnAhBBhAfDQBBmAogAUEIajYCACAEQQEQJUEAEDkgA0EUakHICSADGyECA0AgAigCACIARQ0CIABCADcCCCAAQRRqIQIMAAsAC0GYCiABQQJrNgIACw8LIAAhAQwCCyAAIARBAEEAEARBmAogAEEMajYCAA8LEDIPC0GYCiABQQJrNgIADwtBmAooAgAhASAAEDUaIAFBmAooAgAiACABIAAQBEGYCiAAQQJrNgIAC4oLAQp/QZgKQZgKKAIAIgZBDGoiCTYCAEEBECUhAEGYCigCACECAkACQAJAAkACQAJAAn8gAEEuRgRAQZgKIAJBAmo2AgBBARAlIgBB5ABHBEAgAEHzAEcEQCAAQe0ARw0HQZgKKAIAIgBBAmpBjAhBBhAfDQdBhAooAgAiARA6RQRAIAEvAQBBLkYNCAsgBiAGIABBCGpBAhADDwtBmAooAgAiAEECakGSCEEKEB8NBkGECigCACIBEDpFBEAgAS8BAEEuRg0HC0GYCiAAQQxqNgIAQQEhCEEFIQRBARAlIQBBAQwCC0GYCigCACIAKQACQuWAmIPQjIA5Ug0FQYQKKAIAIgEQOkUEQCABLwEAQS5GDQYLQZgKIABBCmo2AgBBByEEQQEhBUEBECUhAEEBIQhBAgwBCwJAAkAgAEHzAEcgAiAJTXJFBEBB8wAhACACQQJqQZIIQQoQHw0BIAIvAQwQJEUNAUGYCiACQQxqIgA2AgBBASEIQQEQJSEBIABBmAooAgAiBEcEQEHmACEAIAFB5gBHBEBBBSEEIAEhAEEBDAULQQEhAyAEQQJqQZwIQQYQHw0FIAQvAQgQLUUNBQtBmAogAjYCAEEHIQRBASEHQQAhCCABIQBBAAwDC0EHIQRBASEHIABB5ABHIAIgBkEKak1yDQFB5AAhACACKQACQuWAmIPQjIA5Ug0AIAIvAQoQJEUNAEGYCiACQQpqNgIAQSohAEEBIQVBAiEDQQEQJSIBQSpGDQRBmAogAjYCAEEAIQUgASEAQQAMAgsgAiEEDAILQQALIQMgAEEoRgRAQYwKKAIAQYIKLwEAIgVBA3RqIgBBBTYCAEGCCiAFQQFqOwEAIABBmAooAgAiAjYCBEGECigCAC8BAEEuRg0EQZgKIAJBAmo2AgBBARAlIQAgBkGYCigCACIBQQAgAhADQdQJKAIAIQMgCARAIAMgBDYCHAtBgApBgAovAQAiBEEBajsBAEGQCigCACAEQQJ0aiADNgIAAkAgAEEiRiAAQSdGckUEQAJAIABB4ABHDQBBnAooAgAhBiABIQADQCAAIgIgBk8NAQJAAkAgAEECaiIALwEAIgdB3ABrDgUAAgICBQELIAJBBGohAAwBCyAHQSRHDQAgAi8BBEH7AEcNAAsLQZgKIAFBAms2AgAPCyAAECZBmAooAgAhAAtBmAogAEECaiIANgIAAkACQAJAQQEQJUEpaw4EAQICAAILQZgKQZgKKAIAQQJqNgIAQQEQJRogAyAANgIEQZgKKAIAIQAgA0EBOgAYIAMgADYCEAwIC0GCCiAFOwEAIAMgADYCBEGYCigCACEAIANBAToAGCADIABBAmo2AgxBgAogBDsBAA8LQZgKQZgKKAIAQQJrNgIADwsgB0UgAEH7AEdyRQRAQZgKKAIAIQBBggovAQANBkGcCigCACEBA0ACQAJAIAAgAUkEQEEBECUiAEEiRiAAQSdGcg0BIABB/QBHDQJBmApBmAooAgBBAmo2AgALQQEQJSEBQZgKKAIAIQAgAUHmAEYEQCAAQQJqQZwIQQYQHw0HC0GYCiAAQQhqNgIAQQEQJSIAQSJHIABBJ0dxDQYgBiAAQQAQOQ8LIAAQJgtBmApBmAooAgBBAmoiADYCAAwACwALAkACQCAAQSdrDgQDAQEDAAsgAEEiRg0CC0GYCigCACEECyAEIAlHDQBBmAogBEECazYCAA8LIABBKkcgBXENAkGCCi8BAA0CQZgKKAIAIQBBnAooAgAhAgNAIAAgAk8NASAALwEAIgFBJ0cgAUEiR3EEQEGYCiAAQQJqIgA2AgAMAQUgBiABIAMQOQ8LAAsACxAyCw8LQZgKQZgKKAIAQQJrNgIADwtBmAogAEECazYCAAtDAQN/QZgKKAIAIQBBnAooAgAhAgNAAkAgAEECaiEBIAAgAk8NACABIQAgAS8BAEEKaw4EAAEBAAELC0GYCiABNgIAC3ABBH9BmAooAgBBAmohAUGcCigCACEEAkADQCABIgJBAmohASACIARPDQEgAS8BACEDAkAgAEUEQCADQSpGDQEgA0EKaw4EAwICAwILIANBKkcNAQsgAi8BBEEvRw0ACyACQQRqIQELQZgKIAE2AgALCwAgAEGfgIAEEDwLfQEEf0GcCigCACEDQZgKKAIAIQEDQAJAAkACQCABLwEAIgJBL0YEQCABLwECIgFBKkcEQCABQS9GDQJBLw8LIAAQIwwCCyAABEAgAhAkDQIMAwsgAhAuDQEMAgsQIgtBmApBmAooAgAiBEECaiIBNgIAIAMgBEsNAQsLIAILhgEBBH9BmAooAgAhAUGcCigCACEEAkADQAJAIAEiAkECaiEBIAIgBE8NACABLwEAIgMgAEYNAiADQdwARwRAIANBCmsOBAECAgECCyACQQRqIQEgAi8BBEENRw0BIAJBBmogASACLwEGQQpGGyEBDAELC0GYCiABNgIAEDIPC0GYCiABNgIAC24BAX8CQCAAQSlHIABBKGtB//8DcUEHSXEgAEEhayIBQQVNQQBBASABdEExcRtyRQRAIABBOmsiAUH//wNxQSVPQr+AgICgAiABrYinQQFxRXINAQtBAQ8LIABB/QBHIABB+wBrQf//A3FBBElxCy4BAX9BASEBAkAgAEGUCUEFECoNACAAQZ4JQQMQKg0AIABBpAlBAhAqIQELIAELbwEBfwJ/IAAvAQAiARAkIAFBKUZyIAFB/QBGckUEQEEAIAFB3QBHDQEaCwNAAkAgAEGgiwRNDQAgARAkRQ0AIABBAmsiAC8BACEBDAELC0EBIAFBKUYgAUHdAEZyIAFB/QBGcg0AGiABEDRBAXMLCz4BAn8CQCAAIAJBAXQiAmsiBEECaiIAQaCLBEkNACAAIAEgAhAfDQAgAEGgiwRGBEBBAQ8LIAQQMyEDCyADC4MBAQJ/QQEhAgJAAkACQAJAAkACQCAALwEAIgFBO2sOBAUEBAEACwJAIAFB5QBrDgQDBAQCAAsgAUEpRg0EIAFB+QBHDQMgAEECa0GwCUEGECoPCyAAQQJrLwEAQT1GDwsgAEECa0GoCUEEECoPCyAAQQJrQbwJQQMQKg8LQQAhAgsgAguqAwECfwJAAkACQAJAAkACQAJAAkACQAJAIAAvAQBB5ABrDhQAAQIJCQkJAwkJBAUJCQYJBwkJCAkLAkACQCAAQQJrLwEAQekAaw4EAAoKAQoLIABBBGtBuAhBAhAqDwsgAEEEa0G8CEEDECoPCwJAAkACQCAAQQJrLwEAQfMAaw4DAAECCgsgAEEEay8BACIBQeEARwRAIAFB7ABHDQogAEEGa0HlABA7DwsgAEEGa0HjABA7DwsgAEEEa0HCCEEEECoPCyAAQQRrQcoIQQYQKg8LIABBAmsvAQBB7wBHDQYgAEEEay8BAEHlAEcNBiAAQQZrLwEAIgFB8ABHBEAgAUHjAEcNByAAQQhrQdYIQQYQKg8LIABBCGtB4ghBAhAqDwsgAEECa0HmCEEEECoPC0EBIQIgAEECayIAQekAEDsNBCAAQe4IQQUQKg8LIABBAmtB5AAQOw8LIABBAmtB+AhBBxAqDwsgAEECa0GGCUEEECoPCyAAQQJrLwEAIgFB7wBHBEAgAUHlAEcNASAAQQRrQe4AEDsPCyAAQQRrQY4JQQMQKiECCyACCzQBAX8gAEGgAUYgAEEJayIBQRdNQQBBASABdEGfgIAEcRtyRQRAIAAQNCAAQS5HcQ8LQQELCwAgAEGNgIAEEDwLSAECfwJAIAAvAQAiAkHlAEcEQCACQesARw0BIABBAmtB5ghBBBAqDwsgAEECay8BAEH1AEcNACAAQQRrQcoIQQYQKiEBCyABC94BAQR/QZgKKAIAIQBBnAooAgAhAwJAAkADQAJAIAAiAUECaiEAIAEgA08NAAJAAkACQCAALwEAIgJB3ABrDgUCBAQEAQALIAJBJEcNAyABLwEEQfsARw0DQZgKIAFBBGoiAjYCAEGMCigCAEGCCi8BACIAQQN0aiIBQQQ2AgBBggogAEEBajsBACABIAI2AgQPC0GYCiAANgIAQYIKQYIKLwEAQQFrIgE7AQBBjAooAgAgAUH//wNxQQN0aigCAEEDRw0DDAQLIAFBBGohAAwBCwtBmAogADYCAAsQMgsL2wEBBH9BmAooAgAhAEGcCigCACEDA0AgAEECaiEBAkACQCAAIANPDQACQAJAAkAgAS8BACICQdsAaw4CAQIACyABIQAgAkEKaw4EAgQEAgMLAkADQAJAIAFBAmohACABIANPDQACQAJAIAAvAQAiAkHcAGsOAgAEAQsgAUEEaiEBDAILIAAhASACQQprDgQAAQEAAQsLQZgKIAA2AgAQMkGYCigCACEADAQLQZgKIAA2AgAMAwsgAEEEaiEADAILQZgKIAE2AgAQMg8LIAJBL0cNAAtBmAogADYCAAszAQF/QeQJQQE6AABBmAooAgAhAEGYCkGcCigCAEECajYCAEH0CSAAQaCLBGtBAXU2AgALPQEBfwJ/QQEgAC8BACIBQQlrQf//A3FBBUkgAUGAAXJBoAFGcg0AGkEAIAEQNEUNABogABA6IAFBLkdyCwteAQF/AkAgAEH4/wNxQShGIABBIWsiAUEFTUEAQQEgAXRBMXEbckUEQCAAQTprIgFB//8DcUElT0K/gICAoAMgAa2Ip0EBcUVyDQELQQEPCyAAQfsAa0H//wNxQQRJC1cBA39BmAooAgAhAQNAAkAgAEH//wNxIgIQJARAIAAhAwwBCyAAIQMgAhA0DQBBACEDQZgKIAFBAmoiAjYCACABLwECIQAgAiEBIAANAQsLIANB//8DcQulAQEEfwJAQZgKKAIAIgMvAQAiBUHhAEcEQCABIQIgACEEDAELQZgKIANBBGo2AgBBARAlIQJBmAooAgAhBAJAIAJBIkYgAkEnRnJFBEAgAhA1GkGYCigCACECDAELIAIQJkGYCkGYCigCAEECaiICNgIAC0EBECUhBUGYCigCACEDCyADIARHBEAgBCACQQAgACAAIAFGIgAbQQAgASAAGxAECyAFC9MEAQd/QZgKKAIAIQECQCAAQd//A3FB2wBGBEAgAS8BACEFQZgKIAFBAmo2AgBB/QBB3QAgBUH7AEYbIQZBARAlIQNBnAooAgAhBwNAAkAgBiADQf//A3EiAkZBmAooAgAiASAHS3INAAJAIAJBLkcNACABLwECQS5HDQAgAS8BBEEuRw0AQZgKIAFBBmo2AgBBARAlEDchAwwCCwJAAn8CQCAFQfsARgRAAkAgAkEiRiACQSdGckUEQCACQdsARw0BQQAQOBpBmApBmAooAgBBAmo2AgAgAQwECyACECZBmApBmAooAgBBAmo2AgAgAQwDCyABIQAgA0Ewa0H//wNxQQlLDQEDQCAAIgJBAmohACACLwECIgNBMGtB//8DcUEKSQ0AIANBwQBrIgRBHk1BAEEBIAR0Qb+AgYQEcRsNACADQeEAayIEQRdNQQBBASAEdEG/wIEEcRsNAAJAAkAgA0Eraw4EAAEAAgELIAIvAQBBIHJB5QBGDQELC0GYCiAANgIAIAEMAgsgAkEsRgRAQZgKIAFBAmo2AgBBARAlIQMMBQsgAhA3IQIMAgsgAhA1GkGYCigCAAshAEEBECUiAkE6RgRAQZgKQZgKKAIAQQJqNgIAQQEQJRA3IQIMAQsgACABTQ0AIAEgACABIAAQBAsgAkE9RgRAQQAQOCECC0GYCigCACEBIAJBLEcNAEGYCiABQQJqNgIAQQEQJSEDDAELC0GYCiABQQJqNgIADAELIAAQNRpBmAooAgAiACABTQ0AIAEgACABIAAQBAtBARAlC54NAQx/QYQKQZgKKAIAIgE2AgBBkAooAgAhCkGMCigCACEHQZwKKAIAIQxBggovAQAhCyABIgQhAgJAA0BBmAogAkECaiIJNgIAIAIgDE8EQEEAIQYMAgsCQAJAIAkvAQAiAxAuDQACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkBBggovAQAiBSALRw0AIAMhBgJAAkAgA0Epaw4EGgEBGgALIANBO0YgA0HdAEZyIANB/QBGcg0XCyAAIAhxQQFHDQACQCADQSJrDg4MExMTEwwFCRMTCBMTDQALAkAgA0HbAGsODwYTBxMTDhMTBBMCExMTAwALAkAgA0H7AGsOAwoTCwALIANBCmsOBBgSEhgSCwJAIANBImsODgsSEhISCwQIEhIHEhIMAAsCQCADQdsAaw4PBRIGEhINEhIDEgESEhICAAsCQCADQQprDgQVEhIVAAsgA0H7AGsOAwgRCRELIAUNECAJEB5FDRAgAkEEakGCCEEKEB8NEBAgDBALIAIvAQRB7QBHDQ8gCRAeRQ0PIAIpAAZC8IC8g6COgDpSDQ8QIQwPCyACLwEEQewARw0OIAkQHkUNDiACQQZqQbIIQQYQHw0OIAIvAQwQJEUNDkGUCkEBOgAADA4LIAcgBUEDdGoiAUEBNgIAQYIKIAVBAWo7AQAgASAENgIEDA0LIAcgBUEDdGoiAUEINgIAQYIKIAVBAWo7AQAgASAENgIEDAwLIAVFDQxBggogBUEBazsBAAwLCyAFRQ0KQYAKLwEAIgFFDQogByAFQQN0akEIaygCAEEFRw0KIAogAUECdGpBBGsoAgAiASgCBA0KIAEgBEECajYCBEGYCiACQQRqNgIAQQEQJRogAUGYCigCACIBNgIQQZgKIAFBAms2AgAMCgsgBUUNCkGCCiAFQQFrIgY7AQBBgAovAQAiAUUNCSAHIAZB//8DcUEDdGooAgBBBUcNCSAKIAFBAnRqQQRrKAIAIgYoAgRFBEAgBiAEQQJqNgIECyAGIAJBBGo2AgxBgAogAUEBazsBAAwJCwJAIAQvAQBBKUcNAEHUCSgCACIBRQ0AIAEoAgwgBEECakcNAEHUCUHYCSgCACIBNgIAIAEEQCABQQA2AiQMAQtBxAlBADYCAAsgByAFQQN0aiIBQQZBAkGUCi0AABs2AgBBggogBUEBajsBACABIAQ2AgRBlApBADoAAAwICyAFRQ0IQYIKIAVBAWsiATsBACAHIAFB//8DcUEDdGooAgBBBEYNAwwHCyADECYMBgsCQCACLwEEIgJBKkcEQCACQS9HDQEQIgwJC0EBECMMCAsCQCAELwEAIgEQJwRAAkACQAJAIAFBK2sOBAEJAgAJCyAEQQJrLwEAQTBrQf//A3FBCkkNAwwICyAEQQJrLwEAQStGDQIMBwsgBEECay8BAEEtRg0BDAYLIAFBKUcNACAHIAVBA3RqKAIEECgNBQsCQAJAIAVFIAFB5gBHcg0AIAcgBUEDdGoiAkEIaygCAEEBRw0AIARBAmsvAQBB7wBHDQEgBEEEaxApRQ0BIAJBBGsoAgBBnglBAxAqRQ0BDAYLIAFB/QBHDQAgByAFQQN0aiICKAIEECsNBSACKAIAQQZGDQULIAQQLA0EQYgKLQAAIAFBL0ZxIAFBAEdzRQ0EQdwJKAIAIgZFDQIgBCAGKAIASQ0CIAQiAiAGKAIETQ0EDAMLIAcgBUEDdGoiASAENgIEQYIKIAVBAWo7AQAgAUEDNgIACxAwDAMLIAQhAgsDQCACQaCLBEsEQCACQQJrIgIvAQAiARAtRQ0BCwsgARAuBEADQCACQaCLBEsEQEGECiACQQJrIgI2AgAgAi8BABAuDQELCyACEC8NAQtBiApBAToAAAwBCxAxQYgKQQA6AAALQYQKQZgKKAIAIgE2AgAMAQsQMgtBACEGQeQJLQAADQMCQCABIARGBEAgAEUNAUGCCi8BACALRiAIcUUNAUEBIQggASEEQZgKKAIALwEAIgZBCmsOBAUCAgUCCyADQS9GBEBBiAotAABBAXMhCAwBC0EBIQggA0Ewa0H//wNxQQpJIANB3/8DcUHBAGtB//8DcUEaSXIgA0EkRiADQd8ARnJyIANB/wBLcg0AIAEhBAJAAkAgA0Enaw4DAwEDAAsCQCADQd0Aaw4EAwEBAwALIANBIkYgA0H9AEZyDQELQQAhCAsgASEEC0GYCigCACECDAELCyADDwsgBguvBAEHfyABQSJGIAFBJ0ZyRQRAEDIPC0GYCigCACEDIAEQJiAAIANBAmpBmAooAgBBARADIAIEQEHUCSgCAEEEQQYgAkEBRhs2AhwLQZgKQZgKKAIAQQJqNgIAQQAQJSEAQZgKKAIAIQQCQAJAIABB9wBHDQAgBC8BAkHpAEcNACAELwEEQfQARw0AIAQvAQZB6ABGDQELQZgKIARBAms2AgAPC0GYCiAEQQhqNgIAAkBBARAlQfsARwRADAELQewJKAIAIQNB1AkoAgAhBUGYCigCACIGIQBBACECA0AgAyEBQZgKIABBAmo2AgBBARAlIQBBmAooAgAhBwJAAkACQCAAQSJHBEAgAEEnRw0BQScQJgwCC0EiECYMAQsgABA1IQNBmAooAgAhAAwBC0GYCigCAEECaiEAQZgKIAA2AgBBARAlIQMLIANBOkcEQAwCC0GYCkGYCigCAEECajYCAEEBECUiA0EiRiADQSdGckUEQAwCC0GYCigCACEIIAMQJkHsCSABQRRqIgM2AgBBmAooAgAhCSABQQA2AhAgASAINgIIIAEgADYCBCABIAc2AgAgASAJQQJqIgA2AgwCQCACRQRAIAUgATYCIAwBCyACIAE2AhALQZgKIAA2AgACQEEBECUiAEEsRwRAIABB/QBGDQEMAwtBmApBmAooAgBBAmoiADYCACABIQIMAQsLIAUgBjYCECAFQZgKKAIAQQJqNgIMDwtBmAogBDYCAAstAQF/AkAgAC8BAEEuRw0AIABBAmsvAQBBLkcNACAAQQRrLwEAQS5GIQELIAELNQEBfwJAIABBoIsESQ0AIAAvAQAgAUcNACAAQaCLBEYEQEEBDwsgAEECay8BABAtIQILIAILKQEBfyAAQaABRiAAQQlrIgJBF01BAEEBIAJ0IAFxG3JFBEBBAA8LQQELC8cBAQBBgggLvwF4AHAAbwByAHQAZQB0AGEAbwB1AHIAYwBlAHIAbwBtAHUAbgBjAHQAaQBvAG4AbABhAHMAcwB2AG8AeQBpAGUAZABlAGwAZQBjAG8AbgB0AGkAbgBpAG4AcwB0AGEAbgB0AHkAYgByAGUAYQByAGUAdAB1AHIAZABlAGIAdQBnAGcAZQBhAHcAYQBpAHQAaAByAHcAaABpAGwAZQBmAG8AcgBpAGYAYwBhAHQAYwBmAGkAbgBhAGwAbABlAGwAcw==",typeof Buffer<"u"?Buffer.from(e,"base64"):Uint8Array.from(atob(e),t=>t.charCodeAt(0));var e},vn=WebAssembly.compile(JI()).then(WebAssembly.instantiate).then(({exports:e})=>{xe=e}),KI=/(?:(?:(?:const|var)\s+[^.\s]+|[^.\s]+\.[^.\s]+\.[^.\s]+)\s*=\s*|^|\n)\(?function\([^()]*\)\s*\{(?:\s*"use strict";)?/,VI=/\}\)\((?:this,\s*)?function\([^()]*\)\s*\{(?:\s*"use strict";)?/,qI=/\.(?:j|t)sx\b/,YI=/\.\w+$/;function XI(e){switch(e){case"react":return{runtime:"classic",pragma:"React.createElement",pragmaFrag:"React.Fragment",importSource:"react"};case"react-jsx":return{runtime:"automatic",pragma:"React.createElement",importSource:"react"}}}function Ys(e,t){return e.replace(/\n+$/,"")+`
|
|
113
|
-
`+t.replace(/^\n+/,"")}function Vg(e){if(Object.hasOwn(e,"kind"))return e.message;let t="";e.plugin&&(t+=`[plugin ${e.plugin}]`);let n=e.id??e.loc?.file;n&&(t+=" "+n,e.loc&&(t+=`:${e.loc.line}:${e.loc.column}`)),t&&(t+=`
|
|
114
|
-
`);let r=`${e.name??"Error"}: ${e.message}`;return t+=r,e.frame&&(t=Ys(t,e.frame)),e.stack&&(t=Ys(t,e.stack.replace(r,""))),e.cause&&(t=Ys(t,"Caused by:"),t=Ys(t,Vg(e.cause).split(`
|
|
115
|
-
`).map(s=>" "+s).join(`
|
|
116
|
-
`))),t}async function qg(e,t,n,r,s,i){let a=n?.lang;if(!a){let l=L.extname(YI.test(t)?t:he(t)).slice(1);l==="cjs"||l==="mjs"?a="js":l==="cts"||l==="mts"?a="ts":a=l}let o=xn(t,e,{sourcemap:!0,...n,inputMap:r,lang:a},Kc(s));if(i&&s&&o.tsconfigFilePaths&&o.tsconfigFilePaths.length>0)for(let l of o.tsconfigFilePaths)zn(i,re(l),s.root);if(o.errors.length>0){let l=`Transform failed with ${o.errors.length} error${o.errors.length<2?"":"s"}:
|
|
117
|
-
`;for(let u=0;u<o.errors.length;u++){if(l+=`
|
|
118
|
-
`,u>=5){l+="...";break}l+=Vg(o.errors[u])}let c=new Error(l);throw Object.defineProperty(c,"errors",{configurable:!0,enumerable:!0,get:()=>o.errors,set:u=>Object.defineProperty(c,"errors",{configurable:!0,enumerable:!0,value:u})}),c}return o}var kp=new Set;function ZI(e){if(e.code==="UNSUPPORTED_TSCONFIG_OPTION"){if(kp.has(e.message))return!0;kp.add(e.message)}return!1}function eR(e){let{jsxInject:t,include:n,exclude:r,jsxRefreshInclude:s,jsxRefreshExclude:i,...a}=e.oxc,o=hn(n||/\.(m?ts|[jt]sx)$/,r||/\.js$/),l=s||i?hn(s,i):void 0,c=typeof a.jsx=="object"&&a.jsx.importSource||"react",u=`${c}/jsx-runtime`,f=`${c}/jsx-dev-runtime`,d=(h,y,m,w)=>{let A={...h,sourcemap:w.mode!=="build"||!!w.config.build.sourcemap},g=A.jsx,[E]=y.split("?"),v=E.endsWith("x");return typeof g=="object"&&g.refresh&&(w.config.consumer==="server"||l&&!l(y)||!(v||m.includes(u)||m.includes(f)))&&(A.jsx={...g,refresh:!1}),l?.(y)&&!so.test(he(y))&&(A.lang="js"),A},p;return{name:"vite:oxc",applyToEnvironment(h){if(h.config.isBundled){let{jsxInject:y,include:m=/\.(m?ts|[jt]sx)$/,exclude:w=/\.js$/,jsxRefreshInclude:A,jsxRefreshExclude:g,...E}=h.config.oxc,v=E;return v.sourcemap=h.config.mode!=="build"||!!h.config.build.sourcemap,yd({root:h.config.root,include:m,exclude:w,jsxRefreshInclude:A,jsxRefreshExclude:g,isServerConsumer:h.config.consumer==="server",jsxInject:y,transformOptions:v})}return!0},configureServer(h){p=h},async transform(h,y){if(o(y)||o(he(y))||l?.(y)){let m=await qg(h,y,d(a,y,h,this.environment),void 0,e,p?.watcher);t&&qI.test(y)&&(m.code=t+";"+m.code);for(let w of m.warnings)ZI(w)||this.warn(w);return{code:m.code,map:m.map,moduleType:"js"}}}}}function tR(e,t){let{jsxInject:n,include:r,exclude:s,...i}=e,a={jsxInject:n,include:r,exclude:s};if(i.jsx==="preserve")a.jsx="preserve";else{let o={};switch(i.jsx){case"automatic":o.runtime="automatic",i.jsxImportSource&&(o.importSource=i.jsxImportSource);break;case"transform":o.runtime="classic",i.jsxFactory&&(o.pragma=i.jsxFactory),i.jsxFragment&&(o.pragmaFrag=i.jsxFragment)}i.jsxDev!==void 0&&(o.development=i.jsxDev),i.jsxSideEffects!==void 0&&(o.pure=!i.jsxSideEffects),a.jsx=o}return i.define&&(a.define=i.define),i.banner&&Tp(t,"banner"),i.footer&&Tp(t,"footer"),a}function Tp(e,t){e.warn(j.default.yellow(`\`esbuild.${t}\` option was specified. But this option is deprecated and will be removed in future versions. This option can be achieved by using a plugin with transform hook, please use that instead.`))}var Op=class Yg{constructor(t){this.bits=t instanceof Yg?t.bits.slice():[]}add(t){this.bits[t>>5]|=1<<(t&31)}has(t){return!!(this.bits[t>>5]&1<<(t&31))}},Bp=class rc{constructor(t,n,r){this.start=t,this.end=n,this.original=r,this.intro="",this.outro="",this.content=r,this.storeName=!1,this.edited=!1,this.previous=null,this.next=null}appendLeft(t){this.outro+=t}appendRight(t){this.intro=this.intro+t}clone(){let t=new rc(this.start,this.end,this.original);return t.intro=this.intro,t.outro=this.outro,t.content=this.content,t.storeName=this.storeName,t.edited=this.edited,t}contains(t){return this.start<t&&t<this.end}eachNext(t){t(this);let n=this.next;for(;n;)t(n),n=n.next}eachPrevious(t){t(this);let n=this.previous;for(;n;)t(n),n=n.previous}edit(t,n,r){return this.content=t,r||(this.intro="",this.outro=""),this.storeName=n,this.edited=!0,this}prependLeft(t){this.outro=t+this.outro}prependRight(t){this.intro=t+this.intro}reset(){this.intro="",this.outro="",this.edited&&(this.content=this.original,this.storeName=!1,this.edited=!1)}split(t){let n=t-this.start,r=this.original.slice(0,n),s=this.original.slice(n);this.original=r;let i=new rc(t,this.end,s);return i.outro=this.outro,this.outro="",this.end=t,this.edited?(i.edit("",!1),this.content=""):this.content=r,i.next=this.next,i.next&&(i.next.previous=i),i.previous=this,this.next=i,i}toString(){return this.intro+this.content+this.outro}trimEnd(t){if(this.outro=this.outro.replace(t,""),this.outro.length)return!0;let n=this.content.replace(t,"");if(n.length)return n!==this.content&&(this.edited?this.edit(n,this.storeName,!0):this.split(this.start+n.length).edit("",void 0,!0)),!0;if(this.edit("",void 0,!0),this.intro=this.intro.replace(t,""),this.intro.length)return!0}trimStart(t){if(this.intro=this.intro.replace(t,""),this.intro.length)return!0;let n=this.content.replace(t,"");if(n.length)return n!==this.content&&(this.edited?this.edit(n,this.storeName,!0):(this.split(this.end-n.length),this.edit("",void 0,!0))),!0;if(this.edit("",void 0,!0),this.outro=this.outro.replace(t,""),this.outro.length)return!0}},Te=class extends Error{name="MagicStringError";constructor(e,t){super(`[MagicString] ${e}`,t)}};function nR(){if(typeof globalThis<"u"&&typeof globalThis.btoa=="function")return t=>globalThis.btoa(unescape(encodeURIComponent(t)));let e=globalThis.Buffer;return e?t=>e.from(t,"utf-8").toString("base64"):()=>{throw new Te("unsupported environment: `btoa` or `Buffer` is required")}}var rR=nR(),sR=class{constructor(e){this.version=3,this.file=e.file,this.sources=e.sources,this.sourcesContent=e.sourcesContent,this.names=e.names,this.mappings=qm(e.mappings),typeof e.x_google_ignoreList<"u"&&(this.x_google_ignoreList=e.x_google_ignoreList),typeof e.debugId<"u"&&(this.debugId=e.debugId)}toString(){return JSON.stringify(this)}toUrl(){return`data:application/json;charset=utf-8;base64,${rR(this.toString())}`}};function $p(e){let t=e.split(`
|
|
119
|
-
`),n=[];for(let r=0,s=0;r<t.length;r++)n.push(s),s+=t[r].length+1;return function(s){let i=0,a=n.length;for(;i<a;){let l=i+a>>1;s<n[l]?a=l:i=l+1}let o=i-1;return{line:o,column:s-n[o]}}}function iR(e,t){let n=e.split(/[/\\]/),r=t.split(/[/\\]/);for(n.pop();n[0]===r[0];)n.shift(),r.shift();if(n.length){let s=n.length;for(;s--;)n[s]=".."}return n.concat(r).join("/")}function oR(e){let t=e.split(`
|
|
120
|
-
`),n=t.filter(i=>/^\t+/.test(i)),r=t.filter(i=>/^ {2,}/.test(i));if(n.length===0&&r.length===0)return null;if(n.length>=r.length)return" ";let s=r.reduce((i,a)=>{let o=/^ +/.exec(a)[0].length;return Math.min(o,i)},1/0);return" ".repeat(s)}var aR=Object.prototype.toString;function lR(e){return aR.call(e)==="[object Object]"}var cR=/\w/,uR=class{constructor(e){this.hires=e,this.generatedCodeLine=0,this.generatedCodeColumn=0,this.raw=[],this.rawSegments=this.raw[this.generatedCodeLine]=[],this.pending=null}addEdit(e,t,n,r){if(t.length){let s=t.length-1,i=t.indexOf(`
|
|
121
|
-
`,0),a=-1;for(;i>=0&&s>i;){let l=[this.generatedCodeColumn,e,n.line,n.column];r>=0&&l.push(r),this.rawSegments.push(l),this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0,a=i,i=t.indexOf(`
|
|
122
|
-
`,i+1)}let o=[this.generatedCodeColumn,e,n.line,n.column];r>=0&&o.push(r),this.rawSegments.push(o),this.advance(t.slice(a+1))}else this.pending&&(this.rawSegments.push(this.pending),this.advance(t));this.pending=null}addUneditedChunk(e,t,n,r,s){let i=t.start,a=!0,o=!1;for(;i<t.end;){if(n[i]===`
|
|
123
|
-
`)r.line+=1,r.column=0,this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0,a=!0,o=!1;else{if(this.hires||a||s.has(i)){let l=[this.generatedCodeColumn,e,r.line,r.column];this.hires==="boundary"?cR.test(n[i])?o||(this.rawSegments.push(l),o=!0):(this.rawSegments.push(l),o=!1):this.rawSegments.push(l)}r.column+=1,this.generatedCodeColumn+=1,a=!1}i+=1}this.pending=null}advance(e){if(!e)return;let t=e.split(`
|
|
124
|
-
`);if(t.length>1){for(let n=0;n<t.length-1;n++)this.generatedCodeLine++,this.raw[this.generatedCodeLine]=this.rawSegments=[];this.generatedCodeColumn=0}this.generatedCodeColumn+=t[t.length-1].length}},Mn=`
|
|
125
|
-
`,Mp=10,Dp=13,Dn={insertLeft:!1,insertRight:!1,storeName:!1},Ie=class Xg{constructor(t,n={}){let r=new Bp(0,t.length,t);Object.defineProperties(this,{original:{writable:!0,value:t},outro:{writable:!0,value:""},intro:{writable:!0,value:""},firstChunk:{writable:!0,value:r},lastChunk:{writable:!0,value:r},lastSearchedChunk:{writable:!0,value:r},byStart:{writable:!0,value:new Map([[0,r]])},byEnd:{writable:!0,value:new Map([[t.length,r]])},filename:{writable:!0,value:n.filename},indentExclusionRanges:{writable:!0,value:n.indentExclusionRanges},sourcemapLocations:{writable:!0,value:new Op},storedNames:{writable:!0,value:{}},indentStr:{writable:!0,value:void 0},ignoreList:{writable:!0,value:n.ignoreList},offset:{writable:!0,value:n.offset||0}})}addSourcemapLocation(t){this.sourcemapLocations.add(t)}append(t){if(typeof t!="string")throw new Te(`content must be a string, got ${typeof t}`);return this.outro+=t,this}appendLeft(t,n){if(t=t+this.offset,typeof n!="string")throw new Te(`content must be a string, got ${typeof n}`);this._split(t);let r=this.byEnd.get(t);return r?r.appendLeft(n):this.intro+=n,this}appendRight(t,n){if(t=t+this.offset,typeof n!="string")throw new Te(`content must be a string, got ${typeof n}`);this._split(t);let r=this.byStart.get(t);return r?r.appendRight(n):this.outro+=n,this}clone(){let t=new Xg(this.original,{filename:this.filename,offset:this.offset}),n=this.firstChunk,r=t.firstChunk=t.lastSearchedChunk=n.clone();for(;n;){t.byStart.set(r.start,r),t.byEnd.set(r.end,r);let s=n.next,i=s&&s.clone();i&&(r.next=i,i.previous=r,r=i),n=s}return t.lastChunk=r,this.indentExclusionRanges&&(t.indentExclusionRanges=this.indentExclusionRanges.slice()),t.sourcemapLocations=new Op(this.sourcemapLocations),t.intro=this.intro,t.outro=this.outro,t}generateDecodedMap(t){t=t||{};let n=0,r=Object.keys(this.storedNames),s=new uR(t.hires),i=$p(this.original);return this.intro&&s.advance(this.intro),this.firstChunk.eachNext(a=>{let o=i(a.start);a.intro.length&&s.advance(a.intro),a.edited?s.addEdit(n,a.content,o,a.storeName?r.indexOf(a.original):-1):s.addUneditedChunk(n,a,this.original,o,this.sourcemapLocations),a.outro.length&&s.advance(a.outro)}),this.outro&&s.advance(this.outro),{file:t.file?t.file.split(/[/\\]/).pop():void 0,sources:[t.source?iR(t.file||"",t.source):t.file||""],sourcesContent:t.includeContent?[this.original]:void 0,names:r,mappings:s.raw,x_google_ignoreList:this.ignoreList?[n]:void 0}}generateMap(t){return new sR(this.generateDecodedMap(t))}_ensureindentStr(){this.indentStr===void 0&&(this.indentStr=oR(this.original))}_getRawIndentString(){return this._ensureindentStr(),this.indentStr}getIndentString(){return this._ensureindentStr(),this.indentStr===null?" ":this.indentStr}indent(t,n){let r=/^[^\r\n]/gm;if(lR(t)&&(n=t,t=void 0),t===void 0&&(this._ensureindentStr(),t=this.indentStr||" "),t==="")return this;let s=t;n=n||{};let i={};n.exclude&&(typeof n.exclude[0]=="number"?[n.exclude]:n.exclude).forEach(f=>{for(let d=f[0];d<f[1];d+=1)i[d]=!0});let a=n.indentStart!==!1,o=f=>a?`${s}${f}`:(a=!0,f);this.intro=this.intro.replace(r,o);let l=0,c=this.firstChunk,u=f=>{a=!1,f===c.start||(this._splitChunk(c,f),c=c.next),c.prependRight(s)};for(;c;){let f=c.end;if(c.edited)i[l]||(c.content=c.content.replace(r,o),c.content.length&&(a=c.content[c.content.length-1]===`
|
|
126
|
-
`));else if(n.exclude)for(l=c.start;l<f;){if(!i[l]){let d=this.original.charCodeAt(l);d===Mp?a=!0:d!==Dp&&a&&u(l)}l+=1}else for(l=c.start;l<f;){if(!a){let p=this.original.indexOf(Mn,l);if(p===-1||p>=f)break;a=!0,l=p+1;continue}let d=this.original.charCodeAt(l);if(d===Mp||d===Dp){l+=1;continue}u(l),l+=1}l=c.end,c=c.next}return this.outro=this.outro.replace(r,o),this}insert(){throw new Te("insert() is deprecated, use appendLeft() or prependRight()")}insertLeft(t,n){return Dn.insertLeft||(console.warn("magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead"),Dn.insertLeft=!0),this.appendLeft(t,n)}insertRight(t,n){return Dn.insertRight||(console.warn("magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead"),Dn.insertRight=!0),this.prependRight(t,n)}move(t,n,r){if(t=t+this.offset,n=n+this.offset,r=r+this.offset,t===n)return this;if(r>=t&&r<=n)throw new Te("cannot move a selection inside itself");this._split(t),this._split(n),this._split(r);let s=this.byStart.get(t),i=this.byEnd.get(n),a=s.previous,o=i.next,l=this.byStart.get(r);if(!l&&i===this.lastChunk)return this;let c=l?l.previous:this.lastChunk;return a&&(a.next=o),o&&(o.previous=a),c&&(c.next=s),l&&(l.previous=i),s.previous||(this.firstChunk=i.next),i.next||(this.lastChunk=s.previous,this.lastChunk.next=null),s.previous=c,i.next=l||null,c||(this.firstChunk=s),l||(this.lastChunk=i),this}overwrite(t,n,r,s){let i=typeof s=="object"&&s?s:{};return this.update(t,n,r,{...i,overwrite:!i.contentOnly})}update(t,n,r,s){if(t=t+this.offset,n=n+this.offset,typeof r!="string")throw new Te(`content must be a string, got ${typeof r}`);if(this.original.length!==0){for(;t<0;)t+=this.original.length;for(;n<0;)n+=this.original.length}if(t<0)throw new Te(`start ${t} is out of bounds`);if(n>this.original.length)throw new Te(`end ${n} is out of bounds`);if(t===n)throw new Te(`cannot overwrite a zero-length range at ${t}, use appendLeft() or prependRight()`);if(t>n)throw new Te(`end must be greater than start (start: ${t}, end: ${n})`);this._split(t),this._split(n),s===!0&&(Dn.storeName||(console.warn("The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string"),Dn.storeName=!0),s={storeName:!0});let i=typeof s=="object"&&s?s:{},a=i.storeName||!1,o=i.overwrite||!1;if(a){let u=this.original.slice(t,n);Object.defineProperty(this.storedNames,u,{writable:!0,value:!0,enumerable:!0})}let l=this.byStart.get(t),c=this.byEnd.get(n);if(l){let u=l;for(;u!==c;){if(u.next!==this.byStart.get(u.end))throw new Te("cannot overwrite across a split point");u=u.next,u.edit("",!1)}l.edit(r,a,!o)}else{let u=new Bp(t,n,"").edit(r,a);c.next=u,u.previous=c}return this}prepend(t){if(typeof t!="string")throw new Te(`content must be a string, got ${typeof t}`);return this.intro=t+this.intro,this}prependLeft(t,n){if(t=t+this.offset,typeof n!="string")throw new Te(`content must be a string, got ${typeof n}`);this._split(t);let r=this.byEnd.get(t);return r?r.prependLeft(n):this.intro=n+this.intro,this}prependRight(t,n){if(t=t+this.offset,typeof n!="string")throw new Te(`content must be a string, got ${typeof n}`);this._split(t);let r=this.byStart.get(t);return r?r.prependRight(n):this.outro=n+this.outro,this}remove(t,n){if(t=t+this.offset,n=n+this.offset,this.original.length!==0){for(;t<0;)t+=this.original.length;for(;n<0;)n+=this.original.length}if(t===n)return this;if(t<0||n>this.original.length)throw new Te(`range ${t}\u2013${n} is out of bounds`);if(t>n)throw new Te(`end must be greater than start (start: ${t}, end: ${n})`);this._split(t),this._split(n);let r=this.byStart.get(t);for(;r;)r.intro="",r.outro="",r.edit(""),r=n>r.end?this.byStart.get(r.end):null;return this}reset(t,n){if(t=t+this.offset,n=n+this.offset,this.original.length!==0){for(;t<0;)t+=this.original.length;for(;n<0;)n+=this.original.length}if(t===n)return this;if(t<0||n>this.original.length)throw new Te(`range ${t}\u2013${n} is out of bounds`);if(t>n)throw new Te(`end must be greater than start (start: ${t}, end: ${n})`);this._split(t),this._split(n);let r=this.byStart.get(t);for(;r;)r.reset(),r=n>r.end?this.byStart.get(r.end):null;return this}lastChar(){if(this.outro.length)return this.outro[this.outro.length-1];let t=this.lastChunk;for(;t;){if(t.outro.length)return t.outro[t.outro.length-1];if(t.content.length)return t.content[t.content.length-1];if(t.intro.length)return t.intro[t.intro.length-1];t=t.previous}return this.intro.length?this.intro[this.intro.length-1]:""}lastLine(){let t=this.outro.lastIndexOf(Mn);if(t!==-1)return this.outro.substr(t+1);let n=this.outro,r=this.lastChunk;for(;r;){if(r.outro.length>0){if(t=r.outro.lastIndexOf(Mn),t!==-1)return r.outro.substr(t+1)+n;n=r.outro+n}if(r.content.length>0){if(t=r.content.lastIndexOf(Mn),t!==-1)return r.content.substr(t+1)+n;n=r.content+n}if(r.intro.length>0){if(t=r.intro.lastIndexOf(Mn),t!==-1)return r.intro.substr(t+1)+n;n=r.intro+n}r=r.previous}return t=this.intro.lastIndexOf(Mn),t!==-1?this.intro.substr(t+1)+n:this.intro+n}slice(t=0,n=this.original.length-this.offset){if(t=t+this.offset,n=n+this.offset,this.original.length!==0){for(;t<0;)t+=this.original.length;for(;n<0;)n+=this.original.length}let r="",s=this.firstChunk;for(;s&&(s.start>t||s.end<=t);){if(s.start<n&&s.end>=n)return r;s=s.next}if(s&&s.edited&&s.start!==t)throw new Te(`cannot use edited character ${t} as slice start anchor`);let i=s;for(;s;){s.intro&&(i!==s||s.start===t)&&(r+=s.intro);let a=s.start<n&&s.end>=n;if(a&&s.edited&&s.end!==n)throw new Te(`cannot use edited character ${n} as slice end anchor`);let o=i===s?t-s.start:0,l=a?s.content.length+n-s.end:s.content.length;if(r+=s.content.slice(o,l),s.outro&&(!a||s.end===n)&&(r+=s.outro),a)break;s=s.next}return r}snip(t,n){let r=this.clone();return r.remove(0,t),r.remove(n,r.original.length),r}_split(t){if(this.byStart.get(t)||this.byEnd.get(t))return;let n=this.lastSearchedChunk,r=n,s=t>n.end;for(;n;){if(n.contains(t))return this._splitChunk(n,t);if(n=s?this.byStart.get(n.end):this.byEnd.get(n.start),n===r)return;r=n}}_splitChunk(t,n){if(t.edited&&t.content.length){let s=$p(this.original)(n);throw new Te(`cannot split a chunk that has already been edited (${s.line}:${s.column} \u2013 "${t.original}")`)}let r=t.split(n);return this.byEnd.set(n,t),this.byStart.set(n,r),this.byEnd.set(r.end,r),t===this.lastChunk&&(this.lastChunk=r),this.lastSearchedChunk=t,!0}toString(){let t=this.intro,n=this.firstChunk;for(;n;)t+=n.toString(),n=n.next;return t+this.outro}isEmpty(){let t=this.firstChunk;for(;t;){if(t.intro.length&&t.intro.trim()||t.content.length&&t.content.trim()||t.outro.length&&t.outro.trim())return!1;t=t.next}return!0}length(){let t=this.firstChunk,n=0;for(;t;)n+=t.intro.length+t.content.length+t.outro.length,t=t.next;return n}trimLines(){return this.trim("[\\r\\n]")}trim(t){return this.trimStart(t).trimEnd(t)}trimEndAborted(t){let n=new RegExp(`${t||"\\s"}+$`);if(this.outro=this.outro.replace(n,""),this.outro.length)return!0;let r=this.lastChunk;do{let s=r.end,i=r.trimEnd(n);if(r.end!==s&&(this.lastChunk===r&&(this.lastChunk=r.next),this.byEnd.set(r.end,r),this.byStart.set(r.next.start,r.next),this.byEnd.set(r.next.end,r.next)),i)return!0;r=r.previous}while(r);return!1}trimEnd(t){return this.trimEndAborted(t),this}trimStartAborted(t){let n=new RegExp(`^${t||"\\s"}+`);if(this.intro=this.intro.replace(n,""),this.intro.length)return!0;let r=this.firstChunk;do{let s=r.end,i=r.trimStart(n);if(r.end!==s&&(r===this.lastChunk&&(this.lastChunk=r.next),this.byEnd.set(r.end,r),this.byStart.set(r.next.start,r.next),this.byEnd.set(r.next.end,r.next)),i)return!0;r=r.next}while(r);return!1}trimStart(t){return this.trimStartAborted(t),this}hasChanged(){return this.original!==this.toString()}_replaceRegexp(t,n){function r(i,a){return typeof n=="string"?n.replace(/\$(\$|&|\d+)/g,(o,l)=>l==="$"?"$":l==="&"?i[0]:+l<i.length?i[+l]:`$${l}`):n(i[0],...i.slice(1),i.index,a,i.groups)}function s(i,a){let o=[];for(;;){let l=i.exec(a);if(!l)break;o.push(l)}return o}if(t.global)s(t,this.original).forEach(i=>{if(i.index!=null){let a=r(i,this.original);a!==i[0]&&this.overwrite(i.index,i.index+i[0].length,a)}});else{let i=this.original.match(t);if(i&&i.index!=null){let a=r(i,this.original);a!==i[0]&&this.overwrite(i.index,i.index+i[0].length,a)}}return this}_replaceString(t,n){let{original:r}=this,s=r.indexOf(t);return s!==-1&&(typeof n=="function"&&(n=n(t,s,r)),t!==n&&this.overwrite(s,s+t.length,n)),this}replace(t,n){return typeof t=="string"?this._replaceString(t,n):this._replaceRegexp(t,n)}_replaceAllString(t,n){let{original:r}=this,s=t.length;for(let i=r.indexOf(t);i!==-1;i=r.indexOf(t,i+s)){let a=r.slice(i,i+s),o=typeof n=="function"?n(a,i,r):n;a!==o&&this.overwrite(i,i+s,o)}return this}replaceAll(t,n){if(typeof t=="string")return this._replaceAllString(t,n);if(!t.global)throw new Te("replaceAll() requires a global RegExp");return this._replaceRegexp(t,n)}};function fR(e,t){return e instanceof RegExp?e.test(t):t.length<e.length?!1:t===e?!0:t.startsWith(e+"/")}function dR({entries:e,customResolver:t}){if(!e)return[];let n=Pp(t);return Array.isArray(e)?e.map(r=>({find:r.find,replacement:r.replacement,resolverFunction:Pp(r.customResolver)||n})):Object.entries(e).map(([r,s])=>({find:r,replacement:s,resolverFunction:n}))}function Zg(e){return typeof e=="function"?e:e&&"handler"in e&&typeof e.handler=="function"?e.handler:null}function Pp(e){return typeof e=="function"?e:e?Zg(e.resolveId):null}function sc(e={}){let t=dR(e);return t.length===0?{name:"alias",resolveId:()=>null}:{name:"alias",async buildStart(n){await Promise.all([...Array.isArray(e.entries)?e.entries:[],e].map(({customResolver:r})=>r&&Zg(r.buildStart)?.call(this,n)))},resolveId(n,r,s){let i=t.find(o=>fR(o.find,n));if(!i)return null;let a=n.replace(i.find,i.replacement);return i.resolverFunction?i.resolverFunction.call(this,a,r,s):this.resolve(a,r,Object.assign({skipSelf:!0},s)).then(o=>o||(L.isAbsolute(a)||this.warn(`rewrote ${n} to ${a} but was not an absolute path and was not handled by other plugins. This will lead to duplicated modules for the same path. To avoid duplicating modules, you should resolve to an absolute path.`),{id:a}))}}}var pR=Re("vite:optimize-deps");function hR(){return{name:"vite:optimized-deps",applyToEnvironment(e){return e.config.isBundled?!1:!Cs(e.config.optimizeDeps)},resolveId(e){if(this.environment.depsOptimizer?.isOptimizedDepFile(e))return e},async load(e){let t=this.environment,n=t.depsOptimizer;if(n?.isOptimizedDepFile(e)){let r=n.metadata,s=he(e),i=Gn.exec(e),a=i?i[1].split("=")[1]:void 0,o=as(r,s);if(o){a&&o.browserHash!==a&&!t.config.optimizeDeps.ignoreOutdatedRequests&&li(e);try{await o.processing}catch{mR(e)}let l=n.metadata;if(r!==l){let c=as(l,s);o.browserHash!==c?.browserHash&&!t.config.optimizeDeps.ignoreOutdatedRequests&&li(e)}}pR?.(`load ${j.default.cyan(s)}`);try{let[l,c]=await Promise.all([Ee.readFile(s,"utf-8"),Ee.readFile(`${s}.map`,"utf-8").then(u=>JSON.parse(u)).catch(()=>null)]);return c?{code:l,map:c}:l}catch{a&&!t.config.optimizeDeps.ignoreOutdatedRequests&&li(e),gR(e)}}}}}function mR(e){let t=new Error(`Something unexpected happened while optimizing "${e}". The current page should have reloaded by now`);throw t.code=Lx,t}function li(e){let t=new Error(`There is a new version of the pre-bundle for "${e}", a page reload is going to ask for it.`);throw t.code=yx,t}function gR(e){let t=new Error(`The file does not exist at "${e}" which is in the optimize deps directory. The dependency might be incompatible with the dep optimizer. Try adding it to \`optimizeDeps.exclude\`.`);throw t.code=Fx,t}var yR=/#/g,AR=/&/g,wR=/\//g,ER=/=/g,vR=/\+/g,_R=/%5e/gi,bR=/%60/gi,SR=/%7c/gi,xR=/%20/gi;function CR(e){return encodeURI(""+e).replace(SR,"|")}function ic(e){return CR(typeof e=="string"?e:JSON.stringify(e)).replace(vR,"%2B").replace(xR,"+").replace(yR,"%23").replace(AR,"%26").replace(bR,"`").replace(_R,"^").replace(wR,"%2F")}function rl(e){return ic(e).replace(ER,"%3D")}function IR(e,t){return(typeof t=="number"||typeof t=="boolean")&&(t=String(t)),t?Array.isArray(t)?t.map(n=>`${rl(e)}=${ic(n)}`).join("&"):`${rl(e)}=${ic(t)}`:rl(e)}function RR(e){return Object.keys(e).filter(t=>e[t]!==void 0).map(t=>IR(t,e[t])).filter(Boolean).join("&")}new Set(Rm);function kR(e){return(e||"").replace(/\/\/[^\n]*\n|\/\*.*\*\//g,"").replace(/\s+/g," ")}function TR(e){let t=e.replace(/{[^}]*}/,"");return{namespacedImport:t.match(/\* as \s*(\S*)/)?.[1],defaultImport:t.split(",").find(n=>!/[*{}]/.test(n))?.trim()||void 0}}var OR={}.hasOwnProperty,BR=/^([A-Z][a-z\d]*)+$/,$R=new Set(["string","function","number","object","Function","Object","boolean","bigint","symbol"]),pt={};function sl(e,t="and"){return e.length<3?e.join(` ${t} `):`${e.slice(0,-1).join(", ")}, ${t} ${e[e.length-1]}`}var ey=new Map,MR="__node_internal_",Np;pt.ERR_INVALID_ARG_TYPE=ht("ERR_INVALID_ARG_TYPE",(e,t,n)=>{an.ok(typeof e=="string","'name' must be a string"),Array.isArray(t)||(t=[t]);let r="The ";if(e.endsWith(" argument"))r+=`${e} `;else{let o=e.includes(".")?"property":"argument";r+=`"${e}" ${o} `}r+="must be ";let s=[],i=[],a=[];for(let o of t)an.ok(typeof o=="string","All expected entries have to be of type string"),$R.has(o)?s.push(o.toLowerCase()):BR.exec(o)===null?(an.ok(o!=="object",'The value "object" should be written as "Object"'),a.push(o)):i.push(o);if(i.length>0){let o=s.indexOf("object");o!==-1&&(s.slice(o,1),i.push("Object"))}return s.length>0&&(r+=`${s.length>1?"one of type":"of type"} ${sl(s,"or")}`,(i.length>0||a.length>0)&&(r+=" or ")),i.length>0&&(r+=`an instance of ${sl(i,"or")}`,a.length>0&&(r+=" or ")),a.length>0&&(a.length>1?r+=`one of ${sl(a,"or")}`:(a[0].toLowerCase()!==a[0]&&(r+="an "),r+=`${a[0]}`)),r+=`. Received ${FR(n)}`,r},TypeError);pt.ERR_INVALID_MODULE_SPECIFIER=ht("ERR_INVALID_MODULE_SPECIFIER",(e,t,n=void 0)=>`Invalid module "${e}" ${t}${n?` imported from ${n}`:""}`,TypeError);pt.ERR_INVALID_PACKAGE_CONFIG=ht("ERR_INVALID_PACKAGE_CONFIG",(e,t,n)=>`Invalid package config ${e}${t?` while importing ${t}`:""}${n?`. ${n}`:""}`,Error);pt.ERR_INVALID_PACKAGE_TARGET=ht("ERR_INVALID_PACKAGE_TARGET",(e,t,n,r=!1,s=void 0)=>{let i=typeof n=="string"&&!r&&n.length>0&&!n.startsWith("./");return t==="."?(an.ok(r===!1),`Invalid "exports" main target ${JSON.stringify(n)} defined in the package config ${e}package.json${s?` imported from ${s}`:""}${i?'; targets must start with "./"':""}`):`Invalid "${r?"imports":"exports"}" target ${JSON.stringify(n)} defined for '${t}' in the package config ${e}package.json${s?` imported from ${s}`:""}${i?'; targets must start with "./"':""}`},Error);pt.ERR_MODULE_NOT_FOUND=ht("ERR_MODULE_NOT_FOUND",(e,t,n=!1)=>`Cannot find ${n?"module":"package"} '${e}' imported from ${t}`,Error);pt.ERR_NETWORK_IMPORT_DISALLOWED=ht("ERR_NETWORK_IMPORT_DISALLOWED","import of '%s' by %s is not supported: %s",Error);pt.ERR_PACKAGE_IMPORT_NOT_DEFINED=ht("ERR_PACKAGE_IMPORT_NOT_DEFINED",(e,t,n)=>`Package import specifier "${e}" is not defined${t?` in package ${t}package.json`:""} imported from ${n}`,TypeError);pt.ERR_PACKAGE_PATH_NOT_EXPORTED=ht("ERR_PACKAGE_PATH_NOT_EXPORTED",(e,t,n=void 0)=>t==="."?`No "exports" main defined in ${e}package.json${n?` imported from ${n}`:""}`:`Package subpath '${t}' is not defined by "exports" in ${e}package.json${n?` imported from ${n}`:""}`,Error);pt.ERR_UNSUPPORTED_DIR_IMPORT=ht("ERR_UNSUPPORTED_DIR_IMPORT","Directory import '%s' is not supported resolving ES modules imported from %s",Error);pt.ERR_UNSUPPORTED_RESOLVE_REQUEST=ht("ERR_UNSUPPORTED_RESOLVE_REQUEST",'Failed to resolve module specifier "%s" from "%s": Invalid relative URL or base scheme is not hierarchical.',TypeError);pt.ERR_UNKNOWN_FILE_EXTENSION=ht("ERR_UNKNOWN_FILE_EXTENSION",(e,t)=>`Unknown file extension "${e}" for ${t}`,TypeError);pt.ERR_INVALID_ARG_VALUE=ht("ERR_INVALID_ARG_VALUE",(e,t,n="is invalid")=>{let r=Wn(t);return r.length>128&&(r=`${r.slice(0,128)}...`),`The ${e.includes(".")?"property":"argument"} '${e}' ${n}. Received ${r}`},TypeError);function ht(e,t,n){return ey.set(e,t),DR(n,e)}function DR(e,t){return n;function n(...r){let s=Error.stackTraceLimit;oc()&&(Error.stackTraceLimit=0);let i=new e;oc()&&(Error.stackTraceLimit=s);let a=LR(t,r,i);return Object.defineProperties(i,{message:{value:a,enumerable:!1,writable:!0,configurable:!0},toString:{value(){return`${this.name} [${t}]: ${this.message}`},enumerable:!1,writable:!0,configurable:!0}}),NR(i),i.code=t,i}}function oc(){try{if(QS.startupSnapshot.isBuildingSnapshot())return!1}catch{}let e=Object.getOwnPropertyDescriptor(Error,"stackTraceLimit");return e===void 0?Object.isExtensible(Error):OR.call(e,"writable")&&e.writable!==void 0?e.writable:e.set!==void 0}function PR(e){let t=MR+e.name;return Object.defineProperty(e,"name",{value:t}),e}var NR=PR(function(e){let t=oc();return t&&(Np=Error.stackTraceLimit,Error.stackTraceLimit=Number.POSITIVE_INFINITY),Error.captureStackTrace(e),t&&(Error.stackTraceLimit=Np),e});function LR(e,t,n){let r=ey.get(e);if(an.ok(r!==void 0,"expected `message` to be found"),typeof r=="function")return an.ok(r.length<=t.length,`Code: ${e}; The provided arguments length (${t.length}) does not match the required ones (${r.length}).`),Reflect.apply(r,n,t);let s=/%[dfijoOs]/g,i=0;for(;s.exec(r)!==null;)i++;return an.ok(i===t.length,`Code: ${e}; The provided arguments length (${t.length}) does not match the required ones (${i}).`),t.length===0?r:(t.unshift(r),Reflect.apply(MS,null,t))}function FR(e){if(e==null)return String(e);if(typeof e=="function"&&e.name)return`function ${e.name}`;if(typeof e=="object")return e.constructor&&e.constructor.name?`an instance of ${e.constructor.name}`:`${Wn(e,{depth:-1})}`;let t=Wn(e,{colors:!1});return t.length>28&&(t=`${t.slice(0,25)}...`),`type ${typeof e} (${t})`}var jR=Object.freeze(["node","import"]);new Set(jR);var Lp=/(?<=\s|^|;|\})import\s*(?:[\s"']*(?<imports>[\p{L}\p{M}\w\t\n\r $*,/{}@.]+)from\s*)?["']\s*(?<specifier>(?<="\s*)[^"]*[^\s"](?=\s*")|(?<='\s*)[^']*[^\s'](?=\s*'))\s*["'][\s;]*/gmu,QR=/^\s*?type\s/;function UR(e){let t=kR(e.imports),n={},r=t.match(/{([^}]*)}/)?.[1]?.split(",")||[];for(let a of r){let o=a.match(/^\s*(\S*) as (\S*)\s*$/),l=o?.[1]||a.trim(),c=o?.[2]||l;l&&!QR.test(l)&&(n[l]=c)}let{namespacedImport:s,defaultImport:i}=TR(t);return{...e,defaultImport:i,namespacedImport:s,namedImports:n}}var HR=le(((e,t)=>{function n(i){return i.replace(/\\\$/g,"$")}function r(i,a,o){let l={...o,...a},c=/(?<!\\)\${([^{}]+)}|(?<!\\)\$([A-Za-z_][A-Za-z0-9_]*)/g,u=i,f,d=new Set;for(;(f=c.exec(u))!==null;){d.add(u);let[p,h,y]=f,m=h||y,w=m.match(/(:\+|\+|:-|-)/),A=w?w[0]:null,g=m.split(A),E,v,S=g.shift();if([":+","+"].includes(A)?(E=l[S]?g.join(A):"",v=null):(E=g.join(A),v=l[S]),v?d.has(v)?u=u.replace(p,E):u=u.replace(p,v):u=u.replace(p,E),u===o[S])break;c.lastIndex=0}return u}function s(i){let a=process.env;i&&i.processEnv!=null&&(a=i.processEnv);for(let o in i.parsed){let l=i.parsed[o];a[o]&&a[o]!==l?l=a[o]:l=r(l,a,i.parsed),i.parsed[o]=n(l)}for(let o in i.parsed)a[o]=i.parsed[o];return i}t.exports.expand=s}))(),il=Re("vite:env");function qc(e,t){return t!==!1?[".env",".env.local",`.env.${e}`,`.env.${e}.local`].map(n=>re(L.join(t,n))):[]}function WR(e,t,n="VITE_"){let r=performance.now(),s=()=>`${(performance.now()-r).toFixed(2)}ms`;if(e==="local")throw new Error('"local" cannot be used as a mode name because it conflicts with the .local postfix for .env files.');n=He(n);let i={},a=qc(e,t);il?.("loading env files: %O",a);let o=Object.fromEntries(a.flatMap(c=>{let u=_t(c);if(!u||!u.isFile()&&!u.isFIFO())return[];let f=PS(pe.readFileSync(c,"utf-8"));return Object.entries(f)}));il?.(`env files loaded in ${s()}`),o.NODE_ENV&&process.env.VITE_USER_NODE_ENV===void 0&&(process.env.VITE_USER_NODE_ENV=o.NODE_ENV),o.BROWSER&&process.env.BROWSER===void 0&&(process.env.BROWSER=o.BROWSER),o.BROWSER_ARGS&&process.env.BROWSER_ARGS===void 0&&(process.env.BROWSER_ARGS=o.BROWSER_ARGS);let l={...process.env};(0,HR.expand)({parsed:o,processEnv:l});for(let[c,u]of Object.entries(o))n.some(f=>c.startsWith(f))&&(i[c]=u);for(let c of n)Object.assign(i,rx({prefix:c}));for(let c in process.env)n.some(u=>c.startsWith(u))&&(i[c]=process.env[c]);return il?.("using resolved env: %O",i),i}function ty({envPrefix:e="VITE_"}){if(e=He(e),e.includes(""))throw new Error("envPrefix option contains value '', which could lead unexpected exposure of sensitive information.");return e.some(t=>/\s/.test(t))&&console.warn(j.default.yellow("[vite] Warning: envPrefix option contains values with whitespace, which does not work in practice.")),e}var GR="https://vite.dev",zR={removePluginHookSsrArgument:"this-environment-in-hooks",removePluginHookHandleHotUpdate:"hotupdate-hook",removeServerModuleGraph:"per-environment-apis",removeServerReloadModule:"per-environment-apis",removeServerPluginContainer:"per-environment-apis",removeServerHot:"per-environment-apis",removeServerTransformRequest:"per-environment-apis",removeServerWarmupRequest:"per-environment-apis",removeSsrLoadModule:"ssr-using-modulerunner"},JR={removePluginHookSsrArgument:"Plugin hook `options.ssr` is replaced with `this.environment.config.consumer === 'server'`.",removePluginHookHandleHotUpdate:"Plugin hook `handleHotUpdate()` is replaced with `hotUpdate()`.",removeServerModuleGraph:"The `server.moduleGraph` is replaced with `this.environment.moduleGraph`.",removeServerReloadModule:"The `server.reloadModule` is replaced with `environment.reloadModule`.",removeServerPluginContainer:"The `server.pluginContainer` is replaced with `this.environment.pluginContainer`.",removeServerHot:"The `server.hot` is replaced with `this.environment.hot`.",removeServerTransformRequest:"The `server.transformRequest` is replaced with `this.environment.transformRequest`.",removeServerWarmupRequest:"The `server.warmupRequest` is replaced with `this.environment.warmupRequest`.",removeSsrLoadModule:"The `server.ssrLoadModule` is replaced with Environment Runner."},ci=!1;function ui(e,t){return!!e.future?.[t]}function Xe(e,t,n,r=!0){if(ci||!e.future||e.future[t]!=="warn")return;let s=`[vite future] ${JR[t]}`;n&&(s+=` ${n}`),s=j.default.yellow(s);let i=`${GR}/changes/${zR[t].toLowerCase()}`;if(s+=j.default.gray(`
|
|
127
|
-
${r?"\u251C":"\u2514"}\u2500\u2500\u2500 `)+j.default.underline(i)+`
|
|
128
|
-
`,r){let a=new Error().stack;if(a){let o=a.split(`
|
|
129
|
-
`).slice(3).filter(l=>!l.includes("/node_modules/vite/dist/"));o.length===0&&o.push("No stack trace found."),o=o.map((l,c)=>` ${c===o.length-1?"\u2514":"\u2502"} ${l.trim()}`),s+=j.default.dim(o.join(`
|
|
130
|
-
`))+`
|
|
131
|
-
`}}e.logger.warnOnce(s)}function KR(e){let t=ci;ci=!0;let n=e();return ci=t,n}function Qn(e){return{message:za(e.message),stack:za(ny(e.stack||"")),id:e.id,frame:za(e.frame||""),plugin:e.plugin,pluginCode:e.pluginCode?.toString(),loc:e.loc}}function Un(e,t=[],n=!0){e.plugin&&t.push(` Plugin: ${j.default.magenta(e.plugin)}`);let r=e.loc?`:${e.loc.line}:${e.loc.column}`:"";return e.id&&t.push(` File: ${j.default.cyan(e.id)}${r}`),e.frame&&t.push(j.default.yellow(lp(e.frame))),n&&e.stack&&t.push(lp(ny(e.stack))),t.join(`
|
|
132
|
-
`)}function ny(e){return e.split(/\n/).filter(t=>/^\s*at/.test(t)).join(`
|
|
133
|
-
`)}function VR(e,t){let n=Un(t,[j.default.red(`Internal server error: ${t.message}`)]);e.config.logger.error(n,{clear:!0,timestamp:!0,error:t}),e.environments.client.hot.send({type:"error",err:Qn(t)})}function qR(e,t=!1){return function(r,s,i,a){VR(e,r),t?a():(i.statusCode=500,i.end(`
|
|
134
|
-
<!DOCTYPE html>
|
|
135
|
-
<html lang="en">
|
|
136
|
-
<head>
|
|
137
|
-
<meta charset="UTF-8" />
|
|
138
|
-
<title>Error</title>
|
|
139
|
-
<script type="module">
|
|
140
|
-
const error = ${JSON.stringify(Qn(r)).replace(/</g,"\\u003c")}
|
|
141
|
-
try {
|
|
142
|
-
const { ErrorOverlay } = await import(${JSON.stringify(L.posix.join(e.config.base,ds))})
|
|
143
|
-
document.body.appendChild(new ErrorOverlay(error))
|
|
144
|
-
} catch {
|
|
145
|
-
const h = (tag, text) => {
|
|
146
|
-
const el = document.createElement(tag)
|
|
147
|
-
el.textContent = text
|
|
148
|
-
return el
|
|
149
|
-
}
|
|
150
|
-
document.body.appendChild(h('h1', 'Internal Server Error'))
|
|
151
|
-
document.body.appendChild(h('h2', error.message))
|
|
152
|
-
document.body.appendChild(h('pre', error.stack))
|
|
153
|
-
document.body.appendChild(h('p', '(Error overlay failed to load)'))
|
|
154
|
-
}
|
|
155
|
-
</script>
|
|
156
|
-
</head>
|
|
157
|
-
<body>
|
|
158
|
-
</body>
|
|
159
|
-
</html>
|
|
160
|
-
`))}}var YR=le(((e,t)=>{t.exports=i;var n=/(?:[^\x21\x25\x26-\x3B\x3D\x3F-\x5B\x5D\x5F\x61-\x7A\x7E]|%(?:[^0-9A-Fa-f]|[0-9A-Fa-f][^0-9A-Fa-f]|$))+/g,r=/(^|[^\uD800-\uDBFF])[\uDC00-\uDFFF]|[\uD800-\uDBFF]([^\uDC00-\uDFFF]|$)/g,s="$1\uFFFD$2";function i(a){return String(a).replace(r,s).replace(n,encodeURI)}}));var ry=le(((e,t)=>{var n=/["'&<>]/;t.exports=r;function r(s){var i=""+s,a=n.exec(i);if(!a)return i;var o,l="",c=0,u=0;for(c=a.index;c<i.length;c++){switch(i.charCodeAt(c)){case 34:o=""";break;case 38:o="&";break;case 39:o="'";break;case 60:o="<";break;case 62:o=">";break;default:continue}u!==c&&(l+=i.substring(u,c)),u=c+1,l+=o}return u!==c?l+i.substring(u,c):l}}));var XR=le(((e,t)=>{t.exports=n;function n(s,i){if(!Array.isArray(s))throw new TypeError("arg must be an array of [ee, events...] arrays");for(var a=[],o=0;o<s.length;o++){var l=s[o];if(!Array.isArray(l)||l.length<2)throw new TypeError("each array member must be [ee, events...]");for(var c=l[0],u=1;u<l.length;u++){var f=l[u],d=r(f,p);c.on(f,d),a.push({ee:c,event:f,fn:d})}}function p(){h(),i.apply(null,arguments)}function h(){for(var m,w=0;w<a.length;w++)m=a[w],m.ee.removeListener(m.event,m.fn)}function y(m){i=m}return y.cancel=h,y}function r(s,i){return function(o){for(var l=new Array(arguments.length),c=this,u=s==="error"?o:null,f=0;f<l.length;f++)l[f]=arguments[f];i(u,c,s,l)}}}));var ZR=le(((e,t)=>{t.exports=s,t.exports.isFinished=i;var n=XR(),r=typeof setImmediate=="function"?setImmediate:function(u){process.nextTick(u.bind.apply(u,arguments))};function s(u,f){return i(u)!==!1?(r(f,null,u),u):(o(u,f),u)}function i(u){var f=u.socket;if(typeof u.finished=="boolean")return!!(u.finished||f&&!f.writable);if(typeof u.complete=="boolean")return!!(u.upgrade||!f||!f.readable||u.complete&&!u.readable)}function a(u,f){var d,p,h=!1;function y(w){d.cancel(),p.cancel(),h=!0,f(w)}d=p=n([[u,"end","finish"]],y);function m(w){u.removeListener("socket",m),!h&&d===p&&(p=n([[w,"error","close"]],y))}if(u.socket){m(u.socket);return}u.on("socket",m),u.socket===void 0&&c(u,m)}function o(u,f){var d=u.__onFinished;(!d||!d.queue)&&(d=u.__onFinished=l(u),a(u,d)),d.queue.push(f)}function l(u){function f(d){if(u.__onFinished===f&&(u.__onFinished=null),!!f.queue){var p=f.queue;f.queue=null;for(var h=0;h<p.length;h++)p[h](d,u)}}return f.queue=[],f}function c(u,f){var d=u.assignSocket;typeof d=="function"&&(u.assignSocket=function(h){d.call(this,h),f(h)})}}));var sy=le(((e,t)=>{var n=ce("url"),r=n.parse,s=n.Url;t.exports=i,t.exports.original=a;function i(c){var u=c.url;if(u!==void 0){var f=c._parsedUrl;return l(u,f)?f:(f=o(u),f._raw=u,c._parsedUrl=f)}}function a(c){var u=c.originalUrl;if(typeof u!="string")return i(c);var f=c._parsedOriginalUrl;return l(u,f)?f:(f=o(u),f._raw=u,c._parsedOriginalUrl=f)}function o(c){if(typeof c!="string"||c.charCodeAt(0)!==47)return r(c);for(var u=c,f=null,d=null,p=1;p<c.length;p++)switch(c.charCodeAt(p)){case 63:d===null&&(u=c.substring(0,p),f=c.substring(p+1),d=c.substring(p));break;case 9:case 10:case 12:case 13:case 32:case 35:case 160:case 65279:return r(c)}var h=s!==void 0?new s:{};return h.path=c,h.href=c,h.pathname=u,d!==null&&(h.query=f,h.search=d),h}function l(c,u){return typeof u=="object"&&u!==null&&(s===void 0||u instanceof s)&&u._raw===c}})),ek=le(((e,t)=>{t.exports={100:"Continue",101:"Switching Protocols",102:"Processing",103:"Early Hints",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",306:"(Unused)",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}}));var tk=le(((e,t)=>{var n=ek();t.exports=s,s.STATUS_CODES=n,s.codes=r(s,n),s.redirect={300:!0,301:!0,302:!0,303:!0,305:!0,307:!0,308:!0},s.empty={204:!0,205:!0,304:!0},s.retry={502:!0,503:!0,504:!0};function r(i,a){var o=[];return Object.keys(a).forEach(function(c){var u=a[c],f=Number(c);i[f]=u,i[u]=f,i[u.toLowerCase()]=f,o.push(f)}),o}function s(i){if(typeof i=="number"){if(!s[i])throw new Error("invalid status code: "+i);return i}if(typeof i!="string")throw new TypeError("code must be a number or string");var a=parseInt(i,10);if(!isNaN(a)){if(!s[a])throw new Error("invalid status code: "+a);return a}if(a=s[i.toLowerCase()],!a)throw new Error('invalid status message: "'+i+'"');return a}}));var nk=le(((e,t)=>{t.exports=r;function n(s){for(var i=s.listeners("data"),a=0;a<i.length;a++)if(i[a].name==="ondata")return!0;return!1}function r(s){if(!s)throw new TypeError("argument stream is required");if(typeof s.unpipe=="function"){s.unpipe();return}if(n(s))for(var i,a=s.listeners("close"),o=0;o<a.length;o++)i=a[o],!(i.name!=="cleanup"&&i.name!=="onclose")&&i.call(s)}}));var rk=le(((e,t)=>{var n=(tr(),us(ps))("finalhandler"),r=YR(),s=ry(),i=ZR(),a=sy(),o=tk(),l=nk(),c=/\x20{2}/g,u=/\n/g,f=typeof setImmediate=="function"?setImmediate:function(b){process.nextTick(b.bind.apply(b,arguments))},d=i.isFinished;function p(b){return`<!DOCTYPE html>
|
|
161
|
-
<html lang="en">
|
|
162
|
-
<head>
|
|
163
|
-
<meta charset="utf-8">
|
|
164
|
-
<title>Error</title>
|
|
165
|
-
</head>
|
|
166
|
-
<body>
|
|
167
|
-
<pre>`+s(b).replace(u,"<br>").replace(c," ")+`</pre>
|
|
168
|
-
</body>
|
|
169
|
-
</html>
|
|
170
|
-
`}t.exports=h;function h(b,_,C){var x=C||{},T=x.env||process.env.NODE_ENV||"development",k=x.onerror;return function(O){var R,I,M;if(!O&&E(_)){n("cannot 404 after headers sent");return}if(O?(M=w(O),M===void 0?M=g(_):R=y(O),I=m(O,M,T)):(M=404,I="Cannot "+b.method+" "+r(A(b))),n("default %s",M),O&&k&&f(k,O,b,_),E(_)){n("cannot %d after headers sent",M),b.socket.destroy();return}v(b,_,M,R,I)}}function y(b){if(!(!b.headers||typeof b.headers!="object")){for(var _=Object.create(null),C=Object.keys(b.headers),x=0;x<C.length;x++){var T=C[x];_[T]=b.headers[T]}return _}}function m(b,_,C){var x;return C!=="production"&&(x=b.stack,!x&&typeof b.toString=="function"&&(x=b.toString())),x||o[_]}function w(b){if(typeof b.status=="number"&&b.status>=400&&b.status<600)return b.status;if(typeof b.statusCode=="number"&&b.statusCode>=400&&b.statusCode<600)return b.statusCode}function A(b){try{return a.original(b).pathname}catch{return"resource"}}function g(b){var _=b.statusCode;return(typeof _!="number"||_<400||_>599)&&(_=500),_}function E(b){return typeof b.headersSent!="boolean"?!!b._header:b.headersSent}function v(b,_,C,x,T){function k(){var O=p(T);if(_.statusCode=C,_.statusMessage=o[C],S(_,x),_.setHeader("Content-Security-Policy","default-src 'none'"),_.setHeader("X-Content-Type-Options","nosniff"),_.setHeader("Content-Type","text/html; charset=utf-8"),_.setHeader("Content-Length",Buffer.byteLength(O,"utf8")),b.method==="HEAD"){_.end();return}_.end(O,"utf8")}if(d(b)){k();return}l(b),i(b,k),b.resume()}function S(b,_){if(_)for(var C=Object.keys(_),x=0;x<C.length;x++){var T=C[x];b.setHeader(T,_[T])}}})),sk=le(((e,t)=>{e=t.exports=function(n,r){if(n&&r)for(var s in r)n[s]=r[s];return n}}));var ik=le(((e,t)=>{var n=(tr(),us(ps))("connect:dispatcher"),r=ce("events").EventEmitter,s=rk(),i=ce("http"),a=sk(),o=sy();t.exports=f;var l=process.env.NODE_ENV||"development",c={},u=typeof setImmediate=="function"?setImmediate:function(y){process.nextTick(y.bind.apply(y,arguments))};function f(){function y(m,w,A){y.handle(m,w,A)}return a(y,c),a(y,r.prototype),y.route="/",y.stack=[],y}c.use=function(m,w){var A=w,g=m;if(typeof m!="string"&&(A=m,g="/"),typeof A.handle=="function"){var E=A;E.route=g,A=function(v,S,b){E.handle(v,S,b)}}return A instanceof i.Server&&(A=A.listeners("request")[0]),g[g.length-1]==="/"&&(g=g.slice(0,-1)),n("use %s %s",g||"/",A.name||"anonymous"),this.stack.push({route:g,handle:A}),this},c.handle=function(m,w,A){var g=0,E=h(m.url)||"",v="",S=!1,b=this.stack,_=A||s(m,w,{env:l,onerror:p});m.originalUrl=m.originalUrl||m.url;function C(x){S&&(m.url=m.url.substr(1),S=!1),v.length!==0&&(m.url=E+v+m.url.substr(E.length),v="");var T=b[g++];if(!T){u(_,x);return}var k=o(m).pathname||"/",O=T.route;if(k.toLowerCase().substr(0,O.length)!==O.toLowerCase())return C(x);var R=k.length>O.length&&k[O.length];if(R&&R!=="/"&&R!==".")return C(x);O.length!==0&&O!=="/"&&(v=O,m.url=E+m.url.substr(E.length+v.length),!E&&m.url[0]!=="/"&&(m.url="/"+m.url,S=!0)),d(T.handle,O,x,m,w,C)}C()},c.listen=function(){var m=i.createServer(this);return m.listen.apply(m,arguments)};function d(y,m,w,A,g,E){var v=y.length,S=w,b=!!w;n("%s %s : %s",y.name||"<anonymous>",m,A.originalUrl);try{if(b&&v===4){y(w,A,g,E);return}else if(!b&&v<4){y(A,g,E);return}}catch(_){S=_}E(S)}function p(y){l!=="test"&&console.error(y.stack||y.toString())}function h(y){if(!(y.length===0||y[0]==="/")){var m=y.indexOf("://");return m!==-1&&y.lastIndexOf("?",m)===-1?y.substr(0,y.indexOf("/",3+m)):void 0}}}));var ok=le(((e,t)=>{var n=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable;function i(o){if(o==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(o)}function a(){try{if(!Object.assign)return!1;var o=new String("abc");if(o[5]="de",Object.getOwnPropertyNames(o)[0]==="5")return!1;for(var l={},c=0;c<10;c++)l["_"+String.fromCharCode(c)]=c;if(Object.getOwnPropertyNames(l).map(function(f){return l[f]}).join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(f){u[f]=f}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}t.exports=a()?Object.assign:function(o,l){for(var c,u=i(o),f,d=1;d<arguments.length;d++){c=Object(arguments[d]);for(var p in c)r.call(c,p)&&(u[p]=c[p]);if(n){f=n(c);for(var h=0;h<f.length;h++)s.call(c,f[h])&&(u[f[h]]=c[f[h]])}}return u}}));var ak=le(((e,t)=>{t.exports=i,t.exports.append=r;var n=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function r(a,o){if(typeof a!="string")throw new TypeError("header argument is required");if(!o)throw new TypeError("field argument is required");for(var l=Array.isArray(o)?o:s(String(o)),c=0;c<l.length;c++)if(!n.test(l[c]))throw new TypeError("field argument contains an invalid header name");if(a==="*")return a;var u=a,f=s(a.toLowerCase());if(l.indexOf("*")!==-1||f.indexOf("*")!==-1)return"*";for(var d=0;d<l.length;d++){var p=l[d].toLowerCase();f.indexOf(p)===-1&&(f.push(p),u=u?u+", "+l[d]:l[d])}return u}function s(a){for(var o=0,l=[],c=0,u=0,f=a.length;u<f;u++)switch(a.charCodeAt(u)){case 32:c===o&&(c=o=u+1);break;case 44:l.push(a.substring(c,o)),c=o=u+1;break;default:o=u+1}return l.push(a.substring(c,o)),l}function i(a,o){if(!a||!a.getHeader||!a.setHeader)throw new TypeError("res argument is required");var l=a.getHeader("Vary")||"";(l=r(Array.isArray(l)?l.join(", "):String(l),o))&&a.setHeader("Vary",l)}})),lk=le(((e,t)=>{(function(){"use strict";var n=ok(),r=ak(),s={origin:"*",methods:"GET,HEAD,PUT,PATCH,POST,DELETE",preflightContinue:!1,optionsSuccessStatus:204};function i(m){return typeof m=="string"||m instanceof String}function a(m,w){if(Array.isArray(w)){for(var A=0;A<w.length;++A)if(a(m,w[A]))return!0;return!1}else return i(w)?m===w:w instanceof RegExp?w.test(m):!!w}function o(m,w){var A=w.headers.origin,g=[],E;return!m.origin||m.origin==="*"?g.push([{key:"Access-Control-Allow-Origin",value:"*"}]):i(m.origin)?(g.push([{key:"Access-Control-Allow-Origin",value:m.origin}]),g.push([{key:"Vary",value:"Origin"}])):(E=a(A,m.origin),g.push([{key:"Access-Control-Allow-Origin",value:E?A:!1}]),g.push([{key:"Vary",value:"Origin"}])),g}function l(m){var w=m.methods;return w.join&&(w=m.methods.join(",")),{key:"Access-Control-Allow-Methods",value:w}}function c(m){return m.credentials===!0?{key:"Access-Control-Allow-Credentials",value:"true"}:null}function u(m,w){var A=m.allowedHeaders||m.headers,g=[];return A?A.join&&(A=A.join(",")):(A=w.headers["access-control-request-headers"],g.push([{key:"Vary",value:"Access-Control-Request-Headers"}])),A&&A.length&&g.push([{key:"Access-Control-Allow-Headers",value:A}]),g}function f(m){var w=m.exposedHeaders;if(w)w.join&&(w=w.join(","));else return null;return w&&w.length?{key:"Access-Control-Expose-Headers",value:w}:null}function d(m){var w=(typeof m.maxAge=="number"||m.maxAge)&&m.maxAge.toString();return w&&w.length?{key:"Access-Control-Max-Age",value:w}:null}function p(m,w){for(var A=0,g=m.length;A<g;A++){var E=m[A];E&&(Array.isArray(E)?p(E,w):E.key==="Vary"&&E.value?r(w,E.value):E.value&&w.setHeader(E.key,E.value))}}function h(m,w,A,g){var E=[];(w.method&&w.method.toUpperCase&&w.method.toUpperCase())==="OPTIONS"?(E.push(o(m,w)),E.push(c(m)),E.push(l(m)),E.push(u(m,w)),E.push(d(m)),E.push(f(m)),p(E,A),m.preflightContinue?g():(A.statusCode=m.optionsSuccessStatus,A.setHeader("Content-Length","0"),A.end())):(E.push(o(m,w)),E.push(c(m)),E.push(f(m)),p(E,A),g())}function y(m){var w=null;return typeof m=="function"?w=m:w=function(A,g){g(null,m)},function(g,E,v){w(g,function(S,b){if(S)v(S);else{var _=n({},s,b),C=null;_.origin&&typeof _.origin=="function"?C=_.origin:_.origin&&(C=function(x,T){T(null,_.origin)}),C?C(g.headers.origin,function(x,T){x||!T?v(x):(_.origin=T,h(_,g,E,v))}):v()}})}}t.exports=y})()})),ck=le(((e,t)=>{let n=ce("fs"),{Readable:r}=ce("stream"),s=ce("path"),{promisify:i}=ce("util"),a=ce("picomatch"),o=i(n.readdir),l=i(n.stat),c=i(n.lstat),u=i(n.realpath),f="!",d="READDIRP_RECURSIVE_ERROR",p=new Set(["ENOENT","EPERM","EACCES","ELOOP",d]),h="files",y="directories",m="files_directories",w="all",A=[h,y,m,w],g=T=>p.has(T.code),[E,v]=process.versions.node.split(".").slice(0,2).map(T=>Number.parseInt(T,10)),S=process.platform==="win32"&&(E>10||E===10&&v>=5),b=T=>{if(T!==void 0){if(typeof T=="function")return T;if(typeof T=="string"){let k=a(T.trim());return O=>k(O.basename)}if(Array.isArray(T)){let k=[],O=[];for(let R of T){let I=R.trim();I.charAt(0)===f?O.push(a(I.slice(1))):k.push(a(I))}return O.length>0?k.length>0?R=>k.some(I=>I(R.basename))&&!O.some(I=>I(R.basename)):R=>!O.some(I=>I(R.basename)):R=>k.some(I=>I(R.basename))}}};var _=class iy extends r{static get defaultOptions(){return{root:".",fileFilter:k=>!0,directoryFilter:k=>!0,type:h,lstat:!1,depth:2147483648,alwaysStat:!1}}constructor(k={}){super({objectMode:!0,autoDestroy:!0,highWaterMark:k.highWaterMark||4096});let O={...iy.defaultOptions,...k},{root:R,type:I}=O;this._fileFilter=b(O.fileFilter),this._directoryFilter=b(O.directoryFilter);let M=O.lstat?c:l;S?this._stat=B=>M(B,{bigint:!0}):this._stat=M,this._maxDepth=O.depth,this._wantsDir=[y,m,w].includes(I),this._wantsFile=[h,m,w].includes(I),this._wantsEverything=I===w,this._root=s.resolve(R),this._isDirent="Dirent"in n&&!O.alwaysStat,this._statsProp=this._isDirent?"dirent":"stats",this._rdOptions={encoding:"utf8",withFileTypes:this._isDirent},this.parents=[this._exploreDir(R,1)],this.reading=!1,this.parent=void 0}async _read(k){if(!this.reading){this.reading=!0;try{for(;!this.destroyed&&k>0;){let{path:O,depth:R,files:I=[]}=this.parent||{};if(I.length>0){let M=I.splice(0,k).map(B=>this._formatEntry(B,O));for(let B of await Promise.all(M)){if(this.destroyed)return;let U=await this._getEntryType(B);U==="directory"&&this._directoryFilter(B)?(R<=this._maxDepth&&this.parents.push(this._exploreDir(B.fullPath,R+1)),this._wantsDir&&(this.push(B),k--)):(U==="file"||this._includeAsFile(B))&&this._fileFilter(B)&&this._wantsFile&&(this.push(B),k--)}}else{let M=this.parents.pop();if(!M){this.push(null);break}if(this.parent=await M,this.destroyed)return}}}catch(O){this.destroy(O)}finally{this.reading=!1}}}async _exploreDir(k,O){let R;try{R=await o(k,this._rdOptions)}catch(I){this._onError(I)}return{files:R,depth:O,path:k}}async _formatEntry(k,O){let R;try{let I=this._isDirent?k.name:k,M=s.resolve(s.join(O,I));R={path:s.relative(this._root,M),fullPath:M,basename:I},R[this._statsProp]=this._isDirent?k:await this._stat(M)}catch(I){this._onError(I)}return R}_onError(k){g(k)&&!this.destroyed?this.emit("warn",k):this.destroy(k)}async _getEntryType(k){let O=k&&k[this._statsProp];if(O){if(O.isFile())return"file";if(O.isDirectory())return"directory";if(O&&O.isSymbolicLink()){let R=k.fullPath;try{let I=await u(R),M=await c(I);if(M.isFile())return"file";if(M.isDirectory()){let B=I.length;if(R.startsWith(I)&&R.substr(B,1)===s.sep){let U=new Error(`Circular symlink detected: "${R}" points to "${I}"`);return U.code=d,this._onError(U)}return"directory"}}catch(I){this._onError(I)}}}}_includeAsFile(k){let O=k&&k[this._statsProp];return O&&this._wantsEverything&&!O.isDirectory()}};let C=(T,k={})=>{let O=k.entryType||k.type;if(O==="both"&&(O=m),O&&(k.type=O),T){if(typeof T!="string")throw new TypeError("readdirp: root argument must be a string. Usage: readdirp(root, options)");if(O&&!A.includes(O))throw new Error(`readdirp: Invalid type passed. Use one of ${A.join(", ")}`)}else throw new Error("readdirp: root argument is required. Usage: readdirp(root, options)");return k.root=T,new _(k)},x=(T,k={})=>new Promise((O,R)=>{let I=[];C(T,k).on("data",M=>I.push(M)).on("end",()=>O(I)).on("error",M=>R(M))});C.promise=x,C.ReaddirpStream=_,C.default=C,t.exports=C})),oy=le(((e,t)=>{t.exports=function(n,r){if(typeof n!="string")throw new TypeError("expected path to be a string");if(n==="\\"||n==="/")return"/";var s=n.length;if(s<=1)return n;var i="";if(s>4&&n[3]==="\\"){var a=n[2];(a==="?"||a===".")&&n.slice(0,2)==="\\\\"&&(n=n.slice(2),i="//")}var o=n.split(/[/\\]+/);return r!==!1&&o[o.length-1]===""&&o.pop(),i+o.join("/")}})),uk=le(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0});let n=ce("picomatch"),r=oy(),s="!",i={returnIndex:!1},a=u=>Array.isArray(u)?u:[u],o=(u,f)=>{if(typeof u=="function")return u;if(typeof u=="string"){let d=n(u,f);return p=>u===p||d(p)}return u instanceof RegExp?d=>u.test(d):d=>!1},l=(u,f,d,p)=>{let h=Array.isArray(d),y=h?d[0]:d;if(!h&&typeof y!="string")throw new TypeError("anymatch: second argument must be a string: got "+Object.prototype.toString.call(y));let m=r(y,!1);for(let A=0;A<f.length;A++){let g=f[A];if(g(m))return p?-1:!1}let w=h&&[m].concat(d.slice(1));for(let A=0;A<u.length;A++){let g=u[A];if(h?g(...w):g(m))return p?A:!0}return p?-1:!1},c=(u,f,d=i)=>{if(u==null)throw new TypeError("anymatch: specify first argument");let p=typeof d=="boolean"?{returnIndex:d}:d,h=p.returnIndex||!1,y=a(u),m=y.filter(A=>typeof A=="string"&&A.charAt(0)===s).map(A=>A.slice(1)).map(A=>n(A,p)),w=y.filter(A=>typeof A!="string"||typeof A=="string"&&A.charAt(0)!==s).map(A=>o(A,p));return f==null?(A,g=!1)=>l(w,m,A,typeof g=="boolean"?g:!1):l(w,m,f,h)};c.default=c,t.exports=c})),fk=le(((e,t)=>{t.exports=function(r){if(typeof r!="string"||r==="")return!1;for(var s;s=/(\\).|([@?!+*]\(.*\))/g.exec(r);){if(s[2])return!0;r=r.slice(s.index+s[0].length)}return!1}})),ay=le(((e,t)=>{var n=fk(),r={"{":"}","(":")","[":"]"},s=function(a){if(a[0]==="!")return!0;for(var o=0,l=-2,c=-2,u=-2,f=-2,d=-2;o<a.length;){if(a[o]==="*"||a[o+1]==="?"&&/[\].+)]/.test(a[o])||c!==-1&&a[o]==="["&&a[o+1]!=="]"&&(c<o&&(c=a.indexOf("]",o)),c>o&&(d===-1||d>c||(d=a.indexOf("\\",o),d===-1||d>c)))||u!==-1&&a[o]==="{"&&a[o+1]!=="}"&&(u=a.indexOf("}",o),u>o&&(d=a.indexOf("\\",o),d===-1||d>u))||f!==-1&&a[o]==="("&&a[o+1]==="?"&&/[:!=]/.test(a[o+2])&&a[o+3]!==")"&&(f=a.indexOf(")",o),f>o&&(d=a.indexOf("\\",o),d===-1||d>f))||l!==-1&&a[o]==="("&&a[o+1]!=="|"&&(l<o&&(l=a.indexOf("|",o)),l!==-1&&a[l+1]!==")"&&(f=a.indexOf(")",l),f>l&&(d=a.indexOf("\\",l),d===-1||d>f))))return!0;if(a[o]==="\\"){var p=a[o+1];o+=2;var h=r[p];if(h){var y=a.indexOf(h,o);y!==-1&&(o=y+1)}if(a[o]==="!")return!0}else o++}return!1},i=function(a){if(a[0]==="!")return!0;for(var o=0;o<a.length;){if(/[*?{}()[\]]/.test(a[o]))return!0;if(a[o]==="\\"){var l=a[o+1];o+=2;var c=r[l];if(c){var u=a.indexOf(c,o);u!==-1&&(o=u+1)}if(a[o]==="!")return!0}else o++}return!1};t.exports=function(o,l){if(typeof o!="string"||o==="")return!1;if(n(o))return!0;var c=s;return l&&l.strict===!1&&(c=i),c(o)}})),dk=le(((e,t)=>{var n=ay(),r=ce("path").posix.dirname,s=ce("os").platform()==="win32",i="/",a=/\\/g,o=/[\{\[].*[\}\]]$/,l=/(^|[^\\])([\{\[]|\([^\)]+$)/,c=/\\([\!\*\?\|\[\]\(\)\{\}])/g;t.exports=function(f,d){Object.assign({flipBackslashes:!0},d).flipBackslashes&&s&&f.indexOf(i)<0&&(f=f.replace(a,i)),o.test(f)&&(f+=i),f+="a";do f=r(f);while(n(f)||l.test(f));return f.replace(c,"$1")}})),Yc=le((e=>{e.isInteger=t=>typeof t=="number"?Number.isInteger(t):typeof t=="string"&&t.trim()!==""?Number.isInteger(Number(t)):!1,e.find=(t,n)=>t.nodes.find(r=>r.type===n),e.exceedsLimit=(t,n,r=1,s)=>s===!1||!e.isInteger(t)||!e.isInteger(n)?!1:(Number(n)-Number(t))/Number(r)>=s,e.escapeNode=(t,n=0,r)=>{let s=t.nodes[n];s&&(r&&s.type===r||s.type==="open"||s.type==="close")&&s.escaped!==!0&&(s.value="\\"+s.value,s.escaped=!0)},e.encloseBrace=t=>t.type!=="brace"?!1:t.commas>>0+t.ranges>>0===0?(t.invalid=!0,!0):!1,e.isInvalidBrace=t=>t.type!=="brace"?!1:t.invalid===!0||t.dollar?!0:t.commas>>0+t.ranges>>0===0||t.open!==!0||t.close!==!0?(t.invalid=!0,!0):!1,e.isOpenOrClose=t=>t.type==="open"||t.type==="close"?!0:t.open===!0||t.close===!0,e.reduce=t=>t.reduce((n,r)=>(r.type==="text"&&n.push(r.value),r.type==="range"&&(r.type="text"),n),[]),e.flatten=(...t)=>{let n=[],r=s=>{for(let i=0;i<s.length;i++){let a=s[i];if(Array.isArray(a)){r(a);continue}a!==void 0&&n.push(a)}return n};return r(t),n}})),Xc=le(((e,t)=>{let n=Yc();t.exports=(r,s={})=>{let i=(a,o={})=>{let l=s.escapeInvalid&&n.isInvalidBrace(o),c=a.invalid===!0&&s.escapeInvalid===!0,u="";if(a.value)return(l||c)&&n.isOpenOrClose(a)?"\\"+a.value:a.value;if(a.value)return a.value;if(a.nodes)for(let f of a.nodes)u+=i(f);return u};return i(r)}}));var pk=le(((e,t)=>{t.exports=function(n){return typeof n=="number"?n-n===0:typeof n=="string"&&n.trim()!==""?Number.isFinite?Number.isFinite(+n):isFinite(+n):!1}}));var hk=le(((e,t)=>{let n=pk(),r=(A,g,E)=>{if(n(A)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(g===void 0||A===g)return String(A);if(n(g)===!1)throw new TypeError("toRegexRange: expected the second argument to be a number.");let v={relaxZeros:!0,...E};typeof v.strictZeros=="boolean"&&(v.relaxZeros=v.strictZeros===!1);let S=String(v.relaxZeros),b=String(v.shorthand),_=String(v.capture),C=String(v.wrap),x=A+":"+g+"="+S+b+_+C;if(r.cache.hasOwnProperty(x))return r.cache[x].result;let T=Math.min(A,g),k=Math.max(A,g);if(Math.abs(T-k)===1){let B=A+"|"+g;return v.capture?`(${B})`:v.wrap===!1?B:`(?:${B})`}let O=m(A)||m(g),R={min:A,max:g,a:T,b:k},I=[],M=[];return O&&(R.isPadded=O,R.maxLen=String(R.max).length),T<0&&(M=o(k<0?Math.abs(k):1,Math.abs(T),R,v),T=R.a=0),k>=0&&(I=o(T,k,R,v)),R.negatives=M,R.positives=I,R.result=s(M,I,v),v.capture===!0?R.result=`(${R.result})`:v.wrap!==!1&&I.length+M.length>1&&(R.result=`(?:${R.result})`),r.cache[x]=R,R.result};function s(A,g,E){let v=l(A,g,"-",!1,E)||[],S=l(g,A,"",!1,E)||[],b=l(A,g,"-?",!0,E)||[];return v.concat(b).concat(S).join("|")}function i(A,g){let E=1,v=1,S=d(A,E),b=new Set([g]);for(;A<=S&&S<=g;)b.add(S),E+=1,S=d(A,E);for(S=p(g+1,v)-1;A<S&&S<=g;)b.add(S),v+=1,S=p(g+1,v)-1;return b=[...b],b.sort(u),b}function a(A,g,E){if(A===g)return{pattern:A,count:[],digits:0};let v=c(A,g),S=v.length,b="",_=0;for(let C=0;C<S;C++){let[x,T]=v[C];x===T?b+=x:x!=="0"||T!=="9"?b+=y(x,T,E):_++}return _&&(b+=E.shorthand===!0?"\\d":"[0-9]"),{pattern:b,count:[_],digits:S}}function o(A,g,E,v){let S=i(A,g),b=[],_=A,C;for(let x=0;x<S.length;x++){let T=S[x],k=a(String(_),String(T),v),O="";if(!E.isPadded&&C&&C.pattern===k.pattern){C.count.length>1&&C.count.pop(),C.count.push(k.count[0]),C.string=C.pattern+h(C.count),_=T+1;continue}E.isPadded&&(O=w(T,E,v)),k.string=O+k.pattern+h(k.count),b.push(k),_=T+1,C=k}return b}function l(A,g,E,v,S){let b=[];for(let _ of A){let{string:C}=_;!v&&!f(g,"string",C)&&b.push(E+C),v&&f(g,"string",C)&&b.push(E+C)}return b}function c(A,g){let E=[];for(let v=0;v<A.length;v++)E.push([A[v],g[v]]);return E}function u(A,g){return A>g?1:g>A?-1:0}function f(A,g,E){return A.some(v=>v[g]===E)}function d(A,g){return Number(String(A).slice(0,-g)+"9".repeat(g))}function p(A,g){return A-A%Math.pow(10,g)}function h(A){let[g=0,E=""]=A;return E||g>1?`{${g+(E?","+E:"")}}`:""}function y(A,g,E){return`[${A}${g-A===1?"":"-"}${g}]`}function m(A){return/^-?(0+)\d/.test(A)}function w(A,g,E){if(!g.isPadded)return A;let v=Math.abs(g.maxLen-String(A).length),S=E.relaxZeros!==!1;switch(v){case 0:return"";case 1:return S?"0?":"0";case 2:return S?"0{0,2}":"00";default:return S?`0{0,${v}}`:`0{${v}}`}}r.cache={},r.clearCache=()=>r.cache={},t.exports=r}));var ly=le(((e,t)=>{let n=ce("util"),r=hk(),s=v=>v!==null&&typeof v=="object"&&!Array.isArray(v),i=v=>S=>v===!0?Number(S):String(S),a=v=>typeof v=="number"||typeof v=="string"&&v!=="",o=v=>Number.isInteger(+v),l=v=>{let S=`${v}`,b=-1;if(S[0]==="-"&&(S=S.slice(1)),S==="0")return!1;for(;S[++b]==="0";);return b>0},c=(v,S,b)=>typeof v=="string"||typeof S=="string"?!0:b.stringify===!0,u=(v,S,b)=>{if(S>0){let _=v[0]==="-"?"-":"";_&&(v=v.slice(1)),v=_+v.padStart(_?S-1:S,"0")}return b===!1?String(v):v},f=(v,S)=>{let b=v[0]==="-"?"-":"";for(b&&(v=v.slice(1),S--);v.length<S;)v="0"+v;return b?"-"+v:v},d=(v,S,b)=>{v.negatives.sort((k,O)=>k<O?-1:k>O?1:0),v.positives.sort((k,O)=>k<O?-1:k>O?1:0);let _=S.capture?"":"?:",C="",x="",T;return v.positives.length&&(C=v.positives.map(k=>f(String(k),b)).join("|")),v.negatives.length&&(x=`-(${_}${v.negatives.map(k=>f(String(k),b)).join("|")})`),C&&x?T=`${C}|${x}`:T=C||x,S.wrap?`(${_}${T})`:T},p=(v,S,b,_)=>{if(b)return r(v,S,{wrap:!1,..._});let C=String.fromCharCode(v);return v===S?C:`[${C}-${String.fromCharCode(S)}]`},h=(v,S,b)=>Array.isArray(v)?b.wrap===!0?`(${b.capture?"":"?:"}${v.join("|")})`:v.join("|"):r(v,S,b),y=(...v)=>new RangeError("Invalid range arguments: "+n.inspect(...v)),m=(v,S,b)=>{if(b.strictRanges===!0)throw y([v,S]);return[]},w=(v,S)=>{if(S.strictRanges===!0)throw new TypeError(`Expected step "${v}" to be a number`);return[]},A=(v,S,b=1,_={})=>{let C=Number(v),x=Number(S);if(!Number.isInteger(C)||!Number.isInteger(x)){if(_.strictRanges===!0)throw y([v,S]);return[]}C===0&&(C=0),x===0&&(x=0);let T=C>x,k=String(v),O=String(S),R=String(b);b=Math.max(Math.abs(b),1);let I=l(k)||l(O)||l(R),M=I?Math.max(k.length,O.length,R.length):0,B=I===!1&&c(v,S,_)===!1,U=_.transform||i(B);if(_.toRegex&&b===1)return p(f(v,M),f(S,M),!0,_);let V={negatives:[],positives:[]},te=F=>V[F<0?"negatives":"positives"].push(Math.abs(F)),Q=[],Z=0;for(;T?C>=x:C<=x;)_.toRegex===!0&&b>1?te(C):Q.push(u(U(C,Z),M,B)),C=T?C-b:C+b,Z++;return _.toRegex===!0?b>1?d(V,_,M):h(Q,null,{wrap:!1,..._}):Q},g=(v,S,b=1,_={})=>{if(!o(v)&&v.length>1||!o(S)&&S.length>1)return m(v,S,_);let C=_.transform||(B=>String.fromCharCode(B)),x=`${v}`.charCodeAt(0),T=`${S}`.charCodeAt(0),k=x>T,O=Math.min(x,T),R=Math.max(x,T);if(_.toRegex&&b===1)return p(O,R,!1,_);let I=[],M=0;for(;k?x>=T:x<=T;)I.push(C(x,M)),x=k?x-b:x+b,M++;return _.toRegex===!0?h(I,null,{wrap:!1,options:_}):I},E=(v,S,b,_={})=>{if(S==null&&a(v))return[v];if(!a(v)||!a(S))return m(v,S,_);if(typeof b=="function")return E(v,S,1,{transform:b});if(s(b))return E(v,S,0,b);let C={..._};return C.capture===!0&&(C.wrap=!0),b=b||C.step||1,o(b)?o(v)&&o(S)?A(v,S,b,C):g(v,S,Math.max(Math.abs(b),1),C):b!=null&&!s(b)?w(b,C):E(v,S,1,b)};t.exports=E})),mk=le(((e,t)=>{let n=ly(),r=Yc(),s=(i,a={})=>{let o=(l,c={})=>{let u=r.isInvalidBrace(c)===!0||l.invalid===!0&&a.escapeInvalid===!0,f=a.escapeInvalid===!0?"\\":"",d="";if(l.isOpen===!0)return f+l.value;if(l.isClose===!0)return console.log("node.isClose",f,l.value),f+l.value;if(l.type==="open")return u?f+l.value:"(";if(l.type==="close")return u?f+l.value:")";if(l.type==="comma")return l.prev.type==="comma"?"":u?l.value:"|";if(l.value)return l.value;if(l.nodes&&l.ranges>0){let p=r.reduce(l.nodes),h=n(...p,{...a,wrap:!1,toRegex:!0,strictZeros:!0});if(h.length!==0)return p.length>1&&h.length>1?`(${h})`:h}if(l.nodes)for(let p of l.nodes)d+=o(p,l);return d};return o(i)};t.exports=s})),gk=le(((e,t)=>{let n=ly(),r=Xc(),s=Yc(),i=(o="",l="",c=!1)=>{let u=[];if(o=[].concat(o),l=[].concat(l),!l.length)return o;if(!o.length)return c?s.flatten(l).map(f=>`{${f}}`):l;for(let f of o)if(Array.isArray(f))for(let d of f)u.push(i(d,l,c));else for(let d of l)c===!0&&typeof d=="string"&&(d=`{${d}}`),u.push(Array.isArray(d)?i(f,d,c):f+d);return s.flatten(u)},a=(o,l={})=>{let c=l.rangeLimit===void 0?1e3:l.rangeLimit,u=(f,d={})=>{f.queue=[];let p=d,h=d.queue;for(;p.type!=="brace"&&p.type!=="root"&&p.parent;)p=p.parent,h=p.queue;if(f.invalid||f.dollar){h.push(i(h.pop(),r(f,l)));return}if(f.type==="brace"&&f.invalid!==!0&&f.nodes.length===2){h.push(i(h.pop(),["{}"]));return}if(f.nodes&&f.ranges>0){let A=s.reduce(f.nodes);if(s.exceedsLimit(...A,l.step,c))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let g=n(...A,l);g.length===0&&(g=r(f,l)),h.push(i(h.pop(),g)),f.nodes=[];return}let y=s.encloseBrace(f),m=f.queue,w=f;for(;w.type!=="brace"&&w.type!=="root"&&w.parent;)w=w.parent,m=w.queue;for(let A=0;A<f.nodes.length;A++){let g=f.nodes[A];if(g.type==="comma"&&f.type==="brace"){A===1&&m.push(""),m.push("");continue}if(g.type==="close"){h.push(i(h.pop(),m,y));continue}if(g.value&&g.type!=="open"){m.push(i(m.pop(),g.value));continue}g.nodes&&u(g,f)}return m};return s.flatten(u(o))};t.exports=a})),yk=le(((e,t)=>{t.exports={MAX_LENGTH:1e4,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:`
|
|
171
|
-
`,CHAR_NO_BREAK_SPACE:"\xA0",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:" ",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"}})),Ak=le(((e,t)=>{let n=Xc(),{MAX_LENGTH:r,CHAR_BACKSLASH:s,CHAR_BACKTICK:i,CHAR_COMMA:a,CHAR_DOT:o,CHAR_LEFT_PARENTHESES:l,CHAR_RIGHT_PARENTHESES:c,CHAR_LEFT_CURLY_BRACE:u,CHAR_RIGHT_CURLY_BRACE:f,CHAR_LEFT_SQUARE_BRACKET:d,CHAR_RIGHT_SQUARE_BRACKET:p,CHAR_DOUBLE_QUOTE:h,CHAR_SINGLE_QUOTE:y,CHAR_NO_BREAK_SPACE:m,CHAR_ZERO_WIDTH_NOBREAK_SPACE:w}=yk(),A=(g,E={})=>{if(typeof g!="string")throw new TypeError("Expected a string");let v=E||{},S=typeof v.maxLength=="number"?Math.min(r,v.maxLength):r;if(g.length>S)throw new SyntaxError(`Input length (${g.length}), exceeds max characters (${S})`);let b={type:"root",input:g,nodes:[]},_=[b],C=b,x=b,T=0,k=g.length,O=0,R=0,I,M=()=>g[O++],B=U=>{if(U.type==="text"&&x.type==="dot"&&(x.type="text"),x&&x.type==="text"&&U.type==="text"){x.value+=U.value;return}return C.nodes.push(U),U.parent=C,U.prev=x,x=U,U};for(B({type:"bos"});O<k;)if(C=_[_.length-1],I=M(),!(I===w||I===m)){if(I===s){B({type:"text",value:(E.keepEscaping?I:"")+M()});continue}if(I===p){B({type:"text",value:"\\"+I});continue}if(I===d){T++;let U;for(;O<k&&(U=M());){if(I+=U,U===d){T++;continue}if(U===s){I+=M();continue}if(U===p&&(T--,T===0))break}B({type:"text",value:I});continue}if(I===l){C=B({type:"paren",nodes:[]}),_.push(C),B({type:"text",value:I});continue}if(I===c){if(C.type!=="paren"){B({type:"text",value:I});continue}C=_.pop(),B({type:"text",value:I}),C=_[_.length-1];continue}if(I===h||I===y||I===i){let U=I,V;for(E.keepQuotes!==!0&&(I="");O<k&&(V=M());){if(V===s){I+=V+M();continue}if(V===U){E.keepQuotes===!0&&(I+=V);break}I+=V}B({type:"text",value:I});continue}if(I===u){R++,C=B({type:"brace",open:!0,close:!1,dollar:x.value&&x.value.slice(-1)==="$"||C.dollar===!0,depth:R,commas:0,ranges:0,nodes:[]}),_.push(C),B({type:"open",value:I});continue}if(I===f){if(C.type!=="brace"){B({type:"text",value:I});continue}let U="close";C=_.pop(),C.close=!0,B({type:U,value:I}),R--,C=_[_.length-1];continue}if(I===a&&R>0){if(C.ranges>0){C.ranges=0;let U=C.nodes.shift();C.nodes=[U,{type:"text",value:n(C)}]}B({type:"comma",value:I}),C.commas++;continue}if(I===o&&R>0&&C.commas===0){let U=C.nodes;if(R===0||U.length===0){B({type:"text",value:I});continue}if(x.type==="dot"){if(C.range=[],x.value+=I,x.type="range",C.nodes.length!==3&&C.nodes.length!==5){C.invalid=!0,C.ranges=0,x.type="text";continue}C.ranges++,C.args=[];continue}if(x.type==="range"){U.pop();let V=U[U.length-1];V.value+=x.value+I,x=V,C.ranges--;continue}B({type:"dot",value:I});continue}B({type:"text",value:I})}do if(C=_.pop(),C.type!=="root"){C.nodes.forEach(te=>{te.nodes||(te.type==="open"&&(te.isOpen=!0),te.type==="close"&&(te.isClose=!0),te.nodes||(te.type="text"),te.invalid=!0)});let U=_[_.length-1],V=U.nodes.indexOf(C);U.nodes.splice(V,1,...C.nodes)}while(_.length>0);return B({type:"eos"}),b};t.exports=A})),wk=le(((e,t)=>{let n=Xc(),r=mk(),s=gk(),i=Ak(),a=(o,l={})=>{let c=[];if(Array.isArray(o))for(let u of o){let f=a.create(u,l);Array.isArray(f)?c.push(...f):c.push(f)}else c=[].concat(a.create(o,l));return l&&l.expand===!0&&l.nodupes===!0&&(c=[...new Set(c)]),c};a.parse=(o,l={})=>i(o,l),a.stringify=(o,l={})=>n(typeof o=="string"?a.parse(o,l):o,l),a.compile=(o,l={})=>(typeof o=="string"&&(o=a.parse(o,l)),r(o,l)),a.expand=(o,l={})=>{typeof o=="string"&&(o=a.parse(o,l));let c=s(o,l);return l.noempty===!0&&(c=c.filter(Boolean)),l.nodupes===!0&&(c=[...new Set(c)]),c},a.create=(o,l={})=>o===""||o.length<3?[o]:l.expand!==!0?a.compile(o,l):a.expand(o,l),t.exports=a})),Ek=le(((e,t)=>{t.exports=["3dm","3ds","3g2","3gp","7z","a","aac","adp","afdesign","afphoto","afpub","ai","aif","aiff","alz","ape","apk","appimage","ar","arj","asf","au","avi","bak","baml","bh","bin","bk","bmp","btif","bz2","bzip2","cab","caf","cgm","class","cmx","cpio","cr2","cur","dat","dcm","deb","dex","djvu","dll","dmg","dng","doc","docm","docx","dot","dotm","dra","DS_Store","dsk","dts","dtshd","dvb","dwg","dxf","ecelp4800","ecelp7470","ecelp9600","egg","eol","eot","epub","exe","f4v","fbs","fh","fla","flac","flatpak","fli","flv","fpx","fst","fvt","g3","gh","gif","graffle","gz","gzip","h261","h263","h264","icns","ico","ief","img","ipa","iso","jar","jpeg","jpg","jpgv","jpm","jxr","key","ktx","lha","lib","lvp","lz","lzh","lzma","lzo","m3u","m4a","m4v","mar","mdi","mht","mid","midi","mj2","mka","mkv","mmr","mng","mobi","mov","movie","mp3","mp4","mp4a","mpeg","mpg","mpga","mxu","nef","npx","numbers","nupkg","o","odp","ods","odt","oga","ogg","ogv","otf","ott","pages","pbm","pcx","pdb","pdf","pea","pgm","pic","png","pnm","pot","potm","potx","ppa","ppam","ppm","pps","ppsm","ppsx","ppt","pptm","pptx","psd","pya","pyc","pyo","pyv","qt","rar","ras","raw","resources","rgb","rip","rlc","rmf","rmvb","rpm","rtf","rz","s3m","s7z","scpt","sgi","shar","snap","sil","sketch","slk","smv","snk","so","stl","suo","sub","swf","tar","tbz","tbz2","tga","tgz","thmx","tif","tiff","tlz","ttc","ttf","txz","udf","uvh","uvi","uvm","uvp","uvs","uvu","viv","vob","war","wav","wax","wbmp","wdp","weba","webm","webp","whl","wim","wm","wma","wmv","wmx","woff","woff2","wrm","wvx","xbm","xif","xla","xlam","xls","xlsb","xlsm","xlsx","xlt","xltm","xltx","xm","xmind","xpi","xpm","xwd","xz","z","zip","zipx"]})),vk=le(((e,t)=>{t.exports=Ek()})),_k=le(((e,t)=>{let n=ce("path"),r=vk(),s=new Set(r);t.exports=i=>s.has(n.extname(i).slice(1).toLowerCase())})),Zc=le((e=>{let{sep:t}=ce("path"),{platform:n}=process,r=ce("os");e.EV_ALL="all",e.EV_READY="ready",e.EV_ADD="add",e.EV_CHANGE="change",e.EV_ADD_DIR="addDir",e.EV_UNLINK="unlink",e.EV_UNLINK_DIR="unlinkDir",e.EV_RAW="raw",e.EV_ERROR="error",e.STR_DATA="data",e.STR_END="end",e.STR_CLOSE="close",e.FSEVENT_CREATED="created",e.FSEVENT_MODIFIED="modified",e.FSEVENT_DELETED="deleted",e.FSEVENT_MOVED="moved",e.FSEVENT_CLONED="cloned",e.FSEVENT_UNKNOWN="unknown",e.FSEVENT_FLAG_MUST_SCAN_SUBDIRS=1,e.FSEVENT_TYPE_FILE="file",e.FSEVENT_TYPE_DIRECTORY="directory",e.FSEVENT_TYPE_SYMLINK="symlink",e.KEY_LISTENERS="listeners",e.KEY_ERR="errHandlers",e.KEY_RAW="rawEmitters",e.HANDLER_KEYS=[e.KEY_LISTENERS,e.KEY_ERR,e.KEY_RAW],e.DOT_SLASH=`.${t}`,e.BACK_SLASH_RE=/\\/g,e.DOUBLE_SLASH_RE=/\/\//,e.SLASH_OR_BACK_SLASH_RE=/[/\\]/,e.DOT_RE=/\..*\.(sw[px])$|~$|\.subl.*\.tmp/,e.REPLACER_RE=/^\.[/\\]/,e.SLASH="/",e.SLASH_SLASH="//",e.BRACE_START="{",e.BANG="!",e.ONE_DOT=".",e.TWO_DOTS="..",e.STAR="*",e.GLOBSTAR="**",e.ROOT_GLOBSTAR="/**/*",e.SLASH_GLOBSTAR="/**",e.DIR_SUFFIX="Dir",e.ANYMATCH_OPTS={dot:!0},e.STRING_TYPE="string",e.FUNCTION_TYPE="function",e.EMPTY_STR="",e.EMPTY_FN=()=>{},e.IDENTITY_FN=s=>s,e.isWindows=n==="win32",e.isMacos=n==="darwin",e.isLinux=n==="linux",e.isIBMi=r.type()==="OS400"})),bk=le(((e,t)=>{let n=ce("fs"),r=ce("path"),{promisify:s}=ce("util"),i=_k(),{isWindows:a,isLinux:o,EMPTY_FN:l,EMPTY_STR:c,KEY_LISTENERS:u,KEY_ERR:f,KEY_RAW:d,HANDLER_KEYS:p,EV_CHANGE:h,EV_ADD:y,EV_ADD_DIR:m,EV_ERROR:w,STR_DATA:A,STR_END:g,BRACE_START:E,STAR:v}=Zc(),S="watch",b=s(n.open),_=s(n.stat),C=s(n.lstat),x=s(n.close),T=s(n.realpath),k={lstat:C,stat:_},O=(P,z)=>{P instanceof Set?P.forEach(z):z(P)},R=(P,z,H)=>{let $=P[z];$ instanceof Set||(P[z]=$=new Set([$])),$.add(H)},I=P=>z=>{let H=P[z];H instanceof Set?H.clear():delete P[z]},M=(P,z,H)=>{let $=P[z];$ instanceof Set?$.delete(H):$===H&&delete P[z]},B=P=>P instanceof Set?P.size===0:!P,U=new Map;function V(P,z,H,$,J){let D=(N,K)=>{H(P),J(N,K,{watchedPath:P}),K&&P!==K&&te(r.resolve(P,K),u,r.join(P,K))};try{return n.watch(P,z,D)}catch(N){$(N)}}let te=(P,z,H,$,J)=>{let D=U.get(P);D&&O(D[z],N=>{N(H,$,J)})},Q=(P,z,H,$)=>{let{listener:J,errHandler:D,rawEmitter:N}=$,K=U.get(z),ee;if(!H.persistent)return ee=V(P,H,J,D,N),ee.close.bind(ee);if(K)R(K,u,J),R(K,f,D),R(K,d,N);else{if(ee=V(P,H,te.bind(null,z,u),D,te.bind(null,z,d)),!ee)return;ee.on(w,async X=>{let se=te.bind(null,z,f);if(K.watcherUnusable=!0,a&&X.code==="EPERM")try{let ie=await b(P,"r");await x(ie),se(X)}catch{}else se(X)}),K={listeners:J,errHandlers:D,rawEmitters:N,watcher:ee},U.set(z,K)}return()=>{M(K,u,J),M(K,f,D),M(K,d,N),B(K.listeners)&&(K.watcher.close(),U.delete(z),p.forEach(I(K)),K.watcher=void 0,Object.freeze(K))}},Z=new Map,F=(P,z,H,$)=>{let{listener:J,rawEmitter:D}=$,N=Z.get(z),K=N&&N.options;return K&&(K.persistent<H.persistent||K.interval>H.interval)&&(n.unwatchFile(z),N=void 0),N?(R(N,u,J),R(N,d,D)):(N={listeners:J,rawEmitters:D,options:H,watcher:n.watchFile(z,H,(ee,X)=>{O(N.rawEmitters,ie=>{ie(h,z,{curr:ee,prev:X})});let se=ee.mtimeMs;(ee.size!==X.size||se>X.mtimeMs||se===0)&&O(N.listeners,ie=>ie(P,ee))})},Z.set(z,N)),()=>{M(N,u,J),M(N,d,D),B(N.listeners)&&(Z.delete(z),n.unwatchFile(z),N.options=N.watcher=void 0,Object.freeze(N))}};var G=class{constructor(P){this.fsw=P,this._boundHandleError=z=>P._handleError(z)}_watchWithNodeFs(P,z){let H=this.fsw.options,$=r.dirname(P),J=r.basename(P);this.fsw._getWatchedDir($).add(J);let D=r.resolve(P),N={persistent:H.persistent};z||(z=l);let K;return H.usePolling?(N.interval=H.enableBinaryInterval&&i(J)?H.binaryInterval:H.interval,K=F(P,D,N,{listener:z,rawEmitter:this.fsw._emitRaw})):K=Q(P,D,N,{listener:z,errHandler:this._boundHandleError,rawEmitter:this.fsw._emitRaw}),K}_handleFile(P,z,H){if(this.fsw.closed)return;let $=r.dirname(P),J=r.basename(P),D=this.fsw._getWatchedDir($),N=z;if(D.has(J))return;let K=async(X,se)=>{if(this.fsw._throttle(S,P,5)){if(!se||se.mtimeMs===0)try{let ie=await _(P);if(this.fsw.closed)return;let oe=ie.atimeMs,me=ie.mtimeMs;(!oe||oe<=me||me!==N.mtimeMs)&&this.fsw._emit(h,P,ie),o&&N.ino!==ie.ino?(this.fsw._closeFile(X),N=ie,this.fsw._addPathCloser(X,this._watchWithNodeFs(P,K))):N=ie}catch{this.fsw._remove($,J)}else if(D.has(J)){let ie=se.atimeMs,oe=se.mtimeMs;(!ie||ie<=oe||oe!==N.mtimeMs)&&this.fsw._emit(h,P,se),N=se}}},ee=this._watchWithNodeFs(P,K);if(!(H&&this.fsw.options.ignoreInitial)&&this.fsw._isntIgnored(P)){if(!this.fsw._throttle(y,P,0))return;this.fsw._emit(y,P,z)}return ee}async _handleSymlink(P,z,H,$){if(this.fsw.closed)return;let J=P.fullPath,D=this.fsw._getWatchedDir(z);if(!this.fsw.options.followSymlinks){this.fsw._incrReadyCount();let N;try{N=await T(H)}catch{return this.fsw._emitReady(),!0}return this.fsw.closed?void 0:(D.has($)?this.fsw._symlinkPaths.get(J)!==N&&(this.fsw._symlinkPaths.set(J,N),this.fsw._emit(h,H,P.stats)):(D.add($),this.fsw._symlinkPaths.set(J,N),this.fsw._emit(y,H,P.stats)),this.fsw._emitReady(),!0)}if(this.fsw._symlinkPaths.has(J))return!0;this.fsw._symlinkPaths.set(J,!0)}_handleRead(P,z,H,$,J,D,N){if(P=r.join(P,c),!H.hasGlob&&(N=this.fsw._throttle("readdir",P,1e3),!N))return;let K=this.fsw._getWatchedDir(H.path),ee=new Set,X=this.fsw._readdirp(P,{fileFilter:se=>H.filterPath(se),directoryFilter:se=>H.filterDir(se),depth:0}).on(A,async se=>{if(this.fsw.closed){X=void 0;return}let ie=se.path,oe=r.join(P,ie);if(ee.add(ie),!(se.stats.isSymbolicLink()&&await this._handleSymlink(se,P,oe,ie))){if(this.fsw.closed){X=void 0;return}(ie===$||!$&&!K.has(ie))&&(this.fsw._incrReadyCount(),oe=r.join(J,r.relative(J,oe)),this._addToNodeFs(oe,z,H,D+1))}}).on(w,this._boundHandleError);return new Promise(se=>X.once(g,()=>{if(this.fsw.closed){X=void 0;return}let ie=N?N.clear():!1;se(),K.getChildren().filter(oe=>oe!==P&&!ee.has(oe)&&(!H.hasGlob||H.filterPath({fullPath:r.resolve(P,oe)}))).forEach(oe=>{this.fsw._remove(P,oe)}),X=void 0,ie&&this._handleRead(P,!1,H,$,J,D,N)}))}async _handleDir(P,z,H,$,J,D,N){let K=this.fsw._getWatchedDir(r.dirname(P)),ee=K.has(r.basename(P));!(H&&this.fsw.options.ignoreInitial)&&!J&&!ee&&(!D.hasGlob||D.globFilter(P))&&this.fsw._emit(m,P,z),K.add(r.basename(P)),this.fsw._getWatchedDir(P);let X,se,ie=this.fsw.options.depth;if((ie==null||$<=ie)&&!this.fsw._symlinkPaths.has(N)){if(!J&&(await this._handleRead(P,H,D,J,P,$,X),this.fsw.closed))return;se=this._watchWithNodeFs(P,(oe,me)=>{me&&me.mtimeMs===0||this._handleRead(oe,!1,D,J,P,$,X)})}return se}async _addToNodeFs(P,z,H,$,J){let D=this.fsw._emitReady;if(this.fsw._isIgnored(P)||this.fsw.closed)return D(),!1;let N=this.fsw._getWatchHelpers(P,$);!N.hasGlob&&H&&(N.hasGlob=H.hasGlob,N.globFilter=H.globFilter,N.filterPath=K=>H.filterPath(K),N.filterDir=K=>H.filterDir(K));try{let K=await k[N.statMethod](N.watchPath);if(this.fsw.closed)return;if(this.fsw._isIgnored(N.watchPath,K))return D(),!1;let ee=this.fsw.options.followSymlinks&&!P.includes(v)&&!P.includes(E),X;if(K.isDirectory()){let se=r.resolve(P),ie=ee?await T(P):P;if(this.fsw.closed||(X=await this._handleDir(N.watchPath,K,z,$,J,N,ie),this.fsw.closed))return;se!==ie&&ie!==void 0&&this.fsw._symlinkPaths.set(se,ie)}else if(K.isSymbolicLink()){let se=ee?await T(P):P;if(this.fsw.closed)return;let ie=r.dirname(N.watchPath);if(this.fsw._getWatchedDir(ie).add(N.watchPath),this.fsw._emit(y,N.watchPath,K),X=await this._handleDir(ie,K,z,$,P,N,se),this.fsw.closed)return;se!==void 0&&this.fsw._symlinkPaths.set(r.resolve(P),se)}else X=this._handleFile(N.watchPath,K,z);return D(),this.fsw._addPathCloser(P,X),!1}catch(K){if(this.fsw._handleError(K))return D(),P}}};t.exports=G})),Sk=le(((e,t)=>{let n=ce("fs"),r=ce("path"),{promisify:s}=ce("util"),i;try{i=ce("fsevents")}catch(H){process.env.CHOKIDAR_PRINT_FSEVENTS_REQUIRE_ERROR&&console.error(H)}if(i){let H=process.version.match(/v(\d+)\.(\d+)/);H&&H[1]&&H[2]&&Number.parseInt(H[1],10)===8&&Number.parseInt(H[2],10)<16&&(i=void 0)}let{EV_ADD:a,EV_CHANGE:o,EV_ADD_DIR:l,EV_UNLINK:c,EV_ERROR:u,STR_DATA:f,STR_END:d,FSEVENT_CREATED:p,FSEVENT_MODIFIED:h,FSEVENT_DELETED:y,FSEVENT_MOVED:m,FSEVENT_UNKNOWN:w,FSEVENT_FLAG_MUST_SCAN_SUBDIRS:A,FSEVENT_TYPE_FILE:g,FSEVENT_TYPE_DIRECTORY:E,FSEVENT_TYPE_SYMLINK:v,ROOT_GLOBSTAR:S,DIR_SUFFIX:b,DOT_SLASH:_,FUNCTION_TYPE:C,EMPTY_FN:x,IDENTITY_FN:T}=Zc(),k=H=>isNaN(H)?{}:{depth:H},O=s(n.stat),R=s(n.lstat),I=s(n.realpath),M={stat:O,lstat:R},B=new Map,U=10,V=new Set([69888,70400,71424,72704,73472,131328,131840,262912]),te=(H,$)=>({stop:i.watch(H,$)});function Q(H,$,J,D){let N=r.extname($)?r.dirname($):$,K=r.dirname(N),ee=B.get(N);Z(K)&&(N=K);let X=r.resolve(H),se=X!==$,ie=(me,Y,ne)=>{se&&(me=me.replace($,X)),(me===X||!me.indexOf(X+r.sep))&&J(me,Y,ne)},oe=!1;for(let me of B.keys())if($.indexOf(r.resolve(me)+r.sep)===0){N=me,ee=B.get(N),oe=!0;break}return ee||oe?ee.listeners.add(ie):(ee={listeners:new Set([ie]),rawEmitter:D,watcher:te(N,(me,Y)=>{if(!ee.listeners.size||Y&A)return;let ne=i.getInfo(me,Y);ee.listeners.forEach(fe=>{fe(me,Y,ne)}),ee.rawEmitter(ne.event,me,ne)})},B.set(N,ee)),()=>{let me=ee.listeners;if(me.delete(ie),!me.size&&(B.delete(N),ee.watcher))return ee.watcher.stop().then(()=>{ee.rawEmitter=ee.watcher=void 0,Object.freeze(ee)})}}let Z=H=>{let $=0;for(let J of B.keys())if(J.indexOf(H)===0&&($++,$>=U))return!0;return!1},F=()=>i&&B.size<128,G=(H,$)=>{let J=0;for(;!H.indexOf($)&&(H=r.dirname(H))!==$;)J++;return J},P=(H,$)=>H.type===E&&$.isDirectory()||H.type===v&&$.isSymbolicLink()||H.type===g&&$.isFile();var z=class{constructor(H){this.fsw=H}checkIgnored(H,$){let J=this.fsw._ignoredPaths;if(this.fsw._isIgnored(H,$))return J.add(H),$&&$.isDirectory()&&J.add(H+S),!0;J.delete(H),J.delete(H+S)}addOrChange(H,$,J,D,N,K,ee,X){let se=N.has(K)?o:a;this.handleEvent(se,H,$,J,D,N,K,ee,X)}async checkExists(H,$,J,D,N,K,ee,X){try{let se=await O(H);if(this.fsw.closed)return;P(ee,se)?this.addOrChange(H,$,J,D,N,K,ee,X):this.handleEvent(c,H,$,J,D,N,K,ee,X)}catch(se){se.code==="EACCES"?this.addOrChange(H,$,J,D,N,K,ee,X):this.handleEvent(c,H,$,J,D,N,K,ee,X)}}handleEvent(H,$,J,D,N,K,ee,X,se){if(!(this.fsw.closed||this.checkIgnored($)))if(H===c){let ie=X.type===E;(ie||K.has(ee))&&this.fsw._remove(N,ee,ie)}else{if(H===a){if(X.type===E&&this.fsw._getWatchedDir($),X.type===v&&se.followSymlinks){let oe=se.depth===void 0?void 0:G(J,D)+1;return this._addToFsEvents($,!1,!0,oe)}this.fsw._getWatchedDir(N).add(ee)}let ie=X.type===E?H+b:H;this.fsw._emit(ie,$),ie===l&&this._addToFsEvents($,!1,!0)}}_watchWithFsEvents(H,$,J,D){if(this.fsw.closed||this.fsw._isIgnored(H))return;let N=this.fsw.options,ee=Q(H,$,async(X,se,ie)=>{if(this.fsw.closed||this.fsw._isIgnored(X)||N.depth!==void 0&&G(X,$)>N.depth)return;let oe=J(r.join(H,r.relative(H,X)));if(D&&!D(oe))return;let me=r.dirname(oe),Y=r.basename(oe),ne=this.fsw._getWatchedDir(ie.type===E?oe:me);if(V.has(se)||ie.event===w)if(typeof N.ignored===C){let fe;try{fe=await O(oe)}catch{}if(this.fsw.closed||this.checkIgnored(oe,fe))return;P(ie,fe)?this.addOrChange(oe,X,$,me,ne,Y,ie,N):this.handleEvent(c,oe,X,$,me,ne,Y,ie,N)}else this.checkExists(oe,X,$,me,ne,Y,ie,N);else switch(ie.event){case p:case h:return this.addOrChange(oe,X,$,me,ne,Y,ie,N);case y:case m:return this.checkExists(oe,X,$,me,ne,Y,ie,N)}},this.fsw._emitRaw);return this.fsw._emitReady(),ee}async _handleFsEventsSymlink(H,$,J,D){if(!(this.fsw.closed||this.fsw._symlinkPaths.has($))){this.fsw._symlinkPaths.set($,!0),this.fsw._incrReadyCount();try{let N=await I(H);if(this.fsw.closed)return;if(this.fsw._isIgnored(N))return this.fsw._emitReady();this.fsw._incrReadyCount(),this._addToFsEvents(N||H,K=>{let ee=H;return N&&N!==_?ee=K.replace(N,H):K!==_&&(ee=r.join(H,K)),J(ee)},!1,D)}catch(N){if(this.fsw._handleError(N))return this.fsw._emitReady()}}}emitAdd(H,$,J,D,N){let K=J(H),ee=$.isDirectory(),X=this.fsw._getWatchedDir(r.dirname(K)),se=r.basename(K);ee&&this.fsw._getWatchedDir(K),!X.has(se)&&(X.add(se),(!D.ignoreInitial||N===!0)&&this.fsw._emit(ee?l:a,K,$))}initWatch(H,$,J,D){if(this.fsw.closed)return;let N=this._watchWithFsEvents(J.watchPath,r.resolve(H||J.watchPath),D,J.globFilter);this.fsw._addPathCloser($,N)}async _addToFsEvents(H,$,J,D){if(this.fsw.closed)return;let N=this.fsw.options,K=typeof $===C?$:T,ee=this.fsw._getWatchHelpers(H);try{let X=await M[ee.statMethod](ee.watchPath);if(this.fsw.closed)return;if(this.fsw._isIgnored(ee.watchPath,X))throw null;if(X.isDirectory()){if(ee.globFilter||this.emitAdd(K(H),X,K,N,J),D&&D>N.depth)return;this.fsw._readdirp(ee.watchPath,{fileFilter:se=>ee.filterPath(se),directoryFilter:se=>ee.filterDir(se),...k(N.depth-(D||0))}).on(f,se=>{if(this.fsw.closed||se.stats.isDirectory()&&!ee.filterPath(se))return;let ie=r.join(ee.watchPath,se.path),{fullPath:oe}=se;if(ee.followSymlinks&&se.stats.isSymbolicLink()){let me=N.depth===void 0?void 0:G(ie,r.resolve(ee.watchPath))+1;this._handleFsEventsSymlink(ie,oe,K,me)}else this.emitAdd(ie,se.stats,K,N,J)}).on(u,x).on(d,()=>{this.fsw._emitReady()})}else this.emitAdd(ee.watchPath,X,K,N,J),this.fsw._emitReady()}catch(X){(!X||this.fsw._handleError(X))&&(this.fsw._emitReady(),this.fsw._emitReady())}if(N.persistent&&J!==!0)if(typeof $===C)this.initWatch(void 0,H,ee,K);else{let X;try{X=await I(ee.watchPath)}catch{}this.initWatch(X,H,ee,K)}}};t.exports=z,t.exports.canUse=F})),xk=le((e=>{let{EventEmitter:t}=ce("events"),n=ce("fs"),r=ce("path"),{promisify:s}=ce("util"),i=ck(),a=uk().default,o=dk(),l=ay(),c=wk(),u=oy(),f=bk(),d=Sk(),{EV_ALL:p,EV_READY:h,EV_ADD:y,EV_CHANGE:m,EV_UNLINK:w,EV_ADD_DIR:A,EV_UNLINK_DIR:g,EV_RAW:E,EV_ERROR:v,STR_CLOSE:S,STR_END:b,BACK_SLASH_RE:_,DOUBLE_SLASH_RE:C,SLASH_OR_BACK_SLASH_RE:x,DOT_RE:T,REPLACER_RE:k,SLASH:O,SLASH_SLASH:R,BRACE_START:I,BANG:M,ONE_DOT:B,TWO_DOTS:U,GLOBSTAR:V,SLASH_GLOBSTAR:te,ANYMATCH_OPTS:Q,STRING_TYPE:Z,FUNCTION_TYPE:F,EMPTY_STR:G,EMPTY_FN:P,isWindows:z,isMacos:H,isIBMi:$}=Zc(),J=s(n.stat),D=s(n.readdir),N=(q=[])=>Array.isArray(q)?q:[q],K=(q,W=[])=>(q.forEach(ue=>{Array.isArray(ue)?K(ue,W):W.push(ue)}),W),ee=q=>{let W=K(N(q));if(!W.every(ue=>typeof ue===Z))throw new TypeError(`Non-string provided as watch path: ${W}`);return W.map(se)},X=q=>{let W=q.replace(_,O),ue=!1;for(W.startsWith(R)&&(ue=!0);W.match(C);)W=W.replace(C,O);return ue&&(W=O+W),W},se=q=>X(r.normalize(X(q))),ie=(q=G)=>W=>typeof W!==Z?W:se(r.isAbsolute(W)?W:r.join(q,W)),oe=(q,W)=>r.isAbsolute(q)?q:q.startsWith(M)?M+r.join(W,q.slice(1)):r.join(W,q),me=(q,W)=>q[W]===void 0;var Y=class{constructor(q,W){this.path=q,this._removeWatcher=W,this.items=new Set}add(q){let{items:W}=this;W&&q!==B&&q!==U&&W.add(q)}async remove(q){let{items:W}=this;if(!W||(W.delete(q),W.size>0))return;let ue=this.path;try{await D(ue)}catch{this._removeWatcher&&this._removeWatcher(r.dirname(ue),r.basename(ue))}}has(q){let{items:W}=this;if(W)return W.has(q)}getChildren(){let{items:q}=this;if(q)return[...q.values()]}dispose(){this.items.clear(),delete this.path,delete this._removeWatcher,delete this.items,Object.freeze(this)}};let ne="stat",fe="lstat";var ye=class{constructor(q,W,ue,ge){this.fsw=ge,this.path=q=q.replace(k,G),this.watchPath=W,this.fullWatchPath=r.resolve(W),this.hasGlob=W!==q,q===G&&(this.hasGlob=!1),this.globSymlink=this.hasGlob&&ue?void 0:!1,this.globFilter=this.hasGlob?a(q,void 0,Q):!1,this.dirParts=this.getDirParts(q),this.dirParts.forEach(be=>{be.length>1&&be.pop()}),this.followSymlinks=ue,this.statMethod=ue?ne:fe}checkGlobSymlink(q){return this.globSymlink===void 0&&(this.globSymlink=q.fullParentDir===this.fullWatchPath?!1:{realPath:q.fullParentDir,linkPath:this.fullWatchPath}),this.globSymlink?q.fullPath.replace(this.globSymlink.realPath,this.globSymlink.linkPath):q.fullPath}entryPath(q){return r.join(this.watchPath,r.relative(this.watchPath,this.checkGlobSymlink(q)))}filterPath(q){let{stats:W}=q;if(W&&W.isSymbolicLink())return this.filterDir(q);let ue=this.entryPath(q);return(this.hasGlob&&typeof this.globFilter===F?this.globFilter(ue):!0)&&this.fsw._isntIgnored(ue,W)&&this.fsw._hasReadPermissions(W)}getDirParts(q){if(!this.hasGlob)return[];let W=[];return(q.includes(I)?c.expand(q):[q]).forEach(ue=>{W.push(r.relative(this.watchPath,ue).split(x))}),W}filterDir(q){if(this.hasGlob){let W=this.getDirParts(this.checkGlobSymlink(q)),ue=!1;this.unmatchedGlob=!this.dirParts.some(ge=>ge.every((be,ae)=>(be===V&&(ue=!0),ue||!W[0][ae]||a(be,W[0][ae],Q))))}return!this.unmatchedGlob&&this.fsw._isntIgnored(this.entryPath(q),q.stats)}},de=class extends t{constructor(q){super();let W={};q&&Object.assign(W,q),this._watched=new Map,this._closers=new Map,this._ignoredPaths=new Set,this._throttled=new Map,this._symlinkPaths=new Map,this._streams=new Set,this.closed=!1,me(W,"persistent")&&(W.persistent=!0),me(W,"ignoreInitial")&&(W.ignoreInitial=!1),me(W,"ignorePermissionErrors")&&(W.ignorePermissionErrors=!1),me(W,"interval")&&(W.interval=100),me(W,"binaryInterval")&&(W.binaryInterval=300),me(W,"disableGlobbing")&&(W.disableGlobbing=!1),W.enableBinaryInterval=W.binaryInterval!==W.interval,me(W,"useFsEvents")&&(W.useFsEvents=!W.usePolling),d.canUse()||(W.useFsEvents=!1),me(W,"usePolling")&&!W.useFsEvents&&(W.usePolling=H),$&&(W.usePolling=!0);let ue=process.env.CHOKIDAR_USEPOLLING;if(ue!==void 0){let Ae=ue.toLowerCase();Ae==="false"||Ae==="0"?W.usePolling=!1:Ae==="true"||Ae==="1"?W.usePolling=!0:W.usePolling=!!Ae}let ge=process.env.CHOKIDAR_INTERVAL;ge&&(W.interval=Number.parseInt(ge,10)),me(W,"atomic")&&(W.atomic=!W.usePolling&&!W.useFsEvents),W.atomic&&(this._pendingUnlinks=new Map),me(W,"followSymlinks")&&(W.followSymlinks=!0),me(W,"awaitWriteFinish")&&(W.awaitWriteFinish=!1),W.awaitWriteFinish===!0&&(W.awaitWriteFinish={});let be=W.awaitWriteFinish;be&&(be.stabilityThreshold||(be.stabilityThreshold=2e3),be.pollInterval||(be.pollInterval=100),this._pendingWrites=new Map),W.ignored&&(W.ignored=N(W.ignored));let ae=0;this._emitReady=()=>{ae++,ae>=this._readyCount&&(this._emitReady=P,this._readyEmitted=!0,process.nextTick(()=>this.emit(h)))},this._emitRaw=(...Ae)=>this.emit(E,...Ae),this._readyEmitted=!1,this.options=W,W.useFsEvents?this._fsEventsHandler=new d(this):this._nodeFsHandler=new f(this),Object.freeze(W)}add(q,W,ue){let{cwd:ge,disableGlobbing:be}=this.options;this.closed=!1;let ae=ee(q);return ge&&(ae=ae.map(Ae=>{let _e=oe(Ae,ge);return be||!l(Ae)?_e:u(_e)})),ae=ae.filter(Ae=>Ae.startsWith(M)?(this._ignoredPaths.add(Ae.slice(1)),!1):(this._ignoredPaths.delete(Ae),this._ignoredPaths.delete(Ae+te),this._userIgnored=void 0,!0)),this.options.useFsEvents&&this._fsEventsHandler?(this._readyCount||(this._readyCount=ae.length),this.options.persistent&&(this._readyCount+=ae.length),ae.forEach(Ae=>this._fsEventsHandler._addToFsEvents(Ae))):(this._readyCount||(this._readyCount=0),this._readyCount+=ae.length,Promise.all(ae.map(async Ae=>{let _e=await this._nodeFsHandler._addToNodeFs(Ae,!ue,0,0,W);return _e&&this._emitReady(),_e})).then(Ae=>{this.closed||Ae.filter(_e=>_e).forEach(_e=>{this.add(r.dirname(_e),r.basename(W||_e))})})),this}unwatch(q){if(this.closed)return this;let W=ee(q),{cwd:ue}=this.options;return W.forEach(ge=>{!r.isAbsolute(ge)&&!this._closers.has(ge)&&(ue&&(ge=r.join(ue,ge)),ge=r.resolve(ge)),this._closePath(ge),this._ignoredPaths.add(ge),this._watched.has(ge)&&this._ignoredPaths.add(ge+te),this._userIgnored=void 0}),this}close(){if(this.closed)return this._closePromise;this.closed=!0,this.removeAllListeners();let q=[];return this._closers.forEach(W=>W.forEach(ue=>{let ge=ue();ge instanceof Promise&&q.push(ge)})),this._streams.forEach(W=>W.destroy()),this._userIgnored=void 0,this._readyCount=0,this._readyEmitted=!1,this._watched.forEach(W=>W.dispose()),["closers","watched","streams","symlinkPaths","throttled"].forEach(W=>{this[`_${W}`].clear()}),this._closePromise=q.length?Promise.all(q).then(()=>{}):Promise.resolve(),this._closePromise}getWatched(){let q={};return this._watched.forEach((W,ue)=>{let ge=this.options.cwd?r.relative(this.options.cwd,ue):ue;q[ge||B]=W.getChildren().sort()}),q}emitWithAll(q,W){this.emit(...W),q!==v&&this.emit(p,...W)}async _emit(q,W,ue,ge,be){if(this.closed)return;let ae=this.options;z&&(W=r.normalize(W)),ae.cwd&&(W=r.relative(ae.cwd,W));let Ae=[q,W];be!==void 0?Ae.push(ue,ge,be):ge!==void 0?Ae.push(ue,ge):ue!==void 0&&Ae.push(ue);let _e=ae.awaitWriteFinish,Se;if(_e&&(Se=this._pendingWrites.get(W)))return Se.lastChange=new Date,this;if(ae.atomic){if(q===w)return this._pendingUnlinks.set(W,Ae),setTimeout(()=>{this._pendingUnlinks.forEach((we,Ce)=>{this.emit(...we),this.emit(p,...we),this._pendingUnlinks.delete(Ce)})},typeof ae.atomic=="number"?ae.atomic:100),this;q===y&&this._pendingUnlinks.has(W)&&(q=Ae[0]=m,this._pendingUnlinks.delete(W))}if(_e&&(q===y||q===m)&&this._readyEmitted){let we=(Ce,Pe)=>{Ce?(q=Ae[0]=v,Ae[1]=Ce,this.emitWithAll(q,Ae)):Pe&&(Ae.length>2?Ae[2]=Pe:Ae.push(Pe),this.emitWithAll(q,Ae))};return this._awaitWriteFinish(W,_e.stabilityThreshold,q,we),this}if(q===m&&!this._throttle(m,W,50))return this;if(ae.alwaysStat&&ue===void 0&&(q===y||q===A||q===m)){let we=ae.cwd?r.join(ae.cwd,W):W,Ce;try{Ce=await J(we)}catch{}if(!Ce||this.closed)return;Ae.push(Ce)}return this.emitWithAll(q,Ae),this}_handleError(q){let W=q&&q.code;return q&&W!=="ENOENT"&&W!=="ENOTDIR"&&(!this.options.ignorePermissionErrors||W!=="EPERM"&&W!=="EACCES")&&this.emit(v,q),q||this.closed}_throttle(q,W,ue){this._throttled.has(q)||this._throttled.set(q,new Map);let ge=this._throttled.get(q),be=ge.get(W);if(be)return be.count++,!1;let ae,Ae=()=>{let Se=ge.get(W),we=Se?Se.count:0;return ge.delete(W),clearTimeout(ae),Se&&clearTimeout(Se.timeoutObject),we};ae=setTimeout(Ae,ue);let _e={timeoutObject:ae,clear:Ae,count:0};return ge.set(W,_e),_e}_incrReadyCount(){return this._readyCount++}_awaitWriteFinish(q,W,ue,ge){let be,ae=q;this.options.cwd&&!r.isAbsolute(q)&&(ae=r.join(this.options.cwd,q));let Ae=new Date,_e=Se=>{n.stat(ae,(we,Ce)=>{if(we||!this._pendingWrites.has(q)){we&&we.code!=="ENOENT"&&ge(we);return}let Pe=Number(new Date);Se&&Ce.size!==Se.size&&(this._pendingWrites.get(q).lastChange=Pe),Pe-this._pendingWrites.get(q).lastChange>=W?(this._pendingWrites.delete(q),ge(void 0,Ce)):be=setTimeout(_e,this.options.awaitWriteFinish.pollInterval,Ce)})};this._pendingWrites.has(q)||(this._pendingWrites.set(q,{lastChange:Ae,cancelWait:()=>(this._pendingWrites.delete(q),clearTimeout(be),ue)}),be=setTimeout(_e,this.options.awaitWriteFinish.pollInterval))}_getGlobIgnored(){return[...this._ignoredPaths.values()]}_isIgnored(q,W){if(this.options.atomic&&T.test(q))return!0;if(!this._userIgnored){let{cwd:ue}=this.options,ge=this.options.ignored,be=ge&&ge.map(ie(ue)),ae=N(be).filter(_e=>typeof _e===Z&&!l(_e)).map(_e=>_e+te),Ae=this._getGlobIgnored().map(ie(ue)).concat(be,ae);this._userIgnored=a(Ae,void 0,Q)}return this._userIgnored([q,W])}_isntIgnored(q,W){return!this._isIgnored(q,W)}_getWatchHelpers(q,W){let ue=W||this.options.disableGlobbing||!l(q)?q:o(q),ge=this.options.followSymlinks;return new ye(q,ue,ge,this)}_getWatchedDir(q){this._boundRemove||(this._boundRemove=this._remove.bind(this));let W=r.resolve(q);return this._watched.has(W)||this._watched.set(W,new Y(W,this._boundRemove)),this._watched.get(W)}_hasReadPermissions(q){if(this.options.ignorePermissionErrors)return!0;let W=(q&&Number.parseInt(q.mode,10))&511;return!!(4&Number.parseInt(W.toString(8)[0],10))}_remove(q,W,ue){let ge=r.join(q,W),be=r.resolve(ge);if(ue=ue??(this._watched.has(ge)||this._watched.has(be)),!this._throttle("remove",ge,100))return;!ue&&!this.options.useFsEvents&&this._watched.size===1&&this.add(q,W,!0),this._getWatchedDir(ge).getChildren().forEach(we=>this._remove(ge,we));let ae=this._getWatchedDir(q),Ae=ae.has(W);ae.remove(W),this._symlinkPaths.has(be)&&this._symlinkPaths.delete(be);let _e=ge;if(this.options.cwd&&(_e=r.relative(this.options.cwd,ge)),this.options.awaitWriteFinish&&this._pendingWrites.has(_e)&&this._pendingWrites.get(_e).cancelWait()===y)return;this._watched.delete(ge),this._watched.delete(be);let Se=ue?g:w;Ae&&!this._isIgnored(ge)&&this._emit(Se,ge),this.options.useFsEvents||this._closePath(ge)}_closePath(q){this._closeFile(q);let W=r.dirname(q);this._getWatchedDir(W).remove(r.basename(q))}_closeFile(q){q=r.normalize(q);let W=this._closers.get(q);W&&(W.forEach(ue=>ue()),this._closers.delete(q))}_addPathCloser(q,W){if(!W)return;q=r.normalize(q);let ue=this._closers.get(q);ue||(ue=[],this._closers.set(q,ue)),ue.push(W)}_readdirp(q,W){if(this.closed)return;let ue=i(q,{type:p,alwaysStat:!0,lstat:!0,...W});return this._streams.add(ue),ue.once(S,()=>{ue=void 0}),ue.once(b,()=>{ue&&(this._streams.delete(ue),ue=void 0)}),ue}};let ve=(q,W)=>{let ue=new de(W);return ue.add(q),ue};e.watch=ve})),Ck=le(((e,t)=>{var n=["||","&&",";;","|&","<(","<<<",">>",">&","<&","&",";","(",")","|","<",">"],r=/[\n\r\u2028\u2029]/,s=/[\s#!"$&'():;<=>@\\^`|]/g;t.exports=function(a){return a.map(function(o){if(o==="")return"''";if(o&&typeof o=="object"){if(o.op==="glob"){if(typeof o.pattern!="string")throw new TypeError("glob token requires a string `pattern`");if(r.test(o.pattern))throw new TypeError("glob `pattern` must not contain line terminators");return o.pattern.replace(s,"\\$&")}if(typeof o.op=="string"){if(n.indexOf(o.op)<0)throw new TypeError("invalid `op` value: "+JSON.stringify(o.op));return o.op.replace(/[\s\S]/g,"\\$&")}if(typeof o.comment=="string"){if(r.test(o.comment))throw new TypeError("`comment` must not contain line terminators");return"#"+o.comment}throw new TypeError("unrecognized object token shape")}return/["\s\\]/.test(o)&&!/'/.test(o)?"'"+o.replace(/(['])/g,"\\$1")+"'":/["'\s]/.test(o)?'"'+o.replace(/(["\\$`!])/g,"\\$1")+'"':String(o).replace(/([A-Za-z]:)?([#!"$&'()*,:;<=>?@[\\\]^`{|}])/g,"$1\\$2")}).join(" ")}})),Ik=le(((e,t)=>{for(var n="(?:"+["\\|\\|","\\&\\&",";;","\\|\\&","\\<\\(","\\<\\<\\<",">>",">\\&","<\\&","[&;()|<>]"].join("|")+")",r=new RegExp("^"+n+"$"),s="|&;()<> \\t",i='"((\\\\"|[^"])*?)"',a="'((\\\\'|[^'])*?)'",o=/^#$/,l="'",c='"',u="$",f="",d=4294967296,p=0;p<4;p++)f+=(d*Math.random()).toString(16);var h=new RegExp("^"+f);function y(A,g){for(var E=g.lastIndex,v=[],S;S=g.exec(A);)v.push(S),g.lastIndex===S.index&&(g.lastIndex+=1);return g.lastIndex=E,v}function m(A,g,E){var v=typeof A=="function"?A(E):A[E];return typeof v>"u"&&E!=""?v="":typeof v>"u"&&(v="$"),typeof v=="object"?g+f+JSON.stringify(v)+f:g+v}function w(A,g,E){E||(E={});var v=E.escape||"\\",S="(\\"+v+`['"`+s+`]|[^\\s'"`+s+"])+",b=y(A,new RegExp(["("+n+")","("+S+"|"+i+"|"+a+")+"].join("|"),"g"));if(b.length===0)return[];g||(g={});var _=!1;return b.map(function(C){var x=C[0];if(!x||_)return;if(r.test(x))return{op:x};var T=!1,k=!1,O="",R=!1,I;function M(){I+=1;var V,te,Q=x.charAt(I);if(Q==="{"){if(I+=1,x.charAt(I)==="}")throw new Error("Bad substitution: "+x.slice(I-2,I+1));if(V=x.indexOf("}",I),V<0)throw new Error("Bad substitution: "+x.slice(I));te=x.slice(I,V),I=V}else if(/[*@#?$!_-]/.test(Q))te=Q,I+=1;else{var Z=x.slice(I);V=Z.match(/[^\w\d_]/),V?(te=Z.slice(0,V.index),I+=V.index-1):(te=Z,I=x.length)}return m(g,"",te)}for(I=0;I<x.length;I++){var B=x.charAt(I);if(R=R||!T&&(B==="*"||B==="?"),k)O+=B,k=!1;else if(T)B===T?T=!1:T==l?O+=B:B===v?(I+=1,B=x.charAt(I),B===c||B===v||B===u?O+=B:O+=v+B):B===u?O+=M():O+=B;else if(B===c||B===l)T=B;else{if(r.test(B))return{op:x};if(o.test(B)){_=!0;var U={comment:A.slice(C.index+I+1)};return O.length?[O,U]:[U]}else B===v?k=!0:B===u?O+=M():O+=B}}return R?{op:"glob",pattern:O}:O}).reduce(function(C,x){return typeof x>"u"?C:C.concat(x)},[])}t.exports=function(g,E,v){var S=w(g,E,v);return typeof E!="function"?S:S.reduce(function(b,_){if(typeof _=="object")return b.concat(_);var C=_.split(RegExp("("+f+".*?"+f+")","g"));return C.length===1?b.concat(C[0]):b.concat(C.filter(Boolean).map(function(x){return h.test(x)?JSON.parse(x.split(f)[1]):x}))},[])}})),Rk=le((e=>{e.quote=Ck(),e.parse=Ik()})),kk=le(((e,t)=>{t.exports={"/Applications/Atom.app/Contents/MacOS/Atom":"atom","/Applications/Atom Beta.app/Contents/MacOS/Atom Beta":"/Applications/Atom Beta.app/Contents/MacOS/Atom Beta","/Applications/Brackets.app/Contents/MacOS/Brackets":"brackets","/Applications/Sublime Text.app/Contents/MacOS/Sublime Text":"/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl","/Applications/Sublime Text.app/Contents/MacOS/sublime_text":"/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl","/Applications/Sublime Text 2.app/Contents/MacOS/Sublime Text 2":"/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl","/Applications/Sublime Text Dev.app/Contents/MacOS/Sublime Text":"/Applications/Sublime Text Dev.app/Contents/SharedSupport/bin/subl","/Applications/Visual Studio Code.app/Contents/MacOS/Code":"code","/Applications/Visual Studio Code.app/Contents/MacOS/Electron":"code","/Applications/Visual Studio Code - Insiders.app/Contents/MacOS/Code - Insiders":"code-insiders","/Applications/Visual Studio Code - Insiders.app/Contents/MacOS/Electron":"code-insiders","/Applications/VSCodium.app/Contents/MacOS/Electron":"codium","/Applications/Cursor.app/Contents/MacOS/Cursor":"cursor","/Applications/Trae.app/Contents/MacOS/Electron":"trae","/Applications/Antigravity.app/Contents/MacOS/Electron":"antigravity","/Applications/AppCode.app/Contents/MacOS/appcode":"/Applications/AppCode.app/Contents/MacOS/appcode","/Applications/CLion.app/Contents/MacOS/clion":"/Applications/CLion.app/Contents/MacOS/clion","/Applications/IntelliJ IDEA.app/Contents/MacOS/idea":"/Applications/IntelliJ IDEA.app/Contents/MacOS/idea","/Applications/IntelliJ IDEA Ultimate.app/Contents/MacOS/idea":"/Applications/IntelliJ IDEA Ultimate.app/Contents/MacOS/idea","/Applications/IntelliJ IDEA Community Edition.app/Contents/MacOS/idea":"/Applications/IntelliJ IDEA Community Edition.app/Contents/MacOS/idea","/Applications/PhpStorm.app/Contents/MacOS/phpstorm":"/Applications/PhpStorm.app/Contents/MacOS/phpstorm","/Applications/PyCharm.app/Contents/MacOS/pycharm":"/Applications/PyCharm.app/Contents/MacOS/pycharm","/Applications/PyCharm CE.app/Contents/MacOS/pycharm":"/Applications/PyCharm CE.app/Contents/MacOS/pycharm","/Applications/RubyMine.app/Contents/MacOS/rubymine":"/Applications/RubyMine.app/Contents/MacOS/rubymine","/Applications/WebStorm.app/Contents/MacOS/webstorm":"/Applications/WebStorm.app/Contents/MacOS/webstorm","/Applications/MacVim.app/Contents/MacOS/MacVim":"mvim","/Applications/GoLand.app/Contents/MacOS/goland":"/Applications/GoLand.app/Contents/MacOS/goland","/Applications/Rider.app/Contents/MacOS/rider":"/Applications/Rider.app/Contents/MacOS/rider","/Applications/Zed.app/Contents/MacOS/zed":"zed"}})),Tk=le(((e,t)=>{t.exports={atom:"atom",Brackets:"brackets","code-insiders":"code-insiders",code:"code",vscodium:"vscodium",codium:"codium",cursor:"cursor",trae:"trae",antigravity:"antigravity",emacs:"emacs",gvim:"gvim",idea:"idea","idea.sh":"idea",phpstorm:"phpstorm","phpstorm.sh":"phpstorm",pycharm:"pycharm","pycharm.sh":"pycharm",rubymine:"rubymine","rubymine.sh":"rubymine",sublime_text:"subl",vim:"vim",webstorm:"webstorm","webstorm.sh":"webstorm",goland:"goland","goland.sh":"goland",rider:"rider","rider.sh":"rider",zed:"zed"}})),Ok=le(((e,t)=>{t.exports=["Brackets.exe","Code.exe","Code - Insiders.exe","VSCodium.exe","Cursor.exe","atom.exe","sublime_text.exe","notepad++.exe","clion.exe","clion64.exe","idea.exe","idea64.exe","phpstorm.exe","phpstorm64.exe","pycharm.exe","pycharm64.exe","rubymine.exe","rubymine64.exe","webstorm.exe","webstorm64.exe","goland.exe","goland64.exe","rider.exe","rider64.exe","Trae.exe","zed.exe","Antigravity.exe"]})),Bk=le(((e,t)=>{let n=ce("path"),r=Rk(),s=ce("child_process"),i=kk(),a=Tk(),o=Ok();function l(d){let p=Object.keys(i),h=d.split(`
|
|
172
|
-
`);for(let y=0;y<p.length;y++){let m=p[y];if(h.includes(m))return i[m];let w=m.replace("/Applications","");if(d.indexOf(w)!==-1){if(m!==i[m])return i[m];let A=h.find(g=>g.endsWith(w));if(A!==void 0)return A}}}function c(d){let p=d.split(`\r
|
|
173
|
-
`);for(let h=0;h<p.length;h++){let y=p[h].trim(),m=n.win32.basename(y);if(o.indexOf(m)!==-1)return y}}function u(d){let p=Object.keys(a);for(let h=0;h<p.length;h++){let y=p[h];if(d.indexOf(y)!==-1)return a[y]}}function f(d){if(d)return r.parse(d);if(process.env.LAUNCH_EDITOR)return[process.env.LAUNCH_EDITOR];if(process.versions.webcontainer)return[process.env.EDITOR||"code"];try{if(process.platform==="darwin"){let p=l(s.execSync("ps x -o comm=",{stdio:["pipe","pipe","ignore"]}).toString());if(p!==void 0)return[p]}else if(process.platform==="win32"){let p=c(s.execSync('powershell -NoProfile -Command "[Console]::OutputEncoding=[Text.Encoding]::UTF8;Get-CimInstance -Query \\"select executablepath from win32_process where executablepath is not null\\" | % { $_.ExecutablePath }"',{stdio:["pipe","pipe","ignore"]}).toString());if(p!==void 0)return[p]}else if(process.platform==="linux"){let p=u(s.execSync("ps x --no-heading -o comm --sort=comm",{stdio:["pipe","pipe","ignore"]}).toString());if(p!==void 0)return[p]}}catch{}return process.env.VISUAL?[process.env.VISUAL]:process.env.EDITOR?[process.env.EDITOR]:[null]}t.exports=f,t.exports.getEditorFromMacProcesses=l,t.exports.getEditorFromWindowsProcesses=c,t.exports.getEditorFromLinuxProcesses=u})),$k=le(((e,t)=>{let n=ce("path");t.exports=function(s,i,a,o=1){switch(n.basename(s).replace(/\.(exe|cmd|bat)$/i,"")){case"atom":case"Atom":case"Atom Beta":case"subl":case"sublime":case"sublime_text":case"wstorm":case"charm":case"zed":return[`${i}:${a}:${o}`];case"notepad++":return["-n"+a,"-c"+o,i];case"vim":case"mvim":return[`+call cursor(${a}, ${o})`,i];case"joe":case"gvim":return[`+${a}`,i];case"emacs":case"emacsclient":return[`+${a}:${o}`,i];case"rmate":case"mate":case"mine":return["--line",a,i];case"code":case"Code":case"code-insiders":case"Code - Insiders":case"codium":case"trae":case"antigravity":case"cursor":case"vscodium":case"VSCodium":return["-r","-g",`${i}:${a}:${o}`];case"appcode":case"clion":case"clion64":case"idea":case"idea64":case"phpstorm":case"phpstorm64":case"pycharm":case"pycharm64":case"rubymine":case"rubymine64":case"webstorm":case"webstorm64":case"goland":case"goland64":case"rider":case"rider64":return["--line",a,"--column",o,i]}return process.env.LAUNCH_EDITOR?[i,a,o]:[i]}})),Mk=le(((e,t)=>{let n=ce("fs"),r=ce("os"),s=ce("path"),i=Lm(),a=ce("child_process"),o=Bk(),l=$k();function c(y){return(m,w)=>{console.log(),console.log(i.red("Could not open "+s.basename(m)+" in the editor.")),w&&(w[w.length-1]!=="."&&(w+="."),console.log(i.red("The editor process exited with an error: "+w))),console.log(),y&&y(m,w)}}function u(y){switch(y){case"vim":case"emacs":case"nano":return!0}return!1}let f=/:(\d+)(:(\d+))?$/;function d(y){y.startsWith("file://")&&(y=ce("url").fileURLToPath(y));let m=y.replace(f,""),w=y.match(f);return{fileName:m,lineNumber:w&&w[1],columnNumber:w&&w[3]}}let p=null;function h(y,m,w){let A=d(y),{fileName:g}=A,{lineNumber:E,columnNumber:v}=A;if(process.platform==="win32"&&s.resolve(g).startsWith("\\\\"))return w(g,"UNC paths are not supported on Windows to avoid security issues. See https://github.com/vitejs/launch-editor/tree/main/packages/launch-editor#unc-paths-on-windows for details.");if(!n.existsSync(g))return;typeof m=="function"&&(w=m,m=void 0),w=c(w);let[S,...b]=o(m);if(!S){w(g,null);return}if(process.platform==="linux"&&g.startsWith("/mnt/")&&/Microsoft/i.test(r.release())&&(g=s.relative("",g)),E){let _=l(S,g,E,v);b.push.apply(b,_)}else b.push(g);if(p&&u(S)&&p.kill("SIGKILL"),process.platform==="win32"){let _=function(T){return T.replace(/([&|<>,;=^])/g,"^$1")},C=function(T){return T.includes("^")?`^"${T}^"`:T.includes(" ")?`"${T}"`:T},x=[S,...b.map(_)].map(C).join(" ");p=a.exec(x,{stdio:"inherit",shell:!0})}else p=a.spawn(S,b,{stdio:"inherit"});p.on("exit",function(_){p=null,_&&w(g,"(code "+_+")")}),p.on("error",function(_){let{code:C,message:x}=_;C==="ENOENT"&&(x=`${x} ('${S}' command does not exist in 'PATH')`),w(g,x)})}t.exports=h})),Dk=le(((e,t)=>{let n=ce("path"),r=Mk();t.exports=(s,i,a)=>(typeof s=="function"&&(a=s,s=void 0),typeof i=="function"&&(a=i,i=void 0),i=i||process.cwd(),function(l,c){let u;try{let d=l.url.startsWith("http")?l.url:`http://localhost${l.url}`;u=new URL(d)}catch{c.statusCode=500,c.end("launch-editor-middleware: invalid URL.");return}let f=u.searchParams.get("file");if(!f)c.statusCode=500,c.end('launch-editor-middleware: required query param "file" is missing.');else{let d=f.startsWith("file://")?f:n.resolve(i,f);r(d,s,a),c.end()}})})),Pk=le(((e,t)=>{var n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,a=(O,R)=>{for(var I in R)n(O,I,{get:R[I],enumerable:!0})},o=(O,R,I,M)=>{if(R&&typeof R=="object"||typeof R=="function")for(let B of s(R))!i.call(O,B)&&B!==I&&n(O,B,{get:()=>R[B],enumerable:!(M=r(R,B))||M.enumerable});return O},l=O=>o(n({},"__esModule",{value:!0}),O),c={};a(c,{KNOWN_AGENTS:()=>T,determineAgent:()=>k}),t.exports=l(c);var u=ce("node:fs/promises"),f=ce("node:fs");let d="/opt/.devin",p="cursor",h="cursor-cli",y="claude",m="cowork",w="devin",A="replit",g="gemini",E="codex",v="antigravity",S="augment-cli",b="opencode",_="github-copilot",C="github-copilot-cli",x="v0",T={CURSOR:p,CURSOR_CLI:h,CLAUDE:y,COWORK:m,DEVIN:w,REPLIT:A,GEMINI:g,CODEX:E,ANTIGRAVITY:v,AUGMENT_CLI:S,OPENCODE:b,GITHUB_COPILOT:_,V0:x};async function k(){if(process.env.AI_AGENT){let O=process.env.AI_AGENT.trim();if(O)return O===_||O===C?{isAgent:!0,agent:{name:_}}:O===x?{isAgent:!0,agent:{name:x}}:{isAgent:!0,agent:{name:O}}}if(process.env.CURSOR_TRACE_ID)return{isAgent:!0,agent:{name:p}};if(process.env.CURSOR_AGENT||process.env.CURSOR_EXTENSION_HOST_ROLE==="agent-exec")return{isAgent:!0,agent:{name:h}};if(process.env.GEMINI_CLI)return{isAgent:!0,agent:{name:g}};if(process.env.CODEX_SANDBOX||process.env.CODEX_CI||process.env.CODEX_THREAD_ID)return{isAgent:!0,agent:{name:E}};if(process.env.ANTIGRAVITY_AGENT)return{isAgent:!0,agent:{name:v}};if(process.env.AUGMENT_AGENT)return{isAgent:!0,agent:{name:S}};if(process.env.OPENCODE_CLIENT)return{isAgent:!0,agent:{name:b}};if(process.env.CLAUDECODE||process.env.CLAUDE_CODE)return process.env.CLAUDE_CODE_IS_COWORK?{isAgent:!0,agent:{name:m}}:{isAgent:!0,agent:{name:y}};if(process.env.REPL_ID)return{isAgent:!0,agent:{name:A}};if(process.env.COPILOT_MODEL||process.env.COPILOT_ALLOW_ALL||process.env.COPILOT_GITHUB_TOKEN)return{isAgent:!0,agent:{name:_}};try{return await(0,u.access)(d,f.constants.F_OK),{isAgent:!0,agent:{name:w}}}catch{}return{isAgent:!1,agent:void 0}}}));async function Nk(e,t){if(!t){let{createServer:r}=await import("http");return r(e)}let{createSecureServer:n}=await import("http2");return n({maxSessionMemory:1e3,streamResetBurst:1e5,streamResetRate:33,...t,allowHTTP1:!0},e)}async function Lk(e){if(!e)return;let[t,n,r,s]=await Promise.all([Xs(e.ca),Xs(e.cert),Xs(e.key),Xs(e.pfx)]);return{...e,ca:t,cert:n,key:r,pfx:s}}async function Xs(e){return typeof e=="string"?Ee.readFile(L.resolve(e)).catch(()=>e):e}async function Fk(e){for(let t=0;t<3;t++){let n=0,r=!0;for(let s of[...ao,e]){let i=await cy(n,s).catch(()=>n);if(i==null){r=!1;break}n=i}if(r)return n}return null}async function jk(e){for(let t of ao)if(!await cy(e,t).catch(()=>!0))return!1;return!0}function cy(e,t){return new Promise(n=>{let r=Oi.createServer();r.once("error",s=>{r.close(()=>n(s.code==="EADDRINUSE"?null:e))}),r.once("listening",()=>{let s=r.address();r.close(()=>n(typeof s=="object"&&s?s.port:e))}),r.listen(e,t)})}async function ol(e,t,n){return new Promise(r=>{let s=a=>{e.off("error",s),e.off("listening",i),r({success:!1,error:a})},i=()=>{e.off("error",s),e.off("listening",i),r({success:!0})};e.on("error",s),e.on("listening",i),e.listen(t,n)})}var Fp=65535;async function Qk(e,t){let{port:n,strictPort:r,host:s,logger:i}=t;if(n===0){let a=await Fk(s);if(a==null)throw new Error("No available ephemeral port found");let o=await ol(e,a,s);if(o.success)return a;throw o.error.code!=="EADDRINUSE"?o.error:new Error(`Port ${a} is already in use`)}for(let a=n;a<=Fp;a++){let o=await jk(a);if(r){let l=await ol(e,a,s);if(l.success)return o||i.warn(j.default.yellow(`Port ${a} is in use on a wildcard address, but ${s??"localhost"}:${a} is available. There may be another server running on a wildcard IP on port ${a}.`)),a;throw l.error.code!=="EADDRINUSE"?l.error:new Error(`Port ${a} is already in use`)}if(o){let l=await ol(e,a,s);if(l.success)return a;if(l.error.code!=="EADDRINUSE")throw l.error}i.info(`Port ${a} is in use, trying another one...`)}throw new Error(`No available ports found between ${n} and ${Fp}`)}function Uk(e,t){e.on("clientError",(n,r)=>{let s;switch(n.code){case"HPE_HEADER_OVERFLOW":s="431 Request Header Fields Too Large",t.warn(j.default.yellow("Server responded with status code 431. See https://vite.dev/guide/troubleshooting.html#_431-request-header-fields-too-large."));break;case"HPE_CHUNK_EXTENSIONS_OVERFLOW":s="413 Payload Too Large";break;case"ERR_HTTP_REQUEST_TIMEOUT":s="408 Request Timeout";break;default:s="400 Bad Request"}n.code==="ECONNRESET"||!r.writable||r.end(`HTTP/1.1 ${s}\r
|
|
174
|
-
Connection: close\r
|
|
175
|
-
\r
|
|
176
|
-
`)})}var ac;function Hk(){if(ac===void 0)try{new Function(`"use strict";
|
|
177
|
-
throw new Error(1)`)()}catch(e){let t=/:(\d+):\d+\)$/.exec(e.stack.split(`
|
|
178
|
-
`)[1]);ac=t?+t[1]-1:0}}function uy(e,t){Hk();let n=!1;return{result:e.split(`
|
|
179
|
-
`).map(r=>r.replace(/^ {4}at (?:(\S.*?)\s\()?(.+?):(\d+)(?::(\d+))?\)?/,(s,i,a,o,l)=>{if(!a)return s;let c=t.getModuleById(a)?.transformResult?.map;if(!c)return s;let u=new lo(c),f=Number(o)-ac,d=Number(l)-1;if(f<=0||d<0)return n=!0,s;let p=eg(u,{line:f,column:d});if(!p.source)return s;let h=i?.trim(),y=`${L.resolve(L.dirname(a),p.source)}:${p.line}:${p.column+1}`;return!h||h==="eval"?` at ${y}`:` at ${h} (${y})`})).join(`
|
|
180
|
-
`),alreadyRewritten:n}}function Wk(e,t){let{configurable:n,writable:r}=Object.getOwnPropertyDescriptor(e,"stack");n?Object.defineProperty(e,"stack",{value:t,enumerable:!0,configurable:!0,writable:!0}):r&&(e.stack=t)}var jp=new WeakSet;function fy(e,t){if(!e.stack||jp.has(e))return;let{result:n,alreadyRewritten:r}=uy(e.stack,t);Wk(e,n),r&&(e.message+=" (The stacktrace appears to be already rewritten by something else, but was passed to vite.ssrFixStacktrace. This may cause incorrect stacktraces.)"),jp.add(e)}function Gk(e,t){return e.config.server.hmr===!1||t.hmr===!1||!("api"in e.hot)?!1:{logger:t.hmr?.logger??{debug:(...n)=>e.logger.info(n.join(" "),{timestamp:!0}),error:n=>e.logger.error(n instanceof Error?n.message:String(n),{timestamp:!0})}}}var al={retrieveFile(e){if(CS(e))return IS(e,"utf-8")}};function zk(e){return e.sourcemapInterceptor!=null?e.sourcemapInterceptor==="prepareStackTrace"?al:typeof e.sourcemapInterceptor=="object"?{...al,...e.sourcemapInterceptor}:e.sourcemapInterceptor:typeof process<"u"&&"setSourceMapsEnabled"in process?"node":al}var dy=e=>{let t={send:r=>{if(r.type!=="custom")throw new Error("Cannot send non-custom events from the client to the server.");e.channel.send(r)}},n;return{connect({onMessage:r}){e.channel.api.outsideEmitter.on("send",r),e.channel.api.innerEmitter.emit("vite:client:connect",void 0,t),r({type:"connected"}),n=r},disconnect(){n&&e.channel.api.outsideEmitter.off("send",n),e.channel.api.innerEmitter.emit("vite:client:disconnect",void 0,t)},send(r){if(r.type!=="custom")throw new Error("Cannot send non-custom events from the server to the client.");e.channel.api.innerEmitter.emit(r.event,r.data,t)}}};function Jk(e,t={}){let n=Gk(e,t);return new Ga({...t,transport:dy({channel:e.hot}),hmr:n,createImportMeta:Wa,sourcemapInterceptor:zk(t)},t.evaluator)}async function Kk(e,t,n){let r=t.environments.ssr;if(!lL(r))throw new Error("ssrLoadModule requires the 'ssr' environment to be a runnable environment.");return t._ssrCompatModuleRunner||=new qk(r),e=Qt(e),Vk(e,t._ssrCompatModuleRunner,r,n)}async function Vk(e,t,n,r){let s=await n.moduleGraph.ensureEntryFromUrl(e);if(s.ssrError)throw s.ssrError;try{return await t.import(e)}catch(i){throw i.stack&&r&&fy(i,n.moduleGraph),n.logger.error(Un(i,[j.default.red(`Error when evaluating SSR module ${e}: ${i.message}`)]),{timestamp:!0,clear:n.config.clearScreen,error:i}),i}}var qk=class extends Ga{environment;constructor(e){super({transport:dy({channel:e.hot}),createImportMeta:Wa,sourcemapInterceptor:!1,hmr:!1},new Ha),this.environment=e}async directRequest(e,t,n){let r=t.meta&&"id"in t.meta&&t.meta.id;if(!r)return super.directRequest(e,t,n);let s=this.environment.moduleGraph.getModuleById(r);if(!s)return super.directRequest(r,t,n);try{let i=await super.directRequest(r,t,n);return s.ssrModule=i,i}catch(i){throw s.ssrError=i,i}}};function Yk(e,t,n){let r=n._,s=!1;function i(o,{next:l,state:c}){l(c)}function a(o,l,c){if(s||!o.type)return;let u,f={},d={path:l,state:c,next:(h=c)=>{l.push(o);for(let y in o){if(y==="type")continue;let m=o[y];if(m&&typeof m=="object")if(Array.isArray(m)){let w={},A=m.length,g=!1;for(let E=0;E<A;E++){let v=m[E];if(v&&typeof v=="object"){let S=a(v,l,h);S&&(w[E]=S,g=!0)}}g&&(f[y]=m.map((E,v)=>w[v]??E))}else{let w=a(m,l,h);w&&(f[y]=w)}}if(l.pop(),Object.keys(f).length>0)return Qp(o,f)},stop:()=>{s=!0},visit:(h,y=c)=>{l.push(o);let m=a(h,l,y)??h;return l.pop(),m}},p=n[o.type]??i;if(r){let h;u=r(o,{...d,next:(y=c)=>(c=y,h=p(o,{...d,state:y}),h)}),!u&&h&&(u=h)}else u=p(o,d);if(u||Object.keys(f).length>0&&(u=Qp(o,f)),u)return u}return a(e,[],t)??e}function Qp(e,t){let n={},r=Object.getOwnPropertyDescriptors(e);for(let s in r)Object.defineProperty(n,s,r[s]);for(let s in t)n[s]=t[s];return n}function py(e,t){if(e.type==="MemberExpression")return!e.computed&&py(e.object,e);if(e.type!=="Identifier")return!1;switch(t?.type){case"MemberExpression":return t.computed||e===t.object;case"MethodDefinition":return t.computed;case"MetaProperty":return t.meta===e;case"PropertyDefinition":return t.computed||e===t.value;case"Property":return t.computed||e===t.value;case"ExportSpecifier":case"ImportSpecifier":return e===t.local;case"LabeledStatement":case"BreakStatement":case"ContinueStatement":return!1;default:return!0}}function Xk(e){let t=new WeakMap,n=new Map,r=new ll(null,!1),s=[],i=r;function a(o,l){t.set(o,i=new ll(i,l))}Yk(e,null,{_(o,l){switch(o.type){case"Identifier":let c=l.path.at(-1);c&&py(o,c)&&s.push([i,o]);return;case"ImportDefaultSpecifier":case"ImportSpecifier":i.declarations.set(o.local.name,o);return;case"ExportNamedDeclaration":if(o.source){t.set(o,i=new ll(i,!0));for(let u of o.specifiers)i.declarations.set(u.local.name,u);return}break;case"FunctionExpression":case"FunctionDeclaration":case"ArrowFunctionExpression":o.type==="FunctionDeclaration"?(o.id&&i.declarations.set(o.id.name,o),a(o,!1)):(a(o,!1),o.type==="FunctionExpression"&&o.id&&i.declarations.set(o.id.name,o));for(let u of o.params)for(let f of Fi(u))i.declarations.set(f,o);break;case"ForStatement":case"ForInStatement":case"ForOfStatement":case"BlockStatement":case"SwitchStatement":a(o,!0);break;case"ClassDeclaration":case"VariableDeclaration":i.add_declaration(o);break;case"CatchClause":if(a(o,!0),o.param)for(let u of Fi(o.param))o.param&&i.declarations.set(u,o.param)}l.next(),t.has(o)&&i!==null&&i.parent&&(i=i.parent)}});for(let o=s.length-1;o>=0;--o){let[l,c]=s[o];l.references.has(c.name)||hy(l,c.name),l.find_owner(c.name)||n.set(c.name,c)}return{map:t,scope:r,globals:n}}function hy(e,t){e.references.add(t),e.parent&&hy(e.parent,t)}var ll=class{constructor(e,t){this.parent=e,this.block=t,this.declarations=new Map,this.initialised_declarations=new Set,this.references=new Set}add_declaration(e){if(e.type==="VariableDeclaration")if(e.kind==="var"&&this.block&&this.parent)this.parent.add_declaration(e);else for(let t of e.declarations)for(let n of Fi(t.id))this.declarations.set(n,e),t.init&&this.initialised_declarations.add(n);else e.id&&this.declarations.set(e.id.name,e)}find_owner(e){return this.declarations.has(e)?this:this.parent&&this.parent.find_owner(e)}has(e){return this.declarations.has(e)||!!this.parent&&this.parent.has(e)}};function Fi(e){return Pn(e).map(t=>t.name)}function Pn(e,t=[]){switch(e.type){case"Identifier":t.push(e);break;case"MemberExpression":let n=e;for(;n.type==="MemberExpression";)n=n.object;t.push(n);break;case"ObjectPattern":for(let r of e.properties)r.type==="RestElement"?Pn(r.argument,t):Pn(r.value,t);break;case"ArrayPattern":for(let r of e.elements)r&&Pn(r,t);break;case"RestElement":Pn(e.argument,t);break;case"AssignmentPattern":Pn(e.left,t)}return t}var Zk=class{constructor(){this.should_skip=!1,this.should_remove=!1,this.replacement=null,this.context={skip:()=>this.should_skip=!0,remove:()=>this.should_remove=!0,replace:e=>this.replacement=e}}replace(e,t,n,r){e&&t&&(n!=null?e[t][n]=r:e[t]=r)}remove(e,t,n){e&&t&&(n!=null?e[t].splice(n,1):delete e[t])}},eT=class extends Zk{constructor(e,t){super(),this.should_skip=!1,this.should_remove=!1,this.replacement=null,this.context={skip:()=>this.should_skip=!0,remove:()=>this.should_remove=!0,replace:n=>this.replacement=n},this.enter=e,this.leave=t}visit(e,t,n,r){if(e){if(this.enter){let i=this.should_skip,a=this.should_remove,o=this.replacement;this.should_skip=!1,this.should_remove=!1,this.replacement=null,this.enter.call(this.context,e,t,n,r),this.replacement&&(e=this.replacement,this.replace(t,n,r,e)),this.should_remove&&this.remove(t,n,r);let l=this.should_skip,c=this.should_remove;if(this.should_skip=i,this.should_remove=a,this.replacement=o,l)return e;if(c)return null}let s;for(s in e){let i=e[s];if(i&&typeof i=="object")if(Array.isArray(i)){let a=i;for(let o=0;o<a.length;o+=1){let l=a[o];Up(l)&&(this.visit(l,e,s,o)||o--)}}else Up(i)&&this.visit(i,e,s,null)}if(this.leave){let i=this.replacement,a=this.should_remove;this.replacement=null,this.should_remove=!1,this.leave.call(this.context,e,t,n,r),this.replacement&&(e=this.replacement,this.replace(t,n,r,e)),this.should_remove&&this.remove(t,n,r);let o=this.should_remove;if(this.replacement=i,this.should_remove=a,o)return null}}return e}};function Up(e){return e!==null&&typeof e=="object"&&"type"in e&&typeof e.type=="string"}function my(e,{enter:t,leave:n}){return new eT(t,n).visit(e,null)}var tT=new RegExp("\\.(?:json|json5)(?:$|\\?)"),nT=e=>tT.test(e),rT="__vite_ssr_exports__",sT="__vite_ssr_import__",iT="__vite_ssr_dynamic_import__",oT="__vite_ssr_exportAll__",aT="__vite_ssr_exportName__",lT="__vite_ssr_import_meta__";async function gy(e,t,n,r,s){return s?.json?.stringify&&nT(n)?cT(e,t):uT(e,t,n,r)}function cT(e,t){return{code:e.replace("export default",`${rT}.default =`),map:t,deps:[],dynamicDeps:[],ssr:!0}}async function uT(e,t,n,r){let s=new Ie(e),i;try{i=await Bs(e)}catch(g){throw g.code==="PARSE_ERROR"&&(g.message=`Parse failure: ${g.message}
|
|
181
|
-
`,g.id=n,typeof g.pos=="number"?(g.loc=Dt(e,g.pos),g.loc.file=n,g.frame=Ue(e,g.pos),g.message+=`At file: ${n}:${g.loc.line}:${g.loc.column}`):g.message+=`At file: ${n}`),g}let a=0,o=new Set,l=new Set,c=new Map,u=new Set,f=ys(e),d=f;function p(g,E,v){let S=E.source.value;o.add(S);let b=(v?.importedNames?.length??0)>0?`, ${JSON.stringify(v)}`:"",_=`__vite_ssr_import_${a++}__`,C=`const ${_} = await ${sT}(${JSON.stringify(S)}${b});
|
|
182
|
-
`;return s.update(E.start,E.end,C),E.start===g?d=E.end:s.move(E.start,E.end,g),_}function h(g,E=g){s.appendLeft(f,`${aT}(${JSON.stringify(g)}, () => { try { return ${E} } catch {} });
|
|
183
|
-
`)}let y=[],m=[],w=new Map;for(let g of i.body)g.type==="ImportDeclaration"?y.push(g):g.type==="ExportDefaultDeclaration"?m.push(g):(g.type==="ExportNamedDeclaration"||g.type==="ExportAllDeclaration")&&(y.push(g),m.push(g));for(let g of y){if(g.type==="ExportNamedDeclaration"){if(g.source){let v=p(d,g,{importedNames:g.specifiers.map(S=>xr(S.local))});w.set(g,v)}continue}if(g.type==="ExportAllDeclaration"){if(g.source){let v=p(d,g);w.set(g,v)}continue}let E=p(d,g,{importedNames:g.specifiers.map(v=>{if(v.type==="ImportSpecifier")return xr(v.imported);if(v.type==="ImportDefaultSpecifier")return"default"}).filter(Ig)});for(let v of g.specifiers)v.type==="ImportSpecifier"?v.imported.type==="Identifier"?c.set(v.local.name,`${E}.${v.imported.name}`):c.set(v.local.name,`${E}[${JSON.stringify(v.imported.value)}]`):v.type==="ImportDefaultSpecifier"?c.set(v.local.name,`${E}.default`):c.set(v.local.name,E)}for(let g of m){if(g.type==="ExportNamedDeclaration")if(g.declaration){if(g.declaration.type==="FunctionDeclaration"||g.declaration.type==="ClassDeclaration")h(g.declaration.id.name);else{let E=g.declaration;for(let v of E.declarations){let S=Fi(v.id);for(let b of S)h(b)}}s.remove(g.start,g.declaration.start)}else if(g.source){let E=w.get(g);for(let v of g.specifiers){let S=xr(v.exported);v.local.type==="Identifier"?h(S,`${E}.${v.local.name}`):h(S,`${E}[${JSON.stringify(v.local.value)}]`)}}else{s.remove(g.start,g.end);for(let E of g.specifiers){let v=E.local.name,S=c.get(v);h(xr(E.exported),S||v)}}if(g.type==="ExportDefaultDeclaration")if("id"in g.declaration&&g.declaration.id&&!["FunctionExpression","ClassExpression"].includes(g.declaration.type)){let{name:E}=g.declaration.id;s.remove(g.start,g.start+15),h("default",E)}else{let E="__vite_ssr_export_default__";s.update(g.start,g.start+14,`const ${E} =`),h("default",E)}if(g.type==="ExportAllDeclaration"){let E=w.get(g);g.exported?h(xr(g.exported),`${E}`):s.appendLeft(g.end,`${oT}(${E});
|
|
184
|
-
`)}}dT(i,{onStatements(g){for(let E=0;E<g.length-1;E++){let v=g[E];e[v.end-1]!==";"&&v.type!=="FunctionDeclaration"&&v.type!=="ClassDeclaration"&&v.type!=="BlockStatement"&&v.type!=="ImportDeclaration"&&s.appendLeft(v.end,";")}},onIdentifier(g,E,v){let S=c.get(g.name);if(S)if(wy(E)&&E.shorthand)(!Ay(E)||Ey(E,v))&&s.appendLeft(g.end,`: ${S}`);else if(E.type==="ClassDeclaration"&&g===E.superClass){if(!u.has(g.name)){u.add(g.name);let b=v[v.length-2];s.prependRight(b.start,`const ${g.name} = ${S};
|
|
185
|
-
`)}}else if(E.type==="CallExpression")if(g===E.callee&&!E.optional){let b=E.arguments.length?E.arguments[0].start:E.end;s.update(g.start,b,`(0,${S})${e.slice(g.end,b)}`)}else s.update(g.start,g.end,S),s.prependRight(g.start,"(0,"),s.appendLeft(g.end,")");else E.type==="ClassExpression"&&g===E.id||s.update(g.start,g.end,S)},onImportMeta(g){s.update(g.start,g.end,lT)},onDynamicImport(g){s.update(g.start,g.start+6,iT),g.type==="ImportExpression"&&g.source.type==="Literal"&&l.add(g.source.value)}});let A;return t?.mappings===""?A=t:(A=s.generateMap({hires:"boundary"}),A.sources=[L.basename(n)],A.sourcesContent=[r],t&&t.mappings&&"sources"in t&&t.sources.length>0&&(A=ms(n,[A,t]))),{code:s.toString(),map:A,ssr:!0,deps:[...o],dynamicDeps:[...l]}}function xr(e){return e.type==="Identifier"?e.name:e.value}var yy=new WeakSet,fT=e=>yy.add(e),Ay=e=>yy.has(e);function dT(e,{onIdentifier:t,onImportMeta:n,onDynamicImport:r,onStatements:s}){let i=[],a=[],o=new WeakMap,l=[],c=(d,p)=>{let h=o.get(d);h&&h.has(p)||(h||(h=new Set,o.set(d,h)),h.add(p))};function u(d,p){return p.some(h=>o.get(h)?.has(d))}function f(d,p){d.type==="Identifier"?c(p,d.name):d.type==="RestElement"?f(d.argument,p):d.type==="ObjectPattern"?d.properties.forEach(h=>{h.type==="RestElement"?c(p,h.argument.name):f(h.value,p)}):d.type==="ArrayPattern"?d.elements.forEach(h=>{h&&f(h,p)}):d.type==="AssignmentPattern"?f(d.left,p):c(p,d.name)}my(e,{enter(d,p){if(d.type==="ImportDeclaration")return this.skip();if(d.type==="Program"||d.type==="BlockStatement"||d.type==="StaticBlock"?s(d.body):d.type==="SwitchCase"&&s(d.consequent),p&&!Hp(d,p)&&i.unshift(p),d.type==="VariableDeclaration"&&a.unshift(d.kind),d.type==="MetaProperty"&&d.meta.name==="import"?n(d):d.type==="ImportExpression"&&r(d),d.type==="Identifier")!u(d.name,i)&&pT(d,p,i)&&l.push([d,i.slice(0)]);else if(eu(d)){if(d.type==="FunctionDeclaration"){let h=cl(i);h&&c(h,d.id.name)}d.type==="FunctionExpression"&&d.id&&c(d,d.id.name),d.params.forEach(h=>f(h,d))}else if(d.type==="ClassDeclaration"){let h=cl(i);h&&c(h,d.id.name)}else if(d.type==="ClassExpression"&&d.id)c(d,d.id.name);else if(d.type==="Property"&&p.type==="ObjectPattern")fT(d);else if(d.type==="VariableDeclarator"){let h=cl(i,a[0]==="var");h&&f(d.id,h)}else d.type==="CatchClause"&&d.param&&f(d.param,d)},leave(d,p){p&&!Hp(d,p)&&i.shift(),d.type==="VariableDeclaration"&&a.shift()}}),l.forEach(([d,p])=>{u(d.name,p)||t(d,p[0],p)})}function pT(e,t,n){return t.type==="CatchClause"||(t.type==="VariableDeclarator"||t.type==="ClassDeclaration")&&t.id===e||eu(t)&&(t.id===e||t.params.includes(e))||t.type==="MethodDefinition"&&!t.computed?!1:t.type==="PropertyDefinition"&&!t.computed?t.value===e:!(hT(e,t)||Ay(t)&&t.value===e||t.type==="ArrayPattern"&&!Ey(t,n)||t.type==="MemberExpression"&&t.property===e&&!t.computed||(t.type==="LabeledStatement"||t.type==="BreakStatement"||t.type==="ContinueStatement")&&t.label===e||t.type==="MetaProperty"||t.type==="ExportSpecifier"||t.type==="ExportAllDeclaration"||e.name==="arguments")}var wy=e=>e.type==="Property"&&!e.computed,hT=(e,t)=>t&&wy(t)&&t.key===e,mT=/Function(?:Expression|Declaration)$|Method$/;function Hp(e,t){return t.type==="IfStatement"&&e===t.alternate||t.type==="SwitchStatement"&&e===t.discriminant}function eu(e){return mT.test(e.type)}var gT=/^BlockStatement$|^SwitchStatement$|^For(?:In|Of)?Statement$/;function yT(e){return gT.test(e.type)}function cl(e,t=!1){return e.find(t?eu:yT)}function Ey(e,t){return e.type==="Property"||e.type==="ArrayPattern"?t.some(n=>n.type==="AssignmentExpression"):!1}var ul;function AT(){try{return pe.statSync("/.dockerenv"),!0}catch{return!1}}function wT(){try{return pe.readFileSync("/proc/self/cgroup","utf8").includes("docker")}catch{return!1}}function ET(){return ul===void 0&&(ul=AT()||wT()),ul}var fl,vT=()=>{try{return pe.statSync("/run/.containerenv"),!0}catch{return!1}};function lc(){return fl===void 0&&(fl=vT()||ET()),fl}var Wp=()=>{if(At.platform!=="linux")return!1;if(zr.release().toLowerCase().includes("microsoft"))return!lc();try{return pe.readFileSync("/proc/version","utf8").toLowerCase().includes("microsoft")?!lc():!1}catch{return!1}},Fr=At.env.__IS_WSL_TEST__?Wp:Wp(),_T=(()=>{let e="/mnt/",t;return async function(){if(t)return t;let n="/etc/wsl.conf",r=!1;try{await Ee.access(n,km.F_OK),r=!0}catch{}if(!r)return e;let s=await Ee.readFile(n,{encoding:"utf8"}),i=/(?<!#.*)root\s*=\s*(?<mountPoint>.*)/g.exec(s);return i?(t=i.groups.mountPoint.trim(),t=t.endsWith("/")?t:`${t}/`,t):e}})(),bT=async()=>`${await _T()}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`,vy=async()=>Fr?bT():`${At.env.SYSTEMROOT||At.env.windir||String.raw`C:\Windows`}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`;function sr(e,t,n){let r=s=>Object.defineProperty(e,t,{value:s,enumerable:!0,writable:!0});return Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get(){let s=n();return r(s),s},set(s){r(s)}}),e}var ST=An(no);async function xT(){if(At.platform!=="darwin")throw new Error("macOS only");let{stdout:e}=await ST("defaults",["read","com.apple.LaunchServices/com.apple.launchservices.secure","LSHandlers"]),t=/LSHandlerRoleAll = "(?!-)(?<id>[^"]+?)";\s+?LSHandlerURLScheme = (?:http|https);/.exec(e)?.groups.id??"com.apple.Safari";return t==="com.apple.safari"?"com.apple.Safari":t}var CT=An(no);async function IT(e,{humanReadableOutput:t=!0,signal:n}={}){if(At.platform!=="darwin")throw new Error("macOS only");let r=t?[]:["-ss"],s={};n&&(s.signal=n);let{stdout:i}=await CT("osascript",["-e",e,r],s);return i.trim()}async function RT(e){return IT(`tell application "Finder" to set app_path to application file id "${e}" as string
|
|
186
|
-
tell application "System Events" to get value of property list item "CFBundleName" of property list file (app_path & ":Contents:Info.plist")`)}var kT=An(no),fi={MSEdgeHTM:{name:"Edge",id:"com.microsoft.edge"},MSEdgeBHTML:{name:"Edge Beta",id:"com.microsoft.edge.beta"},MSEdgeDHTML:{name:"Edge Dev",id:"com.microsoft.edge.dev"},AppXq0fevzme2pys62n3e0fbqa7peapykr8v:{name:"Edge",id:"com.microsoft.edge.old"},ChromeHTML:{name:"Chrome",id:"com.google.chrome"},ChromeBHTML:{name:"Chrome Beta",id:"com.google.chrome.beta"},ChromeDHTML:{name:"Chrome Dev",id:"com.google.chrome.dev"},ChromiumHTM:{name:"Chromium",id:"org.chromium.Chromium"},BraveHTML:{name:"Brave",id:"com.brave.Browser"},BraveBHTML:{name:"Brave Beta",id:"com.brave.Browser.beta"},BraveDHTML:{name:"Brave Dev",id:"com.brave.Browser.dev"},BraveSSHTM:{name:"Brave Nightly",id:"com.brave.Browser.nightly"},FirefoxURL:{name:"Firefox",id:"org.mozilla.firefox"},OperaStable:{name:"Opera",id:"com.operasoftware.Opera"},VivaldiHTM:{name:"Vivaldi",id:"com.vivaldi.Vivaldi"},"IE.HTTP":{name:"Internet Explorer",id:"com.microsoft.ie"}};new Map(Object.entries(fi));var TT=class extends Error{};async function OT(e=kT){let{stdout:t}=await e("reg",["QUERY"," HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations\\http\\UserChoice","/v","ProgId"]),n=/ProgId\s*REG_SZ\s*(?<id>\S+)/.exec(t);if(!n)throw new TT(`Cannot find Windows browser in stdout: ${JSON.stringify(t)}`);let{id:r}=n.groups,s=r.lastIndexOf("."),i=r.lastIndexOf("-"),a=s===-1?void 0:r.slice(0,s),o=i===-1?void 0:r.slice(0,i);return fi[r]??fi[a]??fi[o]??{name:r,id:r}}var BT=An(no),$T=e=>e.toLowerCase().replaceAll(/(?:^|\s|-)\S/g,t=>t.toUpperCase());async function MT(){if(At.platform==="darwin"){let e=await xT();return{name:await RT(e),id:e}}if(At.platform==="linux"){let{stdout:e}=await BT("xdg-mime",["query","default","x-scheme-handler/http"]),t=e.trim();return{name:$T(t.replace(/.desktop$/,"").replace("-"," ")),id:t}}if(At.platform==="win32")return OT();throw new Error("Only macOS, Linux, and Windows are supported")}var DT=An(Tm.execFile),cc=L.dirname(kt(import.meta.url)),Gp=L.join(cc,"xdg-open"),{platform:Ln,arch:zp}=At;async function PT(){let e=await vy(),t=String.raw`(Get-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice").ProgId`,n=Dc.from(t,"utf16le").toString("base64"),{stdout:r}=await DT(e,["-NoProfile","-NonInteractive","-ExecutionPolicy","Bypass","-EncodedCommand",n],{encoding:"utf8"}),s=r.trim(),i={ChromeHTML:"com.google.chrome",BraveHTML:"com.brave.Browser",MSEdgeHTM:"com.microsoft.edge",FirefoxURL:"org.mozilla.firefox"};return i[s]?{id:i[s]}:{}}var Jp=async(e,t)=>{let n;for(let r of e)try{return await t(r)}catch(s){n=s}throw n},di=async e=>{if(e={wait:!1,background:!1,newInstance:!1,allowNonzeroExitCode:!1,...e},Array.isArray(e.app))return Jp(e.app,o=>di({...e,app:o}));let{name:t,arguments:n=[]}=e.app??{};if(n=[...n],Array.isArray(t))return Jp(t,o=>di({...e,app:{name:o,arguments:n}}));if(t==="browser"||t==="browserPrivate"){let o={"com.google.chrome":"chrome","google-chrome.desktop":"chrome","com.brave.Browser":"brave","org.mozilla.firefox":"firefox","firefox.desktop":"firefox","com.microsoft.msedge":"edge","com.microsoft.edge":"edge","com.microsoft.edgemac":"edge","microsoft-edge.desktop":"edge"},l={chrome:"--incognito",brave:"--incognito",firefox:"--private-window",edge:"--inPrivate"},c=Fr?await PT():await MT();if(c.id in o){let u=o[c.id];return t==="browserPrivate"&&n.push(l[u]),di({...e,app:{name:_n[u],arguments:n}})}throw new Error(`${c.name} is not supported as a default browser`)}let r,s=[],i={};if(Ln==="darwin")r="open",e.wait&&s.push("--wait-apps"),e.background&&s.push("--background"),e.newInstance&&s.push("--new"),t&&s.push("-a",t);else if(Ln==="win32"||Fr&&!lc()&&!t){r=await vy(),s.push("-NoProfile","-NonInteractive","-ExecutionPolicy","Bypass","-EncodedCommand"),Fr||(i.windowsVerbatimArguments=!0);let o=["Start"];e.wait&&o.push("-Wait"),t?(o.push(`"\`"${t}\`""`),e.target&&n.push(e.target)):e.target&&o.push(`"${e.target}"`),n.length>0&&(n=n.map(l=>`"\`"${l}\`""`),o.push("-ArgumentList",n.join(","))),e.target=Dc.from(o.join(" "),"utf16le").toString("base64")}else{if(t)r=t;else{let o=!cc||cc==="/",l=!1;try{await Ee.access(Gp,km.X_OK),l=!0}catch{}r=At.versions.electron??(Ln==="android"||o||!l)?"xdg-open":Gp}n.length>0&&s.push(...n),e.wait||(i.stdio="ignore",i.detached=!0)}Ln==="darwin"&&n.length>0&&s.push("--args",...n),e.target&&s.push(e.target);let a=Tm.spawn(r,s,i);return e.wait?new Promise((o,l)=>{a.once("error",l),a.once("close",c=>{if(!e.allowNonzeroExitCode&&c>0){l(new Error(`Exited with code ${c}`));return}o(a)})}):(a.unref(),a)},NT=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a `target`");return di({...t,target:e})};function Kp(e){if(typeof e=="string"||Array.isArray(e))return e;let{[zp]:t}=e;if(!t)throw new Error(`${zp} is not supported`);return t}function bo({[Ln]:e},{wsl:t}){if(t&&Fr)return Kp(t);if(!e)throw new Error(`${Ln} is not supported`);return Kp(e)}var _n={};sr(_n,"chrome",()=>bo({darwin:"google chrome",win32:"chrome",linux:["google-chrome","google-chrome-stable","chromium"]},{wsl:{ia32:"/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe",x64:["/mnt/c/Program Files/Google/Chrome/Application/chrome.exe","/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe"]}}));sr(_n,"brave",()=>bo({darwin:"brave browser",win32:"brave",linux:["brave-browser","brave"]},{wsl:{ia32:"/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe",x64:["/mnt/c/Program Files/BraveSoftware/Brave-Browser/Application/brave.exe","/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe"]}}));sr(_n,"firefox",()=>bo({darwin:"firefox",win32:String.raw`C:\Program Files\Mozilla Firefox\firefox.exe`,linux:"firefox"},{wsl:"/mnt/c/Program Files/Mozilla Firefox/firefox.exe"}));sr(_n,"edge",()=>bo({darwin:"microsoft edge",win32:"msedge",linux:["microsoft-edge","microsoft-edge-dev"]},{wsl:"/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"}));sr(_n,"browser",()=>"browser");sr(_n,"browserPrivate",()=>"browserPrivate");var LT=le(((e,t)=>{t.exports=i,i.sync=a;var n=ce("fs");function r(o,l){var c=l.pathExt!==void 0?l.pathExt:process.env.PATHEXT;if(!c||(c=c.split(";"),c.indexOf("")!==-1))return!0;for(var u=0;u<c.length;u++){var f=c[u].toLowerCase();if(f&&o.substr(-f.length).toLowerCase()===f)return!0}return!1}function s(o,l,c){return!o.isSymbolicLink()&&!o.isFile()?!1:r(l,c)}function i(o,l,c){n.stat(o,function(u,f){c(u,u?!1:s(f,o,l))})}function a(o,l){return s(n.statSync(o),o,l)}})),FT=le(((e,t)=>{t.exports=r,r.sync=s;var n=ce("fs");function r(o,l,c){n.stat(o,function(u,f){c(u,u?!1:i(f,l))})}function s(o,l){return i(n.statSync(o),l)}function i(o,l){return o.isFile()&&a(o,l)}function a(o,l){var c=o.mode,u=o.uid,f=o.gid,d=l.uid!==void 0?l.uid:process.getuid&&process.getuid(),p=l.gid!==void 0?l.gid:process.getgid&&process.getgid(),h=parseInt("100",8),y=parseInt("010",8),m=parseInt("001",8),w=h|y;return c&m||c&y&&f===p||c&h&&u===d||c&w&&d===0}})),jT=le(((e,t)=>{ce("fs");var n;process.platform==="win32"||global.TESTING_WINDOWS?n=LT():n=FT(),t.exports=r,r.sync=s;function r(i,a,o){if(typeof a=="function"&&(o=a,a={}),!o){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(l,c){r(i,a||{},function(u,f){u?c(u):l(f)})})}n(i,a||{},function(l,c){l&&(l.code==="EACCES"||a&&a.ignoreErrors)&&(l=null,c=!1),o(l,c)})}function s(i,a){try{return n.sync(i,a||{})}catch(o){if(a&&a.ignoreErrors||o.code==="EACCES")return!1;throw o}}})),QT=le(((e,t)=>{let n=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",r=ce("path"),s=n?";":":",i=jT(),a=u=>Object.assign(new Error(`not found: ${u}`),{code:"ENOENT"}),o=(u,f)=>{let d=f.colon||s,p=u.match(/\//)||n&&u.match(/\\/)?[""]:[...n?[process.cwd()]:[],...(f.path||process.env.PATH||"").split(d)],h=n?f.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",y=n?h.split(d):[""];return n&&u.indexOf(".")!==-1&&y[0]!==""&&y.unshift(""),{pathEnv:p,pathExt:y,pathExtExe:h}},l=(u,f,d)=>{typeof f=="function"&&(d=f,f={}),f||(f={});let{pathEnv:p,pathExt:h,pathExtExe:y}=o(u,f),m=[],w=g=>new Promise((E,v)=>{if(g===p.length)return f.all&&m.length?E(m):v(a(u));let S=p[g],b=/^".*"$/.test(S)?S.slice(1,-1):S,_=r.join(b,u),C=!b&&/^\.[\\\/]/.test(u)?u.slice(0,2)+_:_;E(A(C,g,0))}),A=(g,E,v)=>new Promise((S,b)=>{if(v===h.length)return S(w(E+1));let _=h[v];i(g+_,{pathExt:y},(C,x)=>{if(!C&&x)if(f.all)m.push(g+_);else return S(g+_);return S(A(g,E,v+1))})});return d?w(0).then(g=>d(null,g),d):w(0)},c=(u,f)=>{f=f||{};let{pathEnv:d,pathExt:p,pathExtExe:h}=o(u,f),y=[];for(let m=0;m<d.length;m++){let w=d[m],A=/^".*"$/.test(w)?w.slice(1,-1):w,g=r.join(A,u),E=!A&&/^\.[\\\/]/.test(u)?u.slice(0,2)+g:g;for(let v=0;v<p.length;v++){let S=E+p[v];try{if(i.sync(S,{pathExt:h}))if(f.all)y.push(S);else return S}catch{}}}if(f.all&&y.length)return y;if(f.nothrow)return null;throw a(u)};t.exports=l,l.sync=c})),UT=le(((e,t)=>{let n=(r={})=>{let s=r.env||process.env;return(r.platform||process.platform)!=="win32"?"PATH":Object.keys(s).reverse().find(i=>i.toUpperCase()==="PATH")||"Path"};t.exports=n,t.exports.default=n})),HT=le(((e,t)=>{let n=ce("path"),r=QT(),s=UT();function i(o,l){let c=o.options.env||process.env,u=process.cwd(),f=o.options.cwd!=null,d=f&&process.chdir!==void 0&&!process.chdir.disabled;if(d)try{process.chdir(o.options.cwd)}catch{}let p;try{p=r.sync(o.command,{path:c[s({env:c})],pathExt:l?n.delimiter:void 0})}catch{}finally{d&&process.chdir(u)}return p&&(p=n.resolve(f?o.options.cwd:"",p)),p}function a(o){return i(o)||i(o,!0)}t.exports=a})),WT=le(((e,t)=>{let n=/([()\][%!^"`<>&|;, *?])/g;function r(i){return i=i.replace(n,"^$1"),i}function s(i,a){return i=`${i}`,i=i.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"'),i=i.replace(/(?=(\\+?)?)\1$/,"$1$1"),i=`"${i}"`,i=i.replace(n,"^$1"),a&&(i=i.replace(n,"^$1")),i}t.exports.command=r,t.exports.argument=s})),GT=le(((e,t)=>{t.exports=/^#!(.*)/})),zT=le(((e,t)=>{let n=GT();t.exports=(r="")=>{let s=r.match(n);if(!s)return null;let[i,a]=s[0].replace(/#! ?/,"").split(" "),o=i.split("/").pop();return o==="env"?a:a?`${o} ${a}`:o}})),JT=le(((e,t)=>{let n=ce("fs"),r=zT();function s(i){let o=Buffer.alloc(150),l;try{l=n.openSync(i,"r"),n.readSync(l,o,0,150,0),n.closeSync(l)}catch{}return r(o.toString())}t.exports=s})),KT=le(((e,t)=>{let n=ce("path"),r=HT(),s=WT(),i=JT(),a=process.platform==="win32",o=/\.(?:com|exe)$/i,l=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function c(d){d.file=r(d);let p=d.file&&i(d.file);return p?(d.args.unshift(d.file),d.command=p,r(d)):d.file}function u(d){if(!a)return d;let p=c(d),h=!o.test(p);if(d.options.forceShell||h){let y=l.test(p);d.command=n.normalize(d.command),d.command=s.command(d.command),d.args=d.args.map(m=>s.argument(m,y)),d.args=["/d","/s","/c",`"${[d.command].concat(d.args).join(" ")}"`],d.command=process.env.comspec||"cmd.exe",d.options.windowsVerbatimArguments=!0}return d}function f(d,p,h){p&&!Array.isArray(p)&&(h=p,p=null),p=p?p.slice(0):[],h=Object.assign({},h);let y={command:d,args:p,options:h,file:void 0,original:{command:d,args:p}};return h.shell?y:u(y)}t.exports=f})),VT=le(((e,t)=>{let n=process.platform==="win32";function r(o,l){return Object.assign(new Error(`${l} ${o.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${l} ${o.command}`,path:o.command,spawnargs:o.args})}function s(o,l){if(!n)return;let c=o.emit;o.emit=function(u,f){if(u==="exit"){let d=i(f,l);if(d)return c.call(o,"error",d)}return c.apply(o,arguments)}}function i(o,l){return n&&o===1&&!l.file?r(l.original,"spawn"):null}function a(o,l){return n&&o===1&&!l.file?r(l.original,"spawnSync"):null}t.exports={hookChildProcess:s,verifyENOENT:i,verifyENOENTSync:a,notFoundError:r}})),qT=nt(le(((e,t)=>{let n=ce("child_process"),r=KT(),s=VT();function i(o,l,c){let u=r(o,l,c),f=n.spawn(u.command,u.args,u.options);return s.hookChildProcess(f,u),f}function a(o,l,c){let u=r(o,l,c),f=n.spawnSync(u.command,u.args,u.options);return f.error=f.error||s.verifyENOENTSync(f.status,u),f}t.exports=i,t.exports.spawn=i,t.exports.sync=a,t.exports._parse=r,t.exports._enoent=s}))(),1);function _y(e,t,n){let r=typeof t=="string"?t:process.env.BROWSER||"";r.toLowerCase().endsWith(".js")?YT(r,e,n):r.toLowerCase()!=="none"&&XT(r,process.env.BROWSER_ARGS?process.env.BROWSER_ARGS.split(" "):[],e,n)}function YT(e,t,n){let r=process.argv.slice(2);(0,qT.default)(process.execPath,[e,...r,t],{stdio:"inherit"}).on("close",s=>{s!==0&&n.error(j.default.red(`
|
|
187
|
-
The script specified as BROWSER environment variable failed.
|
|
188
|
-
|
|
189
|
-
${j.default.cyan(e)} exited with code ${s}.`),{error:null})})}var Vp=["Google Chrome Canary","Google Chrome Dev","Google Chrome Beta","Google Chrome","Microsoft Edge","Brave Browser","Vivaldi","Chromium"];async function XT(e,t,n,r){let s=e==="google chrome"?"Google Chrome":e;if(process.platform==="darwin"&&(!s||Vp.includes(s)))try{let i=await qp("ps cax"),a=s&&i.includes(s)?s:Vp.find(o=>i.includes(o));if(a)return await qp(`osascript openChrome.js "${n}" "${a}"`,{cwd:zt(io,"bin")}),!0}catch{}process.platform==="darwin"&&e==="open"&&(e=void 0);try{let i=e?{app:{name:e,arguments:t}}:{};return new Promise((a,o)=>{NT(n,i).then(l=>{l.on("error",o)}).catch(o)}).catch(a=>{r.error(a.stack||a.message)}),!0}catch{return!1}}function qp(e,t){return new Promise((n,r)=>{Om(e,t,(s,i)=>{s?r(s):n(i.toString())})})}function by(e,t,n=process.stdin.isTTY&&!process.env.CI){if(!e.httpServer||!n)return;let r=Ug(e),s=e._shortcutsState?.options.customShortcuts??[],i=t?.customShortcuts??[],a=new Set(s.map(d=>d.key)),o=[...i.filter(d=>!a.has(d.key)),...s.map(d=>i.find(p=>p.key===d.key)??d)],l={...t,customShortcuts:o};t?.print&&e.config.logger.info(j.default.dim(j.default.green(" \u279C"))+j.default.dim(" press ")+j.default.bold("h + enter")+j.default.dim(" to show help"));let c=o.concat(r?ZT:eO),u=!1,f=async d=>{if(u)return;if(d=d.trim().toLocaleLowerCase(),d==="h"){let h=new Set;e.config.logger.info(`
|
|
190
|
-
Shortcuts`);for(let y of c)h.has(y.key)||(h.add(y.key),y.action!=null&&e.config.logger.info(j.default.dim(" press ")+j.default.bold(`${y.key} + enter`)+j.default.dim(` to ${y.description}`)));return}let p=c.find(h=>h.key===d);!p||p.action==null||(u=!0,await p.action(e),u=!1)};e._shortcutsState?(e._shortcutsState.rl.removeAllListeners("line"),e._shortcutsState.options=l):(e._shortcutsState={rl:Hl.createInterface({input:process.stdin}),options:l},e.httpServer.on("close",()=>{e._shortcutsState&&e._shortcutsState.rl.close()})),e._shortcutsState.rl.on("line",f)}var ZT=[{key:"r",description:"restart the server",async action(e){await KA(e)}},{key:"u",description:"show server url",action(e){e.config.logger.info(""),e.printUrls()}},{key:"o",description:"open in browser",action(e){e.openBrowser()}},{key:"c",description:"clear console",action(e){e.config.logger.clearScreen("error")}},{key:"q",description:"quit",async action(e){try{await e.close()}finally{process.exit()}}}],eO=[{key:"o",description:"open in browser",action(e){let t=e.resolvedUrls?.local[0]??e.resolvedUrls?.network[0];t?_y(t,!0,e.config.logger):e.config.logger.warn("No URL available to open in browser")}},{key:"q",description:"quit",async action(e){try{await e.close()}finally{process.exit()}}}];function Sy(e,t,n){let r=L.resolve(e,t);return n?new Set(He(n).map(({dir:s})=>s?L.resolve(e,s):r)):new Set([r])}function xy(e,t,n,r){if(e!=null)return e;for(let s of n)if(!re(s).startsWith(Me(t)))return r?.warn(j.default.yellow(`
|
|
191
|
-
${j.default.bold("(!)")} outDir ${j.default.white(j.default.dim(s))} is not inside project root and will not be emptied.
|
|
192
|
-
Use --emptyOutDir to override.
|
|
193
|
-
`)),!1;return!0}function tO(e,t,n,r){let{ignored:s,...i}=e??{},a=["**/.git/**","**/node_modules/**","**/test-results/**",kn(r)+"/**",...He(s||[])];return n&&a.push(...[...t].map(o=>kn(o)+"/**")),{ignored:a,ignoreInitial:!0,ignorePermissionErrors:!0,...i}}var nO=class extends Wl{options;constructor(e){super(),this.options=e}add(){return this}unwatch(){return this}getWatched(){return{}}ref(){return this}unref(){return this}async close(){}};function rO(e){return new nO(e)}var Cy=new WeakMap;async function sO(e){let t;try{t=await Tg(e.publicDir)}catch(r){if(r.code==="ERR_SYMLINK_IN_RECURSIVE_READDIR")return;throw r}let n=new Set(t.map(r=>r.slice(e.publicDir.length)));return Cy.set(e,n),n}function iO(e){return Cy.get(e)}function et(e,t){let{publicDir:n}=t;if(!n||e[0]!=="/")return;let r=he(e),s=iO(t);if(s)return s.has(r)?re(L.join(n,r)):void 0;let i=re(L.join(n,r));if(i.startsWith(Me(n)))return _t(i)?.isFile()?i:void 0}var Kt=le(((e,t)=>{let n=["nodebuffer","arraybuffer","fragments"],r=typeof Blob<"u";r&&n.push("blob"),t.exports={BINARY_TYPES:n,CLOSE_TIMEOUT:3e4,EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",hasBlob:r,kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}}})),So=le(((e,t)=>{let{EMPTY_BUFFER:n}=Kt(),r=Buffer[Symbol.species];function s(c,u){if(c.length===0)return n;if(c.length===1)return c[0];let f=Buffer.allocUnsafe(u),d=0;for(let p=0;p<c.length;p++){let h=c[p];f.set(h,d),d+=h.length}return d<u?new r(f.buffer,f.byteOffset,d):f}function i(c,u,f,d,p){for(let h=0;h<p;h++)f[d+h]=c[h]^u[h&3]}function a(c,u){for(let f=0;f<c.length;f++)c[f]^=u[f&3]}function o(c){return c.length===c.buffer.byteLength?c.buffer:c.buffer.slice(c.byteOffset,c.byteOffset+c.length)}function l(c){if(l.readOnly=!0,Buffer.isBuffer(c))return c;let u;return c instanceof ArrayBuffer?u=new r(c):ArrayBuffer.isView(c)?u=new r(c.buffer,c.byteOffset,c.byteLength):(u=Buffer.from(c),l.readOnly=!1),u}if(t.exports={concat:s,mask:i,toArrayBuffer:o,toBuffer:l,unmask:a},!process.env.WS_NO_BUFFER_UTIL)try{let c=ce("bufferutil");t.exports.mask=function(u,f,d,p,h){h<48?i(u,f,d,p,h):c.mask(u,f,d,p,h)},t.exports.unmask=function(u,f){u.length<32?a(u,f):c.unmask(u,f)}}catch{}})),oO=le(((e,t)=>{let n=Symbol("kDone"),r=Symbol("kRun");var s=class{constructor(i){this[n]=()=>{this.pending--,this[r]()},this.concurrency=i||1/0,this.jobs=[],this.pending=0}add(i){this.jobs.push(i),this[r]()}[r](){if(this.pending!==this.concurrency&&this.jobs.length){let i=this.jobs.shift();this.pending++,i(this[n])}}};t.exports=s})),ws=le(((e,t)=>{let n=ce("zlib"),r=So(),s=oO(),{kStatusCode:i}=Kt(),a=Buffer[Symbol.species],o=Buffer.from([0,0,255,255]),l=Symbol("permessage-deflate"),c=Symbol("total-length"),u=Symbol("callback"),f=Symbol("buffers"),d=Symbol("error"),p;var h=class{constructor(A){if(this._options=A||{},this._threshold=this._options.threshold!==void 0?this._options.threshold:1024,this._maxPayload=this._options.maxPayload|0,this._isServer=!!this._options.isServer,this._deflate=null,this._inflate=null,this.params=null,!p){let g=this._options.concurrencyLimit!==void 0?this._options.concurrencyLimit:10;p=new s(g)}}static get extensionName(){return"permessage-deflate"}offer(){let A={};return this._options.serverNoContextTakeover&&(A.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(A.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(A.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?A.client_max_window_bits=this._options.clientMaxWindowBits:this._options.clientMaxWindowBits==null&&(A.client_max_window_bits=!0),A}accept(A){return A=this.normalizeParams(A),this.params=this._isServer?this.acceptAsServer(A):this.acceptAsClient(A),this.params}cleanup(){if(this._inflate&&(this._inflate.close(),this._inflate=null),this._deflate){let A=this._deflate[u];this._deflate.close(),this._deflate=null,A&&A(new Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(A){let g=this._options,E=A.find(v=>!(g.serverNoContextTakeover===!1&&v.server_no_context_takeover||v.server_max_window_bits&&(g.serverMaxWindowBits===!1||typeof g.serverMaxWindowBits=="number"&&g.serverMaxWindowBits>v.server_max_window_bits)||typeof g.clientMaxWindowBits=="number"&&(typeof v.client_max_window_bits=="number"?g.clientMaxWindowBits>v.client_max_window_bits:!v.client_max_window_bits)));if(!E)throw new Error("None of the extension offers can be accepted");return g.serverNoContextTakeover&&(E.server_no_context_takeover=!0),g.clientNoContextTakeover&&(E.client_no_context_takeover=!0),typeof g.serverMaxWindowBits=="number"&&(E.server_max_window_bits=g.serverMaxWindowBits),typeof g.clientMaxWindowBits=="number"?E.client_max_window_bits=g.clientMaxWindowBits:(E.client_max_window_bits===!0||g.clientMaxWindowBits===!1)&&delete E.client_max_window_bits,E}acceptAsClient(A){let g=A[0];if(this._options.clientNoContextTakeover===!1&&g.client_no_context_takeover)throw new Error('Unexpected parameter "client_no_context_takeover"');if(!g.client_max_window_bits)typeof this._options.clientMaxWindowBits=="number"&&(g.client_max_window_bits=this._options.clientMaxWindowBits);else if(this._options.clientMaxWindowBits===!1||typeof this._options.clientMaxWindowBits=="number"&&g.client_max_window_bits>this._options.clientMaxWindowBits)throw new Error('Unexpected or invalid parameter "client_max_window_bits"');return g}normalizeParams(A){return A.forEach(g=>{Object.keys(g).forEach(E=>{let v=g[E];if(v.length>1)throw new Error(`Parameter "${E}" must have only a single value`);if(v=v[0],E==="client_max_window_bits"){if(v!==!0){let S=+v;if(!Number.isInteger(S)||S<8||S>15)throw new TypeError(`Invalid value for parameter "${E}": ${v}`);v=S}else if(!this._isServer)throw new TypeError(`Invalid value for parameter "${E}": ${v}`)}else if(E==="server_max_window_bits"){let S=+v;if(!Number.isInteger(S)||S<8||S>15)throw new TypeError(`Invalid value for parameter "${E}": ${v}`);v=S}else if(E==="client_no_context_takeover"||E==="server_no_context_takeover"){if(v!==!0)throw new TypeError(`Invalid value for parameter "${E}": ${v}`)}else throw new Error(`Unknown parameter "${E}"`);g[E]=v})}),A}decompress(A,g,E){p.add(v=>{this._decompress(A,g,(S,b)=>{v(),E(S,b)})})}compress(A,g,E){p.add(v=>{this._compress(A,g,(S,b)=>{v(),E(S,b)})})}_decompress(A,g,E){let v=this._isServer?"client":"server";if(!this._inflate){let S=`${v}_max_window_bits`,b=typeof this.params[S]!="number"?n.Z_DEFAULT_WINDOWBITS:this.params[S];this._inflate=n.createInflateRaw({...this._options.zlibInflateOptions,windowBits:b}),this._inflate[l]=this,this._inflate[c]=0,this._inflate[f]=[],this._inflate.on("error",w),this._inflate.on("data",m)}this._inflate[u]=E,this._inflate.write(A),g&&this._inflate.write(o),this._inflate.flush(()=>{let S=this._inflate[d];if(S){this._inflate.close(),this._inflate=null,E(S);return}let b=r.concat(this._inflate[f],this._inflate[c]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[c]=0,this._inflate[f]=[],g&&this.params[`${v}_no_context_takeover`]&&this._inflate.reset()),E(null,b)})}_compress(A,g,E){let v=this._isServer?"server":"client";if(!this._deflate){let S=`${v}_max_window_bits`,b=typeof this.params[S]!="number"?n.Z_DEFAULT_WINDOWBITS:this.params[S];this._deflate=n.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:b}),this._deflate[c]=0,this._deflate[f]=[],this._deflate.on("data",y)}this._deflate[u]=E,this._deflate.write(A),this._deflate.flush(n.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let S=r.concat(this._deflate[f],this._deflate[c]);g&&(S=new a(S.buffer,S.byteOffset,S.length-4)),this._deflate[u]=null,this._deflate[c]=0,this._deflate[f]=[],g&&this.params[`${v}_no_context_takeover`]&&this._deflate.reset(),E(null,S)})}};t.exports=h;function y(A){this[f].push(A),this[c]+=A.length}function m(A){if(this[c]+=A.length,this[l]._maxPayload<1||this[c]<=this[l]._maxPayload){this[f].push(A);return}this[d]=new RangeError("Max payload size exceeded"),this[d].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[d][i]=1009,this.removeListener("data",m),this.reset()}function w(A){if(this[l]._inflate=null,this[d]){this[u](this[d]);return}A[i]=1007,this[u](A)}})),Es=le(((e,t)=>{let{isUtf8:n}=ce("buffer"),{hasBlob:r}=Kt(),s=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0];function i(l){return l>=1e3&&l<=1014&&l!==1004&&l!==1005&&l!==1006||l>=3e3&&l<=4999}function a(l){let c=l.length,u=0;for(;u<c;)if((l[u]&128)===0)u++;else if((l[u]&224)===192){if(u+1===c||(l[u+1]&192)!==128||(l[u]&254)===192)return!1;u+=2}else if((l[u]&240)===224){if(u+2>=c||(l[u+1]&192)!==128||(l[u+2]&192)!==128||l[u]===224&&(l[u+1]&224)===128||l[u]===237&&(l[u+1]&224)===160)return!1;u+=3}else if((l[u]&248)===240){if(u+3>=c||(l[u+1]&192)!==128||(l[u+2]&192)!==128||(l[u+3]&192)!==128||l[u]===240&&(l[u+1]&240)===128||l[u]===244&&l[u+1]>143||l[u]>244)return!1;u+=4}else return!1;return!0}function o(l){return r&&typeof l=="object"&&typeof l.arrayBuffer=="function"&&typeof l.type=="string"&&typeof l.stream=="function"&&(l[Symbol.toStringTag]==="Blob"||l[Symbol.toStringTag]==="File")}if(t.exports={isBlob:o,isValidStatusCode:i,isValidUTF8:a,tokenChars:s},n)t.exports.isValidUTF8=function(l){return l.length<24?a(l):n(l)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{let l=ce("utf-8-validate");t.exports.isValidUTF8=function(c){return c.length<32?a(c):l(c)}}catch{}})),Iy=le(((e,t)=>{let{Writable:n}=ce("stream"),r=ws(),{BINARY_TYPES:s,EMPTY_BUFFER:i,kStatusCode:a,kWebSocket:o}=Kt(),{concat:l,toArrayBuffer:c,unmask:u}=So(),{isValidStatusCode:f,isValidUTF8:d}=Es(),p=Buffer[Symbol.species],h=0,y=1,m=2,w=3,A=4,g=5,E=6;var v=class extends n{constructor(S={}){super(),this._allowSynchronousEvents=S.allowSynchronousEvents!==void 0?S.allowSynchronousEvents:!0,this._binaryType=S.binaryType||s[0],this._extensions=S.extensions||{},this._isServer=!!S.isServer,this._maxBufferedChunks=S.maxBufferedChunks|0,this._maxFragments=S.maxFragments|0,this._maxPayload=S.maxPayload|0,this._skipUTF8Validation=!!S.skipUTF8Validation,this[o]=void 0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._numFragments=0,this._fragments=[],this._errored=!1,this._loop=!1,this._state=h}_write(S,b,_){if(this._opcode===8&&this._state==h)return _();if(this._maxBufferedChunks>0&&this._buffers.length>=this._maxBufferedChunks){_(this.createError(RangeError,"Too many buffered chunks",!1,1008,"WS_ERR_TOO_MANY_BUFFERED_PARTS"));return}this._bufferedBytes+=S.length,this._buffers.push(S),this.startLoop(_)}consume(S){if(this._bufferedBytes-=S,S===this._buffers[0].length)return this._buffers.shift();if(S<this._buffers[0].length){let _=this._buffers[0];return this._buffers[0]=new p(_.buffer,_.byteOffset+S,_.length-S),new p(_.buffer,_.byteOffset,S)}let b=Buffer.allocUnsafe(S);do{let _=this._buffers[0],C=b.length-S;S>=_.length?b.set(this._buffers.shift(),C):(b.set(new Uint8Array(_.buffer,_.byteOffset,S),C),this._buffers[0]=new p(_.buffer,_.byteOffset+S,_.length-S)),S-=_.length}while(S>0);return b}startLoop(S){this._loop=!0;do switch(this._state){case h:this.getInfo(S);break;case y:this.getPayloadLength16(S);break;case m:this.getPayloadLength64(S);break;case w:this.getMask();break;case A:this.getData(S);break;case g:case E:this._loop=!1;return}while(this._loop);this._errored||S()}getInfo(S){if(this._bufferedBytes<2){this._loop=!1;return}let b=this.consume(2);if((b[0]&48)!==0){S(this.createError(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3"));return}let _=(b[0]&64)===64;if(_&&!this._extensions[r.extensionName]){S(this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1"));return}if(this._fin=(b[0]&128)===128,this._opcode=b[0]&15,this._payloadLength=b[1]&127,this._opcode===0){if(_){S(this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1"));return}if(!this._fragmented){S(this.createError(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE"));return}this._opcode=this._fragmented}else if(this._opcode===1||this._opcode===2){if(this._fragmented){S(this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE"));return}this._compressed=_}else if(this._opcode>7&&this._opcode<11){if(!this._fin){S(this.createError(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN"));return}if(_){S(this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1"));return}if(this._payloadLength>125||this._opcode===8&&this._payloadLength===1){S(this.createError(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH"));return}}else{S(this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE"));return}if(!this._fin&&!this._fragmented&&(this._fragmented=this._opcode),this._masked=(b[1]&128)===128,this._isServer){if(!this._masked){S(this.createError(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK"));return}}else if(this._masked){S(this.createError(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK"));return}this._payloadLength===126?this._state=y:this._payloadLength===127?this._state=m:this.haveLength(S)}getPayloadLength16(S){if(this._bufferedBytes<2){this._loop=!1;return}this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength(S)}getPayloadLength64(S){if(this._bufferedBytes<8){this._loop=!1;return}let b=this.consume(8),_=b.readUInt32BE(0);if(_>Math.pow(2,21)-1){S(this.createError(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH"));return}this._payloadLength=_*Math.pow(2,32)+b.readUInt32BE(4),this.haveLength(S)}haveLength(S){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0)){S(this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH"));return}this._masked?this._state=w:this._state=A}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=A}getData(S){let b=i;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength){this._loop=!1;return}b=this.consume(this._payloadLength),this._masked&&(this._mask[0]|this._mask[1]|this._mask[2]|this._mask[3])!==0&&u(b,this._mask)}if(this._opcode>7){this.controlMessage(b,S);return}if(this._maxFragments>0&&++this._numFragments>this._maxFragments){S(this.createError(RangeError,"Too many message fragments",!1,1008,"WS_ERR_TOO_MANY_BUFFERED_PARTS"));return}if(this._compressed){this._state=g,this.decompress(b,S);return}b.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(b)),this.dataMessage(S)}decompress(S,b){this._extensions[r.extensionName].decompress(S,this._fin,(_,C)=>{if(_)return b(_);if(C.length){if(this._messageLength+=C.length,this._messageLength>this._maxPayload&&this._maxPayload>0){b(this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH"));return}this._fragments.push(C)}this.dataMessage(b),this._state===h&&this.startLoop(b)})}dataMessage(S){if(!this._fin){this._state=h;return}let b=this._messageLength,_=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._numFragments=0,this._fragments=[],this._opcode===2){let C;this._binaryType==="nodebuffer"?C=l(_,b):this._binaryType==="arraybuffer"?C=c(l(_,b)):this._binaryType==="blob"?C=new Blob(_):C=_,this._allowSynchronousEvents?(this.emit("message",C,!0),this._state=h):(this._state=E,setImmediate(()=>{this.emit("message",C,!0),this._state=h,this.startLoop(S)}))}else{let C=l(_,b);if(!this._skipUTF8Validation&&!d(C)){S(this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8"));return}this._state===g||this._allowSynchronousEvents?(this.emit("message",C,!1),this._state=h):(this._state=E,setImmediate(()=>{this.emit("message",C,!1),this._state=h,this.startLoop(S)}))}}controlMessage(S,b){if(this._opcode===8){if(S.length===0)this._loop=!1,this.emit("conclude",1005,i),this.end();else{let _=S.readUInt16BE(0);if(!f(_)){b(this.createError(RangeError,`invalid status code ${_}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE"));return}let C=new p(S.buffer,S.byteOffset+2,S.length-2);if(!this._skipUTF8Validation&&!d(C)){b(this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8"));return}this._loop=!1,this.emit("conclude",_,C),this.end()}this._state=h;return}this._allowSynchronousEvents?(this.emit(this._opcode===9?"ping":"pong",S),this._state=h):(this._state=E,setImmediate(()=>{this.emit(this._opcode===9?"ping":"pong",S),this._state=h,this.startLoop(b)}))}createError(S,b,_,C,x){this._loop=!1,this._errored=!0;let T=new S(_?`Invalid WebSocket frame: ${b}`:b);return Error.captureStackTrace(T,this.createError),T.code=x,T[a]=C,T}};t.exports=v})),Ry=le(((e,t)=>{let{Duplex:n}=ce("stream"),{randomFillSync:r}=ce("crypto"),{types:{isUint8Array:s}}=ce("util"),i=ws(),{EMPTY_BUFFER:a,kWebSocket:o,NOOP:l}=Kt(),{isBlob:c,isValidStatusCode:u}=Es(),{mask:f,toBuffer:d}=So(),p=Symbol("kByteLength"),h=Buffer.alloc(4),y=8192,m,w=y,A=0,g=1,E=2;t.exports=class en{constructor(_,C,x){this._extensions=C||{},x&&(this._generateMask=x,this._maskBuffer=Buffer.alloc(4)),this._socket=_,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._queue=[],this._state=A,this.onerror=l,this[o]=void 0}static frame(_,C){let x,T=!1,k=2,O=!1;C.mask&&(x=C.maskBuffer||h,C.generateMask?C.generateMask(x):(w===y&&(m===void 0&&(m=Buffer.alloc(y)),r(m,0,y),w=0),x[0]=m[w++],x[1]=m[w++],x[2]=m[w++],x[3]=m[w++]),O=(x[0]|x[1]|x[2]|x[3])===0,k=6);let R;typeof _=="string"?(!C.mask||O)&&C[p]!==void 0?R=C[p]:(_=Buffer.from(_),R=_.length):(R=_.length,T=C.mask&&C.readOnly&&!O);let I=R;R>=65536?(k+=8,I=127):R>125&&(k+=2,I=126);let M=Buffer.allocUnsafe(T?R+k:k);return M[0]=C.fin?C.opcode|128:C.opcode,C.rsv1&&(M[0]|=64),M[1]=I,I===126?M.writeUInt16BE(R,2):I===127&&(M[2]=M[3]=0,M.writeUIntBE(R,4,6)),C.mask?(M[1]|=128,M[k-4]=x[0],M[k-3]=x[1],M[k-2]=x[2],M[k-1]=x[3],O?[M,_]:T?(f(_,x,M,k,R),[M]):(f(_,x,_,0,R),[M,_])):[M,_]}close(_,C,x,T){let k;if(_===void 0)k=a;else{if(typeof _!="number"||!u(_))throw new TypeError("First argument must be a valid error code number");if(C===void 0||!C.length)k=Buffer.allocUnsafe(2),k.writeUInt16BE(_,0);else{let R=Buffer.byteLength(C);if(R>123)throw new RangeError("The message must not be greater than 123 bytes");if(k=Buffer.allocUnsafe(2+R),k.writeUInt16BE(_,0),typeof C=="string")k.write(C,2);else if(s(C))k.set(C,2);else throw new TypeError("Second argument must be a string or a Uint8Array")}}let O={[p]:k.length,fin:!0,generateMask:this._generateMask,mask:x,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};this._state!==A?this.enqueue([this.dispatch,k,!1,O,T]):this.sendFrame(en.frame(k,O),T)}ping(_,C,x){let T,k;if(typeof _=="string"?(T=Buffer.byteLength(_),k=!1):c(_)?(T=_.size,k=!1):(_=d(_),T=_.length,k=d.readOnly),T>125)throw new RangeError("The data size must not be greater than 125 bytes");let O={[p]:T,fin:!0,generateMask:this._generateMask,mask:C,maskBuffer:this._maskBuffer,opcode:9,readOnly:k,rsv1:!1};c(_)?this._state!==A?this.enqueue([this.getBlobData,_,!1,O,x]):this.getBlobData(_,!1,O,x):this._state!==A?this.enqueue([this.dispatch,_,!1,O,x]):this.sendFrame(en.frame(_,O),x)}pong(_,C,x){let T,k;if(typeof _=="string"?(T=Buffer.byteLength(_),k=!1):c(_)?(T=_.size,k=!1):(_=d(_),T=_.length,k=d.readOnly),T>125)throw new RangeError("The data size must not be greater than 125 bytes");let O={[p]:T,fin:!0,generateMask:this._generateMask,mask:C,maskBuffer:this._maskBuffer,opcode:10,readOnly:k,rsv1:!1};c(_)?this._state!==A?this.enqueue([this.getBlobData,_,!1,O,x]):this.getBlobData(_,!1,O,x):this._state!==A?this.enqueue([this.dispatch,_,!1,O,x]):this.sendFrame(en.frame(_,O),x)}send(_,C,x){let T=this._extensions[i.extensionName],k=C.binary?2:1,O=C.compress,R,I;typeof _=="string"?(R=Buffer.byteLength(_),I=!1):c(_)?(R=_.size,I=!1):(_=d(_),R=_.length,I=d.readOnly),this._firstFragment?(this._firstFragment=!1,O&&T&&T.params[T._isServer?"server_no_context_takeover":"client_no_context_takeover"]&&(O=R>=T._threshold),this._compress=O):(O=!1,k=0),C.fin&&(this._firstFragment=!0);let M={[p]:R,fin:C.fin,generateMask:this._generateMask,mask:C.mask,maskBuffer:this._maskBuffer,opcode:k,readOnly:I,rsv1:O};c(_)?this._state!==A?this.enqueue([this.getBlobData,_,this._compress,M,x]):this.getBlobData(_,this._compress,M,x):this._state!==A?this.enqueue([this.dispatch,_,this._compress,M,x]):this.dispatch(_,this._compress,M,x)}getBlobData(_,C,x,T){this._bufferedBytes+=x[p],this._state=E,_.arrayBuffer().then(k=>{if(this._socket.destroyed){let R=new Error("The socket was closed while the blob was being read");process.nextTick(v,this,R,T);return}this._bufferedBytes-=x[p];let O=d(k);C?this.dispatch(O,C,x,T):(this._state=A,this.sendFrame(en.frame(O,x),T),this.dequeue())}).catch(k=>{process.nextTick(S,this,k,T)})}dispatch(_,C,x,T){if(!C){this.sendFrame(en.frame(_,x),T);return}let k=this._extensions[i.extensionName];this._bufferedBytes+=x[p],this._state=g,k.compress(_,x.fin,(O,R)=>{if(this._socket.destroyed){v(this,new Error("The socket was closed while data was being compressed"),T);return}this._bufferedBytes-=x[p],this._state=A,x.readOnly=!1,this.sendFrame(en.frame(R,x),T),this.dequeue()})}dequeue(){for(;this._state===A&&this._queue.length;){let _=this._queue.shift();this._bufferedBytes-=_[3][p],Reflect.apply(_[0],this,_.slice(1))}}enqueue(_){this._bufferedBytes+=_[3][p],this._queue.push(_)}sendFrame(_,C){_.length===2?(this._socket.cork(),this._socket.write(_[0]),this._socket.write(_[1],C),this._socket.uncork()):this._socket.write(_[0],C)}};function v(b,_,C){typeof C=="function"&&C(_);for(let x=0;x<b._queue.length;x++){let T=b._queue[x],k=T[T.length-1];typeof k=="function"&&k(_)}}function S(b,_,C){v(b,_,C),b.onerror(_)}})),aO=le(((e,t)=>{let{kForOnEventAttribute:n,kListener:r}=Kt(),s=Symbol("kCode"),i=Symbol("kData"),a=Symbol("kError"),o=Symbol("kMessage"),l=Symbol("kReason"),c=Symbol("kTarget"),u=Symbol("kType"),f=Symbol("kWasClean");var d=class{constructor(w){this[c]=null,this[u]=w}get target(){return this[c]}get type(){return this[u]}};Object.defineProperty(d.prototype,"target",{enumerable:!0}),Object.defineProperty(d.prototype,"type",{enumerable:!0});var p=class extends d{constructor(w,A={}){super(w),this[s]=A.code===void 0?0:A.code,this[l]=A.reason===void 0?"":A.reason,this[f]=A.wasClean===void 0?!1:A.wasClean}get code(){return this[s]}get reason(){return this[l]}get wasClean(){return this[f]}};Object.defineProperty(p.prototype,"code",{enumerable:!0}),Object.defineProperty(p.prototype,"reason",{enumerable:!0}),Object.defineProperty(p.prototype,"wasClean",{enumerable:!0});var h=class extends d{constructor(w,A={}){super(w),this[a]=A.error===void 0?null:A.error,this[o]=A.message===void 0?"":A.message}get error(){return this[a]}get message(){return this[o]}};Object.defineProperty(h.prototype,"error",{enumerable:!0}),Object.defineProperty(h.prototype,"message",{enumerable:!0});var y=class extends d{constructor(w,A={}){super(w),this[i]=A.data===void 0?null:A.data}get data(){return this[i]}};Object.defineProperty(y.prototype,"data",{enumerable:!0}),t.exports={CloseEvent:p,ErrorEvent:h,Event:d,EventTarget:{addEventListener(w,A,g={}){for(let v of this.listeners(w))if(!g[n]&&v[r]===A&&!v[n])return;let E;if(w==="message")E=function(S,b){let _=new y("message",{data:b?S:S.toString()});_[c]=this,m(A,this,_)};else if(w==="close")E=function(S,b){let _=new p("close",{code:S,reason:b.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});_[c]=this,m(A,this,_)};else if(w==="error")E=function(S){let b=new h("error",{error:S,message:S.message});b[c]=this,m(A,this,b)};else if(w==="open")E=function(){let S=new d("open");S[c]=this,m(A,this,S)};else return;E[n]=!!g[n],E[r]=A,g.once?this.once(w,E):this.on(w,E)},removeEventListener(w,A){for(let g of this.listeners(w))if(g[r]===A&&!g[n]){this.removeListener(w,g);break}}},MessageEvent:y};function m(w,A,g){typeof w=="object"&&w.handleEvent?w.handleEvent.call(w,g):w.call(A,g)}})),tu=le(((e,t)=>{let{tokenChars:n}=Es();function r(a,o,l){a[o]===void 0?a[o]=[l]:a[o].push(l)}function s(a){let o=Object.create(null),l=Object.create(null),c=!1,u=!1,f=!1,d,p,h=-1,y=-1,m=-1,w=0;for(;w<a.length;w++)if(y=a.charCodeAt(w),d===void 0)if(m===-1&&n[y]===1)h===-1&&(h=w);else if(w!==0&&(y===32||y===9))m===-1&&h!==-1&&(m=w);else if(y===59||y===44){if(h===-1)throw new SyntaxError(`Unexpected character at index ${w}`);m===-1&&(m=w);let g=a.slice(h,m);y===44?(r(o,g,l),l=Object.create(null)):d=g,h=m=-1}else throw new SyntaxError(`Unexpected character at index ${w}`);else if(p===void 0)if(m===-1&&n[y]===1)h===-1&&(h=w);else if(y===32||y===9)m===-1&&h!==-1&&(m=w);else if(y===59||y===44){if(h===-1)throw new SyntaxError(`Unexpected character at index ${w}`);m===-1&&(m=w),r(l,a.slice(h,m),!0),y===44&&(r(o,d,l),l=Object.create(null),d=void 0),h=m=-1}else if(y===61&&h!==-1&&m===-1)p=a.slice(h,w),h=m=-1;else throw new SyntaxError(`Unexpected character at index ${w}`);else if(u){if(n[y]!==1)throw new SyntaxError(`Unexpected character at index ${w}`);h===-1?h=w:c||(c=!0),u=!1}else if(f)if(n[y]===1)h===-1&&(h=w);else if(y===34&&h!==-1)f=!1,m=w;else if(y===92)u=!0;else throw new SyntaxError(`Unexpected character at index ${w}`);else if(y===34&&a.charCodeAt(w-1)===61)f=!0;else if(m===-1&&n[y]===1)h===-1&&(h=w);else if(h!==-1&&(y===32||y===9))m===-1&&(m=w);else if(y===59||y===44){if(h===-1)throw new SyntaxError(`Unexpected character at index ${w}`);m===-1&&(m=w);let g=a.slice(h,m);c&&(g=g.replace(/\\/g,""),c=!1),r(l,p,g),y===44&&(r(o,d,l),l=Object.create(null),d=void 0),p=void 0,h=m=-1}else throw new SyntaxError(`Unexpected character at index ${w}`);if(h===-1||f||y===32||y===9)throw new SyntaxError("Unexpected end of input");m===-1&&(m=w);let A=a.slice(h,m);return d===void 0?r(o,A,l):(p===void 0?r(l,A,!0):c?r(l,p,A.replace(/\\/g,"")):r(l,p,A),r(o,d,l)),o}function i(a){return Object.keys(a).map(o=>{let l=a[o];return Array.isArray(l)||(l=[l]),l.map(c=>[o].concat(Object.keys(c).map(u=>{let f=c[u];return Array.isArray(f)||(f=[f]),f.map(d=>d===!0?u:`${u}=${d}`).join("; ")})).join("; ")).join(", ")}).join(", ")}t.exports={format:i,parse:s}})),nu=le(((e,t)=>{let n=ce("events"),r=ce("https"),s=ce("http"),i=ce("net"),a=ce("tls"),{randomBytes:o,createHash:l}=ce("crypto"),{Duplex:c,Readable:u}=ce("stream"),{URL:f}=ce("url"),d=ws(),p=Iy(),h=Ry(),{isBlob:y}=Es(),{BINARY_TYPES:m,CLOSE_TIMEOUT:w,EMPTY_BUFFER:A,GUID:g,kForOnEventAttribute:E,kListener:v,kStatusCode:S,kWebSocket:b,NOOP:_}=Kt(),{EventTarget:{addEventListener:C,removeEventListener:x}}=aO(),{format:T,parse:k}=tu(),{toBuffer:O}=So(),R=Symbol("kAborted"),I=[8,13],M=["CONNECTING","OPEN","CLOSING","CLOSED"],B=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/;var U=class Oe extends n{constructor(ne,fe,ye){super(),this._binaryType=m[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=A,this._closeTimer=null,this._errorEmitted=!1,this._extensions={},this._paused=!1,this._protocol="",this._readyState=Oe.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,ne!==null?(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,fe===void 0?fe=[]:Array.isArray(fe)||(typeof fe=="object"&&fe!==null?(ye=fe,fe=[]):fe=[fe]),V(this,ne,fe,ye)):(this._autoPong=ye.autoPong,this._closeTimeout=ye.closeTimeout,this._isServer=!0)}get binaryType(){return this._binaryType}set binaryType(ne){m.includes(ne)&&(this._binaryType=ne,this._receiver&&(this._receiver._binaryType=ne))}get bufferedAmount(){return this._socket?this._socket._writableState.length+this._sender._bufferedBytes:this._bufferedAmount}get extensions(){return Object.keys(this._extensions).join()}get isPaused(){return this._paused}get onclose(){return null}get onerror(){return null}get onopen(){return null}get onmessage(){return null}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket(ne,fe,ye){let de=new p({allowSynchronousEvents:ye.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxBufferedChunks:ye.maxBufferedChunks,maxFragments:ye.maxFragments,maxPayload:ye.maxPayload,skipUTF8Validation:ye.skipUTF8Validation}),ve=new h(ne,this._extensions,ye.generateMask);this._receiver=de,this._sender=ve,this._socket=ne,de[b]=this,ve[b]=this,ne[b]=this,de.on("conclude",P),de.on("drain",z),de.on("error",H),de.on("message",J),de.on("ping",D),de.on("pong",N),ve.onerror=ee,ne.setTimeout&&ne.setTimeout(0),ne.setNoDelay&&ne.setNoDelay(),fe.length>0&&ne.unshift(fe),ne.on("close",se),ne.on("data",ie),ne.on("end",oe),ne.on("error",me),this._readyState=Oe.OPEN,this.emit("open")}emitClose(){if(!this._socket){this._readyState=Oe.CLOSED,this.emit("close",this._closeCode,this._closeMessage);return}this._extensions[d.extensionName]&&this._extensions[d.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=Oe.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(ne,fe){if(this.readyState!==Oe.CLOSED){if(this.readyState===Oe.CONNECTING){F(this,this._req,"WebSocket was closed before the connection was established");return}if(this.readyState===Oe.CLOSING){this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();return}this._readyState=Oe.CLOSING,this._sender.close(ne,fe,!this._isServer,ye=>{ye||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())}),X(this)}}pause(){this.readyState===Oe.CONNECTING||this.readyState===Oe.CLOSED||(this._paused=!0,this._socket.pause())}ping(ne,fe,ye){if(this.readyState===Oe.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof ne=="function"?(ye=ne,ne=fe=void 0):typeof fe=="function"&&(ye=fe,fe=void 0),typeof ne=="number"&&(ne=ne.toString()),this.readyState!==Oe.OPEN){G(this,ne,ye);return}fe===void 0&&(fe=!this._isServer),this._sender.ping(ne||A,fe,ye)}pong(ne,fe,ye){if(this.readyState===Oe.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof ne=="function"?(ye=ne,ne=fe=void 0):typeof fe=="function"&&(ye=fe,fe=void 0),typeof ne=="number"&&(ne=ne.toString()),this.readyState!==Oe.OPEN){G(this,ne,ye);return}fe===void 0&&(fe=!this._isServer),this._sender.pong(ne||A,fe,ye)}resume(){this.readyState===Oe.CONNECTING||this.readyState===Oe.CLOSED||(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(ne,fe,ye){if(this.readyState===Oe.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof fe=="function"&&(ye=fe,fe={}),typeof ne=="number"&&(ne=ne.toString()),this.readyState!==Oe.OPEN){G(this,ne,ye);return}let de={binary:typeof ne!="string",mask:!this._isServer,compress:!0,fin:!0,...fe};this._extensions[d.extensionName]||(de.compress=!1),this._sender.send(ne||A,de,ye)}terminate(){if(this.readyState!==Oe.CLOSED){if(this.readyState===Oe.CONNECTING){F(this,this._req,"WebSocket was closed before the connection was established");return}this._socket&&(this._readyState=Oe.CLOSING,this._socket.destroy())}}};Object.defineProperty(U,"CONNECTING",{enumerable:!0,value:M.indexOf("CONNECTING")}),Object.defineProperty(U.prototype,"CONNECTING",{enumerable:!0,value:M.indexOf("CONNECTING")}),Object.defineProperty(U,"OPEN",{enumerable:!0,value:M.indexOf("OPEN")}),Object.defineProperty(U.prototype,"OPEN",{enumerable:!0,value:M.indexOf("OPEN")}),Object.defineProperty(U,"CLOSING",{enumerable:!0,value:M.indexOf("CLOSING")}),Object.defineProperty(U.prototype,"CLOSING",{enumerable:!0,value:M.indexOf("CLOSING")}),Object.defineProperty(U,"CLOSED",{enumerable:!0,value:M.indexOf("CLOSED")}),Object.defineProperty(U.prototype,"CLOSED",{enumerable:!0,value:M.indexOf("CLOSED")}),["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach(Y=>{Object.defineProperty(U.prototype,Y,{enumerable:!0})}),["open","error","close","message"].forEach(Y=>{Object.defineProperty(U.prototype,`on${Y}`,{enumerable:!0,get(){for(let ne of this.listeners(Y))if(ne[E])return ne[v];return null},set(ne){for(let fe of this.listeners(Y))if(fe[E]){this.removeListener(Y,fe);break}typeof ne=="function"&&this.addEventListener(Y,ne,{[E]:!0})}})}),U.prototype.addEventListener=C,U.prototype.removeEventListener=x,t.exports=U;function V(Y,ne,fe,ye){let de={allowSynchronousEvents:!0,autoPong:!0,closeTimeout:w,protocolVersion:I[1],maxBufferedChunks:262144,maxFragments:16384,maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...ye,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:"GET",host:void 0,path:void 0,port:void 0};if(Y._autoPong=de.autoPong,Y._closeTimeout=de.closeTimeout,!I.includes(de.protocolVersion))throw new RangeError(`Unsupported protocol version: ${de.protocolVersion} (supported versions: ${I.join(", ")})`);let ve;if(ne instanceof f)ve=ne;else try{ve=new f(ne)}catch{throw new SyntaxError(`Invalid URL: ${ne}`)}ve.protocol==="http:"?ve.protocol="ws:":ve.protocol==="https:"&&(ve.protocol="wss:"),Y._url=ve.href;let q=ve.protocol==="wss:",W=ve.protocol==="ws+unix:",ue;if(ve.protocol!=="ws:"&&!q&&!W?ue=`The URL's protocol must be one of "ws:", "wss:", "http:", "https:", or "ws+unix:"`:W&&!ve.pathname?ue="The URL's pathname is empty":ve.hash&&(ue="The URL contains a fragment identifier"),ue){let we=new SyntaxError(ue);if(Y._redirects===0)throw we;te(Y,we);return}let ge=q?443:80,be=o(16).toString("base64"),ae=q?r.request:s.request,Ae=new Set,_e;if(de.createConnection=de.createConnection||(q?Z:Q),de.defaultPort=de.defaultPort||ge,de.port=ve.port||ge,de.host=ve.hostname.startsWith("[")?ve.hostname.slice(1,-1):ve.hostname,de.headers={...de.headers,"Sec-WebSocket-Version":de.protocolVersion,"Sec-WebSocket-Key":be,Connection:"Upgrade",Upgrade:"websocket"},de.path=ve.pathname+ve.search,de.timeout=de.handshakeTimeout,de.perMessageDeflate&&(_e=new d({...de.perMessageDeflate,isServer:!1,maxPayload:de.maxPayload}),de.headers["Sec-WebSocket-Extensions"]=T({[d.extensionName]:_e.offer()})),fe.length){for(let we of fe){if(typeof we!="string"||!B.test(we)||Ae.has(we))throw new SyntaxError("An invalid or duplicated subprotocol was specified");Ae.add(we)}de.headers["Sec-WebSocket-Protocol"]=fe.join(",")}if(de.origin&&(de.protocolVersion<13?de.headers["Sec-WebSocket-Origin"]=de.origin:de.headers.Origin=de.origin),(ve.username||ve.password)&&(de.auth=`${ve.username}:${ve.password}`),W){let we=de.path.split(":");de.socketPath=we[0],de.path=we[1]}let Se;if(de.followRedirects){if(Y._redirects===0){Y._originalIpc=W,Y._originalSecure=q,Y._originalHostOrSocketPath=W?de.socketPath:ve.host;let we=ye&&ye.headers;if(ye={...ye,headers:{}},we)for(let[Ce,Pe]of Object.entries(we))ye.headers[Ce.toLowerCase()]=Pe}else if(Y.listenerCount("redirect")===0){let we=W?Y._originalIpc?de.socketPath===Y._originalHostOrSocketPath:!1:Y._originalIpc?!1:ve.host===Y._originalHostOrSocketPath;(!we||Y._originalSecure&&!q)&&(delete de.headers.authorization,delete de.headers.cookie,we||delete de.headers.host,de.auth=void 0)}de.auth&&!ye.headers.authorization&&(ye.headers.authorization="Basic "+Buffer.from(de.auth).toString("base64")),Se=Y._req=ae(de),Y._redirects&&Y.emit("redirect",Y.url,Se)}else Se=Y._req=ae(de);de.timeout&&Se.on("timeout",()=>{F(Y,Se,"Opening handshake has timed out")}),Se.on("error",we=>{Se===null||Se[R]||(Se=Y._req=null,te(Y,we))}),Se.on("response",we=>{let Ce=we.headers.location,Pe=we.statusCode;if(Ce&&de.followRedirects&&Pe>=300&&Pe<400){if(++Y._redirects>de.maxRedirects){F(Y,Se,"Maximum redirects exceeded");return}Se.abort();let Ne;try{Ne=new f(Ce,ne)}catch{te(Y,new SyntaxError(`Invalid URL: ${Ce}`));return}V(Y,Ne,fe,ye)}else Y.emit("unexpected-response",Se,we)||F(Y,Se,`Unexpected server response: ${we.statusCode}`)}),Se.on("upgrade",(we,Ce,Pe)=>{if(Y.emit("upgrade",we),Y.readyState!==U.CONNECTING)return;Se=Y._req=null;let Ne=we.headers.upgrade;if(Ne===void 0||Ne.toLowerCase()!=="websocket"){F(Y,Ce,"Invalid Upgrade header");return}let Is=l("sha1").update(be+g).digest("base64");if(we.headers["sec-websocket-accept"]!==Is){F(Y,Ce,"Invalid Sec-WebSocket-Accept header");return}let Rs=we.headers["sec-websocket-protocol"],ir;if(Rs!==void 0?Ae.size?Ae.has(Rs)||(ir="Server sent an invalid subprotocol"):ir="Server sent a subprotocol but none was requested":Ae.size&&(ir="Server sent no subprotocol"),ir){F(Y,Ce,ir);return}Rs&&(Y._protocol=Rs);let Pu=we.headers["sec-websocket-extensions"];if(Pu!==void 0){if(!_e){F(Y,Ce,"Server sent a Sec-WebSocket-Extensions header but no extension was requested");return}let Lo;try{Lo=k(Pu)}catch{F(Y,Ce,"Invalid Sec-WebSocket-Extensions header");return}let Nu=Object.keys(Lo);if(Nu.length!==1||Nu[0]!==d.extensionName){F(Y,Ce,"Server indicated an extension that was not requested");return}try{_e.accept(Lo[d.extensionName])}catch{F(Y,Ce,"Invalid Sec-WebSocket-Extensions header");return}Y._extensions[d.extensionName]=_e}Y.setSocket(Ce,Pe,{allowSynchronousEvents:de.allowSynchronousEvents,generateMask:de.generateMask,maxBufferedChunks:de.maxBufferedChunks,maxFragments:de.maxFragments,maxPayload:de.maxPayload,skipUTF8Validation:de.skipUTF8Validation})}),de.finishRequest?de.finishRequest(Se,Y):Se.end()}function te(Y,ne){Y._readyState=U.CLOSING,Y._errorEmitted=!0,Y.emit("error",ne),Y.emitClose()}function Q(Y){return Y.path=Y.socketPath,i.connect(Y)}function Z(Y){return Y.path=void 0,!Y.servername&&Y.servername!==""&&(Y.servername=i.isIP(Y.host)?"":Y.host),a.connect(Y)}function F(Y,ne,fe){Y._readyState=U.CLOSING;let ye=new Error(fe);Error.captureStackTrace(ye,F),ne.setHeader?(ne[R]=!0,ne.abort(),ne.socket&&!ne.socket.destroyed&&ne.socket.destroy(),process.nextTick(te,Y,ye)):(ne.destroy(ye),ne.once("error",Y.emit.bind(Y,"error")),ne.once("close",Y.emitClose.bind(Y)))}function G(Y,ne,fe){if(ne){let ye=y(ne)?ne.size:O(ne).length;Y._socket?Y._sender._bufferedBytes+=ye:Y._bufferedAmount+=ye}if(fe){let ye=new Error(`WebSocket is not open: readyState ${Y.readyState} (${M[Y.readyState]})`);process.nextTick(fe,ye)}}function P(Y,ne){let fe=this[b];fe._closeFrameReceived=!0,fe._closeMessage=ne,fe._closeCode=Y,fe._socket[b]!==void 0&&(fe._socket.removeListener("data",ie),process.nextTick(K,fe._socket),Y===1005?fe.close():fe.close(Y,ne))}function z(){let Y=this[b];Y.isPaused||Y._socket.resume()}function H(Y){let ne=this[b];ne._socket[b]!==void 0&&(ne._socket.removeListener("data",ie),process.nextTick(K,ne._socket),ne.close(Y[S])),ne._errorEmitted||(ne._errorEmitted=!0,ne.emit("error",Y))}function $(){this[b].emitClose()}function J(Y,ne){this[b].emit("message",Y,ne)}function D(Y){let ne=this[b];ne._autoPong&&ne.pong(Y,!this._isServer,_),ne.emit("ping",Y)}function N(Y){this[b].emit("pong",Y)}function K(Y){Y.resume()}function ee(Y){let ne=this[b];ne.readyState!==U.CLOSED&&(ne.readyState===U.OPEN&&(ne._readyState=U.CLOSING,X(ne)),this._socket.end(),ne._errorEmitted||(ne._errorEmitted=!0,ne.emit("error",Y)))}function X(Y){Y._closeTimer=setTimeout(Y._socket.destroy.bind(Y._socket),Y._closeTimeout)}function se(){let Y=this[b];if(this.removeListener("close",se),this.removeListener("data",ie),this.removeListener("end",oe),Y._readyState=U.CLOSING,!this._readableState.endEmitted&&!Y._closeFrameReceived&&!Y._receiver._writableState.errorEmitted&&this._readableState.length!==0){let ne=this.read(this._readableState.length);Y._receiver.write(ne)}Y._receiver.end(),this[b]=void 0,clearTimeout(Y._closeTimer),Y._receiver._writableState.finished||Y._receiver._writableState.errorEmitted?Y.emitClose():(Y._receiver.on("error",$),Y._receiver.on("finish",$))}function ie(Y){this[b]._receiver.write(Y)||this.pause()}function oe(){let Y=this[b];Y._readyState=U.CLOSING,Y._receiver.end(),this.end()}function me(){let Y=this[b];this.removeListener("error",me),this.on("error",_),Y&&(Y._readyState=U.CLOSING,this.destroy())}})),lO=le(((e,t)=>{nu();let{Duplex:n}=ce("stream");function r(o){o.emit("close")}function s(){!this.destroyed&&this._writableState.finished&&this.destroy()}function i(o){this.removeListener("error",i),this.destroy(),this.listenerCount("error")===0&&this.emit("error",o)}function a(o,l){let c=!0,u=new n({...l,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return o.on("message",function(d,p){let h=!p&&u._readableState.objectMode?d.toString():d;u.push(h)||o.pause()}),o.once("error",function(d){u.destroyed||(c=!1,u.destroy(d))}),o.once("close",function(){u.destroyed||u.push(null)}),u._destroy=function(f,d){if(o.readyState===o.CLOSED){d(f),process.nextTick(r,u);return}let p=!1;o.once("error",function(y){p=!0,d(y)}),o.once("close",function(){p||d(f),process.nextTick(r,u)}),c&&o.terminate()},u._final=function(f){if(o.readyState===o.CONNECTING){o.once("open",function(){u._final(f)});return}o._socket!==null&&(o._socket._writableState.finished?(f(),u._readableState.endEmitted&&u.destroy()):(o._socket.once("finish",function(){f()}),o.close()))},u._read=function(){o.isPaused&&o.resume()},u._write=function(f,d,p){if(o.readyState===o.CONNECTING){o.once("open",function(){u._write(f,d,p)});return}o.send(f,p)},u.on("end",s),u.on("error",i),u}t.exports=a})),ky=le(((e,t)=>{let{tokenChars:n}=Es();function r(s){let i=new Set,a=-1,o=-1,l=0;for(;l<s.length;l++){let u=s.charCodeAt(l);if(o===-1&&n[u]===1)a===-1&&(a=l);else if(l!==0&&(u===32||u===9))o===-1&&a!==-1&&(o=l);else if(u===44){if(a===-1)throw new SyntaxError(`Unexpected character at index ${l}`);o===-1&&(o=l);let f=s.slice(a,o);if(i.has(f))throw new SyntaxError(`The "${f}" subprotocol is duplicated`);i.add(f),a=o=-1}else throw new SyntaxError(`Unexpected character at index ${l}`)}if(a===-1||o!==-1)throw new SyntaxError("Unexpected end of input");let c=s.slice(a,l);if(i.has(c))throw new SyntaxError(`The "${c}" subprotocol is duplicated`);return i.add(c),i}t.exports={parse:r}})),cO=le(((e,t)=>{let n=ce("events"),r=ce("http"),{Duplex:s}=ce("stream"),{createHash:i}=ce("crypto"),a=tu(),o=ws(),l=ky(),c=nu(),{CLOSE_TIMEOUT:u,GUID:f,kWebSocket:d}=Kt(),p=/^[+/0-9A-Za-z]{22}==$/,h=0,y=1,m=2;var w=class extends n{constructor(b,_){if(super(),b={allowSynchronousEvents:!0,autoPong:!0,maxBufferedChunks:262144,maxFragments:16384,maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!1,handleProtocols:null,clientTracking:!0,closeTimeout:u,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null,WebSocket:c,...b},b.port==null&&!b.server&&!b.noServer||b.port!=null&&(b.server||b.noServer)||b.server&&b.noServer)throw new TypeError('One and only one of the "port", "server", or "noServer" options must be specified');if(b.port!=null?(this._server=r.createServer((C,x)=>{let T=r.STATUS_CODES[426];x.writeHead(426,{"Content-Length":T.length,"Content-Type":"text/plain"}),x.end(T)}),this._server.listen(b.port,b.host,b.backlog,_)):b.server&&(this._server=b.server),this._server){let C=this.emit.bind(this,"connection");this._removeListeners=A(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:(x,T,k)=>{this.handleUpgrade(x,T,k,C)}})}b.perMessageDeflate===!0&&(b.perMessageDeflate={}),b.clientTracking&&(this.clients=new Set,this._shouldEmitClose=!1),this.options=b,this._state=h}address(){if(this.options.noServer)throw new Error('The server is operating in "noServer" mode');return this._server?this._server.address():null}close(b){if(this._state===m){b&&this.once("close",()=>{b(new Error("The server is not running"))}),process.nextTick(g,this);return}if(b&&this.once("close",b),this._state!==y)if(this._state=y,this.options.noServer||this.options.server)this._server&&(this._removeListeners(),this._removeListeners=this._server=null),this.clients?this.clients.size?this._shouldEmitClose=!0:process.nextTick(g,this):process.nextTick(g,this);else{let _=this._server;this._removeListeners(),this._removeListeners=this._server=null,_.close(()=>{g(this)})}}shouldHandle(b){if(this.options.path){let _=b.url.indexOf("?");if((_!==-1?b.url.slice(0,_):b.url)!==this.options.path)return!1}return!0}handleUpgrade(b,_,C,x){_.on("error",E);let T=b.headers["sec-websocket-key"],k=b.headers.upgrade,O=+b.headers["sec-websocket-version"];if(b.method!=="GET"){S(this,b,_,405,"Invalid HTTP method");return}if(k===void 0||k.toLowerCase()!=="websocket"){S(this,b,_,400,"Invalid Upgrade header");return}if(T===void 0||!p.test(T)){S(this,b,_,400,"Missing or invalid Sec-WebSocket-Key header");return}if(O!==13&&O!==8){S(this,b,_,400,"Missing or invalid Sec-WebSocket-Version header",{"Sec-WebSocket-Version":"13, 8"});return}if(!this.shouldHandle(b)){v(_,400);return}let R=b.headers["sec-websocket-protocol"],I=new Set;if(R!==void 0)try{I=l.parse(R)}catch{S(this,b,_,400,"Invalid Sec-WebSocket-Protocol header");return}let M=b.headers["sec-websocket-extensions"],B={};if(this.options.perMessageDeflate&&M!==void 0){let U=new o({...this.options.perMessageDeflate,isServer:!0,maxPayload:this.options.maxPayload});try{let V=a.parse(M);V[o.extensionName]&&(U.accept(V[o.extensionName]),B[o.extensionName]=U)}catch{S(this,b,_,400,"Invalid or unacceptable Sec-WebSocket-Extensions header");return}}if(this.options.verifyClient){let U={origin:b.headers[`${O===8?"sec-websocket-origin":"origin"}`],secure:!!(b.socket.authorized||b.socket.encrypted),req:b};if(this.options.verifyClient.length===2){this.options.verifyClient(U,(V,te,Q,Z)=>{if(!V)return v(_,te||401,Q,Z);this.completeUpgrade(B,T,I,b,_,C,x)});return}if(!this.options.verifyClient(U))return v(_,401)}this.completeUpgrade(B,T,I,b,_,C,x)}completeUpgrade(b,_,C,x,T,k,O){if(!T.readable||!T.writable)return T.destroy();if(T[d])throw new Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");if(this._state>h)return v(T,503);let R=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${i("sha1").update(_+f).digest("base64")}`],I=new this.options.WebSocket(null,void 0,this.options);if(C.size){let M=this.options.handleProtocols?this.options.handleProtocols(C,x):C.values().next().value;M&&(R.push(`Sec-WebSocket-Protocol: ${M}`),I._protocol=M)}if(b[o.extensionName]){let M=b[o.extensionName].params,B=a.format({[o.extensionName]:[M]});R.push(`Sec-WebSocket-Extensions: ${B}`),I._extensions=b}this.emit("headers",R,x),T.write(R.concat(`\r
|
|
194
|
-
`).join(`\r
|
|
195
|
-
`)),T.removeListener("error",E),I.setSocket(T,k,{allowSynchronousEvents:this.options.allowSynchronousEvents,maxBufferedChunks:this.options.maxBufferedChunks,maxFragments:this.options.maxFragments,maxPayload:this.options.maxPayload,skipUTF8Validation:this.options.skipUTF8Validation}),this.clients&&(this.clients.add(I),I.on("close",()=>{this.clients.delete(I),this._shouldEmitClose&&!this.clients.size&&process.nextTick(g,this)})),O(I,x)}};t.exports=w;function A(b,_){for(let C of Object.keys(_))b.on(C,_[C]);return function(){for(let x of Object.keys(_))b.removeListener(x,_[x])}}function g(b){b._state=m,b.emit("close")}function E(){this.destroy()}function v(b,_,C,x){C=C||r.STATUS_CODES[_],x={Connection:"close","Content-Type":"text/html","Content-Length":Buffer.byteLength(C),...x},b.once("finish",b.destroy),b.end(`HTTP/1.1 ${_} ${r.STATUS_CODES[_]}\r
|
|
196
|
-
`+Object.keys(x).map(T=>`${T}: ${x[T]}`).join(`\r
|
|
197
|
-
`)+`\r
|
|
198
|
-
\r
|
|
199
|
-
`+C)}function S(b,_,C,x,T,k){if(b.listenerCount("wsClientError")){let O=new Error(T);Error.captureStackTrace(O,S),b.emit("wsClientError",O,C,_)}else v(C,x,T,k)}}));lO();tu();ws();Iy();Ry();ky();nu();var uO=nt(cO(),1);function fO(e){let t=e.trim();if(t[0]==="["){let s=t.indexOf("]");return s<0?{type:"invalid"}:Oi.isIP(t.slice(1,s))===6?{type:"ipv6"}:{type:"invalid"}}let n=t.indexOf(":"),r=n===-1?t:t.slice(0,n);return Oi.isIP(r)===4?{type:"ipv4"}:{type:"hostname",value:r}}var dO=/^(?:file|.+-extension):/i;function pO(e,t){if(dO.test(e))return!0;let n=fO(e);if(n.type==="invalid")return!1;if(n.type==="ipv4"||n.type==="ipv6")return!0;let r=n.value;if(r==="localhost"||r.endsWith(".localhost"))return!0;for(let s of t)if(s===r||s[0]==="."&&(s.slice(1)===r||r.endsWith(s)))return!0;return!1}var dl=new WeakMap;function Ty(e,t){if(e===void 0)return!0;let n;if(Object.isFrozen(t)&&(dl.has(t)||dl.set(t,new Set),n=dl.get(t),n.has(e)))return!0;let r=pO(e,t);return n&&r&&n.add(e),r}function hO(e){return async function(n,r,s){let i=n.headers.host;if(!Ty(i,e.allowedHosts)){let a=i?.replace(/:\d+$/,"")??"",o=e.generateErrorMessage?.(a)??mO(a);r.writeHead(403,{"Content-Type":e.errorResponseContentType??"text/plain"}),r.end(o);return}s()}}function mO(e){return`Blocked request. This host (${JSON.stringify(e)}) is not allowed.`}var gO=process.versions.bun?import.meta.require("ws").WebSocketServer:uO.default,jr=Symbol("isWebSocketServer"),Yp=["connection","error","headers","listening","message"];function Cr(){}function yO(e,t){let n=t.searchParams.get("token");if(!n)return!1;try{return to.timingSafeEqual(Buffer.from(n),Buffer.from(e.webSocketToken))}catch{}return!1}function AO(e,t,n){if(t.server.ws===!1)return{[jr]:!0,get clients(){return new Set},async close(){},on:Cr,off:Cr,setInvokeHandler:Cr,handleInvoke:async()=>({error:{name:"TransportError",message:"handleInvoke not implemented",stack:new Error().stack}}),listen:Cr,send:Cr};let r,s=ke(t.server.ws)?t.server.ws:void 0,i=s?.server,a=s?.port,o=i||(!a||a===t.server.port)&&e,l,c=new Map,u=new WeakMap,f=a||24678,d=s?.host||void 0,p=t.server.allowedHosts===!0?t.server.allowedHosts:Object.freeze([...t.server.allowedHosts]),h=v=>v.headers["sec-websocket-protocol"]==="vite-ping"?!0:p!==!0&&!Ty(v.headers.host,p)?!1:t.legacy?.skipWebSocketTokenCheck?!0:v.headers.origin?yO(t,new URL(`http://example.com${v.url}`)):!0,y=(v,S,b,_)=>{m.handleUpgrade(v,S,b,C=>{if(_){C.close(1e3);return}m.emit("connection",C,v)})},m=new gO({noServer:!0});if(m.shouldHandle=h,o){let v=t.base,S=s?.path;S&&(v=L.posix.join(v,S)),l=(b,_,C)=>{let x=b.headers["sec-websocket-protocol"],T=new URL(`http://example.com${b.url}`);["vite-hmr","vite-ping"].includes(x)&&T.pathname===v&&y(b,_,C,x==="vite-ping")},o.on("upgrade",l)}else{let v=((S,b)=>{let C=US[426];if(!C)throw new Error("No body text found for the 426 status code");b.writeHead(426,{"Content-Length":C.length,"Content-Type":"text/plain"}),b.end(C)});n?r=GS(n,v):r=HS(v),r.on("upgrade",(S,b,_)=>{let C=S.headers["sec-websocket-protocol"];if(C==="vite-ping"&&e&&!e.listening){S.destroy();return}y(S,b,_,C==="vite-ping")}),r.on("error",S=>{S.code==="EADDRINUSE"?t.logger.error(j.default.red(`WebSocket server error: Port ${S.port} is already in use`),{error:S}):t.logger.error(j.default.red(`WebSocket server error:
|
|
200
|
-
${S.stack||S.message}`),{error:S})})}let w=(v,S,b)=>{let _=c.get(v);if(!_?.size)return;let C=A(b);for(let x of _)x(S,C)};m.on("connection",v=>{v.on("message",S=>{if(!c.size)return;let b;try{b=JSON.parse(String(S))}catch{}!b||b.type!=="custom"||!b.event||w(b.event,b.data,v)}),v.on("error",S=>{t.logger.error(`${j.default.red("ws error:")}
|
|
201
|
-
${S.stack}`,{timestamp:!0,error:S})}),v.on("close",()=>{w("vite:client:disconnect",void 0,v)}),w("vite:client:connect",void 0,v),v.send(JSON.stringify({type:"connected"})),g&&(v.send(JSON.stringify(g)),g=null)}),m.on("error",v=>{v.code==="EADDRINUSE"?t.logger.error(j.default.red(`WebSocket server error: Port ${v.port} is already in use`),{error:v}):t.logger.error(j.default.red(`WebSocket server error:
|
|
202
|
-
${v.stack||v.message}`),{error:v})});function A(v){return u.has(v)||u.set(v,{send:(...S)=>{let b;typeof S[0]=="string"?b={type:"custom",event:S[0],data:S[1]}:b=S[0],v.send(JSON.stringify(b))},socket:v}),u.get(v)}let g=null,E=Ec({send(v){if((v.type==="error"||v.type==="full-reload")&&!m.clients.size){g=v;return}let S=JSON.stringify(v);m.clients.forEach(b=>{b.readyState===1&&b.send(S)})},on(v,S){c.has(v)||c.set(v,new Set),c.get(v).add(S)},off(v,S){c.get(v)?.delete(S)},listen(){r?.listen(f,d)},close(){return l&&o&&o.off("upgrade",l),new Promise((v,S)=>{m.clients.forEach(b=>{b.terminate()}),m.close(b=>{b?S(b):r?r.close(_=>{_?S(_):v()}):v()})})}},t.server.hmr!==!1,!1);return{...E,on:((v,S)=>{if(Yp.includes(v)){m.on(v,S);return}E.on(v,S)}),off:((v,S)=>{if(Yp.includes(v)){m.off(v,S);return}E.off(v,S)}),async close(){await E.close()},[jr]:!0,get clients(){return new Set(Array.from(m.clients).map(A))}}}function wO(e,t){return function(r,s,i){let a=r.url,o=he(a),l=e;if(o.startsWith(l))return r.url=un(a,l),i();if(t)return i();if(o==="/"||o==="/index.html"){s.writeHead(302,{Location:l+a.slice(o.length)}),s.end();return}let c=Me(a)!==l?ze(l,a):l;if(r.headers.accept?.includes("text/html")){s.writeHead(404,{"Content-Type":"text/html"}),s.end(`The server is configured with a public base URL of ${l} - did you mean to visit <a href="${c}">${c}</a> instead?`);return}else{s.writeHead(404,{"Content-Type":"text/plain"}),s.end(`The server is configured with a public base URL of ${l} - did you mean to visit ${c} instead?`);return}}}var EO=le(((e,t)=>{var n;t.exports=function(){if(!n){try{n=(tr(),us(ps))("follow-redirects")}catch{}typeof n!="function"&&(n=function(){})}n.apply(null,arguments)}})),vO=le(((e,t)=>{var n=ce("url"),r=n.URL,s=ce("http"),i=ce("https"),a=ce("stream").Writable,o=ce("assert"),l=EO();(function(){var Z=typeof process<"u",F=typeof window<"u"&&typeof document<"u",G=B(Error.captureStackTrace);!Z&&(F||!G)&&console.warn("The follow-redirects package should be excluded from browser builds.")})();var c=!1;try{o(new r(""))}catch(Q){c=Q.code==="ERR_INVALID_URL"}var u=["Authorization","Proxy-Authorization","Cookie"],f=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],d=["abort","aborted","connect","error","socket","timeout"],p=Object.create(null);d.forEach(function(Q){p[Q]=function(Z,F,G){this._redirectable.emit(Q,Z,F,G)}});var h=k("ERR_INVALID_URL","Invalid URL",TypeError),y=k("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),m=k("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",y),w=k("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),A=k("ERR_STREAM_WRITE_AFTER_END","write after end"),g=a.prototype.destroy||S;function E(Q,Z){a.call(this),this._sanitizeOptions(Q),this._options=Q,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],Z&&this.on("response",Z);var F=this;this._onNativeResponse=function(G){try{F._processResponse(G)}catch(P){F.emit("error",P instanceof y?P:new y({cause:P}))}},this._headerFilter=new RegExp("^(?:"+u.concat(Q.sensitiveHeaders).map(te).join("|")+")$","i"),this._performRequest()}E.prototype=Object.create(a.prototype),E.prototype.abort=function(){O(this._currentRequest),this._currentRequest.abort(),this.emit("abort")},E.prototype.destroy=function(Q){return O(this._currentRequest,Q),g.call(this,Q),this},E.prototype.write=function(Q,Z,F){if(this._ending)throw new A;if(!M(Q)&&!U(Q))throw new TypeError("data should be a string, Buffer or Uint8Array");if(B(Z)&&(F=Z,Z=null),Q.length===0){F&&F();return}this._requestBodyLength+Q.length<=this._options.maxBodyLength?(this._requestBodyLength+=Q.length,this._requestBodyBuffers.push({data:Q,encoding:Z}),this._currentRequest.write(Q,Z,F)):(this.emit("error",new w),this.abort())},E.prototype.end=function(Q,Z,F){if(B(Q)?(F=Q,Q=Z=null):B(Z)&&(F=Z,Z=null),!Q)this._ended=this._ending=!0,this._currentRequest.end(null,null,F);else{var G=this,P=this._currentRequest;this.write(Q,Z,function(){G._ended=!0,P.end(null,null,F)}),this._ending=!0}},E.prototype.setHeader=function(Q,Z){this._options.headers[Q]=Z,this._currentRequest.setHeader(Q,Z)},E.prototype.removeHeader=function(Q){delete this._options.headers[Q],this._currentRequest.removeHeader(Q)},E.prototype.setTimeout=function(Q,Z){var F=this;function G(H){H.setTimeout(Q),H.removeListener("timeout",H.destroy),H.addListener("timeout",H.destroy)}function P(H){F._timeout&&clearTimeout(F._timeout),F._timeout=setTimeout(function(){F.emit("timeout"),z()},Q),G(H)}function z(){F._timeout&&(clearTimeout(F._timeout),F._timeout=null),F.removeListener("abort",z),F.removeListener("error",z),F.removeListener("response",z),F.removeListener("close",z),Z&&F.removeListener("timeout",Z),F.socket||F._currentRequest.removeListener("socket",P)}return Z&&this.on("timeout",Z),this.socket?P(this.socket):this._currentRequest.once("socket",P),this.on("socket",G),this.on("abort",z),this.on("error",z),this.on("response",z),this.on("close",z),this},["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(Q){E.prototype[Q]=function(Z,F){return this._currentRequest[Q](Z,F)}}),["aborted","connection","socket"].forEach(function(Q){Object.defineProperty(E.prototype,Q,{get:function(){return this._currentRequest[Q]}})}),E.prototype._sanitizeOptions=function(Q){if(Q.headers||(Q.headers={}),I(Q.sensitiveHeaders)||(Q.sensitiveHeaders=[]),Q.host&&(Q.hostname||(Q.hostname=Q.host),delete Q.host),!Q.pathname&&Q.path){var Z=Q.path.indexOf("?");Z<0?Q.pathname=Q.path:(Q.pathname=Q.path.substring(0,Z),Q.search=Q.path.substring(Z))}},E.prototype._performRequest=function(){var Q=this._options.protocol,Z=this._options.nativeProtocols[Q];if(!Z)throw new TypeError("Unsupported protocol "+Q);if(this._options.agents){var F=Q.slice(0,-1);this._options.agent=this._options.agents[F]}var G=this._currentRequest=Z.request(this._options,this._onNativeResponse);G._redirectable=this;for(var P of d)G.on(P,p[P]);if(this._currentUrl=/^\//.test(this._options.path)?n.format(this._options):this._options.path,this._isRedirect){var z=0,H=this,$=this._requestBodyBuffers;(function J(D){if(G===H._currentRequest)if(D)H.emit("error",D);else if(z<$.length){var N=$[z++];G.finished||G.write(N.data,N.encoding,J)}else H._ended&&G.end()})()}},E.prototype._processResponse=function(Q){var Z=Q.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:Q.headers,statusCode:Z});var F=Q.headers.location;if(!F||this._options.followRedirects===!1||Z<300||Z>=400){Q.responseUrl=this._currentUrl,Q.redirects=this._redirects,this.emit("response",Q),this._requestBodyBuffers=[];return}if(O(this._currentRequest),Q.destroy(),++this._redirectCount>this._options.maxRedirects)throw new m;var G,P=this._options.beforeRedirect;P&&(G=Object.assign({Host:Q.req.getHeader("host")},this._options.headers));var z=this._options.method;((Z===301||Z===302)&&this._options.method==="POST"||Z===303&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],T(/^content-/i,this._options.headers));var H=T(/^host$/i,this._options.headers),$=b(this._currentUrl),J=H||$.host,D=/^\w+:/.test(F)?this._currentUrl:n.format(Object.assign($,{host:J})),N=_(F,D);if(l("redirecting to",N.href),this._isRedirect=!0,x(N,this._options),(N.protocol!==$.protocol&&N.protocol!=="https:"||N.host!==J&&!R(N.host,J))&&T(this._headerFilter,this._options.headers),B(P)){var K={headers:Q.headers,statusCode:Z},ee={url:D,method:z,headers:G};P(this._options,K,ee),this._sanitizeOptions(this._options)}this._performRequest()};function v(Q){var Z={maxRedirects:21,maxBodyLength:10485760},F={};return Object.keys(Q).forEach(function(G){var P=G+":",z=F[P]=Q[G],H=Z[G]=Object.create(z);function $(D,N,K){return V(D)?D=x(D):M(D)?D=x(b(D)):(K=N,N=C(D),D={protocol:P}),B(N)&&(K=N,N=null),N=Object.assign({maxRedirects:Z.maxRedirects,maxBodyLength:Z.maxBodyLength},D,N),N.nativeProtocols=F,!M(N.host)&&!M(N.hostname)&&(N.hostname="::1"),o.equal(N.protocol,P,"protocol mismatch"),l("options",N),new E(N,K)}function J(D,N,K){var ee=H.request(D,N,K);return ee.end(),ee}Object.defineProperties(H,{request:{value:$,configurable:!0,enumerable:!0,writable:!0},get:{value:J,configurable:!0,enumerable:!0,writable:!0}})}),Z}function S(){}function b(Q){var Z;if(c)Z=new r(Q);else if(Z=C(n.parse(Q)),!M(Z.protocol))throw new h({input:Q});return Z}function _(Q,Z){return c?new r(Q,Z):b(n.resolve(Z,Q))}function C(Q){if(/^\[/.test(Q.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(Q.hostname))throw new h({input:Q.href||Q});if(/^\[/.test(Q.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(Q.host))throw new h({input:Q.href||Q});return Q}function x(Q,Z){var F=Z||{};for(var G of f)F[G]=Q[G];return F.hostname.startsWith("[")&&(F.hostname=F.hostname.slice(1,-1)),F.port!==""&&(F.port=Number(F.port)),F.path=F.search?F.pathname+F.search:F.pathname,F}function T(Q,Z){var F;for(var G in Z)Q.test(G)&&(F=Z[G],delete Z[G]);return F===null||typeof F>"u"?void 0:String(F).trim()}function k(Q,Z,F){function G(P){B(Error.captureStackTrace)&&Error.captureStackTrace(this,this.constructor),Object.assign(this,P||{}),this.code=Q,this.message=this.cause?Z+": "+this.cause.message:Z}return G.prototype=new(F||Error),Object.defineProperties(G.prototype,{constructor:{value:G,enumerable:!1},name:{value:"Error ["+Q+"]",enumerable:!1}}),G}function O(Q,Z){for(var F of d)Q.removeListener(F,p[F]);Q.on("error",S),Q.destroy(Z)}function R(Q,Z){o(M(Q)&&M(Z));var F=Q.length-Z.length-1;return F>0&&Q[F]==="."&&Q.endsWith(Z)}function I(Q){return Q instanceof Array}function M(Q){return typeof Q=="string"||Q instanceof String}function B(Q){return typeof Q=="function"}function U(Q){return typeof Q=="object"&&"length"in Q}function V(Q){return r&&Q instanceof r}function te(Q){return Q.replace(/[\]\\/()*+?.$]/g,"\\$&")}t.exports=v({http:s,https:i}),t.exports.wrap=v})),xo=le((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isSSL=void 0,e.setupOutgoing=i,e.setupSocket=a,e.getPort=o,e.hasEncryptedConnection=l,e.urlJoin=c,e.rewriteCookieProperty=u,e.toURL=p;let t=ce("node:tls"),n=/(^|,)\s*upgrade\s*($|,)/i;e.isSSL=/^https|wss/;let r="trailer",s=[":method",":path",":scheme",":authority","connection","keep-alive"];function i(y,m,w,A){let g=m[A||"target"];y.port=+(g.port??(g.protocol!==void 0&&e.isSSL.test(g.protocol)?443:80));for(let S of["host","hostname","socketPath","pfx","key","passphrase","cert","ca","ciphers","secureProtocol"])y[S]=g[S];y.hostname?.startsWith("[")&&y.hostname.endsWith("]")&&(y.hostname=y.hostname.slice(1,-1)),y.method=m.method||w.method,y.headers={...w.headers},w.headers?.[":authority"]&&(y.headers.host=w.headers[":authority"]),m.headers&&(y.headers={...y.headers,...m.headers});for(let S in y.headers)if(r==S.toLowerCase()){delete y.headers[S];break}if(w.httpVersionMajor>1)for(let S of s)delete y.headers[S];m.auth&&(delete y.headers.authorization,y.auth=m.auth),m.ca&&(y.ca=m.ca),g.protocol!==void 0&&e.isSSL.test(g.protocol)&&(y.rejectUnauthorized=typeof m.secure>"u"?!0:m.secure),y.agent=m.agent||!1,y.localAddress=m.localAddress,y.agent||(y.headers=y.headers||{},(typeof y.headers.connection!="string"||!n.test(y.headers.connection))&&(y.headers.connection="close"));let E=g&&m.prependPath!==!1&&"pathname"in g?d(`${g.pathname}${g.search??""}`):"/",v=m.toProxy?w.url:d(w.url);if(v=m.ignorePath?"":v,y.path=c(E,v??""),m.changeOrigin&&(y.headers.host=g.protocol!==void 0&&h(y.port,g.protocol)&&!f(y.host)?y.host+":"+y.port:y.host),y.url="href"in g&&g.href||(g.protocol==="https"?"https":"http")+"://"+y.host+(y.port?":"+y.port:""),w.httpVersionMajor>1)for(let S of s)delete y.headers[S];return y}function a(y){return y.setTimeout(0),y.setNoDelay(!0),y.setKeepAlive(!0,0),y}function o(y){let m=y.headers[":authority"]||y.headers.host,w=m?m.match(/:(\d+)/):"";return w?w[1]:l(y)?"443":"80"}function l(y){let m=y.connection;return m instanceof t.TLSSocket&&m.encrypted||!!m.pair}function c(...y){let m=[],w="";y.forEach((g,E)=>{let v=g.indexOf("?");v!==-1&&(m.push(g.substring(v+1)),y[E]=g.substring(0,v))}),w=m.filter(Boolean).join("&");let A="";for(let g of y)g&&(A.endsWith("/")?g.startsWith("/")?A+=g.slice(1):A+=g:g.startsWith("/")?A+=g:A+="/"+g);return w?A+"?"+w:A}function u(y,m,w){return Array.isArray(y)?y.map(A=>u(A,m,w)):y.replace(new RegExp("(;\\s*"+w+"=)([^;]+)","i"),(A,g,E)=>{let v;if(E in m)v=m[E];else if("*"in m)v=m["*"];else return A;return v?g+v:""})}function f(y){if(y.startsWith("[")){let m=y.indexOf("]");return m!==-1&&y.length>m+1}return y.includes(":")}function d(y){if(y===""||y?.startsWith("?"))return y;let m=p(y);return`${m.pathname??""}${m.search??""}`}function p(y){return y instanceof URL?y:(typeof y=="object"&&"href"in y&&typeof y.href=="string"&&(y=y.href),y||(y=""),typeof y!="string"&&(y=`${y}`),y.startsWith("//")&&(y=`http://base.invalid${y}`),new URL(y,"http://base.invalid"))}function h(y,m){if(m=m.split(":")[0],y=+y,!y)return!1;switch(m){case"http":case"ws":return y!==80;case"https":case"wss":return y!==443}return y!==0}})),Oy=le((e=>{var t=e&&e.__createBinding||(Object.create?(function(f,d,p,h){h===void 0&&(h=p);var y=Object.getOwnPropertyDescriptor(d,p);(!y||("get"in y?!d.__esModule:y.writable||y.configurable))&&(y={enumerable:!0,get:function(){return d[p]}}),Object.defineProperty(f,h,y)}):(function(f,d,p,h){h===void 0&&(h=p),f[h]=d[p]})),n=e&&e.__setModuleDefault||(Object.create?(function(f,d){Object.defineProperty(f,"default",{enumerable:!0,value:d})}):function(f,d){f.default=d}),r=e&&e.__importStar||(function(){var f=function(d){return f=Object.getOwnPropertyNames||function(p){var h=[];for(var y in p)Object.prototype.hasOwnProperty.call(p,y)&&(h[h.length]=y);return h},f(d)};return function(d){if(d&&d.__esModule)return d;var p={};if(d!=null)for(var h=f(d),y=0;y<h.length;y++)h[y]!=="default"&&t(p,d,h[y]);return n(p,d),p}})();Object.defineProperty(e,"__esModule",{value:!0}),e.OUTGOING_PASSES=void 0,e.removeChunked=a,e.setConnection=o,e.setRedirectHostRewrite=l,e.writeHeaders=c,e.writeStatusCode=u;let s=r(xo()),i=/^201|30(1|2|7|8)$/;function a(f,d,p){delete p.headers["transfer-encoding"]}function o(f,d,p){f.httpVersion==="1.0"?p.headers.connection=f.headers.connection||"close":f.httpVersion!=="2.0"&&!p.headers.connection&&(p.headers.connection=f.headers.connection||"keep-alive")}function l(f,d,p,h){if((h.hostRewrite||h.autoRewrite||h.protocolRewrite)&&p.headers.location&&i.test(`${p.statusCode}`)){let y=s.toURL(h.target),m=p.headers.location;if(typeof m!="string")return;let w=s.toURL(m);if(y.host!=w.host)return;h.hostRewrite?w.host=h.hostRewrite:h.autoRewrite&&(w.host=f.headers[":authority"]??f.headers.host??""),h.protocolRewrite&&(w.protocol=h.protocolRewrite),p.headers.location=w.toString()}}function c(f,d,p,h){let y=typeof h.cookieDomainRewrite=="string"?{"*":h.cookieDomainRewrite}:h.cookieDomainRewrite,m=typeof h.cookiePathRewrite=="string"?{"*":h.cookiePathRewrite}:h.cookiePathRewrite,w=h.preserveHeaderKeyCase,A=(E,v)=>{v!=null&&(y&&E.toLowerCase()==="set-cookie"&&(v=s.rewriteCookieProperty(v,y,"domain")),m&&E.toLowerCase()==="set-cookie"&&(v=s.rewriteCookieProperty(v,m,"path")),d.setHeader(String(E).trim(),v))},g;if(w&&p.rawHeaders!=null){g={};for(let E=0;E<p.rawHeaders.length;E+=2){let v=p.rawHeaders[E];g[v.toLowerCase()]=v}}for(let E in p.headers){let v=E;if(f.httpVersionMajor>1&&(v==="connection"||v==="keep-alive"))continue;let S=p.headers[v];w&&g&&(v=g[v]??v),A(v,S)}}function u(f,d,p){d.statusCode=p.statusCode,p.statusMessage&&f.httpVersionMajor===1&&(d.statusMessage=p.statusMessage)}e.OUTGOING_PASSES={removeChunked:a,setConnection:o,setRedirectHostRewrite:l,writeHeaders:c,writeStatusCode:u}})),_O=le((e=>{var t=e&&e.__createBinding||(Object.create?(function(w,A,g,E){E===void 0&&(E=g);var v=Object.getOwnPropertyDescriptor(A,g);(!v||("get"in v?!A.__esModule:v.writable||v.configurable))&&(v={enumerable:!0,get:function(){return A[g]}}),Object.defineProperty(w,E,v)}):(function(w,A,g,E){E===void 0&&(E=g),w[E]=A[g]})),n=e&&e.__setModuleDefault||(Object.create?(function(w,A){Object.defineProperty(w,"default",{enumerable:!0,value:A})}):function(w,A){w.default=A}),r=e&&e.__importStar||(function(){var w=function(A){return w=Object.getOwnPropertyNames||function(g){var E=[];for(var v in g)Object.prototype.hasOwnProperty.call(g,v)&&(E[E.length]=v);return E},w(A)};return function(A){if(A&&A.__esModule)return A;var g={};if(A!=null)for(var E=w(A),v=0;v<E.length;v++)E[v]!=="default"&&t(g,A,E[v]);return n(g,A),g}})();Object.defineProperty(e,"__esModule",{value:!0}),e.WEB_PASSES=void 0,e.deleteLength=d,e.timeout=p,e.XHeaders=h,e.stream=y;let s=r(ce("node:http")),i=r(ce("node:https")),a=r(vO()),o=r(xo()),l=Oy(),c=ce("node:stream"),u=Object.values(l.OUTGOING_PASSES),f={http:s,https:i};function d(w){(w.method==="DELETE"||w.method==="OPTIONS")&&!w.headers["content-length"]&&(w.headers["content-length"]="0",delete w.headers["transfer-encoding"])}function p(w,A,g){g.timeout&&w.socket.setTimeout(g.timeout)}function h(w,A,g){if(!g.xfwd)return;let E=o.hasEncryptedConnection(w),v={for:w.connection.remoteAddress||w.socket.remoteAddress,port:o.getPort(w),proto:E?"https":"http"};for(let S of["for","port","proto"])w.headers["x-forwarded-"+S]=(w.headers["x-forwarded-"+S]||"")+(w.headers["x-forwarded-"+S]?",":"")+v[S];w.headers["x-forwarded-host"]=w.headers["x-forwarded-host"]||w.headers[":authority"]||w.headers.host||""}function y(w,A,g,E,v,S){if(v.emit("start",w,A,g.target||g.forward),g.fetch||g.fetchOptions||process.env.FORCE_FETCH_PATH==="true")return m(w,A,g,E,v,S);let b=g.followRedirects?a:f,_=b.http,C=b.https;if(g.forward){let I=g.forward.protocol==="https:"?C:_,M=o.setupOutgoing(g.ssl||{},g,w,"forward"),B=I.request(M),U=R(B,g.forward);if(w.on("error",U),B.on("error",U),(g.buffer||w).pipe(B),!g.target)return A.end()}let x=g.target.protocol==="https:"?C:_,T=o.setupOutgoing(g.ssl||{},g,w),k=x.request(T);k.on("socket",I=>{v&&!k.getHeader("expect")&&v.emit("proxyReq",k,w,A,g,I)}),g.proxyTimeout&&k.setTimeout(g.proxyTimeout,()=>{k.destroy()}),A.on("close",()=>{A.writableFinished||k.destroy()});let O=R(k,g.target);w.on("error",O),k.on("error",O);function R(I,M){return B=>{if(w.socket.destroyed&&B.code==="ECONNRESET"){v.emit("econnreset",B,w,A,M),I.destroy();return}S?S(B,w,A,M):v.emit("error",B,w,A,M)}}(g.buffer||w).pipe(k),k.on("response",I=>{if(v?.emit("proxyRes",I,w,A),!A.headersSent&&!g.selfHandleResponse)for(let M of u)M(w,A,I,g);A.finished?v?.emit("end",w,A,I):(I.on("end",()=>{v?.emit("end",w,A,I)}),g.selfHandleResponse||I.pipe(A))})}async function m(w,A,g,E,v,S){let b=(R,I)=>{let M=R;M.code===void 0&&M.cause?.code&&(M.code=M.cause.code),S?S(R,w,A,I):v.emit("error",R,w,A,I)};w.on("error",R=>{if(w.socket.destroyed&&R.code==="ECONNRESET"){let I=g.target||g.forward;I&&v.emit("econnreset",R,w,A,I);return}b(R)});let _=g.fetch||fetch,C=g.fetchOptions??{},x=R=>{let I={method:R.method,...C.requestOptions},M=new Headers(C.requestOptions?.headers);if(!C.requestOptions?.headers&&R.headers){for(let[B,U]of Object.entries(R.headers))if(typeof B=="string")if(Array.isArray(U))for(let V of U)M.append(B,V);else U!=null&&M.append(B,U)}return g.auth&&M.set("authorization",`Basic ${Buffer.from(g.auth).toString("base64")}`),g.proxyTimeout&&(I.signal=AbortSignal.timeout(g.proxyTimeout)),I.headers=M,g.buffer?I.body=g.buffer:w.method!=="GET"&&w.method!=="HEAD"&&(I.body=w,I.duplex="half"),I};if(g.forward){let R=o.setupOutgoing(g.ssl||{},g,w,"forward"),I=x(R),M=new URL(R.url).origin+R.path;if(M.startsWith("ws")&&(M=M.replace("ws","http")),C.onBeforeRequest)try{await C.onBeforeRequest(I,w,A,g)}catch(B){b(B,g.forward);return}try{let B=await _(M,I);if(C.onAfterResponse)try{await C.onAfterResponse(B,w,A,g)}catch(U){b(U,g.forward);return}}catch(B){b(B,g.forward)}if(!g.target)return A.end()}let T=o.setupOutgoing(g.ssl||{},g,w),k=x(T),O=new URL(T.url).origin+T.path;if(O.startsWith("ws")&&(O=O.replace("ws","http")),C.onBeforeRequest)try{await C.onBeforeRequest(k,w,A,g)}catch(R){b(R,g.target);return}try{let R=await _(O,k);if(C.onAfterResponse)try{await C.onAfterResponse(R,w,A,g)}catch(M){b(M,g.target);return}let I={statusCode:R.status,statusMessage:R.statusText,headers:Object.fromEntries(R.headers.entries()),rawHeaders:Object.entries(R.headers).flatMap(([M,B])=>Array.isArray(B)?B.flatMap(U=>U!=null?[M,U]:[]):B!=null?[M,B]:[])};if(v?.emit("proxyRes",I,w,A),!A.headersSent&&!g.selfHandleResponse)for(let M of u)M(w,A,I,g);if(A.writableEnded)v?.emit("end",w,A,I);else{let M=R.body?c.Readable.from(R.body):null;M?(M.on("error",B=>{b(B,g.target)}),M.on("end",()=>{v?.emit("end",w,A,I)}),g.selfHandleResponse?M.resume():M.pipe(A,{end:!0})):v?.emit("end",w,A,I)}}catch(R){b(R,g.target)}}e.WEB_PASSES={deleteLength:d,timeout:p,XHeaders:h,stream:y}})),By=le((e=>{var t=e&&e.__createBinding||(Object.create?(function(g,E,v,S){S===void 0&&(S=v);var b=Object.getOwnPropertyDescriptor(E,v);(!b||("get"in b?!E.__esModule:b.writable||b.configurable))&&(b={enumerable:!0,get:function(){return E[v]}}),Object.defineProperty(g,S,b)}):(function(g,E,v,S){S===void 0&&(S=v),g[S]=E[v]})),n=e&&e.__setModuleDefault||(Object.create?(function(g,E){Object.defineProperty(g,"default",{enumerable:!0,value:E})}):function(g,E){g.default=E}),r=e&&e.__importStar||(function(){var g=function(E){return g=Object.getOwnPropertyNames||function(v){var S=[];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(S[S.length]=b);return S},g(E)};return function(E){if(E&&E.__esModule)return E;var v={};if(E!=null)for(var S=g(E),b=0;b<S.length;b++)S[b]!=="default"&&t(v,E,S[b]);return n(v,E),v}})(),s=e&&e.__importDefault||function(g){return g&&g.__esModule?g:{default:g}};Object.defineProperty(e,"__esModule",{value:!0}),e.WS_PASSES=void 0,e.numOpenSockets=y,e.checkMethodAndHeader=m,e.XHeaders=w,e.stream=A;let i=r(ce("node:http")),a=r(ce("node:https")),o=r(xo()),l=Oy(),c=(0,s((tr(),us(ps))).default)("http-proxy-3:ws-incoming"),u=Object.values(l.OUTGOING_PASSES);function f(g){let E=new Set;return({add:v,rm:S}={})=>(v&&(v.id||(v.id=Math.random()),E.has(v.id)||E.add(v.id)),S&&(S.id||(S.id=Math.random()),E.has(S.id)&&E.delete(S.id)),c("socket counter:",{[g]:E.size},v?"add":S?"rm":""),E.size)}let d=f("socket"),p=f("proxySocket");var h=class{constructor(){this.headers={},this.statusCode=200,this.statusMessage=""}setHeader(g,E){return this.headers[g]=E,this}};function y(){return d()+p()}function m(g,E){if(c("websocket: checkMethodAndHeader"),g.method!=="GET"||!g.headers.upgrade||g.headers.upgrade.toLowerCase()!=="websocket")return E.destroy(),!0}function w(g,E,v){if(!v.xfwd)return;c("websocket: XHeaders");let S={for:g.connection.remoteAddress||g.socket.remoteAddress,port:o.getPort(g),proto:o.hasEncryptedConnection(g)?"wss":"ws"};for(let b of["for","port","proto"])g.headers["x-forwarded-"+b]=(g.headers["x-forwarded-"+b]||"")+(g.headers["x-forwarded-"+b]?",":"")+S[b]}function A(g,E,v,S,b,_){c("websocket: new stream");let C=[];d({add:E});let x=()=>{for(let M of C)M.end()};E.on("close",()=>{d({rm:E}),x()}),E.on("error",x);let T=(M,B)=>Object.keys(B).reduce((U,V)=>{let te=B[V];if(!Array.isArray(te))return U.push(V+": "+te),U;for(let Q=0;Q<te.length;Q++)U.push(V+": "+te[Q]);return U},[M]).join(`\r
|
|
203
|
-
`)+`\r
|
|
204
|
-
\r
|
|
205
|
-
`;o.setupSocket(E),S&&S.length&&E.unshift(S);let k=o.isSSL.test(v.target.protocol)?a:i,O=o.setupOutgoing(v.ssl||{},v,g),R=k.request(O);b&&b.emit("proxyReqWs",R,g,E,v,S),R.on("error",I),R.on("upgrade",(M,B,U)=>{c("upgrade"),p({add:B}),C.push(B),B.on("close",()=>{p({rm:B})}),B.on("error",I),B.on("end",()=>{b.emit("close",M,B,U)}),B.on("close",()=>{E.end()}),o.setupSocket(B),U&&U.length&&B.unshift(U),E.write(T("HTTP/1.1 101 Switching Protocols",M.headers)),B.pipe(E).pipe(B),b.emit("open",B)});function I(M){_?_(M,g,E):b.emit("error",M,g,E),E.destroySoon()}R.on("response",M=>{c("got non-ws HTTP response",{statusCode:M.statusCode,statusMessage:M.statusMessage});let B=new h;for(let te of u)te(g,B,M,v);let U=te=>{E.write(te)};g.httpVersion==="1.1"&&M.headers["content-length"]===void 0&&(B.headers["transfer-encoding"]="chunked",U=te=>{E.write(te.length.toString(16)),E.write(`\r
|
|
206
|
-
`),E.write(te),E.write(`\r
|
|
207
|
-
`)});let V=T(`HTTP/${g.httpVersion} ${M.statusCode} ${M.statusMessage}`,B.headers);E.destroyed?M.resume():(E.write(V),M.on("data",te=>{U(te)}),M.on("end",()=>{U(""),E.destroySoon()}))}),R.end()}e.WS_PASSES={checkMethodAndHeader:m,XHeaders:w,stream:A}})),bO=le((e=>{var t=e&&e.__createBinding||(Object.create?(function(p,h,y,m){m===void 0&&(m=y);var w=Object.getOwnPropertyDescriptor(h,y);(!w||("get"in w?!h.__esModule:w.writable||w.configurable))&&(w={enumerable:!0,get:function(){return h[y]}}),Object.defineProperty(p,m,w)}):(function(p,h,y,m){m===void 0&&(m=y),p[m]=h[y]})),n=e&&e.__setModuleDefault||(Object.create?(function(p,h){Object.defineProperty(p,"default",{enumerable:!0,value:h})}):function(p,h){p.default=h}),r=e&&e.__importStar||(function(){var p=function(h){return p=Object.getOwnPropertyNames||function(y){var m=[];for(var w in y)Object.prototype.hasOwnProperty.call(y,w)&&(m[m.length]=w);return m},p(h)};return function(h){if(h&&h.__esModule)return h;var y={};if(h!=null)for(var m=p(h),w=0;w<m.length;w++)m[w]!=="default"&&t(y,h,m[w]);return n(y,h),y}})(),s=e&&e.__importDefault||function(p){return p&&p.__esModule?p:{default:p}};Object.defineProperty(e,"__esModule",{value:!0}),e.ProxyServer=void 0;let i=r(ce("node:http")),a=r(ce("node:http2")),o=_O(),l=By(),c=ce("node:events"),u=s((tr(),us(ps))),f=xo(),d=(0,u.default)("http-proxy-3");e.ProxyServer=class pi extends c.EventEmitter{constructor(h={}){super(),this.createRightProxy=y=>(d("createRightProxy",{type:y}),m=>(...w)=>{let A=w[0];d("proxy: ",{type:y,path:A.url});let g=w[1],E=y==="ws"?this.wsPasses:this.webPasses;y=="ws"&&g.on("error",C=>{this.emit("error",C,A,g)});let v=w.length-1,S,b;typeof w[v]=="function"&&(b=w[v],v--);let _;!(w[v]instanceof Buffer)&&w[v]!==g?(_={...m,...w[v]},v--):_={...m},w[v]instanceof Buffer&&(S=w[v]);for(let C of["target","forward"])typeof _[C]=="string"&&(_[C]=(0,f.toURL)(_[C]));if(!_.target&&!_.forward){this.emit("error",new Error("Must set target or forward"),A,g);return}for(let C of E)if(C(A,g,_,S,this,b))break}),this.onError=y=>{if(this.listeners("error").length===1)throw y},this.listen=(y,m)=>{d("listen",{port:y,hostname:m});let w=(A,g)=>{this.web(A,g)};return this._server=this.options.ssl?a.createSecureServer({...this.options.ssl,allowHTTP1:!0},w):i.createServer(w),this.options.ws&&this._server.on("upgrade",(A,g,E)=>{this.ws(A,g,E)}),this._server.listen(y,m),this},this.address=()=>this._server?.address(),this.close=y=>{if(this._server==null){y?.();return}this._server.close(m=>{this._server=null,y?.(m)})},this.before=(y,m,w)=>{if(y!=="ws"&&y!=="web")throw new Error("type must be `web` or `ws`");let A=y==="ws"?this.wsPasses:this.webPasses,g=!1;if(A.forEach((E,v)=>{E.name===m&&(g=v)}),g===!1)throw new Error("No such pass");A.splice(g,0,w)},this.after=(y,m,w)=>{if(y!=="ws"&&y!=="web")throw new Error("type must be `web` or `ws`");let A=y==="ws"?this.wsPasses:this.webPasses,g=!1;if(A.forEach((E,v)=>{E.name===m&&(g=v)}),g===!1)throw new Error("No such pass");A.splice(g++,0,w)},d("creating a ProxyServer",h),h.prependPath=h.prependPath!==!1,this.options=h,this.web=this.createRightProxy("web")(h),this.ws=this.createRightProxy("ws")(h),this.webPasses=Object.values(o.WEB_PASSES),this.wsPasses=Object.values(l.WS_PASSES),this.on("error",this.onError)}static createProxyServer(h){return new pi(h)}static createServer(h){return new pi(h)}static createProxy(h){return new pi(h)}}})),SO=nt(le((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.numOpenSockets=e.ProxyServer=void 0,e.createProxyServer=r;let t=bO();Object.defineProperty(e,"ProxyServer",{enumerable:!0,get:function(){return t.ProxyServer}});var n=By();Object.defineProperty(e,"numOpenSockets",{enumerable:!0,get:function(){return n.numOpenSockets}});function r(s={}){return new t.ProxyServer(s)}}))(),1),Yt=Re("vite:proxy"),xO=(e,t,n)=>{if(t.rewriteWsOrigin){let{target:r}=t;if(e.headersSent){n.logger.warn(j.default.yellow("Unable to rewrite Origin header as headers are already sent."));return}if(e.getHeader("origin")&&r){let s=typeof r=="object"?`${r.protocol??"http:"}//${r.host}`:r;e.setHeader("origin",s)}}};function CO(e,t,n){let r={};return Object.keys(t).forEach(s=>{let i=t[s];if(!i)return;typeof i=="string"&&(i={target:i,changeOrigin:!0});let a=SO.createProxyServer(i);i.configure&&i.configure(a,i),a.on("error",(o,l,c)=>{"req"in c?(n.logger.error(`${j.default.red(`http proxy error: ${c.req.url}`)}
|
|
208
|
-
${o.stack}`,{timestamp:!0,error:o}),!c.headersSent&&!c.writableEnded&&c.writeHead(502,{"Content-Type":"text/plain"}).end()):(n.logger.error(`${j.default.red("ws proxy error:")}
|
|
209
|
-
${o.stack}`,{timestamp:!0,error:o}),c.end())}),a.on("proxyReqWs",(o,l,c,u)=>{xO(o,u,n),c.on("error",f=>{n.logger.error(`${j.default.red("ws proxy socket error:")}
|
|
210
|
-
${f.stack}`,{timestamp:!0,error:f})})}),r[s]=[a,{...i}]}),e&&e.on("upgrade",async(s,i,a)=>{let o=s.url;for(let l in r)if(Xp(l,o)){let[c,u]=r[l];if(u.ws||u.target?.toString().startsWith("ws:")||u.target?.toString().startsWith("wss:")){if(u.bypass)try{let f=await u.bypass(s,void 0,u);if(typeof f=="string"){Yt?.(`bypass: ${s.url} -> ${f}`),s.url=f;return}if(f===!1){Yt?.(`bypass: ${s.url} -> 404`),i.end(`HTTP/1.1 404 Not Found\r
|
|
211
|
-
\r
|
|
212
|
-
`,"");return}}catch(f){n.logger.error(`${j.default.red("ws proxy bypass error:")}
|
|
213
|
-
${f.stack}`,{timestamp:!0,error:f});return}u.rewrite&&(s.url=u.rewrite(o)),Yt?.(`${s.url} -> ws ${u.target}`),c.ws(s,i,a);return}}}),async function(i,a,o){let l=i.url;for(let c in r)if(Xp(c,l)){let[u,f]=r[c],d={};if(f.bypass)try{let p=await f.bypass(i,a,f);if(typeof p=="string")return Yt?.(`bypass: ${i.url} -> ${p}`),i.url=p,a.writableEnded?void 0:o();if(p===!1)return Yt?.(`bypass: ${i.url} -> 404`),a.statusCode=404,a.end()}catch(p){return Yt?.(`bypass: ${i.url} -> ${p}`),o(p)}Yt?.(`${i.url} -> ${f.target||f.forward}`),f.rewrite&&(i.url=f.rewrite(i.url)),u.web(i,a,d);return}o()}}function Xp(e,t){return e[0]==="^"&&new RegExp(e).test(t)||t.startsWith(e)}var Zs=Re("vite:html-fallback");function IO(e,t,n){let r=n?.bundledDev?.memoryFiles;function s(i){return r?.has(i.slice(1))??pe.existsSync(L.join(e,i))}return function(a,o,l){if(a.method!=="GET"&&a.method!=="HEAD"||a.url==="/favicon.ico"||!(a.headers.accept===void 0||a.headers.accept===""||a.headers.accept.includes("text/html")||a.headers.accept.includes("*/*")))return l();let c=he(a.url),u;try{u=decodeURIComponent(c)}catch{return l()}if(u.endsWith(".html")){if(s(u))return Zs?.(`Rewriting ${a.method} ${a.url} to ${c}`),a.url=c,l()}else if(u.endsWith("/")){if(s(ze(u,"index.html"))){let f=c+"index.html";return Zs?.(`Rewriting ${a.method} ${a.url} to ${f}`),a.url=f,l()}}else if(s(u+".html")){let f=c+".html";return Zs?.(`Rewriting ${a.method} ${a.url} to ${f}`),a.url=f,l()}t&&(Zs?.(`Rewriting ${a.method} ${a.url} to /index.html`),a.url="/index.html"),l()}}var RO=le((e=>{Object.defineProperty(e,"commentRegex",{get:function(){return/^\s*?\/[\/\*][@#]\s+?sourceMappingURL=data:(((?:application|text)\/json)(?:;charset=([^;,]+?)?)?)?(?:;(base64))?,(.*?)$/gm}}),Object.defineProperty(e,"mapFileCommentRegex",{get:function(){return/(?:\/\/[@#][ \t]+?sourceMappingURL=([^\s'"`]+?)[ \t]*?$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^*]+?)[ \t]*?(?:\*\/){1}[ \t]*?$)/gm}});var t;typeof Buffer<"u"?typeof Buffer.from=="function"?t=n:t=r:t=s;function n(d){return Buffer.from(d,"base64").toString()}function r(d){if(typeof value=="number")throw new TypeError("The value to decode must not be of type number.");return new Buffer(d,"base64").toString()}function s(d){return decodeURIComponent(escape(atob(d)))}function i(d){return d.split(",").pop()}function a(d,p){var h=e.mapFileCommentRegex.exec(d),y=h[1]||h[2];try{var d=p(y);return d!=null&&typeof d.catch=="function"?d.catch(m):d}catch(w){m(w)}function m(w){throw new Error("An error occurred while trying to read the map file at "+y+`
|
|
214
|
-
`+w.stack)}}function o(d,p){p=p||{},p.hasComment&&(d=i(d)),p.encoding==="base64"?d=t(d):p.encoding==="uri"&&(d=decodeURIComponent(d)),(p.isJSON||p.encoding)&&(d=JSON.parse(d)),this.sourcemap=d}o.prototype.toJSON=function(d){return JSON.stringify(this.sourcemap,null,d)},typeof Buffer<"u"?typeof Buffer.from=="function"?o.prototype.toBase64=l:o.prototype.toBase64=c:o.prototype.toBase64=u;function l(){var d=this.toJSON();return Buffer.from(d,"utf8").toString("base64")}function c(){var d=this.toJSON();if(typeof d=="number")throw new TypeError("The json to encode must not be of type number.");return new Buffer(d,"utf8").toString("base64")}function u(){var d=this.toJSON();return btoa(unescape(encodeURIComponent(d)))}o.prototype.toURI=function(){var d=this.toJSON();return encodeURIComponent(d)},o.prototype.toComment=function(d){var p,h,y;return d!=null&&d.encoding==="uri"?(p="",h=this.toURI()):(p=";base64",h=this.toBase64()),y="sourceMappingURL=data:application/json;charset=utf-8"+p+","+h,d!=null&&d.multiline?"/*# "+y+" */":"//# "+y},o.prototype.toObject=function(){return JSON.parse(this.toJSON())},o.prototype.addProperty=function(d,p){if(this.sourcemap.hasOwnProperty(d))throw new Error('property "'+d+'" already exists on the sourcemap, use set property instead');return this.setProperty(d,p)},o.prototype.setProperty=function(d,p){return this.sourcemap[d]=p,this},o.prototype.getProperty=function(d){return this.sourcemap[d]},e.fromObject=function(d){return new o(d)},e.fromJSON=function(d){return new o(d,{isJSON:!0})},e.fromURI=function(d){return new o(d,{encoding:"uri"})},e.fromBase64=function(d){return new o(d,{encoding:"base64"})},e.fromComment=function(d){var p,h;return d=d.replace(/^\/\*/g,"//").replace(/\*\/$/g,""),p=e.commentRegex.exec(d),h=p&&p[4]||"uri",new o(d,{encoding:h,hasComment:!0})};function f(d){return new o(d,{isJSON:!0})}e.fromMapFileComment=function(d,p){if(typeof p=="string")throw new Error("String directory paths are no longer supported with `fromMapFileComment`\nPlease review the Upgrading documentation at https://github.com/thlorenz/convert-source-map#upgrading");var h=a(d,p);return h!=null&&typeof h.then=="function"?h.then(f):f(h)},e.fromSource=function(d){var p=d.match(e.commentRegex);return p?e.fromComment(p.pop()):null},e.fromMapFileSource=function(d,p){if(typeof p=="string")throw new Error("String directory paths are no longer supported with `fromMapFileSource`\nPlease review the Upgrading documentation at https://github.com/thlorenz/convert-source-map#upgrading");var h=d.match(e.mapFileCommentRegex);return h?e.fromMapFileComment(h.pop(),p):null},e.removeComments=function(d){return d.replace(e.commentRegex,"")},e.removeMapFileComments=function(d){return d.replace(e.mapFileCommentRegex,"")},e.generateMapFileComment=function(d,p){var h="sourceMappingURL="+d;return p&&p.multiline?"/*# "+h+" */":"//# "+h}}));var kO=le(((e,t)=>{t.exports=a;var n=ce("crypto"),r=ce("fs").Stats,s=Object.prototype.toString;function i(c){if(c.length===0)return'"0-2jmj7l5rSw0yVb/vlWAYkK/YBwk"';var u=n.createHash("sha1").update(c,"utf8").digest("base64").substring(0,27);return'"'+(typeof c=="string"?Buffer.byteLength(c,"utf8"):c.length).toString(16)+"-"+u+'"'}function a(c,u){if(c==null)throw new TypeError("argument entity is required");var f=o(c),d=u&&typeof u.weak=="boolean"?u.weak:f;if(!f&&typeof c!="string"&&!Buffer.isBuffer(c))throw new TypeError("argument entity must be string, Buffer, or fs.Stats");var p=f?l(c):i(c);return d?"W/"+p:p}function o(c){return typeof r=="function"&&c instanceof r?!0:c&&typeof c=="object"&&"ctime"in c&&s.call(c.ctime)==="[object Date]"&&"mtime"in c&&s.call(c.mtime)==="[object Date]"&&"ino"in c&&typeof c.ino=="number"&&"size"in c&&typeof c.size=="number"}function l(c){var u=c.mtime.getTime().toString(16);return'"'+c.size.toString(16)+"-"+u+'"'}})),Qr=nt(RO(),1),$y=Re("vite:sourcemap",{onlyWhenFocused:!0});function My(e){let t=re(e),n=t.lastIndexOf("/node_modules/");if(n===-1)return;let r=n+14,s=t.slice(r),i=s.indexOf("/"),a;if(s.startsWith("@")){let o=s.indexOf("/",i+1);a=o===-1?s:s.slice(0,o)}else a=i===-1?s:s.slice(0,i);return t.slice(0,r)+a}var TO=/^(?:dep:|browser-external:|virtual:)|\0/;async function OO(e,t){let n;try{n=await Ee.realpath(L.resolve(L.dirname(t),e.sourceRoot||""))}catch{}return n}async function ru(e,t,n){let r,s=My(t),i=[],a=e.sourcesContent||[],o=[];for(let l=0;l<e.sources.length;l++){let c=e.sources[l];a[l]==null&&c&&!TO.test(c)&&o.push((async()=>{r??=OO(e,t);let u=await r,f=he(decodeURI(c));if(u&&(f=L.resolve(u,f)),s){let d=re(L.resolve(f));if(!En(s,d)){a[l]=null,n.warnOnce(j.default.yellow(`Sourcemap for ${JSON.stringify(t)} points to a source file outside its package: ${JSON.stringify(d)}`));return}}a[l]=await Ee.readFile(f,"utf-8").catch(()=>(i.push(f),null))})())}await Promise.all(o),e.sourcesContent=a,i.length&&(n.warnOnce(`Sourcemap for "${t}" points to missing source files`),$y?.(`Missing sources:
|
|
215
|
-
`+i.join(`
|
|
216
|
-
`)))}function ns(e){return typeof e!="string"&&(e=JSON.stringify(e)),`data:application/json;base64,${Buffer.from(e).toString("base64")}`}function ji(e,t,n){return $y&&(t+=`
|
|
217
|
-
/*${JSON.stringify(n,null,2).replace(/\*\//g,"*\\/")}*/
|
|
218
|
-
`),e==="js"?t+=`
|
|
219
|
-
//# sourceMappingURL=${ns(n)}`:e==="css"&&(t+=`
|
|
220
|
-
/*# sourceMappingURL=${ns(n)} */`),t}function Dy(e,t,n,r){let{x_google_ignoreList:s}=e;if(s===void 0&&(s=[]),e.sources){for(let i=0;i<e.sources.length;++i){let a=e.sources[i];if(!a)continue;let o=n(L.isAbsolute(a)?a:L.resolve(L.dirname(t),a),t);r&&typeof o!="boolean"&&r.warn("sourcemapIgnoreList function must return a boolean."),o&&!s.includes(i)&&s.push(i)}s.length>0&&(e.x_google_ignoreList||(e.x_google_ignoreList=s))}}function Py(e,t,n){let r=(Qr.fromSource(e)||Qr.fromMapFileSource(e,BO(t,n)))?.toObject();if(r)return{code:e.replace(Qr.default.mapFileCommentRegex,Dg),map:r}}function BO(e,t){let n=My(e);return r=>{let s=L.resolve(L.dirname(e),r);return n&&!En(n,re(s))?(t.warnOnce(j.default.yellow(`Sourcemap in "${e}" references a map file outside its package: "${r}"`)),"{}"):pe.readFileSync(s,"utf-8")}}var rs=nt(kO(),1),$O=Re("vite:send",{onlyWhenFocused:!0}),MO={js:"text/javascript",css:"text/css",html:"text/html",json:"application/json"};function Fn(e,t,n,r,s){let{etag:i=(0,rs.default)(n,{weak:!0}),cacheControl:a="no-cache",headers:o,map:l}=s;if(!t.writableEnded){if(e.headers["if-none-match"]===i){t.statusCode=304,t.end();return}if(t.setHeader("Content-Type",MO[r]||r),t.setHeader("Cache-Control",a),t.setHeader("Etag",i),o)for(let c in o)t.setHeader(c,o[c]);if(l&&"version"in l&&l.mappings)(r==="js"||r==="css")&&(n=ji(r,n.toString(),l));else if(r==="js"&&(!l||l.mappings!=="")){let c=n.toString();if(Qr.default.mapFileCommentRegex.test(c))$O?.(`Skipped injecting fallback sourcemap for ${e.url}`);else{let u=yt(e.url);n=ji(r,c,new Ie(c).generateMap({source:L.basename(u),hires:"boundary",includeContent:!0}))}}t.statusCode=200,e.method==="HEAD"?t.end():t.end(n)}}function Ny(e,t,n=""){e=$m(".",e);let r=JS(e),s=0,i,a;for(;s<r.length;s++)i=Ja(e,r[s]),a=KS(i),a.isDirectory()?Ny(i,t,Ja(n,r[s])):t(Ja(n,r[s]),i,a)}function DO(e){let t=e.url;if(t==null)return;let n=e._parsedUrl;if(n&&n.raw===t)return n;let r=t,s="",i,a;if(t.length>1){let o=t.indexOf("#",1);o!==-1&&(a=t.substring(o),r=t.substring(0,o)),o=r.indexOf("?",1),o!==-1&&(s=r.substring(o),r=r.substring(0,o),s.length>1&&(i=Mm.parse(s.substring(1))))}return e._parsedUrl={pathname:r,search:s,query:i,hash:a,raw:t}}var Br={"3g2":"video/3gpp2","3gp":"video/3gpp","3gpp":"video/3gpp","3mf":"model/3mf",aac:"audio/aac",ac:"application/pkix-attr-cert",adp:"audio/adpcm",adts:"audio/aac",ai:"application/postscript",aml:"application/automationml-aml+xml",amlx:"application/automationml-amlx+zip",amr:"audio/amr",apng:"image/apng",appcache:"text/cache-manifest",appinstaller:"application/appinstaller",appx:"application/appx",appxbundle:"application/appxbundle",asc:"application/pgp-keys",atom:"application/atom+xml",atomcat:"application/atomcat+xml",atomdeleted:"application/atomdeleted+xml",atomsvc:"application/atomsvc+xml",au:"audio/basic",avci:"image/avci",avcs:"image/avcs",avif:"image/avif",aw:"application/applixware",bdoc:"application/bdoc",bin:"application/octet-stream",bmp:"image/bmp",bpk:"application/octet-stream",btf:"image/prs.btif",btif:"image/prs.btif",buffer:"application/octet-stream",ccxml:"application/ccxml+xml",cdfx:"application/cdfx+xml",cdmia:"application/cdmi-capability",cdmic:"application/cdmi-container",cdmid:"application/cdmi-domain",cdmio:"application/cdmi-object",cdmiq:"application/cdmi-queue",cer:"application/pkix-cert",cgm:"image/cgm",cjs:"application/node",class:"application/java-vm",coffee:"text/coffeescript",conf:"text/plain",cpl:"application/cpl+xml",cpt:"application/mac-compactpro",crl:"application/pkix-crl",css:"text/css",csv:"text/csv",cu:"application/cu-seeme",cwl:"application/cwl",cww:"application/prs.cww",davmount:"application/davmount+xml",dbk:"application/docbook+xml",deb:"application/octet-stream",def:"text/plain",deploy:"application/octet-stream",dib:"image/bmp","disposition-notification":"message/disposition-notification",dist:"application/octet-stream",distz:"application/octet-stream",dll:"application/octet-stream",dmg:"application/octet-stream",dms:"application/octet-stream",doc:"application/msword",dot:"application/msword",dpx:"image/dpx",drle:"image/dicom-rle",dsc:"text/prs.lines.tag",dssc:"application/dssc+der",dtd:"application/xml-dtd",dump:"application/octet-stream",dwd:"application/atsc-dwd+xml",ear:"application/java-archive",ecma:"application/ecmascript",elc:"application/octet-stream",emf:"image/emf",eml:"message/rfc822",emma:"application/emma+xml",emotionml:"application/emotionml+xml",eps:"application/postscript",epub:"application/epub+zip",exe:"application/octet-stream",exi:"application/exi",exp:"application/express",exr:"image/aces",ez:"application/andrew-inset",fdf:"application/fdf",fdt:"application/fdt+xml",fits:"image/fits",g3:"image/g3fax",gbr:"application/rpki-ghostbusters",geojson:"application/geo+json",gif:"image/gif",glb:"model/gltf-binary",gltf:"model/gltf+json",gml:"application/gml+xml",gpx:"application/gpx+xml",gram:"application/srgs",grxml:"application/srgs+xml",gxf:"application/gxf",gz:"application/gzip",h261:"video/h261",h263:"video/h263",h264:"video/h264",heic:"image/heic",heics:"image/heic-sequence",heif:"image/heif",heifs:"image/heif-sequence",hej2:"image/hej2k",held:"application/atsc-held+xml",hjson:"application/hjson",hlp:"application/winhlp",hqx:"application/mac-binhex40",hsj2:"image/hsj2",htm:"text/html",html:"text/html",ics:"text/calendar",ief:"image/ief",ifb:"text/calendar",iges:"model/iges",igs:"model/iges",img:"application/octet-stream",in:"text/plain",ini:"text/plain",ink:"application/inkml+xml",inkml:"application/inkml+xml",ipfix:"application/ipfix",iso:"application/octet-stream",its:"application/its+xml",jade:"text/jade",jar:"application/java-archive",jhc:"image/jphc",jls:"image/jls",jp2:"image/jp2",jpe:"image/jpeg",jpeg:"image/jpeg",jpf:"image/jpx",jpg:"image/jpeg",jpg2:"image/jp2",jpgm:"image/jpm",jpgv:"video/jpeg",jph:"image/jph",jpm:"image/jpm",jpx:"image/jpx",js:"text/javascript",json:"application/json",json5:"application/json5",jsonld:"application/ld+json",jsonml:"application/jsonml+json",jsx:"text/jsx",jt:"model/jt",jxl:"image/jxl",jxr:"image/jxr",jxra:"image/jxra",jxrs:"image/jxrs",jxs:"image/jxs",jxsc:"image/jxsc",jxsi:"image/jxsi",jxss:"image/jxss",kar:"audio/midi",ktx:"image/ktx",ktx2:"image/ktx2",less:"text/less",lgr:"application/lgr+xml",list:"text/plain",litcoffee:"text/coffeescript",log:"text/plain",lostxml:"application/lost+xml",lrf:"application/octet-stream",m1v:"video/mpeg",m21:"application/mp21",m2a:"audio/mpeg",m2t:"video/mp2t",m2ts:"video/mp2t",m2v:"video/mpeg",m3a:"audio/mpeg",m4a:"audio/mp4",m4p:"application/mp4",m4s:"video/iso.segment",ma:"application/mathematica",mads:"application/mads+xml",maei:"application/mmt-aei+xml",man:"text/troff",manifest:"text/cache-manifest",map:"application/json",mar:"application/octet-stream",markdown:"text/markdown",mathml:"application/mathml+xml",mb:"application/mathematica",mbox:"application/mbox",md:"text/markdown",mdx:"text/mdx",me:"text/troff",mesh:"model/mesh",meta4:"application/metalink4+xml",metalink:"application/metalink+xml",mets:"application/mets+xml",mft:"application/rpki-manifest",mid:"audio/midi",midi:"audio/midi",mime:"message/rfc822",mj2:"video/mj2",mjp2:"video/mj2",mjs:"text/javascript",mml:"text/mathml",mods:"application/mods+xml",mov:"video/quicktime",mp2:"audio/mpeg",mp21:"application/mp21",mp2a:"audio/mpeg",mp3:"audio/mpeg",mp4:"video/mp4",mp4a:"audio/mp4",mp4s:"application/mp4",mp4v:"video/mp4",mpd:"application/dash+xml",mpe:"video/mpeg",mpeg:"video/mpeg",mpf:"application/media-policy-dataset+xml",mpg:"video/mpeg",mpg4:"video/mp4",mpga:"audio/mpeg",mpp:"application/dash-patch+xml",mrc:"application/marc",mrcx:"application/marcxml+xml",ms:"text/troff",mscml:"application/mediaservercontrol+xml",msh:"model/mesh",msi:"application/octet-stream",msix:"application/msix",msixbundle:"application/msixbundle",msm:"application/octet-stream",msp:"application/octet-stream",mtl:"model/mtl",mts:"video/mp2t",musd:"application/mmt-usd+xml",mxf:"application/mxf",mxmf:"audio/mobile-xmf",mxml:"application/xv+xml",n3:"text/n3",nb:"application/mathematica",nq:"application/n-quads",nt:"application/n-triples",obj:"model/obj",oda:"application/oda",oga:"audio/ogg",ogg:"audio/ogg",ogv:"video/ogg",ogx:"application/ogg",omdoc:"application/omdoc+xml",onepkg:"application/onenote",onetmp:"application/onenote",onetoc:"application/onenote",onetoc2:"application/onenote",opf:"application/oebps-package+xml",opus:"audio/ogg",otf:"font/otf",owl:"application/rdf+xml",oxps:"application/oxps",p10:"application/pkcs10",p7c:"application/pkcs7-mime",p7m:"application/pkcs7-mime",p7s:"application/pkcs7-signature",p8:"application/pkcs8",pdf:"application/pdf",pfr:"application/font-tdpfr",pgp:"application/pgp-encrypted",pkg:"application/octet-stream",pki:"application/pkixcmp",pkipath:"application/pkix-pkipath",pls:"application/pls+xml",png:"image/png",prc:"model/prc",prf:"application/pics-rules",provx:"application/provenance+xml",ps:"application/postscript",pskcxml:"application/pskc+xml",pti:"image/prs.pti",qt:"video/quicktime",raml:"application/raml+yaml",rapd:"application/route-apd+xml",rdf:"application/rdf+xml",relo:"application/p2p-overlay+xml",rif:"application/reginfo+xml",rl:"application/resource-lists+xml",rld:"application/resource-lists-diff+xml",rmi:"audio/midi",rnc:"application/relax-ng-compact-syntax",rng:"application/xml",roa:"application/rpki-roa",roff:"text/troff",rq:"application/sparql-query",rs:"application/rls-services+xml",rsat:"application/atsc-rsat+xml",rsd:"application/rsd+xml",rsheet:"application/urc-ressheet+xml",rss:"application/rss+xml",rtf:"text/rtf",rtx:"text/richtext",rusd:"application/route-usd+xml",s3m:"audio/s3m",sbml:"application/sbml+xml",scq:"application/scvp-cv-request",scs:"application/scvp-cv-response",sdp:"application/sdp",senmlx:"application/senml+xml",sensmlx:"application/sensml+xml",ser:"application/java-serialized-object",setpay:"application/set-payment-initiation",setreg:"application/set-registration-initiation",sgi:"image/sgi",sgm:"text/sgml",sgml:"text/sgml",shex:"text/shex",shf:"application/shf+xml",shtml:"text/html",sieve:"application/sieve",sig:"application/pgp-signature",sil:"audio/silk",silo:"model/mesh",siv:"application/sieve",slim:"text/slim",slm:"text/slim",sls:"application/route-s-tsid+xml",smi:"application/smil+xml",smil:"application/smil+xml",snd:"audio/basic",so:"application/octet-stream",spdx:"text/spdx",spp:"application/scvp-vp-response",spq:"application/scvp-vp-request",spx:"audio/ogg",sql:"application/sql",sru:"application/sru+xml",srx:"application/sparql-results+xml",ssdl:"application/ssdl+xml",ssml:"application/ssml+xml",stk:"application/hyperstudio",stl:"model/stl",stpx:"model/step+xml",stpxz:"model/step-xml+zip",stpz:"model/step+zip",styl:"text/stylus",stylus:"text/stylus",svg:"image/svg+xml",svgz:"image/svg+xml",swidtag:"application/swid+xml",t:"text/troff",t38:"image/t38",td:"application/urc-targetdesc+xml",tei:"application/tei+xml",teicorpus:"application/tei+xml",text:"text/plain",tfi:"application/thraud+xml",tfx:"image/tiff-fx",tif:"image/tiff",tiff:"image/tiff",toml:"application/toml",tr:"text/troff",trig:"application/trig",ts:"video/mp2t",tsd:"application/timestamped-data",tsv:"text/tab-separated-values",ttc:"font/collection",ttf:"font/ttf",ttl:"text/turtle",ttml:"application/ttml+xml",txt:"text/plain",u3d:"model/u3d",u8dsn:"message/global-delivery-status",u8hdr:"message/global-headers",u8mdn:"message/global-disposition-notification",u8msg:"message/global",ubj:"application/ubjson",uri:"text/uri-list",uris:"text/uri-list",urls:"text/uri-list",vcard:"text/vcard",vrml:"model/vrml",vtt:"text/vtt",vxml:"application/voicexml+xml",war:"application/java-archive",wasm:"application/wasm",wav:"audio/wav",weba:"audio/webm",webm:"video/webm",webmanifest:"application/manifest+json",webp:"image/webp",wgsl:"text/wgsl",wgt:"application/widget",wif:"application/watcherinfo+xml",wmf:"image/wmf",woff:"font/woff",woff2:"font/woff2",wrl:"model/vrml",wsdl:"application/wsdl+xml",wspolicy:"application/wspolicy+xml",x3d:"model/x3d+xml",x3db:"model/x3d+fastinfoset",x3dbz:"model/x3d+binary",x3dv:"model/x3d-vrml",x3dvz:"model/x3d+vrml",x3dz:"model/x3d+xml",xaml:"application/xaml+xml",xav:"application/xcap-att+xml",xca:"application/xcap-caps+xml",xcs:"application/calendar+xml",xdf:"application/xcap-diff+xml",xdssc:"application/dssc+xml",xel:"application/xcap-el+xml",xenc:"application/xenc+xml",xer:"application/patch-ops-error+xml",xfdf:"application/xfdf",xht:"application/xhtml+xml",xhtml:"application/xhtml+xml",xhvml:"application/xv+xml",xlf:"application/xliff+xml",xm:"audio/xm",xml:"text/xml",xns:"application/xcap-ns+xml",xop:"application/xop+xml",xpl:"application/xproc+xml",xsd:"application/xml",xsf:"application/prs.xsf+xml",xsl:"application/xml",xslt:"application/xml",xspf:"application/xspf+xml",xvm:"application/xv+xml",xvml:"application/xv+xml",yaml:"text/yaml",yang:"application/yang",yin:"application/yin+xml",yml:"text/yaml",zip:"application/zip"};function su(e){let t=(""+e).trim().toLowerCase(),n=t.lastIndexOf(".");return Br[~n?t.substring(++n):t]}var PO=()=>{};function NO(e,t){for(let n=0;n<t.length;n++)if(t[n].test(e))return!0}function Ly(e,t){let n=0,r,s=e.length-1;e.charCodeAt(s)===47&&(e=e.substring(0,s));let i=[],a=`${e}/index`;for(;n<t.length;n++)r=t[n]?`.${t[n]}`:"",e&&i.push(e+r),i.push(a+r);return i}function LO(e,t,n){let r=0,s,i=Ly(t,n);for(;r<i.length;r++)if(s=e[i[r]])return s}function FO(e,t,n,r,s){let i=0,a=Ly(n,r),o,l,c,u;for(;i<a.length;i++)if(o=OS(zt(e,c=a[i])),o.startsWith(e)&&er.existsSync(o)){if(l=er.statSync(o),l.isDirectory()||s&&!s(o))continue;return u=Fy(c,l,t),u["Cache-Control"]=t?"no-cache":"no-store",{abs:o,stats:l,headers:u}}}function jO(e,t){return t.statusCode=404,t.end()}function QO(e,t,n,r,s){let i=200,a,o={};s={...s};for(let l in s)a=t.getHeader(l),a&&(s[l]=a);if((a=t.getHeader("content-type"))&&(s["Content-Type"]=a),e.headers.range){i=206;let[l,c]=e.headers.range.replace("bytes=","").split("-"),u=o.end=parseInt(c,10)||r.size-1,f=o.start=parseInt(l,10)||0;if(u>=r.size&&(u=r.size-1),f>=r.size)return t.setHeader("Content-Range",`bytes */${r.size}`),t.statusCode=416,t.end();s["Content-Range"]=`bytes ${f}-${u}/${r.size}`,s["Content-Length"]=u-f+1,s["Accept-Ranges"]="bytes"}t.writeHead(i,s),er.createReadStream(n,o).pipe(t)}var UO={".br":"br",".gz":"gzip"};function Fy(e,t,n){let r=UO[e.slice(-3)],s=su(e.slice(0,r&&-3))||"";s==="text/html"&&(s+=";charset=utf-8");let i={"Content-Length":t.size,"Content-Type":s,"Last-Modified":t.mtime.toUTCString()};return r&&(i["Content-Encoding"]=r),n&&(i.ETag=`W/"${t.size}-${t.mtime.getTime()}"`),i}function iu(e,t={}){e=cs(e||".");let n=t.onNoMatch||jO,r=t.setHeaders||PO,s=t.extensions||["html","htm"],i=t.gzip&&s.map(h=>`${h}.gz`).concat("gz"),a=t.brotli&&s.map(h=>`${h}.br`).concat("br"),o={},l="/",c=!!t.etag,u=!!t.single;if(typeof t.single=="string"){let h=t.single.lastIndexOf(".");l+=~h?t.single.substring(0,h):t.single}let f=[];t.ignores!==!1&&(f.push(/[/]([A-Za-z\s\d~$._-]+\.\w+){1,}$/),t.dotfiles?f.push(/\/\.\w/):f.push(/\/\.well-known/),[].concat(t.ignores||[]).forEach(h=>{f.push(new RegExp(h,"i"))}));let d=t.maxAge!=null&&`public,max-age=${t.maxAge}`;d&&t.immutable?d+=",immutable":d&&t.maxAge===0&&(d+=",must-revalidate"),t.dev||Ny(e,(h,y,m)=>{if(!/\.well-known[\\+\/]/.test(h)){if(!t.dotfiles&&/(^\.|[\\+|\/+]\.)/.test(h))return}let w=Fy(h,m,c);d&&(w["Cache-Control"]=d),o["/"+h.normalize().replace(/\\+/g,"/")]={abs:y,stats:m,headers:w}});let p=t.dev?FO.bind(0,e.endsWith(jd)?e:e+jd,c):LO.bind(0,o);return function(h,y,m){let w=[""],A=DO(h).pathname,g=h.headers["accept-encoding"]||"";if(i&&g.includes("gzip")&&w.unshift(...i),a&&/(br|brotli)/i.test(g)&&w.unshift(...a),w.push(...s),A.indexOf("%")!==-1)try{A=decodeURI(A)}catch{}let E=p(A,w,t.shouldServe)||u&&!NO(A,f)&&p(l,w,t.shouldServe);if(!E)return m?m():n(h,y);if(c&&h.headers["if-none-match"]===E.headers.ETag)return y.writeHead(304),y.end();(i||a)&&y.setHeader("Vary","Accept-Encoding"),r(y,A,E.stats),QO(h,y,E.abs,E.stats,E.headers)}}var jy=nt(ry(),1),HO=/\.(?:[tj]sx?|[cm][tj]s)$/,ou="ERR_DENIED_FILE",au=({config:e,getHeaders:t,disableFsServeCheck:n})=>({dev:!0,etag:!0,extensions:[],setHeaders(r,s){HO.test(s)&&r.setHeader("Content-Type","text/javascript");let i=t();if(i)for(let a in i)r.setHeader(a,i[a])},shouldServe:n?void 0:r=>{let s=Kn(e,r);if(s==="denied"){let i=new Error("denied access");throw i.code=ou,i.path=r,i}return s!=="fallback"}});function WO(e,t){let n=e.config.publicDir,r=iu(n,au({config:e.config,getHeaders:()=>e.config.server.headers,disableFsServeCheck:!0})),s=i=>{let a=he(i);if(a.includes("%"))try{a=decodeURI(a)}catch{}return re(a)};return function(a,o,l){if(t&&!t.has(s(a.url))||Yl(a.url)||Sg(a.url)||It.test(a.url))return l();r(a,o,l)}}function GO(e){let t=e.config.root,n=iu(t,au({config:e.config,getHeaders:()=>e.config.server.headers}));return function(s,i,a){let o=he(s.url);if(o.endsWith("/")||L.extname(o)===".html"||Sg(s.url)||s.url?.startsWith("//"))return a();let l=new URL(s.url,"http://example.com"),c=Ni(l.pathname);if(c===void 0)return a();let u;for(let{find:p,replacement:h}of e.config.resolve.alias)if(typeof p=="string"?c.startsWith(p):p.test(c)){u=c.replace(p,h);break}u&&u.startsWith(Me(t))&&(u=u.slice(t.length));let f=u||c,d=L.resolve(t,wo(f));f.endsWith("/")&&d[d.length-1]!=="/"&&(d=Me(d)),u&&(l.pathname=encodeURI(u),s.url=l.href.slice(l.origin.length));try{n(s,i,a)}catch(p){if(p&&"code"in p&&p.code===ou){Co(p.path,e,i);return}throw p}}}function zO(e){let t=iu("/",au({config:e.config,getHeaders:()=>e.config.server.headers}));return function(r,s,i){if(r.url.startsWith(Fe)){let a=new URL(r.url,"http://example.com"),o=Ni(a.pathname);if(o===void 0)return i();let l=o.slice(Fe.length);$t&&(l=l.replace(/^[A-Z]:/i,"")),a.pathname=encodeURI(l),r.url=a.href.slice(a.origin.length);try{t(r,s,i)}catch(c){if(c&&"code"in c&&c.code===ou){Co(c.path,e,s);return}throw c}}else i()}}function JO(e,t){return R0(e,t)||En(e,t)}var KO=/^[A-Z]:/i,VO=/^[^~.]{1,6}~\d+(?:\.[^~.]{0,3})?$/;function qO(e){return e.includes("~")&&e.split("/").some(t=>VO.test(t))}function Qy(e,t){let{fs:n}=e.server;if(!n.strict)return!0;if($t&&qO(t)||($t&&KO.test(t)?t.slice(2):t).includes(":"))return!1;let r=t.endsWith("/")?t.slice(0,-1):t;return e.fsDenyGlob(r)?!1:!!(e.safeModulePaths.has(t)||n.allow.some(s=>JO(s,t)))}function Kn(e,t){return Qy(e,De(t))?"allowed":Gc(t)?"denied":"fallback"}function Co(e,t,n){let r=`The request id "${e}" is outside of Vite serving allow list.`,s=`
|
|
221
|
-
${t.config.server.fs.allow.map(i=>`- ${i}`).join(`
|
|
222
|
-
`)}
|
|
223
|
-
|
|
224
|
-
Refer to docs https://vite.dev/config/server-options.html#server-fs-allow for configurations and more details.`;t.config.logger.error(r),t.config.logger.warnOnce(s+`
|
|
225
|
-
`),n.statusCode=403,n.write(YO(r+`
|
|
226
|
-
`+s)),n.end()}function YO(e){return String.raw`
|
|
227
|
-
<body>
|
|
228
|
-
<h1>403 Restricted</h1>
|
|
229
|
-
<p>${(0,jy.default)(e).replace(/\n/g,"<br/>")}</p>
|
|
230
|
-
<style>
|
|
231
|
-
body {
|
|
232
|
-
padding: 1em 2em;
|
|
233
|
-
}
|
|
234
|
-
</style>
|
|
235
|
-
</body>
|
|
236
|
-
`}var XO="ERR_LOAD_URL",ZO="ERR_LOAD_PUBLIC_URL",eB="ERR_DENIED_ID",ei=Re("vite:load"),ti=Re("vite:transform"),pl=Re("vite:cache");function uc(e,t,n){e._closing&&e.config.dev.recoverable&&on();let r=Wt();t=yt(t);let s=e._pendingRequests.get(t);if(s)return e.moduleGraph.getModuleByUrl(t).then(l=>!l||s.timestamp>l.lastInvalidationTimestamp?s.request:(s.abort(),uc(e,t,n)));let i=tB(e,t,n,r),a=!1,o=()=>{a||(e._pendingRequests.delete(t),a=!0)};return e._pendingRequests.set(t,{request:i,timestamp:r,abort:o}),i.finally(o)}async function tB(e,t,n,r){let{pluginContainer:s}=e,i=await e.moduleGraph.getModuleByUrl(t);if(i){let u=await Zp(e,t,i,r);if(u)return u}let a=i?void 0:await s.resolveId(t,void 0)??void 0,o=i?.id??a?.id??t;if(i??=e.moduleGraph.getModuleById(o),i){await e.moduleGraph._ensureEntryFromUrl(t,void 0,a);let u=await Zp(e,t,i,r);if(u)return u}let l=nB(e,o,t,n,r,i,a),{depsOptimizer:c}=e;return c?.isOptimizedDepFile(o)||e._registerRequestProcessing(o,()=>l),l}async function Zp(e,t,n,r){let s=pl?ut(t,e.config.root):"",i=await rB(e,n,r);if(i)return pl?.(`[memory-hmr] ${s}`),i;let a=n.transformResult;if(a)return pl?.(`[memory] ${s}`),a}async function nB(e,t,n,r,s,i,a){let{config:o,pluginContainer:l,logger:c}=e,u=ei||ti?ut(n,o.root):"",f=e.moduleGraph;if(!r.skipFsCheck&&t[0]!=="\0"&&q$(o,t)){let b=new Error(`Denied ID ${t}`);throw b.code=eB,b.id=t,b}let d=null,p=null,h,y=ei?Je.now():0,m=await l.load(t);if(m==null){let b=he(t);if(r.skipFsCheck||Qy(e.getTopLevelConfig(),De(b))){try{d=await Ee.readFile(b,"utf-8"),ei?.(`${Rt(y)} [fs] ${u}`)}catch(_){if(_.code!=="ENOENT"&&_.code!=="EISDIR")throw _}d!=null&&e.pluginContainer.watcher&&zn(e.pluginContainer.watcher,b,o.root)}if(d)try{let _=Py(d,b,c);_&&(d=_.code,p=_.map)}catch(_){c.warn(`Failed to load source map for ${b}.
|
|
237
|
-
${_}`,{timestamp:!0})}}else ei?.(`${Rt(y)} [plugin] ${u}`),ke(m)?(d=m.code,p=m.map,h=m.moduleType):d=m;if(d==null){let b=et(n,e.getTopLevelConfig()),_=L.relative(o.root,o.publicDir);_[0]!=="."&&(_="/"+_);let C=b?`This file is in ${_} and will be copied as-is during build without going through the plugin transforms, and therefore should not be imported from source code. It can only be referenced via HTML tags.`:"Does the file exist?",x=f.idToModuleMap.get(t)?.importers.values().next().value,T=x?.file||x?.url,k=new Error(`Failed to load url ${n} (resolved id: ${t})${T?` in ${T}`:""}. ${C}`);throw k.code=b?ZO:XO,k}if(h===void 0){let b=iB(t);b&&b!=="js"&&(h=b)}e._closing&&e.config.dev.recoverable&&on(),i??=await f._ensureEntryFromUrl(n,void 0,a);let w=ti?Je.now():0,A=await l.transform(d,t,{inMap:p,moduleType:h}),g=d;A.code===g?ti?.(Rt(w)+j.default.dim(` [skipped] ${u}`)):(ti?.(`${Rt(w)} ${u}`),d=A.code,p=A.map);let E;if(typeof p=="string"?E=JSON.parse(p):p?E=p:E=null,E&&"version"in E&&i.file){E.mappings&&await ru(E,i.file,c);let b=`${i.file}.map`;if(Dy(E,b,o.server.sourcemapIgnoreList,c),L.isAbsolute(i.file)){let _;for(let C=0;C<E.sources.length;++C){let x=E.sources[C];x&&L.isAbsolute(x)&&(_??=L.dirname(i.file),E.sources[C]=L.relative(_,x))}}}e._closing&&e.config.dev.recoverable&&on();let v=e.getTopLevelConfig(),S=e.config.dev.moduleRunnerTransform?await gy(d,E,n,g,{json:{stringify:v.json.stringify===!0&&v.json.namedExports!==!0}}):{code:d,map:E,etag:(0,rs.default)(d,{weak:!0})};return s>i.lastInvalidationTimestamp&&f.updateModuleTransformResult(i,S),S}async function rB(e,t,n){let r=t.invalidationState;if(t.invalidationState=void 0,!r||r==="HARD_INVALIDATED")return;if(t.transformResult)throw new Error(`Internal server error: Soft-invalidated module "${t.url}" should not have existing transform result`);let s;if(r.ssr)s=r;else{await vn;let i=r.code,a=new Ie(i),[o]=wt(i,t.id||void 0);for(let c of o){let u=i.slice(c.s,c.e);if(u==="import.meta")continue;let f=u[0]==='"'||u[0]==="'";f&&(u=u.slice(1,-1));let d=yt(u),p=Qt(un(ln(d),e.config.base));for(let h of t.importedModules)if(h.url===p){if(h.lastHMRTimestamp>0){let y=Le(d,`t=${h.lastHMRTimestamp}`),m=f?c.s+1:c.s,w=f?c.e-1:c.e;a.overwrite(m,w,y)}c.d===-1&&e.config.dev.preTransformRequests&&e.warmupRequest(p);break}}let l=a.toString();s={...r,code:l,etag:(0,rs.default)(l,{weak:!0})}}return n>t.lastInvalidationTimestamp&&e.moduleGraph.updateModuleTransformResult(t,s),s}var sB={js:"js",mjs:"js",cjs:"js",jsx:"jsx",ts:"ts",mts:"ts",cts:"ts",tsx:"tsx",json:"json",txt:"text",css:"css"};function iB(e){let t=-1;for(;(t=e.indexOf(".",t+1))>=0;){let n=e.slice(t+1),r=sB[n];if(r)return r}}var Uy,hi,mi,gi,yi,Ai,$r,fc,Ur,wi,Hy,Ei,Mr,hl=/\/(?![*\/])(?:\[(?:[^\]\\\n\r\u2028\u2029]+|\\.)*\]?|[^\/[\\\n\r\u2028\u2029]+|\\.)*(\/[$_\u200C\u200D\p{ID_Continue}]*|\\)?/uy,vi,_i,tn,Wy,bi,Si,Gy;Mr=/--|\+\+|=>|\.{3}|\??\.(?!\d)|(?:&&|\|\||\?\?|[+\-%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2}|\/(?![\/*]))=?|[?~,:;[\](){}]/y;hi=/(\x23?)(?=[$_\p{ID_Start}\\])(?:[$_\u200C\u200D\p{ID_Continue}]+|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+/uy;_i=/(['"])(?:[^'"\\\n\r]+|(?!\1)['"]|\\(?:\r\n|[^]))*(\1)?/y;Ei=/(?:0[xX][\da-fA-F](?:_?[\da-fA-F])*|0[oO][0-7](?:_?[0-7])*|0[bB][01](?:_?[01])*)n?|0n|[1-9](?:_?\d)*n|(?:(?:0(?!\d)|0\d*[89]\d*|[1-9](?:_?\d)*)(?:\.(?:\d(?:_?\d)*)?)?|\.\d(?:_?\d)*)(?:[eE][+-]?\d(?:_?\d)*)?|0[0-7]+/y;tn=/[`}](?:[^`\\$]+|\\[^]|\$(?!\{))*(`|\$\{)?/y;Si=/[\t\v\f\ufeff\p{Zs}]+/uy;Ur=/\r?\n|[\r\u2028\u2029]/y;wi=/\/\*(?:[^*]+|\*(?!\/))*(\*\/)?/y;vi=/\/\/.*/y;Uy=/^#!.*/;gi=/[<>.:={}]|\/(?![\/*])/y;mi=/[$_\p{ID_Start}][$_\u200C\u200D\p{ID_Continue}-]*/uy;yi=/(['"])(?:[^'"]+|(?!\1)['"])*(\1)?/y;Ai=/[^<>{}]+/y;bi=/^(?:[\/+-]|\.{3}|\?(?:InterpolationIn(?:JSX|Template)|NoLineTerminatorHere|NonExpressionParenEnd|UnaryIncDec))?$|[{}([,;<>=*%&|^!~?:]$/;Wy=/^(?:=>|[;\]){}]|else|\?(?:NoLineTerminatorHere|NonExpressionParenEnd))?$/;$r=/^(?:await|case|default|delete|do|else|instanceof|new|return|throw|typeof|void|yield)$/;fc=/^(?:return|throw|yield)$/;Hy=RegExp(Ur.source);Gy=function*(e,{jsx:t=!1}={}){var n,r,s,i,a,o,l,c,u,f,d,p,h,y;for({length:o}=e,i=0,a="",y=[{tag:"JS"}],n=[],d=0,p=!1,(l=Uy.exec(e))&&(yield{type:"HashbangComment",value:l[0]},i=l[0].length);i<o;){switch(c=y[y.length-1],c.tag){case"JS":case"JSNonExpressionParen":case"InterpolationInTemplate":case"InterpolationInJSX":if(e[i]==="/"&&(bi.test(a)||$r.test(a))&&(hl.lastIndex=i,l=hl.exec(e))){i=hl.lastIndex,a=l[0],p=!0,yield{type:"RegularExpressionLiteral",value:l[0],closed:l[1]!==void 0&&l[1]!=="\\"};continue}if(Mr.lastIndex=i,l=Mr.exec(e)){switch(h=l[0],u=Mr.lastIndex,f=h,h){case"(":a==="?NonExpressionParenKeyword"&&y.push({tag:"JSNonExpressionParen",nesting:d}),d++,p=!1;break;case")":d--,p=!0,c.tag==="JSNonExpressionParen"&&d===c.nesting&&(y.pop(),f="?NonExpressionParenEnd",p=!1);break;case"{":Mr.lastIndex=0,s=!Wy.test(a)&&(bi.test(a)||$r.test(a)),n.push(s),p=!1;break;case"}":switch(c.tag){case"InterpolationInTemplate":if(n.length===c.nesting){tn.lastIndex=i,l=tn.exec(e),i=tn.lastIndex,a=l[0],l[1]==="${"?(a="?InterpolationInTemplate",p=!1,yield{type:"TemplateMiddle",value:l[0]}):(y.pop(),p=!0,yield{type:"TemplateTail",value:l[0],closed:l[1]==="`"});continue}break;case"InterpolationInJSX":if(n.length===c.nesting){y.pop(),i+=1,a="}",yield{type:"JSXPunctuator",value:"}"};continue}}p=n.pop(),f=p?"?ExpressionBraceEnd":"}";break;case"]":p=!0;break;case"++":case"--":f=p?"?PostfixIncDec":"?UnaryIncDec";break;case"<":if(t&&(bi.test(a)||$r.test(a))){y.push({tag:"JSXTag"}),i+=1,a="<",yield{type:"JSXPunctuator",value:h};continue}p=!1;break;default:p=!1}i=u,a=f,yield{type:"Punctuator",value:h};continue}if(hi.lastIndex=i,l=hi.exec(e)){switch(i=hi.lastIndex,f=l[0],l[0]){case"for":case"if":case"while":case"with":a!=="."&&a!=="?."&&(f="?NonExpressionParenKeyword")}a=f,p=!$r.test(l[0]),yield{type:l[1]==="#"?"PrivateIdentifier":"IdentifierName",value:l[0]};continue}if(_i.lastIndex=i,l=_i.exec(e)){i=_i.lastIndex,a=l[0],p=!0,yield{type:"StringLiteral",value:l[0],closed:l[2]!==void 0};continue}if(Ei.lastIndex=i,l=Ei.exec(e)){i=Ei.lastIndex,a=l[0],p=!0,yield{type:"NumericLiteral",value:l[0]};continue}if(tn.lastIndex=i,l=tn.exec(e)){i=tn.lastIndex,a=l[0],l[1]==="${"?(a="?InterpolationInTemplate",y.push({tag:"InterpolationInTemplate",nesting:n.length}),p=!1,yield{type:"TemplateHead",value:l[0]}):(p=!0,yield{type:"NoSubstitutionTemplate",value:l[0],closed:l[1]==="`"});continue}break;case"JSXTag":case"JSXTagEnd":if(gi.lastIndex=i,l=gi.exec(e)){switch(i=gi.lastIndex,f=l[0],l[0]){case"<":y.push({tag:"JSXTag"});break;case">":y.pop(),a==="/"||c.tag==="JSXTagEnd"?(f="?JSX",p=!0):y.push({tag:"JSXChildren"});break;case"{":y.push({tag:"InterpolationInJSX",nesting:n.length}),f="?InterpolationInJSX",p=!1;break;case"/":a==="<"&&(y.pop(),y[y.length-1].tag==="JSXChildren"&&y.pop(),y.push({tag:"JSXTagEnd"}))}a=f,yield{type:"JSXPunctuator",value:l[0]};continue}if(mi.lastIndex=i,l=mi.exec(e)){i=mi.lastIndex,a=l[0],yield{type:"JSXIdentifier",value:l[0]};continue}if(yi.lastIndex=i,l=yi.exec(e)){i=yi.lastIndex,a=l[0],yield{type:"JSXString",value:l[0],closed:l[2]!==void 0};continue}break;case"JSXChildren":if(Ai.lastIndex=i,l=Ai.exec(e)){i=Ai.lastIndex,a=l[0],yield{type:"JSXText",value:l[0]};continue}switch(e[i]){case"<":y.push({tag:"JSXTag"}),i++,a="<",yield{type:"JSXPunctuator",value:"<"};continue;case"{":y.push({tag:"InterpolationInJSX",nesting:n.length}),i++,a="?InterpolationInJSX",p=!1,yield{type:"JSXPunctuator",value:"{"};continue}}if(Si.lastIndex=i,l=Si.exec(e)){i=Si.lastIndex,yield{type:"WhiteSpace",value:l[0]};continue}if(Ur.lastIndex=i,l=Ur.exec(e)){i=Ur.lastIndex,p=!1,fc.test(a)&&(a="?NoLineTerminatorHere"),yield{type:"LineTerminatorSequence",value:l[0]};continue}if(wi.lastIndex=i,l=wi.exec(e)){i=wi.lastIndex,Hy.test(l[0])&&(p=!1,fc.test(a)&&(a="?NoLineTerminatorHere")),yield{type:"MultiLineComment",value:l[0],closed:l[1]!==void 0};continue}if(vi.lastIndex=i,l=vi.exec(e)){i=vi.lastIndex,p=!1,yield{type:"SingleLineComment",value:l[0]};continue}r=String.fromCodePoint(e.codePointAt(i)),i+=r.length,a=r,p=!1,yield{type:c.tag.startsWith("JSX")?"JSXInvalid":"Invalid",value:r}}};var oB=Gy,eh=" ";function aB(e,t,n){if(e.type==="SingleLineComment")return eh.repeat(e.value.length);if(e.type==="MultiLineComment")return e.value.replace(/[^\n]/g,eh);if(e.type==="StringLiteral"){if(!e.closed)return e.value;let r=e.value.slice(1,-1);if(n(r))return e.value[0]+t.repeat(r.length)+e.value[e.value.length-1]}if(e.type==="NoSubstitutionTemplate"){let r=e.value.slice(1,-1);if(n(r))return`\`${r.replace(/[^\n]/g,t)}\``}if(e.type==="RegularExpressionLiteral"){let r=e.value;if(n(r))return r.replace(/\/(.*)\/(\w?)$/g,(s,i,a)=>`/${t.repeat(i.length)}/${a}`)}if(e.type==="TemplateHead"){let r=e.value.slice(1,-2);if(n(r))return`\`${r.replace(/[^\n]/g,t)}\${`}if(e.type==="TemplateTail"){let r=e.value.slice(0,-2);if(n(r))return`}${r.replace(/[^\n]/g,t)}\``}if(e.type==="TemplateMiddle"){let r=e.value.slice(1,-2);if(n(r))return`}${r.replace(/[^\n]/g,t)}\${`}return e.value}function lB(e){return{fillChar:e?.fillChar??" ",filter:e?.filter??(()=>!0)}}function vs(e,t){let n="",r=lB(t);for(let s of oB(e,{jsx:!1}))n+=aB(s,r.fillChar,r.filter);return n}function _s(e){let t=new WeakMap;return function(n){let{environment:r}=n;return t.has(r)||t.set(r,e(r)),t.get(r)}}var cB=["msapplication-tileimage","msapplication-square70x70logo","msapplication-square150x150logo","msapplication-wide310x150logo","msapplication-square310x310logo","msapplication-config","twitter:image"],uB=["og:image","og:image:url","og:image:secure_url","og:audio","og:audio:secure_url","og:video","og:video:secure_url"],fB={audio:{srcAttributes:["src"]},embed:{srcAttributes:["src"]},img:{srcAttributes:["src"],srcsetAttributes:["srcset"]},image:{srcAttributes:["href","xlink:href"]},input:{srcAttributes:["src"]},link:{srcAttributes:["href"],srcsetAttributes:["imagesrcset"]},object:{srcAttributes:["data"]},source:{srcAttributes:["src"],srcsetAttributes:["srcset"]},track:{srcAttributes:["src"]},use:{srcAttributes:["href","xlink:href"]},video:{srcAttributes:["src","poster"]},meta:{srcAttributes:["content"],filter({attributes:e}){return!!(e.name&&cB.includes(e.name.trim().toLowerCase())||e.property&&uB.includes(e.property.trim().toLowerCase()))}}};function zy(e,t){let n=fB[e.nodeName],r=t?.[e.nodeName];if(!n&&!r)return[];let s={};for(let o of e.attrs)s[dB(o)]=o.value;if("vite-ignore"in s)return[{type:"remove",key:"vite-ignore",value:"",attributes:s,location:e.sourceCodeLocation.attrs["vite-ignore"]}];let i=[];function a(o,l,c){let u=s[o];u&&(c&&!c({key:o,value:u,attributes:s})||i.push({type:l,key:o,value:u,attributes:s,location:e.sourceCodeLocation.attrs[o]}))}return n&&(n.srcAttributes?.forEach(o=>a(o,"src",n.filter)),n.srcsetAttributes?.forEach(o=>a(o,"srcset",n.filter))),r&&(r.srcAttributes?.forEach(o=>a(o,"src",r.filter)),r.srcsetAttributes?.forEach(o=>a(o,"srcset",r.filter))),i}function dB(e){return e.prefix===void 0?e.name:`${e.prefix}:${e.name}`}var Vn=/__VITE_ASSET__([\w$]+)__(?:\$_(.*?)__)?/g,pB=/\.[cm]?js\.map$/,dc=/[?&]no-inline\b/,lu=/[?&]inline\b/,pc=new WeakMap,Qi=new WeakMap;function hB(){Br.ico="image/x-icon",Br.cur="image/x-icon",Br.flac="audio/flac",Br.eot="application/vnd.ms-fontobject"}function Jy(e,t,n,r){let{environment:s}=e,i=No(n.format,s.config.isWorker),a,o;for(Vn.lastIndex=0;a=Vn.exec(r);){o||=new Ie(r);let[c,u,f=""]=a,d=e.getFileName(u);t.viteMetadata.importedAssets.add(he(d));let p=Xn(s,d+f,"asset",t.fileName,"js",i),h=typeof p=="string"?JSON.stringify(Tt(p)).slice(1,-1):`"+${p.runtime}+"`;o.update(a.index,a.index+c.length,h)}let l=ss.get(s.getTopLevelConfig());for(Ui.lastIndex=0;a=Ui.exec(r);){o||=new Ie(r);let[c,u]=a,f=Xn(s,l.get(u).slice(1),"public",t.fileName,"js",i),d=typeof f=="string"?JSON.stringify(Tt(f)).slice(1,-1):`"+${f.runtime}+"`;o.update(a.index,a.index+c.length,d)}return o}function mB(e){return hB(),{name:"vite:asset",perEnvironmentStartEndDuringDev:!0,buildStart(){pc.set(this.environment,new Map),Qi.set(this.environment,new Map)},resolveId:{filter:{id:[It,Jl,...Ia(e.rawAssetsInclude).map(t=>typeof t=="string"?Pt.default.makeRe(t,{dot:!0}):t)]},handler(t){if(!(!e.assetsInclude(he(t))&&!It.test(t))&&et(t,e))return t}},load:{filter:{id:{include:[Xl,It,Jl,...Ia(e.rawAssetsInclude)],exclude:/^\0/}},async handler(t){if(Xl.test(t)){let r=et(t,e)||he(t);return this.addWatchFile(r),{code:`export default ${JSON.stringify(await Ee.readFile(r,"utf-8"))}`,map:{mappings:""},moduleType:"js"}}if(!It.test(t)&&!e.assetsInclude(he(t)))return;t=Cg(t);let n=await yn(this,t);if(!n.startsWith("data:")&&this.environment.mode==="dev"){let r=this.environment.moduleGraph.getModuleById(t);r&&r.lastHMRTimestamp>0&&(n=Le(n,`t=${r.lastHMRTimestamp}`))}return{code:`export default ${JSON.stringify(Tt(n))}`,moduleSideEffects:e.command==="build"&&this.getModuleInfo(t)?.isEntry?"no-treeshake":!1,meta:e.command==="build"?{"vite:asset":!0}:void 0,moduleType:"js"}}},...e.command==="build"?{renderChunk(t,n,r){let s=Jy(this,n,r,t);return s?{code:s.toString(),map:this.environment.config.build.sourcemap?s.generateMap({hires:"boundary"}):null}:null}}:{},generateBundle(t,n){let r;for(let s in n){let i=n[s];if(i.type==="chunk"&&i.isEntry&&i.moduleIds.length===1&&e.assetsInclude(i.moduleIds[0])&&this.getModuleInfo(i.moduleIds[0])?.meta["vite:asset"]){if(!r){r=new Set;for(let a in n){let o=n[a];if(o.type==="chunk"){for(let l of o.imports)r.add(l);for(let l of o.dynamicImports)r.add(l)}}}r.has(s)||delete n[s]}}if(e.command==="build"&&!this.environment.config.build.emitAssets){let s=this.environment.config.build.chunkImportMap;for(let i in n)n[i].type==="asset"&&!i.endsWith("ssr-manifest.json")&&!pB.test(i)&&!(s&&i===To(this.environment.config))&&delete n[i]}},watchChange(t){pc.get(this.environment)?.delete(re(t))}}}async function yn(e,t,n=!1){let{environment:r}=e;return r.config.isBundled?Vy(e,t):gB(r,t,n)}async function gB(e,t,n=!1){let r=e.getTopLevelConfig(),s=et(t,r);if(lu.test(t)){let o=s||he(t);return hc(e,o,await Ee.readFile(o))}let i=he(t);if(i.endsWith(".svg")){let o=s||i,l=await Ee.readFile(o);if(qy(e,o,t,l,void 0,void 0))return hc(e,o,l)}if(n)return tt(i).href;let a;return s?a=t:t.startsWith(Me(r.root))?a="/"+L.posix.relative(r.root,t):a=L.posix.join(Fe,t),ze(ze(r.server.origin??"",r.decodedBase),wo(a))}function yB(e,t){return ss.get(t)?.get(e)}var ss=new WeakMap,Ui=/__VITE_PUBLIC_ASSET__([a-z\d]{8})__/g;function cu(e,t){if(t.command!=="build")return ze(t.decodedBase,e);let n=We(e),r=ss.get(t);return r||(r=new Map,ss.set(t,r)),r.get(n)||r.set(n,e),`__VITE_PUBLIC_ASSET__${n}__`}var ml=Dc.from("version https://git-lfs.github.com");function Ky(e){return e.length<ml.length?!1:ml.compare(e,0,ml.length)===0}async function Vy(e,t,n=!1,r){let s=e.environment,i=s.getTopLevelConfig();if(!n){let d=et(t,i);if(d)if(lu.test(t))t=d;else return cu(t,i)}let a=pc.get(s),o=a.get(t);if(o)return o;let{file:l,postfix:c}=dn(t),u=await Ee.readFile(l),f;if(qy(s,l,t,u,e,r))f=hc(s,l,u);else{let d=re(L.relative(s.config.root,l)),p=e.emitFile({type:"asset",name:L.basename(l),originalFileName:d,source:u});s.config.command==="build"&&dc.test(c)&&(c=c.replace(dc,"").replace(/^&/,"?")),s.config.command==="serve"&&s.config.isBundled?f=uu(s,e.getFileName(p)):f=`__VITE_ASSET__${p}__${c?`$_${c}__`:""}`}return a.set(t,f),f}function uu(e,t){let n=Xn(e,t,"asset","assets/dummy.js","js",()=>{throw new Error("unreachable")});if(typeof n=="object")throw new Error("unreachable");return n}async function th(e,t,n,r){let s=e.environment.getTopLevelConfig();return et(t,s)?cu(t,s):Vy(e,re(t[0]==="/"?L.join(s.root,t):L.join(L.dirname(n),t)),!0,r)}function qy(e,t,n,r,s,i){if(dc.test(n))return!1;if(lu.test(n))return!0;if(s){if(e.config.build.lib)return!0;if(s.getModuleInfo(n)?.isEntry)return!1}if(i!==void 0)return i;if(t.endsWith(".html")||t.endsWith(".svg")&&n.includes("#"))return!1;let a,{assetsInlineLimit:o}=e.config.build;if(typeof o=="function"){let l=o(t,r);if(l!=null)return l;a=zm}else a=Number(o);return r.length<a&&!Ky(r)}function hc(e,t,n){return e.config.build.lib&&Ky(n)&&e.logger.warn(j.default.yellow(`Inlined file ${t} was not downloaded via Git LFS`)),t.endsWith(".svg")?wB(n):`data:${su(t)??"application/octet-stream"};base64,${n.toString("base64")}`}var AB=/"[^"']*'[^"]*"|'[^'"]*"[^']*'/;function wB(e){let t=e.toString();return t.includes("<text")||t.includes("<foreignObject")||AB.test(t)?`data:image/svg+xml;base64,${e.toString("base64")}`:"data:image/svg+xml,"+t.trim().replaceAll(/>\s+</g,"><").replaceAll('"',"'").replaceAll("%","%25").replaceAll("#","%23").replaceAll("<","%3c").replaceAll(">","%3e").replaceAll(/\s+/g,"%20")}var EB=le(((e,t)=>{let n=ce("path"),r=ce("fs"),s=ce("os"),i=ce("url"),a=r.promises.readFile;function o(g,E){return["package.json",`.${g}rc.json`,`.${g}rc.js`,`.${g}rc.cjs`,...E?[]:[`.${g}rc.mjs`],`.config/${g}rc`,`.config/${g}rc.json`,`.config/${g}rc.js`,`.config/${g}rc.cjs`,...E?[]:[`.config/${g}rc.mjs`],`${g}.config.js`,`${g}.config.cjs`,...E?[]:[`${g}.config.mjs`]]}function l(g){return n.dirname(g)||n.sep}let c=(g,E)=>JSON.parse(E),u=typeof __webpack_require__=="function"?__non_webpack_require__:ce,f=Object.freeze({".js":u,".json":u,".cjs":u,noExt:c});t.exports.defaultLoadersSync=f;let d=async g=>{try{return(await import(i.pathToFileURL(g).href)).default}catch(E){try{return u(g)}catch(v){throw v.code==="ERR_REQUIRE_ESM"||v instanceof SyntaxError&&v.toString().includes("Cannot use import statement outside a module")?E:v}}},p=Object.freeze({".js":d,".mjs":d,".cjs":d,".json":c,noExt:c});t.exports.defaultLoaders=p;function h(g,E,v){let S={stopDir:s.homedir(),searchPlaces:o(g,v),ignoreEmptySearchPlaces:!0,cache:!0,transform:b=>b,packageProp:[g],...E,loaders:{...v?f:p,...E.loaders}};return S.searchPlaces.forEach(b=>{let _=n.extname(b)||"noExt",C=S.loaders[_];if(!C)throw new Error(`Missing loader for extension "${b}"`);if(typeof C!="function")throw new Error(`Loader for extension "${b}" is not a function: Received ${typeof C}.`)}),S}function y(g,E){return typeof g=="string"&&g in E?E[g]:(Array.isArray(g)?g:g.split(".")).reduce((v,S)=>v===void 0?v:v[S],E)||null}function m(g){if(!g)throw new Error("load must pass a non-empty string")}function w(g,E){if(!g)throw new Error(`No loader specified for extension "${E}"`);if(typeof g!="function")throw new Error("loader is not a function")}let A=g=>(E,v,S)=>(g&&E.set(v,S),S);t.exports.lilconfig=function(E,v){let{ignoreEmptySearchPlaces:S,loaders:b,packageProp:_,searchPlaces:C,stopDir:x,transform:T,cache:k}=h(E,v??{},!1),O=new Map,R=new Map,I=A(k);return{async search(M=process.cwd()){let B={config:null,filepath:""},U=new Set,V=M;e:for(;;){if(k){let Q=O.get(V);if(Q!==void 0){for(let Z of U)O.set(Z,Q);return Q}U.add(V)}for(let Q of C){let Z=n.join(V,Q);try{await r.promises.access(Z)}catch{continue}let F=String(await a(Z)),G=n.extname(Q)||"noExt",P=b[G];if(Q==="package.json"){let H=await P(Z,F),$=y(_,H);if($!=null){B.config=$,B.filepath=Z;break e}continue}let z=F.trim()==="";if(!(z&&S)){z?(B.isEmpty=!0,B.config=void 0):(w(P,G),B.config=await P(Z,F)),B.filepath=Z;break e}}if(V===x||V===l(V))break e;V=l(V)}let te=B.filepath===""&&B.config===null?T(null):T(B);if(k)for(let Q of U)O.set(Q,te);return te},async load(M){m(M);let B=n.resolve(process.cwd(),M);if(k&&R.has(B))return R.get(B);let{base:U,ext:V}=n.parse(B),te=V||"noExt",Q=b[te];w(Q,te);let Z=String(await a(B));if(U==="package.json"){let P=await Q(B,Z);return I(R,B,T({config:y(_,P),filepath:B}))}let F={config:null,filepath:B},G=Z.trim()==="";return G&&S?I(R,B,T({config:void 0,filepath:B,isEmpty:!0})):(F.config=G?void 0:await Q(B,Z),I(R,B,T(G?{...F,isEmpty:G,config:void 0}:F)))},clearLoadCache(){k&&R.clear()},clearSearchCache(){k&&O.clear()},clearCaches(){k&&(R.clear(),O.clear())}}},t.exports.lilconfigSync=function(E,v){let{ignoreEmptySearchPlaces:S,loaders:b,packageProp:_,searchPlaces:C,stopDir:x,transform:T,cache:k}=h(E,v??{},!0),O=new Map,R=new Map,I=A(k);return{search(M=process.cwd()){let B={config:null,filepath:""},U=new Set,V=M;e:for(;;){if(k){let Q=O.get(V);if(Q!==void 0){for(let Z of U)O.set(Z,Q);return Q}U.add(V)}for(let Q of C){let Z=n.join(V,Q);try{r.accessSync(Z)}catch{continue}let F=n.extname(Q)||"noExt",G=b[F],P=String(r.readFileSync(Z));if(Q==="package.json"){let H=G(Z,P),$=y(_,H);if($!=null){B.config=$,B.filepath=Z;break e}continue}let z=P.trim()==="";if(!(z&&S)){z?(B.isEmpty=!0,B.config=void 0):(w(G,F),B.config=G(Z,P)),B.filepath=Z;break e}}if(V===x||V===l(V))break e;V=l(V)}let te=B.filepath===""&&B.config===null?T(null):T(B);if(k)for(let Q of U)O.set(Q,te);return te},load(M){m(M);let B=n.resolve(process.cwd(),M);if(k&&R.has(B))return R.get(B);let{base:U,ext:V}=n.parse(B),te=V||"noExt",Q=b[te];w(Q,te);let Z=String(r.readFileSync(B));if(U==="package.json"){let P=Q(B,Z);return T({config:y(_,P),filepath:B})}let F={config:null,filepath:B},G=Z.trim()==="";return G&&S?I(R,B,T({filepath:B,config:void 0,isEmpty:!0})):(F.config=G?void 0:Q(B,Z),I(R,B,T(G?{...F,isEmpty:G,config:void 0}:F)))},clearLoadCache(){k&&R.clear()},clearSearchCache(){k&&O.clear()},clearCaches(){k&&(R.clear(),O.clear())}}}})),fu=le(((e,t)=>{let{createRequire:n}=ce("node:module"),{fileURLToPath:r,pathToFileURL:s}=ce("node:url"),i=/\.[mc]?ts$/,a,o,l=[];async function c(u,f=r(import.meta.url)){let d=n(f).resolve(u);try{return(await import(`${s(d)}?t=${Date.now()}`)).default}catch(p){if(!i.test(d))throw p}if(a===void 0)try{a=await import("./api-BQOKPGRV.js")}catch(p){l.push(p)}if(a){let p=a.require(u,f);return p&&"__esModule"in p?p.default:p}if(o===void 0)try{o=(await import("jiti")).default}catch(p){l.push(p)}if(o)return o(f,{interopDefault:!0})(u);throw new Error(`'tsx' or 'jiti' is required for the TypeScript configuration files. Make sure it is installed
|
|
238
|
-
Error: ${l.map(p=>p.message).join(`
|
|
239
|
-
`)}`)}t.exports=c})),vB=le(((e,t)=>{let n=fu();async function r(s,i){if(s.parser&&typeof s.parser=="string")try{s.parser=await n(s.parser,i)}catch(a){throw new Error(`Loading PostCSS Parser failed: ${a.message}
|
|
240
|
-
|
|
241
|
-
(@${i})`)}if(s.syntax&&typeof s.syntax=="string")try{s.syntax=await n(s.syntax,i)}catch(a){throw new Error(`Loading PostCSS Syntax failed: ${a.message}
|
|
242
|
-
|
|
243
|
-
(@${i})`)}if(s.stringifier&&typeof s.stringifier=="string")try{s.stringifier=await n(s.stringifier,i)}catch(a){throw new Error(`Loading PostCSS Stringifier failed: ${a.message}
|
|
244
|
-
|
|
245
|
-
(@${i})`)}return s}t.exports=r})),_B=le(((e,t)=>{let n=fu();async function r(i,a,o){try{return a==null||Object.keys(a).length===0?await n(i,o):(await n(i,o))(a)}catch(l){throw new Error(`Loading PostCSS Plugin failed: ${l.message}
|
|
246
|
-
|
|
247
|
-
(@${o})`)}}async function s(i,a){let o=[];return Array.isArray(i.plugins)?o=i.plugins.filter(Boolean):(o=Object.entries(i.plugins).filter(([,l])=>l!==!1).map(([l,c])=>r(l,c,a)),o=await Promise.all(o)),o.length&&o.length>0&&o.forEach((l,c)=>{if(l.default&&(l=l.default),l.postcss===!0?l=l():l.postcss&&(l=l.postcss),!(typeof l=="object"&&Array.isArray(l.plugins)||typeof l=="object"&&l.postcssPlugin||typeof l=="function"))throw new TypeError(`Invalid PostCSS Plugin found at: plugins[${c}]
|
|
248
|
-
|
|
249
|
-
(@${a})`)}),o}t.exports=s})),bB=le(((e,t)=>{let{resolve:n}=ce("node:path"),r=EB(),s=vB(),i=_B(),a=fu(),o=y=>y&&y.__esModule?y:{default:y};async function l(y,m){let w=m.filepath||"",A=o(m.config).default||{};typeof A=="function"?A=A(y):A=Object.assign({},A,y),A.plugins||(A.plugins=[]);let g={file:w,options:await s(A,w),plugins:await i(A,w)};return delete A.plugins,g}function c(y){return y=Object.assign({cwd:process.cwd(),env:process.env.NODE_ENV},y),y.env||(process.env.NODE_ENV="development"),y}async function u(y){return a(y)}let f;async function d(y,m){if(!f)try{f=await import("yaml")}catch(w){throw new Error(`'yaml' is required for the YAML configuration files. Make sure it is installed
|
|
250
|
-
Error: ${w.message}`)}return f.parse(m)}let p=(y={})=>{let m="postcss";return{...y,loaders:{...y.loaders,".cjs":u,".cts":u,".js":u,".mjs":u,".mts":u,".ts":u,".yaml":d,".yml":d},searchPlaces:[...y.searchPlaces||[],"package.json",`.${m}rc`,`.${m}rc.json`,`.${m}rc.yaml`,`.${m}rc.yml`,`.${m}rc.ts`,`.${m}rc.cts`,`.${m}rc.mts`,`.${m}rc.js`,`.${m}rc.cjs`,`.${m}rc.mjs`,`${m}.config.ts`,`${m}.config.cts`,`${m}.config.mts`,`${m}.config.js`,`${m}.config.cjs`,`${m}.config.mjs`]}};function h(y,m,w){return y=c(y),m=m?n(m):process.cwd(),r.lilconfig("postcss",p(w)).search(m).then(A=>{if(!A)throw new Error(`No PostCSS Config found in: ${m}`);return l(y,A)})}t.exports=h}));function Ot(e,t){let n=e.createResolver(t),r;return async(s,i,a,o)=>s.name==="client"||s.name==="ssr"?n(i,a,o,s.name==="ssr"):(r??=Yy(e,t),r(s,i,a,o))}function Yy(e,t){let n=t?.scan,r=new Map;async function s(o,l,c){let u=r.get(o);return u||(u=await Cc(o,[sc({entries:o.config.resolve.alias}),...Nw({root:e.root,isProduction:e.isProduction,isBuild:e.command==="build",asSrc:!0,preferRelative:!1,tryIndex:!0,...t,idOnly:!0},o.config,!0)],void 0,!1),r.set(o,u)),await u.resolveId(l,c,{scan:n})}let i=new Map;async function a(o,l,c){let u=i.get(o);return u||(u=await Cc(o,[sc({entries:o.config.resolve.alias})],void 0,!1),i.set(o,u)),await u.resolveId(l,c,{scan:n})}return async(o,l,c,u)=>(await(u?a:s)(o,l,c))?.id}var nh=[j.default.blue,j.default.magenta,j.default.green,j.default.gray],Dr=class{name;getTopLevelConfig(){return this._topLevelConfig}config;logger;_options;_topLevelConfig;constructor(e,t,n=t.environments[e]){if(!/^[\w$]+$/.test(e))throw new Error(`Invalid environment name "${e}". Environment names must only contain alphanumeric characters and "$", "_".`);this.name=e,this._topLevelConfig=t,this._options=n,this.config=new Proxy(n,{get:(a,o)=>o==="logger"?this.logger:o in a?this._options[o]:this._topLevelConfig[o]});let r=j.default.dim(`(${this.name})`),s=[...this.name].reduce((a,o)=>a+o.charCodeAt(0),0)%nh.length,i=nh[s||0];this.logger={get hasWarned(){return t.logger.hasWarned},info(a,o){return t.logger.info(a,{...o,environment:i(r)})},warn(a,o){return t.logger.warn(a,{...o,environment:j.default.yellow(r)})},warnOnce(a,o){return t.logger.warnOnce(a,{...o,environment:j.default.yellow(r)})},error(a,o){return t.logger.error(a,{...o,environment:j.default.red(r)})},clearScreen(a){return t.logger.clearScreen(a)},hasErrorLogged(a){return t.logger.hasErrorLogged(a)}}}},Xy=class extends Dr{get plugins(){return this.config.plugins}_initiated=!1;constructor(e,t,n=t.environments[e]){super(e,t,n)}},SB=["pnpm-workspace.yaml","lerna.json"];function xB(e){let t=zt(e,"package.json");if(!Gc(t))return!1;try{return!!(JSON.parse(pe.readFileSync(t,"utf-8"))||{}).workspaces}catch{return!1}}function CB(e){for(let t of["deno.json","deno.jsonc"]){let n=zt(e,t);if(Gc(n))try{if((JSON.parse(pe.readFileSync(n,"utf-8"))||{}).workspace)return!0}catch{}}return!1}function IB(e){return SB.some(t=>pe.existsSync(zt(e,t)))}function RB(e){let t=zt(e,"package.json");return pe.existsSync(t)}function du(e,t=e){if(RB(e))return e;let n=eo(e);return!n||n===e?t:du(n,t)}function pu(e,t=du(e)){if(IB(e)||xB(e)||CB(e))return e;let n=eo(e);return!n||n===e?t:pu(n,t)}var kB=/\.[cm]?js$/;function TB(){let e=_s(()=>({manifest:{},outputCount:0,reset(){this.manifest={},this.outputCount=0}}));return As("native:manifest",t=>{if(!t.config.build.manifest)return!1;let n=t.config.root,r=t.config.build.manifest===!0?".vite/manifest.json":t.config.build.manifest,s={};function i(a){return Zy(a,n,!1)??`_${L.basename(a.fileName)}`}return[{name:"native:manifest-envs",buildStart(){s[t.name]=this.environment}},Ad({root:n,outPath:r,isOutputOptionsForLegacyChunks:t.config.isOutputOptionsForLegacyChunks,cssEntries(){return Object.fromEntries([...Qi.get(s[t.name]).values()].map(({name:a,referenceId:o})=>[o,a]))}}),{name:"native:manifest-compatible",generateBundle(a,o){let l=o[r];if(l.type==="asset"){let c;for(let p of Object.values(o)){let h=p.viteMetadata?.importedCss,y=p.viteMetadata?.importedAssets;if(!(!h?.size&&!y?.size)){if(c??=JSON.parse(l.source.toString()),p.type==="chunk"){let m=c[i(p)];if(!m)continue;h?.size&&(m.css=[...h]),y?.size&&(m.assets=[...y])}else if(p.type==="asset"&&p.names.length>0){let m=p.originalFileNames.length>0?p.originalFileNames:[`_${L.basename(p.fileName)}`];for(let w of m){let A=c[w];A&&(A.file&&kB.test(A.file)||(h?.size&&(A.css=[...h]),y?.size&&(A.assets=[...y])))}}}}let u=this.environment.config.build.rolldownOptions.output,f=Array.isArray(u)?u.length:1;if(c&&f===1){l.source=JSON.stringify(c,void 0,2);return}let d=e(this);d.outputCount++,d.manifest=Object.assign(d.manifest,c??JSON.parse(l.source.toString())),d.outputCount>=f?(l.source=JSON.stringify(d.manifest,void 0,2),d.reset()):delete o[r]}}}]})}function Zy(e,t,n){if(e.facadeModuleId){let r=re(L.relative(t,e.facadeModuleId));if(n&&!e.name.includes("-legacy")){let s=L.extname(r),i=s.length!==0?-s.length:void 0;r=`${r.slice(0,i)}-legacy${s}`}return r.replace(/\0/g,"")}}var OB=nt(bB(),1),eA=new TextDecoder,tA=Object.freeze({transformer:"postcss",preprocessorMaxWorkers:!0,devSourcemap:!1}),BB=tA;function $B(e){let t=vt(tA,e??{});return t.transformer==="lightningcss"&&(t.lightningcss??={},t.lightningcss.targets??=EA(Fc)),t}var Io=new RegExp(`\\.module${dt.source}`),nA=/[?&]direct\b/,rA=/[?&]html-proxy\b/,MB=/&index=(\d+)/,hu=/[?&]commonjs-proxy/,sA=/[?&]inline\b/,DB=/[?&]inline-css\b/,iA=/[?&]style-attr\b/,PB=/^[A-Z_][.\w-]*\(/i,NB=/[?&]transform-only\b/,LB=/(?<!\\)"/g,xi="style.css",oA=e=>Io.test(e),Ro=e=>dt.test(e)&&nA.test(e),FB=e=>nA.test(e),mu=new WeakMap,Hi=new WeakMap,mc=new WeakMap,gl=new WeakMap;function aA(e){return e.command==="build"}var rh=/__VITE_CSS_URL__([\da-f]+)__/g;function jB(e){let t=e.command==="build",n,r=Ot(e,{preferRelative:!0,tryIndex:!1,extensions:[]}),s;return e.css.transformer!=="lightningcss"&&fA(e).catch(()=>{}),{name:"vite:css",buildStart(){n=new Map,mu.set(e,n),Hi.set(e,new Map),s=y$(A$(e.css.preprocessorMaxWorkers)),e$.set(e,s)},async buildEnd(){await s?.close()},load:{filter:{id:dt},handler(i){if(It.test(i)){if(oA(i))throw new Error(`?url is not supported with CSS modules. (tried to import ${JSON.stringify(i)})`);if(t)return i=Le(Cg(i),"transform-only"),`import ${JSON.stringify(i)};export default "__VITE_CSS_URL__${Buffer.from(i).toString("hex")}__"`}}},transform:{filter:{id:{include:dt,exclude:[hu,wn]}},async handler(i,a){let{environment:o}=this,l=(h,y)=>r(o,h,y),c=async(h,y)=>{let m=decodeURI(h);if(et(m,e))return aA(e)?[cu(m,e),void 0]:[ze(ze(e.server.origin??"",e.base),m),void 0];let[w,A]=m.split("#"),g=await l(w,y);if(g){A&&(g+="#"+A);let E=await yn(this,g);if(!E.startsWith("data:")&&this.environment.mode==="dev"){let v=[...this.environment.moduleGraph.getModulesByFile(g)??[]].find(S=>S.type==="asset");v?.lastHMRTimestamp&&(E=Le(E,`t=${v.lastHMRTimestamp}`))}return[E,he(g)]}return e.command==="build"&&(e.build.rolldownOptions.external&&MN(e.build.rolldownOptions.external,m,w,!1)||e.logger.warnOnce(`
|
|
251
|
-
${m} referenced in ${w} didn't resolve at build time, it will remain unchanged to be resolved at runtime`)),[h,void 0]},{code:u,modules:f,deps:d,map:p}=await VB(o,a,i,s,c);if(f&&n.set(a,f),d)for(let h of d)this.addWatchFile(h);return{code:u,map:p}}}}}function QB(e){let t=new Map,n=tl(),r=tl(),s,i,a=!1,o,l=e.build.rolldownOptions.output,c=(Array.isArray(l)?l[0]:l)?.assetFileNames,u=(d,p)=>{let h=L.dirname(d);return c?typeof c=="string"?L.join(L.dirname(c),h):L.dirname(c({type:"asset",name:d,names:[d],originalFileName:p,originalFileNames:p?[p]:[],source:"/* vite internal call, ignore */"})):L.join(e.build.assetsDir,h)};function f(){let d=mc.get(e);if(d)return d;let p=e.build.lib?C$(e.build.lib,e.root,e.packageCache):xi;return mc.set(e,p),p}return{name:"vite:css-post",renderStart(){s=new Set,i=new Map,a=!1,o=new Map,n=tl()},transform:{filter:{id:{include:dt,exclude:[hu,wn]}},async handler(d,p){d=Jc(d);let h=DB.test(p),y=rA.test(p);if(h&&y){iA.test(p)&&(d=d.replace(/"/g,"""));let E=MB.exec(p)?.[1];if(E==null)throw new Error(`HTML proxy index in "${p}" not found`);return M$(`${We(he(p))}_${Number.parseInt(E)}`,d),{code:"export default ''",map:{mappings:""}}}let m=sA.test(p),w=mu.get(e).get(p),A=w&&!m&&l0(w,{namedExports:!0,preferConst:!0});if(e.command==="serve"){let E=async S=>{if(e.css.devSourcemap){let b=this.getCombinedSourcemap();return b.mappings&&await ru(b,he(p),e.logger),ji("css",S,b)}return S};if(Ro(p))return null;if(m)return`export default ${JSON.stringify(d)}`;if(this.environment.config.consumer==="server")return A||"export {}";let v=await E(d);return{code:[this.environment.config.isBundled?"const { updateStyle: __vite__updateStyle, removeStyle: __vite__removeStyle } = import.meta.hot._internal":`import { updateStyle as __vite__updateStyle, removeStyle as __vite__removeStyle } from ${JSON.stringify(L.posix.join(e.base,ds))}`,`const __vite__id = ${JSON.stringify(p)}`,`const __vite__css = ${JSON.stringify(v)}`,"__vite__updateStyle(__vite__id, __vite__css)",`${A||"import.meta.hot.accept()"}`,"import.meta.hot.prune(() => __vite__removeStyle(__vite__id))"].join(`
|
|
252
|
-
`),map:{mappings:""},moduleType:"js"}}m||t.set(p,d);let g;if(A)g=A;else if(m){let E=d;e.build.cssMinify&&(E=await mA(E,e,!0,p)),g=`export default ${JSON.stringify(E)}`}else g="";return{code:g,map:{mappings:""},moduleSideEffects:A||m?!1:"no-treeshake",moduleType:"js"}}},...e.command==="build"?{async renderChunk(d,p,h,y){let m,w=new Proxy({},{get(x,T){for(let k in y.chunks){let O=y.chunks[k].modules[T];if(O)return O}}}),A=d===""&&!p.isEntry,g=p.exports.length===0,E=Object.keys(p.modules);for(let x of E)if(t.has(x)){if(NB.test(x))continue;let T=this.getModuleInfo(x)?.meta?.vite?.cssScopeTo;if(T&&!WB(T,w))continue;Io.test(x)&&(g=!1),m=(m||"")+t.get(x)}else A||(g=!1);let v=ss.get(e),S=(x,T,k)=>{let O=aA(e),R=O||e.base==="./"||e.base===""?De(u(T,k)):void 0,I=M=>{let B=re(L.relative(R,M));return B[0]==="."?B:"./"+B};if(x=x.replace(Vn,(M,B,U="")=>{let V=this.getFileName(B)+U;return p.viteMetadata.importedAssets.add(he(V)),Tt(Am(V,"asset",T,"css",e,I))}),O){let M=re(L.relative(R,""));x=x.replace(Ui,(B,U)=>{let V=v.get(U).slice(1);return Tt(Am(V,"public",T,"css",e,()=>`${M}/${V}`))})}return x};function b(x,T){return re(L.format({...L.parse(x),base:void 0,ext:T}))}let _,C=[];if(d.includes("__VITE_CSS_URL__")){let x;for(rh.lastIndex=0;x=rh.exec(d);){let[T,k]=x,O=Buffer.from(k,"hex").toString(),R=he(O),I=b(L.basename(R),".css");if(!t.has(O))throw new Error(`css content for ${JSON.stringify(O)} was not found`);let M=t.get(O);M=S(M,I,R),C.push({cssAssetName:I,originalFileName:R,content:M,start:x.index,end:x.index+T.length})}}if(await r.run(async()=>Promise.all(C.map(async x=>{x.content=await ni(x.content,e)}))),C.length>0){let x=No(h.format,e.isWorker);_||=new Ie(d);for(let{cssAssetName:T,originalFileName:k,content:O,start:R,end:I}of C){let M=this.emitFile({type:"asset",name:T,originalFileName:k,source:O}),B=this.getFileName(M);p.viteMetadata.importedAssets.add(he(B));let U=Xn(this.environment,B,"asset",p.fileName,"js",x),V=typeof U=="string"?JSON.stringify(Tt(U)).slice(1,-1):`"+${U.runtime}+"`;_.update(R,I,V)}}if(m!==void 0)if(g&&(h.format==="es"||h.format==="cjs")&&s.add(p),this.environment.config.build.cssCodeSplit){if((h.format==="es"||h.format==="cjs")&&!p.fileName.includes("-legacy")){let x=p.isEntry&&g,T=b(p.name,".css"),k=p.isEntry&&(!p.facadeModuleId||!Mt(p.facadeModuleId))?L.basename(T):T,O=Zy(p,e.root,this.environment.config.isOutputOptionsForLegacyChunks?.(h)??!1);m=S(m,k,O),m=await n.run(async()=>ni(m,e));let R=this.emitFile({type:"asset",name:k,originalFileName:O,source:m});i.set(p.fileName,R),x&&Qi.get(this.environment).set(p.fileName,{referenceId:R,name:p.name}),p.viteMetadata.importedCss.add(this.getFileName(R))}else if(this.environment.config.consumer==="client"){m=await ni(m,e);let x=JSON.stringify(m);x=Jy(this,p,h,x)?.toString()||x;let T="__vite_style__",k=`var ${T} = document.createElement('style');${T}.textContent = ${x};document.head.appendChild(${T});`;_||=new Ie(d),UB(_,this,d,h.format,k)}}else m=S(m,f(),xi),o.set(p.fileName,m);return _?e.build.sourcemap?{code:_.toString(),map:_.generateMap({hires:"boundary"})}:{code:_.toString()}:null},augmentChunkHash(d){if(d.viteMetadata?.importedCss.size){let p="";for(let h of d.viteMetadata.importedCss)p+=h;return p}}}:{},async generateBundle(d,p){if(this.environment.config.isOutputOptionsForLegacyChunks?.(d))return;if((e.command!=="build"||this.environment.config.build.emitAssets)&&!this.environment.config.build.cssCodeSplit&&!a){let A=function(g){!g||g.type!=="chunk"||m.has(g)||(m.add(g),g.imports.forEach(E=>A(p[E])),g.dynamicImports.forEach(E=>w.add(E)),y+=o.get(g.preliminaryFileName)??"")},y="",m=new Set,w=new Set;for(let g of Object.values(p))g.type==="chunk"&&g.isEntry&&A(g);for(let g of w)A(p[g]);y&&(a=!0,y=await ni(y,e),this.emitFile({name:f(),type:"asset",source:y,originalFileName:xi}))}if(this.environment.config.build.chunkImportMap&&i.size){let y=wc(p,this.environment.config),m=Object.fromEntries(Object.entries(y.mapping).map(([A,g])=>[g,A])),w=new Map(Object.values(p).filter(A=>A.type==="chunk").map(A=>[A.preliminaryFileName,A]));for(let[A,g]of i){let E=w.get(A);if(!E)continue;let v=m[E.fileName]??E.fileName,S=L.posix.extname(v),b=`${v.slice(0,S?-S.length:void 0)}.css`;y.content.imports[e.base+b]=e.base+this.getFileName(g)}y.asset.source=JSON.stringify(y.content)}if(s.size){let y=Object.fromEntries(Object.values(p).filter(v=>v.type==="chunk").map(v=>[v.preliminaryFileName,v.fileName])),m=[...s].map(v=>y[v.fileName]).filter(Boolean),w=new Set(m),A;if(this.environment.config.build.chunkImportMap){let v=wc(p,this.environment.config);A=Object.fromEntries(Object.entries(v.mapping).map(([S,b])=>[b,S]))}let g=GB(A?m.map(v=>A[v]??v):m,d.format);for(let v in p){let S=p[v];if(S.type==="chunk"){let b=!1;S.imports=S.imports.filter(_=>{if(w.has(_)){let{importedCss:C,importedAssets:x}=p[_].viteMetadata;return C.forEach(T=>S.viteMetadata.importedCss.add(T)),x.forEach(T=>S.viteMetadata.importedAssets.add(T)),b=!0,!1}return!0}),b&&(S.code=g(S.code))}}let E=Hi.get(e);m.forEach(v=>{let S=p[v];if(S.isEntry){let{importedAssets:b,importedCss:_}=S.viteMetadata,C=Qi.get(this.environment).get(S.preliminaryFileName).referenceId,x=this.getFileName(C),T=p[x];_.delete(x),b.size&&(T.viteMetadata.importedAssets=b),_.size&&(T.viteMetadata.importedCss=_)}E.set(v,S),delete p[v],delete p[`${v}.map`]})}let h=Object.values(p).filter(y=>y.type==="asset"&&y.fileName.endsWith(".css"));for(let y of h)typeof y.source=="string"&&(y.source=y.source.replace(r$,""))}}}function UB(e,t,n,r,s){let i;if(r==="iife"||r==="umd"){let a=(r==="iife"?KI:VI).exec(n);a||t.error("Injection point for inlined CSS not found"),i=a.index+a[0].length}else if(r==="es")if(n.startsWith("#!")){let a=ys(n),o=n.slice(0,a);if(!Gg.test(o)){e.append(`
|
|
253
|
-
${s}`);return}i=a}else i=0;else t.error("Non supported format");e.appendRight(i,s)}function HB(e){return{name:"vite:css-analysis",applyToEnvironment(t){return!t.config.isBundled},transform:{filter:{id:{include:dt,exclude:[hu,wn]}},handler(t,n){let{moduleGraph:r}=this.environment,s=r.getModuleById(n);if(s){let i=!mu.get(e)?.get(n)&&!sA.test(n)&&!rA.test(n),a=this._addedImports;if(a){let o=new Set;for(let l of a)o.add(r.createFileOnlyEntry(l));r.updateModuleInfo(s,o,null,new Set,null,i)}else s.isSelfAccepting=i}}}}}function WB(e,t){let[n,r]=e,s=t[n];return s&&(r===void 0||s.renderedExports.includes(r))}function GB(e,t){let n=e.map(s=>vo(L.basename(s))).join("|"),r=new RegExp(t==="es"?`\\bimport\\s*["'][^"']*(?:${n})["'];`:`(\\b|,\\s*)require\\(\\s*["'\`][^"'\`]*(?:${n})["'\`]\\)(;|,)`,"g");return s=>s.replace(r,(i,a,o)=>t==="es"?`/* empty css ${"".padEnd(i.length-15)}*/`:o===";"?`${o}/* empty css ${"".padEnd(i.length-16)}*/`:`${a}/* empty css ${"".padEnd(i.length-15-a.length)}*/`)}var zB=/^file:\/\/\/[a-zA-Z]:\//;function JB(e){let t,n,r;return{get css(){return t??=Ot(e,{extensions:[".css"],mainFields:["style"],conditions:["style",Nr],tryIndex:!1,preferRelative:!0})},get sass(){if(!n){let s=Ot(e,{extensions:[".scss",".sass",".css"],mainFields:["sass","style"],conditions:["sass","style",Nr],tryIndex:!0,tryPrefix:"_",preferRelative:!0,skipMainField:!0});n=async(...i)=>(i[1].startsWith("file://")&&(i[1]=kt(i[1],{windows:$t&&!zB.test(i[1])?!1:void 0})),s(...i))}return n},get less(){return r??=Ot(e,{extensions:[".less",".css"],mainFields:["less","style"],conditions:["less","style",Nr],tryIndex:!1,preferRelative:!0})}}}function KB(e){return Object.keys(e)}async function gu(e,t,n,r,s){let{config:i}=e,{preprocessorOptions:a,devSourcemap:o}=i.css,l=yu(e.getTopLevelConfig()),c={...a&&a[n]||{},filename:he(t),enableSourcemap:o??!1},u=s[n],f=await u(e,r,i.root,c,l);if(f.error)throw f.error;let d;if(f.deps.length>0){let p=re(c.filename);d=new Set([...f.deps].filter(h=>re(h)!==p))}return{code:f.code,map:uA(c.filename,f.map,f.additionalMap),deps:d}}var sh=new WeakMap;function yu(e){let t=sh.get(e);return t||(t=JB(e),sh.set(e,t)),t}async function VB(e,t,n,r,s){let{config:i}=e,a=dt.exec(t)?.[1],o=new Set,l;if(_u(a)){let u=await gu(e,t,a,n,r);n=u.code,l=u.map,u.deps?.forEach(f=>o.add(f))}else if(a==="sss"&&i.css.transformer==="lightningcss"){let u=await lA(e,t,n);n=u.code,l=u.map}let c=await(i.css.transformer==="lightningcss"?_$(e,t,n,o,r,s):qB(e,t,n,o,a,r,s));return c?{...c,map:i.css.devSourcemap?uA(he(t),typeof c.map=="string"?JSON.parse(c.map):c.map,l):{mappings:""},deps:o}:{code:n,map:i.css.devSourcemap?l:{mappings:""},deps:o}}async function qB(e,t,n,r,s,i,a){let{config:o}=e,{modules:l,devSourcemap:c}=o.css,u=l!==!1&&Io.test(t),f=n.includes("@import"),d=Ss.test(n)||Au.test(n),p=await fA(e.getTopLevelConfig());if(s!=="sss"&&!p&&!u&&!f&&!d)return;let h=yu(e.getTopLevelConfig()),y=p?.plugins.slice()??[];f&&y.unshift((await YB()).default({async resolve(g,E,v,S){let b=et(g,e.getTopLevelConfig());if(b)return b;let _=await h.css(e,g,S.source?.input.file);return _?L.resolve(_):(L.isAbsolute(g)||e.logger.error(j.default.red(`Unable to resolve \`@import "${g}"\` from ${E}`)),g)},async load(g){let E=await pe.promises.readFile(g,"utf-8"),v=dt.exec(g)?.[1];if(_u(v)){let S=await gu(e,g,v,E,i);return S.deps?.forEach(b=>r.add(b)),S.code}return E},nameLayer(g){return`vite--anon-layer-${We(t)}-${g}`}})),a&&(y.length>0||u||d)&&y.push(hA({resolver:a,deps:r,logger:e.logger}));let m;u&&y.unshift((await XB()).default({...l,localsConvention:l?.localsConvention,getJSON(g,E,v){m=E,l&&typeof l.getJSON=="function"&&l.getJSON(g,E,v)},async resolve(g,E){for(let v of KB(h)){let S=await h[v](e,g,E);if(S)return L.resolve(S)}return g}}));let w=p?.options??{},A=s==="sss"?await gA(o.root):w.parser;if(!(!y.length&&!A))return{...await cA(t,n,y,{...w,parser:A},r,e.logger,c),modules:m}}async function lA(e,t,n){let{config:r}=e,{devSourcemap:s}=r.css;return await cA(t,n,[],{parser:await gA(r.root)},void 0,e.logger,s)}async function cA(e,t,n,r,s,i,a){let o;try{let c=xg(e);o=await(await ZB()).default(n).process(t,{...r,to:c,from:c,...a?{map:{inline:!1,annotation:!1,sourcesContent:!0}}:{}});for(let u of o.messages)if(u.type==="dependency")s?.add(re(u.file));else if(u.type==="dir-dependency"){let{dir:f,glob:d="**"}=u,p=Tn(d,{absolute:!0,cwd:L.resolve(L.dirname(e),f),expandDirectories:!1,ignore:["**/node_modules/**"]});for(let h=0;h<p.length;h++)s?.add(p[h])}else if(u.type==="warning"){let f=u,d=`[vite:css][postcss] ${f.text}`;d+=`
|
|
254
|
-
${Ue(t,{line:f.line,column:f.column-1},f.endLine!==void 0&&f.endColumn!==void 0?{line:f.endLine,column:f.endColumn-1}:void 0)}`,i.warn(j.default.yellow(d))}}catch(c){throw c.message=`[postcss] ${c.message}`,c.code=t,c.loc={file:c.file,line:c.line,column:c.column-1},c}if(!a)return{code:o.css,map:{mappings:""}};let l=await t$(o.map.toJSON(),he(e));return{code:o.css,map:l}}function bs(e){let t;return()=>(t||(t=e().then(n=>(t=n,n))),t)}var YB=bs(()=>import("./postcss-import-KX43CMCJ.js").then(e=>nt(e.default,1))),XB=bs(()=>import("./build-GBGQNBHY.js").then(e=>nt(e.default,1))),ZB=bs(()=>import("./postcss-INPVFW34.js")),e$=new WeakMap;async function t$(e,t){let n=L.dirname(t),r=e.sources.map(s=>{let i=he(decodeURIComponent(s));return i[0]==="<"&&i.endsWith(">")?`\0${i}`:re(L.resolve(n,i))});return{file:t,mappings:e.mappings,names:e.names,sources:r,sourcesContent:e.sourcesContent,version:e.version}}function uA(e,t,n){return!t||!n?t:t.mappings===""||n.mappings===""?{mappings:""}:ms(e,[t,n])}var n$="/*$vite$:1*/",r$=/\/\*\$vite\$:\d+\*\//;async function ni(e,t){return(e.includes("@import")||e.includes("@charset"))&&(e=c$(e)),t.build.cssMinify&&(e=await mA(e,t,!1)),e+=n$,e}async function fA(e){let t=gl.get(e);if(t!==void 0)return await t;let n=e.css.postcss;if(ke(n)){let r={...n};delete r.plugins,t={options:r,plugins:n.plugins||[]}}else{let r=typeof n=="string"?n:e.root,s=pu(e.root);t=(0,OB.default)({},r,{stopDir:s}).catch(i=>{if(!i.message.includes("No PostCSS Config found"))if(i instanceof Error){let{name:a,message:o,stack:l}=i;throw i.name="Failed to load PostCSS config",i.message=`Failed to load PostCSS config (searchPath: ${r}): [${a}] ${o}
|
|
255
|
-
${l}`,i.stack="",i}else throw new Error(`Failed to load PostCSS config: ${i}`);return null}),t.then(i=>{gl.set(e,i)},()=>{})}return gl.set(e,t),t}var Ss=/(?<!@import\s+)(?<=^|[^\w\-\u0080-\uffff])url\((\s*('[^']+'|"[^"]+")\s*|(?:\\.|[^'")\\])+)\)/,dA=/(?<=^|[^\w\-\u0080-\uffff])data-uri\((\s*('[^']+'|"[^"]+")\s*|[^'")]+)\)/,pA=/@import\s+(?:url\()?('[^']+\.css'|"[^"]+\.css"|[^'"\s)]+\.css)/,Au=/(?<=image-set\()((?:[\w-]{1,256}\([^)]*\)|[^)])*)(?=\))/,hA=e=>{if(!e)throw new Error("base or replace is required");return{postcssPlugin:"vite-url-rewrite",OnceExit(t){let n=[];if(t.walkDecls(r=>{let s=r.source?.input.file;s||e.logger.warnOnce("\nA PostCSS plugin did not pass the `from` option to `postcss.parse`. This may cause imported assets to be incorrectly transformed. If you've recently added a PostCSS plugin that raised this warning, please contact the package author to fix the issue.");let i=Ss.test(r.value),a=Au.test(r.value);if(i||a){let o=async l=>{let[c,u]=await e.resolver(l,s);return u&&e.deps.add(u),c};i&&a?n.push(Wi(r.value,o).then(l=>ih(l,o)).then(l=>{r.value=l})):n.push((a?ih:Wi)(r.value,o).then(l=>{r.value=l}))}}),n.length)return Promise.all(n)}}};hA.postcss=!0;function Wi(e,t){return go(e,Ss,async n=>{let[r,s]=n;return await Eu(s.trim(),r,t)})}function s$(e,t){return go(e,dA,async n=>{let[r,s]=n;return await Eu(s.trim(),r,t,"data-uri")})}function i$(e,t){return go(e,pA,async n=>{let[r,s]=n;return await a$(s,r,t)})}var o$=/(?:gradient|element|cross-fade|image)\(/;async function ih(e,t){return await go(e,Au,async n=>{let[,r]=n;return await $g(r,async({url:s})=>Ss.test(s)?await Wi(s,t):o$.test(s)?s:await Eu(s,s,t))})}function wu(e){return ft(e)||gn(e)||e[0]==="#"||PB.test(e)||e.startsWith("__VITE_ASSET__")||e.startsWith("__VITE_PUBLIC_ASSET__")}async function Eu(e,t,n,r="url"){let s="",i=e[0],a=e;if((i==='"'||i==="'")&&(s=i,a=e.slice(1,-1)),wu(a))return t;a=a.replace(/\\(\W)/g,"$1");let o=await n(a,e);return o===!1?t:(s===""&&(o!==encodeURI(o)||o.includes(")"))&&(s='"'),s==="'"&&o.includes("'")&&(s='"'),s==='"'&&o.includes('"')&&(o=o.replace(LB,'\\"')),`${r}(${s}${o}${s})`)}async function a$(e,t,n){let r="",s=e[0],i=e;if((s==='"'||s==="'")&&(r=s,i=e.slice(1,-1)),wu(i))return t;let a=await n(i,e);return a===!1?t:`@import ${t.includes("url(")?"url(":""}${r}${a}${r}`}async function mA(e,t,n,r=xi){if(t.build.cssMinify==="esbuild"){let{transform:s,formatMessages:i}=await v$();try{let{code:a,warnings:o}=await s(e,{loader:"css",target:t.build.cssTarget||void 0,sourcefile:r,...l$(t.esbuild||{})});if(o.length){let l=await i(o,{kind:"warning"});t.logger.warn(j.default.yellow(`[esbuild css minify]
|
|
256
|
-
${l.join(`
|
|
257
|
-
`)}`))}return n?a.trimEnd():a}catch(a){throw a.errors&&(a.message="[esbuild css minify] "+a.message,a.frame=`
|
|
258
|
-
`+(await i(a.errors,{kind:"error"})).join(`
|
|
259
|
-
`),a.loc=a.errors[0].location),a}}try{let{code:s,warnings:i}=(await gc()).transform({...t.css.lightningcss,targets:EA(t.build.cssTarget),filename:r,code:Buffer.from(e),minify:!0,cssModules:void 0,visitor:void 0,customAtRules:void 0});for(let a of i){let o=`[lightningcss minify] ${a.message}`;o+=`
|
|
260
|
-
${Ue(e,{line:a.loc.line,column:a.loc.column-1})}`,t.logger.warn(j.default.yellow(o))}return eA.decode(s)+(n?"":`
|
|
261
|
-
`)}catch(s){s.message=`[lightningcss minify] ${s.message}`;let i=wA(e);throw i&&(s.message+=i),s.loc&&(s.loc={line:s.loc.line,column:s.loc.column-1},s.frame=Ue(e,s.loc)),s}}function l$(e){let t={charset:e.charset,logLevel:e.logLevel,logLimit:e.logLimit,logOverride:e.logOverride,legalComments:e.legalComments};return e.minifyIdentifiers!=null||e.minifySyntax!=null||e.minifyWhitespace!=null?{...t,minifyIdentifiers:e.minifyIdentifiers??!0,minifySyntax:e.minifySyntax??!0,minifyWhitespace:e.minifyWhitespace??!0}:{...t,minify:!0}}var oh=/@import(?:\s*(?:url\([^)]*\)|"(?:[^"]|(?<=\\)")*"|'(?:[^']|(?<=\\)')*').*?|[^;]*);/g,ah=/@charset(?:\s*(?:"(?:[^"]|(?<=\\)")*"|'(?:[^']|(?<=\\)')*').*?|[^;]*);/g;function c$(e){let t=new Ie(e),n=sI(e),r;for(oh.lastIndex=0;r=oh.exec(n);)t.remove(r.index,r.index+r[0].length),t.appendLeft(0,r[0]);ah.lastIndex=0;let s=!1;for(;r=ah.exec(n);)t.remove(r.index,r.index+r[0].length),s||(t.prepend(r[0]),s=!0);return t.toString()}var lh={};function Hn(e,t){let n=lh[e];if(n)return n;let r=Yn(e,void 0,{root:t})??Yn(e,wg,{root:t});if(r)return lh[e]=r;let s=uI("install");throw new Error(`Preprocessor dependency "${e}" not found. Did you install it? Try \`${s} -D ${e}\`.`)}function ch(e,t=!1){if(!t)try{return{name:"sass-embedded",path:Hn("sass-embedded",e)}}catch(n){try{return{name:"sass",path:Hn("sass",e)}}catch{throw n}}return{name:"sass",path:Hn("sass",e)}}var ri;async function gA(e){return ri||(ri=(async()=>{let t=Hn("sugarss",e);return ri=(await import(tt(t).href)).default})()),ri}function yA(e){if(typeof window<"u"&&typeof location<"u"&&typeof location.href=="string"){let t=location.href.replace(/\/$/,"");return e.replace(t,"")}else return e}var u$=(e,t,n)=>{let r;return{async run(s,i,a){let o=await import(s);r??=o.initAsyncCompiler();let l=await r,c={...a};c.url=tt(a.filename),c.sourceMap=a.enableSourcemap;let u=(p,h)=>!(h[0]==='"'||h[0]==="'")&&p[0]==="$"?!0:p.startsWith("#{"),f={async canonicalize(p,h){let y=h.containingUrl?kt(h.containingUrl):a.filename,m=await t.sass(e,p,yA(y));return m&&(m.endsWith(".css")||m.endsWith(".scss")||m.endsWith(".sass"))?tt(m):null},async load(p){let h=L.extname(p.pathname),y="scss";h===".sass"?y="indented":h===".css"&&(y="css");let m=await AA(e,kt(p),a.filename,t.sass,u);return{contents:m.contents??await Ee.readFile(m.file,"utf-8"),syntax:y,sourceMapUrl:p}}};c.importers=[...c.importers??[],f],c.importer??=f;let d=await l.compileStringAsync(i,c);return{css:d.css,map:d.sourceMap?JSON.stringify(d.sourceMap):void 0,stats:{includedFiles:d.loadedUrls.filter(p=>p.protocol==="file:").map(p=>kt(p))}}},async stop(){await(await r)?.dispose(),r=void 0}}},f$=e=>{let t,n,r=new WeakSet;return{async close(){await t?.stop()},async process(s,i,a,o,l){let c=ch(a,n??!1);if(n===void 0){n=!1;try{await import(c.path)}catch(p){/sass-embedded-[a-z0-9]+-[a-z0-9]+/i.test(p.message)&&(n=!0,c=ch(a,n))}}t??=u$(s,l,e);let{content:u,map:f}=await vu(i,o.filename,o.additionalData,o.enableSourcemap),d={...o,additionalData:void 0};try{let p=await t.run(tt(c.path).href,u,d),h=p.stats.includedFiles.map(m=>yA(m)),y=p.map?JSON.parse(p.map.toString()):void 0;return y&&(y.sources=y.sources.map(m=>m.startsWith("file://")?re(kt(m)):m)),{code:p.css.toString(),map:y,additionalMap:f,deps:h}}catch(p){return r.has(p)||(p.message=`[sass] ${p.message}`,p.id=p.file,p.frame=p.formatted,p.span?.start&&(p.line=p.span.start.line+1,p.column=p.span.start.column+1,p.frame=p.message),r.add(p)),{code:"",error:p,deps:[]}}}}};async function AA(e,t,n,r,s){t=L.resolve(t);let i=L.dirname(t),a=L.dirname(n);if(i===a)return{file:t};let o=await Ee.readFile(t,"utf-8"),l=Ss.test(o),c=dA.test(o),u=pA.test(o);if(!l&&!c&&!u)return{file:t};let f,d=async(p,h)=>{if(s?.(p,h))return!1;if(p[0]==="/")return p;let y=await r(e,p,t)||L.resolve(i,p);return re(L.relative(a,y))};return u&&(f=await i$(o,d)),l&&(f=await Wi(f||o,d)),c&&(f=await s$(f||o,d)),{file:t,contents:f}}var d$=(e,t,n)=>{let r=(i,a)=>i[0]==="@",s=async(i,a,o,l)=>{let c=await t.less(e,i,L.join(a,"*"));if(!c)return;if(l==="application/javascript")return{resolved:L.resolve(c)};let u=await AA(e,c,o,t.less,r);return{resolved:c,contents:"contents"in u?u.contents:void 0}};return new Vc(async()=>{let[i,a]=await Promise.all([import("fs/promises"),import("path")]),o,l=(c,u)=>{let{FileManager:f}=c;return o??=class extends f{rootFile;constructor(p){super(),this.rootFile=p}supports(p){return!/^(?:https?:)?\/\//.test(p)}supportsSync(){return!1}async loadFile(p,h,y,m){let w=await s(p,h,this.rootFile,y.mime);return w?{filename:a.resolve(w.resolved),contents:w.contents??await i.readFile(w.resolved,"utf-8")}:super.loadFile(p,h,y,m)}},{install(d,p){p.addFileManager(new o(u))},minVersion:[3,0,0]}};return async(c,u,f)=>{let d=(await import(c)).default,p=l(d,f.filename);return await d.render(u,{paths:["node_modules"],...f,plugins:[p,...f.plugins||[]],...f.enableSourcemap?{sourceMap:{outputSourceFiles:!0,disableSourcemapAnnotation:!0,sourceMapFileInline:!1}}:{}})}},{parentFunctions:{viteLessResolve:s},shouldUseFake(i,a,o){return!!o.plugins&&o.plugins.length>0},max:n})},p$=e=>{let t;return{close(){t?.stop()},async process(n,r,s,i,a){let o=Hn("less",s);t??=d$(n,a,e);let{content:l,map:c}=await vu(r,i.filename,i.additionalData,i.enableSourcemap),u,f={...i,additionalData:void 0};try{u=await t.run(tt(o).href,l,f)}catch(p){let h=p,y=new Error(`[less] ${h.message||h.type}`);return y.loc={file:h.filename||i.filename,line:h.line,column:h.column},{code:"",error:y,deps:[]}}let d=u.map&&JSON.parse(u.map);return d&&delete d.sourcesContent,{code:u.css.toString(),map:d,additionalMap:c,deps:u.imports}}}},h$=e=>new Vc(()=>async(t,n,r,s)=>{let i=(await import(t)).default,a=i(n,{paths:["node_modules"],...s});if(s.define)for(let o in s.define)a.define(o,s.define[o]);return s.enableSourcemap&&a.set("sourcemap",{comment:!1,inline:!1,basePath:r}),{code:a.render(),map:a.sourcemap,deps:a.deps()}},{shouldUseFake(t,n,r,s){return!!(s.define&&Object.values(s.define).some(i=>typeof i=="function")||s.Evaluator)},max:e}),m$=e=>{let t;return{close(){t?.stop()},async process(n,r,s,i,a){let o=Hn("stylus",s);t??=h$(e);let{content:l,map:c}=await vu(r,i.filename,i.additionalData,i.enableSourcemap,`
|
|
262
|
-
`),u=(i.imports??[]).map(d=>L.resolve(d)),f={...i,additionalData:void 0};try{let{code:d,map:p,deps:h}=await t.run(tt(o).href,l,s,f);return{code:d,map:g$(p,s),additionalMap:c,deps:[...h,...u]}}catch(d){let p=new Error(`[stylus] ${d.message}`);return p.name=d.name,p.stack=d.stack,{code:"",error:p,deps:[]}}}}};function g$(e,t){if(!e)return;let n={...e},r=s=>re(L.resolve(t,s));return n.file&&(n.file=r(n.file)),n.sources=n.sources.map(r),n}async function vu(e,t,n,r,s=""){if(!n)return{content:e};if(typeof n=="function"){let o=await n(e,t);return typeof o=="string"?{content:o}:o}if(!r)return{content:n+s+e};let i=new Ie(e);i.appendLeft(0,s),i.appendLeft(0,n);let a=i.generateMap({hires:"boundary"});return a.file=t,a.sources=[t],{content:i.toString(),map:a}}var y$=e=>{let t=f$(e),n=p$(e),r=m$(e),s=(a,o,l,c,u)=>{let f={...c};return f.syntax="indented",t.process(a,o,l,f,u)},i=async()=>{await Promise.all([n.close(),t.close(),r.close()])};return{less:n.process,scss:t.process,sass:s,styl:r.process,stylus:r.process,close:i}},A$=e=>{if(e===void 0)return 0;if(e!==!0)return e},w$=new Set(["less","sass","scss","styl","stylus"]);function _u(e){return e&&w$.has(e)}var E$=/^(?:[a-z]+:)?\/\//i,v$=bs(()=>import("./main-BEZFE5MG.js")),gc=bs(()=>import("./node-RONF2ICS.js"));async function _$(e,t,n,r,s,i){let{config:a}=e,o=xg(t),l;try{l=iA.test(t)?(await gc()).transformStyleAttribute({filename:o,code:Buffer.from(n),targets:a.css.lightningcss?.targets,minify:a.isProduction&&!!a.build.cssMinify,analyzeDependencies:!0}):await(await gc()).bundleAsync({...a.css.lightningcss,filename:o,projectRoot:a.root,resolver:{async read(f){if(f===o)return n;let d=pe.readFileSync(f,"utf-8"),p=dt.exec(f)?.[1];if(_u(p)){let h=await gu(e,t,p,d,s);return h.deps?.forEach(y=>r.add(y)),h.code}else if(p==="sss")return(await lA(e,t,d)).code;return d},async resolve(f,d){let p=et(f,e.getTopLevelConfig());if(p)return p;if(E$.test(f))return{external:f};let h=yu(e.getTopLevelConfig()),y=dt.exec(d)?.[1],m;switch(y){case"css":case"sss":case"styl":case"stylus":case void 0:m=h.css;break;case"sass":case"scss":m=h.sass;break;case"less":m=h.less;break;default:throw new Error(`Unknown lang: ${y}`)}let w=await m(e,f,d);return w?(r.add(w),w):f}},minify:a.isProduction&&!!a.build.cssMinify,sourceMap:a.command==="build"?!!a.build.sourcemap:a.css.devSourcemap,analyzeDependencies:{preserveImports:!0},cssModules:Io.test(t)?a.css.lightningcss?.cssModules??!0:void 0})}catch(f){if(f.message=`[lightningcss] ${f.message}`,f.loc){f.loc={file:f.fileName.replace(Vr,"\0"),line:f.loc.line,column:f.loc.column-1};try{let d=wA(pe.readFileSync(f.fileName,"utf-8"));d&&(f.message+=d)}catch{}}throw f}for(let f of l.warnings){let d=`[vite:css][lightningcss] ${f.message}`;d+=`
|
|
263
|
-
${Ue(n,{line:f.loc.line,column:f.loc.column-1})}`,e.logger.warn(j.default.yellow(d))}let c=eA.decode(l.code);for(let f of l.dependencies)switch(f.type){case"file":r.add(f.filePath);break;case"glob":{for(let p of Tn(f.glob))r.add(p);let d=Tn(f.glob,{absolute:!0,expandDirectories:!1,ignore:["**/node_modules/**"]});for(let p=0;p<d.length;p++)r.add(d[p]);break}case"url":{let d;if(wu(f.url))d=f.url;else if(i){let[p,h]=await i(f.url,f.loc.filePath.replace(Vr,"\0"));h&&r.add(h),d=p}else d=f.url;c=c.replace(f.placeholder,()=>d.replaceAll('"','\\"'));break}case"import":c=c.replace(f.placeholder,()=>f.url);break;default:throw new Error(`Unsupported dependency type: ${f.type}`)}let u;if("exports"in l&&l.exports){u={};let f=Object.entries(l.exports).sort((d,p)=>d[0].localeCompare(p[0]));for(let[d,p]of f){u[d]=p.name;for(let h of p.composes)u[d]+=" "+h.name}}return{code:c,map:"map"in l?l.map?.toString():void 0,modules:u}}function wA(e){if(/[\s;{]\*[a-zA-Z-][\w-]+\s*:/.test(e))return".\nThis file contains star property hack (e.g. `*zoom`), which was used in the past to support old Internet Explorer versions. This is not a valid CSS syntax and will be ignored by modern browsers. \nWhile this is not supported by LightningCSS, you can set `css.lightningcss.errorRecovery: true` to strip these codes.";if(/min-width:\s*0\\0/.test(e))return".\nThis file contains @media zero hack (e.g. `@media (min-width: 0\\0)`), which was used in the past to support old Internet Explorer versions. This is not a valid CSS syntax and will be ignored by modern browsers. \nWhile this is not supported by LightningCSS, you can set `css.lightningcss.errorRecovery: true` to strip these codes."}var b$={chrome:"chrome",edge:"edge",firefox:"firefox",hermes:!1,ie:"ie",ios:"ios_saf",node:!1,opera:"opera",rhino:!1,safari:"safari"},uh={2015:["chrome49","edge13","safari10","ios10","firefox44","opera36"],2016:["chrome50","edge13","safari10","ios10","firefox43","opera37"],2017:["chrome58","edge15","safari11","ios11","firefox52","opera45"],2018:["chrome63","edge79","safari12","ios12","firefox58","opera50"],2019:["chrome73","edge79","safari12.1","ios12.1","firefox64","opera60"],2020:["chrome80","edge80","safari14.1","ios14.5","firefox80","opera67"],2021:["chrome85","edge85","safari14.1","ios14.5","firefox80","opera71"],2022:["chrome94","edge94","safari16.4","ios16.4","firefox93","opera80"],2023:["chrome110","edge110","safari16.4","ios16.4","firefox146","opera96"],2024:["chrome119","edge119","safari17.4","ios17.4","firefox145","opera105"],2025:["chrome136","edge136","safari26.0","ios26.0","firefox138","opera121"]},S$=/es(6|\d{4})/,x$=/\d/,yl=new Map,EA=e=>{if(!e)return;if(yl.has(e))return yl.get(e);let t={},n=He(e).flatMap(s=>{let i=S$.exec(s);if(!i)return s;let a=i[1]==="6"?2015:Number(i[1]);if(!uh[a])throw new Error(`Unsupported target "${s}"`);return uh[a]});for(let s of n){if(s==="esnext")continue;let i=s.search(x$);if(i>=0){let a=b$[s.slice(0,i)];if(a===!1)continue;if(a){let[o,l=0]=s.slice(i).split(".").map(c=>parseInt(c,10));if(!isNaN(o)&&!isNaN(l)){let c=o<<16|l<<8;(!t[a]||c<t[a])&&(t[a]=c);continue}}}throw new Error(`Unsupported target "${s}"`)}let r=Object.keys(t).length>0?t:void 0;return yl.set(e,r),r};function C$(e,t,n){if(typeof e.cssFileName=="string")return`${e.cssFileName}.css`;if(typeof e.fileName=="string")return`${e.fileName}.css`;let r=hs(t,n)?.data,s=r?Qg(r.name):void 0;if(!s)throw new Error('Name in package.json is required if option "build.lib.cssFileName" is not provided.');return`${s}.css`}var vA="vite/modulepreload-polyfill",fh="\0vite/modulepreload-polyfill.js";function I$(){return{name:"vite:modulepreload-polyfill",applyToEnvironment(e){return e.config.isBundled?Go({isServer:e.config.consumer!=="client"}):!0},resolveId:{filter:{id:St(vA)},handler(e){return fh}},load:{filter:{id:St(fh)},handler(e){return""}}}}var R$=/[?&]html-proxy=?(?:&inline-css)?(?:&style-attr)?&index=(\d+)\.(?:js|css)$/,yc=/[?&]html-proxy\b/,dh=/__VITE_INLINE_CSS__([a-z\d]{8}_\d+)__/g,ph=/(?<!(?<!\.\.)\.)\bimport\s*\(("(?:[^"]|(?<=\\)")*"|'(?:[^']|(?<=\\)')*')\)/dg,k$=/\.(?:html|htm)$/,T$=/[\t\n\f\r ]/,_A=/[ \t]*<script[^>]*type\s*=\s*(?:"importmap"|'importmap'|importmap)[^>]*>.*?<\/script>/is,Pr=new RegExp([/[ \t]*<script[^>]*type\s*=\s*(?:"module"|'module'|module)[^>]*>/i,/[ \t]*<link[^>]*rel\s*=\s*(?:"modulepreload"|'modulepreload'|modulepreload)[\s\S]*?>/i].map(e=>e.source).join("|"),"i"),O$=e=>yc.test(e),B$=e=>k$.test(e),rn=new WeakMap,bu=new Map;function $$(e){return rn.set(e,new Map),{name:"vite:html-inline-proxy",resolveId:{filter:{id:yc},handler(t){return t}},load:{filter:{id:yc},handler(t){let n=R$.exec(t);if(n){let r=Number(n[1]),s=he(t).replace(re(e.root),""),i=rn.get(e).get(s)?.[r];if(i)return{...i,moduleSideEffects:!0};throw new Error(`No matching HTML proxy module found from ${t}`)}}}}}function Ci(e,t,n,r){rn.get(e)||rn.set(e,new Map),rn.get(e).get(t)||rn.get(e).set(t,[]),rn.get(e).get(t)[n]=r}function M$(e,t){bu.set(e,t)}var D$=new Set(["icon","apple-touch-icon","apple-touch-startup-image","manifest"]),Al=new WeakMap;function ko(e){return e.nodeName[0]!=="#"}function bA(e,t){e.nodeName==="template"&&(e=e.content),t(e),(ko(e)||e.nodeName==="#document"||e.nodeName==="#document-fragment")&&e.childNodes.forEach(n=>bA(n,t))}async function Su(e,t,n,r){let{parse:s,ErrorCodes:i}=await import("./dist-H2NBAJAI.js"),a={};bA(s(e,{scriptingEnabled:!1,sourceCodeLocationInfo:!0,onParseError:o=>{L$(o,i,e,t,a)}}),r);for(let o of Object.values(a))n(j.default.yellow(`
|
|
264
|
-
${o}`))}function SA(e){let t,n,r=!1,s=!1,i=!1;for(let a of e.attrs)a.prefix===void 0&&(a.name==="src"?t||(t=a,n=e.sourceCodeLocation?.attrs.src):a.name==="type"&&a.value==="module"?r=!0:a.name==="async"?s=!0:a.name==="vite-ignore"&&(i=!0));return{src:t,srcSourceCodeLocation:n,isModule:r,isAsync:s,isIgnored:i}}var P$=/=\s*(.)/;function Ft(e,t,n){let r=e.slice(t.startOffset,t.endOffset),s=P$.exec(r);if(!s)throw new Error("[vite:html] internal error, failed to overwrite attribute value");let i=s[1]==='"'||s[1]==="'"?1:0,a=s.index+s[0].length-1;return e.update(t.startOffset+a+i,t.endOffset-i,n),e}function xA(e,t){let n=t.attrs?.["vite-ignore"];return n&&e.remove(n.startOffset,n.endOffset),e}function N$(e,t,n){return{code:e.code,message:`parse5 error code ${e.code}`,frame:Ue(n,e.startOffset,e.endOffset),loc:{file:t,line:e.startLine,column:e.startCol}}}function L$(e,t,n,r,s){switch(e.code){case t.missingDoctype:return;case t.abandonedHeadElementChild:return;case t.duplicateAttribute:return;case t.nonVoidHtmlElementStartTagWithTrailingSolidus:return;case t.unexpectedQuestionMarkInsteadOfTagName:return}let i=N$(e,r,n);s[i.code]??=`Unable to parse HTML; ${i.message}
|
|
265
|
-
at ${i.loc.file}:${i.loc.line}:${i.loc.column}
|
|
266
|
-
`+i.frame}function CA(e,t,n,r=new Set,s=new Set){if(r.has(e.fileName))return[];if(r.add(e.fileName),n.has(e)){let o=n.get(e).filter(l=>!s.has(l));return o.forEach(l=>s.add(l)),o}let i=[],a=[];return e.imports.forEach(o=>{let l=t[o];if(l?.type==="chunk"){let c=CA(l,t,n,r,s);a.push(...c),n.has(l)?i.push(...n.get(l)):i.push(...c)}}),e.viteMetadata.importedCss.forEach(o=>{i.push(o),s.has(o)||(s.add(o),a.push(o))}),n.set(e,Jn(i)),a}function F$(e){let[t,n,r]=DA(e.plugins);t.unshift(BA(e)),t.unshift(TA(e)),t.push($A(e)),r.push(MA(e)),r.push(OA(e));let s=_s(()=>new Map),i=a=>a[0]==="#"||ft(a)||gn(a);return Al.set(e,new Map),{name:"vite:build-html",applyToEnvironment(a){return a.config.isBundled},transform:{filter:{id:/\.html$/},async handler(a,o){o=re(o);let l=re(L.relative(e.root,o)),c=`/${l}`,u=hh(l,e),f=k=>u+k,d=k=>wm(k.slice(1),"public",l,"html",e,f),p=k=>{let O=k.sourceCodeLocation.startOffset;if(O===0)return 0;let R=O-k.sourceCodeLocation.startCol,I=!1;try{I=!y.slice(Math.max(0,R),O).trim()}catch{}return I?R:O};a=await Ac(a,t,this,{path:c,filename:o});let h="",y=new Ie(a),m=[],w=[],A=-1,g=!0,E=!1,v=!1,S=[],b=Object.keys(e.build.rolldownOptions.input||{}),_=async(k,O)=>{if(k!==""&&!b.includes(k)&&!b.includes(wo(k)))try{return await th(this,k,o,O)}catch(R){if(R.code!=="ENOENT")throw R}return k},C=[];await Su(a,o,e.logger.warn,k=>{if(!ko(k))return;let O=!1;if(k.nodeName==="script"){let{src:M,srcSourceCodeLocation:B,isModule:U,isAsync:V,isIgnored:te}=SA(k);if(te)xA(y,k.sourceCodeLocation);else{let Q=M&&M.value,Z=!!(Q&&et(Q,e));if(Z&&Ft(y,B,Lt(d(Q))),U){if(A++,Q&&!i(Q)&&!Z)C.push(this.resolve(Q,o).then(F=>{if(!F)return Promise.reject(new Error(`Failed to resolve ${Q} from ${o}`));let G=this.getModuleInfo(F.id);if(G)G.moduleSideEffects=!0;else if(!F.external)return this.load({...F,moduleSideEffects:!0}).then(()=>{})})),h+=`
|
|
267
|
-
import ${JSON.stringify(Q)}`,O=!0;else if(k.childNodes.length){let F=k.childNodes.pop().value;Ci(e,o.replace(re(e.root),""),A,{code:F}),h+=`
|
|
268
|
-
import "${o}?html-proxy&index=${A}.js"`,O=!0}g&&=V,E||=V,v||=!V}else if(Q&&!Z)i(Q)||e.logger.warn(`<script src="${Q}"> in "${c}" can't be bundled without type="module" attribute`);else if(k.childNodes.length){let F=k.childNodes.pop();m.push(...kA(F))}}}let R=zy(k,e.html?.additionalAssetSources);for(let M of R)if(M.type==="remove"){y.remove(M.location.startOffset,M.location.endOffset);continue}else if(M.type==="srcset")S.push((async()=>{let B=await $g(M.value,async({url:U})=>{let V=Ni(U);if(V!==void 0&&!i(V)){let te=await _(U);return te!==V?Tt(te):U}return U});B!==M.value&&Ft(y,M.location,B)})());else if(M.type==="src"){let B=Ni(M.value);if(B!==void 0){if(et(B,e))Ft(y,M.location,Lt(d(B)));else if(!i(B))if(k.nodeName==="link"&&Mt(B)&&!("media"in M.attributes||"disabled"in M.attributes)){let U=`
|
|
269
|
-
import ${JSON.stringify(B)}`;w.push({url:B,start:p(k),end:k.sourceCodeLocation.endOffset}),h+=U}else{let U=k.nodeName==="link"&&M.attributes.rel&&IA(M.attributes.rel).some(V=>D$.has(V))?!1:void 0;S.push((async()=>{let V=await _(B,U);V!==B&&Ft(y,M.location,Lt(V))})())}}}let I=RA(k);if(I){A++;let M=I.attr.value;Ci(e,o.replace(re(e.root),""),A,{code:M}),h+=`
|
|
270
|
-
import "${o}?html-proxy&inline-css&style-attr&index=${A}.css"`;let B=We(he(o));Ft(y,I.location,`__VITE_INLINE_CSS__${B}_${A}__`)}if(k.nodeName==="style"&&k.childNodes.length){let M=k.childNodes.pop(),B=o.replace(re(e.root),"");A++,Ci(e,B,A,{code:M.value}),h+=`
|
|
271
|
-
import "${o}?html-proxy&inline-css&index=${A}.css"`;let U=We(he(o));y.update(M.sourceCodeLocation.startOffset,M.sourceCodeLocation.endOffset,`__VITE_INLINE_CSS__${U}_${A}__`)}O&&y.remove(p(k),k.sourceCodeLocation.endOffset)}),Al.get(e).set(o,g),E&&v&&e.logger.warn(`
|
|
272
|
-
Mixed async and defer script modules in ${o}, output script will fallback to defer. Every script, including inline ones, need to be marked as async for your output script to be async.`),await Promise.all(S);for(let{start:k,end:O,url:R}of m)et(R,e)?y.update(k,O,Lt(d(R))):i(R)||y.update(k,O,Lt(await th(this,R,o)));let x=await Promise.all(w.map(async k=>({...k,resolved:await this.resolve(k.url,o)})));for(let{start:k,end:O,url:R,resolved:I}of x)if(I==null){e.logger.warnOnce(`
|
|
273
|
-
${R} doesn't exist at build time, it will remain unchanged to be resolved at runtime`);let M=`
|
|
274
|
-
import ${JSON.stringify(R)}`;h=h.replace(M,"")}else y.remove(k,O);s(this).set(o,y.toString());let{modulePreload:T}=this.environment.config.build;return T!==!1&&T.polyfill&&(E||v)&&(h=`import "${vA}";
|
|
275
|
-
${h}`),await Promise.all(C),{code:h,map:{mappings:""},moduleSideEffects:"no-treeshake"}}},async generateBundle(a,o){let l=new Map,c=new Set,u=(y,m=new Set)=>{let w=[];return y.imports.forEach(A=>{let g=o[A];g?g.type==="chunk"&&!m.has(A)&&(m.add(A),w.push(...u(g,m)),w.push(g)):w.push(A)}),w},f=(y,m,w)=>({tag:"script",attrs:{...w?{async:!0}:{},type:"module",crossorigin:!0,src:typeof y=="string"?y:m(y.fileName)}}),d=(y,m)=>({tag:"link",attrs:{rel:"modulepreload",crossorigin:!0,href:m(y)}}),p=(y,m)=>({tag:"link",attrs:{rel:"stylesheet",crossorigin:!0,href:m(y)}}),h=(y,m)=>CA(y,o,l).map(w=>p(w,m));for(let[y,m]of s(this)){let w=re(L.relative(e.root,y)),A=hh(w,e),g=(O,R)=>ft(O)?O:wm(O,R,w,"html",e,I=>A+I),E=O=>g(O,"asset"),v=O=>g(O,"public"),S=Al.get(e).get(y),b=m,_=Object.values(o).find(O=>O.type==="chunk"&&O.isEntry&&O.facadeModuleId&&re(O.facadeModuleId)===y),C=!1;if(_){a.format==="es"&&U$(_.code)&&(C=!0);let O=u(_),R;if(C)R=O.map(I=>f(I,E,S));else{let{modulePreload:I}=this.environment.config.build;if(R=[f(_,E,S)],I!==!1){let M=typeof I=="object"&&I.resolveDependencies,B=O.filter(V=>typeof V!="string").map(V=>V.fileName),U=M?M(_.fileName,B,{hostId:w,hostType:"html"}):B;R.push(...U.map(V=>d(V,E)))}}R.push(...h(_,E)),b=Hr(b,R)}if(e.command==="serve"&&this.environment.config.consumer==="client"&&this.environment.config.isBundled&&(b=Hr(b,[{tag:"script",attrs:{type:"module",src:L.posix.join(e.base,Gm)}}],!0)),!this.environment.config.build.cssCodeSplit){let O=mc.get(e),R=O&&Object.values(o).find(I=>I.type==="asset"&&I.names.includes(O));R&&(b=Hr(b,[{tag:"link",attrs:{rel:"stylesheet",crossorigin:!0,href:E(R.fileName)}}]))}let x,T;for(dh.lastIndex=0;x=dh.exec(b);){T||=new Ie(b);let{0:O,1:R}=x,I=bu.get(R);T.update(x.index,x.index+O.length,I)}T&&(b=T.toString()),b=await Ac(b,[...n,...r],this,{path:"/"+w,filename:y,bundle:o,chunk:_}),b=b.replace(Vn,(O,R,I="")=>{let M=this.getFileName(R);return _&&_.viteMetadata.importedAssets.add(he(M)),Tt(E(M))+I}),b=b.replace(Ui,(O,R)=>{let I=v(yB(R,e));return Tt($S.canParse(I)?I:re(I))}),_&&C&&c.add(_.fileName);let k=re(L.relative(e.root,y));this.emitFile({type:"asset",originalFileName:y,fileName:k,source:b})}for(let y of c)delete o[y]}}}function IA(e){return e.split(T$).map(t=>t.toLowerCase())}function RA(e){let t=e.attrs.find(n=>n.prefix===void 0&&n.name==="style"&&(n.value.includes("url(")||n.value.includes("image-set(")));if(t)return{attr:t,location:e.sourceCodeLocation?.attrs?.style}}function kA(e){let t=e.sourceCodeLocation.startOffset,n=vs(e.value),r=[],s;for(ph.lastIndex=0;s=ph.exec(n);){let[,[i,a]]=s.indices,o=i+1,l=a-1;r.push({start:o+t,end:l+t,url:e.value.slice(o,l)})}return r}function TA(e){return(t,n)=>{let r=t.search(_A);if(r<0)return;let s=t.search(Pr);if(!(s<0)&&s<r){let i=re(L.relative(e.root,n.filename));e.logger.warnOnce(j.default.yellow(j.default.bold(`(!) <script type="importmap"> should come before <script type="module"> and <link rel="modulepreload"> in /${i}`)))}}}function OA(e){let t=new TextDecoder;return function(n,{bundle:r}){let s=e.command==="build"&&e.environments.client.build.chunkImportMap;if(Pr.test(n)){let i;n=n.replace(_A,a=>(i=a,"")),i&&(n=n.replace(Pr,a=>`${i}
|
|
276
|
-
${a}`),s&&this.warn("The `build.chunkImportMap` option is enabled but an import map also exists in the input HTML file. This leads to multiple import maps generated in the output HTML, which is not supported by older browsers and Firefox."))}if(s){let i=e.html?.cspNonce,a=r[To(e.environments.client)],o=NA({tag:"script",attrs:{type:"importmap",...i?{nonce:i}:{}},children:typeof a.source=="string"?a.source:t.decode(a.source)});Pr.test(n)?n=n.replace(Pr,l=>`${o}
|
|
277
|
-
${l}`):n=`${o}
|
|
278
|
-
${n}`}return n}}function BA(e){return()=>{if(e.html?.cspNonce)return[{tag:"meta",injectTo:"head",attrs:{property:"csp-nonce",nonce:e.html.cspNonce}}]}}function $A(e){let t=/%(\S+?)%/g,n=ty({envPrefix:e.envPrefix}),r={...e.env};for(let s in e.define)if(s.startsWith("import.meta.env.")){let i=e.define[s];if(typeof i=="string")try{let a=JSON.parse(i);r[s.slice(16)]=typeof a=="string"?a:i}catch{r[s.slice(16)]=i}else r[s.slice(16)]=JSON.stringify(i)}return(s,i)=>s.replace(t,(a,o)=>{if(o in r)return r[o];if(n.some(l=>o.startsWith(l))){let l=re(L.relative(e.root,i.filename));e.logger.warn(j.default.yellow(j.default.bold(`(!) ${a} is not defined in env variables found in /${l}. Is the variable mistyped?`)))}return a})}function MA(e){let t=new Set(["stylesheet","modulepreload","preload"]);return async(n,{filename:r})=>{let s=e.html?.cspNonce;if(!s)return;let i=new Ie(n);return await Su(n,r,e.logger.warn,a=>{if(!ko(a))return;let{nodeName:o,attrs:l,sourceCodeLocation:c}=a;if(o==="script"||o==="style"||o==="link"&&l.some(u=>u.name==="rel"&&IA(u.value).some(f=>t.has(f)))){if(l.some(({name:d})=>d==="nonce"))return;let u=c.startTag.endOffset,f=n[u-2]==="/"?2:1;i.appendRight(u-f,` nonce="${s}"`)}}),i.toString()}}function DA(e){let t=[],n=[],r=[];for(let s of e){let i=s.transformIndexHtml;if(i)if(typeof i=="function")n.push(i);else{let a=i.handler;i.order==="pre"?t.push(a):i.order==="post"?r.push(a):n.push(a)}}return[t,n,r]}var j$=new Set(["title","base","link","style","meta","script","noscript","template"]);function Q$(e,t){if(!e.length)return;let{logger:n}=t.server?.config||{},r=e.filter(s=>!j$.has(s.tag));if(r.length){let s=Jn(r.map(i=>`<${i.tag}>`));n?.warn(j.default.yellow(j.default.bold(`[${s.join(",")}] can not be used inside the <head> Element, please check the 'injectTo' value`)))}}async function Ac(e,t,n,r){for(let s of t){let i=await s.call(n,e,r);if(i)if(typeof i=="string")e=i;else{let a;Array.isArray(i)?a=i:(e=i.html||e,a=i.tags);let o,l,c,u;for(let f of a)switch(f.injectTo){case"body":(c??=[]).push(f);break;case"body-prepend":(u??=[]).push(f);break;case"head":(o??=[]).push(f);break;default:(l??=[]).push(f)}Q$([...o||[],...l||[]],r),l&&(e=Hr(e,l,!0)),o&&(e=Hr(e,o)),u&&(e=Eh(e,u,!0)),c&&(e=Eh(e,c))}}return e}var wl=/\s+|\/\*[\s\S]*?\*\/|\/\/[^\n]*(?:\n|$)|import\s*(?:"(?:[^"\\\n]|\\.)*"|'(?:[^'\\\n]|\\.)*')\s*;*/y;function U$(e){for(wl.lastIndex=0;wl.lastIndex<e.length;)if(!wl.test(e))return!1;return!0}function hh(e,t){return t.base==="./"||t.base===""?L.posix.join(L.posix.relative(e,"").slice(0,-2),"./"):t.base}var Gi=/([ \t]*)<\/head>/i,mh=/([ \t]*)<head[^>]*>/i,gh=/<\/html>/i,yh=/([ \t]*)<html[^>]*>/i,Ah=/([ \t]*)<\/body>/i,zi=/([ \t]*)<body[^>]*>/i,wh=/<!doctype html>/i;function Hr(e,t,n=!1){if(t.length===0)return e;if(n){if(mh.test(e))return e.replace(mh,(r,s)=>`${r}
|
|
279
|
-
${ct(t,is(s))}`)}else{if(Gi.test(e))return e.replace(Gi,(r,s)=>`${ct(t,is(s))}${r}`);if(zi.test(e))return e.replace(zi,(r,s)=>`${ct(t,s)}
|
|
280
|
-
${r}`)}return PA(e,t)}function Eh(e,t,n=!1){return t.length===0?e:n?zi.test(e)?e.replace(zi,(r,s)=>`${r}
|
|
281
|
-
${ct(t,is(s))}`):Gi.test(e)?e.replace(Gi,(r,s)=>`${r}
|
|
282
|
-
${ct(t,s)}`):PA(e,t):Ah.test(e)?e.replace(Ah,(r,s)=>`${ct(t,is(s))}${r}`):gh.test(e)?e.replace(gh,`${ct(t)}
|
|
283
|
-
$&`):e+`
|
|
284
|
-
`+ct(t)}function PA(e,t){return yh.test(e)?e.replace(yh,`$&
|
|
285
|
-
${ct(t)}`):wh.test(e)?e.replace(wh,`$&
|
|
286
|
-
${ct(t)}`):ct(t)+e}var H$=new Set(["link","meta","base"]);function NA({tag:e,attrs:t,children:n},r=""){return H$.has(e)?`<${e}${vh(t)}>`:`<${e}${vh(t)}>${ct(n,is(r))}</${e}>`}function ct(e,t=""){return typeof e=="string"?e:e&&e.length?e.map(n=>`${t}${NA(n,t)}
|
|
287
|
-
`).join(""):""}function vh(e){let t="";for(let n in e)typeof e[n]=="boolean"?t+=e[n]?` ${n}`:"":t+=` ${n}="${(0,jy.default)(e[n])}"`;return t}function is(e=""){return`${e}${e[0]===" "?" ":" "}`}function To(e){let t=e.build.rolldownOptions.experimental?.chunkImportMap;return typeof t=="object"&&t.fileName?t.fileName:"importmap.json"}function W$(e){let t=e.build.rolldownOptions.experimental?.chunkImportMap;return typeof t=="object"&&t.baseUrl?t.baseUrl:"/"}function wc(e,t){let n=e[To(t)];if(!n)return;let r=JSON.parse(typeof n.source=="string"?n.source:new TextDecoder().decode(n.source)),s=W$(t);return{asset:n,content:r,mapping:Object.fromEntries(Object.entries(r.imports).map(([i,a])=>[i.slice(s.length),a.slice(s.length)]))}}var LA=Re("vite:cache"),G$=new Set(["/","/favicon.ico"]),z$=new Set(["document","iframe","frame","fencedframe"]);function FA(e){let t=e.headers["sec-fetch-dest"];return t!==void 0&&z$.has(t)}var jA=/[?&]url\b/,J$=/[?&]raw\b/,K$=/[?&]inline\b/,V$=/\.svg\b/;function q$(e,t){return J$.test(t)||jA.test(t)||K$.test(t)||V$.test(t)?Kn(e,he(t))!=="allowed"||Kn(e,t)!=="allowed":!1}function Y$(e){return function(n,r,s){let i=e.environments.client;if(FA(n))return r.appendHeader("Vary","Sec-Fetch-Dest"),s();let a=n.headers["if-none-match"];if(a){let o=i.moduleGraph.getModuleByEtag(a);if(o?.transformResult?.etag===a&&o.url===n.url&&!Mt(n.url))return LA?.(`[304] ${ut(n.url,e.config.root)}`),r.statusCode=304,r.end()}s()}}function X$(e){let{root:t,publicDir:n}=e.config,r=n.startsWith(Me(t)),s=`${n.slice(t.length)}/`;return async function(o,l,c){let u=e.environments.client;if(o.method!=="GET"&&o.method!=="HEAD"||G$.has(o.url)||FA(o))return c();let f;try{f=decodeURI(yt(o.url)).replace(Vr,"\0")}catch(p){return p instanceof URIError?(e.config.logger.warn(j.default.yellow(`Malformed URI sequence in request URL: ${yt(o.url)}`)),c()):c(p)}let d=he(f);try{if(d.endsWith(".map")){let p=u.depsOptimizer;if(p?.isOptimizedDepUrl(f)){let h=f.startsWith(Fe)?rr(f):re(L.resolve(e.config.root,f.slice(1)));if(!p.isOptimizedDepFile(h))return c();try{let y=JSON.parse(await Ee.readFile(h,"utf-8"));return Dy(y,h,e.config.server.sourcemapIgnoreList,e.config.logger),Fn(o,l,JSON.stringify(y),"json",{headers:e.config.server.headers})}catch{let y={version:3,file:h.replace(/\.map$/,""),sources:[],sourcesContent:[],names:[],mappings:";;;;;;;;;"};return Fn(o,l,JSON.stringify(y),"json",{cacheControl:"no-cache",headers:e.config.server.headers})}}else{let h=f.replace(/\.map($|\?)/,"$1"),y=(await u.moduleGraph.getModuleByUrl(h))?.transformResult?.map;return y?Fn(o,l,JSON.stringify(y),"json",{headers:e.config.server.headers}):c()}}if(r&&f.startsWith(s)&&i(f),o.headers["sec-fetch-dest"]==="script"||ho(f)||Yl(f)||Mt(f)||O$(f)){if(f=ln(f),f=Qt(f),Mt(f)){o.headers.accept?.includes("text/css")&&!FB(f)&&(f=Le(f,"direct"));let h=o.headers["if-none-match"];if(h&&(await u.moduleGraph.getModuleByUrl(f))?.transformResult?.etag===h)return LA?.(`[304] ${ut(f,e.config.root)}`),l.statusCode=304,l.end()}let p=await u.transformRequest(f);if(p){let h=u.depsOptimizer,y=Ro(f)?"css":"js",m=Gn.test(f)||h?.isOptimizedDepUrl(f);return Fn(o,l,p.code,y,{etag:p.etag,cacheControl:m?"max-age=31536000,immutable":"no-cache",headers:e.config.server.headers,map:p.map})}}}catch(p){if(p?.code==="ERR_OPTIMIZE_DEPS_PROCESSING_ERROR"){l.writableEnded||(l.statusCode=504,l.statusMessage="Optimize Deps Processing Error",l.end()),e.config.logger.error(p.message);return}if(p?.code==="ERR_OUTDATED_OPTIMIZED_DEP"){l.writableEnded||(l.statusCode=504,l.statusMessage="Outdated Optimize Dep",l.end());return}if(p?.code==="ERR_CLOSED_SERVER"){l.writableEnded||(l.statusCode=504,l.statusMessage="Outdated Request",l.end());return}if(p?.code==="ERR_FILE_NOT_FOUND_IN_OPTIMIZED_DEP_DIR"){l.writableEnded||(l.statusCode=404,l.end()),e.config.logger.warn(j.default.yellow(p.message));return}if(p?.code==="ERR_LOAD_URL")return c();if(p?.code==="ERR_DENIED_ID"){let h=p.id,y=Kn(e.config,he(h));if(y==="allowed"&&(y=Kn(e.config,h)),y==="denied")return Co(h,e,l),!0;if(y==="fallback")return c(),!0;throw new Error(`Unexpected access result for id ${h}`)}return c(p)}c()};function i(a){let o;if(Yl(a)){let l=ln(a);jA.test(a)?o=`Assets in the public directory are served at the root path.
|
|
288
|
-
Instead of ${j.default.cyan(l)}, use ${j.default.cyan(l.replace(s,"/"))}.`:o=`Assets in public directory cannot be imported from JavaScript.
|
|
289
|
-
If you intend to import that asset, put the file in the src directory, and use ${j.default.cyan(l.replace(s,"/src/"))} instead of ${j.default.cyan(l)}.
|
|
290
|
-
If you intend to use the URL of that asset, use ${j.default.cyan(Le(l.replace(s,"/"),"url"))}.`}else o=`Files in the public directory are served at the root path.
|
|
291
|
-
Instead of ${j.default.cyan(a)}, use ${j.default.cyan(a.replace(s,"/"))}.`;e.config.logger.warn(j.default.yellow(o))}}var Z$=/\.json(?:$|\?)/,eM=e=>Z$.test(e),tM=/(?<!\\)\\\./g;function nM(e){let t=e.command==="build",n=t&&e.build.lib,r={};if(!n){let o=process.env.NODE_ENV||e.mode;Object.assign(r,{"process.env":"{}","global.process.env":"{}","globalThis.process.env":"{}","process.env.NODE_ENV":JSON.stringify(o),"global.process.env.NODE_ENV":JSON.stringify(o),"globalThis.process.env.NODE_ENV":JSON.stringify(o)})}function s(o){let l=o.config.isBundled,c=o.config.keepProcessEnv,u={},f={},d={};if(t&&(u["import.meta.hot"]="undefined"),l){for(let g in e.env){let E=JSON.stringify(e.env[g]);u[`import.meta.env.${g}`]=E,f[g]=E}u["import.meta.env.SSR"]="undefined",d["import.meta.env"]="undefined"}let p={},h={};for(let g in o.config.define)p[g]=UA(o.config.define[g]),t&&g.startsWith("import.meta.env.")&&(h[g.slice(16)]=o.config.define[g]);let y={...c?{}:r,...u,...p,...d},m=o.config.consumer==="server";"import.meta.env.SSR"in y&&(y["import.meta.env.SSR"]=m+"");let w=xu({...f,SSR:m+"",...h}),A=Object.keys(p);return!c&&Object.keys(r).length&&A.push("process.env"),Object.keys(u).length&&A.push("import.meta.env","import.meta.hot"),[y,A.length?new RegExp(A.map(g=>vo(g).replaceAll(tM,"\\??\\.")).join("|")):null,w]}let i=new WeakMap;function a(o){let l=i.get(o);return l||(l=s(o),i.set(o,l)),l}return{name:"vite:define",applyToEnvironment(o){return o.config.isBundled?{name:"vite:define",options(l){let[c,u,f]=a(this.environment);c["import.meta.env"]=f,c["import.meta.env.*"]="undefined",l.transform??={},l.transform.define={...l.transform.define,...c}}}:!0},transform:{handler(o,l){if(this.environment.config.consumer==="client"||B$(l)||Mt(l)||eM(l)||e.assetsInclude(l))return;let[c,u]=a(this.environment);if(u&&(u.lastIndex=0,!!u.test(o)))return QA(this.environment,o,l,c)}}}}function QA(e,t,n,r){let s=xn(n,t,{lang:"js",sourceType:"module",define:r,sourcemap:e.config.command==="build"?!!e.config.build.sourcemap:!0,tsconfig:!1});if(s.errors.length>0)throw new AggregateError(s.errors,"oxc transform error");return{code:s.code,map:s.map||null}}function xu(e){let t="{",n=Object.keys(e).sort();for(let r=0;r<n.length;r++){let s=n[r],i=e[s];t+=`${JSON.stringify(s)}: ${UA(i)}`,r!==n.length-1&&(t+=", ")}return t+"}"}function UA(e){return typeof e>"u"?"undefined":typeof e=="string"?e:JSON.stringify(e)}var rM=re(Ct),sM=re($x),iM=re(oo);function oM(e){let t,n=_s(r=>{let s={};for(let o in r.config.define)o.startsWith("import.meta.env.")||(s[o]=r.config.define[o]);let i=xu(s),a=()=>i;return o=>o.replace("__DEFINES__",a)});return{name:"vite:client-inject",applyToEnvironment(r){return!r.config.isBundled},async buildStart(){t=await HA(e)},transform(r,s){let i=this.environment.config.consumer==="server",a=he(s);if(a===rM||a===iM)return n(this)(t(r));if(!i&&r.includes("process.env.NODE_ENV")){let o=this.environment.config.define?.["process.env.NODE_ENV"]||JSON.stringify(process.env.NODE_ENV||e.mode);return QA(this.environment,r,s,{"process.env.NODE_ENV":o,"global.process.env.NODE_ENV":o,"globalThis.process.env.NODE_ENV":o})}}}}function it(e){let t=JSON.stringify(e);return()=>t}async function HA(e){let t=(await zc(e.server.host)).name,n=e.server.port,r=e.base,s=`${t}:${n}${r}`,i=ke(e.server.ws)?e.server.ws:void 0,a=i?.host||null,o=i?.protocol||null,l=i?.timeout||3e4,c=!!i?.server,u=L.basename(e.configFile||"vite.config.js"),f=(ke(e.server.hmr)?e.server.hmr:void 0)?.overlay!==!1,d=i?.clientPort||i?.port||null;e.server.middlewareMode&&!c&&(d||=24678);let p=i?.host||t;p+=`:${i?.port||n}`,p+=r;let h=r;i?.path&&(h=L.posix.join(h,i.path));let y=it(e.mode),m=it(r),w=it(s),A=it(o),g=it(a),E=it(d),v=it(p),S=it(h),b=it(l),_=it(f),C=it(u),x=it(e.webSocketToken),T=it(e.server.forwardConsole);return k=>k.replace("__MODE__",y).replace(/__BASE__/g,m).replace("__SERVER_HOST__",w).replace("__HMR_PROTOCOL__",A).replace("__HMR_HOSTNAME__",g).replace("__HMR_PORT__",E).replace("__HMR_DIRECT_TARGET__",v).replace("__HMR_BASE__",S).replace("__HMR_TIMEOUT__",b).replace("__HMR_ENABLE_OVERLAY__",_).replace("__HMR_CONFIG_NAME__",C).replace("__WS_TOKEN__",x).replace("__SERVER_FORWARD_CONSOLE__",T)}async function WA(e){let t=pe.readFileSync(sM,"utf-8");return(await HA(e))(t).replace(/import\s*['"]@vite\/env['"]/,"")}function aM(e){let[t,n,r]=DA(e.plugins),s=[TA(e),BA(e),...t,$A(e),dM,...n,...r,MA(e),OA(e)],i=new Sn({...bn,watchMode:!0},e.logger);return(a,o,l,c)=>Ac(l,s,i,{path:o,filename:lM(o,a),server:a,originalUrl:c})}function lM(e,t){return e.startsWith(Fe)?decodeURIComponent(rr(e)):decodeURIComponent(re(L.join(t.config.root,e.slice(1))))}function cM(e,t){return!et(e,t)&&(ho(e)||Mt(e))}var uM=/\w/;function _h(e){return uM.test(e[0])&&!e.includes(":")}function fM(e){return e.endsWith("/")?e:L.posix.dirname(e)}var El=(e,t,n,r,s,i,a)=>{let o=l=>{(l[0]==="/"&&l[1]!=="/"||(l[0]==="."||_h(l))&&s&&s!=="/"&&r==="/index.html")&&(l=L.posix.join(n.base,l));let c;if(!a&&cM(l,n)&&(l[0]==="/"&&l[1]!=="/"?c=l:(l[0]==="."||_h(l))&&(c=L.posix.join(n.base,fM(r),l))),i){let u=i.environments.client.moduleGraph.urlToModuleMap.get(un(c||l,n.decodedBase));u&&u.lastHMRTimestamp>0&&(l=Le(l,`t=${u.lastHMRTimestamp}`))}if(i&&c){try{c=decodeURI(c)}catch{return l}GA(i,c,n.decodedBase)}return l};return t?H0(e,({url:l})=>o(l)):o(e)},dM=async(e,{path:t,filename:n,server:r,originalUrl:s})=>{let{config:i,watcher:a}=r,o=i.base||"/",l=i.decodedBase||"/",c,u,f=t.endsWith("/");!f&&pe.existsSync(n)?(c=t.startsWith(Fe)?n:t,u=t):(c=`\0${`${t}${f?"index.html":""}`}`,u=ro(c)),u=ze(l,u);let d=new Ie(e),p=-1,h=decodeURI(he(c).replace(re(i.root),"")),y=[],m=[],w=[],A=(E,v)=>{p++;let S=E.childNodes[0],b=S.value,_;c[0]!=="\0"&&(_=new Ie(e).snip(S.sourceCodeLocation.startOffset,S.sourceCodeLocation.endOffset).generateMap({hires:"boundary"}),_.sources=[n],_.file=n),Ci(i,h,p,{code:b,map:_});let C=`${u}?html-proxy&index=${p}.${v}`;w.push(C),d.update(E.sourceCodeLocation.startOffset,E.sourceCodeLocation.endOffset,`<script type="module" src="${C}"></script>`),GA(r,C,l)};await Su(e,n,i.logger.warn,E=>{if(!ko(E))return;if(E.nodeName==="script"){let{src:b,srcSourceCodeLocation:_,isModule:C,isIgnored:x}=SA(E);if(x)xA(d,E.sourceCodeLocation);else if(b){let T=El(b.value,!1,i,t,s,r,!C);T!==b.value&&Ft(d,_,T)}else if(C&&E.childNodes.length)A(E,"js");else if(E.childNodes.length){let T=E.childNodes[E.childNodes.length-1];for(let{url:k,start:O,end:R}of kA(T)){let I=El(k,!1,i,t,s);I!==k&&d.update(O,R,I)}}}let v=RA(E);if(v&&(p++,m.push({index:p,location:v.location,code:v.attr.value})),E.nodeName==="style"&&E.childNodes.length){let b=E.childNodes[0];y.push({start:b.sourceCodeLocation.startOffset,end:b.sourceCodeLocation.endOffset,code:b.value})}let S=zy(E,i.html?.additionalAssetSources);for(let b of S)if(b.type==="remove")d.remove(b.location.startOffset,b.location.endOffset);else{let _=El(b.value,b.type==="srcset",i,t,s);_!==b.value&&Ft(d,b.location,_)}});let g=r?.environments.client.moduleGraph;return g&&await Promise.all(w.map(async E=>{let v=await g.getModuleByUrl(E);v&&g.invalidateModule(v)})),await Promise.all([...y.map(async({start:E,end:v,code:S},b)=>{let _=`${c}?html-proxy&direct&index=${b}.css`,C=await r.environments.client.moduleGraph.ensureEntryFromUrl(_,!1);zn(a,C.file,i.root);let x=await r.environments.client.pluginContainer.transform(S,C.id),T="";x.map&&"version"in x.map?(x.map.mappings&&await ru(x.map,c,i.logger),T=ji("css",x.code,x.map)):T=x.code,d.overwrite(E,v,T)}),...m.map(async({index:E,location:v,code:S})=>{let b=`${c}?html-proxy&inline-css&style-attr&index=${E}.css`,_=await r.environments.client.moduleGraph.ensureEntryFromUrl(b,!1);zn(a,_.file,i.root),await r?.environments.client.pluginContainer.transform(S,_.id);let C=We(he(_.id)),x=bu.get(`${C}_${E}`);Ft(d,v,x??"")})]),e=d.toString(),{html:e,tags:[{tag:"script",attrs:{type:"module",src:L.posix.join(o,ds)},injectTo:"head-prepend"}]}};function pM(e,t){let n=Ug(t),r=n&&t.environments.client.bundledDev;return async function(i,a,o){if(a.writableEnded)return o();let l=i.url&&he(i.url);if(l?.endsWith(".html")&&i.headers["sec-fetch-dest"]!=="script"){if(r){let u;try{u=decodeURIComponent(l)}catch{return o()}let f=u.slice(1),d=r.memoryFiles.get(f);if(!d&&r.hasBuildOutput||(["document","iframe","frame","fencedframe","",void 0].includes(i.headers["sec-fetch-dest"])&&(await r.triggerBundleRegenerationIfStale()||d===void 0)&&(d={source:await hM(t)}),!d))return o();let p=typeof d.source=="string"?d.source:Buffer.from(d.source),h=t.config.server.headers;return Fn(i,a,p,"html",{headers:h,etag:d.etag})}let c;if(n&&l.startsWith(Fe)?c=decodeURIComponent(rr(l)):c=re(L.resolve(L.join(e,decodeURIComponent(l)))),n){let u=Kn(t.config,c);if(u==="denied")return Co(c,t,a);if(u==="fallback")return o()}else if(!En(e,c))return o();if(pe.existsSync(c)){let u=n?t.config.server.headers:t.config.preview.headers;try{let f=await Ee.readFile(c,"utf-8");return n&&(f=await t.transformIndexHtml(l,f,i.originalUrl)),Fn(i,a,f,"html",{headers:u})}catch(f){return o(f)}}}o()}}function GA(e,t,n){e.config.server.preTransformRequests&&(t=Qt(un(t,n)),e.warmupRequest(t))}async function hM(e){return`
|
|
292
|
-
<!DOCTYPE html>
|
|
293
|
-
<html lang="en">
|
|
294
|
-
<head>
|
|
295
|
-
<script>globalThis.__vite_is_fallback_page__ = true</script>
|
|
296
|
-
<script type="module">
|
|
297
|
-
${(await WA(e.config)).replaceAll("</script>","<\\/script>")}
|
|
298
|
-
</script>
|
|
299
|
-
<style>
|
|
300
|
-
:root {
|
|
301
|
-
--page-bg: #ffffff;
|
|
302
|
-
--text-color: #1d1d1f;
|
|
303
|
-
--spinner-track: #f5f5f7;
|
|
304
|
-
--spinner-accent: #0071e3;
|
|
305
|
-
}
|
|
306
|
-
@media (prefers-color-scheme: dark) {
|
|
307
|
-
:root {
|
|
308
|
-
--page-bg: #1e1e1e;
|
|
309
|
-
--text-color: #f5f5f5;
|
|
310
|
-
--spinner-track: #424242;
|
|
311
|
-
}
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
body {
|
|
315
|
-
margin: 0;
|
|
316
|
-
min-height: 100vh;
|
|
317
|
-
display: flex;
|
|
318
|
-
background-color: var(--page-bg);
|
|
319
|
-
color: var(--text-color);
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
.container {
|
|
323
|
-
margin: auto;
|
|
324
|
-
padding: 2rem;
|
|
325
|
-
text-align: center;
|
|
326
|
-
border-radius: 1rem;
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
.spinner {
|
|
330
|
-
width: 3rem;
|
|
331
|
-
height: 3rem;
|
|
332
|
-
margin: 2rem auto;
|
|
333
|
-
border: 3px solid var(--spinner-track);
|
|
334
|
-
border-top-color: var(--spinner-accent);
|
|
335
|
-
border-radius: 50%;
|
|
336
|
-
animation: spin 1s linear infinite;
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
@keyframes spin { to { transform: rotate(360deg) } }
|
|
340
|
-
</style>
|
|
341
|
-
</head>
|
|
342
|
-
<body>
|
|
343
|
-
<div class="container">
|
|
344
|
-
<h1>Bundling in progress</h1>
|
|
345
|
-
<p>The page will automatically reload when ready.</p>
|
|
346
|
-
<div class="spinner"></div>
|
|
347
|
-
</div>
|
|
348
|
-
</body>
|
|
349
|
-
</html>
|
|
350
|
-
`}var mM=Re("vite:time");function gM(e){return function(n,r,s){let i=Je.now(),a=r.end;r.end=(...o)=>(mM?.(`${Rt(i)} ${ut(n.url,e)}`),a.call(r,...o)),s()}}var yM=Object.freeze({}),AM=class{_moduleGraph;_clientModule;_ssrModule;constructor(e,t,n){this._moduleGraph=e,this._clientModule=t,this._ssrModule=n}_get(e){return this._clientModule?.[e]??this._ssrModule?.[e]}_set(e,t){this._clientModule&&(this._clientModule[e]=t),this._ssrModule&&(this._ssrModule[e]=t)}_wrapModuleSet(e,t){return t?vM(this._moduleGraph,e,t):new Set}_getModuleSetUnion(e){let t=new Set,n=new Set;if(this._clientModule)for(let r of this._clientModule[e])r.id&&n.add(r.id),t.add(this._moduleGraph.getBackwardCompatibleModuleNode(r));if(this._ssrModule)for(let r of this._ssrModule[e])r.id&&!n.has(r.id)&&t.add(this._moduleGraph.getBackwardCompatibleModuleNode(r));return t}_getModuleInfoUnion(e){let t=this._clientModule?.[e],n=this._ssrModule?.[e];if(!(t==null&&n==null))return new Proxy({},{get:(r,s)=>{if(s==="meta")return this.meta||yM;if(t&&s in t)return t[s];if(n&&s in n)return n[s]}})}_getModuleObjectUnion(e){let t=this._clientModule?.[e],n=this._ssrModule?.[e];if(t==null&&n==null)return;let r={};return n&&Object.assign(r,n),t&&Object.assign(r,t),r}get url(){return this._get("url")}set url(e){this._set("url",e)}get id(){return this._get("id")}set id(e){this._set("id",e)}get file(){return this._get("file")}set file(e){this._set("file",e)}get type(){return this._get("type")}get info(){return this._getModuleInfoUnion("info")}get meta(){return this._getModuleObjectUnion("meta")}get importers(){return this._getModuleSetUnion("importers")}get clientImportedModules(){return this._wrapModuleSet("importedModules",this._clientModule)}get ssrImportedModules(){return this._wrapModuleSet("importedModules",this._ssrModule)}get importedModules(){return this._getModuleSetUnion("importedModules")}get acceptedHmrDeps(){return this._wrapModuleSet("acceptedHmrDeps",this._clientModule)}get acceptedHmrExports(){return this._clientModule?.acceptedHmrExports??null}get importedBindings(){return this._clientModule?.importedBindings??null}get isSelfAccepting(){return this._clientModule?.isSelfAccepting}get transformResult(){return this._clientModule?.transformResult??null}set transformResult(e){this._clientModule&&(this._clientModule.transformResult=e)}get ssrTransformResult(){return this._ssrModule?.transformResult??null}set ssrTransformResult(e){this._ssrModule&&(this._ssrModule.transformResult=e)}get ssrModule(){return this._ssrModule?.ssrModule??null}get ssrError(){return this._ssrModule?.ssrError??null}get lastHMRTimestamp(){return Math.max(this._clientModule?.lastHMRTimestamp??0,this._ssrModule?.lastHMRTimestamp??0)}set lastHMRTimestamp(e){this._clientModule&&(this._clientModule.lastHMRTimestamp=e),this._ssrModule&&(this._ssrModule.lastHMRTimestamp=e)}get lastInvalidationTimestamp(){return Math.max(this._clientModule?.lastInvalidationTimestamp??0,this._ssrModule?.lastInvalidationTimestamp??0)}get invalidationState(){return this._clientModule?.invalidationState}get ssrInvalidationState(){return this._ssrModule?.invalidationState}};function os(e,t){return{[Symbol.iterator](){return this},next(){let n=e.next();return n.done?n:{value:t(n.value),done:!1}}}}var wM=class{_moduleGraphs;get _client(){return this._moduleGraphs.client()}get _ssr(){return this._moduleGraphs.ssr()}urlToModuleMap;idToModuleMap;etagToModuleMap;fileToModulesMap;moduleNodeCache=new EM;constructor(e){this._moduleGraphs=e;let t=n=>()=>{if(this._ssr[n].size===0)return this._client[n];let r=new Map(this._client[n]);for(let[s,i]of this._ssr[n])r.has(s)||r.set(s,i);return r};this.urlToModuleMap=vl(this,"urlToModuleMap",t("urlToModuleMap")),this.idToModuleMap=vl(this,"idToModuleMap",t("idToModuleMap")),this.etagToModuleMap=vl(this,"etagToModuleMap",()=>this._client.etagToModuleMap),this.fileToModulesMap=_M(this)}getModuleById(e){let t=this._client.getModuleById(e),n=this._ssr.getModuleById(e);if(!(!t&&!n))return this.getBackwardCompatibleModuleNodeDual(t,n)}async getModuleByUrl(e,t){let[n,r]=await Promise.all([this._client.getModuleByUrl(e),this._ssr.getModuleByUrl(e)]);if(!(!n&&!r))return this.getBackwardCompatibleModuleNodeDual(n,r)}getModulesByFile(e){let t=this._client.getModulesByFile(e),n=this._ssr.getModulesByFile(e);if(!t&&!n)return;let r=new Set;if(t)for(let s of t)r.add(this.getBackwardCompatibleBrowserModuleNode(s));if(n)for(let s of n)(s.id==null||!this._client.getModuleById(s.id))&&r.add(this.getBackwardCompatibleServerModuleNode(s));return r}onFileChange(e){this._client.onFileChange(e),this._ssr.onFileChange(e)}onFileDelete(e){this._client.onFileDelete(e),this._ssr.onFileDelete(e)}_getModuleGraph(e){switch(e){case"client":return this._client;case"ssr":return this._ssr;default:throw new Error(`Invalid module node environment ${e}`)}}invalidateModule(e,t=new Set,n=Wt(),r=!1,s=!1){e._clientModule&&this._client.invalidateModule(e._clientModule,new Set([...t].map(i=>i._clientModule).filter(Boolean)),n,r,s),e._ssrModule&&this._ssr.invalidateModule(e._ssrModule,new Set([...t].map(i=>i._ssrModule).filter(Boolean)),n,r,s)}invalidateAll(){this._client.invalidateAll(),this._ssr.invalidateAll()}async ensureEntryFromUrl(e,t,n=!0){let r=await(t?this._ssr:this._client).ensureEntryFromUrl(e,n);return this.getBackwardCompatibleModuleNode(r)}createFileOnlyEntry(e){let t=this._client.createFileOnlyEntry(e),n=this._ssr.createFileOnlyEntry(e);return this.getBackwardCompatibleModuleNodeDual(t,n)}async resolveUrl(e,t){return t?this._ssr.resolveUrl(e):this._client.resolveUrl(e)}updateModuleTransformResult(e,t,n){let r=n?"ssr":"client";this._getModuleGraph(r).updateModuleTransformResult(r==="client"?e._clientModule:e._ssrModule,t)}getModuleByEtag(e){let t=this._client.etagToModuleMap.get(e);return t&&this.getBackwardCompatibleBrowserModuleNode(t)}getBackwardCompatibleBrowserModuleNode(e){return this.getBackwardCompatibleModuleNodeDual(e,e.id?this._ssr.getModuleById(e.id):void 0)}getBackwardCompatibleServerModuleNode(e){return this.getBackwardCompatibleModuleNodeDual(e.id?this._client.getModuleById(e.id):void 0,e)}getBackwardCompatibleModuleNode(e){return e.environment==="client"?this.getBackwardCompatibleBrowserModuleNode(e):this.getBackwardCompatibleServerModuleNode(e)}getBackwardCompatibleModuleNodeDual(e,t){let n=this.moduleNodeCache.get(e,t);if(n)return n;let r=new AM(this,e,t);return this.moduleNodeCache.set(e,t,r),r}},EM=class{map=new WeakMap;undefinedKey={};get(e,t){let n=e??this.undefinedKey,r=t??this.undefinedKey;return this.map.get(n)?.get(r)}set(e,t,n){let r=e??this.undefinedKey,s=t??this.undefinedKey;this.map.has(r)||this.map.set(r,new Map),this.map.get(r).set(s,n)}};function vM(e,t,n){return{[Symbol.iterator](){return this.keys()},has(r){if(!r.id)return!1;let s=e._getModuleGraph(n.environment).getModuleById(r.id);return s!==void 0&&n[t].has(s)},values(){return this.keys()},keys(){return os(n[t].keys(),r=>e.getBackwardCompatibleModuleNode(r))},get size(){return n[t].size},forEach(r,s){return n[t].forEach(i=>{let a=e.getBackwardCompatibleModuleNode(i);r.call(s,a,a,this)})}}}function vl(e,t,n){return{[Symbol.iterator](){return this.entries()},get(r){let s=e._client[t].get(r),i=e._ssr[t].get(r);if(!(!s&&!i))return e.getBackwardCompatibleModuleNodeDual(s,i)},set(r,s){let i=s._clientModule;i&&e._client[t].set(r,i);let a=s._ssrModule;a&&e._ssr[t].set(r,a)},keys(){return n().keys()},values(){return os(n().values(),r=>e.getBackwardCompatibleModuleNode(r))},entries(){return os(n().entries(),([r,s])=>[r,e.getBackwardCompatibleModuleNode(s)])},get size(){return n().size},forEach(r,s){return n().forEach((i,a)=>{let o=e.getBackwardCompatibleModuleNode(i);r.call(s,o,a,this)})}}}function _M(e){let t=()=>{if(!e._ssr.fileToModulesMap.size)return e._client.fileToModulesMap;let r=new Map(e._client.fileToModulesMap);for(let[s,i]of e._ssr.fileToModulesMap){let a=r.get(s);if(!a)r.set(s,i);else for(let o of i){let l=!1;for(let c of a)if(l||=c.id===o.id,l)break;l||a.add(o)}}return r},n=r=>new Set([...r].map(s=>e.getBackwardCompatibleModuleNode(s)));return{[Symbol.iterator](){return this.entries()},get(r){let s=e._client.fileToModulesMap.get(r),i=e._ssr.fileToModulesMap.get(r);if(!s&&!i)return;let a=s??new Set;if(i){for(let o of i)if(o.id){let l=!1;for(let c of a)if(l||=c.id===o.id,l)break;l||a.add(o)}}return n(a)},keys(){return t().keys()},values(){return os(t().values(),n)},entries(){return os(t().entries(),([r,s])=>[r,n(s)])},get size(){return t().size},forEach(r,s){return t().forEach((i,a)=>{r.call(s,n(i),a,this)})}}}function bM(){return function(t,n){n.statusCode=404,n.end()}}function SM(e,t){let n=[];if(typeof e.host=="string"&&e.host&&n.push(e.host),typeof e.ws=="object"&&e.ws.host&&n.push(e.ws.host),typeof t.host=="string"&&t.host&&n.push(t.host),e.origin)try{let r=new URL(e.origin);n.push(r.hostname)}catch{}return n}function xM(e,t){return hO({allowedHosts:Object.freeze([...e]),generateErrorMessage(n){let r=JSON.stringify(n);return`Blocked request. This host (${r}) is not allowed.
|
|
351
|
-
To allow this host, add ${r} to \`${`${t?"preview":"server"}.allowedHosts`}\` in vite.config.js.`}})}function CM(){return function(t,n,r){if(t.url?.includes("#")){n.writeHead(400),n.end();return}return r()}}function IM(e){let t=e.environments.client.bundledDev,n=t?.memoryFiles;if(!t||!n)throw new Error("memoryFilesMiddleware can only be used for fullBundleMode");let r=e.config.server.headers;return function(i,a,o){let l=he(i.url);if(l.endsWith(".html"))return o();let c;try{c=decodeURIComponent(l)}catch{return o()}let u=c.slice(1),f=n.get(u);if(f){if(f.etag){if(i.headers["if-none-match"]===f.etag){a.statusCode=304,a.end();return}a.setHeader("Etag",f.etag)}let d=su(u);d&&a.setHeader("Content-Type",d);for(let p in r)a.setHeader(p,r[p]);return a.on("finish",()=>t.markPayloadDelivered(u)),a.end(f.source)}o()}}function RM(e){let t=e.environments.client.bundledDev;if(!t)throw new Error("triggerLazyBundlingMiddleware can only be used for fullBundleMode");return async function(r,s,i){if(!r.url?.startsWith("/@vite/lazy?"))return i();let a;try{a=new URL(`http://localhost${r.url}`).searchParams}catch{return i()}let o=a.get("id"),l=a.get("clientId"),c;try{c=await t.triggerLazyBundling(o,l)}catch(u){return e.config.logger.error(`Failed to trigger lazy bundling for ${o} (clientId: ${l}):`+u,{error:u}),i(new Error("Failed to trigger lazy bundling"))}return c==null?i():(s.setHeader("Content-Type","application/javascript"),s.on("finish",()=>t.markPayloadDelivered(c.filename)),s.end(c.code))}}var kM=nt(ik(),1),TM=nt(lk(),1),OM=nt(xk(),1),BM=nt(Dk(),1),$M=Pk(),bh=new WeakSet;async function MM(e){if(e??=(await(0,$M.determineAgent)()).isAgent,e===!1)return{enabled:!1,unhandledErrors:!1,logLevels:[]};if(e===!0)return{enabled:!0,unhandledErrors:!0,logLevels:["error","warn"]};let t=e.unhandledErrors??!0,n=e.logLevels??[];return{enabled:t||n.length>0,unhandledErrors:t,logLevels:n}}function Xj(e={}){return zA(e,{listen:!0})}async function zA(e={},t){tx();let n=LL(e)?e:await oE(e,"serve");if(bh.has(n))throw new Error("There is already a server associated with the config.");if(n.command!=="serve")throw new Error('Config was resolved for a "build", expected a "serve" command.');bh.add(n);let r=sO(n),{root:s,server:i}=n,a=await Lk(n.server.https),{middlewareMode:o}=i,l=Sy(n.root,n.build.outDir,n.build.rolldownOptions.output),c=xy(n.build.emptyOutDir,n.root,l),u=tO({disableGlobbing:!0,...i.watch},l,c,n.cacheDir),f=(0,kM.default)(),d=o?null:await Nk(f,a),p=AO(d,n,a),h=await r,{publicDir:y}=n;d&&Uk(d,n.logger);let m=i.watch!==null?OM.watch([...n.experimental.bundledDev?[]:[s],...n.configFileDependencies,...qc(n.mode,n.envDir),...y&&h?[y]:[]],u):rO(u),w={};await Promise.all(Object.entries(n.environments).map(async([F,G])=>{let P=await G.dev.createEnvironment(F,n,{ws:p});w[F]=P,await P.init({watcher:m,previousInstance:t.previousEnvironments?.[P.name]})}));let A=new wM({client:()=>w.client.moduleGraph,ssr:()=>w.ssr.moduleGraph}),g=yP(w),E=PM(d),v=aM(n),S,b=async()=>{o||dI(T),await Promise.allSettled([m.close(),p.close(),Promise.allSettled(Object.values(C.environments).map(F=>F.close())),E(),C._ssrCompatModuleRunner?.close()]),C.resolvedUrls=null,C._ssrCompatModuleRunner=void 0},_=p,C={config:n,middlewares:f,httpServer:d,watcher:m,ws:p,get hot(){return Xe(n,"removeServerHot"),_},set hot(F){_=F},environments:w,get pluginContainer(){return Xe(n,"removeServerPluginContainer"),g},set pluginContainer(F){g=F},get moduleGraph(){return Xe(n,"removeServerModuleGraph"),A},set moduleGraph(F){A=F},resolvedUrls:null,ssrTransform(F,G,P,z=F){return gy(F,G,P,z,{json:{stringify:n.json.stringify===!0&&n.json.namedExports!==!0}})},transformRequest(F,G){return Xe(n,"removeServerTransformRequest"),C.environments[G?.ssr?"ssr":"client"].transformRequest(F)},warmupRequest(F,G){return Xe(n,"removeServerWarmupRequest"),C.environments[G?.ssr?"ssr":"client"].warmupRequest(F)},transformIndexHtml(F,G,P){return v(C,F,G,P)},async ssrLoadModule(F,G){return Xe(n,"removeSsrLoadModule"),Kk(F,C,G?.fixStacktrace)},ssrFixStacktrace(F){Xe(n,"removeSsrLoadModule","ssrFixStacktrace doesn't need to be used for Environment Module Runners."),fy(F,C.environments.ssr.moduleGraph)},ssrRewriteStacktrace(F){return Xe(n,"removeSsrLoadModule","ssrRewriteStacktrace doesn't need to be used for Environment Module Runners."),uy(F,C.environments.ssr.moduleGraph).result},async reloadModule(F){if(Xe(n,"removeServerReloadModule"),i.hmr!==!1&&F.file){let G=F._clientModule??F._ssrModule;Ji(w[G.environment],F.file,[G],Wt())}},async listen(F,G){let P=await zc(n.server.host);return d&&d.prependListener("listening",()=>{C.resolvedUrls=Z0(d,n.server,P,a,n)}),await DM(C,P,F),d&&!G&&n.server.open&&C.openBrowser(),C},openBrowser(){let F=C.config.server,G=pI(C.resolvedUrls,F.host);if(G){let P=typeof F.open=="string"?new URL(F.open,G).href:G;C.config.server.preTransformRequests&&setTimeout(()=>{(P.startsWith("https:")?zS:WS)(P,{headers:{Accept:"text/html"}},z=>{z.on("end",()=>{})}).on("error",()=>{}).end()},0),_y(P,!0,C.config.logger)}else C.config.logger.warn("No URL available to open in browser")},async close(){return S||(S=b()),S},printUrls(){if(C.resolvedUrls)AI(C.resolvedUrls,i.host,n.logger.info);else throw o?new Error("Cannot print server URLs in middleware mode."):new Error("Cannot print server URLs before server.listen is called.")},bindCLIShortcuts(F){by(C,F)},async restart(F){return C._restartPromise||(C._forceOptimizeOnRestart=!!F,C._restartPromise=jM(C).finally(()=>{C._restartPromise=null,C._forceOptimizeOnRestart=!1})),C._restartPromise},waitForRequestsIdle(F){return w.client.waitForRequestsIdle(F)},_setInternalServer(F){C=F},_restartPromise:t.previousRestartPromise??null,_forceOptimizeOnRestart:t.previousForceOptimizeOnRestart??!1,_shortcutsState:t.previousShortcutsState},x=new Proxy(C,{get:(F,G)=>C[G],set:(F,G,P)=>(C[G]=P,!0)}),T=async(F,G)=>{try{await C.close()}finally{process.exitCode??=G?128+G:void 0,process.exit()}};o||fI(T);let k=async(F,G)=>{i.hmr!==!1&&await WM(F,G,C)},O=async(F,G)=>{if(F=re(F),Ip(C,F),await Promise.all(Object.values(C.environments).map(P=>P.pluginContainer.watchChange(F,{event:G?"delete":"create"}))),y&&h&&F.startsWith(y)){let P=F.slice(y.length);if(h[G?"delete":"add"](P),!G){let z=C.environments.client.moduleGraph,H=(await z.getModuleByUrl(P))?.transformResult?.etag;H&&z.etagToModuleMap.delete(H)}}if(G)for(let P of Object.values(C.environments))P.moduleGraph.onFileDelete(F);await k(G?"delete":"create",F)},R=async F=>{F=re(F),Ip(C,F),await Promise.all(Object.values(C.environments).map(G=>G.pluginContainer.watchChange(F,{event:"update"})));for(let G of Object.values(C.environments))G.moduleGraph.onFileChange(F);await k("update",F)};m.on("change",F=>{R(F).catch(G=>C.config.logger.error(G))}),m.on("add",F=>{O(F,!1).catch(G=>C.config.logger.error(G))}),m.on("unlink",F=>{O(F,!0).catch(G=>C.config.logger.error(G))}),!o&&d&&d.once("listening",()=>{i.port=d.address().port}),process.env.DEBUG&&f.use(gM(s)),f.use(CM());let{cors:I}=i;I!==!1&&f.use((0,TM.default)(typeof I=="boolean"?{}:I));let{allowedHosts:M}=i;M!==!0&&!i.https&&f.use(xM(M,!1));let B=new Sn({...bn,watchMode:!0},n.logger),U=[];for(let F of n.getSortedPluginHooks("configureServer"))U.push(await F.call(B,x));n.experimental.bundledDev||f.use(Y$(C));let{proxy:V}=i;if(V){let F=(ke(o)?o.server:null)||d;f.use(CO(F,V,n))}n.base!=="/"&&f.use(wO(n.rawBase,!!o)),f.use("/__open-in-editor",(0,BM.default)()),f.use(function(G,P,z){G.headers.accept==="text/x-vite-ping"?P.writeHead(204).end():z()}),y&&f.use(WO(C,h)),n.experimental.bundledDev?(f.use(RM(C)),f.use(IM(C))):(f.use(X$(C)),f.use(zO(C)),f.use(GO(C))),(n.appType==="spa"||n.appType==="mpa")&&f.use(IO(s,n.appType==="spa",C.environments.client)),U.forEach(F=>F&&F()),(n.appType==="spa"||n.appType==="mpa")&&(f.use(pM(s,C)),f.use(bM())),f.use(qR(C,!!o));let te,Q=!1,Z=async F=>{if(!Q)return te||(te=(async function(){n.experimental.bundledDev||await w.client.pluginContainer.buildStart(),(F||t.listen)&&await Promise.all(Object.values(w).map(G=>G.listen(C))),te=void 0,Q=!0})(),te)};if(!o&&d){let F=d.listen.bind(d);d.listen=(async(G,...P)=>{try{await Z(!0)}catch(z){d.emit("error",z);return}return F(G,...P)})}else await Z(!1);return C}async function DM(e,t,n){let r=e.httpServer;if(!r)throw new Error("Cannot call server.listen in middleware mode.");let s=e.config.server,i=n??s.port,a=i===e._configServerPort?e._currentServerPort??i:i;e._configServerPort=i,e._currentServerPort=await Qk(r,{port:a,strictPort:s.strictPort,host:t.host,logger:e.config.logger})}function PM(e){if(!e)return()=>Promise.resolve();let t=!1,n=new Set;return e.on("connection",r=>{n.add(r),r.on("close",()=>{n.delete(r)})}),e.once("listening",()=>{t=!0}),()=>new Promise((r,s)=>{n.forEach(i=>i.destroy()),t?e.close(i=>{i?s(i):r()}):r()})}function Sh(e,t){return re(L.resolve(e,t))}var JA=Object.freeze({port:Dx,strictPort:!1,host:"localhost",allowedHosts:[],https:void 0,open:!1,proxy:void 0,cors:{origin:Nx},headers:{},warmup:{clientFiles:[],ssrFiles:[]},middlewareMode:!1,fs:{strict:!0,deny:[".env",".env.*","*.{crt,pem,key,p12,pfx,cer,der}",".npmrc",".yarnrc.yml","**/.git/**"]},preTransformRequests:!0,perEnvironmentStartEndDuringDev:!1,perEnvironmentWatchChangeDuringDev:!1,forwardConsole:void 0}),NM=JA,LM=/[\\"']/;async function FM(e,t,n){let r=vt({...JA,host:void 0,sourcemapIgnoreList:Ke},t??{});Ng(r);let s=pu(e),i={...r,fs:{...r.fs,allow:t?.fs?.allow??[s]},sourcemapIgnoreList:r.sourcemapIgnoreList===!1?()=>!1:r.sourcemapIgnoreList,forwardConsole:await MM(r.forwardConsole)},a=i.fs.allow,o=du(e);if(process.versions.pnp)try{let u=Ud("yarn config get enableGlobalCache",{cwd:o}).toString().trim()==="true",f=Ud(`yarn config get ${u?"globalFolder":"cacheFolder"}`,{cwd:o}).toString().trim();a.push(f)}catch(u){n.warn(`Get yarn cache dir error: ${u.message}`,{timestamp:!0})}let l=L.join(s,"node_modules",".modules.yaml");try{let u=pe.readFileSync(l,"utf-8"),f=JSON.parse(u).virtualStoreDir;f&&(L.isAbsolute(f)?a.push(f):f.startsWith("..")&&a.push(L.resolve(L.join(s,"node_modules"),f)))}catch{}a=a.map(u=>Sh(e,u));let c=Sh(e,jc);if(a.some(u=>En(u,c))||a.push(c),i.fs.allow=a,i.origin?.endsWith("/")&&(i.origin=i.origin.slice(0,-1),n.warn(j.default.yellow(`${j.default.bold("(!)")} server.origin should not end with "/". Using "${i.origin}" instead.`))),process.env.__VITE_ADDITIONAL_SERVER_ALLOWED_HOSTS&&Array.isArray(i.allowedHosts)){let u=process.env.__VITE_ADDITIONAL_SERVER_ALLOWED_HOSTS;if(LM.test(u))n.warn(j.default.yellow(`${j.default.bold("(!)")} Skipping additional allowed hosts from environment variable due to reserved characters. Received: "${u}".`));else{let f=u.split(",").map(d=>d.trim()).filter(Boolean);i.allowedHosts=[...i.allowedHosts,...f]}}return i}async function jM(e){global.__vite_start_time=Je.now();let t=e.config.inlineConfig;e._forceOptimizeOnRestart&&(t=gt(t,{forceOptimizeDeps:!0}));{let i=null;try{i=await zA(t,{listen:!1,previousEnvironments:e.environments,previousShortcutsState:e._shortcutsState,previousRestartPromise:e._restartPromise,previousForceOptimizeOnRestart:e._forceOptimizeOnRestart})}catch(o){e.config.logger.error(o.message,{timestamp:!0}),e.config.logger.error("server restart failed",{timestamp:!0});return}e._shortcutsState=void 0,await e.close();let a=e.middlewares;i._configServerPort=e._configServerPort,i._currentServerPort=e._currentServerPort,Object.assign(e,i),a.stack=i.middlewares.stack,e.middlewares=a,i._setInternalServer(e)}let{logger:n,server:{port:r,middlewareMode:s}}=e.config;s?await Promise.all(Object.values(e.environments).map(i=>i.listen(e))):await e.listen(r,!0),n.info("server restarted.",{timestamp:!0}),e._shortcutsState?.options&&by(e,{print:!1},!0)}async function KA(e){if(e.config.server.middlewareMode){await e.restart();return}let{port:t,host:n}=e.config.server,r=e.resolvedUrls;await e.restart();let{logger:s,server:{port:i,host:a}}=e.config;((i??5173)!==(t??5173)||a!==n||Y0(r,e.resolvedUrls))&&(s.info(""),e.printUrls())}var Et=Re("vite:hmr"),QM=/\s/,UM=re(jc);function Cu(e,t){return e.startsWith(Me(t))?L.posix.relative(t,e):e}var Ec=(e,t,n=!0)=>{let r=new WeakMap,s=new WeakMap,i,a,o=async l=>{if(!i)return{error:{name:"TransportError",message:"invokeHandlers is not set",stack:new Error().stack}};let{name:c,data:u}=l.data;try{let f=i[c];return{result:await f(...u)}}catch(f){return{error:{name:f.name,message:f.message,stack:f.stack,...f}}}};return{...e,on:(l,c)=>{if(l==="connection"||!n){e.on?.(l,c);return}let u=(f,d)=>{s.has(d)||s.set(d,{send:(...p)=>{let h;typeof p[0]=="string"?h={type:"custom",event:p[0],data:p[1]}:h=p[0],d.send(h)}}),c(f,s.get(d))};r.set(c,u),e.on?.(l,u)},off:(l,c)=>{if(l==="connection"||!n){e.off?.(l,c);return}let u=r.get(c);u&&e.off?.(l,u)},setInvokeHandler(l){if(i=l,!l){a&&e.off?.("vite:invoke",a);return}a=async(c,u)=>{let f=c.id.replace("send","response");u.send({type:"custom",event:"vite:invoke",data:{name:c.name,id:f,data:await o({type:"custom",event:"vite:invoke",data:c})}})},e.on?.("vite:invoke",a)},handleInvoke:o,send:(...l)=>{let c;typeof l[0]=="string"?c={type:"custom",event:l[0],data:l[1]}:c=l[0],(t||c.type==="connected"||c.type==="ping"||c.type==="custom"||c.type==="error")&&e.send?.(c)},listen(){return e.listen?.()},close(){return e.close?.()}}};function HM(e){let t=[],n=0,r=0,s=0;for(let i of e){let a=i.hotUpdate??i.handleHotUpdate;if(a){if(typeof a=="object"){if(a.order==="pre"){t.splice(n++,0,i);continue}if(a.order==="post"){t.splice(n+r+s++,0,i);continue}}t.splice(n+r++,0,i)}}return t}var xh=new WeakMap;function Ch(e){let t=xh.get(e);return t||(t=HM(e.plugins),xh.set(e,t)),t}async function WM(e,t,n){let{config:r}=n,s=KR(()=>n.moduleGraph),i=n.environments,a=Object.values(i),o=()=>n.environments!==i,l=Cu(t,r.root),c=t===r.configFile,u=r.configFileDependencies.some(_=>t===_),f=r.envDir!==!1&&qc(r.mode,r.envDir).includes(t);if(c||u||f){Et?.(`[config change] ${j.default.dim(l)}`),r.logger.info(j.default.green(`${re(L.relative(process.cwd(),t))} changed, restarting server...`),{clear:!0,timestamp:!0});try{await KA(n)}catch(_){r.logger.error(j.default.red(_))}return}if(Et?.(`[file change] ${j.default.dim(l)}`),t.startsWith(Me(UM))){a.forEach(({hot:_})=>_.send({type:"full-reload",path:"*",triggeredBy:L.resolve(r.root,t)}));return}if(r.experimental.bundledDev)return;let d=Wt(),p={type:e,file:t,timestamp:d,read:()=>JM(t),server:n},h=new Map;for(let _ of a){let C=new Set(_.moduleGraph.getModulesByFile(t));if(e==="create")for(let T of _.moduleGraph._hasResolveFailedErrorModules)C.add(T);let x={...p,modules:[...C]};h.set(_,{options:x})}let y=new Set(s.getModulesByFile(t)),m={...p,modules:[...y]},w=new Sn({...bn,watchMode:!0},r.logger),A=n.environments.client,g=n.environments.ssr,E=A.pluginContainer.minimalContext,v=h.get(A).options,S=h.get(g)?.options;try{for(let _ of Ch(A))if(_.hotUpdate){let C=await Ze(_.hotUpdate).call(E,v);if(o())return;C&&(v.modules=C,m.modules=m.modules.filter(x=>C.some(T=>x.id===T.id)||S?.modules.some(T=>T.id===x.id)),m.modules.push(...C.filter(x=>!m.modules.some(T=>T.id===x.id)).map(x=>s.getBackwardCompatibleModuleNode(x))))}else if(e==="update"){Xe(r,"removePluginHookHandleHotUpdate",`Used in plugin "${_.name}".`,!1);let C=await Ze(_.handleHotUpdate).call(w,m);if(o())return;C&&(m.modules=C,v.modules=v.modules.filter(x=>C.some(T=>x.id===T.id)),v.modules.push(...C.filter(x=>!v.modules.some(T=>T.id===x.id)).map(x=>x._clientModule).filter(Boolean)),S&&(S.modules=S.modules.filter(x=>C.some(T=>x.id===T.id)),S.modules.push(...C.filter(x=>!S.modules.some(T=>T.id===x.id)).map(x=>x._ssrModule).filter(Boolean))))}}catch(_){if(o())return;h.get(A).error=_}for(let _ of a){if(_.name==="client")continue;let C=h.get(_),x=_.pluginContainer.minimalContext;try{for(let T of Ch(_))if(T.hotUpdate){let k=await Ze(T.hotUpdate).call(x,C.options);if(o())return;k&&(C.options.modules=k)}}catch(T){if(o())return;C.error=T}}async function b(_){if(!o())try{let{options:C,error:x}=h.get(_);if(x)throw x;if(!C.modules.length){t.endsWith(".html")&&_.name==="client"?(_.logger.info(j.default.green("page reload ")+j.default.dim(l),{clear:!0,timestamp:!0}),_.hot.send({type:"full-reload",path:r.server.middlewareMode?"*":"/"+re(L.relative(r.root,t))})):Et?.(`(${_.name}) [no modules matched] ${j.default.dim(l)}`);return}Ji(_,l,C.modules,d)}catch(C){_.hot.send({type:"error",err:Qn(C)})}}o()||await(n.config.server.hotUpdateEnvironments??((_,C)=>Promise.all(Object.values(_.environments).map(x=>C(x)))))(n,b)}function Ji(e,t,n,r,s){let{hot:i}=e,a=[],o=new Set,l=new Set,c=n.length===0;for(let h of n){let y=[],m=VA(h,l,y);if(e.moduleGraph.invalidateModule(h,o,r,!0),!c){if(m){c=m;continue}if(s&&y.some(({acceptedVia:w})=>Wr(w.url)===s)){c="circular import invalidate";continue}a.push(...y.map(({boundary:w,acceptedVia:A,isWithinCircularImport:g})=>({type:`${w.type}-update`,timestamp:r,path:Wr(w.url),acceptedPath:Wr(A.url),explicitImportRequired:w.type==="js"?_c(A.url):!1,isWithinCircularImport:g,firstInvalidatedBy:s})))}}let u=t.endsWith(".html")&&e.name==="client"&&n.every(h=>h.type!=="js");if(c||u){let h=typeof c=="string"?j.default.dim(` (${c})`):"";e.logger.info(j.default.green("page reload ")+j.default.dim(t)+h,{clear:!s,timestamp:!0}),i.send({type:"full-reload",triggeredBy:L.resolve(e.config.root,t),path:!u||e.config.server.middlewareMode||a.length>0?"*":"/"+t});return}if(a.length===0){Et?.(j.default.yellow("no update happened ")+j.default.dim(t));return}let f=[...new Set(a.map(h=>h.path))],{formatted:d,truncated:p}=Wg(f);p&&Et?.(`hmr update ${f.join(", ")}`),e.logger.info(j.default.green("hmr update ")+j.default.dim(d),{clear:!s,timestamp:!0}),i.send({type:"update",updates:a})}function GM(e,t){for(let n of e)if(!t.has(n))return!1;return!0}function VA(e,t,n,r=[e]){if(t.has(e))return!1;if(t.add(e),e.id&&e.isSelfAccepting===void 0)return Et?.(`[propagate update] stop propagation because not analyzed: ${j.default.dim(e.id)}`),!1;if(e.isSelfAccepting){let s=e;return n.push({boundary:s,acceptedVia:s,isWithinCircularImport:Ii(e,r)}),!1}if(e.acceptedHmrExports){let s=e;n.push({boundary:s,acceptedVia:s,isWithinCircularImport:Ii(e,r)})}else if(!e.importers.size)return!0;for(let s of e.importers){let i=r.concat(s);if(s.acceptedHmrDeps.has(e)){n.push({boundary:s,acceptedVia:e,isWithinCircularImport:Ii(s,i)});continue}if(e.id&&e.acceptedHmrExports&&s.importedBindings){let a=s.importedBindings.get(e.id);if(a&&GM(a,e.acceptedHmrExports))continue}if(!r.includes(s)&&VA(s,t,n,i))return!0}return!1}function Ii(e,t,n=[e],r=new Set){if(r.has(e))return!1;r.add(e);for(let s of e.importers){if(s===e)continue;let i=t.indexOf(s);if(i>-1){if(Et){let a=[s,...[...n].reverse(),...t.slice(i,-1).reverse()];Et(j.default.yellow("circular imports detected: ")+a.map(o=>j.default.dim(o.url)).join(" -> "))}return!0}if(!n.includes(s)){let a=Ii(s,t,n.concat(s),r);if(a)return a}}return!1}function Ih(e,{hot:t}){let n=Wt();e.forEach(r=>{r.lastHMRTimestamp=n,r.lastHMRInvalidationReceived=!1,Et?.(`[dispose] ${j.default.dim(r.file)}`)}),t.send({type:"prune",paths:[...e].map(r=>r.url)})}function qA(e,t,n){let r=0,s=0,i="";function a(o){n.add({url:i,start:o-i.length-1,end:o+1}),i=""}for(let o=t;o<e.length;o++){let l=e.charAt(o);switch(r){case 0:case 4:if(l==="'")s=r,r=1;else if(l==='"')s=r,r=2;else if(l==="`")s=r,r=3;else{if(QM.test(l))continue;if(r===0)if(l==="[")r=4;else return!0;else{if(l==="]")return!1;if(l===",")continue;Rh(o)}}break;case 1:if(l==="'"){if(a(o),s===0)return!1;r=s}else i+=l;break;case 2:if(l==='"'){if(a(o),s===0)return!1;r=s}else i+=l;break;case 3:if(l==="`"){if(a(o),s===0)return!1;r=s}else l==="$"&&e.charAt(o+1)==="{"?Rh(o):i+=l;break;default:throw new Error("unknown import.meta.hot lexer state")}}return!1}function zM(e,t,n){let r=new Set;qA(e,t,r);for(let{url:s}of r)n.add(s);return r.size>0}function Wr(e){return e[0]!=="."&&e[0]!=="/"&&(e=ro(e)),e}function Rh(e){let t=new Error("import.meta.hot.accept() can only accept string literals or an Array of string literals.");throw t.pos=e,t}async function JM(e){let t=await Ee.readFile(e,"utf-8");if(t)return t;{let n=(await Ee.stat(e)).mtimeMs;for(let r=0;r<10&&(await new Promise(s=>setTimeout(s,10)),(await Ee.stat(e)).mtimeMs===n);r++);return await Ee.readFile(e,"utf-8")}}function KM(){let e=new Wl,t=new Wl;return{skipFsCheck:!0,send(n){t.emit("send",n)},off(n,r){e.off(n,r)},on:((n,r)=>{e.on(n,r)}),close(){e.removeAllListeners(),t.removeAllListeners()},listen(){e.emit("connection")},api:{innerEmitter:e,outsideEmitter:t}}}var VM=Re("vite:external"),kh=new WeakMap;function qM(e,t,n){let r=kh.get(e);return r||(r=XM(e),kh.set(e,r)),r(t,n)}function YM(e){let{config:t}=e,{root:n,resolve:r}=t,{external:s,noExternal:i}=r,a=typeof i!="boolean"&&!(Array.isArray(i)&&i.length===0)&&hn(void 0,i,{resolve:!1}),o=r.externalConditions,l={...r,root:n,isProduction:!1,isBuild:!0,conditions:o},c=(u,f,d)=>{if(!Zr.test(u)||u.includes("\0"))return!1;try{let p=Ou(u,t.command==="build"?void 0:f,l,void 0,!1);return!p||!d&&!Ke(p.id)?!1:YA(p.id)}catch{return VM?.(`Failed to node resolve "${u}". Skipping externalizing it by default.`),!1}};return(u,f)=>{if(s!==!0&&s.includes(u))return!0;let d=Eo(u);return d?s!==!0&&s.includes(d)?c(u,f,!0):typeof i=="boolean"?!i:a&&!a(d)?!1:c(u,f,s===!0):c(u,f,!1)}}function XM(e){let t=new Map,n=YM(e);return(r,s)=>{if(t.has(r))return t.get(r);let i=!1;return r[0]!=="."&&!L.isAbsolute(r)&&(i=nr(e.config.resolve.builtins,r)||n(r,s)),t.set(r,i),i}}function YA(e){let t=L.extname(e);return!t||t===".js"||t===".mjs"||t===".cjs"}var ZM=class{bundles=new Map;assets=new Map;fileNameHash=new Map;invalidatedBundles=new Set;saveWorkerBundle(e,t,n,r,s,i){for(let o of s)this.saveAsset(o,i);let a={entryFilename:n,entryCode:r,entryUrlPlaceholder:this.generateEntryUrlPlaceholder(n),referencedAssets:new Set(s.map(o=>o.fileName)),watchedFiles:t};return this.bundles.set(e,a),a}saveAsset(e,t){let n=this.assets.get(e.fileName);n&&(nw(n.source,e.source)||t.warn(`
|
|
352
|
-
`+j.default.yellow(`The emitted file ${JSON.stringify(e.fileName)} overwrites a previously emitted file of the same name.`))),this.assets.set(e.fileName,e)}invalidateAffectedBundles(e){for(let[t,n]of this.bundles.entries())n.watchedFiles.includes(e)&&this.invalidatedBundles.add(t)}removeBundleIfInvalidated(e){this.invalidatedBundles.has(e)&&(this.invalidatedBundles.delete(e),this.removeBundle(e))}removeBundle(e){let t=this.bundles.get(e);if(!t)return;this.bundles.delete(e),this.fileNameHash.delete(We(t.entryFilename)),this.assets.delete(t.entryFilename);let n=[...this.bundles.values()];for(let r of t.referencedAssets)n.every(s=>!s.referencedAssets.has(r))&&this.assets.delete(r)}getWorkerBundle(e){return this.bundles.get(e)}getAssets(){return this.assets.values()}getEntryFilenameFromHash(e){return this.fileNameHash.get(e)}generateEntryUrlPlaceholder(e){let t=We(e);return this.fileNameHash.has(t)||this.fileNameHash.set(t,e),`__VITE_WORKER_ASSET__${t}__`}},vc=/(?:\?|&)(worker|sharedworker)(?:&|$)/,Th=/(?:\?|&)worker_file&type=(\w+)(?:&|$)/,e1=/[?&]inline\b/,XA="worker_file",jt=new WeakMap;async function ZA(e,t){let n=he(t),r=jt.get(e.mainConfig||e);r.removeBundleIfInvalidated(n);let s=r.getWorkerBundle(n);if(s)return s;let i=[...e.bundleChain,n];if(e.bundleChain.includes(n))throw new Error(`Circular worker imports detected. Vite does not support it. Import chain: ${i.map(g=>ut(g,e.root)).join(" -> ")}`);let{rolldown:a}=await import("./dist-JMGYIFWH.js"),{plugins:o,rolldownOptions:l,format:c}=e.worker,u=new Vw("client",await o(i));await u.init();let f=new zw,d=u.config.build.target,p=await a({...l,input:n,plugins:u.plugins.map(g=>Jw(u,f,g)),onLog(g,E){Gw(g,E,u)},transform:{target:d===!1?void 0:d,...l.transform,define:{...l.transform?.define,"process.env.NODE_ENV":"process.env.NODE_ENV"}},moduleTypes:{".css":"js",...l.moduleTypes},preserveEntrySignatures:!1,experimental:{...l.experimental,viteMode:!0}}),h,y;try{let g=e.worker.rolldownOptions.output,E=g?Array.isArray(g)?g[0]||{}:g:{};h=await p.generate({entryFileNames:L.posix.join(e.build.assetsDir,"[name]-[hash].js"),chunkFileNames:L.posix.join(e.build.assetsDir,"[name]-[hash].js"),assetFileNames:L.posix.join(e.build.assetsDir,"[name]-[hash].[ext]"),minify:u.config.build.minify==="oxc"?!0:u.config.build.minify===!1?"dce-only":void 0,...E,format:c,sourcemap:u.config.build.sourcemap}),y=(await p.watchFiles).map(v=>re(v))}catch(g){throw g instanceof Error&&g.name==="RollupError"&&g.code==="INVALID_OPTION"&&g.message.includes('"output.format"')&&(g.message=g.message.replace("output.format","worker.format")),g}finally{await p.close()}let{output:[m,...w]}=h,A=w.map(g=>g.type==="asset"?g:{fileName:g.fileName,originalFileName:null,originalFileNames:[],source:g.code});return(e.build.sourcemap==="hidden"||e.build.sourcemap===!0)&&m.map&&A.push({fileName:m.fileName+".map",originalFileName:null,originalFileNames:[],source:m.map.toString()}),jt.get(e.mainConfig||e).saveWorkerBundle(n,y,m.fileName,m.code,A,e.logger)}var si=/__VITE_WORKER_ASSET__([a-z\d]{8})__/g;async function ew(e,t){let n=jt.get(e.mainConfig||e),r=await ZA(e,t);return n.saveAsset({fileName:r.entryFilename,originalFileName:null,originalFileNames:[],source:r.entryCode},e.logger),r}function tw(e,t){if(t.isWorker)return;let n=jt.get(t.mainConfig||t);for(let r of n.getAssets())e.emitFile({type:"asset",fileName:r.fileName,source:r.source})}function t1(e){return{name:"vite:worker-post",applyToEnvironment(t){return t.config.isBundled?t.config.worker.format==="iife"?Zo():!1:!0},transform:{filter:{code:"import.meta"},order:"post",async handler(t,n){if(this.environment.config.worker.format==="iife"){await vn;let r;try{r=wt(t)[0]}catch{return}let s=!1,i;for(let{s:a,e:o,d:l}of r)l===-2&&(t.slice(o,o+4)===".url"?(i||=new Ie(t),i.overwrite(a,o+4,"self.location.href")):(i||=new Ie(t),s||(i.prepend(`const _vite_importMeta = { url: self.location.href };
|
|
353
|
-
`),s=!0),i.overwrite(a,o,"_vite_importMeta")));return i?{code:i.toString(),map:i.generateMap({hires:"boundary",source:n})}:void 0}}}}}function n1(e){let t=e.command==="build",n=e.isWorker;jt.set(e,new ZM);let r=new Set;return{name:"vite:worker",buildStart(){n||r.clear()},load:{filter:{id:vc},async handler(s){let i=vc.exec(s);if(!i)return;let{format:a}=e.worker,o=i[1]==="sharedworker"?"SharedWorker":"Worker",l=this.environment.config.isBundled,c=l?a==="es"?"module":"classic":"module",u=`{
|
|
354
|
-
${c==="module"?'type: "module",':""}
|
|
355
|
-
name: options?.name
|
|
356
|
-
}`,f;if(l)if(n&&e.bundleChain.at(-1)===he(s))f="self.location.href";else if(e1.test(s)){let d=await ZA(e,s);for(let h of d.watchedFiles)this.addWatchFile(h);let p=`const jsContent = ${JSON.stringify(d.entryCode)};`;return{code:o==="Worker"?`${p}
|
|
357
|
-
const blob = typeof self !== "undefined" && self.Blob && new Blob([${c==="classic"?"'(self.URL || self.webkitURL).revokeObjectURL(self.location.href);',":"'URL.revokeObjectURL(import.meta.url);',"}jsContent], { type: "text/javascript;charset=utf-8" });
|
|
358
|
-
export default function WorkerWrapper(options) {
|
|
359
|
-
let objURL;
|
|
360
|
-
try {
|
|
361
|
-
objURL = blob && (self.URL || self.webkitURL).createObjectURL(blob);
|
|
362
|
-
if (!objURL) throw ''
|
|
363
|
-
const worker = new ${o}(objURL, ${u});
|
|
364
|
-
worker.addEventListener("error", () => {
|
|
365
|
-
(self.URL || self.webkitURL).revokeObjectURL(objURL);
|
|
366
|
-
});
|
|
367
|
-
return worker;
|
|
368
|
-
} catch(e) {
|
|
369
|
-
return new ${o}(
|
|
370
|
-
'data:text/javascript;charset=utf-8,' + encodeURIComponent(jsContent),
|
|
371
|
-
${u}
|
|
372
|
-
);
|
|
373
|
-
}
|
|
374
|
-
}`:`${p}
|
|
375
|
-
export default function WorkerWrapper(options) {
|
|
376
|
-
return new ${o}(
|
|
377
|
-
'data:text/javascript;charset=utf-8,' + encodeURIComponent(jsContent),
|
|
378
|
-
${u}
|
|
379
|
-
);
|
|
380
|
-
}
|
|
381
|
-
`,map:{mappings:""}}}else{let d=await ew(e,s),p;this.environment.config.command==="serve"&&this.environment.config.isBundled?(tw(this,e),p=uu(this.environment,d.entryFilename)):p=d.entryUrlPlaceholder,f=JSON.stringify(p);for(let h of d.watchedFiles)this.addWatchFile(h)}else{let d=await yn(this,he(s));d=Le(d,`${XA}&type=${c}`),f=JSON.stringify(d)}return It.test(s)?{code:`export default ${f}`,map:{mappings:""}}:{code:`export default function WorkerWrapper(options) {
|
|
382
|
-
return new ${o}(
|
|
383
|
-
${f},
|
|
384
|
-
${u}
|
|
385
|
-
);
|
|
386
|
-
}`,map:{mappings:""}}}},transform:{filter:{id:Th},handler(s,i){let a=Th.exec(i);if(a){let o=a[1],l="";if(o==="classic")l=`importScripts(${JSON.stringify(L.posix.join(e.base,zl))})
|
|
387
|
-
`;else if(o==="module")l=`import ${JSON.stringify(zl)}
|
|
388
|
-
`;else if(o==="ignore")if(this.environment.config.isBundled)l="";else{let c=this.environment;l=(c.mode==="dev"?c.moduleGraph:void 0)?.getModuleById(oo)?.transformResult?.code||""}if(l){let c=new Ie(s);return c.prepend(l+`;
|
|
389
|
-
`),{code:c.toString(),map:c.generateMap({hires:"boundary"})}}}}},...t?{renderChunk(s,i,a){let o,l=()=>o&&{code:o.toString(),map:this.environment.config.build.sourcemap?o.generateMap({hires:"boundary"}):null};if(si.lastIndex=0,si.test(s)){let c=No(a.format,this.environment.config.isWorker),u;o=new Ie(s),si.lastIndex=0;let f=jt.get(e.mainConfig||e);for(;u=si.exec(s);){let[d,p]=u,h=f.getEntryFilenameFromHash(p);if(!h){this.warn(`Could not find worker asset for hash: ${p}`);continue}let y=Xn(this.environment,h,"asset",i.fileName,"js",c),m=typeof y=="string"?JSON.stringify(Tt(y)).slice(1,-1):`"+${y.runtime}+"`;o.update(u.index,u.index+d.length,m)}}return l()}}:{},generateBundle(s,i){if(!(this.environment.config.isOutputOptionsForLegacyChunks?.(s)||n))for(let a of jt.get(e).getAssets()){if(r.has(a.fileName))continue;r.add(a.fileName);let o=i[a.fileName];o&&nw(o.type==="asset"?o.source:o.code,a.source)||this.emitFile({type:"asset",fileName:a.fileName,source:a.source})}},watchChange(s){n||jt.get(e).invalidateAffectedBundles(re(s))}}}function nw(e,t){return typeof e=="string"?typeof t=="string"?e===t:Buffer.from(e).equals(t):Buffer.from(t).equals(e)}function r1(e){let t=sw(e.resolve.alias);return{name:"vite:pre-alias",applyToEnvironment(n){return n.config.isBundled?!1:!Cs(n.config.optimizeDeps)},async resolveId(n,r,s){let i=this.environment,a=i.config.consumer==="server",o=i.depsOptimizer;if(r&&o&&Zr.test(n)&&!s.scan&&n!=="@vite/client"&&n!=="@vite/env"&&t.find(l=>rw(l,n))){let l=await Lw(o,n,r,e.resolve.preserveSymlinks,e.packageCache);if(l)return l;if(o.options.noDiscovery)return;let c=await this.resolve(n,r,s);if(c&&!o.isOptimizedDepFile(c.id)){let u=o.options,f=he(c.id);if(!(f===n||f.includes("\0"))&&pe.existsSync(f)&&!po(u.exclude,n)&&L.isAbsolute(f)&&(Ke(f)||u.include?.includes(n))&&mn(f,u)&&(!a||s1(f,u))){let d=o.registerMissingImport(n,f);return{id:o.getOptimizedDepId(d)}}}return c}}}}function s1(e,t){return!!t.include?.includes(e)}function rw(e,t){return e instanceof RegExp?e.test(t):t.length<e.length?!1:t===e?!0:t.startsWith(Me(e))}function sw(e){return Array.isArray(e)?e.map(t=>t.find):Object.entries(e).map(([t])=>t)}function i1(e){let t=sw(e);return n=>t.some(r=>rw(r,n))}var Ir=Re("vite:import-analysis"),o1=re(jc),a1=/\.(?:map|json)(?:$|\?)/,Oh=e=>a1.test(e)||Ro(e),l1=/\/chunk-[A-Z\d]{8}\.js/,xs=/\/\*\s*@vite-ignore\s*\*\//,c1=/^(?:'.*'|".*"|`.*`)$/,Bh=/^\s*`(.*)`\s*$/;function _c(e){return!ho(e)&&!Mt(e)}function u1(e,t,n){let r=e.config.root,s=e.depsOptimizer;return n.id.startsWith(Me(r))?t=n.id.slice(r.length):s?.isOptimizedDepFile(n.id)||n.id!=="/@react-refresh"&&L.isAbsolute(n.id)&&pe.existsSync(he(n.id))?t=L.posix.join(Fe,n.id):t=n.id,t[0]!=="."&&t[0]!=="/"&&(t=ro(n.id)),t}function f1(e,t,n,r){let s=r.get(e);if(s||(s=new Set,r.set(e,s)),n.d>-1||n.d===-2){s.add("*");return}let i=t.slice(n.ss,n.se);Lp.lastIndex=0;let a=Lp.exec(i);if(!a)return;let o=UR({type:"static",code:a[0],start:a.index,end:a.index+a[0].length,imports:a.groups.imports,specifier:a.groups.specifier});if(o.namespacedImport&&s.add("*"),o.defaultImport&&s.add("default"),o.namedImports)for(let l of Object.keys(o.namedImports))s.add(l)}function d1(e){let{root:t,base:n}=e,r=L.posix.join(n,ds),s=e.experimental.hmrPartialAccept,i=i1(e.resolve.alias),a,o;function l(c){if(!o||!a){let u={},f={};for(let p in e.env)u[p]=JSON.stringify(e.env[p]);for(let p in e.define)p.startsWith("import.meta.env.")&&(f[p.slice(16)]=e.define[p]);let d=`import.meta.env = ${xu({...u,SSR:"__vite_ssr__",...f})};`;o=d.replace("__vite_ssr__","true"),a=d.replace("__vite_ssr__","false")}return c?o:a}return{name:"vite:import-analysis",applyToEnvironment(c){return!c.config.isBundled},async transform(c,u){let f=this.environment,d=f.config.consumer==="server",p=f.moduleGraph;if(Oh(u))return Ir?.(j.default.dim(`[skipped] ${ut(u,t)}`)),null;let h=Ir?Je.now():0;await vn;let y,m;c=Jc(c);try{[y,m]=wt(c)}catch(z){let H=z,{message:$,showCodeFrame:J}=p1(u,c);this.error($,J?H.idx:void 0)}let w=f.depsOptimizer,A=p.getModuleById(u);if(A||li(u),!y.length&&!this._addedImports){let z=await p.updateModuleInfo(A,new Set,null,new Set,null,!1);return z&&Ih(z,f),Ir?.(`${Rt(h)} ${j.default.dim(`[no imports] ${ut(u,t)}`)}`),c}let g=!1,E=!1,v=!1,S=!1,b,_=()=>b||(b=new Ie(c)),C=!1,x=s?new Map:null,T=async(z,H,$=!1)=>{let J=u;if(w&&po(w.options.exclude,z)){await w.scanProcessing;for(let N of w.metadata.depInfoList)N.src&&N.file===A.file&&(J=N.src)}let D=await this.resolve(z,J).catch(N=>{throw N instanceof Error&&(N.pos??=H),N});if(!D||D.meta?.["vite:alias"]?.noResolved)return d?[z,null]:(A.isSelfAccepting=!1,p._hasResolveFailedErrorModules.add(A),this.error(`Failed to resolve import "${z}" from "${re(L.relative(process.cwd(),J))}". Does the file exist?`,H));if(ft(D.id))return[D.id,D.id];z=u1(f,z,D);try{let N=await p._ensureEntryFromUrl(Qt(z),Oh(z)||$,D);f.config.consumer==="client"&&N.lastHMRTimestamp>0&&(z=Le(z,`t=${N.lastHMRTimestamp}`))}catch(N){throw N.pos=H,N}if(f.config.consumer==="client"){let N=z[0]===".",K=!N&&he(z)===he(u);if(_c(z))z=Le(z,"import");else if((N||K)&&!Gn.test(z)){let ee=Gn.exec(u);ee&&(z=Le(z,ee[1]))}}return d||(z=ze(n,z)),[z,D.id]},k=new Array(y.length),O=new Array(y.length),R=new Array(y.length),I=e.legacy?.inconsistentCjsInterop?!1:void 0,M=()=>(I??=yo(u,e.packageCache),I),B=e.legacy?.inconsistentCjsInterop?!1:void 0,U=()=>(B??=M0(u,e.packageCache),B);await Promise.all(y.map(async(z,H)=>{let{s:$,e:J,ss:D,se:N,d:K,a:ee}=z,X=z.n,se=c.slice($,J);if(se==="import.meta"){let oe=c.slice(J,J+4);if(oe===".hot"){g=!0;let me=J+4+(c[J+4]==="?"?1:0);if(c.slice(me,me+7)===".accept")if(c.slice(me,me+14)===".acceptExports"){let Y=R[H]=new Set;zM(c,c.indexOf("(",me+14)+1,Y),C=!0}else{let Y=O[H]=new Set;qA(c,c.indexOf("(",me+7)+1,Y)&&(E=!0)}}else oe===".env"&&(v=!0);return}else Bh.test(se)&&(se.includes("${")&&se.includes("}")||(X=se.replace(Bh,"$1")));let ie=K>-1;if(!ie&&ee>-1&&_().remove(J+1,N),X!==void 0){if((ft(X)&&!X.startsWith("file://")||gn(X))&&!i(X)||d&&!i(X)&&(qM(f,X,u)||nr(f.config.resolve.builtins,X))||X===r)return;if(X[0]==="/"&&!(e.assetsInclude(he(X))||It.test(X))&&et(X,e))throw new Error(`Cannot import non-asset file ${X} which is inside /public. JS/CSS files inside /public are copied as-is on build and can only be referenced via <script src> or <link href> in html. If you want to get the URL of that file, use ${Le(X,"url")} instead.`);let[oe,me]=await T(X,$);if(me=me||oe,e.safeModulePaths.add(I0(un(oe,n))),oe!==X){let fe=!1;if(!(w?.isOptimizedDepFile(u)&&X[0]===".")&&w?.isOptimizedDepFile(me)&&!l1.test(me)){let ye=he(me),de=as(w.metadata,ye),ve=await JP(f,w.metadata,ye);ve===void 0?de?.isDynamicEntry&&e.logger.error(j.default.red(`Vite Error, ${oe} optimized info should be defined`)):ve&&(Ir?.(`${oe} needs interop`),Mh(_(),z,oe,H,u,ie?U():M(),e),fe=!0)}else oe.startsWith(ro("__vite-browser-external"))&&c.slice(D,$).includes("{")&&(Mh(_(),z,oe,H,u,M(),e),fe=!0);if(!fe){let ye=JSON.stringify(oe),de=ie?$:$-1,ve=ie?J:J+1;_().overwrite(de,ve,ye,{contentOnly:!0})}}let Y=Qt(un(oe,n)),ne=!ft(Y)&&!gn(Y);if(ne&&(k[H]=Y),s&&x&&f1(me,c,z,x),!ie&&ne&&f.config.dev.preTransformRequests){let fe=ln(Y);f.warmupRequest(fe)}}else u.startsWith(Me(o1))||(Ke(u)||xs.test(c.slice(K+1,J))||this.warn(`
|
|
390
|
-
`+j.default.cyan(A.file)+`
|
|
391
|
-
`+j.default.reset(Ue(c,$,J))+j.default.yellow(`
|
|
392
|
-
The above dynamic import cannot be analyzed by Vite.
|
|
393
|
-
See ${j.default.blue("https://vite.dev/guide/features#dynamic-import")} for supported dynamic import formats. If this is intended to be left as-is, you can use the /* @vite-ignore */ comment inside the import() call to suppress this warning.
|
|
394
|
-
`)),d||(!c1.test(se)||_c(se.slice(1,-1)))&&(S=!0,_().overwrite($,J,`__vite__injectQuery(${se}, 'import')`,{contentOnly:!0})))}));let V=k.filter(Ig),te=new Set(V),Q=new Set(V.map(z=>yt(z))),Z=$h(O),F=$h(R),G=u.includes("worker_file")&&u.includes("type=classic");v&&!G&&_().prepend(l(d)),g&&!d&&!G&&(Et?.(`${E?"[self-accepts]":C?"[accepts-exports]":Z.size?"[accepts-deps]":"[detected api usage]"} ${ut(u,t)}`),_().prepend(`import { createHotContext as __vite__createHotContext } from "${r}";import.meta.hot = __vite__createHotContext(${JSON.stringify(Wr(A.url))});`)),S&&(G?_().append(`
|
|
395
|
-
`+g1.toString()):_().prepend(`import { injectQuery as __vite__injectQuery } from "${r}";`));let P=new Set;for(let{url:z,start:H,end:$}of Z){let[J,D]=await T(z,H).catch(()=>[]);if(D){let K=p.getModuleById(D);if(!K){this.error(`module was not found for ${JSON.stringify(D)}`,H);return}J=K.url}else this.error({message:`Failed to resolve ${JSON.stringify(z)} from ${u}.`,pos:H});P.add(J);let N=Wr(J);_().overwrite(H,$,JSON.stringify(N),{contentOnly:!0})}if(!Mt(u)||wn.test(u)){let z=this._addedImports;z&&(await Promise.all([...z].map($=>T($,0,!0)))).forEach(([$])=>te.add(un($,n))),d&&A.isSelfAccepting&&(E=!0),!E&&C&&F.size>=m.length&&m.every($=>F.has($.n))&&(E=!0);let H=await p.updateModuleInfo(A,te,x,P,C?F:null,E,Q);H&&Ih(H,f)}return Ir?.(`${Rt(h)} ${j.default.dim(`[${te.size} imports rewritten] ${ut(u,t)}`)}`),b?gs(b,u,e):c}}}function $h(e){let t=new Set;for(let n of e)if(n)for(let r of n)t.add(r);return t}function p1(e,t){let n=e.endsWith(".vue"),r=e.endsWith(".jsx")||e.endsWith(".tsx"),s=!n&&ho(e),i=t.includes("\uFFFD");return{message:"Failed to parse source for import analysis because the content contains invalid JS syntax. "+(n?"Install @vitejs/plugin-vue to handle .vue files.":s?r?"If you use tsconfig.json, make sure to not set jsx to preserve.":"If you are using JSX, make sure to name the file with the .jsx or .tsx extension.":`You may need to install appropriate plugins to handle the ${L.extname(e)} file format, or if it's an asset, add "**/*${L.extname(e)}" to \`assetsInclude\` in your configuration.`),showCodeFrame:!i}}var h1=(e,t)=>t||!e?.__esModule?{...typeof e=="object"&&!Array.isArray(e)||typeof e=="function"?e:{},default:e}:e,iw=h1.toString().replaceAll(`
|
|
396
|
-
`,"");function Mh(e,t,n,r,s,i,a){let o=e.original,{s:l,e:c,ss:u,se:f,d}=t,p=o.slice(u,f);if(d>-1)e.overwrite(u,f,`import('${n}').then(m => (${iw})(m.default, ${+i}))`+_l(p),{contentOnly:!0});else{let h=m1(p,n,o.slice(l,c),r,s,i,a);h?(e.overwrite(u,f,h.importLine+_l(p),{contentOnly:!0}),h.hoistedAssignments&&e.appendLeft(ys(o),h.hoistedAssignments+";")):e.overwrite(l,c,n+_l(o.slice(l,c)),{contentOnly:!0})}}function _l(e){return e.includes(`
|
|
397
|
-
`)?`
|
|
398
|
-
`.repeat(e.split(`
|
|
399
|
-
`).length-1):""}function m1(e,t,n,r,s,i,a){let o=Os(e).body[0];if(a.command==="serve"&&o.type==="ExportAllDeclaration"&&!o.exported)a.logger.warn(j.default.yellow(`
|
|
400
|
-
Unable to interop \`${e}\` in ${s}, this may lose module exports. Please export "${n}" as ESM or use named exports instead, e.g. \`export { A, B } from "${n}"\``));else if(o.type==="ImportDeclaration"||o.type==="ExportNamedDeclaration"){if(!o.specifiers.length)return{importLine:`import "${t}"`};let l=[],c=[],u="";for(let h of o.specifiers)if(h.type==="ImportSpecifier"){let y=bl(h.imported);l.push({importedName:y,localName:h.local.name})}else if(h.type==="ImportDefaultSpecifier")l.push({importedName:"default",localName:h.local.name});else if(h.type==="ImportNamespaceSpecifier")l.push({importedName:"*",localName:h.local.name});else if(h.type==="ExportSpecifier"){let y=bl(h.local),m=bl(h.exported);if(m==="default")u=$i(`__vite__cjsExportDefault_${r}`),l.push({importedName:y,localName:u});else{let w=`__vite__cjsExport${h.exported.type==="Literal"?`L_${We(h.exported.value)}`:"I_"+h.exported.name}`;l.push({importedName:y,localName:w}),c.push(`${w} as ${h.exported.type==="Literal"?JSON.stringify(m):m}`)}}let f=$i(`__vite__cjsImport${r}_${n}`),d=`import ${f} from "${t}"`,p=[];return l.forEach(({importedName:h,localName:y})=>{h==="*"?p.push(`const ${y} = (${iw})(${f}, ${+i})`):h==="default"?i?p.push(`const ${y} = ${f}`):p.push(`const ${y} = !${f}.__esModule ? ${f} : ${f}.default`):p.push(`const ${y} = ${f}["${h}"]`)}),u&&p.push(`export default ${u}`),c.length&&p.push(`export { ${c.join(", ")} }`),{importLine:d,hoistedAssignments:p.join("; ")}}}function bl(e){return e.type==="Identifier"?e.name:e.value}function g1(e,t){if(e[0]!=="."&&e[0]!=="/")return e;let n=e.replace(/[?#].*$/,""),{search:r,hash:s}=new URL(e,"http://vite.dev");return`${n}?${t}${r?"&"+r.slice(1):""}${s||""}`}var Rr="\0vite/wasm-helper.js",Dh=/(?<![?#].*)\.wasm\?init/,y1=/(?<![?#].*)\.wasm$/,ow="?vite-wasm-instance",Ph=/[?&]vite-wasm-instance(?:&|$)/,Sl=/__VITE_WASM_INIT__([\w$]+)__/g,Gt={builtins:["js-string"],importedStringConstants:"wasm:js/string-constants"},A1=new Set([...Gt.builtins.map(e=>`wasm:${e}`),Gt.importedStringConstants]),w1=async(e={},t)=>{let n;if(t.startsWith("data:")){let r=t.replace(/^data:.*?base64,/,""),s;if(typeof Buffer=="function"&&typeof Buffer.from=="function")s=Buffer.from(r,"base64");else if(typeof atob=="function"){let i=atob(r);s=new Uint8Array(i.length);for(let a=0;a<i.length;a++)s[a]=i.charCodeAt(a)}else throw new Error("Failed to decode base64-encoded data URL, Buffer and atob are not supported");n=await WebAssembly.instantiate(s,e,Gt)}else n=await aw(t,e);return n.instance},E1=w1.toString(),aw=async(e,t)=>{let n=await fetch(e),r=n.headers.get("Content-Type")||"";if("instantiateStreaming"in WebAssembly&&r.startsWith("application/wasm"))return WebAssembly.instantiateStreaming(n,t,Gt);{let s=await n.arrayBuffer();return WebAssembly.instantiate(s,t,Gt)}},v1=aw.toString(),_1=async(e,t)=>{let{readFile:n}=await import("fs/promises"),r=await n(new URL(e,import.meta.url));return WebAssembly.instantiate(r,t,Gt)},b1=_1.toString(),S1=()=>As("vite:wasm-helper",e=>({name:"vite:wasm-helper",resolveId:{filter:{id:St(Rr)},handler(t){return t}},load:{filter:{id:[St(Rr),Dh,y1,Ph]},async handler(t){let n=this.environment.config.consumer==="server";if(t===Rr)return`
|
|
401
|
-
const wasmCompileOptions = ${JSON.stringify(Gt)}
|
|
402
|
-
const instantiateFromUrl = ${n?b1:v1}
|
|
403
|
-
export default ${E1}
|
|
404
|
-
`;let r=Dh.test(t),s=Ph.test(t),i=s?he(t):t.split("?")[0],a;if(!r&&(a=await x1(i),!s&&a.hasGlobalExport))return I1(a,i+ow);let o=await yn(this,i,n);if(Vn.lastIndex=0,n&&Vn.test(o)&&(o=o.replace("__VITE_ASSET__","__VITE_WASM_INIT__")),r)return`
|
|
405
|
-
import initWasm from "${Rr}"
|
|
406
|
-
export default opts => initWasm(opts, ${JSON.stringify(o)})
|
|
407
|
-
`;let l=C1(a,{initWasm:"__vite__initWasm",wasmUrl:"__vite__wasmUrl"});return`
|
|
408
|
-
import __vite__initWasm from "${Rr}"
|
|
409
|
-
const __vite__wasmUrl = ${JSON.stringify(o)}
|
|
410
|
-
${l}
|
|
411
|
-
`}},renderChunk:e.config.consumer==="server"?{filter:{code:Sl},handler(t,n,r,s){let i=No(r.format,this.environment.config.isWorker),a,o;for(Sl.lastIndex=0;a=Sl.exec(t);){let[l,c]=a,u=this.getFileName(c);n.viteMetadata.importedAssets.add(he(u));let{runtime:f}=i(u,n.fileName);o??=s.magicString??new Ie(t),o.update(a.index,a.index+l.length,`"+${f}+"`)}return o?s.magicString?{code:o}:{code:o.toString(),map:this.environment.config.build.sourcemap?o.generateMap({hires:"boundary"}):null}:null}}:void 0}));async function x1(e){try{let t=await Ee.readFile(e),n=await WebAssembly.compile(t,Gt),r=new Map;for(let a of WebAssembly.Module.imports(n)){if(A1.has(a.module))continue;let o=r.get(a.module);o||r.set(a.module,o=[]),o.push({name:a.name,isGlobal:a.kind==="global"})}let s=[...r].map(([a,o])=>({from:a,names:o})),i=!1;return{imports:s,exports:WebAssembly.Module.exports(n).map(a=>{let o=a.kind==="global";return o&&(i=!0),{name:a.name,isGlobal:o}}),hasGlobalExport:i}}catch(t){throw new Error(`Failed to parse WASM file "${e}": ${t.message}`,{cause:t})}}function C1(e,t){let n=[],r=e.imports.map(({from:o,names:l},c)=>{let u=[],f=l.filter(p=>p.isGlobal),d=l.filter(p=>!p.isGlobal);if(d.length>0){let p=`__vite__wasmImport_${c}`;n.push(`import * as ${p} from ${JSON.stringify(o)};`);for(let{name:h}of d)u.push({key:JSON.stringify(h),value:`${p}[${JSON.stringify(h)}]`})}if(f.length>0){let p=`__vite__wasmImportInstance_${c}`;n.push(`import * as ${p} from ${JSON.stringify(o+ow)};`);for(let{name:h}of f)u.push({key:JSON.stringify(h),value:`${p}[${JSON.stringify(h)}]`})}return{key:JSON.stringify(o),value:u}}),s=`const __vite__wasmModule = (await ${t.initWasm}(${lw(r)}, ${t.wasmUrl})).exports;`;if(e.exports.length===0)return[...n,s].join(`
|
|
412
|
-
`);let i=[],a=new Map;for(let[o,{name:l}]of e.exports.entries())if(Iu(l))i.push(` ${l},`);else{let c=`__vite__wasmExport_${o}`;i.push(` ${JSON.stringify(l)}: ${c},`),a.set(l,c)}if(a.size>0){i.unshift("const {"),i.push("} = __vite__wasmModule;"),i.push("export {");for(let{name:o}of e.exports){let l=a.get(o);l?i.push(` ${l} as ${JSON.stringify(o)},`):i.push(` ${o},`)}i.push("};")}else i.unshift("export const {"),i.push("} = __vite__wasmModule;");return[...n,s,...i].join(`
|
|
413
|
-
`)}function I1(e,t){let n=JSON.stringify(t),r=[`export * from ${n};`];e.exports.some(l=>l.name==="default")&&r.push(`export { default } from ${n};`);let s=[],i=[],a=[],o=[];for(let[l,{name:c,isGlobal:u}]of e.exports.entries()){if(!u||c==="default")continue;let f=`__vite__wasmGlobal_${l}`;s.push(`${R1(c)} as ${f}`);let d=Iu(c)?c:`__vite__wasmGlobalValue_${l}`;i.push(d),a.push(`try { ${d} = ${f}.value; } catch {}`),o.push(d===c?c:`${d} as ${JSON.stringify(c)}`)}return i.length>0&&(r.push(`import { ${s.join(", ")} } from ${n};`),r.push(`let ${i.join(", ")};`),r.push(...a),r.push(`export { ${o.join(", ")} };`)),r.join(`
|
|
414
|
-
`)}function R1(e){return Iu(e)?e:JSON.stringify(e)}function lw(e){return e.length===0?"{}":`{ ${e.map(({key:t,value:n})=>`${t}: ${typeof n=="string"?n:lw(n)}`).join(", ")} }`}var k1=/^[$_\p{ID_Start}][$\p{ID_Continue}]*$/u,T1=new Set(["abstract","boolean","break","byte","case","catch","char","class","const","continue","debugger","default","delete","do","double","else","enum","export","extends","false","final","finally","float","for","function","goto","if","implements","import","in","instanceof","int","interface","let","long","native","new","null","package","private","protected","public","return","short","static","super","switch","synchronized","this","throw","throws","transient","true","try","typeof","var","void","volatile","while","with","yield"]);function Iu(e){return!T1.has(e)&&k1.test(e)}function Ki(e,t){let n=new Error(e);return n.pos=t,n}function O1(e,t){let n=1;for(let r=t;r<e.length;r++)if(e[r]==="("&&n++,e[r]===")"&&n--,n===0)return r;return-1}function B1(e,t){if(e.type!=="ObjectExpression")return;let n=-1,r=null,s=-1;for(let i=0;i<e.properties.length;i++){let a=e.properties[i];if(a.type==="SpreadElement"){n=i;continue}a.type==="Property"&&(a.key.type==="Identifier"&&a.key.name==="type"||a.key.type==="Literal"&&a.key.value==="type")&&(r=a,s=i)}if(s===-1&&n===-1)return"classic";if(s<n)throw Ki("Expected object spread to be used before the definition of the type property. Vite needs a static value for the type property to correctly infer it.",t);if(r?.value.type!=="Literal")throw Ki("Expected worker options type property to be a literal value.",t);return r?.value.value==="module"?"module":"classic"}async function $1(e,t){let n={};try{n=jg(e)}catch{let r=(await Bs(`(${e})`)).body[0].expression,s=B1(r,t);if(s)return{type:s};throw Ki("Vite is unable to parse the worker options as the value is not static. To ignore this error, please use /* @vite-ignore */ in the worker options.",t)}if(n==null)return{};if(typeof n!="object")throw Ki(`Expected worker options to be an object, got ${typeof n}`,t);return n}async function M1(e,t,n){let r=t.indexOf(",",n);if(r===-1)return"classic";let s=O1(t,n);if(r>s)return"classic";let i=e.substring(r+1,s);if(xs.test(i))return"ignore";let a=t.substring(r+1,s),o=a.trim();if(!o.length)return"classic";o.endsWith(",")&&(i=i.slice(0,a.lastIndexOf(",")));let l=await $1(i,r+1);return l.type&&(l.type==="module"||l.type==="classic")?l.type:"classic"}var Nh=/\bnew\s+(?:Worker|SharedWorker)\s*\(\s*(new\s+URL\s*\(\s*('[^']+'|"[^"]+"|`[^`]+`)\s*,\s*import\.meta\.url\s*(?:,\s*)?\))/dg;function D1(e){let t,n={...e.resolve,root:e.root,isProduction:e.isProduction,isBuild:e.command==="build",packageCache:e.packageCache,asSrc:!0};return{name:"vite:worker-import-meta-url",applyToEnvironment(r){return r.config.consumer==="client"},transform:{filter:{code:Nh},async handler(r,s){let i=this.environment.config.isBundled,a,o=vs(r),l=new RegExp(Nh),c;for(;c=l.exec(o);){let[[,u],[f,d],[p,h]]=c.indices,y=r.slice(p,h);y[0]==="`"&&y.includes("${")&&this.error("`new URL(url, import.meta.url)` is not supported in dynamic template string.",f),a||=new Ie(r);let m=await M1(r,o,u),w=y.slice(1,-1),A;if(w[0]==="."?(A=L.resolve(L.dirname(s),w),A=De(Mo(A,n)??A)):(t??=Ot(e,{extensions:[],tryIndex:!1,preferRelative:!0}),A=await t(this.environment,w,s),A??=w[0]==="/"?De(L.join(e.publicDir,w)):De(L.resolve(L.dirname(s),w))),i&&e.isWorker&&e.bundleChain.at(-1)===he(A))a.update(f,d,"self.location.href");else{let g;if(i){let E=await ew(e,A);this.environment.config.command==="serve"?(tw(this,e),g=uu(this.environment,E.entryFilename)):g=E.entryUrlPlaceholder;for(let v of E.watchedFiles)this.addWatchFile(v)}else g=await yn(this,he(A)),g=Le(g,`${XA}&type=${m}`);a.update(f,d,`new URL(/* @vite-ignore */ ${JSON.stringify(g)}, '' + import.meta.url)`)}}return a?gs(a,s,e):null}}}}var xl="__VITE_IS_MODERN__",cw="__vitePreload",jn="__VITE_PRELOAD__",P1="\0vite/preload-helper.js",Lh=new RegExp(jn,"g");function Fh(e,t){let n=L.posix.relative(L.posix.dirname(t),e);return n[0]==="."?n:`./${n}`}function Gr(e,t=0){return Lh.lastIndex=t,Lh.exec(e)?.index??-1}function N1(e,t){let n=new Array(t.length).fill(-1);if(t.length===0)return n;let r=[],s=0;for(let i=Gr(e,t[0].e);i!==-1;i=Gr(e,i+jn.length)){for(;s<t.length&&t[s].e<=i;)r.push(s++);r.length&&(n[r.pop()]=i)}return t.length===1&&n[0]===-1&&(n[0]=Gr(e)),n}function L1(){let e=typeof document<"u"&&document.createElement("link").relList;return e&&e.supports&&e.supports("modulepreload")?"modulepreload":"preload"}function F1(e,t,n){let r=Promise.resolve();if(__VITE_IS_MODERN__&&t&&t.length>0){let l=function(u){return Promise.all(u.map(f=>Promise.resolve(f).then(d=>({status:"fulfilled",value:d}),d=>({status:"rejected",reason:d}))))},c=function(u){return import.meta.resolve?import.meta.resolve(u):new URL(u,import.meta.url).href},i=document.getElementsByTagName("link"),a=document.querySelector("meta[property=csp-nonce]"),o=a?.nonce||a?.getAttribute("nonce");r=l(t.map(u=>{if(u=assetsURL(u,n),u=c(u),u in seen)return;seen[u]=!0;let f=u.endsWith(".css");for(let p=i.length-1;p>=0;p--){let h=i[p];if(h.href===u&&(!f||h.rel==="stylesheet"))return}let d=document.createElement("link");if(d.rel=f?"stylesheet":scriptRel,f||(d.as="script"),d.crossOrigin="",d.href=u,o&&d.setAttribute("nonce",o),document.head.appendChild(d),f)return new Promise((p,h)=>{d.addEventListener("load",p),d.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${u}`)))})}))}function s(i){let a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=i,window.dispatchEvent(a),!a.defaultPrevented)throw i}return r.then(i=>{for(let a of i||[])a.status==="rejected"&&s(a.reason);return e().catch(s)})}function j1(e,t,n){let{modulePreload:r}=e.config.build,s=r&&r.polyfill?"'modulepreload'":`/* @__PURE__ */ (${L1.toString()})()`,i=t||n?"function(dep, importerUrl) { return new URL(dep, importerUrl).href }":`function(dep) { return ${JSON.stringify(e.config.base)}+dep }`,a=F1.toString().replaceAll("\u{1D422}\u{1D426}\u{1D429}\u{1D428}\u{1D42B}\u{1D42D}","import");return`const scriptRel = ${s};const assetsURL = ${i};const seen = {};export const ${cw} = ${a}`}function Q1(e){let t=s=>s.config.consumer==="client"&&!e.isWorker&&!e.build.lib,n=e.experimental.renderBuiltUrl,r=e.base==="./"||e.base==="";return[{name:"vite:build-import-analysis",renderChunk(s,i,{format:a}){if(s.includes(xl)){let o=new RegExp(xl,"g"),l=String(a==="es"),c=l+" ".repeat(xl.length-l.length);return{code:s.replace(o,c),map:null}}return null},async generateBundle(s,i){let{format:a}=s;if(a!=="es")return;if(await vn,!t(this.environment)){let f=Hi.get(e);if(f&&f.size>0)for(let d in i){let p=i[d];if(p.type==="chunk"&&p.code.includes("import")){let h=p.code,y;try{y=wt(h)[0].filter(m=>m.d>-1)}catch(m){let w=Dt(h,m.idx);this.error({name:m.name,message:m.message,stack:m.stack,cause:m.cause,pos:m.idx,loc:{...w,file:p.fileName},frame:Ue(h,w)})}for(let m of y){let{n:w,s:A,e:g,ss:E,se:v}=m,S=w;if(!S){let _=h.slice(A,g);(_[0]==='"'&&_[_.length-1]==='"'||_[0]==="`"&&_[_.length-1]==="`")&&(S=_.slice(1,-1))}if(!S)continue;let b=L.posix.join(L.posix.dirname(p.fileName),S);f.has(b)&&(p.code=p.code.slice(0,E)+`Promise.resolve({${"".padEnd(v-E-19," ")}})`+p.code.slice(v))}}}return}let o=this.environment.config.build.sourcemap,{modulePreload:l}=this.environment.config.build,c,u;if(this.environment.config.build.chunkImportMap){let f=wc(i,this.environment.config);c=f.mapping,u=Object.fromEntries(Object.entries(c).map(([d,p])=>[p,d])),e.isOutputOptionsForLegacyChunks?.(s)&&(this.emitFile({type:"asset",fileName:"importmap.legacy.json",source:f.asset.source}),delete i[To(this.environment.config)])}for(let f in i){let d=i[f];if(d.type==="chunk"&&d.code.includes(jn)){let p=d.code,h;try{h=wt(p)[0].filter(E=>E.d>-1)}catch(E){let v=Dt(p,E.idx);this.error({name:E.name,message:E.message,stack:E.stack,cause:E.cause,pos:E.idx,loc:{...v,file:d.fileName},frame:Ue(p,v)})}let y=new Ie(p),m=new Set,w=[],A=(E,v=!1)=>{let S=w.findIndex(b=>b.url===E);return S===-1?w.push({url:E,runtime:v})-1:S};if(h.length){let E=N1(p,h);for(let v=0;v<h.length;v++){let{n:S,s:b,e:_,ss:C,se:x}=h[v],T=S;if(!T){let M=p.slice(b,_);(M[0]==='"'&&M[M.length-1]==='"'||M[0]==="`"&&M[M.length-1]==="`")&&(T=M.slice(1,-1))}let k=new Set,O=!1,R;if(T){R=L.posix.join(L.posix.dirname(d.fileName),T);let M=d.fileName,B=new Set,U=V=>{let te=c?.[V]??V;if(te===M||B.has(te))return;B.add(te);let Q=i[te];if(Q)k.add(Q.fileName),Q.type==="chunk"&&(Q.imports.forEach(U),Q.viteMetadata.importedCss.forEach(Z=>{k.add(Z)}));else{let Z=Hi.get(e).get(te);Z&&(Z.viteMetadata.importedCss.size&&(Z.viteMetadata.importedCss.forEach(F=>{k.add(F)}),O=!0),y.update(C,x,"Promise.resolve({})"))}};U(R)}let I=E[v];if(I>0){let M=k.size>1||O&&k.size>0?l===!1?[...k].filter(V=>V.endsWith(".css")):[...k]:[],B=l?l.resolveDependencies:void 0;if(B&&R){let V=[],te=[];for(let Q of M)(Q.endsWith(".css")?V:te).push(Q);M=[...B(R,te,{hostId:f,hostType:"js"}),...V]}M=M.map(V=>u?.[V]??V);let U;n?U=M.map(V=>{let te=Xn(this.environment,V,"asset",d.fileName,"js",Fh);return typeof te=="string"?A(te):A(te.runtime,!0)}):U=M.map(V=>A(r?Fh(V,f):V)),y.update(I,I+jn.length,U.length>0?`__vite__mapDeps([${U.join(",")}])`:"[]"),m.add(I)}}}if(w.length>0){let E=`const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=${`[${w.map(v=>v.runtime?v.url:JSON.stringify(v.url)).join(",")}]`})))=>i.map(i=>d[i]);
|
|
415
|
-
`;p.startsWith("#!")?y.prependLeft(ys(p),E):y.prepend(E)}let g=Gr(p);for(;g>=0;)m.has(g)||y.update(g,g+jn.length,"void 0"),g=Gr(p,g+jn.length);if(y.hasChanged()&&(d.code=y.toString(),o&&d.map)){let E=y.generateMap({source:d.fileName,hires:"boundary"}),v=d.map.file,S=ms(d.fileName,[E,d.map]);S.toUrl=()=>ns(S),v&&(S.file=v);let b=d.map.debugId;if(d.map=S,o==="inline")d.code=d.code.replace(Qr.default.mapFileCommentRegex,""),d.code+=`
|
|
416
|
-
//# sourceMappingURL=${ns(S)}`;else{b&&(S.debugId=b);let _=i[d.fileName+".map"];_&&_.type==="asset"&&(_.source=S.toString())}}}}}},As("native:import-analysis-build",s=>{let i=j1(s,!!n,r);return Yo({preloadCode:i,insertPreload:t(s),optimizeModulePreloadRelativePaths:!1,renderBuiltUrl:!!n,isRelativeBase:r})})]}var Vi=/\bnew\s+URL\s*\(\s*('[^']+'|"[^"]+"|`[^`]+`)\s*,\s*import\.meta\.url\s*(?:,\s*)?\)/dg;function U1(e){let{publicDir:t}=e,n,r={...e.resolve,root:e.root,isProduction:e.isProduction,isBuild:e.command==="build",packageCache:e.packageCache,asSrc:!0};return{name:"vite:asset-import-meta-url",applyToEnvironment(s){return s.config.consumer==="client"},transform:{filter:{id:{exclude:[St(P1),St(Ct)]},code:Vi},async handler(s,i){let a,o=new RegExp(Vi),l=vs(s),c;for(;c=o.exec(l);){let[[u,f],[d,p]]=c.indices;if(xs.test(s.slice(u,d)))continue;let h=s.slice(d,p);if(a||(a=new Ie(s)),h[0]==="`"&&h.includes("${")){let A=W1(h),g=A!==-1,E=g?h.slice(0,A)+"`":h,v=g?h.slice(A,-1):"",S=this.parse(E).body[0].expression;if(S.expressions.length){let b=H1(S);if(b[0]==="*")continue;let _={eager:!0,import:"default",query:Le(v,"url")};a.update(u,f,`new URL((import.meta.glob(${JSON.stringify(b)}, ${JSON.stringify(_)}))[${E}], import.meta.url)`);continue}}let y=h.slice(1,-1);if(gn(y))continue;let m;y[0]==="."?(m=De(L.resolve(L.dirname(i),y)),m=Mo(m,r)??m):(n??=Ot(e,{extensions:[],mainFields:[],tryIndex:!1,preferRelative:!0}),m=await n(this.environment,y,i),m??=y[0]==="/"?De(L.join(t,y)):De(L.resolve(L.dirname(i),y)));let w;if(m)try{if(t&&En(t,m)){let A="/"+L.posix.relative(t,m);w=await yn(this,A)}else w=await yn(this,m),_t(m)?.isFile()&&this.addWatchFile(m)}catch{}if(!w){let A=s.slice(u,f);e.logger.warnOnce(`
|
|
417
|
-
${A} doesn't exist at build time, it will remain unchanged to be resolved at runtime. If this is intended, you can use the /* @vite-ignore */ comment to suppress this warning.`),w=y}a.update(u,f,`new URL(${JSON.stringify(w)}, '' + import.meta.url)`)}if(a)return gs(a,i,e)}}}}function H1(e){let t="",n=!1;for(let r=0;r<e.quasis.length;r++){let s=e.quasis[r].value.raw;s&&(t+=s,n=!1),e.expressions[r]&&!n&&(t+="*",n=!0)}return t}function W1(e){let t=0;for(let n=0;n<e.length;n++)if(e[n]==="{")t++;else if(e[n]==="}")t--;else if(e[n]==="?"&&t===0)return n;return-1}var sn=class extends Error{},kr="For example: import(`./foo/${bar}.js`).";function uw(e){if(e==="")return e;if(e.includes("*"))throw new sn("A dynamic import cannot contain * characters.");return kn(e)}function G1(e){let t="";for(let n=0;n<e.quasis.length;n+=1)t+=uw(e.quasis[n].value.raw),e.expressions[n]&&(t+=qn(e.expressions[n]));return t}function z1(e){let{callee:t}=e;return t.type==="MemberExpression"&&t.property.type==="Identifier"&&t.property.name==="concat"?`${qn(t.object)}${e.arguments.map(qn).join("")}`:"*"}function J1(e){if(e.operator!=="+")throw new sn(`${e.operator} operator is not supported.`);return`${qn(e.left)}${qn(e.right)}`}function qn(e){switch(e.type){case"TemplateLiteral":return G1(e);case"CallExpression":return z1(e);case"BinaryExpression":return J1(e);case"Literal":return uw(e.value);default:return"*"}}var K1="file:",V1=["data:","http:","https:"];function q1(e){let t=e.includes("*"),n=new URL(e,K1),r=V1.some(s=>s===n.protocol);return!t||r}function Y1(e,t){let n=qn(e);if(q1(n))return null;if(n=n.replace(/\*\*/g,"*"),n.startsWith("*"))throw new sn(`invalid import "${t}". It cannot be statically analyzed. Variable dynamic imports must start with ./ and be limited to a specific directory. ${kr}`);if(n.startsWith("/"))throw new sn(`invalid import "${t}". Variable absolute imports are not supported, imports must start with ./ in the static part of the import. ${kr}`);if(!n.startsWith("./")&&!n.startsWith("../"))throw new sn(`invalid import "${t}". Variable bare imports are not supported, imports must start with ./ in the static part of the import. ${kr}`);if(/^\.\/\*\.\w+$/.test(n))throw new sn(`${`invalid import "${t}". Variable imports cannot import their own directory, place imports in a separate directory or make the import filename more specific. `}${kr}`);if(LS.extname(n)==="")throw new sn(`invalid import "${t}". A file extension must be included in the static part of the import. ${kr}`);return n}var Cl="\0vite/dynamic-import-helper.js",X1=/^\.{1,2}\//,Z1=/\bimport\s*[(/]/,eD=(e,t,n)=>{let r=e[t];return r?typeof r=="function"?r():Promise.resolve(r):new Promise((s,i)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(i.bind(null,new Error("Unknown variable dynamic import: "+t+(t.split("/").length!==n?". Note that variables only represent file names one level deep.":""))))})};function tD(e){let t=e.slice(1,-1),n=Os(e).body[0].expression,r=Y1(n,t);if(!r)return null;let[s]=r.split(rI,2),[i,a]=t.split(nI,2),o=null;return a&&(a="?"+a,vc.test(a)||It.test(a)||Xl.test(a)?o={query:a,import:"*"}:o={query:a}),{globParams:o,userPattern:s,rawPattern:i}}async function nD(e,t,n,r){if(e[1]!=="."&&e[1]!=="/"){let p=await n(e.slice(1,-1),t);if(!p)return null;let h=re(Qe.relative(Qe.dirname(re(t)),re(p)));e="`"+(h[0]==="."?"":"./")+h+"`"}let s=tD(e);if(!s)return null;let{globParams:i,rawPattern:a,userPattern:o}=s,l=i?`, ${JSON.stringify(i)}`:"",c=t?Qe.dirname(t):r,u=a[0]==="/"?Qe.join(r,a.slice(1)):Qe.join(c,a),f=Qe.relative(Qe.dirname(t),u);X1.test(f)||(f=`./${f}`);let d=`(import.meta.glob(${JSON.stringify(o)}${l}))`;return{rawPattern:f,pattern:o,glob:d}}function rD(e){let t=Ot(e,{preferRelative:!0,tryIndex:!1,extensions:[]}),n=_s(r=>{let{include:s,exclude:i}=r.config.build.dynamicImportVarsOptions;return hn(s,i)});return{name:"vite:dynamic-import-vars",applyToEnvironment(r){if(r.config.isBundled){let{include:s,exclude:i}=r.config.build.dynamicImportVarsOptions;return zo({include:s,exclude:i,resolver(a,o){return t(r,a,o)},sourcemap:!!r.config.build.sourcemap})}return!0},resolveId:{filter:{id:St(Cl)},handler(r){return r}},load:{filter:{id:St(Cl)},handler(r){return`export default ${eD.toString()}`}},transform:{filter:{id:{exclude:St(Ct)},code:Z1},async handler(r,s){let{environment:i}=this;if(!n(this)(s))return;await vn;let a=[];try{a=wt(r)[0]}catch{return null}if(!a.length)return null;let o,l=!1;for(let c=0;c<a.length;c++){let{s:u,e:f,ss:d,se:p,d:h}=a[c];if(h===-1||r[u]!=="`"||xs.test(r.slice(d,p)))continue;o||=new Ie(r);let y;try{y=await nD(r.slice(u,f),s,(A,g)=>t(i,A,g),e.root)}catch(A){this.warn(A)}if(!y)continue;let{rawPattern:m,glob:w}=y;l=!0,o.overwrite(d,p,`__variableDynamicImportRuntimeHelper(${w}, \`${m}\`, ${m.split("/").length})`)}if(o)return l&&o.prepend(`import __variableDynamicImportRuntimeHelper from "${Cl}";`),gs(o,s,e)}}}}function sD(e){let t=new Map;return{name:"vite:import-glob",applyToEnvironment(n){return n.config.isBundled?Jo({root:n.config.root,sourcemap:!!n.config.build.sourcemap,restoreQueryExtension:n.config.experimental.importGlobRestoreExtension}):!0},buildStart(){t.clear()},transform:{filter:{code:"import.meta.glob"},async handler(n,r){let s=await fw(n,r,e.root,(i,a,o)=>this.resolve(i,r,o).then(l=>l?.id||i),e.experimental.importGlobRestoreExtension,e.logger);if(s){t.has(this.environment)||t.set(this.environment,new Map);let i=s.matches.map(a=>{let o=[],l=[];for(let f of a.globsResolved)f[0]==="!"?l.push(f.slice(1)):o.push(f);let c=(0,Pt.default)(o,{noextglob:!0,dot:!!a.options.exhaustive,nocase:!(a.options.caseSensitive??!0),ignore:a.options.exhaustive?[]:["**/node_modules/**"]}),u=(0,Pt.default)(l,{noextglob:!0,dot:!!a.options.exhaustive,nocase:!(a.options.caseSensitive??!0),ignore:a.options.exhaustive?[]:["**/node_modules/**"]});return f=>(o.length===0||c(f))&&!(l.length>0&&u(f))});return t.get(this.environment).set(r,i),gs(s.s,r,e)}}},hotUpdate({type:n,file:r,modules:s}){if(n==="update")return;let i=t.get(this.environment);if(!i)return;let a=[];for(let[o,l]of i)if(l.some(c=>c(r))){let c=this.environment.moduleGraph.getModuleById(o);c&&a.push(c)}return a.length>0?[...s,...a]:void 0}}}var iD=/\bimport\.meta\.glob(?:<\w+>)?\s*\(/g,oD=/\bObject\.keys\(\s*$/,aD=/\bObject\.values\(\s*$/,jh={as:["string"],eager:["boolean"],import:["string"],exhaustive:["boolean"],query:["object","string"],base:["string"],caseSensitive:["boolean"]},Qh=["raw","url"];function Nt(e,t){let n=new Error(e);return n.pos=t,n}function lD(e,t,n){let r={};try{r=jg(e)}catch{throw Nt("Vite is unable to parse the glob options as the value is not static",t)}if(r==null)return{};for(let s in r){if(!(s in jh))throw Nt(`Unknown glob option "${s}"`,t);let i=jh[s],a=typeof r[s];if(!i.includes(a))throw Nt(`Expected glob option "${s}" to be of type ${i.join(" or ")}, but got ${a}`,t)}if(r.base){if(r.base[0]==="!")throw Nt('Option "base" cannot start with "!"',t);if(r.base[0]!=="/"&&!r.base.startsWith("./")&&!r.base.startsWith("../"))throw Nt(`Option "base" must start with '/', './' or '../', but got "${r.base}"`,t)}if(typeof r.query=="object"){for(let s in r.query){let i=r.query[s];if(!["string","number","boolean"].includes(typeof i))throw Nt(`Expected glob option "query.${s}" to be of type string, number, or boolean, but got ${typeof i}`,t)}r.query=RR(r.query)}if(r.as&&n){let s=Qh.includes(r.as)?", import: 'default'":"";n.warn(j.default.yellow(`The glob option "as" has been deprecated in favour of "query". Please update \`as: '${r.as}'\` to \`query: '?${r.as}'${s}\`.`))}if(r.as&&Qh.includes(r.as)){if(r.import&&r.import!=="default"&&r.import!=="*")throw Nt(`Option "import" can only be "default" or "*" when "as" is "${r.as}", but got "${r.import}"`,t);r.import=r.import||"default"}if(r.as&&r.query)throw Nt('Options "as" and "query" cannot be used together',t);return r.as&&(r.query=r.as),r.query&&r.query[0]!=="?"&&(r.query=`?${r.query}`),r}async function cD(e,t,n,r,s){let i;try{i=vs(e)}catch{return[]}let a=Array.from(i.matchAll(iD)).map(async(o,l)=>{let c=o.index,u=C=>{let x=new Error(`Invalid glob import syntax: ${C}`);return x.pos=c,x},f=uD(i,c+o[0].length)+1;if(f<=0)throw u("Close parenthesis not found");let d=e.slice(c,f),p=(await Bs(d)).body[0];if(p.type!=="ExpressionStatement")throw u(`Expect CallExpression, got ${p.type}`);let h=p.expression;if(h.type!=="CallExpression")throw u(`Expect CallExpression, got ${h.type}`);if(h.arguments.length<1||h.arguments.length>2)throw u(`Expected 1-2 arguments, but got ${h.arguments.length}`);let y=h.arguments[0],m=h.arguments[1],w=[],A=C=>{if(C)if(C.type==="Literal"){if(typeof C.value!="string")throw u(`Expected glob to be a string, but got "${typeof C.value}"`);w.push(C.value)}else if(C.type==="TemplateLiteral"){if(C.expressions.length!==0)throw u("Expected glob to be a string, but got dynamic template literal");w.push(C.quasis[0].value.raw)}else throw u("Could only use literals")};if(y.type==="ArrayExpression")for(let C of y.elements)A(C);else A(y);let g={};if(m){if(m.type!=="ObjectExpression")throw u(`Expected the second argument to be an object literal, but got "${m.type}"`);g=lD(e.slice(c+m.start,c+m.end),c+m.start,s)}let E=await Promise.all(w.map(C=>hD(C,n,t,r,g.base))),v=w.every(C=>".!".includes(C[0])),S=i.slice(0,c),b=oD.test(S),_=!1;return b||(_=aD.test(S)),{index:l,globs:w,globsResolved:E,isRelative:v,options:g,start:c,end:f,onlyKeys:b,onlyValues:_}});return(await Promise.all(a)).filter(Boolean)}function uD(e,t){let n=e.indexOf(")",t);if(n<0)return-1;if(!e.slice(t,n).includes("("))return n;let r=0,s=e.length;for(let i=t;i<s;i++)switch(e[i]){case"(":r++;break;case")":if(r--,r<=0)return i}return-1}var fD="__vite_glob_",{basename:dD,dirname:bc,relative:Tr}=Qe;async function fw(e,t,n,r,s=!1,i){t=De(t),n=De(n);let a=gD(t),o=a?void 0:bc(t),l=await cD(e,a?void 0:t,n,r,i),c=new Set;if(!l.length)return null;let u=new Ie(e),f=(await Promise.all(l.map(async({globsResolved:d,isRelative:p,options:h,index:y,start:m,end:w,onlyKeys:A,onlyValues:g})=>{if(!o&&!h.base&&p)throw new Error("In virtual modules, all globs must start with '/'");let E=mD(d)??n,v=(await wr(d,{absolute:!0,cwd:E,dot:!!h.exhaustive,expandDirectories:!1,caseSensitiveMatch:h.caseSensitive??!0,ignore:h.exhaustive?[]:["**/node_modules/**"],extglob:!1})).filter(k=>k!==t).sort(),S=[],b=[],_=k=>{if(!o){let I=`/${Tr(n,k)}`,M=h.base?`${Tr(Qe.join(n,h.base),k)}`:I;return h.base&&!M.startsWith("./")&&!M.startsWith("../")&&(M=`./${M}`),{filePath:M,importPath:I}}let O=Tr(o,k);!O.startsWith("./")&&!O.startsWith("../")&&(O=`./${O}`);let R;return h.base?(R=Tr(Qe.join(h.base[0]==="/"?n:o,h.base),k),!R.startsWith("./")&&!R.startsWith("../")&&(R=`./${R}`)):p?R=O:(R=Tr(n,k),!R.startsWith("./")&&!R.startsWith("../")&&(R=`/${R}`)),{filePath:R,importPath:O}};v.forEach((k,O)=>{let R=_(k),I=R.filePath,M=R.importPath,B=h.query??"";if(A){S.push(`${JSON.stringify(I)}: 0`);return}if(B&&B!=="?raw"){let V=dD(k).split(".").slice(-1)[0];V&&s&&(B=`${B}&lang.${V}`)}M=`${M}${B}`;let U=h.import&&h.import!=="*"?h.import:void 0;if(h.eager){let V=`${fD}${y}_${O}`,te=U?`{ ${U} as ${V} }`:`* as ${V}`;b.push(`import ${te} from ${JSON.stringify(M)}`),S.push(g?`${V}`:`${JSON.stringify(I)}: ${V}`)}else{let V=`import(${JSON.stringify(M)})`;U&&(V+=`.then(m => m[${JSON.stringify(U)}])`),S.push(g?`() => ${V}`:`${JSON.stringify(I)}: () => ${V}`)}}),v.forEach(k=>c.add(k));let C=e.slice(m,w).match(/\n/g)?.length??0,x=C>0?`
|
|
418
|
-
`.repeat(C):"",T="";return A?T=`{${S.join(",")}${x}}`:g?T=`[${S.join(",")}${x}]`:T=`/* #__PURE__ */ Object.assign({${S.join(",")}${x}})`,u.overwrite(m,w,T),b}))).flat();return f.length&&u.prepend(`${f.join(";")};`),{s:u,matches:l,files:c}}function Ri(e){return kn(re(e))}function Uh(e,t){return e.charAt(e.length-1-t)}function pD(e,t){let n=0,r=Math.min(e.length,t.length);for(;n<r&&Uh(e,n)===Uh(t,n);)n+=1;let s=e.length-n,i=e.slice(0,s),a=e.slice(s);return Ri(i)+a}async function hD(e,t,n,r,s){let i="";e[0]==="!"&&(i="!",e=e.slice(1)),t=Ri(t);let a;if(s?s[0]==="/"?a=Qe.join(t,s):a=Qe.resolve(n?Ri(bc(n)):t,s):a=n?Ri(bc(n)):t,e[0]==="/")return i+Qe.join(t,e.slice(1));if(e.startsWith("./"))return i+Qe.join(a,e.slice(2));if(e.startsWith("../"))return i+Qe.join(a,e);if(e.startsWith("**"))return i+e;let o=e[0]==="#"&&e.includes("*"),l=re(await r(e,n,{custom:{"vite:import-glob":{isSubImportsPattern:o}}})||e);if(TS(l))return i+pD(l,e);throw new Error(`Invalid glob: "${e}" (resolved: "${l}"). It must start with '/' or './'`)}function mD(e){let t=e.filter(s=>s[0]!=="!").map(s=>{let{base:i}=Pt.default.scan(s);return Qe.basename(i).includes(".")&&(i=Qe.dirname(i)),i});if(!t.length)return null;let n="",r=t[0].split("/");for(let s=0;s<r.length;s++){let i=r.slice(0,s+1).join("/");if(t.every(a=>a===i||a.startsWith(`${i}/`)))n=i;else break}return n||(n="/"),n}function gD(e){return e.startsWith("virtual:")||e[0]==="\0"||!e.includes("/")}function yD(e,t){return e.startsWith("**")||L.isAbsolute(e)?De(e):De(L.join(t,e))}function Hh(e,t){if(e instanceof RegExp)return s=>{let i=De(s),a=e.test(i);return e.lastIndex=0,a};let n=yD(e,t),r=(0,Pt.default)(n,{dot:!0});return s=>{let i=De(s);return r(i)}}function Wh(e){return e instanceof RegExp?t=>{let n=e.test(t);return e.lastIndex=0,n}:t=>t.includes(e)}function dw(e,t){if(!(!e&&!t))return n=>e?.some(r=>r(n))?!1:t?.some(r=>r(n))?!0:!(t&&t.length>0)}function pw(e){return typeof e=="string"||e instanceof RegExp?{include:[e]}:Array.isArray(e)?{include:e}:{include:e.include?He(e.include):void 0,exclude:e.exclude?He(e.exclude):void 0}}function Sc(e,t=process.cwd()){if(!e)return;let{exclude:n,include:r}=pw(e),s=n?.map(a=>Hh(a,t)),i=r?.map(a=>Hh(a,t));return dw(s,i)}function AD(e){if(!e)return;let{exclude:t,include:n}=pw(e),r=t?.map(Wh),s=n?.map(Wh);return dw(r,s)}function wD(e){if(!e)return;let t=Array.isArray(e)?e:e.include??[];return n=>t.includes(n)}function ED(e,t,n,r){if(!e&&!t&&!n)return;let s=Sc(e,r),i=AD(t),a=wD(n);return(o,l,c)=>{let u=a?.(c)??!0;return!u||(s&&(u&&=s(o)),!u)?!1:(i&&(u&&=i(l)),u)}}function hw(e){return e!=null}function vD(e){return e===null||typeof e!="function"&&typeof e!="object"}var _D=/^[A-Za-z]:\//;function bD(e=""){return e&&e.replace(/\\/g,"/").replace(_D,t=>t.toUpperCase())}var SD=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;function xD(){return typeof process<"u"&&typeof process.cwd=="function"?process.cwd().replace(/\\/g,"/"):"/"}var mw=function(...e){e=e.map(r=>bD(r));let t="",n=!1;for(let r=e.length-1;r>=-1&&!n;r--){let s=r>=0?e[r]:xD();!s||s.length===0||(t=`${s}/${t}`,n=Gh(s))}return t=CD(t,!n),n&&!Gh(t)?`/${t}`:t.length>0?t:"."};function CD(e,t){let n="",r=0,s=-1,i=0,a=null;for(let o=0;o<=e.length;++o){if(o<e.length)a=e[o];else{if(a==="/")break;a="/"}if(a==="/"){if(!(s===o-1||i===1))if(i===2){if(n.length<2||r!==2||n[n.length-1]!=="."||n[n.length-2]!=="."){if(n.length>2){let l=n.lastIndexOf("/");l===-1?(n="",r=0):(n=n.slice(0,l),r=n.length-1-n.lastIndexOf("/")),s=o,i=0;continue}else if(n.length>0){n="",r=0,s=o,i=0;continue}}t&&(n+=n.length>0?"/..":"..",r=2)}else n.length>0?n+=`/${e.slice(s+1,o)}`:n=e.slice(s+1,o),r=o-s-1;s=o,i=0}else a==="."&&i!==-1?++i:i=-1}return n}var Gh=function(e){return SD.test(e)},ID=44,zh="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",RD=new Uint8Array(64),gw=new Uint8Array(128);for(let e=0;e<zh.length;e++){let t=zh.charCodeAt(e);RD[e]=t,gw[t]=e}function Or(e,t){let n=0,r=0,s=0;do s=gw[e.next()],n|=(s&31)<<r,r+=5;while(s&32);let i=n&1;return n>>>=1,i&&(n=-2147483648|-n),t+n}function Jh(e,t){return e.pos>=t?!1:e.peek()!==ID}var kD=class{constructor(e){this.pos=0,this.buffer=e}next(){return this.buffer.charCodeAt(this.pos++)}peek(){return this.buffer.charCodeAt(this.pos)}indexOf(e){let{buffer:t,pos:n}=this,r=t.indexOf(e,n);return r===-1?t.length:r}};function TD(e){let{length:t}=e,n=new kD(e),r=[],s=0,i=0,a=0,o=0,l=0;do{let c=n.indexOf(";"),u=[],f=!0,d=0;for(s=0;n.pos<c;){let p;s=Or(n,s),s<d&&(f=!1),d=s,Jh(n,c)?(i=Or(n,i),a=Or(n,a),o=Or(n,o),Jh(n,c)?(l=Or(n,l),p=[s,i,a,o,l]):p=[s,i,a,o]):p=[s],u.push(p),n.pos++}f||OD(u),r.push(u),n.pos=c+1}while(n.pos<=t);return r}function OD(e){e.sort(BD)}function BD(e,t){return e[0]-t[0]}var Oo=0,$D=1,MD=2,DD=3,PD=4,qi=!1;function ND(e,t,n,r){for(;n<=r;){let s=n+(r-n>>1),i=e[s][Oo]-t;if(i===0)return qi=!0,s;i<0?n=s+1:r=s-1}return qi=!1,n-1}function LD(e,t,n){for(let r=n+1;r<e.length&&e[r][Oo]===t;n=r++);return n}function FD(e,t,n){for(let r=n-1;r>=0&&e[r][Oo]===t;n=r--);return n}function jD(e,t,n,r){let{lastKey:s,lastNeedle:i,lastIndex:a}=n,o=0,l=e.length-1;if(r===s){if(t===i)return qi=a!==-1&&e[a][Oo]===t,a;t>=i?o=a===-1?0:a:l=a}return n.lastKey=r,n.lastNeedle=t,n.lastIndex=ND(e,t,o,l)}var QD="`line` must be greater than 0 (lines start at line 1)",UD="`column` must be greater than or equal to 0 (columns start at column 0)",Kh=-1,HD=1;function WD(e){var t;return(t=e)._decoded||(t._decoded=TD(e._encoded))}function GD(e,t){let{line:n,column:r,bias:s}=t;if(n--,n<0)throw new Error(QD);if(r<0)throw new Error(UD);let i=WD(e);if(n>=i.length)return ii(null,null,null,null);let a=i[n],o=zD(a,e._decodedMemo,n,r,s||HD);if(o===-1)return ii(null,null,null,null);let l=a[o];if(l.length===1)return ii(null,null,null,null);let{names:c,resolvedSources:u}=e;return ii(u[l[$D]],l[MD]+1,l[DD],l.length===5?c[l[PD]]:null)}function ii(e,t,n,r){return{source:e,line:t,column:n,name:r}}function zD(e,t,n,r,s){let i=jD(e,r,t,n);return qi?i=(s===Kh?LD:FD)(e,r,i):s===Kh&&i++,i===-1||i===e.length?-1:i}var yw=/^\s*at .*(?:\S:\d+|\(native\))/m,JD=/^(?:eval@)?(?:\[native code\])?$/,KD=["node:internal",/\/packages\/\w+\/dist\//,/\/@vitest\/\w+\/dist\//,"/vitest/dist/","/vitest/src/","/node_modules/chai/","/node_modules/tinyspy/","/vite/dist/node/module-runner","/rolldown-vite/dist/node/module-runner","/deps/chunk-","/deps/@vitest","/deps/loupe","/deps/chai","/browser-playwright/dist/locators.js","/browser-webdriverio/dist/locators.js","/browser-preview/dist/locators.js",/node:\w+/,/__vitest_test__/,/__vitest_browser__/,"/@id/__x00__vitest/browser",/\/deps\/vitest_/],VD=Date.now().toString().length,qD=new RegExp(`vitest=\\d{${VD}}`);function Aw(e){if(!e.includes(":"))return[e];let t=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/^\(|\)$/g,""));if(!t)return[e];let n=t[1];if(n.startsWith("async ")&&(n=n.slice(6)),n.startsWith("http:")||n.startsWith("https:")){let r=new URL(n);r.searchParams.delete("import"),r.searchParams.delete("browserv"),n=r.pathname+r.hash+r.search}if(n.startsWith("/@fs/")){let r=/^\/@fs\/[a-zA-Z]:\//.test(n);n=n.slice(r?5:4)}return n.includes("vitest=")&&(n=n.replace(qD,"").replace(/[?&]$/,"")),[n,t[2]||void 0,t[3]||void 0]}function YD(e){let t=e.trim();if(JD.test(t)||(t.includes(" > eval")&&(t=t.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),!t.includes("@")))return null;let n=-1,r="",s;for(let l=0;l<t.length;l++)if(t[l]==="@"){let c=t.slice(l+1);if(c.includes(":")&&c.length>=3){n=l,r=c,s=l>0?t.slice(0,l):void 0;break}}if(n===-1||!r.includes(":")||r.length<3)return null;let[i,a,o]=Aw(r);return!i||!a||!o?null:{file:i,method:s||"",line:Number.parseInt(a),column:Number.parseInt(o)}}function XD(e){let t=e.trim();if(!yw.test(t))return null;t.includes("(eval ")&&(t=t.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));let n=t.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,""),r=n.match(/ (\(.+\)$)/);n=r?n.replace(r[0],""):n;let[s,i,a]=Aw(r?r[1]:n),o=r&&n||"",l=s&&["eval","<anonymous>"].includes(s)?void 0:s;return!l||!i||!a?null:(o.startsWith("async ")&&(o=o.slice(6)),l.startsWith("file://")&&(l=l.slice(7)),l=l.startsWith("node:")||l.startsWith("internal:")?l:mw(l),o&&(o=o.replace(/\(0\s?,\s?__vite_ssr_import_\d+__.(\w+)\)/g,"$1").replace(/__(vite_ssr_import|vi_import)_\d+__\./g,"").replace(/(Object\.)?__vite_ssr_export_default__\s?/g,"")),{method:o,file:l,line:Number.parseInt(i),column:Number.parseInt(a)})}function Il(e,t={}){let{ignoreStackEntries:n=KD}=t,r=yw.test(e)?eP(e):ZD(e),s=r.findLastIndex(i=>i.method.includes("__VITEST_HELPER__"));return s>=0&&(r=r.slice(s+1)),r.map(i=>{t.getUrlId&&(i.file=t.getUrlId(i.file));let a=t.getSourceMap?.(i.file);if(!a||typeof a!="object"||!a.version)return Vh(n,i.file)?null:i;let o=sP(new nP(a,i.file),i);if(!o)return i;let{line:l,column:c,source:u,name:f}=o,d=u||i.file;return d.match(/\/\w:\//)&&(d=d.slice(1)),Vh(n,d)?null:l!=null&&c!=null?{line:l,column:c,file:d,method:f||i.method}:i}).filter(i=>i!=null)}function Vh(e,t){return e.some(n=>t.match(n))}function ZD(e){return e.split(`
|
|
419
|
-
`).map(t=>YD(t)).filter(hw)}function eP(e){return e.split(`
|
|
420
|
-
`).map(t=>XD(t)).filter(hw)}function tP(e,t={}){if(!e||vD(e))return[];if("stacks"in e&&e.stacks)return e.stacks;let n=e.stack||"",r=typeof n=="string"?Il(n,t):[];if(!r.length){let s=e;s.fileName!=null&&s.lineNumber!=null&&s.columnNumber!=null&&(r=Il(`${s.fileName}:${s.lineNumber}:${s.columnNumber}`,t)),s.sourceURL!=null&&s.line!=null&&s._column!=null&&(r=Il(`${s.sourceURL}:${s.line}:${s.column}`,t))}return t.frameFilter&&(r=r.filter(s=>t.frameFilter(e,s)!==!1)),e.stacks=r,r}var nP=class{_encoded;_decoded;_decodedMemo;url;version;names=[];resolvedSources;constructor(e,t){this.map=e;let{mappings:n,names:r,sources:s}=e;this.version=e.version,this.names=r||[],this._encoded=n||"",this._decodedMemo=rP(),this.url=t,this.resolvedSources=(s||[]).map(i=>mw(t,"..",i||""))}};function rP(){return{lastKey:-1,lastNeedle:-1,lastIndex:-1}}function sP(e,t){let n=GD(e,t);return n.column==null?null:n}function iP(e){let t=new Map;return{name:"vite:forward-console",apply:"serve",configureServer(n){for(let r of e.environments){let s=n.environments[r];s.hot.on("vite:forward-console",i=>{if(i.type==="error"||i.type==="unhandled-rejection"){let a=oP(i,s,t);s.config.logger.error(a,{timestamp:!0})}else{let a=j.default.dim(`[console.${i.data.level}] `)+i.data.message;i.data.level==="error"?s.config.logger.error(a,{timestamp:!0}):i.data.level==="warn"?s.config.logger.warn(a,{timestamp:!0}):s.config.logger.info(a,{timestamp:!0})}})}}}}function oP(e,t,n){let r=e.data,s=tP(r,{getUrlId(o){let l=t.moduleGraph;if(l.getModuleById(o))return o;let c=re(L.resolve(t.config.root,o.slice(1)));if(l.getModuleById(c))return c;let u=l.getModulesByFile(c);return u&&u.size?u.values().next().value.id:o},getSourceMap(o){if(n.has(o))return n.get(o);let l=t.moduleGraph.getModuleById(o)?.transformResult;if(l&&!l.map)try{let c=o.split("?")[0],u=Py(l.code,c,t.config.logger);return n.set(o,u?.map),u?.map}catch{return n.set(o,null),null}return n.set(o,l?.map),l?.map},ignoreStackEntries:[]}),i=s.find(o=>[...t.moduleGraph.getModulesByFile(o.file)||[]].some(l=>l.transformResult)&&pe.existsSync(o.file)),a="";a+=j.default.red(`${e.type==="unhandled-rejection"?"[Unhandled rejection]":"[Unhandled error]"} ${j.default.bold(r.name)}: ${r.message}
|
|
421
|
-
`);for(let o of s){let l=re(L.relative(t.config.root,o.file));if(a+=` > ${[o.method,`${l}:${o.line}:${o.column}`].filter(Boolean).join(" ")}
|
|
422
|
-
`,o===i){let c=pe.readFileSync(o.file,"utf-8");a+=Ue(c,o).replace(/^/gm," "),a+=`
|
|
423
|
-
`}}return a}function aP(e){let t=e.esbuild;if(!t)return;let{include:n,exclude:r,banner:s,footer:i}=t;if(!s&&!i)return;let a=hn(n||/\.(m?ts|[jt]sx)$/,r||/\.js$/);return{name:"vite:esbuild-banner-footer-compat",transform(o,l){if(a(l)||a(he(l))){if(!(this.environment.mode==="dev"||this.environment.mode==="build"&&this.environment.config.build.sourcemap))return s&&(o=`${s}
|
|
424
|
-
${o}`),i&&(o=`${o}
|
|
425
|
-
${i}`),o;let c,u=()=>c||(c=new Ie(o));if(s&&u().prepend(`${s}
|
|
426
|
-
`),i&&u().append(`${i}
|
|
427
|
-
`),c)return{code:c.toString(),map:c.generateMap({hires:"boundary"})}}}}}async function qh(e,t,n,r){let s=e.command==="build",i=e.isWorker,a=s||Object.values(e.environments).some(c=>c.isBundled)?CN(e):{pre:[],post:[]},o=e.devtools.enabled&&!i?await lP(e):null,{modulePreload:l}=e.build;return[hR(),i?null:d0(e.packageCache),r1(e),{...sc({entries:e.resolve.alias,customResolver:cP}),applyToEnvironment(c){return c.config.isBundled&&!c.config.resolve.alias.some(u=>u.customResolver)?gd({entries:e.resolve.alias.map(u=>({find:u.find,replacement:u.replacement}))}):!0}},...t,l!==!1&&l.polyfill?I$():null,...Nw({root:e.root,isProduction:e.isProduction,isBuild:s,packageCache:e.packageCache,asSrc:!0,optimizeDeps:!0,externalize:!0,legacyInconsistentCjsInterop:e.legacy?.inconsistentCjsInterop},i?{...e,consumer:"client",isBundled:!0,optimizeDepsPluginNames:[]}:void 0),$$(e),jB(e),aP(e),e.oxc!==!1?{...ea(),applyToEnvironment(c){return!c.config.isBundled}}:null,e.oxc!==!1?eR(e):null,qo({...e.json,minify:s}),S1(),n1(e),mB(e),e.server.forwardConsole.enabled&&iP({environments:["client"]}),...n,nM(e),QB(e),F$(e),D1(e),U1(e),...a.pre,rD(e),sD(e),...r,...a.post,o,oM(e),HB(e),d1(e)].filter(Boolean)}async function lP(e){try{let{DevToolsIntegration:t}=await import("@vitejs/devtools/integration");return t({config:e})}catch(t){return e.logger.error(j.default.red(`Failed to load Vite DevTools integration: ${t?.message||t?.stack}`),{error:t}),null}}function xc(e){let t=new Map;function n(s){if(t.has(s))return t.get(s);let i=Ru(s,e);return t.set(s,i),i}function r(s){return n(s).map(i=>Ze(i[s])).filter(Boolean)}return{getSortedPlugins:n,getSortedPluginHooks:r}}function Ru(e,t){let n=[],r=0,s=0,i=0;for(let a of t){let o=a[e];if(o){if(typeof o=="object"){if(o.order==="pre"){n.splice(r++,0,a);continue}if(o.order==="post"){n.splice(r+s+i++,0,a);continue}}n.splice(r+s++,0,a)}}return n}function Ze(e){return typeof e=="object"?e.handler:e}var Yh=new WeakMap;function Rl(e,t){let n=Yh.get(e);if(n&&t in n)return n[t];n||(n={},Yh.set(e,n));let r;switch(t){case"resolveId":{let s=kl(e.resolveId)?.id;n.resolveId=Sc(s),r=n.resolveId;break}case"load":{let s=kl(e.load)?.id;n.load=Sc(s),r=n.load;break}case"transform":{let s=kl(e.transform);n.transform=ED(s?.id,s?.code,s?.moduleType),r=n.transform;break}}return r}function kl(e){return e&&"filter"in e&&e.filter?e.filter:void 0}var cP=async function(e,t,n){return await this.resolve(e,t,n)||{id:e,meta:{"vite:alias":{noResolved:!0}}}},uP=Object.freeze({}),Xh=process.env.DEBUG_VITE_SOURCEMAP_COMBINE_FILTER,nn=Re("vite:sourcemap-combine",{onlyWhenFocused:!0}),Tl=Re("vite:resolve"),Zh=Re("vite:plugin-resolve",{onlyWhenFocused:"vite:plugin"}),em=Re("vite:plugin-transform",{onlyWhenFocused:"vite:plugin"}),fP=Re("vite:plugin-container-context"),dP="ERR_CLOSED_SERVER";function on(){let e=new Error("The server is being restarted or closed. Request is outdated");throw e.code=dP,e}async function Cc(e,t,n,r=!0){let s=new pP(e,t,n,r);return await s.resolveRolldownOptions(),s}var pP=class{environment;plugins;watcher;_pluginContextMap=new Map;_resolvedRolldownOptions;_processesing=new Set;_seenResolves={};_moduleNodeToLoadAddedImports=new WeakMap;getSortedPluginHooks;getSortedPlugins;moduleGraph;watchFiles=new Set;minimalContext;_started=!1;_buildStartPromise;_closed=!1;constructor(e,t,n,r=!0){this.environment=e,this.plugins=t,this.watcher=n,this._started=!r,this.minimalContext=new ww({...bn,watchMode:!0},e);let s=xc(t);this.getSortedPlugins=s.getSortedPlugins,this.getSortedPluginHooks=s.getSortedPluginHooks,this.moduleGraph=e.mode==="dev"?e.moduleGraph:void 0}_updateModuleLoadAddedImports(e,t){let n=this.moduleGraph?.getModuleById(e);n&&this._moduleNodeToLoadAddedImports.set(n,t)}_getAddedImports(e){let t=this.moduleGraph?.getModuleById(e);return t&&this._moduleNodeToLoadAddedImports.get(t)||null}getModuleInfo(e){let t=this.moduleGraph?.getModuleById(e);return t?(t.info||(t.info=new Proxy({id:e,meta:t.meta||uP},{get(n,r){if(r in n)return n[r];if(r!=="then")throw Error(`[vite] The "${r}" property of ModuleInfo is not supported.`)}})),t.info??null):null}handleHookPromise(e){if(!e?.then)return e;let t=e;return this._processesing.add(t),t.finally(()=>this._processesing.delete(t))}get options(){return this._resolvedRolldownOptions}async resolveRolldownOptions(){if(!this._resolvedRolldownOptions){let e=this.environment.config.build.rolldownOptions;for(let t of this.getSortedPluginHooks("options"))this._closed&&on(),e=await this.handleHookPromise(t.call(this.minimalContext,e))||e;this._resolvedRolldownOptions=e}return this._resolvedRolldownOptions}_getPluginContext(e){return this._pluginContextMap.has(e)||this._pluginContextMap.set(e,new ku(e,this)),this._pluginContextMap.get(e)}async hookParallel(e,t,n,r){let s=[];for(let i of this.getSortedPlugins(e)){if(r&&!r(i))continue;let a=i[e],o=Ze(a);a.sequential?(await Promise.all(s),s.length=0,await o.apply(t(i),n(i))):s.push(o.apply(t(i),n(i)))}await Promise.all(s)}async buildStart(e){if(this._started){this._buildStartPromise&&await this._buildStartPromise;return}this._started=!0;let t=this.environment.getTopLevelConfig(),n=this.handleHookPromise(this.hookParallel("buildStart",r=>this._getPluginContext(r),()=>[this.options],r=>this.environment.name==="client"||t.server.perEnvironmentStartEndDuringDev||r.perEnvironmentStartEndDuringDev));this._buildStartPromise=(async()=>{await n,this.environment.mode==="dev"&&await this.environment._registerInputsAsSafeModules()})(),await this._buildStartPromise,this._buildStartPromise=void 0}async resolveId(e,t=zt(this.environment.config.root,"index.html"),n){this._started||(this.buildStart(),await this._buildStartPromise);let r=n?.skip,s=n?.skipCalls,i=!!n?.scan,a=this.environment.config.consumer==="server",o=new mP(this,r,s,i),l=this.environment.getTopLevelConfig(),c=new Set(r);for(let p of s??[])(p.called||p.id===e&&p.importer===t)&&c.add(p.plugin);let u=Tl?Je.now():0,f=null,d={};for(let p of this.getSortedPlugins("resolveId")){if(this._closed&&this.environment.config.dev.recoverable&&on(),c?.has(p))continue;let h=Rl(p,"resolveId");if(h&&!h(e))continue;o._plugin=p;let y={kind:n?.kind,attributes:n?.attributes??{},custom:n?.custom,isEntry:!!n?.isEntry,ssr:a,scan:i};if(ui(l,"removePluginHookSsrArgument")){let g=a;Object.defineProperty(y,"ssr",{get(){return Xe(l,"removePluginHookSsrArgument",`Used in plugin "${p.name}".`),g},set(E){g=E}})}let m=Zh?Je.now():0,w=Ze(p.resolveId),A=await this.handleHookPromise(w.call(o,e,t,y));if(A){typeof A=="string"?f=A:(f=A.id,Object.assign(d,A)),Zh?.(Rt(m),p.name,ut(f,this.environment.config.root));break}}if(Tl&&e!==f&&!e.startsWith(Fe)){let p=e+f;this._seenResolves[p]||(this._seenResolves[p]=!0,Tl(`${Rt(u)} ${j.default.cyan(e)} -> ${j.default.dim(f)}`))}return f?(d.id=ft(f)||f[0]==="\0"?f:re(f),d):null}async load(e){let t=this.environment.config.consumer==="server",n=this.environment.getTopLevelConfig(),r={ssr:t},s=new Ew(this);for(let i of this.getSortedPlugins("load")){this._closed&&this.environment.config.dev.recoverable&&on();let a=Rl(i,"load");if(a&&!a(e))continue;s._plugin=i,ui(n,"removePluginHookSsrArgument")&&Object.defineProperty(r,"ssr",{get(){return Xe(n,"removePluginHookSsrArgument",`Used in plugin "${i.name}".`),t},set(c){t=c}});let o=Ze(i.load),l=await this.handleHookPromise(o.call(s,e,r));if(l!=null)return ke(l)&&s._updateModuleInfo(e,l),this._updateModuleLoadAddedImports(e,s._addedImports),l}return this._updateModuleLoadAddedImports(e,s._addedImports),null}async transform(e,t,n){let r=this.environment.config.consumer==="server",s=this.environment.getTopLevelConfig(),i=n?{...n,ssr:r,moduleType:n.moduleType??"js"}:{ssr:r,moduleType:"js"},a=n?.inMap,o=new vw(this,t,e,a);o._addedImports=this._getAddedImports(t);for(let l of this.getSortedPlugins("transform")){this._closed&&this.environment.config.dev.recoverable&&on();let c=Rl(l,"transform");if(c&&!c(t,e,i.moduleType))continue;ui(s,"removePluginHookSsrArgument")&&Object.defineProperty(i,"ssr",{get(){return Xe(s,"removePluginHookSsrArgument",`Used in plugin "${l.name}".`),r},set(p){r=p}}),o._updateActiveInfo(l,t,e);let u=em?Je.now():0,f,d=Ze(l.transform);try{f=await this.handleHookPromise(d.call(o,e,t,i))}catch(p){o.error(p)}f&&(em?.(Rt(u),l.name,ut(t,this.environment.config.root)),ke(f)?(f.code!==void 0&&(e=f.code,f.map&&(nn&&(f.map.name=l.name),o.sourcemapChain.push(f.map))),f.moduleType!==void 0&&(i.moduleType=f.moduleType),o._updateModuleInfo(t,f)):e=f)}return{code:e,map:o._getCombinedSourcemap(),moduleType:i.moduleType}}async watchChange(e,t){let n=this.environment.getTopLevelConfig();await this.hookParallel("watchChange",r=>this._getPluginContext(r),()=>[e,t],r=>this.environment.name==="client"||n.server.perEnvironmentWatchChangeDuringDev||r.perEnvironmentWatchChangeDuringDev)}async close(){if(this._closed)return;this._closed=!0,await Promise.allSettled(Array.from(this._processesing));let e=this.environment.getTopLevelConfig();await this.hookParallel("buildEnd",t=>this._getPluginContext(t),()=>[],t=>this.environment.name==="client"||e.server.perEnvironmentStartEndDuringDev||t.perEnvironmentStartEndDuringDev),await this.hookParallel("closeBundle",t=>this._getPluginContext(t),()=>[])}},bn={viteVersion:Qm,rollupVersion:b0,rolldownVersion:ju},Sn=class{meta;_logger;constructor(e,t){this.meta=e,this._logger=t}get pluginName(){return""}debug(e){let t=this._normalizeRawLog(e),n=Un(t,[`debug: ${t.message}`],!1);fP?.(n)}info(e){let t=this._normalizeRawLog(e),n=Un(t,[`info: ${t.message}`],!1);this._logger.info(n,{clear:!0,timestamp:!0})}warn(e){let t=this._normalizeRawLog(e),n=Un(t,[j.default.yellow(`warning: ${t.message}`)],!1);this._logger.warn(n,{clear:!0,timestamp:!0})}error(e){throw typeof e=="string"?new Error(e):e}_normalizeRawLog(e){let t=typeof e=="function"?e():e;return typeof t=="string"?new Error(t):t}},ww=class extends Sn{environment;constructor(e,t){super(e,t.logger),this.environment=t}},hP={appendFile:Ee.appendFile,copyFile:Ee.copyFile,mkdir:Ee.mkdir,mkdtemp:Ee.mkdtemp,readdir:Ee.readdir,readFile:Ee.readFile,realpath:Ee.realpath,rename:Ee.rename,rmdir:Ee.rmdir,stat:Ee.stat,lstat:Ee.lstat,unlink:Ee.unlink,writeFile:Ee.writeFile},ku=class extends ww{_plugin;_container;ssr=!1;_scan=!1;_activeId=null;_activeCode=null;_resolveSkips;_resolveSkipCalls;get pluginName(){return this._plugin.name}constructor(e,t){super(t.minimalContext.meta,t.environment),this._plugin=e,this._container=t}fs=hP;parse(e,t){return Os(e,t)}async resolve(e,t,n){let r;if(n?.skipSelf===!1)r=this._resolveSkipCalls;else if(this._resolveSkipCalls){let i=[...this._resolveSkipCalls],a=this._resolveSkipCalls.findIndex(o=>o.id===e&&o.importer===t&&o.plugin===this._plugin);a!==-1?i[a]={...i[a],called:!0}:i.push({id:e,importer:t,plugin:this._plugin}),r=i}else r=[{id:e,importer:t,plugin:this._plugin}];let s=await this._container.resolveId(e,t,{attributes:n?.attributes,custom:n?.custom,isEntry:!!n?.isEntry,skip:this._resolveSkips,skipCalls:r,scan:this._scan});return typeof s=="string"&&(s={id:s}),s}async load(e){await this._container.moduleGraph?.ensureEntryFromUrl(Qt(e.id)),this._updateModuleInfo(e.id,e);let t=await this._container.load(e.id),n=typeof t=="object"?t?.code:t;n!=null&&await this._container.transform(n,e.id);let r=this.getModuleInfo(e.id);if(!r)throw Error(`Failed to load module with id ${e.id}`);return r}getModuleInfo(e){return this._container.getModuleInfo(e)}_updateModuleInfo(e,{meta:t}){if(t){let n=this.getModuleInfo(e);n&&(n.meta={...n.meta,...t})}}getModuleIds(){return this._container.moduleGraph?this._container.moduleGraph.idToModuleMap.keys():Array.prototype[Symbol.iterator]()}addWatchFile(e){this._container.watchFiles.add(e),this._container.watcher&&zn(this._container.watcher,e,this.environment.config.root)}getWatchFiles(){return[...this._container.watchFiles]}emitFile(e){return this._warnIncompatibleMethod("emitFile"),""}setAssetSource(){this._warnIncompatibleMethod("setAssetSource")}getFileName(){return this._warnIncompatibleMethod("getFileName"),""}debug(e){let t=this._formatLog(typeof e=="function"?e():e);super.debug(t)}info(e){let t=this._formatLog(typeof e=="function"?e():e);super.info(t)}warn(e,t){let n=this._formatLog(typeof e=="function"?e():e,t);super.warn(n)}error(e,t){throw this._formatLog(e,t)}_formatLog(e,t){let n=typeof e=="string"?new Error(e):e;if(n.pluginCode)return n;if(n.plugin=this._plugin.name,this._activeId&&!n.id&&(n.id=this._activeId),this._activeCode){n.pluginCode=this._activeCode;let r=t??n.pos??n.position;if(r!=null){let s;try{s=Dt(this._activeCode,r)}catch(i){throw this.environment.logger.error(j.default.red(`Error in error handler:
|
|
428
|
-
${i.stack||i.message}
|
|
429
|
-
`),{error:i}),n}n.loc=n.loc||{file:n.id,...s},n.frame=n.frame||Ue(this._activeCode,r)}else if(n.loc){if(!n.frame){let s=this._activeCode;if(n.loc.file){n.id=re(n.loc.file);try{s=pe.readFileSync(n.loc.file,"utf-8")}catch{}}n.frame=Ue(s,n.loc)}}else n.line&&n.column&&(n.loc={file:n.id,line:n.line,column:n.column},n.frame=n.frame||Ue(this._activeCode,n.loc));if(this instanceof vw&&typeof n.loc?.line=="number"&&typeof n.loc.column=="number"){let s=this._getCombinedSourcemap();if(s&&"version"in s){let{source:i,line:a,column:o}=eg(new lo(s),{line:Number(n.loc.line),column:Number(n.loc.column)});i&&(n.loc={file:i,line:a,column:o})}}}else if(n.loc&&!n.frame){let r=n.pluginCode;if(n.loc.file&&(n.id=re(n.loc.file),!r))try{r=pe.readFileSync(n.loc.file,"utf-8")}catch{}r&&(n.frame=Ue(`${r}`,n.loc))}return typeof n.loc?.column!="number"&&typeof n.loc?.line!="number"&&!n.loc?.file&&delete n.loc,n}_warnIncompatibleMethod(e){this.environment.logger.warn(j.default.cyan(`[plugin:${this._plugin.name}] `)+j.default.yellow(`context method ${j.default.bold(`${e}()`)} is not supported in serve mode. This plugin is likely not vite-compatible.`))}},mP=class extends ku{constructor(e,t,n,r){super(null,e),this._resolveSkips=t,this._resolveSkipCalls=n,this._scan=r}},Ew=class extends ku{_addedImports=null;constructor(e){super(null,e)}addWatchFile(e){this._addedImports||(this._addedImports=new Set),this._addedImports.add(e),super.addWatchFile(e)}},vw=class extends Ew{filename;originalCode;originalSourcemap=null;sourcemapChain=[];combinedMap=null;constructor(e,t,n,r){super(e),this.filename=t,this.originalCode=n,r&&(nn&&(r.name="$inMap"),this.sourcemapChain.push(r))}_getCombinedSourcemap(){nn&&Xh&&this.filename.includes(Xh)&&(nn("----------",this.filename),nn(this.combinedMap),nn(this.sourcemapChain),nn("----------"));let e=this.combinedMap;if(e&&!("version"in e)&&e.mappings==="")return this.sourcemapChain.length=0,e;for(let t of this.sourcemapChain){if(typeof t=="string"&&(t=JSON.parse(t)),!("version"in t)){if(t.mappings===""){e={mappings:""};break}e=null;break}if(e)e=ms(he(this.filename),[t,e]);else{let n=t;n.sources.length===1&&!n.sources[0]?e={...n,sources:[this.filename],sourcesContent:[this.originalCode]}:e=n}}return e!==this.combinedMap&&(this.combinedMap=e,this.sourcemapChain.length=0),this.combinedMap}getCombinedSourcemap(){let e=this._getCombinedSourcemap();return!e||!("version"in e)&&e.mappings===""?new Ie(this.originalCode).generateMap({includeContent:!0,hires:"boundary",source:he(this.filename)}):e}_updateActiveInfo(e,t,n){this._plugin=e,this._activeId=t,this._activeCode=n}},gP=class{environments;constructor(e){this.environments=e}_getEnvironment(e){return e?.environment?e.environment:this.environments[e?.ssr?"ssr":"client"]}_getPluginContainer(e){return this._getEnvironment(e).pluginContainer}getModuleInfo(e){let t=this.environments.client.pluginContainer.getModuleInfo(e),n=this.environments.ssr.pluginContainer.getModuleInfo(e);return t==null&&n==null?null:new Proxy({},{get:(r,s)=>{if(s==="meta"){let i={};return n&&Object.assign(i,n.meta),t&&Object.assign(i,t.meta),i}if(t&&s in t)return t[s];if(n&&s in n)return n[s]}})}get options(){return this.environments.client.pluginContainer.options}async buildStart(e){return this.environments.client.pluginContainer.buildStart(e)}async watchChange(e,t){return this.environments.client.pluginContainer.watchChange(e,t)}async resolveId(e,t,n){return this._getPluginContainer(n).resolveId(e,t,n)}async load(e,t){return this._getPluginContainer(t).load(e)}async transform(e,t,n){return this._getPluginContainer(n).transform(e,t,n)}async close(){}};function yP(e){return new gP(e)}function AP(e){return{mode:"scan",get name(){return e.name},getTopLevelConfig(){return e.getTopLevelConfig()},get config(){return e.config},get logger(){return e.logger},get pluginContainer(){return e.pluginContainer},get plugins(){return e.plugins}}}var Ol=Re("vite:deps"),Ic=/\.(?:html|vue|svelte|astro|imba)$/,tm=/(?<!\/\/.*)(?<=^|;|\*\/)\s*import(?!\s+type)(?:[\w*{}\n\r\t, ]+from)?\s*("[^"]+"|'[^']+')\s*(?=$|;|\/\/|\/\*)/gm;function wP(e){let t=Je.now(),{config:n}=e,r={cancelled:!1};async function s(){r.cancelled=!0}async function i(){let a=await EP(e);if(!a.length){!n.optimizeDeps.entries&&!n.optimizeDeps.include&&!n.input&&e.logger.warn(j.default.yellow("(!) Could not auto-determine entry point from rolldownOptions or html files and there are no explicit optimizeDeps.include patterns. Skipping dependency pre-bundling."));return}if(r.cancelled)return;Ol?.(`Crawling dependencies using entries: ${a.map(u=>`
|
|
430
|
-
${j.default.dim(u)}`).join("")}`);let o={},l={},c=await vP(e,a,o,l);if(!r.cancelled)try{return await c.build(),{deps:nm(o),missing:l}}catch(u){if(u.errors?.some(f=>f.pluginCode==="ERR_CLOSED_SERVER"))return;throw u.message=j.default.red(` Failed to scan for dependencies from entries:
|
|
431
|
-
${a.join(`
|
|
432
|
-
`)}
|
|
433
|
-
|
|
434
|
-
`)+u.message,u}finally{if(Ol){let u=(Je.now()-t).toFixed(2),f=Object.keys(nm(o)).sort().map(d=>`
|
|
435
|
-
${j.default.cyan(d)} -> ${j.default.dim(o[d])}`).join("")||j.default.dim("no dependencies found");Ol(`Scan completed in ${u}ms: ${f}`)}}}return{cancel:s,result:i().then(a=>a??{deps:{},missing:{}})}}async function EP(e){let t=[],n=e.config.optimizeDeps.entries,r=e.config.input??e.config.build.rolldownOptions.input;if(n)t=await rm(n,e);else if(r){let s=async i=>{let a=(await e.pluginContainer.resolveId(i,void 0,{isEntry:!0,scan:!0}))?.id;if(a===void 0)throw new Error(`failed to resolve rolldownOptions.input value: ${JSON.stringify(i)}.`);return a};if(typeof r=="string")t=[await s(r)];else if(Array.isArray(r))t=await Promise.all(r.map(s));else if(ke(r))t=await Promise.all(Object.values(r).map(s));else throw new Error("invalid rolldownOptions.input value.")}else t=await rm("**/*.html",e);return t=t.filter(s=>Rc(s,e.config.optimizeDeps.extensions)&&pe.existsSync(s)),t}async function vP(e,t,n,r){let{plugins:s=[],...i}=e.config.optimizeDeps.rolldownOptions??{},a=es(i.transform)??{};a.jsx===void 0?a.jsx={}:(a.jsx==="react"||a.jsx==="react-jsx")&&(a.jsx=XI(a.jsx)),typeof a.jsx=="object"&&(a.jsx.development??=!e.config.isProduction);let o=a.jsx===!1?void 0:a.jsx,l=await Ht(He(s));l.push(...kP(e,n,r,t,o));async function c(){await md({...i,transform:a,input:t,logLevel:"silent",plugins:l})}return{build:c}}function nm(e){let t=Object.entries(e);return t.sort((n,r)=>n[0].localeCompare(r[0])),Object.fromEntries(t)}async function rm(e,t){let n=[],r=[];for(let i of He(e))i.includes("node_modules")?n.push(i):r.push(i);let s={absolute:!0,cwd:t.config.root,ignore:[`**/${t.config.build.outDir}/**`,...t.config.optimizeDeps.entries?[]:["**/__tests__/**","**/coverage/**"]]};return(await Promise.all([wr(n,s),wr(r,{...s,ignore:[...s.ignore,"**/node_modules/**"]})])).flat()}var _P=/(<script(?:\s+[a-z_:][-\w:]*(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^"'<>=\s]+))?)*\s*>)(.*?)<\/script>/gis,bP=/<!--.*?-->/gs,SP=/\bsrc\s*=\s*(?:"([^"]+)"|'([^']+)'|([^\s'">]+))/i,xP=/\btype\s*=\s*(?:"([^"]+)"|'([^']+)'|([^\s'">]+))/i,CP=/\blang\s*=\s*(?:"([^"]+)"|'([^']+)'|([^\s'">]+))/i,IP=/\bcontext\s*=\s*(?:"([^"]+)"|'([^']+)'|([^\s'">]+))/i,RP=/\smodule\b/i;function kP(e,t,n,r,s){let i=new Map;async function a(m,w,A){return e.pluginContainer.resolveId(m,w&&re(w),{scan:!0,...A})}let o=async(m,w,A)=>{let g=JSON.stringify([m,w&&L.dirname(w),A]);if(i.has(g))return i.get(g);let E=(await a(m,w,A))?.id;return i.set(g,E),E},l=e.config.optimizeDeps,c=l.include,u=[...l.exclude??[],"@vite/client","@vite/env"],f=({path:m})=>({id:m,external:!r.includes(m)}),d=async(m,w,A)=>{let g;if(A!=="js"){let E=xn(w,m,{...s!==void 0?{jsx:s}:{},lang:A,tsconfig:!1});if(E.errors.length>0)throw new AggregateError(E.errors,"oxc transform error");g=E.code}else g=m;return(await fw(g,w,e.config.root,o))?.s.toString()||g},p={},h=async m=>{let w=await Ee.readFile(m,"utf-8");w=w.replace(bP,"<!---->");let A=m.endsWith(".html"),g="",E=0,v=w.matchAll(_P);for(let[,S,b]of v){let _=xP.exec(S),C=_&&(_[1]||_[2]||_[3]),x=CP.exec(S),T=x&&(x[1]||x[2]||x[3]);if(A&&C!=="module"||C&&!(C.includes("javascript")||C.includes("ecmascript")||C==="module"))continue;let k="js";T==="ts"||T==="tsx"||T==="jsx"?k=T:m.endsWith(".astro")&&(k="ts");let O=SP.exec(S);if(O)g+=`import ${JSON.stringify(O[1]||O[2]||O[3])}
|
|
436
|
-
`;else if(b.trim()){let R=b+(k.startsWith("ts")?TP(b):""),I=`${m}?id=${E++}`;R.includes("import.meta.glob")?p[I]={loader:"js",contents:await d(R,m,k)}:p[I]={loader:k,contents:R};let M=JSON.stringify(Xa+I),B=!1;if(m.endsWith(".svelte")){let U=RP.test(S);if(!U){let V=IP.exec(S);U=(V&&(V[1]||V[2]||V[3]))==="module"}U||(B=!0,g+=`import ${M}
|
|
437
|
-
`)}B||(g+=`export * from ${M}
|
|
438
|
-
`)}}return(!m.endsWith(".vue")||!g.includes("export default"))&&(g+=`
|
|
439
|
-
export default {}`),g},y=new RegExp(`\\.(${Qc.join("|")})$`);return[{name:"vite:dep-scan:resolve-external-url",resolveId:{filter:{id:vg},handler:m=>({id:m,external:!0})}},{name:"vite:dep-scan:resolve-data-url",resolveId:{filter:{id:_g},handler:m=>({id:m,external:!0})}},{name:"vite:dep-scan:local-scripts",resolveId:{filter:{id:Ya},handler:m=>({id:m})},load:{filter:{id:Ya},handler(m){let w=p[m.replace(Xa,"")];return{code:w.contents,moduleType:w.loader}}}},{name:"vite:dep-scan:resolve",async resolveId(m,w){if(w=w&&Ya.test(w)?w.replace(Xa,""):w,Ic.test(m)){let g=await o(m,w);return!g||Ke(g)&&mn(g,l)?void 0:Bl(g,m)?f({path:m}):g}if(/^[\w@][^:]/.test(m)){if(po(u,m))return f({path:m});if(t[m])return f({path:m});let g=await o(m,w);if(g)return Bl(g,m)?f({path:m}):Ke(g)||c?.includes(m)?(mn(g,l)&&(t[m]=g),f({path:m})):Rc(g,l.extensions)?L.resolve(g):f({path:m});n[m]=re(w)}if(dt.test(m))return f({path:m});if(/\.(?:json|json5|wasm)$/.test(m))return f({path:m});if(y.test(m))return f({path:m});if(wn.test(m))return{id:m,external:!0};let A=await o(m,w);return A?Bl(A,m)||!Rc(A,l.extensions)?f({path:m}):L.resolve(he(A)):f({path:m})}},{name:"vite:dep-scan:load:html",load:{filter:{id:Ic},async handler(m){return{code:await h(m),moduleType:"js"}}}},...e.config.esbuild&&e.config.esbuild.jsxInject?[{name:"vite:dep-scan:transform:jsx-inject",transform:{filter:{id:/\.[jt]sx$/},handler(m){let w=e.config.esbuild;return w&&w.jsxInject&&(m=w.jsxInject+`
|
|
440
|
-
`+m),m}}}]:[],{name:"vite:dep-scan:transform:js-glob",transform:{filter:{code:"import.meta.glob"},async handler(m,w){if(so.test(w)){let A=L.extname(w).slice(1);return A==="mjs"&&(A="js"),{moduleType:"js",code:await d(m,w,A)}}}}}]}function TP(e){e=e.replace(Mg,"/* */").replace(tI,"");let t="",n;for(tm.lastIndex=0;(n=tm.exec(e))!=null;)t+=`
|
|
441
|
-
import ${n[1]}`;return t}function Bl(e,t){return!!(!L.isAbsolute(e)||e===t||e.includes("\0"))}function Rc(e,t){return so.test(e)||Ic.test(e)||t?.includes(L.extname(e))||!1}function OP(e){let t=e.getTopLevelConfig(),n=Ot(t,{asSrc:!1,scan:!0,packageCache:new Map});return async r=>{let s=r.lastIndexOf(">");if(s===-1)return await n(e,r,void 0);let i=r.substring(0,s).trim(),a=r.substring(s+1).trim(),o=$P(i,t.root,t.resolve.preserveSymlinks);return await n(e,a,L.resolve(o,"package.json"))}}function BP(e,t){let n=Eo(e);if(!n)return[];let r=co(n,t.root,t.resolve.preserveSymlinks,t.packageCache);if(!r)return[];let s="."+e.slice(n.length),i=r.data.exports;if(i){if(typeof i=="string"||Array.isArray(i))return[n];let a=[];for(let c in i)if(c[0]===".")if(c.includes("*")){let u=_w(i[c]);if(!u)continue;let f=u.replace(/\*/g,"**/*"),d=new RegExp(u.split("*").map(vo).join("(.*)"));a.push(...Tn(f,{cwd:r.dir,expandDirectories:!1,ignore:["node_modules"]}).map(p=>{u.startsWith("./")&&(p="./"+p);let h=d.exec(De(p));if(h){let y=h.length===2;if(!y){y=!0;for(let m=2;m<h.length;m++)if(h[m]!==h[m-1]){y=!1;break}}if(y)return c.replace("*",h[1]).slice(2)}return""}).filter(Boolean))}else{if(i[c]==null)continue;a.push(c.slice(2))}let o=(0,Pt.default)(s),l=a.filter(c=>o(c)).map(c=>L.posix.join(n,c));return l.unshift(n),l}else{let a=Tn(s,{cwd:r.dir,expandDirectories:!1,ignore:["node_modules"]}).map(o=>L.posix.join(n,De(o)));return a.unshift(n),a}}function _w(e){if(typeof e=="string")return e;if(Array.isArray(e))return e[0];for(let t in e)return _w(e[t])}function $P(e,t,n=!1){let r=e.split(">").map(s=>s.trim());for(let s of r)t=co(s,t,n)?.dir||t;return t}var sm="vite:dep-pre-bundle:external-conversion",im="vite-dep-pre-bundle-external:",om="vite:cjs-external-facade",$l="vite-cjs-external-facade:",am=["css","less","sass","scss","styl","stylus","pcss","postcss","wasm","vue","svelte","marko","astro","imba","jsx","tsx",...Qc],Ml="optional-peer-dep:",Dl="browser-external:";function MP(e,t,n){let{isProduction:r}=e.config,{extensions:s}=e.config.optimizeDeps,i=s?am.filter(m=>!s.includes("."+m)):am,a=new Map,o=new Map,l=(m,w)=>w==="require-call"?{id:sm+m}:{id:m,external:"absolute"},c=Ot(e.getTopLevelConfig(),{asSrc:!1,scan:!0,packageCache:a}),u=Ot(e.getTopLevelConfig(),{asSrc:!1,isRequire:!0,scan:!0,packageCache:o}),f=(m,w,A)=>{let g=w&&w in t?t[w]:w;return(A.startsWith("require")?u:c)(e,m,g)},d=(m,w,A)=>{if(w.startsWith("__vite-browser-external"))return{id:Dl+m};if(w.startsWith("__vite-optional-peer-dep"))return{id:Ml+w};if(p.test(w))return l(w,A);if(!nr(e.config.resolve.builtins,w))return ft(w)?{id:w,external:"absolute"}:{id:L.resolve(w)}},p=new RegExp("\\.("+i.join("|")+")(\\?.*)?$");function h(m){let w=fo(m);if(w in t)return{id:t[w]}}let y=L.join(e.config.cacheDir,"deps");return[{name:"vite:dep-pre-bundle-assets",resolveId:{filter:{id:p},async handler(m,w,A){let g=A.kind;if(m.startsWith(im))return{id:m.slice(29),external:"absolute"};let E=await f(m,w,g);if(E)return so.test(E)?{id:$t?E.replaceAll("/","\\"):E,external:!1}:l(E,g)}},load:{filter:{id:On(sm)},handler(m){let w=m.slice(39),A=`"${im}${w}"`;return{code:Mt(w)&&!oA(w)?`import ${A};`:`export { default } from ${A};export * from ${A};`}}}},{name:"vite:dep-pre-bundle",buildEnd(){a.clear(),o.clear()},resolveId:{filter:{id:/^[\w@][^:]/},async handler(m,w,A){let g=A.kind;if(po(n,m))return{id:m,external:"absolute"};let E;if(!w){if(E=h(m))return E;let S=await c(e,m,void 0,!0);if(S&&(E=h(S)))return E}let v=await f(m,w,g);if(v)return d(m,v,g)}},load:{filter:{id:[On(Dl),On(Ml)]},handler(m){if(m.startsWith(Dl)){let w=m.slice(17);return r?{code:"module.exports = {}"}:{code:` module.exports = Object.create(new Proxy({}, {
|
|
442
|
-
get(_, key) {
|
|
443
|
-
if (
|
|
444
|
-
key !== '__esModule' &&
|
|
445
|
-
key !== '__proto__' &&
|
|
446
|
-
key !== 'constructor' &&
|
|
447
|
-
key !== 'splice'
|
|
448
|
-
) {
|
|
449
|
-
console.warn(\`Module "${w}" has been externalized for browser compatibility. Cannot access "${w}.\${key}" in client code. See https://vite.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.\`)
|
|
450
|
-
}
|
|
451
|
-
}
|
|
452
|
-
}))`}}if(m.startsWith(Ml)){let[,w,A]=m.slice(18).split(":");return{code:`module.exports = {};throw new Error(\`Could not resolve "${w}" imported by "${A}". Is it installed?\`)`}}}},transform:{filter:{code:Vi},handler(m,w){let A,g=new RegExp(Vi),E=vs(m),v;for(;v=g.exec(E);){let[[S,b],[_,C]]=v.indices;if(xs.test(m.slice(S,_)))continue;let x=m.slice(_,C);if(x[0]==="`"&&x.includes("${"))continue;let T=x.slice(1,-1);if(gn(T)||ft(T)||T.startsWith("/"))continue;A||(A=new Ie(m));let k=L.resolve(L.dirname(w),T),O=re(L.relative(y,k));A.update(S,b,`new URL('' + ${JSON.stringify(O)}, import.meta.url)`)}if(A)return{code:A.toString(),map:A.generateMap({hires:"boundary"})}}}}]}var DP=e=>`^${vo(e)}$`;function PP(e,t){if(t==="node"||t==="neutral")return;let n=new RegExp(e.map(DP).join("|"));return{name:"cjs-external",resolveId:{filter:{id:[On($l),n]},handler(r,s,i){return r.startsWith($l)?{id:r.slice(25),external:"absolute"}:i.kind==="require-call"?{id:om+r}:{id:r,external:"absolute"}}},load:{filter:{id:On(om)},handler(r){let s=r.slice(24);return{code:`import * as m from ${JSON.stringify($l+s)};
|
|
453
|
-
module.exports = ${yg(s)?"m.default":"{ ...m }"};
|
|
454
|
-
`}}}}}var ot=Re("vite:deps"),NP=/\.js$/i;function Cs(e){return e.disabled===!0||e.disabled==="dev"||!!e.noDiscovery&&!e.include?.length}async function LP(e){let t=await bw(e,e.config.optimizeDeps.force??!1,!1);if(t)return t;let n={};await xw(e,n);let r=await kc(e,Sw(e,n)).result;return await r.commit(),r.metadata}function Yi(e,t){let{lockfileHash:n,configHash:r,hash:s}=Dw(e);return{hash:s,lockfileHash:n,configHash:r,browserHash:Tu(s,{},t),optimized:{},chunks:{},discovered:{},depInfoList:[]}}function fn(e,t,n){return e[t][n.id]=n,e.depInfoList.push(n),n}var lm=!0;async function bw(e,t=e.config.optimizeDeps.force??!1,n=!1){let r=n?e.logger.info:ot;lm&&(lm=!1,setTimeout(()=>VP(e.getTopLevelConfig()),0).unref());let s=Xi(e);if(Nc(s),Nm(s),t)e.logger.info("Forced re-optimization of dependencies",{timestamp:!0});else{let i;try{let a=L.join(s,Kl);i=UP(await Ee.readFile(a,"utf-8"),s)}catch{}if(i)if(i.lockfileHash!==Mw(e))e.logger.info("Re-optimizing dependencies because lockfile has changed",{timestamp:!0});else if(i.configHash!==$w(e))e.logger.info("Re-optimizing dependencies because vite config has changed",{timestamp:!0});else return r?.(`(${e.name}) Hash is consistent. Skipping. Use --force to override.`),i}ot?.(`(${e.name}) ${j.default.green(`removing old cache dir ${s}`)}`),await Ee.rm(s,{recursive:!0,force:!0})}function FP(e){let{cancel:t,result:n}=wP(e);return{cancel:t,result:n.then(({deps:r,missing:s})=>{let i=Object.keys(s);if(i.length)throw new Error(`The following dependencies are imported but could not be resolved:
|
|
455
|
-
|
|
456
|
-
${i.map(a=>`${j.default.cyan(a)} ${j.default.white(j.default.dim(`(imported by ${s[a]})`))}`).join(`
|
|
457
|
-
`)}
|
|
458
|
-
|
|
459
|
-
Are they installed?`);return r})}}function Sw(e,t,n){let r=Tu(Dw(e).hash,t,n),s={};for(let i in t){let a=t[i];s[i]={id:i,file:Cw(e,i),src:a,browserHash:r,exportsData:$o(e,a)}}return s}function Pl(e){return j.default.yellow(e.join(", "))}function kc(e,t){let n={cancelled:!1},r=Xi(e),s=QP(e);pe.mkdirSync(s,{recursive:!0}),ot?.(j.default.green(`creating package.json in ${s}`)),pe.writeFileSync(L.resolve(s,"package.json"),`{
|
|
460
|
-
"type": "module"
|
|
461
|
-
}
|
|
462
|
-
`);let i=Yi(e);i.browserHash=Tu(i.hash,Tc(t));let a=Object.keys(t),o=!1,l=!1,c=()=>{if(!o&&!l){o=!0,ot?.(j.default.green(`removing cache dir ${s}`));try{pe.rmSync(s,{recursive:!0,force:!0})}catch{}}},u={metadata:i,cancel:c,commit:async()=>{if(o)throw new Error("Can not commit a Deps Optimization run as it was cancelled");l=!0;let m=L.join(s,Kl);ot?.(j.default.green(`creating ${Kl} in ${s}`)),pe.writeFileSync(m,HP(i,r));let w=r+Rw(),A=pe.existsSync(r);$t?(A&&(ot?.(j.default.green(`renaming ${r} to ${w}`)),await um(r,w)),ot?.(j.default.green(`renaming ${s} to ${r}`)),await um(s,r)):(A&&(ot?.(j.default.green(`renaming ${r} to ${w}`)),pe.renameSync(r,w)),ot?.(j.default.green(`renaming ${s} to ${r}`)),pe.renameSync(s,r)),A&&(ot?.(j.default.green(`removing cache temp dir ${w}`)),Ee.rm(w,{recursive:!0,force:!0}))}};if(!a.length)return{cancel:async()=>c(),result:Promise.resolve(u)};let f={metadata:i,commit:async()=>c(),cancel:c},d=Je.now(),p=setTimeout(()=>{e.logger.info("[optimizer] bundling dependencies...",{timestamp:!0})},1e3),h=jP(e,t,s,n),y=h.then(({context:m,idToExports:w})=>!m||n.cancelled?(clearTimeout(p),f):m.build().then(A=>{let g={};for(let E of Object.values(t)){let v=fo(E.id)+".js";g[v]=E}for(let E of A.output)if(E.type==="chunk")if(E.isEntry){let{exportsData:v,file:S,id:b,..._}=g[E.fileName];fn(i,"optimized",{id:b,file:S,..._,fileHash:We(i.hash+S+JSON.stringify(E.imports)),browserHash:i.browserHash,needsInterop:Ow(e,b,w[b],E)})}else{let v=E.fileName.replace(NP,""),S=re(L.resolve(Xi(e),E.fileName));zP(i.optimized,b=>b.file===S)||fn(i,"chunks",{id:v,file:S,needsInterop:!1,browserHash:i.browserHash,isDynamicEntry:E.isDynamicEntry})}return clearTimeout(p),ot?.(`Dependencies bundled in ${(Je.now()-d).toFixed(2)}ms`),u}).catch(A=>{if(clearTimeout(p),A.errors&&A.message.includes("The build was canceled"))return f;throw A.message=j.default.red(`Error during dependency optimization:
|
|
463
|
-
|
|
464
|
-
`)+A.message,A}));return y.catch(()=>{c()}),{async cancel(){n.cancelled=!0;let{context:m}=await h;m?.cancel(),c()},result:y}}async function jP(e,t,n,r){let s={},i={},{optimizeDeps:a}=e.config,{plugins:o=[],...l}=a.rolldownOptions??{},c=!1;if(await Promise.all(Object.keys(t).map(async w=>{let A=t[w].src,g=await(t[w].exportsData??$o(e,A));g.jsxLoader&&(c=!0);let E=fo(w);s[E]=$t?A.replaceAll("/","\\"):A,i[w]=g})),r.cancelled)return{context:void 0,idToExports:i};let u={"process.env.NODE_ENV":e.config.keepProcessEnv?"process.env.NODE_ENV":JSON.stringify(process.env.NODE_ENV||e.config.mode),...l.transform?.define},f=a.rolldownOptions?.platform??(e.config.consumer==="client"||e.config.ssr.target==="webworker"?"browser":"node"),d=[...a.exclude??[]],p=await Ht(He(o));d.length&&p.push(PP(d,f)),p.push(...MP(e,s,d));let h=!1;async function y(){let w=await $s({...l,input:s,logLevel:"silent",plugins:p,platform:f,transform:{target:Fc,...l.transform,define:u},resolve:{extensions:[".tsx",".ts",".jsx",".js",".css",".json"],...l.resolve},moduleTypes:{".css":"js",...l.moduleTypes,...c?{".js":"jsx"}:{}}});if(h)throw await w.close(),new Error("The build was canceled");try{return await w.write({...l.output,format:"esm",sourcemap:"hidden",dir:n,entryFileNames:"[name].js"})}finally{await w.close()}}function m(){h=!0}return{context:{build:y,cancel:m},idToExports:i}}async function xw(e,t){let{logger:n}=e,{optimizeDeps:r}=e.config,s=r.include??[];if(s.length){let i=(l,c)=>{s.includes(l)&&n.warn(`${c}: ${j.default.cyan(l)}, present in ${e.name} 'optimizeDeps.include'`)},a=[...s];for(let l=0;l<a.length;l++){let c=a[l];if(Ar(c)){let u=BP(c,e.getTopLevelConfig());a.splice(l,1,...u),l+=u.length-1}}let o=OP(e);for(let l of a){let c=E0(l);if(!t[c]){let u=await o(l);u?mn(u,r)?t[c]=u:i(l,"Cannot optimize dependency"):i(l,"Failed to resolve dependency")}}}}function Tc(e){let t={};for(let n in e)t[n]=e[n].src;return t}function Cw(e,t){return re(L.resolve(Xi(e),fo(t)+".js"))}function Iw(e){return e.name==="client"?"":`_${e.name}`}function Xi(e){return Bo(e)+Iw(e)}function QP(e){return Bo(e)+Iw(e)+Rw()}function Rw(){return"_temp_"+We(`${process.pid}:${Date.now().toString()}:${Math.random().toString(16).slice(2)}`)}function Bo(e){return re(L.resolve(e.config.cacheDir,"deps"))}function kw(e){let t=Bo(e);return n=>n.startsWith(t)}function Tw(e){let{root:t}=e.config,n=Bo(e),r=re(L.relative(t,n)),s=r.startsWith("../")?`/@fs/${wo(re(n))}`:`/${r}`;return function(a){return a.startsWith(s)}}function UP(e,t){let{hash:n,lockfileHash:r,configHash:s,browserHash:i,optimized:a,chunks:o}=JSON.parse(e,(c,u)=>c==="file"||c==="src"?re(L.resolve(t,u)):u);if(!o||Object.values(a).some(c=>!c.fileHash))return;let l={hash:n,lockfileHash:r,configHash:s,browserHash:i,optimized:{},discovered:{},chunks:{},depInfoList:[]};for(let c of Object.keys(a))fn(l,"optimized",{...a[c],id:c,browserHash:i});for(let c of Object.keys(o))fn(l,"chunks",{...o[c],id:c,browserHash:i,needsInterop:!1});return l}function HP(e,t){let{hash:n,configHash:r,lockfileHash:s,browserHash:i,optimized:a,chunks:o}=e;return JSON.stringify({hash:n,configHash:r,lockfileHash:s,browserHash:i,optimized:Object.fromEntries(Object.values(a).map(({id:l,src:c,file:u,fileHash:f,needsInterop:d,isDynamicEntry:p})=>[l,{src:c,file:u,fileHash:f,needsInterop:d,isDynamicEntry:p}])),chunks:Object.fromEntries(Object.values(o).map(({id:l,file:c,isDynamicEntry:u})=>[l,{file:c,isDynamicEntry:u}]))},(l,c)=>l==="file"||l==="src"?re(L.relative(t,c)):c,2)}async function $o(e,t){await vn;let{optimizeDeps:n}=e.config,r=n.rolldownOptions??{};if(n.extensions?.some(c=>t.endsWith(c))){let{plugins:c=[],...u}=r,f=await Ht(He(c));f.unshift({name:"externalize",resolveId(p,h){if(h!==void 0)return{id:p,external:!0}}});let d=await $s({...u,plugins:f,input:[t],moduleTypes:{".css":"js",...u.moduleTypes}});try{let[,p,,h]=wt((await d.generate({...r.output,format:"esm",sourcemap:!1})).output[0].code);return{hasModuleSyntax:h,exports:p.map(y=>y.n)}}finally{await d.close()}}let s,i=!1,a=pe.readFileSync(t,"utf-8");try{s=wt(a)}catch{let c=r.moduleTypes?.[L.extname(t)]||"jsx";if(ot?.(`Unable to parse: ${t}.
|
|
465
|
-
Trying again with a ${c} transform.`),c!=="jsx"&&c!=="tsx"&&c!=="ts")throw new Error(`Unable to parse: ${t}.`);s=wt((await qg(a,t,{lang:c},void 0,e.config)).code),i=!0}let[,o,,l]=s;return{hasModuleSyntax:l,exports:o.map(c=>c.n),jsxLoader:i}}function Ow(e,t,n,r){if(e.config.optimizeDeps.needsInterop?.includes(t))return!0;let{hasModuleSyntax:s,exports:i}=n;if(!s)return!0;if(r){let a=r.exports;if(cm(a)&&!cm(i))return!0}return!1}function cm(e){return e.length===1&&e[0]==="default"}var Bw=[{path:"node_modules/.pnpm/lock.yaml",checkPatchesDir:!1,manager:"pnpm"},{path:"node_modules/.package-lock.json",checkPatchesDir:"patches",manager:"npm"},{path:"node_modules/.yarn-state.yml",checkPatchesDir:!1,manager:"yarn"},{path:"bun.lock",checkPatchesDir:"patches",manager:"bun"},{path:".rush/temp/shrinkwrap-deps.json",checkPatchesDir:!1,manager:"pnpm"},{path:"aube-lock.yaml",checkPatchesDir:!1,manager:"aube"},{path:"nub.lock",checkPatchesDir:"patches",manager:"nub"},{path:".pnp.cjs",checkPatchesDir:".yarn/patches",manager:"yarn"},{path:".pnp.js",checkPatchesDir:".yarn/patches",manager:"yarn"},{path:"node_modules/.yarn-integrity",checkPatchesDir:"patches",manager:"yarn"},{path:"bun.lockb",checkPatchesDir:"patches",manager:"bun"}].sort((e,{manager:t})=>process.env.npm_config_user_agent?.startsWith(t)?1:-1),WP=Bw.map(e=>e.path);function $w(e){let{config:t}=e,{optimizeDeps:n}=t;return We(JSON.stringify({define:t.keepProcessEnv?null:process.env.NODE_ENV||t.mode,root:t.root,resolve:t.resolve,assetsInclude:t.assetsInclude,plugins:t.plugins.map(r=>r.name),optimizeDeps:{include:n.include?Jn(n.include).sort():void 0,exclude:n.exclude?Jn(n.exclude).sort():void 0,rolldownOptions:{...n.rolldownOptions,plugins:void 0,onLog:void 0,onwarn:void 0,checks:void 0,output:{...n.rolldownOptions?.output,plugins:void 0}}},optimizeDepsPluginNames:t.optimizeDepsPluginNames},(r,s)=>typeof s=="function"||s instanceof RegExp?s.toString():s))}function Mw(e){let t=$0(e.config.root,WP),n=t?pe.readFileSync(t,"utf-8"):"";if(t){let r=t.replaceAll("\\","/"),s=Bw.find(i=>r.endsWith(i.path));if(s.checkPatchesDir){let i=t.slice(0,-s.path.length),a=_t(L.join(i,s.checkPatchesDir));a?.isDirectory()&&(n+=a.mtimeMs.toString())}}return We(n)}function Dw(e){let t=Mw(e),n=$w(e);return{hash:We(t+n),lockfileHash:t,configHash:n}}function Tu(e,t,n=""){return We(e+JSON.stringify(t)+n)}function GP(e,t){return e.optimized[t]||e.discovered[t]||e.chunks[t]}function as(e,t){return e.depInfoList.find(n=>n.file===t)}function zP(e,t){for(let n of Object.keys(e)){let r=e[n];if(t(r,n))return r}}async function JP(e,t,n){let r=as(t,n);return r?.src&&r.needsInterop===void 0&&(r.exportsData??=$o(e,r.src),r.needsInterop=Ow(e,r.id,await r.exportsData)),r?.needsInterop}var KP=864e5;async function VP(e){try{let t=L.resolve(e.cacheDir);if(pe.existsSync(t)){let n=await Ee.readdir(t,{withFileTypes:!0});for(let r of n)if(r.isDirectory()&&r.name.includes("_temp_")){let s=L.resolve(e.cacheDir,r.name),i=await Ee.stat(s).catch(()=>null);i?.mtime&&Date.now()-i.mtime.getTime()>KP&&(ot?.(`removing stale cache temp dir ${s}`),await Ee.rm(s,{recursive:!0,force:!0}))}}}catch(t){e.logger.error(t)}}var qP=5e3,um=An(function(t,n,r){let s=Date.now(),i=0;pe.rename(t,n,function a(o){if(o&&(o.code==="EACCES"||o.code==="EPERM")&&Date.now()-s<qP){setTimeout(function(){pe.stat(n,function(l,c){l&&l.code==="ENOENT"?pe.rename(t,n,a):a(o)})},i),i<100&&(i+=10);return}r(o)})}),YP=re(Ct),XP=re(oo),Pw="ERR_RESOLVE_PACKAGE_ENTRY_FAIL",fm="__vite-browser-external",ZP="__vite-optional-peer-dep",eN="#",tN=/^\.\.?(?:[/\\]|$)/,nN=/^\w/,ls=Re("vite:resolve-details",{onlyWhenFocused:!0}),rN=(e,t,n)=>{let r={},s={name:`${e}:get-environment`,buildStart(){r[this.environment.name]=this.environment},perEnvironmentStartEndDuringDev:!0},i=a=>()=>r[a];return t?[s,n({name:"client",config:t},i("client"))]:[s,{name:e,applyToEnvironment(a){return n(a,i(a.name))}}]};function Nw(e,t,n=!1){return[...e.optimizeDeps&&!e.isBuild?[sN(e)]:[],...rN("vite:resolve-builtin",t,(r,s)=>{let i=e.optimizeDeps&&!e.isBuild&&!r.config.isBundled&&!Cs(r.config.optimizeDeps),a=()=>{let u=s();if(u.mode!=="dev")throw new Error("The environment mode should be dev");if(!u.depsOptimizer)throw new Error("The environment should have a depsOptimizer");return u.depsOptimizer},o={...r.config.resolve,...e},l=Array.isArray(o.noExternal)||o.noExternal===!0?o.noExternal:[o.noExternal],c=Xo({resolveOptions:{isBuild:o.isBuild,isProduction:o.isProduction,asSrc:o.asSrc??!1,preferRelative:o.preferRelative??!1,isRequire:o.isRequire,root:o.root,scan:o.scan??!1,mainFields:o.skipMainField?o.mainFields:o.mainFields.concat(["main"]),conditions:o.conditions,externalConditions:o.externalConditions,extensions:o.extensions,tryIndex:o.tryIndex??!0,tryPrefix:o.tryPrefix,preserveSymlinks:o.preserveSymlinks,tsconfigPaths:o.tsconfigPaths},environmentConsumer:r.config.consumer,environmentName:r.name,builtins:r.config.resolve.builtins,external:o.external,noExternal:l,dedupe:o.dedupe,disableCache:r.config.command==="serve"&&r.config.server.watch===null,legacyInconsistentCjsInterop:o.legacyInconsistentCjsInterop,finalizeBareSpecifier:i?(u,f,d)=>{let p=a(),h=mn(u,p.options),y=p?.options.exclude,m=Ag.exec(f),w=m?m[1]||m[2]:he(f),A=p.options.noDiscovery||!h||d&&Ke(d)||y?.includes(w)||y?.includes(f)||wn.test(u),g=u;if(A){let E=p.metadata.browserHash;E&&h&&(g=Le(g,`v=${E}`))}else{let E=p.registerMissingImport(f,g);g=p.getOptimizedDepId(E)}return g}:void 0,finalizeOtherSpecifiers:i?(u,f)=>{let d=a(),p=oN(u,f,o,d);return p===u?void 0:p}:void 0,resolveSubpathImports(u,f,d,p){return iN(u,f,{...o,isRequire:e.isRequire??d,scan:p})},...r.config.command==="serve"||n?{async onWarn(u){r.config.logger.warn(`warning: ${u}`,{clear:!0,timestamp:!0})}}:{},...ls?{async onDebug(u){ls(u)}}:{}});return c.perEnvironmentWatchChangeDuringDev=!0,c})]}function sN(e){let{root:t,asSrc:n}=e;return{name:"vite:resolve-dev",applyToEnvironment(r){return!r.config.isBundled&&!Cs(r.config.optimizeDeps)},resolveId:{filter:{id:{exclude:[/^\0/,/^virtual:/,/^\/virtual:/,/^__vite-/]}},async handler(r,s,i){let a=e.optimizeDeps&&this.environment.mode==="dev"?this.environment.depsOptimizer:void 0;if(!a)return;let o={isRequire:i.kind==="require-call",...this.environment.config.resolve,...e,scan:i.scan??e.scan};if(o.preferRelative||=s?.endsWith(".html"),n&&a.isOptimizedDepUrl(r))return r.startsWith(Fe)?rr(r):re(L.resolve(t,r.slice(1)));if(!gn(r)&&!ft(r)){if(r[0]==="."||o.preferRelative&&nN.test(r)){let l=s?L.dirname(s):t,c=re(L.resolve(l,r));if(a.isOptimizedDepFile(c)){if(!Gn.test(c)){let u=as(a.metadata,c)?.browserHash;if(u)return Le(c,`v=${u}`)}return c}}if(Zr.test(r)){let l;if(n&&!o.scan&&(l=await Lw(a,r,s,o.preserveSymlinks,o.packageCache)))return l}}}}}}function iN(e,t,n){if(!t||!e.startsWith(eN))return;let r=L.dirname(t),s=Jt(r,n.packageCache);if(!s)return;let{file:i,postfix:a}=dn(e.slice(1));i="#"+i;let o=Bu(s.data,i,n,"imports");if(o?.[0]==="."&&(o=L.relative(r,L.join(s.dir,o)),tN.test(o)||(o=`./${o}`)),o!=null)return o+a}function oN(e,t,n,r){if(!n.isBuild&&!n.scan&&r&&!(e===YP||e===XP)&&(Ke(t)||Ke(e))&&!Gn.test(e)){let s=r.metadata.browserHash;s&&mn(e,r.options)&&(e=Le(e,`v=${s}`))}return e}function Mo(e,t,n=!0,r=!1){let s=e.indexOf("#");if(s>=0&&Ke(e)){let l=e.indexOf("?");if(l<0||l>s){let c=l>s?e.slice(0,l):e,u=dm(c,t,n,r);if(u)return u+e.slice(c.length)}}let{file:i,postfix:a}=dn(e),o=dm(i,t,n,r);if(o)return o+a}var aN=/\.(?:js|mjs|cjs|jsx)$/,lN=e=>aN.test(e);function dm(e,t,n=!0,r=!1){let{tryPrefix:s,extensions:i,preserveSymlinks:a}=t,o=fN(e,t.preserveSymlinks);if(o?.path)return o.path;let l,c=lN(e);if(c||t.extensions.length||s){let u=L.dirname(e);if(dN(u)){if(c){let f=L.extname(e),d=e.slice(0,-f.length);if((l=ki(d+f.replace("js","ts"),a))||f===".js"&&(l=ki(d+".tsx",a)))return l}if(l=oi(e,i,a))return l;if(s){let f=`${u}/${t.tryPrefix}${L.basename(e)}`;if((l=ki(f,a))||(l=oi(f,i,a)))return l}}}if(n&&o?.type==="directory"){let u=e;if(!r){let f=`${u}/package.json`;try{if(pe.existsSync(f))return t.preserveSymlinks||(f=cn(f)),Fw(u,Di(f),t)}catch(d){if(d.code!==Pw&&d.code!=="ENOENT")throw d}}if((l=oi(`${u}/index`,i,a))||s&&(l=oi(`${u}/${t.tryPrefix}index`,i,a)))return l}}function Ou(e,t,n,r,s){let{root:i,dedupe:a,isBuild:o,preserveSymlinks:l,packageCache:c}=n,u=Ag.exec(e),f=u?u[1]||u[2]:he(e),d;a.includes(f)?d=i:t&&L.isAbsolute(t)&&(t.endsWith("*")||pe.existsSync(he(t)))?d=L.dirname(t):d=i;let p=E=>nr(n.builtins,E),h=null;if(!p(e)&&!e.includes("\0")&&Zr.test(e)){let E=Jt(d,c);h=E?.data.exports&&E.data.name===f?E:null}let y=h||co(f,d,l,c);if(!y){if(!n.disableOptionalPeerDepHandling&&d!==i&&!p(e)&&!e.includes("\0")&&Zr.test(e)){let E=hs(d,c)?.data;if(E){let v=Eo(e);if(v!=null&&E.peerDependencies?.[v]&&E.peerDependenciesMeta?.[v]?.optional)return{id:`${ZP}:${e}:${E.name}`}}}return}let m=(u?uN:Fw)(u?"."+e.slice(f.length):e,y,n,s);if(!m)return;let w=E=>{if(!s||!YA(E.id))return E;let v=e;if(u&&!y.data.exports&&L.extname(e)!==L.extname(E.id)){let S=E.id.indexOf(e);S>-1&&(v=E.id.slice(S),ls?.(`[processResult] ${j.default.cyan(e)} -> ${j.default.dim(v)}`))}return{...E,id:v,external:!0}};if(!n.idOnly&&(!n.scan&&o||s))return w({id:m,moduleSideEffects:y.hasSideEffects(m),packageJsonPath:pN(m,n.legacyInconsistentCjsInterop,n.packageCache,o)});if(!Ke(m)||!r||n.scan)return{id:m};let A=mn(m,r.options),g=r.options.exclude;if(r.options.noDiscovery||!A||t&&Ke(t)||g?.includes(f)||g?.includes(e)||wn.test(m)){let E=r.metadata.browserHash;E&&A&&(m=Le(m,`v=${E}`))}else{let E=r.registerMissingImport(e,m);m=r.getOptimizedDepId(E)}return{id:m}}async function Lw(e,t,n,r,s){await e.scanProcessing;let i=e.metadata,a=GP(i,t);if(a)return e.getOptimizedDepId(a);if(!n)return;let o,l=`> ${t}`;for(let c of i.depInfoList)if(c.src&&c.id.endsWith(l)){if(o==null){let u=Eo(t);if(!u||(o=co(u,n,r,s)?.dir,o==null))break;o=re(o)}if(c.src.startsWith(Me(o)))return e.getOptimizedDepId(c)}}function Fw(e,{dir:t,data:n,setResolvedCache:r,getResolvedCache:s},i,a){let{file:o,postfix:l}=dn(e),c=s(".",i);if(c)return c+l;try{let u;if(n.exports&&(u=Bu(n,".",i,"exports",a)),!u){for(let d of i.mainFields)if(typeof n[d]=="string"){u=n[d];break}else if(d==="browser"){let p=n[d];if(ke(p)&&p["."]){u=p["."];break}}}u||=n.main;let f=u?[u]:["index.js","index.json","index.node"];for(let d of f){let p=!1;if(i.mainFields[0]==="sass"&&!i.extensions.includes(L.extname(d)))d="",p=!0;else{let{browser:y}=n;i.mainFields.includes("browser")&&ke(y)&&(d=jw(d,y)||d)}let h=Mo(L.join(t,d),i,!0,p);if(h)return ls?.(`[package entry] ${j.default.cyan(o)} -> ${j.default.dim(h)}${l!==""?` (postfix: ${l})`:""}`),r(".",h,i),h+l}}catch(u){pm(e,u.message)}pm(e)}function pm(e,t){let n=new Error(`Failed to resolve entry for package "${e}". The package may have incorrect main/module/exports specified in its package.json`+(t?": "+t:"."));throw n.code=Pw,n}function cN(e,t,n){let r=e.map(s=>s===Nr?t?"production":"development":s);return n?r.push("require"):r.push("import"),r}function Bu(e,t,n,r,s){let i=cN(s?n.externalConditions:n.conditions,n.isProduction,n.isRequire),a=(r==="imports"?HI:UI)(e,t,{conditions:i,unsafe:!0});return a?a[0]:void 0}function uN(e,{setResolvedCache:t,getResolvedCache:n,dir:r,data:s},i,a){let o=n(e,i);if(o)return o;let l=e,{exports:c,browser:u}=s;if(c){if(ke(c)&&!Array.isArray(c)){let{file:f,postfix:d}=dn(l),p=Bu(s,f,i,"exports",a);p!==void 0?l=p+d:l=void 0}else l=void 0;if(!l)throw new Error(`Package subpath '${l}' is not defined by "exports" in ${L.join(r,"package.json")}.`)}else if(i.mainFields.includes("browser")&&ke(u)){let{file:f,postfix:d}=dn(l),p=jw(f,u);if(p)l=p+d;else if(p===!1)return t(e,fm,i),fm}if(l){let f=Mo(L.join(r,l),i,!c);if(f)return ls?.(`[node/deep-import] ${j.default.cyan(e)} -> ${j.default.dim(f)}`),t(e,f,i),f}}function jw(e,t){let n=L.posix.normalize(e);for(let r in t){let s=L.posix.normalize(r);if(n===s||hm(n,s,".js")||hm(n,s,"/index.js"))return t[r]}}function hm(e,t,n){return t.endsWith(n)&&t.slice(0,-n.length)===e}function ki(e,t){if(_t(e)?.isFile())return Qw(e,t)}function oi(e,t,n){for(let r of t){let s=ki(e+r,n);if(s)return s}}function fN(e,t){let n=_t(e);if(n?.isFile())return{path:Qw(e,t),type:"file"};if(n?.isDirectory())return{type:"directory"}}function Qw(e,t){return t||(e=cn(e)),re(e)}function dN(e){return _t(e)?.isDirectory()??!1}function pN(e,t,n,r){if(!r||t)return;let s=Jt(e,n);return s?L.join(s.dir,"package.json"):null}function Yn(e,t,n){return Ou(e,t,{root:n.root,isBuild:!0,isProduction:!0,preferRelative:!1,tryIndex:!0,mainFields:[],conditions:["node",...Qu?["module-sync"]:[]],externalConditions:[],external:[],noExternal:[],dedupe:[],extensions:Wm,preserveSymlinks:!1,tsconfigPaths:!1,packageCache:void 0,isRequire:n.isRequire,builtins:Wc,disableOptionalPeerDepHandling:!0})?.id}var Nl;function hN(e){if(Nl)return Nl;let t=Yn("terser",void 0,{root:e})??Yn("terser",wg,{root:e});if(t)return Nl=t;throw new Error("terser not found. Since Vite v3, terser has become an optional dependency. You need to install it.")}function mN(e){let{maxWorkers:t,...n}=e.build.terserOptions,r=()=>new Vc(()=>async(i,a,o)=>{let l=await import(i);try{return await l.minify(a,o)}catch(c){throw{stack:c.stack,...c}}},{shouldUseFake(i,a,o){return!!(typeof o.mangle=="object"&&(o.mangle.nth_identifier?.get||typeof o.mangle.properties=="object"&&o.mangle.properties.nth_identifier?.get)||typeof o.format?.comments=="function"||typeof o.output?.comments=="function"||o.nameCache)},max:t}),s;return{name:"vite:terser",applyToEnvironment(i){return!!i.config.build.minify},async renderChunk(i,a,o){let l=(e.build.minify===!0||e.build.minify==="oxc")&&o.minify!==!1,c=this.environment.config.isOutputOptionsForLegacyChunks?.(o)&&!l;if(e.build.minify!=="terser"&&!c)return null;s||=r();let u=tt(hN(e.root)).href;try{let f=await s.run(u,i,{safari10:!0,...n,format:{...n.format,preserve_annotations:e.build.lib&&o.format==="es"?!0:n.format?.preserve_annotations},sourceMap:!!o.sourcemap,module:o.format.startsWith("es"),toplevel:o.format==="cjs"});return{code:f.code,map:f.map}}catch(f){throw f.line!==void 0&&f.col!==void 0&&(f.loc={file:a.fileName,line:f.line,column:f.col}),f.pos!==void 0&&(f.frame=Ue(i,f.pos)),f}},closeBundle(){s?.stop()}}}function gN(){let e=_s(()=>({}));return{name:"vite:ssr-manifest",applyToEnvironment(t){return!!t.config.build.ssrManifest},generateBundle(t,n){let r=this.environment.config,s=e(this),{base:i}=r;for(let a in n){let o=n[a];if(o.type==="chunk"){for(let l in o.modules){let c=re(BS(r.root,l)),u=s[c]??(s[c]=[]);o.isEntry||(u.push(ze(i,o.fileName)),o.viteMetadata.importedCss.forEach(f=>{u.push(ze(i,f))})),o.viteMetadata.importedAssets.forEach(f=>{u.push(ze(i,f))})}if(o.code.includes(cw)){let l=o.code,c=[];try{c=wt(l)[0].filter(u=>u.n&&u.d>-1)}catch(u){let f=u,d=Dt(l,f.idx);this.error({name:f.name,message:f.message,stack:f.stack,cause:f.cause,pos:f.idx,loc:{...d,file:o.fileName},frame:Ue(l,d)})}if(c.length)for(let u=0;u<c.length;u++){let{s:f,e:d,n:p}=c[u],h=l.slice(f,d),y=[],m=o.fileName,w=new Set,A=g=>{if(g===m||w.has(g))return;w.add(g);let E=n[g];E&&(E.viteMetadata.importedCss.forEach(v=>{y.push(ze(i,v))}),E.imports.forEach(A))};A(re(zt(eo(o.fileName),h.slice(1,-1)))),s[RS(p)]=y}}}}this.emitFile({fileName:typeof r.build.ssrManifest=="string"?r.build.ssrManifest:".vite/ssr-manifest.json",type:"asset",source:JSON.stringify(Hg(s),void 0,2)})}}}var yN=Object.freeze({fileName:".vite/license.md"}),AN=[/^license/i,/^licence/i,/^copying/i];function wN(){return{name:"vite:license",generateBundle(e,t){let n=this.environment.config.build.license;if(n===!1)return;let r=new Map,s={};for(let l in t){let c=t[l];if(c.type!=="asset")for(let u of c.moduleIds){if(u.startsWith("\0")||!Ke(u))continue;let f=hs(L.dirname(u),r);if(!f)continue;let{name:d,version:p="0.0.0",license:h}=f.data,y=`${d}@${p}`;if(s[y])continue;let m={name:d,version:p};h&&(m.identifier=h.trim());let w=vN(f.dir);w&&(m.text=pe.readFileSync(w,"utf-8").trim()),s[y]=m}}let i=Object.values(Hg(s)),a=typeof n=="object"?n.fileName:yN.fileName;if(a.endsWith(".json")){this.emitFile({fileName:a,type:"asset",source:JSON.stringify(i,null,2)});return}let o=EN(i);this.emitFile({fileName:a,type:"asset",source:o})}}}function EN(e){if(e.length===0)return`# Licenses
|
|
466
|
-
|
|
467
|
-
The app does not bundle any dependencies with licenses.
|
|
468
|
-
`;let t=`# Licenses
|
|
469
|
-
|
|
470
|
-
The app bundles dependencies which contain the following licenses:
|
|
471
|
-
`;for(let n of e){let r=`${n.name} - ${n.version}`,s=n.identifier?` (${n.identifier})`:"";t+=`
|
|
472
|
-
## ${r}${s}
|
|
473
|
-
`,n.text&&(t+=`
|
|
474
|
-
${n.text}
|
|
475
|
-
`)}return t}function vN(e){let t=pe.readdirSync(e).find(n=>AN.some(r=>r.test(n)));if(t)return L.join(e,t)}function _N(){let e=new Set;return{name:"vite:prepare-out-dir",watchChange(){e.delete(this.environment)},renderStart:{order:"pre",handler(){if(e.has(this.environment))return;let{config:t}=this.environment;if(t.build.write){e.add(this.environment);let{root:n,build:r}=t,s=Sy(n,r.outDir,r.rolldownOptions.output);bN(s,xy(r.emptyOutDir,n,s,this.environment.logger),this.environment)}}}}}function bN(e,t,n){let{publicDir:r}=n.config,s=[...e];for(let i of e)Nc(i),t!==!1&&pe.existsSync(i)&&Rg(i,[...s.map(a=>{let o=L.relative(i,a);return o&&!o.startsWith("..")&&!L.isAbsolute(o)?o:""}).filter(Boolean),".git"]),n.config.build.copyPublicDir&&r&&pe.existsSync(r)&&(SN(i,r)||n.logger.warn(j.default.yellow(`
|
|
476
|
-
${j.default.bold("(!)")} The public directory feature may not work correctly. outDir ${j.default.white(j.default.dim(i))} and publicDir ${j.default.white(j.default.dim(r))} are not separate folders.
|
|
477
|
-
`)),kg(r,i))}function SN(e,t){let n=re(e),r=re(t);return n!==r&&!n.startsWith(Me(r))&&!r.startsWith(Me(n))}var Uw=Object.freeze({target:"baseline-widely-available",polyfillModulePreload:!0,modulePreload:!0,outDir:"dist",assetsDir:"assets",assetsInlineLimit:zm,sourcemap:!1,terserOptions:{},chunkImportMap:!1,rolldownOptions:{},commonjsOptions:{include:[/node_modules/],extensions:[".js",".cjs"]},dynamicImportVarsOptions:{exclude:[/node_modules/]},write:!0,emptyOutDir:null,copyPublicDir:!0,license:!1,manifest:!1,lib:!1,ssrManifest:!1,ssrEmitAssets:!1,reportCompressedSize:!0,chunkSizeWarningLimit:500,watch:null}),xN=Uw;function Hw(e,t,n,r,s,i){let a=e.polyfillModulePreload,{polyfillModulePreload:o,...l}=e;e=l,a!==void 0&&t.warn("polyfillModulePreload is deprecated. Use modulePreload.polyfill instead."),a===!1&&e.modulePreload===void 0&&(e.modulePreload={polyfill:!1});let c=vt({...Uw,cssCodeSplit:!e.lib,minify:n==="server"||r?!1:"oxc",rollupOptions:{},rolldownOptions:void 0,ssr:n==="server",emitAssets:n==="client",createEnvironment:(d,p)=>new Vw(d,p)},e);xt(c,"build"),c.rolldownOptions={platform:n==="client"||i?"browser":"node",...c.rolldownOptions},c.lib&&c.lib.entry==null&&s!=null&&(c.lib={...c.lib,entry:s}),c.target==="baseline-widely-available"&&(c.target=Fc),Array.isArray(c.target)&&(c.target=Jn(c.target)),c.minify==="false"?c.minify=!1:c.minify===!0&&(c.minify="oxc");let u={polyfill:!0},f={...c,cssTarget:c.cssTarget??c.target,cssMinify:c.cssMinify??(n==="server"?"lightningcss":!!c.minify),modulePreload:c.modulePreload===!1?!1:c.modulePreload===!0?u:{...u,...c.modulePreload}};return xt(f,"build"),f}function CN(e){let t=e.command==="build";return{pre:[...t&&!e.isWorker?[_N()]:[],As("vite:rollup-options-plugins",async n=>!t&&!n.config.isBundled?!1:(await Ht(He(n.config.build.rolldownOptions.plugins))).filter(Boolean)),...e.isWorker?[t1(e)]:[]],post:[...t?Q1(e):[],...t&&e.build.minify==="esbuild"?[kI()]:[],...t?[mN(e)]:[],...t&&!e.isWorker?[wN(),TB(),gN(),wI(e)]:[],Vo()]}}function IN(e,t){let{root:n,packageCache:r,base:s,build:i}=e.config,a=i.lib,{logger:o}=e,l=e.config.consumer==="server",c=A=>L.resolve(n,A),u=e.config.input;if(a&&a.entry==null)throw new Error('Either "build.lib.entry" or the top-level "input" option is required when "build.lib" is set.');let f=a?i.rolldownOptions.input||(typeof a.entry=="string"?c(a.entry):Array.isArray(a.entry)?a.entry.map(c):Object.fromEntries(Object.entries(a.entry).map(([A,g])=>[A,c(g)]))):typeof i.ssr=="string"?c(i.ssr):i.rolldownOptions.input||(u??c("index.html"));if(l&&typeof f=="string"&&f.endsWith(".html"))throw new Error("rolldownOptions.input should not be an html file when building for SSR. Please specify a dedicated SSR entry.");if(i.cssCodeSplit===!1&&(typeof f=="string"?[f]:Array.isArray(f)?f:Object.values(f)).some(A=>A.endsWith(".css")))throw new Error('When "build.cssCodeSplit: false" is set, "rolldownOptions.input" should not include CSS files.');let d=c(i.outDir),p=e.plugins.map(A=>Jw(e,t,A)),h={preserveEntrySignatures:l?"allow-extension":a?"strict":!1,...i.rolldownOptions,output:i.rolldownOptions.output,input:f,plugins:p,external:i.rolldownOptions.external,onLog(A,g){Gw(A,g,e)},transform:{target:i.target===!1?void 0:i.target,...i.rolldownOptions.transform,define:{...i.rolldownOptions.transform?.define,"process.env.NODE_ENV":"process.env.NODE_ENV"}},moduleTypes:{...i.rolldownOptions.moduleTypes,".css":"js"},experimental:{...i.rolldownOptions.experimental,viteMode:!0,chunkImportMap:i.chunkImportMap?{...typeof i.rolldownOptions.experimental?.chunkImportMap=="object"?i.rolldownOptions.experimental?.chunkImportMap:{},baseUrl:s}:i.rolldownOptions.experimental?.chunkImportMap}},y=e.name==="ssr"&&e.getTopLevelConfig().ssr?.target==="webworker";y&&p.push(Ms());let m=(A={})=>{if(A.output&&o.warn(`You've set "rolldownOptions.output.output" in your config. This is deprecated and will override all Vite.js default output options. Please use "rolldownOptions.output" instead.`),A.file)throw new Error('Vite does not support "rolldownOptions.output.file". Please use "rolldownOptions.output.dir" and "rolldownOptions.output.entryFileNames" instead.');A.sourcemap&&o.warnOnce(j.default.yellow('Vite does not support "rolldownOptions.output.sourcemap". Please use "build.sourcemap" instead.'));let g=A.format||"es",E=l&&!y||a?Ww(g,Jt(n,r)?.data.type):"js";return{dir:d,format:g,exports:"auto",sourcemap:i.sourcemap,name:a?a.name:void 0,generatedCode:{preset:"es2015"},entryFileNames:l?`[name].${E}`:a?({name:v})=>RN(a,g,v,n,E,r):L.posix.join(i.assetsDir,`[name]-[hash].${E}`),chunkFileNames:a?`[name]-[hash].${E}`:L.posix.join(i.assetsDir,`[name]-[hash].${E}`),assetFileNames:a?"[name].[ext]":L.posix.join(i.assetsDir,"[name]-[hash].[ext]"),codeSplitting:A.codeSplitting??(A.format==="umd"||A.format==="iife"||y&&(typeof f=="string"||Object.keys(f).length===1)?!1:void 0),comments:typeof A.comments=="boolean"?A.comments:{annotation:!i.minify||a&&(g==="es"||g==="esm"),jsdoc:!i.minify,legal:!i.minify,...A.comments},minify:i.minify==="oxc"?a&&(g==="es"||g==="esm")?{compress:!0,mangle:!0,codegen:!1}:!0:i.minify===!1?"dce-only":!1,topLevelVar:!0,...A}},w=kN(i.rolldownOptions.output,a,o);return Array.isArray(w)?h.output=w.map(m):h.output=m(w),h}function Ww(e,t="commonjs"){return t==="module"?e==="cjs"||e==="umd"?"cjs":"js":e==="es"?"mjs":"js"}function RN(e,t,n,r,s,i){if(typeof e.fileName=="function")return e.fileName(t,n);let a=hs(r,i)?.data,o=e.fileName||(a&&typeof e.entry=="string"?Qg(a.name):n);if(!o)throw new Error('Name in package.json is required if option "build.lib.fileName" is not provided.');return s??=Ww(t,a?.type),t==="cjs"||t==="es"?`${o}.${s}`:`${o}.${t}.${s}`}function kN(e,t,n){if(t){let r=typeof t.entry!="string"&&t.entry&&Object.values(t.entry).length>1,s=t.formats||(r?["es","cjs"]:["es","umd"]);if(!Array.isArray(e)){if(s.includes("umd")||s.includes("iife")){if(r)throw new Error('Multiple entry points are not supported when output formats include "umd" or "iife".');if(!t.name)throw new Error('Option "build.lib.name" is required when output formats include "umd" or "iife".')}return s.map(i=>({...e,format:i}))}t.formats&&n.warn(j.default.yellow('"build.lib.formats" will be ignored because "build.rolldownOptions.output" is already an array format.')),e.forEach(i=>{if((i.format==="umd"||i.format==="iife")&&!i.name)throw new Error('Entries in "build.rolldownOptions.output" must specify "name" when the format is "umd" or "iife".')})}return e}var TN=["CIRCULAR_DEPENDENCY","THIS_IS_UNDEFINED"],ON=["Unsupported expression","statically analyzed"];function BN(){process.stdout.isTTY&&!process.env.CI&&(process.stdout.clearLine(0),process.stdout.cursorTo(0))}function Gw(e,t,n){let r=Re("vite:build"),s=(o,l)=>{let c=typeof l=="object"?l:{message:l};if(c.code==="UNRESOLVED_IMPORT"){let f=c.id,d=c.exporter;if(!f||!f.endsWith("?commonjs-external"))throw new Error(`[vite]: Rolldown failed to resolve import "${d}" from "${f}".
|
|
478
|
-
This is most likely unintended because it can break your application at runtime.
|
|
479
|
-
If you do want to externalize this module explicitly add it to
|
|
480
|
-
\`build.rolldownOptions.external\``)}if(o==="warn"&&(c.plugin==="rollup-plugin-dynamic-import-variables"&&ON.some(f=>c.message.includes(f))||TN.includes(c.code)))return;let u=c.message;switch(c.plugin&&(u=`[plugin ${c.plugin}] ${u}`),o){case"info":n.logger.info(u);return;case"warn":n.logger.warn(j.default.yellow(u));return;case"error":n.logger.error(j.default.red(u));return;case"debug":r?.(u);return;default:n.logger.info(u);return}};BN();let i=n.config.build.rolldownOptions?.onLog,a=n.config.build.rolldownOptions?.onwarn;i?a?i(e,t,mm(a,s)):i(e,t,s):a?mm(a,s)(e,t):s(e,t)}function mm(e,t){return(n,r)=>{n==="warn"?e($N(r),s=>t("warn",typeof s=="function"?s():s)):t(n,r)}}var $N=e=>typeof e=="string"?{message:e}:e;function MN(e,t,n,r){return typeof e=="function"?e(t,n,r):Array.isArray(e)?e.some(s=>gm(t,s)):gm(t,e)}function gm(e,t){return typeof t=="string"?e===t:t.test(e)}var zw=class{_inner=new Map;_resetChunks=new Set;_getKey(e){return"preliminaryFileName"in e?e.preliminaryFileName:e.fileName}_getDefaultValue(e){return e.type==="chunk"?{importedAssets:new Set,importedCss:new Set,__modules:e.modules}:{importedAssets:new Set,importedCss:new Set}}get(e){let t=this._getKey(e);return this._inner.has(t)||this._inner.set(t,this._getDefaultValue(e)),this._inner.get(t)}reset(e){let t=this._getKey(e);this._resetChunks.has(t)||(this._resetChunks.add(t),this._inner.set(t,this._getDefaultValue(e)))}clearResetChunks(){this._resetChunks.clear()}};function Jw(e,t,n){let{resolveId:r,load:s,transform:i}=n,a=Object.assign(Object.create(Object.getPrototypeOf(n)),n);for(let o of Object.keys(a))switch(o){case"resolveId":a[o]=DN(e,r,n.name);break;case"load":a[o]=PN(e,s,n.name);break;case"transform":a[o]=NN(e,i,n.name);break;default:xx.includes(o)&&(a[o]=LN(e,t,n,o))}return a}var Xt=new WeakMap;function Do(e,t){let n={...e,handler:t};return Xt.has(e)||(Xt.set(e,[]),Object.defineProperty(e,"filter",{get(){return Xt.get(e)[0].filter},set(r){for(let s of Xt.get(e))s.filter=r}}),Object.defineProperty(e,"order",{get(){return Xt.get(e)[0].order},set(r){for(let s of Xt.get(e))s.order=r}})),Xt.get(e).push(n),n}function DN(e,t,n){if(!t)return;let r=Ze(t),s=function(i,a,o){return r.call(Po(this,e),i,a,$u(o,e,n))};return"handler"in t?Do(t,s):s}function PN(e,t,n){if(!t)return;let r=Ze(t),s=function(i,...a){return r.call(Po(this,e),i,$u(a[0],e,n))};return"handler"in t?Do(t,s):s}function NN(e,t,n){if(!t)return;let r=Ze(t),s=function(i,a,...o){return r.call(Po(this,e),i,a,$u(o[0],e,n))};return"handler"in t?Do(t,s):s}function LN(e,t,n,r){let s=n[r];if(!s)return;let i=Ze(s);if(typeof i!="function")return s;let a=function(...o){if(r==="renderChunk"&&Ll(t,o[1],!0),r==="augmentChunkHash"&&Ll(t,o[0]),r==="generateBundle"||r==="writeBundle"){let l=o[1];for(let c of Object.values(l))Ll(t,c)}return i.call(Po(this,e),...o)};return"handler"in s?Do(s,a):a}function Ll(e,t,n=!1){n&&e.reset(t),Object.defineProperty(t,"viteMetadata",{value:e.get(t),enumerable:!0}),t.type==="chunk"&&Object.defineProperty(t,"modules",{get(){return t.viteMetadata.__modules},enumerable:!0})}function Po(e,t){return e.meta.viteVersion??=Qm,e.environment??=t,e}function $u(e,t,n){let r=t.config.consumer==="server",s={...e??{},ssr:r};return ui(t?.getTopLevelConfig(),"removePluginHookSsrArgument")&&Object.defineProperty(s,"ssr",{get(){return Xe(t?.getTopLevelConfig(),"removePluginHookSsrArgument",`Used in plugin "${n}".`),r},set(i){r=i}}),s}var FN=/[\n\r'\\\u2028\u2029]/,jN=/([\n\r'\u2028\u2029])/g,QN=/\\/g;function Zi(e){return FN.test(e)?e.replace(QN,"\\\\").replace(jN,"\\$1"):e}var Oc=(e,t="URL")=>`new ${t}(${e}).href`,Fl=(e,t=!1)=>Oc(`'${Zi(Lt(e))}', ${t?"typeof document === 'undefined' ? location.href : ":""}document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT' && document.currentScript.src || document.baseURI`),UN=e=>`require('u' + 'rl').pathToFileURL(${e}).href`,ym=e=>UN(`__dirname + '/${Zi(e)}'`),HN={cjs:e=>`(typeof document === 'undefined' ? ${ym(e)} : ${Fl(e)})`,es:e=>Oc(`'${Zi(Lt(e))}', import.meta.url`),iife:e=>Fl(e),umd:e=>`(typeof document === 'undefined' && typeof location === 'undefined' ? ${ym(e)} : ${Fl(e,!0)})`,"worker-iife":e=>Oc(`'${Zi(Lt(e))}', self.location.href`)};function Xn(e,t,n,r,s,i){let{experimental:a,base:o,decodedBase:l}=e.config,c=e.config.consumer==="server",{renderBuiltUrl:u}=a,f=o===""||o==="./";if(u){let d=u(t,{hostId:r,hostType:s,type:n,ssr:c});if(typeof d=="object"){if(d.runtime)return{runtime:d.runtime};typeof d.relative=="boolean"&&(f=d.relative)}else if(d)return d}return f&&!c?i(t,r):ze(l,t)}function No(e,t){let n=HN[t&&e==="iife"?"worker-iife":e];return(r,s)=>({runtime:n(L.posix.relative(L.dirname(s),r))})}function Kw(e,t,n,r,s,i){let{renderBuiltUrl:a}=s.experimental,o=s.base===""||s.base==="./";if(a){let l=a(e,{hostId:n,hostType:r,type:t,ssr:!!s.build.ssr});if(typeof l=="object"){if(l.runtime)throw new Error(`{ runtime: "${l.runtime}" } is not supported for assets in ${r} files: ${e}`);typeof l.relative=="boolean"&&(o=l.relative)}else if(l)return l}return o&&!s.build.ssr?i(e,n):ze(s.decodedBase,e)}var Am=Kw,wm=Kw,Vw=class extends Xy{mode="build";isBuilt=!1;constructor(e,t,n){let r=t.environments[e];if(!r)throw new Error(`Environment "${e}" is not defined in the config.`);n?.options&&(r=gt(r,n.options)),super(e,t,r)}async init(){this._initiated||(this._initiated=!0)}},qw=Object.freeze({sharedConfigBuild:!1,sharedPlugins:!1}),WN=qw;function GN(e){if(e)return vt({...qw,buildApp:async()=>{}},e)}async function zN(e,t,n,r={}){if(t.startsWith("data:")||nr(e.config.resolve.builtins,t))return{externalize:t,type:"builtin"};let s=t.startsWith("file://");if(ft(t)&&!s)return{externalize:t,type:"network"};if(!s&&n&&t[0]!=="."&&t[0]!=="/"){let{isProduction:l,root:c}=e.config,{externalConditions:u,dedupe:f,preserveSymlinks:d}=e.config.resolve,p=Ou(t,n,{mainFields:["main"],conditions:u,externalConditions:u,external:[],noExternal:[],extensions:[".js",".cjs",".json"],dedupe:f,preserveSymlinks:d,tsconfigPaths:!1,isBuild:!1,isProduction:l,root:c,packageCache:e.config.packageCache,builtins:e.config.resolve.builtins});if(!p){let h=new Error(`Cannot find module '${t}' imported from '${n}'`);throw h.code="ERR_MODULE_NOT_FOUND",h}return{externalize:tt(p.id).toString(),type:yo(p.id,e.config.packageCache)?"module":"commonjs"}}t=Qt(t);let i=await e.moduleGraph.ensureEntryFromUrl(t),a=!!i.transformResult;if(r.cached&&a)return{cache:!0};let o=await e.transformRequest(t);if(!o)throw new Error(`[vite] transform failed for module '${t}'${n?` imported from '${n}'`:""}.`);return r.inlineSourceMap!==!1&&(o=JN(i,o,r.startOffset)),o.code[0]==="#"&&(o.code=o.code.replace(/^#!.*/,l=>" ".repeat(l.length))),{code:o.code,file:i.file,id:i.id,url:i.url,invalidate:!a}}var jl=new RegExp(`//# ${Lc}=data:application/json[^,]+base64,([A-Za-z0-9+/=]+)$`,"gm");function JN(e,t,n){let r=t.map,s=t.code;if(!r||!("version"in r)||s.includes("//# sourceMappingSource=vite-generated"))return t;jl.lastIndex=0,jl.test(s)&&(s=s.replace(jl,""));let i=n?Object.assign({},r,{mappings:";".repeat(n)+r.mappings}):r;return t.code=`${s.trimEnd()}
|
|
481
|
-
//# sourceURL=${e.id}
|
|
482
|
-
${gx}
|
|
483
|
-
//# ${Lc}=${ns(i)}
|
|
484
|
-
`,t}var Ye=Re("vite:deps"),KN=100;function VN(e){let{logger:t}=e,n=Date.now().toString(),r,s=!1,i=e.config.optimizeDeps,{noDiscovery:a,holdUntilCrawlEnd:o}=i,l=Yi(e,n),c={init:k,metadata:l,registerMissingImport:V,run:()=>Q(0),isOptimizedDepFile:kw(e),isOptimizedDepUrl:Tw(e),getOptimizedDepId:F=>`${F.file}?v=${F.browserHash}`,close:x,options:i},u=!1,f=[],d,p=()=>{f.length&&(t.info(j.default.green(`${f.length===1?"dependency":"dependencies"} optimized: ${Pl(f)}`),{timestamp:!0}),f=[])},h=[],y=F=>{h.length&&(t.info(j.default.magenta(`tip: consider adding ${Pl(h)} to optimizeDeps.include to ${F}`)+j.default.dim(`
|
|
485
|
-
See https://vite.dev/guide/dep-pre-bundling.html#customizing-the-behavior`),{timestamp:!0}),h=[])},m=Gl(),w=[],A=()=>{for(let F of w)F.resolve();w=[]},g,E=!1,v=!1,S=!1,b=!1,_,C;async function x(){s=!0,await Promise.allSettled([C?.cancel(),c.scanProcessing,_?.cancel()])}let T="idle";async function k(){if(T!=="idle")return;T="initializing";let F=await bw(e);if(v=!!F,l=c.metadata=F||Yi(e,n),!F){b=!0,E=!0;let G={};await xw(e,G);let P=Sw(e,G,n);for(let z of Object.values(P))fn(l,"discovered",{...z,processing:m.promise}),u=!0;e.waitForRequestsIdle().then(Z),a?I():c.scanProcessing=new Promise(z=>{(async()=>{try{Ye?.(j.default.green("scanning for dependencies..."));let H=setTimeout(()=>{t.info("[optimizer] scanning dependencies...",{timestamp:!0})},1e3),$;try{C=FP(AP(e)),$=await C.result,C=void 0}catch(N){e.logger.error(j.default.red("(!) Failed to run dependency scan. Skipping dependency pre-bundling. "+N.stack));return}finally{clearTimeout(H)}let J=Object.keys(P);h.push(...Object.keys(l.discovered).filter(N=>!$[N]&&!J.includes(N)));for(let N of Object.keys($))l.discovered[N]||te(N,$[N]);let D=R();O(),_=kc(e,D),o||_.result.then(N=>{b&&(_=void 0,I(N))})}catch(H){t.error(H.stack||H.message)}finally{z(),c.scanProcessing=void 0}})()})}T="initialized"}function O(){u=!1,w.push(m),m=Gl()}function R(){let F={},G=c.metadata;for(let P of Object.keys(G.optimized))F[P]={...G.optimized[P]};for(let P of Object.keys(G.discovered)){let{processing:z,...H}=G.discovered[P];F[P]=H}return F}async function I(F){let G=v;if(v=!0,g=void 0,r&&clearTimeout(r),s){E=!1,m.resolve(),A();return}E=!0;try{let P;if(F)P=F;else{let D=R();O(),_=kc(e,D),P=await _.result,_=void 0}if(s){E=!1,P.cancel(),A();return}let z=P.metadata,H=Em(l.discovered,z.optimized),$=H.length>0||l.hash!==z.hash||Object.keys(l.optimized).some(D=>l.optimized[D].fileHash!==z.optimized[D].fileHash),J=async()=>{await P.commit();for(let D in l.discovered)z.optimized[D]||fn(z,"discovered",l.discovered[D]);if(!$){z.browserHash=l.browserHash;for(let D in z.chunks)z.chunks[D].browserHash=l.browserHash;for(let D in z.optimized)z.optimized[D].browserHash=(l.optimized[D]||l.discovered[D]).browserHash}for(let D in z.optimized){let N=l.discovered[D];if(N){let K=z.optimized[D];N.browserHash=K.browserHash,N.fileHash=K.fileHash,N.needsInterop=K.needsInterop,N.processing=void 0}}G&&f.push(...Object.keys(z.optimized).filter(D=>!l.optimized[D])),l=c.metadata=z,A()};$?u?(P.cancel(),Ye?.(j.default.green("delaying reload as new dependencies have been found..."))):(await J(),Ye||(d&&clearTimeout(d),d=void 0,p(),S&&(y("avoid a full page reload during cold start"),S=!1)),t.info(j.default.green("optimized dependencies changed. reloading"),{timestamp:!0}),H.length>0&&t.warn(`Mixed ESM and CJS detected in ${j.default.yellow(H.join(", "))}, add ${H.length===1?"it":"them"} to optimizeDeps.needsInterop to speed up cold start`,{timestamp:!0}),M()):(await J(),Ye?Ye(j.default.green(G?"optimized dependencies unchanged":"dependencies optimized")):(d&&clearTimeout(d),d=setTimeout(()=>{d=void 0,p(),S&&(y("speed up cold start"),S=!1)},200)))}catch(P){t.error(j.default.red(`error while updating dependencies:
|
|
486
|
-
${P.stack}`),{timestamp:!0,error:P}),A(),l.discovered={}}E=!1,g?.()}function M(){e.moduleGraph.invalidateAll(),e.hot.send({type:"full-reload",path:"*"})}function B(){let F=Pl(Object.keys(l.discovered));Ye?.(j.default.green(`new dependencies found: ${F}`)),I()}function U(F,G,P){return We(F+JSON.stringify(G)+JSON.stringify(P)+n)}function V(F,G){let P=l.optimized[F];if(P)return P;let z=l.chunks[F];if(z)return z;let H=l.discovered[F];return H||(H=te(F,G),T==="initialized"&&!b&&Q(),H)}function te(F,G){return u=!0,fn(l,"discovered",{id:F,file:Cw(e,F),src:G,browserHash:U(l.hash,Tc(l.optimized),Tc(l.discovered)),processing:m.promise,exportsData:$o(e,G)})}function Q(F=KN){g=void 0,r&&clearTimeout(r),d&&clearTimeout(d),d=void 0,r=setTimeout(()=>{r=void 0,g=B,E||g()},F)}async function Z(){if(b=!1,Ye?.(j.default.green("static imports crawl ended")),!s)if(await c.scanProcessing,_&&!i.noDiscovery){let F=_.result;_=void 0;let G=await F;E=!1;let P=Object.keys(l.discovered),z=Object.keys(G.metadata.optimized);if(z.length===0&&P.length===0){Ye?.(j.default.green("no dependencies found by the scanner or crawling static imports")),O(),I(G);return}let H=Em(l.discovered,G.metadata.optimized),$=P.some(J=>!z.includes(J));if(H.length>0||$){G.cancel();for(let J of z)P.includes(J)||te(J,G.metadata.optimized[J].src);$&&Ye?.(j.default.yellow("new dependencies were found while crawling that weren't detected by the scanner")),Ye?.(j.default.green("re-running optimizer")),Q(0)}else Ye?.(j.default.green("using post-scan optimizer result, the scanner found every used dependency")),O(),I(G)}else if(!o)u&&(Ye?.(j.default.green("new dependencies were found while crawling static imports, re-running optimizer")),S=!0,Q(0));else{let F=Object.keys(l.discovered);E=!1,F.length===0&&(Ye?.(j.default.green("no dependencies found while crawling the static imports")),v=!0),Q(0)}}return c}function qN(e){let t={metadata:Yi(e),isOptimizedDepFile:kw(e),isOptimizedDepUrl:Tw(e),getOptimizedDepId:s=>`${s.file}?v=${s.browserHash}`,registerMissingImport:()=>{throw new Error(`Vite Internal Error: registerMissingImport is not supported in dev ${e.name}`)},init:r,run:()=>{},close:async()=>{},options:e.config.optimizeDeps},n=!1;async function r(){n||(n=!0,t.metadata=await LP(e))}return t}function Em(e,t){let n=[];for(let r in e){let s=e[r];if(s.needsInterop===void 0)continue;let i=t[r];i&&i.needsInterop!==s.needsInterop&&(n.push(r),Ye?.(j.default.cyan(`needsInterop mismatch detected for ${r}`)))}return n}var vm=class{environment;url;id=null;file=null;type;info;meta;importers=new Set;importedModules=new Set;acceptedHmrDeps=new Set;acceptedHmrExports=null;importedBindings=null;isSelfAccepting;transformResult=null;ssrModule=null;ssrError=null;lastHMRTimestamp=0;lastHMRInvalidationReceived=!1;lastInvalidationTimestamp=0;invalidationState;staticImportedUrls;constructor(e,t,n=!0){this.environment=t,this.url=e,this.type=Ro(e)?"css":"js",n&&(this.isSelfAccepting=!1)}},YN=class{environment;urlToModuleMap=new Map;idToModuleMap=new Map;etagToModuleMap=new Map;fileToModulesMap=new Map;_unresolvedUrlToModuleMap=new Map;_resolveId;_hasResolveFailedErrorModules=new Set;constructor(e,t){this.environment=e,this._resolveId=t}async getModuleByUrl(e){e=ln(yt(e));let t=this._getUnresolvedUrlToModule(e);if(t)return t;let[n]=await this._resolveUrl(e);return this.urlToModuleMap.get(n)}getModuleById(e){return this.idToModuleMap.get(yt(e))}getModulesByFile(e){return this.fileToModulesMap.get(e)}onFileChange(e){let t=this.getModulesByFile(e);if(t){let n=new Set;t.forEach(r=>{this.invalidateModule(r,n)})}}onFileDelete(e){let t=this.getModulesByFile(e);t&&t.forEach(n=>{n.importedModules.forEach(r=>{r.importers.delete(n)})})}invalidateModule(e,t=new Set,n=Wt(),r=!1,s=!1){let i=e.invalidationState;if(s?e.invalidationState??=e.transformResult??"HARD_INVALIDATED":e.invalidationState="HARD_INVALIDATED",t.has(e)&&i===e.invalidationState)return;t.add(e),r?(e.lastHMRTimestamp=n,e.lastHMRInvalidationReceived=!1):e.lastInvalidationTimestamp=n;let a=e.transformResult?.etag;a&&this.etagToModuleMap.delete(a),e.transformResult=null,e.ssrModule=null,e.ssrError=null,e.importers.forEach(o=>{if(!o.acceptedHmrDeps.has(e)){let l=(o.staticImportedUrls?.has(e.url)||s)&&o.type==="js";this.invalidateModule(o,t,n,r,l)}}),this._hasResolveFailedErrorModules.delete(e)}invalidateAll(){let e=Wt(),t=new Set;this.idToModuleMap.forEach(n=>{this.invalidateModule(n,t,e)})}async updateModuleInfo(e,t,n,r,s,i,a){e.isSelfAccepting=i;let o=e.importedModules,l,c=[],u=new Array(t.size),f=0;for(let d of t){let p=f++;typeof d=="string"?c.push(this.ensureEntryFromUrl(d).then(h=>{h.importers.add(e),u[p]=h})):(d.importers.add(e),u[p]=d)}c.length&&await Promise.all(c),e.importedModules=new Set(u),o.forEach(d=>{e.importedModules.has(d)||(d.importers.delete(e),d.importers.size||(l||(l=new Set)).add(d))}),c=[],u=new Array(r.size),f=0;for(let d of r){let p=f++;typeof d=="string"?c.push(this.ensureEntryFromUrl(d).then(h=>{u[p]=h})):u[p]=d}return c.length&&await Promise.all(c),e.acceptedHmrDeps=new Set(u),e.staticImportedUrls=a,e.acceptedHmrExports=s,e.importedBindings=n,l}async ensureEntryFromUrl(e,t=!0){return this._ensureEntryFromUrl(e,t)}async _ensureEntryFromUrl(e,t=!0,n){e=ln(yt(e));let r=this._getUnresolvedUrlToModule(e);if(r)return r;let s=(async()=>{let[i,a,o]=await this._resolveUrl(e,n);if(r=this.idToModuleMap.get(a),r)this.urlToModuleMap.has(i)||this.urlToModuleMap.set(i,r);else{r=new vm(i,this.environment,t),o&&(r.meta=o),this.urlToModuleMap.set(i,r),r.id=a,this.idToModuleMap.set(a,r);let l=r.file=he(a),c=this.fileToModulesMap.get(l);c||(c=new Set,this.fileToModulesMap.set(l,c)),c.add(r)}return this._setUnresolvedUrlToModule(e,r),r})();return this._setUnresolvedUrlToModule(e,s),s}createFileOnlyEntry(e){e=re(e);let t=this.fileToModulesMap.get(e);t||(t=new Set,this.fileToModulesMap.set(e,t));let n=`${Fe}${e}`;for(let s of t)if((s.url===n||s.id===e)&&s.type==="asset")return s;let r=new vm(n,this.environment);return r.type="asset",r.file=e,t.add(r),r}async resolveUrl(e){e=ln(yt(e));let t=await this._getUnresolvedUrlToModule(e);return t?.id?[t.url,t.id,t.meta]:this._resolveUrl(e)}updateModuleTransformResult(e,t){if(this.environment==="client"){let n=e.transformResult?.etag;n&&this.etagToModuleMap.delete(n),t?.etag&&this.etagToModuleMap.set(t.etag,e)}e.transformResult=t}getModuleByEtag(e){return this.etagToModuleMap.get(e)}_getUnresolvedUrlToModule(e){return this._unresolvedUrlToModuleMap.get(e)}_setUnresolvedUrlToModule(e,t){this._unresolvedUrlToModuleMap.set(e,t)}async _resolveUrl(e,t){let n=t??await this._resolveId(e),r=n?.id||e;if(e!==r&&!e.includes("\0")&&!e.startsWith("virtual:")){let s=kS(he(r));if(s){let i=he(e);i.endsWith(s)||(e=i+s+e.slice(i.length))}}return[e,r,n?.meta]}};function XN(e,t){let{root:n}=e.config;nL(t.config.dev.warmup,n).then(r=>{for(let s of r)ZN(e,t,s)})}async function ZN(e,t,n){if(n.endsWith(".html")){let r=eL(n,e.config.root);if(r)try{let s=await Ee.readFile(n,"utf-8");await e.transformIndexHtml(r,s)}catch(s){t.logger.error(`Pre-transform error (${j.default.cyan(n)}): ${s.message}`,{error:s,timestamp:!0})}}else{let r=tL(n,e.config.root);await t.warmupRequest(r)}}function eL(e,t){let n=L.relative(t,e);if(n[0]!==".")return"/"+re(n)}function tL(e,t){let n=L.relative(t,e);return n[0]==="."?L.posix.join(Fe,re(e)):"/"+re(n)}async function nL(e,t){if(!e.length)return[];let n=[],r=[];for(let s of e)Ar(s)?r.push(s):L.isAbsolute(s)?n.push(s):n.push(L.resolve(t,s));return r.length&&n.push(...await wr(r,{absolute:!0,cwd:t,expandDirectories:!1,ignore:["**/.git/**","**/node_modules/**"]})),n}var lt=Re("vite:full-bundle-mode"),rL=class{files=new Map;get size(){return this.files.size}get(e){let t=this.files.get(e);if(t!==void 0){if(typeof t=="function"){let n=t();return this.files.set(e,n),n}return t}}set(e,t){this.files.set(e,t)}has(e){return this.files.has(e)}clear(){this.files.clear()}},sL=class{environment;_devEngine;viteRuntime;initialBuildCompleted=!1;_closed=!1;clients=new iL;debouncedFullReload=_m(20,()=>{this.environment.hot.send({type:"full-reload",path:"*"}),this.environment.logger.info(j.default.green("page reload"),{timestamp:!0})});fullReloadPending=!1;reloadNeededClientIds=new Set;debouncedReloadNeededFlush=_m(20,()=>{if(!(this.lastBuildError||this.reloadNeededClientIds.size===0)){for(let e of this.reloadNeededClientIds)this.clients.get(e)?.send({type:"full-reload",path:"*"});this.reloadNeededClientIds.clear(),this.environment.logger.info(j.default.green("page reload"),{timestamp:!0})}});lastBuildError=null;memoryFiles=new rL;constructor(e){if(this.environment=e,e.name!=="client")throw new Error("currently full bundle mode is only available for client environment")}get devEngine(){if(!this._devEngine)throw new Error("dev engine was not yet initialized");return this._devEngine}pendingPayloadFilenames=new Set;get hasBuildOutput(){return this.memoryFiles.size>1||this.memoryFiles.size===1&&!this.memoryFiles.has("bundledDevClient.mjs")}async listen(){this._closed=!1,lt?.("INITIAL: setup bundle options");let e=await this.getRolldownOptions();if(Array.isArray(e.output)&&e.output.length>1)throw new Error("multiple output options are not supported in dev mode");let t=Array.isArray(e.output)?e.output[0]:e.output;this.environment.hot.on("vite:client-connected",async(n,r)=>{this.clients.setupIfNeeded(r,n.clientId),this.devEngine.registerClient(n.clientId)}),this.environment.hot.on("vite:client:connect",(n,r)=>{this.lastBuildError&&(lt?.("REPLAY: replaying last build error to newly connected client"),r.send({type:"error",err:Qn(this.lastBuildError)}))}),this.environment.hot.on("vite:client:disconnect",(n,r)=>{let s=this.clients.delete(r);s&&(this.devEngine.removeClient(s),this.reloadNeededClientIds.delete(s))}),this.environment.hot.on("vite:bundled-dev:reload-needed",(n,r)=>{let s=this.clients.getId(r);s&&(lt?.(`TRIGGER: client ${s} requested a page reload (${n.reason})`),this.environment.logger.info(j.default.green("bundling for page reload ")+j.default.dim(n.reason),{clear:!0,timestamp:!0}),this.reloadNeededClientIds.add(s),this.ensureOutputAndFlushReloadNeeded())}),this._devEngine=await hd(e,t,{onHmrUpdates:n=>{if(n instanceof Error){this.environment.logger.error(j.default.red(`\u2718 Build error: ${n.message}`),{error:n});for(let i of this.clients.getAll())i.send({type:"error",err:Qn(n)});return}let{updates:r,changedFiles:s}=n;if(s.length!==0){if(r.every(i=>i.update.type==="Noop")){lt?.(`ignored file change for ${s.join(", ")}`);return}for(let{clientId:i,update:a}of r){let o=this.clients.get(i);o&&this.handleHmrOutput(o,s,a)}this.reloadNeededClientIds.size&&this.ensureOutputAndFlushReloadNeeded()}},onOutput:n=>{if(n instanceof Error){this.environment.logger.error(j.default.red(`\u2718 Build error: ${n.message}`),{error:n}),this.lastBuildError=n,this.fullReloadPending=!1,this.environment.hot.send({type:"error",err:Qn(n)});return}this.lastBuildError=null,this.storeOutputFiles(n.output),this.fullReloadPending&&(this.fullReloadPending=!1,this.debouncedFullReload()),this.reloadNeededClientIds.size&&this.debouncedReloadNeededFlush()},onAdditionalAssets:n=>{this.storeOutputFiles(n.output)},watch:{skipWrite:!0}}),lt?.("INITIAL: setup dev engine"),this.devEngine.run().then(()=>{lt?.("INITIAL: run done")},n=>{lt?.("INITIAL: run error",n)}),this.viteRuntime=await WA(this.environment.getTopLevelConfig()),this.storeOutputFiles([]),this.waitForInitialBuildFinish().then(()=>{this._closed||(lt?.("INITIAL: build done"),this.initialBuildCompleted=!0,this.lastBuildError||this.environment.hot.send({type:"full-reload",path:"*",ifFallback:!0}))})}async waitForInitialBuildFinish(){if(this._closed||(await this.devEngine.ensureCurrentBuildFinish(),this._closed))return;let e=await this.devEngine.getBundleState();for(;!this.hasBuildOutput&&!e.lastBuildErrored;){if(await VS(10),this._closed||(await this.devEngine.ensureCurrentBuildFinish(),this._closed))return;e=await this.devEngine.getBundleState()}}ensureOutputAndFlushReloadNeeded(){this.devEngine.ensureLatestBuildOutput().then(()=>this.debouncedReloadNeededFlush(),()=>{})}async triggerBundleRegenerationIfStale(){let e=await this.devEngine.getBundleState();if(this.initialBuildCompleted&&e.lastBuildErrored&&e.lastErrorStage==="Hmr")return lt?.("TRIGGER: access after HMR-stage failure, forcing full rebuild"),this.devEngine.triggerFullBuild(),this.devEngine.ensureLatestBuildOutput().then(()=>{this.debouncedFullReload()}),!0;let t=e.hasStaleOutput&&!e.lastBuildErrored&&this.initialBuildCompleted;return t&&(this.devEngine.ensureLatestBuildOutput().then(()=>{this.debouncedFullReload()}),lt?.("TRIGGER: access to stale bundle, triggered bundle re-generation")),t}async triggerLazyBundling(e,t){if(!e||!t)return;lt?.(`TRIGGER-LAZY: trigger lazy bundling for module ${e} for client ${t}`);let n=await this.devEngine.compileEntry(e,t);return this.pendingPayloadFilenames.add(n.filename),n}markPayloadDelivered(e){this.pendingPayloadFilenames.delete(e)&&this.devEngine.notifyPayloadDelivered(e)}async close(){this._closed=!0,this.memoryFiles.clear(),await this._devEngine?.close(),this.initialBuildCompleted=!1}storeOutputFiles(e){this.viteRuntime&&this.memoryFiles.set(Gm,{source:this.viteRuntime,etag:(0,rs.default)(Buffer.from(this.viteRuntime),{weak:!0})});for(let t of e)this.memoryFiles.set(t.fileName,()=>{let n=t.type==="chunk"?t.code:t.source;return{source:n,etag:(0,rs.default)(Buffer.from(n),{weak:!0})}})}async getRolldownOptions(){let e=new zw,t=IN(this.environment,e);if(t.experimental??={},t.experimental.devMode={lazy:!0,...typeof t.experimental.devMode=="object"?t.experimental.devMode:{},implement:"",skipCommonRuntimeInjection:!0},t.optimization??={},t.optimization.inlineConst=!1,Array.isArray(t.output))for(let n of t.output)n.entryFileNames="assets/[name].js",n.chunkFileNames="assets/[name]-[hash].js",n.assetFileNames="assets/[name]-[hash][extname]",n.minify=!1,n.sourcemap=!0;else t.output??={},t.output.entryFileNames="assets/[name].js",t.output.chunkFileNames="assets/[name]-[hash].js",t.output.assetFileNames="assets/[name]-[hash][extname]",t.output.minify=!1,t.output.sourcemap=!0;return t}handleHmrOutput(e,t,n){if(n.type==="Noop")return;let r=t.map(a=>Cu(a,this.environment.config.root)).join(", ");if(n.type==="FullReload"){let a=n.reason?j.default.dim(` (${n.reason})`):"";this.environment.logger.info(j.default.green("trigger page reload ")+j.default.dim(r)+a,{clear:!0,timestamp:!0}),this.fullReloadPending=!0;return}lt?.(`handle hmr output for ${r}`,{...n,code:typeof n.code=="string"?"[code]":n.code}),this.pendingPayloadFilenames.add(n.filename),this.memoryFiles.set(n.filename,{source:n.code+`
|
|
487
|
-
; export {}`}),n.sourcemapFilename&&n.sourcemap&&this.memoryFiles.set(n.sourcemapFilename,{source:n.sourcemap}),e.send({type:"bundled-dev-update",changedIds:n.changedIds,url:n.filename,seq:n.seq});let{formatted:s,truncated:i}=Wg(n.changedIds);i&&Et?.(`hmr update ${n.changedIds.join(", ")}`),this.environment.logger.info(j.default.green("hmr update ")+j.default.dim(s),{clear:!0,timestamp:!0})}},iL=class{clientToId=new Map;idToClient=new Map;setupIfNeeded(e,t){let n=this.clientToId.get(e);if(n&&n!==t)throw new Error("client ID conflict detected. Please restart the dev server.");this.clientToId.set(e,t),this.idToClient.set(t,e)}get(e){return this.idToClient.get(e)}getId(e){return this.clientToId.get(e)}getAll(){return Array.from(this.idToClient.values())}delete(e){let t=this.clientToId.get(e);if(t)return this.clientToId.delete(e),this.idToClient.delete(t),t}};function _m(e,t){let n;return()=>{n&&(globalThis.clearTimeout(n),n=null),n=globalThis.setTimeout(t,e)}}var Yw=class extends Xy{mode="dev";moduleGraph;depsOptimizer;_remoteRunnerOptions;_skipFsCheck;get pluginContainer(){if(!this._pluginContainer)throw new Error(`${this.name} environment.pluginContainer called before initialized`);return this._pluginContainer}_pluginContainer;_closing=!1;_pendingRequests;_crawlEndFinder;hot;bundledDev;constructor(e,t,n){let r=t.environments[e];if(!r)throw new Error(`Environment "${e}" is not defined in the config.`);if(n.options&&(r=gt(r,n.options)),super(e,t,r),(r.isBundled||e==="client"&&t.experimental.bundledDev)&&(n.disableDepsOptimizer=!0,this.bundledDev=new sL(this)),this._pendingRequests=new Map,this.moduleGraph=new YN(e,s=>this.pluginContainer.resolveId(s,void 0)),this._crawlEndFinder=aL(),this._remoteRunnerOptions=n.remoteRunner??{},this._skipFsCheck=!!(n.transport&&!(jr in n.transport)&&n.transport.skipFsCheck),this.hot=n.transport?jr in n.transport?n.transport:Ec(n.transport,n.hot):Ec({},n.hot),this.hot.setInvokeHandler({fetchModule:(s,i,a)=>{if(n.disableFetchModule)throw new Error("fetchModule is disabled in this environment");return this.fetchModule(s,i,a)},getBuiltins:async()=>this.config.resolve.builtins.map(s=>typeof s=="string"?{type:"string",value:s}:{type:"RegExp",source:s.source,flags:s.flags})}),this.hot.on("vite:invalidate",({path:s,message:i,firstInvalidatedBy:a},o)=>{this.invalidateModule({path:s,message:i,firstInvalidatedBy:a},o)}),!n.disableDepsOptimizer){let{optimizeDeps:s}=this.config;n.depsOptimizer?this.depsOptimizer=n.depsOptimizer:Cs(s)?this.depsOptimizer=void 0:this.depsOptimizer=(s.noDiscovery?qN:VN)(this)}}async init(e){this._initiated||(this._initiated=!0,this._pluginContainer=await Cc(this,this.config.plugins,e?.watcher))}async _registerInputsAsSafeModules(){let e=this.config.input,t=e==null?["index.html"]:typeof e=="string"?[e]:Array.isArray(e)?e:Object.values(e),n=async()=>{let r=await Promise.all(t.map(s=>this.pluginContainer.resolveId(s,void 0,{isEntry:!0,scan:!0})));for(let s of r)if(s&&!s.external){let i=he(s.id);L.isAbsolute(i)&&this.getTopLevelConfig().safeModulePaths.add(i)}};e==null?await n().catch(()=>{}):await n()}async listen(e){this.hot.listen(),await Promise.all([this.bundledDev?.listen(),this.depsOptimizer?.init()]),XN(e,this)}fetchModule(e,t,n){return zN(this,e,t,{...this._remoteRunnerOptions,...n})}async reloadModule(e){this.config.server.hmr!==!1&&e.file&&Ji(this,e.file,[e],Wt())}transformRequest(e){return uc(this,e,{skipFsCheck:this._skipFsCheck})}async warmupRequest(e){if(!this.bundledDev)try{await uc(this,e,{skipFsCheck:!0})}catch(t){if(t?.code==="ERR_OUTDATED_OPTIMIZED_DEP"||t?.code==="ERR_CLOSED_SERVER")return;this.logger.error(Un(t,[`Pre-transform error: ${t.message}`],!1),{error:t,timestamp:!0})}}invalidateModule(e,t){if(this.bundledDev)return;let n=this.moduleGraph.urlToModuleMap.get(e.path);if(n&&n.isSelfAccepting&&n.lastHMRTimestamp>0&&!n.lastHMRInvalidationReceived){n.lastHMRInvalidationReceived=!0,this.logger.info(j.default.yellow("hmr invalidate ")+j.default.dim(e.path)+(e.message?` ${e.message}`:""),{timestamp:!0});let r=Cu(n.file,this.config.root);Ji(this,r,[...n.importers].filter(s=>s!==n),n.lastHMRTimestamp,e.firstInvalidatedBy)}}async close(){this._closing=!0,this._crawlEndFinder.cancel(),await Promise.allSettled([this.bundledDev?this.bundledDev.close():this.pluginContainer.close(),this.depsOptimizer?.close(),jr in this.hot?Promise.resolve():this.hot.close(),(async()=>{for(;this._pendingRequests.size>0;)await Promise.allSettled([...this._pendingRequests.values()].map(e=>e.request))})()])}waitForRequestsIdle(e){return this._crawlEndFinder.waitForRequestsIdle(e)}_registerRequestProcessing(e,t){this._crawlEndFinder.registerRequestProcessing(e,t)}},oL=50;function aL(){let e=new Set,t=new Set,n=Gl(),r,s=!1;function i(){s=!0}function a(f,d){t.has(f)||(t.add(f),e.add(f),d().catch(()=>{}).finally(()=>l(f)))}function o(f){return f?(t.add(f),l(f)):c(),n.promise}function l(f){e.delete(f),c()}function c(){s||e.size>0||(r&&clearTimeout(r),r=setTimeout(u,oL))}function u(){s||e.size>0||n.resolve()}return{registerRequestProcessing:a,waitForRequestsIdle:o,cancel:i}}function Xw(e,t,n={}){return n.transport==null&&(n.transport=KM()),n.hot==null&&(n.hot=!0),new Zw(e,t,n)}function lL(e){return e instanceof Zw}var Zw=class extends Yw{_runner;_runnerFactory;_runnerOptions;constructor(e,t,n){super(e,t,n),this._runnerFactory=n.runner,this._runnerOptions=n.runnerOptions}get runner(){if(this._runner)return this._runner;let e=this._runnerFactory||Jk;return this._runner=e(this,this._runnerOptions),this._runner}async close(){await super.close(),this._runner&&await this._runner.close()}};function cL(e,t){return{port:e?.port??4173,strictPort:e?.strictPort??t.strictPort,host:e?.host??t.host,allowedHosts:e?.allowedHosts??t.allowedHosts,https:e?.https??t.https,open:e?.open??t.open,proxy:e?.proxy??t.proxy,cors:e?.cors??t.cors,headers:e?.headers??t.headers}}var Mu=/\.[cm]?[jt]sx?$/,bm=/^index\.[cm]?[jt]sx?$/,eE=e=>e.slice(e.lastIndexOf("/")+1),uL=e=>Mu.test(eE(e));function fL(e,t,n){let{specifier:r,line:s,column:i}=e,a={file:n,line:s,column:i,specifier:r};if(r.endsWith(".json"))return e.hasTypeJsonAttribute?void 0:{type:"json-without-attributes",...a};if(!t)return;if(t.endsWith(".json")&&!e.hasTypeJsonAttribute)return{type:"json-without-attributes",...a};let o=eE(r),l=o==="index"||bm.test(o);if(bm.test(L.basename(t))&&!l)return{type:"directory-index-import",...a};if(!Mu.test(o))return{type:"extensionless-import",...a}}var dL=e=>e.startsWith(".")||L.isAbsolute(e),Sm=e=>!!e?.some(t=>(t.key.type==="Identifier"?t.key.name:t.key.value)==="type"&&t.value?.value==="json"),pL={__dirname:"dirname",__filename:"filename"};function hL(e,t,n){let r=[],s=(a,o)=>{if(!dL(a.value))return;let{line:l,column:c}=Dt(e,a.start);r.push({specifier:a.value,line:l,column:c,hasTypeJsonAttribute:o})};my(t,{enter(a){let o=a;switch(o.type){case"ImportDeclaration":s(o.source,Sm(o.attributes));break;case"ExportNamedDeclaration":case"ExportAllDeclaration":o.source&&s(o.source,Sm(o.attributes));break;case"ImportExpression":o.source.type==="Literal"&&typeof o.source.value=="string"&&s(o.source,o.options!=null)}}});let i=[];if(e.includes("__dirname")||e.includes("__filename")){let{globals:a}=Xk(t);for(let[o,l]of Object.entries(pL)){let c=a.get(o);if(!c)continue;let{line:u,column:f}=Dt(e,c.start);i.push({type:l,file:n,line:u,column:f})}}return{globals:i,imports:r}}var mL=new Set(["ImportDeclaration","ExportNamedDeclaration","ExportDefaultDeclaration","ExportAllDeclaration"]);function gL(e,t,n){for(let r of t.body)if(mL.has(r.type)){let{line:s,column:i}=Dt(e,r.start);return{type:"esm-syntax-in-cjs",file:n,line:s,column:i}}}function yL(e,t){let n=`${re(L.relative(t,e.file))}:${e.line}:${e.column+1}`;switch(e.type){case"dirname":return`\`__dirname\` (${n}). Use \`import.meta.dirname\` instead`;case"filename":return`\`__filename\` (${n}). Use \`import.meta.filename\` instead`;case"extensionless-import":return`import "${e.specifier}" without a file extension (${n}). Add the file extension`;case"directory-index-import":return`import "${e.specifier}" resolves to a directory index (${n}). Import the index file directly`;case"json-without-attributes":return e.specifier?.endsWith(".json")?`JSON import "${e.specifier}" without import attributes (${n}). Add \`with { type: 'json' }\``:`import "${e.specifier}" resolves to a JSON file (${n}). Import it with a \`.json\` extension and \`with { type: 'json' }\``;case"esm-syntax-in-cjs":return`ESM syntax in a file loaded as CommonJS (${n}). Use a \`.mjs\` extension or set \`"type": "module"\` in the closest package.json`}}function AL(e,t){let n="Your Vite config uses features that are unsupported by `configLoader: 'native'`, which is planned to become the default in a future major version of Vite:",r=e.map(i=>` - ${yL(i,t)}`);return j.default.yellow([`(!) ${n}`,...r,"Set `VITE_CONFIG_NATIVE_IGNORE_WARNING=true` to suppress this warning."].join(`
|
|
488
|
-
`))}function wL(e){return{name:"vite:native-config-compat-check",transform:{filter:{id:{include:Mu,exclude:/^\0/}},async handler(t,n){let r=typeof process.versions.deno=="string"||yo(n),s;try{let o=or(n,t);if(o.errors.length>0)return null;s=o.program}catch{return null}if(!r){let o=gL(t,s,n);return o&&e.push(o),null}let{globals:i,imports:a}=hL(t,s,n);for(let o of i)e.push(o);for(let o of a){let l=null;!o.specifier.endsWith(".json")&&!uL(o.specifier)&&(l=(await this.resolve(o.specifier,n))?.id??null);let c=fL(o,l,n);c&&e.push(c)}return null}}}}var tE=Object.freeze({target:"node",optimizeDeps:{}}),EL=tE;function vL(e,t){return vt(vt(tE,{optimizeDeps:{esbuildOptions:{preserveSymlinks:t}}}),e??{})}async function _L(e,t){let n=(await import("./false-QKAHAALV.js")).default,r=Xw("inline",await oE(gt(t||{},{configFile:!1,envDir:!1,cacheDir:process.cwd(),environments:{inline:{consumer:"server",dev:{moduleRunnerTransform:!0},resolve:{external:!0,mainFields:[],conditions:["node",...n?["module-sync"]:[]]}}}}),"serve"),{runnerOptions:{hmr:{logger:!1}},hot:!1});await r.init();try{let s=await r.runner.import(e);return{module:s,dependencies:[...r.runner.evaluatedModules.urlToIdModuleMap.values()].filter(i=>!i.meta||"externalize"in i.meta?!1:i.exports!==s).map(i=>i.file)}}finally{await r.close()}}function bL(e){let t=[],n=[],r=[],s,i,a=!1,o=async(c,u)=>{let f=[],d=[],p={initialOptions:new Proxy({platform:u,plugins:c?.flatMap(h=>h&&"name"in h?[{name:h.name,setup(){}}]:[])??[]},{get(h,y,m){if(y in h)return h[y];throw new Error("Not implemented")}}),resolve(){throw new Error("Not implemented")},onStart(h){t.push(h)},onEnd(h){n.push(h)},onResolve(h,y){f.push([h,y])},onLoad(h,y){d.push([h,y])},onDispose(h){r.push(h)},get esbuild(){throw new Error("Not implemented")},set esbuild(h){throw new Error("Not implemented")}};await e.setup(p),s=f.map(([h,y])=>SL(h,y)),i=d.map(([h,y])=>xL(h,y)),a=!0},l=new Set;return{name:e.name,async options(c){await o(c.plugins,c.platform??"node")},async buildStart(c){a||await o([{name:"vite:dep-scan"}],c.platform??"node");for(let u of t)u()},generateBundle(c,u,f){let d=new Proxy({metafile:void 0,mangleCache:void 0,...f?{outputFiles:void 0}:{}},{get(p,h){if(h in p||typeof h=="symbol")return p[h];throw new Error("Not implemented property: "+h)}});for(let p of n)p(d)},async resolveId(c,u,f){for(let d of s){let p=await d.call(this,c,u,f);if(p)return typeof p=="object"&&p.namespace&&l.add(p.namespace),p}if(l.size){let[d,p]=Du(u);if(l.has(p))return await this.resolve(c,d,f)}},async load(c){for(let u of i){let f=await u.call(this,c);if(f)return f}},closeBundle(){if(!this.meta.watchMode)for(let c of r)c()},closeWatcher(){for(let c of r)c()}}}function SL(e,t){return async function(n,r,s){let[i,a]=Du(r);if(e.namespace!==void 0&&e.namespace!==a||e.filter!==void 0&&!e.filter.test(n))return;let o=await t({path:n,importer:i??"",namespace:a,resolveDir:eo(i??""),kind:i===void 0?"entry-point":s.kind==="new-url"||s.kind==="hot-accept"?"dynamic-import":s.kind,pluginData:{},with:{}});if(o){if(o.errors&&o.errors.length>0)throw new AggregateError(o.errors);if(o.warnings&&o.warnings.length>0||o.watchDirs&&o.watchDirs.length>0||!o.path)throw new Error("not implemented");for(let l of o.watchFiles??[])this.addWatchFile(l);return{id:o.namespace?`${o.namespace}:${o.path}`:o.path,external:o.external,moduleSideEffects:o.sideEffects,namespace:o.namespace}}}}function xL(e,t){let n=new TextDecoder;return async function(r){let[s,i]=Du(r);if(e.namespace!==void 0&&e.namespace!=="file"&&e.namespace!==i||e.filter!==void 0&&!e.filter.test(r))return;let a=await t.call(this,{path:s,namespace:i,suffix:"",pluginData:{},with:{}});if(a){if(a.errors&&a.errors.length>0)throw new AggregateError(a.errors);if(a.warnings&&a.warnings.length>0||a.watchDirs&&a.watchDirs.length>0||a.contents==null)throw new Error("not implemented");for(let o of a.watchFiles??[])this.addWatchFile(o);return{code:typeof a.contents=="string"?a.contents:n.decode(a.contents),moduleType:a.loader}}}}function Du(e){if(e===void 0)return[void 0,"file"];let t=e.indexOf(":");return t>=0?[e.slice(t+1),e.slice(0,t)]:[e,"file"]}var Bc=Re("vite:config",{depth:10}),CL=An(pe.realpath),$c=Symbol("vite:resolved-config");function IL(e,t,n){return new Yw(e,t,{hot:!0,transport:n.ws,disableFetchModule:!0})}function RL(e,t){return Xw(e,t)}async function kL(e,t,n){let r=e===!0||!!(e&&e.enabled),s=(await zc(t)).host??"localhost",i={config:{host:s},enabled:!1};if(!r)return i;try{let{normalizeDevToolsConfig:a}=await import("@vitejs/devtools/config");return a(e,s)}catch(a){return n.error(j.default.red(`Failed to load Vite DevTools config: ${a.message||a.stack}`),{error:a}),i}}var Bt=Object.freeze({define:{},dev:{warmup:[],sourcemap:{js:!0},sourcemapIgnoreList:void 0},build:xN,resolve:{externalConditions:[...Tx],extensions:Wm,dedupe:[],noExternal:[],external:[],preserveSymlinks:!1,tsconfigPaths:!1,alias:[]},base:"/",publicDir:"public",plugins:[],html:{cspNonce:void 0},css:BB,json:{namedExports:!0,stringify:"auto"},assetsInclude:void 0,builder:WN,server:NM,preview:{port:Px},experimental:{importGlobRestoreExtension:!1,renderBuiltUrl:void 0,hmrPartialAccept:!1,bundledDev:!1},future:{removePluginHookHandleHotUpdate:void 0,removePluginHookSsrArgument:void 0,removeServerModuleGraph:void 0,removeServerHot:void 0,removeServerTransformRequest:void 0,removeServerWarmupRequest:void 0,removeSsrLoadModule:void 0},legacy:{skipWebSocketTokenCheck:!1},logLevel:"info",customLogger:void 0,clearScreen:!0,envDir:void 0,envPrefix:"VITE_",worker:{format:"iife",plugins:()=>[]},optimizeDeps:{include:[],exclude:[],needsInterop:[],rolldownOptions:{},extensions:[],disabled:"build",holdUntilCrawlEnd:!0,force:!1,ignoreOutdatedRequests:!1},ssr:EL,environments:{},appType:"spa"});function nE(e){if(e===void 0)return;if(typeof e=="string")return Ql(e);if(Array.isArray(e))return e.map(Ql);let t={};for(let n in e)t[n]=Ql(e[n]);return t}var TL=/\\([*?[\]{}()!+@|])/g;function Ql(e){if(Ar(e))throw new Error(`\`input\` cannot contain glob characters. They are reserved, so the ${JSON.stringify(e)} is not allowed. Please escape them with a backslash (\\)`);return e.replace(TL,"$1")}function rE(e,t,n,r){let s=vt({...Bt.dev,sourcemapIgnoreList:Ke,preTransformRequests:r??n==="client",createEnvironment:t==="client"?IL:RL,recoverable:n==="client",moduleRunnerTransform:n==="server"},e??{});return{...s,sourcemapIgnoreList:s.sourcemapIgnoreList===!1?()=>!1:s.sourcemapIgnoreList}}function OL(e,t,n,r,s,i,a,o,l,c){let u=i==="client",f=e.consumer??(u?"client":"server"),d=l&&i==="ssr",p=e.isBundled??(a||u&&o);if(e.define?.["process.env"]){let y=e.define["process.env"];if(typeof y=="object"){let m=Object.entries(y).find(([w,A])=>w.toLowerCase()==="path"&&!!A)?.[0];m&&s.warnOnce(j.default.yellow(`The \`define\` option contains an object with ${JSON.stringify(m)} for "process.env" key. It looks like you may have passed the entire \`process.env\` object to \`define\`, which can unintentionally expose all environment variables. This poses a security risk and is discouraged.`))}}let h=iE(e.resolve,t,n,s,f,d);return{input:nE(e.input),define:e.define,resolve:h,keepProcessEnv:e.keepProcessEnv??(d?!1:f==="server"),consumer:f,optimizeDeps:DL(e.optimizeDeps,h.preserveSymlinks,r,f,s),dev:rE(e.dev,i,f,c),build:Hw(e.build??{},s,f,p&&!a,e.input,d),isBundled:p,plugins:void 0,optimizeDepsPluginNames:void 0}}function BL(e){return{define:e.define,resolve:{...e.resolve,mainFields:void 0,conditions:void 0},dev:e.dev,build:e.build}}function sE(e,t,n,r){let s=[];if(n.includes("#")&&s.push("#"),n.includes("?")&&s.push("?"),n.includes("*")&&s.push("*"),s.length>0){let i=s.map(a=>`"${a}"`).join(" and ");r.warn(j.default.yellow(`${e} contains the ${i} ${s.length>1?"characters":"character"} (${j.default.cyan(n)}), which may not work when running Vite. Consider renaming the ${t} without the characters.`))}}var $L=[{find:/^\/?@vite\/env/,replacement:L.posix.join(Fe,re(oo))},{find:/^\/?@vite\/client/,replacement:L.posix.join(Fe,re(Ct))}];function iE(e,t,n,r,s,i){let a=vt({...Bt.resolve,mainFields:s===void 0||s==="client"||i?Cx:Ix,conditions:s===void 0||s==="client"||i?Rx:kx.filter(o=>o!=="browser"),builtins:e?.builtins??(s==="server"?i&&e?.noExternal===!0?[]:Wc:[])},e??{});return a.preserveSymlinks=n,a.alias=t,e?.browserField===!1&&a.mainFields.includes("browser")&&r.warn(j.default.yellow("`resolve.browserField` is set to false, but the option is removed in favour of the 'browser' string in `resolve.mainFields`. You may want to update `resolve.mainFields` to remove the 'browser' string and preserve the previous browser behaviour.")),a}function ML(e,t){let n=tc(Fg($L,e?.alias||Bt.resolve.alias)),r=e?.preserveSymlinks??Bt.resolve.preserveSymlinks;return n.some(s=>s.find==="/")&&t.warn(j.default.yellow("`resolve.alias` contains an alias that maps `/`. This is not recommended as it can cause unexpected behavior when resolving paths.")),n.some(s=>s.customResolver)&&t.warn(j.default.yellow("`resolve.alias` contains an alias with `customResolver` option. This is deprecated and will be removed in Vite 9. Please use a custom plugin with a resolveId hook and `enforce: 'pre'` instead.")),iE(e,n,r,t,void 0)}function DL(e,t,n,r,s){e?.rolldownOptions&&e?.rolldownOptions===e?.rollupOptions&&delete e?.rollupOptions;let i=vt({...Bt.optimizeDeps,disabled:void 0,noDiscovery:r!=="client",force:n??Bt.optimizeDeps.force},e??{});xt(i,"optimizeDeps");let a=i.rolldownOptions;if(i.esbuildOptions&&Object.keys(i.esbuildOptions).length>0){s.warn(j.default.yellow("You or a plugin you are using have set `optimizeDeps.esbuildOptions` but this option is now deprecated. Vite now uses Rolldown to optimize the dependencies. Please use `optimizeDeps.rolldownOptions` instead.")),a.resolve??={},a.output??={},a.transform??={};let o=(l,c)=>{c!==void 0&&a.resolve[l]===void 0&&(a.resolve[l]=c)};if(i.esbuildOptions.minify!==void 0&&a.output.minify===void 0&&(a.output.minify=i.esbuildOptions.minify),i.esbuildOptions.treeShaking!==void 0&&a.treeshake===void 0&&(a.treeshake=i.esbuildOptions.treeShaking),i.esbuildOptions.define!==void 0&&a.transform.define===void 0&&(a.transform.define=i.esbuildOptions.define),i.esbuildOptions.loader!==void 0){let l=i.esbuildOptions.loader;a.moduleTypes??={};for(let[c,u]of Object.entries(l))a.moduleTypes[c]===void 0&&u!=="copy"&&u!=="css"&&u!=="default"&&u!=="file"&&u!=="local-css"&&(a.moduleTypes[c]=u)}i.esbuildOptions.preserveSymlinks!==void 0&&a.resolve.symlinks===void 0&&(a.resolve.symlinks=!i.esbuildOptions.preserveSymlinks),o("extensions",i.esbuildOptions.resolveExtensions),o("mainFields",i.esbuildOptions.mainFields),o("conditionNames",i.esbuildOptions.conditions),i.esbuildOptions.keepNames!==void 0&&a.output.keepNames===void 0&&(a.output.keepNames=i.esbuildOptions.keepNames),i.esbuildOptions.platform!==void 0&&a.platform===void 0&&(a.platform=i.esbuildOptions.platform)}return i.esbuildOptions??={},i.esbuildOptions.preserveSymlinks??=t,a.resolve??={},a.resolve.symlinks??=!t,a.output??={},a.output.topLevelVar??=!0,i}async function PL(e){await Promise.all(Object.values(e.environments).map(async t=>{let n=await Ht([t.optimizeDeps.rolldownOptions?.plugins??[],t.optimizeDeps.rolldownOptions?.output?.plugins??[]]),r=[];for(let s of n)s&&"name"in s&&r.push(s.name);t.optimizeDepsPluginNames=r}))}function NL(e){e.optimizeDeps.esbuildOptions?.plugins&&e.optimizeDeps.esbuildOptions.plugins.length>0&&(e.optimizeDeps.rolldownOptions??={},e.optimizeDeps.rolldownOptions.plugins||=[],e.optimizeDeps.rolldownOptions.plugins.push(...e.optimizeDeps.esbuildOptions.plugins.map(t=>bL(t))))}function LL(e){return $c in e&&e[$c]}async function oE(e,t,n="development",r="development",s=!1,i=void 0,a=void 0){let o=e;o.build??={},xt(o.build,"build"),o.worker??={},xt(o.worker,"worker"),o.optimizeDeps??={},xt(o.optimizeDeps,"optimizeDeps"),o.ssr&&(o.ssr.optimizeDeps??={},xt(o.ssr.optimizeDeps,"ssr.optimizeDeps"));let l=[],c=e.mode||n;if(process.env.NODE_ENV===void 0){let ae=nx("NODE_ENV");ae!==void 0&&(process.env.NODE_ENV=ae)}let u=!!process.env.NODE_ENV,f=new Map;u||(process.env.NODE_ENV=r);let d={mode:c,command:t,isSsrBuild:t==="build"&&!!o.build?.ssr,isPreview:s},{configFile:p}=o;if(p!==!1){let ae=await QL(d,p,o.root,o.logLevel,o.customLogger,o.configLoader);ae&&(o=gt(ae.config,o),p=ae.path,l=ae.dependencies)}c=e.mode||o.mode||c,d.mode=c;let h=ae=>ae?ae.apply?typeof ae.apply=="function"?ae.apply({...o,mode:c},d):ae.apply===t:!0:!1,[y,m,w]=xm((await Ht(o.plugins||[])).filter(h)),A=t==="build",g=[...y,...m,...w];o=await Cm(o,g,d),o.environments??={},!o.environments.ssr&&(!A||o.ssr||o.build?.ssr)&&(o.environments={ssr:{},...o.environments}),o.environments.client||(o.environments={client:{},...o.environments});let E=_o(o.logLevel,{allowClearScreen:o.clearScreen,customLogger:o.customLogger}),v=g.find(ae=>ae.name==="vite-tsconfig-paths"||ae.name==="vite-plugin-tsconfig-paths");v&&E.warnOnce(j.default.yellow(`The plugin ${JSON.stringify(v.name)} is detected. Vite now supports tsconfig paths resolution natively via the ${j.default.bold("resolve.tsconfigPaths")} option. You can remove the plugin and set ${j.default.bold("resolve.tsconfigPaths: true")} in your Vite config instead.`)),process.versions.pnp&&E.warnOnce(j.default.yellow(`Using Yarn PnP with Vite is discouraged and PnP-specific bugs will no longer be actively worked on. Please switch to a different ${j.default.bold("nodeLinker")} mode or to a different package manager.`));let S=o.root?L.resolve(o.root):process.cwd();if(!o.resolve?.preserveSymlinks)try{S=cn(S)}catch{}let b=re(S);sE("The project root","directory",b,E);let _=o.environments.client;_.dev??={};let C=o.ssr?.optimizeDeps??{},x=o.environments.ssr,T=o.server?.warmup;if(T?.clientFiles&&(_.dev.warmup=T.clientFiles),T?.ssrFiles&&(x??={},x.dev??={},x.dev.warmup=T.ssrFiles),x&&(x.optimizeDeps=gt(C,x.optimizeDeps??{}),x.resolve=gt({resolve:{conditions:o.ssr?.resolve?.conditions,externalConditions:o.ssr?.resolve?.externalConditions,mainFields:o.ssr?.resolve?.mainFields,external:o.ssr?.external,noExternal:o.ssr?.noExternal}},{resolve:x.resolve??{}}).resolve),o.build?.ssrEmitAssets!==void 0&&(x??={},x.build??={},x.build.emitAssets=o.build.ssrEmitAssets),!o.environments.client||!o.environments.ssr&&!A)throw new Error("Required environments configuration were stripped out in the config hook");let k=BL(o),O={...k,input:o.input,resolve:o.resolve,optimizeDeps:o.optimizeDeps},R={...k,dev:{...k.dev,createEnvironment:void 0,warmup:void 0},build:{...k.build,createEnvironment:void 0}};for(let ae of Object.keys(o.environments))o.environments[ae]=gt(ae==="client"?O:es(R),o.environments[ae]);await JL(o.environments,g,E,d,o.ssr?.target==="webworker");let I=t==="serve"&&!!o.experimental?.bundledDev;o.resolve??={},o.resolve.conditions=o.environments.client.resolve?.conditions,o.resolve.mainFields=o.environments.client.resolve?.mainFields;let M=ML(o.resolve,E),B={};for(let ae of Object.keys(o.environments))B[ae]=OL(o.environments[ae],M.alias,M.preserveSymlinks,e.forceOptimizeDeps,E,ae,A,I,o.ssr?.target==="webworker",o.server?.preTransformRequests);let U=B.client.optimizeDeps,V=rE(o.dev,void 0,void 0),te=Hw(o.build??{},E,void 0,I,o.input),Q=vL({...o.ssr,external:B.ssr?.resolve.external,noExternal:B.ssr?.resolve.noExternal,optimizeDeps:B.ssr?.optimizeDeps,resolve:{...o.ssr?.resolve,conditions:B.ssr?.resolve.conditions,externalConditions:B.ssr?.resolve.externalConditions}},M.preserveSymlinks);o.envFile===!1&&E.warn(j.default.yellow("The `envFile` option is deprecated, please use `envDir: false` instead."));let Z=o.envFile===!1?!1:o.envDir;Z!==!1&&(Z=o.envDir?re(L.resolve(b,o.envDir)):b);let F=WR(c,Z,ty(o)),G=process.env.VITE_USER_NODE_ENV;!u&&G&&(G==="development"?process.env.NODE_ENV="development":E.warn(`NODE_ENV=${G} is not supported in the .env file. Only NODE_ENV=development is supported to create a development build of your project. If you need to set process.env.NODE_ENV, you can set it in the Vite config instead.`));let P=process.env.NODE_ENV==="production",z=o.base===""||o.base==="./"?!A||o.build?.ssr?"/":"./":FL(o.base,A,E),H=Jt(b,f)?.dir,$;if(o.cacheDir)$=L.resolve(b,o.cacheDir);else if(H)$=L.join(H,"node_modules/.vite");else{let ae=L.join(b,"node_modules");$=pe.existsSync(ae)?L.join(ae,".vite"):L.join(b,".vite")}$=re($);let J=o.assetsInclude&&(!Array.isArray(o.assetsInclude)||o.assetsInclude.length)?hn(o.assetsInclude):()=>!1,{publicDir:D}=o,N=D!==!1&&D!==""?re(L.resolve(b,typeof D=="string"?D:Bt.publicDir)):"",K=nE(o.input),ee=await FM(b,o.server,E),X=GN(o.builder),se=z,ie=new Sn({...bn,watchMode:t==="serve"&&!s||t==="build"&&!!te.watch},E),oe,me=o.worker?.plugins;Array.isArray(me)&&(me=()=>o.worker?.plugins,E.warn(j.default.yellow(`worker.plugins is now a function that returns an array of plugins. Please update your Vite config accordingly.
|
|
489
|
-
`)));let Y=async function(ae){let Ae=(await Ht(me?.()||[])).filter(h),_e=gt({},o),[Se,we,Ce]=xm(Ae),Pe=[...Se,...we,...Ce];_e=await Cm(_e,Pe,d);let Ne={..._e,...oe,isWorker:!0,mainConfig:oe,bundleChain:ae};return Ne.plugins=await qh(Ne,Se,we,Ce),await Promise.all(xc(Ne.plugins).getSortedPluginHooks("configResolved").map(Is=>Is.call(ie,Ne))),Ne.environments={...Ne.environments,client:{...Ne.environments.client,plugins:await Ep(new Dr("client",Ne))}},Ne},ne={format:o.worker?.format||"iife",plugins:Y,rollupOptions:o.worker?.rollupOptions||{},rolldownOptions:o.worker?.rolldownOptions};xt(ne,"worker");let fe=Me(z),ye=cL(o.preview,ee),de=SM(ee,ye);Array.isArray(ee.allowedHosts)&&ee.allowedHosts.push(...de),Array.isArray(ye.allowedHosts)&&ye.allowedHosts.push(...de);let ve=o.oxc;o.esbuild?o.oxc?E.warn(j.default.yellow("Both esbuild and oxc options were set. oxc options will be used and esbuild options will be ignored.")+` The following esbuild options were set: \`${Wn(o.esbuild)}\``):ve=tR(o.esbuild,E):o.esbuild===!1&&o.oxc!==!1&&E.warn(j.default.yellow("`esbuild` option is set to false, but `oxc` option was not set to false. `esbuild: false` does not have effect any more. If you want to disable the default transformation, which is now handled by Oxc, please set `oxc: false` instead."));let q=vt(Bt.experimental,o.experimental??{});t==="serve"&&q.bundledDev&&(q.renderBuiltUrl=void 0);let W=await kL(o.devtools,ee.host,E);oe={configFile:p?re(p):void 0,configFileDependencies:l.map(ae=>re(L.resolve(ae))),inlineConfig:e,root:b,base:fe,decodedBase:jL(fe),rawBase:z,publicDir:N,cacheDir:$,command:t,mode:c,isWorker:!1,mainConfig:null,bundleChain:[],isProduction:P,plugins:g,css:$B(o.css),json:vt(Bt.json,o.json??{}),esbuild:o.esbuild===!1?!1:{jsxDev:!P,charset:"utf8",legalComments:"none",...o.esbuild},oxc:ve===!1?!1:{...ve,jsx:typeof ve?.jsx=="string"?ve.jsx:{development:ve?.jsx?.development??!P,...ve?.jsx}},server:ee,builder:X,preview:ye,envDir:Z,env:{...F,BASE_URL:se,MODE:c,DEV:!P,PROD:P},assetsInclude(ae){return Jl.test(ae)||J(ae)},rawAssetsInclude:o.assetsInclude?He(o.assetsInclude):[],logger:E,packageCache:f,worker:ne,appType:o.appType??"spa",experimental:q,future:o.future==="warn"?{removePluginHookHandleHotUpdate:"warn",removePluginHookSsrArgument:"warn",removeServerModuleGraph:"warn",removeServerReloadModule:"warn",removeServerPluginContainer:"warn",removeServerHot:"warn",removeServerTransformRequest:"warn",removeServerWarmupRequest:"warn",removeSsrLoadModule:"warn"}:o.future,ssr:Q,input:K,optimizeDeps:U,resolve:M,dev:V,build:te,devtools:W,environments:B,webSocketToken:Buffer.from(to.getRandomValues(new Uint8Array(9))).toString("base64url"),getSortedPlugins:void 0,getSortedPluginHooks:void 0,createResolver(ae){let Ae=Yy(this,ae),_e=new Dr("client",this),Se;return async(we,Ce,Pe,Ne)=>(Ne&&(Se??=new Dr("ssr",this)),await Ae(Ne?Se:_e,we,Ce,Pe))},fsDenyGlob:(0,Pt.default)(ee.fs.deny.map(ae=>ae.includes("/")?ae:`**/${ae}`),{matchBase:!1,nocase:!0,dot:!0}),safeModulePaths:new Set,[$c]:!0},oe={...o,...oe},i?.(oe);let ue=await qh(oe,y,m,w);a?.(ue),oe.plugins=ue,Object.assign(oe,xc(oe.plugins)),await Promise.all(oe.getSortedPluginHooks("configResolved").map(ae=>ae.call(ie,oe)));for(let ae of Object.keys(oe.environments))oe.environments[ae].plugins=await Ep(new Dr(ae,oe));Im(oe,oe.optimizeDeps),Im(oe,oe.ssr.optimizeDeps,"ssr."),!oe.builder?.sharedConfigBuild&&oe.environments.ssr&&(oe.environments.ssr.build.emitAssets=oe.build.ssrEmitAssets||oe.build.emitAssets),NL(oe),await PL(oe),Bc?.("using resolved config: %O",{...oe,plugins:oe.plugins.map(ae=>ae.name),worker:{...oe.worker,plugins:"() => plugins"}});let ge=o.build?.rolldownOptions?.output??[];if(Array.isArray(ge)){let ae=ge.map(Ae=>Ae.assetFileNames);if(ae.length>1){let Ae=ae[0];ae.some(_e=>_e!==Ae)&&oe.logger.warn(j.default.yellow(`
|
|
490
|
-
assetFileNames isn't equal for every build.rolldownOptions.output. A single pattern across all outputs is supported by Vite.
|
|
491
|
-
`))}}o.experimental?.renderBuiltUrl&&o.build?.chunkImportMap&&oe.logger.warn(j.default.yellow("The `build.chunkImportMap` option and the `experimental.renderBuiltUrl` option are both enabled. The combination of these two options is not supported and may result in unexpected behavior.")),(o.legacy?.buildSsrCjsExternalHeuristics||o.ssr?.format==="cjs")&&oe.logger.warn(j.default.yellow(`
|
|
492
|
-
(!) Experimental legacy.buildSsrCjsExternalHeuristics and ssr.format were be removed in Vite 5.
|
|
493
|
-
The only SSR Output format is ESM. Find more information at https://github.com/vitejs/vite/discussions/13816.
|
|
494
|
-
`));let be=re(L.resolve(oe.root,oe.build.outDir));return(En(be,oe.root)||be===oe.root)&&oe.logger.warn(j.default.yellow(`
|
|
495
|
-
(!) build.outDir must not be the same directory of root or a parent directory of root as this could cause Vite to overwriting source files with build outputs.
|
|
496
|
-
`)),oe}function FL(e=Bt.base,t,n){if(e[0]===".")return n.warn(j.default.yellow(j.default.bold(`(!) invalid "base" option: "${e}". The value can only be an absolute URL, "./", or an empty string.`))),"/";let r=ft(e);return!r&&e[0]!=="/"&&n.warn(j.default.yellow(j.default.bold('(!) "base" option should start with a slash.'))),(!t||!r)&&(e=new URL(e,"http://vite.dev").pathname,e[0]!=="/"&&(e="/"+e)),e}function jL(e){try{return decodeURI(e)}catch{throw new Error('The value passed to "base" option was malformed. It should be a valid URL.')}}function xm(e){let t=[],n=[],r=[];return e&&e.flat().forEach(s=>{s.enforce==="pre"?t.push(s):s.enforce==="post"?n.push(s):r.push(s)}),[t,r,n]}async function QL(e,t,n=process.cwd(),r,s,i="bundle"){if(i!=="bundle"&&i!=="runner"&&i!=="native")throw new Error(`Unsupported configLoader: ${i}. Accepted values are 'bundle', 'runner', and 'native'.`);let a=Je.now(),o=()=>`${(Je.now()-a).toFixed(2)}ms`,l;if(t)l=L.resolve(t);else for(let c of Ox){let u=L.resolve(n,c);if(pe.existsSync(u)){l=u;break}}if(!l)return Bc?.("no config file found."),null;try{let{configExport:c,dependencies:u}=await(i==="bundle"?WL(l,n,r,s):i==="runner"?HL(l):UL(l));Bc?.(`config file loaded in ${o()}`);let f=await(typeof c=="function"?c(e):c);if(!ke(f))throw new Error("config must export or return an object.");return{path:re(l),config:f,dependencies:u}}catch(c){let u=_o(r,{customLogger:s});throw sE("The config path","file",l,u),u.error(j.default.red(`failed to load config from ${l}`),{error:c}),c}}async function UL(e){let t=mx(tt(e).href);if(t){let{result:n,dependencies:r}=await t;return{configExport:n.default,dependencies:r}}return{configExport:(await import(tt(e).href+"?t="+Date.now())).default,dependencies:[]}}async function HL(e){let{module:t,dependencies:n}=await _L(e);return{configExport:t.default,dependencies:n}}async function WL(e,t,n,r){let s=typeof process.versions.deno=="string"||yo(e),i=await GL(e,s),a=await zL(e,i.code,s);return i.nativeIncompatibilities.length>0&&_o(n,{customLogger:r}).warn(AL(i.nativeIncompatibilities,t)),{configExport:a,dependencies:i.dependencies}}async function GL(e,t){let n=!1,r=L.dirname(e),s="__vite_injected_original_dirname",i="__vite_injected_original_filename",a="__vite_injected_original_import_meta_url",o="__vite_injected_original_import_meta_resolve",l=/import\.meta\s*\.\s*resolve/,c=/\.[cm]?[jt]s$/,u=[],f=await $s({input:e,platform:"node",resolve:{mainFields:["main"]},transform:{define:{__dirname:s,__filename:i,"import.meta.url":a,"import.meta.dirname":s,"import.meta.filename":i,"import.meta.resolve":o,"import.meta.main":"false"}},treeshake:!1,tsconfig:!1,plugins:[!process.env.VITE_CONFIG_NATIVE_IGNORE_WARNING&&wL(u),{name:"externalize-deps",resolveId:{filter:{id:/^[^.#].*/},handler(m,w,{kind:A}){if(!w||L.isAbsolute(m)||yg(m))return;if(_0(m)||m.startsWith("npm:"))return{id:m,external:!0};let g=t||A==="dynamic-import",E;try{E=Yn(m,w,{root:r,isRequire:!g})}catch(v){if(!g){let S=!1;try{S=!!Yn(m,w,{root:r})}catch{}if(S)throw new Error(`Failed to resolve ${JSON.stringify(m)}. This package is ESM only but it was tried to load by \`require\`. See https://vite.dev/guide/troubleshooting.html#this-package-is-esm-only for more details.`)}throw v}if(E)return E.endsWith(".json")?E:(E&&g&&(E=tt(E).href),{id:E,external:!0})}}},{name:"inject-file-scope-variables",transform:{filter:{id:c},handler(m,w){let A=`const ${s} = ${JSON.stringify(L.dirname(w))};const ${i} = ${JSON.stringify(w)};const ${a} = ${JSON.stringify(tt(w).href)};`;l.test(m)&&(t?(n||(n=!0,_x()),A+=`const ${o} = (specifier, importer = ${a}) => (${bx})(specifier, importer);`):A+=`const ${o} = (specifier, importer = ${a}) => { throw new Error('import.meta.resolve is not supported in CJS config files') };`);let g;if(m.startsWith("#!")){let E=ys(m),v=m.slice(0,E);g=v+(Gg.test(v)?"":`
|
|
497
|
-
`)+A+m.slice(E)}else g=A+m;return{code:g,map:null}}}}]}),d=await f.generate({format:t?"esm":"cjs",sourcemap:"inline",sourcemapPathTransform(m,w){return L.resolve(L.dirname(w),m)},codeSplitting:!1});await f.close();let p=d.output.find(m=>m.type==="chunk"&&m.isEntry),h=Object.fromEntries(d.output.flatMap(m=>m.type==="chunk"?[[m.fileName,m]]:[])),y=new Set;return Mc(h,p.fileName,y),{code:p.code,dependencies:[...y].filter(m=>!m.startsWith("\0")),nativeIncompatibilities:u}}function Mc(e,t,n,r=new Set){if(r.has(t))return;r.add(t);let s=e[t];if(s){for(let i of s.moduleIds)n.add(i);for(let i of s.imports)Mc(e,i,n,r);for(let i of s.dynamicImports)Mc(e,i,n,r)}}var Zt=Zn(import.meta.url);async function zL(e,t,n){if(n){let r=typeof process.versions.deno=="string"?void 0:f0(L.dirname(e)),s=r?L.resolve(r,".vite-temp"):void 0;if(s)try{await Ee.mkdir(s,{recursive:!0})}catch(l){if(l.code==="EACCES")s=void 0;else throw l}let i=`timestamp-${Date.now()}-${Math.random().toString(16).slice(2)}`,a=s?L.resolve(s,`${L.basename(e)}.${i}.mjs`):`${e}.${i}.mjs`,o=s??a;Nc(o),Nm(o),await Ee.writeFile(a,t);try{return(await import(tt(a).href)).default}finally{pe.unlink(a,()=>{})}}else{let r=L.extname(e),s=await CL(e),i=r in Zt.extensions?r:".js",a=Zt.extensions[i];Zt.extensions[i]=(l,c)=>{c===s?l._compile(t,c):a(l,c)},delete Zt.cache[Zt.resolve(e)];let o=Zt(e);return Zt.extensions[i]=a,o.__esModule?o.default:o}}async function Cm(e,t,n){let r=e,s=_o(e.logLevel,{allowClearScreen:e.clearScreen,customLogger:e.customLogger}),i=new Sn(bn,s);for(let a of Ru("config",t)){let o=a.config,l=await Ze(o).call(i,r,n);l&&l!==r&&(oI(l)&&i.warn(`Both \`rollupOptions\` and \`rolldownOptions\` were specified by ${JSON.stringify(a.name)} plugin. \`rollupOptions\` specified by that plugin will be ignored.`),l.esbuild&&i.warn(`\`esbuild\` option was specified by ${JSON.stringify(a.name)} plugin. This option is deprecated, please use \`oxc\` instead.`),l.optimizeDeps?.esbuildOptions&&i.warn(`\`optimizeDeps.esbuildOptions\` option was specified by ${JSON.stringify(a.name)} plugin. This option is deprecated, please use \`optimizeDeps.rolldownOptions\` instead.`),r=gt(r,l))}return r}async function JL(e,t,n,r,s){let i=new Sn(bn,n),a=Object.keys(e);for(let o of Ru("configEnvironment",t)){let l=o.configEnvironment,c=Ze(l);for(let u of a){let f=await c.call(i,u,e[u],{...r,isSsrTargetWebworker:s&&u==="ssr"});f&&(e[u]=gt(e[u],f))}}}function Im(e,t,n=""){let r=t.disabled;if(r!==void 0)if(r===!0||r==="dev"){let s=e.build.commonjsOptions.include,i=Array.isArray(s)&&s.length===0;t.noDiscovery=!0,t.include=void 0,i&&(e.build.commonjsOptions.include=void 0),e.logger.warn(j.default.yellow(`(!) Experimental ${n}optimizeDeps.disabled and deps pre-bundling during build were removed in Vite 5.1.
|
|
498
|
-
To disable the deps optimizer, set ${n}optimizeDeps.noDiscovery to true and ${n}optimizeDeps.include as undefined or empty.
|
|
499
|
-
Please remove ${n}optimizeDeps.disabled from your config.
|
|
500
|
-
${i?"Empty config.build.commonjsOptions.include will be ignored to support CJS during build. This config should also be removed.":""}
|
|
501
|
-
`))}else(r===!1||r==="build")&&e.logger.warn(j.default.yellow(`(!) Experimental ${n}optimizeDeps.disabled and deps pre-bundling during build were removed in Vite 5.1.
|
|
502
|
-
Setting it to ${r} now has no effect.
|
|
503
|
-
Please remove ${n}optimizeDeps.disabled from your config.
|
|
504
|
-
`))}export{le as a,ce as b,Xj as c};
|
|
505
|
-
/*! Bundled license information:
|
|
506
|
-
|
|
507
|
-
vite/dist/node/chunks/node.js:
|
|
508
|
-
(*!
|
|
509
|
-
* encodeurl
|
|
510
|
-
* Copyright(c) 2016 Douglas Christopher Wilson
|
|
511
|
-
* MIT Licensed
|
|
512
|
-
*)
|
|
513
|
-
(*!
|
|
514
|
-
* escape-html
|
|
515
|
-
* Copyright(c) 2012-2013 TJ Holowaychuk
|
|
516
|
-
* Copyright(c) 2015 Andreas Lubbe
|
|
517
|
-
* Copyright(c) 2015 Tiancheng "Timothy" Gu
|
|
518
|
-
* MIT Licensed
|
|
519
|
-
*)
|
|
520
|
-
(*!
|
|
521
|
-
* ee-first
|
|
522
|
-
* Copyright(c) 2014 Jonathan Ong
|
|
523
|
-
* MIT Licensed
|
|
524
|
-
*)
|
|
525
|
-
(*!
|
|
526
|
-
* on-finished
|
|
527
|
-
* Copyright(c) 2013 Jonathan Ong
|
|
528
|
-
* Copyright(c) 2014 Douglas Christopher Wilson
|
|
529
|
-
* MIT Licensed
|
|
530
|
-
*)
|
|
531
|
-
(*!
|
|
532
|
-
* parseurl
|
|
533
|
-
* Copyright(c) 2014 Jonathan Ong
|
|
534
|
-
* Copyright(c) 2014-2017 Douglas Christopher Wilson
|
|
535
|
-
* MIT Licensed
|
|
536
|
-
*)
|
|
537
|
-
(*!
|
|
538
|
-
* statuses
|
|
539
|
-
* Copyright(c) 2014 Jonathan Ong
|
|
540
|
-
* Copyright(c) 2016 Douglas Christopher Wilson
|
|
541
|
-
* MIT Licensed
|
|
542
|
-
*)
|
|
543
|
-
(*!
|
|
544
|
-
* unpipe
|
|
545
|
-
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
546
|
-
* MIT Licensed
|
|
547
|
-
*)
|
|
548
|
-
(*!
|
|
549
|
-
* finalhandler
|
|
550
|
-
* Copyright(c) 2014-2017 Douglas Christopher Wilson
|
|
551
|
-
* MIT Licensed
|
|
552
|
-
*)
|
|
553
|
-
(*!
|
|
554
|
-
* connect
|
|
555
|
-
* Copyright(c) 2010 Sencha Inc.
|
|
556
|
-
* Copyright(c) 2011 TJ Holowaychuk
|
|
557
|
-
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
558
|
-
* MIT Licensed
|
|
559
|
-
*)
|
|
560
|
-
(*
|
|
561
|
-
object-assign
|
|
562
|
-
(c) Sindre Sorhus
|
|
563
|
-
@license MIT
|
|
564
|
-
*)
|
|
565
|
-
(*!
|
|
566
|
-
* vary
|
|
567
|
-
* Copyright(c) 2014-2017 Douglas Christopher Wilson
|
|
568
|
-
* MIT Licensed
|
|
569
|
-
*)
|
|
570
|
-
(*!
|
|
571
|
-
* normalize-path <https://github.com/jonschlinkert/normalize-path>
|
|
572
|
-
*
|
|
573
|
-
* Copyright (c) 2014-2018, Jon Schlinkert.
|
|
574
|
-
* Released under the MIT License.
|
|
575
|
-
*)
|
|
576
|
-
(*!
|
|
577
|
-
* is-extglob <https://github.com/jonschlinkert/is-extglob>
|
|
578
|
-
*
|
|
579
|
-
* Copyright (c) 2014-2016, Jon Schlinkert.
|
|
580
|
-
* Licensed under the MIT License.
|
|
581
|
-
*)
|
|
582
|
-
(*!
|
|
583
|
-
* is-glob <https://github.com/jonschlinkert/is-glob>
|
|
584
|
-
*
|
|
585
|
-
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
586
|
-
* Released under the MIT License.
|
|
587
|
-
*)
|
|
588
|
-
(*!
|
|
589
|
-
* is-number <https://github.com/jonschlinkert/is-number>
|
|
590
|
-
*
|
|
591
|
-
* Copyright (c) 2014-present, Jon Schlinkert.
|
|
592
|
-
* Released under the MIT License.
|
|
593
|
-
*)
|
|
594
|
-
(*!
|
|
595
|
-
* to-regex-range <https://github.com/micromatch/to-regex-range>
|
|
596
|
-
*
|
|
597
|
-
* Copyright (c) 2015-present, Jon Schlinkert.
|
|
598
|
-
* Released under the MIT License.
|
|
599
|
-
*)
|
|
600
|
-
(*!
|
|
601
|
-
* fill-range <https://github.com/jonschlinkert/fill-range>
|
|
602
|
-
*
|
|
603
|
-
* Copyright (c) 2014-present, Jon Schlinkert.
|
|
604
|
-
* Licensed under the MIT License.
|
|
605
|
-
*)
|
|
606
|
-
|
|
607
|
-
vite/dist/node/chunks/node.js:
|
|
608
|
-
(*!
|
|
609
|
-
* etag
|
|
610
|
-
* Copyright(c) 2014-2016 Douglas Christopher Wilson
|
|
611
|
-
* MIT Licensed
|
|
612
|
-
*)
|
|
613
|
-
|
|
614
|
-
vite/dist/node/chunks/node.js:
|
|
615
|
-
(**
|
|
616
|
-
* Autoload Config for PostCSS
|
|
617
|
-
*
|
|
618
|
-
* @author Michael Ciniawsky @michael-ciniawsky <michael.ciniawsky@gmail.com>
|
|
619
|
-
* @license MIT
|
|
620
|
-
*
|
|
621
|
-
* @module postcss-load-config
|
|
622
|
-
* @version 2.1.0
|
|
623
|
-
*
|
|
624
|
-
* @requires comsiconfig
|
|
625
|
-
* @requires ./options
|
|
626
|
-
* @requires ./plugins
|
|
627
|
-
*)
|
|
628
|
-
*/
|