Files
BlogPosts/.obsidian/plugins/i18n/main.js

391 lines
2.4 MiB

var Kme=Object.create;var VC=Object.defineProperty;var Wme=Object.getOwnPropertyDescriptor;var Xme=Object.getOwnPropertyNames;var Yme=Object.getPrototypeOf,Jme=Object.prototype.hasOwnProperty;var de=(e,t)=>()=>(e&&(t=e(e=0)),t);var ae=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),xl=(e,t)=>{for(var r in t)VC(e,r,{get:t[r],enumerable:!0})},SU=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Xme(t))!Jme.call(e,a)&&a!==r&&VC(e,a,{get:()=>t[a],enumerable:!(n=Wme(t,a))||n.enumerable});return e};var A=(e,t,r)=>(r=e!=null?Kme(Yme(e)):{},SU(t||!e||!e.__esModule?VC(r,"default",{value:e,enumerable:!0}):r,e)),Zme=e=>SU(VC({},"__esModule",{value:!0}),e);var TU=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)};var ds=(e,t,r)=>(TU(e,t,"read from private field"),r?r.call(e):t.get(e)),wU=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},C_=(e,t,r,n)=>(TU(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r);function che(){let e=[],t=Object.create(null),r;return t.get=(n,a)=>(r?.revoke?.(),a===FU?e:(e.push(a),r=Proxy.revocable(n,t),r.proxy)),Proxy.revocable(Object.create(null),t).proxy}function KC(e,t){let{[FU]:r}=e(che());return r.join(t?.keySeparator??".")}var ir,Jv,CU,Qme,ehe,PU,EU,Zv,IU,the,HC,rhe,MU,ry,nhe,ahe,I_,ihe,she,ohe,A_,Qv,lhe,ny,Hc,ay,GC,OU,FU,AU,P_,iy,WC,NU,kU,N_,_U,E_,XC,uhe,LU,dhe,k_,fhe,__,RU,DU,qC,phe,Dm,Gi,But,$ut,jut,zut,Uut,Vut,qut,Hut,Gut,Kut,Wut,Xut,Yut,Jut,L_=de(()=>{ir=e=>typeof e=="string",Jv=()=>{let e,t,r=new Promise((n,a)=>{e=n,t=a});return r.resolve=e,r.reject=t,r},CU=e=>e==null?"":""+e,Qme=(e,t,r)=>{e.forEach(n=>{t[n]&&(r[n]=t[n])})},ehe=/###/g,PU=e=>e&&e.indexOf("###")>-1?e.replace(ehe,"."):e,EU=e=>!e||ir(e),Zv=(e,t,r)=>{let n=ir(t)?t.split("."):t,a=0;for(;a<n.length-1;){if(EU(e))return{};let i=PU(n[a]);!e[i]&&r&&(e[i]=new r),Object.prototype.hasOwnProperty.call(e,i)?e=e[i]:e={},++a}return EU(e)?{}:{obj:e,k:PU(n[a])}},IU=(e,t,r)=>{let{obj:n,k:a}=Zv(e,t,Object);if(n!==void 0||t.length===1){n[a]=r;return}let i=t[t.length-1],s=t.slice(0,t.length-1),o=Zv(e,s,Object);for(;o.obj===void 0&&s.length;)i=`${s[s.length-1]}.${i}`,s=s.slice(0,s.length-1),o=Zv(e,s,Object),o?.obj&&typeof o.obj[`${o.k}.${i}`]<"u"&&(o.obj=void 0);o.obj[`${o.k}.${i}`]=r},the=(e,t,r,n)=>{let{obj:a,k:i}=Zv(e,t,Object);a[i]=a[i]||[],a[i].push(r)},HC=(e,t)=>{let{obj:r,k:n}=Zv(e,t);if(r&&Object.prototype.hasOwnProperty.call(r,n))return r[n]},rhe=(e,t,r)=>{let n=HC(e,r);return n!==void 0?n:HC(t,r)},MU=(e,t,r)=>{for(let n in t)n!=="__proto__"&&n!=="constructor"&&(n in e?ir(e[n])||e[n]instanceof String||ir(t[n])||t[n]instanceof String?r&&(e[n]=t[n]):MU(e[n],t[n],r):e[n]=t[n]);return e},ry=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),nhe={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"},ahe=e=>ir(e)?e.replace(/[&<>"'\/]/g,t=>nhe[t]):e,I_=class{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){let r=this.regExpMap.get(t);if(r!==void 0)return r;let n=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,n),this.regExpQueue.push(t),n}},ihe=[" ",",","?","!",";"],she=new I_(20),ohe=(e,t,r)=>{t=t||"",r=r||"";let n=ihe.filter(s=>t.indexOf(s)<0&&r.indexOf(s)<0);if(n.length===0)return!0;let a=she.getRegExp(`(${n.map(s=>s==="?"?"\\?":s).join("|")})`),i=!a.test(e);if(!i){let s=e.indexOf(r);s>0&&!a.test(e.substring(0,s))&&(i=!0)}return i},A_=(e,t,r=".")=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;let n=t.split(r),a=e;for(let i=0;i<n.length;){if(!a||typeof a!="object")return;let s,o="";for(let l=i;l<n.length;++l)if(l!==i&&(o+=r),o+=n[l],s=a[o],s!==void 0){if(["string","number","boolean"].indexOf(typeof s)>-1&&l<n.length-1)continue;i+=l-i+1;break}a=s}return a},Qv=e=>e?.replace("_","-"),lhe={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console?.[e]?.apply?.(console,t)}},ny=class{constructor(t,r={}){this.init(t,r)}init(t,r={}){this.prefix=r.prefix||"i18next:",this.logger=t||lhe,this.options=r,this.debug=r.debug}log(...t){return this.forward(t,"log","",!0)}warn(...t){return this.forward(t,"warn","",!0)}error(...t){return this.forward(t,"error","")}deprecate(...t){return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(t,r,n,a){return a&&!this.debug?null:(ir(t[0])&&(t[0]=`${n}${this.prefix} ${t[0]}`),this.logger[r](t))}create(t){return new ny(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new ny(this.logger,t)}},Hc=new ny,ay=class{constructor(){this.observers={}}on(t,r){return t.split(" ").forEach(n=>{this.observers[n]||(this.observers[n]=new Map);let a=this.observers[n].get(r)||0;this.observers[n].set(r,a+1)}),this}off(t,r){if(this.observers[t]){if(!r){delete this.observers[t];return}this.observers[t].delete(r)}}emit(t,...r){this.observers[t]&&Array.from(this.observers[t].entries()).forEach(([a,i])=>{for(let s=0;s<i;s++)a(...r)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([a,i])=>{for(let s=0;s<i;s++)a.apply(a,[t,...r])})}},GC=class extends ay{constructor(t,r={ns:["translation"],defaultNS:"translation"}){super(),this.data=t||{},this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){let r=this.options.ns.indexOf(t);r>-1&&this.options.ns.splice(r,1)}getResource(t,r,n,a={}){let i=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator,s=a.ignoreJSONStructure!==void 0?a.ignoreJSONStructure:this.options.ignoreJSONStructure,o;t.indexOf(".")>-1?o=t.split("."):(o=[t,r],n&&(Array.isArray(n)?o.push(...n):ir(n)&&i?o.push(...n.split(i)):o.push(n)));let l=HC(this.data,o);return!l&&!r&&!n&&t.indexOf(".")>-1&&(t=o[0],r=o[1],n=o.slice(2).join(".")),l||!s||!ir(n)?l:A_(this.data?.[t]?.[r],n,i)}addResource(t,r,n,a,i={silent:!1}){let s=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,o=[t,r];n&&(o=o.concat(s?n.split(s):n)),t.indexOf(".")>-1&&(o=t.split("."),a=r,r=o[1]),this.addNamespaces(r),IU(this.data,o,a),i.silent||this.emit("added",t,r,n,a)}addResources(t,r,n,a={silent:!1}){for(let i in n)(ir(n[i])||Array.isArray(n[i]))&&this.addResource(t,r,i,n[i],{silent:!0});a.silent||this.emit("added",t,r,n)}addResourceBundle(t,r,n,a,i,s={silent:!1,skipCopy:!1}){let o=[t,r];t.indexOf(".")>-1&&(o=t.split("."),a=n,n=r,r=o[1]),this.addNamespaces(r);let l=HC(this.data,o)||{};s.skipCopy||(n=JSON.parse(JSON.stringify(n))),a?MU(l,n,i):l={...l,...n},IU(this.data,o,l),s.silent||this.emit("added",t,r,n)}removeResourceBundle(t,r){this.hasResourceBundle(t,r)&&delete this.data[t][r],this.removeNamespaces(r),this.emit("removed",t,r)}hasResourceBundle(t,r){return this.getResource(t,r)!==void 0}getResourceBundle(t,r){return r||(r=this.options.defaultNS),this.getResource(t,r)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){let r=this.getDataByLanguage(t);return!!(r&&Object.keys(r)||[]).find(a=>r[a]&&Object.keys(r[a]).length>0)}toJSON(){return this.data}},OU={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,r,n,a){return e.forEach(i=>{t=this.processors[i]?.process(t,r,n,a)??t}),t}},FU=Symbol("i18next/PATH_KEY");AU={},P_=e=>!ir(e)&&typeof e!="boolean"&&typeof e!="number",iy=class extends ay{constructor(t,r={}){super(),Qme(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Hc.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t,r={interpolation:{}}){let n={...r};if(t==null)return!1;let a=this.resolve(t,n);if(a?.res===void 0)return!1;let i=P_(a.res);return!(n.returnObjects===!1&&i)}extractFromKey(t,r){let n=r.nsSeparator!==void 0?r.nsSeparator:this.options.nsSeparator;n===void 0&&(n=":");let a=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator,i=r.ns||this.options.defaultNS||[],s=n&&t.indexOf(n)>-1,o=!this.options.userDefinedKeySeparator&&!r.keySeparator&&!this.options.userDefinedNsSeparator&&!r.nsSeparator&&!ohe(t,n,a);if(s&&!o){let l=t.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:t,namespaces:ir(i)?[i]:i};let c=t.split(n);(n!==a||n===a&&this.options.ns.indexOf(c[0])>-1)&&(i=c.shift()),t=c.join(a)}return{key:t,namespaces:ir(i)?[i]:i}}translate(t,r,n){let a=typeof r=="object"?{...r}:r;if(typeof a!="object"&&this.options.overloadTranslationOptionHandler&&(a=this.options.overloadTranslationOptionHandler(arguments)),typeof a=="object"&&(a={...a}),a||(a={}),t==null)return"";typeof t=="function"&&(t=KC(t,{...this.options,...a})),Array.isArray(t)||(t=[String(t)]);let i=a.returnDetails!==void 0?a.returnDetails:this.options.returnDetails,s=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator,{key:o,namespaces:l}=this.extractFromKey(t[t.length-1],a),c=l[l.length-1],u=a.nsSeparator!==void 0?a.nsSeparator:this.options.nsSeparator;u===void 0&&(u=":");let d=a.lng||this.language,f=a.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d?.toLowerCase()==="cimode")return f?i?{res:`${c}${u}${o}`,usedKey:o,exactUsedKey:o,usedLng:d,usedNS:c,usedParams:this.getUsedParamsDetails(a)}:`${c}${u}${o}`:i?{res:o,usedKey:o,exactUsedKey:o,usedLng:d,usedNS:c,usedParams:this.getUsedParamsDetails(a)}:o;let p=this.resolve(t,a),m=p?.res,h=p?.usedKey||o,x=p?.exactUsedKey||o,g=["[object Number]","[object Function]","[object RegExp]"],y=a.joinArrays!==void 0?a.joinArrays:this.options.joinArrays,b=!this.i18nFormat||this.i18nFormat.handleAsObject,S=a.count!==void 0&&!ir(a.count),w=iy.hasDefaultValue(a),E=S?this.pluralResolver.getSuffix(d,a.count,a):"",C=a.ordinal&&S?this.pluralResolver.getSuffix(d,a.count,{ordinal:!1}):"",N=S&&!a.ordinal&&a.count===0,_=N&&a[`defaultValue${this.options.pluralSeparator}zero`]||a[`defaultValue${E}`]||a[`defaultValue${C}`]||a.defaultValue,O=m;b&&!m&&w&&(O=_);let D=P_(O),W=Object.prototype.toString.apply(O);if(b&&O&&D&&g.indexOf(W)<0&&!(ir(y)&&Array.isArray(O))){if(!a.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");let Z=this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,O,{...a,ns:l}):`key '${o} (${this.language})' returned an object instead of string.`;return i?(p.res=Z,p.usedParams=this.getUsedParamsDetails(a),p):Z}if(s){let Z=Array.isArray(O),me=Z?[]:{},Q=Z?x:h;for(let V in O)if(Object.prototype.hasOwnProperty.call(O,V)){let U=`${Q}${s}${V}`;w&&!m?me[V]=this.translate(U,{...a,defaultValue:P_(_)?_[V]:void 0,joinArrays:!1,ns:l}):me[V]=this.translate(U,{...a,joinArrays:!1,ns:l}),me[V]===U&&(me[V]=O[V])}m=me}}else if(b&&ir(y)&&Array.isArray(m))m=m.join(y),m&&(m=this.extendTranslation(m,t,a,n));else{let Z=!1,me=!1;!this.isValidLookup(m)&&w&&(Z=!0,m=_),this.isValidLookup(m)||(me=!0,m=o);let V=(a.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&me?void 0:m,U=w&&_!==m&&this.options.updateMissing;if(me||Z||U){if(this.logger.log(U?"updateKey":"missingKey",d,c,o,U?_:m),s){let ee=this.resolve(o,{...a,keySeparator:!1});ee&&ee.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let k=[],L=this.languageUtils.getFallbackCodes(this.options.fallbackLng,a.lng||this.language);if(this.options.saveMissingTo==="fallback"&&L&&L[0])for(let ee=0;ee<L.length;ee++)k.push(L[ee]);else this.options.saveMissingTo==="all"?k=this.languageUtils.toResolveHierarchy(a.lng||this.language):k.push(a.lng||this.language);let M=(ee,se,ne)=>{let ge=w&&ne!==m?ne:V;this.options.missingKeyHandler?this.options.missingKeyHandler(ee,c,se,ge,U,a):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(ee,c,se,ge,U,a),this.emit("missingKey",ee,c,se,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&S?k.forEach(ee=>{let se=this.pluralResolver.getSuffixes(ee,a);N&&a[`defaultValue${this.options.pluralSeparator}zero`]&&se.indexOf(`${this.options.pluralSeparator}zero`)<0&&se.push(`${this.options.pluralSeparator}zero`),se.forEach(ne=>{M([ee],o+ne,a[`defaultValue${ne}`]||_)})}):M(k,o,_))}m=this.extendTranslation(m,t,a,p,n),me&&m===o&&this.options.appendNamespaceToMissingKey&&(m=`${c}${u}${o}`),(me||Z)&&this.options.parseMissingKeyHandler&&(m=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}${u}${o}`:o,Z?m:void 0,a))}return i?(p.res=m,p.usedParams=this.getUsedParamsDetails(a),p):m}extendTranslation(t,r,n,a,i){if(this.i18nFormat?.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||a.usedLng,a.usedNS,a.usedKey,{resolved:a});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});let l=ir(t)&&(n?.interpolation?.skipOnVariables!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables),c;if(l){let d=t.match(this.interpolator.nestingRegexp);c=d&&d.length}let u=n.replace&&!ir(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(u={...this.options.interpolation.defaultVariables,...u}),t=this.interpolator.interpolate(t,u,n.lng||this.language||a.usedLng,n),l){let d=t.match(this.interpolator.nestingRegexp),f=d&&d.length;c<f&&(n.nest=!1)}!n.lng&&a&&a.res&&(n.lng=this.language||a.usedLng),n.nest!==!1&&(t=this.interpolator.nest(t,(...d)=>i?.[0]===d[0]&&!n.context?(this.logger.warn(`It seems you are nesting recursively key: ${d[0]} in key: ${r[0]}`),null):this.translate(...d,r),n)),n.interpolation&&this.interpolator.reset()}let s=n.postProcess||this.options.postProcess,o=ir(s)?[s]:s;return t!=null&&o?.length&&n.applyPostProcessor!==!1&&(t=OU.handle(o,t,r,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...a,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),t}resolve(t,r={}){let n,a,i,s,o;return ir(t)&&(t=[t]),t.forEach(l=>{if(this.isValidLookup(n))return;let c=this.extractFromKey(l,r),u=c.key;a=u;let d=c.namespaces;this.options.fallbackNS&&(d=d.concat(this.options.fallbackNS));let f=r.count!==void 0&&!ir(r.count),p=f&&!r.ordinal&&r.count===0,m=r.context!==void 0&&(ir(r.context)||typeof r.context=="number")&&r.context!=="",h=r.lngs?r.lngs:this.languageUtils.toResolveHierarchy(r.lng||this.language,r.fallbackLng);d.forEach(x=>{this.isValidLookup(n)||(o=x,!AU[`${h[0]}-${x}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(o)&&(AU[`${h[0]}-${x}`]=!0,this.logger.warn(`key "${a}" for languages "${h.join(", ")}" won't get resolved as namespace "${o}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),h.forEach(g=>{if(this.isValidLookup(n))return;s=g;let y=[u];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(y,u,g,x,r);else{let S;f&&(S=this.pluralResolver.getSuffix(g,r.count,r));let w=`${this.options.pluralSeparator}zero`,E=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(f&&(r.ordinal&&S.indexOf(E)===0&&y.push(u+S.replace(E,this.options.pluralSeparator)),y.push(u+S),p&&y.push(u+w)),m){let C=`${u}${this.options.contextSeparator||"_"}${r.context}`;y.push(C),f&&(r.ordinal&&S.indexOf(E)===0&&y.push(C+S.replace(E,this.options.pluralSeparator)),y.push(C+S),p&&y.push(C+w))}}let b;for(;b=y.pop();)this.isValidLookup(n)||(i=b,n=this.getResource(g,x,b,r))}))})}),{res:n,usedKey:a,exactUsedKey:i,usedLng:s,usedNS:o}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,r,n,a={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(t,r,n,a):this.resourceStore.getResource(t,r,n,a)}getUsedParamsDetails(t={}){let r=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=t.replace&&!ir(t.replace),a=n?t.replace:t;if(n&&typeof t.count<"u"&&(a.count=t.count),this.options.interpolation.defaultVariables&&(a={...this.options.interpolation.defaultVariables,...a}),!n){a={...a};for(let i of r)delete a[i]}return a}static hasDefaultValue(t){let r="defaultValue";for(let n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&r===n.substring(0,r.length)&&t[n]!==void 0)return!0;return!1}},WC=class{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Hc.create("languageUtils")}getScriptPartFromCode(t){if(t=Qv(t),!t||t.indexOf("-")<0)return null;let r=t.split("-");return r.length===2||(r.pop(),r[r.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(r.join("-"))}getLanguagePartFromCode(t){if(t=Qv(t),!t||t.indexOf("-")<0)return t;let r=t.split("-");return this.formatLanguageCode(r[0])}formatLanguageCode(t){if(ir(t)&&t.indexOf("-")>-1){let r;try{r=Intl.getCanonicalLocales(t)[0]}catch{}return r&&this.options.lowerCaseLng&&(r=r.toLowerCase()),r||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let r;return t.forEach(n=>{if(r)return;let a=this.formatLanguageCode(n);(!this.options.supportedLngs||this.isSupportedCode(a))&&(r=a)}),!r&&this.options.supportedLngs&&t.forEach(n=>{if(r)return;let a=this.getScriptPartFromCode(n);if(this.isSupportedCode(a))return r=a;let i=this.getLanguagePartFromCode(n);if(this.isSupportedCode(i))return r=i;r=this.options.supportedLngs.find(s=>{if(s===i)return s;if(!(s.indexOf("-")<0&&i.indexOf("-")<0)&&(s.indexOf("-")>0&&i.indexOf("-")<0&&s.substring(0,s.indexOf("-"))===i||s.indexOf(i)===0&&i.length>1))return s})}),r||(r=this.getFallbackCodes(this.options.fallbackLng)[0]),r}getFallbackCodes(t,r){if(!t)return[];if(typeof t=="function"&&(t=t(r)),ir(t)&&(t=[t]),Array.isArray(t))return t;if(!r)return t.default||[];let n=t[r];return n||(n=t[this.getScriptPartFromCode(r)]),n||(n=t[this.formatLanguageCode(r)]),n||(n=t[this.getLanguagePartFromCode(r)]),n||(n=t.default),n||[]}toResolveHierarchy(t,r){let n=this.getFallbackCodes((r===!1?[]:r)||this.options.fallbackLng||[],t),a=[],i=s=>{s&&(this.isSupportedCode(s)?a.push(s):this.logger.warn(`rejecting language code not found in supportedLngs: ${s}`))};return ir(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&i(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&i(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&i(this.getLanguagePartFromCode(t))):ir(t)&&i(this.formatLanguageCode(t)),n.forEach(s=>{a.indexOf(s)<0&&i(this.formatLanguageCode(s))}),a}},NU={zero:0,one:1,two:2,few:3,many:4,other:5},kU={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})},N_=class{constructor(t,r={}){this.languageUtils=t,this.options=r,this.logger=Hc.create("pluralResolver"),this.pluralRulesCache={}}addRule(t,r){this.rules[t]=r}clearCache(){this.pluralRulesCache={}}getRule(t,r={}){let n=Qv(t==="dev"?"en":t),a=r.ordinal?"ordinal":"cardinal",i=JSON.stringify({cleanedCode:n,type:a});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let s;try{s=new Intl.PluralRules(n,{type:a})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),kU;if(!t.match(/-|_/))return kU;let l=this.languageUtils.getLanguagePartFromCode(t);s=this.getRule(l,r)}return this.pluralRulesCache[i]=s,s}needsPlural(t,r={}){let n=this.getRule(t,r);return n||(n=this.getRule("dev",r)),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(t,r,n={}){return this.getSuffixes(t,n).map(a=>`${r}${a}`)}getSuffixes(t,r={}){let n=this.getRule(t,r);return n||(n=this.getRule("dev",r)),n?n.resolvedOptions().pluralCategories.sort((a,i)=>NU[a]-NU[i]).map(a=>`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${a}`):[]}getSuffix(t,r,n={}){let a=this.getRule(t,n);return a?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${a.select(r)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",r,n))}},_U=(e,t,r,n=".",a=!0)=>{let i=rhe(e,t,r);return!i&&a&&ir(r)&&(i=A_(e,r,n),i===void 0&&(i=A_(t,r,n))),i},E_=e=>e.replace(/\$/g,"$$$$"),XC=class{constructor(t={}){this.logger=Hc.create("interpolator"),this.options=t,this.format=t?.interpolation?.format||(r=>r),this.init(t)}init(t={}){t.interpolation||(t.interpolation={escapeValue:!0});let{escape:r,escapeValue:n,useRawValueToEscape:a,prefix:i,prefixEscaped:s,suffix:o,suffixEscaped:l,formatSeparator:c,unescapeSuffix:u,unescapePrefix:d,nestingPrefix:f,nestingPrefixEscaped:p,nestingSuffix:m,nestingSuffixEscaped:h,nestingOptionsSeparator:x,maxReplaces:g,alwaysFormat:y}=t.interpolation;this.escape=r!==void 0?r:ahe,this.escapeValue=n!==void 0?n:!0,this.useRawValueToEscape=a!==void 0?a:!1,this.prefix=i?ry(i):s||"{{",this.suffix=o?ry(o):l||"}}",this.formatSeparator=c||",",this.unescapePrefix=u?"":d||"-",this.unescapeSuffix=this.unescapePrefix?"":u||"",this.nestingPrefix=f?ry(f):p||ry("$t("),this.nestingSuffix=m?ry(m):h||ry(")"),this.nestingOptionsSeparator=x||",",this.maxReplaces=g||1e3,this.alwaysFormat=y!==void 0?y:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let t=(r,n)=>r?.source===n?(r.lastIndex=0,r):new RegExp(n,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(t,r,n,a){let i,s,o,l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=p=>{if(p.indexOf(this.formatSeparator)<0){let g=_U(r,l,p,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(g,void 0,n,{...a,...r,interpolationkey:p}):g}let m=p.split(this.formatSeparator),h=m.shift().trim(),x=m.join(this.formatSeparator).trim();return this.format(_U(r,l,h,this.options.keySeparator,this.options.ignoreJSONStructure),x,n,{...a,...r,interpolationkey:h})};this.resetRegExp();let u=a?.missingInterpolationHandler||this.options.missingInterpolationHandler,d=a?.interpolation?.skipOnVariables!==void 0?a.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:p=>E_(p)},{regex:this.regexp,safeValue:p=>this.escapeValue?E_(this.escape(p)):E_(p)}].forEach(p=>{for(o=0;i=p.regex.exec(t);){let m=i[1].trim();if(s=c(m),s===void 0)if(typeof u=="function"){let x=u(t,i,a);s=ir(x)?x:""}else if(a&&Object.prototype.hasOwnProperty.call(a,m))s="";else if(d){s=i[0];continue}else this.logger.warn(`missed to pass in variable ${m} for interpolating ${t}`),s="";else!ir(s)&&!this.useRawValueToEscape&&(s=CU(s));let h=p.safeValue(s);if(t=t.replace(i[0],h),d?(p.regex.lastIndex+=s.length,p.regex.lastIndex-=i[0].length):p.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),t}nest(t,r,n={}){let a,i,s,o=(l,c)=>{let u=this.nestingOptionsSeparator;if(l.indexOf(u)<0)return l;let d=l.split(new RegExp(`${u}[ ]*{`)),f=`{${d[1]}`;l=d[0],f=this.interpolate(f,s);let p=f.match(/'/g),m=f.match(/"/g);((p?.length??0)%2===0&&!m||m.length%2!==0)&&(f=f.replace(/'/g,'"'));try{s=JSON.parse(f),c&&(s={...c,...s})}catch(h){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,h),`${l}${u}${f}`}return s.defaultValue&&s.defaultValue.indexOf(this.prefix)>-1&&delete s.defaultValue,l};for(;a=this.nestingRegexp.exec(t);){let l=[];s={...n},s=s.replace&&!ir(s.replace)?s.replace:s,s.applyPostProcessor=!1,delete s.defaultValue;let c=/{.*}/.test(a[1])?a[1].lastIndexOf("}")+1:a[1].indexOf(this.formatSeparator);if(c!==-1&&(l=a[1].slice(c).split(this.formatSeparator).map(u=>u.trim()).filter(Boolean),a[1]=a[1].slice(0,c)),i=r(o.call(this,a[1].trim(),s),s),i&&a[0]===t&&!ir(i))return i;ir(i)||(i=CU(i)),i||(this.logger.warn(`missed to resolve ${a[1]} for nesting ${t}`),i=""),l.length&&(i=l.reduce((u,d)=>this.format(u,d,n.lng,{...n,interpolationkey:a[1].trim()}),i.trim())),t=t.replace(a[0],i),this.regexp.lastIndex=0}return t}},uhe=e=>{let t=e.toLowerCase().trim(),r={};if(e.indexOf("(")>-1){let n=e.split("(");t=n[0].toLowerCase().trim();let a=n[1].substring(0,n[1].length-1);t==="currency"&&a.indexOf(":")<0?r.currency||(r.currency=a.trim()):t==="relativetime"&&a.indexOf(":")<0?r.range||(r.range=a.trim()):a.split(";").forEach(s=>{if(s){let[o,...l]=s.split(":"),c=l.join(":").trim().replace(/^'+|'+$/g,""),u=o.trim();r[u]||(r[u]=c),c==="false"&&(r[u]=!1),c==="true"&&(r[u]=!0),isNaN(c)||(r[u]=parseInt(c,10))}})}return{formatName:t,formatOptions:r}},LU=e=>{let t={};return(r,n,a)=>{let i=a;a&&a.interpolationkey&&a.formatParams&&a.formatParams[a.interpolationkey]&&a[a.interpolationkey]&&(i={...i,[a.interpolationkey]:void 0});let s=n+JSON.stringify(i),o=t[s];return o||(o=e(Qv(n),a),t[s]=o),o(r)}},dhe=e=>(t,r,n)=>e(Qv(r),n)(t),k_=class{constructor(t={}){this.logger=Hc.create("formatter"),this.options=t,this.init(t)}init(t,r={interpolation:{}}){this.formatSeparator=r.interpolation.formatSeparator||",";let n=r.cacheInBuiltFormats?LU:dhe;this.formats={number:n((a,i)=>{let s=new Intl.NumberFormat(a,{...i});return o=>s.format(o)}),currency:n((a,i)=>{let s=new Intl.NumberFormat(a,{...i,style:"currency"});return o=>s.format(o)}),datetime:n((a,i)=>{let s=new Intl.DateTimeFormat(a,{...i});return o=>s.format(o)}),relativetime:n((a,i)=>{let s=new Intl.RelativeTimeFormat(a,{...i});return o=>s.format(o,i.range||"day")}),list:n((a,i)=>{let s=new Intl.ListFormat(a,{...i});return o=>s.format(o)})}}add(t,r){this.formats[t.toLowerCase().trim()]=r}addCached(t,r){this.formats[t.toLowerCase().trim()]=LU(r)}format(t,r,n,a={}){let i=r.split(this.formatSeparator);if(i.length>1&&i[0].indexOf("(")>1&&i[0].indexOf(")")<0&&i.find(o=>o.indexOf(")")>-1)){let o=i.findIndex(l=>l.indexOf(")")>-1);i[0]=[i[0],...i.splice(1,o)].join(this.formatSeparator)}return i.reduce((o,l)=>{let{formatName:c,formatOptions:u}=uhe(l);if(this.formats[c]){let d=o;try{let f=a?.formatParams?.[a.interpolationkey]||{},p=f.locale||f.lng||a.locale||a.lng||n;d=this.formats[c](o,p,{...u,...a,...f})}catch(f){this.logger.warn(f)}return d}else this.logger.warn(`there was no format function for ${c}`);return o},t)}},fhe=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)},__=class extends ay{constructor(t,r,n,a={}){super(),this.backend=t,this.store=r,this.services=n,this.languageUtils=n.languageUtils,this.options=a,this.logger=Hc.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=a.maxParallelReads||10,this.readingCalls=0,this.maxRetries=a.maxRetries>=0?a.maxRetries:5,this.retryTimeout=a.retryTimeout>=1?a.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,a.backend,a)}queueLoad(t,r,n,a){let i={},s={},o={},l={};return t.forEach(c=>{let u=!0;r.forEach(d=>{let f=`${c}|${d}`;!n.reload&&this.store.hasResourceBundle(c,d)?this.state[f]=2:this.state[f]<0||(this.state[f]===1?s[f]===void 0&&(s[f]=!0):(this.state[f]=1,u=!1,s[f]===void 0&&(s[f]=!0),i[f]===void 0&&(i[f]=!0),l[d]===void 0&&(l[d]=!0)))}),u||(o[c]=!0)}),(Object.keys(i).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:a}),{toLoad:Object.keys(i),pending:Object.keys(s),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(l)}}loaded(t,r,n){let a=t.split("|"),i=a[0],s=a[1];r&&this.emit("failedLoading",i,s,r),!r&&n&&this.store.addResourceBundle(i,s,n,void 0,void 0,{skipCopy:!0}),this.state[t]=r?-1:2,r&&n&&(this.state[t]=0);let o={};this.queue.forEach(l=>{the(l.loaded,[i],s),fhe(l,t),r&&l.errors.push(r),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(c=>{o[c]||(o[c]={});let u=l.loaded[c];u.length&&u.forEach(d=>{o[c][d]===void 0&&(o[c][d]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",o),this.queue=this.queue.filter(l=>!l.done)}read(t,r,n,a=0,i=this.retryTimeout,s){if(!t.length)return s(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:r,fcName:n,tried:a,wait:i,callback:s});return}this.readingCalls++;let o=(c,u)=>{if(this.readingCalls--,this.waitingReads.length>0){let d=this.waitingReads.shift();this.read(d.lng,d.ns,d.fcName,d.tried,d.wait,d.callback)}if(c&&u&&a<this.maxRetries){setTimeout(()=>{this.read.call(this,t,r,n,a+1,i*2,s)},i);return}s(c,u)},l=this.backend[n].bind(this.backend);if(l.length===2){try{let c=l(t,r);c&&typeof c.then=="function"?c.then(u=>o(null,u)).catch(o):o(null,c)}catch(c){o(c)}return}return l(t,r,o)}prepareLoading(t,r,n={},a){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),a&&a();ir(t)&&(t=this.languageUtils.toResolveHierarchy(t)),ir(r)&&(r=[r]);let i=this.queueLoad(t,r,n,a);if(!i.toLoad.length)return i.pending.length||a(),null;i.toLoad.forEach(s=>{this.loadOne(s)})}load(t,r,n){this.prepareLoading(t,r,{},n)}reload(t,r,n){this.prepareLoading(t,r,{reload:!0},n)}loadOne(t,r=""){let n=t.split("|"),a=n[0],i=n[1];this.read(a,i,"read",void 0,void 0,(s,o)=>{s&&this.logger.warn(`${r}loading namespace ${i} for language ${a} failed`,s),!s&&o&&this.logger.log(`${r}loaded namespace ${i} for language ${a}`,o),this.loaded(t,s,o)})}saveMissing(t,r,n,a,i,s={},o=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(r)){this.logger.warn(`did not save key "${n}" as the namespace "${r}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(n==null||n==="")){if(this.backend?.create){let l={...s,isUpdate:i},c=this.backend.create.bind(this.backend);if(c.length<6)try{let u;c.length===5?u=c(t,r,n,a,l):u=c(t,r,n,a),u&&typeof u.then=="function"?u.then(d=>o(null,d)).catch(o):o(null,u)}catch(u){o(u)}else c(t,r,n,a,o,l)}!t||!t[0]||this.store.addResource(t[0],r,n,a)}}},RU=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),ir(e[1])&&(t.defaultValue=e[1]),ir(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){let r=e[3]||e[2];Object.keys(r).forEach(n=>{t[n]=r[n]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),DU=e=>(ir(e.ns)&&(e.ns=[e.ns]),ir(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),ir(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),typeof e.initImmediate=="boolean"&&(e.initAsync=e.initImmediate),e),qC=()=>{},phe=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(r=>{typeof e[r]=="function"&&(e[r]=e[r].bind(e))})},Dm=class extends ay{constructor(t={},r){if(super(),this.options=DU(t),this.services={},this.logger=Hc,this.modules={external:[]},phe(this),r&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,r),this;setTimeout(()=>{this.init(t,r)},0)}}init(t={},r){this.isInitializing=!0,typeof t=="function"&&(r=t,t={}),t.defaultNS==null&&t.ns&&(ir(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));let n=RU();this.options={...n,...this.options,...DU(t)},this.options.interpolation={...n.interpolation,...this.options.interpolation},t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=n.overloadTranslationOptionHandler);let a=c=>c?typeof c=="function"?new c:c:null;if(!this.options.isClone){this.modules.logger?Hc.init(a(this.modules.logger),this.options):Hc.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:c=k_;let u=new WC(this.options);this.store=new GC(this.options.resources,this.options);let d=this.services;d.logger=Hc,d.resourceStore=this.store,d.languageUtils=u,d.pluralResolver=new N_(u,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==n.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),c&&(!this.options.interpolation.format||this.options.interpolation.format===n.interpolation.format)&&(d.formatter=a(c),d.formatter.init&&d.formatter.init(d,this.options),this.options.interpolation.format=d.formatter.format.bind(d.formatter)),d.interpolator=new XC(this.options),d.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},d.backendConnector=new __(a(this.modules.backend),d.resourceStore,d,this.options),d.backendConnector.on("*",(p,...m)=>{this.emit(p,...m)}),this.modules.languageDetector&&(d.languageDetector=a(this.modules.languageDetector),d.languageDetector.init&&d.languageDetector.init(d,this.options.detection,this.options)),this.modules.i18nFormat&&(d.i18nFormat=a(this.modules.i18nFormat),d.i18nFormat.init&&d.i18nFormat.init(this)),this.translator=new iy(this.services,this.options),this.translator.on("*",(p,...m)=>{this.emit(p,...m)}),this.modules.external.forEach(p=>{p.init&&p.init(this)})}if(this.format=this.options.interpolation.format,r||(r=qC),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&c[0]!=="dev"&&(this.options.lng=c[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(c=>{this[c]=(...u)=>this.store[c](...u)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(c=>{this[c]=(...u)=>(this.store[c](...u),this)});let o=Jv(),l=()=>{let c=(u,d)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),o.resolve(d),r(u,d)};if(this.languages&&!this.isInitialized)return c(null,this.t.bind(this));this.changeLanguage(this.options.lng,c)};return this.options.resources||!this.options.initAsync?l():setTimeout(l,0),o}loadResources(t,r=qC){let n=r,a=ir(t)?t:this.language;if(typeof t=="function"&&(n=t),!this.options.resources||this.options.partialBundledLanguages){if(a?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return n();let i=[],s=o=>{if(!o||o==="cimode")return;this.services.languageUtils.toResolveHierarchy(o).forEach(c=>{c!=="cimode"&&i.indexOf(c)<0&&i.push(c)})};a?s(a):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>s(l)),this.options.preload?.forEach?.(o=>s(o)),this.services.backendConnector.load(i,this.options.ns,o=>{!o&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(o)})}else n(null)}reloadResources(t,r,n){let a=Jv();return typeof t=="function"&&(n=t,t=void 0),typeof r=="function"&&(n=r,r=void 0),t||(t=this.languages),r||(r=this.options.ns),n||(n=qC),this.services.backendConnector.reload(t,r,i=>{a.resolve(),n(i)}),a}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&OU.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1)){for(let r=0;r<this.languages.length;r++){let n=this.languages[r];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}!this.resolvedLanguage&&this.languages.indexOf(t)<0&&this.store.hasLanguageSomeTranslations(t)&&(this.resolvedLanguage=t,this.languages.unshift(t))}}changeLanguage(t,r){this.isLanguageChangingTo=t;let n=Jv();this.emit("languageChanging",t);let a=o=>{this.language=o,this.languages=this.services.languageUtils.toResolveHierarchy(o),this.resolvedLanguage=void 0,this.setResolvedLanguage(o)},i=(o,l)=>{l?this.isLanguageChangingTo===t&&(a(l),this.translator.changeLanguage(l),this.isLanguageChangingTo=void 0,this.emit("languageChanged",l),this.logger.log("languageChanged",l)):this.isLanguageChangingTo=void 0,n.resolve((...c)=>this.t(...c)),r&&r(o,(...c)=>this.t(...c))},s=o=>{!t&&!o&&this.services.languageDetector&&(o=[]);let l=ir(o)?o:o&&o[0],c=this.store.hasLanguageSomeTranslations(l)?l:this.services.languageUtils.getBestMatchFromCodes(ir(o)?[o]:o);c&&(this.language||a(c),this.translator.language||this.translator.changeLanguage(c),this.services.languageDetector?.cacheUserLanguage?.(c)),this.loadResources(c,u=>{i(u,c)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?s(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(s):this.services.languageDetector.detect(s):s(t),n}getFixedT(t,r,n){let a=(i,s,...o)=>{let l;typeof s!="object"?l=this.options.overloadTranslationOptionHandler([i,s].concat(o)):l={...s},l.lng=l.lng||a.lng,l.lngs=l.lngs||a.lngs,l.ns=l.ns||a.ns,l.keyPrefix!==""&&(l.keyPrefix=l.keyPrefix||n||a.keyPrefix);let c=this.options.keySeparator||".",u;return l.keyPrefix&&Array.isArray(i)?u=i.map(d=>(typeof d=="function"&&(d=KC(d,{...this.options,...s})),`${l.keyPrefix}${c}${d}`)):(typeof i=="function"&&(i=KC(i,{...this.options,...s})),u=l.keyPrefix?`${l.keyPrefix}${c}${i}`:i),this.t(u,l)};return ir(t)?a.lng=t:a.lngs=t,a.ns=r,a.keyPrefix=n,a}t(...t){return this.translator?.translate(...t)}exists(...t){return this.translator?.exists(...t)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t,r={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;let n=r.lng||this.resolvedLanguage||this.languages[0],a=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(n.toLowerCase()==="cimode")return!0;let s=(o,l)=>{let c=this.services.backendConnector.state[`${o}|${l}`];return c===-1||c===0||c===2};if(r.precheck){let o=r.precheck(this,s);if(o!==void 0)return o}return!!(this.hasResourceBundle(n,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||s(n,t)&&(!a||s(i,t)))}loadNamespaces(t,r){let n=Jv();return this.options.ns?(ir(t)&&(t=[t]),t.forEach(a=>{this.options.ns.indexOf(a)<0&&this.options.ns.push(a)}),this.loadResources(a=>{n.resolve(),r&&r(a)}),n):(r&&r(),Promise.resolve())}loadLanguages(t,r){let n=Jv();ir(t)&&(t=[t]);let a=this.options.preload||[],i=t.filter(s=>a.indexOf(s)<0&&this.services.languageUtils.isSupportedCode(s));return i.length?(this.options.preload=a.concat(i),this.loadResources(s=>{n.resolve(),r&&r(s)}),n):(r&&r(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!t)return"rtl";try{let a=new Intl.Locale(t);if(a&&a.getTextInfo){let i=a.getTextInfo();if(i&&i.direction)return i.direction}}catch{}let r=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],n=this.services?.languageUtils||new WC(RU());return t.toLowerCase().indexOf("-latn")>1?"ltr":r.indexOf(n.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(t={},r){let n=new Dm(t,r);return n.createInstance=Dm.createInstance,n}cloneInstance(t={},r=qC){let n=t.forkResourceStore;n&&delete t.forkResourceStore;let a={...this.options,...t,isClone:!0},i=new Dm(a);if((t.debug!==void 0||t.prefix!==void 0)&&(i.logger=i.logger.clone(t)),["store","services","language"].forEach(o=>{i[o]=this[o]}),i.services={...this.services},i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},n){let o=Object.keys(this.store.data).reduce((l,c)=>(l[c]={...this.store.data[c]},l[c]=Object.keys(l[c]).reduce((u,d)=>(u[d]={...l[c][d]},u),l[c]),l),{});i.store=new GC(o,a),i.services.resourceStore=i.store}return t.interpolation&&(i.services.interpolator=new XC(a)),i.translator=new iy(i.services,a),i.translator.on("*",(o,...l)=>{i.emit(o,...l)}),i.init(a,r),i.translator.options=a,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}},Gi=Dm.createInstance(),But=Gi.createInstance,$ut=Gi.dir,jut=Gi.init,zut=Gi.loadResources,Uut=Gi.reloadResources,Vut=Gi.use,qut=Gi.changeLanguage,Hut=Gi.getFixedT,Gut=Gi.t,Kut=Gi.exists,Wut=Gi.setDefaultNamespace,Xut=Gi.hasLoadedNamespace,Yut=Gi.loadNamespaces,Jut=Gi.loadLanguages});var WU=ae(pr=>{"use strict";var M_=Symbol.for("react.transitional.element"),mhe=Symbol.for("react.portal"),hhe=Symbol.for("react.fragment"),ghe=Symbol.for("react.strict_mode"),yhe=Symbol.for("react.profiler"),xhe=Symbol.for("react.consumer"),bhe=Symbol.for("react.context"),vhe=Symbol.for("react.forward_ref"),She=Symbol.for("react.suspense"),The=Symbol.for("react.memo"),UU=Symbol.for("react.lazy"),whe=Symbol.for("react.activity"),BU=Symbol.iterator;function Che(e){return e===null||typeof e!="object"?null:(e=BU&&e[BU]||e["@@iterator"],typeof e=="function"?e:null)}var VU={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},qU=Object.assign,HU={};function oy(e,t,r){this.props=e,this.context=t,this.refs=HU,this.updater=r||VU}oy.prototype.isReactComponent={};oy.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};oy.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function GU(){}GU.prototype=oy.prototype;function O_(e,t,r){this.props=e,this.context=t,this.refs=HU,this.updater=r||VU}var F_=O_.prototype=new GU;F_.constructor=O_;qU(F_,oy.prototype);F_.isPureReactComponent=!0;var $U=Array.isArray;function D_(){}var Gn={H:null,A:null,T:null,S:null},KU=Object.prototype.hasOwnProperty;function B_(e,t,r){var n=r.ref;return{$$typeof:M_,type:e,key:t,ref:n!==void 0?n:null,props:r}}function Phe(e,t){return B_(e.type,t,e.props)}function $_(e){return typeof e=="object"&&e!==null&&e.$$typeof===M_}function Ehe(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var jU=/\/+/g;function R_(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Ehe(""+e.key):t.toString(36)}function Ihe(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(D_,D_):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function sy(e,t,r,n,a){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(i){case"bigint":case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case M_:case mhe:s=!0;break;case UU:return s=e._init,sy(s(e._payload),t,r,n,a)}}if(s)return a=a(e),s=n===""?"."+R_(e,0):n,$U(a)?(r="",s!=null&&(r=s.replace(jU,"$&/")+"/"),sy(a,t,r,"",function(c){return c})):a!=null&&($_(a)&&(a=Phe(a,r+(a.key==null||e&&e.key===a.key?"":(""+a.key).replace(jU,"$&/")+"/")+s)),t.push(a)),1;s=0;var o=n===""?".":n+":";if($U(e))for(var l=0;l<e.length;l++)n=e[l],i=o+R_(n,l),s+=sy(n,t,r,i,a);else if(l=Che(e),typeof l=="function")for(e=l.call(e),l=0;!(n=e.next()).done;)n=n.value,i=o+R_(n,l++),s+=sy(n,t,r,i,a);else if(i==="object"){if(typeof e.then=="function")return sy(Ihe(e),t,r,n,a);throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return s}function YC(e,t,r){if(e==null)return e;var n=[],a=0;return sy(e,n,"","",function(i){return t.call(r,i,a++)}),n}function Ahe(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var zU=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}},Nhe={map:YC,forEach:function(e,t,r){YC(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return YC(e,function(){t++}),t},toArray:function(e){return YC(e,function(t){return t})||[]},only:function(e){if(!$_(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};pr.Activity=whe;pr.Children=Nhe;pr.Component=oy;pr.Fragment=hhe;pr.Profiler=yhe;pr.PureComponent=O_;pr.StrictMode=ghe;pr.Suspense=She;pr.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Gn;pr.__COMPILER_RUNTIME={__proto__:null,c:function(e){return Gn.H.useMemoCache(e)}};pr.cache=function(e){return function(){return e.apply(null,arguments)}};pr.cacheSignal=function(){return null};pr.cloneElement=function(e,t,r){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var n=qU({},e.props),a=e.key;if(t!=null)for(i in t.key!==void 0&&(a=""+t.key),t)!KU.call(t,i)||i==="key"||i==="__self"||i==="__source"||i==="ref"&&t.ref===void 0||(n[i]=t[i]);var i=arguments.length-2;if(i===1)n.children=r;else if(1<i){for(var s=Array(i),o=0;o<i;o++)s[o]=arguments[o+2];n.children=s}return B_(e.type,a,n)};pr.createContext=function(e){return e={$$typeof:bhe,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:xhe,_context:e},e};pr.createElement=function(e,t,r){var n,a={},i=null;if(t!=null)for(n in t.key!==void 0&&(i=""+t.key),t)KU.call(t,n)&&n!=="key"&&n!=="__self"&&n!=="__source"&&(a[n]=t[n]);var s=arguments.length-2;if(s===1)a.children=r;else if(1<s){for(var o=Array(s),l=0;l<s;l++)o[l]=arguments[l+2];a.children=o}if(e&&e.defaultProps)for(n in s=e.defaultProps,s)a[n]===void 0&&(a[n]=s[n]);return B_(e,i,a)};pr.createRef=function(){return{current:null}};pr.forwardRef=function(e){return{$$typeof:vhe,render:e}};pr.isValidElement=$_;pr.lazy=function(e){return{$$typeof:UU,_payload:{_status:-1,_result:e},_init:Ahe}};pr.memo=function(e,t){return{$$typeof:The,type:e,compare:t===void 0?null:t}};pr.startTransition=function(e){var t=Gn.T,r={};Gn.T=r;try{var n=e(),a=Gn.S;a!==null&&a(r,n),typeof n=="object"&&n!==null&&typeof n.then=="function"&&n.then(D_,zU)}catch(i){zU(i)}finally{t!==null&&r.types!==null&&(t.types=r.types),Gn.T=t}};pr.unstable_useCacheRefresh=function(){return Gn.H.useCacheRefresh()};pr.use=function(e){return Gn.H.use(e)};pr.useActionState=function(e,t,r){return Gn.H.useActionState(e,t,r)};pr.useCallback=function(e,t){return Gn.H.useCallback(e,t)};pr.useContext=function(e){return Gn.H.useContext(e)};pr.useDebugValue=function(){};pr.useDeferredValue=function(e,t){return Gn.H.useDeferredValue(e,t)};pr.useEffect=function(e,t){return Gn.H.useEffect(e,t)};pr.useEffectEvent=function(e){return Gn.H.useEffectEvent(e)};pr.useId=function(){return Gn.H.useId()};pr.useImperativeHandle=function(e,t,r){return Gn.H.useImperativeHandle(e,t,r)};pr.useInsertionEffect=function(e,t){return Gn.H.useInsertionEffect(e,t)};pr.useLayoutEffect=function(e,t){return Gn.H.useLayoutEffect(e,t)};pr.useMemo=function(e,t){return Gn.H.useMemo(e,t)};pr.useOptimistic=function(e,t){return Gn.H.useOptimistic(e,t)};pr.useReducer=function(e,t,r){return Gn.H.useReducer(e,t,r)};pr.useRef=function(e){return Gn.H.useRef(e)};pr.useState=function(e){return Gn.H.useState(e)};pr.useSyncExternalStore=function(e,t,r){return Gn.H.useSyncExternalStore(e,t,r)};pr.useTransition=function(){return Gn.H.useTransition()};pr.version="19.2.0"});var Le=ae((edt,XU)=>{"use strict";XU.exports=WU()});var JU=ae((tdt,YU)=>{YU.exports={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}});var khe,ZU=de(()=>{khe=A(JU())});var JC,QU,ly,e8,ZC,j_,t8,dc,z_,cy=de(()=>{JC=(e,t,r,n)=>{let a=[r,{code:t,...n||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(a,"warn","react-i18next::",!0);dc(a[0])&&(a[0]=`react-i18next:: ${a[0]}`),e?.services?.logger?.warn&&e.services.logger.warn(...a)},QU={},ly=(e,t,r,n)=>{dc(r)&&QU[r]||(dc(r)&&(QU[r]=new Date),JC(e,t,r,n))},e8=(e,t)=>()=>{if(e.isInitialized)t();else{let r=()=>{setTimeout(()=>{e.off("initialized",r)},0),t()};e.on("initialized",r)}},ZC=(e,t,r)=>{e.loadNamespaces(t,e8(e,r))},j_=(e,t,r,n)=>{if(dc(r)&&(r=[r]),e.options.preload&&e.options.preload.indexOf(t)>-1)return ZC(e,r,n);r.forEach(a=>{e.options.ns.indexOf(a)<0&&e.options.ns.push(a)}),e.loadLanguages(t,e8(e,n))},t8=(e,t,r={})=>!t.languages||!t.languages.length?(ly(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:r.lng,precheck:(n,a)=>{if(r.bindI18n&&r.bindI18n.indexOf("languageChanging")>-1&&n.services.backendConnector.backend&&n.isLanguageChangingTo&&!a(n.isLanguageChangingTo,e))return!1}}),dc=e=>typeof e=="string",z_=e=>typeof e=="object"&&e!==null});var _he,Lhe,Rhe,U_,V_=de(()=>{_he=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Lhe={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"\xA9","&#169;":"\xA9","&reg;":"\xAE","&#174;":"\xAE","&hellip;":"\u2026","&#8230;":"\u2026","&#x2F;":"/","&#47;":"/"},Rhe=e=>Lhe[e],U_=e=>e.replace(_he,Rhe)});var q_,QC,e0,t0=de(()=>{V_();q_={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:U_,transDefaultProps:void 0},QC=(e={})=>{q_={...q_,...e}},e0=()=>q_});var r8,e1,fc,uy=de(()=>{e1=e=>{r8=e},fc=()=>r8});var r0,H_=de(()=>{r0=A(Le(),1);L_();ZU();cy();t0();uy();V_()});var t1,G_=de(()=>{t0();uy();t1={type:"3rdParty",init(e){QC(e.options.react),e1(e)}}});var n8,Tf,r1,wf=de(()=>{n8=A(Le(),1);t0();uy();G_();Tf=(0,n8.createContext)(),r1=class{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(r=>{this.usedNamespaces[r]||(this.usedNamespaces[r]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}});var Mhe,a8=de(()=>{Mhe=A(Le(),1);H_();wf()});var Cf,K_=de(()=>{Cf=class extends Error{constructor(t,r,n){super(t),this.name="TranslationParserError",this.position=r,this.translationString=n,Error.captureStackTrace&&Error.captureStackTrace(this,Cf)}}});var i8,Ohe,s8,W_=de(()=>{i8={"&nbsp;":"\xA0","&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&apos;":"'","&copy;":"\xA9","&reg;":"\xAE","&trade;":"\u2122","&hellip;":"\u2026","&ndash;":"\u2013","&mdash;":"\u2014","&lsquo;":"\u2018","&rsquo;":"\u2019","&sbquo;":"\u201A","&ldquo;":"\u201C","&rdquo;":"\u201D","&bdquo;":"\u201E","&dagger;":"\u2020","&Dagger;":"\u2021","&bull;":"\u2022","&prime;":"\u2032","&Prime;":"\u2033","&lsaquo;":"\u2039","&rsaquo;":"\u203A","&sect;":"\xA7","&para;":"\xB6","&middot;":"\xB7","&ensp;":"\u2002","&emsp;":"\u2003","&thinsp;":"\u2009","&euro;":"\u20AC","&pound;":"\xA3","&yen;":"\xA5","&cent;":"\xA2","&curren;":"\xA4","&times;":"\xD7","&divide;":"\xF7","&minus;":"\u2212","&plusmn;":"\xB1","&ne;":"\u2260","&le;":"\u2264","&ge;":"\u2265","&asymp;":"\u2248","&equiv;":"\u2261","&infin;":"\u221E","&int;":"\u222B","&sum;":"\u2211","&prod;":"\u220F","&radic;":"\u221A","&part;":"\u2202","&permil;":"\u2030","&deg;":"\xB0","&micro;":"\xB5","&larr;":"\u2190","&uarr;":"\u2191","&rarr;":"\u2192","&darr;":"\u2193","&harr;":"\u2194","&crarr;":"\u21B5","&lArr;":"\u21D0","&uArr;":"\u21D1","&rArr;":"\u21D2","&dArr;":"\u21D3","&hArr;":"\u21D4","&alpha;":"\u03B1","&beta;":"\u03B2","&gamma;":"\u03B3","&delta;":"\u03B4","&epsilon;":"\u03B5","&zeta;":"\u03B6","&eta;":"\u03B7","&theta;":"\u03B8","&iota;":"\u03B9","&kappa;":"\u03BA","&lambda;":"\u03BB","&mu;":"\u03BC","&nu;":"\u03BD","&xi;":"\u03BE","&omicron;":"\u03BF","&pi;":"\u03C0","&rho;":"\u03C1","&sigma;":"\u03C3","&tau;":"\u03C4","&upsilon;":"\u03C5","&phi;":"\u03C6","&chi;":"\u03C7","&psi;":"\u03C8","&omega;":"\u03C9","&Alpha;":"\u0391","&Beta;":"\u0392","&Gamma;":"\u0393","&Delta;":"\u0394","&Epsilon;":"\u0395","&Zeta;":"\u0396","&Eta;":"\u0397","&Theta;":"\u0398","&Iota;":"\u0399","&Kappa;":"\u039A","&Lambda;":"\u039B","&Mu;":"\u039C","&Nu;":"\u039D","&Xi;":"\u039E","&Omicron;":"\u039F","&Pi;":"\u03A0","&Rho;":"\u03A1","&Sigma;":"\u03A3","&Tau;":"\u03A4","&Upsilon;":"\u03A5","&Phi;":"\u03A6","&Chi;":"\u03A7","&Psi;":"\u03A8","&Omega;":"\u03A9","&Agrave;":"\xC0","&Aacute;":"\xC1","&Acirc;":"\xC2","&Atilde;":"\xC3","&Auml;":"\xC4","&Aring;":"\xC5","&AElig;":"\xC6","&Ccedil;":"\xC7","&Egrave;":"\xC8","&Eacute;":"\xC9","&Ecirc;":"\xCA","&Euml;":"\xCB","&Igrave;":"\xCC","&Iacute;":"\xCD","&Icirc;":"\xCE","&Iuml;":"\xCF","&ETH;":"\xD0","&Ntilde;":"\xD1","&Ograve;":"\xD2","&Oacute;":"\xD3","&Ocirc;":"\xD4","&Otilde;":"\xD5","&Ouml;":"\xD6","&Oslash;":"\xD8","&Ugrave;":"\xD9","&Uacute;":"\xDA","&Ucirc;":"\xDB","&Uuml;":"\xDC","&Yacute;":"\xDD","&THORN;":"\xDE","&szlig;":"\xDF","&agrave;":"\xE0","&aacute;":"\xE1","&acirc;":"\xE2","&atilde;":"\xE3","&auml;":"\xE4","&aring;":"\xE5","&aelig;":"\xE6","&ccedil;":"\xE7","&egrave;":"\xE8","&eacute;":"\xE9","&ecirc;":"\xEA","&euml;":"\xEB","&igrave;":"\xEC","&iacute;":"\xED","&icirc;":"\xEE","&iuml;":"\xEF","&eth;":"\xF0","&ntilde;":"\xF1","&ograve;":"\xF2","&oacute;":"\xF3","&ocirc;":"\xF4","&otilde;":"\xF5","&ouml;":"\xF6","&oslash;":"\xF8","&ugrave;":"\xF9","&uacute;":"\xFA","&ucirc;":"\xFB","&uuml;":"\xFC","&yacute;":"\xFD","&thorn;":"\xFE","&yuml;":"\xFF","&iexcl;":"\xA1","&iquest;":"\xBF","&fnof;":"\u0192","&circ;":"\u02C6","&tilde;":"\u02DC","&OElig;":"\u0152","&oelig;":"\u0153","&Scaron;":"\u0160","&scaron;":"\u0161","&Yuml;":"\u0178","&ordf;":"\xAA","&ordm;":"\xBA","&macr;":"\xAF","&acute;":"\xB4","&cedil;":"\xB8","&sup1;":"\xB9","&sup2;":"\xB2","&sup3;":"\xB3","&frac14;":"\xBC","&frac12;":"\xBD","&frac34;":"\xBE","&spades;":"\u2660","&clubs;":"\u2663","&hearts;":"\u2665","&diams;":"\u2666","&loz;":"\u25CA","&oline;":"\u203E","&frasl;":"\u2044","&weierp;":"\u2118","&image;":"\u2111","&real;":"\u211C","&alefsym;":"\u2135"},Ohe=new RegExp(Object.keys(i8).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),"g"),s8=e=>e.replace(Ohe,t=>i8[t]).replace(/&#(\d+);/g,(t,r)=>String.fromCharCode(parseInt(r,10))).replace(/&#x([0-9a-fA-F]+);/g,(t,r)=>String.fromCharCode(parseInt(r,16)))});var o8,X_=de(()=>{o8=e=>{let t=[],r=0,n="",a=()=>{n&&(t.push({type:"Text",value:n,position:r-n.length}),n="")};for(;r<e.length;){let i=e[r];if(i==="<"){let s=e.slice(r).match(/^<(\d+)>/);if(s)a(),t.push({type:"TagOpen",value:s[0],position:r,tagNumber:parseInt(s[1],10)}),r+=s[0].length;else{let o=e.slice(r).match(/^<\/(\d+)>/);o?(a(),t.push({type:"TagClose",value:o[0],position:r,tagNumber:parseInt(o[1],10)}),r+=o[0].length):(n+=i,r+=1)}}else n+=i,r+=1}return a(),t}});var n0,Fhe,l8,c8=de(()=>{n0=A(Le(),1);K_();X_();W_();Fhe=(e,t,r)=>{let{type:n,props:a={}}=e;if(a.children&&Array.isArray(a.children)&&r){let{children:i,...s}=a;return n0.default.createElement(n,s,...t)}return t.length===0?n0.default.createElement(n,a):t.length===1?n0.default.createElement(n,a,t[0]):n0.default.createElement(n,a,...t)},l8=(e,t=[])=>{if(!e)return[];let r=o8(e),n=[],a=[],i=new Set,s=()=>{if(a.length===0)return t;let o=a[a.length-1];return o.declaration.props?.children&&Array.isArray(o.declaration.props.children)?o.declaration.props.children:o.declarations};if(r.forEach(o=>{switch(o.type){case"Text":{let l=s8(o.value);(a.length>0?a[a.length-1].children:n).push(l)}break;case"TagOpen":{let{tagNumber:l}=o,c=s(),u=c[l];if(!u){i.add(l);let d=`<${l}>`;(a.length>0?a[a.length-1].children:n).push(d);break}a.push({tagNumber:l,children:[],position:o.position,declaration:u,declarations:c})}break;case"TagClose":{let{tagNumber:l}=o;if(i.has(l)){let f=`</${l}>`;(a.length>0?a[a.length-1].children:n).push(f),i.delete(l);break}if(a.length===0)throw new Cf(`Unexpected closing tag </${l}> at position ${o.position}`,o.position,e);let c=a.pop();if(c.tagNumber!==l)throw new Cf(`Mismatched tags: expected </${c.tagNumber}> but got </${l}> at position ${o.position}`,o.position,e);let u=Fhe(c.declaration,c.children,c.declarations);(a.length>0?a[a.length-1].children:n).push(u)}break}}),a.length>0){let o=a[a.length-1];throw new Cf(`Unclosed tag <${o.tagNumber}> at position ${o.position}`,o.position,e)}return n}});var u8=de(()=>{K_();W_();X_();c8()});function n1({i18nKey:e,defaultTranslation:t,content:r,ns:n,values:a={},i18n:i,t:s}){let o=i||fc();if(!o)return ly(o,"NO_I18NEXT_INSTANCE","IcuTrans: You need to pass in an i18next instance using i18nextReactModule",{i18nKey:e}),Mm.default.createElement(Mm.default.Fragment,{},t);let l=s||o.t?.bind(o)||(f=>f),c=n||l.ns||o.options?.defaultNS;c=dc(c)?[c]:c||["translation"];let u=a;o.options?.interpolation?.defaultVariables&&(u=a&&Object.keys(a).length>0?{...a,...o.options.interpolation.defaultVariables}:{...o.options.interpolation.defaultVariables});let d=l(e,{defaultValue:t,...u,ns:c});try{let f=l8(d,r);return Mm.default.createElement(Mm.default.Fragment,{},...f)}catch(f){return JC(o,"ICU_TRANS_RENDER_ERROR",`IcuTrans component error for key "${e}": ${f.message}`,{i18nKey:e,error:f}),Mm.default.createElement(Mm.default.Fragment,{},d)}}var Mm,Y_=de(()=>{Mm=A(Le(),1);cy();uy();u8();n1.displayName="IcuTransWithoutContext"});function f8({i18nKey:e,defaultTranslation:t,content:r,ns:n,values:a={},i18n:i,t:s}){let{i18n:o,defaultNS:l}=(0,d8.useContext)(Tf)||{},c=i||o||fc(),u=s||c?.t.bind(c);return n1({i18nKey:e,defaultTranslation:t,content:r,ns:n||u?.ns||l||c?.options?.defaultNS,values:a,i18n:c,t:s})}var d8,p8=de(()=>{d8=A(Le(),1);Y_();wf();f8.displayName="IcuTrans"});var h8=ae(m8=>{"use strict";var dy=Le();function Bhe(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var $he=typeof Object.is=="function"?Object.is:Bhe,jhe=dy.useState,zhe=dy.useEffect,Uhe=dy.useLayoutEffect,Vhe=dy.useDebugValue;function qhe(e,t){var r=t(),n=jhe({inst:{value:r,getSnapshot:t}}),a=n[0].inst,i=n[1];return Uhe(function(){a.value=r,a.getSnapshot=t,J_(a)&&i({inst:a})},[e,r,t]),zhe(function(){return J_(a)&&i({inst:a}),e(function(){J_(a)&&i({inst:a})})},[e]),Vhe(r),r}function J_(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!$he(e,r)}catch{return!0}}function Hhe(e,t){return t()}var Ghe=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Hhe:qhe;m8.useSyncExternalStore=dy.useSyncExternalStore!==void 0?dy.useSyncExternalStore:Ghe});var y8=ae((Kdt,g8)=>{"use strict";g8.exports=h8()});var ki,x8,Khe,Whe,Xhe,Ve,a1=de(()=>{ki=A(Le(),1),x8=A(y8(),1);wf();cy();Khe=(e,t)=>dc(t)?t:z_(t)&&dc(t.defaultValue)?t.defaultValue:Array.isArray(e)?e[e.length-1]:e,Whe={t:Khe,ready:!1},Xhe=()=>()=>{},Ve=(e,t={})=>{let{i18n:r}=t,{i18n:n,defaultNS:a}=(0,ki.useContext)(Tf)||{},i=r||n||fc();i&&!i.reportNamespaces&&(i.reportNamespaces=new r1),i||ly(i,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");let s=(0,ki.useMemo)(()=>({...e0(),...i?.options?.react,...t}),[i,t]),{useSuspense:o,keyPrefix:l}=s,c=e||a||i?.options?.defaultNS,u=dc(c)?[c]:c||["translation"],d=(0,ki.useMemo)(()=>u,u);i?.reportNamespaces?.addUsedNamespaces?.(d);let f=(0,ki.useRef)(0),p=(0,ki.useCallback)(_=>{if(!i)return Xhe;let{bindI18n:O,bindI18nStore:D}=s,W=()=>{f.current+=1,_()};return O&&i.on(O,W),D&&i.store.on(D,W),()=>{O&&O.split(" ").forEach(Z=>i.off(Z,W)),D&&D.split(" ").forEach(Z=>i.store.off(Z,W))}},[i,s]),m=(0,ki.useRef)(),h=(0,ki.useCallback)(()=>{if(!i)return Whe;let _=!!(i.isInitialized||i.initializedStoreOnce)&&d.every(Q=>t8(Q,i,s)),O=t.lng||i.language,D=f.current,W=m.current;if(W&&W.ready===_&&W.lng===O&&W.keyPrefix===l&&W.revision===D)return W;let me={t:i.getFixedT(O,s.nsMode==="fallback"?d:d[0],l),ready:_,lng:O,keyPrefix:l,revision:D};return m.current=me,me},[i,d,l,s,t.lng]),[x,g]=(0,ki.useState)(0),{t:y,ready:b}=(0,x8.useSyncExternalStore)(p,h,h);(0,ki.useEffect)(()=>{if(i&&!b&&!o){let _=()=>g(O=>O+1);t.lng?j_(i,t.lng,d,_):ZC(i,d,_)}},[i,t.lng,d,b,o,x]);let S=i||{},w=(0,ki.useRef)(null),E=(0,ki.useRef)(),C=_=>{let O=Object.getOwnPropertyDescriptors(_);O.__original&&delete O.__original;let D=Object.create(Object.getPrototypeOf(_),O);if(!Object.prototype.hasOwnProperty.call(D,"__original"))try{Object.defineProperty(D,"__original",{value:_,writable:!1,enumerable:!1,configurable:!1})}catch{}return D},N=(0,ki.useMemo)(()=>{let _=S,O=_?.language,D=_;_&&(w.current&&w.current.__original===_?E.current!==O?(D=C(_),w.current=D,E.current=O):D=w.current:(D=C(_),w.current=D,E.current=O));let W=[y,D,b];return W.t=y,W.i18n=D,W.ready=b,W},[y,S,b,S.resolvedLanguage,S.language,S.languages]);if(i&&o&&!b)throw new Promise(_=>{let O=()=>_();t.lng?j_(i,t.lng,d,O):ZC(i,d,O)});return N}});var b8,v8=de(()=>{b8=A(Le(),1);a1();cy()});var S8=de(()=>{a1()});var T8,w8=de(()=>{T8=A(Le(),1);wf()});var Jhe,Z_=de(()=>{Jhe=A(Le(),1);wf()});var ege,C8=de(()=>{ege=A(Le(),1);Z_();wf();cy()});var tr=de(()=>{a8();H_();p8();Y_();a1();v8();S8();w8();C8();Z_();G_();t0();uy();wf()});var P8,E8=de(()=>{P8={Actions:{Save:"\u4FDD\u5B58",Cancel:"\u53D6\u6D88",Confirm:"\u786E\u5B9A",Refresh:"\u5237\u65B0",Edit:"\u7F16\u8F91",Back:"\u8FD4\u56DE",Update:"\u66F4\u65B0",Clear:"\u6E05\u9664",Delete:"\u5220\u9664",StopTranslate:"\u505C\u6B62\u7FFB\u8BD1"},Status:{Success:"\u6210\u529F",Failure:"\u5931\u8D25",Loading:"\u52A0\u8F7D\u4E2D...",Reloading:"\u91CD\u8F7D\u4E2D...",Unknown:"\u672A\u77E5",Error:"\u9519\u8BEF",Ready:"\u5C31\u7EEA"},Labels:{I18n:"I18N",Themes:"\u4E3B\u9898",Plugins:"\u63D2\u4EF6",GithubUser:"GitHub \u7528\u6237",Mtime:"\u4FEE\u6539\u65F6\u95F4",Optional:"\u53EF\u9009",Or:"\u6216",NoPlugins:"\u6682\u65E0\u63D2\u4EF6",UpdatePrefix:"\u66F4\u65B0\u4E8E",Filter:"\u7B5B\u9009"},Filters:{All:"\u5168\u90E8",Translated:"\u5DF2\u7FFB\u8BD1",Untranslated:"\u672A\u7FFB\u8BD1",Applied:"\u5DF2\u5E94\u7528"},Notices:{Success:"\u6210\u529F",Failure:"\u5931\u8D25",Clear:"\u6E05\u7A7A",SaveSuccess:"\u4FDD\u5B58\u6210\u529F",SaveFail:"\u4FDD\u5B58\u5931\u8D25",SaveFailPath:"\u4FDD\u5B58\u5931\u8D25\uFF1A\u672A\u627E\u5230\u6709\u6548\u7684\u5B58\u50A8\u8DEF\u5F84",DeleteSuccess:"\u5220\u9664\u6210\u529F",TaskStopped:"\u4EFB\u52A1\u5DF2\u505C\u6B62",BatchTranslateSuccess:"\u6279\u91CF\u7FFB\u8BD1\u5B8C\u6210\uFF01",TranslateFail:"\u7FFB\u8BD1\u5931\u8D25: {{message}}",NoItemsToTranslate:"\u6CA1\u6709\u9700\u8981\u7FFB\u8BD1\u7684\u6761\u76EE",ThemeNotFound:"\u672A\u627E\u5230\u4E3B\u9898",MainNotFound:"\u672A\u627E\u5230\u6587\u4EF6 {{file}}",TaskCancelled:"\u7FFB\u8BD1\u4EFB\u52A1\u5DF2\u53D6\u6D88",Perfect:"\u72B6\u6001\u826F\u597D",NoErrors:"\u6682\u672A\u53D1\u73B0\u95EE\u9898"},Placeholders:{Search:"\u8F93\u5165\u641C\u7D22\u5173\u952E\u8BCD..."},Data:{SortAsc:"\u6B63\u5E8F",SortDesc:"\u5012\u5E8F"},Pagination:{Label:"\u5206\u9875\u5BFC\u822A",Prev:"\u4E0A\u4E00\u9875",Next:"\u4E0B\u4E00\u9875"},MoreExpect:"\u66F4\u591A\u671F\u5F85"}});var I8,A8=de(()=>{I8={Common:{Titles:{Main:"i18n \u7BA1\u7406\u4E2D\u5FC3"},Actions:{Search:"\u641C\u7D22",MoreActions:"\u66F4\u591A\u9009\u9879",Sponsor:"\u652F\u6301\u4F5C\u8005",Help:"\u4F7F\u7528\u5E2E\u52A9",HelpDoc:"\u5B98\u65B9\u6587\u6863\u6559\u7A0B",Cloud:"\u4E91\u7AEF\u8BD1\u6587",Settings:"\u7EFC\u5408\u8BBE\u7F6E",SelectSource:"\u9009\u62E9\u6570\u636E\u6E90",Apply:"\u5E94\u7528",Restore:"\u8FD8\u539F",Edit:"\u7F16\u8F91\u8BD1\u6587",Delete:"\u5220\u9664\u8BD1\u6587",OpenFolder:"\u6D4F\u89C8\u76EE\u5F55"},Placeholders:{SearchPlaceholder:"\u8F93\u5165\u641C\u7D22\u5173\u952E\u8BCD..."},Filters:{All:"\u5168\u90E8"},Labels:{Author:"\u4F5C\u8005"},Status:{Labels:{pending:"\u7B49\u5F85\u4E2D",processing:"\u5904\u7406\u4E2D",success:"\u5E94\u7528\u6210\u529F",found:"\u5DF2\u53D1\u73B0\u5339\u914D",skipped:"\u5DF2\u8DF3\u8FC7",error:"\u4EFB\u52A1\u5931\u8D25",discovered:"\u5F85\u5BA1\u9605",discovered_new:"\u53D1\u73B0\u65B0\u8BD1\u6587",discovered_update:"\u53D1\u73B0\u7248\u672C\u66F4\u65B0",up_to_date:"\u5DF2\u662F\u6700\u65B0",applied:"\u5DF2\u5E94\u7528",plugin:"\u63D2\u4EF6",theme:"\u4E3B\u9898",DiscoveryNotice:"\u53D1\u73B0\u66F4\u65B0\u65F6\u901A\u77E5",AutoApply:"\u627E\u5230\u5339\u914D\u540E\u81EA\u52A8\u5E94\u7528 (\u4E0D\u63A8\u8350)",SilentMode:"\u5B8C\u5168\u9759\u9ED8\u6A21\u5F0F",MatchStrategy:"\u5339\u914D\u4F18\u9009\u7B56\u7565",MatchStrategies:{comprehensive:"\u7EFC\u5408\u4F18\u9009 (\u63A8\u8350)",version_first:"\u7248\u672C\u6700\u63A5\u8FD1\u4F18\u5148",popularity:"\u793E\u533A\u70ED\u5EA6\u4F18\u5148",latest_update:"\u6700\u65B0\u7FFB\u8BD1\u4F18\u5148"}}},Errors:{Error:"\u9519\u8BEF",ErrorDesc:"\u8BD1\u6587\u89E3\u6790\u5F02\u5E38",FetchCommunityDataFailed:"\u83B7\u53D6\u793E\u533A\u6CE8\u518C\u8868\u6570\u636E\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u7F51\u7EDC",SyncFailed:"\u4E2D\u5FC3\u5E93\u540C\u6B65\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u7F51\u7EDC\u6216 Token \u6743\u9650",InvalidRepo:"\u65E0\u6548\u7684\u4ED3\u5E93\u5730\u5740\uFF0C\u8BF7\u786E\u4FDD\u683C\u5F0F\u4E3A owner/repo"},Notices:{ApplySuccess:"\u7FFB\u8BD1\u5E94\u7528\u6210\u529F",CopySuccess:"Registry JSON \u5DF2\u590D\u5236\u5230\u526A\u8D34\u677F",SyncSuccess:"\u4E2D\u5FC3\u5E93\u6CE8\u518C\u8868\u540C\u6B65\u6210\u529F\uFF01"}},Plugins:{TabName:"\u63D2\u4EF6",Actions:{Extract:"\u63D0\u53D6\u8BD1\u6587",OpenSettings:"\u63D2\u4EF6\u8BBE\u7F6E",Reload:"\u91CD\u8F7D\u63D2\u4EF6",GoToEditor:"\u524D\u5F80\u7F16\u8F91\u5668",ContinueApply:"\u575A\u6301\u5E94\u7528"},Placeholders:{SearchPlugins:"\u641C\u7D22\u63D2\u4EF6..."},Filters:{Applied:"\u5DF2\u5E94\u7528",Unapplied:"\u672A\u5E94\u7528",Translated:"\u5DF2\u7FFB\u8BD1",Untranslated:"\u672A\u7FFB\u8BD1",ToExtract:"\u5F85\u63D0\u53D6"},Labels:{Auto:"\u81EA\u52A8",Admin:"\u7BA1\u7406",Mtime:"\u6700\u540E\u66F4\u65B0",SupportVer:"\u652F\u6301\u7248\u672C"},Status:{NoPlugins:"\u672A\u53D1\u73B0\u63D2\u4EF6",On:"\u5DF2\u542F\u7528",Off:"\u5DF2\u7981\u7528",Applied:"\u5DF2\u5E94\u7528",Unapplied:"\u672A\u5E94\u7528",Translated:"\u5DF2\u7FFB\u8BD1",Untranslated:"\u672A\u7FFB\u8BD1",ToExtract:"\u5F85\u63D0\u53D6",NoTrans:"\u672A\u7FFB\u8BD1",Reloading:"\u91CD\u8F7D\u4E2D..."},Dialogs:{EmptyTranslationTitle:"\u672A\u68C0\u6D4B\u5230\u7FFB\u8BD1\u5185\u5BB9",EmptyTranslationDesc:"\u5F53\u524D\u9009\u62E9\u7684\u7FFB\u8BD1\u6E90\u5C1A\u672A\u8FDB\u884C\u4EFB\u4F55\u5B9E\u8D28\u6027\u7FFB\u8BD1\uFF08\u8BD1\u6587\u4E0E\u539F\u6587\u5B8C\u5168\u4E00\u81F4\uFF09\u3002\u5E94\u7528\u6B64\u6587\u4EF6\u540E\uFF0C\u63D2\u4EF6\u754C\u9762\u8BED\u8A00\u5C06\u4E0D\u4F1A\u53D1\u751F\u4EFB\u4F55\u53D8\u5316\u3002\u5EFA\u8BAE\u60A8\u5148\u5728\u7F16\u8F91\u5668\u4E2D\u5B8C\u6210\u7FFB\u8BD1\u540E\u518D\u5E94\u7528\u3002"},Hints:{NoTransDesc:"\u6682\u65E0\u672C\u5730\u8BED\u8A00\u6570\u636E",ExtractSuccessDesc:"\u5DF2\u751F\u6210\u5F53\u524D\u7248\u672C\u7684\u7FFB\u8BD1\u6A21\u677F"},Errors:{ReloadPluginFailed:"\u63D2\u4EF6\u91CD\u542F\u5931\u8D25: {{error}}",ReloadFailed:"\u63D2\u4EF6\u91CD\u8F7D\u5931\u8D25: {{error}}",PluginNotEnabled:"\u63D2\u4EF6\u672A\u542F\u7528",LoadFailedAfterApply:"\u63D2\u4EF6\u91CD\u8F7D\u5931\u8D25\uFF0C\u53EF\u80FD\u662F\u6E90\u7801\u5B58\u5728\u8FD0\u884C\u65F6\u9519\u8BEF\u3002\u8BF7\u6309 Ctrl+Shift+I \u6253\u5F00\u63A7\u5236\u53F0\u67E5\u770B\u5177\u4F53\u62A5\u9519\u5806\u6808\u3002",SyntaxError:"JavaScript \u8BED\u6CD5\u635F\u574F\uFF0C\u5DF2\u7EC8\u6B62\u5E94\u7528: {{file}}",MainNotFound:"\u672A\u627E\u5230 main.js \u6587\u4EF6",BackupNotFound:"\u5907\u4EFD\u6587\u4EF6\u4E0D\u5B58\u5728\uFF0C\u65E0\u6CD5\u8FD8\u539F",PluginProcessFailed:"\u5904\u7406\u63D2\u4EF6 {{id}} \u65F6\u51FA\u9519"},Notices:{ApplyPluginSuccess:"{{id}} \u7FFB\u8BD1\u5E94\u7528\u6210\u529F",ReloadPlugin:"\u51C6\u5907\u91CD\u542F\u63D2\u4EF6: {{id}}",ReloadSuccess:"\u63D2\u4EF6\u91CD\u8F7D\u6210\u529F",ExtractSuccess:"\u63D0\u53D6\u6210\u529F"}},Themes:{TabName:"\u4E3B\u9898",Placeholders:{SearchThemes:"\u641C\u7D22\u4E3B\u9898..."},Labels:{ThemeActive:"\u5F53\u524D\u4E3B\u9898",Auto:"\u81EA\u52A8",Admin:"\u7BA1\u7406",Mtime:"\u6700\u540E\u66F4\u65B0",SupportVer:"\u652F\u6301\u7248\u672C"},Filters:{Applied:"\u5DF2\u5E94\u7528",Unapplied:"\u672A\u5E94\u7528",Translated:"\u5DF2\u7FFB\u8BD1",Untranslated:"\u672A\u7FFB\u8BD1",ToExtract:"\u5F85\u63D0\u53D6"},Status:{NoThemes:"\u672A\u53D1\u73B0\u4E3B\u9898",On:"\u5DF2\u542F\u7528",Off:"\u5DF2\u7981\u7528",Applied:"\u5DF2\u5E94\u7528",Unapplied:"\u672A\u5E94\u7528",Translated:"\u5DF2\u7FFB\u8BD1",Untranslated:"\u672A\u7FFB\u8BD1",ToExtract:"\u5F85\u63D0\u53D6",NoTrans:"\u672A\u7FFB\u8BD1",Reloading:"\u91CD\u8F7D\u4E2D..."},Dialogs:{EmptyTranslationTitle:"\u672A\u68C0\u6D4B\u5230\u7FFB\u8BD1\u5185\u5BB9",EmptyTranslationDesc:"\u5F53\u524D\u9009\u62E9\u7684\u7FFB\u8BD1\u6E90\u5C1A\u672A\u8FDB\u884C\u4EFB\u4F55\u5B9E\u8D28\u6027\u7FFB\u8BD1\uFF08\u8BD1\u6587\u4E0E\u539F\u6587\u5B8C\u5168\u4E00\u81F4\uFF09\u3002\u5E94\u7528\u6B64\u6587\u4EF6\u540E\uFF0C\u63D2\u4EF6\u754C\u9762\u8BED\u8A00\u5C06\u4E0D\u4F1A\u53D1\u751F\u4EFB\u4F55\u53D8\u5316\u3002\u5EFA\u8BAE\u60A8\u5148\u5728\u7F16\u8F91\u5668\u4E2D\u5B8C\u6210\u7FFB\u8BD1\u540E\u518D\u5E94\u7528\u3002"},Errors:{ThemeCssNotFound:"\u672A\u627E\u5230 theme.css \u6587\u4EF6",NoSettingsBlock:"\u672A\u627E\u5230 @settings \u5757\uFF0C\u65E0\u53EF\u7FFB\u8BD1\u5185\u5BB9",BackupNotFound:"\u5907\u4EFD\u6587\u4EF6\u4E0D\u5B58\u5728\uFF0C\u65E0\u6CD5\u8FD8\u539F"},Notices:{ThemeExtractPrefix:"\u63D0\u53D6\u8BD1\u6587",ThemeApplyPrefix:"\u4E3B\u9898\u5E94\u7528",ThemeRestorePrefix:"\u4E3B\u9898\u8FD8\u539F"}},Sources:{TabName:"\u7BA1\u7406",Table:{Name:"\u7FFB\u8BD1\u540D\u79F0/\u63D2\u4EF6",Id:"\u6E90 ID",Origin:"\u6765\u6E90",Mtime:"\u66F4\u65B0\u65F6\u95F4",Type:"\u7C7B\u578B",Actions:"\u64CD\u4F5C"},Status:{NotInstalled:"\u63D2\u4EF6\u7F3A\u5931",ThemeNotInstalled:"\u4E3B\u9898\u7F3A\u5931"},Actions:{Export:"\u5BFC\u51FA",Import:"\u5BFC\u5165",BatchDelete:"\u5220\u9664",SelectUninstalled:"\u5F02\u5E38\u9879",DeleteConfirm:"\u786E\u5B9A\u8981\u5220\u9664\u9009\u4E2D\u7684 {{count}} \u9879\u8BD1\u6587\u5417\uFF1F\u6B64\u64CD\u4F5C\u4E0D\u53EF\u64A4\u9500\u3002",ImportSuccess:"\u6210\u529F\u5BFC\u5165 {{count}} \u9879\u8BD1\u6587",ExportSuccess:"\u8BD1\u6587\u5BFC\u51FA\u6210\u529F",SelectAll:"\u5168\u9009"},Filters:{SearchPlaceholder:"\u641C\u7D22\u7FFB\u8BD1\u6216\u63D2\u4EF6...",OriginLocal:"\u672C\u5730\u63D0\u53D6",OriginCloud:"\u4E91\u7AEF\u4E0B\u8F7D"},Stats:{Total:"\u603B\u8BD1\u6587\u6570",Selected:"\u5DF2\u9009\u4E2D"}},Auto:{TabName:"\u81EA\u52A8\u5316",Title:"\u81EA\u52A8\u5316\u670D\u52A1",Desc:"\u667A\u80FD\u63A2\u6D4B\u53EF\u7528\u7684\u63D2\u4EF6\u7FFB\u8BD1\u5E76\u8FDB\u884C\u5B89\u5168\u5BA1\u9605\u3002",Discovery:{Title:"\u53D1\u73B0\u66F4\u65B0",ReviewAction:"\u5BA1\u9605\u5E76\u5E94\u7528",IgnoreAction:"\u5FFD\u7565\u6B64\u66F4\u65B0",SafetyWarning:"\u5B89\u5168\u63D0\u9192\uFF1A\u6B64\u7FFB\u8BD1\u6765\u81EA\u793E\u533A\u4ED3\u5E93\uFF0C\u5EFA\u8BAE\u5728\u5E94\u7528\u524D\u786E\u8BA4\u6765\u6E90\u53EF\u9760\u6027\u3002",NewSource:"\u65B0\u6765\u6E90 (\u9996\u6B21\u53D1\u73B0)",HashChanged:"\u5185\u5BB9\u5DF2\u53D8\u66F4 (Hash \u4E0D\u4E00\u81F4)",TrustScore:"\u6C49\u5316\u4FE1\u8A89\u8BC4\u5206",ScoreBreakdown:{Title:"\u5339\u914D\u8D28\u91CF\u8BC4\u5206",Version:"\u7248\u672C\u517C\u5BB9",Popularity:"\u793E\u533A\u8BA4\u53EF",Freshness:"\u66F4\u65B0\u9C9C\u6D3B"}},Filters:{Title:"\u4EFB\u52A1\u7B5B\u9009"},Scoping:{Title:"\u63A2\u6D4B\u8303\u56F4"},History:{Title:"\u5B89\u5168\u5BA1\u8BA1\u65E5\u5FD7",Empty:"\u6682\u65E0\u64CD\u4F5C\u8BB0\u5F55",BatchHeader:"\u6267\u884C\u6279\u6B21\uFF1A{{id}}",TriggerDiscovery:"\u540E\u53F0\u63A2\u6D4B",TriggerManual:"\u624B\u52A8\u6267\u884C",TriggerStartup:"\u542F\u52A8\u81EA\u68C0"},Actions:{StartAuto:"\u63A2\u6D4B\u626B\u63CF",ReviewAll:"\u5168\u90E8\u5BA1\u9605\u5E76\u5E94\u7528",OneClickReview:"\u4E00\u952E\u5BA1\u9605"},Modes:{Incremental:"\u589E\u91CF\u63A2\u6D4B",Full:"\u5168\u91CF\u626B\u63CF"},Status:{Analyzing:"\u6B63\u5728\u5206\u6790\u4E91\u7AEF\u4ED3\u5E93...",AutoStarting:"\u6B63\u5728\u542F\u52A8\u5B89\u5168\u63A2\u6D4B...",ScanningInstalled:"\u6B63\u5728\u626B\u63CF\u5DF2\u5B89\u88C5\u9879 ({{count}})...",Running:"\u6B63\u5728\u63A2\u6D4B\u66F4\u65B0...",DiscoveryComplete:"\u63A2\u6D4B\u5B8C\u6210\uFF0C\u53D1\u73B0 {{count}} \u9879\u5F85\u5BA1\u9605",NoLogs:"\u6682\u65E0\u626B\u63CF\u7ED3\u679C\u8BB0\u5F55",AutoRollbacked:"\u8FD0\u884C\u5F02\u5E38\u5DF2\u81EA\u52A8\u56DE\u6EDA",BatchApply:"\u6279\u91CF\u5E94\u7528\u53D1\u73B0",BatchComplete:"\u6279\u91CF\u4EFB\u52A1\u5DF2\u7ED3\u675F: \u6210\u529F {{success}}, \u5931\u8D25 {{fail}}",SkipReasons:{Exclusion:"\u63D2\u4EF6\u5DF2\u52A0\u5165\u6392\u9664\u540D\u5355",NoMatch:"\u6240\u6709\u4FE1\u4EFB\u6E90\u4E2D\u5747\u65E0\u8BE5\u63D2\u4EF6\u8BB0\u5F55",NoVersion:"\u672A\u627E\u5230\u7B26\u5408\u8FC7\u6EE4\u6761\u4EF6\u7684\u6C49\u5316\u7248\u672C"}},QuickSettings:{Title:"\u81EA\u52A8\u5316\u7B56\u7565",AutoApply:"\u81EA\u52A8\u5E94\u7528\u7FFB\u8BD1",DiscoveryNotice:"\u540E\u53F0\u63A2\u6D4B\u4E0E\u901A\u77E5",CheckInterval:"\u63A2\u6D4B\u5468\u671F",Hours:"\u5C0F\u65F6"},Stats:{Health:"\u6C49\u5316\u5065\u5EB7\u5EA6",VaultStatus:"\u6C49\u5316\u72B6\u6001",TotalInstalled:"\u5DF2\u5B89\u88C5\u603B\u6570",AppliedCount:"\u7D2F\u8BA1\u7FFB\u8BD1\u5E94\u7528",CurrentSuccess:"\u672C\u6B21\u6210\u529F",CurrentSkipped:"\u672C\u6B21\u8DF3\u8FC7/\u5931\u8D25",Plugins:"\u63D2\u4EF6",Themes:"\u4E3B\u9898",LastCheckTime:"\u4E0A\u6B21\u68C0\u67E5\uFF1A{{time}}"},Errors:{NoCachedManifest:"\u672A\u627E\u5230\u8BE5\u63D2\u4EF6\u7684\u7F13\u5B58\u6E05\u5355",NoBestMatch:"\u6700\u4F73\u5339\u914D\u5DF2\u4E0D\u53EF\u7528",LocalApplyFailed:"\u672C\u5730\u5E94\u7528\u5931\u8D25",DownloadApplyFailed:"\u4E0B\u8F7D\u6216\u5E94\u7528\u5931\u8D25",BatchApplyFailed:"\u6279\u91CF\u5E94\u7528\u5931\u8D25"},Repos:{Title:"\u53D7\u4FE1\u4EFB\u7684\u4ED3\u5E93",AddPlaceholder:"\u6DFB\u52A0\u4ED3\u5E93 (owner/repo)...",Empty:"\u6682\u65E0\u53D7\u4FE1\u4EFB\u4ED3\u5E93",RemoveConfirm:"\u786E\u5B9A\u79FB\u9664\u8BE5\u4ED3\u5E93\u5417\uFF1F",ScanRegistry:"\u626B\u63CF\u6CE8\u518C\u8868"},Tips:{Title:"\u63D0\u793A",Desc:'\u81EA\u52A8\u5316\u626B\u63CF\u4EC5\u4F1A\u4ECE\u60A8\u4FE1\u4EFB\u7684\u4ED3\u5E93\u4E2D\u68C0\u67E5\u7FFB\u8BD1 Registry\u3002\u786E\u4FDD\u4ED3\u5E93\u5730\u5740\u683C\u5F0F\u4E3A <code className="bg-muted px-1 rounded">owner/repo</code>\u3002'}},Credits:{TabName:"\u9E23\u8C22",Title:"\u81F4\u8C22\u6240\u6709\u8D21\u732E\u8005",Subtitle:"\u611F\u8C22\u6BCF\u4E00\u4F4D\u4EE5\u4E0D\u540C\u65B9\u5F0F\u4E3A\u672C\u9879\u76EE\u4ED8\u51FA\u52AA\u529B\u7684\u4EBA\u3002",NoData:"\u6682\u672A\u52A0\u8F7D\u5230\u793E\u533A\u521B\u4F5C\u8005\u6570\u636E",StatCreators:"\u4F4D\u521B\u4F5C\u8005",StatStars:"\u4E2A\u661F\u6807",StatTranslations:"\u4EFD\u8BD1\u6587",UnitRepos:"\u4ED3\u5E93",UnitPlugins:"\u63D2\u4EF6",Footer:"\u611F\u8C22\u6240\u6709\u8D21\u732E\u8005\u7684\u65E0\u79C1\u4ED8\u51FA",ComingSoon:"\u6682\u65E0\u6570\u636E\uFF0C\u656C\u8BF7\u671F\u5F85",CatTranslation:"\u7FFB\u8BD1\u8D21\u732E\u8005",CatTranslationDesc:"\u4E3A\u63D2\u4EF6\u4E0E\u4E3B\u9898\u63D0\u4F9B\u591A\u8BED\u8A00\u7FFB\u8BD1\u7684\u793E\u533A\u6210\u5458",CatCode:"\u4EE3\u7801\u8D21\u732E\u8005",CatCodeDesc:"\u4E3A\u9879\u76EE\u63D0\u4F9B\u4EE3\u7801\u8D21\u732E\u7684\u5F00\u53D1\u8005",CatVideo:"\u89C6\u9891\u521B\u4F5C\u8005",CatVideoDesc:"\u5236\u4F5C\u6559\u7A0B\u3001\u4ECB\u7ECD\u89C6\u9891\u7684\u521B\u4F5C\u8005",CatTesting:"\u6D4B\u8BD5\u8D21\u732E\u8005",CatTestingDesc:"\u5E2E\u52A9\u53D1\u73B0\u548C\u53CD\u9988\u95EE\u9898\u7684\u6D4B\u8BD5\u4EBA\u5458",CatSuggestion:"\u5EFA\u8BAE\u8D21\u732E\u8005",CatSuggestionDesc:"\u63D0\u4F9B\u5B9D\u8D35\u610F\u89C1\u4E0E\u5EFA\u8BAE\u7684\u793E\u533A\u6210\u5458",CatSponsor:"\u7231\u53D1\u7535\u6301\u7EED\u8D5E\u52A9",CatSponsorDesc:"\u4E3A\u9879\u76EE\u6301\u7EED\u63D0\u4F9B\u7535\u529B\u7684\u91D1\u4E3B\u7238\u7238"},Admin:{TabName:"\u7BA1\u7406\u5458",Title:"\u793E\u533A\u6570\u636E\u770B\u677F",AdminControl:"\u7BA1\u7406\u5458\u63A7\u5236",Subtitle:"\u6DF1\u5EA6\u76D1\u63A7\u793E\u533A\u52A8\u6001\u4E0E\u6CE8\u518C\u8868\u6743\u91CD\u5206\u914D\u7CFB\u7EDF",SearchPlaceholder:"\u641C\u7D22\u4ED3\u5E93\u5730\u5740\u6216\u4F5C\u8005\u52CB\u7AE0...",PushToCloud:"\u63A8\u9001\u81F3\u4E91\u7AEF",ExportJson:"\u5BFC\u51FA\u6CE8\u518C\u8868 JSON",Stats:{Repos:"\u4ED3\u5E93",Stars:"\u661F\u6807",Contribs:"\u8D21\u732E\u8005",Plugins:"\u63D2\u4EF6",Translations:"\u8BCD\u6761\u7FFB\u8BD1",Commits30d:"30\u5929\u63D0\u4EA4",Langs:"\u6DB5\u76D6\u8BED\u8A00",ActivityIndex:"\u6D3B\u8DC3\u6307\u6570",Forks:"\u6D3E\u751F (Forks)",OpenIssues:"\u5F00\u653E\u8BAE\u9898",LastUpdate:"\u6700\u540E\u63A8\u9001",Size:"\u8D44\u6E90\u5360\u7528"},Leaderboard:{Title:"\u6D3B\u8DC3\u8D21\u732E\u699C",Subtitle:"\u9876\u5C16\u8D21\u732E\u8005\u4E0E\u9AD8\u6D3B\u8DC3\u5EA6\u9879\u76EE"},LanguageDistribution:{Title:"\u8BED\u8A00\u5206\u5E03\u6982\u89C8",TotalTranslations:"{{count}} \u9879\u7FFB\u8BD1"},Management:{Title:"\u4ED3\u5E93\u6CE8\u518C\u8868\u7BA1\u7406",ShowingStats:"\u5F53\u524D\u5C55\u793A {{filtered}} / {{total}} \u4E2A\u4ED3\u5E93",SyncingData:"\u6B63\u5728\u540C\u6B65\u6570\u636E\u5C42...",NoData:"\u5F53\u524D\u8F68\u9053\u672A\u53D1\u73B0\u6570\u636E",NoLicense:"\u65E0\u8BB8\u53EF\u8BC1"},Fields:{AuthorReputation:"\u4F5C\u8005\u58F0\u671B/\u52CB\u7AE0",AuthorReputationPlaceholder:"\u4F8B\u5982\uFF1A\u7FFB\u8BD1\u5DE8\u5320, \u793E\u533A\u65B0\u661F...",RegistryBadges:"\u6CE8\u518C\u8868\u6807\u7B7E (JSON)",RegistryBadgesPlaceholder:'["\u7CBE\u9009", "\u70ED\u95E8"]',FeaturedContext:"\u6DF1\u5EA6\u63A8\u8350\u7406\u7531",FeaturedContextPlaceholder:"\u5C55\u793A\u5728\u4E91\u7AEF\u9996\u9875\u7684\u6DF1\u5EA6\u63A8\u8350\u7406\u7531..."},Controls:{Official:"\u5B98\u65B9\u8BA4\u8BC1",VerifiedNode:"\u5DF2\u9A8C\u8BC1\u8282\u70B9",Featured:"\u7CBE\u9009\u63A8\u8350",HighlightedContent:"\u9AD8\u5149\u5185\u5BB9\u5C55\u793A"},ContributorsManagement:{Title:"\u8D21\u732E\u8005\u7BA1\u7406",PushToCloud:"\u63A8\u9001\u8D21\u732E\u8005",AddNew:"\u6DFB\u52A0\u8D21\u732E\u8005",Name:"\u540D\u79F0",Category:"\u7C7B\u522B",Url:"\u94FE\u63A5 URL",Github:"GitHub \u7528\u6237\u540D",Description:"\u8D21\u732E\u63CF\u8FF0",Add:"\u6DFB\u52A0",RemoveSuccess:"\u5DF2\u79FB\u9664\u8D21\u732E\u8005: {{name}}",AddSuccess:"\u5DF2\u6DFB\u52A0\u8D21\u732E\u8005: {{name}}"}}}});var N8,k8=de(()=>{N8={Titles:{Main:"\u7F16\u8F91\u5668",Sidebar:"\u64CD\u4F5C\u9762\u677F",Files:"\u8D44\u6E90\u7BA1\u7406\u5668",Stats:"\u6761\u76EE\u7EDF\u8BA1",Insert:"\u65B0\u589E\u9879",QuickActions:"\u5FEB\u6377\u64CD\u4F5C",Ai:"AI \u667A\u80FD\u7FFB\u8BD1",Ast:"AST \u7F16\u8F91",Regex:"\u8BED\u6CD5\u6821\u9A8C",Metadata:"\u5143\u6570\u636E",ContextPreview:"\u6E90\u7801\u9884\u89C8"},Labels:{SidebarViewOptions:"\u89C6\u56FE\u9009\u9879",SidebarShowCards:"\u663E\u793A\u5361\u7247",SelectLang:"\u9009\u62E9\u8BED\u8A00",CustomLang:"\u81EA\u5B9A\u4E49\u8BED\u8A00",SelectStyle:"\u9009\u62E9\u98CE\u683C",CustomStyle:"\u81EA\u5B9A\u4E49\u98CE\u683C",PluginId:"\u63D2\u4EF6ID",ThemeName:"\u4E3B\u9898\u540D\u79F0",PathLabel:"\u6587\u4EF6\u8DEF\u5F84",PathPlaceholder:"\u5982\uFF1Astyles.css \u6216 sub/file.js",Name:"\u540D\u79F0",NamePlaceholder:"\u540D\u79F0",Desc:"\u63CF\u8FF0",DescPlaceholder:"\u63CF\u8FF0",Author:"\u4F5C\u8005",Lang:"\u8BED\u8A00",SupportedVer:"\u652F\u6301\u7248\u672C",Ver:"\u7248\u672C",Source:"\u6765\u6E90",SourceCloud:"\u4E91\u7AEF",SourceLocal:"\u672C\u5730",Checksum:"\u6821\u9A8C",BatchSize:"\u6BCF\u6279\u6570\u91CF",Concurrency:"\u5E76\u53D1\u9650\u5236",Timeout:"\u8D85\u65F6 (ms)",Overwrite:"\u8986\u76D6\u73B0\u6709\u8BD1\u6587",ClickToJump:"\u70B9\u51FB\u8DF3\u8F6C\u5230\u8BE5\u884C",RealtimeCheck:"\u5B9E\u65F6\u6821\u9A8C",AutoSave:"\u81EA\u52A8\u4FDD\u5B58",FontSize:"\u5B57\u4F53\u5927\u5C0F",ParenthesesCheck:"\u62EC\u53F7\u5339\u914D",VariableCheck:"\u53D8\u91CF\u6821\u9A8C",PunctuationCheck:"\u6807\u70B9\u68C0\u67E5",ExpectedConsumption:"\u9884\u671F\u6D88\u8017",LineNumber:"\u884C {{line}}"},Actions:{BatchTranslate:"\u5F00\u59CB\u6279\u91CF\u7FFB\u8BD1 ({{count}})",Save:"\u4FDD\u5B58",IncrementalExtract:"\u589E\u91CF\u63D0\u53D6",IncrementalExtractTip:"\u4EC5\u63D0\u53D6\u65B0\u589E\u7FFB\u8BD1\u9879",IncrementalExtractDisabledTip:"\u5F53\u524D\u8BD1\u6587\u5DF2\u5E94\u7528\uFF0C\u65E0\u6CD5\u8FDB\u884C\u589E\u91CF\u63D0\u53D6",OpenFile:"\u6253\u5F00\u5F53\u524D\u6587\u4EF6",OpenFileTip:"\u5728\u5916\u90E8\u7F16\u8F91\u5668\u4E2D\u6253\u5F00\u5F53\u524D\u6587\u4EF6",Add:"\u65B0\u589E",DeleteUntranslated:"\u6E05\u7A7A\u672A\u7FFB\u8BD1\u9879",DeleteUntranslatedTip:"\u4E00\u952E\u5220\u9664\u6240\u6709\u5C1A\u672A\u586B\u5199\u8BD1\u6587\u7684\u6761\u76EE",Source:"\u6E90\u7801",Trans:"\u8BD1\u6587",Restore:"\u8FD8\u539F",RestoreAllErrors:"\u8FD8\u539F\u6240\u6709\u5F02\u5E38\u9879",Settings:"\u914D\u7F6E",Diagnose:"\u8BED\u6CD5\u8BCA\u65AD",UnusedDiagnose:"\u5197\u4F59\u8BCA\u65AD",SecurityDiagnose:"\u5B89\u5168\u626B\u63CF",ClearDiagnose:"\u6E05\u9664\u8BCA\u65AD",StartScan:"\u5F00\u59CB\u626B\u63CF",AiFix:"AI \u4FEE\u590D",AiFixTip:"\u8BA9 AI \u5C1D\u8BD5\u4FEE\u590D\u6B64\u8BD1\u6587\u7684\u8BED\u6CD5\u9519\u8BEF",ContextAware:"\u4E0A\u4E0B\u6587\u611F\u77E5",ContextAwareTip:"\u9644\u52A0\u6E90\u7801\u4E0A\u4E0B\u6587\u4EE5\u63D0\u5347\u7FFB\u8BD1\u51C6\u786E\u5EA6"},Stats:{Title:"\u6761\u76EE\u7EDF\u8BA1",Progress:"\u7FFB\u8BD1\u8FDB\u5EA6",Overview:"\u7FFB\u8BD1\u7EDF\u8BA1",TotalItems:"\u603B\u6761\u76EE\u6570",Translated:"\u5DF2\u7FFB\u8BD1\u9879",Untranslated:"\u672A\u7FFB\u8BD1\u9879"},Ast:{Title:"AST \u7F16\u8F91",AddRule:"\u65B0\u589E AST \u89C4\u5219",SelectTypePlaceholder:"\u9009\u62E9\u8282\u70B9\u7C7B\u578B",InputNamePlaceholder:"\u8F93\u5165\u53D8\u91CF\u540D\u6216\u952E\u540D",InputSourcePlaceholder:"\u8F93\u5165\u4EE3\u7801\u539F\u6587",InputTargetPlaceholder:"\u8F93\u5165\u7FFB\u8BD1\u540E\u6587\u672C",DefaultPlaceholder:"\u9ED8\u8BA4\u4E3A\u539F\u6587: {{source}}",NodeVariable:"\u53D8\u91CF\u7533\u660E",NodeAssignment:"\u8D4B\u503C\u8BED\u53E5",NodeProperty:"\u5BF9\u8C61\u5C5E\u6027",NodeCall:"\u65B9\u6CD5\u8C03\u7528",NodeNew:"\u5B9E\u4F8B\u5316"},Regex:{Title:"\u8BED\u6CD5\u6821\u9A8C",Overview:"\u6B63\u5219\u7EDF\u8BA1",TotalItems:"\u5339\u914D\u603B\u6570",Translated:"\u5DF2\u5904\u7406\u9879",Untranslated:"\u5F85\u5904\u7406\u9879",AddRule:"\u65B0\u589E\u6B63\u5219\u89C4\u5219",InputRegexPlaceholder:"\u8F93\u5165\u6B63\u5219\u8868\u8FBE\u5F0F",InputTargetPlaceholder:"\u8F93\u5165\u66FF\u6362\u76EE\u6807",DefaultPlaceholder:"\u9ED8\u8BA4\u4E3A\u539F\u6587: {{source}}"},Table:{EmptyState:"\u6682\u65E0\u7FFB\u8BD1\u6761\u76EE",EmptyStateAst:"\u6CA1\u6709\u627E\u5230\u5339\u914D\u7684 AST \u6761\u76EE",EmptyStateRegex:"\u672A\u53D1\u73B0\u5F85\u6821\u9A8C\u7684\u8BED\u6CD5\u6761\u76EE",ColumnType:"\u7C7B\u578B",ColumnName:"\u540D\u79F0",ColumnSource:"\u539F\u6587",ColumnTarget:"\u8BD1\u6587",ColumnActions:"\u64CD\u4F5C"},Status:{ProcessingBatch:"\u6B63\u5728\u7FFB\u8BD1\u7B2C {{current}}/{{total}} \u6279...",Diagnosing:"\u6B63\u5728\u8FDB\u884C\u8BED\u6CD5\u8BCA\u65AD...",DiagnosingUnused:"\u6B63\u5728\u8FDB\u884C\u5197\u4F59\u8BCA\u65AD...",DiagnosingSecurity:"\u6B63\u5728\u8FDB\u884C\u5B89\u5168\u5BA1\u8BA1...",Applied:"\u5DF2\u5E94\u7528",NotApplied:"\u672A\u5E94\u7528",Empty:"\u6682\u65E0\u6761\u76EE",IssueCount:"\u53D1\u73B0 {{count}} \u4E2A\u95EE\u9898"},Hints:{ExtractSummary:"\u589E\u91CF\u63D0\u53D6\u5B8C\u6210\uFF0C\u65B0\u589E {{count}} \u4E2A\u6761\u76EE",DiagnosisSuccess:"\u8BCA\u65AD\u5B8C\u6210\uFF1A\u672A\u53D1\u73B0\u5BFC\u81F4\u8BED\u6CD5\u9519\u8BEF\u7684\u6761\u76EE",NoItems:"\u65E0\u53EF\u7FFB\u8BD1\u9879",NoNewItems:"\u672A\u53D1\u73B0\u65B0\u7684\u7FFB\u8BD1\u6761\u76EE",SelectItemToPreview:"\u9009\u4E2D\u7FFB\u8BD1\u6761\u76EE\u4EE5\u9884\u89C8\u5176\u5728\u6E90\u7801\u4E2D\u7684\u4F4D\u7F6E",NoSourceCache:"\u5F53\u524D\u6587\u4EF6\u6682\u65E0\u6E90\u7801\u7F13\u5B58\uFF0C\u8BF7\u5148\u8FD0\u884C\u4E00\u6B21\u8BED\u6CD5\u8BCA\u65AD"},Notices:{NoticePrefix:"\u7F16\u8F91\u5668",SuccessAdd:"\u65B0\u589E\u6210\u529F",SuccessAi:"\u7FFB\u8BD1\u6210\u529F",SuccessRestore:"\u8FD8\u539F\u6210\u529F",SuccessDelete:"\u5220\u9664\u6210\u529F",SuccessIncrementalExtract:"\u589E\u91CF\u63D0\u53D6\u5B8C\u6210",DiagnosisSuccess:"\u8BED\u6CD5\u8BCA\u65AD\u901A\u8FC7",ConfirmDeleteUnused:"\u786E\u5B9A\u5220\u9664\u8FD9\u4E9B\u5197\u4F59\u9879\u5417\uFF1F\u8BE5\u64CD\u4F5C\u4E0D\u53EF\u64A4\u9500\u3002",AiFixSuccess:"AI \u4FEE\u590D\u6210\u529F"},Errors:{FailExists:`\u65B0\u589E\u5931\u8D25
\u8BD1\u6587\u4E2D\u5DF2\u5B58\u5728\u6B64\u5185\u5BB9`,SyntaxErrorTotal:"\u8BCA\u65AD\u5B8C\u6210\uFF1A\u53D1\u73B0 {{count}} \u4E2A\u8BED\u6CD5\u9519\u8BEF",UnusedTotal:"\u8BCA\u65AD\u5B8C\u6210\uFF1A\u53D1\u73B0 {{count}} \u4E2A\u672A\u5339\u914D\u7684\u5197\u4F59\u6761\u76EE",SecurityRiskTotal:"\u5B89\u5168\u9884\u8B66\uFF1A\u53D1\u73B0 {{count}} \u4E2A\u6F5C\u5728\u7684\u5B89\u5168\u98CE\u9669",SyntaxError:"\u57FA\u7840\u8BED\u6CD5\u9519\u8BEF",Unused:"\u5197\u4F59\u9879 (\u672A\u5728\u6E90\u7801\u4E2D\u8BC6\u522B\u5230)",SecurityCritical:"\u4E25\u91CD\u5B89\u5168\u5A01\u80C1",SecurityWarning:"\u53EF\u7591\u884C\u4E3A\u9884\u8B66",BracketMismatch:"\u62EC\u53F7\u914D\u5BF9\u7F3A\u5931",VariableMismatch:"\u53D8\u91CF\u5360\u4F4D\u7B26\u4E22\u5931\u6216\u4E0D\u5339\u914D",SyntaxErrorAst:"AST \u63D0\u53D6\u5931\u8D25",SyntaxErrorRegex:"\u6B63\u5219\u63D0\u53D6\u5931\u8D25",NoMetadata:"\u672A\u627E\u5230\u5143\u6570\u636E\uFF0C\u65E0\u6CD5\u8FDB\u884C\u8BCA\u65AD\u3002",NoManifest:"\u672A\u627E\u5230\u5BF9\u5E94\u6E05\u5355\uFF0C\u65E0\u6CD5\u5B9A\u4F4D\u76EE\u5F55\u3002",NotJs:"\u5F53\u524D\u9009\u62E9\u7684\u6587\u4EF6\u4E0D\u662F .js \u811A\u672C\uFF0C\u6682\u4E0D\u652F\u6301\u8BED\u6CD5\u8BCA\u65AD\u3002",NoBackup:"\u8BCA\u65AD\u5F02\u5E38\uFF1A\u672A\u627E\u5230\u5BF9\u5E94\u7684\u5907\u4EFD\u6587\u4EF6\u3002\u8BF7\u5148\u70B9\u51FB\u4E00\u6B21\u201C\u66FF\u6362\u201D\u4EE5\u521B\u5EFA\u57FA\u51C6\u5907\u4EFD\u3002",SourceError:"\u6E90\u7801\u672C\u8EAB\u5B58\u5728\u8BED\u6CD5\u9519\u8BEF\uFF0C\u65E0\u6CD5\u8FDB\u884C\u8BCA\u65AD\u3002",FileNotFound:"\u6587\u4EF6\u4E0D\u5B58\u5728",SavePathMissing:"\u4FDD\u5B58\u8DEF\u5F84\u4E0D\u5B58\u5728",TotalCount:"\u5171 {{count}} \u9879",AiFixFail:"AI \u4FEE\u590D\u5931\u8D25"},Dialogs:{ConfirmDeletePath:"\u786E\u8BA4\u5220\u9664\u8BE5\u8DEF\u5F84\uFF1F",PromptNewPath:"\u65B0\u589E\u7FFB\u8BD1\u8DEF\u5F84"}}});var _8,L8=de(()=>{_8={Actions:{PublishToCloud:"\u53D1\u5E03\u5230\u4E91\u7AEF",BackupSync:"\u5168\u91CF\u4E91\u7AEF\u5907\u4EFD\u4E0E\u6062\u590D",InitPersonalRepo:"\u521D\u59CB\u5316\u4E2A\u4EBA\u4ED3\u5E93",UpdateTranslation:"\u66F4\u65B0\u7FFB\u8BD1",NewPublish:"\u6DFB\u52A0\u53D1\u5E03",ApplyForCommunity:"\u7533\u8BF7\u52A0\u5165 Obsidian i18n \u7FFB\u8BD1\u793E\u533A\u76EE\u5F55",ViewDiff:"\u5728\u7EBF\u5DEE\u5F02\u5BF9\u6BD4",Add:"\u6DFB\u52A0",Update:"\u66F4\u65B0",Unsubscribe:"\u53D6\u6D88\u8BA2\u9605",CheckAllUpdates:"\u5168\u91CF\u68C0\u67E5\u66F4\u65B0",Recheck:"\u91CD\u65B0\u68C0\u67E5",UpdateAll:"\u4E00\u952E\u66F4\u65B0\u6240\u6709",RegisterCommunity:"\u7533\u8BF7\u52A0\u5165\u793E\u533A\u7D22\u5F15",PublishNew:"\u53D1\u5E03\u65B0\u7FFB\u8BD1",ForceRefresh:"\u5F3A\u5236\u5237\u65B0\u4E91\u7AEF\u72B6\u6001",GoPublish:"\u524D\u5F80\u53D1\u5E03\u7B2C\u4E00\u4E2A\u7FFB\u8BD1",BackToManage:"\u8FD4\u56DE\u7BA1\u7406\u4E2D\u5FC3",CreateRepo:"\u521B\u5EFA\u65B0\u4ED3\u5E93",UseExistingRepo:"\u4F7F\u7528\u5DF2\u6709\u4ED3\u5E93",StartBackup:"\u5F00\u59CB\u5907\u4EFD",StartRestore:"\u5F00\u59CB\u6062\u590D",Download:"\u4E0B\u8F7D",Overwrite:"\u8986\u76D6\u5207\u6362",ClearFilters:"\u6E05\u9664\u6240\u6709\u8FC7\u6EE4\u5668",CreateNewRepo:"\u521B\u5EFA\u65B0\u4ED3\u5E93",Delete:"\u5220\u9664",Logout:"\u9000\u51FA\u767B\u5F55",ResumeLastBackup:"\u6062\u590D\u4E0A\u6B21\u5907\u4EFD"},Status:{Published:"\u5DF2\u53D1\u5E03",Local:"\u672C\u5730",Uploaded:"\u5DF2\u4E0A\u4F20",NotDownloaded:"\u672A\u4E0B\u8F7D",Reviewing:"\u6536\u5F55\u5BA1\u6838\u4E2D",Fetching:"\u72B6\u6001\u83B7\u53D6\u4E2D",Registered:"\u5DF2\u6536\u5F55\u4E8E\u793E\u533A",Unauthorized:"\u672A\u767B\u5F55",UpToDate:"\u6700\u65B0",UpdateAvailable:"\u6709\u66F4\u65B0",SyncWithCloud:"\u4E0E\u4E91\u7AEF\u540C\u6B65",CloudDifferent:"\u672C\u5730\u4E0E\u4E91\u7AEF\u4E0D\u540C",Latest:"\u6700\u65B0",Modified:"\u6709\u4FEE\u6539",RollingBack:"\u56DE\u6EDA\u4E2D...",BackupDone:"\u2728 \u5B8C\u6210",BackupError:"\u274C \u51FA\u9519",UploadingCloud:"\u2601\uFE0F \u4E0A\u4F20\u4E2D...",DownloadingCloud:"\u{1F4E5} \u4E0B\u8F7D\u4E2D...",VerifyingRepo:"\u6B63\u5728\u9A8C\u8BC1\u4ED3\u5E93\u662F\u5426\u5B58\u5728...",InitializingStructure:"\u6B63\u5728\u521D\u59CB\u5316\u4ED3\u5E93\u7ED3\u6784...",GeneratingReadme:"\u6B63\u5728\u751F\u6210 README.md...",Initializing:"\u6B63\u5728\u521D\u59CB\u5316",CreatingRepo:"\u6B63\u5728\u521B\u5EFA\u4E2A\u4EBA\u7FFB\u8BD1\u4ED3\u5E93...",Checking:"\u6B63\u5728\u68C0\u67E5",LoadingRepo:"\u6B63\u5728\u52A0\u8F7D\u4E2A\u4EBA\u4ED3\u5E93\u6570\u636E...",LoadingContent:"\u52A0\u8F7D\u7248\u672C\u5185\u5BB9...",LoadingDiff:"\u6B63\u5728\u52A0\u8F7D\u5E76\u5BF9\u6BD4\u6570\u636E...",UploadingFile:"\u6B63\u5728\u4E0A\u4F20\u7FFB\u8BD1\u6587\u4EF6...",UpdatingIndex:"\u6B63\u5728\u66F4\u65B0\u7D22\u5F15\u6587\u4EF6...",Processing:"\u6B63\u5728\u5904\u7406",PreparingData:"\u6B63\u5728\u51C6\u5907\u5F85\u5907\u4EFD\u6570\u636E...",BulkUploading:"\u6B63\u5728\u6279\u91CF\u4E0A\u4F20 {{count}} \u4E2A\u6587\u4EF6...",UploadingBatch:"\u6B63\u5728\u4E0A\u4F20\u7B2C {{current}}/{{total}} \u6279\u6B21...",UploadingBatchLog:"\u{1F4E4} \u6B63\u5728\u4E0A\u4F20\u7B2C {{current}}/{{total}} \u6279\u6B21 (\u5171 {{count}} \u4E2A\u6587\u4EF6)...",FetchingManifest:"\u6B63\u5728\u83B7\u53D6\u4E91\u7AEF\u6E05\u5355...",ResumingBackup:"\u6B63\u5728\u6062\u590D\u4E0A\u6B21\u4E2D\u65AD\u7684\u5907\u4EFD...",FinalizingLocal:"\u6B63\u5728\u540C\u6B65\u672C\u5730\u5143\u6570\u636E...",Downloading:"\u6B63\u5728\u4E0B\u8F7D\u7FFB\u8BD1: {{title}}...",Done:"\u2728 \u5B8C\u6210",ForkAvailable:"\u6765\u81EA\u5176\u4ED6\u5E93",Cloud:"\u4E91\u7AEF",Unknown:"\u672A\u77E5\u7248\u672C",Ready:"\u5C31\u7EEA",GuestMode:"\u8BBF\u5BA2\u6A21\u5F0F"},Titles:{NewPublish:"\u6DFB\u52A0\u53D1\u5E03",Homepage:"\u4ED3\u5E93\u4E3B\u9875",DiffViewer:"\u7248\u672C\u5DEE\u5F02\u5BF9\u6BD4"},Tabs:{Community:"\u793E\u533A\u76EE\u5F55",Explore:"\u63A2\u7D22\u8D44\u6E90",Manage:"\u7BA1\u7406\u4E2D\u5FC3",Resources:"\u53D1\u5E03\u8D44\u6E90",Readme:"\u4ED3\u5E93\u4ECB\u7ECD",History:"\u5386\u53F2\u7248\u672C",Browse:"\u6D4F\u89C8\u4ED3\u5E93",Updates:"\u53EF\u7528\u66F4\u65B0"},Steps:{SelectType:"\u9009\u62E9\u7FFB\u8BD1\u7C7B\u578B",SelectTarget:"\u9009\u62E9\u76EE\u6807 {{type}}",SelectSource:"\u9009\u62E9\u7FFB\u8BD1\u6E90",CheckFiles:"\u6838\u5BF9\u672C\u5730\u6587\u4EF6",CompleteInfo:"\u5B8C\u5584\u53D1\u5E03\u4FE1\u606F",VerifyAndPublish:"\u6838\u5BF9\u5E76\u53D1\u5E03"},Tips:{ReadmeDefault:"\u6807\u9898\u5C06\u4F5C\u4E3A\u8BE5\u7FFB\u8BD1\u5728\u793E\u533A\u4E2D\u7684\u4E3B\u540D\u79F0\u3002",SelectSourceDesc:"\u8BF7\u9009\u62E9\u60A8\u8981\u53D1\u5E03\u6216\u66F4\u65B0\u7684\u672C\u5730\u7FFB\u8BD1\u6E90\u6587\u4EF6\u3002",BackupToCloud:"\u4E00\u952E\u5907\u4EFD\u5230\u4E91\u7AEF",LocalToGithub:"\u5C06\u672C\u5730\u6240\u6709\u7FFB\u8BD1\u540C\u6B65\u81F3 GitHub",RestoreFromCloud:"\u4E00\u952E\u4ECE\u4E91\u7AEF\u6062\u590D",GithubToLocal:"\u4ECE GitHub \u62C9\u53D6\u6240\u6709\u7FFB\u8BD1\u8986\u76D6\u672C\u5730",GithubRepo:"GitHub \u4ED3\u5E93",BackupDesc:"\u5168\u91CF\u5907\u4EFD\u4F1A\u5C06\u60A8\u672C\u5730\u6240\u6709\u7684\u7FFB\u8BD1\u6E90\u6587\u4EF6\u4E0A\u4F20\u5230\u60A8\u7684 GitHub \u4ED3\u5E93\u4E2D\uFF0C\u5E76\u81EA\u52A8\u66F4\u65B0\u7D22\u5F15\u3002\u5168\u91CF\u6062\u590D\u5219\u4F1A\u5C06\u4E91\u7AEF\u7684\u6700\u65B0\u7248\u672C\u540C\u6B65\u5230\u672C\u5730\u3002",BackupStep1:"\u2022 \u626B\u63CF\u5E76\u6BD4\u8F83\u672C\u5730\u6240\u6709\u7FFB\u8BD1\u6E90",BackupStep2:"\u2022 \u4E0A\u4F20\u6709\u53D8\u52A8\u7684\u6587\u4EF6\u5230 GitHub",BackupStep3:"\u2022 \u81EA\u52A8\u7EF4\u62A4 metadata.json \u7D22\u5F15",RestoreStep1:"\u2022 \u83B7\u53D6\u4E91\u7AEF metadata.json \u5217\u8868",RestoreStep2:"\u2022 \u4E0B\u8F7D\u6240\u6709\u672C\u5730\u7F3A\u5931\u6216\u65E7\u7684\u6587\u4EF6",RestoreStep3:"\u2022 \u81EA\u52A8\u5728\u672C\u5730\u6CE8\u518C\u5E76\u5E94\u7528\u4E0B\u8F7D\u7684\u7FFB\u8BD1",InitRepoDesc:"\u5728 GitHub \u4E0A\u521B\u5EFA\u4E00\u4E2A\u4E13\u95E8\u5B58\u50A8\u7FFB\u8BD1\u6587\u4EF6\u7684\u516C\u5F00\u4ED3\u5E93\uFF0C\u4EE5\u4FBF\u4E8E\u5907\u4EFD\u3001\u5171\u4EAB\u548C\u5728\u4E0D\u540C\u8BBE\u5907\u95F4\u540C\u6B65\u3002\u60A8\u53EF\u4EE5\u4F7F\u7528\u9ED8\u8BA4\u540D\u79F0\u6216\u81EA\u5B9A\u4E49\u540D\u79F0\u3002",UseExistingDesc:"\u5982\u679C\u60A8\u5DF2\u7ECF\u5728 GitHub \u4E0A\u624B\u52A8\u521B\u5EFA\u4E86\u4ED3\u5E93\uFF0C\u8BF7\u8F93\u5165\u5176\u540D\u79F0\u4EE5\u8FDB\u884C\u8FDE\u63A5\u3002\u7A0B\u5E8F\u5C06\u5C1D\u8BD5\u5728\u5176\u4E0A\u521D\u59CB\u5316\u5FC5\u8981\u7684\u76EE\u5F55\u7ED3\u6784\u3002",CheckFailRepo:"\u68C0\u67E5\u4ED3\u5E93 {{address}} \u5931\u8D25",CheckFail:"\u68C0\u67E5\u66F4\u65B0\u5931\u8D25",RepoFormatTip:"\u8BF7\u4F7F\u7528 owner/repo \u683C\u5F0F",NoSelfExplore:"\u4E0D\u80FD\u5728\u63A2\u7D22\u9875\u9762\u6D4F\u89C8\u81EA\u5DF1\u7684\u7FFB\u8BD1\u4ED3\u5E93\uFF0C\u8BF7\u524D\u5F80\u7BA1\u7406\u9875\u9762",NoTranslations:"\u8BE5\u4ED3\u5E93\u6682\u672A\u53D1\u5E03\u4EFB\u4F55\u7FFB\u8BD1\u8D44\u6E90",ManifestNotFound:"\u672A\u627E\u5230 metadata.json \u6216\u6587\u4EF6\u65E0\u6548",FetchFailManifest:"\u83B7\u53D6\u4ED3\u5E93\u6E05\u5355\u5931\u8D25",FetchCommitsFail:"\u83B7\u53D6\u63D0\u4EA4\u5386\u53F2\u5931\u8D25",UpdatedItem:"\u5DF2\u6210\u529F\u66F4\u65B0 {{title}}",AddedAndActive:"\u5DF2\u6DFB\u52A0 {{title}} \u5E76\u8BBE\u4E3A\u5F53\u524D\u6D3B\u52A8\u6E90",AddedSource:"\u5DF2\u6210\u529F\u6DFB\u52A0 {{title}}",DiscoverDesc:"\u8F93\u5165 GitHub \u4ED3\u5E93\u5730\u5740\uFF08\u5982: owner/repo\uFF09\uFF0C\u5373\u53EF\u6D4F\u89C8\u5E76\u4E0B\u8F7D\u5176\u4E2D\u5206\u4EAB\u7684 i18n \u8D44\u6E90\u3002",NoMatchesInRepo:"\u5F53\u524D\u4ED3\u5E93\u4E2D\u6CA1\u6709\u5339\u914D\u8FC7\u6EE4\u6761\u4EF6\u7684\u8D44\u6E90",NoReadme:"\u672A\u627E\u5230 README.md\u6216\u8005\u6587\u4EF6\u4E3A\u7A7A",NoReadmeDesc:"\u8BE5\u4ED3\u5E93\u4F5C\u8005\u5C1A\u672A\u63D0\u4F9B\u4ECB\u7ECD\u6587\u6863",AllLatestDesc:"\u60A8\u8BA2\u9605\u7684\u6240\u6709\u7FFB\u8BD1\u5E93\u5185\u5BB9\u5728\u672C\u5730\u5747\u4E3A\u6700\u65B0\u7248\u672C",SelectHistoryEntry:"\u8BF7\u4ECE\u6211\u7684\u7FFB\u8BD1\u5217\u8868\u4E2D\u9009\u62E9\u4E00\u4E2A\u6761\u76EE\u67E5\u770B\u5386\u53F2",LoadingCommits:"\u6B63\u5728\u83B7\u53D6\u63D0\u4EA4\u5386\u53F2...",NoCommits:"\u8BE5\u6587\u4EF6\u6682\u65E0\u63D0\u4EA4\u8BB0\u5F55",RollbackSuccessLocal:"\u56DE\u6EDA\u6210\u529F\uFF0C\u672C\u5730\u6587\u4EF6\u5DF2\u540C\u6B65\u66F4\u65B0",VersionCompareDesc:"\u5BF9\u6BD4\u672C\u5730\u6700\u65B0\u7FFB\u8BD1\u4E0E\u4E91\u7AEF\u7248\u672C\u7684\u5DEE\u5F02",PublishNoticePrefix:"\u53D1\u5E03\u63D0\u4EA4\u5C06\u76F4\u63A5\u63A8\u9001\u5230",PublishNoticeSuffix:"\u4ED3\u5E93\uFF0C\u8BF7\u786E\u4FDD\u60A8\u7684\u6388\u6743\u6709\u6548\u3002"},Labels:{ResourceCenter:"\u8D44\u6E90\u7BA1\u7406\u4E2D\u5FC3",ManageCenter:"\u4E91\u7AEF\u7BA1\u7406\u4E2D\u5FC3",PendingUpdates:"\u5F85\u5904\u7406\u7684\u66F4\u65B0",CloudCentral:"\u4E91\u7AEF\u7FFB\u8BD1\u4E2D\u5FC3",TranslationHistory:"\u7FFB\u8BD1\u5386\u53F2\u7248\u672C",BackupRestore:"\u4E91\u7AEF\u5168\u91CF\u5907\u4EFD / \u6062\u590D",Feedback:"\u53CD\u9988",AccessLimit:"\u8BBF\u95EE\u9650\u5236",Permission:"\u6743\u9650",DefaultRepoDesc:"\u8FD9\u662F\u4E00\u4E2A\u7528\u4E8E\u7FFB\u8BD1 Obsidian \u63D2\u4EF6\u7684\u5171\u5EFA\u4ED3\u5E93\u3002",Followers:"\u5173\u6CE8\u8005 (Followers)",PublicRepos:"\u516C\u5F00\u4ED3\u5E93 (Public Repos)",UploadTypePlugin:"\u63D2\u4EF6\u7FFB\u8BD1",UploadTypePluginDesc:"\u53D1\u5E03\u6216\u66F4\u65B0\u5404\u4E2A\u63D2\u4EF6\u7684 i18n \u8D44\u6E90",UploadTypeTheme:"\u4E3B\u9898\u7FFB\u8BD1",UploadTypeThemeDesc:"\u4E3A Obsidian \u4E3B\u9898\u63D0\u4F9B\u6C49\u5316\u652F\u6301",Target:"\u76EE\u6807 {{type}}",Source:"\u7FFB\u8BD1\u6E90\u6587\u4EF6",TranslationTitle:"\u663E\u793A\u540D\u79F0 (Title)",Version:"\u9002\u7528\u7248\u672C (Version)",Language:"\u8BED\u79CD",Description:"\u8BE6\u7EC6\u63CF\u8FF0 (Description)",LocalFile:"\u672C\u5730\u6587\u4EF6",RepoName:"\u4ED3\u5E93\u540D\u79F0",RepoUrlPrefix:"\u4ED3\u5E93\u9884\u89C8:",RepoDesc:"\u4ED3\u5E93\u7B80\u4ECB",RegistrationLabel:"\u{1F4CB} \u7533\u8BF7\u4FE1\u606F",RepoInfo:"\u4ED3\u5E93\u6982\u51B5",RepoAddress:"\u4ED3\u5E93\u5730\u5740",ManifestFile:"\u7D22\u5F15\u6587\u4EF6",TranslationCountLabel:"\u7FFB\u8BD1\u5305\u6570\u91CF",UnitPlugins:"\u4E2A",LanguagesCovered:"\u6DB5\u76D6\u8BED\u79CD",ReviewHelper:"\u5BA1\u6838\u8F85\u52A9",ReviewerNotes:"\u5BA1\u6838\u89C4\u5219\u8BF4\u660E",ReviewerNote1:"\u4ED3\u5E93\u5FC5\u987B\u5305\u542B\u6709\u6548\u7684 metadata.json",ReviewerNote2:"\u6587\u4EF6\u7ED3\u6784\u9700\u7B26\u5408\u6807\u51C6\uFF08/plugins/ID/zh-CN.json\uFF09",ReviewerNote3:"\u6240\u6709\u4E0A\u4F20\u7684\u6587\u4EF6\u5FC5\u987B\u80FD\u901A\u8FC7\u54C8\u5E0C\u9A8C\u8BC1",CheckManifestData:"\u67E5\u770B\u539F\u59CB manifest \u6570\u636E",IssueAutoGenerated:"\u6B64\u5DE5\u5355\u7531 i18n \u63D2\u4EF6\u81EA\u52A8\u751F\u6210",ApplyRegistration:"\u7533\u8BF7\u6536\u5F55",UpdateReadmeMsg:"chore: update README.md via i18n plugin",RemoveTranslation:"chore: remove translation",DeleteEntry:"chore: delete manifest entry",StatAssets:"\u8D44\u6E90",StatStars:"\u661F\u6807",StatForks:"\u5206\u53C9",StatIssues:"\u53CD\u9988",PublishedResources:"\u5DF2\u53D1\u5E03\u7684\u8D44\u6E90",ReadmeCustomPage:"\u4ED3\u5E93\u4ECB\u7ECD\u9884\u89C8 (README.md)",CloudActions:"\u4E91\u7AEF\u64CD\u4F5C",LocalTranslation:"\u672C\u5730\u7FFB\u8BD1",UnnamedTranslation:"\u672A\u547D\u540D\u7FFB\u8BD1",InitReadmeMsg:"chore: initial repository structure",AddTranslationMsg:"feat: add translation {{title}} for {{plugin}}",UpdateTranslationMsg:"feat: update translation {{title}} for {{plugin}}",UpdateManifestMsg:"chore: update manifest for {{plugin}}",UpdateManifestGlobalMsg:"chore: update metadata.json (global update)",BackupCommitMsg:"backup: {{title}} ({{plugin}})",BulkBackupMsg:"batch backup: {{count}} items synced",BulkBackupMsgBatch:"batch backup: (chunk {{current}}/{{total}})",ViewOnGithubTitle:"\u5728 GitHub \u4E0A\u67E5\u770B {{repo}}",NoReadmeAdded:"\u6682\u65E0 README \u4ECB\u7ECD",NoReadmeAddedDesc:"\u60A8\u53EF\u4EE5\u70B9\u51FB\u53F3\u4E0A\u89D2\u7684\u7F16\u8F91\u6309\u94AE\uFF0C\u4E3A\u60A8\u7684\u7FFB\u8BD1\u5E93\u6DFB\u52A0\u8BE6\u7EC6\u7684\u4ECB\u7ECD\u3001\u4F7F\u7528\u8BF4\u660E\u6216\u8D21\u732E\u6307\u5357\u3002",ViewHistory:"\u67E5\u770B\u5386\u53F2\u7248\u672C",DeleteCloudPkg:"\u4ECE\u4E91\u7AEF\u6C38\u4E45\u5220\u9664\u8FD9\u4E2A\u7FFB\u8BD1\u5305",FetchingResources:"\u6B63\u5728\u83B7\u53D6\u4E91\u7AEF\u8D44\u6E90...",NoRegistry:"\u6682\u65E0\u793E\u533A\u6536\u5F55",NoRegistryDesc:"\u793E\u533A\u76EE\u5F55\u76EE\u524D\u4E3A\u7A7A\uFF0C\u60A8\u53EF\u4EE5\u6210\u4E3A\u7B2C\u4E00\u4E2A\u7533\u8BF7\u52A0\u5165\u7684\u4EBA\uFF01",Leaderboard:"\u6D3B\u8DC3\u8D21\u732E\u699C",TopStars:"\u6700\u9AD8\u4EBA\u6C14\u699C",TopActive:"\u8FD1\u671F\u6D3B\u8DC3\u699C",TopPlugins:"\u9AD8\u4EA7\u4F5C\u8005\u699C",TopAuthors:"\u6D3B\u8DC3\u8BD1\u8005\u699C",Rank1:"\u7B2C\u4E00\u540D",Rank2:"\u7B2C\u4E8C\u540D",Rank3:"\u7B2C\u4E09\u540D",LeaderboardTip:"\u6392\u884C\u699C\u6570\u636E\u6BCF 24 \u5C0F\u65F6\u81EA\u52A8\u66F4\u65B0\u4E00\u6B21",DiscoverTranslations:"\u53D1\u73B0\u4E91\u7AEF\u7FFB\u8BD1\u5E93",SubscriptionRepo:"\u4E2A\u5DF2\u6536\u5F55\u4ED3\u5E93",ExploreThisRepo:"\u6D4F\u89C8\u6B64\u4ED3\u5E93\u8D44\u6E90",NoDesc:"\u6682\u65E0\u63CF\u8FF0",SubscriptionList:"\u8BA2\u9605\u5217\u8868",WaitingFetch:"\u7B49\u5F85\u83B7\u53D6...",ViewOnGithub:"\u5728 GitHub \u4E0A\u67E5\u770B {{repo}}",PleaseWait:"\u6B63\u5728\u52A0\u8F7D\uFF0C\u8BF7\u7A0D\u5019...",SourceFrom:"\u8D44\u6E90\u6765\u6E90",Commits:"\u63D0\u4EA4\u8BB0\u5F55",VersionPreview:"\u7248\u672C\u5185\u5BB9\u9884\u89C8",SelectCommitToPreview:"\u8BF7\u5728\u5DE6\u4FA7\u9009\u62E9\u4E00\u4E2A\u7248\u672C\u8FDB\u884C\u9884\u89C8",RollbackToVersion:"\u56DE\u6EDA\u5230\u6B64\u7248\u672C",RollbackTranslationMsg:"\u56DE\u6EDA\u7FFB\u8BD1: {{plugin}} \u5230\u7248\u672C {{sha}}",UpdateManifestRollbackMsg:"\u540C\u6B65\u56DE\u6EDA manifest: {{plugin}}",Added:"\u65B0\u589E",Deleted:"\u79FB\u9664",Old:"\u65E7\u503C",New:"\u65B0\u503C",TotalDiffs:"\u5171\u53D1\u73B0 {{count}} \u5904\u5DEE\u5F02",ShowingCount:" (\u5DF2\u8FC7\u6EE4\u663E\u793A {{count}} \u5904)",FileSize:"\u6587\u4EF6\u5927\u5C0F",ContentHash:"\u5185\u5BB9\u6307\u7EB9",ReportIssue:"\u62A5\u544A\u95EE\u9898",IssueTemplateBody:"\u53D1\u73B0 {{plugin}} \u7684\u7FFB\u8BD1\u5B58\u5728\u95EE\u9898...",SupportedVersions:"\u652F\u6301\u7248\u672C\u53F7",TotalTranslations:"\u5168\u5C40\u603B\u7FFB\u8BD1\u6570",TotalContributors:"\u5168\u5C40\u603B\u8D21\u732E\u8005",TotalStars:"\u661F\u6807\u603B\u8BA1",LocalResource:"\u672C\u5730\u5DF2\u5B89\u88C5\u8D44\u6E90",Official:"\u5B98\u65B9\u63A8\u8350",Featured:"\u793E\u533A\u7CBE\u9009",RecommendReason:"\u63A8\u8350\u7406\u7531",MasterTranslator:"\u7FFB\u8BD1\u5DE8\u5320",RisingStar:"\u793E\u533A\u65B0\u661F",LegendaryRepo:"\u4E07\u4F17\u77A9\u76EE"},Placeholders:{RepoName:"\u4F8B\u5982: my-obsidian-i18n-resources",SelectTarget:"\u70B9\u51FB\u9009\u62E9\u76EE\u6807 {{type}}...",InputRepoPlaceholder:"\u8BF7\u8F93\u5165\u4ED3\u5E93\u8DEF\u5F84 (owner/repo)",SelectSource:"\u8BF7\u9009\u62E9\u672C\u5730\u6E90...",SearchPublished:"\u641C\u7D22\u5DF2\u53D1\u5E03\u7684\u7FFB\u8BD1 (\u63D2\u4EF6 ID \u6216\u6807\u9898)...",ReadmeEdit:"\u53EF\u652F\u6301\u6807\u51C6\u7684 Markdown \u8BED\u6CD5...",SearchRepo:"\u641C\u7D22\u4ED3\u5E93\u3001\u4F5C\u8005\u6216\u63CF\u8FF0...",Repo:"GitHub \u4ED3\u5E93 (owner/repo)",SearchPlugins:"\u5FEB\u6377\u641C\u7D22\u5F53\u524D\u5217\u8868...",SearchDiff:"\u641C\u7D22\u5DEE\u5F02\u8BB0\u5F55..."},Dialogs:{ConfirmUpdateAll:"\u786E\u5B9A\u8981\u66F4\u65B0\u8FD9 {{count}} \u4E2A\u7FFB\u8BD1\u5417\uFF1F",ConfirmOverwrite:`\u68C0\u6D4B\u5230\u672C\u5730\u5DF2\u5B58\u5728 {{owner}} \u7684\u540C\u6E90\u7FFB\u8BD1\u5305\u3002
\u662F\u5426\u4F7F\u7528\u5F53\u524D {{newOwner}} \u7684\u7248\u672C\u8986\u76D6\u672C\u5730\u7FFB\u8BD1\uFF1F`,DeleteConfirm:`\u786E\u5B9A\u8981\u4ECE\u4E91\u7AEF\u5220\u9664\u3010{{plugin}}\u3011({{title}}) \u7684\u7FFB\u8BD1\u5305\u5417\uFF1F
\u5220\u9664\u540E\u5C06\u65E0\u6CD5\u6062\u590D\u3002`,DeleteConfirmSingle:`\u786E\u5B9A\u8981\u4ECE\u4E91\u7AEF\u5220\u9664\u6B64\u7FFB\u8BD1\u5305\u5417\uFF1F
\u5220\u9664\u540E\u5C06\u65E0\u6CD5\u6062\u590D\u3002`,RollbackConfirm:"\u786E\u5B9A\u8981\u5C06\u6B64\u6587\u4EF6\u56DE\u6EDA\u5230\u9009\u5B9A\u7684\u5386\u53F2\u7248\u672C\u5417\uFF1F\u8FD9\u4F1A\u4EA7\u751F\u4E00\u6761\u65B0\u7684\u63D0\u4EA4\u8BB0\u5F55\u5E76\u8986\u76D6\u5F53\u524D\u4E91\u7AEF\u7248\u672C\u3002",ConfirmUpdate:"\u786E\u8BA4\u8981\u66F4\u65B0\u6B64\u7FFB\u8BD1\u5305\u5417\uFF1F",ConfirmRestoreAll:`\u786E\u5B9A\u8981\u4ECE\u4E91\u7AEF\u6062\u590D\u5168\u90E8\u7FFB\u8BD1\u5417\uFF1F
\u672C\u5730\u5DF2\u6709\u7684\u540C\u540D\u7FFB\u8BD1\u6E90\u5C06\u88AB\u8986\u76D6\u3002`},Errors:{ManifestFormatError:"metadata.json \u683C\u5F0F\u9519\u8BEF",ManifestNotFound:"\u65E0\u6CD5\u89E3\u6790 metadata.json \u6216\u6587\u4EF6\u4E0D\u5B58\u5728",UserNotFound:"\u672A\u83B7\u53D6\u5230\u7528\u6237\u4FE1\u606F",CannotRegister:"\u65E0\u6CD5\u6CE8\u518C",RegistryAddrMissing:"\u793E\u533A\u7D22\u5F15\u4ED3\u5E93\u5730\u5740\u672A\u914D\u7F6E",RegistryAddrFormatError:"\u793E\u533A\u7D22\u5F15\u4ED3\u5E93\u5730\u5740\u683C\u5F0F\u9519\u8BEF",InitRepoStructFail:"\u521D\u59CB\u5316\u4ED3\u5E93\u7ED3\u6784\u5931\u8D25",CreateRepoFail:"\u521B\u5EFA\u4ED3\u5E93\u5931\u8D25",RepoNotExistOnGithub:"\u4ED3\u5E93 {{repo}} \u4E0D\u5B58\u5728\uFF0C\u8BF7\u5148\u5728 GitHub \u4E0A\u521B\u5EFA",InvalidSourceConfig:"\u672A\u627E\u5230\u6709\u6548\u7684\u7FFB\u8BD1\u6E90\u914D\u7F6E",UploadFileFail:"\u4E0A\u4F20\u6587\u4EF6\u5931\u8D25",UpdateManifestFail:"\u66F4\u65B0\u6E05\u5355\u6587\u4EF6\u5931\u8D25",UpdateIndexFail:"\u66F4\u65B0\u7D22\u5F15\u6587\u4EF6\u5931\u8D25",InitStructureFail:"\u521D\u59CB\u5316\u4ED3\u5E93\u7ED3\u6784\u5931\u8D25",CreateFail:"\u521B\u5EFA\u4ED3\u5E93\u5931\u8D25",RollbackFail:"\u56DE\u6EDA\u5931\u8D25",GetFileFail:"\u65E0\u6CD5\u83B7\u53D6\u6587\u4EF6\u5185\u5BB9",InitFailed:"\u521D\u59CB\u5316\u5931\u8D25",NoGithubUser:"\u65E0\u6CD5\u83B7\u53D6 GitHub \u7528\u6237\u4FE1\u606F",NoCreateRepoPerm:"\u6743\u9650\u4E0D\u8DB3",UploadFailed:"\u4E0A\u4F20\u5931\u8D25",LocalFileMissing:"\u672C\u5730\u7FFB\u8BD1\u6587\u4EF6\u4E22\u5931",RepoNotFound:"\u672A\u627E\u5230\u4E2A\u4EBA\u7FFB\u8BD1\u4ED3\u5E93",GetManifestFail:"\u83B7\u53D6\u4E3B\u6E05\u5355\u5931\u8D25",BackupErrorMsg:"\u{1F4A5} \u5907\u4EFD\u51FA\u9519: {{error}}",RestoreErrorMsg:"\u{1F4A5} \u6062\u590D\u51FA\u9519: {{error}}",FetchFail:"\u83B7\u53D6\u5931\u8D25",DownloadFail:"\u4E0B\u8F7D\u5931\u8D25",UploadFailItem:"\u274C {{title}} \u4E0A\u4F20\u5931\u8D25",DownloadFailItem:"\u274C {{title}} \u4E0B\u8F7D\u5931\u8D25\uFF1A\u6587\u4EF6\u4E0D\u5B58\u5728",ProcessingFailItem:"\u274C {{title}} \u5904\u7406\u5931\u8D25: {{error}}",UpdateFail:"\u66F4\u65B0 {{title}} \u5931\u8D25:",LoadDiffFail:"\u52A0\u8F7D\u5DEE\u5F02\u6570\u636E\u5931\u8D25:",BackupFail:"\u5907\u4EFD\u5931\u8D25:",RestoreFail:"\u6062\u590D\u5931\u8D25:",CheckPendingFail:"\u68C0\u67E5\u5F85\u5904\u7406\u7533\u8BF7\u5931\u8D25",ParseRegistryFail:"\u89E3\u6790\u793E\u533A\u7D22\u5F15\u5931\u8D25",RegisterFail:"\u7533\u8BF7\u6536\u5F55\u5931\u8D25",SaveReadmeFail:"\u4FDD\u5B58 README \u5931\u8D25",DeleteFail:"\u5220\u9664\u5931\u8D25",DeleteFileProblem:"\u64CD\u4F5C\u6587\u4EF6\u65F6\u9047\u5230\u95EE\u9898",CreateReadmeFail:"\u521B\u5EFA README \u5931\u8D25",FetchCommitsFail:"\u83B7\u53D6\u63D0\u4EA4\u8BB0\u5F55\u5931\u8D25",PreviewFail:"\u9884\u89C8\u8BF7\u6C42\u5931\u8D25",RepoNotExist:"\u4ED3\u5E93 {{address}} \u4E0D\u5B58\u5728",AddFail:"\u6DFB\u52A0\u5931\u8D25"},Hints:{InputRepoPlaceholder:"\u8BF7\u8F93\u5165\u4ED3\u5E93\u5730\u5740",RepoFormatTip:"\u8BF7\u8F93\u5165\u683C\u5F0F\u4E3A owner/repo \u7684\u4ED3\u5E93\u5730\u5740",NoSelfExplore:"\u4E0D\u652F\u6301\u5728\u201C\u63A2\u7D22\u201D\u9875\u6DFB\u52A0\u6216\u62C9\u53D6\u81EA\u5DF1\u7684\u5F53\u524D\u4E91\u7AEF\u4ED3\u5E93\u3002\u8BF7\u524D\u5F80\u201C\u7BA1\u7406\u201D\u9875\u64CD\u4F5C\u81EA\u5DF1\u7684\u7FFB\u8BD1\u5305\u3002",NoPublished:"\u6682\u65E0\u5DF2\u53D1\u5E03\u7684\u7FFB\u8BD1\u8D44\u6E90",NoPublishedDesc:"\u60A8\u7684\u7FFB\u8BD1\u4ED3\u5E93\u76EE\u524D\u662F\u7A7A\u7684\u3002\u60A8\u53EF\u4EE5\u70B9\u51FB\u4E0B\u65B9\u6309\u94AE\u5F00\u59CB\u53D1\u5E03\u60A8\u7684\u7B2C\u4E00\u4E2A\u7FFB\u8BD1\u5305\uFF0C\u6216\u8005\u5728\u4E91\u7AEF\u9762\u677F\u8FDB\u884C\u5907\u4EFD\u4E0E\u6062\u590D\u3002",RepoNameRequired:"\u8BF7\u8F93\u5165\u4ED3\u5E93\u540D\u79F0",RepoAlreadyInCommunity:"\u4F60\u7684\u4ED3\u5E93\u5DF2\u5728\u793E\u533A\u76EE\u5F55\u4E2D",PublishBeforeRegister:"\u8BF7\u5148\u53D1\u5E03\u81F3\u5C11\u4E00\u4E2A\u7FFB\u8BD1\u540E\u518D\u6CE8\u518C",RegistrationIntercept:"\u6CE8\u518C\u62E6\u622A",RepoAlreadyRegistered:"\u60A8\u7684\u4ED3\u5E93\u5DF2\u88AB\u793E\u533A\u6536\u5F55\uFF0C\u8BF7\u52FF\u91CD\u8907\u7533\u8BF7",RegistrationPending:"\u6B63\u5728\u7533\u8BF7\u6536\u5F55\u7684\u5DE5\u5355\u5DF2\u7ECF\u5B58\u5728\uFF0C\u8BF7\u8010\u5FC3\u7B49\u5F85\u5BA1\u6838",NoLocalSourcesTip:"\u672A\u68C0\u6D4B\u5230\u5DF2\u6709\u7684\u672C\u5730{{type}}\u7FFB\u8BD1\u6E90\u6587\u4EF6\u3002\u8BF7\u5148\u4F7F\u7528\u7FFB\u8BD1\u5DE5\u5177\u751F\u6210\u7FFB\u8BD1\u3002",NoSourcesForTarget:"\u8BE5{{type}}\u4E0B\u6CA1\u6709\u4EFB\u4F55\u7FFB\u8BD1\u6E90\u6587\u4EF6",RepoNotInit:'\u5C1A\u672A\u521B\u5EFA\u4E2A\u4EBA\u4ED3\u5E93\uFF0C\u8BF7\u5148\u524D\u5F80"\u53D1\u5E03"\u9875\u521D\u59CB\u5316',NoLocalSourcesBackup:"\u672A\u53D1\u73B0\u53EF\u4F9B\u5907\u4EFD\u7684\u672C\u5730\u7FFB\u8BD1\u6E90",NoCloudData:"\u4E91\u7AEF\u4ED3\u5E93\u4E2D\u6682\u65E0\u5907\u4EFD\u6570\u636E",FetchingManifest:"\u6B63\u5728\u83B7\u53D6\u4E91\u7AEF\u6E05\u5355...",TokenRequired:"\u8BF7\u5148\u5728\u8BBE\u7F6E\u4E2D\u914D\u7F6E GitHub Token\uFF08\u5171\u5EFA\u4E91\u7AEF \u2192 \u63D0\u4EA4 Token\uFF09",LoginRequired:"\u9700\u8981\u767B\u5F55\u4EE5\u8BBF\u95EE\u4E91\u7AEF\u529F\u80FD",LoginRequiredDesc:"\u8BF7\u5728\u63D2\u4EF6\u8BBE\u7F6E\u4E2D\u914D\u7F6E\u5177\u5907 public_repo \u6743\u9650\u7684 GitHub Token\u3002\u914D\u7F6E\u5B8C\u6210\u540E\uFF0C\u60A8\u5C06\u53EF\u4EE5\u63A2\u7D22\u793E\u533A\u8D44\u6E90\u3001\u53D1\u5E03\u7FFB\u8BD1\u5E76\u53C2\u4E0E\u5171\u5EFA\u3002",GoToSettings:"\u524D\u5F80\u8BBE\u7F6E",RateLimitTitle:"GitHub \u8BBF\u95EE\u53D7\u9650",RateLimitDesc:"\u7531\u4E8E GitHub \u7684\u533F\u540D\u8BBF\u95EE\u9891\u7387\u9650\u5236\uFF08\u6BCF\u5C0F\u65F6 60 \u6B21\uFF09\uFF0C\u60A8\u76EE\u524D\u7684\u8BBF\u95EE\u5DF2\u8FBE\u4E0A\u9650\u3002\u8BF7\u5728\u8BBE\u7F6E\u4E2D\u914D\u7F6E GitHub Token \u4EE5\u83B7\u5F97\u7A33\u5B9A\u4E0D\u9650\u901F\u7684\u4F53\u9A8C\u3002",RateLimitGuide:"\u914D\u7F6E Token \u5373\u53EF\u89E3\u51B3"},Notices:{UploadSuccess:"\u4E0A\u4F20\u6210\u529F",UploadCompleteDesc:"\u5DF2\u6210\u529F\u5C06\u7FFB\u8BD1\u6587\u4EF6\u540C\u6B65\u81F3\u60A8\u7684\u4ED3\u5E93\u3002",SubmitSuccess:"\u63D0\u4EA4\u6210\u529F",RegistrationSubmittedDesc:"\u5DF2\u63D0\u4EA4\u7533\u8BF7\uFF0C\u8BF7\u7B49\u5F85\u7BA1\u7406\u5458\u5BA1\u6838\u3002",FetchSuccess:"\u83B7\u53D6\u6210\u529F",FoundTranslations:"\u5171\u627E\u5230 {{count}} \u4E2A\u8BD1\u6587\u8D44\u6E90",RepoUnsubscribed:"\u5DF2\u53D6\u6D88\u8BA2\u9605\u8BE5\u4ED3\u5E93",UpdateSuccess:"\u66F4\u65B0\u6210\u529F",DownloadSuccess:"\u4E0B\u8F7D\u6210\u529F",AllUpToDate:"\u672C\u5730\u5DF2\u662F\u6700\u65B0\u7248\u672C",UpdateComplete:"\u66F4\u65B0\u5B8C\u6210",UpdateSuccessCount:"\u6210\u529F\u66F4\u65B0\u4E86 {{count}} \u4E2A\u8BED\u8A00\u5305",RepoReadyPrefix:"\u60A8\u7684\u4ED3\u5E93\u5DF2\u5C31\u7EEA\uFF1A",FoundLocalSources:"\u53D1\u73B0 {{count}} \u4E2A\u672C\u5730\u7FFB\u8BD1\u6E90",SkipFileNotFound:"\u8DF3\u8FC7 {{title}}: \u672C\u5730\u6587\u4EF6\u4E0D\u5B58\u5728",SkipUpToDate:"\u8DF3\u8FC7 {{title}}: \u4E91\u7AEF\u5DF2\u662F\u6700\u65B0",BackupNoChanges:"\u6CA1\u6709\u53D1\u73B0\u9700\u8981\u5907\u4EFD\u7684\u65B0\u53D8\u52A8",UploadSuccessItem:"\u2705 {{title}} \u4E0A\u4F20\u6210\u529F",BackupCompleteStat:"\u5907\u4EFD\u5B8C\u6210: \u5DF2\u4E0A\u4F20 {{uploaded}} \u4E2A\uFF0C\u8DF3\u8FC7 {{skipped}} \u4E2A",BackupSuccessCount:"\u6210\u529F\u5907\u4EFD\u4E86 {{count}} \u4E2A\u7FFB\u8BD1\u5305",FoundCheckpoint:"\u53D1\u73B0\u4E0A\u6B21\u672A\u5B8C\u6210\u7684\u5907\u4EFD ({{date}})",FoundCloudSources:"\u5728\u4E91\u7AEF\u53D1\u73B0 {{count}} \u4E2A\u7FFB\u8BD1\u6E90",ItemsToUpload:"\u68C0\u6D4B\u5230\u6709 {{count}} \u4E2A\u9879\u76EE\u9700\u8981\u4E0A\u4F20\u5230\u4E91\u7AEF",SkipLocalLatest:"\u8DF3\u8FC7 {{title}}: \u672C\u5730\u5DF2\u662F\u6700\u65B0",RestoreSuccessItem:"\u2705 {{title}} \u6062\u590D\u6210\u529F",RestoreCompleteStat:"\u6062\u590D\u5B8C\u6210: \u5DF2\u540C\u6B65 {{restored}} \u4E2A\uFF0C\u8DF3\u8FC7 {{skipped}} \u4E2A",RestoreSuccessCount:"\u6210\u529F\u6062\u590D\u4E86 {{count}} \u4E2A\u7FFB\u8BD1\u5305",NoFile:"\u6587\u4EF6\u4E0D\u5B58\u5728"}}});var R8,D8=de(()=>{R8={MainTitle:"\u4F7F\u7528\u5E2E\u52A9",VideoTitle:"\u5B98\u65B9\u89C6\u9891\u6559\u7A0B",VideoDesc:"\u6F14\u793A\u63D2\u4EF6\u5168\u5957\u64CD\u4F5C\u6D41\u7A0B\uFF0C\u964D\u4F4E\u4E0A\u624B\u95E8\u69DB\uFF0C\u5FEB\u901F\u7CBE\u901A\u672C\u5730\u5316\u5DE5\u4F5C\u6D41\u3002",DocTitle:"\u5B98\u65B9\u6587\u6863\u6559\u7A0B",DocDesc:"\u5168\u65B9\u4F4D\u89E3\u6790\u5404\u9879\u529F\u80FD\u53C2\u6570\u4E0E\u8FDB\u9636\u914D\u7F6E\uFF0C\u63D0\u4F9B\u8BE6\u5C3D\u7684\u64CD\u4F5C\u4E0E\u6392\u9519\u6307\u5357\u3002",GithubTitle:"\u5F00\u6E90\u95EE\u9898\u53CD\u9988",GithubDesc:"\u8FFD\u8E2A\u9879\u76EE\u4EE3\u7801\u8FDB\u5C55\uFF0C\u63D0\u4EA4\u7F3A\u9677\u62A5\u544A\u6216\u7279\u6027\u9700\u6C42\uFF0C\u4E0E\u5F00\u53D1\u8005\u6DF1\u5EA6\u534F\u529B\u3002",PluginTitle:"\u672C\u5730\u7FFB\u8BD1\u7BA1\u7406",PluginDesc:"\u96C6\u4E2D\u7BA1\u7406\u672C\u5730\u5DF2\u88C5\u63D2\u4EF6\u7684\u7FFB\u8BD1\u7247\u6BB5\uFF0C\u4E00\u952E\u5E94\u7528\u5E76\u65E0\u7F1D\u638C\u63A7\u754C\u9762\u8BED\u8A00\u3002",CloudTitle:"\u4E91\u7AEF\u7FFB\u8BD1\u4E2D\u5FC3",CloudDesc:"\u63A5\u5165\u5168\u7403\u7FFB\u8BD1\u7F51\u7EDC\uFF0C\u53D1\u6398\u5E76\u83B7\u53D6\u7531\u793E\u533A\u6301\u7EED\u7EF4\u62A4\u7684\u7CBE\u6821\u4F18\u9009\u8BD1\u6587\u3002",TaskTitle:"\u793E\u533A\u7FFB\u8BD1\u4EFB\u52A1",TaskDesc:"\u53C2\u4E0E\u5F00\u6E90\u5171\u5EFA\u751F\u6001\uFF0C\u8BA4\u9886\u5E76\u653B\u514B\u672A\u51B3\u7684\u7FFB\u8BD1\u4EFB\u52A1\uFF0C\u5171\u4EAB\u672C\u5730\u5316\u6210\u679C\u3002",QqTitle:"QQ \u5B98\u65B9\u4EA4\u6D41\u7FA4",QqDesc:"\u56FD\u5185\u6D3B\u8DC3\u521B\u4F5C\u8005\u9635\u5730\uFF0C\u5206\u4EAB\u7FFB\u8BD1\u5FC3\u5F97\u3001\u6781\u901F\u83B7\u53D6\u4E00\u624B\u66F4\u65B0\u4E0E\u6280\u672F\u7B54\u7591\u3002",DiscordTitle:"Discord \u4EA4\u6D41\u7FA4",DiscordDesc:"\u52A0\u5165\u5168\u7403\u5316\u7684\u73A9\u5BB6\u4E0E\u5F00\u53D1\u8005\u793E\u533A\uFF0C\u5206\u4EAB\u63D2\u4EF6\u7ECF\u9A8C\uFF0C\u83B7\u53D6\u5373\u65F6\u89E3\u7B54\u3002",AfdianTitle:"\u652F\u6301\u4E0E\u8D5E\u52A9",AfdianDesc:"\u901A\u8FC7\u7231\u53D1\u7535\u8D5E\u52A9\u5F00\u53D1\u8005\uFF0C\u52A9\u529B\u63D2\u4EF6\u6301\u7EED\u8FED\u4EE3\u4E0E\u751F\u6001\u7E41\u8363\u3002",CoreFeaturesLabel:"\u6838\u5FC3\u529F\u80FD",CommunityLabel:"\u793E\u533A\u52A8\u6001",SupportLabel:"\u53CD\u9988\u4E0E\u652F\u6301",VerLabel:"\u7248\u672C",BrowseAction:"\u6D4F\u89C8",JoinAction:"\u52A0\u5165",MoreExpect:"\u66F4\u591A\u786C\u6838\u80FD\u529B\u6B63\u5728\u6301\u7EED\u6784\u5EFA\u4E2D\uFF0C\u656C\u8BF7\u671F\u5F85\u2026\u2026"}});var M8,O8=de(()=>{M8={Titles:{Tab:"\u767B\u5F55/\u6CE8\u518C",Welcome:"\u6B22\u8FCE",WelcomeBack:"\u6B22\u8FCE\u56DE\u6765"},Labels:{AccountStatus:"\u8D26\u6237\u72B6\u6001",ConnectedCloud:"\u5DF2\u8FDE\u63A5\u4E91\u7AEF",RememberMe:"\u8BB0\u4F4F\u8D26\u53F7\u5BC6\u7801",Username:"\u7528\u6237\u540D",Password:"\u5BC6\u7801",Email:"\u90AE\u7BB1",Code:"\u9A8C\u8BC1\u7801",ConfirmPassword:"\u786E\u8BA4\u5BC6\u7801",DefaultUser:"\u7528\u6237",UserId:"\u7528\u6237 ID"},Actions:{Login:"\u767B\u5F55",Logout:"\u9000\u51FA\u767B\u5F55",Register:"\u6CE8\u518C",SendCode:"\u53D1\u9001\u9A8C\u8BC1\u7801",CreateAccount:"\u521B\u5EFA\u8D26\u6237"},Status:{LoggingIn:"\u767B\u5F55\u4E2D...",Registering:"\u6CE8\u518C\u4E2D..."},Hints:{LoginDesc:"\u767B\u5F55\u60A8\u7684\u8D26\u6237\u4EE5\u8BBF\u95EE\u4E91\u7AEF\u529F\u80FD",RegisterDesc:"\u6CE8\u518C\u65B0\u8D26\u6237\u4EE5\u5F00\u59CB\u4F7F\u7528"},Notices:{SendSuccess:"\u53D1\u9001\u6210\u529F",RegSuccess:"\u6CE8\u518C\u6210\u529F\uFF0C\u8BF7\u767B\u5F55",LoggedOut:"\u5DF2\u9000\u51FA\u767B\u5F55"},Errors:{SendFail:"\u53D1\u9001\u5931\u8D25",LoginFail:"\u767B\u5F55\u5931\u8D25",RegFail:"\u6CE8\u518C\u5931\u8D25",PassMismatch:"\u4E24\u6B21\u5BC6\u7801\u4E0D\u4E00\u81F4",NoEmail:"\u672A\u8BBE\u7F6E\u90AE\u7BB1",InputEmail:"\u8BF7\u8F93\u5165\u90AE\u7BB1",InputUserPass:"\u8BF7\u8F93\u5165\u7528\u6237\u540D\u548C\u5BC6\u7801",InputEmailCode:"\u8BF7\u8F93\u5165\u90AE\u7BB1\u548C\u9A8C\u8BC1\u7801"}}});var F8,B8=de(()=>{F8={Titles:{Tab:"\u7528\u6237\u534F\u8BAE",Main:"I18N \u63D2\u4EF6\u7528\u6237\u534F\u8BAE"},Hints:{Desc:"\u4F7F\u7528\u524D\u8BF7\u4ED4\u7EC6\u9605\u8BFB\u4EE5\u4E0B\u6761\u6B3E",End:"-- \u534F\u8BAE\u7ED3\u675F --",ReadThanks:"\u611F\u8C22\u60A8\u7684\u9605\u8BFB\u3002",Scroll:"\u8BF7\u5411\u4E0B\u6EDA\u52A8\u9605\u8BFB\u5B8C\u6574\u534F\u8BAE",ReadReminder:"\u8BF7\u9605\u8BFB\u5B8C\u534F\u8BAE\u4EE5\u7EE7\u7EED\u3002"},Actions:{Agree:"\u5DF2\u9605\u8BFB\u5E76\u540C\u610F",Disagree:"\u4E0D\u540C\u610F (\u9000\u51FA)"}}});var $8,j8=de(()=>{$8={Tabs:{Basis:"\u7EFC\u5408\u8BBE\u7F6E",Re:"RE \u914D\u7F6E",Ast:"AST \u914D\u7F6E",Immersive:"\u6C89\u6D78\u7FFB\u8BD1",Ai:"\u8BED\u8A00\u6A21\u578B",Share:"\u5171\u5EFA\u751F\u6001"},Basis:{UpdateHeader:"\u68C0\u67E5\u66F4\u65B0",BasisHeader:"\u57FA\u7840\u914D\u7F6E",AutoHeader:"\u81EA\u52A8\u5316\u4EFB\u52A1",ExternalHeader:"\u63A8\u8350\u63D2\u4EF6",CloudHeader:"\u4E91\u7AEF\u4E0E\u7F51\u7EDC",ResetHeader:"\u5371\u9669\u64CD\u4F5C",UpdateTitle:"\u68C0\u67E5\u66F4\u65B0",UpdateDesc:"\u542F\u52A8\u65F6\u9759\u9ED8\u68C0\u67E5\u65B0\u7248\u672C\uFF0C\u6709\u66F4\u65B0\u65F6\u5F39\u7A97\u63D0\u9192\u3002",CheckUpdatePrefix:"\u66F4\u65B0\u68C0\u67E5",CheckUpdateNotice:"\u53D1\u73B0\u65B0\u7248\u672C",SmartUpdateTitle:"\u667A\u80FD\u66F4\u65B0",SmartUpdateDesc:"\u5176\u4ED6\u63D2\u4EF6\u66F4\u65B0\u7248\u672C\u540E\uFF0C\u81EA\u52A8\u5C06\u5DF2\u6709\u8BD1\u6587\u91CD\u65B0\u5E94\u7528\uFF0C\u65E0\u9700\u624B\u52A8\u64CD\u4F5C\u3002",SmartTitle:"\u667A\u80FD\u66F4\u65B0",SmartUpdate:"\u5DF2\u81EA\u52A8\u91CD\u8F7D ",SmartPlugins:" \u4E2A\u63D2\u4EF6",LangTitle:"\u76EE\u6807\u8BED\u8A00",LangDesc:"\u4E91\u7AEF\u4E0B\u8F7D\u4E0E AI \u7FFB\u8BD1\u65F6\u9ED8\u8BA4\u4F7F\u7528\u7684\u8BED\u8A00\u3002",AutoSaveTitle:"\u81EA\u52A8\u4FDD\u5B58",AutoSaveDesc:"\u5728\u7FFB\u8BD1\u7F16\u8F91\u5668\u4E2D\u6BCF\u9694\u4E00\u6BB5\u65F6\u95F4\u81EA\u52A8\u4FDD\u5B58\u4FEE\u6539\uFF0C\u9632\u6B62\u610F\u5916\u4E22\u5931\u3002",AuthorTitle:"\u4F5C\u8005\u7F72\u540D",AuthorDesc:"\u63D0\u53D6\u8BD1\u6587\u65F6\u81EA\u52A8\u9644\u5E26\u7684\u7F72\u540D\uFF0C\u7559\u7A7A\u5219\u4E0D\u7F72\u540D\u3002",AuthorPlaceholder:"\u4F8B: Eondr",AutoApplyTitle:"\u81EA\u52A8\u5E94\u7528",AutoApplyDesc:"\u5339\u914D\u5230\u53EF\u7528\u7FFB\u8BD1\u540E\u81EA\u52A8\u6CE8\u5165\u5E76\u91CD\u8F7D\u76EE\u6807\u63D2\u4EF6\uFF0C\u5168\u7A0B\u65E0\u9700\u624B\u52A8\u5E72\u9884\u3002",AutoSilentTitle:"\u9759\u9ED8\u8FD0\u884C",AutoSilentDesc:"\u540E\u53F0\u6267\u884C\u65F6\u4E0D\u5F39\u51FA\u8FDB\u5EA6\u901A\u77E5\uFF0C\u53EA\u5728\u5B9E\u9645\u5B8C\u6210\u66F4\u65B0\u65F6\u7B80\u8981\u63D0\u9192\u3002",AutoTrustedReposTitle:"\u53D7\u4FE1\u4EFB\u6E90",AutoTrustedReposDesc:"\u4EC5\u4ECE\u8FD9\u4E9B\u4ED3\u5E93\u81EA\u52A8\u62C9\u53D6\u7FFB\u8BD1\u6587\u4EF6\uFF0C\u6BCF\u884C\u4E00\u4E2A\u5730\u5740\u3002",AutoTrustedReposPlaceholder:"\u4F8B: owner/repo",ManagerTitle:"Better Plugins Manager (BPM)",ManagerDesc:"\u5EF6\u8FDF\u52A0\u8F7D \xB7 \u5206\u7EC4\u7BA1\u7406 \xB7 GitHub \u76F4\u88C5 \xB7 \u51B2\u7A81\u68C0\u6D4B \u2014\u2014 \u4E3A\u91CD\u5EA6 Obsidian \u7528\u6237\u8BBE\u8BA1\u7684\u5168\u80FD\u63D2\u4EF6\u7BA1\u7406\u5668\u3002",ManagerBtn:"\u67E5\u770B BPM \u8BE6\u60C5",DefaultCloudRepoTitle:"\u4E91\u7AEF\u4ED3\u5E93",DefaultCloudRepoDesc:"\u7BA1\u7406\u5668\u7684\u300C\u4E91\u7AEF\u7248\u672C\u300D\u4E0B\u62C9\u6846\u5C06\u4F18\u5148\u4ECE\u6B64\u4ED3\u5E93\u83B7\u53D6\u53EF\u7528\u7FFB\u8BD1\u3002",DefaultCloudRepoPlaceholder:"\u4F8B: owner/repo",GithubProxyTitle:"\u52A0\u901F\u8282\u70B9",GithubProxyDesc:"\u4E3A\u4E0B\u8F7D\u8D44\u6E90\u9009\u4E00\u4E2A\u4EE3\u7406\uFF0C\u4E0D\u7A33\u5B9A\u5C31\u6362\u3002",ProxyDirect:"\u76F4\u8FDE",ProxyNode1:"ghp.ci",ProxyNode2:"ghproxy.net",ProxyNode5:"gh-proxy.com",ProxyNode7:"jsDelivr CDN",ProxyNode8:"jsDelivr Fastly",ProxyNode9:"jsDelivr GCore",ProxyNode10:"Statically",ProxyTestBtn:"\u6D4B\u901F",ProxyTestTooltip:"\u6D4B\u8BD5\u5F53\u524D\u8282\u70B9\u5EF6\u8FDF",ProxyTesting:"\u6D4B\u8BD5\u4E2D\u2026",ProxyTestSuccess:"\u53EF\u7528 \xB7 {{ms}}ms",ProxyTestFail:"\u4E0D\u53EF\u7528",ProxyTestErrorNotice:"\u8282\u70B9\u8D85\u65F6\u6216\u4E0D\u53EF\u8FBE",ProxySecurityNotice:"\u26A0\uFE0F \u4EE3\u7406\u4EC5\u52A0\u901F\u516C\u5171\u8D44\u6E90\u3002Token \u4E0E\u79C1\u6709\u540C\u6B65\u59CB\u7EC8\u76F4\u8FDE\uFF0C\u4E0D\u7ECF\u7B2C\u4E09\u65B9\u3002",GithubApiTimeoutHint:"\u8BF7\u6C42\u8D85\u65F6\uFF0CToken \u64CD\u4F5C\u65E0\u6CD5\u8D70\u4EE3\u7406\u3002\u8BF7\u68C0\u67E5\u7F51\u7EDC\u6216\u5F00\u542F\u7CFB\u7EDF\u4EE3\u7406\u3002",GithubApiTokenMissing:"\u8BF7\u5148\u914D\u7F6E GitHub Token",GithubApiFileNotFound:"\u6587\u4EF6\u4E0D\u5B58\u5728",GithubApiCheckFailed:"\u8FDE\u63A5\u5931\u8D25",GithubApiCheckSuccess:"\u8FDE\u63A5\u6210\u529F",ResetTitle:"\u91CD\u7F6E\u63D2\u4EF6\u65B9\u6848",ResetDesc:"\u5C06\u6240\u6709\u914D\u7F6E\u6062\u590D\u81F3\u51FA\u5382\u72B6\u6001\u3002\u6B64\u64CD\u4F5C\u4E0D\u53EF\u9006\uFF0C\u8BF7\u8C28\u614E\u64CD\u4F5C\u3002",ResetBtn:"\u91CD\u7F6E\u914D\u7F6E",ResetConfirm:"\u786E\u5B9A\u8981\u91CD\u7F6E\u6240\u6709\u63D2\u4EF6\u914D\u7F6E\u5417\uFF1F\u8FD9\u5C06\u6E05\u9664\u6240\u6709\u5DF2\u4FDD\u5B58\u7684\u8BBE\u7F6E\uFF08\u5305\u62EC API Key\u3001\u6B63\u5219\u8868\u8FBE\u5F0F\u7B49\uFF09\u3002",ResetSuccess:"\u914D\u7F6E\u5DF2\u91CD\u7F6E"},Re:{ParamsHeader:"\u6B63\u5219\u53C2\u6570",FlagTitle:"\u5339\u914D\u6807\u5FD7",FlagDesc:"\u6B63\u5219\u4FEE\u9970\u7B26\uFF0C\u5982 g(\u5168\u5C40) s(\u5355\u884C)\u3002\u5F71\u54CD\u6240\u6709\u63D0\u53D6\u89C4\u5219\u7684\u5339\u914D\u884C\u4E3A\u3002",FlagPlaceholder:"\u4F8B: gs",LenTitle:"\u957F\u5EA6\u4E0A\u9650",LenDesc:"\u8D85\u8FC7\u6B64\u957F\u5EA6\u7684\u5339\u914D\u7ED3\u679C\u5C06\u88AB\u4E22\u5F03\uFF0C\u907F\u514D\u8BEF\u6355\u5927\u6BB5\u4EE3\u7801\u3002",DataHeader:"\u63D0\u53D6\u89C4\u5219",DataEditTitle:"\u63D0\u53D6\u89C4\u5219",DataEditDesc:"\u7528\u4E8E\u4ECE\u63D2\u4EF6\u6E90\u7801\u4E2D\u6355\u83B7\u53EF\u7FFB\u8BD1\u6587\u672C\u7684\u6B63\u5219\u5217\u8868\u3002",DataPlaceholder:"\u4E00\u884C\u4E00\u6761\u6B63\u5219",RegexHeader:"\u5185\u5BB9\u8FC7\u6EE4",RejectReTitle:"\u6392\u9664\u89C4\u5219",RejectReDesc:"\u5339\u914D\u5230\u7684\u6587\u672C\u5C06\u88AB\u8DF3\u8FC7\uFF0C\u4E0D\u8FDB\u5165\u7FFB\u8BD1\u6D41\u7A0B\u3002",RejectPlaceholder:"\u4E00\u884C\u4E00\u6761\u6392\u9664\u6B63\u5219",ValidReTitle:"\u4FDD\u7559\u89C4\u5219",ValidReDesc:"\u53EA\u6709\u5339\u914D\u5230\u7684\u6587\u672C\u624D\u4F1A\u88AB\u63D0\u53D6\uFF0C\u5176\u4F59\u5168\u90E8\u5FFD\u7565\u3002",ValidPlaceholder:"\u4E00\u884C\u4E00\u6761\u4FDD\u7559\u6B63\u5219",PromptHeader:"\u7FFB\u8BD1\u63D0\u793A",PromptTitle:"\u7FFB\u8BD1 Prompt",PromptDesc:"\u6B63\u5219\u6A21\u5F0F\u4E0B\u53D1\u9001\u7ED9 LLM \u7684\u7FFB\u8BD1\u6307\u4EE4\u6A21\u677F\u3002",PromptPlaceholder:"\u8F93\u5165 Prompt \u6A21\u677F"},Ast:{ConfigHeader:"\u63D0\u53D6\u89C4\u5219",AssignTitle:"\u8D4B\u503C\u5C5E\u6027",AssignDesc:"\u5B57\u7B26\u4E32\u8D4B\u503C\u7ED9\u8FD9\u4E9B\u5C5E\u6027\u65F6\u4F1A\u88AB\u6355\u83B7\uFF0C\u5982 name\u3001description\u3002",AssignPlaceholder:"\u4E00\u884C\u4E00\u4E2A\u5C5E\u6027\u540D",FuncTitle:"\u51FD\u6570\u53C2\u6570",FuncDesc:"\u4F20\u5165\u8FD9\u4E9B\u51FD\u6570\u7684\u5B57\u7B26\u4E32\u53C2\u6570\u4F1A\u88AB\u6355\u83B7\uFF0C\u5982 setText\u3001setName\u3002",FuncPlaceholder:"\u4E00\u884C\u4E00\u4E2A\u51FD\u6570\u540D",KeyTitle:"\u5BF9\u8C61\u952E\u540D",KeyDesc:"\u5BF9\u8C61\u4E2D\u8FD9\u4E9B\u952E\u5BF9\u5E94\u7684\u503C\u4F1A\u88AB\u6355\u83B7\uFF0C\u5982 text\u3001label\u3002",KeyPlaceholder:"\u4E00\u884C\u4E00\u4E2A\u952E\u540D",RegexHeader:"\u5185\u5BB9\u8FC7\u6EE4",RejectReTitle:"\u6392\u9664\u89C4\u5219",RejectReDesc:"\u5339\u914D\u5230\u7684\u6587\u672C\u5C06\u88AB\u8DF3\u8FC7\uFF0C\u4E0D\u8FDB\u5165\u7FFB\u8BD1\u6D41\u7A0B\u3002",RejectPlaceholder:"\u4E00\u884C\u4E00\u6761\u6392\u9664\u6B63\u5219",ValidReTitle:"\u4FDD\u7559\u89C4\u5219",ValidReDesc:"\u53EA\u6709\u5339\u914D\u5230\u7684\u6587\u672C\u624D\u4F1A\u88AB\u63D0\u53D6\uFF0C\u5176\u4F59\u5168\u90E8\u5FFD\u7565\u3002",ValidPlaceholder:"\u4E00\u884C\u4E00\u6761\u4FDD\u7559\u6B63\u5219",PromptHeader:"\u7FFB\u8BD1\u63D0\u793A",PromptTitle:"\u7FFB\u8BD1 Prompt",PromptDesc:"AST \u6A21\u5F0F\u4E0B\u53D1\u9001\u7ED9 LLM \u7684\u7FFB\u8BD1\u6307\u4EE4\u6A21\u677F\u3002",PromptPlaceholder:"\u8F93\u5165 Prompt \u6A21\u677F"},Immersive:{Title:"\u542F\u7528\u6C89\u6D78\u5F0F\u7FFB\u8BD1",Desc:"\u5F00\u542F\u540E\uFF0C\u63D2\u4EF6\u5C06\u5BF9\u754C\u9762\u5143\u7D20\u8FDB\u884C\u5B9E\u65F6\u7FFB\u8BD1\u3002",CoreControl:"\u6C89\u6D78\u5F0F\u6E32\u67D3\u63A7\u5236",CoreControlDesc:"\u914D\u7F6E\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u7684\u5168\u5C40\u53C2\u6570\u3002",MatchTitle:"\u5305\u542B\u9009\u62E9\u5668",MatchDesc:"\u7CBE\u786E\u6307\u5B9A\u9700\u8981\u7FFB\u8BD1\u7684\u9875\u9762\u5143\u7D20 (CSS Selectors)\u3002",MatchNotice:"\u66F4\u6539\u540E\u53EF\u80FD\u9700\u8981\u91CD\u542F\u6216\u91CD\u65B0\u52A0\u8F7D\u9875\u9762\u751F\u6548\u3002",ExcludeTitle:"\u6392\u9664\u9009\u62E9\u5668",ExcludeDesc:"\u7CBE\u786E\u6307\u5B9A\u9700\u8981\u6392\u9664\u7684\u9875\u9762\u5143\u7D20\u3002",RestartNotice:"\u914D\u7F6E\u5DF2\u66F4\u65B0\uFF0C\u90E8\u5206\u4FEE\u6539\u53EF\u80FD\u9700\u8981\u91CD\u542F\u63D2\u4EF6\u540E\u751F\u6548\u3002",DescLabel:"\u63CF\u8FF0\uFF1A",MainFrameTitle:"\u6839\u8282\u70B9\u8303\u56F4",MainFrameDesc:"\u6307\u5B9A\u7FFB\u8BD1\u7684\u6839\u8282\u70B9\u8303\u56F4 (\u5982\u6307\u5B9A\u6574\u4E2A\u6587\u7AE0\u7684\u5BB9\u5668)",StayOriginalTitle:"\u4FDD\u6301\u539F\u6837\u9009\u62E9\u5668",StayOriginalDesc:"\u5339\u914D\u7684\u5143\u7D20\u5C06\u4FDD\u6301\u539F\u6837\uFF0C\u5E38\u7528\u4E8E\u8BBA\u575B\u7F51\u7AD9\u7684\u4EE3\u7801\u5757\u6216\u6807\u7B7E\u3002",ExtraBlockTitle:"\u5757\u7EA7\u5143\u7D20\u9009\u62E9\u5668",ExtraBlockDesc:"\u5339\u914D\u7684\u5143\u7D20\u5C06\u88AB\u5F53\u4F5C block \u5757\u7EA7\u5143\u7D20\u5904\u7406\uFF0C\u72EC\u5360\u4E00\u884C\u3002",ExtraInlineTitle:"\u884C\u5185\u5143\u7D20\u9009\u62E9\u5668",ExtraInlineDesc:"\u5339\u914D\u7684\u5143\u7D20\u5C06\u88AB\u5F53\u4F5C inline \u884C\u5185\u5143\u7D20\u5904\u7406\u3002",TranslationClassesTitle:"\u8BD1\u6587\u7C7B\u540D (Class)",TranslationClassesDesc:"\u4E3A\u751F\u6210\u7684\u8BD1\u6587\u5143\u7D20\u6DFB\u52A0\u989D\u5916\u7684 CSS \u7C7B\u540D\u3002",InjectedCssTitle:"\u6CE8\u5165\u81EA\u5B9A\u4E49 CSS",InjectedCssDesc:"\u5728\u9875\u9762\u4E2D\u5D4C\u5165\u989D\u5916\u7684 CSS \u6837\u5F0F\u4EE3\u7801\u3002"},Ai:{ConfigHeader:"\u670D\u52A1\u914D\u7F6E",Provider:"\u670D\u52A1\u5546",ProviderDesc:"\u9009\u62E9 LLM \u63D0\u4F9B\u5546\u3002",HomepageBtn:"\u83B7\u53D6 API Key (\u5B98\u7F51)",ProfileSelectTitle:"\u914D\u7F6E\u65B9\u6848",ProfileSelectDesc:"\u5207\u6362\u4E0D\u540C API \u65B9\u6848\uFF0C\u5982 OpenAI\u3001DeepSeek\u3001\u7845\u57FA\u6D41\u52A8\u3002",ProfileAddBtn:"\u65B0\u589E",ProfileDelBtn:"\u5220\u9664",ProfileRenameBtn:"\u91CD\u547D\u540D",ProfileNamePlaceholder:"\u65B9\u6848\u540D\u79F0",ProfileAddNotice:"\u65B9\u6848\u5DF2\u521B\u5EFA",ProfileDelConfirm:"\u5220\u9664\u540E\u65E0\u6CD5\u6062\u590D\uFF0C\u786E\u8BA4\uFF1F",ProfileRenameNotice:"\u8F93\u5165\u65B0\u540D\u79F0",ProfileNameTitle:"\u65B9\u6848\u540D\u79F0",ProfileNameDesc:"\u5F53\u524D\u65B9\u6848\u7684\u663E\u793A\u540D\u79F0\u3002",OpenaiUrlTitle:"\u63A5\u53E3\u5730\u5740",OpenaiUrlDesc:"API \u57FA\u7840\u8DEF\u5F84\uFF0C\u5982 https://api.openai.com",OpenaiUrlPlaceholder:"https://api.openai.com",OpenaiKeyTitle:"API \u5BC6\u94A5",OpenaiKeyDescTip:"\u5BC6\u94A5\u52A0\u5BC6\u5B58\u50A8\u5728\u672C\u5730\uFF0C\u4E0D\u4F1A\u4E0A\u4F20\u3002",OpenaiKeyPlaceholder:"sk-...",ResponseFormatTitle:"\u54CD\u5E94\u683C\u5F0F",ResponseFormatDesc:"LLM \u8FD4\u56DE\u6570\u636E\u7684\u89E3\u6790\u65B9\u5F0F\u3002",ResponseFormatText:"Text (\u901A\u7528)",ResponseFormatJsonObject:"JSON Object",ResponseFormatJsonSchema:"JSON Schema",ModelTitle:"\u6A21\u578B",ModelDesc:"\u7528\u4E8E\u7FFB\u8BD1\u7684\u6A21\u578B\u540D\u79F0\u3002",ModelSelectPlaceholder:"\u9009\u62E9\u5185\u7F6E\u6A21\u578B",ModelInputPlaceholder:"\u6216\u624B\u52A8\u8F93\u5165",TestHeader:"\u8FDE\u901A\u6D4B\u8BD5",TestTitle:"\u6D4B\u8BD5\u8FDE\u63A5",TestDesc:"\u9A8C\u8BC1\u5F53\u524D\u914D\u7F6E\u80FD\u5426\u6B63\u5E38\u8FDE\u63A5 AI \u670D\u52A1\u3002",TestBtn:"\u6D4B\u8BD5",TestLoading:"\u6D4B\u8BD5\u4E2D\u2026",TestStageNetwork:"\u68C0\u67E5\u7F51\u7EDC\u2026",TestStageAuth:"\u9A8C\u8BC1\u5BC6\u94A5\u2026",TestStageModel:"\u9A8C\u8BC1\u6A21\u578B\u2026",TestSuccess:"\u8FDE\u63A5\u6210\u529F\uFF0C\u914D\u7F6E\u6B63\u5E38\u3002",TestSuccessBtn:"\u901A\u8FC7",TestNoticeMissing:"\u8BF7\u586B\u5199\u63A5\u53E3\u5730\u5740\u548C\u5BC6\u94A5",TestFail:"\u8FDE\u63A5\u5931\u8D25",TestFail401:"\u5BC6\u94A5\u65E0\u6548 (401)\uFF1A\u8BF7\u68C0\u67E5 API Key\u3002",TestFail404:"\u5730\u5740\u9519\u8BEF (404)\uFF1A\u8BF7\u68C0\u67E5\u63A5\u53E3\u8DEF\u5F84\u3002",TestFail403:"\u65E0\u6743\u9650 (403)\uFF1A\u8BF7\u68C0\u67E5\u8D26\u53F7\u6743\u9650\u3002",TestFail429:"\u9891\u7387\u9650\u5236 (429)\uFF1A\u989D\u5EA6\u4E0D\u8DB3\u6216\u8BF7\u6C42\u8FC7\u5FEB\u3002",TestFail500:"\u670D\u52A1\u7AEF\u5F02\u5E38 (500)\uFF1A\u63D0\u4F9B\u5546\u670D\u52A1\u5668\u6545\u969C\u3002",TestFailTimeout:"\u8BF7\u6C42\u8D85\u65F6\uFF1A\u68C0\u67E5\u7F51\u7EDC\u6216\u4EE3\u7406\u8BBE\u7F6E\u3002",TestFailNetwork:"\u7F51\u7EDC\u4E0D\u901A\uFF1A\u65E0\u6CD5\u8BBF\u95EE\u76EE\u6807\u670D\u52A1\u5668\u3002",TestFailModel:"\u6A21\u578B\u4E0D\u5B58\u5728\u6216\u65E0\u6743\u8BBF\u95EE\u3002",TestFailUnknown:"\u672A\u77E5\u9519\u8BEF",DiagModalTitle:"\u6DF1\u5EA6\u8BCA\u65AD\u62A5\u544A",DiagStatusHealthy:"\u5065\u5EB7",DiagStatusWarning:"\u8B66\u544A",DiagStatusFailed:"\u6545\u969C",DiagItemEndpoint:"\u63A5\u53E3\u7AEF\u70B9",DiagItemAuth:"\u8EAB\u4EFD\u9A8C\u8BC1",DiagItemModel:"\u6A21\u578B\u53EF\u7528\u6027",DiagItemJsonMode:"JSON \u6A21\u5F0F",DiagItemJsonSchema:"\u7ED3\u6784\u5316\u8F93\u51FA",DiagLatency:"\u5EF6\u8FDF",DiagStep:"\u8BCA\u65AD\u6B65\u9AA4",DiagResult:"\u7ED3\u679C",DiagRecommendation:"\u5EFA\u8BAE",DiagTipUrlV1:"\u8FDE\u63A5\u5F02\u5E38\uFF0C\u5DF2\u5C1D\u8BD5\u81EA\u52A8\u4FEE\u6B63 URL\u3002\u8BF7\u68C0\u67E5\u7F51\u7EDC\u6216\u4EE3\u7406\u3002",DiagTipModelFallback:"\u5F53\u524D\u6A21\u578B\u4E0D\u652F\u6301\u7ED3\u6784\u5316\u8F93\u51FA\u3002",DiagTipQuota:"\u914D\u989D\u53EF\u80FD\u5DF2\u8017\u5C3D\uFF0C\u8BF7\u68C0\u67E5\u670D\u52A1\u5546\u8D26\u5355\u3002",DiagItemSystemRole:"\u7CFB\u7EDF\u89D2\u8272",DiagItemTranslation:"\u7FFB\u8BD1\u6A21\u62DF",DiagStageSystemRole:"\u9A8C\u8BC1\u7CFB\u7EDF\u89D2\u8272\u2026",DiagStageTranslation:"\u6A21\u62DF\u7FFB\u8BD1\u2026",DiagTipSystemRole:"\u5F53\u524D\u6A21\u578B\u4E0D\u652F\u6301 system \u89D2\u8272\u3002",DiagTipTranslationFail:"\u7FFB\u8BD1\u6A21\u62DF\u5931\u8D25\uFF0C\u8FD4\u56DE\u683C\u5F0F\u5F02\u5E38\u3002",DiagTipLatencyWarn:"\u54CD\u5E94\u5EF6\u8FDF\u63A5\u8FD1\u8D85\u65F6\u9608\u503C\uFF0C\u6279\u91CF\u7FFB\u8BD1\u65F6\u53EF\u80FD\u8D85\u65F6\u3002",PromptHeader:"\u7FFB\u8BD1\u63D0\u793A",RegexPromptTitle:"\u6B63\u5219 Prompt",RegexPromptDesc:"\u6B63\u5219\u63D0\u53D6\u6A21\u5F0F\u4E0B\u7684\u7FFB\u8BD1\u6307\u4EE4\u6A21\u677F\u3002",RegexPromptPlaceholder:"\u8F93\u5165 Prompt \u6A21\u677F",AstPromptTitle:"AST Prompt",AstPromptDesc:"AST \u63D0\u53D6\u6A21\u5F0F\u4E0B\u7684\u7FFB\u8BD1\u6307\u4EE4\u6A21\u677F\u3002",AstPromptPlaceholder:"\u8F93\u5165 Prompt \u6A21\u677F",ThemePromptTitle:"\u4E3B\u9898 Prompt",ThemePromptDesc:"\u4E3B\u9898\u7FFB\u8BD1\u6A21\u5F0F\u4E0B\u7684\u7FFB\u8BD1\u6307\u4EE4\u6A21\u677F\u3002",ThemePromptPlaceholder:"\u8F93\u5165 Prompt \u6A21\u677F",PriceHeader:"\u8D39\u7528\u4F30\u7B97",CustomPriceTitle:"\u81EA\u5B9A\u4E49\u5355\u4EF7",CustomPriceDesc:"\u5173\u95ED\u65F6\u6309\u5185\u7F6E\u6A21\u578B\u4EF7\u683C\u4F30\u7B97\uFF087.3 \u6C47\u7387\u6298\u4EBA\u6C11\u5E01\uFF09\u3002",PriceInputTitle:"\u8F93\u5165\u5355\u4EF7 (\xA5/1M tokens)",PriceInputDesc:"\u6BCF\u767E\u4E07\u8F93\u5165 Token \u7684\u4EBA\u6C11\u5E01\u4EF7\u683C\uFF0C\u5982 gpt-4o-mini \u2248 1.1\u3002",PriceOutputTitle:"\u8F93\u51FA\u5355\u4EF7 (\xA5/1M tokens)",PriceOutputDesc:"\u6BCF\u767E\u4E07\u8F93\u51FA Token \u7684\u4EBA\u6C11\u5E01\u4EF7\u683C\uFF0C\u652F\u6301 4 \u4F4D\u5C0F\u6570\u3002",GeminiKeyTitle:"Gemini API \u5BC6\u94A5",GeminiKeyDesc:"Google AI Studio \u7684 API Key\uFF0C\u5BC6\u94A5\u52A0\u5BC6\u5B58\u50A8\u5728\u672C\u5730\u3002",GeminiKeyMissing:"\u8BF7\u5148\u914D\u7F6E Gemini API Key",OllamaUrlTitle:"Ollama \u7AEF\u70B9\u5730\u5740",OllamaUrlDesc:"\u672C\u5730 Ollama \u670D\u52A1\u7684 HTTP \u5730\u5740\uFF0C\u9ED8\u8BA4\u4E3A http://localhost:11434\u3002",OllamaModelDesc:"\u9009\u62E9\u6216\u8F93\u5165\u5DF2\u5B89\u88C5\u7684 Ollama \u6A21\u578B\u540D\u79F0\u3002",OllamaModelPlaceholder:"\u4F8B: qwen2.5 \u6216 llama3",OllamaFetchModelsBtn:"\u5237\u65B0\u6A21\u578B\u5217\u8868",OllamaNoModels:"\u672A\u68C0\u6D4B\u5230\u5DF2\u5B89\u88C5\u6A21\u578B\uFF0C\u8BF7\u5148\u901A\u8FC7 Ollama \u4E0B\u8F7D\u6A21\u578B\u3002",OllamaModelsLoaded:"\u5DF2\u52A0\u8F7D {{count}} \u4E2A\u6A21\u578B",OllamaFetchFailed:"\u65E0\u6CD5\u8FDE\u63A5 Ollama \u670D\u52A1\uFF0C\u8BF7\u68C0\u67E5\u662F\u5426\u5DF2\u542F\u52A8\u3002",OllamaConnectFail:"\u65E0\u6CD5\u8FDE\u63A5 Ollama",OllamaModelNotFound:"\u6A21\u578B {{model}} \u672A\u627E\u5230\uFF0C\u8BF7\u5148\u6267\u884C ollama pull {{model}}",DeepseekKeyTitle:"DeepSeek API \u5BC6\u94A5",DeepseekModelDesc:"\u9009\u62E9\u6216\u8F93\u5165 DeepSeek \u6A21\u578B\u540D\u79F0\u3002",ZhipuKeyTitle:"\u667A\u8C31 AI \u5BC6\u94A5 (API Key)",ZhipuModelDesc:"\u9009\u62E9\u6216\u8F93\u5165\u667A\u8C31 GLM \u7CFB\u5217\u6A21\u578B\u540D\u79F0\u3002",MoonshotKeyTitle:"\u6708\u4E4B\u6697\u9762 (Kimi) \u5BC6\u94A5",MoonshotModelDesc:"\u9009\u62E9\u6216\u8F93\u5165 Moonshot \u7CFB\u5217\u6A21\u578B\u540D\u79F0\u3002",AliyunKeyTitle:"\u901A\u4E49\u5343\u95EE (DashScope) \u5BC6\u94A5",AliyunModelDesc:"\u9009\u62E9\u6216\u8F93\u5165 Qwen \u7CFB\u5217\u6A21\u578B\u540D\u79F0\u3002",BaiduKeyTitle:"\u767E\u5EA6\u5343\u5E06 (Qianfan) \u5BC6\u94A5",BaiduModelDesc:"\u9009\u62E9\u6216\u8F93\u5165\u767E\u5EA6\u6587\u5FC3\u4E00\u8A00 (ERNIE) \u7CFB\u5217\u6A21\u578B\u540D\u79F0\u3002",BytedanceKeyTitle:"\u5B57\u8282\u8DF3\u52A8 (\u8C46\u5305/Ark) \u5BC6\u94A5",BytedanceModelDesc:"\u9009\u62E9\u6216\u8F93\u5165\u8C46\u5305\u7CFB\u5217\u6A21\u578B\u540D\u79F0\u3002",GroqKeyTitle:"Groq API \u5BC6\u94A5",GroqModelDesc:"\u9009\u62E9\u6216\u8F93\u5165 Groq \u652F\u6301\u7684\u6A21\u578B (\u5982 Llama 3)\u3002",SiliconflowKeyTitle:"SiliconFlow (\u7845\u57FA\u6D41\u52A8) \u5BC6\u94A5",SiliconflowModelDesc:"\u9009\u62E9\u6216\u8F93\u5165 SiliconFlow \u652F\u6301\u7684\u6A21\u578B (\u5982 DeepSeek-V3)\u3002",OpenrouterKeyTitle:"OpenRouter API \u5BC6\u94A5",OpenrouterModelDesc:"\u8F93\u5165 OpenRouter \u6A21\u578B\u6807\u8BC6\u7B26 (\u5982 anthropic/claude-3.5-sonnet)\u3002",DeepinfraKeyTitle:"DeepInfra API \u5BC6\u94A5",DeepinfraModelDesc:"\u9009\u62E9\u6216\u8F93\u5165 DeepInfra \u652F\u6301\u7684\u6A21\u578B (\u5982 Llama-3.3)\u3002",MistralKeyTitle:"Mistral AI API \u5BC6\u94A5",MistralModelDesc:"\u9009\u62E9\u6216\u8F93\u5165 Mistral \u5B98\u65B9\u6A21\u578B (\u5982 mistral-large-latest)\u3002",MinimaxKeyTitle:"MiniMax (\u6D77\u87BA AI) \u5BC6\u94A5",MinimaxModelDesc:"\u9009\u62E9\u6216\u8F93\u5165 MiniMax \u6A21\u578B (\u5982 abab6.5-chat)\u3002",StepfunKeyTitle:"\u9636\u8DC3\u661F\u8FB0 (StepFun) \u5BC6\u94A5",StepfunModelDesc:"\u9009\u62E9\u6216\u8F93\u5165\u9636\u8DC3\u661F\u8FB0\u6A21\u578B (\u5982 step-1-8k)\u3002"},Share:{AuthTitle:"\u8FDC\u7A0B\u4ED3\u5E93",ModeTitle:"\u8BBF\u95EE\u4EE4\u724C (Token)",ModeDesc:"\u914D\u7F6E\u7528\u4E8E\u540C\u6B65\u4E0E\u63D0\u4EA4\u7FFB\u8BD1\u7684\u4E2A\u4EBA\u8BBF\u95EE\u4EE4\u724C (PAT)\u3002",LoginSuccess:"\u5DF2\u8FDE\u63A5",TokenPlaceholder:"\u8BF7\u8F93\u5165 Token",Verifying:"\u6B63\u5728\u9A8C\u8BC1...",VerifyInsufficient:"\u6743\u9650\u4E0D\u8DB3 (\u9700 repo \u6743\u9650)",VerifyError:"\u9A8C\u8BC1\u5931\u8D25",TutorialTitle:"\u83B7\u53D6\u4EE4\u724C",TutorialTip:"\u63A8\u8350\u751F\u6210\u4EC5\u5305\u542B\u5FC5\u9700\u6743\u9650\u7684 Fine-grained Token (\u9700\u6388\u6743\u5BF9\u5E94\u6216\u5168\u90E8\u4ED3\u5E93\u7684 Contents \u8BFB\u5199\u6743\u9650)\u3002",SyncTitle:"\u540C\u6B65\u914D\u7F6E",RepoTitle:"\u76EE\u6807\u4ED3\u5E93",RepoDesc:"\u7528\u4E8E\u5B58\u50A8\u548C\u5206\u4EAB\u7FFB\u8BD1\u7684\u8FDC\u7A0B\u4ED3\u5E93\u540D\u3002",AccountTitle:"\u8D26\u6237\u7BA1\u7406",LogoutTitle:"\u9000\u51FA\u767B\u5F55",LogoutDesc:"\u6E05\u9664\u672C\u5730\u5B58\u50A8\u7684\u8EAB\u4EFD\u9A8C\u8BC1\u4FE1\u606F\u3002",LogoutBtn:"\u9000\u51FA\u767B\u5F55",LogoutSuccess:"\u5DF2\u9000\u51FA\u767B\u5F55",ProfileSelectTitle:"\u8D26\u53F7\u65B9\u6848 (Account Profile)",ProfileSelectDesc:"\u7BA1\u7406\u5E76\u5FEB\u901F\u5207\u6362\u4E0D\u540C\u7684 GitHub \u8D26\u53F7\u53CA\u5BF9\u5E94\u7684\u7FFB\u8BD1\u4ED3\u5E93\u65B9\u6848\u3002",ProfileAddBtn:"\u65B0\u589E\u8D26\u53F7",ProfileDelBtn:"\u5220\u9664\u8D26\u53F7",ProfileDelConfirm:"\u786E\u5B9A\u8981\u5220\u9664\u6B64\u8D26\u53F7\u65B9\u6848\u5417\uFF1F\u64CD\u4F5C\u65E0\u6CD5\u6062\u590D\u3002",ProfileNameTitle:"\u65B9\u6848\u6807\u8BC6\u540D",ProfileNameDesc:"\u4E3A\u5F53\u524D\u8D26\u53F7\u65B9\u6848\u81EA\u5B9A\u4E49\u4E00\u4E2A\u663E\u793A\u540D\u79F0\u4EE5\u4FBF\u533A\u5206\uFF08\u5982\uFF1A\u5DE5\u4F5C\u5F20\u53F7\u3001\u4E3B\u8D26\u53F7\u7B49\uFF09\u3002",ProfileNamePlaceholder:"\u8BF7\u8F93\u5165\u540D\u79F0...",ProfileAddNotice:"\u8D26\u53F7\u65B9\u6848\u5DF2\u521B\u5EFA"}}});var z8,U8=de(()=>{E8();A8();k8();L8();D8();O8();B8();j8();z8={Common:P8,Manager:I8,Editor:N8,Cloud:_8,Wizard:R8,Account:M8,Agreement:F8,Settings:$8}});var V8,tge,v,$r=de(()=>{L_();tr();V8=require("obsidian");U8();tge=()=>(V8.moment.locale()||"en").toLowerCase().startsWith("zh")?"zhCN":"en";Gi.use(t1).init({lng:tge(),fallbackLng:"zhCN",debug:!1,interpolation:{escapeValue:!1},resources:{zhCN:{translation:z8}}});v=(e,t)=>Gi.t(e,t)});var Pf,rL,Gc,i1=de(()=>{Pf={assignments:["overwriteName","innerHTML","outerHTML","title","alt","placeholder","textContent","innerText","ariaLabel","nodeValue","buttonText","confirmText","cancelText","labelText"],functions:["Notice","setTitle","setContent","setName","setDesc","setButtonText","setPlaceholder","setTooltip","addOption","addOptions","addHeading","addText","setHint","setWarning","setText","appendText","createEl","createDiv","createSpan","addCommand","insertText","replaceRange","replaceSelection","log","error","warn","info","alert","confirm","prompt","renderMarkdown","setLabel","setConfirmText","setCancelText"],keys:["name","description","text","placeholder","label","tooltip","title","header","desc","message","buttontext","aria-label","heading","content","tab","caption","subtitle","summary","info","warning","error","success","hint","instructions","link","selection","annotation","search","speech","page","empty","detail","body","option","notice","confirmText","cancelText","ariaLabel","buttonText"]},rL={REJECT_PATTERNS:[/^\s*$/,/^\d+$/,/^[\w-]+\.[\w-]+\.\w+$/,/^https?:\/\//i,/^data:image\//i,/^#([0-9a-f]{3}|[0-9a-f]{6})$/i,/^[a-z0-9]+-[a-z0-9-]+$/,/^[a-z]+[A-Z][a-zA-Z0-9]*$/,/^[A-Z_][A-Z0-9_]{3,}$/,/^(px|em|rem|vh|vw|auto)$/i,/^rgba?\(/i,/^\./,/\.(png|jpg|gif|svg|css|js|ts|md|json)$/i,/^[\w.\/\\-]+\/[\w.\/\\-]+$/],VALID_PATTERNS:[/\s/,/[^\x00-\x7F]/,/[!?,;:。!?,;:]\s*$/]},Gc={patterns:["(Notice|log|error|setText|setButtonText|setName|setDesc|setPlaceholder|setTooltip|appendText|setTitle|addHeading|renderMarkdown)\\(\\s*(['\"`])((?:[^\\\\2\\\\\\\\]|\\\\\\\\.)*?)\\2\\s*\\)","(textContent|innerText|name|description|selection|annotation|link|text|search|speech|page|settings)\\s*[:=]\\s*(['\"`])((?:[^\\\\2\\\\\\\\]|\\\\\\\\.)*?)\\2"],rejectPatterns:["^\\s*$","^\\d+$","^[\\w-]+\\.[\\w-]+\\.\\w+$","^https?:\\/\\/","^data:image\\/","^#([0-9a-f]{3}|[0-9a-f]{6})$","^[a-z0-9]+-[a-z0-9-]+$","^[a-z]+[A-Z][a-zA-Z0-9]*$","^[A-Z_][A-Z0-9_]{3,}$","^(px|em|rem|vh|vw|auto)$","^rgba?\\(","^\\.","\\.(png|jpg|gif|svg|css|js|ts|md|json)$","^[\\w.\\/\\\\-]+\\/[\\w.\\/\\\\-]+$"],validPatterns:["\\s","[^\\x00-\\x7F]","[!?,;:\u3002\uFF01\uFF1F\uFF0C\uFF1B\uFF1A]\\s*$"]}});var v1=ae(S0=>{"use strict";Object.defineProperty(S0,"__esModule",{value:!0});function nge(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var Yc=class{constructor(t,r,n){this.line=void 0,this.column=void 0,this.index=void 0,this.line=t,this.column=r,this.index=n}},hy=class{constructor(t,r){this.start=void 0,this.end=void 0,this.filename=void 0,this.identifierName=void 0,this.start=t,this.end=r}};function Cs(e,t){let{line:r,column:n,index:a}=e;return new Yc(r,n+t,a+t)}var G8="BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED",age={ImportMetaOutsideModule:{message:`import.meta may appear only with 'sourceType: "module"'`,code:G8},ImportOutsideModule:{message:`'import' and 'export' may appear only with 'sourceType: "module"'`,code:G8}},K8={ArrayPattern:"array destructuring pattern",AssignmentExpression:"assignment expression",AssignmentPattern:"assignment expression",ArrowFunctionExpression:"arrow function expression",ConditionalExpression:"conditional expression",CatchClause:"catch clause",ForOfStatement:"for-of statement",ForInStatement:"for-in statement",ForStatement:"for-loop",FormalParameters:"function parameter list",Identifier:"identifier",ImportSpecifier:"import specifier",ImportDefaultSpecifier:"import default specifier",ImportNamespaceSpecifier:"import namespace specifier",ObjectPattern:"object destructuring pattern",ParenthesizedExpression:"parenthesized expression",RestElement:"rest element",UpdateExpression:{true:"prefix operation",false:"postfix operation"},VariableDeclarator:"variable declaration",YieldExpression:"yield expression"},p1=e=>e.type==="UpdateExpression"?K8.UpdateExpression[`${e.prefix}`]:K8[e.type],ige={AccessorIsGenerator:({kind:e})=>`A ${e}ter cannot be a generator.`,ArgumentsInClass:"'arguments' is only allowed in functions and class methods.",AsyncFunctionInSingleStatementContext:"Async functions can only be declared at the top level or inside a block.",AwaitBindingIdentifier:"Can not use 'await' as identifier inside an async function.",AwaitBindingIdentifierInStaticBlock:"Can not use 'await' as identifier inside a static block.",AwaitExpressionFormalParameter:"'await' is not allowed in async function parameters.",AwaitUsingNotInAsyncContext:"'await using' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncContext:"'await' is only allowed within async functions and at the top levels of modules.",BadGetterArity:"A 'get' accessor must not have any formal parameters.",BadSetterArity:"A 'set' accessor must have exactly one formal parameter.",BadSetterRestParameter:"A 'set' accessor function argument must not be a rest parameter.",ConstructorClassField:"Classes may not have a field named 'constructor'.",ConstructorClassPrivateField:"Classes may not have a private field named '#constructor'.",ConstructorIsAccessor:"Class constructor may not be an accessor.",ConstructorIsAsync:"Constructor can't be an async function.",ConstructorIsGenerator:"Constructor can't be a generator.",DeclarationMissingInitializer:({kind:e})=>`Missing initializer in ${e} declaration.`,DecoratorArgumentsOutsideParentheses:"Decorator arguments must be moved inside parentheses: use '@(decorator(args))' instead of '@(decorator)(args)'.",DecoratorBeforeExport:"Decorators must be placed *before* the 'export' keyword. Remove the 'decoratorsBeforeExport: true' option to use the 'export @decorator class {}' syntax.",DecoratorsBeforeAfterExport:"Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time.",DecoratorConstructor:"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?",DecoratorExportClass:"Decorators must be placed *after* the 'export' keyword. Remove the 'decoratorsBeforeExport: false' option to use the '@decorator export class {}' syntax.",DecoratorSemicolon:"Decorators must not be followed by a semicolon.",DecoratorStaticBlock:"Decorators can't be used with a static block.",DeferImportRequiresNamespace:'Only `import defer * as x from "./module"` is valid.',DeletePrivateField:"Deleting a private field is not allowed.",DestructureNamedImport:"ES2015 named imports do not destructure. Use another statement for destructuring after the import.",DuplicateConstructor:"Duplicate constructor in the same class.",DuplicateDefaultExport:"Only one default export allowed per module.",DuplicateExport:({exportName:e})=>`\`${e}\` has already been exported. Exported identifiers must be unique.`,DuplicateProto:"Redefinition of __proto__ property.",DuplicateRegExpFlags:"Duplicate regular expression flag.",ElementAfterRest:"Rest element must be last element.",EscapedCharNotAnIdentifier:"Invalid Unicode escape.",ExportBindingIsString:({localName:e,exportName:t})=>`A string literal cannot be used as an exported binding without \`from\`.
- Did you mean \`export { '${e}' as '${t}' } from 'some-module'\`?`,ExportDefaultFromAsIdentifier:"'from' is not allowed as an identifier after 'export default'.",ForInOfLoopInitializer:({type:e})=>`'${e==="ForInStatement"?"for-in":"for-of"}' loop variable declaration may not have an initializer.`,ForInUsing:"For-in loop may not start with 'using' declaration.",ForOfAsync:"The left-hand side of a for-of loop may not be 'async'.",ForOfLet:"The left-hand side of a for-of loop may not start with 'let'.",GeneratorInSingleStatementContext:"Generators can only be declared at the top level or inside a block.",IllegalBreakContinue:({type:e})=>`Unsyntactic ${e==="BreakStatement"?"break":"continue"}.`,IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list.",IllegalReturn:"'return' outside of function.",ImportAttributesUseAssert:"The `assert` keyword in import attributes is deprecated and it has been replaced by the `with` keyword. You can enable the `deprecatedImportAssert` parser plugin to suppress this error.",ImportBindingIsString:({importName:e})=>`A string literal cannot be used as an imported binding.
- Did you mean \`import { "${e}" as foo }\`?`,ImportCallArity:"`import()` requires exactly one or two arguments.",ImportCallNotNewExpression:"Cannot use new with import(...).",ImportCallSpreadArgument:"`...` is not allowed in `import()`.",ImportJSONBindingNotDefault:"A JSON module can only be imported with `default`.",ImportReflectionHasAssertion:"`import module x` cannot have assertions.",ImportReflectionNotBinding:'Only `import module x from "./module"` is valid.',IncompatibleRegExpUVFlags:"The 'u' and 'v' regular expression flags cannot be enabled at the same time.",InvalidBigIntLiteral:"Invalid BigIntLiteral.",InvalidCodePoint:"Code point out of bounds.",InvalidCoverDiscardElement:"'void' must be followed by an expression when not used in a binding position.",InvalidCoverInitializedName:"Invalid shorthand property initializer.",InvalidDecimal:"Invalid decimal.",InvalidDigit:({radix:e})=>`Expected number in radix ${e}.`,InvalidEscapeSequence:"Bad character escape sequence.",InvalidEscapeSequenceTemplate:"Invalid escape sequence in template.",InvalidEscapedReservedWord:({reservedWord:e})=>`Escape sequence in keyword ${e}.`,InvalidIdentifier:({identifierName:e})=>`Invalid identifier ${e}.`,InvalidLhs:({ancestor:e})=>`Invalid left-hand side in ${p1(e)}.`,InvalidLhsBinding:({ancestor:e})=>`Binding invalid left-hand side in ${p1(e)}.`,InvalidLhsOptionalChaining:({ancestor:e})=>`Invalid optional chaining in the left-hand side of ${p1(e)}.`,InvalidNumber:"Invalid number.",InvalidOrMissingExponent:"Floating-point numbers require a valid exponent after the 'e'.",InvalidOrUnexpectedToken:({unexpected:e})=>`Unexpected character '${e}'.`,InvalidParenthesizedAssignment:"Invalid parenthesized assignment pattern.",InvalidPrivateFieldResolution:({identifierName:e})=>`Private name #${e} is not defined.`,InvalidPropertyBindingPattern:"Binding member expression.",InvalidRecordProperty:"Only properties and spread elements are allowed in record definitions.",InvalidRestAssignmentPattern:"Invalid rest operator's argument.",LabelRedeclaration:({labelName:e})=>`Label '${e}' is already declared.`,LetInLexicalBinding:"'let' is disallowed as a lexically bound name.",LineTerminatorBeforeArrow:"No line break is allowed before '=>'.",MalformedRegExpFlags:"Invalid regular expression flag.",MissingClassName:"A class name is required.",MissingEqInAssignment:"Only '=' operator can be used for specifying default value.",MissingSemicolon:"Missing semicolon.",MissingPlugin:({missingPlugin:e})=>`This experimental syntax requires enabling the parser plugin: ${e.map(t=>JSON.stringify(t)).join(", ")}.`,MissingOneOfPlugins:({missingPlugin:e})=>`This experimental syntax requires enabling one of the following parser plugin(s): ${e.map(t=>JSON.stringify(t)).join(", ")}.`,MissingUnicodeEscape:"Expecting Unicode escape sequence \\uXXXX.",MixingCoalesceWithLogical:"Nullish coalescing operator(??) requires parens when mixing with logical operators.",ModuleAttributeDifferentFromType:"The only accepted module attribute is `type`.",ModuleAttributeInvalidValue:"Only string literals are allowed as module attribute values.",ModuleAttributesWithDuplicateKeys:({key:e})=>`Duplicate key "${e}" is not allowed in module attributes.`,ModuleExportNameHasLoneSurrogate:({surrogateCharCode:e})=>`An export name cannot include a lone surrogate, found '\\u${e.toString(16)}'.`,ModuleExportUndefined:({localName:e})=>`Export '${e}' is not defined.`,MultipleDefaultsInSwitch:"Multiple default clauses.",NewlineAfterThrow:"Illegal newline after throw.",NoCatchOrFinally:"Missing catch or finally clause.",NumberIdentifier:"Identifier directly after number.",NumericSeparatorInEscapeSequence:"Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.",ObsoleteAwaitStar:"'await*' has been removed from the async functions proposal. Use Promise.all() instead.",OptionalChainingNoNew:"Constructors in/after an Optional Chain are not allowed.",OptionalChainingNoTemplate:"Tagged Template Literals are not allowed in optionalChain.",OverrideOnConstructor:"'override' modifier cannot appear on a constructor declaration.",ParamDupe:"Argument name clash.",PatternHasAccessor:"Object pattern can't contain getter or setter.",PatternHasMethod:"Object pattern can't contain methods.",PrivateInExpectedIn:({identifierName:e})=>`Private names are only allowed in property accesses (\`obj.#${e}\`) or in \`in\` expressions (\`#${e} in obj\`).`,PrivateNameRedeclaration:({identifierName:e})=>`Duplicate private name #${e}.`,RecordExpressionBarIncorrectEndSyntaxType:"Record expressions ending with '|}' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionBarIncorrectStartSyntaxType:"Record expressions starting with '{|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionHashIncorrectStartSyntaxType:"Record expressions starting with '#{' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",RecordNoProto:"'__proto__' is not allowed in Record expressions.",RestTrailingComma:"Unexpected trailing comma after rest element.",SloppyFunction:"In non-strict mode code, functions can only be declared at top level or inside a block.",SloppyFunctionAnnexB:"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.",SourcePhaseImportRequiresDefault:'Only `import source x from "./module"` is valid.',StaticPrototype:"Classes may not have static property named prototype.",SuperNotAllowed:"`super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?",SuperPrivateField:"Private fields can't be accessed on super.",TrailingDecorator:"Decorators must be attached to a class element.",TupleExpressionBarIncorrectEndSyntaxType:"Tuple expressions ending with '|]' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",TupleExpressionBarIncorrectStartSyntaxType:"Tuple expressions starting with '[|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",TupleExpressionHashIncorrectStartSyntaxType:"Tuple expressions starting with '#[' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",UnexpectedArgumentPlaceholder:"Unexpected argument placeholder.",UnexpectedAwaitAfterPipelineBody:'Unexpected "await" after pipeline body; await must have parentheses in minimal proposal.',UnexpectedDigitAfterHash:"Unexpected digit after hash token.",UnexpectedImportExport:"'import' and 'export' may only appear at the top level.",UnexpectedKeyword:({keyword:e})=>`Unexpected keyword '${e}'.`,UnexpectedLeadingDecorator:"Leading decorators must be attached to a class declaration.",UnexpectedLexicalDeclaration:"Lexical declaration cannot appear in a single-statement context.",UnexpectedNewTarget:"`new.target` can only be used in functions or class properties.",UnexpectedNumericSeparator:"A numeric separator is only allowed between two digits.",UnexpectedPrivateField:"Unexpected private name.",UnexpectedReservedWord:({reservedWord:e})=>`Unexpected reserved word '${e}'.`,UnexpectedSuper:"'super' is only allowed in object methods and classes.",UnexpectedToken:({expected:e,unexpected:t})=>`Unexpected token${t?` '${t}'.`:""}${e?`, expected "${e}"`:""}`,UnexpectedTokenUnaryExponentiation:"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.",UnexpectedUsingDeclaration:"Using declaration cannot appear in the top level when source type is `script` or in the bare case statement.",UnexpectedVoidPattern:"Unexpected void binding.",UnsupportedBind:"Binding should be performed on object property.",UnsupportedDecoratorExport:"A decorated export must export a class declaration.",UnsupportedDefaultExport:"Only expressions, functions or classes are allowed as the `default` export.",UnsupportedImport:"`import` can only be used in `import()` or `import.meta`.",UnsupportedMetaProperty:({target:e,onlyValidPropertyName:t})=>`The only valid meta property for ${e} is ${e}.${t}.`,UnsupportedParameterDecorator:"Decorators cannot be used to decorate parameters.",UnsupportedPropertyDecorator:"Decorators cannot be used to decorate object literal properties.",UnsupportedSuper:"'super' can only be used with function calls (i.e. super()) or in property accesses (i.e. super.prop or super[prop]).",UnterminatedComment:"Unterminated comment.",UnterminatedRegExp:"Unterminated regular expression.",UnterminatedString:"Unterminated string constant.",UnterminatedTemplate:"Unterminated template.",UsingDeclarationExport:"Using declaration cannot be exported.",UsingDeclarationHasBindingPattern:"Using declaration cannot have destructuring patterns.",VarRedeclaration:({identifierName:e})=>`Identifier '${e}' has already been declared.`,VoidPatternCatchClauseParam:"A void binding can not be the catch clause parameter. Use `try { ... } catch { ... }` if you want to discard the caught error.",VoidPatternInitializer:"A void binding may not have an initializer.",YieldBindingIdentifier:"Can not use 'yield' as identifier inside a generator.",YieldInParameter:"Yield expression is not allowed in formal parameters.",YieldNotInGeneratorFunction:"'yield' is only allowed within generator functions.",ZeroDigitNumericSeparator:"Numeric separator can not be used after leading 0."},sge={StrictDelete:"Deleting local variable in strict mode.",StrictEvalArguments:({referenceName:e})=>`Assigning to '${e}' in strict mode.`,StrictEvalArgumentsBinding:({bindingName:e})=>`Binding '${e}' in strict mode.`,StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block.",StrictNumericEscape:"The only valid numeric escape in strict mode is '\\0'.",StrictOctalLiteral:"Legacy octal literals are not allowed in strict mode.",StrictWith:"'with' in strict mode."},oge={ParseExpressionEmptyInput:"Unexpected parseExpression() input: The input is empty or contains only comments.",ParseExpressionExpectsEOF:({unexpected:e})=>`Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`${String.fromCodePoint(e)}\`.`},lge=new Set(["ArrowFunctionExpression","AssignmentExpression","ConditionalExpression","YieldExpression"]),cge=Object.assign({PipeBodyIsTighter:"Unexpected yield after pipeline body; any yield expression acting as Hack-style pipe body must be parenthesized due to its loose operator precedence.",PipeTopicRequiresHackPipes:'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.',PipeTopicUnbound:"Topic reference is unbound; it must be inside a pipe body.",PipeTopicUnconfiguredToken:({token:e})=>`Invalid topic token ${e}. In order to use ${e} as a topic reference, the pipelineOperator plugin must be configured with { "proposal": "hack", "topicToken": "${e}" }.`,PipeTopicUnused:"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.",PipeUnparenthesizedBody:({type:e})=>`Hack-style pipe body cannot be an unparenthesized ${p1({type:e})}; please wrap it in parentheses.`},{PipelineBodyNoArrow:'Unexpected arrow "=>" after pipeline body; arrow function in pipeline body must be parenthesized.',PipelineBodySequenceExpression:"Pipeline body may not be a comma-separated sequence expression.",PipelineHeadSequenceExpression:"Pipeline head should not be a comma-separated sequence expression.",PipelineTopicUnused:"Pipeline is in topic style but does not use topic reference.",PrimaryTopicNotAllowed:"Topic reference was used in a lexical context without topic binding.",PrimaryTopicRequiresSmartPipeline:'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.'}),uge=["message"];function W8(e,t,r){Object.defineProperty(e,t,{enumerable:!1,configurable:!0,value:r})}function dge({toMessage:e,code:t,reasonCode:r,syntaxPlugin:n}){let a=r==="MissingPlugin"||r==="MissingOneOfPlugins";{let i={AccessorCannotDeclareThisParameter:"AccesorCannotDeclareThisParameter",AccessorCannotHaveTypeParameters:"AccesorCannotHaveTypeParameters",ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference:"ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference",SetAccessorCannotHaveOptionalParameter:"SetAccesorCannotHaveOptionalParameter",SetAccessorCannotHaveRestParameter:"SetAccesorCannotHaveRestParameter",SetAccessorCannotHaveReturnType:"SetAccesorCannotHaveReturnType"};i[r]&&(r=i[r])}return function i(s,o){let l=new SyntaxError;return l.code=t,l.reasonCode=r,l.loc=s,l.pos=s.index,l.syntaxPlugin=n,a&&(l.missingPlugin=o.missingPlugin),W8(l,"clone",function(u={}){var d;let{line:f,column:p,index:m}=(d=u.loc)!=null?d:s;return i(new Yc(f,p,m),Object.assign({},o,u.details))}),W8(l,"details",o),Object.defineProperty(l,"message",{configurable:!0,get(){let c=`${e(o)} (${s.line}:${s.column})`;return this.message=c,c},set(c){Object.defineProperty(this,"message",{value:c,writable:!0})}}),l}}function Wc(e,t){if(Array.isArray(e))return n=>Wc(n,e[0]);let r={};for(let n of Object.keys(e)){let a=e[n],i=typeof a=="string"?{message:()=>a}:typeof a=="function"?{message:a}:a,{message:s}=i,o=nge(i,uge),l=typeof s=="string"?()=>s:s;r[n]=dge(Object.assign({code:"BABEL_PARSER_SYNTAX_ERROR",reasonCode:n,toMessage:l},t?{syntaxPlugin:t}:{},o))}return r}var Y=Object.assign({},Wc(age),Wc(ige),Wc(sge),Wc(oge),Wc`pipelineOperator`(cge));function fge(){return{sourceType:"script",sourceFilename:void 0,startIndex:0,startColumn:0,startLine:1,allowAwaitOutsideFunction:!1,allowReturnOutsideFunction:!1,allowNewTargetOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,allowUndeclaredExports:!1,allowYieldOutsideFunction:!1,plugins:[],strictMode:void 0,ranges:!1,tokens:!1,createImportExpressions:!1,createParenthesizedExpressions:!1,errorRecovery:!1,attachComment:!0,annexB:!0}}function pge(e){let t=fge();if(e==null)return t;if(e.annexB!=null&&e.annexB!==!1)throw new Error("The `annexB` option can only be set to `false`.");for(let r of Object.keys(t))e[r]!=null&&(t[r]=e[r]);if(t.startLine===1)e.startIndex==null&&t.startColumn>0?t.startIndex=t.startColumn:e.startColumn==null&&t.startIndex>0&&(t.startColumn=t.startIndex);else if((e.startColumn==null||e.startIndex==null)&&e.startIndex!=null)throw new Error("With a `startLine > 1` you must also specify `startIndex` and `startColumn`.");if(t.sourceType==="commonjs"){if(e.allowAwaitOutsideFunction!=null)throw new Error("The `allowAwaitOutsideFunction` option cannot be used with `sourceType: 'commonjs'`.");if(e.allowReturnOutsideFunction!=null)throw new Error("`sourceType: 'commonjs'` implies `allowReturnOutsideFunction: true`, please remove the `allowReturnOutsideFunction` option or use `sourceType: 'script'`.");if(e.allowNewTargetOutsideFunction!=null)throw new Error("`sourceType: 'commonjs'` implies `allowNewTargetOutsideFunction: true`, please remove the `allowNewTargetOutsideFunction` option or use `sourceType: 'script'`.")}return t}var{defineProperty:mge}=Object,X8=(e,t)=>{e&&mge(e,t,{enumerable:!1,value:e[t]})};function d0(e){return X8(e.loc.start,"index"),X8(e.loc.end,"index"),e}var hge=e=>class extends e{parse(){let r=d0(super.parse());return this.optionFlags&256&&(r.tokens=r.tokens.map(d0)),r}parseRegExpLiteral({pattern:r,flags:n}){let a=null;try{a=new RegExp(r,n)}catch{}let i=this.estreeParseLiteral(a);return i.regex={pattern:r,flags:n},i}parseBigIntLiteral(r){let n;try{n=BigInt(r)}catch{n=null}let a=this.estreeParseLiteral(n);return a.bigint=String(a.value||r),a}parseDecimalLiteral(r){let a=this.estreeParseLiteral(null);return a.decimal=String(a.value||r),a}estreeParseLiteral(r){return this.parseLiteral(r,"Literal")}parseStringLiteral(r){return this.estreeParseLiteral(r)}parseNumericLiteral(r){return this.estreeParseLiteral(r)}parseNullLiteral(){return this.estreeParseLiteral(null)}parseBooleanLiteral(r){return this.estreeParseLiteral(r)}estreeParseChainExpression(r,n){let a=this.startNodeAtNode(r);return a.expression=r,this.finishNodeAt(a,"ChainExpression",n)}directiveToStmt(r){let n=r.value;delete r.value,this.castNodeTo(n,"Literal"),n.raw=n.extra.raw,n.value=n.extra.expressionValue;let a=this.castNodeTo(r,"ExpressionStatement");return a.expression=n,a.directive=n.extra.rawValue,delete n.extra,a}fillOptionalPropertiesForTSESLint(r){}cloneEstreeStringLiteral(r){let{start:n,end:a,loc:i,range:s,raw:o,value:l}=r,c=Object.create(r.constructor.prototype);return c.type="Literal",c.start=n,c.end=a,c.loc=i,c.range=s,c.raw=o,c.value=l,c}initFunction(r,n){super.initFunction(r,n),r.expression=!1}checkDeclaration(r){r!=null&&this.isObjectProperty(r)?this.checkDeclaration(r.value):super.checkDeclaration(r)}getObjectOrClassMethodParams(r){return r.value.params}isValidDirective(r){var n;return r.type==="ExpressionStatement"&&r.expression.type==="Literal"&&typeof r.expression.value=="string"&&!((n=r.expression.extra)!=null&&n.parenthesized)}parseBlockBody(r,n,a,i,s){super.parseBlockBody(r,n,a,i,s);let o=r.directives.map(l=>this.directiveToStmt(l));r.body=o.concat(r.body),delete r.directives}parsePrivateName(){let r=super.parsePrivateName();return this.getPluginOption("estree","classFeatures")?this.convertPrivateNameToPrivateIdentifier(r):r}convertPrivateNameToPrivateIdentifier(r){let n=super.getPrivateNameSV(r);return delete r.id,r.name=n,this.castNodeTo(r,"PrivateIdentifier")}isPrivateName(r){return this.getPluginOption("estree","classFeatures")?r.type==="PrivateIdentifier":super.isPrivateName(r)}getPrivateNameSV(r){return this.getPluginOption("estree","classFeatures")?r.name:super.getPrivateNameSV(r)}parseLiteral(r,n){let a=super.parseLiteral(r,n);return a.raw=a.extra.raw,delete a.extra,a}parseFunctionBody(r,n,a=!1){super.parseFunctionBody(r,n,a),r.expression=r.body.type!=="BlockStatement"}parseMethod(r,n,a,i,s,o,l=!1){let c=this.startNode();c.kind=r.kind,c=super.parseMethod(c,n,a,i,s,o,l),delete c.kind;let{typeParameters:u}=r;u&&(delete r.typeParameters,c.typeParameters=u,this.resetStartLocationFromNode(c,u));let d=this.castNodeTo(c,"FunctionExpression");return r.value=d,o==="ClassPrivateMethod"&&(r.computed=!1),o==="ObjectMethod"?(r.kind==="method"&&(r.kind="init"),r.shorthand=!1,this.finishNode(r,"Property")):this.finishNode(r,"MethodDefinition")}nameIsConstructor(r){return r.type==="Literal"?r.value==="constructor":super.nameIsConstructor(r)}parseClassProperty(...r){let n=super.parseClassProperty(...r);return this.getPluginOption("estree","classFeatures")&&this.castNodeTo(n,"PropertyDefinition"),n}parseClassPrivateProperty(...r){let n=super.parseClassPrivateProperty(...r);return this.getPluginOption("estree","classFeatures")&&(this.castNodeTo(n,"PropertyDefinition"),n.computed=!1),n}parseClassAccessorProperty(r){let n=super.parseClassAccessorProperty(r);return this.getPluginOption("estree","classFeatures")&&(n.abstract&&this.hasPlugin("typescript")?(delete n.abstract,this.castNodeTo(n,"TSAbstractAccessorProperty")):this.castNodeTo(n,"AccessorProperty")),n}parseObjectProperty(r,n,a,i){let s=super.parseObjectProperty(r,n,a,i);return s&&(s.kind="init",this.castNodeTo(s,"Property")),s}finishObjectProperty(r){return r.kind="init",this.finishNode(r,"Property")}isValidLVal(r,n,a,i){return r==="Property"?"value":super.isValidLVal(r,n,a,i)}isAssignable(r,n){return r!=null&&this.isObjectProperty(r)?this.isAssignable(r.value,n):super.isAssignable(r,n)}toAssignable(r,n=!1){if(r!=null&&this.isObjectProperty(r)){let{key:a,value:i}=r;this.isPrivateName(a)&&this.classScope.usePrivateName(this.getPrivateNameSV(a),a.loc.start),this.toAssignable(i,n)}else super.toAssignable(r,n)}toAssignableObjectExpressionProp(r,n,a){r.type==="Property"&&(r.kind==="get"||r.kind==="set")?this.raise(Y.PatternHasAccessor,r.key):r.type==="Property"&&r.method?this.raise(Y.PatternHasMethod,r.key):super.toAssignableObjectExpressionProp(r,n,a)}finishCallExpression(r,n){let a=super.finishCallExpression(r,n);if(a.callee.type==="Import"){var i;this.castNodeTo(a,"ImportExpression"),a.source=a.arguments[0],a.options=(i=a.arguments[1])!=null?i:null;{var s;a.attributes=(s=a.arguments[1])!=null?s:null}delete a.arguments,delete a.callee}else a.type==="OptionalCallExpression"?this.castNodeTo(a,"CallExpression"):a.optional=!1;return a}toReferencedArguments(r){r.type!=="ImportExpression"&&super.toReferencedArguments(r)}parseExport(r,n){let a=this.state.lastTokStartLoc,i=super.parseExport(r,n);switch(i.type){case"ExportAllDeclaration":i.exported=null;break;case"ExportNamedDeclaration":i.specifiers.length===1&&i.specifiers[0].type==="ExportNamespaceSpecifier"&&(this.castNodeTo(i,"ExportAllDeclaration"),i.exported=i.specifiers[0].exported,delete i.specifiers);case"ExportDefaultDeclaration":{var s;let{declaration:o}=i;o?.type==="ClassDeclaration"&&((s=o.decorators)==null?void 0:s.length)>0&&o.start===i.start&&this.resetStartLocation(i,a)}break}return i}stopParseSubscript(r,n){let a=super.stopParseSubscript(r,n);return n.optionalChainMember?this.estreeParseChainExpression(a,r.loc.end):a}parseMember(r,n,a,i,s){let o=super.parseMember(r,n,a,i,s);return o.type==="OptionalMemberExpression"?this.castNodeTo(o,"MemberExpression"):o.optional=!1,o}isOptionalMemberExpression(r){return r.type==="ChainExpression"?r.expression.type==="MemberExpression":super.isOptionalMemberExpression(r)}hasPropertyAsPrivateName(r){return r.type==="ChainExpression"&&(r=r.expression),super.hasPropertyAsPrivateName(r)}isObjectProperty(r){return r.type==="Property"&&r.kind==="init"&&!r.method}isObjectMethod(r){return r.type==="Property"&&(r.method||r.kind==="get"||r.kind==="set")}castNodeTo(r,n){let a=super.castNodeTo(r,n);return this.fillOptionalPropertiesForTSESLint(a),a}cloneIdentifier(r){let n=super.cloneIdentifier(r);return this.fillOptionalPropertiesForTSESLint(n),n}cloneStringLiteral(r){return r.type==="Literal"?this.cloneEstreeStringLiteral(r):super.cloneStringLiteral(r)}finishNodeAt(r,n,a){return d0(super.finishNodeAt(r,n,a))}finishNode(r,n){let a=super.finishNode(r,n);return this.fillOptionalPropertiesForTSESLint(a),a}resetStartLocation(r,n){super.resetStartLocation(r,n),d0(r)}resetEndLocation(r,n=this.state.lastTokEndLoc){super.resetEndLocation(r,n),d0(r)}},Fm=class{constructor(t,r){this.token=void 0,this.preserveSpace=void 0,this.token=t,this.preserveSpace=!!r}},tn={brace:new Fm("{"),j_oTag:new Fm("<tag"),j_cTag:new Fm("</tag"),j_expr:new Fm("<tag>...</tag>",!0)};tn.template=new Fm("`",!0);var Cr=!0,at=!0,nL=!0,f0=!0,If=!0,gge=!0,g1=class{constructor(t,r={}){this.label=void 0,this.keyword=void 0,this.beforeExpr=void 0,this.startsExpr=void 0,this.rightAssociative=void 0,this.isLoop=void 0,this.isAssign=void 0,this.prefix=void 0,this.postfix=void 0,this.binop=void 0,this.label=t,this.keyword=r.keyword,this.beforeExpr=!!r.beforeExpr,this.startsExpr=!!r.startsExpr,this.rightAssociative=!!r.rightAssociative,this.isLoop=!!r.isLoop,this.isAssign=!!r.isAssign,this.prefix=!!r.prefix,this.postfix=!!r.postfix,this.binop=r.binop!=null?r.binop:null,this.updateContext=null}},NL=new Map;function Ur(e,t={}){t.keyword=e;let r=_t(e,t);return NL.set(e,r),r}function ws(e,t){return _t(e,{beforeExpr:Cr,binop:t})}var g0=-1,Yu=[],kL=[],_L=[],LL=[],RL=[],DL=[];function _t(e,t={}){var r,n,a,i;return++g0,kL.push(e),_L.push((r=t.binop)!=null?r:-1),LL.push((n=t.beforeExpr)!=null?n:!1),RL.push((a=t.startsExpr)!=null?a:!1),DL.push((i=t.prefix)!=null?i:!1),Yu.push(new g1(e,t)),g0}function Nr(e,t={}){var r,n,a,i;return++g0,NL.set(e,g0),kL.push(e),_L.push((r=t.binop)!=null?r:-1),LL.push((n=t.beforeExpr)!=null?n:!1),RL.push((a=t.startsExpr)!=null?a:!1),DL.push((i=t.prefix)!=null?i:!1),Yu.push(new g1("name",t)),g0}var yge={bracketL:_t("[",{beforeExpr:Cr,startsExpr:at}),bracketHashL:_t("#[",{beforeExpr:Cr,startsExpr:at}),bracketBarL:_t("[|",{beforeExpr:Cr,startsExpr:at}),bracketR:_t("]"),bracketBarR:_t("|]"),braceL:_t("{",{beforeExpr:Cr,startsExpr:at}),braceBarL:_t("{|",{beforeExpr:Cr,startsExpr:at}),braceHashL:_t("#{",{beforeExpr:Cr,startsExpr:at}),braceR:_t("}"),braceBarR:_t("|}"),parenL:_t("(",{beforeExpr:Cr,startsExpr:at}),parenR:_t(")"),comma:_t(",",{beforeExpr:Cr}),semi:_t(";",{beforeExpr:Cr}),colon:_t(":",{beforeExpr:Cr}),doubleColon:_t("::",{beforeExpr:Cr}),dot:_t("."),question:_t("?",{beforeExpr:Cr}),questionDot:_t("?."),arrow:_t("=>",{beforeExpr:Cr}),template:_t("template"),ellipsis:_t("...",{beforeExpr:Cr}),backQuote:_t("`",{startsExpr:at}),dollarBraceL:_t("${",{beforeExpr:Cr,startsExpr:at}),templateTail:_t("...`",{startsExpr:at}),templateNonTail:_t("...${",{beforeExpr:Cr,startsExpr:at}),at:_t("@"),hash:_t("#",{startsExpr:at}),interpreterDirective:_t("#!..."),eq:_t("=",{beforeExpr:Cr,isAssign:f0}),assign:_t("_=",{beforeExpr:Cr,isAssign:f0}),slashAssign:_t("_=",{beforeExpr:Cr,isAssign:f0}),xorAssign:_t("_=",{beforeExpr:Cr,isAssign:f0}),moduloAssign:_t("_=",{beforeExpr:Cr,isAssign:f0}),incDec:_t("++/--",{prefix:If,postfix:gge,startsExpr:at}),bang:_t("!",{beforeExpr:Cr,prefix:If,startsExpr:at}),tilde:_t("~",{beforeExpr:Cr,prefix:If,startsExpr:at}),doubleCaret:_t("^^",{startsExpr:at}),doubleAt:_t("@@",{startsExpr:at}),pipeline:ws("|>",0),nullishCoalescing:ws("??",1),logicalOR:ws("||",1),logicalAND:ws("&&",2),bitwiseOR:ws("|",3),bitwiseXOR:ws("^",4),bitwiseAND:ws("&",5),equality:ws("==/!=/===/!==",6),lt:ws("</>/<=/>=",7),gt:ws("</>/<=/>=",7),relational:ws("</>/<=/>=",7),bitShift:ws("<</>>/>>>",8),bitShiftL:ws("<</>>/>>>",8),bitShiftR:ws("<</>>/>>>",8),plusMin:_t("+/-",{beforeExpr:Cr,binop:9,prefix:If,startsExpr:at}),modulo:_t("%",{binop:10,startsExpr:at}),star:_t("*",{binop:10}),slash:ws("/",10),exponent:_t("**",{beforeExpr:Cr,binop:11,rightAssociative:!0}),_in:Ur("in",{beforeExpr:Cr,binop:7}),_instanceof:Ur("instanceof",{beforeExpr:Cr,binop:7}),_break:Ur("break"),_case:Ur("case",{beforeExpr:Cr}),_catch:Ur("catch"),_continue:Ur("continue"),_debugger:Ur("debugger"),_default:Ur("default",{beforeExpr:Cr}),_else:Ur("else",{beforeExpr:Cr}),_finally:Ur("finally"),_function:Ur("function",{startsExpr:at}),_if:Ur("if"),_return:Ur("return",{beforeExpr:Cr}),_switch:Ur("switch"),_throw:Ur("throw",{beforeExpr:Cr,prefix:If,startsExpr:at}),_try:Ur("try"),_var:Ur("var"),_const:Ur("const"),_with:Ur("with"),_new:Ur("new",{beforeExpr:Cr,startsExpr:at}),_this:Ur("this",{startsExpr:at}),_super:Ur("super",{startsExpr:at}),_class:Ur("class",{startsExpr:at}),_extends:Ur("extends",{beforeExpr:Cr}),_export:Ur("export"),_import:Ur("import",{startsExpr:at}),_null:Ur("null",{startsExpr:at}),_true:Ur("true",{startsExpr:at}),_false:Ur("false",{startsExpr:at}),_typeof:Ur("typeof",{beforeExpr:Cr,prefix:If,startsExpr:at}),_void:Ur("void",{beforeExpr:Cr,prefix:If,startsExpr:at}),_delete:Ur("delete",{beforeExpr:Cr,prefix:If,startsExpr:at}),_do:Ur("do",{isLoop:nL,beforeExpr:Cr}),_for:Ur("for",{isLoop:nL}),_while:Ur("while",{isLoop:nL}),_as:Nr("as",{startsExpr:at}),_assert:Nr("assert",{startsExpr:at}),_async:Nr("async",{startsExpr:at}),_await:Nr("await",{startsExpr:at}),_defer:Nr("defer",{startsExpr:at}),_from:Nr("from",{startsExpr:at}),_get:Nr("get",{startsExpr:at}),_let:Nr("let",{startsExpr:at}),_meta:Nr("meta",{startsExpr:at}),_of:Nr("of",{startsExpr:at}),_sent:Nr("sent",{startsExpr:at}),_set:Nr("set",{startsExpr:at}),_source:Nr("source",{startsExpr:at}),_static:Nr("static",{startsExpr:at}),_using:Nr("using",{startsExpr:at}),_yield:Nr("yield",{startsExpr:at}),_asserts:Nr("asserts",{startsExpr:at}),_checks:Nr("checks",{startsExpr:at}),_exports:Nr("exports",{startsExpr:at}),_global:Nr("global",{startsExpr:at}),_implements:Nr("implements",{startsExpr:at}),_intrinsic:Nr("intrinsic",{startsExpr:at}),_infer:Nr("infer",{startsExpr:at}),_is:Nr("is",{startsExpr:at}),_mixins:Nr("mixins",{startsExpr:at}),_proto:Nr("proto",{startsExpr:at}),_require:Nr("require",{startsExpr:at}),_satisfies:Nr("satisfies",{startsExpr:at}),_keyof:Nr("keyof",{startsExpr:at}),_readonly:Nr("readonly",{startsExpr:at}),_unique:Nr("unique",{startsExpr:at}),_abstract:Nr("abstract",{startsExpr:at}),_declare:Nr("declare",{startsExpr:at}),_enum:Nr("enum",{startsExpr:at}),_module:Nr("module",{startsExpr:at}),_namespace:Nr("namespace",{startsExpr:at}),_interface:Nr("interface",{startsExpr:at}),_type:Nr("type",{startsExpr:at}),_opaque:Nr("opaque",{startsExpr:at}),name:_t("name",{startsExpr:at}),placeholder:_t("%%",{startsExpr:at}),string:_t("string",{startsExpr:at}),num:_t("num",{startsExpr:at}),bigint:_t("bigint",{startsExpr:at}),decimal:_t("decimal",{startsExpr:at}),regexp:_t("regexp",{startsExpr:at}),privateName:_t("#name",{startsExpr:at}),eof:_t("eof"),jsxName:_t("jsxName"),jsxText:_t("jsxText",{beforeExpr:Cr}),jsxTagStart:_t("jsxTagStart",{startsExpr:at}),jsxTagEnd:_t("jsxTagEnd")};function ln(e){return e>=93&&e<=133}function xge(e){return e<=92}function pc(e){return e>=58&&e<=133}function oV(e){return e>=58&&e<=137}function bge(e){return LL[e]}function m0(e){return RL[e]}function vge(e){return e>=29&&e<=33}function Y8(e){return e>=129&&e<=131}function Sge(e){return e>=90&&e<=92}function ML(e){return e>=58&&e<=92}function Tge(e){return e>=39&&e<=59}function wge(e){return e===34}function Cge(e){return DL[e]}function Pge(e){return e>=121&&e<=123}function Ege(e){return e>=124&&e<=130}function kf(e){return kL[e]}function m1(e){return _L[e]}function Ige(e){return e===57}function y1(e){return e>=24&&e<=25}function Xu(e){return Yu[e]}Yu[8].updateContext=e=>{e.pop()},Yu[5].updateContext=Yu[7].updateContext=Yu[23].updateContext=e=>{e.push(tn.brace)},Yu[22].updateContext=e=>{e[e.length-1]===tn.template?e.pop():e.push(tn.template)},Yu[143].updateContext=e=>{e.push(tn.j_expr,tn.j_oTag)};var OL="\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088F\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5C\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDC-\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7DC\uA7F1-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC",lV="\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ADD\u1AE0-\u1AEB\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65",Age=new RegExp("["+OL+"]"),Nge=new RegExp("["+OL+lV+"]");OL=lV=null;var cV=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,7,25,39,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,5,57,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,24,43,261,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,33,24,3,24,45,74,6,0,67,12,65,1,2,0,15,4,10,7381,42,31,98,114,8702,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,208,30,2,2,2,1,2,6,3,4,10,1,225,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4381,3,5773,3,7472,16,621,2467,541,1507,4938,6,8489],kge=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,78,5,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,199,7,137,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,55,9,266,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,233,0,3,0,8,1,6,0,475,6,110,6,6,9,4759,9,787719,239];function cL(e,t){let r=65536;for(let n=0,a=t.length;n<a;n+=2){if(r+=t[n],r>e)return!1;if(r+=t[n+1],r>=e)return!0}return!1}function Xc(e){return e<65?e===36:e<=90?!0:e<97?e===95:e<=122?!0:e<=65535?e>=170&&Age.test(String.fromCharCode(e)):cL(e,cV)}function Bm(e){return e<48?e===36:e<58?!0:e<65?!1:e<=90?!0:e<97?e===95:e<=122?!0:e<=65535?e>=170&&Nge.test(String.fromCharCode(e)):cL(e,cV)||cL(e,kge)}var FL={keyword:["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"],strict:["implements","interface","let","package","private","protected","public","static","yield"],strictBind:["eval","arguments"]},_ge=new Set(FL.keyword),Lge=new Set(FL.strict),Rge=new Set(FL.strictBind);function uV(e,t){return t&&e==="await"||e==="enum"}function dV(e,t){return uV(e,t)||Lge.has(e)}function fV(e){return Rge.has(e)}function pV(e,t){return dV(e,t)||fV(e)}function Dge(e){return _ge.has(e)}function Mge(e,t,r){return e===64&&t===64&&Xc(r)}var Oge=new Set(["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete","implements","interface","let","package","private","protected","public","static","yield","eval","arguments","enum","await"]);function Fge(e){return Oge.has(e)}var y0=class{constructor(t){this.flags=0,this.names=new Map,this.firstLexicalName="",this.flags=t}},x0=class{constructor(t,r){this.parser=void 0,this.scopeStack=[],this.inModule=void 0,this.undefinedExports=new Map,this.parser=t,this.inModule=r}get inTopLevel(){return(this.currentScope().flags&1)>0}get inFunction(){return(this.currentVarScopeFlags()&2)>0}get allowSuper(){return(this.currentThisScopeFlags()&16)>0}get allowDirectSuper(){return(this.currentThisScopeFlags()&32)>0}get allowNewTarget(){return(this.currentThisScopeFlags()&512)>0}get inClass(){return(this.currentThisScopeFlags()&64)>0}get inClassAndNotInNonArrowFunction(){let t=this.currentThisScopeFlags();return(t&64)>0&&(t&2)===0}get inStaticBlock(){for(let t=this.scopeStack.length-1;;t--){let{flags:r}=this.scopeStack[t];if(r&128)return!0;if(r&1731)return!1}}get inNonArrowFunction(){return(this.currentThisScopeFlags()&2)>0}get inBareCaseStatement(){return(this.currentScope().flags&256)>0}get treatFunctionsAsVar(){return this.treatFunctionsAsVarInScope(this.currentScope())}createScope(t){return new y0(t)}enter(t){this.scopeStack.push(this.createScope(t))}exit(){return this.scopeStack.pop().flags}treatFunctionsAsVarInScope(t){return!!(t.flags&130||!this.parser.inModule&&t.flags&1)}declareName(t,r,n){let a=this.currentScope();if(r&8||r&16){this.checkRedeclarationInScope(a,t,r,n);let i=a.names.get(t)||0;r&16?i=i|4:(a.firstLexicalName||(a.firstLexicalName=t),i=i|2),a.names.set(t,i),r&8&&this.maybeExportDefined(a,t)}else if(r&4)for(let i=this.scopeStack.length-1;i>=0&&(a=this.scopeStack[i],this.checkRedeclarationInScope(a,t,r,n),a.names.set(t,(a.names.get(t)||0)|1),this.maybeExportDefined(a,t),!(a.flags&1667));--i);this.parser.inModule&&a.flags&1&&this.undefinedExports.delete(t)}maybeExportDefined(t,r){this.parser.inModule&&t.flags&1&&this.undefinedExports.delete(r)}checkRedeclarationInScope(t,r,n,a){this.isRedeclaredInScope(t,r,n)&&this.parser.raise(Y.VarRedeclaration,a,{identifierName:r})}isRedeclaredInScope(t,r,n){if(!(n&1))return!1;if(n&8)return t.names.has(r);let a=t.names.get(r)||0;return n&16?(a&2)>0||!this.treatFunctionsAsVarInScope(t)&&(a&1)>0:(a&2)>0&&!(t.flags&8&&t.firstLexicalName===r)||!this.treatFunctionsAsVarInScope(t)&&(a&4)>0}checkLocalExport(t){let{name:r}=t;this.scopeStack[0].names.has(r)||this.undefinedExports.set(r,t.loc.start)}currentScope(){return this.scopeStack[this.scopeStack.length-1]}currentVarScopeFlags(){for(let t=this.scopeStack.length-1;;t--){let{flags:r}=this.scopeStack[t];if(r&1667)return r}}currentThisScopeFlags(){for(let t=this.scopeStack.length-1;;t--){let{flags:r}=this.scopeStack[t];if(r&1731&&!(r&4))return r}}},uL=class extends y0{constructor(...t){super(...t),this.declareFunctions=new Set}},dL=class extends x0{createScope(t){return new uL(t)}declareName(t,r,n){let a=this.currentScope();if(r&2048){this.checkRedeclarationInScope(a,t,r,n),this.maybeExportDefined(a,t),a.declareFunctions.add(t);return}super.declareName(t,r,n)}isRedeclaredInScope(t,r,n){if(super.isRedeclaredInScope(t,r,n))return!0;if(n&2048&&!t.declareFunctions.has(r)){let a=t.names.get(r);return(a&4)>0||(a&2)>0}return!1}checkLocalExport(t){this.scopeStack[0].declareFunctions.has(t.name)||super.checkLocalExport(t)}},Bge=new Set(["_","any","bool","boolean","empty","extends","false","interface","mixed","null","number","static","string","true","typeof","void"]),Ut=Wc`flow`({AmbiguousConditionalArrow:"Ambiguous expression: wrap the arrow functions in parentheses to disambiguate.",AmbiguousDeclareModuleKind:"Found both `declare module.exports` and `declare export` in the same module. Modules can only have 1 since they are either an ES module or they are a CommonJS module.",AssignReservedType:({reservedType:e})=>`Cannot overwrite reserved type ${e}.`,DeclareClassElement:"The `declare` modifier can only appear on class fields.",DeclareClassFieldInitializer:"Initializers are not allowed in fields with the `declare` modifier.",DuplicateDeclareModuleExports:"Duplicate `declare module.exports` statement.",EnumBooleanMemberNotInitialized:({memberName:e,enumName:t})=>`Boolean enum members need to be initialized. Use either \`${e} = true,\` or \`${e} = false,\` in enum \`${t}\`.`,EnumDuplicateMemberName:({memberName:e,enumName:t})=>`Enum member names need to be unique, but the name \`${e}\` has already been used before in enum \`${t}\`.`,EnumInconsistentMemberValues:({enumName:e})=>`Enum \`${e}\` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.`,EnumInvalidExplicitType:({invalidEnumType:e,enumName:t})=>`Enum type \`${e}\` is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${t}\`.`,EnumInvalidExplicitTypeUnknownSupplied:({enumName:e})=>`Supplied enum type is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${e}\`.`,EnumInvalidMemberInitializerPrimaryType:({enumName:e,memberName:t,explicitType:r})=>`Enum \`${e}\` has type \`${r}\`, so the initializer of \`${t}\` needs to be a ${r} literal.`,EnumInvalidMemberInitializerSymbolType:({enumName:e,memberName:t})=>`Symbol enum members cannot be initialized. Use \`${t},\` in enum \`${e}\`.`,EnumInvalidMemberInitializerUnknownType:({enumName:e,memberName:t})=>`The enum member initializer for \`${t}\` needs to be a literal (either a boolean, number, or string) in enum \`${e}\`.`,EnumInvalidMemberName:({enumName:e,memberName:t,suggestion:r})=>`Enum member names cannot start with lowercase 'a' through 'z'. Instead of using \`${t}\`, consider using \`${r}\`, in enum \`${e}\`.`,EnumNumberMemberNotInitialized:({enumName:e,memberName:t})=>`Number enum members need to be initialized, e.g. \`${t} = 1\` in enum \`${e}\`.`,EnumStringMemberInconsistentlyInitialized:({enumName:e})=>`String enum members need to consistently either all use initializers, or use no initializers, in enum \`${e}\`.`,GetterMayNotHaveThisParam:"A getter cannot have a `this` parameter.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` or `typeof` keyword.",ImportTypeShorthandOnlyInPureImport:"The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements.",InexactInsideExact:"Explicit inexact syntax cannot appear inside an explicit exact object type.",InexactInsideNonObject:"Explicit inexact syntax cannot appear in class or interface definitions.",InexactVariance:"Explicit inexact syntax cannot have variance.",InvalidNonTypeImportInDeclareModule:"Imports within a `declare module` body must always be `import type` or `import typeof`.",MissingTypeParamDefault:"Type parameter declaration needs a default, since a preceding type parameter declaration has a default.",NestedDeclareModule:"`declare module` cannot be used inside another `declare module`.",NestedFlowComment:"Cannot have a flow comment inside another flow comment.",PatternIsOptional:Object.assign({message:"A binding pattern parameter cannot be optional in an implementation signature."},{reasonCode:"OptionalBindingPattern"}),SetterMayNotHaveThisParam:"A setter cannot have a `this` parameter.",SpreadVariance:"Spread properties cannot have variance.",ThisParamAnnotationRequired:"A type annotation is required for the `this` parameter.",ThisParamBannedInConstructor:"Constructors cannot have a `this` parameter; constructors don't bind `this` like other functions.",ThisParamMayNotBeOptional:"The `this` parameter cannot be optional.",ThisParamMustBeFirst:"The `this` parameter must be the first function parameter.",ThisParamNoDefault:"The `this` parameter may not have a default value.",TypeBeforeInitializer:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeCastInPattern:"The type cast expression is expected to be wrapped with parenthesis.",UnexpectedExplicitInexactInObject:"Explicit inexact syntax must appear at the end of an inexact object.",UnexpectedReservedType:({reservedType:e})=>`Unexpected reserved type ${e}.`,UnexpectedReservedUnderscore:"`_` is only allowed as a type argument to call or new.",UnexpectedSpaceBetweenModuloChecks:"Spaces between `%` and `checks` are not allowed here.",UnexpectedSpreadType:"Spread operator cannot appear in class or interface definitions.",UnexpectedSubtractionOperand:'Unexpected token, expected "number" or "bigint".',UnexpectedTokenAfterTypeParameter:"Expected an arrow function after this type parameter declaration.",UnexpectedTypeParameterBeforeAsyncArrowFunction:"Type parameters must come after the async keyword, e.g. instead of `<T> async () => {}`, use `async <T>() => {}`.",UnsupportedDeclareExportKind:({unsupportedExportKind:e,suggestion:t})=>`\`declare export ${e}\` is not supported. Use \`${t}\` instead.`,UnsupportedStatementInDeclareModule:"Only declares and type imports are allowed inside declare module.",UnterminatedFlowComment:"Unterminated flow-comment."});function $ge(e){return e.type==="DeclareExportAllDeclaration"||e.type==="DeclareExportDeclaration"&&(!e.declaration||e.declaration.type!=="TypeAlias"&&e.declaration.type!=="InterfaceDeclaration")}function J8(e){return e.importKind==="type"||e.importKind==="typeof"}var jge={const:"declare export var",let:"declare export var",type:"export type",interface:"export interface"};function zge(e,t){let r=[],n=[];for(let a=0;a<e.length;a++)(t(e[a],a,e)?r:n).push(e[a]);return[r,n]}var Uge=/\*?\s*@((?:no)?flow)\b/,Vge=e=>class extends e{constructor(...r){super(...r),this.flowPragma=void 0}getScopeHandler(){return dL}shouldParseTypes(){return this.getPluginOption("flow","all")||this.flowPragma==="flow"}finishToken(r,n){r!==134&&r!==13&&r!==28&&this.flowPragma===void 0&&(this.flowPragma=null),super.finishToken(r,n)}addComment(r){if(this.flowPragma===void 0){let n=Uge.exec(r.value);if(n)if(n[1]==="flow")this.flowPragma="flow";else if(n[1]==="noflow")this.flowPragma="noflow";else throw new Error("Unexpected flow pragma")}super.addComment(r)}flowParseTypeInitialiser(r){let n=this.state.inType;this.state.inType=!0,this.expect(r||14);let a=this.flowParseType();return this.state.inType=n,a}flowParsePredicate(){let r=this.startNode(),n=this.state.startLoc;return this.next(),this.expectContextual(110),this.state.lastTokStartLoc.index>n.index+1&&this.raise(Ut.UnexpectedSpaceBetweenModuloChecks,n),this.eat(10)?(r.value=super.parseExpression(),this.expect(11),this.finishNode(r,"DeclaredPredicate")):this.finishNode(r,"InferredPredicate")}flowParseTypeAndPredicateInitialiser(){let r=this.state.inType;this.state.inType=!0,this.expect(14);let n=null,a=null;return this.match(54)?(this.state.inType=r,a=this.flowParsePredicate()):(n=this.flowParseType(),this.state.inType=r,this.match(54)&&(a=this.flowParsePredicate())),[n,a]}flowParseDeclareClass(r){return this.next(),this.flowParseInterfaceish(r,!0),this.finishNode(r,"DeclareClass")}flowParseDeclareFunction(r){this.next();let n=r.id=this.parseIdentifier(),a=this.startNode(),i=this.startNode();this.match(47)?a.typeParameters=this.flowParseTypeParameterDeclaration():a.typeParameters=null,this.expect(10);let s=this.flowParseFunctionTypeParams();return a.params=s.params,a.rest=s.rest,a.this=s._this,this.expect(11),[a.returnType,r.predicate]=this.flowParseTypeAndPredicateInitialiser(),i.typeAnnotation=this.finishNode(a,"FunctionTypeAnnotation"),n.typeAnnotation=this.finishNode(i,"TypeAnnotation"),this.resetEndLocation(n),this.semicolon(),this.scope.declareName(r.id.name,2048,r.id.loc.start),this.finishNode(r,"DeclareFunction")}flowParseDeclare(r,n){if(this.match(80))return this.flowParseDeclareClass(r);if(this.match(68))return this.flowParseDeclareFunction(r);if(this.match(74))return this.flowParseDeclareVariable(r);if(this.eatContextual(127))return this.match(16)?this.flowParseDeclareModuleExports(r):(n&&this.raise(Ut.NestedDeclareModule,this.state.lastTokStartLoc),this.flowParseDeclareModule(r));if(this.isContextual(130))return this.flowParseDeclareTypeAlias(r);if(this.isContextual(131))return this.flowParseDeclareOpaqueType(r);if(this.isContextual(129))return this.flowParseDeclareInterface(r);if(this.match(82))return this.flowParseDeclareExportDeclaration(r,n);throw this.unexpected()}flowParseDeclareVariable(r){return this.next(),r.id=this.flowParseTypeAnnotatableIdentifier(!0),this.scope.declareName(r.id.name,5,r.id.loc.start),this.semicolon(),this.finishNode(r,"DeclareVariable")}flowParseDeclareModule(r){this.scope.enter(0),this.match(134)?r.id=super.parseExprAtom():r.id=this.parseIdentifier();let n=r.body=this.startNode(),a=n.body=[];for(this.expect(5);!this.match(8);){let o=this.startNode();this.match(83)?(this.next(),!this.isContextual(130)&&!this.match(87)&&this.raise(Ut.InvalidNonTypeImportInDeclareModule,this.state.lastTokStartLoc),a.push(super.parseImport(o))):(this.expectContextual(125,Ut.UnsupportedStatementInDeclareModule),a.push(this.flowParseDeclare(o,!0)))}this.scope.exit(),this.expect(8),this.finishNode(n,"BlockStatement");let i=null,s=!1;return a.forEach(o=>{$ge(o)?(i==="CommonJS"&&this.raise(Ut.AmbiguousDeclareModuleKind,o),i="ES"):o.type==="DeclareModuleExports"&&(s&&this.raise(Ut.DuplicateDeclareModuleExports,o),i==="ES"&&this.raise(Ut.AmbiguousDeclareModuleKind,o),i="CommonJS",s=!0)}),r.kind=i||"CommonJS",this.finishNode(r,"DeclareModule")}flowParseDeclareExportDeclaration(r,n){if(this.expect(82),this.eat(65))return this.match(68)||this.match(80)?r.declaration=this.flowParseDeclare(this.startNode()):(r.declaration=this.flowParseType(),this.semicolon()),r.default=!0,this.finishNode(r,"DeclareExportDeclaration");if(this.match(75)||this.isLet()||(this.isContextual(130)||this.isContextual(129))&&!n){let a=this.state.value;throw this.raise(Ut.UnsupportedDeclareExportKind,this.state.startLoc,{unsupportedExportKind:a,suggestion:jge[a]})}if(this.match(74)||this.match(68)||this.match(80)||this.isContextual(131))return r.declaration=this.flowParseDeclare(this.startNode()),r.default=!1,this.finishNode(r,"DeclareExportDeclaration");if(this.match(55)||this.match(5)||this.isContextual(129)||this.isContextual(130)||this.isContextual(131))return r=this.parseExport(r,null),r.type==="ExportNamedDeclaration"?(r.default=!1,delete r.exportKind,this.castNodeTo(r,"DeclareExportDeclaration")):this.castNodeTo(r,"DeclareExportAllDeclaration");throw this.unexpected()}flowParseDeclareModuleExports(r){return this.next(),this.expectContextual(111),r.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(r,"DeclareModuleExports")}flowParseDeclareTypeAlias(r){this.next();let n=this.flowParseTypeAlias(r);return this.castNodeTo(n,"DeclareTypeAlias"),n}flowParseDeclareOpaqueType(r){this.next();let n=this.flowParseOpaqueType(r,!0);return this.castNodeTo(n,"DeclareOpaqueType"),n}flowParseDeclareInterface(r){return this.next(),this.flowParseInterfaceish(r,!1),this.finishNode(r,"DeclareInterface")}flowParseInterfaceish(r,n){if(r.id=this.flowParseRestrictedIdentifier(!n,!0),this.scope.declareName(r.id.name,n?17:8201,r.id.loc.start),this.match(47)?r.typeParameters=this.flowParseTypeParameterDeclaration():r.typeParameters=null,r.extends=[],this.eat(81))do r.extends.push(this.flowParseInterfaceExtends());while(!n&&this.eat(12));if(n){if(r.implements=[],r.mixins=[],this.eatContextual(117))do r.mixins.push(this.flowParseInterfaceExtends());while(this.eat(12));if(this.eatContextual(113))do r.implements.push(this.flowParseInterfaceExtends());while(this.eat(12))}r.body=this.flowParseObjectType({allowStatic:n,allowExact:!1,allowSpread:!1,allowProto:n,allowInexact:!1})}flowParseInterfaceExtends(){let r=this.startNode();return r.id=this.flowParseQualifiedTypeIdentifier(),this.match(47)?r.typeParameters=this.flowParseTypeParameterInstantiation():r.typeParameters=null,this.finishNode(r,"InterfaceExtends")}flowParseInterface(r){return this.flowParseInterfaceish(r,!1),this.finishNode(r,"InterfaceDeclaration")}checkNotUnderscore(r){r==="_"&&this.raise(Ut.UnexpectedReservedUnderscore,this.state.startLoc)}checkReservedType(r,n,a){Bge.has(r)&&this.raise(a?Ut.AssignReservedType:Ut.UnexpectedReservedType,n,{reservedType:r})}flowParseRestrictedIdentifier(r,n){return this.checkReservedType(this.state.value,this.state.startLoc,n),this.parseIdentifier(r)}flowParseTypeAlias(r){return r.id=this.flowParseRestrictedIdentifier(!1,!0),this.scope.declareName(r.id.name,8201,r.id.loc.start),this.match(47)?r.typeParameters=this.flowParseTypeParameterDeclaration():r.typeParameters=null,r.right=this.flowParseTypeInitialiser(29),this.semicolon(),this.finishNode(r,"TypeAlias")}flowParseOpaqueType(r,n){return this.expectContextual(130),r.id=this.flowParseRestrictedIdentifier(!0,!0),this.scope.declareName(r.id.name,8201,r.id.loc.start),this.match(47)?r.typeParameters=this.flowParseTypeParameterDeclaration():r.typeParameters=null,r.supertype=null,this.match(14)&&(r.supertype=this.flowParseTypeInitialiser(14)),r.impltype=null,n||(r.impltype=this.flowParseTypeInitialiser(29)),this.semicolon(),this.finishNode(r,"OpaqueType")}flowParseTypeParameter(r=!1){let n=this.state.startLoc,a=this.startNode(),i=this.flowParseVariance(),s=this.flowParseTypeAnnotatableIdentifier();return a.name=s.name,a.variance=i,a.bound=s.typeAnnotation,this.match(29)?(this.eat(29),a.default=this.flowParseType()):r&&this.raise(Ut.MissingTypeParamDefault,n),this.finishNode(a,"TypeParameter")}flowParseTypeParameterDeclaration(){let r=this.state.inType,n=this.startNode();n.params=[],this.state.inType=!0,this.match(47)||this.match(143)?this.next():this.unexpected();let a=!1;do{let i=this.flowParseTypeParameter(a);n.params.push(i),i.default&&(a=!0),this.match(48)||this.expect(12)}while(!this.match(48));return this.expect(48),this.state.inType=r,this.finishNode(n,"TypeParameterDeclaration")}flowInTopLevelContext(r){if(this.curContext()!==tn.brace){let n=this.state.context;this.state.context=[n[0]];try{return r()}finally{this.state.context=n}}else return r()}flowParseTypeParameterInstantiationInExpression(){if(this.reScan_lt()===47)return this.flowParseTypeParameterInstantiation()}flowParseTypeParameterInstantiation(){let r=this.startNode(),n=this.state.inType;return this.state.inType=!0,r.params=[],this.flowInTopLevelContext(()=>{this.expect(47);let a=this.state.noAnonFunctionType;for(this.state.noAnonFunctionType=!1;!this.match(48);)r.params.push(this.flowParseType()),this.match(48)||this.expect(12);this.state.noAnonFunctionType=a}),this.state.inType=n,!this.state.inType&&this.curContext()===tn.brace&&this.reScan_lt_gt(),this.expect(48),this.finishNode(r,"TypeParameterInstantiation")}flowParseTypeParameterInstantiationCallOrNew(){if(this.reScan_lt()!==47)return null;let r=this.startNode(),n=this.state.inType;for(r.params=[],this.state.inType=!0,this.expect(47);!this.match(48);)r.params.push(this.flowParseTypeOrImplicitInstantiation()),this.match(48)||this.expect(12);return this.expect(48),this.state.inType=n,this.finishNode(r,"TypeParameterInstantiation")}flowParseInterfaceType(){let r=this.startNode();if(this.expectContextual(129),r.extends=[],this.eat(81))do r.extends.push(this.flowParseInterfaceExtends());while(this.eat(12));return r.body=this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!1,allowProto:!1,allowInexact:!1}),this.finishNode(r,"InterfaceTypeAnnotation")}flowParseObjectPropertyKey(){return this.match(135)||this.match(134)?super.parseExprAtom():this.parseIdentifier(!0)}flowParseObjectTypeIndexer(r,n,a){return r.static=n,this.lookahead().type===14?(r.id=this.flowParseObjectPropertyKey(),r.key=this.flowParseTypeInitialiser()):(r.id=null,r.key=this.flowParseType()),this.expect(3),r.value=this.flowParseTypeInitialiser(),r.variance=a,this.finishNode(r,"ObjectTypeIndexer")}flowParseObjectTypeInternalSlot(r,n){return r.static=n,r.id=this.flowParseObjectPropertyKey(),this.expect(3),this.expect(3),this.match(47)||this.match(10)?(r.method=!0,r.optional=!1,r.value=this.flowParseObjectTypeMethodish(this.startNodeAt(r.loc.start))):(r.method=!1,this.eat(17)&&(r.optional=!0),r.value=this.flowParseTypeInitialiser()),this.finishNode(r,"ObjectTypeInternalSlot")}flowParseObjectTypeMethodish(r){for(r.params=[],r.rest=null,r.typeParameters=null,r.this=null,this.match(47)&&(r.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(10),this.match(78)&&(r.this=this.flowParseFunctionTypeParam(!0),r.this.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)r.params.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(r.rest=this.flowParseFunctionTypeParam(!1)),this.expect(11),r.returnType=this.flowParseTypeInitialiser(),this.finishNode(r,"FunctionTypeAnnotation")}flowParseObjectTypeCallProperty(r,n){let a=this.startNode();return r.static=n,r.value=this.flowParseObjectTypeMethodish(a),this.finishNode(r,"ObjectTypeCallProperty")}flowParseObjectType({allowStatic:r,allowExact:n,allowSpread:a,allowProto:i,allowInexact:s}){let o=this.state.inType;this.state.inType=!0;let l=this.startNode();l.callProperties=[],l.properties=[],l.indexers=[],l.internalSlots=[];let c,u,d=!1;for(n&&this.match(6)?(this.expect(6),c=9,u=!0):(this.expect(5),c=8,u=!1),l.exact=u;!this.match(c);){let p=!1,m=null,h=null,x=this.startNode();if(i&&this.isContextual(118)){let y=this.lookahead();y.type!==14&&y.type!==17&&(this.next(),m=this.state.startLoc,r=!1)}if(r&&this.isContextual(106)){let y=this.lookahead();y.type!==14&&y.type!==17&&(this.next(),p=!0)}let g=this.flowParseVariance();if(this.eat(0))m!=null&&this.unexpected(m),this.eat(0)?(g&&this.unexpected(g.loc.start),l.internalSlots.push(this.flowParseObjectTypeInternalSlot(x,p))):l.indexers.push(this.flowParseObjectTypeIndexer(x,p,g));else if(this.match(10)||this.match(47))m!=null&&this.unexpected(m),g&&this.unexpected(g.loc.start),l.callProperties.push(this.flowParseObjectTypeCallProperty(x,p));else{let y="init";if(this.isContextual(99)||this.isContextual(104)){let S=this.lookahead();oV(S.type)&&(y=this.state.value,this.next())}let b=this.flowParseObjectTypeProperty(x,p,m,g,y,a,s??!u);b===null?(d=!0,h=this.state.lastTokStartLoc):l.properties.push(b)}this.flowObjectTypeSemicolon(),h&&!this.match(8)&&!this.match(9)&&this.raise(Ut.UnexpectedExplicitInexactInObject,h)}this.expect(c),a&&(l.inexact=d);let f=this.finishNode(l,"ObjectTypeAnnotation");return this.state.inType=o,f}flowParseObjectTypeProperty(r,n,a,i,s,o,l){if(this.eat(21))return this.match(12)||this.match(13)||this.match(8)||this.match(9)?(o?l||this.raise(Ut.InexactInsideExact,this.state.lastTokStartLoc):this.raise(Ut.InexactInsideNonObject,this.state.lastTokStartLoc),i&&this.raise(Ut.InexactVariance,i),null):(o||this.raise(Ut.UnexpectedSpreadType,this.state.lastTokStartLoc),a!=null&&this.unexpected(a),i&&this.raise(Ut.SpreadVariance,i),r.argument=this.flowParseType(),this.finishNode(r,"ObjectTypeSpreadProperty"));{r.key=this.flowParseObjectPropertyKey(),r.static=n,r.proto=a!=null,r.kind=s;let c=!1;return this.match(47)||this.match(10)?(r.method=!0,a!=null&&this.unexpected(a),i&&this.unexpected(i.loc.start),r.value=this.flowParseObjectTypeMethodish(this.startNodeAt(r.loc.start)),(s==="get"||s==="set")&&this.flowCheckGetterSetterParams(r),!o&&r.key.name==="constructor"&&r.value.this&&this.raise(Ut.ThisParamBannedInConstructor,r.value.this)):(s!=="init"&&this.unexpected(),r.method=!1,this.eat(17)&&(c=!0),r.value=this.flowParseTypeInitialiser(),r.variance=i),r.optional=c,this.finishNode(r,"ObjectTypeProperty")}}flowCheckGetterSetterParams(r){let n=r.kind==="get"?0:1,a=r.value.params.length+(r.value.rest?1:0);r.value.this&&this.raise(r.kind==="get"?Ut.GetterMayNotHaveThisParam:Ut.SetterMayNotHaveThisParam,r.value.this),a!==n&&this.raise(r.kind==="get"?Y.BadGetterArity:Y.BadSetterArity,r),r.kind==="set"&&r.value.rest&&this.raise(Y.BadSetterRestParameter,r)}flowObjectTypeSemicolon(){!this.eat(13)&&!this.eat(12)&&!this.match(8)&&!this.match(9)&&this.unexpected()}flowParseQualifiedTypeIdentifier(r,n){r??(r=this.state.startLoc);let a=n||this.flowParseRestrictedIdentifier(!0);for(;this.eat(16);){let i=this.startNodeAt(r);i.qualification=a,i.id=this.flowParseRestrictedIdentifier(!0),a=this.finishNode(i,"QualifiedTypeIdentifier")}return a}flowParseGenericType(r,n){let a=this.startNodeAt(r);return a.typeParameters=null,a.id=this.flowParseQualifiedTypeIdentifier(r,n),this.match(47)&&(a.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(a,"GenericTypeAnnotation")}flowParseTypeofType(){let r=this.startNode();return this.expect(87),r.argument=this.flowParsePrimaryType(),this.finishNode(r,"TypeofTypeAnnotation")}flowParseTupleType(){let r=this.startNode();for(r.types=[],this.expect(0);this.state.pos<this.length&&!this.match(3)&&(r.types.push(this.flowParseType()),!this.match(3));)this.expect(12);return this.expect(3),this.finishNode(r,"TupleTypeAnnotation")}flowParseFunctionTypeParam(r){let n=null,a=!1,i=null,s=this.startNode(),o=this.lookahead(),l=this.state.type===78;return o.type===14||o.type===17?(l&&!r&&this.raise(Ut.ThisParamMustBeFirst,s),n=this.parseIdentifier(l),this.eat(17)&&(a=!0,l&&this.raise(Ut.ThisParamMayNotBeOptional,s)),i=this.flowParseTypeInitialiser()):i=this.flowParseType(),s.name=n,s.optional=a,s.typeAnnotation=i,this.finishNode(s,"FunctionTypeParam")}reinterpretTypeAsFunctionTypeParam(r){let n=this.startNodeAt(r.loc.start);return n.name=null,n.optional=!1,n.typeAnnotation=r,this.finishNode(n,"FunctionTypeParam")}flowParseFunctionTypeParams(r=[]){let n=null,a=null;for(this.match(78)&&(a=this.flowParseFunctionTypeParam(!0),a.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)r.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(n=this.flowParseFunctionTypeParam(!1)),{params:r,rest:n,_this:a}}flowIdentToTypeAnnotation(r,n,a){switch(a.name){case"any":return this.finishNode(n,"AnyTypeAnnotation");case"bool":case"boolean":return this.finishNode(n,"BooleanTypeAnnotation");case"mixed":return this.finishNode(n,"MixedTypeAnnotation");case"empty":return this.finishNode(n,"EmptyTypeAnnotation");case"number":return this.finishNode(n,"NumberTypeAnnotation");case"string":return this.finishNode(n,"StringTypeAnnotation");case"symbol":return this.finishNode(n,"SymbolTypeAnnotation");default:return this.checkNotUnderscore(a.name),this.flowParseGenericType(r,a)}}flowParsePrimaryType(){let r=this.state.startLoc,n=this.startNode(),a,i,s=!1,o=this.state.noAnonFunctionType;switch(this.state.type){case 5:return this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!0,allowProto:!1,allowInexact:!0});case 6:return this.flowParseObjectType({allowStatic:!1,allowExact:!0,allowSpread:!0,allowProto:!1,allowInexact:!1});case 0:return this.state.noAnonFunctionType=!1,i=this.flowParseTupleType(),this.state.noAnonFunctionType=o,i;case 47:{let l=this.startNode();return l.typeParameters=this.flowParseTypeParameterDeclaration(),this.expect(10),a=this.flowParseFunctionTypeParams(),l.params=a.params,l.rest=a.rest,l.this=a._this,this.expect(11),this.expect(19),l.returnType=this.flowParseType(),this.finishNode(l,"FunctionTypeAnnotation")}case 10:{let l=this.startNode();if(this.next(),!this.match(11)&&!this.match(21))if(ln(this.state.type)||this.match(78)){let c=this.lookahead().type;s=c!==17&&c!==14}else s=!0;if(s){if(this.state.noAnonFunctionType=!1,i=this.flowParseType(),this.state.noAnonFunctionType=o,this.state.noAnonFunctionType||!(this.match(12)||this.match(11)&&this.lookahead().type===19))return this.expect(11),i;this.eat(12)}return i?a=this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(i)]):a=this.flowParseFunctionTypeParams(),l.params=a.params,l.rest=a.rest,l.this=a._this,this.expect(11),this.expect(19),l.returnType=this.flowParseType(),l.typeParameters=null,this.finishNode(l,"FunctionTypeAnnotation")}case 134:return this.parseLiteral(this.state.value,"StringLiteralTypeAnnotation");case 85:case 86:return n.value=this.match(85),this.next(),this.finishNode(n,"BooleanLiteralTypeAnnotation");case 53:if(this.state.value==="-"){if(this.next(),this.match(135))return this.parseLiteralAtNode(-this.state.value,"NumberLiteralTypeAnnotation",n);if(this.match(136))return this.parseLiteralAtNode(-this.state.value,"BigIntLiteralTypeAnnotation",n);throw this.raise(Ut.UnexpectedSubtractionOperand,this.state.startLoc)}throw this.unexpected();case 135:return this.parseLiteral(this.state.value,"NumberLiteralTypeAnnotation");case 136:return this.parseLiteral(this.state.value,"BigIntLiteralTypeAnnotation");case 88:return this.next(),this.finishNode(n,"VoidTypeAnnotation");case 84:return this.next(),this.finishNode(n,"NullLiteralTypeAnnotation");case 78:return this.next(),this.finishNode(n,"ThisTypeAnnotation");case 55:return this.next(),this.finishNode(n,"ExistsTypeAnnotation");case 87:return this.flowParseTypeofType();default:if(ML(this.state.type)){let l=kf(this.state.type);return this.next(),super.createIdentifier(n,l)}else if(ln(this.state.type))return this.isContextual(129)?this.flowParseInterfaceType():this.flowIdentToTypeAnnotation(r,n,this.parseIdentifier())}throw this.unexpected()}flowParsePostfixType(){let r=this.state.startLoc,n=this.flowParsePrimaryType(),a=!1;for(;(this.match(0)||this.match(18))&&!this.canInsertSemicolon();){let i=this.startNodeAt(r),s=this.eat(18);a=a||s,this.expect(0),!s&&this.match(3)?(i.elementType=n,this.next(),n=this.finishNode(i,"ArrayTypeAnnotation")):(i.objectType=n,i.indexType=this.flowParseType(),this.expect(3),a?(i.optional=s,n=this.finishNode(i,"OptionalIndexedAccessType")):n=this.finishNode(i,"IndexedAccessType"))}return n}flowParsePrefixType(){let r=this.startNode();return this.eat(17)?(r.typeAnnotation=this.flowParsePrefixType(),this.finishNode(r,"NullableTypeAnnotation")):this.flowParsePostfixType()}flowParseAnonFunctionWithoutParens(){let r=this.flowParsePrefixType();if(!this.state.noAnonFunctionType&&this.eat(19)){let n=this.startNodeAt(r.loc.start);return n.params=[this.reinterpretTypeAsFunctionTypeParam(r)],n.rest=null,n.this=null,n.returnType=this.flowParseType(),n.typeParameters=null,this.finishNode(n,"FunctionTypeAnnotation")}return r}flowParseIntersectionType(){let r=this.startNode();this.eat(45);let n=this.flowParseAnonFunctionWithoutParens();for(r.types=[n];this.eat(45);)r.types.push(this.flowParseAnonFunctionWithoutParens());return r.types.length===1?n:this.finishNode(r,"IntersectionTypeAnnotation")}flowParseUnionType(){let r=this.startNode();this.eat(43);let n=this.flowParseIntersectionType();for(r.types=[n];this.eat(43);)r.types.push(this.flowParseIntersectionType());return r.types.length===1?n:this.finishNode(r,"UnionTypeAnnotation")}flowParseType(){let r=this.state.inType;this.state.inType=!0;let n=this.flowParseUnionType();return this.state.inType=r,n}flowParseTypeOrImplicitInstantiation(){if(this.state.type===132&&this.state.value==="_"){let r=this.state.startLoc,n=this.parseIdentifier();return this.flowParseGenericType(r,n)}else return this.flowParseType()}flowParseTypeAnnotation(){let r=this.startNode();return r.typeAnnotation=this.flowParseTypeInitialiser(),this.finishNode(r,"TypeAnnotation")}flowParseTypeAnnotatableIdentifier(r){let n=r?this.parseIdentifier():this.flowParseRestrictedIdentifier();return this.match(14)&&(n.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(n)),n}typeCastToParameter(r){return r.expression.typeAnnotation=r.typeAnnotation,this.resetEndLocation(r.expression,r.typeAnnotation.loc.end),r.expression}flowParseVariance(){let r=null;return this.match(53)?(r=this.startNode(),this.state.value==="+"?r.kind="plus":r.kind="minus",this.next(),this.finishNode(r,"Variance")):r}parseFunctionBody(r,n,a=!1){if(n){this.forwardNoArrowParamsConversionAt(r,()=>super.parseFunctionBody(r,!0,a));return}super.parseFunctionBody(r,!1,a)}parseFunctionBodyAndFinish(r,n,a=!1){if(this.match(14)){let i=this.startNode();[i.typeAnnotation,r.predicate]=this.flowParseTypeAndPredicateInitialiser(),r.returnType=i.typeAnnotation?this.finishNode(i,"TypeAnnotation"):null}return super.parseFunctionBodyAndFinish(r,n,a)}parseStatementLike(r){if(this.state.strict&&this.isContextual(129)){let a=this.lookahead();if(pc(a.type)){let i=this.startNode();return this.next(),this.flowParseInterface(i)}}else if(this.isContextual(126)){let a=this.startNode();return this.next(),this.flowParseEnumDeclaration(a)}let n=super.parseStatementLike(r);return this.flowPragma===void 0&&!this.isValidDirective(n)&&(this.flowPragma=null),n}parseExpressionStatement(r,n,a){if(n.type==="Identifier"){if(n.name==="declare"){if(this.match(80)||ln(this.state.type)||this.match(68)||this.match(74)||this.match(82))return this.flowParseDeclare(r)}else if(ln(this.state.type)){if(n.name==="interface")return this.flowParseInterface(r);if(n.name==="type")return this.flowParseTypeAlias(r);if(n.name==="opaque")return this.flowParseOpaqueType(r,!1)}}return super.parseExpressionStatement(r,n,a)}shouldParseExportDeclaration(){let{type:r}=this.state;return r===126||Y8(r)?!this.state.containsEsc:super.shouldParseExportDeclaration()}isExportDefaultSpecifier(){let{type:r}=this.state;return r===126||Y8(r)?this.state.containsEsc:super.isExportDefaultSpecifier()}parseExportDefaultExpression(){if(this.isContextual(126)){let r=this.startNode();return this.next(),this.flowParseEnumDeclaration(r)}return super.parseExportDefaultExpression()}parseConditional(r,n,a){if(!this.match(17))return r;if(this.state.maybeInArrowParameters){let f=this.lookaheadCharCode();if(f===44||f===61||f===58||f===41)return this.setOptionalParametersError(a),r}this.expect(17);let i=this.state.clone(),s=this.state.noArrowAt,o=this.startNodeAt(n),{consequent:l,failed:c}=this.tryParseConditionalConsequent(),[u,d]=this.getArrowLikeExpressions(l);if(c||d.length>0){let f=[...s];if(d.length>0){this.state=i,this.state.noArrowAt=f;for(let p=0;p<d.length;p++)f.push(d[p].start);({consequent:l,failed:c}=this.tryParseConditionalConsequent()),[u,d]=this.getArrowLikeExpressions(l)}c&&u.length>1&&this.raise(Ut.AmbiguousConditionalArrow,i.startLoc),c&&u.length===1&&(this.state=i,f.push(u[0].start),this.state.noArrowAt=f,{consequent:l,failed:c}=this.tryParseConditionalConsequent())}return this.getArrowLikeExpressions(l,!0),this.state.noArrowAt=s,this.expect(14),o.test=r,o.consequent=l,o.alternate=this.forwardNoArrowParamsConversionAt(o,()=>this.parseMaybeAssign(void 0,void 0)),this.finishNode(o,"ConditionalExpression")}tryParseConditionalConsequent(){this.state.noArrowParamsConversionAt.push(this.state.start);let r=this.parseMaybeAssignAllowIn(),n=!this.match(14);return this.state.noArrowParamsConversionAt.pop(),{consequent:r,failed:n}}getArrowLikeExpressions(r,n){let a=[r],i=[];for(;a.length!==0;){let s=a.pop();s.type==="ArrowFunctionExpression"&&s.body.type!=="BlockStatement"?(s.typeParameters||!s.returnType?this.finishArrowValidation(s):i.push(s),a.push(s.body)):s.type==="ConditionalExpression"&&(a.push(s.consequent),a.push(s.alternate))}return n?(i.forEach(s=>this.finishArrowValidation(s)),[i,[]]):zge(i,s=>s.params.every(o=>this.isAssignable(o,!0)))}finishArrowValidation(r){var n;this.toAssignableList(r.params,(n=r.extra)==null?void 0:n.trailingCommaLoc,!1),this.scope.enter(518),super.checkParams(r,!1,!0),this.scope.exit()}forwardNoArrowParamsConversionAt(r,n){let a;return this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(r.start))?(this.state.noArrowParamsConversionAt.push(this.state.start),a=n(),this.state.noArrowParamsConversionAt.pop()):a=n(),a}parseParenItem(r,n){let a=super.parseParenItem(r,n);if(this.eat(17)&&(a.optional=!0,this.resetEndLocation(r)),this.match(14)){let i=this.startNodeAt(n);return i.expression=a,i.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(i,"TypeCastExpression")}return a}assertModuleNodeAllowed(r){r.type==="ImportDeclaration"&&(r.importKind==="type"||r.importKind==="typeof")||r.type==="ExportNamedDeclaration"&&r.exportKind==="type"||r.type==="ExportAllDeclaration"&&r.exportKind==="type"||super.assertModuleNodeAllowed(r)}parseExportDeclaration(r){if(this.isContextual(130)){r.exportKind="type";let n=this.startNode();return this.next(),this.match(5)?(r.specifiers=this.parseExportSpecifiers(!0),super.parseExportFrom(r),null):this.flowParseTypeAlias(n)}else if(this.isContextual(131)){r.exportKind="type";let n=this.startNode();return this.next(),this.flowParseOpaqueType(n,!1)}else if(this.isContextual(129)){r.exportKind="type";let n=this.startNode();return this.next(),this.flowParseInterface(n)}else if(this.isContextual(126)){r.exportKind="value";let n=this.startNode();return this.next(),this.flowParseEnumDeclaration(n)}else return super.parseExportDeclaration(r)}eatExportStar(r){return super.eatExportStar(r)?!0:this.isContextual(130)&&this.lookahead().type===55?(r.exportKind="type",this.next(),this.next(),!0):!1}maybeParseExportNamespaceSpecifier(r){let{startLoc:n}=this.state,a=super.maybeParseExportNamespaceSpecifier(r);return a&&r.exportKind==="type"&&this.unexpected(n),a}parseClassId(r,n,a){super.parseClassId(r,n,a),this.match(47)&&(r.typeParameters=this.flowParseTypeParameterDeclaration())}parseClassMember(r,n,a){let{startLoc:i}=this.state;if(this.isContextual(125)){if(super.parseClassMemberFromModifier(r,n))return;n.declare=!0}super.parseClassMember(r,n,a),n.declare&&(n.type!=="ClassProperty"&&n.type!=="ClassPrivateProperty"&&n.type!=="PropertyDefinition"?this.raise(Ut.DeclareClassElement,i):n.value&&this.raise(Ut.DeclareClassFieldInitializer,n.value))}isIterator(r){return r==="iterator"||r==="asyncIterator"}readIterator(){let r=super.readWord1(),n="@@"+r;(!this.isIterator(r)||!this.state.inType)&&this.raise(Y.InvalidIdentifier,this.state.curPosition(),{identifierName:n}),this.finishToken(132,n)}getTokenFromCode(r){let n=this.input.charCodeAt(this.state.pos+1);r===123&&n===124?this.finishOp(6,2):this.state.inType&&(r===62||r===60)?this.finishOp(r===62?48:47,1):this.state.inType&&r===63?n===46?this.finishOp(18,2):this.finishOp(17,1):Mge(r,n,this.input.charCodeAt(this.state.pos+2))?(this.state.pos+=2,this.readIterator()):super.getTokenFromCode(r)}isAssignable(r,n){return r.type==="TypeCastExpression"?this.isAssignable(r.expression,n):super.isAssignable(r,n)}toAssignable(r,n=!1){!n&&r.type==="AssignmentExpression"&&r.left.type==="TypeCastExpression"&&(r.left=this.typeCastToParameter(r.left)),super.toAssignable(r,n)}toAssignableList(r,n,a){for(let i=0;i<r.length;i++){let s=r[i];s?.type==="TypeCastExpression"&&(r[i]=this.typeCastToParameter(s))}super.toAssignableList(r,n,a)}toReferencedList(r,n){for(let i=0;i<r.length;i++){var a;let s=r[i];s&&s.type==="TypeCastExpression"&&!((a=s.extra)!=null&&a.parenthesized)&&(r.length>1||!n)&&this.raise(Ut.TypeCastInPattern,s.typeAnnotation)}return r}parseArrayLike(r,n,a){let i=super.parseArrayLike(r,n,a);return a!=null&&!this.state.maybeInArrowParameters&&this.toReferencedList(i.elements),i}isValidLVal(r,n,a,i){return r==="TypeCastExpression"||super.isValidLVal(r,n,a,i)}parseClassProperty(r){return this.match(14)&&(r.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassProperty(r)}parseClassPrivateProperty(r){return this.match(14)&&(r.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassPrivateProperty(r)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(14)||super.isClassProperty()}isNonstaticConstructor(r){return!this.match(14)&&super.isNonstaticConstructor(r)}pushClassMethod(r,n,a,i,s,o){if(n.variance&&this.unexpected(n.variance.loc.start),delete n.variance,this.match(47)&&(n.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassMethod(r,n,a,i,s,o),n.params&&s){let l=n.params;l.length>0&&this.isThisParam(l[0])&&this.raise(Ut.ThisParamBannedInConstructor,n)}else if(n.type==="MethodDefinition"&&s&&n.value.params){let l=n.value.params;l.length>0&&this.isThisParam(l[0])&&this.raise(Ut.ThisParamBannedInConstructor,n)}}pushClassPrivateMethod(r,n,a,i){n.variance&&this.unexpected(n.variance.loc.start),delete n.variance,this.match(47)&&(n.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassPrivateMethod(r,n,a,i)}parseClassSuper(r){if(super.parseClassSuper(r),r.superClass&&(this.match(47)||this.match(51))&&(r.superTypeParameters=this.flowParseTypeParameterInstantiationInExpression()),this.isContextual(113)){this.next();let n=r.implements=[];do{let a=this.startNode();a.id=this.flowParseRestrictedIdentifier(!0),this.match(47)?a.typeParameters=this.flowParseTypeParameterInstantiation():a.typeParameters=null,n.push(this.finishNode(a,"ClassImplements"))}while(this.eat(12))}}checkGetterSetterParams(r){super.checkGetterSetterParams(r);let n=this.getObjectOrClassMethodParams(r);if(n.length>0){let a=n[0];this.isThisParam(a)&&r.kind==="get"?this.raise(Ut.GetterMayNotHaveThisParam,a):this.isThisParam(a)&&this.raise(Ut.SetterMayNotHaveThisParam,a)}}parsePropertyNamePrefixOperator(r){r.variance=this.flowParseVariance()}parseObjPropValue(r,n,a,i,s,o,l){r.variance&&this.unexpected(r.variance.loc.start),delete r.variance;let c;this.match(47)&&!o&&(c=this.flowParseTypeParameterDeclaration(),this.match(10)||this.unexpected());let u=super.parseObjPropValue(r,n,a,i,s,o,l);return c&&((u.value||u).typeParameters=c),u}parseFunctionParamType(r){return this.eat(17)&&(r.type!=="Identifier"&&this.raise(Ut.PatternIsOptional,r),this.isThisParam(r)&&this.raise(Ut.ThisParamMayNotBeOptional,r),r.optional=!0),this.match(14)?r.typeAnnotation=this.flowParseTypeAnnotation():this.isThisParam(r)&&this.raise(Ut.ThisParamAnnotationRequired,r),this.match(29)&&this.isThisParam(r)&&this.raise(Ut.ThisParamNoDefault,r),this.resetEndLocation(r),r}parseMaybeDefault(r,n){let a=super.parseMaybeDefault(r,n);return a.type==="AssignmentPattern"&&a.typeAnnotation&&a.right.start<a.typeAnnotation.start&&this.raise(Ut.TypeBeforeInitializer,a.typeAnnotation),a}checkImportReflection(r){super.checkImportReflection(r),r.module&&r.importKind!=="value"&&this.raise(Ut.ImportReflectionHasImportType,r.specifiers[0].loc.start)}parseImportSpecifierLocal(r,n,a){n.local=J8(r)?this.flowParseRestrictedIdentifier(!0,!0):this.parseIdentifier(),r.specifiers.push(this.finishImportSpecifier(n,a))}isPotentialImportPhase(r){if(super.isPotentialImportPhase(r))return!0;if(this.isContextual(130)){if(!r)return!0;let n=this.lookaheadCharCode();return n===123||n===42}return!r&&this.isContextual(87)}applyImportPhase(r,n,a,i){if(super.applyImportPhase(r,n,a,i),n){if(!a&&this.match(65))return;r.exportKind=a==="type"?a:"value"}else a==="type"&&this.match(55)&&this.unexpected(),r.importKind=a==="type"||a==="typeof"?a:"value"}parseImportSpecifier(r,n,a,i,s){let o=r.imported,l=null;o.type==="Identifier"&&(o.name==="type"?l="type":o.name==="typeof"&&(l="typeof"));let c=!1;if(this.isContextual(93)&&!this.isLookaheadContextual("as")){let d=this.parseIdentifier(!0);l!==null&&!pc(this.state.type)?(r.imported=d,r.importKind=l,r.local=this.cloneIdentifier(d)):(r.imported=o,r.importKind=null,r.local=this.parseIdentifier())}else{if(l!==null&&pc(this.state.type))r.imported=this.parseIdentifier(!0),r.importKind=l;else{if(n)throw this.raise(Y.ImportBindingIsString,r,{importName:o.value});r.imported=o,r.importKind=null}this.eatContextual(93)?r.local=this.parseIdentifier():(c=!0,r.local=this.cloneIdentifier(r.imported))}let u=J8(r);return a&&u&&this.raise(Ut.ImportTypeShorthandOnlyInPureImport,r),(a||u)&&this.checkReservedType(r.local.name,r.local.loc.start,!0),c&&!a&&!u&&this.checkReservedWord(r.local.name,r.loc.start,!0,!0),this.finishImportSpecifier(r,"ImportSpecifier")}parseBindingAtom(){switch(this.state.type){case 78:return this.parseIdentifier(!0);default:return super.parseBindingAtom()}}parseFunctionParams(r,n){let a=r.kind;a!=="get"&&a!=="set"&&this.match(47)&&(r.typeParameters=this.flowParseTypeParameterDeclaration()),super.parseFunctionParams(r,n)}parseVarId(r,n){super.parseVarId(r,n),this.match(14)&&(r.id.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(r.id))}parseAsyncArrowFromCallExpression(r,n){if(this.match(14)){let a=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0,r.returnType=this.flowParseTypeAnnotation(),this.state.noAnonFunctionType=a}return super.parseAsyncArrowFromCallExpression(r,n)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}parseMaybeAssign(r,n){var a;let i=null,s;if(this.hasPlugin("jsx")&&(this.match(143)||this.match(47))){if(i=this.state.clone(),s=this.tryParse(()=>super.parseMaybeAssign(r,n),i),!s.error)return s.node;let{context:c}=this.state,u=c[c.length-1];(u===tn.j_oTag||u===tn.j_expr)&&c.pop()}if((a=s)!=null&&a.error||this.match(47)){var o,l;i=i||this.state.clone();let c,u=this.tryParse(f=>{var p;c=this.flowParseTypeParameterDeclaration();let m=this.forwardNoArrowParamsConversionAt(c,()=>{let x=super.parseMaybeAssign(r,n);return this.resetStartLocationFromNode(x,c),x});(p=m.extra)!=null&&p.parenthesized&&f();let h=this.maybeUnwrapTypeCastExpression(m);return h.type!=="ArrowFunctionExpression"&&f(),h.typeParameters=c,this.resetStartLocationFromNode(h,c),m},i),d=null;if(u.node&&this.maybeUnwrapTypeCastExpression(u.node).type==="ArrowFunctionExpression"){if(!u.error&&!u.aborted)return u.node.async&&this.raise(Ut.UnexpectedTypeParameterBeforeAsyncArrowFunction,c),u.node;d=u.node}if((o=s)!=null&&o.node)return this.state=s.failState,s.node;if(d)return this.state=u.failState,d;throw(l=s)!=null&&l.thrown?s.error:u.thrown?u.error:this.raise(Ut.UnexpectedTokenAfterTypeParameter,c)}return super.parseMaybeAssign(r,n)}parseArrow(r){if(this.match(14)){let n=this.tryParse(()=>{let a=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0;let i=this.startNode();return[i.typeAnnotation,r.predicate]=this.flowParseTypeAndPredicateInitialiser(),this.state.noAnonFunctionType=a,this.canInsertSemicolon()&&this.unexpected(),this.match(19)||this.unexpected(),i});if(n.thrown)return null;n.error&&(this.state=n.failState),r.returnType=n.node.typeAnnotation?this.finishNode(n.node,"TypeAnnotation"):null}return super.parseArrow(r)}shouldParseArrow(r){return this.match(14)||super.shouldParseArrow(r)}setArrowFunctionParameters(r,n){this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(r.start))?r.params=n:super.setArrowFunctionParameters(r,n)}checkParams(r,n,a,i=!0){if(!(a&&this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(r.start)))){for(let s=0;s<r.params.length;s++)this.isThisParam(r.params[s])&&s>0&&this.raise(Ut.ThisParamMustBeFirst,r.params[s]);super.checkParams(r,n,a,i)}}parseParenAndDistinguishExpression(r){return super.parseParenAndDistinguishExpression(r&&!this.state.noArrowAt.includes(this.sourceToOffsetPos(this.state.start)))}parseSubscripts(r,n,a){if(r.type==="Identifier"&&r.name==="async"&&this.state.noArrowAt.includes(n.index)){this.next();let i=this.startNodeAt(n);i.callee=r,i.arguments=super.parseCallExpressionArguments(),r=this.finishNode(i,"CallExpression")}else if(r.type==="Identifier"&&r.name==="async"&&this.match(47)){let i=this.state.clone(),s=this.tryParse(l=>this.parseAsyncArrowWithTypeParameters(n)||l(),i);if(!s.error&&!s.aborted)return s.node;let o=this.tryParse(()=>super.parseSubscripts(r,n,a),i);if(o.node&&!o.error)return o.node;if(s.node)return this.state=s.failState,s.node;if(o.node)return this.state=o.failState,o.node;throw s.error||o.error}return super.parseSubscripts(r,n,a)}parseSubscript(r,n,a,i){if(this.match(18)&&this.isLookaheadToken_lt()){if(i.optionalChainMember=!0,a)return i.stop=!0,r;this.next();let s=this.startNodeAt(n);return s.callee=r,s.typeArguments=this.flowParseTypeParameterInstantiationInExpression(),this.expect(10),s.arguments=this.parseCallExpressionArguments(),s.optional=!0,this.finishCallExpression(s,!0)}else if(!a&&this.shouldParseTypes()&&(this.match(47)||this.match(51))){let s=this.startNodeAt(n);s.callee=r;let o=this.tryParse(()=>(s.typeArguments=this.flowParseTypeParameterInstantiationCallOrNew(),this.expect(10),s.arguments=super.parseCallExpressionArguments(),i.optionalChainMember&&(s.optional=!1),this.finishCallExpression(s,i.optionalChainMember)));if(o.node)return o.error&&(this.state=o.failState),o.node}return super.parseSubscript(r,n,a,i)}parseNewCallee(r){super.parseNewCallee(r);let n=null;this.shouldParseTypes()&&this.match(47)&&(n=this.tryParse(()=>this.flowParseTypeParameterInstantiationCallOrNew()).node),r.typeArguments=n}parseAsyncArrowWithTypeParameters(r){let n=this.startNodeAt(r);if(this.parseFunctionParams(n,!1),!!this.parseArrow(n))return super.parseArrowExpression(n,void 0,!0)}readToken_mult_modulo(r){let n=this.input.charCodeAt(this.state.pos+1);if(r===42&&n===47&&this.state.hasFlowComment){this.state.hasFlowComment=!1,this.state.pos+=2,this.nextToken();return}super.readToken_mult_modulo(r)}readToken_pipe_amp(r){let n=this.input.charCodeAt(this.state.pos+1);if(r===124&&n===125){this.finishOp(9,2);return}super.readToken_pipe_amp(r)}parseTopLevel(r,n){let a=super.parseTopLevel(r,n);return this.state.hasFlowComment&&this.raise(Ut.UnterminatedFlowComment,this.state.curPosition()),a}skipBlockComment(){if(this.hasPlugin("flowComments")&&this.skipFlowComment()){if(this.state.hasFlowComment)throw this.raise(Ut.NestedFlowComment,this.state.startLoc);this.hasFlowCommentCompletion();let r=this.skipFlowComment();r&&(this.state.pos+=r,this.state.hasFlowComment=!0);return}return super.skipBlockComment(this.state.hasFlowComment?"*-/":"*/")}skipFlowComment(){let{pos:r}=this.state,n=2;for(;[32,9].includes(this.input.charCodeAt(r+n));)n++;let a=this.input.charCodeAt(n+r),i=this.input.charCodeAt(n+r+1);return a===58&&i===58?n+2:this.input.slice(n+r,n+r+12)==="flow-include"?n+12:a===58&&i!==58?n:!1}hasFlowCommentCompletion(){if(this.input.indexOf("*/",this.state.pos)===-1)throw this.raise(Y.UnterminatedComment,this.state.curPosition())}flowEnumErrorBooleanMemberNotInitialized(r,{enumName:n,memberName:a}){this.raise(Ut.EnumBooleanMemberNotInitialized,r,{memberName:a,enumName:n})}flowEnumErrorInvalidMemberInitializer(r,n){return this.raise(n.explicitType?n.explicitType==="symbol"?Ut.EnumInvalidMemberInitializerSymbolType:Ut.EnumInvalidMemberInitializerPrimaryType:Ut.EnumInvalidMemberInitializerUnknownType,r,n)}flowEnumErrorNumberMemberNotInitialized(r,n){this.raise(Ut.EnumNumberMemberNotInitialized,r,n)}flowEnumErrorStringMemberInconsistentlyInitialized(r,n){this.raise(Ut.EnumStringMemberInconsistentlyInitialized,r,n)}flowEnumMemberInit(){let r=this.state.startLoc,n=()=>this.match(12)||this.match(8);switch(this.state.type){case 135:{let a=this.parseNumericLiteral(this.state.value);return n()?{type:"number",loc:a.loc.start,value:a}:{type:"invalid",loc:r}}case 134:{let a=this.parseStringLiteral(this.state.value);return n()?{type:"string",loc:a.loc.start,value:a}:{type:"invalid",loc:r}}case 85:case 86:{let a=this.parseBooleanLiteral(this.match(85));return n()?{type:"boolean",loc:a.loc.start,value:a}:{type:"invalid",loc:r}}default:return{type:"invalid",loc:r}}}flowEnumMemberRaw(){let r=this.state.startLoc,n=this.parseIdentifier(!0),a=this.eat(29)?this.flowEnumMemberInit():{type:"none",loc:r};return{id:n,init:a}}flowEnumCheckExplicitTypeMismatch(r,n,a){let{explicitType:i}=n;i!==null&&i!==a&&this.flowEnumErrorInvalidMemberInitializer(r,n)}flowEnumMembers({enumName:r,explicitType:n}){let a=new Set,i={booleanMembers:[],numberMembers:[],stringMembers:[],defaultedMembers:[]},s=!1;for(;!this.match(8);){if(this.eat(21)){s=!0;break}let o=this.startNode(),{id:l,init:c}=this.flowEnumMemberRaw(),u=l.name;if(u==="")continue;/^[a-z]/.test(u)&&this.raise(Ut.EnumInvalidMemberName,l,{memberName:u,suggestion:u[0].toUpperCase()+u.slice(1),enumName:r}),a.has(u)&&this.raise(Ut.EnumDuplicateMemberName,l,{memberName:u,enumName:r}),a.add(u);let d={enumName:r,explicitType:n,memberName:u};switch(o.id=l,c.type){case"boolean":{this.flowEnumCheckExplicitTypeMismatch(c.loc,d,"boolean"),o.init=c.value,i.booleanMembers.push(this.finishNode(o,"EnumBooleanMember"));break}case"number":{this.flowEnumCheckExplicitTypeMismatch(c.loc,d,"number"),o.init=c.value,i.numberMembers.push(this.finishNode(o,"EnumNumberMember"));break}case"string":{this.flowEnumCheckExplicitTypeMismatch(c.loc,d,"string"),o.init=c.value,i.stringMembers.push(this.finishNode(o,"EnumStringMember"));break}case"invalid":throw this.flowEnumErrorInvalidMemberInitializer(c.loc,d);case"none":switch(n){case"boolean":this.flowEnumErrorBooleanMemberNotInitialized(c.loc,d);break;case"number":this.flowEnumErrorNumberMemberNotInitialized(c.loc,d);break;default:i.defaultedMembers.push(this.finishNode(o,"EnumDefaultedMember"))}}this.match(8)||this.expect(12)}return{members:i,hasUnknownMembers:s}}flowEnumStringMembers(r,n,{enumName:a}){if(r.length===0)return n;if(n.length===0)return r;if(n.length>r.length){for(let i of r)this.flowEnumErrorStringMemberInconsistentlyInitialized(i,{enumName:a});return n}else{for(let i of n)this.flowEnumErrorStringMemberInconsistentlyInitialized(i,{enumName:a});return r}}flowEnumParseExplicitType({enumName:r}){if(!this.eatContextual(102))return null;if(!ln(this.state.type))throw this.raise(Ut.EnumInvalidExplicitTypeUnknownSupplied,this.state.startLoc,{enumName:r});let{value:n}=this.state;return this.next(),n!=="boolean"&&n!=="number"&&n!=="string"&&n!=="symbol"&&this.raise(Ut.EnumInvalidExplicitType,this.state.startLoc,{enumName:r,invalidEnumType:n}),n}flowEnumBody(r,n){let a=n.name,i=n.loc.start,s=this.flowEnumParseExplicitType({enumName:a});this.expect(5);let{members:o,hasUnknownMembers:l}=this.flowEnumMembers({enumName:a,explicitType:s});switch(r.hasUnknownMembers=l,s){case"boolean":return r.explicitType=!0,r.members=o.booleanMembers,this.expect(8),this.finishNode(r,"EnumBooleanBody");case"number":return r.explicitType=!0,r.members=o.numberMembers,this.expect(8),this.finishNode(r,"EnumNumberBody");case"string":return r.explicitType=!0,r.members=this.flowEnumStringMembers(o.stringMembers,o.defaultedMembers,{enumName:a}),this.expect(8),this.finishNode(r,"EnumStringBody");case"symbol":return r.members=o.defaultedMembers,this.expect(8),this.finishNode(r,"EnumSymbolBody");default:{let c=()=>(r.members=[],this.expect(8),this.finishNode(r,"EnumStringBody"));r.explicitType=!1;let u=o.booleanMembers.length,d=o.numberMembers.length,f=o.stringMembers.length,p=o.defaultedMembers.length;if(!u&&!d&&!f&&!p)return c();if(!u&&!d)return r.members=this.flowEnumStringMembers(o.stringMembers,o.defaultedMembers,{enumName:a}),this.expect(8),this.finishNode(r,"EnumStringBody");if(!d&&!f&&u>=p){for(let m of o.defaultedMembers)this.flowEnumErrorBooleanMemberNotInitialized(m.loc.start,{enumName:a,memberName:m.id.name});return r.members=o.booleanMembers,this.expect(8),this.finishNode(r,"EnumBooleanBody")}else if(!u&&!f&&d>=p){for(let m of o.defaultedMembers)this.flowEnumErrorNumberMemberNotInitialized(m.loc.start,{enumName:a,memberName:m.id.name});return r.members=o.numberMembers,this.expect(8),this.finishNode(r,"EnumNumberBody")}else return this.raise(Ut.EnumInconsistentMemberValues,i,{enumName:a}),c()}}}flowParseEnumDeclaration(r){let n=this.parseIdentifier();return r.id=n,r.body=this.flowEnumBody(this.startNode(),n),this.finishNode(r,"EnumDeclaration")}jsxParseOpeningElementAfterName(r){return this.shouldParseTypes()&&(this.match(47)||this.match(51))&&(r.typeArguments=this.flowParseTypeParameterInstantiationInExpression()),super.jsxParseOpeningElementAfterName(r)}isLookaheadToken_lt(){let r=this.nextTokenStart();if(this.input.charCodeAt(r)===60){let n=this.input.charCodeAt(r+1);return n!==60&&n!==61}return!1}reScan_lt_gt(){let{type:r}=this.state;r===47?(this.state.pos-=1,this.readToken_lt()):r===48&&(this.state.pos-=1,this.readToken_gt())}reScan_lt(){let{type:r}=this.state;return r===51?(this.state.pos-=2,this.finishOp(47,1),47):r}maybeUnwrapTypeCastExpression(r){return r.type==="TypeCastExpression"?r.expression:r}},qge={__proto__:null,quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:"\xA0",iexcl:"\xA1",cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",brvbar:"\xA6",sect:"\xA7",uml:"\xA8",copy:"\xA9",ordf:"\xAA",laquo:"\xAB",not:"\xAC",shy:"\xAD",reg:"\xAE",macr:"\xAF",deg:"\xB0",plusmn:"\xB1",sup2:"\xB2",sup3:"\xB3",acute:"\xB4",micro:"\xB5",para:"\xB6",middot:"\xB7",cedil:"\xB8",sup1:"\xB9",ordm:"\xBA",raquo:"\xBB",frac14:"\xBC",frac12:"\xBD",frac34:"\xBE",iquest:"\xBF",Agrave:"\xC0",Aacute:"\xC1",Acirc:"\xC2",Atilde:"\xC3",Auml:"\xC4",Aring:"\xC5",AElig:"\xC6",Ccedil:"\xC7",Egrave:"\xC8",Eacute:"\xC9",Ecirc:"\xCA",Euml:"\xCB",Igrave:"\xCC",Iacute:"\xCD",Icirc:"\xCE",Iuml:"\xCF",ETH:"\xD0",Ntilde:"\xD1",Ograve:"\xD2",Oacute:"\xD3",Ocirc:"\xD4",Otilde:"\xD5",Ouml:"\xD6",times:"\xD7",Oslash:"\xD8",Ugrave:"\xD9",Uacute:"\xDA",Ucirc:"\xDB",Uuml:"\xDC",Yacute:"\xDD",THORN:"\xDE",szlig:"\xDF",agrave:"\xE0",aacute:"\xE1",acirc:"\xE2",atilde:"\xE3",auml:"\xE4",aring:"\xE5",aelig:"\xE6",ccedil:"\xE7",egrave:"\xE8",eacute:"\xE9",ecirc:"\xEA",euml:"\xEB",igrave:"\xEC",iacute:"\xED",icirc:"\xEE",iuml:"\xEF",eth:"\xF0",ntilde:"\xF1",ograve:"\xF2",oacute:"\xF3",ocirc:"\xF4",otilde:"\xF5",ouml:"\xF6",divide:"\xF7",oslash:"\xF8",ugrave:"\xF9",uacute:"\xFA",ucirc:"\xFB",uuml:"\xFC",yacute:"\xFD",thorn:"\xFE",yuml:"\xFF",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",fnof:"\u0192",circ:"\u02C6",tilde:"\u02DC",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039A",Lambda:"\u039B",Mu:"\u039C",Nu:"\u039D",Xi:"\u039E",Omicron:"\u039F",Pi:"\u03A0",Rho:"\u03A1",Sigma:"\u03A3",Tau:"\u03A4",Upsilon:"\u03A5",Phi:"\u03A6",Chi:"\u03A7",Psi:"\u03A8",Omega:"\u03A9",alpha:"\u03B1",beta:"\u03B2",gamma:"\u03B3",delta:"\u03B4",epsilon:"\u03B5",zeta:"\u03B6",eta:"\u03B7",theta:"\u03B8",iota:"\u03B9",kappa:"\u03BA",lambda:"\u03BB",mu:"\u03BC",nu:"\u03BD",xi:"\u03BE",omicron:"\u03BF",pi:"\u03C0",rho:"\u03C1",sigmaf:"\u03C2",sigma:"\u03C3",tau:"\u03C4",upsilon:"\u03C5",phi:"\u03C6",chi:"\u03C7",psi:"\u03C8",omega:"\u03C9",thetasym:"\u03D1",upsih:"\u03D2",piv:"\u03D6",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200C",zwj:"\u200D",lrm:"\u200E",rlm:"\u200F",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201A",ldquo:"\u201C",rdquo:"\u201D",bdquo:"\u201E",dagger:"\u2020",Dagger:"\u2021",bull:"\u2022",hellip:"\u2026",permil:"\u2030",prime:"\u2032",Prime:"\u2033",lsaquo:"\u2039",rsaquo:"\u203A",oline:"\u203E",frasl:"\u2044",euro:"\u20AC",image:"\u2111",weierp:"\u2118",real:"\u211C",trade:"\u2122",alefsym:"\u2135",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21B5",lArr:"\u21D0",uArr:"\u21D1",rArr:"\u21D2",dArr:"\u21D3",hArr:"\u21D4",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220B",prod:"\u220F",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221A",prop:"\u221D",infin:"\u221E",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222A",int:"\u222B",there4:"\u2234",sim:"\u223C",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22A5",sdot:"\u22C5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230A",rfloor:"\u230B",lang:"\u2329",rang:"\u232A",loz:"\u25CA",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666"},Hge=/\r\n|[\r\n\u2028\u2029]/,d1=new RegExp(Hge.source,"g");function py(e){switch(e){case 10:case 13:case 8232:case 8233:return!0;default:return!1}}function Z8(e,t,r){for(let n=t;n<r;n++)if(py(e.charCodeAt(n)))return!0;return!1}var aL=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,iL=/(?:[^\S\n\r\u2028\u2029]|\/\/.*|\/\*.*?\*\/)*/g;function Gge(e){switch(e){case 9:case 11:case 12:case 32:case 160:case 5760:case 8192:case 8193:case 8194:case 8195:case 8196:case 8197:case 8198:case 8199:case 8200:case 8201:case 8202:case 8239:case 8287:case 12288:case 65279:return!0;default:return!1}}var Om=Wc`jsx`({AttributeIsEmpty:"JSX attributes must only be assigned a non-empty expression.",MissingClosingTagElement:({openingTagName:e})=>`Expected corresponding JSX closing tag for <${e}>.`,MissingClosingTagFragment:"Expected corresponding JSX closing tag for <>.",UnexpectedSequenceExpression:"Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)?",UnexpectedToken:({unexpected:e,HTMLEntity:t})=>`Unexpected token \`${e}\`. Did you mean \`${t}\` or \`{'${e}'}\`?`,UnsupportedJsxValue:"JSX value should be either an expression or a quoted JSX text.",UnterminatedJsxContent:"Unterminated JSX contents.",UnwrappedAdjacentJSXElements:"Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...</>?"});function Af(e){return e?e.type==="JSXOpeningFragment"||e.type==="JSXClosingFragment":!1}function fy(e){if(e.type==="JSXIdentifier")return e.name;if(e.type==="JSXNamespacedName")return e.namespace.name+":"+e.name.name;if(e.type==="JSXMemberExpression")return fy(e.object)+"."+fy(e.property);throw new Error("Node had unexpected type: "+e.type)}var Kge=e=>class extends e{jsxReadToken(){let r="",n=this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(Om.UnterminatedJsxContent,this.state.startLoc);let a=this.input.charCodeAt(this.state.pos);switch(a){case 60:case 123:if(this.state.pos===this.state.start){a===60&&this.state.canStartJSXElement?(++this.state.pos,this.finishToken(143)):super.getTokenFromCode(a);return}r+=this.input.slice(n,this.state.pos),this.finishToken(142,r);return;case 38:r+=this.input.slice(n,this.state.pos),r+=this.jsxReadEntity(),n=this.state.pos;break;case 62:case 125:default:py(a)?(r+=this.input.slice(n,this.state.pos),r+=this.jsxReadNewLine(!0),n=this.state.pos):++this.state.pos}}}jsxReadNewLine(r){let n=this.input.charCodeAt(this.state.pos),a;return++this.state.pos,n===13&&this.input.charCodeAt(this.state.pos)===10?(++this.state.pos,a=r?`
`:`\r
`):a=String.fromCharCode(n),++this.state.curLine,this.state.lineStart=this.state.pos,a}jsxReadString(r){let n="",a=++this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(Y.UnterminatedString,this.state.startLoc);let i=this.input.charCodeAt(this.state.pos);if(i===r)break;i===38?(n+=this.input.slice(a,this.state.pos),n+=this.jsxReadEntity(),a=this.state.pos):py(i)?(n+=this.input.slice(a,this.state.pos),n+=this.jsxReadNewLine(!1),a=this.state.pos):++this.state.pos}n+=this.input.slice(a,this.state.pos++),this.finishToken(134,n)}jsxReadEntity(){let r=++this.state.pos;if(this.codePointAtPos(this.state.pos)===35){++this.state.pos;let n=10;this.codePointAtPos(this.state.pos)===120&&(n=16,++this.state.pos);let a=this.readInt(n,void 0,!1,"bail");if(a!==null&&this.codePointAtPos(this.state.pos)===59)return++this.state.pos,String.fromCodePoint(a)}else{let n=0,a=!1;for(;n++<10&&this.state.pos<this.length&&!(a=this.codePointAtPos(this.state.pos)===59);)++this.state.pos;if(a){let i=this.input.slice(r,this.state.pos),s=qge[i];if(++this.state.pos,s)return s}}return this.state.pos=r,"&"}jsxReadWord(){let r,n=this.state.pos;do r=this.input.charCodeAt(++this.state.pos);while(Bm(r)||r===45);this.finishToken(141,this.input.slice(n,this.state.pos))}jsxParseIdentifier(){let r=this.startNode();return this.match(141)?r.name=this.state.value:ML(this.state.type)?r.name=kf(this.state.type):this.unexpected(),this.next(),this.finishNode(r,"JSXIdentifier")}jsxParseNamespacedName(){let r=this.state.startLoc,n=this.jsxParseIdentifier();if(!this.eat(14))return n;let a=this.startNodeAt(r);return a.namespace=n,a.name=this.jsxParseIdentifier(),this.finishNode(a,"JSXNamespacedName")}jsxParseElementName(){let r=this.state.startLoc,n=this.jsxParseNamespacedName();if(n.type==="JSXNamespacedName")return n;for(;this.eat(16);){let a=this.startNodeAt(r);a.object=n,a.property=this.jsxParseIdentifier(),n=this.finishNode(a,"JSXMemberExpression")}return n}jsxParseAttributeValue(){let r;switch(this.state.type){case 5:return r=this.startNode(),this.setContext(tn.brace),this.next(),r=this.jsxParseExpressionContainer(r,tn.j_oTag),r.expression.type==="JSXEmptyExpression"&&this.raise(Om.AttributeIsEmpty,r),r;case 143:case 134:return this.parseExprAtom();default:throw this.raise(Om.UnsupportedJsxValue,this.state.startLoc)}}jsxParseEmptyExpression(){let r=this.startNodeAt(this.state.lastTokEndLoc);return this.finishNodeAt(r,"JSXEmptyExpression",this.state.startLoc)}jsxParseSpreadChild(r){return this.next(),r.expression=this.parseExpression(),this.setContext(tn.j_expr),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(r,"JSXSpreadChild")}jsxParseExpressionContainer(r,n){if(this.match(8))r.expression=this.jsxParseEmptyExpression();else{let a=this.parseExpression();r.expression=a}return this.setContext(n),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(r,"JSXExpressionContainer")}jsxParseAttribute(){let r=this.startNode();return this.match(5)?(this.setContext(tn.brace),this.next(),this.expect(21),r.argument=this.parseMaybeAssignAllowIn(),this.setContext(tn.j_oTag),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(r,"JSXSpreadAttribute")):(r.name=this.jsxParseNamespacedName(),r.value=this.eat(29)?this.jsxParseAttributeValue():null,this.finishNode(r,"JSXAttribute"))}jsxParseOpeningElementAt(r){let n=this.startNodeAt(r);return this.eat(144)?this.finishNode(n,"JSXOpeningFragment"):(n.name=this.jsxParseElementName(),this.jsxParseOpeningElementAfterName(n))}jsxParseOpeningElementAfterName(r){let n=[];for(;!this.match(56)&&!this.match(144);)n.push(this.jsxParseAttribute());return r.attributes=n,r.selfClosing=this.eat(56),this.expect(144),this.finishNode(r,"JSXOpeningElement")}jsxParseClosingElementAt(r){let n=this.startNodeAt(r);return this.eat(144)?this.finishNode(n,"JSXClosingFragment"):(n.name=this.jsxParseElementName(),this.expect(144),this.finishNode(n,"JSXClosingElement"))}jsxParseElementAt(r){let n=this.startNodeAt(r),a=[],i=this.jsxParseOpeningElementAt(r),s=null;if(!i.selfClosing){e:for(;;)switch(this.state.type){case 143:if(r=this.state.startLoc,this.next(),this.eat(56)){s=this.jsxParseClosingElementAt(r);break e}a.push(this.jsxParseElementAt(r));break;case 142:a.push(this.parseLiteral(this.state.value,"JSXText"));break;case 5:{let o=this.startNode();this.setContext(tn.brace),this.next(),this.match(21)?a.push(this.jsxParseSpreadChild(o)):a.push(this.jsxParseExpressionContainer(o,tn.j_expr));break}default:this.unexpected()}Af(i)&&!Af(s)&&s!==null?this.raise(Om.MissingClosingTagFragment,s):!Af(i)&&Af(s)?this.raise(Om.MissingClosingTagElement,s,{openingTagName:fy(i.name)}):!Af(i)&&!Af(s)&&fy(s.name)!==fy(i.name)&&this.raise(Om.MissingClosingTagElement,s,{openingTagName:fy(i.name)})}if(Af(i)?(n.openingFragment=i,n.closingFragment=s):(n.openingElement=i,n.closingElement=s),n.children=a,this.match(47))throw this.raise(Om.UnwrappedAdjacentJSXElements,this.state.startLoc);return Af(i)?this.finishNode(n,"JSXFragment"):this.finishNode(n,"JSXElement")}jsxParseElement(){let r=this.state.startLoc;return this.next(),this.jsxParseElementAt(r)}setContext(r){let{context:n}=this.state;n[n.length-1]=r}parseExprAtom(r){return this.match(143)?this.jsxParseElement():this.match(47)&&this.input.charCodeAt(this.state.pos)!==33?(this.replaceToken(143),this.jsxParseElement()):super.parseExprAtom(r)}skipSpace(){this.curContext().preserveSpace||super.skipSpace()}getTokenFromCode(r){let n=this.curContext();if(n===tn.j_expr){this.jsxReadToken();return}if(n===tn.j_oTag||n===tn.j_cTag){if(Xc(r)){this.jsxReadWord();return}if(r===62){++this.state.pos,this.finishToken(144);return}if((r===34||r===39)&&n===tn.j_oTag){this.jsxReadString(r);return}}if(r===60&&this.state.canStartJSXElement&&this.input.charCodeAt(this.state.pos+1)!==33){++this.state.pos,this.finishToken(143);return}super.getTokenFromCode(r)}updateContext(r){let{context:n,type:a}=this.state;if(a===56&&r===143)n.splice(-2,2,tn.j_cTag),this.state.canStartJSXElement=!1;else if(a===143)n.push(tn.j_oTag);else if(a===144){let i=n[n.length-1];i===tn.j_oTag&&r===56||i===tn.j_cTag?(n.pop(),this.state.canStartJSXElement=n[n.length-1]===tn.j_expr):(this.setContext(tn.j_expr),this.state.canStartJSXElement=!0)}else this.state.canStartJSXElement=bge(a)}},fL=class extends y0{constructor(...t){super(...t),this.tsNames=new Map}},pL=class extends x0{constructor(...t){super(...t),this.importsStack=[]}createScope(t){return this.importsStack.push(new Set),new fL(t)}enter(t){t===1024&&this.importsStack.push(new Set),super.enter(t)}exit(){let t=super.exit();return t===1024&&this.importsStack.pop(),t}hasImport(t,r){let n=this.importsStack.length;if(this.importsStack[n-1].has(t))return!0;if(!r&&n>1){for(let a=0;a<n-1;a++)if(this.importsStack[a].has(t))return!0}return!1}declareName(t,r,n){if(r&4096){this.hasImport(t,!0)&&this.parser.raise(Y.VarRedeclaration,n,{identifierName:t}),this.importsStack[this.importsStack.length-1].add(t);return}let a=this.currentScope(),i=a.tsNames.get(t)||0;if(r&1024){this.maybeExportDefined(a,t),a.tsNames.set(t,i|16);return}super.declareName(t,r,n),r&2&&(r&1||(this.checkRedeclarationInScope(a,t,r,n),this.maybeExportDefined(a,t)),i=i|1),r&256&&(i=i|2),r&512&&(i=i|4),r&128&&(i=i|8),i&&a.tsNames.set(t,i)}isRedeclaredInScope(t,r,n){let a=t.tsNames.get(r);if((a&2)>0){if(n&256){let i=!!(n&512),s=(a&4)>0;return i!==s}return!0}return n&128&&(a&8)>0?t.names.get(r)&2?!!(n&1):!1:n&2&&(a&1)>0?!0:super.isRedeclaredInScope(t,r,n)}checkLocalExport(t){let{name:r}=t;if(this.hasImport(r))return;let n=this.scopeStack.length;for(let a=n-1;a>=0;a--){let s=this.scopeStack[a].tsNames.get(r);if((s&1)>0||(s&16)>0)return}super.checkLocalExport(t)}},mL=class{constructor(){this.stacks=[]}enter(t){this.stacks.push(t)}exit(){this.stacks.pop()}currentFlags(){return this.stacks[this.stacks.length-1]}get hasAwait(){return(this.currentFlags()&2)>0}get hasYield(){return(this.currentFlags()&1)>0}get hasReturn(){return(this.currentFlags()&4)>0}get hasIn(){return(this.currentFlags()&8)>0}};function h1(e,t){return(e?2:0)|(t?1:0)}var hL=class{constructor(){this.sawUnambiguousESM=!1,this.ambiguousScriptDifferentAst=!1}sourceToOffsetPos(t){return t+this.startIndex}offsetToSourcePos(t){return t-this.startIndex}hasPlugin(t){if(typeof t=="string")return this.plugins.has(t);{let[r,n]=t;if(!this.hasPlugin(r))return!1;let a=this.plugins.get(r);for(let i of Object.keys(n))if(a?.[i]!==n[i])return!1;return!0}}getPluginOption(t,r){var n;return(n=this.plugins.get(t))==null?void 0:n[r]}};function mV(e,t){e.trailingComments===void 0?e.trailingComments=t:e.trailingComments.unshift(...t)}function Wge(e,t){e.leadingComments===void 0?e.leadingComments=t:e.leadingComments.unshift(...t)}function b0(e,t){e.innerComments===void 0?e.innerComments=t:e.innerComments.unshift(...t)}function Nf(e,t,r){let n=null,a=t.length;for(;n===null&&a>0;)n=t[--a];n===null||n.start>r.start?b0(e,r.comments):mV(n,r.comments)}var gL=class extends hL{addComment(t){this.filename&&(t.loc.filename=this.filename);let{commentsLen:r}=this.state;this.comments.length!==r&&(this.comments.length=r),this.comments.push(t),this.state.commentsLen++}processComment(t){let{commentStack:r}=this.state,n=r.length;if(n===0)return;let a=n-1,i=r[a];i.start===t.end&&(i.leadingNode=t,a--);let{start:s}=t;for(;a>=0;a--){let o=r[a],l=o.end;if(l>s)o.containingNode=t,this.finalizeComment(o),r.splice(a,1);else{l===s&&(o.trailingNode=t);break}}}finalizeComment(t){var r;let{comments:n}=t;if(t.leadingNode!==null||t.trailingNode!==null)t.leadingNode!==null&&mV(t.leadingNode,n),t.trailingNode!==null&&Wge(t.trailingNode,n);else{let a=t.containingNode,i=t.start;if(this.input.charCodeAt(this.offsetToSourcePos(i)-1)===44)switch(a.type){case"ObjectExpression":case"ObjectPattern":case"RecordExpression":Nf(a,a.properties,t);break;case"CallExpression":case"OptionalCallExpression":Nf(a,a.arguments,t);break;case"ImportExpression":Nf(a,[a.source,(r=a.options)!=null?r:null],t);break;case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":case"ObjectMethod":case"ClassMethod":case"ClassPrivateMethod":Nf(a,a.params,t);break;case"ArrayExpression":case"ArrayPattern":case"TupleExpression":Nf(a,a.elements,t);break;case"ExportNamedDeclaration":case"ImportDeclaration":Nf(a,a.specifiers,t);break;case"TSEnumDeclaration":Nf(a,a.members,t);break;case"TSEnumBody":Nf(a,a.members,t);break;default:b0(a,n)}else b0(a,n)}}finalizeRemainingComments(){let{commentStack:t}=this.state;for(let r=t.length-1;r>=0;r--)this.finalizeComment(t[r]);this.state.commentStack=[]}resetPreviousNodeTrailingComments(t){let{commentStack:r}=this.state,{length:n}=r;if(n===0)return;let a=r[n-1];a.leadingNode===t&&(a.leadingNode=null)}takeSurroundingComments(t,r,n){let{commentStack:a}=this.state,i=a.length;if(i===0)return;let s=i-1;for(;s>=0;s--){let o=a[s],l=o.end;if(o.start===n)o.leadingNode=t;else if(l===r)o.trailingNode=t;else if(l<r)break}}},v0=class{constructor(){this.flags=1024,this.startIndex=void 0,this.curLine=void 0,this.lineStart=void 0,this.startLoc=void 0,this.endLoc=void 0,this.errors=[],this.potentialArrowAt=-1,this.noArrowAt=[],this.noArrowParamsConversionAt=[],this.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null},this.labels=[],this.commentsLen=0,this.commentStack=[],this.pos=0,this.type=140,this.value=null,this.start=0,this.end=0,this.lastTokEndLoc=null,this.lastTokStartLoc=null,this.context=[tn.brace],this.firstInvalidTemplateEscapePos=null,this.strictErrors=new Map,this.tokensLength=0}get strict(){return(this.flags&1)>0}set strict(t){t?this.flags|=1:this.flags&=-2}init({strictMode:t,sourceType:r,startIndex:n,startLine:a,startColumn:i}){this.strict=t===!1?!1:t===!0?!0:r==="module",this.startIndex=n,this.curLine=a,this.lineStart=-i,this.startLoc=this.endLoc=new Yc(a,i,n)}get maybeInArrowParameters(){return(this.flags&2)>0}set maybeInArrowParameters(t){t?this.flags|=2:this.flags&=-3}get inType(){return(this.flags&4)>0}set inType(t){t?this.flags|=4:this.flags&=-5}get noAnonFunctionType(){return(this.flags&8)>0}set noAnonFunctionType(t){t?this.flags|=8:this.flags&=-9}get hasFlowComment(){return(this.flags&16)>0}set hasFlowComment(t){t?this.flags|=16:this.flags&=-17}get isAmbientContext(){return(this.flags&32)>0}set isAmbientContext(t){t?this.flags|=32:this.flags&=-33}get inAbstractClass(){return(this.flags&64)>0}set inAbstractClass(t){t?this.flags|=64:this.flags&=-65}get inDisallowConditionalTypesContext(){return(this.flags&128)>0}set inDisallowConditionalTypesContext(t){t?this.flags|=128:this.flags&=-129}get soloAwait(){return(this.flags&256)>0}set soloAwait(t){t?this.flags|=256:this.flags&=-257}get inFSharpPipelineDirectBody(){return(this.flags&512)>0}set inFSharpPipelineDirectBody(t){t?this.flags|=512:this.flags&=-513}get canStartJSXElement(){return(this.flags&1024)>0}set canStartJSXElement(t){t?this.flags|=1024:this.flags&=-1025}get containsEsc(){return(this.flags&2048)>0}set containsEsc(t){t?this.flags|=2048:this.flags&=-2049}get hasTopLevelAwait(){return(this.flags&4096)>0}set hasTopLevelAwait(t){t?this.flags|=4096:this.flags&=-4097}curPosition(){return new Yc(this.curLine,this.pos-this.lineStart,this.pos+this.startIndex)}clone(){let t=new v0;return t.flags=this.flags,t.startIndex=this.startIndex,t.curLine=this.curLine,t.lineStart=this.lineStart,t.startLoc=this.startLoc,t.endLoc=this.endLoc,t.errors=this.errors.slice(),t.potentialArrowAt=this.potentialArrowAt,t.noArrowAt=this.noArrowAt.slice(),t.noArrowParamsConversionAt=this.noArrowParamsConversionAt.slice(),t.topicContext=this.topicContext,t.labels=this.labels.slice(),t.commentsLen=this.commentsLen,t.commentStack=this.commentStack.slice(),t.pos=this.pos,t.type=this.type,t.value=this.value,t.start=this.start,t.end=this.end,t.lastTokEndLoc=this.lastTokEndLoc,t.lastTokStartLoc=this.lastTokStartLoc,t.context=this.context.slice(),t.firstInvalidTemplateEscapePos=this.firstInvalidTemplateEscapePos,t.strictErrors=this.strictErrors,t.tokensLength=this.tokensLength,t}},Xge=function(t){return t>=48&&t<=57},Q8={decBinOct:new Set([46,66,69,79,95,98,101,111]),hex:new Set([46,88,95,120])},f1={bin:e=>e===48||e===49,oct:e=>e>=48&&e<=55,dec:e=>e>=48&&e<=57,hex:e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102};function eV(e,t,r,n,a,i){let s=r,o=n,l=a,c="",u=null,d=r,{length:f}=t;for(;;){if(r>=f){i.unterminated(s,o,l),c+=t.slice(d,r);break}let p=t.charCodeAt(r);if(Yge(e,p,t,r)){c+=t.slice(d,r);break}if(p===92){c+=t.slice(d,r);let m=Jge(t,r,n,a,e==="template",i);m.ch===null&&!u?u={pos:r,lineStart:n,curLine:a}:c+=m.ch,{pos:r,lineStart:n,curLine:a}=m,d=r}else p===8232||p===8233?(++r,++a,n=r):p===10||p===13?e==="template"?(c+=t.slice(d,r)+`
`,++r,p===13&&t.charCodeAt(r)===10&&++r,++a,d=n=r):i.unterminated(s,o,l):++r}return{pos:r,str:c,firstInvalidLoc:u,lineStart:n,curLine:a,containsInvalid:!!u}}function Yge(e,t,r,n){return e==="template"?t===96||t===36&&r.charCodeAt(n+1)===123:t===(e==="double"?34:39)}function Jge(e,t,r,n,a,i){let s=!a;t++;let o=c=>({pos:t,ch:c,lineStart:r,curLine:n}),l=e.charCodeAt(t++);switch(l){case 110:return o(`
`);case 114:return o("\r");case 120:{let c;return{code:c,pos:t}=yL(e,t,r,n,2,!1,s,i),o(c===null?null:String.fromCharCode(c))}case 117:{let c;return{code:c,pos:t}=gV(e,t,r,n,s,i),o(c===null?null:String.fromCodePoint(c))}case 116:return o(" ");case 98:return o("\b");case 118:return o("\v");case 102:return o("\f");case 13:e.charCodeAt(t)===10&&++t;case 10:r=t,++n;case 8232:case 8233:return o("");case 56:case 57:if(a)return o(null);i.strictNumericEscape(t-1,r,n);default:if(l>=48&&l<=55){let c=t-1,d=/^[0-7]+/.exec(e.slice(c,t+2))[0],f=parseInt(d,8);f>255&&(d=d.slice(0,-1),f=parseInt(d,8)),t+=d.length-1;let p=e.charCodeAt(t);if(d!=="0"||p===56||p===57){if(a)return o(null);i.strictNumericEscape(c,r,n)}return o(String.fromCharCode(f))}return o(String.fromCharCode(l))}}function yL(e,t,r,n,a,i,s,o){let l=t,c;return{n:c,pos:t}=hV(e,t,r,n,16,a,i,!1,o,!s),c===null&&(s?o.invalidEscapeSequence(l,r,n):t=l-1),{code:c,pos:t}}function hV(e,t,r,n,a,i,s,o,l,c){let u=t,d=a===16?Q8.hex:Q8.decBinOct,f=a===16?f1.hex:a===10?f1.dec:a===8?f1.oct:f1.bin,p=!1,m=0;for(let h=0,x=i??1/0;h<x;++h){let g=e.charCodeAt(t),y;if(g===95&&o!=="bail"){let b=e.charCodeAt(t-1),S=e.charCodeAt(t+1);if(o){if(Number.isNaN(S)||!f(S)||d.has(b)||d.has(S)){if(c)return{n:null,pos:t};l.unexpectedNumericSeparator(t,r,n)}}else{if(c)return{n:null,pos:t};l.numericSeparatorInEscapeSequence(t,r,n)}++t;continue}if(g>=97?y=g-97+10:g>=65?y=g-65+10:Xge(g)?y=g-48:y=1/0,y>=a){if(y<=9&&c)return{n:null,pos:t};if(y<=9&&l.invalidDigit(t,r,n,a))y=0;else if(s)y=0,p=!0;else break}++t,m=m*a+y}return t===u||i!=null&&t-u!==i||p?{n:null,pos:t}:{n:m,pos:t}}function gV(e,t,r,n,a,i){let s=e.charCodeAt(t),o;if(s===123){if(++t,{code:o,pos:t}=yL(e,t,r,n,e.indexOf("}",t)-t,!0,a,i),++t,o!==null&&o>1114111)if(a)i.invalidCodePoint(t,r,n);else return{code:null,pos:t}}else({code:o,pos:t}=yL(e,t,r,n,4,!1,a,i));return{code:o,pos:t}}function p0(e,t,r){return new Yc(r,e-t,e)}var Zge=new Set([103,109,115,105,121,117,100,118]),Kc=class{constructor(t){let r=t.startIndex||0;this.type=t.type,this.value=t.value,this.start=r+t.start,this.end=r+t.end,this.loc=new hy(t.startLoc,t.endLoc)}},xL=class extends gL{constructor(t,r){super(),this.isLookahead=void 0,this.tokens=[],this.errorHandlers_readInt={invalidDigit:(n,a,i,s)=>this.optionFlags&2048?(this.raise(Y.InvalidDigit,p0(n,a,i),{radix:s}),!0):!1,numericSeparatorInEscapeSequence:this.errorBuilder(Y.NumericSeparatorInEscapeSequence),unexpectedNumericSeparator:this.errorBuilder(Y.UnexpectedNumericSeparator)},this.errorHandlers_readCodePoint=Object.assign({},this.errorHandlers_readInt,{invalidEscapeSequence:this.errorBuilder(Y.InvalidEscapeSequence),invalidCodePoint:this.errorBuilder(Y.InvalidCodePoint)}),this.errorHandlers_readStringContents_string=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:(n,a,i)=>{this.recordStrictModeErrors(Y.StrictNumericEscape,p0(n,a,i))},unterminated:(n,a,i)=>{throw this.raise(Y.UnterminatedString,p0(n-1,a,i))}}),this.errorHandlers_readStringContents_template=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:this.errorBuilder(Y.StrictNumericEscape),unterminated:(n,a,i)=>{throw this.raise(Y.UnterminatedTemplate,p0(n,a,i))}}),this.state=new v0,this.state.init(t),this.input=r,this.length=r.length,this.comments=[],this.isLookahead=!1}pushToken(t){this.tokens.length=this.state.tokensLength,this.tokens.push(t),++this.state.tokensLength}next(){this.checkKeywordEscapes(),this.optionFlags&256&&this.pushToken(new Kc(this.state)),this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()}eat(t){return this.match(t)?(this.next(),!0):!1}match(t){return this.state.type===t}createLookaheadState(t){return{pos:t.pos,value:null,type:t.type,start:t.start,end:t.end,context:[this.curContext()],inType:t.inType,startLoc:t.startLoc,lastTokEndLoc:t.lastTokEndLoc,curLine:t.curLine,lineStart:t.lineStart,curPosition:t.curPosition}}lookahead(){let t=this.state;this.state=this.createLookaheadState(t),this.isLookahead=!0,this.nextToken(),this.isLookahead=!1;let r=this.state;return this.state=t,r}nextTokenStart(){return this.nextTokenStartSince(this.state.pos)}nextTokenStartSince(t){return aL.lastIndex=t,aL.test(this.input)?aL.lastIndex:t}lookaheadCharCode(){return this.lookaheadCharCodeSince(this.state.pos)}lookaheadCharCodeSince(t){return this.input.charCodeAt(this.nextTokenStartSince(t))}nextTokenInLineStart(){return this.nextTokenInLineStartSince(this.state.pos)}nextTokenInLineStartSince(t){return iL.lastIndex=t,iL.test(this.input)?iL.lastIndex:t}lookaheadInLineCharCode(){return this.input.charCodeAt(this.nextTokenInLineStart())}codePointAtPos(t){let r=this.input.charCodeAt(t);if((r&64512)===55296&&++t<this.input.length){let n=this.input.charCodeAt(t);(n&64512)===56320&&(r=65536+((r&1023)<<10)+(n&1023))}return r}setStrict(t){this.state.strict=t,t&&(this.state.strictErrors.forEach(([r,n])=>this.raise(r,n)),this.state.strictErrors.clear())}curContext(){return this.state.context[this.state.context.length-1]}nextToken(){if(this.skipSpace(),this.state.start=this.state.pos,this.isLookahead||(this.state.startLoc=this.state.curPosition()),this.state.pos>=this.length){this.finishToken(140);return}this.getTokenFromCode(this.codePointAtPos(this.state.pos))}skipBlockComment(t){let r;this.isLookahead||(r=this.state.curPosition());let n=this.state.pos,a=this.input.indexOf(t,n+2);if(a===-1)throw this.raise(Y.UnterminatedComment,this.state.curPosition());for(this.state.pos=a+t.length,d1.lastIndex=n+2;d1.test(this.input)&&d1.lastIndex<=a;)++this.state.curLine,this.state.lineStart=d1.lastIndex;if(this.isLookahead)return;let i={type:"CommentBlock",value:this.input.slice(n+2,a),start:this.sourceToOffsetPos(n),end:this.sourceToOffsetPos(a+t.length),loc:new hy(r,this.state.curPosition())};return this.optionFlags&256&&this.pushToken(i),i}skipLineComment(t){let r=this.state.pos,n;this.isLookahead||(n=this.state.curPosition());let a=this.input.charCodeAt(this.state.pos+=t);if(this.state.pos<this.length)for(;!py(a)&&++this.state.pos<this.length;)a=this.input.charCodeAt(this.state.pos);if(this.isLookahead)return;let i=this.state.pos,o={type:"CommentLine",value:this.input.slice(r+t,i),start:this.sourceToOffsetPos(r),end:this.sourceToOffsetPos(i),loc:new hy(n,this.state.curPosition())};return this.optionFlags&256&&this.pushToken(o),o}skipSpace(){let t=this.state.pos,r=this.optionFlags&4096?[]:null;e:for(;this.state.pos<this.length;){let n=this.input.charCodeAt(this.state.pos);switch(n){case 32:case 160:case 9:++this.state.pos;break;case 13:this.input.charCodeAt(this.state.pos+1)===10&&++this.state.pos;case 10:case 8232:case 8233:++this.state.pos,++this.state.curLine,this.state.lineStart=this.state.pos;break;case 47:switch(this.input.charCodeAt(this.state.pos+1)){case 42:{let a=this.skipBlockComment("*/");a!==void 0&&(this.addComment(a),r?.push(a));break}case 47:{let a=this.skipLineComment(2);a!==void 0&&(this.addComment(a),r?.push(a));break}default:break e}break;default:if(Gge(n))++this.state.pos;else if(n===45&&!this.inModule&&this.optionFlags&8192){let a=this.state.pos;if(this.input.charCodeAt(a+1)===45&&this.input.charCodeAt(a+2)===62&&(t===0||this.state.lineStart>t)){let i=this.skipLineComment(3);i!==void 0&&(this.addComment(i),r?.push(i))}else break e}else if(n===60&&!this.inModule&&this.optionFlags&8192){let a=this.state.pos;if(this.input.charCodeAt(a+1)===33&&this.input.charCodeAt(a+2)===45&&this.input.charCodeAt(a+3)===45){let i=this.skipLineComment(4);i!==void 0&&(this.addComment(i),r?.push(i))}else break e}else break e}}if(r?.length>0){let n=this.state.pos,a={start:this.sourceToOffsetPos(t),end:this.sourceToOffsetPos(n),comments:r,leadingNode:null,trailingNode:null,containingNode:null};this.state.commentStack.push(a)}}finishToken(t,r){this.state.end=this.state.pos,this.state.endLoc=this.state.curPosition();let n=this.state.type;this.state.type=t,this.state.value=r,this.isLookahead||this.updateContext(n)}replaceToken(t){this.state.type=t,this.updateContext()}readToken_numberSign(){if(this.state.pos===0&&this.readToken_interpreter())return;let t=this.state.pos+1,r=this.codePointAtPos(t);if(r>=48&&r<=57)throw this.raise(Y.UnexpectedDigitAfterHash,this.state.curPosition());if(r===123||r===91&&this.hasPlugin("recordAndTuple")){if(this.expectPlugin("recordAndTuple"),this.getPluginOption("recordAndTuple","syntaxType")==="bar")throw this.raise(r===123?Y.RecordExpressionHashIncorrectStartSyntaxType:Y.TupleExpressionHashIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,r===123?this.finishToken(7):this.finishToken(1)}else Xc(r)?(++this.state.pos,this.finishToken(139,this.readWord1(r))):r===92?(++this.state.pos,this.finishToken(139,this.readWord1())):this.finishOp(27,1)}readToken_dot(){let t=this.input.charCodeAt(this.state.pos+1);if(t>=48&&t<=57){this.readNumber(!0);return}t===46&&this.input.charCodeAt(this.state.pos+2)===46?(this.state.pos+=3,this.finishToken(21)):(++this.state.pos,this.finishToken(16))}readToken_slash(){this.input.charCodeAt(this.state.pos+1)===61?this.finishOp(31,2):this.finishOp(56,1)}readToken_interpreter(){if(this.state.pos!==0||this.length<2)return!1;let t=this.input.charCodeAt(this.state.pos+1);if(t!==33)return!1;let r=this.state.pos;for(this.state.pos+=1;!py(t)&&++this.state.pos<this.length;)t=this.input.charCodeAt(this.state.pos);let n=this.input.slice(r+2,this.state.pos);return this.finishToken(28,n),!0}readToken_mult_modulo(t){let r=t===42?55:54,n=1,a=this.input.charCodeAt(this.state.pos+1);t===42&&a===42&&(n++,a=this.input.charCodeAt(this.state.pos+2),r=57),a===61&&!this.state.inType&&(n++,r=t===37?33:30),this.finishOp(r,n)}readToken_pipe_amp(t){let r=this.input.charCodeAt(this.state.pos+1);if(r===t){this.input.charCodeAt(this.state.pos+2)===61?this.finishOp(30,3):this.finishOp(t===124?41:42,2);return}if(t===124){if(r===62){this.finishOp(39,2);return}if(this.hasPlugin("recordAndTuple")&&r===125){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(Y.RecordExpressionBarIncorrectEndSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(9);return}if(this.hasPlugin("recordAndTuple")&&r===93){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(Y.TupleExpressionBarIncorrectEndSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(4);return}}if(r===61){this.finishOp(30,2);return}this.finishOp(t===124?43:45,1)}readToken_caret(){let t=this.input.charCodeAt(this.state.pos+1);t===61&&!this.state.inType?this.finishOp(32,2):t===94&&this.hasPlugin(["pipelineOperator",{proposal:"hack",topicToken:"^^"}])?(this.finishOp(37,2),this.input.codePointAt(this.state.pos)===94&&this.unexpected()):this.finishOp(44,1)}readToken_atSign(){this.input.charCodeAt(this.state.pos+1)===64&&this.hasPlugin(["pipelineOperator",{proposal:"hack",topicToken:"@@"}])?this.finishOp(38,2):this.finishOp(26,1)}readToken_plus_min(t){let r=this.input.charCodeAt(this.state.pos+1);if(r===t){this.finishOp(34,2);return}r===61?this.finishOp(30,2):this.finishOp(53,1)}readToken_lt(){let{pos:t}=this.state,r=this.input.charCodeAt(t+1);if(r===60){if(this.input.charCodeAt(t+2)===61){this.finishOp(30,3);return}this.finishOp(51,2);return}if(r===61){this.finishOp(49,2);return}this.finishOp(47,1)}readToken_gt(){let{pos:t}=this.state,r=this.input.charCodeAt(t+1);if(r===62){let n=this.input.charCodeAt(t+2)===62?3:2;if(this.input.charCodeAt(t+n)===61){this.finishOp(30,n+1);return}this.finishOp(52,n);return}if(r===61){this.finishOp(49,2);return}this.finishOp(48,1)}readToken_eq_excl(t){let r=this.input.charCodeAt(this.state.pos+1);if(r===61){this.finishOp(46,this.input.charCodeAt(this.state.pos+2)===61?3:2);return}if(t===61&&r===62){this.state.pos+=2,this.finishToken(19);return}this.finishOp(t===61?29:35,1)}readToken_question(){let t=this.input.charCodeAt(this.state.pos+1),r=this.input.charCodeAt(this.state.pos+2);t===63?r===61?this.finishOp(30,3):this.finishOp(40,2):t===46&&!(r>=48&&r<=57)?(this.state.pos+=2,this.finishToken(18)):(++this.state.pos,this.finishToken(17))}getTokenFromCode(t){switch(t){case 46:this.readToken_dot();return;case 40:++this.state.pos,this.finishToken(10);return;case 41:++this.state.pos,this.finishToken(11);return;case 59:++this.state.pos,this.finishToken(13);return;case 44:++this.state.pos,this.finishToken(12);return;case 91:if(this.hasPlugin("recordAndTuple")&&this.input.charCodeAt(this.state.pos+1)===124){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(Y.TupleExpressionBarIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(2)}else++this.state.pos,this.finishToken(0);return;case 93:++this.state.pos,this.finishToken(3);return;case 123:if(this.hasPlugin("recordAndTuple")&&this.input.charCodeAt(this.state.pos+1)===124){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(Y.RecordExpressionBarIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(6)}else++this.state.pos,this.finishToken(5);return;case 125:++this.state.pos,this.finishToken(8);return;case 58:this.hasPlugin("functionBind")&&this.input.charCodeAt(this.state.pos+1)===58?this.finishOp(15,2):(++this.state.pos,this.finishToken(14));return;case 63:this.readToken_question();return;case 96:this.readTemplateToken();return;case 48:{let r=this.input.charCodeAt(this.state.pos+1);if(r===120||r===88){this.readRadixNumber(16);return}if(r===111||r===79){this.readRadixNumber(8);return}if(r===98||r===66){this.readRadixNumber(2);return}}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:this.readNumber(!1);return;case 34:case 39:this.readString(t);return;case 47:this.readToken_slash();return;case 37:case 42:this.readToken_mult_modulo(t);return;case 124:case 38:this.readToken_pipe_amp(t);return;case 94:this.readToken_caret();return;case 43:case 45:this.readToken_plus_min(t);return;case 60:this.readToken_lt();return;case 62:this.readToken_gt();return;case 61:case 33:this.readToken_eq_excl(t);return;case 126:this.finishOp(36,1);return;case 64:this.readToken_atSign();return;case 35:this.readToken_numberSign();return;case 92:this.readWord();return;default:if(Xc(t)){this.readWord(t);return}}throw this.raise(Y.InvalidOrUnexpectedToken,this.state.curPosition(),{unexpected:String.fromCodePoint(t)})}finishOp(t,r){let n=this.input.slice(this.state.pos,this.state.pos+r);this.state.pos+=r,this.finishToken(t,n)}readRegexp(){let t=this.state.startLoc,r=this.state.start+1,n,a,{pos:i}=this.state;for(;;++i){if(i>=this.length)throw this.raise(Y.UnterminatedRegExp,Cs(t,1));let c=this.input.charCodeAt(i);if(py(c))throw this.raise(Y.UnterminatedRegExp,Cs(t,1));if(n)n=!1;else{if(c===91)a=!0;else if(c===93&&a)a=!1;else if(c===47&&!a)break;n=c===92}}let s=this.input.slice(r,i);++i;let o="",l=()=>Cs(t,i+2-r);for(;i<this.length;){let c=this.codePointAtPos(i),u=String.fromCharCode(c);if(Zge.has(c))c===118?o.includes("u")&&this.raise(Y.IncompatibleRegExpUVFlags,l()):c===117&&o.includes("v")&&this.raise(Y.IncompatibleRegExpUVFlags,l()),o.includes(u)&&this.raise(Y.DuplicateRegExpFlags,l());else if(Bm(c)||c===92)this.raise(Y.MalformedRegExpFlags,l());else break;++i,o+=u}this.state.pos=i,this.finishToken(138,{pattern:s,flags:o})}readInt(t,r,n=!1,a=!0){let{n:i,pos:s}=hV(this.input,this.state.pos,this.state.lineStart,this.state.curLine,t,r,n,a,this.errorHandlers_readInt,!1);return this.state.pos=s,i}readRadixNumber(t){let r=this.state.pos,n=this.state.curPosition(),a=!1;this.state.pos+=2;let i=this.readInt(t);i==null&&this.raise(Y.InvalidDigit,Cs(n,2),{radix:t});let s=this.input.charCodeAt(this.state.pos);if(s===110)++this.state.pos,a=!0;else if(s===109)throw this.raise(Y.InvalidDecimal,n);if(Xc(this.codePointAtPos(this.state.pos)))throw this.raise(Y.NumberIdentifier,this.state.curPosition());if(a){let o=this.input.slice(r,this.state.pos).replace(/[_n]/g,"");this.finishToken(136,o);return}this.finishToken(135,i)}readNumber(t){let r=this.state.pos,n=this.state.curPosition(),a=!1,i=!1,s=!1,o=!1;!t&&this.readInt(10)===null&&this.raise(Y.InvalidNumber,this.state.curPosition());let l=this.state.pos-r>=2&&this.input.charCodeAt(r)===48;if(l){let p=this.input.slice(r,this.state.pos);if(this.recordStrictModeErrors(Y.StrictOctalLiteral,n),!this.state.strict){let m=p.indexOf("_");m>0&&this.raise(Y.ZeroDigitNumericSeparator,Cs(n,m))}o=l&&!/[89]/.test(p)}let c=this.input.charCodeAt(this.state.pos);if(c===46&&!o&&(++this.state.pos,this.readInt(10),a=!0,c=this.input.charCodeAt(this.state.pos)),(c===69||c===101)&&!o&&(c=this.input.charCodeAt(++this.state.pos),(c===43||c===45)&&++this.state.pos,this.readInt(10)===null&&this.raise(Y.InvalidOrMissingExponent,n),a=!0,s=!0,c=this.input.charCodeAt(this.state.pos)),c===110&&((a||l)&&this.raise(Y.InvalidBigIntLiteral,n),++this.state.pos,i=!0),c===109){this.expectPlugin("decimal",this.state.curPosition()),(s||l)&&this.raise(Y.InvalidDecimal,n),++this.state.pos;var u=!0}if(Xc(this.codePointAtPos(this.state.pos)))throw this.raise(Y.NumberIdentifier,this.state.curPosition());let d=this.input.slice(r,this.state.pos).replace(/[_mn]/g,"");if(i){this.finishToken(136,d);return}if(u){this.finishToken(137,d);return}let f=o?parseInt(d,8):parseFloat(d);this.finishToken(135,f)}readCodePoint(t){let{code:r,pos:n}=gV(this.input,this.state.pos,this.state.lineStart,this.state.curLine,t,this.errorHandlers_readCodePoint);return this.state.pos=n,r}readString(t){let{str:r,pos:n,curLine:a,lineStart:i}=eV(t===34?"double":"single",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_string);this.state.pos=n+1,this.state.lineStart=i,this.state.curLine=a,this.finishToken(134,r)}readTemplateContinuation(){this.match(8)||this.unexpected(null,8),this.state.pos--,this.readTemplateToken()}readTemplateToken(){let t=this.input[this.state.pos],{str:r,firstInvalidLoc:n,pos:a,curLine:i,lineStart:s}=eV("template",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_template);this.state.pos=a+1,this.state.lineStart=s,this.state.curLine=i,n&&(this.state.firstInvalidTemplateEscapePos=new Yc(n.curLine,n.pos-n.lineStart,this.sourceToOffsetPos(n.pos))),this.input.codePointAt(a)===96?this.finishToken(24,n?null:t+r+"`"):(this.state.pos++,this.finishToken(25,n?null:t+r+"${"))}recordStrictModeErrors(t,r){let n=r.index;this.state.strict&&!this.state.strictErrors.has(n)?this.raise(t,r):this.state.strictErrors.set(n,[t,r])}readWord1(t){this.state.containsEsc=!1;let r="",n=this.state.pos,a=this.state.pos;for(t!==void 0&&(this.state.pos+=t<=65535?1:2);this.state.pos<this.length;){let i=this.codePointAtPos(this.state.pos);if(Bm(i))this.state.pos+=i<=65535?1:2;else if(i===92){this.state.containsEsc=!0,r+=this.input.slice(a,this.state.pos);let s=this.state.curPosition(),o=this.state.pos===n?Xc:Bm;if(this.input.charCodeAt(++this.state.pos)!==117){this.raise(Y.MissingUnicodeEscape,this.state.curPosition()),a=this.state.pos-1;continue}++this.state.pos;let l=this.readCodePoint(!0);l!==null&&(o(l)||this.raise(Y.EscapedCharNotAnIdentifier,s),r+=String.fromCodePoint(l)),a=this.state.pos}else break}return r+this.input.slice(a,this.state.pos)}readWord(t){let r=this.readWord1(t),n=NL.get(r);n!==void 0?this.finishToken(n,kf(n)):this.finishToken(132,r)}checkKeywordEscapes(){let{type:t}=this.state;ML(t)&&this.state.containsEsc&&this.raise(Y.InvalidEscapedReservedWord,this.state.startLoc,{reservedWord:kf(t)})}raise(t,r,n={}){let a=r instanceof Yc?r:r.loc.start,i=t(a,n);if(!(this.optionFlags&2048))throw i;return this.isLookahead||this.state.errors.push(i),i}raiseOverwrite(t,r,n={}){let a=r instanceof Yc?r:r.loc.start,i=a.index,s=this.state.errors;for(let o=s.length-1;o>=0;o--){let l=s[o];if(l.loc.index===i)return s[o]=t(a,n);if(l.loc.index<i)break}return this.raise(t,r,n)}updateContext(t){}unexpected(t,r){throw this.raise(Y.UnexpectedToken,t??this.state.startLoc,{expected:r?kf(r):null})}expectPlugin(t,r){if(this.hasPlugin(t))return!0;throw this.raise(Y.MissingPlugin,r??this.state.startLoc,{missingPlugin:[t]})}expectOnePlugin(t){if(!t.some(r=>this.hasPlugin(r)))throw this.raise(Y.MissingOneOfPlugins,this.state.startLoc,{missingPlugin:t})}errorBuilder(t){return(r,n,a)=>{this.raise(t,p0(r,n,a))}}},bL=class{constructor(){this.privateNames=new Set,this.loneAccessors=new Map,this.undefinedPrivateNames=new Map}},vL=class{constructor(t){this.parser=void 0,this.stack=[],this.undefinedPrivateNames=new Map,this.parser=t}current(){return this.stack[this.stack.length-1]}enter(){this.stack.push(new bL)}exit(){let t=this.stack.pop(),r=this.current();for(let[n,a]of Array.from(t.undefinedPrivateNames))r?r.undefinedPrivateNames.has(n)||r.undefinedPrivateNames.set(n,a):this.parser.raise(Y.InvalidPrivateFieldResolution,a,{identifierName:n})}declarePrivateName(t,r,n){let{privateNames:a,loneAccessors:i,undefinedPrivateNames:s}=this.current(),o=a.has(t);if(r&3){let l=o&&i.get(t);if(l){let c=l&4,u=r&4,d=l&3,f=r&3;o=d===f||c!==u,o||i.delete(t)}else o||i.set(t,r)}o&&this.parser.raise(Y.PrivateNameRedeclaration,n,{identifierName:t}),a.add(t),s.delete(t)}usePrivateName(t,r){let n;for(n of this.stack)if(n.privateNames.has(t))return;n?n.undefinedPrivateNames.set(t,r):this.parser.raise(Y.InvalidPrivateFieldResolution,r,{identifierName:t})}},gy=class{constructor(t=0){this.type=t}canBeArrowParameterDeclaration(){return this.type===2||this.type===1}isCertainlyParameterDeclaration(){return this.type===3}},x1=class extends gy{constructor(t){super(t),this.declarationErrors=new Map}recordDeclarationError(t,r){let n=r.index;this.declarationErrors.set(n,[t,r])}clearDeclarationError(t){this.declarationErrors.delete(t)}iterateErrors(t){this.declarationErrors.forEach(t)}},SL=class{constructor(t){this.parser=void 0,this.stack=[new gy],this.parser=t}enter(t){this.stack.push(t)}exit(){this.stack.pop()}recordParameterInitializerError(t,r){let n=r.loc.start,{stack:a}=this,i=a.length-1,s=a[i];for(;!s.isCertainlyParameterDeclaration();){if(s.canBeArrowParameterDeclaration())s.recordDeclarationError(t,n);else return;s=a[--i]}this.parser.raise(t,n)}recordArrowParameterBindingError(t,r){let{stack:n}=this,a=n[n.length-1],i=r.loc.start;if(a.isCertainlyParameterDeclaration())this.parser.raise(t,i);else if(a.canBeArrowParameterDeclaration())a.recordDeclarationError(t,i);else return}recordAsyncArrowParametersError(t){let{stack:r}=this,n=r.length-1,a=r[n];for(;a.canBeArrowParameterDeclaration();)a.type===2&&a.recordDeclarationError(Y.AwaitBindingIdentifier,t),a=r[--n]}validateAsPattern(){let{stack:t}=this,r=t[t.length-1];r.canBeArrowParameterDeclaration()&&r.iterateErrors(([n,a])=>{this.parser.raise(n,a);let i=t.length-2,s=t[i];for(;s.canBeArrowParameterDeclaration();)s.clearDeclarationError(a.index),s=t[--i]})}};function Qge(){return new gy(3)}function eye(){return new x1(1)}function tye(){return new x1(2)}function yV(){return new gy}var TL=class extends xL{addExtra(t,r,n,a=!0){if(!t)return;let{extra:i}=t;i==null&&(i={},t.extra=i),a?i[r]=n:Object.defineProperty(i,r,{enumerable:a,value:n})}isContextual(t){return this.state.type===t&&!this.state.containsEsc}isUnparsedContextual(t,r){if(this.input.startsWith(r,t)){let n=this.input.charCodeAt(t+r.length);return!(Bm(n)||(n&64512)===55296)}return!1}isLookaheadContextual(t){let r=this.nextTokenStart();return this.isUnparsedContextual(r,t)}eatContextual(t){return this.isContextual(t)?(this.next(),!0):!1}expectContextual(t,r){if(!this.eatContextual(t)){if(r!=null)throw this.raise(r,this.state.startLoc);this.unexpected(null,t)}}canInsertSemicolon(){return this.match(140)||this.match(8)||this.hasPrecedingLineBreak()}hasPrecedingLineBreak(){return Z8(this.input,this.offsetToSourcePos(this.state.lastTokEndLoc.index),this.state.start)}hasFollowingLineBreak(){return Z8(this.input,this.state.end,this.nextTokenStart())}isLineTerminator(){return this.eat(13)||this.canInsertSemicolon()}semicolon(t=!0){(t?this.isLineTerminator():this.eat(13))||this.raise(Y.MissingSemicolon,this.state.lastTokEndLoc)}expect(t,r){this.eat(t)||this.unexpected(r,t)}tryParse(t,r=this.state.clone()){let n={node:null};try{let a=t((i=null)=>{throw n.node=i,n});if(this.state.errors.length>r.errors.length){let i=this.state;return this.state=r,this.state.tokensLength=i.tokensLength,{node:a,error:i.errors[r.errors.length],thrown:!1,aborted:!1,failState:i}}return{node:a,error:null,thrown:!1,aborted:!1,failState:null}}catch(a){let i=this.state;if(this.state=r,a instanceof SyntaxError)return{node:null,error:a,thrown:!0,aborted:!1,failState:i};if(a===n)return{node:n.node,error:null,thrown:!1,aborted:!0,failState:i};throw a}}checkExpressionErrors(t,r){if(!t)return!1;let{shorthandAssignLoc:n,doubleProtoLoc:a,privateKeyLoc:i,optionalParametersLoc:s,voidPatternLoc:o}=t,l=!!n||!!a||!!s||!!i||!!o;if(!r)return l;n!=null&&this.raise(Y.InvalidCoverInitializedName,n),a!=null&&this.raise(Y.DuplicateProto,a),i!=null&&this.raise(Y.UnexpectedPrivateField,i),s!=null&&this.unexpected(s),o!=null&&this.raise(Y.InvalidCoverDiscardElement,o)}isLiteralPropertyName(){return oV(this.state.type)}isPrivateName(t){return t.type==="PrivateName"}getPrivateNameSV(t){return t.id.name}hasPropertyAsPrivateName(t){return(t.type==="MemberExpression"||t.type==="OptionalMemberExpression")&&this.isPrivateName(t.property)}isObjectProperty(t){return t.type==="ObjectProperty"}isObjectMethod(t){return t.type==="ObjectMethod"}initializeScopes(t=this.options.sourceType==="module"){let r=this.state.labels;this.state.labels=[];let n=this.exportedIdentifiers;this.exportedIdentifiers=new Set;let a=this.inModule;this.inModule=t;let i=this.scope,s=this.getScopeHandler();this.scope=new s(this,t);let o=this.prodParam;this.prodParam=new mL;let l=this.classScope;this.classScope=new vL(this);let c=this.expressionScope;return this.expressionScope=new SL(this),()=>{this.state.labels=r,this.exportedIdentifiers=n,this.inModule=a,this.scope=i,this.prodParam=o,this.classScope=l,this.expressionScope=c}}enterInitialScopes(){let t=0;(this.inModule||this.optionFlags&1)&&(t|=2),this.optionFlags&32&&(t|=1);let r=!this.inModule&&this.options.sourceType==="commonjs";(r||this.optionFlags&2)&&(t|=4),this.prodParam.enter(t);let n=r?514:1;this.optionFlags&4&&(n|=512),this.scope.enter(n)}checkDestructuringPrivate(t){let{privateKeyLoc:r}=t;r!==null&&this.expectPlugin("destructuringPrivate",r)}},my=class{constructor(){this.shorthandAssignLoc=null,this.doubleProtoLoc=null,this.privateKeyLoc=null,this.optionalParametersLoc=null,this.voidPatternLoc=null}},yy=class{constructor(t,r,n){this.type="",this.start=r,this.end=0,this.loc=new hy(n),t?.optionFlags&128&&(this.range=[r,0]),t!=null&&t.filename&&(this.loc.filename=t.filename)}},wL=yy.prototype;wL.__clone=function(){let e=new yy(void 0,this.start,this.loc.start),t=Object.keys(this);for(let r=0,n=t.length;r<n;r++){let a=t[r];a!=="leadingComments"&&a!=="trailingComments"&&a!=="innerComments"&&(e[a]=this[a])}return e};var CL=class extends TL{startNode(){let t=this.state.startLoc;return new yy(this,t.index,t)}startNodeAt(t){return new yy(this,t.index,t)}startNodeAtNode(t){return this.startNodeAt(t.loc.start)}finishNode(t,r){return this.finishNodeAt(t,r,this.state.lastTokEndLoc)}finishNodeAt(t,r,n){return t.type=r,t.end=n.index,t.loc.end=n,this.optionFlags&128&&(t.range[1]=n.index),this.optionFlags&4096&&this.processComment(t),t}resetStartLocation(t,r){t.start=r.index,t.loc.start=r,this.optionFlags&128&&(t.range[0]=r.index)}resetEndLocation(t,r=this.state.lastTokEndLoc){t.end=r.index,t.loc.end=r,this.optionFlags&128&&(t.range[1]=r.index)}resetStartLocationFromNode(t,r){this.resetStartLocation(t,r.loc.start)}castNodeTo(t,r){return t.type=r,t}cloneIdentifier(t){let{type:r,start:n,end:a,loc:i,range:s,name:o}=t,l=Object.create(wL);return l.type=r,l.start=n,l.end=a,l.loc=i,l.range=s,l.name=o,t.extra&&(l.extra=t.extra),l}cloneStringLiteral(t){let{type:r,start:n,end:a,loc:i,range:s,extra:o}=t,l=Object.create(wL);return l.type=r,l.start=n,l.end=a,l.loc=i,l.range=s,l.extra=o,l.value=t.value,l}},PL=e=>e.type==="ParenthesizedExpression"?PL(e.expression):e,EL=class extends CL{toAssignable(t,r=!1){var n,a;let i;switch((t.type==="ParenthesizedExpression"||(n=t.extra)!=null&&n.parenthesized)&&(i=PL(t),r?i.type==="Identifier"?this.expressionScope.recordArrowParameterBindingError(Y.InvalidParenthesizedAssignment,t):i.type!=="CallExpression"&&i.type!=="MemberExpression"&&!this.isOptionalMemberExpression(i)&&this.raise(Y.InvalidParenthesizedAssignment,t):this.raise(Y.InvalidParenthesizedAssignment,t)),t.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":case"VoidPattern":break;case"ObjectExpression":this.castNodeTo(t,"ObjectPattern");for(let o=0,l=t.properties.length,c=l-1;o<l;o++){var s;let u=t.properties[o],d=o===c;this.toAssignableObjectExpressionProp(u,d,r),d&&u.type==="RestElement"&&(s=t.extra)!=null&&s.trailingCommaLoc&&this.raise(Y.RestTrailingComma,t.extra.trailingCommaLoc)}break;case"ObjectProperty":{let{key:o,value:l}=t;this.isPrivateName(o)&&this.classScope.usePrivateName(this.getPrivateNameSV(o),o.loc.start),this.toAssignable(l,r);break}case"SpreadElement":throw new Error("Internal @babel/parser error (this is a bug, please report it). SpreadElement should be converted by .toAssignable's caller.");case"ArrayExpression":this.castNodeTo(t,"ArrayPattern"),this.toAssignableList(t.elements,(a=t.extra)==null?void 0:a.trailingCommaLoc,r);break;case"AssignmentExpression":t.operator!=="="&&this.raise(Y.MissingEqInAssignment,t.left.loc.end),this.castNodeTo(t,"AssignmentPattern"),delete t.operator,t.left.type==="VoidPattern"&&this.raise(Y.VoidPatternInitializer,t.left),this.toAssignable(t.left,r);break;case"ParenthesizedExpression":this.toAssignable(i,r);break}}toAssignableObjectExpressionProp(t,r,n){if(t.type==="ObjectMethod")this.raise(t.kind==="get"||t.kind==="set"?Y.PatternHasAccessor:Y.PatternHasMethod,t.key);else if(t.type==="SpreadElement"){this.castNodeTo(t,"RestElement");let a=t.argument;this.checkToRestConversion(a,!1),this.toAssignable(a,n),r||this.raise(Y.RestTrailingComma,t)}else this.toAssignable(t,n)}toAssignableList(t,r,n){let a=t.length-1;for(let i=0;i<=a;i++){let s=t[i];s&&(this.toAssignableListItem(t,i,n),s.type==="RestElement"&&(i<a?this.raise(Y.RestTrailingComma,s):r&&this.raise(Y.RestTrailingComma,r)))}}toAssignableListItem(t,r,n){let a=t[r];if(a.type==="SpreadElement"){this.castNodeTo(a,"RestElement");let i=a.argument;this.checkToRestConversion(i,!0),this.toAssignable(i,n)}else this.toAssignable(a,n)}isAssignable(t,r){switch(t.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":case"VoidPattern":return!0;case"ObjectExpression":{let n=t.properties.length-1;return t.properties.every((a,i)=>a.type!=="ObjectMethod"&&(i===n||a.type!=="SpreadElement")&&this.isAssignable(a))}case"ObjectProperty":return this.isAssignable(t.value);case"SpreadElement":return this.isAssignable(t.argument);case"ArrayExpression":return t.elements.every(n=>n===null||this.isAssignable(n));case"AssignmentExpression":return t.operator==="=";case"ParenthesizedExpression":return this.isAssignable(t.expression);case"MemberExpression":case"OptionalMemberExpression":return!r;default:return!1}}toReferencedList(t,r){return t}toReferencedListDeep(t,r){this.toReferencedList(t,r);for(let n of t)n?.type==="ArrayExpression"&&this.toReferencedListDeep(n.elements)}parseSpread(t){let r=this.startNode();return this.next(),r.argument=this.parseMaybeAssignAllowIn(t,void 0),this.finishNode(r,"SpreadElement")}parseRestBinding(){let t=this.startNode();this.next();let r=this.parseBindingAtom();return r.type==="VoidPattern"&&this.raise(Y.UnexpectedVoidPattern,r),t.argument=r,this.finishNode(t,"RestElement")}parseBindingAtom(){switch(this.state.type){case 0:{let t=this.startNode();return this.next(),t.elements=this.parseBindingList(3,93,1),this.finishNode(t,"ArrayPattern")}case 5:return this.parseObjectLike(8,!0);case 88:return this.parseVoidPattern(null)}return this.parseIdentifier()}parseBindingList(t,r,n){let a=n&1,i=[],s=!0;for(;!this.eat(t);)if(s?s=!1:this.expect(12),a&&this.match(12))i.push(null);else{if(this.eat(t))break;if(this.match(21)){let o=this.parseRestBinding();if((this.hasPlugin("flow")||n&2)&&(o=this.parseFunctionParamType(o)),i.push(o),!this.checkCommaAfterRest(r)){this.expect(t);break}}else{let o=[];if(n&2)for(this.match(26)&&this.hasPlugin("decorators")&&this.raise(Y.UnsupportedParameterDecorator,this.state.startLoc);this.match(26);)o.push(this.parseDecorator());i.push(this.parseBindingElement(n,o))}}return i}parseBindingRestProperty(t){return this.next(),this.hasPlugin("discardBinding")&&this.match(88)?(t.argument=this.parseVoidPattern(null),this.raise(Y.UnexpectedVoidPattern,t.argument)):t.argument=this.parseIdentifier(),this.checkCommaAfterRest(125),this.finishNode(t,"RestElement")}parseBindingProperty(){let{type:t,startLoc:r}=this.state;if(t===21)return this.parseBindingRestProperty(this.startNode());let n=this.startNode();return t===139?(this.expectPlugin("destructuringPrivate",r),this.classScope.usePrivateName(this.state.value,r),n.key=this.parsePrivateName()):this.parsePropertyName(n),n.method=!1,this.parseObjPropValue(n,r,!1,!1,!0,!1)}parseBindingElement(t,r){let n=this.parseMaybeDefault();return(this.hasPlugin("flow")||t&2)&&this.parseFunctionParamType(n),r.length&&(n.decorators=r,this.resetStartLocationFromNode(n,r[0])),this.parseMaybeDefault(n.loc.start,n)}parseFunctionParamType(t){return t}parseMaybeDefault(t,r){if(t??(t=this.state.startLoc),r=r??this.parseBindingAtom(),!this.eat(29))return r;let n=this.startNodeAt(t);return r.type==="VoidPattern"&&this.raise(Y.VoidPatternInitializer,r),n.left=r,n.right=this.parseMaybeAssignAllowIn(),this.finishNode(n,"AssignmentPattern")}isValidLVal(t,r,n,a){switch(t){case"AssignmentPattern":return"left";case"RestElement":return"argument";case"ObjectProperty":return"value";case"ParenthesizedExpression":return"expression";case"ArrayPattern":return"elements";case"ObjectPattern":return"properties";case"VoidPattern":return!0;case"CallExpression":if(!r&&!this.state.strict&&this.optionFlags&8192)return!0}return!1}isOptionalMemberExpression(t){return t.type==="OptionalMemberExpression"}checkLVal(t,r,n=64,a=!1,i=!1,s=!1,o=!1){var l;let c=t.type;if(this.isObjectMethod(t))return;let u=this.isOptionalMemberExpression(t);if(u||c==="MemberExpression"){u&&(this.expectPlugin("optionalChainingAssign",t.loc.start),r.type!=="AssignmentExpression"&&this.raise(Y.InvalidLhsOptionalChaining,t,{ancestor:r})),n!==64&&this.raise(Y.InvalidPropertyBindingPattern,t);return}if(c==="Identifier"){this.checkIdentifier(t,n,i);let{name:g}=t;a&&(a.has(g)?this.raise(Y.ParamDupe,t):a.add(g));return}else c==="VoidPattern"&&r.type==="CatchClause"&&this.raise(Y.VoidPatternCatchClauseParam,t);let d=PL(t);o||(o=d.type==="CallExpression"&&(d.callee.type==="Import"||d.callee.type==="Super"));let f=this.isValidLVal(c,o,!(s||(l=t.extra)!=null&&l.parenthesized)&&r.type==="AssignmentExpression",n);if(f===!0)return;if(f===!1){let g=n===64?Y.InvalidLhs:Y.InvalidLhsBinding;this.raise(g,t,{ancestor:r});return}let p,m;typeof f=="string"?(p=f,m=c==="ParenthesizedExpression"):[p,m]=f;let h=c==="ArrayPattern"||c==="ObjectPattern"?{type:c}:r,x=t[p];if(Array.isArray(x))for(let g of x)g&&this.checkLVal(g,h,n,a,i,m,!0);else x&&this.checkLVal(x,h,n,a,i,m,o)}checkIdentifier(t,r,n=!1){this.state.strict&&(n?pV(t.name,this.inModule):fV(t.name))&&(r===64?this.raise(Y.StrictEvalArguments,t,{referenceName:t.name}):this.raise(Y.StrictEvalArgumentsBinding,t,{bindingName:t.name})),r&8192&&t.name==="let"&&this.raise(Y.LetInLexicalBinding,t),r&64||this.declareNameFromIdentifier(t,r)}declareNameFromIdentifier(t,r){this.scope.declareName(t.name,r,t.loc.start)}checkToRestConversion(t,r){switch(t.type){case"ParenthesizedExpression":this.checkToRestConversion(t.expression,r);break;case"Identifier":case"MemberExpression":break;case"ArrayExpression":case"ObjectExpression":if(r)break;default:this.raise(Y.InvalidRestAssignmentPattern,t)}}checkCommaAfterRest(t){return this.match(12)?(this.raise(this.lookaheadCharCode()===t?Y.RestTrailingComma:Y.ElementAfterRest,this.state.startLoc),!0):!1}},sL=/in(?:stanceof)?|as|satisfies/y;function rye(e){if(e==null)throw new Error(`Unexpected ${e} value.`);return e}function tV(e){if(!e)throw new Error("Assert fail")}var Tt=Wc`typescript`({AbstractMethodHasImplementation:({methodName:e})=>`Method '${e}' cannot have an implementation because it is marked abstract.`,AbstractPropertyHasInitializer:({propertyName:e})=>`Property '${e}' cannot have an initializer because it is marked abstract.`,AccessorCannotBeOptional:"An 'accessor' property cannot be declared optional.",AccessorCannotDeclareThisParameter:"'get' and 'set' accessors cannot declare 'this' parameters.",AccessorCannotHaveTypeParameters:"An accessor cannot have type parameters.",ClassMethodHasDeclare:"Class methods cannot have the 'declare' modifier.",ClassMethodHasReadonly:"Class methods cannot have the 'readonly' modifier.",ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference:"A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.",ConstructorHasTypeParameters:"Type parameters cannot appear on a constructor declaration.",DeclareAccessor:({kind:e})=>`'declare' is not allowed in ${e}ters.`,DeclareClassFieldHasInitializer:"Initializers are not allowed in ambient contexts.",DeclareFunctionHasImplementation:"An implementation cannot be declared in ambient contexts.",DuplicateAccessibilityModifier:({modifier:e})=>`Accessibility modifier already seen: '${e}'.`,DuplicateModifier:({modifier:e})=>`Duplicate modifier: '${e}'.`,EmptyHeritageClauseType:({token:e})=>`'${e}' list cannot be empty.`,EmptyTypeArguments:"Type argument list cannot be empty.",EmptyTypeParameters:"Type parameter list cannot be empty.",ExpectedAmbientAfterExportDeclare:"'export declare' must be followed by an ambient declaration.",ImportAliasHasImportType:"An import alias can not use 'import type'.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` modifier",IncompatibleModifiers:({modifiers:e})=>`'${e[0]}' modifier cannot be used with '${e[1]}' modifier.`,IndexSignatureHasAbstract:"Index signatures cannot have the 'abstract' modifier.",IndexSignatureHasAccessibility:({modifier:e})=>`Index signatures cannot have an accessibility modifier ('${e}').`,IndexSignatureHasDeclare:"Index signatures cannot have the 'declare' modifier.",IndexSignatureHasOverride:"'override' modifier cannot appear on an index signature.",IndexSignatureHasStatic:"Index signatures cannot have the 'static' modifier.",InitializerNotAllowedInAmbientContext:"Initializers are not allowed in ambient contexts.",InvalidHeritageClauseType:({token:e})=>`'${e}' list can only include identifiers or qualified-names with optional type arguments.`,InvalidModifierOnAwaitUsingDeclaration:e=>`'${e}' modifier cannot appear on an await using declaration.`,InvalidModifierOnTypeMember:({modifier:e})=>`'${e}' modifier cannot appear on a type member.`,InvalidModifierOnTypeParameter:({modifier:e})=>`'${e}' modifier cannot appear on a type parameter.`,InvalidModifierOnTypeParameterPositions:({modifier:e})=>`'${e}' modifier can only appear on a type parameter of a class, interface or type alias.`,InvalidModifierOnUsingDeclaration:e=>`'${e}' modifier cannot appear on a using declaration.`,InvalidModifiersOrder:({orderedModifiers:e})=>`'${e[0]}' modifier must precede '${e[1]}' modifier.`,InvalidPropertyAccessAfterInstantiationExpression:"Invalid property access after an instantiation expression. You can either wrap the instantiation expression in parentheses, or delete the type arguments.",InvalidTupleMemberLabel:"Tuple members must be labeled with a simple identifier.",MissingInterfaceName:"'interface' declarations must be followed by an identifier.",NonAbstractClassHasAbstractMethod:"Abstract methods can only appear within an abstract class.",NonClassMethodPropertyHasAbstractModifier:"'abstract' modifier can only appear on a class, method, or property declaration.",OptionalTypeBeforeRequired:"A required element cannot follow an optional element.",OverrideNotInSubClass:"This member cannot have an 'override' modifier because its containing class does not extend another class.",PatternIsOptional:"A binding pattern parameter cannot be optional in an implementation signature.",PrivateElementHasAbstract:"Private elements cannot have the 'abstract' modifier.",PrivateElementHasAccessibility:({modifier:e})=>`Private elements cannot have an accessibility modifier ('${e}').`,ReadonlyForMethodSignature:"'readonly' modifier can only appear on a property declaration or index signature.",ReservedArrowTypeParam:"This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma, as in `<T,>() => ...`.",ReservedTypeAssertion:"This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead.",SetAccessorCannotHaveOptionalParameter:"A 'set' accessor cannot have an optional parameter.",SetAccessorCannotHaveRestParameter:"A 'set' accessor cannot have rest parameter.",SetAccessorCannotHaveReturnType:"A 'set' accessor cannot have a return type annotation.",SingleTypeParameterWithoutTrailingComma:({typeParameterName:e})=>`Single type parameter ${e} should have a trailing comma. Example usage: <${e},>.`,StaticBlockCannotHaveModifier:"Static class blocks cannot have any modifier.",TupleOptionalAfterType:"A labeled tuple optional element must be declared using a question mark after the name and before the colon (`name?: type`), rather than after the type (`name: type?`).",TypeAnnotationAfterAssign:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeImportCannotSpecifyDefaultAndNamed:"A type-only import can specify a default import or named bindings, but not both.",TypeModifierIsUsedInTypeExports:"The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement.",TypeModifierIsUsedInTypeImports:"The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement.",UnexpectedParameterModifier:"A parameter property is only allowed in a constructor implementation.",UnexpectedReadonly:"'readonly' type modifier is only permitted on array and tuple literal types.",UnexpectedTypeAnnotation:"Did not expect a type annotation here.",UnexpectedTypeCastInParameter:"Unexpected type cast in parameter position.",UnsupportedImportTypeArgument:"Argument in a type import must be a string literal.",UnsupportedParameterPropertyKind:"A parameter property may not be declared using a binding pattern.",UnsupportedSignatureParameterKind:({type:e})=>`Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${e}.`,UsingDeclarationInAmbientContext:e=>`'${e}' declarations are not allowed in ambient contexts.`});function nye(e){switch(e){case"any":return"TSAnyKeyword";case"boolean":return"TSBooleanKeyword";case"bigint":return"TSBigIntKeyword";case"never":return"TSNeverKeyword";case"number":return"TSNumberKeyword";case"object":return"TSObjectKeyword";case"string":return"TSStringKeyword";case"symbol":return"TSSymbolKeyword";case"undefined":return"TSUndefinedKeyword";case"unknown":return"TSUnknownKeyword";default:return}}function rV(e){return e==="private"||e==="public"||e==="protected"}function aye(e){return e==="in"||e==="out"}var iye=e=>class extends e{constructor(...r){super(...r),this.tsParseInOutModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out"],disallowedModifiers:["const","public","private","protected","readonly","declare","abstract","override"],errorTemplate:Tt.InvalidModifierOnTypeParameter}),this.tsParseConstModifier=this.tsParseModifiers.bind(this,{allowedModifiers:["const"],disallowedModifiers:["in","out"],errorTemplate:Tt.InvalidModifierOnTypeParameterPositions}),this.tsParseInOutConstModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out","const"],disallowedModifiers:["public","private","protected","readonly","declare","abstract","override"],errorTemplate:Tt.InvalidModifierOnTypeParameter})}getScopeHandler(){return pL}tsIsIdentifier(){return ln(this.state.type)}tsTokenCanFollowModifier(){return this.match(0)||this.match(5)||this.match(55)||this.match(21)||this.match(139)||this.isLiteralPropertyName()}tsNextTokenOnSameLineAndCanFollowModifier(){return this.next(),this.hasPrecedingLineBreak()?!1:this.tsTokenCanFollowModifier()}tsNextTokenCanFollowModifier(){return this.match(106)?(this.next(),this.tsTokenCanFollowModifier()):this.tsNextTokenOnSameLineAndCanFollowModifier()}tsParseModifier(r,n,a){if(!ln(this.state.type)&&this.state.type!==58&&this.state.type!==75)return;let i=this.state.value;if(r.includes(i)){if(a&&this.match(106)||n&&this.tsIsStartOfStaticBlocks())return;if(this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this)))return i}}tsParseModifiers({allowedModifiers:r,disallowedModifiers:n,stopOnStartOfClassStaticBlock:a,errorTemplate:i=Tt.InvalidModifierOnTypeMember},s){let o=(c,u,d,f)=>{u===d&&s[f]&&this.raise(Tt.InvalidModifiersOrder,c,{orderedModifiers:[d,f]})},l=(c,u,d,f)=>{(s[d]&&u===f||s[f]&&u===d)&&this.raise(Tt.IncompatibleModifiers,c,{modifiers:[d,f]})};for(;;){let{startLoc:c}=this.state,u=this.tsParseModifier(r.concat(n??[]),a,s.static);if(!u)break;rV(u)?s.accessibility?this.raise(Tt.DuplicateAccessibilityModifier,c,{modifier:u}):(o(c,u,u,"override"),o(c,u,u,"static"),o(c,u,u,"readonly"),s.accessibility=u):aye(u)?(s[u]&&this.raise(Tt.DuplicateModifier,c,{modifier:u}),s[u]=!0,o(c,u,"in","out")):(hasOwnProperty.call(s,u)?this.raise(Tt.DuplicateModifier,c,{modifier:u}):(o(c,u,"static","readonly"),o(c,u,"static","override"),o(c,u,"override","readonly"),o(c,u,"abstract","override"),l(c,u,"declare","override"),l(c,u,"static","abstract")),s[u]=!0),n!=null&&n.includes(u)&&this.raise(i,c,{modifier:u})}}tsIsListTerminator(r){switch(r){case"EnumMembers":case"TypeMembers":return this.match(8);case"HeritageClauseElement":return this.match(5);case"TupleElementTypes":return this.match(3);case"TypeParametersOrArguments":return this.match(48)}}tsParseList(r,n){let a=[];for(;!this.tsIsListTerminator(r);)a.push(n());return a}tsParseDelimitedList(r,n,a){return rye(this.tsParseDelimitedListWorker(r,n,!0,a))}tsParseDelimitedListWorker(r,n,a,i){let s=[],o=-1;for(;!this.tsIsListTerminator(r);){o=-1;let l=n();if(l==null)return;if(s.push(l),this.eat(12)){o=this.state.lastTokStartLoc.index;continue}if(this.tsIsListTerminator(r))break;a&&this.expect(12);return}return i&&(i.value=o),s}tsParseBracketedList(r,n,a,i,s){i||(a?this.expect(0):this.expect(47));let o=this.tsParseDelimitedList(r,n,s);return a?this.expect(3):this.expect(48),o}tsParseImportType(){let r=this.startNode();return this.expect(83),this.expect(10),this.match(134)?r.argument=this.parseStringLiteral(this.state.value):(this.raise(Tt.UnsupportedImportTypeArgument,this.state.startLoc),r.argument=super.parseExprAtom()),this.eat(12)?r.options=this.tsParseImportTypeOptions():r.options=null,this.expect(11),this.eat(16)&&(r.qualifier=this.tsParseEntityName(3)),this.match(47)&&(r.typeParameters=this.tsParseTypeArguments()),this.finishNode(r,"TSImportType")}tsParseImportTypeOptions(){let r=this.startNode();this.expect(5);let n=this.startNode();return this.isContextual(76)?(n.method=!1,n.key=this.parseIdentifier(!0),n.computed=!1,n.shorthand=!1):this.unexpected(null,76),this.expect(14),n.value=this.tsParseImportTypeWithPropertyValue(),r.properties=[this.finishObjectProperty(n)],this.eat(12),this.expect(8),this.finishNode(r,"ObjectExpression")}tsParseImportTypeWithPropertyValue(){let r=this.startNode(),n=[];for(this.expect(5);!this.match(8);){let a=this.state.type;ln(a)||a===134?n.push(super.parsePropertyDefinition(null)):this.unexpected(),this.eat(12)}return r.properties=n,this.next(),this.finishNode(r,"ObjectExpression")}tsParseEntityName(r){let n;if(r&1&&this.match(78))if(r&2)n=this.parseIdentifier(!0);else{let a=this.startNode();this.next(),n=this.finishNode(a,"ThisExpression")}else n=this.parseIdentifier(!!(r&1));for(;this.eat(16);){let a=this.startNodeAtNode(n);a.left=n,a.right=this.parseIdentifier(!!(r&1)),n=this.finishNode(a,"TSQualifiedName")}return n}tsParseTypeReference(){let r=this.startNode();return r.typeName=this.tsParseEntityName(1),!this.hasPrecedingLineBreak()&&this.match(47)&&(r.typeParameters=this.tsParseTypeArguments()),this.finishNode(r,"TSTypeReference")}tsParseThisTypePredicate(r){this.next();let n=this.startNodeAtNode(r);return n.parameterName=r,n.typeAnnotation=this.tsParseTypeAnnotation(!1),n.asserts=!1,this.finishNode(n,"TSTypePredicate")}tsParseThisTypeNode(){let r=this.startNode();return this.next(),this.finishNode(r,"TSThisType")}tsParseTypeQuery(){let r=this.startNode();return this.expect(87),this.match(83)?r.exprName=this.tsParseImportType():r.exprName=this.tsParseEntityName(3),!this.hasPrecedingLineBreak()&&this.match(47)&&(r.typeParameters=this.tsParseTypeArguments()),this.finishNode(r,"TSTypeQuery")}tsParseTypeParameter(r){let n=this.startNode();return r(n),n.name=this.tsParseTypeParameterName(),n.constraint=this.tsEatThenParseType(81),n.default=this.tsEatThenParseType(29),this.finishNode(n,"TSTypeParameter")}tsTryParseTypeParameters(r){if(this.match(47))return this.tsParseTypeParameters(r)}tsParseTypeParameters(r){let n=this.startNode();this.match(47)||this.match(143)?this.next():this.unexpected();let a={value:-1};return n.params=this.tsParseBracketedList("TypeParametersOrArguments",this.tsParseTypeParameter.bind(this,r),!1,!0,a),n.params.length===0&&this.raise(Tt.EmptyTypeParameters,n),a.value!==-1&&this.addExtra(n,"trailingComma",a.value),this.finishNode(n,"TSTypeParameterDeclaration")}tsFillSignature(r,n){let a=r===19,i="parameters",s="typeAnnotation";n.typeParameters=this.tsTryParseTypeParameters(this.tsParseConstModifier),this.expect(10),n[i]=this.tsParseBindingListForSignature(),a?n[s]=this.tsParseTypeOrTypePredicateAnnotation(r):this.match(r)&&(n[s]=this.tsParseTypeOrTypePredicateAnnotation(r))}tsParseBindingListForSignature(){let r=super.parseBindingList(11,41,2);for(let n of r){let{type:a}=n;(a==="AssignmentPattern"||a==="TSParameterProperty")&&this.raise(Tt.UnsupportedSignatureParameterKind,n,{type:a})}return r}tsParseTypeMemberSemicolon(){!this.eat(12)&&!this.isLineTerminator()&&this.expect(13)}tsParseSignatureMember(r,n){return this.tsFillSignature(14,n),this.tsParseTypeMemberSemicolon(),this.finishNode(n,r)}tsIsUnambiguouslyIndexSignature(){return this.next(),ln(this.state.type)?(this.next(),this.match(14)):!1}tsTryParseIndexSignature(r){if(!(this.match(0)&&this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this))))return;this.expect(0);let n=this.parseIdentifier();n.typeAnnotation=this.tsParseTypeAnnotation(),this.resetEndLocation(n),this.expect(3),r.parameters=[n];let a=this.tsTryParseTypeAnnotation();return a&&(r.typeAnnotation=a),this.tsParseTypeMemberSemicolon(),this.finishNode(r,"TSIndexSignature")}tsParsePropertyOrMethodSignature(r,n){if(this.eat(17)&&(r.optional=!0),this.match(10)||this.match(47)){n&&this.raise(Tt.ReadonlyForMethodSignature,r);let a=r;a.kind&&this.match(47)&&this.raise(Tt.AccessorCannotHaveTypeParameters,this.state.curPosition()),this.tsFillSignature(14,a),this.tsParseTypeMemberSemicolon();let i="parameters",s="typeAnnotation";if(a.kind==="get")a[i].length>0&&(this.raise(Y.BadGetterArity,this.state.curPosition()),this.isThisParam(a[i][0])&&this.raise(Tt.AccessorCannotDeclareThisParameter,this.state.curPosition()));else if(a.kind==="set"){if(a[i].length!==1)this.raise(Y.BadSetterArity,this.state.curPosition());else{let o=a[i][0];this.isThisParam(o)&&this.raise(Tt.AccessorCannotDeclareThisParameter,this.state.curPosition()),o.type==="Identifier"&&o.optional&&this.raise(Tt.SetAccessorCannotHaveOptionalParameter,this.state.curPosition()),o.type==="RestElement"&&this.raise(Tt.SetAccessorCannotHaveRestParameter,this.state.curPosition())}a[s]&&this.raise(Tt.SetAccessorCannotHaveReturnType,a[s])}else a.kind="method";return this.finishNode(a,"TSMethodSignature")}else{let a=r;n&&(a.readonly=!0);let i=this.tsTryParseTypeAnnotation();return i&&(a.typeAnnotation=i),this.tsParseTypeMemberSemicolon(),this.finishNode(a,"TSPropertySignature")}}tsParseTypeMember(){let r=this.startNode();if(this.match(10)||this.match(47))return this.tsParseSignatureMember("TSCallSignatureDeclaration",r);if(this.match(77)){let a=this.startNode();return this.next(),this.match(10)||this.match(47)?this.tsParseSignatureMember("TSConstructSignatureDeclaration",r):(r.key=this.createIdentifier(a,"new"),this.tsParsePropertyOrMethodSignature(r,!1))}this.tsParseModifiers({allowedModifiers:["readonly"],disallowedModifiers:["declare","abstract","private","protected","public","static","override"]},r);let n=this.tsTryParseIndexSignature(r);return n||(super.parsePropertyName(r),!r.computed&&r.key.type==="Identifier"&&(r.key.name==="get"||r.key.name==="set")&&this.tsTokenCanFollowModifier()&&(r.kind=r.key.name,super.parsePropertyName(r),!this.match(10)&&!this.match(47)&&this.unexpected(null,10)),this.tsParsePropertyOrMethodSignature(r,!!r.readonly))}tsParseTypeLiteral(){let r=this.startNode();return r.members=this.tsParseObjectTypeMembers(),this.finishNode(r,"TSTypeLiteral")}tsParseObjectTypeMembers(){this.expect(5);let r=this.tsParseList("TypeMembers",this.tsParseTypeMember.bind(this));return this.expect(8),r}tsIsStartOfMappedType(){return this.next(),this.eat(53)?this.isContextual(122):(this.isContextual(122)&&this.next(),!this.match(0)||(this.next(),!this.tsIsIdentifier())?!1:(this.next(),this.match(58)))}tsParseMappedType(){let r=this.startNode();this.expect(5),this.match(53)?(r.readonly=this.state.value,this.next(),this.expectContextual(122)):this.eatContextual(122)&&(r.readonly=!0),this.expect(0);{let n=this.startNode();n.name=this.tsParseTypeParameterName(),n.constraint=this.tsExpectThenParseType(58),r.typeParameter=this.finishNode(n,"TSTypeParameter")}return r.nameType=this.eatContextual(93)?this.tsParseType():null,this.expect(3),this.match(53)?(r.optional=this.state.value,this.next(),this.expect(17)):this.eat(17)&&(r.optional=!0),r.typeAnnotation=this.tsTryParseType(),this.semicolon(),this.expect(8),this.finishNode(r,"TSMappedType")}tsParseTupleType(){let r=this.startNode();r.elementTypes=this.tsParseBracketedList("TupleElementTypes",this.tsParseTupleElementType.bind(this),!0,!1);let n=!1;return r.elementTypes.forEach(a=>{let{type:i}=a;n&&i!=="TSRestType"&&i!=="TSOptionalType"&&!(i==="TSNamedTupleMember"&&a.optional)&&this.raise(Tt.OptionalTypeBeforeRequired,a),n||(n=i==="TSNamedTupleMember"&&a.optional||i==="TSOptionalType")}),this.finishNode(r,"TSTupleType")}tsParseTupleElementType(){let r=this.state.startLoc,n=this.eat(21),{startLoc:a}=this.state,i,s,o,l,u=pc(this.state.type)?this.lookaheadCharCode():null;if(u===58)i=!0,o=!1,s=this.parseIdentifier(!0),this.expect(14),l=this.tsParseType();else if(u===63){o=!0;let d=this.state.value,f=this.tsParseNonArrayType();this.lookaheadCharCode()===58?(i=!0,s=this.createIdentifier(this.startNodeAt(a),d),this.expect(17),this.expect(14),l=this.tsParseType()):(i=!1,l=f,this.expect(17))}else l=this.tsParseType(),o=this.eat(17),i=this.eat(14);if(i){let d;s?(d=this.startNodeAt(a),d.optional=o,d.label=s,d.elementType=l,this.eat(17)&&(d.optional=!0,this.raise(Tt.TupleOptionalAfterType,this.state.lastTokStartLoc))):(d=this.startNodeAt(a),d.optional=o,this.raise(Tt.InvalidTupleMemberLabel,l),d.label=l,d.elementType=this.tsParseType()),l=this.finishNode(d,"TSNamedTupleMember")}else if(o){let d=this.startNodeAt(a);d.typeAnnotation=l,l=this.finishNode(d,"TSOptionalType")}if(n){let d=this.startNodeAt(r);d.typeAnnotation=l,l=this.finishNode(d,"TSRestType")}return l}tsParseParenthesizedType(){let r=this.startNode();return this.expect(10),r.typeAnnotation=this.tsParseType(),this.expect(11),this.finishNode(r,"TSParenthesizedType")}tsParseFunctionOrConstructorType(r,n){let a=this.startNode();return r==="TSConstructorType"&&(a.abstract=!!n,n&&this.next(),this.next()),this.tsInAllowConditionalTypesContext(()=>this.tsFillSignature(19,a)),this.finishNode(a,r)}tsParseLiteralTypeNode(){let r=this.startNode();switch(this.state.type){case 135:case 136:case 134:case 85:case 86:r.literal=super.parseExprAtom();break;default:this.unexpected()}return this.finishNode(r,"TSLiteralType")}tsParseTemplateLiteralType(){{let r=this.startNode();return r.literal=super.parseTemplate(!1),this.finishNode(r,"TSLiteralType")}}parseTemplateSubstitution(){return this.state.inType?this.tsParseType():super.parseTemplateSubstitution()}tsParseThisTypeOrThisTypePredicate(){let r=this.tsParseThisTypeNode();return this.isContextual(116)&&!this.hasPrecedingLineBreak()?this.tsParseThisTypePredicate(r):r}tsParseNonArrayType(){switch(this.state.type){case 134:case 135:case 136:case 85:case 86:return this.tsParseLiteralTypeNode();case 53:if(this.state.value==="-"){let r=this.startNode(),n=this.lookahead();return n.type!==135&&n.type!==136&&this.unexpected(),r.literal=this.parseMaybeUnary(),this.finishNode(r,"TSLiteralType")}break;case 78:return this.tsParseThisTypeOrThisTypePredicate();case 87:return this.tsParseTypeQuery();case 83:return this.tsParseImportType();case 5:return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this))?this.tsParseMappedType():this.tsParseTypeLiteral();case 0:return this.tsParseTupleType();case 10:return this.tsParseParenthesizedType();case 25:case 24:return this.tsParseTemplateLiteralType();default:{let{type:r}=this.state;if(ln(r)||r===88||r===84){let n=r===88?"TSVoidKeyword":r===84?"TSNullKeyword":nye(this.state.value);if(n!==void 0&&this.lookaheadCharCode()!==46){let a=this.startNode();return this.next(),this.finishNode(a,n)}return this.tsParseTypeReference()}}}throw this.unexpected()}tsParseArrayTypeOrHigher(){let{startLoc:r}=this.state,n=this.tsParseNonArrayType();for(;!this.hasPrecedingLineBreak()&&this.eat(0);)if(this.match(3)){let a=this.startNodeAt(r);a.elementType=n,this.expect(3),n=this.finishNode(a,"TSArrayType")}else{let a=this.startNodeAt(r);a.objectType=n,a.indexType=this.tsParseType(),this.expect(3),n=this.finishNode(a,"TSIndexedAccessType")}return n}tsParseTypeOperator(){let r=this.startNode(),n=this.state.value;return this.next(),r.operator=n,r.typeAnnotation=this.tsParseTypeOperatorOrHigher(),n==="readonly"&&this.tsCheckTypeAnnotationForReadOnly(r),this.finishNode(r,"TSTypeOperator")}tsCheckTypeAnnotationForReadOnly(r){switch(r.typeAnnotation.type){case"TSTupleType":case"TSArrayType":return;default:this.raise(Tt.UnexpectedReadonly,r)}}tsParseInferType(){let r=this.startNode();this.expectContextual(115);let n=this.startNode();return n.name=this.tsParseTypeParameterName(),n.constraint=this.tsTryParse(()=>this.tsParseConstraintForInferType()),r.typeParameter=this.finishNode(n,"TSTypeParameter"),this.finishNode(r,"TSInferType")}tsParseConstraintForInferType(){if(this.eat(81)){let r=this.tsInDisallowConditionalTypesContext(()=>this.tsParseType());if(this.state.inDisallowConditionalTypesContext||!this.match(17))return r}}tsParseTypeOperatorOrHigher(){return Pge(this.state.type)&&!this.state.containsEsc?this.tsParseTypeOperator():this.isContextual(115)?this.tsParseInferType():this.tsInAllowConditionalTypesContext(()=>this.tsParseArrayTypeOrHigher())}tsParseUnionOrIntersectionType(r,n,a){let i=this.startNode(),s=this.eat(a),o=[];do o.push(n());while(this.eat(a));return o.length===1&&!s?o[0]:(i.types=o,this.finishNode(i,r))}tsParseIntersectionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSIntersectionType",this.tsParseTypeOperatorOrHigher.bind(this),45)}tsParseUnionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSUnionType",this.tsParseIntersectionTypeOrHigher.bind(this),43)}tsIsStartOfFunctionType(){return this.match(47)?!0:this.match(10)&&this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this))}tsSkipParameterStart(){if(ln(this.state.type)||this.match(78))return this.next(),!0;if(this.match(5)){let{errors:r}=this.state,n=r.length;try{return this.parseObjectLike(8,!0),r.length===n}catch{return!1}}if(this.match(0)){this.next();let{errors:r}=this.state,n=r.length;try{return super.parseBindingList(3,93,1),r.length===n}catch{return!1}}return!1}tsIsUnambiguouslyStartOfFunctionType(){return this.next(),!!(this.match(11)||this.match(21)||this.tsSkipParameterStart()&&(this.match(14)||this.match(12)||this.match(17)||this.match(29)||this.match(11)&&(this.next(),this.match(19))))}tsParseTypeOrTypePredicateAnnotation(r){return this.tsInType(()=>{let n=this.startNode();this.expect(r);let a=this.startNode(),i=!!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));if(i&&this.match(78)){let l=this.tsParseThisTypeOrThisTypePredicate();return l.type==="TSThisType"?(a.parameterName=l,a.asserts=!0,a.typeAnnotation=null,l=this.finishNode(a,"TSTypePredicate")):(this.resetStartLocationFromNode(l,a),l.asserts=!0),n.typeAnnotation=l,this.finishNode(n,"TSTypeAnnotation")}let s=this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(!s)return i?(a.parameterName=this.parseIdentifier(),a.asserts=i,a.typeAnnotation=null,n.typeAnnotation=this.finishNode(a,"TSTypePredicate"),this.finishNode(n,"TSTypeAnnotation")):this.tsParseTypeAnnotation(!1,n);let o=this.tsParseTypeAnnotation(!1);return a.parameterName=s,a.typeAnnotation=o,a.asserts=i,n.typeAnnotation=this.finishNode(a,"TSTypePredicate"),this.finishNode(n,"TSTypeAnnotation")})}tsTryParseTypeOrTypePredicateAnnotation(){if(this.match(14))return this.tsParseTypeOrTypePredicateAnnotation(14)}tsTryParseTypeAnnotation(){if(this.match(14))return this.tsParseTypeAnnotation()}tsTryParseType(){return this.tsEatThenParseType(14)}tsParseTypePredicatePrefix(){let r=this.parseIdentifier();if(this.isContextual(116)&&!this.hasPrecedingLineBreak())return this.next(),r}tsParseTypePredicateAsserts(){if(this.state.type!==109)return!1;let r=this.state.containsEsc;return this.next(),!ln(this.state.type)&&!this.match(78)?!1:(r&&this.raise(Y.InvalidEscapedReservedWord,this.state.lastTokStartLoc,{reservedWord:"asserts"}),!0)}tsParseTypeAnnotation(r=!0,n=this.startNode()){return this.tsInType(()=>{r&&this.expect(14),n.typeAnnotation=this.tsParseType()}),this.finishNode(n,"TSTypeAnnotation")}tsParseType(){tV(this.state.inType);let r=this.tsParseNonConditionalType();if(this.state.inDisallowConditionalTypesContext||this.hasPrecedingLineBreak()||!this.eat(81))return r;let n=this.startNodeAtNode(r);return n.checkType=r,n.extendsType=this.tsInDisallowConditionalTypesContext(()=>this.tsParseNonConditionalType()),this.expect(17),n.trueType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.expect(14),n.falseType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.finishNode(n,"TSConditionalType")}isAbstractConstructorSignature(){return this.isContextual(124)&&this.isLookaheadContextual("new")}tsParseNonConditionalType(){return this.tsIsStartOfFunctionType()?this.tsParseFunctionOrConstructorType("TSFunctionType"):this.match(77)?this.tsParseFunctionOrConstructorType("TSConstructorType"):this.isAbstractConstructorSignature()?this.tsParseFunctionOrConstructorType("TSConstructorType",!0):this.tsParseUnionTypeOrHigher()}tsParseTypeAssertion(){this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(Tt.ReservedTypeAssertion,this.state.startLoc);let r=this.startNode();return r.typeAnnotation=this.tsInType(()=>(this.next(),this.match(75)?this.tsParseTypeReference():this.tsParseType())),this.expect(48),r.expression=this.parseMaybeUnary(),this.finishNode(r,"TSTypeAssertion")}tsParseHeritageClause(r){let n=this.state.startLoc,a=this.tsParseDelimitedList("HeritageClauseElement",()=>{{let i=this.startNode();return i.expression=this.tsParseEntityName(3),this.match(47)&&(i.typeParameters=this.tsParseTypeArguments()),this.finishNode(i,"TSExpressionWithTypeArguments")}});return a.length||this.raise(Tt.EmptyHeritageClauseType,n,{token:r}),a}tsParseInterfaceDeclaration(r,n={}){if(this.hasFollowingLineBreak())return null;this.expectContextual(129),n.declare&&(r.declare=!0),ln(this.state.type)?(r.id=this.parseIdentifier(),this.checkIdentifier(r.id,130)):(r.id=null,this.raise(Tt.MissingInterfaceName,this.state.startLoc)),r.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers),this.eat(81)&&(r.extends=this.tsParseHeritageClause("extends"));let a=this.startNode();return a.body=this.tsInType(this.tsParseObjectTypeMembers.bind(this)),r.body=this.finishNode(a,"TSInterfaceBody"),this.finishNode(r,"TSInterfaceDeclaration")}tsParseTypeAliasDeclaration(r){return r.id=this.parseIdentifier(),this.checkIdentifier(r.id,2),r.typeAnnotation=this.tsInType(()=>{if(r.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutModifiers),this.expect(29),this.isContextual(114)&&this.lookaheadCharCode()!==46){let n=this.startNode();return this.next(),this.finishNode(n,"TSIntrinsicKeyword")}return this.tsParseType()}),this.semicolon(),this.finishNode(r,"TSTypeAliasDeclaration")}tsInTopLevelContext(r){if(this.curContext()!==tn.brace){let n=this.state.context;this.state.context=[n[0]];try{return r()}finally{this.state.context=n}}else return r()}tsInType(r){let n=this.state.inType;this.state.inType=!0;try{return r()}finally{this.state.inType=n}}tsInDisallowConditionalTypesContext(r){let n=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!0;try{return r()}finally{this.state.inDisallowConditionalTypesContext=n}}tsInAllowConditionalTypesContext(r){let n=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!1;try{return r()}finally{this.state.inDisallowConditionalTypesContext=n}}tsEatThenParseType(r){if(this.match(r))return this.tsNextThenParseType()}tsExpectThenParseType(r){return this.tsInType(()=>(this.expect(r),this.tsParseType()))}tsNextThenParseType(){return this.tsInType(()=>(this.next(),this.tsParseType()))}tsParseEnumMember(){let r=this.startNode();return r.id=this.match(134)?super.parseStringLiteral(this.state.value):this.parseIdentifier(!0),this.eat(29)&&(r.initializer=super.parseMaybeAssignAllowIn()),this.finishNode(r,"TSEnumMember")}tsParseEnumDeclaration(r,n={}){return n.const&&(r.const=!0),n.declare&&(r.declare=!0),this.expectContextual(126),r.id=this.parseIdentifier(),this.checkIdentifier(r.id,r.const?8971:8459),this.expect(5),r.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(8),this.finishNode(r,"TSEnumDeclaration")}tsParseEnumBody(){let r=this.startNode();return this.expect(5),r.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(8),this.finishNode(r,"TSEnumBody")}tsParseModuleBlock(){let r=this.startNode();return this.scope.enter(0),this.expect(5),super.parseBlockOrModuleBlockBody(r.body=[],void 0,!0,8),this.scope.exit(),this.finishNode(r,"TSModuleBlock")}tsParseModuleOrNamespaceDeclaration(r,n=!1){if(r.id=this.parseIdentifier(),n||this.checkIdentifier(r.id,1024),this.eat(16)){let a=this.startNode();this.tsParseModuleOrNamespaceDeclaration(a,!0),r.body=a}else this.scope.enter(1024),this.prodParam.enter(0),r.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit();return this.finishNode(r,"TSModuleDeclaration")}tsParseAmbientExternalModuleDeclaration(r){return this.isContextual(112)?(r.kind="global",r.global=!0,r.id=this.parseIdentifier()):this.match(134)?(r.kind="module",r.id=super.parseStringLiteral(this.state.value)):this.unexpected(),this.match(5)?(this.scope.enter(1024),this.prodParam.enter(0),r.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit()):this.semicolon(),this.finishNode(r,"TSModuleDeclaration")}tsParseImportEqualsDeclaration(r,n,a){r.isExport=a||!1,r.id=n||this.parseIdentifier(),this.checkIdentifier(r.id,4096),this.expect(29);let i=this.tsParseModuleReference();return r.importKind==="type"&&i.type!=="TSExternalModuleReference"&&this.raise(Tt.ImportAliasHasImportType,i),r.moduleReference=i,this.semicolon(),this.finishNode(r,"TSImportEqualsDeclaration")}tsIsExternalModuleReference(){return this.isContextual(119)&&this.lookaheadCharCode()===40}tsParseModuleReference(){return this.tsIsExternalModuleReference()?this.tsParseExternalModuleReference():this.tsParseEntityName(0)}tsParseExternalModuleReference(){let r=this.startNode();return this.expectContextual(119),this.expect(10),this.match(134)||this.unexpected(),r.expression=super.parseExprAtom(),this.expect(11),this.sawUnambiguousESM=!0,this.finishNode(r,"TSExternalModuleReference")}tsLookAhead(r){let n=this.state.clone(),a=r();return this.state=n,a}tsTryParseAndCatch(r){let n=this.tryParse(a=>r()||a());if(!(n.aborted||!n.node))return n.error&&(this.state=n.failState),n.node}tsTryParse(r){let n=this.state.clone(),a=r();if(a!==void 0&&a!==!1)return a;this.state=n}tsTryParseDeclare(r){if(this.isLineTerminator())return;let n=this.state.type;return this.tsInAmbientContext(()=>{switch(n){case 68:return r.declare=!0,super.parseFunctionStatement(r,!1,!1);case 80:return r.declare=!0,this.parseClass(r,!0,!1);case 126:return this.tsParseEnumDeclaration(r,{declare:!0});case 112:return this.tsParseAmbientExternalModuleDeclaration(r);case 100:if(this.state.containsEsc)return;case 75:case 74:return!this.match(75)||!this.isLookaheadContextual("enum")?(r.declare=!0,this.parseVarStatement(r,this.state.value,!0)):(this.expect(75),this.tsParseEnumDeclaration(r,{const:!0,declare:!0}));case 107:if(this.isUsing())return this.raise(Tt.InvalidModifierOnUsingDeclaration,this.state.startLoc,"declare"),r.declare=!0,this.parseVarStatement(r,"using",!0);break;case 96:if(this.isAwaitUsing())return this.raise(Tt.InvalidModifierOnAwaitUsingDeclaration,this.state.startLoc,"declare"),r.declare=!0,this.next(),this.parseVarStatement(r,"await using",!0);break;case 129:{let a=this.tsParseInterfaceDeclaration(r,{declare:!0});if(a)return a}default:if(ln(n))return this.tsParseDeclaration(r,this.state.type,!0,null)}})}tsTryParseExportDeclaration(){return this.tsParseDeclaration(this.startNode(),this.state.type,!0,null)}tsParseDeclaration(r,n,a,i){switch(n){case 124:if(this.tsCheckLineTerminator(a)&&(this.match(80)||ln(this.state.type)))return this.tsParseAbstractDeclaration(r,i);break;case 127:if(this.tsCheckLineTerminator(a)){if(this.match(134))return this.tsParseAmbientExternalModuleDeclaration(r);if(ln(this.state.type))return r.kind="module",this.tsParseModuleOrNamespaceDeclaration(r)}break;case 128:if(this.tsCheckLineTerminator(a)&&ln(this.state.type))return r.kind="namespace",this.tsParseModuleOrNamespaceDeclaration(r);break;case 130:if(this.tsCheckLineTerminator(a)&&ln(this.state.type))return this.tsParseTypeAliasDeclaration(r);break}}tsCheckLineTerminator(r){return r?this.hasFollowingLineBreak()?!1:(this.next(),!0):!this.isLineTerminator()}tsTryParseGenericAsyncArrowFunction(r){if(!this.match(47))return;let n=this.state.maybeInArrowParameters;this.state.maybeInArrowParameters=!0;let a=this.tsTryParseAndCatch(()=>{let i=this.startNodeAt(r);return i.typeParameters=this.tsParseTypeParameters(this.tsParseConstModifier),super.parseFunctionParams(i),i.returnType=this.tsTryParseTypeOrTypePredicateAnnotation(),this.expect(19),i});if(this.state.maybeInArrowParameters=n,!!a)return super.parseArrowExpression(a,null,!0)}tsParseTypeArgumentsInExpression(){if(this.reScan_lt()===47)return this.tsParseTypeArguments()}tsParseTypeArguments(){let r=this.startNode();return r.params=this.tsInType(()=>this.tsInTopLevelContext(()=>(this.expect(47),this.tsParseDelimitedList("TypeParametersOrArguments",this.tsParseType.bind(this))))),r.params.length===0?this.raise(Tt.EmptyTypeArguments,r):!this.state.inType&&this.curContext()===tn.brace&&this.reScan_lt_gt(),this.expect(48),this.finishNode(r,"TSTypeParameterInstantiation")}tsIsDeclarationStart(){return Ege(this.state.type)}isExportDefaultSpecifier(){return this.tsIsDeclarationStart()?!1:super.isExportDefaultSpecifier()}parseBindingElement(r,n){let a=n.length?n[0].loc.start:this.state.startLoc,i={};this.tsParseModifiers({allowedModifiers:["public","private","protected","override","readonly"]},i);let s=i.accessibility,o=i.override,l=i.readonly;!(r&4)&&(s||l||o)&&this.raise(Tt.UnexpectedParameterModifier,a);let c=this.parseMaybeDefault();r&2&&this.parseFunctionParamType(c);let u=this.parseMaybeDefault(c.loc.start,c);if(s||l||o){let d=this.startNodeAt(a);return n.length&&(d.decorators=n),s&&(d.accessibility=s),l&&(d.readonly=l),o&&(d.override=o),u.type!=="Identifier"&&u.type!=="AssignmentPattern"&&this.raise(Tt.UnsupportedParameterPropertyKind,d),d.parameter=u,this.finishNode(d,"TSParameterProperty")}return n.length&&(c.decorators=n),u}isSimpleParameter(r){return r.type==="TSParameterProperty"&&super.isSimpleParameter(r.parameter)||super.isSimpleParameter(r)}tsDisallowOptionalPattern(r){for(let n of r.params)n.type!=="Identifier"&&n.optional&&!this.state.isAmbientContext&&this.raise(Tt.PatternIsOptional,n)}setArrowFunctionParameters(r,n,a){super.setArrowFunctionParameters(r,n,a),this.tsDisallowOptionalPattern(r)}parseFunctionBodyAndFinish(r,n,a=!1){this.match(14)&&(r.returnType=this.tsParseTypeOrTypePredicateAnnotation(14));let i=n==="FunctionDeclaration"?"TSDeclareFunction":n==="ClassMethod"||n==="ClassPrivateMethod"?"TSDeclareMethod":void 0;return i&&!this.match(5)&&this.isLineTerminator()?this.finishNode(r,i):i==="TSDeclareFunction"&&this.state.isAmbientContext&&(this.raise(Tt.DeclareFunctionHasImplementation,r),r.declare)?super.parseFunctionBodyAndFinish(r,i,a):(this.tsDisallowOptionalPattern(r),super.parseFunctionBodyAndFinish(r,n,a))}registerFunctionStatementId(r){!r.body&&r.id?this.checkIdentifier(r.id,1024):super.registerFunctionStatementId(r)}tsCheckForInvalidTypeCasts(r){r.forEach(n=>{n?.type==="TSTypeCastExpression"&&this.raise(Tt.UnexpectedTypeAnnotation,n.typeAnnotation)})}toReferencedList(r,n){return this.tsCheckForInvalidTypeCasts(r),r}parseArrayLike(r,n,a){let i=super.parseArrayLike(r,n,a);return i.type==="ArrayExpression"&&this.tsCheckForInvalidTypeCasts(i.elements),i}parseSubscript(r,n,a,i){if(!this.hasPrecedingLineBreak()&&this.match(35)){this.state.canStartJSXElement=!1,this.next();let o=this.startNodeAt(n);return o.expression=r,this.finishNode(o,"TSNonNullExpression")}let s=!1;if(this.match(18)&&this.lookaheadCharCode()===60){if(a)return i.stop=!0,r;i.optionalChainMember=s=!0,this.next()}if(this.match(47)||this.match(51)){let o,l=this.tsTryParseAndCatch(()=>{if(!a&&this.atPossibleAsyncArrow(r)){let f=this.tsTryParseGenericAsyncArrowFunction(n);if(f)return i.stop=!0,f}let c=this.tsParseTypeArgumentsInExpression();if(!c)return;if(s&&!this.match(10)){o=this.state.curPosition();return}if(y1(this.state.type)){let f=super.parseTaggedTemplateExpression(r,n,i);return f.typeParameters=c,f}if(!a&&this.eat(10)){let f=this.startNodeAt(n);return f.callee=r,f.arguments=this.parseCallExpressionArguments(),this.tsCheckForInvalidTypeCasts(f.arguments),f.typeParameters=c,i.optionalChainMember&&(f.optional=s),this.finishCallExpression(f,i.optionalChainMember)}let u=this.state.type;if(u===48||u===52||u!==10&&m0(u)&&!this.hasPrecedingLineBreak())return;let d=this.startNodeAt(n);return d.expression=r,d.typeParameters=c,this.finishNode(d,"TSInstantiationExpression")});if(o&&this.unexpected(o,10),l)return l.type==="TSInstantiationExpression"&&((this.match(16)||this.match(18)&&this.lookaheadCharCode()!==40)&&this.raise(Tt.InvalidPropertyAccessAfterInstantiationExpression,this.state.startLoc),!this.match(16)&&!this.match(18)&&(l.expression=super.stopParseSubscript(r,i))),l}return super.parseSubscript(r,n,a,i)}parseNewCallee(r){var n;super.parseNewCallee(r);let{callee:a}=r;a.type==="TSInstantiationExpression"&&!((n=a.extra)!=null&&n.parenthesized)&&(r.typeParameters=a.typeParameters,r.callee=a.expression)}parseExprOp(r,n,a){let i;if(m1(58)>a&&!this.hasPrecedingLineBreak()&&(this.isContextual(93)||(i=this.isContextual(120)))){let s=this.startNodeAt(n);return s.expression=r,s.typeAnnotation=this.tsInType(()=>(this.next(),this.match(75)?(i&&this.raise(Y.UnexpectedKeyword,this.state.startLoc,{keyword:"const"}),this.tsParseTypeReference()):this.tsParseType())),this.finishNode(s,i?"TSSatisfiesExpression":"TSAsExpression"),this.reScan_lt_gt(),this.parseExprOp(s,n,a)}return super.parseExprOp(r,n,a)}checkReservedWord(r,n,a,i){this.state.isAmbientContext||super.checkReservedWord(r,n,a,i)}checkImportReflection(r){super.checkImportReflection(r),r.module&&r.importKind!=="value"&&this.raise(Tt.ImportReflectionHasImportType,r.specifiers[0].loc.start)}checkDuplicateExports(){}isPotentialImportPhase(r){if(super.isPotentialImportPhase(r))return!0;if(this.isContextual(130)){let n=this.lookaheadCharCode();return r?n===123||n===42:n!==61}return!r&&this.isContextual(87)}applyImportPhase(r,n,a,i){super.applyImportPhase(r,n,a,i),n?r.exportKind=a==="type"?"type":"value":r.importKind=a==="type"||a==="typeof"?a:"value"}parseImport(r){if(this.match(134))return r.importKind="value",super.parseImport(r);let n;if(ln(this.state.type)&&this.lookaheadCharCode()===61)return r.importKind="value",this.tsParseImportEqualsDeclaration(r);if(this.isContextual(130)){let a=this.parseMaybeImportPhase(r,!1);if(this.lookaheadCharCode()===61)return this.tsParseImportEqualsDeclaration(r,a);n=super.parseImportSpecifiersAndAfter(r,a)}else n=super.parseImport(r);return n.importKind==="type"&&n.specifiers.length>1&&n.specifiers[0].type==="ImportDefaultSpecifier"&&this.raise(Tt.TypeImportCannotSpecifyDefaultAndNamed,n),n}parseExport(r,n){if(this.match(83)){let a=r;this.next();let i=null;return this.isContextual(130)&&this.isPotentialImportPhase(!1)?i=this.parseMaybeImportPhase(a,!1):a.importKind="value",this.tsParseImportEqualsDeclaration(a,i,!0)}else if(this.eat(29)){let a=r;return a.expression=super.parseExpression(),this.semicolon(),this.sawUnambiguousESM=!0,this.finishNode(a,"TSExportAssignment")}else if(this.eatContextual(93)){let a=r;return this.expectContextual(128),a.id=this.parseIdentifier(),this.semicolon(),this.finishNode(a,"TSNamespaceExportDeclaration")}else return super.parseExport(r,n)}isAbstractClass(){return this.isContextual(124)&&this.isLookaheadContextual("class")}parseExportDefaultExpression(){if(this.isAbstractClass()){let r=this.startNode();return this.next(),r.abstract=!0,this.parseClass(r,!0,!0)}if(this.match(129)){let r=this.tsParseInterfaceDeclaration(this.startNode());if(r)return r}return super.parseExportDefaultExpression()}parseVarStatement(r,n,a=!1){let{isAmbientContext:i}=this.state,s=super.parseVarStatement(r,n,a||i);if(!i)return s;if(!r.declare&&(n==="using"||n==="await using"))return this.raiseOverwrite(Tt.UsingDeclarationInAmbientContext,r,n),s;for(let{id:o,init:l}of s.declarations)l&&(n==="var"||n==="let"||o.typeAnnotation?this.raise(Tt.InitializerNotAllowedInAmbientContext,l):oye(l,this.hasPlugin("estree"))||this.raise(Tt.ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference,l));return s}parseStatementContent(r,n){if(!this.state.containsEsc)switch(this.state.type){case 75:{if(this.isLookaheadContextual("enum")){let a=this.startNode();return this.expect(75),this.tsParseEnumDeclaration(a,{const:!0})}break}case 124:case 125:{if(this.nextTokenIsIdentifierAndNotTSRelationalOperatorOnSameLine()){let a=this.state.type,i=this.startNode();this.next();let s=a===125?this.tsTryParseDeclare(i):this.tsParseAbstractDeclaration(i,n);return s?(a===125&&(s.declare=!0),s):(i.expression=this.createIdentifier(this.startNodeAt(i.loc.start),a===125?"declare":"abstract"),this.semicolon(!1),this.finishNode(i,"ExpressionStatement"))}break}case 126:return this.tsParseEnumDeclaration(this.startNode());case 112:{if(this.lookaheadCharCode()===123){let i=this.startNode();return this.tsParseAmbientExternalModuleDeclaration(i)}break}case 129:{let a=this.tsParseInterfaceDeclaration(this.startNode());if(a)return a;break}case 127:{if(this.nextTokenIsIdentifierOrStringLiteralOnSameLine()){let a=this.startNode();return this.next(),this.tsParseDeclaration(a,127,!1,n)}break}case 128:{if(this.nextTokenIsIdentifierOnSameLine()){let a=this.startNode();return this.next(),this.tsParseDeclaration(a,128,!1,n)}break}case 130:{if(this.nextTokenIsIdentifierOnSameLine()){let a=this.startNode();return this.next(),this.tsParseTypeAliasDeclaration(a)}break}}return super.parseStatementContent(r,n)}parseAccessModifier(){return this.tsParseModifier(["public","protected","private"])}tsHasSomeModifiers(r,n){return n.some(a=>rV(a)?r.accessibility===a:!!r[a])}tsIsStartOfStaticBlocks(){return this.isContextual(106)&&this.lookaheadCharCode()===123}parseClassMember(r,n,a){let i=["declare","private","public","protected","override","abstract","readonly","static"];this.tsParseModifiers({allowedModifiers:i,disallowedModifiers:["in","out"],stopOnStartOfClassStaticBlock:!0,errorTemplate:Tt.InvalidModifierOnTypeParameterPositions},n);let s=()=>{this.tsIsStartOfStaticBlocks()?(this.next(),this.next(),this.tsHasSomeModifiers(n,i)&&this.raise(Tt.StaticBlockCannotHaveModifier,this.state.curPosition()),super.parseClassStaticBlock(r,n)):this.parseClassMemberWithIsStatic(r,n,a,!!n.static)};n.declare?this.tsInAmbientContext(s):s()}parseClassMemberWithIsStatic(r,n,a,i){let s=this.tsTryParseIndexSignature(n);if(s){r.body.push(s),n.abstract&&this.raise(Tt.IndexSignatureHasAbstract,n),n.accessibility&&this.raise(Tt.IndexSignatureHasAccessibility,n,{modifier:n.accessibility}),n.declare&&this.raise(Tt.IndexSignatureHasDeclare,n),n.override&&this.raise(Tt.IndexSignatureHasOverride,n);return}!this.state.inAbstractClass&&n.abstract&&this.raise(Tt.NonAbstractClassHasAbstractMethod,n),n.override&&(a.hadSuperClass||this.raise(Tt.OverrideNotInSubClass,n)),super.parseClassMemberWithIsStatic(r,n,a,i)}parsePostMemberNameModifiers(r){this.eat(17)&&(r.optional=!0),r.readonly&&this.match(10)&&this.raise(Tt.ClassMethodHasReadonly,r),r.declare&&this.match(10)&&this.raise(Tt.ClassMethodHasDeclare,r)}shouldParseExportDeclaration(){return this.tsIsDeclarationStart()?!0:super.shouldParseExportDeclaration()}parseConditional(r,n,a){if(!this.match(17))return r;if(this.state.maybeInArrowParameters){let i=this.lookaheadCharCode();if(i===44||i===61||i===58||i===41)return this.setOptionalParametersError(a),r}return super.parseConditional(r,n,a)}parseParenItem(r,n){let a=super.parseParenItem(r,n);if(this.eat(17)&&(a.optional=!0,this.resetEndLocation(r)),this.match(14)){let i=this.startNodeAt(n);return i.expression=r,i.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(i,"TSTypeCastExpression")}return r}parseExportDeclaration(r){if(!this.state.isAmbientContext&&this.isContextual(125))return this.tsInAmbientContext(()=>this.parseExportDeclaration(r));let n=this.state.startLoc,a=this.eatContextual(125);if(a&&(this.isContextual(125)||!this.shouldParseExportDeclaration()))throw this.raise(Tt.ExpectedAmbientAfterExportDeclare,this.state.startLoc);let s=ln(this.state.type)&&this.tsTryParseExportDeclaration()||super.parseExportDeclaration(r);return s?((s.type==="TSInterfaceDeclaration"||s.type==="TSTypeAliasDeclaration"||a)&&(r.exportKind="type"),a&&s.type!=="TSImportEqualsDeclaration"&&(this.resetStartLocation(s,n),s.declare=!0),s):null}parseClassId(r,n,a,i){if((!n||a)&&this.isContextual(113))return;super.parseClassId(r,n,a,r.declare?1024:8331);let s=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers);s&&(r.typeParameters=s)}parseClassPropertyAnnotation(r){r.optional||(this.eat(35)?r.definite=!0:this.eat(17)&&(r.optional=!0));let n=this.tsTryParseTypeAnnotation();n&&(r.typeAnnotation=n)}parseClassProperty(r){if(this.parseClassPropertyAnnotation(r),this.state.isAmbientContext&&!(r.readonly&&!r.typeAnnotation)&&this.match(29)&&this.raise(Tt.DeclareClassFieldHasInitializer,this.state.startLoc),r.abstract&&this.match(29)){let{key:n}=r;this.raise(Tt.AbstractPropertyHasInitializer,this.state.startLoc,{propertyName:n.type==="Identifier"&&!r.computed?n.name:`[${this.input.slice(this.offsetToSourcePos(n.start),this.offsetToSourcePos(n.end))}]`})}return super.parseClassProperty(r)}parseClassPrivateProperty(r){return r.abstract&&this.raise(Tt.PrivateElementHasAbstract,r),r.accessibility&&this.raise(Tt.PrivateElementHasAccessibility,r,{modifier:r.accessibility}),this.parseClassPropertyAnnotation(r),super.parseClassPrivateProperty(r)}parseClassAccessorProperty(r){return this.parseClassPropertyAnnotation(r),r.optional&&this.raise(Tt.AccessorCannotBeOptional,r),super.parseClassAccessorProperty(r)}pushClassMethod(r,n,a,i,s,o){let l=this.tsTryParseTypeParameters(this.tsParseConstModifier);l&&s&&this.raise(Tt.ConstructorHasTypeParameters,l);let{declare:c=!1,kind:u}=n;c&&(u==="get"||u==="set")&&this.raise(Tt.DeclareAccessor,n,{kind:u}),l&&(n.typeParameters=l),super.pushClassMethod(r,n,a,i,s,o)}pushClassPrivateMethod(r,n,a,i){let s=this.tsTryParseTypeParameters(this.tsParseConstModifier);s&&(n.typeParameters=s),super.pushClassPrivateMethod(r,n,a,i)}declareClassPrivateMethodInScope(r,n){r.type!=="TSDeclareMethod"&&(r.type==="MethodDefinition"&&r.value.body==null||super.declareClassPrivateMethodInScope(r,n))}parseClassSuper(r){super.parseClassSuper(r),r.superClass&&(this.match(47)||this.match(51))&&(r.superTypeParameters=this.tsParseTypeArgumentsInExpression()),this.eatContextual(113)&&(r.implements=this.tsParseHeritageClause("implements"))}parseObjPropValue(r,n,a,i,s,o,l){let c=this.tsTryParseTypeParameters(this.tsParseConstModifier);return c&&(r.typeParameters=c),super.parseObjPropValue(r,n,a,i,s,o,l)}parseFunctionParams(r,n){let a=this.tsTryParseTypeParameters(this.tsParseConstModifier);a&&(r.typeParameters=a),super.parseFunctionParams(r,n)}parseVarId(r,n){super.parseVarId(r,n),r.id.type==="Identifier"&&!this.hasPrecedingLineBreak()&&this.eat(35)&&(r.definite=!0);let a=this.tsTryParseTypeAnnotation();a&&(r.id.typeAnnotation=a,this.resetEndLocation(r.id))}parseAsyncArrowFromCallExpression(r,n){return this.match(14)&&(r.returnType=this.tsParseTypeAnnotation()),super.parseAsyncArrowFromCallExpression(r,n)}parseMaybeAssign(r,n){var a,i,s,o,l;let c,u,d;if(this.hasPlugin("jsx")&&(this.match(143)||this.match(47))){if(c=this.state.clone(),u=this.tryParse(()=>super.parseMaybeAssign(r,n),c),!u.error)return u.node;let{context:m}=this.state,h=m[m.length-1];(h===tn.j_oTag||h===tn.j_expr)&&m.pop()}if(!((a=u)!=null&&a.error)&&!this.match(47))return super.parseMaybeAssign(r,n);(!c||c===this.state)&&(c=this.state.clone());let f,p=this.tryParse(m=>{var h,x;f=this.tsParseTypeParameters(this.tsParseConstModifier);let g=super.parseMaybeAssign(r,n);return(g.type!=="ArrowFunctionExpression"||(h=g.extra)!=null&&h.parenthesized)&&m(),((x=f)==null?void 0:x.params.length)!==0&&this.resetStartLocationFromNode(g,f),g.typeParameters=f,g},c);if(!p.error&&!p.aborted)return f&&this.reportReservedArrowTypeParam(f),p.node;if(!u&&(tV(!this.hasPlugin("jsx")),d=this.tryParse(()=>super.parseMaybeAssign(r,n),c),!d.error))return d.node;if((i=u)!=null&&i.node)return this.state=u.failState,u.node;if(p.node)return this.state=p.failState,f&&this.reportReservedArrowTypeParam(f),p.node;if((s=d)!=null&&s.node)return this.state=d.failState,d.node;throw((o=u)==null?void 0:o.error)||p.error||((l=d)==null?void 0:l.error)}reportReservedArrowTypeParam(r){var n;r.params.length===1&&!r.params[0].constraint&&!((n=r.extra)!=null&&n.trailingComma)&&this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(Tt.ReservedArrowTypeParam,r)}parseMaybeUnary(r,n){return!this.hasPlugin("jsx")&&this.match(47)?this.tsParseTypeAssertion():super.parseMaybeUnary(r,n)}parseArrow(r){if(this.match(14)){let n=this.tryParse(a=>{let i=this.tsParseTypeOrTypePredicateAnnotation(14);return(this.canInsertSemicolon()||!this.match(19))&&a(),i});if(n.aborted)return;n.thrown||(n.error&&(this.state=n.failState),r.returnType=n.node)}return super.parseArrow(r)}parseFunctionParamType(r){this.eat(17)&&(r.optional=!0);let n=this.tsTryParseTypeAnnotation();return n&&(r.typeAnnotation=n),this.resetEndLocation(r),r}isAssignable(r,n){switch(r.type){case"TSTypeCastExpression":return this.isAssignable(r.expression,n);case"TSParameterProperty":return!0;default:return super.isAssignable(r,n)}}toAssignable(r,n=!1){switch(r.type){case"ParenthesizedExpression":this.toAssignableParenthesizedExpression(r,n);break;case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":n?this.expressionScope.recordArrowParameterBindingError(Tt.UnexpectedTypeCastInParameter,r):this.raise(Tt.UnexpectedTypeCastInParameter,r),this.toAssignable(r.expression,n);break;case"AssignmentExpression":!n&&r.left.type==="TSTypeCastExpression"&&(r.left=this.typeCastToParameter(r.left));default:super.toAssignable(r,n)}}toAssignableParenthesizedExpression(r,n){switch(r.expression.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":case"ParenthesizedExpression":this.toAssignable(r.expression,n);break;default:super.toAssignable(r,n)}}checkToRestConversion(r,n){switch(r.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":this.checkToRestConversion(r.expression,!1);break;default:super.checkToRestConversion(r,n)}}isValidLVal(r,n,a,i){switch(r){case"TSTypeCastExpression":return!0;case"TSParameterProperty":return"parameter";case"TSNonNullExpression":return"expression";case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":return(i!==64||!a)&&["expression",!0];default:return super.isValidLVal(r,n,a,i)}}parseBindingAtom(){return this.state.type===78?this.parseIdentifier(!0):super.parseBindingAtom()}parseMaybeDecoratorArguments(r,n){if(this.match(47)||this.match(51)){let a=this.tsParseTypeArgumentsInExpression();if(this.match(10)){let i=super.parseMaybeDecoratorArguments(r,n);return i.typeParameters=a,i}this.unexpected(null,10)}return super.parseMaybeDecoratorArguments(r,n)}checkCommaAfterRest(r){return this.state.isAmbientContext&&this.match(12)&&this.lookaheadCharCode()===r?(this.next(),!1):super.checkCommaAfterRest(r)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(35)||this.match(14)||super.isClassProperty()}parseMaybeDefault(r,n){let a=super.parseMaybeDefault(r,n);return a.type==="AssignmentPattern"&&a.typeAnnotation&&a.right.start<a.typeAnnotation.start&&this.raise(Tt.TypeAnnotationAfterAssign,a.typeAnnotation),a}getTokenFromCode(r){if(this.state.inType){if(r===62){this.finishOp(48,1);return}if(r===60){this.finishOp(47,1);return}}super.getTokenFromCode(r)}reScan_lt_gt(){let{type:r}=this.state;r===47?(this.state.pos-=1,this.readToken_lt()):r===48&&(this.state.pos-=1,this.readToken_gt())}reScan_lt(){let{type:r}=this.state;return r===51?(this.state.pos-=2,this.finishOp(47,1),47):r}toAssignableListItem(r,n,a){let i=r[n];i.type==="TSTypeCastExpression"&&(r[n]=this.typeCastToParameter(i)),super.toAssignableListItem(r,n,a)}typeCastToParameter(r){return r.expression.typeAnnotation=r.typeAnnotation,this.resetEndLocation(r.expression,r.typeAnnotation.loc.end),r.expression}shouldParseArrow(r){return this.match(14)?r.every(n=>this.isAssignable(n,!0)):super.shouldParseArrow(r)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}canHaveLeadingDecorator(){return super.canHaveLeadingDecorator()||this.isAbstractClass()}jsxParseOpeningElementAfterName(r){if(this.match(47)||this.match(51)){let n=this.tsTryParseAndCatch(()=>this.tsParseTypeArgumentsInExpression());n&&(r.typeParameters=n)}return super.jsxParseOpeningElementAfterName(r)}getGetterSetterExpectedParamCount(r){let n=super.getGetterSetterExpectedParamCount(r),i=this.getObjectOrClassMethodParams(r)[0];return i&&this.isThisParam(i)?n+1:n}parseCatchClauseParam(){let r=super.parseCatchClauseParam(),n=this.tsTryParseTypeAnnotation();return n&&(r.typeAnnotation=n,this.resetEndLocation(r)),r}tsInAmbientContext(r){let{isAmbientContext:n,strict:a}=this.state;this.state.isAmbientContext=!0,this.state.strict=!1;try{return r()}finally{this.state.isAmbientContext=n,this.state.strict=a}}parseClass(r,n,a){let i=this.state.inAbstractClass;this.state.inAbstractClass=!!r.abstract;try{return super.parseClass(r,n,a)}finally{this.state.inAbstractClass=i}}tsParseAbstractDeclaration(r,n){if(this.match(80))return r.abstract=!0,this.maybeTakeDecorators(n,this.parseClass(r,!0,!1));if(this.isContextual(129))return this.hasFollowingLineBreak()?null:(r.abstract=!0,this.raise(Tt.NonClassMethodPropertyHasAbstractModifier,r),this.tsParseInterfaceDeclaration(r));throw this.unexpected(null,80)}parseMethod(r,n,a,i,s,o,l){let c=super.parseMethod(r,n,a,i,s,o,l);if((c.abstract||c.type==="TSAbstractMethodDefinition")&&(this.hasPlugin("estree")?c.value:c).body){let{key:f}=c;this.raise(Tt.AbstractMethodHasImplementation,c,{methodName:f.type==="Identifier"&&!c.computed?f.name:`[${this.input.slice(this.offsetToSourcePos(f.start),this.offsetToSourcePos(f.end))}]`})}return c}tsParseTypeParameterName(){return this.parseIdentifier().name}shouldParseAsAmbientContext(){return!!this.getPluginOption("typescript","dts")}parse(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.parse()}getExpression(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.getExpression()}parseExportSpecifier(r,n,a,i){return!n&&i?(this.parseTypeOnlyImportExportSpecifier(r,!1,a),this.finishNode(r,"ExportSpecifier")):(r.exportKind="value",super.parseExportSpecifier(r,n,a,i))}parseImportSpecifier(r,n,a,i,s){return!n&&i?(this.parseTypeOnlyImportExportSpecifier(r,!0,a),this.finishNode(r,"ImportSpecifier")):(r.importKind="value",super.parseImportSpecifier(r,n,a,i,a?4098:4096))}parseTypeOnlyImportExportSpecifier(r,n,a){let i=n?"imported":"local",s=n?"local":"exported",o=r[i],l,c=!1,u=!0,d=o.loc.start;if(this.isContextual(93)){let p=this.parseIdentifier();if(this.isContextual(93)){let m=this.parseIdentifier();pc(this.state.type)?(c=!0,o=p,l=n?this.parseIdentifier():this.parseModuleExportName(),u=!1):(l=m,u=!1)}else pc(this.state.type)?(u=!1,l=n?this.parseIdentifier():this.parseModuleExportName()):(c=!0,o=p)}else pc(this.state.type)&&(c=!0,n?(o=this.parseIdentifier(!0),this.isContextual(93)||this.checkReservedWord(o.name,o.loc.start,!0,!0)):o=this.parseModuleExportName());c&&a&&this.raise(n?Tt.TypeModifierIsUsedInTypeImports:Tt.TypeModifierIsUsedInTypeExports,d),r[i]=o,r[s]=l;let f=n?"importKind":"exportKind";r[f]=c?"type":"value",u&&this.eatContextual(93)&&(r[s]=n?this.parseIdentifier():this.parseModuleExportName()),r[s]||(r[s]=this.cloneIdentifier(r[i])),n&&this.checkIdentifier(r[s],c?4098:4096)}fillOptionalPropertiesForTSESLint(r){var n,a,i,s,o,l,c,u,d,f,p,m,h,x,g,y,b,S,w,E,C,N,_,O,D,W,Z,me,Q,V,U,k,L,M,ee,se,ne,ge,ue,H,I,K,he,q,be,Ie,Ne,He;switch(r.type){case"ExpressionStatement":(n=r.directive)!=null||(r.directive=void 0);return;case"RestElement":r.value=void 0;case"Identifier":case"ArrayPattern":case"AssignmentPattern":case"ObjectPattern":(a=r.decorators)!=null||(r.decorators=[]),(i=r.optional)!=null||(r.optional=!1),(s=r.typeAnnotation)!=null||(r.typeAnnotation=void 0);return;case"TSParameterProperty":(o=r.accessibility)!=null||(r.accessibility=void 0),(l=r.decorators)!=null||(r.decorators=[]),(c=r.override)!=null||(r.override=!1),(u=r.readonly)!=null||(r.readonly=!1),(d=r.static)!=null||(r.static=!1);return;case"TSEmptyBodyFunctionExpression":r.body=null;case"TSDeclareFunction":case"FunctionDeclaration":case"FunctionExpression":case"ClassMethod":case"ClassPrivateMethod":(f=r.declare)!=null||(r.declare=!1),(p=r.returnType)!=null||(r.returnType=void 0),(m=r.typeParameters)!=null||(r.typeParameters=void 0);return;case"Property":(h=r.optional)!=null||(r.optional=!1);return;case"TSMethodSignature":case"TSPropertySignature":(x=r.optional)!=null||(r.optional=!1);case"TSIndexSignature":(g=r.accessibility)!=null||(r.accessibility=void 0),(y=r.readonly)!=null||(r.readonly=!1),(b=r.static)!=null||(r.static=!1);return;case"TSAbstractPropertyDefinition":case"PropertyDefinition":case"TSAbstractAccessorProperty":case"AccessorProperty":(S=r.declare)!=null||(r.declare=!1),(w=r.definite)!=null||(r.definite=!1),(E=r.readonly)!=null||(r.readonly=!1),(C=r.typeAnnotation)!=null||(r.typeAnnotation=void 0);case"TSAbstractMethodDefinition":case"MethodDefinition":(N=r.accessibility)!=null||(r.accessibility=void 0),(_=r.decorators)!=null||(r.decorators=[]),(O=r.override)!=null||(r.override=!1),(D=r.optional)!=null||(r.optional=!1);return;case"ClassExpression":(W=r.id)!=null||(r.id=null);case"ClassDeclaration":(Z=r.abstract)!=null||(r.abstract=!1),(me=r.declare)!=null||(r.declare=!1),(Q=r.decorators)!=null||(r.decorators=[]),(V=r.implements)!=null||(r.implements=[]),(U=r.superTypeArguments)!=null||(r.superTypeArguments=void 0),(k=r.typeParameters)!=null||(r.typeParameters=void 0);return;case"TSTypeAliasDeclaration":case"VariableDeclaration":(L=r.declare)!=null||(r.declare=!1);return;case"VariableDeclarator":(M=r.definite)!=null||(r.definite=!1);return;case"TSEnumDeclaration":(ee=r.const)!=null||(r.const=!1),(se=r.declare)!=null||(r.declare=!1);return;case"TSEnumMember":(ne=r.computed)!=null||(r.computed=!1);return;case"TSImportType":(ge=r.qualifier)!=null||(r.qualifier=null),(ue=r.options)!=null||(r.options=null);return;case"TSInterfaceDeclaration":(H=r.declare)!=null||(r.declare=!1),(I=r.extends)!=null||(r.extends=[]);return;case"TSMappedType":(K=r.optional)!=null||(r.optional=!1),(he=r.readonly)!=null||(r.readonly=void 0);return;case"TSModuleDeclaration":(q=r.declare)!=null||(r.declare=!1),(be=r.global)!=null||(r.global=r.kind==="global");return;case"TSTypeParameter":(Ie=r.const)!=null||(r.const=!1),(Ne=r.in)!=null||(r.in=!1),(He=r.out)!=null||(r.out=!1);return}}chStartsBindingIdentifierAndNotRelationalOperator(r,n){if(Xc(r)){if(sL.lastIndex=n,sL.test(this.input)){let a=this.codePointAtPos(sL.lastIndex);if(!Bm(a)&&a!==92)return!1}return!0}else return r===92}nextTokenIsIdentifierAndNotTSRelationalOperatorOnSameLine(){let r=this.nextTokenInLineStart(),n=this.codePointAtPos(r);return this.chStartsBindingIdentifierAndNotRelationalOperator(n,r)}nextTokenIsIdentifierOrStringLiteralOnSameLine(){let r=this.nextTokenInLineStart(),n=this.codePointAtPos(r);return this.chStartsBindingIdentifier(n,r)||n===34||n===39}};function sye(e){if(e.type!=="MemberExpression")return!1;let{computed:t,property:r}=e;return t&&r.type!=="StringLiteral"&&(r.type!=="TemplateLiteral"||r.expressions.length>0)?!1:bV(e.object)}function oye(e,t){var r;let{type:n}=e;if((r=e.extra)!=null&&r.parenthesized)return!1;if(t){if(n==="Literal"){let{value:a}=e;if(typeof a=="string"||typeof a=="boolean")return!0}}else if(n==="StringLiteral"||n==="BooleanLiteral")return!0;return!!(xV(e,t)||lye(e,t)||n==="TemplateLiteral"&&e.expressions.length===0||sye(e))}function xV(e,t){return t?e.type==="Literal"&&(typeof e.value=="number"||"bigint"in e):e.type==="NumericLiteral"||e.type==="BigIntLiteral"}function lye(e,t){if(e.type==="UnaryExpression"){let{operator:r,argument:n}=e;if(r==="-"&&xV(n,t))return!0}return!1}function bV(e){return e.type==="Identifier"?!0:e.type!=="MemberExpression"||e.computed?!1:bV(e.object)}var nV=Wc`placeholders`({ClassNameIsRequired:"A class name is required.",UnexpectedSpace:"Unexpected space in placeholder."}),cye=e=>class extends e{parsePlaceholder(r){if(this.match(133)){let n=this.startNode();return this.next(),this.assertNoSpace(),n.name=super.parseIdentifier(!0),this.assertNoSpace(),this.expect(133),this.finishPlaceholder(n,r)}}finishPlaceholder(r,n){let a=r;return(!a.expectedNode||!a.type)&&(a=this.finishNode(a,"Placeholder")),a.expectedNode=n,a}getTokenFromCode(r){r===37&&this.input.charCodeAt(this.state.pos+1)===37?this.finishOp(133,2):super.getTokenFromCode(r)}parseExprAtom(r){return this.parsePlaceholder("Expression")||super.parseExprAtom(r)}parseIdentifier(r){return this.parsePlaceholder("Identifier")||super.parseIdentifier(r)}checkReservedWord(r,n,a,i){r!==void 0&&super.checkReservedWord(r,n,a,i)}cloneIdentifier(r){let n=super.cloneIdentifier(r);return n.type==="Placeholder"&&(n.expectedNode=r.expectedNode),n}cloneStringLiteral(r){return r.type==="Placeholder"?this.cloneIdentifier(r):super.cloneStringLiteral(r)}parseBindingAtom(){return this.parsePlaceholder("Pattern")||super.parseBindingAtom()}isValidLVal(r,n,a,i){return r==="Placeholder"||super.isValidLVal(r,n,a,i)}toAssignable(r,n){r&&r.type==="Placeholder"&&r.expectedNode==="Expression"?r.expectedNode="Pattern":super.toAssignable(r,n)}chStartsBindingIdentifier(r,n){if(super.chStartsBindingIdentifier(r,n))return!0;let a=this.nextTokenStart();return this.input.charCodeAt(a)===37&&this.input.charCodeAt(a+1)===37}verifyBreakContinue(r,n){r.label&&r.label.type==="Placeholder"||super.verifyBreakContinue(r,n)}parseExpressionStatement(r,n){var a;if(n.type!=="Placeholder"||(a=n.extra)!=null&&a.parenthesized)return super.parseExpressionStatement(r,n);if(this.match(14)){let s=r;return s.label=this.finishPlaceholder(n,"Identifier"),this.next(),s.body=super.parseStatementOrSloppyAnnexBFunctionDeclaration(),this.finishNode(s,"LabeledStatement")}this.semicolon();let i=r;return i.name=n.name,this.finishPlaceholder(i,"Statement")}parseBlock(r,n,a){return this.parsePlaceholder("BlockStatement")||super.parseBlock(r,n,a)}parseFunctionId(r){return this.parsePlaceholder("Identifier")||super.parseFunctionId(r)}parseClass(r,n,a){let i=n?"ClassDeclaration":"ClassExpression";this.next();let s=this.state.strict,o=this.parsePlaceholder("Identifier");if(o)if(this.match(81)||this.match(133)||this.match(5))r.id=o;else{if(a||!n)return r.id=null,r.body=this.finishPlaceholder(o,"ClassBody"),this.finishNode(r,i);throw this.raise(nV.ClassNameIsRequired,this.state.startLoc)}else this.parseClassId(r,n,a);return super.parseClassSuper(r),r.body=this.parsePlaceholder("ClassBody")||super.parseClassBody(!!r.superClass,s),this.finishNode(r,i)}parseExport(r,n){let a=this.parsePlaceholder("Identifier");if(!a)return super.parseExport(r,n);let i=r;if(!this.isContextual(98)&&!this.match(12))return i.specifiers=[],i.source=null,i.declaration=this.finishPlaceholder(a,"Declaration"),this.finishNode(i,"ExportNamedDeclaration");this.expectPlugin("exportDefaultFrom");let s=this.startNode();return s.exported=a,i.specifiers=[this.finishNode(s,"ExportDefaultSpecifier")],super.parseExport(i,n)}isExportDefaultSpecifier(){if(this.match(65)){let r=this.nextTokenStart();if(this.isUnparsedContextual(r,"from")&&this.input.startsWith(kf(133),this.nextTokenStartSince(r+4)))return!0}return super.isExportDefaultSpecifier()}maybeParseExportDefaultSpecifier(r,n){var a;return(a=r.specifiers)!=null&&a.length?!0:super.maybeParseExportDefaultSpecifier(r,n)}checkExport(r){let{specifiers:n}=r;n!=null&&n.length&&(r.specifiers=n.filter(a=>a.exported.type==="Placeholder")),super.checkExport(r),r.specifiers=n}parseImport(r){let n=this.parsePlaceholder("Identifier");if(!n)return super.parseImport(r);if(r.specifiers=[],!this.isContextual(98)&&!this.match(12))return r.source=this.finishPlaceholder(n,"StringLiteral"),this.semicolon(),this.finishNode(r,"ImportDeclaration");let a=this.startNodeAtNode(n);return a.local=n,r.specifiers.push(this.finishNode(a,"ImportDefaultSpecifier")),this.eat(12)&&(this.maybeParseStarImportSpecifier(r)||this.parseNamedImportSpecifiers(r)),this.expectContextual(98),r.source=this.parseImportSource(),this.semicolon(),this.finishNode(r,"ImportDeclaration")}parseImportSource(){return this.parsePlaceholder("StringLiteral")||super.parseImportSource()}assertNoSpace(){this.state.start>this.offsetToSourcePos(this.state.lastTokEndLoc.index)&&this.raise(nV.UnexpectedSpace,this.state.lastTokEndLoc)}},uye=e=>class extends e{parseV8Intrinsic(){if(this.match(54)){let r=this.state.startLoc,n=this.startNode();if(this.next(),ln(this.state.type)){let a=this.parseIdentifierName(),i=this.createIdentifier(n,a);if(this.castNodeTo(i,"V8IntrinsicIdentifier"),this.match(10))return i}this.unexpected(r)}}parseExprAtom(r){return this.parseV8Intrinsic()||super.parseExprAtom(r)}},aV=["minimal","fsharp","hack","smart"],iV=["^^","@@","^","%","#"];function dye(e){if(e.has("decorators")){if(e.has("decorators-legacy"))throw new Error("Cannot use the decorators and decorators-legacy plugin together");let n=e.get("decorators").decoratorsBeforeExport;if(n!=null&&typeof n!="boolean")throw new Error("'decoratorsBeforeExport' must be a boolean, if specified.");let a=e.get("decorators").allowCallParenthesized;if(a!=null&&typeof a!="boolean")throw new Error("'allowCallParenthesized' must be a boolean.")}if(e.has("flow")&&e.has("typescript"))throw new Error("Cannot combine flow and typescript plugins.");if(e.has("placeholders")&&e.has("v8intrinsic"))throw new Error("Cannot combine placeholders and v8intrinsic plugins.");if(e.has("pipelineOperator")){var t;let n=e.get("pipelineOperator").proposal;if(!aV.includes(n)){let a=aV.map(i=>`"${i}"`).join(", ");throw new Error(`"pipelineOperator" requires "proposal" option whose value must be one of: ${a}.`)}if(n==="hack"){if(e.has("placeholders"))throw new Error("Cannot combine placeholders plugin and Hack-style pipes.");if(e.has("v8intrinsic"))throw new Error("Cannot combine v8intrinsic plugin and Hack-style pipes.");let a=e.get("pipelineOperator").topicToken;if(!iV.includes(a)){let i=iV.map(s=>`"${s}"`).join(", ");throw new Error(`"pipelineOperator" in "proposal": "hack" mode also requires a "topicToken" option whose value must be one of: ${i}.`)}{var r;if(a==="#"&&((r=e.get("recordAndTuple"))==null?void 0:r.syntaxType)==="hash")throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "hack", topicToken: "#" }]\` and \`${JSON.stringify(["recordAndTuple",e.get("recordAndTuple")])}\`.`)}}else if(n==="smart"&&((t=e.get("recordAndTuple"))==null?void 0:t.syntaxType)==="hash")throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "smart" }]\` and \`${JSON.stringify(["recordAndTuple",e.get("recordAndTuple")])}\`.`)}if(e.has("moduleAttributes")){if(e.has("deprecatedImportAssert")||e.has("importAssertions"))throw new Error("Cannot combine importAssertions, deprecatedImportAssert and moduleAttributes plugins.");if(e.get("moduleAttributes").version!=="may-2020")throw new Error("The 'moduleAttributes' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is 'may-2020'.")}if(e.has("importAssertions")&&e.has("deprecatedImportAssert"))throw new Error("Cannot combine importAssertions and deprecatedImportAssert plugins.");if(!e.has("deprecatedImportAssert")&&e.has("importAttributes")&&e.get("importAttributes").deprecatedAssertSyntax&&e.set("deprecatedImportAssert",{}),e.has("recordAndTuple")){let n=e.get("recordAndTuple").syntaxType;if(n!=null){let a=["hash","bar"];if(!a.includes(n))throw new Error("The 'syntaxType' option of the 'recordAndTuple' plugin must be one of: "+a.map(i=>`'${i}'`).join(", "))}}if(e.has("asyncDoExpressions")&&!e.has("doExpressions")){let n=new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.");throw n.missingPlugins="doExpressions",n}if(e.has("optionalChainingAssign")&&e.get("optionalChainingAssign").version!=="2023-07")throw new Error("The 'optionalChainingAssign' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is '2023-07'.");if(e.has("discardBinding")&&e.get("discardBinding").syntaxType!=="void")throw new Error("The 'discardBinding' plugin requires a 'syntaxType' option. Currently the only supported value is 'void'.")}var vV={estree:hge,jsx:Kge,flow:Vge,typescript:iye,v8intrinsic:uye,placeholders:cye},fye=Object.keys(vV),IL=class extends EL{checkProto(t,r,n,a){if(t.type==="SpreadElement"||this.isObjectMethod(t)||t.computed||t.shorthand)return n;let i=t.key;return(i.type==="Identifier"?i.name:i.value)==="__proto__"?r?(this.raise(Y.RecordNoProto,i),!0):(n&&(a?a.doubleProtoLoc===null&&(a.doubleProtoLoc=i.loc.start):this.raise(Y.DuplicateProto,i)),!0):n}shouldExitDescending(t,r){return t.type==="ArrowFunctionExpression"&&this.offsetToSourcePos(t.start)===r}getExpression(){if(this.enterInitialScopes(),this.nextToken(),this.match(140))throw this.raise(Y.ParseExpressionEmptyInput,this.state.startLoc);let t=this.parseExpression();if(!this.match(140))throw this.raise(Y.ParseExpressionExpectsEOF,this.state.startLoc,{unexpected:this.input.codePointAt(this.state.start)});return this.finalizeRemainingComments(),t.comments=this.comments,t.errors=this.state.errors,this.optionFlags&256&&(t.tokens=this.tokens),t}parseExpression(t,r){return t?this.disallowInAnd(()=>this.parseExpressionBase(r)):this.allowInAnd(()=>this.parseExpressionBase(r))}parseExpressionBase(t){let r=this.state.startLoc,n=this.parseMaybeAssign(t);if(this.match(12)){let a=this.startNodeAt(r);for(a.expressions=[n];this.eat(12);)a.expressions.push(this.parseMaybeAssign(t));return this.toReferencedList(a.expressions),this.finishNode(a,"SequenceExpression")}return n}parseMaybeAssignDisallowIn(t,r){return this.disallowInAnd(()=>this.parseMaybeAssign(t,r))}parseMaybeAssignAllowIn(t,r){return this.allowInAnd(()=>this.parseMaybeAssign(t,r))}setOptionalParametersError(t){t.optionalParametersLoc=this.state.startLoc}parseMaybeAssign(t,r){let n=this.state.startLoc,a=this.isContextual(108);if(a&&this.prodParam.hasYield){this.next();let l=this.parseYield(n);return r&&(l=r.call(this,l,n)),l}let i;t?i=!1:(t=new my,i=!0);let{type:s}=this.state;(s===10||ln(s))&&(this.state.potentialArrowAt=this.state.start);let o=this.parseMaybeConditional(t);if(r&&(o=r.call(this,o,n)),vge(this.state.type)){let l=this.startNodeAt(n),c=this.state.value;if(l.operator=c,this.match(29)){this.toAssignable(o,!0),l.left=o;let u=n.index;t.doubleProtoLoc!=null&&t.doubleProtoLoc.index>=u&&(t.doubleProtoLoc=null),t.shorthandAssignLoc!=null&&t.shorthandAssignLoc.index>=u&&(t.shorthandAssignLoc=null),t.privateKeyLoc!=null&&t.privateKeyLoc.index>=u&&(this.checkDestructuringPrivate(t),t.privateKeyLoc=null),t.voidPatternLoc!=null&&t.voidPatternLoc.index>=u&&(t.voidPatternLoc=null)}else l.left=o;return this.next(),l.right=this.parseMaybeAssign(),this.checkLVal(o,this.finishNode(l,"AssignmentExpression"),void 0,void 0,void 0,void 0,c==="||="||c==="&&="||c==="??="),l}else i&&this.checkExpressionErrors(t,!0);if(a){let{type:l}=this.state;if((this.hasPlugin("v8intrinsic")?m0(l):m0(l)&&!this.match(54))&&!this.isAmbiguousPrefixOrIdentifier())return this.raiseOverwrite(Y.YieldNotInGeneratorFunction,n),this.parseYield(n)}return o}parseMaybeConditional(t){let r=this.state.startLoc,n=this.state.potentialArrowAt,a=this.parseExprOps(t);return this.shouldExitDescending(a,n)?a:this.parseConditional(a,r,t)}parseConditional(t,r,n){if(this.eat(17)){let a=this.startNodeAt(r);return a.test=t,a.consequent=this.parseMaybeAssignAllowIn(),this.expect(14),a.alternate=this.parseMaybeAssign(),this.finishNode(a,"ConditionalExpression")}return t}parseMaybeUnaryOrPrivate(t){return this.match(139)?this.parsePrivateName():this.parseMaybeUnary(t)}parseExprOps(t){let r=this.state.startLoc,n=this.state.potentialArrowAt,a=this.parseMaybeUnaryOrPrivate(t);return this.shouldExitDescending(a,n)?a:this.parseExprOp(a,r,-1)}parseExprOp(t,r,n){if(this.isPrivateName(t)){let i=this.getPrivateNameSV(t);(n>=m1(58)||!this.prodParam.hasIn||!this.match(58))&&this.raise(Y.PrivateInExpectedIn,t,{identifierName:i}),this.classScope.usePrivateName(i,t.loc.start)}let a=this.state.type;if(Tge(a)&&(this.prodParam.hasIn||!this.match(58))){let i=m1(a);if(i>n){if(a===39){if(this.expectPlugin("pipelineOperator"),this.state.inFSharpPipelineDirectBody)return t;this.checkPipelineAtInfixOperator(t,r)}let s=this.startNodeAt(r);s.left=t,s.operator=this.state.value;let o=a===41||a===42,l=a===40;if(l&&(i=m1(42)),this.next(),a===39&&this.hasPlugin(["pipelineOperator",{proposal:"minimal"}])&&this.state.type===96&&this.prodParam.hasAwait)throw this.raise(Y.UnexpectedAwaitAfterPipelineBody,this.state.startLoc);s.right=this.parseExprOpRightExpr(a,i);let c=this.finishNode(s,o||l?"LogicalExpression":"BinaryExpression"),u=this.state.type;if(l&&(u===41||u===42)||o&&u===40)throw this.raise(Y.MixingCoalesceWithLogical,this.state.startLoc);return this.parseExprOp(c,r,n)}}return t}parseExprOpRightExpr(t,r){let n=this.state.startLoc;switch(t){case 39:switch(this.getPluginOption("pipelineOperator","proposal")){case"hack":return this.withTopicBindingContext(()=>this.parseHackPipeBody());case"fsharp":return this.withSoloAwaitPermittingContext(()=>this.parseFSharpPipelineBody(r))}if(this.getPluginOption("pipelineOperator","proposal")==="smart")return this.withTopicBindingContext(()=>{if(this.prodParam.hasYield&&this.isContextual(108))throw this.raise(Y.PipeBodyIsTighter,this.state.startLoc);return this.parseSmartPipelineBodyInStyle(this.parseExprOpBaseRightExpr(t,r),n)});default:return this.parseExprOpBaseRightExpr(t,r)}}parseExprOpBaseRightExpr(t,r){let n=this.state.startLoc;return this.parseExprOp(this.parseMaybeUnaryOrPrivate(),n,Ige(t)?r-1:r)}parseHackPipeBody(){var t;let{startLoc:r}=this.state,n=this.parseMaybeAssign();return lge.has(n.type)&&!((t=n.extra)!=null&&t.parenthesized)&&this.raise(Y.PipeUnparenthesizedBody,r,{type:n.type}),this.topicReferenceWasUsedInCurrentContext()||this.raise(Y.PipeTopicUnused,r),n}checkExponentialAfterUnary(t){this.match(57)&&this.raise(Y.UnexpectedTokenUnaryExponentiation,t.argument)}parseMaybeUnary(t,r){let n=this.state.startLoc,a=this.isContextual(96);if(a&&this.recordAwaitIfAllowed()){this.next();let l=this.parseAwait(n);return r||this.checkExponentialAfterUnary(l),l}let i=this.match(34),s=this.startNode();if(Cge(this.state.type)){s.operator=this.state.value,s.prefix=!0,this.match(72)&&this.expectPlugin("throwExpressions");let l=this.match(89);if(this.next(),s.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(t,!0),this.state.strict&&l){let c=s.argument;c.type==="Identifier"?this.raise(Y.StrictDelete,s):this.hasPropertyAsPrivateName(c)&&this.raise(Y.DeletePrivateField,s)}if(!i)return r||this.checkExponentialAfterUnary(s),this.finishNode(s,"UnaryExpression")}let o=this.parseUpdate(s,i,t);if(a){let{type:l}=this.state;if((this.hasPlugin("v8intrinsic")?m0(l):m0(l)&&!this.match(54))&&!this.isAmbiguousPrefixOrIdentifier())return this.raiseOverwrite(Y.AwaitNotInAsyncContext,n),this.parseAwait(n)}return o}parseUpdate(t,r,n){if(r){let s=t;return this.checkLVal(s.argument,this.finishNode(s,"UpdateExpression")),t}let a=this.state.startLoc,i=this.parseExprSubscripts(n);if(this.checkExpressionErrors(n,!1))return i;for(;wge(this.state.type)&&!this.canInsertSemicolon();){let s=this.startNodeAt(a);s.operator=this.state.value,s.prefix=!1,s.argument=i,this.next(),this.checkLVal(i,i=this.finishNode(s,"UpdateExpression"))}return i}parseExprSubscripts(t){let r=this.state.startLoc,n=this.state.potentialArrowAt,a=this.parseExprAtom(t);return this.shouldExitDescending(a,n)?a:this.parseSubscripts(a,r)}parseSubscripts(t,r,n){let a={optionalChainMember:!1,maybeAsyncArrow:this.atPossibleAsyncArrow(t),stop:!1};do t=this.parseSubscript(t,r,n,a),a.maybeAsyncArrow=!1;while(!a.stop);return t}parseSubscript(t,r,n,a){let{type:i}=this.state;if(!n&&i===15)return this.parseBind(t,r,n,a);if(y1(i))return this.parseTaggedTemplateExpression(t,r,a);let s=!1;if(i===18){if(n&&(this.raise(Y.OptionalChainingNoNew,this.state.startLoc),this.lookaheadCharCode()===40))return this.stopParseSubscript(t,a);a.optionalChainMember=s=!0,this.next()}if(!n&&this.match(10))return this.parseCoverCallAndAsyncArrowHead(t,r,a,s);{let o=this.eat(0);return o||s||this.eat(16)?this.parseMember(t,r,a,o,s):this.stopParseSubscript(t,a)}}stopParseSubscript(t,r){return r.stop=!0,t}parseMember(t,r,n,a,i){let s=this.startNodeAt(r);return s.object=t,s.computed=a,a?(s.property=this.parseExpression(),this.expect(3)):this.match(139)?(t.type==="Super"&&this.raise(Y.SuperPrivateField,r),this.classScope.usePrivateName(this.state.value,this.state.startLoc),s.property=this.parsePrivateName()):s.property=this.parseIdentifier(!0),n.optionalChainMember?(s.optional=i,this.finishNode(s,"OptionalMemberExpression")):this.finishNode(s,"MemberExpression")}parseBind(t,r,n,a){let i=this.startNodeAt(r);return i.object=t,this.next(),i.callee=this.parseNoCallExpr(),a.stop=!0,this.parseSubscripts(this.finishNode(i,"BindExpression"),r,n)}parseCoverCallAndAsyncArrowHead(t,r,n,a){let i=this.state.maybeInArrowParameters,s=null;this.state.maybeInArrowParameters=!0,this.next();let o=this.startNodeAt(r);o.callee=t;let{maybeAsyncArrow:l,optionalChainMember:c}=n;l&&(this.expressionScope.enter(tye()),s=new my),c&&(o.optional=a),a?o.arguments=this.parseCallExpressionArguments():o.arguments=this.parseCallExpressionArguments(t.type!=="Super",o,s);let u=this.finishCallExpression(o,c);return l&&this.shouldParseAsyncArrow()&&!a?(n.stop=!0,this.checkDestructuringPrivate(s),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),u=this.parseAsyncArrowFromCallExpression(this.startNodeAt(r),u)):(l&&(this.checkExpressionErrors(s,!0),this.expressionScope.exit()),this.toReferencedArguments(u)),this.state.maybeInArrowParameters=i,u}toReferencedArguments(t,r){this.toReferencedListDeep(t.arguments,r)}parseTaggedTemplateExpression(t,r,n){let a=this.startNodeAt(r);return a.tag=t,a.quasi=this.parseTemplate(!0),n.optionalChainMember&&this.raise(Y.OptionalChainingNoTemplate,r),this.finishNode(a,"TaggedTemplateExpression")}atPossibleAsyncArrow(t){return t.type==="Identifier"&&t.name==="async"&&this.state.lastTokEndLoc.index===t.end&&!this.canInsertSemicolon()&&t.end-t.start===5&&this.offsetToSourcePos(t.start)===this.state.potentialArrowAt}finishCallExpression(t,r){if(t.callee.type==="Import")if(t.arguments.length===0||t.arguments.length>2)this.raise(Y.ImportCallArity,t);else for(let n of t.arguments)n.type==="SpreadElement"&&this.raise(Y.ImportCallSpreadArgument,n);return this.finishNode(t,r?"OptionalCallExpression":"CallExpression")}parseCallExpressionArguments(t,r,n){let a=[],i=!0,s=this.state.inFSharpPipelineDirectBody;for(this.state.inFSharpPipelineDirectBody=!1;!this.eat(11);){if(i)i=!1;else if(this.expect(12),this.match(11)){r&&this.addTrailingCommaExtraToNode(r),this.next();break}a.push(this.parseExprListItem(11,!1,n,t))}return this.state.inFSharpPipelineDirectBody=s,a}shouldParseAsyncArrow(){return this.match(19)&&!this.canInsertSemicolon()}parseAsyncArrowFromCallExpression(t,r){var n;return this.resetPreviousNodeTrailingComments(r),this.expect(19),this.parseArrowExpression(t,r.arguments,!0,(n=r.extra)==null?void 0:n.trailingCommaLoc),r.innerComments&&b0(t,r.innerComments),r.callee.trailingComments&&b0(t,r.callee.trailingComments),t}parseNoCallExpr(){let t=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),t,!0)}parseExprAtom(t){let r,n=null,{type:a}=this.state;switch(a){case 79:return this.parseSuper();case 83:return r=this.startNode(),this.next(),this.match(16)?this.parseImportMetaPropertyOrPhaseCall(r):this.match(10)?this.optionFlags&512?this.parseImportCall(r):this.finishNode(r,"Import"):(this.raise(Y.UnsupportedImport,this.state.lastTokStartLoc),this.finishNode(r,"Import"));case 78:return r=this.startNode(),this.next(),this.finishNode(r,"ThisExpression");case 90:return this.parseDo(this.startNode(),!1);case 56:case 31:return this.readRegexp(),this.parseRegExpLiteral(this.state.value);case 135:return this.parseNumericLiteral(this.state.value);case 136:return this.parseBigIntLiteral(this.state.value);case 134:return this.parseStringLiteral(this.state.value);case 84:return this.parseNullLiteral();case 85:return this.parseBooleanLiteral(!0);case 86:return this.parseBooleanLiteral(!1);case 10:{let i=this.state.potentialArrowAt===this.state.start;return this.parseParenAndDistinguishExpression(i)}case 0:return this.parseArrayLike(3,!1,t);case 5:return this.parseObjectLike(8,!1,!1,t);case 68:return this.parseFunctionOrFunctionSent();case 26:n=this.parseDecorators();case 80:return this.parseClass(this.maybeTakeDecorators(n,this.startNode()),!1);case 77:return this.parseNewOrNewTarget();case 25:case 24:return this.parseTemplate(!1);case 15:{r=this.startNode(),this.next(),r.object=null;let i=r.callee=this.parseNoCallExpr();if(i.type==="MemberExpression")return this.finishNode(r,"BindExpression");throw this.raise(Y.UnsupportedBind,i)}case 139:return this.raise(Y.PrivateInExpectedIn,this.state.startLoc,{identifierName:this.state.value}),this.parsePrivateName();case 33:return this.parseTopicReferenceThenEqualsSign(54,"%");case 32:return this.parseTopicReferenceThenEqualsSign(44,"^");case 37:case 38:return this.parseTopicReference("hack");case 44:case 54:case 27:{let i=this.getPluginOption("pipelineOperator","proposal");if(i)return this.parseTopicReference(i);throw this.unexpected()}case 47:{let i=this.input.codePointAt(this.nextTokenStart());throw Xc(i)||i===62?this.expectOnePlugin(["jsx","flow","typescript"]):this.unexpected()}default:{if(a===137)return this.parseDecimalLiteral(this.state.value);if(a===2||a===1)return this.parseArrayLike(this.state.type===2?4:3,!0);if(a===6||a===7)return this.parseObjectLike(this.state.type===6?9:8,!1,!0)}if(ln(a)){if(this.isContextual(127)&&this.lookaheadInLineCharCode()===123)return this.parseModuleExpression();let i=this.state.potentialArrowAt===this.state.start,s=this.state.containsEsc,o=this.parseIdentifier();if(!s&&o.name==="async"&&!this.canInsertSemicolon()){let{type:l}=this.state;if(l===68)return this.resetPreviousNodeTrailingComments(o),this.next(),this.parseAsyncFunctionExpression(this.startNodeAtNode(o));if(ln(l))return this.lookaheadCharCode()===61?this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(o)):o;if(l===90)return this.resetPreviousNodeTrailingComments(o),this.parseDo(this.startNodeAtNode(o),!0)}return i&&this.match(19)&&!this.canInsertSemicolon()?(this.next(),this.parseArrowExpression(this.startNodeAtNode(o),[o],!1)):o}else throw this.unexpected()}}parseTopicReferenceThenEqualsSign(t,r){let n=this.getPluginOption("pipelineOperator","proposal");if(n)return this.state.type=t,this.state.value=r,this.state.pos--,this.state.end--,this.state.endLoc=Cs(this.state.endLoc,-1),this.parseTopicReference(n);throw this.unexpected()}parseTopicReference(t){let r=this.startNode(),n=this.state.startLoc,a=this.state.type;return this.next(),this.finishTopicReference(r,n,t,a)}finishTopicReference(t,r,n,a){if(this.testTopicReferenceConfiguration(n,r,a))return n==="hack"?(this.topicReferenceIsAllowedInCurrentContext()||this.raise(Y.PipeTopicUnbound,r),this.registerTopicReference(),this.finishNode(t,"TopicReference")):(this.topicReferenceIsAllowedInCurrentContext()||this.raise(Y.PrimaryTopicNotAllowed,r),this.registerTopicReference(),this.finishNode(t,"PipelinePrimaryTopicReference"));throw this.raise(Y.PipeTopicUnconfiguredToken,r,{token:kf(a)})}testTopicReferenceConfiguration(t,r,n){switch(t){case"hack":return this.hasPlugin(["pipelineOperator",{topicToken:kf(n)}]);case"smart":return n===27;default:throw this.raise(Y.PipeTopicRequiresHackPipes,r)}}parseAsyncArrowUnaryFunction(t){this.prodParam.enter(h1(!0,this.prodParam.hasYield));let r=[this.parseIdentifier()];return this.prodParam.exit(),this.hasPrecedingLineBreak()&&this.raise(Y.LineTerminatorBeforeArrow,this.state.curPosition()),this.expect(19),this.parseArrowExpression(t,r,!0)}parseDo(t,r){this.expectPlugin("doExpressions"),r&&this.expectPlugin("asyncDoExpressions"),t.async=r,this.next();let n=this.state.labels;return this.state.labels=[],r?(this.prodParam.enter(2),t.body=this.parseBlock(),this.prodParam.exit()):t.body=this.parseBlock(),this.state.labels=n,this.finishNode(t,"DoExpression")}parseSuper(){let t=this.startNode();return this.next(),this.match(10)&&!this.scope.allowDirectSuper?this.optionFlags&16||this.raise(Y.SuperNotAllowed,t):this.scope.allowSuper||this.optionFlags&16||this.raise(Y.UnexpectedSuper,t),!this.match(10)&&!this.match(0)&&!this.match(16)&&this.raise(Y.UnsupportedSuper,t),this.finishNode(t,"Super")}parsePrivateName(){let t=this.startNode(),r=this.startNodeAt(Cs(this.state.startLoc,1)),n=this.state.value;return this.next(),t.id=this.createIdentifier(r,n),this.finishNode(t,"PrivateName")}parseFunctionOrFunctionSent(){let t=this.startNode();if(this.next(),this.prodParam.hasYield&&this.match(16)){let r=this.createIdentifier(this.startNodeAtNode(t),"function");return this.next(),this.match(103)?this.expectPlugin("functionSent"):this.hasPlugin("functionSent")||this.unexpected(),this.parseMetaProperty(t,r,"sent")}return this.parseFunction(t)}parseMetaProperty(t,r,n){t.meta=r;let a=this.state.containsEsc;return t.property=this.parseIdentifier(!0),(t.property.name!==n||a)&&this.raise(Y.UnsupportedMetaProperty,t.property,{target:r.name,onlyValidPropertyName:n}),this.finishNode(t,"MetaProperty")}parseImportMetaPropertyOrPhaseCall(t){if(this.next(),this.isContextual(105)||this.isContextual(97)){let r=this.isContextual(105);return this.expectPlugin(r?"sourcePhaseImports":"deferredImportEvaluation"),this.next(),t.phase=r?"source":"defer",this.parseImportCall(t)}else{let r=this.createIdentifierAt(this.startNodeAtNode(t),"import",this.state.lastTokStartLoc);return this.isContextual(101)&&(this.inModule||this.raise(Y.ImportMetaOutsideModule,r),this.sawUnambiguousESM=!0),this.parseMetaProperty(t,r,"meta")}}parseLiteralAtNode(t,r,n){return this.addExtra(n,"rawValue",t),this.addExtra(n,"raw",this.input.slice(this.offsetToSourcePos(n.start),this.state.end)),n.value=t,this.next(),this.finishNode(n,r)}parseLiteral(t,r){let n=this.startNode();return this.parseLiteralAtNode(t,r,n)}parseStringLiteral(t){return this.parseLiteral(t,"StringLiteral")}parseNumericLiteral(t){return this.parseLiteral(t,"NumericLiteral")}parseBigIntLiteral(t){return this.parseLiteral(t,"BigIntLiteral")}parseDecimalLiteral(t){return this.parseLiteral(t,"DecimalLiteral")}parseRegExpLiteral(t){let r=this.startNode();return this.addExtra(r,"raw",this.input.slice(this.offsetToSourcePos(r.start),this.state.end)),r.pattern=t.pattern,r.flags=t.flags,this.next(),this.finishNode(r,"RegExpLiteral")}parseBooleanLiteral(t){let r=this.startNode();return r.value=t,this.next(),this.finishNode(r,"BooleanLiteral")}parseNullLiteral(){let t=this.startNode();return this.next(),this.finishNode(t,"NullLiteral")}parseParenAndDistinguishExpression(t){let r=this.state.startLoc,n;this.next(),this.expressionScope.enter(eye());let a=this.state.maybeInArrowParameters,i=this.state.inFSharpPipelineDirectBody;this.state.maybeInArrowParameters=!0,this.state.inFSharpPipelineDirectBody=!1;let s=this.state.startLoc,o=[],l=new my,c=!0,u,d;for(;!this.match(11);){if(c)c=!1;else if(this.expect(12,l.optionalParametersLoc===null?null:l.optionalParametersLoc),this.match(11)){d=this.state.startLoc;break}if(this.match(21)){let m=this.state.startLoc;if(u=this.state.startLoc,o.push(this.parseParenItem(this.parseRestBinding(),m)),!this.checkCommaAfterRest(41))break}else o.push(this.parseMaybeAssignAllowInOrVoidPattern(11,l,this.parseParenItem))}let f=this.state.lastTokEndLoc;this.expect(11),this.state.maybeInArrowParameters=a,this.state.inFSharpPipelineDirectBody=i;let p=this.startNodeAt(r);return t&&this.shouldParseArrow(o)&&(p=this.parseArrow(p))?(this.checkDestructuringPrivate(l),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),this.parseArrowExpression(p,o,!1),p):(this.expressionScope.exit(),o.length||this.unexpected(this.state.lastTokStartLoc),d&&this.unexpected(d),u&&this.unexpected(u),this.checkExpressionErrors(l,!0),this.toReferencedListDeep(o,!0),o.length>1?(n=this.startNodeAt(s),n.expressions=o,this.finishNode(n,"SequenceExpression"),this.resetEndLocation(n,f)):n=o[0],this.wrapParenthesis(r,n))}wrapParenthesis(t,r){if(!(this.optionFlags&1024))return this.addExtra(r,"parenthesized",!0),this.addExtra(r,"parenStart",t.index),this.takeSurroundingComments(r,t.index,this.state.lastTokEndLoc.index),r;let n=this.startNodeAt(t);return n.expression=r,this.finishNode(n,"ParenthesizedExpression")}shouldParseArrow(t){return!this.canInsertSemicolon()}parseArrow(t){if(this.eat(19))return t}parseParenItem(t,r){return t}parseNewOrNewTarget(){let t=this.startNode();if(this.next(),this.match(16)){let r=this.createIdentifier(this.startNodeAtNode(t),"new");this.next();let n=this.parseMetaProperty(t,r,"target");return this.scope.allowNewTarget||this.raise(Y.UnexpectedNewTarget,n),n}return this.parseNew(t)}parseNew(t){if(this.parseNewCallee(t),this.eat(10)){let r=this.parseExprList(11);this.toReferencedList(r),t.arguments=r}else t.arguments=[];return this.finishNode(t,"NewExpression")}parseNewCallee(t){let r=this.match(83),n=this.parseNoCallExpr();t.callee=n,r&&(n.type==="Import"||n.type==="ImportExpression")&&this.raise(Y.ImportCallNotNewExpression,n)}parseTemplateElement(t){let{start:r,startLoc:n,end:a,value:i}=this.state,s=r+1,o=this.startNodeAt(Cs(n,1));i===null&&(t||this.raise(Y.InvalidEscapeSequenceTemplate,Cs(this.state.firstInvalidTemplateEscapePos,1)));let l=this.match(24),c=l?-1:-2,u=a+c;o.value={raw:this.input.slice(s,u).replace(/\r\n?/g,`
`),cooked:i===null?null:i.slice(1,c)},o.tail=l,this.next();let d=this.finishNode(o,"TemplateElement");return this.resetEndLocation(d,Cs(this.state.lastTokEndLoc,c)),d}parseTemplate(t){let r=this.startNode(),n=this.parseTemplateElement(t),a=[n],i=[];for(;!n.tail;)i.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),a.push(n=this.parseTemplateElement(t));return r.expressions=i,r.quasis=a,this.finishNode(r,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(t,r,n,a){n&&this.expectPlugin("recordAndTuple");let i=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let s=!1,o=!0,l=this.startNode();for(l.properties=[],this.next();!this.match(t);){if(o)o=!1;else if(this.expect(12),this.match(t)){this.addTrailingCommaExtraToNode(l);break}let u;r?u=this.parseBindingProperty():(u=this.parsePropertyDefinition(a),s=this.checkProto(u,n,s,a)),n&&!this.isObjectProperty(u)&&u.type!=="SpreadElement"&&this.raise(Y.InvalidRecordProperty,u),u.shorthand&&this.addExtra(u,"shorthand",!0),l.properties.push(u)}this.next(),this.state.inFSharpPipelineDirectBody=i;let c="ObjectExpression";return r?c="ObjectPattern":n&&(c="RecordExpression"),this.finishNode(l,c)}addTrailingCommaExtraToNode(t){this.addExtra(t,"trailingComma",this.state.lastTokStartLoc.index),this.addExtra(t,"trailingCommaLoc",this.state.lastTokStartLoc,!1)}maybeAsyncOrAccessorProp(t){return!t.computed&&t.key.type==="Identifier"&&(this.isLiteralPropertyName()||this.match(0)||this.match(55))}parsePropertyDefinition(t){let r=[];if(this.match(26))for(this.hasPlugin("decorators")&&this.raise(Y.UnsupportedPropertyDecorator,this.state.startLoc);this.match(26);)r.push(this.parseDecorator());let n=this.startNode(),a=!1,i=!1,s;if(this.match(21))return r.length&&this.unexpected(),this.parseSpread();r.length&&(n.decorators=r,r=[]),n.method=!1,t&&(s=this.state.startLoc);let o=this.eat(55);this.parsePropertyNamePrefixOperator(n);let l=this.state.containsEsc;if(this.parsePropertyName(n,t),!o&&!l&&this.maybeAsyncOrAccessorProp(n)){let{key:c}=n,u=c.name;u==="async"&&!this.hasPrecedingLineBreak()&&(a=!0,this.resetPreviousNodeTrailingComments(c),o=this.eat(55),this.parsePropertyName(n)),(u==="get"||u==="set")&&(i=!0,this.resetPreviousNodeTrailingComments(c),n.kind=u,this.match(55)&&(o=!0,this.raise(Y.AccessorIsGenerator,this.state.curPosition(),{kind:u}),this.next()),this.parsePropertyName(n))}return this.parseObjPropValue(n,s,o,a,!1,i,t)}getGetterSetterExpectedParamCount(t){return t.kind==="get"?0:1}getObjectOrClassMethodParams(t){return t.params}checkGetterSetterParams(t){var r;let n=this.getGetterSetterExpectedParamCount(t),a=this.getObjectOrClassMethodParams(t);a.length!==n&&this.raise(t.kind==="get"?Y.BadGetterArity:Y.BadSetterArity,t),t.kind==="set"&&((r=a[a.length-1])==null?void 0:r.type)==="RestElement"&&this.raise(Y.BadSetterRestParameter,t)}parseObjectMethod(t,r,n,a,i){if(i){let s=this.parseMethod(t,r,!1,!1,!1,"ObjectMethod");return this.checkGetterSetterParams(s),s}if(n||r||this.match(10))return a&&this.unexpected(),t.kind="method",t.method=!0,this.parseMethod(t,r,n,!1,!1,"ObjectMethod")}parseObjectProperty(t,r,n,a){if(t.shorthand=!1,this.eat(14))return t.value=n?this.parseMaybeDefault(this.state.startLoc):this.parseMaybeAssignAllowInOrVoidPattern(8,a),this.finishObjectProperty(t);if(!t.computed&&t.key.type==="Identifier"){if(this.checkReservedWord(t.key.name,t.key.loc.start,!0,!1),n)t.value=this.parseMaybeDefault(r,this.cloneIdentifier(t.key));else if(this.match(29)){let i=this.state.startLoc;a!=null?a.shorthandAssignLoc===null&&(a.shorthandAssignLoc=i):this.raise(Y.InvalidCoverInitializedName,i),t.value=this.parseMaybeDefault(r,this.cloneIdentifier(t.key))}else t.value=this.cloneIdentifier(t.key);return t.shorthand=!0,this.finishObjectProperty(t)}}finishObjectProperty(t){return this.finishNode(t,"ObjectProperty")}parseObjPropValue(t,r,n,a,i,s,o){let l=this.parseObjectMethod(t,n,a,i,s)||this.parseObjectProperty(t,r,i,o);return l||this.unexpected(),l}parsePropertyName(t,r){if(this.eat(0))t.computed=!0,t.key=this.parseMaybeAssignAllowIn(),this.expect(3);else{let{type:n,value:a}=this.state,i;if(pc(n))i=this.parseIdentifier(!0);else switch(n){case 135:i=this.parseNumericLiteral(a);break;case 134:i=this.parseStringLiteral(a);break;case 136:i=this.parseBigIntLiteral(a);break;case 139:{let s=this.state.startLoc;r!=null?r.privateKeyLoc===null&&(r.privateKeyLoc=s):this.raise(Y.UnexpectedPrivateField,s),i=this.parsePrivateName();break}default:if(n===137){i=this.parseDecimalLiteral(a);break}this.unexpected()}t.key=i,n!==139&&(t.computed=!1)}}initFunction(t,r){t.id=null,t.generator=!1,t.async=r}parseMethod(t,r,n,a,i,s,o=!1){this.initFunction(t,n),t.generator=r,this.scope.enter(530|(o?576:0)|(i?32:0)),this.prodParam.enter(h1(n,t.generator)),this.parseFunctionParams(t,a);let l=this.parseFunctionBodyAndFinish(t,s,!0);return this.prodParam.exit(),this.scope.exit(),l}parseArrayLike(t,r,n){r&&this.expectPlugin("recordAndTuple");let a=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let i=this.startNode();return this.next(),i.elements=this.parseExprList(t,!r,n,i),this.state.inFSharpPipelineDirectBody=a,this.finishNode(i,r?"TupleExpression":"ArrayExpression")}parseArrowExpression(t,r,n,a){this.scope.enter(518);let i=h1(n,!1);!this.match(5)&&this.prodParam.hasIn&&(i|=8),this.prodParam.enter(i),this.initFunction(t,n);let s=this.state.maybeInArrowParameters;return r&&(this.state.maybeInArrowParameters=!0,this.setArrowFunctionParameters(t,r,a)),this.state.maybeInArrowParameters=!1,this.parseFunctionBody(t,!0),this.prodParam.exit(),this.scope.exit(),this.state.maybeInArrowParameters=s,this.finishNode(t,"ArrowFunctionExpression")}setArrowFunctionParameters(t,r,n){this.toAssignableList(r,n,!1),t.params=r}parseFunctionBodyAndFinish(t,r,n=!1){return this.parseFunctionBody(t,!1,n),this.finishNode(t,r)}parseFunctionBody(t,r,n=!1){let a=r&&!this.match(5);if(this.expressionScope.enter(yV()),a)t.body=this.parseMaybeAssign(),this.checkParams(t,!1,r,!1);else{let i=this.state.strict,s=this.state.labels;this.state.labels=[],this.prodParam.enter(this.prodParam.currentFlags()|4),t.body=this.parseBlock(!0,!1,o=>{let l=!this.isSimpleParamList(t.params);o&&l&&this.raise(Y.IllegalLanguageModeDirective,(t.kind==="method"||t.kind==="constructor")&&t.key?t.key.loc.end:t);let c=!i&&this.state.strict;this.checkParams(t,!this.state.strict&&!r&&!n&&!l,r,c),this.state.strict&&t.id&&this.checkIdentifier(t.id,65,c)}),this.prodParam.exit(),this.state.labels=s}this.expressionScope.exit()}isSimpleParameter(t){return t.type==="Identifier"}isSimpleParamList(t){for(let r=0,n=t.length;r<n;r++)if(!this.isSimpleParameter(t[r]))return!1;return!0}checkParams(t,r,n,a=!0){let i=!r&&new Set,s={type:"FormalParameters"};for(let o of t.params)this.checkLVal(o,s,5,i,a)}parseExprList(t,r,n,a){let i=[],s=!0;for(;!this.eat(t);){if(s)s=!1;else if(this.expect(12),this.match(t)){a&&this.addTrailingCommaExtraToNode(a),this.next();break}i.push(this.parseExprListItem(t,r,n))}return i}parseExprListItem(t,r,n,a){let i;if(this.match(12))r||this.raise(Y.UnexpectedToken,this.state.curPosition(),{unexpected:","}),i=null;else if(this.match(21)){let s=this.state.startLoc;i=this.parseParenItem(this.parseSpread(n),s)}else if(this.match(17)){this.expectPlugin("partialApplication"),a||this.raise(Y.UnexpectedArgumentPlaceholder,this.state.startLoc);let s=this.startNode();this.next(),i=this.finishNode(s,"ArgumentPlaceholder")}else i=this.parseMaybeAssignAllowInOrVoidPattern(t,n,this.parseParenItem);return i}parseIdentifier(t){let r=this.startNode(),n=this.parseIdentifierName(t);return this.createIdentifier(r,n)}createIdentifier(t,r){return t.name=r,t.loc.identifierName=r,this.finishNode(t,"Identifier")}createIdentifierAt(t,r,n){return t.name=r,t.loc.identifierName=r,this.finishNodeAt(t,"Identifier",n)}parseIdentifierName(t){let r,{startLoc:n,type:a}=this.state;pc(a)?r=this.state.value:this.unexpected();let i=xge(a);return t?i&&this.replaceToken(132):this.checkReservedWord(r,n,i,!1),this.next(),r}checkReservedWord(t,r,n,a){if(t.length>10||!Fge(t))return;if(n&&Dge(t)){this.raise(Y.UnexpectedKeyword,r,{keyword:t});return}if((this.state.strict?a?pV:dV:uV)(t,this.inModule)){this.raise(Y.UnexpectedReservedWord,r,{reservedWord:t});return}else if(t==="yield"){if(this.prodParam.hasYield){this.raise(Y.YieldBindingIdentifier,r);return}}else if(t==="await"){if(this.prodParam.hasAwait){this.raise(Y.AwaitBindingIdentifier,r);return}if(this.scope.inStaticBlock){this.raise(Y.AwaitBindingIdentifierInStaticBlock,r);return}this.expressionScope.recordAsyncArrowParametersError(r)}else if(t==="arguments"&&this.scope.inClassAndNotInNonArrowFunction){this.raise(Y.ArgumentsInClass,r);return}}recordAwaitIfAllowed(){let t=this.prodParam.hasAwait;return t&&!this.scope.inFunction&&(this.state.hasTopLevelAwait=!0),t}parseAwait(t){let r=this.startNodeAt(t);return this.expressionScope.recordParameterInitializerError(Y.AwaitExpressionFormalParameter,r),this.eat(55)&&this.raise(Y.ObsoleteAwaitStar,r),!this.scope.inFunction&&!(this.optionFlags&1)&&(this.isAmbiguousPrefixOrIdentifier()?this.ambiguousScriptDifferentAst=!0:this.sawUnambiguousESM=!0),this.state.soloAwait||(r.argument=this.parseMaybeUnary(null,!0)),this.finishNode(r,"AwaitExpression")}isAmbiguousPrefixOrIdentifier(){if(this.hasPrecedingLineBreak())return!0;let{type:t}=this.state;return t===53||t===10||t===0||y1(t)||t===102&&!this.state.containsEsc||t===138||t===56||this.hasPlugin("v8intrinsic")&&t===54}parseYield(t){let r=this.startNodeAt(t);this.expressionScope.recordParameterInitializerError(Y.YieldInParameter,r);let n=!1,a=null;if(!this.hasPrecedingLineBreak())switch(n=this.eat(55),this.state.type){case 13:case 140:case 8:case 11:case 3:case 9:case 14:case 12:if(!n)break;default:a=this.parseMaybeAssign()}return r.delegate=n,r.argument=a,this.finishNode(r,"YieldExpression")}parseImportCall(t){if(this.next(),t.source=this.parseMaybeAssignAllowIn(),t.options=null,this.eat(12)){if(this.match(11))this.addTrailingCommaExtraToNode(t.source);else if(t.options=this.parseMaybeAssignAllowIn(),this.eat(12)&&(this.addTrailingCommaExtraToNode(t.options),!this.match(11))){do this.parseMaybeAssignAllowIn();while(this.eat(12)&&!this.match(11));this.raise(Y.ImportCallArity,t)}}return this.expect(11),this.finishNode(t,"ImportExpression")}checkPipelineAtInfixOperator(t,r){this.hasPlugin(["pipelineOperator",{proposal:"smart"}])&&t.type==="SequenceExpression"&&this.raise(Y.PipelineHeadSequenceExpression,r)}parseSmartPipelineBodyInStyle(t,r){if(this.isSimpleReference(t)){let n=this.startNodeAt(r);return n.callee=t,this.finishNode(n,"PipelineBareFunction")}else{let n=this.startNodeAt(r);return this.checkSmartPipeTopicBodyEarlyErrors(r),n.expression=t,this.finishNode(n,"PipelineTopicExpression")}}isSimpleReference(t){switch(t.type){case"MemberExpression":return!t.computed&&this.isSimpleReference(t.object);case"Identifier":return!0;default:return!1}}checkSmartPipeTopicBodyEarlyErrors(t){if(this.match(19))throw this.raise(Y.PipelineBodyNoArrow,this.state.startLoc);this.topicReferenceWasUsedInCurrentContext()||this.raise(Y.PipelineTopicUnused,t)}withTopicBindingContext(t){let r=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:1,maxTopicIndex:null};try{return t()}finally{this.state.topicContext=r}}withSmartMixTopicForbiddingContext(t){if(this.hasPlugin(["pipelineOperator",{proposal:"smart"}])){let r=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null};try{return t()}finally{this.state.topicContext=r}}else return t()}withSoloAwaitPermittingContext(t){let r=this.state.soloAwait;this.state.soloAwait=!0;try{return t()}finally{this.state.soloAwait=r}}allowInAnd(t){let r=this.prodParam.currentFlags();if(8&~r){this.prodParam.enter(r|8);try{return t()}finally{this.prodParam.exit()}}return t()}disallowInAnd(t){let r=this.prodParam.currentFlags();if(8&r){this.prodParam.enter(r&-9);try{return t()}finally{this.prodParam.exit()}}return t()}registerTopicReference(){this.state.topicContext.maxTopicIndex=0}topicReferenceIsAllowedInCurrentContext(){return this.state.topicContext.maxNumOfResolvableTopics>=1}topicReferenceWasUsedInCurrentContext(){return this.state.topicContext.maxTopicIndex!=null&&this.state.topicContext.maxTopicIndex>=0}parseFSharpPipelineBody(t){let r=this.state.startLoc;this.state.potentialArrowAt=this.state.start;let n=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!0;let a=this.parseExprOp(this.parseMaybeUnaryOrPrivate(),r,t);return this.state.inFSharpPipelineDirectBody=n,a}parseModuleExpression(){this.expectPlugin("moduleBlocks");let t=this.startNode();this.next(),this.match(5)||this.unexpected(null,5);let r=this.startNodeAt(this.state.endLoc);this.next();let n=this.initializeScopes(!0);this.enterInitialScopes();try{t.body=this.parseProgram(r,8,"module")}finally{n()}return this.finishNode(t,"ModuleExpression")}parseVoidPattern(t){this.expectPlugin("discardBinding");let r=this.startNode();return t!=null&&(t.voidPatternLoc=this.state.startLoc),this.next(),this.finishNode(r,"VoidPattern")}parseMaybeAssignAllowInOrVoidPattern(t,r,n){if(r!=null&&this.match(88)){let a=this.lookaheadCharCode();if(a===44||a===(t===3?93:t===8?125:41)||a===61)return this.parseMaybeDefault(this.state.startLoc,this.parseVoidPattern(r))}return this.parseMaybeAssignAllowIn(r,n)}parsePropertyNamePrefixOperator(t){}},oL={kind:1},pye={kind:2},mye=/[\uD800-\uDFFF]/u,lL=/in(?:stanceof)?/y;function hye(e,t,r){for(let n=0;n<e.length;n++){let a=e[n],{type:i}=a;if(typeof i=="number"){{if(i===139){let{loc:s,start:o,value:l,end:c}=a,u=o+1,d=Cs(s.start,1);e.splice(n,1,new Kc({type:Xu(27),value:"#",start:o,end:u,startLoc:s.start,endLoc:d}),new Kc({type:Xu(132),value:l,start:u,end:c,startLoc:d,endLoc:s.end})),n++;continue}if(y1(i)){let{loc:s,start:o,value:l,end:c}=a,u=o+1,d=Cs(s.start,1),f;t.charCodeAt(o-r)===96?f=new Kc({type:Xu(22),value:"`",start:o,end:u,startLoc:s.start,endLoc:d}):f=new Kc({type:Xu(8),value:"}",start:o,end:u,startLoc:s.start,endLoc:d});let p,m,h,x;i===24?(m=c-1,h=Cs(s.end,-1),p=l===null?null:l.slice(1,-1),x=new Kc({type:Xu(22),value:"`",start:m,end:c,startLoc:h,endLoc:s.end})):(m=c-2,h=Cs(s.end,-2),p=l===null?null:l.slice(1,-2),x=new Kc({type:Xu(23),value:"${",start:m,end:c,startLoc:h,endLoc:s.end})),e.splice(n,1,f,new Kc({type:Xu(20),value:p,start:u,end:m,startLoc:d,endLoc:h}),x),n+=2;continue}}a.type=Xu(i)}}return e}var AL=class extends IL{parseTopLevel(t,r){return t.program=this.parseProgram(r,140,this.options.sourceType==="module"?"module":"script"),t.comments=this.comments,this.optionFlags&256&&(t.tokens=hye(this.tokens,this.input,this.startIndex)),this.finishNode(t,"File")}parseProgram(t,r,n){if(t.sourceType=n,t.interpreter=this.parseInterpreterDirective(),this.parseBlockBody(t,!0,!0,r),this.inModule){if(!(this.optionFlags&64)&&this.scope.undefinedExports.size>0)for(let[i,s]of Array.from(this.scope.undefinedExports))this.raise(Y.ModuleExportUndefined,s,{localName:i});this.addExtra(t,"topLevelAwait",this.state.hasTopLevelAwait)}let a;return r===140?a=this.finishNode(t,"Program"):a=this.finishNodeAt(t,"Program",Cs(this.state.startLoc,-1)),a}stmtToDirective(t){let r=this.castNodeTo(t,"Directive"),n=this.castNodeTo(t.expression,"DirectiveLiteral"),a=n.value,i=this.input.slice(this.offsetToSourcePos(n.start),this.offsetToSourcePos(n.end)),s=n.value=i.slice(1,-1);return this.addExtra(n,"raw",i),this.addExtra(n,"rawValue",s),this.addExtra(n,"expressionValue",a),r.value=n,delete t.expression,r}parseInterpreterDirective(){if(!this.match(28))return null;let t=this.startNode();return t.value=this.state.value,this.next(),this.finishNode(t,"InterpreterDirective")}isLet(){return this.isContextual(100)?this.hasFollowingBindingAtom():!1}isUsing(){return this.isContextual(107)?this.nextTokenIsIdentifierOnSameLine():!1}isForUsing(){if(!this.isContextual(107))return!1;let t=this.nextTokenInLineStart(),r=this.codePointAtPos(t);if(this.isUnparsedContextual(t,"of")){let n=this.lookaheadCharCodeSince(t+2);if(n!==61&&n!==58&&n!==59)return!1}return!!(this.chStartsBindingIdentifier(r,t)||this.isUnparsedContextual(t,"void"))}nextTokenIsIdentifierOnSameLine(){let t=this.nextTokenInLineStart(),r=this.codePointAtPos(t);return this.chStartsBindingIdentifier(r,t)}isAwaitUsing(){if(!this.isContextual(96))return!1;let t=this.nextTokenInLineStart();if(this.isUnparsedContextual(t,"using")){t=this.nextTokenInLineStartSince(t+5);let r=this.codePointAtPos(t);if(this.chStartsBindingIdentifier(r,t))return!0}return!1}chStartsBindingIdentifier(t,r){if(Xc(t)){if(lL.lastIndex=r,lL.test(this.input)){let n=this.codePointAtPos(lL.lastIndex);if(!Bm(n)&&n!==92)return!1}return!0}else return t===92}chStartsBindingPattern(t){return t===91||t===123}hasFollowingBindingAtom(){let t=this.nextTokenStart(),r=this.codePointAtPos(t);return this.chStartsBindingPattern(r)||this.chStartsBindingIdentifier(r,t)}hasInLineFollowingBindingIdentifierOrBrace(){let t=this.nextTokenInLineStart(),r=this.codePointAtPos(t);return r===123||this.chStartsBindingIdentifier(r,t)}allowsUsing(){return(this.scope.inModule||!this.scope.inTopLevel)&&!this.scope.inBareCaseStatement}parseModuleItem(){return this.parseStatementLike(15)}parseStatementListItem(){return this.parseStatementLike(6|(!this.options.annexB||this.state.strict?0:8))}parseStatementOrSloppyAnnexBFunctionDeclaration(t=!1){let r=0;return this.options.annexB&&!this.state.strict&&(r|=4,t&&(r|=8)),this.parseStatementLike(r)}parseStatement(){return this.parseStatementLike(0)}parseStatementLike(t){let r=null;return this.match(26)&&(r=this.parseDecorators(!0)),this.parseStatementContent(t,r)}parseStatementContent(t,r){let n=this.state.type,a=this.startNode(),i=!!(t&2),s=!!(t&4),o=t&1;switch(n){case 60:return this.parseBreakContinueStatement(a,!0);case 63:return this.parseBreakContinueStatement(a,!1);case 64:return this.parseDebuggerStatement(a);case 90:return this.parseDoWhileStatement(a);case 91:return this.parseForStatement(a);case 68:if(this.lookaheadCharCode()===46)break;return s||this.raise(this.state.strict?Y.StrictFunction:this.options.annexB?Y.SloppyFunctionAnnexB:Y.SloppyFunction,this.state.startLoc),this.parseFunctionStatement(a,!1,!i&&s);case 80:return i||this.unexpected(),this.parseClass(this.maybeTakeDecorators(r,a),!0);case 69:return this.parseIfStatement(a);case 70:return this.parseReturnStatement(a);case 71:return this.parseSwitchStatement(a);case 72:return this.parseThrowStatement(a);case 73:return this.parseTryStatement(a);case 96:if(this.isAwaitUsing())return this.allowsUsing()?i?this.recordAwaitIfAllowed()||this.raise(Y.AwaitUsingNotInAsyncContext,a):this.raise(Y.UnexpectedLexicalDeclaration,a):this.raise(Y.UnexpectedUsingDeclaration,a),this.next(),this.parseVarStatement(a,"await using");break;case 107:if(this.state.containsEsc||!this.hasInLineFollowingBindingIdentifierOrBrace())break;return this.allowsUsing()?i||this.raise(Y.UnexpectedLexicalDeclaration,this.state.startLoc):this.raise(Y.UnexpectedUsingDeclaration,this.state.startLoc),this.parseVarStatement(a,"using");case 100:{if(this.state.containsEsc)break;let u=this.nextTokenStart(),d=this.codePointAtPos(u);if(d!==91&&(!i&&this.hasFollowingLineBreak()||!this.chStartsBindingIdentifier(d,u)&&d!==123))break}case 75:i||this.raise(Y.UnexpectedLexicalDeclaration,this.state.startLoc);case 74:{let u=this.state.value;return this.parseVarStatement(a,u)}case 92:return this.parseWhileStatement(a);case 76:return this.parseWithStatement(a);case 5:return this.parseBlock();case 13:return this.parseEmptyStatement(a);case 83:{let u=this.lookaheadCharCode();if(u===40||u===46)break}case 82:{!(this.optionFlags&8)&&!o&&this.raise(Y.UnexpectedImportExport,this.state.startLoc),this.next();let u;return n===83?u=this.parseImport(a):u=this.parseExport(a,r),this.assertModuleNodeAllowed(u),u}default:if(this.isAsyncFunction())return i||this.raise(Y.AsyncFunctionInSingleStatementContext,this.state.startLoc),this.next(),this.parseFunctionStatement(a,!0,!i&&s)}let l=this.state.value,c=this.parseExpression();return ln(n)&&c.type==="Identifier"&&this.eat(14)?this.parseLabeledStatement(a,l,c,t):this.parseExpressionStatement(a,c,r)}assertModuleNodeAllowed(t){!(this.optionFlags&8)&&!this.inModule&&this.raise(Y.ImportOutsideModule,t)}decoratorsEnabledBeforeExport(){return this.hasPlugin("decorators-legacy")?!0:this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")!==!1}maybeTakeDecorators(t,r,n){if(t){var a;(a=r.decorators)!=null&&a.length?(typeof this.getPluginOption("decorators","decoratorsBeforeExport")!="boolean"&&this.raise(Y.DecoratorsBeforeAfterExport,r.decorators[0]),r.decorators.unshift(...t)):r.decorators=t,this.resetStartLocationFromNode(r,t[0]),n&&this.resetStartLocationFromNode(n,r)}return r}canHaveLeadingDecorator(){return this.match(80)}parseDecorators(t){let r=[];do r.push(this.parseDecorator());while(this.match(26));if(this.match(82))t||this.unexpected(),this.decoratorsEnabledBeforeExport()||this.raise(Y.DecoratorExportClass,this.state.startLoc);else if(!this.canHaveLeadingDecorator())throw this.raise(Y.UnexpectedLeadingDecorator,this.state.startLoc);return r}parseDecorator(){this.expectOnePlugin(["decorators","decorators-legacy"]);let t=this.startNode();if(this.next(),this.hasPlugin("decorators")){let r=this.state.startLoc,n;if(this.match(10)){let a=this.state.startLoc;this.next(),n=this.parseExpression(),this.expect(11),n=this.wrapParenthesis(a,n);let i=this.state.startLoc;t.expression=this.parseMaybeDecoratorArguments(n,a),this.getPluginOption("decorators","allowCallParenthesized")===!1&&t.expression!==n&&this.raise(Y.DecoratorArgumentsOutsideParentheses,i)}else{for(n=this.parseIdentifier(!1);this.eat(16);){let a=this.startNodeAt(r);a.object=n,this.match(139)?(this.classScope.usePrivateName(this.state.value,this.state.startLoc),a.property=this.parsePrivateName()):a.property=this.parseIdentifier(!0),a.computed=!1,n=this.finishNode(a,"MemberExpression")}t.expression=this.parseMaybeDecoratorArguments(n,r)}}else t.expression=this.parseExprSubscripts();return this.finishNode(t,"Decorator")}parseMaybeDecoratorArguments(t,r){if(this.eat(10)){let n=this.startNodeAt(r);return n.callee=t,n.arguments=this.parseCallExpressionArguments(),this.toReferencedList(n.arguments),this.finishNode(n,"CallExpression")}return t}parseBreakContinueStatement(t,r){return this.next(),this.isLineTerminator()?t.label=null:(t.label=this.parseIdentifier(),this.semicolon()),this.verifyBreakContinue(t,r),this.finishNode(t,r?"BreakStatement":"ContinueStatement")}verifyBreakContinue(t,r){let n;for(n=0;n<this.state.labels.length;++n){let a=this.state.labels[n];if((t.label==null||a.name===t.label.name)&&(a.kind!=null&&(r||a.kind===1)||t.label&&r))break}if(n===this.state.labels.length){let a=r?"BreakStatement":"ContinueStatement";this.raise(Y.IllegalBreakContinue,t,{type:a})}}parseDebuggerStatement(t){return this.next(),this.semicolon(),this.finishNode(t,"DebuggerStatement")}parseHeaderExpression(){this.expect(10);let t=this.parseExpression();return this.expect(11),t}parseDoWhileStatement(t){return this.next(),this.state.labels.push(oL),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.state.labels.pop(),this.expect(92),t.test=this.parseHeaderExpression(),this.eat(13),this.finishNode(t,"DoWhileStatement")}parseForStatement(t){this.next(),this.state.labels.push(oL);let r=null;if(this.isContextual(96)&&this.recordAwaitIfAllowed()&&(r=this.state.startLoc,this.next()),this.scope.enter(0),this.expect(10),this.match(13))return r!==null&&this.unexpected(r),this.parseFor(t,null);let n=this.isContextual(100);{let l=this.isAwaitUsing(),c=l||this.isForUsing(),u=n&&this.hasFollowingBindingAtom()||c;if(this.match(74)||this.match(75)||u){let d=this.startNode(),f;l?(f="await using",this.recordAwaitIfAllowed()||this.raise(Y.AwaitUsingNotInAsyncContext,this.state.startLoc),this.next()):f=this.state.value,this.next(),this.parseVar(d,!0,f);let p=this.finishNode(d,"VariableDeclaration"),m=this.match(58);return m&&c&&this.raise(Y.ForInUsing,p),(m||this.isContextual(102))&&p.declarations.length===1?this.parseForIn(t,p,r):(r!==null&&this.unexpected(r),this.parseFor(t,p))}}let a=this.isContextual(95),i=new my,s=this.parseExpression(!0,i),o=this.isContextual(102);if(o&&(n&&this.raise(Y.ForOfLet,s),r===null&&a&&s.type==="Identifier"&&this.raise(Y.ForOfAsync,s)),o||this.match(58)){this.checkDestructuringPrivate(i),this.toAssignable(s,!0);let l=o?"ForOfStatement":"ForInStatement";return this.checkLVal(s,{type:l}),this.parseForIn(t,s,r)}else this.checkExpressionErrors(i,!0);return r!==null&&this.unexpected(r),this.parseFor(t,s)}parseFunctionStatement(t,r,n){return this.next(),this.parseFunction(t,1|(n?2:0)|(r?8:0))}parseIfStatement(t){return this.next(),t.test=this.parseHeaderExpression(),t.consequent=this.parseStatementOrSloppyAnnexBFunctionDeclaration(),t.alternate=this.eat(66)?this.parseStatementOrSloppyAnnexBFunctionDeclaration():null,this.finishNode(t,"IfStatement")}parseReturnStatement(t){return this.prodParam.hasReturn||this.raise(Y.IllegalReturn,this.state.startLoc),this.next(),this.isLineTerminator()?t.argument=null:(t.argument=this.parseExpression(),this.semicolon()),this.finishNode(t,"ReturnStatement")}parseSwitchStatement(t){this.next(),t.discriminant=this.parseHeaderExpression();let r=t.cases=[];this.expect(5),this.state.labels.push(pye),this.scope.enter(256);let n;for(let a;!this.match(8);)if(this.match(61)||this.match(65)){let i=this.match(61);n&&this.finishNode(n,"SwitchCase"),r.push(n=this.startNode()),n.consequent=[],this.next(),i?n.test=this.parseExpression():(a&&this.raise(Y.MultipleDefaultsInSwitch,this.state.lastTokStartLoc),a=!0,n.test=null),this.expect(14)}else n?n.consequent.push(this.parseStatementListItem()):this.unexpected();return this.scope.exit(),n&&this.finishNode(n,"SwitchCase"),this.next(),this.state.labels.pop(),this.finishNode(t,"SwitchStatement")}parseThrowStatement(t){return this.next(),this.hasPrecedingLineBreak()&&this.raise(Y.NewlineAfterThrow,this.state.lastTokEndLoc),t.argument=this.parseExpression(),this.semicolon(),this.finishNode(t,"ThrowStatement")}parseCatchClauseParam(){let t=this.parseBindingAtom();return this.scope.enter(this.options.annexB&&t.type==="Identifier"?8:0),this.checkLVal(t,{type:"CatchClause"},9),t}parseTryStatement(t){if(this.next(),t.block=this.parseBlock(),t.handler=null,this.match(62)){let r=this.startNode();this.next(),this.match(10)?(this.expect(10),r.param=this.parseCatchClauseParam(),this.expect(11)):(r.param=null,this.scope.enter(0)),r.body=this.withSmartMixTopicForbiddingContext(()=>this.parseBlock(!1,!1)),this.scope.exit(),t.handler=this.finishNode(r,"CatchClause")}return t.finalizer=this.eat(67)?this.parseBlock():null,!t.handler&&!t.finalizer&&this.raise(Y.NoCatchOrFinally,t),this.finishNode(t,"TryStatement")}parseVarStatement(t,r,n=!1){return this.next(),this.parseVar(t,!1,r,n),this.semicolon(),this.finishNode(t,"VariableDeclaration")}parseWhileStatement(t){return this.next(),t.test=this.parseHeaderExpression(),this.state.labels.push(oL),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.state.labels.pop(),this.finishNode(t,"WhileStatement")}parseWithStatement(t){return this.state.strict&&this.raise(Y.StrictWith,this.state.startLoc),this.next(),t.object=this.parseHeaderExpression(),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.finishNode(t,"WithStatement")}parseEmptyStatement(t){return this.next(),this.finishNode(t,"EmptyStatement")}parseLabeledStatement(t,r,n,a){for(let s of this.state.labels)s.name===r&&this.raise(Y.LabelRedeclaration,n,{labelName:r});let i=Sge(this.state.type)?1:this.match(71)?2:null;for(let s=this.state.labels.length-1;s>=0;s--){let o=this.state.labels[s];if(o.statementStart===t.start)o.statementStart=this.sourceToOffsetPos(this.state.start),o.kind=i;else break}return this.state.labels.push({name:r,kind:i,statementStart:this.sourceToOffsetPos(this.state.start)}),t.body=a&8?this.parseStatementOrSloppyAnnexBFunctionDeclaration(!0):this.parseStatement(),this.state.labels.pop(),t.label=n,this.finishNode(t,"LabeledStatement")}parseExpressionStatement(t,r,n){return t.expression=r,this.semicolon(),this.finishNode(t,"ExpressionStatement")}parseBlock(t=!1,r=!0,n){let a=this.startNode();return t&&this.state.strictErrors.clear(),this.expect(5),r&&this.scope.enter(0),this.parseBlockBody(a,t,!1,8,n),r&&this.scope.exit(),this.finishNode(a,"BlockStatement")}isValidDirective(t){return t.type==="ExpressionStatement"&&t.expression.type==="StringLiteral"&&!t.expression.extra.parenthesized}parseBlockBody(t,r,n,a,i){let s=t.body=[],o=t.directives=[];this.parseBlockOrModuleBlockBody(s,r?o:void 0,n,a,i)}parseBlockOrModuleBlockBody(t,r,n,a,i){let s=this.state.strict,o=!1,l=!1;for(;!this.match(a);){let c=n?this.parseModuleItem():this.parseStatementListItem();if(r&&!l){if(this.isValidDirective(c)){let u=this.stmtToDirective(c);r.push(u),!o&&u.value.value==="use strict"&&(o=!0,this.setStrict(!0));continue}l=!0,this.state.strictErrors.clear()}t.push(c)}i?.call(this,o),s||this.setStrict(!1),this.next()}parseFor(t,r){return t.init=r,this.semicolon(!1),t.test=this.match(13)?null:this.parseExpression(),this.semicolon(!1),t.update=this.match(11)?null:this.parseExpression(),this.expect(11),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(t,"ForStatement")}parseForIn(t,r,n){let a=this.match(58);return this.next(),a?n!==null&&this.unexpected(n):t.await=n!==null,r.type==="VariableDeclaration"&&r.declarations[0].init!=null&&(!a||!this.options.annexB||this.state.strict||r.kind!=="var"||r.declarations[0].id.type!=="Identifier")&&this.raise(Y.ForInOfLoopInitializer,r,{type:a?"ForInStatement":"ForOfStatement"}),r.type==="AssignmentPattern"&&this.raise(Y.InvalidLhs,r,{ancestor:{type:"ForStatement"}}),t.left=r,t.right=a?this.parseExpression():this.parseMaybeAssignAllowIn(),this.expect(11),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(t,a?"ForInStatement":"ForOfStatement")}parseVar(t,r,n,a=!1){let i=t.declarations=[];for(t.kind=n;;){let s=this.startNode();if(this.parseVarId(s,n),s.init=this.eat(29)?r?this.parseMaybeAssignDisallowIn():this.parseMaybeAssignAllowIn():null,s.init===null&&!a&&(s.id.type!=="Identifier"&&!(r&&(this.match(58)||this.isContextual(102)))?this.raise(Y.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:"destructuring"}):(n==="const"||n==="using"||n==="await using")&&!(this.match(58)||this.isContextual(102))&&this.raise(Y.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:n})),i.push(this.finishNode(s,"VariableDeclarator")),!this.eat(12))break}return t}parseVarId(t,r){let n=this.parseBindingAtom();r==="using"||r==="await using"?(n.type==="ArrayPattern"||n.type==="ObjectPattern")&&this.raise(Y.UsingDeclarationHasBindingPattern,n.loc.start):n.type==="VoidPattern"&&this.raise(Y.UnexpectedVoidPattern,n.loc.start),this.checkLVal(n,{type:"VariableDeclarator"},r==="var"?5:8201),t.id=n}parseAsyncFunctionExpression(t){return this.parseFunction(t,8)}parseFunction(t,r=0){let n=r&2,a=!!(r&1),i=a&&!(r&4),s=!!(r&8);this.initFunction(t,s),this.match(55)&&(n&&this.raise(Y.GeneratorInSingleStatementContext,this.state.startLoc),this.next(),t.generator=!0),a&&(t.id=this.parseFunctionId(i));let o=this.state.maybeInArrowParameters;return this.state.maybeInArrowParameters=!1,this.scope.enter(514),this.prodParam.enter(h1(s,t.generator)),a||(t.id=this.parseFunctionId()),this.parseFunctionParams(t,!1),this.withSmartMixTopicForbiddingContext(()=>{this.parseFunctionBodyAndFinish(t,a?"FunctionDeclaration":"FunctionExpression")}),this.prodParam.exit(),this.scope.exit(),a&&!n&&this.registerFunctionStatementId(t),this.state.maybeInArrowParameters=o,t}parseFunctionId(t){return t||ln(this.state.type)?this.parseIdentifier():null}parseFunctionParams(t,r){this.expect(10),this.expressionScope.enter(Qge()),t.params=this.parseBindingList(11,41,2|(r?4:0)),this.expressionScope.exit()}registerFunctionStatementId(t){t.id&&this.scope.declareName(t.id.name,!this.options.annexB||this.state.strict||t.generator||t.async?this.scope.treatFunctionsAsVar?5:8201:17,t.id.loc.start)}parseClass(t,r,n){this.next();let a=this.state.strict;return this.state.strict=!0,this.parseClassId(t,r,n),this.parseClassSuper(t),t.body=this.parseClassBody(!!t.superClass,a),this.finishNode(t,r?"ClassDeclaration":"ClassExpression")}isClassProperty(){return this.match(29)||this.match(13)||this.match(8)}isClassMethod(){return this.match(10)}nameIsConstructor(t){return t.type==="Identifier"&&t.name==="constructor"||t.type==="StringLiteral"&&t.value==="constructor"}isNonstaticConstructor(t){return!t.computed&&!t.static&&this.nameIsConstructor(t.key)}parseClassBody(t,r){this.classScope.enter();let n={hadConstructor:!1,hadSuperClass:t},a=[],i=this.startNode();if(i.body=[],this.expect(5),this.withSmartMixTopicForbiddingContext(()=>{for(;!this.match(8);){if(this.eat(13)){if(a.length>0)throw this.raise(Y.DecoratorSemicolon,this.state.lastTokEndLoc);continue}if(this.match(26)){a.push(this.parseDecorator());continue}let s=this.startNode();a.length&&(s.decorators=a,this.resetStartLocationFromNode(s,a[0]),a=[]),this.parseClassMember(i,s,n),s.kind==="constructor"&&s.decorators&&s.decorators.length>0&&this.raise(Y.DecoratorConstructor,s)}}),this.state.strict=r,this.next(),a.length)throw this.raise(Y.TrailingDecorator,this.state.startLoc);return this.classScope.exit(),this.finishNode(i,"ClassBody")}parseClassMemberFromModifier(t,r){let n=this.parseIdentifier(!0);if(this.isClassMethod()){let a=r;return a.kind="method",a.computed=!1,a.key=n,a.static=!1,this.pushClassMethod(t,a,!1,!1,!1,!1),!0}else if(this.isClassProperty()){let a=r;return a.computed=!1,a.key=n,a.static=!1,t.body.push(this.parseClassProperty(a)),!0}return this.resetPreviousNodeTrailingComments(n),!1}parseClassMember(t,r,n){let a=this.isContextual(106);if(a){if(this.parseClassMemberFromModifier(t,r))return;if(this.eat(5)){this.parseClassStaticBlock(t,r);return}}this.parseClassMemberWithIsStatic(t,r,n,a)}parseClassMemberWithIsStatic(t,r,n,a){let i=r,s=r,o=r,l=r,c=r,u=i,d=i;if(r.static=a,this.parsePropertyNamePrefixOperator(r),this.eat(55)){u.kind="method";let g=this.match(139);if(this.parseClassElementName(u),this.parsePostMemberNameModifiers(u),g){this.pushClassPrivateMethod(t,s,!0,!1);return}this.isNonstaticConstructor(i)&&this.raise(Y.ConstructorIsGenerator,i.key),this.pushClassMethod(t,i,!0,!1,!1,!1);return}let f=!this.state.containsEsc&&ln(this.state.type),p=this.parseClassElementName(r),m=f?p.name:null,h=this.isPrivateName(p),x=this.state.startLoc;if(this.parsePostMemberNameModifiers(d),this.isClassMethod()){if(u.kind="method",h){this.pushClassPrivateMethod(t,s,!1,!1);return}let g=this.isNonstaticConstructor(i),y=!1;g&&(i.kind="constructor",n.hadConstructor&&!this.hasPlugin("typescript")&&this.raise(Y.DuplicateConstructor,p),g&&this.hasPlugin("typescript")&&r.override&&this.raise(Y.OverrideOnConstructor,p),n.hadConstructor=!0,y=n.hadSuperClass),this.pushClassMethod(t,i,!1,!1,g,y)}else if(this.isClassProperty())h?this.pushClassPrivateProperty(t,l):this.pushClassProperty(t,o);else if(m==="async"&&!this.isLineTerminator()){this.resetPreviousNodeTrailingComments(p);let g=this.eat(55);d.optional&&this.unexpected(x),u.kind="method";let y=this.match(139);this.parseClassElementName(u),this.parsePostMemberNameModifiers(d),y?this.pushClassPrivateMethod(t,s,g,!0):(this.isNonstaticConstructor(i)&&this.raise(Y.ConstructorIsAsync,i.key),this.pushClassMethod(t,i,g,!0,!1,!1))}else if((m==="get"||m==="set")&&!(this.match(55)&&this.isLineTerminator())){this.resetPreviousNodeTrailingComments(p),u.kind=m;let g=this.match(139);this.parseClassElementName(i),g?this.pushClassPrivateMethod(t,s,!1,!1):(this.isNonstaticConstructor(i)&&this.raise(Y.ConstructorIsAccessor,i.key),this.pushClassMethod(t,i,!1,!1,!1,!1)),this.checkGetterSetterParams(i)}else if(m==="accessor"&&!this.isLineTerminator()){this.expectPlugin("decoratorAutoAccessors"),this.resetPreviousNodeTrailingComments(p);let g=this.match(139);this.parseClassElementName(o),this.pushClassAccessorProperty(t,c,g)}else this.isLineTerminator()?h?this.pushClassPrivateProperty(t,l):this.pushClassProperty(t,o):this.unexpected()}parseClassElementName(t){let{type:r,value:n}=this.state;if((r===132||r===134)&&t.static&&n==="prototype"&&this.raise(Y.StaticPrototype,this.state.startLoc),r===139){n==="constructor"&&this.raise(Y.ConstructorClassPrivateField,this.state.startLoc);let a=this.parsePrivateName();return t.key=a,a}return this.parsePropertyName(t),t.key}parseClassStaticBlock(t,r){var n;this.scope.enter(720);let a=this.state.labels;this.state.labels=[],this.prodParam.enter(0);let i=r.body=[];this.parseBlockOrModuleBlockBody(i,void 0,!1,8),this.prodParam.exit(),this.scope.exit(),this.state.labels=a,t.body.push(this.finishNode(r,"StaticBlock")),(n=r.decorators)!=null&&n.length&&this.raise(Y.DecoratorStaticBlock,r)}pushClassProperty(t,r){!r.computed&&this.nameIsConstructor(r.key)&&this.raise(Y.ConstructorClassField,r.key),t.body.push(this.parseClassProperty(r))}pushClassPrivateProperty(t,r){let n=this.parseClassPrivateProperty(r);t.body.push(n),this.classScope.declarePrivateName(this.getPrivateNameSV(n.key),0,n.key.loc.start)}pushClassAccessorProperty(t,r,n){!n&&!r.computed&&this.nameIsConstructor(r.key)&&this.raise(Y.ConstructorClassField,r.key);let a=this.parseClassAccessorProperty(r);t.body.push(a),n&&this.classScope.declarePrivateName(this.getPrivateNameSV(a.key),0,a.key.loc.start)}pushClassMethod(t,r,n,a,i,s){t.body.push(this.parseMethod(r,n,a,i,s,"ClassMethod",!0))}pushClassPrivateMethod(t,r,n,a){let i=this.parseMethod(r,n,a,!1,!1,"ClassPrivateMethod",!0);t.body.push(i);let s=i.kind==="get"?i.static?6:2:i.kind==="set"?i.static?5:1:0;this.declareClassPrivateMethodInScope(i,s)}declareClassPrivateMethodInScope(t,r){this.classScope.declarePrivateName(this.getPrivateNameSV(t.key),r,t.key.loc.start)}parsePostMemberNameModifiers(t){}parseClassPrivateProperty(t){return this.parseInitializer(t),this.semicolon(),this.finishNode(t,"ClassPrivateProperty")}parseClassProperty(t){return this.parseInitializer(t),this.semicolon(),this.finishNode(t,"ClassProperty")}parseClassAccessorProperty(t){return this.parseInitializer(t),this.semicolon(),this.finishNode(t,"ClassAccessorProperty")}parseInitializer(t){this.scope.enter(592),this.expressionScope.enter(yV()),this.prodParam.enter(0),t.value=this.eat(29)?this.parseMaybeAssignAllowIn():null,this.expressionScope.exit(),this.prodParam.exit(),this.scope.exit()}parseClassId(t,r,n,a=8331){if(ln(this.state.type))t.id=this.parseIdentifier(),r&&this.declareNameFromIdentifier(t.id,a);else if(n||!r)t.id=null;else throw this.raise(Y.MissingClassName,this.state.startLoc)}parseClassSuper(t){t.superClass=this.eat(81)?this.parseExprSubscripts():null}parseExport(t,r){let n=this.parseMaybeImportPhase(t,!0),a=this.maybeParseExportDefaultSpecifier(t,n),i=!a||this.eat(12),s=i&&this.eatExportStar(t),o=s&&this.maybeParseExportNamespaceSpecifier(t),l=i&&(!o||this.eat(12)),c=a||s;if(s&&!o){if(a&&this.unexpected(),r)throw this.raise(Y.UnsupportedDecoratorExport,t);return this.parseExportFrom(t,!0),this.sawUnambiguousESM=!0,this.finishNode(t,"ExportAllDeclaration")}let u=this.maybeParseExportNamedSpecifiers(t);a&&i&&!s&&!u&&this.unexpected(null,5),o&&l&&this.unexpected(null,98);let d;if(c||u){if(d=!1,r)throw this.raise(Y.UnsupportedDecoratorExport,t);this.parseExportFrom(t,c)}else d=this.maybeParseExportDeclaration(t);if(c||u||d){var f;let p=t;if(this.checkExport(p,!0,!1,!!p.source),((f=p.declaration)==null?void 0:f.type)==="ClassDeclaration")this.maybeTakeDecorators(r,p.declaration,p);else if(r)throw this.raise(Y.UnsupportedDecoratorExport,t);return this.sawUnambiguousESM=!0,this.finishNode(p,"ExportNamedDeclaration")}if(this.eat(65)){let p=t,m=this.parseExportDefaultExpression();if(p.declaration=m,m.type==="ClassDeclaration")this.maybeTakeDecorators(r,m,p);else if(r)throw this.raise(Y.UnsupportedDecoratorExport,t);return this.checkExport(p,!0,!0),this.sawUnambiguousESM=!0,this.finishNode(p,"ExportDefaultDeclaration")}throw this.unexpected(null,5)}eatExportStar(t){return this.eat(55)}maybeParseExportDefaultSpecifier(t,r){if(r||this.isExportDefaultSpecifier()){this.expectPlugin("exportDefaultFrom",r?.loc.start);let n=r||this.parseIdentifier(!0),a=this.startNodeAtNode(n);return a.exported=n,t.specifiers=[this.finishNode(a,"ExportDefaultSpecifier")],!0}return!1}maybeParseExportNamespaceSpecifier(t){if(this.isContextual(93)){var r,n;(n=(r=t).specifiers)!=null||(r.specifiers=[]);let a=this.startNodeAt(this.state.lastTokStartLoc);return this.next(),a.exported=this.parseModuleExportName(),t.specifiers.push(this.finishNode(a,"ExportNamespaceSpecifier")),!0}return!1}maybeParseExportNamedSpecifiers(t){if(this.match(5)){let r=t;r.specifiers||(r.specifiers=[]);let n=r.exportKind==="type";return r.specifiers.push(...this.parseExportSpecifiers(n)),r.source=null,this.hasPlugin("importAssertions")?r.assertions=[]:r.attributes=[],r.declaration=null,!0}return!1}maybeParseExportDeclaration(t){return this.shouldParseExportDeclaration()?(t.specifiers=[],t.source=null,this.hasPlugin("importAssertions")?t.assertions=[]:t.attributes=[],t.declaration=this.parseExportDeclaration(t),!0):!1}isAsyncFunction(){if(!this.isContextual(95))return!1;let t=this.nextTokenInLineStart();return this.isUnparsedContextual(t,"function")}parseExportDefaultExpression(){let t=this.startNode();if(this.match(68))return this.next(),this.parseFunction(t,5);if(this.isAsyncFunction())return this.next(),this.next(),this.parseFunction(t,13);if(this.match(80))return this.parseClass(t,!0,!0);if(this.match(26))return this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")===!0&&this.raise(Y.DecoratorBeforeExport,this.state.startLoc),this.parseClass(this.maybeTakeDecorators(this.parseDecorators(!1),this.startNode()),!0,!0);if(this.match(75)||this.match(74)||this.isLet()||this.isUsing()||this.isAwaitUsing())throw this.raise(Y.UnsupportedDefaultExport,this.state.startLoc);let r=this.parseMaybeAssignAllowIn();return this.semicolon(),r}parseExportDeclaration(t){return this.match(80)?this.parseClass(this.startNode(),!0,!1):this.parseStatementListItem()}isExportDefaultSpecifier(){let{type:t}=this.state;if(ln(t)){if(t===95&&!this.state.containsEsc||t===100)return!1;if((t===130||t===129)&&!this.state.containsEsc){let a=this.nextTokenStart(),i=this.input.charCodeAt(a);if(i===123||this.chStartsBindingIdentifier(i,a)&&!this.input.startsWith("from",a))return this.expectOnePlugin(["flow","typescript"]),!1}}else if(!this.match(65))return!1;let r=this.nextTokenStart(),n=this.isUnparsedContextual(r,"from");if(this.input.charCodeAt(r)===44||ln(this.state.type)&&n)return!0;if(this.match(65)&&n){let a=this.input.charCodeAt(this.nextTokenStartSince(r+4));return a===34||a===39}return!1}parseExportFrom(t,r){this.eatContextual(98)?(t.source=this.parseImportSource(),this.checkExport(t),this.maybeParseImportAttributes(t),this.checkJSONModuleImport(t)):r&&this.unexpected(),this.semicolon()}shouldParseExportDeclaration(){let{type:t}=this.state;return t===26&&(this.expectOnePlugin(["decorators","decorators-legacy"]),this.hasPlugin("decorators"))?(this.getPluginOption("decorators","decoratorsBeforeExport")===!0&&this.raise(Y.DecoratorBeforeExport,this.state.startLoc),!0):this.isUsing()?(this.raise(Y.UsingDeclarationExport,this.state.startLoc),!0):this.isAwaitUsing()?(this.raise(Y.UsingDeclarationExport,this.state.startLoc),!0):t===74||t===75||t===68||t===80||this.isLet()||this.isAsyncFunction()}checkExport(t,r,n,a){if(r){var i;if(n){if(this.checkDuplicateExports(t,"default"),this.hasPlugin("exportDefaultFrom")){var s;let o=t.declaration;o.type==="Identifier"&&o.name==="from"&&o.end-o.start===4&&!((s=o.extra)!=null&&s.parenthesized)&&this.raise(Y.ExportDefaultFromAsIdentifier,o)}}else if((i=t.specifiers)!=null&&i.length)for(let o of t.specifiers){let{exported:l}=o,c=l.type==="Identifier"?l.name:l.value;if(this.checkDuplicateExports(o,c),!a&&o.local){let{local:u}=o;u.type!=="Identifier"?this.raise(Y.ExportBindingIsString,o,{localName:u.value,exportName:c}):(this.checkReservedWord(u.name,u.loc.start,!0,!1),this.scope.checkLocalExport(u))}}else if(t.declaration){let o=t.declaration;if(o.type==="FunctionDeclaration"||o.type==="ClassDeclaration"){let{id:l}=o;if(!l)throw new Error("Assertion failure");this.checkDuplicateExports(t,l.name)}else if(o.type==="VariableDeclaration")for(let l of o.declarations)this.checkDeclaration(l.id)}}}checkDeclaration(t){if(t.type==="Identifier")this.checkDuplicateExports(t,t.name);else if(t.type==="ObjectPattern")for(let r of t.properties)this.checkDeclaration(r);else if(t.type==="ArrayPattern")for(let r of t.elements)r&&this.checkDeclaration(r);else t.type==="ObjectProperty"?this.checkDeclaration(t.value):t.type==="RestElement"?this.checkDeclaration(t.argument):t.type==="AssignmentPattern"&&this.checkDeclaration(t.left)}checkDuplicateExports(t,r){this.exportedIdentifiers.has(r)&&(r==="default"?this.raise(Y.DuplicateDefaultExport,t):this.raise(Y.DuplicateExport,t,{exportName:r})),this.exportedIdentifiers.add(r)}parseExportSpecifiers(t){let r=[],n=!0;for(this.expect(5);!this.eat(8);){if(n)n=!1;else if(this.expect(12),this.eat(8))break;let a=this.isContextual(130),i=this.match(134),s=this.startNode();s.local=this.parseModuleExportName(),r.push(this.parseExportSpecifier(s,i,t,a))}return r}parseExportSpecifier(t,r,n,a){return this.eatContextual(93)?t.exported=this.parseModuleExportName():r?t.exported=this.cloneStringLiteral(t.local):t.exported||(t.exported=this.cloneIdentifier(t.local)),this.finishNode(t,"ExportSpecifier")}parseModuleExportName(){if(this.match(134)){let t=this.parseStringLiteral(this.state.value),r=mye.exec(t.value);return r&&this.raise(Y.ModuleExportNameHasLoneSurrogate,t,{surrogateCharCode:r[0].charCodeAt(0)}),t}return this.parseIdentifier(!0)}isJSONModuleImport(t){return t.assertions!=null?t.assertions.some(({key:r,value:n})=>n.value==="json"&&(r.type==="Identifier"?r.name==="type":r.value==="type")):!1}checkImportReflection(t){let{specifiers:r}=t,n=r.length===1?r[0].type:null;if(t.phase==="source")n!=="ImportDefaultSpecifier"&&this.raise(Y.SourcePhaseImportRequiresDefault,r[0].loc.start);else if(t.phase==="defer")n!=="ImportNamespaceSpecifier"&&this.raise(Y.DeferImportRequiresNamespace,r[0].loc.start);else if(t.module){var a;n!=="ImportDefaultSpecifier"&&this.raise(Y.ImportReflectionNotBinding,r[0].loc.start),((a=t.assertions)==null?void 0:a.length)>0&&this.raise(Y.ImportReflectionHasAssertion,r[0].loc.start)}}checkJSONModuleImport(t){if(this.isJSONModuleImport(t)&&t.type!=="ExportAllDeclaration"){let{specifiers:r}=t;if(r!=null){let n=r.find(a=>{let i;if(a.type==="ExportSpecifier"?i=a.local:a.type==="ImportSpecifier"&&(i=a.imported),i!==void 0)return i.type==="Identifier"?i.name!=="default":i.value!=="default"});n!==void 0&&this.raise(Y.ImportJSONBindingNotDefault,n.loc.start)}}}isPotentialImportPhase(t){return t?!1:this.isContextual(105)||this.isContextual(97)||this.isContextual(127)}applyImportPhase(t,r,n,a){r||(n==="module"?(this.expectPlugin("importReflection",a),t.module=!0):this.hasPlugin("importReflection")&&(t.module=!1),n==="source"?(this.expectPlugin("sourcePhaseImports",a),t.phase="source"):n==="defer"?(this.expectPlugin("deferredImportEvaluation",a),t.phase="defer"):this.hasPlugin("sourcePhaseImports")&&(t.phase=null))}parseMaybeImportPhase(t,r){if(!this.isPotentialImportPhase(r))return this.applyImportPhase(t,r,null),null;let n=this.startNode(),a=this.parseIdentifierName(!0),{type:i}=this.state;return(pc(i)?i!==98||this.lookaheadCharCode()===102:i!==12)?(this.applyImportPhase(t,r,a,n.loc.start),null):(this.applyImportPhase(t,r,null),this.createIdentifier(n,a))}isPrecedingIdImportPhase(t){let{type:r}=this.state;return ln(r)?r!==98||this.lookaheadCharCode()===102:r!==12}parseImport(t){return this.match(134)?this.parseImportSourceAndAttributes(t):this.parseImportSpecifiersAndAfter(t,this.parseMaybeImportPhase(t,!1))}parseImportSpecifiersAndAfter(t,r){t.specifiers=[];let a=!this.maybeParseDefaultImportSpecifier(t,r)||this.eat(12),i=a&&this.maybeParseStarImportSpecifier(t);return a&&!i&&this.parseNamedImportSpecifiers(t),this.expectContextual(98),this.parseImportSourceAndAttributes(t)}parseImportSourceAndAttributes(t){var r;return(r=t.specifiers)!=null||(t.specifiers=[]),t.source=this.parseImportSource(),this.maybeParseImportAttributes(t),this.checkImportReflection(t),this.checkJSONModuleImport(t),this.semicolon(),this.sawUnambiguousESM=!0,this.finishNode(t,"ImportDeclaration")}parseImportSource(){return this.match(134)||this.unexpected(),this.parseExprAtom()}parseImportSpecifierLocal(t,r,n){r.local=this.parseIdentifier(),t.specifiers.push(this.finishImportSpecifier(r,n))}finishImportSpecifier(t,r,n=8201){return this.checkLVal(t.local,{type:r},n),this.finishNode(t,r)}parseImportAttributes(){this.expect(5);let t=[],r=new Set;do{if(this.match(8))break;let n=this.startNode(),a=this.state.value;if(r.has(a)&&this.raise(Y.ModuleAttributesWithDuplicateKeys,this.state.startLoc,{key:a}),r.add(a),this.match(134)?n.key=this.parseStringLiteral(a):n.key=this.parseIdentifier(!0),this.expect(14),!this.match(134))throw this.raise(Y.ModuleAttributeInvalidValue,this.state.startLoc);n.value=this.parseStringLiteral(this.state.value),t.push(this.finishNode(n,"ImportAttribute"))}while(this.eat(12));return this.expect(8),t}parseModuleAttributes(){let t=[],r=new Set;do{let n=this.startNode();if(n.key=this.parseIdentifier(!0),n.key.name!=="type"&&this.raise(Y.ModuleAttributeDifferentFromType,n.key),r.has(n.key.name)&&this.raise(Y.ModuleAttributesWithDuplicateKeys,n.key,{key:n.key.name}),r.add(n.key.name),this.expect(14),!this.match(134))throw this.raise(Y.ModuleAttributeInvalidValue,this.state.startLoc);n.value=this.parseStringLiteral(this.state.value),t.push(this.finishNode(n,"ImportAttribute"))}while(this.eat(12));return t}maybeParseImportAttributes(t){let r;var n=!1;if(this.match(76)){if(this.hasPrecedingLineBreak()&&this.lookaheadCharCode()===40)return;this.next(),this.hasPlugin("moduleAttributes")?(r=this.parseModuleAttributes(),this.addExtra(t,"deprecatedWithLegacySyntax",!0)):r=this.parseImportAttributes(),n=!0}else this.isContextual(94)&&!this.hasPrecedingLineBreak()?(!this.hasPlugin("deprecatedImportAssert")&&!this.hasPlugin("importAssertions")&&this.raise(Y.ImportAttributesUseAssert,this.state.startLoc),this.hasPlugin("importAssertions")||this.addExtra(t,"deprecatedAssertSyntax",!0),this.next(),r=this.parseImportAttributes()):r=[];!n&&this.hasPlugin("importAssertions")?t.assertions=r:t.attributes=r}maybeParseDefaultImportSpecifier(t,r){if(r){let n=this.startNodeAtNode(r);return n.local=r,t.specifiers.push(this.finishImportSpecifier(n,"ImportDefaultSpecifier")),!0}else if(pc(this.state.type))return this.parseImportSpecifierLocal(t,this.startNode(),"ImportDefaultSpecifier"),!0;return!1}maybeParseStarImportSpecifier(t){if(this.match(55)){let r=this.startNode();return this.next(),this.expectContextual(93),this.parseImportSpecifierLocal(t,r,"ImportNamespaceSpecifier"),!0}return!1}parseNamedImportSpecifiers(t){let r=!0;for(this.expect(5);!this.eat(8);){if(r)r=!1;else{if(this.eat(14))throw this.raise(Y.DestructureNamedImport,this.state.startLoc);if(this.expect(12),this.eat(8))break}let n=this.startNode(),a=this.match(134),i=this.isContextual(130);n.imported=this.parseModuleExportName();let s=this.parseImportSpecifier(n,a,t.importKind==="type"||t.importKind==="typeof",i,void 0);t.specifiers.push(s)}}parseImportSpecifier(t,r,n,a,i){if(this.eatContextual(93))t.local=this.parseIdentifier();else{let{imported:s}=t;if(r)throw this.raise(Y.ImportBindingIsString,t,{importName:s.value});this.checkReservedWord(s.name,t.loc.start,!0,!0),t.local||(t.local=this.cloneIdentifier(s))}return this.finishImportSpecifier(t,"ImportSpecifier",i)}isThisParam(t){return t.type==="Identifier"&&t.name==="this"}},b1=class extends AL{constructor(t,r,n){let a=pge(t);super(a,r),this.options=a,this.initializeScopes(),this.plugins=n,this.filename=a.sourceFilename,this.startIndex=a.startIndex;let i=0;a.allowAwaitOutsideFunction&&(i|=1),a.allowReturnOutsideFunction&&(i|=2),a.allowImportExportEverywhere&&(i|=8),a.allowSuperOutsideMethod&&(i|=16),a.allowUndeclaredExports&&(i|=64),a.allowNewTargetOutsideFunction&&(i|=4),a.allowYieldOutsideFunction&&(i|=32),a.ranges&&(i|=128),a.tokens&&(i|=256),a.createImportExpressions&&(i|=512),a.createParenthesizedExpressions&&(i|=1024),a.errorRecovery&&(i|=2048),a.attachComment&&(i|=4096),a.annexB&&(i|=8192),this.optionFlags=i}getScopeHandler(){return x0}parse(){this.enterInitialScopes();let t=this.startNode(),r=this.startNode();this.nextToken(),t.errors=null;let n=this.parseTopLevel(t,r);return n.errors=this.state.errors,n.comments.length=this.state.commentsLen,n}};function gye(e,t){var r;if(((r=t)==null?void 0:r.sourceType)==="unambiguous"){t=Object.assign({},t);try{t.sourceType="module";let n=h0(t,e),a=n.parse();if(n.sawUnambiguousESM)return a;if(n.ambiguousScriptDifferentAst)try{return t.sourceType="script",h0(t,e).parse()}catch{}else a.program.sourceType="script";return a}catch(n){try{return t.sourceType="script",h0(t,e).parse()}catch{}throw n}}else return h0(t,e).parse()}function yye(e,t){let r=h0(t,e);return r.options.strictMode&&(r.state.strict=!0),r.getExpression()}function xye(e){let t={};for(let r of Object.keys(e))t[r]=Xu(e[r]);return t}var bye=xye(yge);function h0(e,t){let r=b1,n=new Map;if(e!=null&&e.plugins){for(let a of e.plugins){let i,s;typeof a=="string"?i=a:[i,s]=a,n.has(i)||n.set(i,s||{})}dye(n),r=vye(n)}return new r(e,t,n)}var sV=new Map;function vye(e){let t=[];for(let a of fye)e.has(a)&&t.push(a);let r=t.join("|"),n=sV.get(r);if(!n){n=b1;for(let a of t)n=vV[a](n);sV.set(r,n)}return n}S0.parse=gye;S0.parseExpression=yye;S0.tokTypes=bye});var BL=ae(Lr=>{"use strict";Object.defineProperty(Lr,"__esModule",{value:!0});Lr.Var=Lr.User=Lr.Statement=Lr.SpreadProperty=Lr.Scope=Lr.RestProperty=Lr.ReferencedMemberExpression=Lr.ReferencedIdentifier=Lr.Referenced=Lr.Pure=Lr.NumericLiteralTypeAnnotation=Lr.Generated=Lr.ForAwaitStatement=Lr.Flow=Lr.Expression=Lr.ExistentialTypeParam=Lr.BlockScoped=Lr.BindingIdentifier=void 0;var Lpt=Lr.ReferencedIdentifier=["Identifier","JSXIdentifier"],Rpt=Lr.ReferencedMemberExpression=["MemberExpression"],Dpt=Lr.BindingIdentifier=["Identifier"],Mpt=Lr.Statement=["Statement"],Opt=Lr.Expression=["Expression"],Fpt=Lr.Scope=["Scopable","Pattern"],Bpt=Lr.Referenced=null,$pt=Lr.BlockScoped=["FunctionDeclaration","ClassDeclaration","VariableDeclaration"],jpt=Lr.Var=["VariableDeclaration"],zpt=Lr.User=null,Upt=Lr.Generated=null,Vpt=Lr.Pure=null,qpt=Lr.Flow=["Flow","ImportDeclaration","ExportDeclaration","ImportSpecifier"],Hpt=Lr.RestProperty=["RestElement"],Gpt=Lr.SpreadProperty=["RestElement"],Kpt=Lr.ExistentialTypeParam=["ExistsTypeAnnotation"],Wpt=Lr.NumericLiteralTypeAnnotation=["NumberLiteralTypeAnnotation"],Xpt=Lr.ForAwaitStatement=["ForOfStatement"]});var TV=ae((Jpt,SV)=>{var xy=1e3,by=xy*60,vy=by*60,$m=vy*24,Sye=$m*7,Tye=$m*365.25;SV.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return wye(e);if(r==="number"&&isFinite(e))return t.long?Pye(e):Cye(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function wye(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*Tye;case"weeks":case"week":case"w":return r*Sye;case"days":case"day":case"d":return r*$m;case"hours":case"hour":case"hrs":case"hr":case"h":return r*vy;case"minutes":case"minute":case"mins":case"min":case"m":return r*by;case"seconds":case"second":case"secs":case"sec":case"s":return r*xy;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function Cye(e){var t=Math.abs(e);return t>=$m?Math.round(e/$m)+"d":t>=vy?Math.round(e/vy)+"h":t>=by?Math.round(e/by)+"m":t>=xy?Math.round(e/xy)+"s":e+"ms"}function Pye(e){var t=Math.abs(e);return t>=$m?S1(e,t,$m,"day"):t>=vy?S1(e,t,vy,"hour"):t>=by?S1(e,t,by,"minute"):t>=xy?S1(e,t,xy,"second"):e+" ms"}function S1(e,t,r,n){var a=t>=r*1.5;return Math.round(e/r)+" "+n+(a?"s":"")}});var CV=ae((Zpt,wV)=>{function Eye(e){r.debug=r,r.default=r,r.coerce=l,r.disable=s,r.enable=a,r.enabled=o,r.humanize=TV(),r.destroy=c,Object.keys(e).forEach(u=>{r[u]=e[u]}),r.names=[],r.skips=[],r.formatters={};function t(u){let d=0;for(let f=0;f<u.length;f++)d=(d<<5)-d+u.charCodeAt(f),d|=0;return r.colors[Math.abs(d)%r.colors.length]}r.selectColor=t;function r(u){let d,f=null,p,m;function h(...x){if(!h.enabled)return;let g=h,y=Number(new Date),b=y-(d||y);g.diff=b,g.prev=d,g.curr=y,d=y,x[0]=r.coerce(x[0]),typeof x[0]!="string"&&x.unshift("%O");let S=0;x[0]=x[0].replace(/%([a-zA-Z%])/g,(E,C)=>{if(E==="%%")return"%";S++;let N=r.formatters[C];if(typeof N=="function"){let _=x[S];E=N.call(g,_),x.splice(S,1),S--}return E}),r.formatArgs.call(g,x),(g.log||r.log).apply(g,x)}return h.namespace=u,h.useColors=r.useColors(),h.color=r.selectColor(u),h.extend=n,h.destroy=r.destroy,Object.defineProperty(h,"enabled",{enumerable:!0,configurable:!1,get:()=>f!==null?f:(p!==r.namespaces&&(p=r.namespaces,m=r.enabled(u)),m),set:x=>{f=x}}),typeof r.init=="function"&&r.init(h),h}function n(u,d){let f=r(this.namespace+(typeof d>"u"?":":d)+u);return f.log=this.log,f}function a(u){r.save(u),r.namespaces=u,r.names=[],r.skips=[];let d=(typeof u=="string"?u:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let f of d)f[0]==="-"?r.skips.push(f.slice(1)):r.names.push(f)}function i(u,d){let f=0,p=0,m=-1,h=0;for(;f<u.length;)if(p<d.length&&(d[p]===u[f]||d[p]==="*"))d[p]==="*"?(m=p,h=f,p++):(f++,p++);else if(m!==-1)p=m+1,h++,f=h;else return!1;for(;p<d.length&&d[p]==="*";)p++;return p===d.length}function s(){let u=[...r.names,...r.skips.map(d=>"-"+d)].join(",");return r.enable(""),u}function o(u){for(let d of r.skips)if(i(u,d))return!1;for(let d of r.names)if(i(u,d))return!0;return!1}function l(u){return u instanceof Error?u.stack||u.message:u}function c(){}return r.enable(r.load()),r}wV.exports=Eye});var PV=ae((ro,T1)=>{ro.formatArgs=Aye;ro.save=Nye;ro.load=kye;ro.useColors=Iye;ro.storage=_ye();ro.destroy=(()=>{let e=!1;return()=>{e||(e=!0)}})();ro.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function Iye(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function Aye(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+T1.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;e.splice(1,0,t,"color: inherit");let r=0,n=0;e[0].replace(/%[a-zA-Z%]/g,a=>{a!=="%%"&&(r++,a==="%c"&&(n=r))}),e.splice(n,0,t)}ro.log=console.debug||console.log||(()=>{});function Nye(e){try{e?ro.storage.setItem("debug",e):ro.storage.removeItem("debug")}catch{}}function kye(){let e;try{e=ro.storage.getItem("debug")||ro.storage.getItem("DEBUG")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function _ye(){try{return localStorage}catch{}}T1.exports=CV()(ro);var{formatters:Lye}=T1.exports;Lye.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var w1=ae($L=>{"use strict";Object.defineProperty($L,"__esModule",{value:!0});$L.default=Rye;function Rye(e,t){let r=Object.keys(t);for(let n of r)if(e[n]!==t[n])return!1;return!0}});var Sy=ae(jL=>{"use strict";Object.defineProperty(jL,"__esModule",{value:!0});jL.default=Dye;var EV=new Set;function Dye(e,t,r="",n=e){if(EV.has(n))return;EV.add(n);let{internal:a,trace:i}=Mye(1,2)}function Mye(e,t){let{stackTraceLimit:r,prepareStackTrace:n}=Error,a;if(Error.stackTraceLimit=1+e+t,Error.prepareStackTrace=function(s,o){a=o},new Error().stack,Error.stackTraceLimit=r,Error.prepareStackTrace=n,!a)return{internal:!1,trace:""};let i=a.slice(1+e,1+e+t);return{internal:/[\\/]@babel[\\/]/.test(i[1].getFileName()),trace:i.map(s=>` at ${s}`).join(`
`)}}});var va=ae(F=>{"use strict";Object.defineProperty(F,"__esModule",{value:!0});F.isAccessor=QSe;F.isAnyTypeAnnotation=ybe;F.isArgumentPlaceholder=Gve;F.isArrayExpression=Oye;F.isArrayPattern=Dxe;F.isArrayTypeAnnotation=xbe;F.isArrowFunctionExpression=Mxe;F.isAssignmentExpression=Fye;F.isAssignmentPattern=Rxe;F.isAwaitExpression=abe;F.isBigIntLiteral=sbe;F.isBinary=SSe;F.isBinaryExpression=Bye;F.isBindExpression=Kve;F.isBlock=CSe;F.isBlockParent=wSe;F.isBlockStatement=Uye;F.isBooleanLiteral=cxe;F.isBooleanLiteralTypeAnnotation=vbe;F.isBooleanTypeAnnotation=bbe;F.isBreakStatement=Vye;F.isCallExpression=qye;F.isCatchClause=Hye;F.isClass=YSe;F.isClassAccessorProperty=dbe;F.isClassBody=Oxe;F.isClassDeclaration=Bxe;F.isClassExpression=Fxe;F.isClassImplements=Tbe;F.isClassMethod=Yxe;F.isClassPrivateMethod=pbe;F.isClassPrivateProperty=fbe;F.isClassProperty=ube;F.isCompletionStatement=ISe;F.isConditional=ASe;F.isConditionalExpression=Gye;F.isContinueStatement=Kye;F.isDebuggerStatement=Wye;F.isDecimalLiteral=Qve;F.isDeclaration=FSe;F.isDeclareClass=wbe;F.isDeclareExportAllDeclaration=Lbe;F.isDeclareExportDeclaration=_be;F.isDeclareFunction=Cbe;F.isDeclareInterface=Pbe;F.isDeclareModule=Ebe;F.isDeclareModuleExports=Ibe;F.isDeclareOpaqueType=Nbe;F.isDeclareTypeAlias=Abe;F.isDeclareVariable=kbe;F.isDeclaredPredicate=Rbe;F.isDecorator=Wve;F.isDirective=jye;F.isDirectiveLiteral=zye;F.isDoExpression=Xve;F.isDoWhileStatement=Xye;F.isEmptyStatement=Yye;F.isEmptyTypeAnnotation=qbe;F.isEnumBody=sTe;F.isEnumBooleanBody=xve;F.isEnumBooleanMember=Tve;F.isEnumDeclaration=yve;F.isEnumDefaultedMember=Pve;F.isEnumMember=oTe;F.isEnumNumberBody=bve;F.isEnumNumberMember=wve;F.isEnumStringBody=vve;F.isEnumStringMember=Cve;F.isEnumSymbolBody=Sve;F.isExistsTypeAnnotation=Dbe;F.isExportAllDeclaration=$xe;F.isExportDeclaration=JSe;F.isExportDefaultDeclaration=jxe;F.isExportDefaultSpecifier=Yve;F.isExportNamedDeclaration=zxe;F.isExportNamespaceSpecifier=obe;F.isExportSpecifier=Uxe;F.isExpression=vSe;F.isExpressionStatement=Jye;F.isExpressionWrapper=_Se;F.isFile=Zye;F.isFlow=tTe;F.isFlowBaseAnnotation=nTe;F.isFlowDeclaration=aTe;F.isFlowPredicate=iTe;F.isFlowType=rTe;F.isFor=LSe;F.isForInStatement=Qye;F.isForOfStatement=Vxe;F.isForStatement=exe;F.isForXStatement=RSe;F.isFunction=DSe;F.isFunctionDeclaration=txe;F.isFunctionExpression=rxe;F.isFunctionParameter=BSe;F.isFunctionParent=MSe;F.isFunctionTypeAnnotation=Mbe;F.isFunctionTypeParam=Obe;F.isGenericTypeAnnotation=Fbe;F.isIdentifier=nxe;F.isIfStatement=axe;F.isImmutable=VSe;F.isImport=ibe;F.isImportAttribute=gbe;F.isImportDeclaration=qxe;F.isImportDefaultSpecifier=Hxe;F.isImportExpression=Wxe;F.isImportNamespaceSpecifier=Gxe;F.isImportOrExportDeclaration=IV;F.isImportSpecifier=Kxe;F.isIndexedAccessType=Eve;F.isInferredPredicate=Bbe;F.isInterfaceDeclaration=jbe;F.isInterfaceExtends=$be;F.isInterfaceTypeAnnotation=zbe;F.isInterpreterDirective=$ye;F.isIntersectionTypeAnnotation=Ube;F.isJSX=lTe;F.isJSXAttribute=Ave;F.isJSXClosingElement=Nve;F.isJSXClosingFragment=Uve;F.isJSXElement=kve;F.isJSXEmptyExpression=_ve;F.isJSXExpressionContainer=Lve;F.isJSXFragment=jve;F.isJSXIdentifier=Dve;F.isJSXMemberExpression=Mve;F.isJSXNamespacedName=Ove;F.isJSXOpeningElement=Fve;F.isJSXOpeningFragment=zve;F.isJSXSpreadAttribute=Bve;F.isJSXSpreadChild=Rve;F.isJSXText=$ve;F.isLVal=jSe;F.isLabeledStatement=ixe;F.isLiteral=USe;F.isLogicalExpression=dxe;F.isLoop=NSe;F.isMemberExpression=fxe;F.isMetaProperty=Xxe;F.isMethod=HSe;F.isMiscellaneous=cTe;F.isMixedTypeAnnotation=Vbe;F.isModuleDeclaration=xTe;F.isModuleExpression=e0e;F.isModuleSpecifier=ZSe;F.isNewExpression=pxe;F.isNoop=Vve;F.isNullLiteral=lxe;F.isNullLiteralTypeAnnotation=Sbe;F.isNullableTypeAnnotation=Hbe;F.isNumberLiteral=mTe;F.isNumberLiteralTypeAnnotation=Gbe;F.isNumberTypeAnnotation=Kbe;F.isNumericLiteral=oxe;F.isObjectExpression=hxe;F.isObjectMember=GSe;F.isObjectMethod=gxe;F.isObjectPattern=Jxe;F.isObjectProperty=yxe;F.isObjectTypeAnnotation=Wbe;F.isObjectTypeCallProperty=Ybe;F.isObjectTypeIndexer=Jbe;F.isObjectTypeInternalSlot=Xbe;F.isObjectTypeProperty=Zbe;F.isObjectTypeSpreadProperty=Qbe;F.isOpaqueType=eve;F.isOptionalCallExpression=cbe;F.isOptionalIndexedAccessType=Ive;F.isOptionalMemberExpression=lbe;F.isParenthesizedExpression=Sxe;F.isPattern=XSe;F.isPatternLike=$Se;F.isPipelineBareFunction=n0e;F.isPipelinePrimaryTopicReference=a0e;F.isPipelineTopicExpression=r0e;F.isPlaceholder=qve;F.isPrivate=eTe;F.isPrivateName=mbe;F.isProgram=mxe;F.isProperty=KSe;F.isPureish=OSe;F.isQualifiedTypeIdentifier=tve;F.isRecordExpression=Jve;F.isRegExpLiteral=uxe;F.isRegexLiteral=hTe;F.isRestElement=xxe;F.isRestProperty=gTe;F.isReturnStatement=bxe;F.isScopable=TSe;F.isSequenceExpression=vxe;F.isSpreadElement=Zxe;F.isSpreadProperty=yTe;F.isStandardized=bSe;F.isStatement=PSe;F.isStaticBlock=hbe;F.isStringLiteral=sxe;F.isStringLiteralTypeAnnotation=rve;F.isStringTypeAnnotation=nve;F.isSuper=Qxe;F.isSwitchCase=Txe;F.isSwitchStatement=wxe;F.isSymbolTypeAnnotation=ave;F.isTSAnyKeyword=h0e;F.isTSArrayType=M0e;F.isTSAsExpression=tSe;F.isTSBaseType=pTe;F.isTSBigIntKeyword=y0e;F.isTSBooleanKeyword=g0e;F.isTSCallSignatureDeclaration=u0e;F.isTSConditionalType=U0e;F.isTSConstructSignatureDeclaration=d0e;F.isTSConstructorType=k0e;F.isTSDeclareFunction=o0e;F.isTSDeclareMethod=l0e;F.isTSEntityName=zSe;F.isTSEnumBody=aSe;F.isTSEnumDeclaration=iSe;F.isTSEnumMember=sSe;F.isTSExportAssignment=pSe;F.isTSExpressionWithTypeArguments=Y0e;F.isTSExternalModuleReference=dSe;F.isTSFunctionType=N0e;F.isTSImportEqualsDeclaration=uSe;F.isTSImportType=cSe;F.isTSIndexSignature=m0e;F.isTSIndexedAccessType=G0e;F.isTSInferType=V0e;F.isTSInstantiationExpression=eSe;F.isTSInterfaceBody=Z0e;F.isTSInterfaceDeclaration=J0e;F.isTSIntersectionType=z0e;F.isTSIntrinsicKeyword=x0e;F.isTSLiteralType=X0e;F.isTSMappedType=K0e;F.isTSMethodSignature=p0e;F.isTSModuleBlock=lSe;F.isTSModuleDeclaration=oSe;F.isTSNamedTupleMember=$0e;F.isTSNamespaceExportDeclaration=mSe;F.isTSNeverKeyword=b0e;F.isTSNonNullExpression=fSe;F.isTSNullKeyword=v0e;F.isTSNumberKeyword=S0e;F.isTSObjectKeyword=T0e;F.isTSOptionalType=F0e;F.isTSParameterProperty=s0e;F.isTSParenthesizedType=q0e;F.isTSPropertySignature=f0e;F.isTSQualifiedName=c0e;F.isTSRestType=B0e;F.isTSSatisfiesExpression=rSe;F.isTSStringKeyword=w0e;F.isTSSymbolKeyword=C0e;F.isTSTemplateLiteralType=W0e;F.isTSThisType=A0e;F.isTSTupleType=O0e;F.isTSType=fTe;F.isTSTypeAliasDeclaration=Q0e;F.isTSTypeAnnotation=hSe;F.isTSTypeAssertion=nSe;F.isTSTypeElement=dTe;F.isTSTypeLiteral=D0e;F.isTSTypeOperator=H0e;F.isTSTypeParameter=xSe;F.isTSTypeParameterDeclaration=ySe;F.isTSTypeParameterInstantiation=gSe;F.isTSTypePredicate=L0e;F.isTSTypeQuery=R0e;F.isTSTypeReference=_0e;F.isTSUndefinedKeyword=P0e;F.isTSUnionType=j0e;F.isTSUnknownKeyword=E0e;F.isTSVoidKeyword=I0e;F.isTaggedTemplateExpression=ebe;F.isTemplateElement=tbe;F.isTemplateLiteral=rbe;F.isTerminatorless=ESe;F.isThisExpression=Cxe;F.isThisTypeAnnotation=ive;F.isThrowStatement=Pxe;F.isTopicReference=t0e;F.isTryStatement=Exe;F.isTupleExpression=Zve;F.isTupleTypeAnnotation=sve;F.isTypeAlias=lve;F.isTypeAnnotation=cve;F.isTypeCastExpression=uve;F.isTypeParameter=dve;F.isTypeParameterDeclaration=fve;F.isTypeParameterInstantiation=pve;F.isTypeScript=uTe;F.isTypeofTypeAnnotation=ove;F.isUnaryExpression=Ixe;F.isUnaryLike=WSe;F.isUnionTypeAnnotation=mve;F.isUpdateExpression=Axe;F.isUserWhitespacable=qSe;F.isV8IntrinsicIdentifier=Hve;F.isVariableDeclaration=Nxe;F.isVariableDeclarator=kxe;F.isVariance=hve;F.isVoidPattern=i0e;F.isVoidTypeAnnotation=gve;F.isWhile=kSe;F.isWhileStatement=_xe;F.isWithStatement=Lxe;F.isYieldExpression=nbe;var j=w1(),T0=Sy();function Oye(e,t){return!e||e.type!=="ArrayExpression"?!1:t==null||(0,j.default)(e,t)}function Fye(e,t){return!e||e.type!=="AssignmentExpression"?!1:t==null||(0,j.default)(e,t)}function Bye(e,t){return!e||e.type!=="BinaryExpression"?!1:t==null||(0,j.default)(e,t)}function $ye(e,t){return!e||e.type!=="InterpreterDirective"?!1:t==null||(0,j.default)(e,t)}function jye(e,t){return!e||e.type!=="Directive"?!1:t==null||(0,j.default)(e,t)}function zye(e,t){return!e||e.type!=="DirectiveLiteral"?!1:t==null||(0,j.default)(e,t)}function Uye(e,t){return!e||e.type!=="BlockStatement"?!1:t==null||(0,j.default)(e,t)}function Vye(e,t){return!e||e.type!=="BreakStatement"?!1:t==null||(0,j.default)(e,t)}function qye(e,t){return!e||e.type!=="CallExpression"?!1:t==null||(0,j.default)(e,t)}function Hye(e,t){return!e||e.type!=="CatchClause"?!1:t==null||(0,j.default)(e,t)}function Gye(e,t){return!e||e.type!=="ConditionalExpression"?!1:t==null||(0,j.default)(e,t)}function Kye(e,t){return!e||e.type!=="ContinueStatement"?!1:t==null||(0,j.default)(e,t)}function Wye(e,t){return!e||e.type!=="DebuggerStatement"?!1:t==null||(0,j.default)(e,t)}function Xye(e,t){return!e||e.type!=="DoWhileStatement"?!1:t==null||(0,j.default)(e,t)}function Yye(e,t){return!e||e.type!=="EmptyStatement"?!1:t==null||(0,j.default)(e,t)}function Jye(e,t){return!e||e.type!=="ExpressionStatement"?!1:t==null||(0,j.default)(e,t)}function Zye(e,t){return!e||e.type!=="File"?!1:t==null||(0,j.default)(e,t)}function Qye(e,t){return!e||e.type!=="ForInStatement"?!1:t==null||(0,j.default)(e,t)}function exe(e,t){return!e||e.type!=="ForStatement"?!1:t==null||(0,j.default)(e,t)}function txe(e,t){return!e||e.type!=="FunctionDeclaration"?!1:t==null||(0,j.default)(e,t)}function rxe(e,t){return!e||e.type!=="FunctionExpression"?!1:t==null||(0,j.default)(e,t)}function nxe(e,t){return!e||e.type!=="Identifier"?!1:t==null||(0,j.default)(e,t)}function axe(e,t){return!e||e.type!=="IfStatement"?!1:t==null||(0,j.default)(e,t)}function ixe(e,t){return!e||e.type!=="LabeledStatement"?!1:t==null||(0,j.default)(e,t)}function sxe(e,t){return!e||e.type!=="StringLiteral"?!1:t==null||(0,j.default)(e,t)}function oxe(e,t){return!e||e.type!=="NumericLiteral"?!1:t==null||(0,j.default)(e,t)}function lxe(e,t){return!e||e.type!=="NullLiteral"?!1:t==null||(0,j.default)(e,t)}function cxe(e,t){return!e||e.type!=="BooleanLiteral"?!1:t==null||(0,j.default)(e,t)}function uxe(e,t){return!e||e.type!=="RegExpLiteral"?!1:t==null||(0,j.default)(e,t)}function dxe(e,t){return!e||e.type!=="LogicalExpression"?!1:t==null||(0,j.default)(e,t)}function fxe(e,t){return!e||e.type!=="MemberExpression"?!1:t==null||(0,j.default)(e,t)}function pxe(e,t){return!e||e.type!=="NewExpression"?!1:t==null||(0,j.default)(e,t)}function mxe(e,t){return!e||e.type!=="Program"?!1:t==null||(0,j.default)(e,t)}function hxe(e,t){return!e||e.type!=="ObjectExpression"?!1:t==null||(0,j.default)(e,t)}function gxe(e,t){return!e||e.type!=="ObjectMethod"?!1:t==null||(0,j.default)(e,t)}function yxe(e,t){return!e||e.type!=="ObjectProperty"?!1:t==null||(0,j.default)(e,t)}function xxe(e,t){return!e||e.type!=="RestElement"?!1:t==null||(0,j.default)(e,t)}function bxe(e,t){return!e||e.type!=="ReturnStatement"?!1:t==null||(0,j.default)(e,t)}function vxe(e,t){return!e||e.type!=="SequenceExpression"?!1:t==null||(0,j.default)(e,t)}function Sxe(e,t){return!e||e.type!=="ParenthesizedExpression"?!1:t==null||(0,j.default)(e,t)}function Txe(e,t){return!e||e.type!=="SwitchCase"?!1:t==null||(0,j.default)(e,t)}function wxe(e,t){return!e||e.type!=="SwitchStatement"?!1:t==null||(0,j.default)(e,t)}function Cxe(e,t){return!e||e.type!=="ThisExpression"?!1:t==null||(0,j.default)(e,t)}function Pxe(e,t){return!e||e.type!=="ThrowStatement"?!1:t==null||(0,j.default)(e,t)}function Exe(e,t){return!e||e.type!=="TryStatement"?!1:t==null||(0,j.default)(e,t)}function Ixe(e,t){return!e||e.type!=="UnaryExpression"?!1:t==null||(0,j.default)(e,t)}function Axe(e,t){return!e||e.type!=="UpdateExpression"?!1:t==null||(0,j.default)(e,t)}function Nxe(e,t){return!e||e.type!=="VariableDeclaration"?!1:t==null||(0,j.default)(e,t)}function kxe(e,t){return!e||e.type!=="VariableDeclarator"?!1:t==null||(0,j.default)(e,t)}function _xe(e,t){return!e||e.type!=="WhileStatement"?!1:t==null||(0,j.default)(e,t)}function Lxe(e,t){return!e||e.type!=="WithStatement"?!1:t==null||(0,j.default)(e,t)}function Rxe(e,t){return!e||e.type!=="AssignmentPattern"?!1:t==null||(0,j.default)(e,t)}function Dxe(e,t){return!e||e.type!=="ArrayPattern"?!1:t==null||(0,j.default)(e,t)}function Mxe(e,t){return!e||e.type!=="ArrowFunctionExpression"?!1:t==null||(0,j.default)(e,t)}function Oxe(e,t){return!e||e.type!=="ClassBody"?!1:t==null||(0,j.default)(e,t)}function Fxe(e,t){return!e||e.type!=="ClassExpression"?!1:t==null||(0,j.default)(e,t)}function Bxe(e,t){return!e||e.type!=="ClassDeclaration"?!1:t==null||(0,j.default)(e,t)}function $xe(e,t){return!e||e.type!=="ExportAllDeclaration"?!1:t==null||(0,j.default)(e,t)}function jxe(e,t){return!e||e.type!=="ExportDefaultDeclaration"?!1:t==null||(0,j.default)(e,t)}function zxe(e,t){return!e||e.type!=="ExportNamedDeclaration"?!1:t==null||(0,j.default)(e,t)}function Uxe(e,t){return!e||e.type!=="ExportSpecifier"?!1:t==null||(0,j.default)(e,t)}function Vxe(e,t){return!e||e.type!=="ForOfStatement"?!1:t==null||(0,j.default)(e,t)}function qxe(e,t){return!e||e.type!=="ImportDeclaration"?!1:t==null||(0,j.default)(e,t)}function Hxe(e,t){return!e||e.type!=="ImportDefaultSpecifier"?!1:t==null||(0,j.default)(e,t)}function Gxe(e,t){return!e||e.type!=="ImportNamespaceSpecifier"?!1:t==null||(0,j.default)(e,t)}function Kxe(e,t){return!e||e.type!=="ImportSpecifier"?!1:t==null||(0,j.default)(e,t)}function Wxe(e,t){return!e||e.type!=="ImportExpression"?!1:t==null||(0,j.default)(e,t)}function Xxe(e,t){return!e||e.type!=="MetaProperty"?!1:t==null||(0,j.default)(e,t)}function Yxe(e,t){return!e||e.type!=="ClassMethod"?!1:t==null||(0,j.default)(e,t)}function Jxe(e,t){return!e||e.type!=="ObjectPattern"?!1:t==null||(0,j.default)(e,t)}function Zxe(e,t){return!e||e.type!=="SpreadElement"?!1:t==null||(0,j.default)(e,t)}function Qxe(e,t){return!e||e.type!=="Super"?!1:t==null||(0,j.default)(e,t)}function ebe(e,t){return!e||e.type!=="TaggedTemplateExpression"?!1:t==null||(0,j.default)(e,t)}function tbe(e,t){return!e||e.type!=="TemplateElement"?!1:t==null||(0,j.default)(e,t)}function rbe(e,t){return!e||e.type!=="TemplateLiteral"?!1:t==null||(0,j.default)(e,t)}function nbe(e,t){return!e||e.type!=="YieldExpression"?!1:t==null||(0,j.default)(e,t)}function abe(e,t){return!e||e.type!=="AwaitExpression"?!1:t==null||(0,j.default)(e,t)}function ibe(e,t){return!e||e.type!=="Import"?!1:t==null||(0,j.default)(e,t)}function sbe(e,t){return!e||e.type!=="BigIntLiteral"?!1:t==null||(0,j.default)(e,t)}function obe(e,t){return!e||e.type!=="ExportNamespaceSpecifier"?!1:t==null||(0,j.default)(e,t)}function lbe(e,t){return!e||e.type!=="OptionalMemberExpression"?!1:t==null||(0,j.default)(e,t)}function cbe(e,t){return!e||e.type!=="OptionalCallExpression"?!1:t==null||(0,j.default)(e,t)}function ube(e,t){return!e||e.type!=="ClassProperty"?!1:t==null||(0,j.default)(e,t)}function dbe(e,t){return!e||e.type!=="ClassAccessorProperty"?!1:t==null||(0,j.default)(e,t)}function fbe(e,t){return!e||e.type!=="ClassPrivateProperty"?!1:t==null||(0,j.default)(e,t)}function pbe(e,t){return!e||e.type!=="ClassPrivateMethod"?!1:t==null||(0,j.default)(e,t)}function mbe(e,t){return!e||e.type!=="PrivateName"?!1:t==null||(0,j.default)(e,t)}function hbe(e,t){return!e||e.type!=="StaticBlock"?!1:t==null||(0,j.default)(e,t)}function gbe(e,t){return!e||e.type!=="ImportAttribute"?!1:t==null||(0,j.default)(e,t)}function ybe(e,t){return!e||e.type!=="AnyTypeAnnotation"?!1:t==null||(0,j.default)(e,t)}function xbe(e,t){return!e||e.type!=="ArrayTypeAnnotation"?!1:t==null||(0,j.default)(e,t)}function bbe(e,t){return!e||e.type!=="BooleanTypeAnnotation"?!1:t==null||(0,j.default)(e,t)}function vbe(e,t){return!e||e.type!=="BooleanLiteralTypeAnnotation"?!1:t==null||(0,j.default)(e,t)}function Sbe(e,t){return!e||e.type!=="NullLiteralTypeAnnotation"?!1:t==null||(0,j.default)(e,t)}function Tbe(e,t){return!e||e.type!=="ClassImplements"?!1:t==null||(0,j.default)(e,t)}function wbe(e,t){return!e||e.type!=="DeclareClass"?!1:t==null||(0,j.default)(e,t)}function Cbe(e,t){return!e||e.type!=="DeclareFunction"?!1:t==null||(0,j.default)(e,t)}function Pbe(e,t){return!e||e.type!=="DeclareInterface"?!1:t==null||(0,j.default)(e,t)}function Ebe(e,t){return!e||e.type!=="DeclareModule"?!1:t==null||(0,j.default)(e,t)}function Ibe(e,t){return!e||e.type!=="DeclareModuleExports"?!1:t==null||(0,j.default)(e,t)}function Abe(e,t){return!e||e.type!=="DeclareTypeAlias"?!1:t==null||(0,j.default)(e,t)}function Nbe(e,t){return!e||e.type!=="DeclareOpaqueType"?!1:t==null||(0,j.default)(e,t)}function kbe(e,t){return!e||e.type!=="DeclareVariable"?!1:t==null||(0,j.default)(e,t)}function _be(e,t){return!e||e.type!=="DeclareExportDeclaration"?!1:t==null||(0,j.default)(e,t)}function Lbe(e,t){return!e||e.type!=="DeclareExportAllDeclaration"?!1:t==null||(0,j.default)(e,t)}function Rbe(e,t){return!e||e.type!=="DeclaredPredicate"?!1:t==null||(0,j.default)(e,t)}function Dbe(e,t){return!e||e.type!=="ExistsTypeAnnotation"?!1:t==null||(0,j.default)(e,t)}function Mbe(e,t){return!e||e.type!=="FunctionTypeAnnotation"?!1:t==null||(0,j.default)(e,t)}function Obe(e,t){return!e||e.type!=="FunctionTypeParam"?!1:t==null||(0,j.default)(e,t)}function Fbe(e,t){return!e||e.type!=="GenericTypeAnnotation"?!1:t==null||(0,j.default)(e,t)}function Bbe(e,t){return!e||e.type!=="InferredPredicate"?!1:t==null||(0,j.default)(e,t)}function $be(e,t){return!e||e.type!=="InterfaceExtends"?!1:t==null||(0,j.default)(e,t)}function jbe(e,t){return!e||e.type!=="InterfaceDeclaration"?!1:t==null||(0,j.default)(e,t)}function zbe(e,t){return!e||e.type!=="InterfaceTypeAnnotation"?!1:t==null||(0,j.default)(e,t)}function Ube(e,t){return!e||e.type!=="IntersectionTypeAnnotation"?!1:t==null||(0,j.default)(e,t)}function Vbe(e,t){return!e||e.type!=="MixedTypeAnnotation"?!1:t==null||(0,j.default)(e,t)}function qbe(e,t){return!e||e.type!=="EmptyTypeAnnotation"?!1:t==null||(0,j.default)(e,t)}function Hbe(e,t){return!e||e.type!=="NullableTypeAnnotation"?!1:t==null||(0,j.default)(e,t)}function Gbe(e,t){return!e||e.type!=="NumberLiteralTypeAnnotation"?!1:t==null||(0,j.default)(e,t)}function Kbe(e,t){return!e||e.type!=="NumberTypeAnnotation"?!1:t==null||(0,j.default)(e,t)}function Wbe(e,t){return!e||e.type!=="ObjectTypeAnnotation"?!1:t==null||(0,j.default)(e,t)}function Xbe(e,t){return!e||e.type!=="ObjectTypeInternalSlot"?!1:t==null||(0,j.default)(e,t)}function Ybe(e,t){return!e||e.type!=="ObjectTypeCallProperty"?!1:t==null||(0,j.default)(e,t)}function Jbe(e,t){return!e||e.type!=="ObjectTypeIndexer"?!1:t==null||(0,j.default)(e,t)}function Zbe(e,t){return!e||e.type!=="ObjectTypeProperty"?!1:t==null||(0,j.default)(e,t)}function Qbe(e,t){return!e||e.type!=="ObjectTypeSpreadProperty"?!1:t==null||(0,j.default)(e,t)}function eve(e,t){return!e||e.type!=="OpaqueType"?!1:t==null||(0,j.default)(e,t)}function tve(e,t){return!e||e.type!=="QualifiedTypeIdentifier"?!1:t==null||(0,j.default)(e,t)}function rve(e,t){return!e||e.type!=="StringLiteralTypeAnnotation"?!1:t==null||(0,j.default)(e,t)}function nve(e,t){return!e||e.type!=="StringTypeAnnotation"?!1:t==null||(0,j.default)(e,t)}function ave(e,t){return!e||e.type!=="SymbolTypeAnnotation"?!1:t==null||(0,j.default)(e,t)}function ive(e,t){return!e||e.type!=="ThisTypeAnnotation"?!1:t==null||(0,j.default)(e,t)}function sve(e,t){return!e||e.type!=="TupleTypeAnnotation"?!1:t==null||(0,j.default)(e,t)}function ove(e,t){return!e||e.type!=="TypeofTypeAnnotation"?!1:t==null||(0,j.default)(e,t)}function lve(e,t){return!e||e.type!=="TypeAlias"?!1:t==null||(0,j.default)(e,t)}function cve(e,t){return!e||e.type!=="TypeAnnotation"?!1:t==null||(0,j.default)(e,t)}function uve(e,t){return!e||e.type!=="TypeCastExpression"?!1:t==null||(0,j.default)(e,t)}function dve(e,t){return!e||e.type!=="TypeParameter"?!1:t==null||(0,j.default)(e,t)}function fve(e,t){return!e||e.type!=="TypeParameterDeclaration"?!1:t==null||(0,j.default)(e,t)}function pve(e,t){return!e||e.type!=="TypeParameterInstantiation"?!1:t==null||(0,j.default)(e,t)}function mve(e,t){return!e||e.type!=="UnionTypeAnnotation"?!1:t==null||(0,j.default)(e,t)}function hve(e,t){return!e||e.type!=="Variance"?!1:t==null||(0,j.default)(e,t)}function gve(e,t){return!e||e.type!=="VoidTypeAnnotation"?!1:t==null||(0,j.default)(e,t)}function yve(e,t){return!e||e.type!=="EnumDeclaration"?!1:t==null||(0,j.default)(e,t)}function xve(e,t){return!e||e.type!=="EnumBooleanBody"?!1:t==null||(0,j.default)(e,t)}function bve(e,t){return!e||e.type!=="EnumNumberBody"?!1:t==null||(0,j.default)(e,t)}function vve(e,t){return!e||e.type!=="EnumStringBody"?!1:t==null||(0,j.default)(e,t)}function Sve(e,t){return!e||e.type!=="EnumSymbolBody"?!1:t==null||(0,j.default)(e,t)}function Tve(e,t){return!e||e.type!=="EnumBooleanMember"?!1:t==null||(0,j.default)(e,t)}function wve(e,t){return!e||e.type!=="EnumNumberMember"?!1:t==null||(0,j.default)(e,t)}function Cve(e,t){return!e||e.type!=="EnumStringMember"?!1:t==null||(0,j.default)(e,t)}function Pve(e,t){return!e||e.type!=="EnumDefaultedMember"?!1:t==null||(0,j.default)(e,t)}function Eve(e,t){return!e||e.type!=="IndexedAccessType"?!1:t==null||(0,j.default)(e,t)}function Ive(e,t){return!e||e.type!=="OptionalIndexedAccessType"?!1:t==null||(0,j.default)(e,t)}function Ave(e,t){return!e||e.type!=="JSXAttribute"?!1:t==null||(0,j.default)(e,t)}function Nve(e,t){return!e||e.type!=="JSXClosingElement"?!1:t==null||(0,j.default)(e,t)}function kve(e,t){return!e||e.type!=="JSXElement"?!1:t==null||(0,j.default)(e,t)}function _ve(e,t){return!e||e.type!=="JSXEmptyExpression"?!1:t==null||(0,j.default)(e,t)}function Lve(e,t){return!e||e.type!=="JSXExpressionContainer"?!1:t==null||(0,j.default)(e,t)}function Rve(e,t){return!e||e.type!=="JSXSpreadChild"?!1:t==null||(0,j.default)(e,t)}function Dve(e,t){return!e||e.type!=="JSXIdentifier"?!1:t==null||(0,j.default)(e,t)}function Mve(e,t){return!e||e.type!=="JSXMemberExpression"?!1:t==null||(0,j.default)(e,t)}function Ove(e,t){return!e||e.type!=="JSXNamespacedName"?!1:t==null||(0,j.default)(e,t)}function Fve(e,t){return!e||e.type!=="JSXOpeningElement"?!1:t==null||(0,j.default)(e,t)}function Bve(e,t){return!e||e.type!=="JSXSpreadAttribute"?!1:t==null||(0,j.default)(e,t)}function $ve(e,t){return!e||e.type!=="JSXText"?!1:t==null||(0,j.default)(e,t)}function jve(e,t){return!e||e.type!=="JSXFragment"?!1:t==null||(0,j.default)(e,t)}function zve(e,t){return!e||e.type!=="JSXOpeningFragment"?!1:t==null||(0,j.default)(e,t)}function Uve(e,t){return!e||e.type!=="JSXClosingFragment"?!1:t==null||(0,j.default)(e,t)}function Vve(e,t){return!e||e.type!=="Noop"?!1:t==null||(0,j.default)(e,t)}function qve(e,t){return!e||e.type!=="Placeholder"?!1:t==null||(0,j.default)(e,t)}function Hve(e,t){return!e||e.type!=="V8IntrinsicIdentifier"?!1:t==null||(0,j.default)(e,t)}function Gve(e,t){return!e||e.type!=="ArgumentPlaceholder"?!1:t==null||(0,j.default)(e,t)}function Kve(e,t){return!e||e.type!=="BindExpression"?!1:t==null||(0,j.default)(e,t)}function Wve(e,t){return!e||e.type!=="Decorator"?!1:t==null||(0,j.default)(e,t)}function Xve(e,t){return!e||e.type!=="DoExpression"?!1:t==null||(0,j.default)(e,t)}function Yve(e,t){return!e||e.type!=="ExportDefaultSpecifier"?!1:t==null||(0,j.default)(e,t)}function Jve(e,t){return!e||e.type!=="RecordExpression"?!1:t==null||(0,j.default)(e,t)}function Zve(e,t){return!e||e.type!=="TupleExpression"?!1:t==null||(0,j.default)(e,t)}function Qve(e,t){return!e||e.type!=="DecimalLiteral"?!1:t==null||(0,j.default)(e,t)}function e0e(e,t){return!e||e.type!=="ModuleExpression"?!1:t==null||(0,j.default)(e,t)}function t0e(e,t){return!e||e.type!=="TopicReference"?!1:t==null||(0,j.default)(e,t)}function r0e(e,t){return!e||e.type!=="PipelineTopicExpression"?!1:t==null||(0,j.default)(e,t)}function n0e(e,t){return!e||e.type!=="PipelineBareFunction"?!1:t==null||(0,j.default)(e,t)}function a0e(e,t){return!e||e.type!=="PipelinePrimaryTopicReference"?!1:t==null||(0,j.default)(e,t)}function i0e(e,t){return!e||e.type!=="VoidPattern"?!1:t==null||(0,j.default)(e,t)}function s0e(e,t){return!e||e.type!=="TSParameterProperty"?!1:t==null||(0,j.default)(e,t)}function o0e(e,t){return!e||e.type!=="TSDeclareFunction"?!1:t==null||(0,j.default)(e,t)}function l0e(e,t){return!e||e.type!=="TSDeclareMethod"?!1:t==null||(0,j.default)(e,t)}function c0e(e,t){return!e||e.type!=="TSQualifiedName"?!1:t==null||(0,j.default)(e,t)}function u0e(e,t){return!e||e.type!=="TSCallSignatureDeclaration"?!1:t==null||(0,j.default)(e,t)}function d0e(e,t){return!e||e.type!=="TSConstructSignatureDeclaration"?!1:t==null||(0,j.default)(e,t)}function f0e(e,t){return!e||e.type!=="TSPropertySignature"?!1:t==null||(0,j.default)(e,t)}function p0e(e,t){return!e||e.type!=="TSMethodSignature"?!1:t==null||(0,j.default)(e,t)}function m0e(e,t){return!e||e.type!=="TSIndexSignature"?!1:t==null||(0,j.default)(e,t)}function h0e(e,t){return!e||e.type!=="TSAnyKeyword"?!1:t==null||(0,j.default)(e,t)}function g0e(e,t){return!e||e.type!=="TSBooleanKeyword"?!1:t==null||(0,j.default)(e,t)}function y0e(e,t){return!e||e.type!=="TSBigIntKeyword"?!1:t==null||(0,j.default)(e,t)}function x0e(e,t){return!e||e.type!=="TSIntrinsicKeyword"?!1:t==null||(0,j.default)(e,t)}function b0e(e,t){return!e||e.type!=="TSNeverKeyword"?!1:t==null||(0,j.default)(e,t)}function v0e(e,t){return!e||e.type!=="TSNullKeyword"?!1:t==null||(0,j.default)(e,t)}function S0e(e,t){return!e||e.type!=="TSNumberKeyword"?!1:t==null||(0,j.default)(e,t)}function T0e(e,t){return!e||e.type!=="TSObjectKeyword"?!1:t==null||(0,j.default)(e,t)}function w0e(e,t){return!e||e.type!=="TSStringKeyword"?!1:t==null||(0,j.default)(e,t)}function C0e(e,t){return!e||e.type!=="TSSymbolKeyword"?!1:t==null||(0,j.default)(e,t)}function P0e(e,t){return!e||e.type!=="TSUndefinedKeyword"?!1:t==null||(0,j.default)(e,t)}function E0e(e,t){return!e||e.type!=="TSUnknownKeyword"?!1:t==null||(0,j.default)(e,t)}function I0e(e,t){return!e||e.type!=="TSVoidKeyword"?!1:t==null||(0,j.default)(e,t)}function A0e(e,t){return!e||e.type!=="TSThisType"?!1:t==null||(0,j.default)(e,t)}function N0e(e,t){return!e||e.type!=="TSFunctionType"?!1:t==null||(0,j.default)(e,t)}function k0e(e,t){return!e||e.type!=="TSConstructorType"?!1:t==null||(0,j.default)(e,t)}function _0e(e,t){return!e||e.type!=="TSTypeReference"?!1:t==null||(0,j.default)(e,t)}function L0e(e,t){return!e||e.type!=="TSTypePredicate"?!1:t==null||(0,j.default)(e,t)}function R0e(e,t){return!e||e.type!=="TSTypeQuery"?!1:t==null||(0,j.default)(e,t)}function D0e(e,t){return!e||e.type!=="TSTypeLiteral"?!1:t==null||(0,j.default)(e,t)}function M0e(e,t){return!e||e.type!=="TSArrayType"?!1:t==null||(0,j.default)(e,t)}function O0e(e,t){return!e||e.type!=="TSTupleType"?!1:t==null||(0,j.default)(e,t)}function F0e(e,t){return!e||e.type!=="TSOptionalType"?!1:t==null||(0,j.default)(e,t)}function B0e(e,t){return!e||e.type!=="TSRestType"?!1:t==null||(0,j.default)(e,t)}function $0e(e,t){return!e||e.type!=="TSNamedTupleMember"?!1:t==null||(0,j.default)(e,t)}function j0e(e,t){return!e||e.type!=="TSUnionType"?!1:t==null||(0,j.default)(e,t)}function z0e(e,t){return!e||e.type!=="TSIntersectionType"?!1:t==null||(0,j.default)(e,t)}function U0e(e,t){return!e||e.type!=="TSConditionalType"?!1:t==null||(0,j.default)(e,t)}function V0e(e,t){return!e||e.type!=="TSInferType"?!1:t==null||(0,j.default)(e,t)}function q0e(e,t){return!e||e.type!=="TSParenthesizedType"?!1:t==null||(0,j.default)(e,t)}function H0e(e,t){return!e||e.type!=="TSTypeOperator"?!1:t==null||(0,j.default)(e,t)}function G0e(e,t){return!e||e.type!=="TSIndexedAccessType"?!1:t==null||(0,j.default)(e,t)}function K0e(e,t){return!e||e.type!=="TSMappedType"?!1:t==null||(0,j.default)(e,t)}function W0e(e,t){return!e||e.type!=="TSTemplateLiteralType"?!1:t==null||(0,j.default)(e,t)}function X0e(e,t){return!e||e.type!=="TSLiteralType"?!1:t==null||(0,j.default)(e,t)}function Y0e(e,t){return!e||e.type!=="TSExpressionWithTypeArguments"?!1:t==null||(0,j.default)(e,t)}function J0e(e,t){return!e||e.type!=="TSInterfaceDeclaration"?!1:t==null||(0,j.default)(e,t)}function Z0e(e,t){return!e||e.type!=="TSInterfaceBody"?!1:t==null||(0,j.default)(e,t)}function Q0e(e,t){return!e||e.type!=="TSTypeAliasDeclaration"?!1:t==null||(0,j.default)(e,t)}function eSe(e,t){return!e||e.type!=="TSInstantiationExpression"?!1:t==null||(0,j.default)(e,t)}function tSe(e,t){return!e||e.type!=="TSAsExpression"?!1:t==null||(0,j.default)(e,t)}function rSe(e,t){return!e||e.type!=="TSSatisfiesExpression"?!1:t==null||(0,j.default)(e,t)}function nSe(e,t){return!e||e.type!=="TSTypeAssertion"?!1:t==null||(0,j.default)(e,t)}function aSe(e,t){return!e||e.type!=="TSEnumBody"?!1:t==null||(0,j.default)(e,t)}function iSe(e,t){return!e||e.type!=="TSEnumDeclaration"?!1:t==null||(0,j.default)(e,t)}function sSe(e,t){return!e||e.type!=="TSEnumMember"?!1:t==null||(0,j.default)(e,t)}function oSe(e,t){return!e||e.type!=="TSModuleDeclaration"?!1:t==null||(0,j.default)(e,t)}function lSe(e,t){return!e||e.type!=="TSModuleBlock"?!1:t==null||(0,j.default)(e,t)}function cSe(e,t){return!e||e.type!=="TSImportType"?!1:t==null||(0,j.default)(e,t)}function uSe(e,t){return!e||e.type!=="TSImportEqualsDeclaration"?!1:t==null||(0,j.default)(e,t)}function dSe(e,t){return!e||e.type!=="TSExternalModuleReference"?!1:t==null||(0,j.default)(e,t)}function fSe(e,t){return!e||e.type!=="TSNonNullExpression"?!1:t==null||(0,j.default)(e,t)}function pSe(e,t){return!e||e.type!=="TSExportAssignment"?!1:t==null||(0,j.default)(e,t)}function mSe(e,t){return!e||e.type!=="TSNamespaceExportDeclaration"?!1:t==null||(0,j.default)(e,t)}function hSe(e,t){return!e||e.type!=="TSTypeAnnotation"?!1:t==null||(0,j.default)(e,t)}function gSe(e,t){return!e||e.type!=="TSTypeParameterInstantiation"?!1:t==null||(0,j.default)(e,t)}function ySe(e,t){return!e||e.type!=="TSTypeParameterDeclaration"?!1:t==null||(0,j.default)(e,t)}function xSe(e,t){return!e||e.type!=="TSTypeParameter"?!1:t==null||(0,j.default)(e,t)}function bSe(e,t){if(!e)return!1;switch(e.type){case"ArrayExpression":case"AssignmentExpression":case"BinaryExpression":case"InterpreterDirective":case"Directive":case"DirectiveLiteral":case"BlockStatement":case"BreakStatement":case"CallExpression":case"CatchClause":case"ConditionalExpression":case"ContinueStatement":case"DebuggerStatement":case"DoWhileStatement":case"EmptyStatement":case"ExpressionStatement":case"File":case"ForInStatement":case"ForStatement":case"FunctionDeclaration":case"FunctionExpression":case"Identifier":case"IfStatement":case"LabeledStatement":case"StringLiteral":case"NumericLiteral":case"NullLiteral":case"BooleanLiteral":case"RegExpLiteral":case"LogicalExpression":case"MemberExpression":case"NewExpression":case"Program":case"ObjectExpression":case"ObjectMethod":case"ObjectProperty":case"RestElement":case"ReturnStatement":case"SequenceExpression":case"ParenthesizedExpression":case"SwitchCase":case"SwitchStatement":case"ThisExpression":case"ThrowStatement":case"TryStatement":case"UnaryExpression":case"UpdateExpression":case"VariableDeclaration":case"VariableDeclarator":case"WhileStatement":case"WithStatement":case"AssignmentPattern":case"ArrayPattern":case"ArrowFunctionExpression":case"ClassBody":case"ClassExpression":case"ClassDeclaration":case"ExportAllDeclaration":case"ExportDefaultDeclaration":case"ExportNamedDeclaration":case"ExportSpecifier":case"ForOfStatement":case"ImportDeclaration":case"ImportDefaultSpecifier":case"ImportNamespaceSpecifier":case"ImportSpecifier":case"ImportExpression":case"MetaProperty":case"ClassMethod":case"ObjectPattern":case"SpreadElement":case"Super":case"TaggedTemplateExpression":case"TemplateElement":case"TemplateLiteral":case"YieldExpression":case"AwaitExpression":case"Import":case"BigIntLiteral":case"ExportNamespaceSpecifier":case"OptionalMemberExpression":case"OptionalCallExpression":case"ClassProperty":case"ClassAccessorProperty":case"ClassPrivateProperty":case"ClassPrivateMethod":case"PrivateName":case"StaticBlock":case"ImportAttribute":break;case"Placeholder":switch(e.expectedNode){case"Identifier":case"StringLiteral":case"BlockStatement":case"ClassBody":break;default:return!1}break;default:return!1}return t==null||(0,j.default)(e,t)}function vSe(e,t){if(!e)return!1;switch(e.type){case"ArrayExpression":case"AssignmentExpression":case"BinaryExpression":case"CallExpression":case"ConditionalExpression":case"FunctionExpression":case"Identifier":case"StringLiteral":case"NumericLiteral":case"NullLiteral":case"BooleanLiteral":case"RegExpLiteral":case"LogicalExpression":case"MemberExpression":case"NewExpression":case"ObjectExpression":case"SequenceExpression":case"ParenthesizedExpression":case"ThisExpression":case"UnaryExpression":case"UpdateExpression":case"ArrowFunctionExpression":case"ClassExpression":case"ImportExpression":case"MetaProperty":case"Super":case"TaggedTemplateExpression":case"TemplateLiteral":case"YieldExpression":case"AwaitExpression":case"Import":case"BigIntLiteral":case"OptionalMemberExpression":case"OptionalCallExpression":case"TypeCastExpression":case"JSXElement":case"JSXFragment":case"BindExpression":case"DoExpression":case"RecordExpression":case"TupleExpression":case"DecimalLiteral":case"ModuleExpression":case"TopicReference":case"PipelineTopicExpression":case"PipelineBareFunction":case"PipelinePrimaryTopicReference":case"TSInstantiationExpression":case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":break;case"Placeholder":switch(e.expectedNode){case"Expression":case"Identifier":case"StringLiteral":break;default:return!1}break;default:return!1}return t==null||(0,j.default)(e,t)}function SSe(e,t){if(!e)return!1;switch(e.type){case"BinaryExpression":case"LogicalExpression":break;default:return!1}return t==null||(0,j.default)(e,t)}function TSe(e,t){if(!e)return!1;switch(e.type){case"BlockStatement":case"CatchClause":case"DoWhileStatement":case"ForInStatement":case"ForStatement":case"FunctionDeclaration":case"FunctionExpression":case"Program":case"ObjectMethod":case"SwitchStatement":case"WhileStatement":case"ArrowFunctionExpression":case"ClassExpression":case"ClassDeclaration":case"ForOfStatement":case"ClassMethod":case"ClassPrivateMethod":case"StaticBlock":case"TSModuleBlock":break;case"Placeholder":if(e.expectedNode==="BlockStatement")break;default:return!1}return t==null||(0,j.default)(e,t)}function wSe(e,t){if(!e)return!1;switch(e.type){case"BlockStatement":case"CatchClause":case"DoWhileStatement":case"ForInStatement":case"ForStatement":case"FunctionDeclaration":case"FunctionExpression":case"Program":case"ObjectMethod":case"SwitchStatement":case"WhileStatement":case"ArrowFunctionExpression":case"ForOfStatement":case"ClassMethod":case"ClassPrivateMethod":case"StaticBlock":case"TSModuleBlock":break;case"Placeholder":if(e.expectedNode==="BlockStatement")break;default:return!1}return t==null||(0,j.default)(e,t)}function CSe(e,t){if(!e)return!1;switch(e.type){case"BlockStatement":case"Program":case"TSModuleBlock":break;case"Placeholder":if(e.expectedNode==="BlockStatement")break;default:return!1}return t==null||(0,j.default)(e,t)}function PSe(e,t){if(!e)return!1;switch(e.type){case"BlockStatement":case"BreakStatement":case"ContinueStatement":case"DebuggerStatement":case"DoWhileStatement":case"EmptyStatement":case"ExpressionStatement":case"ForInStatement":case"ForStatement":case"FunctionDeclaration":case"IfStatement":case"LabeledStatement":case"ReturnStatement":case"SwitchStatement":case"ThrowStatement":case"TryStatement":case"VariableDeclaration":case"WhileStatement":case"WithStatement":case"ClassDeclaration":case"ExportAllDeclaration":case"ExportDefaultDeclaration":case"ExportNamedDeclaration":case"ForOfStatement":case"ImportDeclaration":case"DeclareClass":case"DeclareFunction":case"DeclareInterface":case"DeclareModule":case"DeclareModuleExports":case"DeclareTypeAlias":case"DeclareOpaqueType":case"DeclareVariable":case"DeclareExportDeclaration":case"DeclareExportAllDeclaration":case"InterfaceDeclaration":case"OpaqueType":case"TypeAlias":case"EnumDeclaration":case"TSDeclareFunction":case"TSInterfaceDeclaration":case"TSTypeAliasDeclaration":case"TSEnumDeclaration":case"TSModuleDeclaration":case"TSImportEqualsDeclaration":case"TSExportAssignment":case"TSNamespaceExportDeclaration":break;case"Placeholder":switch(e.expectedNode){case"Statement":case"Declaration":case"BlockStatement":break;default:return!1}break;default:return!1}return t==null||(0,j.default)(e,t)}function ESe(e,t){if(!e)return!1;switch(e.type){case"BreakStatement":case"ContinueStatement":case"ReturnStatement":case"ThrowStatement":case"YieldExpression":case"AwaitExpression":break;default:return!1}return t==null||(0,j.default)(e,t)}function ISe(e,t){if(!e)return!1;switch(e.type){case"BreakStatement":case"ContinueStatement":case"ReturnStatement":case"ThrowStatement":break;default:return!1}return t==null||(0,j.default)(e,t)}function ASe(e,t){if(!e)return!1;switch(e.type){case"ConditionalExpression":case"IfStatement":break;default:return!1}return t==null||(0,j.default)(e,t)}function NSe(e,t){if(!e)return!1;switch(e.type){case"DoWhileStatement":case"ForInStatement":case"ForStatement":case"WhileStatement":case"ForOfStatement":break;default:return!1}return t==null||(0,j.default)(e,t)}function kSe(e,t){if(!e)return!1;switch(e.type){case"DoWhileStatement":case"WhileStatement":break;default:return!1}return t==null||(0,j.default)(e,t)}function _Se(e,t){if(!e)return!1;switch(e.type){case"ExpressionStatement":case"ParenthesizedExpression":case"TypeCastExpression":break;default:return!1}return t==null||(0,j.default)(e,t)}function LSe(e,t){if(!e)return!1;switch(e.type){case"ForInStatement":case"ForStatement":case"ForOfStatement":break;default:return!1}return t==null||(0,j.default)(e,t)}function RSe(e,t){if(!e)return!1;switch(e.type){case"ForInStatement":case"ForOfStatement":break;default:return!1}return t==null||(0,j.default)(e,t)}function DSe(e,t){if(!e)return!1;switch(e.type){case"FunctionDeclaration":case"FunctionExpression":case"ObjectMethod":case"ArrowFunctionExpression":case"ClassMethod":case"ClassPrivateMethod":break;default:return!1}return t==null||(0,j.default)(e,t)}function MSe(e,t){if(!e)return!1;switch(e.type){case"FunctionDeclaration":case"FunctionExpression":case"ObjectMethod":case"ArrowFunctionExpression":case"ClassMethod":case"ClassPrivateMethod":case"StaticBlock":case"TSModuleBlock":break;default:return!1}return t==null||(0,j.default)(e,t)}function OSe(e,t){if(!e)return!1;switch(e.type){case"FunctionDeclaration":case"FunctionExpression":case"StringLiteral":case"NumericLiteral":case"NullLiteral":case"BooleanLiteral":case"RegExpLiteral":case"ArrowFunctionExpression":case"BigIntLiteral":case"DecimalLiteral":break;case"Placeholder":if(e.expectedNode==="StringLiteral")break;default:return!1}return t==null||(0,j.default)(e,t)}function FSe(e,t){if(!e)return!1;switch(e.type){case"FunctionDeclaration":case"VariableDeclaration":case"ClassDeclaration":case"ExportAllDeclaration":case"ExportDefaultDeclaration":case"ExportNamedDeclaration":case"ImportDeclaration":case"DeclareClass":case"DeclareFunction":case"DeclareInterface":case"DeclareModule":case"DeclareModuleExports":case"DeclareTypeAlias":case"DeclareOpaqueType":case"DeclareVariable":case"DeclareExportDeclaration":case"DeclareExportAllDeclaration":case"InterfaceDeclaration":case"OpaqueType":case"TypeAlias":case"EnumDeclaration":case"TSDeclareFunction":case"TSInterfaceDeclaration":case"TSTypeAliasDeclaration":case"TSEnumDeclaration":case"TSModuleDeclaration":case"TSImportEqualsDeclaration":break;case"Placeholder":if(e.expectedNode==="Declaration")break;default:return!1}return t==null||(0,j.default)(e,t)}function BSe(e,t){if(!e)return!1;switch(e.type){case"Identifier":case"RestElement":case"AssignmentPattern":case"ArrayPattern":case"ObjectPattern":case"VoidPattern":break;case"Placeholder":if(e.expectedNode==="Identifier")break;default:return!1}return t==null||(0,j.default)(e,t)}function $Se(e,t){if(!e)return!1;switch(e.type){case"Identifier":case"MemberExpression":case"RestElement":case"AssignmentPattern":case"ArrayPattern":case"ObjectPattern":case"VoidPattern":case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":break;case"Placeholder":switch(e.expectedNode){case"Pattern":case"Identifier":break;default:return!1}break;default:return!1}return t==null||(0,j.default)(e,t)}function jSe(e,t){if(!e)return!1;switch(e.type){case"Identifier":case"MemberExpression":case"RestElement":case"AssignmentPattern":case"ArrayPattern":case"ObjectPattern":case"TSParameterProperty":case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":break;case"Placeholder":switch(e.expectedNode){case"Pattern":case"Identifier":break;default:return!1}break;default:return!1}return t==null||(0,j.default)(e,t)}function zSe(e,t){if(!e)return!1;switch(e.type){case"Identifier":case"TSQualifiedName":break;case"Placeholder":if(e.expectedNode==="Identifier")break;default:return!1}return t==null||(0,j.default)(e,t)}function USe(e,t){if(!e)return!1;switch(e.type){case"StringLiteral":case"NumericLiteral":case"NullLiteral":case"BooleanLiteral":case"RegExpLiteral":case"TemplateLiteral":case"BigIntLiteral":case"DecimalLiteral":break;case"Placeholder":if(e.expectedNode==="StringLiteral")break;default:return!1}return t==null||(0,j.default)(e,t)}function VSe(e,t){if(!e)return!1;switch(e.type){case"StringLiteral":case"NumericLiteral":case"NullLiteral":case"BooleanLiteral":case"BigIntLiteral":case"JSXAttribute":case"JSXClosingElement":case"JSXElement":case"JSXExpressionContainer":case"JSXSpreadChild":case"JSXOpeningElement":case"JSXText":case"JSXFragment":case"JSXOpeningFragment":case"JSXClosingFragment":case"DecimalLiteral":break;case"Placeholder":if(e.expectedNode==="StringLiteral")break;default:return!1}return t==null||(0,j.default)(e,t)}function qSe(e,t){if(!e)return!1;switch(e.type){case"ObjectMethod":case"ObjectProperty":case"ObjectTypeInternalSlot":case"ObjectTypeCallProperty":case"ObjectTypeIndexer":case"ObjectTypeProperty":case"ObjectTypeSpreadProperty":break;default:return!1}return t==null||(0,j.default)(e,t)}function HSe(e,t){if(!e)return!1;switch(e.type){case"ObjectMethod":case"ClassMethod":case"ClassPrivateMethod":break;default:return!1}return t==null||(0,j.default)(e,t)}function GSe(e,t){if(!e)return!1;switch(e.type){case"ObjectMethod":case"ObjectProperty":break;default:return!1}return t==null||(0,j.default)(e,t)}function KSe(e,t){if(!e)return!1;switch(e.type){case"ObjectProperty":case"ClassProperty":case"ClassAccessorProperty":case"ClassPrivateProperty":break;default:return!1}return t==null||(0,j.default)(e,t)}function WSe(e,t){if(!e)return!1;switch(e.type){case"UnaryExpression":case"SpreadElement":break;default:return!1}return t==null||(0,j.default)(e,t)}function XSe(e,t){if(!e)return!1;switch(e.type){case"AssignmentPattern":case"ArrayPattern":case"ObjectPattern":case"VoidPattern":break;case"Placeholder":if(e.expectedNode==="Pattern")break;default:return!1}return t==null||(0,j.default)(e,t)}function YSe(e,t){if(!e)return!1;switch(e.type){case"ClassExpression":case"ClassDeclaration":break;default:return!1}return t==null||(0,j.default)(e,t)}function IV(e,t){if(!e)return!1;switch(e.type){case"ExportAllDeclaration":case"ExportDefaultDeclaration":case"ExportNamedDeclaration":case"ImportDeclaration":break;default:return!1}return t==null||(0,j.default)(e,t)}function JSe(e,t){if(!e)return!1;switch(e.type){case"ExportAllDeclaration":case"ExportDefaultDeclaration":case"ExportNamedDeclaration":break;default:return!1}return t==null||(0,j.default)(e,t)}function ZSe(e,t){if(!e)return!1;switch(e.type){case"ExportSpecifier":case"ImportDefaultSpecifier":case"ImportNamespaceSpecifier":case"ImportSpecifier":case"ExportNamespaceSpecifier":case"ExportDefaultSpecifier":break;default:return!1}return t==null||(0,j.default)(e,t)}function QSe(e,t){if(!e)return!1;switch(e.type){case"ClassAccessorProperty":break;default:return!1}return t==null||(0,j.default)(e,t)}function eTe(e,t){if(!e)return!1;switch(e.type){case"ClassPrivateProperty":case"ClassPrivateMethod":case"PrivateName":break;default:return!1}return t==null||(0,j.default)(e,t)}function tTe(e,t){if(!e)return!1;switch(e.type){case"AnyTypeAnnotation":case"ArrayTypeAnnotation":case"BooleanTypeAnnotation":case"BooleanLiteralTypeAnnotation":case"NullLiteralTypeAnnotation":case"ClassImplements":case"DeclareClass":case"DeclareFunction":case"DeclareInterface":case"DeclareModule":case"DeclareModuleExports":case"DeclareTypeAlias":case"DeclareOpaqueType":case"DeclareVariable":case"DeclareExportDeclaration":case"DeclareExportAllDeclaration":case"DeclaredPredicate":case"ExistsTypeAnnotation":case"FunctionTypeAnnotation":case"FunctionTypeParam":case"GenericTypeAnnotation":case"InferredPredicate":case"InterfaceExtends":case"InterfaceDeclaration":case"InterfaceTypeAnnotation":case"IntersectionTypeAnnotation":case"MixedTypeAnnotation":case"EmptyTypeAnnotation":case"NullableTypeAnnotation":case"NumberLiteralTypeAnnotation":case"NumberTypeAnnotation":case"ObjectTypeAnnotation":case"ObjectTypeInternalSlot":case"ObjectTypeCallProperty":case"ObjectTypeIndexer":case"ObjectTypeProperty":case"ObjectTypeSpreadProperty":case"OpaqueType":case"QualifiedTypeIdentifier":case"StringLiteralTypeAnnotation":case"StringTypeAnnotation":case"SymbolTypeAnnotation":case"ThisTypeAnnotation":case"TupleTypeAnnotation":case"TypeofTypeAnnotation":case"TypeAlias":case"TypeAnnotation":case"TypeCastExpression":case"TypeParameter":case"TypeParameterDeclaration":case"TypeParameterInstantiation":case"UnionTypeAnnotation":case"Variance":case"VoidTypeAnnotation":case"EnumDeclaration":case"EnumBooleanBody":case"EnumNumberBody":case"EnumStringBody":case"EnumSymbolBody":case"EnumBooleanMember":case"EnumNumberMember":case"EnumStringMember":case"EnumDefaultedMember":case"IndexedAccessType":case"OptionalIndexedAccessType":break;default:return!1}return t==null||(0,j.default)(e,t)}function rTe(e,t){if(!e)return!1;switch(e.type){case"AnyTypeAnnotation":case"ArrayTypeAnnotation":case"BooleanTypeAnnotation":case"BooleanLiteralTypeAnnotation":case"NullLiteralTypeAnnotation":case"ExistsTypeAnnotation":case"FunctionTypeAnnotation":case"GenericTypeAnnotation":case"InterfaceTypeAnnotation":case"IntersectionTypeAnnotation":case"MixedTypeAnnotation":case"EmptyTypeAnnotation":case"NullableTypeAnnotation":case"NumberLiteralTypeAnnotation":case"NumberTypeAnnotation":case"ObjectTypeAnnotation":case"StringLiteralTypeAnnotation":case"StringTypeAnnotation":case"SymbolTypeAnnotation":case"ThisTypeAnnotation":case"TupleTypeAnnotation":case"TypeofTypeAnnotation":case"UnionTypeAnnotation":case"VoidTypeAnnotation":case"IndexedAccessType":case"OptionalIndexedAccessType":break;default:return!1}return t==null||(0,j.default)(e,t)}function nTe(e,t){if(!e)return!1;switch(e.type){case"AnyTypeAnnotation":case"BooleanTypeAnnotation":case"NullLiteralTypeAnnotation":case"MixedTypeAnnotation":case"EmptyTypeAnnotation":case"NumberTypeAnnotation":case"StringTypeAnnotation":case"SymbolTypeAnnotation":case"ThisTypeAnnotation":case"VoidTypeAnnotation":break;default:return!1}return t==null||(0,j.default)(e,t)}function aTe(e,t){if(!e)return!1;switch(e.type){case"DeclareClass":case"DeclareFunction":case"DeclareInterface":case"DeclareModule":case"DeclareModuleExports":case"DeclareTypeAlias":case"DeclareOpaqueType":case"DeclareVariable":case"DeclareExportDeclaration":case"DeclareExportAllDeclaration":case"InterfaceDeclaration":case"OpaqueType":case"TypeAlias":break;default:return!1}return t==null||(0,j.default)(e,t)}function iTe(e,t){if(!e)return!1;switch(e.type){case"DeclaredPredicate":case"InferredPredicate":break;default:return!1}return t==null||(0,j.default)(e,t)}function sTe(e,t){if(!e)return!1;switch(e.type){case"EnumBooleanBody":case"EnumNumberBody":case"EnumStringBody":case"EnumSymbolBody":break;default:return!1}return t==null||(0,j.default)(e,t)}function oTe(e,t){if(!e)return!1;switch(e.type){case"EnumBooleanMember":case"EnumNumberMember":case"EnumStringMember":case"EnumDefaultedMember":break;default:return!1}return t==null||(0,j.default)(e,t)}function lTe(e,t){if(!e)return!1;switch(e.type){case"JSXAttribute":case"JSXClosingElement":case"JSXElement":case"JSXEmptyExpression":case"JSXExpressionContainer":case"JSXSpreadChild":case"JSXIdentifier":case"JSXMemberExpression":case"JSXNamespacedName":case"JSXOpeningElement":case"JSXSpreadAttribute":case"JSXText":case"JSXFragment":case"JSXOpeningFragment":case"JSXClosingFragment":break;default:return!1}return t==null||(0,j.default)(e,t)}function cTe(e,t){if(!e)return!1;switch(e.type){case"Noop":case"Placeholder":case"V8IntrinsicIdentifier":break;default:return!1}return t==null||(0,j.default)(e,t)}function uTe(e,t){if(!e)return!1;switch(e.type){case"TSParameterProperty":case"TSDeclareFunction":case"TSDeclareMethod":case"TSQualifiedName":case"TSCallSignatureDeclaration":case"TSConstructSignatureDeclaration":case"TSPropertySignature":case"TSMethodSignature":case"TSIndexSignature":case"TSAnyKeyword":case"TSBooleanKeyword":case"TSBigIntKeyword":case"TSIntrinsicKeyword":case"TSNeverKeyword":case"TSNullKeyword":case"TSNumberKeyword":case"TSObjectKeyword":case"TSStringKeyword":case"TSSymbolKeyword":case"TSUndefinedKeyword":case"TSUnknownKeyword":case"TSVoidKeyword":case"TSThisType":case"TSFunctionType":case"TSConstructorType":case"TSTypeReference":case"TSTypePredicate":case"TSTypeQuery":case"TSTypeLiteral":case"TSArrayType":case"TSTupleType":case"TSOptionalType":case"TSRestType":case"TSNamedTupleMember":case"TSUnionType":case"TSIntersectionType":case"TSConditionalType":case"TSInferType":case"TSParenthesizedType":case"TSTypeOperator":case"TSIndexedAccessType":case"TSMappedType":case"TSTemplateLiteralType":case"TSLiteralType":case"TSExpressionWithTypeArguments":case"TSInterfaceDeclaration":case"TSInterfaceBody":case"TSTypeAliasDeclaration":case"TSInstantiationExpression":case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSEnumBody":case"TSEnumDeclaration":case"TSEnumMember":case"TSModuleDeclaration":case"TSModuleBlock":case"TSImportType":case"TSImportEqualsDeclaration":case"TSExternalModuleReference":case"TSNonNullExpression":case"TSExportAssignment":case"TSNamespaceExportDeclaration":case"TSTypeAnnotation":case"TSTypeParameterInstantiation":case"TSTypeParameterDeclaration":case"TSTypeParameter":break;default:return!1}return t==null||(0,j.default)(e,t)}function dTe(e,t){if(!e)return!1;switch(e.type){case"TSCallSignatureDeclaration":case"TSConstructSignatureDeclaration":case"TSPropertySignature":case"TSMethodSignature":case"TSIndexSignature":break;default:return!1}return t==null||(0,j.default)(e,t)}function fTe(e,t){if(!e)return!1;switch(e.type){case"TSAnyKeyword":case"TSBooleanKeyword":case"TSBigIntKeyword":case"TSIntrinsicKeyword":case"TSNeverKeyword":case"TSNullKeyword":case"TSNumberKeyword":case"TSObjectKeyword":case"TSStringKeyword":case"TSSymbolKeyword":case"TSUndefinedKeyword":case"TSUnknownKeyword":case"TSVoidKeyword":case"TSThisType":case"TSFunctionType":case"TSConstructorType":case"TSTypeReference":case"TSTypePredicate":case"TSTypeQuery":case"TSTypeLiteral":case"TSArrayType":case"TSTupleType":case"TSOptionalType":case"TSRestType":case"TSUnionType":case"TSIntersectionType":case"TSConditionalType":case"TSInferType":case"TSParenthesizedType":case"TSTypeOperator":case"TSIndexedAccessType":case"TSMappedType":case"TSTemplateLiteralType":case"TSLiteralType":case"TSExpressionWithTypeArguments":case"TSImportType":break;default:return!1}return t==null||(0,j.default)(e,t)}function pTe(e,t){if(!e)return!1;switch(e.type){case"TSAnyKeyword":case"TSBooleanKeyword":case"TSBigIntKeyword":case"TSIntrinsicKeyword":case"TSNeverKeyword":case"TSNullKeyword":case"TSNumberKeyword":case"TSObjectKeyword":case"TSStringKeyword":case"TSSymbolKeyword":case"TSUndefinedKeyword":case"TSUnknownKeyword":case"TSVoidKeyword":case"TSThisType":case"TSTemplateLiteralType":case"TSLiteralType":break;default:return!1}return t==null||(0,j.default)(e,t)}function mTe(e,t){return(0,T0.default)("isNumberLiteral","isNumericLiteral"),!e||e.type!=="NumberLiteral"?!1:t==null||(0,j.default)(e,t)}function hTe(e,t){return(0,T0.default)("isRegexLiteral","isRegExpLiteral"),!e||e.type!=="RegexLiteral"?!1:t==null||(0,j.default)(e,t)}function gTe(e,t){return(0,T0.default)("isRestProperty","isRestElement"),!e||e.type!=="RestProperty"?!1:t==null||(0,j.default)(e,t)}function yTe(e,t){return(0,T0.default)("isSpreadProperty","isSpreadElement"),!e||e.type!=="SpreadProperty"?!1:t==null||(0,j.default)(e,t)}function xTe(e,t){return(0,T0.default)("isModuleDeclaration","isImportOrExportDeclaration"),IV(e,t)}});var UL=ae(zL=>{"use strict";Object.defineProperty(zL,"__esModule",{value:!0});zL.default=bTe;var jm=va();function AV(e){return(0,jm.isMemberExpression)(e)||(0,jm.isMetaProperty)(e)}function bTe(e,t,r){if(!AV(e))return!1;let n=Array.isArray(t)?t:t.split("."),a=[],i;for(i=e;AV(i);i=(s=i.object)!=null?s:i.meta){var s;a.push(i.property)}if(a.push(i),a.length<n.length||!r&&a.length>n.length)return!1;for(let o=0,l=a.length-1;o<n.length;o++,l--){let c=a[l],u;if((0,jm.isIdentifier)(c))u=c.name;else if((0,jm.isStringLiteral)(c))u=c.value;else if((0,jm.isThisExpression)(c))u="this";else if((0,jm.isSuper)(c))u="super";else if((0,jm.isPrivateName)(c))u="#"+c.id.name;else return!1;if(n[o]!==u)return!1}return!0}});var qL=ae(VL=>{"use strict";Object.defineProperty(VL,"__esModule",{value:!0});VL.default=STe;var vTe=UL();function STe(e,t){let r=e.split(".");return n=>(0,vTe.default)(n,r,t)}});var NV=ae(C1=>{"use strict";Object.defineProperty(C1,"__esModule",{value:!0});C1.default=void 0;var TTe=qL(),wTe=(0,TTe.default)("React.Component"),amt=C1.default=wTe});var kV=ae(HL=>{"use strict";Object.defineProperty(HL,"__esModule",{value:!0});HL.default=CTe;function CTe(e){return!!e&&/^[a-z]/.test(e)}});var P1=ae(GL=>{"use strict";Object.defineProperty(GL,"__esModule",{value:!0});GL.default=PTe;var _V=bl();function PTe(e,t){if(e===t)return!0;if(e==null||_V.ALIAS_KEYS[t])return!1;let r=_V.FLIPPED_ALIAS_KEYS[t];return!!(r!=null&&r.includes(e))}});var WL=ae(KL=>{"use strict";Object.defineProperty(KL,"__esModule",{value:!0});KL.default=ITe;var ETe=bl();function ITe(e,t){if(e===t)return!0;let r=ETe.PLACEHOLDERS_ALIAS[e];return!!(r!=null&&r.includes(t))}});var Ty=ae(XL=>{"use strict";Object.defineProperty(XL,"__esModule",{value:!0});XL.default=LTe;var ATe=w1(),NTe=P1(),kTe=WL(),_Te=bl();function LTe(e,t,r){return t?(0,NTe.default)(t.type,e)?r===void 0?!0:(0,ATe.default)(t,r):!r&&t.type==="Placeholder"&&e in _Te.FLIPPED_ALIAS_KEYS?(0,kTe.default)(t.expectedNode,e):!1:!1}});var OV=ae(w0=>{"use strict";Object.defineProperty(w0,"__esModule",{value:!0});w0.isIdentifierChar=MV;w0.isIdentifierName=OTe;w0.isIdentifierStart=DV;var JL="\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088F\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5C\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDC-\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7DC\uA7F1-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC",LV="\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ADD\u1AE0-\u1AEB\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65",RTe=new RegExp("["+JL+"]"),DTe=new RegExp("["+JL+LV+"]");JL=LV=null;var RV=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,7,25,39,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,5,57,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,24,43,261,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,33,24,3,24,45,74,6,0,67,12,65,1,2,0,15,4,10,7381,42,31,98,114,8702,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,208,30,2,2,2,1,2,6,3,4,10,1,225,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4381,3,5773,3,7472,16,621,2467,541,1507,4938,6,8489],MTe=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,78,5,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,199,7,137,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,55,9,266,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,233,0,3,0,8,1,6,0,475,6,110,6,6,9,4759,9,787719,239];function YL(e,t){let r=65536;for(let n=0,a=t.length;n<a;n+=2){if(r+=t[n],r>e)return!1;if(r+=t[n+1],r>=e)return!0}return!1}function DV(e){return e<65?e===36:e<=90?!0:e<97?e===95:e<=122?!0:e<=65535?e>=170&&RTe.test(String.fromCharCode(e)):YL(e,RV)}function MV(e){return e<48?e===36:e<58?!0:e<65?!1:e<=90?!0:e<97?e===95:e<=122?!0:e<=65535?e>=170&&DTe.test(String.fromCharCode(e)):YL(e,RV)||YL(e,MTe)}function OTe(e){let t=!0;for(let r=0;r<e.length;r++){let n=e.charCodeAt(r);if((n&64512)===55296&&r+1<e.length){let a=e.charCodeAt(++r);(a&64512)===56320&&(n=65536+((n&1023)<<10)+(a&1023))}if(t){if(t=!1,!DV(n))return!1}else if(!MV(n))return!1}return!t}});var jV=ae(zm=>{"use strict";Object.defineProperty(zm,"__esModule",{value:!0});zm.isKeyword=zTe;zm.isReservedWord=FV;zm.isStrictBindOnlyReservedWord=$V;zm.isStrictBindReservedWord=jTe;zm.isStrictReservedWord=BV;var ZL={keyword:["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"],strict:["implements","interface","let","package","private","protected","public","static","yield"],strictBind:["eval","arguments"]},FTe=new Set(ZL.keyword),BTe=new Set(ZL.strict),$Te=new Set(ZL.strictBind);function FV(e,t){return t&&e==="await"||e==="enum"}function BV(e,t){return FV(e,t)||BTe.has(e)}function $V(e){return $Te.has(e)}function jTe(e,t){return BV(e,t)||$V(e)}function zTe(e){return FTe.has(e)}});var P0=ae(Jc=>{"use strict";Object.defineProperty(Jc,"__esModule",{value:!0});Object.defineProperty(Jc,"isIdentifierChar",{enumerable:!0,get:function(){return QL.isIdentifierChar}});Object.defineProperty(Jc,"isIdentifierName",{enumerable:!0,get:function(){return QL.isIdentifierName}});Object.defineProperty(Jc,"isIdentifierStart",{enumerable:!0,get:function(){return QL.isIdentifierStart}});Object.defineProperty(Jc,"isKeyword",{enumerable:!0,get:function(){return C0.isKeyword}});Object.defineProperty(Jc,"isReservedWord",{enumerable:!0,get:function(){return C0.isReservedWord}});Object.defineProperty(Jc,"isStrictBindOnlyReservedWord",{enumerable:!0,get:function(){return C0.isStrictBindOnlyReservedWord}});Object.defineProperty(Jc,"isStrictBindReservedWord",{enumerable:!0,get:function(){return C0.isStrictBindReservedWord}});Object.defineProperty(Jc,"isStrictReservedWord",{enumerable:!0,get:function(){return C0.isStrictReservedWord}});var QL=OV(),C0=jV()});var wy=ae(tR=>{"use strict";Object.defineProperty(tR,"__esModule",{value:!0});tR.default=UTe;var eR=P0();function UTe(e,t=!0){return typeof e!="string"||t&&((0,eR.isKeyword)(e)||(0,eR.isStrictReservedWord)(e,!0))?!1:(0,eR.isIdentifierName)(e)}});var qV=ae(E0=>{"use strict";Object.defineProperty(E0,"__esModule",{value:!0});E0.readCodePoint=VV;E0.readInt=UV;E0.readStringContents=qTe;var VTe=function(t){return t>=48&&t<=57},zV={decBinOct:new Set([46,66,69,79,95,98,101,111]),hex:new Set([46,88,95,120])},E1={bin:e=>e===48||e===49,oct:e=>e>=48&&e<=55,dec:e=>e>=48&&e<=57,hex:e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102};function qTe(e,t,r,n,a,i){let s=r,o=n,l=a,c="",u=null,d=r,{length:f}=t;for(;;){if(r>=f){i.unterminated(s,o,l),c+=t.slice(d,r);break}let p=t.charCodeAt(r);if(HTe(e,p,t,r)){c+=t.slice(d,r);break}if(p===92){c+=t.slice(d,r);let m=GTe(t,r,n,a,e==="template",i);m.ch===null&&!u?u={pos:r,lineStart:n,curLine:a}:c+=m.ch,{pos:r,lineStart:n,curLine:a}=m,d=r}else p===8232||p===8233?(++r,++a,n=r):p===10||p===13?e==="template"?(c+=t.slice(d,r)+`
`,++r,p===13&&t.charCodeAt(r)===10&&++r,++a,d=n=r):i.unterminated(s,o,l):++r}return{pos:r,str:c,firstInvalidLoc:u,lineStart:n,curLine:a,containsInvalid:!!u}}function HTe(e,t,r,n){return e==="template"?t===96||t===36&&r.charCodeAt(n+1)===123:t===(e==="double"?34:39)}function GTe(e,t,r,n,a,i){let s=!a;t++;let o=c=>({pos:t,ch:c,lineStart:r,curLine:n}),l=e.charCodeAt(t++);switch(l){case 110:return o(`
`);case 114:return o("\r");case 120:{let c;return{code:c,pos:t}=rR(e,t,r,n,2,!1,s,i),o(c===null?null:String.fromCharCode(c))}case 117:{let c;return{code:c,pos:t}=VV(e,t,r,n,s,i),o(c===null?null:String.fromCodePoint(c))}case 116:return o(" ");case 98:return o("\b");case 118:return o("\v");case 102:return o("\f");case 13:e.charCodeAt(t)===10&&++t;case 10:r=t,++n;case 8232:case 8233:return o("");case 56:case 57:if(a)return o(null);i.strictNumericEscape(t-1,r,n);default:if(l>=48&&l<=55){let c=t-1,d=/^[0-7]+/.exec(e.slice(c,t+2))[0],f=parseInt(d,8);f>255&&(d=d.slice(0,-1),f=parseInt(d,8)),t+=d.length-1;let p=e.charCodeAt(t);if(d!=="0"||p===56||p===57){if(a)return o(null);i.strictNumericEscape(c,r,n)}return o(String.fromCharCode(f))}return o(String.fromCharCode(l))}}function rR(e,t,r,n,a,i,s,o){let l=t,c;return{n:c,pos:t}=UV(e,t,r,n,16,a,i,!1,o,!s),c===null&&(s?o.invalidEscapeSequence(l,r,n):t=l-1),{code:c,pos:t}}function UV(e,t,r,n,a,i,s,o,l,c){let u=t,d=a===16?zV.hex:zV.decBinOct,f=a===16?E1.hex:a===10?E1.dec:a===8?E1.oct:E1.bin,p=!1,m=0;for(let h=0,x=i??1/0;h<x;++h){let g=e.charCodeAt(t),y;if(g===95&&o!=="bail"){let b=e.charCodeAt(t-1),S=e.charCodeAt(t+1);if(o){if(Number.isNaN(S)||!f(S)||d.has(b)||d.has(S)){if(c)return{n:null,pos:t};l.unexpectedNumericSeparator(t,r,n)}}else{if(c)return{n:null,pos:t};l.numericSeparatorInEscapeSequence(t,r,n)}++t;continue}if(g>=97?y=g-97+10:g>=65?y=g-65+10:VTe(g)?y=g-48:y=1/0,y>=a){if(y<=9&&c)return{n:null,pos:t};if(y<=9&&l.invalidDigit(t,r,n,a))y=0;else if(s)y=0,p=!0;else break}++t,m=m*a+y}return t===u||i!=null&&t-u!==i||p?{n:null,pos:t}:{n:m,pos:t}}function VV(e,t,r,n,a,i){let s=e.charCodeAt(t),o;if(s===123){if(++t,{code:o,pos:t}=rR(e,t,r,n,e.indexOf("}",t)-t,!0,a,i),++t,o!==null&&o>1114111)if(a)i.invalidCodePoint(t,r,n);else return{code:null,pos:t}}else({code:o,pos:t}=rR(e,t,r,n,4,!1,a,i));return{code:o,pos:t}}});var Cy=ae(Pr=>{"use strict";Object.defineProperty(Pr,"__esModule",{value:!0});Pr.UPDATE_OPERATORS=Pr.UNARY_OPERATORS=Pr.STRING_UNARY_OPERATORS=Pr.STATEMENT_OR_BLOCK_KEYS=Pr.NUMBER_UNARY_OPERATORS=Pr.NUMBER_BINARY_OPERATORS=Pr.LOGICAL_OPERATORS=Pr.INHERIT_KEYS=Pr.FOR_INIT_KEYS=Pr.FLATTENABLE_KEYS=Pr.EQUALITY_BINARY_OPERATORS=Pr.COMPARISON_BINARY_OPERATORS=Pr.COMMENT_KEYS=Pr.BOOLEAN_UNARY_OPERATORS=Pr.BOOLEAN_NUMBER_BINARY_OPERATORS=Pr.BOOLEAN_BINARY_OPERATORS=Pr.BINARY_OPERATORS=Pr.ASSIGNMENT_OPERATORS=void 0;var hmt=Pr.STATEMENT_OR_BLOCK_KEYS=["consequent","body","alternate"],gmt=Pr.FLATTENABLE_KEYS=["body","expressions"],ymt=Pr.FOR_INIT_KEYS=["left","init"],xmt=Pr.COMMENT_KEYS=["leadingComments","trailingComments","innerComments"],KTe=Pr.LOGICAL_OPERATORS=["||","&&","??"],bmt=Pr.UPDATE_OPERATORS=["++","--"],WTe=Pr.BOOLEAN_NUMBER_BINARY_OPERATORS=[">","<",">=","<="],XTe=Pr.EQUALITY_BINARY_OPERATORS=["==","===","!=","!=="],YTe=Pr.COMPARISON_BINARY_OPERATORS=[...XTe,"in","instanceof"],JTe=Pr.BOOLEAN_BINARY_OPERATORS=[...YTe,...WTe],HV=Pr.NUMBER_BINARY_OPERATORS=["-","/","%","*","**","&","|",">>",">>>","<<","^"],vmt=Pr.BINARY_OPERATORS=["+",...HV,...JTe,"|>"],Smt=Pr.ASSIGNMENT_OPERATORS=["=","+=",...HV.map(e=>e+"="),...KTe.map(e=>e+"=")],ZTe=Pr.BOOLEAN_UNARY_OPERATORS=["delete","!"],QTe=Pr.NUMBER_UNARY_OPERATORS=["+","-","~"],ewe=Pr.STRING_UNARY_OPERATORS=["typeof"],Tmt=Pr.UNARY_OPERATORS=["void","throw",...ZTe,...QTe,...ewe],wmt=Pr.INHERIT_KEYS={optional:["typeAnnotation","typeParameters","returnType"],force:["start","loc","end"]};Pr.BLOCK_SCOPED_SYMBOL=Symbol.for("var used to be block scoped"),Pr.NOT_LOCAL_BINDING=Symbol.for("should not be considered a local binding")});var Zc=ae(Rr=>{"use strict";Object.defineProperty(Rr,"__esModule",{value:!0});Rr.allExpandedTypes=Rr.VISITOR_KEYS=Rr.NODE_UNION_SHAPES__PRIVATE=Rr.NODE_PARENT_VALIDATIONS=Rr.NODE_FIELDS=Rr.FLIPPED_ALIAS_KEYS=Rr.DEPRECATED_KEYS=Rr.BUILDER_KEYS=Rr.ALIAS_KEYS=void 0;Rr.arrayOf=KV;Rr.arrayOfType=WV;Rr.assertEach=XV;Rr.assertNodeOrValueType=mwe;Rr.assertNodeType=A1;Rr.assertOneOf=fwe;Rr.assertOptionalChainStart=gwe;Rr.assertShape=hwe;Rr.assertValueType=sR;Rr.chain=YV;Rr.default=JV;Rr.defineAliasedType=bwe;Rr.validate=iR;Rr.validateArrayOfType=dwe;Rr.validateOptional=cwe;Rr.validateOptionalType=uwe;Rr.validateType=lwe;var GV=Ty(),I0=N1(),twe=Rr.VISITOR_KEYS={},rwe=Rr.ALIAS_KEYS={},nR=Rr.FLIPPED_ALIAS_KEYS={},nwe=Rr.NODE_FIELDS={},awe=Rr.BUILDER_KEYS={},iwe=Rr.DEPRECATED_KEYS={},swe=Rr.NODE_PARENT_VALIDATIONS={},owe=Rr.NODE_UNION_SHAPES__PRIVATE={};function I1(e){return Array.isArray(e)?"array":e===null?"null":typeof e}function iR(e){return{validate:e}}function lwe(...e){return iR(A1(...e))}function cwe(e){return{validate:e,optional:!0}}function uwe(...e){return{validate:A1(...e),optional:!0}}function KV(e){return YV(sR("array"),XV(e))}function WV(...e){return KV(A1(...e))}function dwe(...e){return iR(WV(...e))}function XV(e){let t=process.env.BABEL_TYPES_8_BREAKING?I0.validateChild:()=>{};function r(n,a,i){if(!Array.isArray(i))return;let s=0,o={toString(){return`${a}[${s}]`}};for(;s<i.length;s++){let l=i[s];e(n,o,l),t(n,o,l)}}return r.each=e,r}function fwe(...e){function t(r,n,a){if(!e.includes(a))throw new TypeError(`Property ${n} expected value to be one of ${JSON.stringify(e)} but got ${JSON.stringify(a)}`)}return t.oneOf=e,t}var pwe=Rr.allExpandedTypes=[];function A1(...e){let t=new Set;pwe.push({types:e,set:t});function r(n,a,i){let s=i?.type;if(s!=null){if(t.has(s)){(0,I0.validateChild)(n,a,i);return}if(s==="Placeholder"){for(let o of e)if((0,GV.default)(o,i)){(0,I0.validateChild)(n,a,i);return}}}throw new TypeError(`Property ${a} of ${n.type} expected node to be of a type ${JSON.stringify(e)} but instead got ${JSON.stringify(s)}`)}return r.oneOfNodeTypes=e,r}function mwe(...e){function t(r,n,a){let i=I1(a);for(let s of e)if(i===s||(0,GV.default)(s,a)){(0,I0.validateChild)(r,n,a);return}throw new TypeError(`Property ${n} of ${r.type} expected node to be of a type ${JSON.stringify(e)} but instead got ${JSON.stringify(a?.type)}`)}return t.oneOfNodeOrValueTypes=e,t}function sR(e){function t(r,n,a){if(I1(a)!==e)throw new TypeError(`Property ${n} expected type of ${e} but got ${I1(a)}`)}return t.type=e,t}function hwe(e){let t=Object.keys(e);function r(n,a,i){let s=[];for(let o of t)try{(0,I0.validateField)(n,o,i[o],e[o])}catch(l){if(l instanceof TypeError){s.push(l.message);continue}throw l}if(s.length)throw new TypeError(`Property ${a} of ${n.type} expected to have the following:
${s.join(`
`)}`)}return r.shapeOf=e,r}function gwe(){function e(t){var r;let n=t;for(;t;){let{type:a}=n;if(a==="OptionalCallExpression"){if(n.optional)return;n=n.callee;continue}if(a==="OptionalMemberExpression"){if(n.optional)return;n=n.object;continue}break}throw new TypeError(`Non-optional ${t.type} must chain from an optional OptionalMemberExpression or OptionalCallExpression. Found chain from ${(r=n)==null?void 0:r.type}`)}return e}function YV(...e){function t(...r){for(let n of e)n(...r)}if(t.chainOf=e,e.length>=2&&"type"in e[0]&&e[0].type==="array"&&!("each"in e[1]))throw new Error('An assertValueType("array") validator can only be followed by an assertEach(...) validator.');return t}var ywe=new Set(["aliases","builder","deprecatedAlias","fields","inherits","visitor","validate","unionShape"]),xwe=new Set(["default","optional","deprecated","validate"]),aR={};function bwe(...e){return(t,r={})=>{let n=r.aliases;if(!n){var a;r.inherits&&(n=(a=aR[r.inherits].aliases)==null?void 0:a.slice()),n??(n=[]),r.aliases=n}let i=e.filter(s=>!n.includes(s));n.unshift(...i),JV(t,r)}}function JV(e,t={}){let r=t.inherits&&aR[t.inherits]||{},n=t.fields;if(!n&&(n={},r.fields)){let o=Object.getOwnPropertyNames(r.fields);for(let l of o){let c=r.fields[l],u=c.default;if(Array.isArray(u)?u.length>0:u&&typeof u=="object")throw new Error("field defaults can only be primitives or empty arrays currently");n[l]={default:Array.isArray(u)?[]:u,optional:c.optional,deprecated:c.deprecated,validate:c.validate}}}let a=t.visitor||r.visitor||[],i=t.aliases||r.aliases||[],s=t.builder||r.builder||t.visitor||[];for(let o of Object.keys(t))if(!ywe.has(o))throw new Error(`Unknown type option "${o}" on ${e}`);t.deprecatedAlias&&(iwe[t.deprecatedAlias]=e);for(let o of a.concat(s))n[o]=n[o]||{};for(let o of Object.keys(n)){let l=n[o];l.default!==void 0&&!s.includes(o)&&(l.optional=!0),l.default===void 0?l.default=null:!l.validate&&l.default!=null&&(l.validate=sR(I1(l.default)));for(let c of Object.keys(l))if(!xwe.has(c))throw new Error(`Unknown field key "${c}" on ${e}.${o}`)}twe[e]=t.visitor=a,awe[e]=t.builder=s,nwe[e]=t.fields=n,rwe[e]=t.aliases=i,i.forEach(o=>{nR[o]=nR[o]||[],nR[o].push(e)}),t.validate&&(swe[e]=t.validate),t.unionShape&&(owe[e]=t.unionShape),aR[e]=t}});var N0=ae(_i=>{"use strict";Object.defineProperty(_i,"__esModule",{value:!0});_i.patternLikeCommon=_i.importAttributes=_i.functionTypeAnnotationCommon=_i.functionDeclarationCommon=_i.functionCommon=_i.classMethodOrPropertyUnionShapeCommon=_i.classMethodOrPropertyCommon=_i.classMethodOrDeclareMethodCommon=void 0;var Ps=Ty(),vwe=wy(),ZV=P0(),Swe=qV(),Py=Cy(),z=Zc(),A0=(e=!1)=>({unionShape:{discriminator:"computed",shapes:[{name:"computed",value:[!0],properties:{key:{validate:(0,z.assertNodeType)("Expression")}}},{name:"nonComputed",value:[!1],properties:{key:{validate:e?(0,z.assertNodeType)("Identifier","StringLiteral","NumericLiteral","BigIntLiteral","PrivateName"):(0,z.assertNodeType)("Identifier","StringLiteral","NumericLiteral","BigIntLiteral")}}}]}});_i.classMethodOrPropertyUnionShapeCommon=A0;var Je=(0,z.defineAliasedType)("Standardized");Je("ArrayExpression",{fields:{elements:{validate:(0,z.arrayOf)((0,z.assertNodeOrValueType)("null","Expression","SpreadElement")),default:process.env.BABEL_TYPES_8_BREAKING?void 0:[]}},visitor:["elements"],aliases:["Expression"]});Je("AssignmentExpression",{fields:{operator:{validate:process.env.BABEL_TYPES_8_BREAKING?Object.assign(function(){let e=(0,z.assertOneOf)(...Py.ASSIGNMENT_OPERATORS),t=(0,z.assertOneOf)("=");return function(r,n,a){((0,Ps.default)("Pattern",r.left)?t:e)(r,n,a)}}(),{oneOf:Py.ASSIGNMENT_OPERATORS}):(0,z.assertValueType)("string")},left:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,z.assertNodeType)("Identifier","MemberExpression","OptionalMemberExpression","ArrayPattern","ObjectPattern","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression"):(0,z.assertNodeType)("LVal","OptionalMemberExpression")},right:{validate:(0,z.assertNodeType)("Expression")}},builder:["operator","left","right"],visitor:["left","right"],aliases:["Expression"]});Je("BinaryExpression",{builder:["operator","left","right"],fields:{operator:{validate:(0,z.assertOneOf)(...Py.BINARY_OPERATORS)},left:{validate:function(){let e=(0,z.assertNodeType)("Expression"),t=(0,z.assertNodeType)("Expression","PrivateName");return Object.assign(function(n,a,i){(n.operator==="in"?t:e)(n,a,i)},{oneOfNodeTypes:["Expression","PrivateName"]})}()},right:{validate:(0,z.assertNodeType)("Expression")}},visitor:["left","right"],aliases:["Binary","Expression"]});Je("InterpreterDirective",{builder:["value"],fields:{value:{validate:(0,z.assertValueType)("string")}}});Je("Directive",{visitor:["value"],fields:{value:{validate:(0,z.assertNodeType)("DirectiveLiteral")}}});Je("DirectiveLiteral",{builder:["value"],fields:{value:{validate:(0,z.assertValueType)("string")}}});Je("BlockStatement",{builder:["body","directives"],visitor:["directives","body"],fields:{directives:{validate:(0,z.arrayOfType)("Directive"),default:[]},body:(0,z.validateArrayOfType)("Statement")},aliases:["Scopable","BlockParent","Block","Statement"]});Je("BreakStatement",{visitor:["label"],fields:{label:{validate:(0,z.assertNodeType)("Identifier"),optional:!0}},aliases:["Statement","Terminatorless","CompletionStatement"]});Je("CallExpression",{visitor:["callee","typeParameters","typeArguments","arguments"],builder:["callee","arguments"],aliases:["Expression"],fields:Object.assign({callee:{validate:(0,z.assertNodeType)("Expression","Super","V8IntrinsicIdentifier")},arguments:(0,z.validateArrayOfType)("Expression","SpreadElement","ArgumentPlaceholder"),typeArguments:{validate:(0,z.assertNodeType)("TypeParameterInstantiation"),optional:!0}},process.env.BABEL_TYPES_8_BREAKING?{}:{optional:{validate:(0,z.assertValueType)("boolean"),optional:!0},typeParameters:{validate:(0,z.assertNodeType)("TSTypeParameterInstantiation"),optional:!0}})});Je("CatchClause",{visitor:["param","body"],fields:{param:{validate:(0,z.assertNodeType)("Identifier","ArrayPattern","ObjectPattern"),optional:!0},body:{validate:(0,z.assertNodeType)("BlockStatement")}},aliases:["Scopable","BlockParent"]});Je("ConditionalExpression",{visitor:["test","consequent","alternate"],fields:{test:{validate:(0,z.assertNodeType)("Expression")},consequent:{validate:(0,z.assertNodeType)("Expression")},alternate:{validate:(0,z.assertNodeType)("Expression")}},aliases:["Expression","Conditional"]});Je("ContinueStatement",{visitor:["label"],fields:{label:{validate:(0,z.assertNodeType)("Identifier"),optional:!0}},aliases:["Statement","Terminatorless","CompletionStatement"]});Je("DebuggerStatement",{aliases:["Statement"]});Je("DoWhileStatement",{builder:["test","body"],visitor:["body","test"],fields:{test:{validate:(0,z.assertNodeType)("Expression")},body:{validate:(0,z.assertNodeType)("Statement")}},aliases:["Statement","BlockParent","Loop","While","Scopable"]});Je("EmptyStatement",{aliases:["Statement"]});Je("ExpressionStatement",{visitor:["expression"],fields:{expression:{validate:(0,z.assertNodeType)("Expression")}},aliases:["Statement","ExpressionWrapper"]});Je("File",{builder:["program","comments","tokens"],visitor:["program"],fields:{program:{validate:(0,z.assertNodeType)("Program")},comments:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,z.assertEach)((0,z.assertNodeType)("CommentBlock","CommentLine")):Object.assign(()=>{},{each:{oneOfNodeTypes:["CommentBlock","CommentLine"]}}),optional:!0},tokens:{validate:(0,z.assertEach)(Object.assign(()=>{},{type:"any"})),optional:!0}}});Je("ForInStatement",{visitor:["left","right","body"],aliases:["Scopable","Statement","For","BlockParent","Loop","ForXStatement"],fields:{left:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,z.assertNodeType)("VariableDeclaration","Identifier","MemberExpression","ArrayPattern","ObjectPattern","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression"):(0,z.assertNodeType)("VariableDeclaration","LVal")},right:{validate:(0,z.assertNodeType)("Expression")},body:{validate:(0,z.assertNodeType)("Statement")}}});Je("ForStatement",{visitor:["init","test","update","body"],aliases:["Scopable","Statement","For","BlockParent","Loop"],fields:{init:{validate:(0,z.assertNodeType)("VariableDeclaration","Expression"),optional:!0},test:{validate:(0,z.assertNodeType)("Expression"),optional:!0},update:{validate:(0,z.assertNodeType)("Expression"),optional:!0},body:{validate:(0,z.assertNodeType)("Statement")}}});var Ey=()=>({params:(0,z.validateArrayOfType)("FunctionParameter"),generator:{default:!1},async:{default:!1}});_i.functionCommon=Ey;var Um=()=>({returnType:{validate:(0,z.assertNodeType)("TypeAnnotation","TSTypeAnnotation","Noop"),optional:!0},typeParameters:{validate:(0,z.assertNodeType)("TypeParameterDeclaration","TSTypeParameterDeclaration","Noop"),optional:!0}});_i.functionTypeAnnotationCommon=Um;var QV=()=>Object.assign({},Ey(),{declare:{validate:(0,z.assertValueType)("boolean"),optional:!0},id:{validate:(0,z.assertNodeType)("Identifier"),optional:!0}});_i.functionDeclarationCommon=QV;Je("FunctionDeclaration",{builder:["id","params","body","generator","async"],visitor:["id","typeParameters","params","predicate","returnType","body"],fields:Object.assign({},QV(),Um(),{body:{validate:(0,z.assertNodeType)("BlockStatement")},predicate:{validate:(0,z.assertNodeType)("DeclaredPredicate","InferredPredicate"),optional:!0}}),aliases:["Scopable","Function","BlockParent","FunctionParent","Statement","Pureish","Declaration"],validate:process.env.BABEL_TYPES_8_BREAKING?function(){let e=(0,z.assertNodeType)("Identifier");return function(t,r,n){(0,Ps.default)("ExportDefaultDeclaration",t)||e(n,"id",n.id)}}():void 0});Je("FunctionExpression",{inherits:"FunctionDeclaration",aliases:["Scopable","Function","BlockParent","FunctionParent","Expression","Pureish"],fields:Object.assign({},Ey(),Um(),{id:{validate:(0,z.assertNodeType)("Identifier"),optional:!0},body:{validate:(0,z.assertNodeType)("BlockStatement")},predicate:{validate:(0,z.assertNodeType)("DeclaredPredicate","InferredPredicate"),optional:!0}})});var Iy=()=>({typeAnnotation:{validate:(0,z.assertNodeType)("TypeAnnotation","TSTypeAnnotation","Noop"),optional:!0},optional:{validate:(0,z.assertValueType)("boolean"),optional:!0},decorators:{validate:(0,z.arrayOfType)("Decorator"),optional:!0}});_i.patternLikeCommon=Iy;Je("Identifier",{builder:["name"],visitor:["typeAnnotation","decorators"],aliases:["Expression","FunctionParameter","PatternLike","LVal","TSEntityName"],fields:Object.assign({},Iy(),{name:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,z.chain)((0,z.assertValueType)("string"),Object.assign(function(e,t,r){if(!(0,vwe.default)(r,!1))throw new TypeError(`"${r}" is not a valid identifier name`)},{type:"string"})):(0,z.assertValueType)("string")}}),validate:process.env.BABEL_TYPES_8_BREAKING?function(e,t,r){let n=/\.(\w+)$/.exec(t.toString());if(!n)return;let[,a]=n,i={computed:!1};if(a==="property"){if((0,Ps.default)("MemberExpression",e,i)||(0,Ps.default)("OptionalMemberExpression",e,i))return}else if(a==="key"){if((0,Ps.default)("Property",e,i)||(0,Ps.default)("Method",e,i))return}else if(a==="exported"){if((0,Ps.default)("ExportSpecifier",e))return}else if(a==="imported"){if((0,Ps.default)("ImportSpecifier",e,{imported:r}))return}else if(a==="meta"&&(0,Ps.default)("MetaProperty",e,{meta:r}))return;if(((0,ZV.isKeyword)(r.name)||(0,ZV.isReservedWord)(r.name,!1))&&r.name!=="this")throw new TypeError(`"${r.name}" is not a valid identifier`)}:void 0});Je("IfStatement",{visitor:["test","consequent","alternate"],aliases:["Statement","Conditional"],fields:{test:{validate:(0,z.assertNodeType)("Expression")},consequent:{validate:(0,z.assertNodeType)("Statement")},alternate:{optional:!0,validate:(0,z.assertNodeType)("Statement")}}});Je("LabeledStatement",{visitor:["label","body"],aliases:["Statement"],fields:{label:{validate:(0,z.assertNodeType)("Identifier")},body:{validate:(0,z.assertNodeType)("Statement")}}});Je("StringLiteral",{builder:["value"],fields:{value:{validate:(0,z.assertValueType)("string")}},aliases:["Expression","Pureish","Literal","Immutable"]});Je("NumericLiteral",{builder:["value"],deprecatedAlias:"NumberLiteral",fields:{value:{validate:(0,z.chain)((0,z.assertValueType)("number"),Object.assign(function(e,t,r){if(1/r<0||!Number.isFinite(r)){let n=new Error(`NumericLiterals must be non-negative finite numbers. You can use t.valueToNode(${r}) instead.`)}},{type:"number"}))}},aliases:["Expression","Pureish","Literal","Immutable"]});Je("NullLiteral",{aliases:["Expression","Pureish","Literal","Immutable"]});Je("BooleanLiteral",{builder:["value"],fields:{value:{validate:(0,z.assertValueType)("boolean")}},aliases:["Expression","Pureish","Literal","Immutable"]});Je("RegExpLiteral",{builder:["pattern","flags"],deprecatedAlias:"RegexLiteral",aliases:["Expression","Pureish","Literal"],fields:{pattern:{validate:(0,z.assertValueType)("string")},flags:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,z.chain)((0,z.assertValueType)("string"),Object.assign(function(e,t,r){let n=/[^dgimsuvy]/.exec(r);if(n)throw new TypeError(`"${n[0]}" is not a valid RegExp flag`)},{type:"string"})):(0,z.assertValueType)("string"),default:""}}});Je("LogicalExpression",{builder:["operator","left","right"],visitor:["left","right"],aliases:["Binary","Expression"],fields:{operator:{validate:(0,z.assertOneOf)(...Py.LOGICAL_OPERATORS)},left:{validate:(0,z.assertNodeType)("Expression")},right:{validate:(0,z.assertNodeType)("Expression")}}});Je("MemberExpression",{builder:["object","property","computed",...process.env.BABEL_TYPES_8_BREAKING?[]:["optional"]],visitor:["object","property"],aliases:["Expression","LVal","PatternLike"],unionShape:{discriminator:"computed",shapes:[{name:"computed",value:[!0],properties:{property:{validate:(0,z.assertNodeType)("Expression")}}},{name:"nonComputed",value:[!1],properties:{property:{validate:(0,z.assertNodeType)("Identifier","PrivateName")}}}]},fields:Object.assign({object:{validate:(0,z.assertNodeType)("Expression","Super")},property:{validate:function(){let e=(0,z.assertNodeType)("Identifier","PrivateName"),t=(0,z.assertNodeType)("Expression"),r=function(n,a,i){(n.computed?t:e)(n,a,i)};return r.oneOfNodeTypes=["Expression","Identifier","PrivateName"],r}()},computed:{default:!1}},process.env.BABEL_TYPES_8_BREAKING?{}:{optional:{validate:(0,z.assertValueType)("boolean"),optional:!0}})});Je("NewExpression",{inherits:"CallExpression"});Je("Program",{visitor:["directives","body"],builder:["body","directives","sourceType","interpreter"],fields:{sourceType:{validate:(0,z.assertOneOf)("script","module"),default:"script"},interpreter:{validate:(0,z.assertNodeType)("InterpreterDirective"),default:null,optional:!0},directives:{validate:(0,z.arrayOfType)("Directive"),default:[]},body:(0,z.validateArrayOfType)("Statement")},aliases:["Scopable","BlockParent","Block"]});Je("ObjectExpression",{visitor:["properties"],aliases:["Expression"],fields:{properties:(0,z.validateArrayOfType)("ObjectMethod","ObjectProperty","SpreadElement")}});Je("ObjectMethod",Object.assign({builder:["kind","key","params","body","computed","generator","async"],visitor:["decorators","key","typeParameters","params","returnType","body"]},A0(),{fields:Object.assign({},Ey(),Um(),{kind:Object.assign({validate:(0,z.assertOneOf)("method","get","set")},process.env.BABEL_TYPES_8_BREAKING?{}:{default:"method"}),computed:{default:!1},key:{validate:function(){let e=(0,z.assertNodeType)("Identifier","StringLiteral","NumericLiteral","BigIntLiteral"),t=(0,z.assertNodeType)("Expression"),r=function(n,a,i){(n.computed?t:e)(n,a,i)};return r.oneOfNodeTypes=["Expression","Identifier","StringLiteral","NumericLiteral","BigIntLiteral"],r}()},decorators:{validate:(0,z.arrayOfType)("Decorator"),optional:!0},body:{validate:(0,z.assertNodeType)("BlockStatement")}}),aliases:["UserWhitespacable","Function","Scopable","BlockParent","FunctionParent","Method","ObjectMember"]}));Je("ObjectProperty",{builder:["key","value","computed","shorthand",...process.env.BABEL_TYPES_8_BREAKING?[]:["decorators"]],unionShape:{discriminator:"computed",shapes:[{name:"computed",value:[!0],properties:{key:{validate:(0,z.assertNodeType)("Expression")}}},{name:"nonComputed",value:[!1],properties:{key:{validate:(0,z.assertNodeType)("Identifier","StringLiteral","NumericLiteral","BigIntLiteral","DecimalLiteral","PrivateName")}}}]},fields:{computed:{default:!1},key:{validate:function(){let e=(0,z.assertNodeType)("Identifier","StringLiteral","NumericLiteral","BigIntLiteral","DecimalLiteral","PrivateName"),t=(0,z.assertNodeType)("Expression");return Object.assign(function(n,a,i){(n.computed?t:e)(n,a,i)},{oneOfNodeTypes:["Expression","Identifier","StringLiteral","NumericLiteral","BigIntLiteral","DecimalLiteral","PrivateName"]})}()},value:{validate:(0,z.assertNodeType)("Expression","PatternLike")},shorthand:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,z.chain)((0,z.assertValueType)("boolean"),Object.assign(function(e,t,r){if(r){if(e.computed)throw new TypeError("Property shorthand of ObjectProperty cannot be true if computed is true");if(!(0,Ps.default)("Identifier",e.key))throw new TypeError("Property shorthand of ObjectProperty cannot be true if key is not an Identifier")}},{type:"boolean"})):(0,z.assertValueType)("boolean"),default:!1},decorators:{validate:(0,z.arrayOfType)("Decorator"),optional:!0}},visitor:["decorators","key","value"],aliases:["UserWhitespacable","Property","ObjectMember"],validate:process.env.BABEL_TYPES_8_BREAKING?function(){let e=(0,z.assertNodeType)("Identifier","Pattern","TSAsExpression","TSSatisfiesExpression","TSNonNullExpression","TSTypeAssertion"),t=(0,z.assertNodeType)("Expression");return function(r,n,a){((0,Ps.default)("ObjectPattern",r)?e:t)(a,"value",a.value)}}():void 0});Je("RestElement",{visitor:["argument","typeAnnotation"],builder:["argument"],aliases:["FunctionParameter","PatternLike","LVal"],deprecatedAlias:"RestProperty",fields:Object.assign({},Iy(),{argument:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,z.assertNodeType)("Identifier","ArrayPattern","ObjectPattern","MemberExpression","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression"):(0,z.assertNodeType)("Identifier","ArrayPattern","ObjectPattern","MemberExpression","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression","RestElement","AssignmentPattern")}}),validate:process.env.BABEL_TYPES_8_BREAKING?function(e,t){let r=/(\w+)\[(\d+)\]/.exec(t.toString());if(!r)throw new Error("Internal Babel error: malformed key.");let[,n,a]=r;if(e[n].length>+a+1)throw new TypeError(`RestElement must be last element of ${n}`)}:void 0});Je("ReturnStatement",{visitor:["argument"],aliases:["Statement","Terminatorless","CompletionStatement"],fields:{argument:{validate:(0,z.assertNodeType)("Expression"),optional:!0}}});Je("SequenceExpression",{visitor:["expressions"],fields:{expressions:(0,z.validateArrayOfType)("Expression")},aliases:["Expression"]});Je("ParenthesizedExpression",{visitor:["expression"],aliases:["Expression","ExpressionWrapper"],fields:{expression:{validate:(0,z.assertNodeType)("Expression")}}});Je("SwitchCase",{visitor:["test","consequent"],fields:{test:{validate:(0,z.assertNodeType)("Expression"),optional:!0},consequent:(0,z.validateArrayOfType)("Statement")}});Je("SwitchStatement",{visitor:["discriminant","cases"],aliases:["Statement","BlockParent","Scopable"],fields:{discriminant:{validate:(0,z.assertNodeType)("Expression")},cases:(0,z.validateArrayOfType)("SwitchCase")}});Je("ThisExpression",{aliases:["Expression"]});Je("ThrowStatement",{visitor:["argument"],aliases:["Statement","Terminatorless","CompletionStatement"],fields:{argument:{validate:(0,z.assertNodeType)("Expression")}}});Je("TryStatement",{visitor:["block","handler","finalizer"],aliases:["Statement"],fields:{block:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,z.chain)((0,z.assertNodeType)("BlockStatement"),Object.assign(function(e){if(!e.handler&&!e.finalizer)throw new TypeError("TryStatement expects either a handler or finalizer, or both")},{oneOfNodeTypes:["BlockStatement"]})):(0,z.assertNodeType)("BlockStatement")},handler:{optional:!0,validate:(0,z.assertNodeType)("CatchClause")},finalizer:{optional:!0,validate:(0,z.assertNodeType)("BlockStatement")}}});Je("UnaryExpression",{builder:["operator","argument","prefix"],fields:{prefix:{default:!0},argument:{validate:(0,z.assertNodeType)("Expression")},operator:{validate:(0,z.assertOneOf)(...Py.UNARY_OPERATORS)}},visitor:["argument"],aliases:["UnaryLike","Expression"]});Je("UpdateExpression",{builder:["operator","argument","prefix"],fields:{prefix:{default:!1},argument:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,z.assertNodeType)("Identifier","MemberExpression"):(0,z.assertNodeType)("Expression")},operator:{validate:(0,z.assertOneOf)(...Py.UPDATE_OPERATORS)}},visitor:["argument"],aliases:["Expression"]});Je("VariableDeclaration",{builder:["kind","declarations"],visitor:["declarations"],aliases:["Statement","Declaration"],fields:{declare:{validate:(0,z.assertValueType)("boolean"),optional:!0},kind:{validate:(0,z.assertOneOf)("var","let","const","using","await using")},declarations:(0,z.validateArrayOfType)("VariableDeclarator")},validate:process.env.BABEL_TYPES_8_BREAKING?(()=>{let e=(0,z.assertNodeType)("Identifier","Placeholder"),t=(0,z.assertNodeType)("Identifier","ArrayPattern","ObjectPattern","Placeholder"),r=(0,z.assertNodeType)("Identifier","VoidPattern","Placeholder");return function(n,a,i){let{kind:s,declarations:o}=i,l=(0,Ps.default)("ForXStatement",n,{left:i});if(l&&o.length!==1)throw new TypeError(`Exactly one VariableDeclarator is required in the VariableDeclaration of a ${n.type}`);for(let c of o)s==="const"||s==="let"||s==="var"?!l&&!c.init?e(c,"id",c.id):t(c,"id",c.id):r(c,"id",c.id)}})():void 0});Je("VariableDeclarator",{visitor:["id","init"],fields:{id:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,z.assertNodeType)("Identifier","ArrayPattern","ObjectPattern","VoidPattern"):(0,z.assertNodeType)("LVal","VoidPattern")},definite:{optional:!0,validate:(0,z.assertValueType)("boolean")},init:{optional:!0,validate:(0,z.assertNodeType)("Expression")}}});Je("WhileStatement",{visitor:["test","body"],aliases:["Statement","BlockParent","Loop","While","Scopable"],fields:{test:{validate:(0,z.assertNodeType)("Expression")},body:{validate:(0,z.assertNodeType)("Statement")}}});Je("WithStatement",{visitor:["object","body"],aliases:["Statement"],fields:{object:{validate:(0,z.assertNodeType)("Expression")},body:{validate:(0,z.assertNodeType)("Statement")}}});Je("AssignmentPattern",{visitor:["left","right","decorators"],builder:["left","right"],aliases:["FunctionParameter","Pattern","PatternLike","LVal"],fields:Object.assign({},Iy(),{left:{validate:(0,z.assertNodeType)("Identifier","ObjectPattern","ArrayPattern","MemberExpression","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression")},right:{validate:(0,z.assertNodeType)("Expression")},decorators:{validate:(0,z.arrayOfType)("Decorator"),optional:!0}})});Je("ArrayPattern",{visitor:["elements","typeAnnotation"],builder:["elements"],aliases:["FunctionParameter","Pattern","PatternLike","LVal"],fields:Object.assign({},Iy(),{elements:{validate:(0,z.chain)((0,z.assertValueType)("array"),(0,z.assertEach)((0,z.assertNodeOrValueType)("null","PatternLike")))}})});Je("ArrowFunctionExpression",{builder:["params","body","async"],visitor:["typeParameters","params","predicate","returnType","body"],aliases:["Scopable","Function","BlockParent","FunctionParent","Expression","Pureish"],fields:Object.assign({},Ey(),Um(),{expression:{validate:(0,z.assertValueType)("boolean")},body:{validate:(0,z.assertNodeType)("BlockStatement","Expression")},predicate:{validate:(0,z.assertNodeType)("DeclaredPredicate","InferredPredicate"),optional:!0}})});Je("ClassBody",{visitor:["body"],fields:{body:(0,z.validateArrayOfType)("ClassMethod","ClassPrivateMethod","ClassProperty","ClassPrivateProperty","ClassAccessorProperty","TSDeclareMethod","TSIndexSignature","StaticBlock")}});Je("ClassExpression",{builder:["id","superClass","body","decorators"],visitor:["decorators","id","typeParameters","superClass","superTypeParameters","mixins","implements","body"],aliases:["Scopable","Class","Expression"],fields:{id:{validate:(0,z.assertNodeType)("Identifier"),optional:!0},typeParameters:{validate:(0,z.assertNodeType)("TypeParameterDeclaration","TSTypeParameterDeclaration","Noop"),optional:!0},body:{validate:(0,z.assertNodeType)("ClassBody")},superClass:{optional:!0,validate:(0,z.assertNodeType)("Expression")},superTypeParameters:{validate:(0,z.assertNodeType)("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:!0},implements:{validate:(0,z.arrayOfType)("TSExpressionWithTypeArguments","ClassImplements"),optional:!0},decorators:{validate:(0,z.arrayOfType)("Decorator"),optional:!0},mixins:{validate:(0,z.assertNodeType)("InterfaceExtends"),optional:!0}}});Je("ClassDeclaration",{inherits:"ClassExpression",aliases:["Scopable","Class","Statement","Declaration"],fields:{id:{validate:(0,z.assertNodeType)("Identifier"),optional:!0},typeParameters:{validate:(0,z.assertNodeType)("TypeParameterDeclaration","TSTypeParameterDeclaration","Noop"),optional:!0},body:{validate:(0,z.assertNodeType)("ClassBody")},superClass:{optional:!0,validate:(0,z.assertNodeType)("Expression")},superTypeParameters:{validate:(0,z.assertNodeType)("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:!0},implements:{validate:(0,z.arrayOfType)("TSExpressionWithTypeArguments","ClassImplements"),optional:!0},decorators:{validate:(0,z.arrayOfType)("Decorator"),optional:!0},mixins:{validate:(0,z.assertNodeType)("InterfaceExtends"),optional:!0},declare:{validate:(0,z.assertValueType)("boolean"),optional:!0},abstract:{validate:(0,z.assertValueType)("boolean"),optional:!0}},validate:process.env.BABEL_TYPES_8_BREAKING?function(){let e=(0,z.assertNodeType)("Identifier");return function(t,r,n){(0,Ps.default)("ExportDefaultDeclaration",t)||e(n,"id",n.id)}}():void 0});var oR=_i.importAttributes={attributes:{optional:!0,validate:(0,z.arrayOfType)("ImportAttribute")},assertions:{deprecated:!0,optional:!0,validate:(0,z.arrayOfType)("ImportAttribute")}};Je("ExportAllDeclaration",{builder:["source"],visitor:["source","attributes","assertions"],aliases:["Statement","Declaration","ImportOrExportDeclaration","ExportDeclaration"],fields:Object.assign({source:{validate:(0,z.assertNodeType)("StringLiteral")},exportKind:(0,z.validateOptional)((0,z.assertOneOf)("type","value"))},oR)});Je("ExportDefaultDeclaration",{visitor:["declaration"],aliases:["Statement","Declaration","ImportOrExportDeclaration","ExportDeclaration"],fields:{declaration:(0,z.validateType)("TSDeclareFunction","FunctionDeclaration","ClassDeclaration","Expression"),exportKind:(0,z.validateOptional)((0,z.assertOneOf)("value"))}});Je("ExportNamedDeclaration",{builder:["declaration","specifiers","source"],visitor:["declaration","specifiers","source","attributes","assertions"],aliases:["Statement","Declaration","ImportOrExportDeclaration","ExportDeclaration"],fields:Object.assign({declaration:{optional:!0,validate:process.env.BABEL_TYPES_8_BREAKING?(0,z.chain)((0,z.assertNodeType)("Declaration"),Object.assign(function(e,t,r){if(r&&e.specifiers.length)throw new TypeError("Only declaration or specifiers is allowed on ExportNamedDeclaration");if(r&&e.source)throw new TypeError("Cannot export a declaration from a source")},{oneOfNodeTypes:["Declaration"]})):(0,z.assertNodeType)("Declaration")}},oR,{specifiers:{default:[],validate:(0,z.arrayOf)(function(){let e=(0,z.assertNodeType)("ExportSpecifier","ExportDefaultSpecifier","ExportNamespaceSpecifier"),t=(0,z.assertNodeType)("ExportSpecifier");return process.env.BABEL_TYPES_8_BREAKING?Object.assign(function(r,n,a){(r.source?e:t)(r,n,a)},{oneOfNodeTypes:["ExportSpecifier","ExportDefaultSpecifier","ExportNamespaceSpecifier"]}):e}())},source:{validate:(0,z.assertNodeType)("StringLiteral"),optional:!0},exportKind:(0,z.validateOptional)((0,z.assertOneOf)("type","value"))})});Je("ExportSpecifier",{visitor:["local","exported"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,z.assertNodeType)("Identifier")},exported:{validate:(0,z.assertNodeType)("Identifier","StringLiteral")},exportKind:{validate:(0,z.assertOneOf)("type","value"),optional:!0}}});Je("ForOfStatement",{visitor:["left","right","body"],builder:["left","right","body","await"],aliases:["Scopable","Statement","For","BlockParent","Loop","ForXStatement"],fields:{left:{validate:function(){if(!process.env.BABEL_TYPES_8_BREAKING)return(0,z.assertNodeType)("VariableDeclaration","LVal");let e=(0,z.assertNodeType)("VariableDeclaration"),t=(0,z.assertNodeType)("Identifier","MemberExpression","ArrayPattern","ObjectPattern","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression");return Object.assign(function(r,n,a){(0,Ps.default)("VariableDeclaration",a)?e(r,n,a):t(r,n,a)},{oneOfNodeTypes:["VariableDeclaration","Identifier","MemberExpression","ArrayPattern","ObjectPattern","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression"]})}()},right:{validate:(0,z.assertNodeType)("Expression")},body:{validate:(0,z.assertNodeType)("Statement")},await:{default:!1}}});Je("ImportDeclaration",{builder:["specifiers","source"],visitor:["specifiers","source","attributes","assertions"],aliases:["Statement","Declaration","ImportOrExportDeclaration"],fields:Object.assign({},oR,{module:{optional:!0,validate:(0,z.assertValueType)("boolean")},phase:{default:null,validate:(0,z.assertOneOf)("source","defer")},specifiers:(0,z.validateArrayOfType)("ImportSpecifier","ImportDefaultSpecifier","ImportNamespaceSpecifier"),source:{validate:(0,z.assertNodeType)("StringLiteral")},importKind:{validate:(0,z.assertOneOf)("type","typeof","value"),optional:!0}})});Je("ImportDefaultSpecifier",{visitor:["local"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,z.assertNodeType)("Identifier")}}});Je("ImportNamespaceSpecifier",{visitor:["local"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,z.assertNodeType)("Identifier")}}});Je("ImportSpecifier",{visitor:["imported","local"],builder:["local","imported"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,z.assertNodeType)("Identifier")},imported:{validate:(0,z.assertNodeType)("Identifier","StringLiteral")},importKind:{validate:(0,z.assertOneOf)("type","typeof","value"),optional:!0}}});Je("ImportExpression",{visitor:["source","options"],aliases:["Expression"],fields:{phase:{default:null,validate:(0,z.assertOneOf)("source","defer")},source:{validate:(0,z.assertNodeType)("Expression")},options:{validate:(0,z.assertNodeType)("Expression"),optional:!0}}});Je("MetaProperty",{visitor:["meta","property"],aliases:["Expression"],fields:{meta:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,z.chain)((0,z.assertNodeType)("Identifier"),Object.assign(function(e,t,r){let n;switch(r.name){case"function":n="sent";break;case"new":n="target";break;case"import":n="meta";break}if(!(0,Ps.default)("Identifier",e.property,{name:n}))throw new TypeError("Unrecognised MetaProperty")},{oneOfNodeTypes:["Identifier"]})):(0,z.assertNodeType)("Identifier")},property:{validate:(0,z.assertNodeType)("Identifier")}}});var k1=()=>({abstract:{validate:(0,z.assertValueType)("boolean"),optional:!0},accessibility:{validate:(0,z.assertOneOf)("public","private","protected"),optional:!0},static:{default:!1},override:{default:!1},computed:{default:!1},optional:{validate:(0,z.assertValueType)("boolean"),optional:!0},key:{validate:(0,z.chain)(function(){let e=(0,z.assertNodeType)("Identifier","StringLiteral","NumericLiteral","BigIntLiteral"),t=(0,z.assertNodeType)("Expression");return function(r,n,a){(r.computed?t:e)(r,n,a)}}(),(0,z.assertNodeType)("Identifier","StringLiteral","NumericLiteral","BigIntLiteral","Expression"))}});_i.classMethodOrPropertyCommon=k1;var lR=()=>Object.assign({},Ey(),k1(),{params:(0,z.validateArrayOfType)("FunctionParameter","TSParameterProperty"),kind:{validate:(0,z.assertOneOf)("get","set","method","constructor"),default:"method"},access:{validate:(0,z.chain)((0,z.assertValueType)("string"),(0,z.assertOneOf)("public","private","protected")),optional:!0},decorators:{validate:(0,z.arrayOfType)("Decorator"),optional:!0}});_i.classMethodOrDeclareMethodCommon=lR;Je("ClassMethod",Object.assign({aliases:["Function","Scopable","BlockParent","FunctionParent","Method"],builder:["kind","key","params","body","computed","static","generator","async"],visitor:["decorators","key","typeParameters","params","returnType","body"]},A0(),{fields:Object.assign({},lR(),Um(),{body:{validate:(0,z.assertNodeType)("BlockStatement")}})}));Je("ObjectPattern",{visitor:["decorators","properties","typeAnnotation"],builder:["properties"],aliases:["FunctionParameter","Pattern","PatternLike","LVal"],fields:Object.assign({},Iy(),{properties:(0,z.validateArrayOfType)("RestElement","ObjectProperty")})});Je("SpreadElement",{visitor:["argument"],aliases:["UnaryLike"],deprecatedAlias:"SpreadProperty",fields:{argument:{validate:(0,z.assertNodeType)("Expression")}}});Je("Super",{aliases:["Expression"]});Je("TaggedTemplateExpression",{visitor:["tag","typeParameters","quasi"],builder:["tag","quasi"],aliases:["Expression"],fields:{tag:{validate:(0,z.assertNodeType)("Expression")},quasi:{validate:(0,z.assertNodeType)("TemplateLiteral")},typeParameters:{validate:(0,z.assertNodeType)("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:!0}}});Je("TemplateElement",{builder:["value","tail"],fields:{value:{validate:(0,z.chain)((0,z.assertShape)({raw:{validate:(0,z.assertValueType)("string")},cooked:{validate:(0,z.assertValueType)("string"),optional:!0}}),function(t){let r=t.value.raw,n=!1,a=()=>{throw new Error("Internal @babel/types error.")},{str:i,firstInvalidLoc:s}=(0,Swe.readStringContents)("template",r,0,0,0,{unterminated(){n=!0},strictNumericEscape:a,invalidEscapeSequence:a,numericSeparatorInEscapeSequence:a,unexpectedNumericSeparator:a,invalidDigit:a,invalidCodePoint:a});if(!n)throw new Error("Invalid raw");t.value.cooked=s?null:i})},tail:{default:!1}}});Je("TemplateLiteral",{visitor:["quasis","expressions"],aliases:["Expression","Literal"],fields:{quasis:(0,z.validateArrayOfType)("TemplateElement"),expressions:{validate:(0,z.chain)((0,z.assertValueType)("array"),(0,z.assertEach)((0,z.assertNodeType)("Expression","TSType")),function(e,t,r){if(e.quasis.length!==r.length+1)throw new TypeError(`Number of ${e.type} quasis should be exactly one more than the number of expressions.
Expected ${r.length+1} quasis but got ${e.quasis.length}`)})}}});Je("YieldExpression",{builder:["argument","delegate"],visitor:["argument"],aliases:["Expression","Terminatorless"],fields:{delegate:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,z.chain)((0,z.assertValueType)("boolean"),Object.assign(function(e,t,r){if(r&&!e.argument)throw new TypeError("Property delegate of YieldExpression cannot be true if there is no argument")},{type:"boolean"})):(0,z.assertValueType)("boolean"),default:!1},argument:{optional:!0,validate:(0,z.assertNodeType)("Expression")}}});Je("AwaitExpression",{builder:["argument"],visitor:["argument"],aliases:["Expression","Terminatorless"],fields:{argument:{validate:(0,z.assertNodeType)("Expression")}}});Je("Import",{aliases:["Expression"]});Je("BigIntLiteral",{builder:["value"],fields:{value:{validate:(0,z.assertValueType)("string")}},aliases:["Expression","Pureish","Literal","Immutable"]});Je("ExportNamespaceSpecifier",{visitor:["exported"],aliases:["ModuleSpecifier"],fields:{exported:{validate:(0,z.assertNodeType)("Identifier")}}});Je("OptionalMemberExpression",{builder:["object","property","computed","optional"],visitor:["object","property"],aliases:["Expression"],fields:{object:{validate:(0,z.assertNodeType)("Expression")},property:{validate:function(){let e=(0,z.assertNodeType)("Identifier"),t=(0,z.assertNodeType)("Expression");return Object.assign(function(n,a,i){(n.computed?t:e)(n,a,i)},{oneOfNodeTypes:["Expression","Identifier"]})}()},computed:{default:!1},optional:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,z.chain)((0,z.assertValueType)("boolean"),(0,z.assertOptionalChainStart)()):(0,z.assertValueType)("boolean")}}});Je("OptionalCallExpression",{visitor:["callee","typeParameters","typeArguments","arguments"],builder:["callee","arguments","optional"],aliases:["Expression"],fields:Object.assign({callee:{validate:(0,z.assertNodeType)("Expression")},arguments:(0,z.validateArrayOfType)("Expression","SpreadElement","ArgumentPlaceholder"),optional:{validate:process.env.BABEL_TYPES_8_BREAKING?(0,z.chain)((0,z.assertValueType)("boolean"),(0,z.assertOptionalChainStart)()):(0,z.assertValueType)("boolean")},typeArguments:{validate:(0,z.assertNodeType)("TypeParameterInstantiation"),optional:!0}},{typeParameters:{validate:(0,z.assertNodeType)("TSTypeParameterInstantiation"),optional:!0}})});Je("ClassProperty",Object.assign({visitor:["decorators","variance","key","typeAnnotation","value"],builder:["key","value","typeAnnotation","decorators","computed","static"],aliases:["Property"]},A0(),{fields:Object.assign({},k1(),{value:{validate:(0,z.assertNodeType)("Expression"),optional:!0},definite:{validate:(0,z.assertValueType)("boolean"),optional:!0},typeAnnotation:{validate:(0,z.assertNodeType)("TypeAnnotation","TSTypeAnnotation","Noop"),optional:!0},decorators:{validate:(0,z.arrayOfType)("Decorator"),optional:!0},readonly:{validate:(0,z.assertValueType)("boolean"),optional:!0},declare:{validate:(0,z.assertValueType)("boolean"),optional:!0},variance:{validate:(0,z.assertNodeType)("Variance"),optional:!0}})}));Je("ClassAccessorProperty",Object.assign({visitor:["decorators","key","typeAnnotation","value"],builder:["key","value","typeAnnotation","decorators","computed","static"],aliases:["Property","Accessor"]},A0(!0),{fields:Object.assign({},k1(),{key:{validate:(0,z.chain)(function(){let e=(0,z.assertNodeType)("Identifier","StringLiteral","NumericLiteral","BigIntLiteral","PrivateName"),t=(0,z.assertNodeType)("Expression");return function(r,n,a){(r.computed?t:e)(r,n,a)}}(),(0,z.assertNodeType)("Identifier","StringLiteral","NumericLiteral","BigIntLiteral","Expression","PrivateName"))},value:{validate:(0,z.assertNodeType)("Expression"),optional:!0},definite:{validate:(0,z.assertValueType)("boolean"),optional:!0},typeAnnotation:{validate:(0,z.assertNodeType)("TypeAnnotation","TSTypeAnnotation","Noop"),optional:!0},decorators:{validate:(0,z.arrayOfType)("Decorator"),optional:!0},readonly:{validate:(0,z.assertValueType)("boolean"),optional:!0},declare:{validate:(0,z.assertValueType)("boolean"),optional:!0},variance:{validate:(0,z.assertNodeType)("Variance"),optional:!0}})}));Je("ClassPrivateProperty",{visitor:["decorators","variance","key","typeAnnotation","value"],builder:["key","value","decorators","static"],aliases:["Property","Private"],fields:{key:{validate:(0,z.assertNodeType)("PrivateName")},value:{validate:(0,z.assertNodeType)("Expression"),optional:!0},typeAnnotation:{validate:(0,z.assertNodeType)("TypeAnnotation","TSTypeAnnotation","Noop"),optional:!0},decorators:{validate:(0,z.arrayOfType)("Decorator"),optional:!0},static:{validate:(0,z.assertValueType)("boolean"),default:!1},readonly:{validate:(0,z.assertValueType)("boolean"),optional:!0},optional:{validate:(0,z.assertValueType)("boolean"),optional:!0},definite:{validate:(0,z.assertValueType)("boolean"),optional:!0},variance:{validate:(0,z.assertNodeType)("Variance"),optional:!0}}});Je("ClassPrivateMethod",{builder:["kind","key","params","body","static"],visitor:["decorators","key","typeParameters","params","returnType","body"],aliases:["Function","Scopable","BlockParent","FunctionParent","Method","Private"],fields:Object.assign({},lR(),Um(),{kind:{validate:(0,z.assertOneOf)("get","set","method"),default:"method"},key:{validate:(0,z.assertNodeType)("PrivateName")},body:{validate:(0,z.assertNodeType)("BlockStatement")}})});Je("PrivateName",{visitor:["id"],aliases:["Private"],fields:{id:{validate:(0,z.assertNodeType)("Identifier")}}});Je("StaticBlock",{visitor:["body"],fields:{body:(0,z.validateArrayOfType)("Statement")},aliases:["Scopable","BlockParent","FunctionParent"]});Je("ImportAttribute",{visitor:["key","value"],fields:{key:{validate:(0,z.assertNodeType)("Identifier","StringLiteral")},value:{validate:(0,z.assertNodeType)("StringLiteral")}}})});var t9=ae(()=>{"use strict";var e9=N0(),Se=Zc(),At=(0,Se.defineAliasedType)("Flow"),cR=e=>{let t=e==="DeclareClass";At(e,{builder:["id","typeParameters","extends","body"],visitor:["id","typeParameters","extends",...t?["mixins","implements"]:[],"body"],aliases:["FlowDeclaration","Statement","Declaration"],fields:Object.assign({id:(0,Se.validateType)("Identifier"),typeParameters:(0,Se.validateOptionalType)("TypeParameterDeclaration"),extends:(0,Se.validateOptional)((0,Se.arrayOfType)("InterfaceExtends"))},t?{mixins:(0,Se.validateOptional)((0,Se.arrayOfType)("InterfaceExtends")),implements:(0,Se.validateOptional)((0,Se.arrayOfType)("ClassImplements"))}:{},{body:(0,Se.validateType)("ObjectTypeAnnotation")})})};At("AnyTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]});At("ArrayTypeAnnotation",{visitor:["elementType"],aliases:["FlowType"],fields:{elementType:(0,Se.validateType)("FlowType")}});At("BooleanTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]});At("BooleanLiteralTypeAnnotation",{builder:["value"],aliases:["FlowType"],fields:{value:(0,Se.validate)((0,Se.assertValueType)("boolean"))}});At("NullLiteralTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]});At("ClassImplements",{visitor:["id","typeParameters"],fields:{id:(0,Se.validateType)("Identifier"),typeParameters:(0,Se.validateOptionalType)("TypeParameterInstantiation")}});cR("DeclareClass");At("DeclareFunction",{builder:["id"],visitor:["id","predicate"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:(0,Se.validateType)("Identifier"),predicate:(0,Se.validateOptionalType)("DeclaredPredicate")}});cR("DeclareInterface");At("DeclareModule",{builder:["id","body","kind"],visitor:["id","body"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:(0,Se.validateType)("Identifier","StringLiteral"),body:(0,Se.validateType)("BlockStatement"),kind:(0,Se.validateOptional)((0,Se.assertOneOf)("CommonJS","ES"))}});At("DeclareModuleExports",{visitor:["typeAnnotation"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{typeAnnotation:(0,Se.validateType)("TypeAnnotation")}});At("DeclareTypeAlias",{visitor:["id","typeParameters","right"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:(0,Se.validateType)("Identifier"),typeParameters:(0,Se.validateOptionalType)("TypeParameterDeclaration"),right:(0,Se.validateType)("FlowType")}});At("DeclareOpaqueType",{visitor:["id","typeParameters","supertype"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:(0,Se.validateType)("Identifier"),typeParameters:(0,Se.validateOptionalType)("TypeParameterDeclaration"),supertype:(0,Se.validateOptionalType)("FlowType"),impltype:(0,Se.validateOptionalType)("FlowType")}});At("DeclareVariable",{visitor:["id"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:(0,Se.validateType)("Identifier")}});At("DeclareExportDeclaration",{visitor:["declaration","specifiers","source","attributes"],aliases:["FlowDeclaration","Statement","Declaration"],fields:Object.assign({declaration:(0,Se.validateOptionalType)("Flow"),specifiers:(0,Se.validateOptional)((0,Se.arrayOfType)("ExportSpecifier","ExportNamespaceSpecifier")),source:(0,Se.validateOptionalType)("StringLiteral"),default:(0,Se.validateOptional)((0,Se.assertValueType)("boolean"))},e9.importAttributes)});At("DeclareExportAllDeclaration",{visitor:["source","attributes"],aliases:["FlowDeclaration","Statement","Declaration"],fields:Object.assign({source:(0,Se.validateType)("StringLiteral"),exportKind:(0,Se.validateOptional)((0,Se.assertOneOf)("type","value"))},e9.importAttributes)});At("DeclaredPredicate",{visitor:["value"],aliases:["FlowPredicate"],fields:{value:(0,Se.validateType)("Flow")}});At("ExistsTypeAnnotation",{aliases:["FlowType"]});At("FunctionTypeAnnotation",{builder:["typeParameters","params","rest","returnType"],visitor:["typeParameters","this","params","rest","returnType"],aliases:["FlowType"],fields:{typeParameters:(0,Se.validateOptionalType)("TypeParameterDeclaration"),params:(0,Se.validateArrayOfType)("FunctionTypeParam"),rest:(0,Se.validateOptionalType)("FunctionTypeParam"),this:(0,Se.validateOptionalType)("FunctionTypeParam"),returnType:(0,Se.validateType)("FlowType")}});At("FunctionTypeParam",{visitor:["name","typeAnnotation"],fields:{name:(0,Se.validateOptionalType)("Identifier"),typeAnnotation:(0,Se.validateType)("FlowType"),optional:(0,Se.validateOptional)((0,Se.assertValueType)("boolean"))}});At("GenericTypeAnnotation",{visitor:["id","typeParameters"],aliases:["FlowType"],fields:{id:(0,Se.validateType)("Identifier","QualifiedTypeIdentifier"),typeParameters:(0,Se.validateOptionalType)("TypeParameterInstantiation")}});At("InferredPredicate",{aliases:["FlowPredicate"]});At("InterfaceExtends",{visitor:["id","typeParameters"],fields:{id:(0,Se.validateType)("Identifier","QualifiedTypeIdentifier"),typeParameters:(0,Se.validateOptionalType)("TypeParameterInstantiation")}});cR("InterfaceDeclaration");At("InterfaceTypeAnnotation",{visitor:["extends","body"],aliases:["FlowType"],fields:{extends:(0,Se.validateOptional)((0,Se.arrayOfType)("InterfaceExtends")),body:(0,Se.validateType)("ObjectTypeAnnotation")}});At("IntersectionTypeAnnotation",{visitor:["types"],aliases:["FlowType"],fields:{types:(0,Se.validate)((0,Se.arrayOfType)("FlowType"))}});At("MixedTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]});At("EmptyTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]});At("NullableTypeAnnotation",{visitor:["typeAnnotation"],aliases:["FlowType"],fields:{typeAnnotation:(0,Se.validateType)("FlowType")}});At("NumberLiteralTypeAnnotation",{builder:["value"],aliases:["FlowType"],fields:{value:(0,Se.validate)((0,Se.assertValueType)("number"))}});At("NumberTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]});At("ObjectTypeAnnotation",{visitor:["properties","indexers","callProperties","internalSlots"],aliases:["FlowType"],builder:["properties","indexers","callProperties","internalSlots","exact"],fields:{properties:(0,Se.validate)((0,Se.arrayOfType)("ObjectTypeProperty","ObjectTypeSpreadProperty")),indexers:{validate:(0,Se.arrayOfType)("ObjectTypeIndexer"),optional:!0,default:[]},callProperties:{validate:(0,Se.arrayOfType)("ObjectTypeCallProperty"),optional:!0,default:[]},internalSlots:{validate:(0,Se.arrayOfType)("ObjectTypeInternalSlot"),optional:!0,default:[]},exact:{validate:(0,Se.assertValueType)("boolean"),default:!1},inexact:(0,Se.validateOptional)((0,Se.assertValueType)("boolean"))}});At("ObjectTypeInternalSlot",{visitor:["id","value"],builder:["id","value","optional","static","method"],aliases:["UserWhitespacable"],fields:{id:(0,Se.validateType)("Identifier"),value:(0,Se.validateType)("FlowType"),optional:(0,Se.validate)((0,Se.assertValueType)("boolean")),static:(0,Se.validate)((0,Se.assertValueType)("boolean")),method:(0,Se.validate)((0,Se.assertValueType)("boolean"))}});At("ObjectTypeCallProperty",{visitor:["value"],aliases:["UserWhitespacable"],fields:{value:(0,Se.validateType)("FlowType"),static:(0,Se.validate)((0,Se.assertValueType)("boolean"))}});At("ObjectTypeIndexer",{visitor:["variance","id","key","value"],builder:["id","key","value","variance"],aliases:["UserWhitespacable"],fields:{id:(0,Se.validateOptionalType)("Identifier"),key:(0,Se.validateType)("FlowType"),value:(0,Se.validateType)("FlowType"),static:(0,Se.validate)((0,Se.assertValueType)("boolean")),variance:(0,Se.validateOptionalType)("Variance")}});At("ObjectTypeProperty",{visitor:["key","value","variance"],aliases:["UserWhitespacable"],fields:{key:(0,Se.validateType)("Identifier","StringLiteral"),value:(0,Se.validateType)("FlowType"),kind:(0,Se.validate)((0,Se.assertOneOf)("init","get","set")),static:(0,Se.validate)((0,Se.assertValueType)("boolean")),proto:(0,Se.validate)((0,Se.assertValueType)("boolean")),optional:(0,Se.validate)((0,Se.assertValueType)("boolean")),variance:(0,Se.validateOptionalType)("Variance"),method:(0,Se.validate)((0,Se.assertValueType)("boolean"))}});At("ObjectTypeSpreadProperty",{visitor:["argument"],aliases:["UserWhitespacable"],fields:{argument:(0,Se.validateType)("FlowType")}});At("OpaqueType",{visitor:["id","typeParameters","supertype","impltype"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:(0,Se.validateType)("Identifier"),typeParameters:(0,Se.validateOptionalType)("TypeParameterDeclaration"),supertype:(0,Se.validateOptionalType)("FlowType"),impltype:(0,Se.validateType)("FlowType")}});At("QualifiedTypeIdentifier",{visitor:["qualification","id"],builder:["id","qualification"],fields:{id:(0,Se.validateType)("Identifier"),qualification:(0,Se.validateType)("Identifier","QualifiedTypeIdentifier")}});At("StringLiteralTypeAnnotation",{builder:["value"],aliases:["FlowType"],fields:{value:(0,Se.validate)((0,Se.assertValueType)("string"))}});At("StringTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]});At("SymbolTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]});At("ThisTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]});At("TupleTypeAnnotation",{visitor:["types"],aliases:["FlowType"],fields:{types:(0,Se.validate)((0,Se.arrayOfType)("FlowType"))}});At("TypeofTypeAnnotation",{visitor:["argument"],aliases:["FlowType"],fields:{argument:(0,Se.validateType)("FlowType")}});At("TypeAlias",{visitor:["id","typeParameters","right"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:(0,Se.validateType)("Identifier"),typeParameters:(0,Se.validateOptionalType)("TypeParameterDeclaration"),right:(0,Se.validateType)("FlowType")}});At("TypeAnnotation",{visitor:["typeAnnotation"],fields:{typeAnnotation:(0,Se.validateType)("FlowType")}});At("TypeCastExpression",{visitor:["expression","typeAnnotation"],aliases:["ExpressionWrapper","Expression"],fields:{expression:(0,Se.validateType)("Expression"),typeAnnotation:(0,Se.validateType)("TypeAnnotation")}});At("TypeParameter",{visitor:["bound","default","variance"],fields:{name:(0,Se.validate)((0,Se.assertValueType)("string")),bound:(0,Se.validateOptionalType)("TypeAnnotation"),default:(0,Se.validateOptionalType)("FlowType"),variance:(0,Se.validateOptionalType)("Variance")}});At("TypeParameterDeclaration",{visitor:["params"],fields:{params:(0,Se.validate)((0,Se.arrayOfType)("TypeParameter"))}});At("TypeParameterInstantiation",{visitor:["params"],fields:{params:(0,Se.validate)((0,Se.arrayOfType)("FlowType"))}});At("UnionTypeAnnotation",{visitor:["types"],aliases:["FlowType"],fields:{types:(0,Se.validate)((0,Se.arrayOfType)("FlowType"))}});At("Variance",{builder:["kind"],fields:{kind:(0,Se.validate)((0,Se.assertOneOf)("minus","plus"))}});At("VoidTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]});At("EnumDeclaration",{aliases:["Statement","Declaration"],visitor:["id","body"],fields:{id:(0,Se.validateType)("Identifier"),body:(0,Se.validateType)("EnumBooleanBody","EnumNumberBody","EnumStringBody","EnumSymbolBody")}});At("EnumBooleanBody",{aliases:["EnumBody"],visitor:["members"],fields:{explicitType:(0,Se.validate)((0,Se.assertValueType)("boolean")),members:(0,Se.validateArrayOfType)("EnumBooleanMember"),hasUnknownMembers:(0,Se.validate)((0,Se.assertValueType)("boolean"))}});At("EnumNumberBody",{aliases:["EnumBody"],visitor:["members"],fields:{explicitType:(0,Se.validate)((0,Se.assertValueType)("boolean")),members:(0,Se.validateArrayOfType)("EnumNumberMember"),hasUnknownMembers:(0,Se.validate)((0,Se.assertValueType)("boolean"))}});At("EnumStringBody",{aliases:["EnumBody"],visitor:["members"],fields:{explicitType:(0,Se.validate)((0,Se.assertValueType)("boolean")),members:(0,Se.validateArrayOfType)("EnumStringMember","EnumDefaultedMember"),hasUnknownMembers:(0,Se.validate)((0,Se.assertValueType)("boolean"))}});At("EnumSymbolBody",{aliases:["EnumBody"],visitor:["members"],fields:{members:(0,Se.validateArrayOfType)("EnumDefaultedMember"),hasUnknownMembers:(0,Se.validate)((0,Se.assertValueType)("boolean"))}});At("EnumBooleanMember",{aliases:["EnumMember"],builder:["id"],visitor:["id","init"],fields:{id:(0,Se.validateType)("Identifier"),init:(0,Se.validateType)("BooleanLiteral")}});At("EnumNumberMember",{aliases:["EnumMember"],visitor:["id","init"],fields:{id:(0,Se.validateType)("Identifier"),init:(0,Se.validateType)("NumericLiteral")}});At("EnumStringMember",{aliases:["EnumMember"],visitor:["id","init"],fields:{id:(0,Se.validateType)("Identifier"),init:(0,Se.validateType)("StringLiteral")}});At("EnumDefaultedMember",{aliases:["EnumMember"],visitor:["id"],fields:{id:(0,Se.validateType)("Identifier")}});At("IndexedAccessType",{visitor:["objectType","indexType"],aliases:["FlowType"],fields:{objectType:(0,Se.validateType)("FlowType"),indexType:(0,Se.validateType)("FlowType")}});At("OptionalIndexedAccessType",{visitor:["objectType","indexType"],aliases:["FlowType"],fields:{objectType:(0,Se.validateType)("FlowType"),indexType:(0,Se.validateType)("FlowType"),optional:(0,Se.validate)((0,Se.assertValueType)("boolean"))}})});var r9=ae(()=>{"use strict";var ea=Zc(),Es=(0,ea.defineAliasedType)("JSX");Es("JSXAttribute",{visitor:["name","value"],aliases:["Immutable"],fields:{name:{validate:(0,ea.assertNodeType)("JSXIdentifier","JSXNamespacedName")},value:{optional:!0,validate:(0,ea.assertNodeType)("JSXElement","JSXFragment","StringLiteral","JSXExpressionContainer")}}});Es("JSXClosingElement",{visitor:["name"],aliases:["Immutable"],fields:{name:{validate:(0,ea.assertNodeType)("JSXIdentifier","JSXMemberExpression","JSXNamespacedName")}}});Es("JSXElement",{builder:["openingElement","closingElement","children","selfClosing"],visitor:["openingElement","children","closingElement"],aliases:["Immutable","Expression"],fields:Object.assign({openingElement:{validate:(0,ea.assertNodeType)("JSXOpeningElement")},closingElement:{optional:!0,validate:(0,ea.assertNodeType)("JSXClosingElement")},children:(0,ea.validateArrayOfType)("JSXText","JSXExpressionContainer","JSXSpreadChild","JSXElement","JSXFragment")},{selfClosing:{validate:(0,ea.assertValueType)("boolean"),optional:!0}})});Es("JSXEmptyExpression",{});Es("JSXExpressionContainer",{visitor:["expression"],aliases:["Immutable"],fields:{expression:{validate:(0,ea.assertNodeType)("Expression","JSXEmptyExpression")}}});Es("JSXSpreadChild",{visitor:["expression"],aliases:["Immutable"],fields:{expression:{validate:(0,ea.assertNodeType)("Expression")}}});Es("JSXIdentifier",{builder:["name"],fields:{name:{validate:(0,ea.assertValueType)("string")}}});Es("JSXMemberExpression",{visitor:["object","property"],fields:{object:{validate:(0,ea.assertNodeType)("JSXMemberExpression","JSXIdentifier")},property:{validate:(0,ea.assertNodeType)("JSXIdentifier")}}});Es("JSXNamespacedName",{visitor:["namespace","name"],fields:{namespace:{validate:(0,ea.assertNodeType)("JSXIdentifier")},name:{validate:(0,ea.assertNodeType)("JSXIdentifier")}}});Es("JSXOpeningElement",{builder:["name","attributes","selfClosing"],visitor:["name","typeParameters","typeArguments","attributes"],aliases:["Immutable"],fields:Object.assign({name:{validate:(0,ea.assertNodeType)("JSXIdentifier","JSXMemberExpression","JSXNamespacedName")},selfClosing:{default:!1},attributes:(0,ea.validateArrayOfType)("JSXAttribute","JSXSpreadAttribute"),typeArguments:{validate:(0,ea.assertNodeType)("TypeParameterInstantiation"),optional:!0}},{typeParameters:{validate:(0,ea.assertNodeType)("TSTypeParameterInstantiation"),optional:!0}})});Es("JSXSpreadAttribute",{visitor:["argument"],fields:{argument:{validate:(0,ea.assertNodeType)("Expression")}}});Es("JSXText",{aliases:["Immutable"],builder:["value"],fields:{value:{validate:(0,ea.assertValueType)("string")}}});Es("JSXFragment",{builder:["openingFragment","closingFragment","children"],visitor:["openingFragment","children","closingFragment"],aliases:["Immutable","Expression"],fields:{openingFragment:{validate:(0,ea.assertNodeType)("JSXOpeningFragment")},closingFragment:{validate:(0,ea.assertNodeType)("JSXClosingFragment")},children:(0,ea.validateArrayOfType)("JSXText","JSXExpressionContainer","JSXSpreadChild","JSXElement","JSXFragment")}});Es("JSXOpeningFragment",{aliases:["Immutable"]});Es("JSXClosingFragment",{aliases:["Immutable"]})});var fR=ae(_f=>{"use strict";Object.defineProperty(_f,"__esModule",{value:!0});_f.PLACEHOLDERS_FLIPPED_ALIAS=_f.PLACEHOLDERS_ALIAS=_f.PLACEHOLDERS=void 0;var Twe=Zc(),wwe=_f.PLACEHOLDERS=["Identifier","StringLiteral","Expression","Statement","Declaration","BlockStatement","ClassBody","Pattern"],dR=_f.PLACEHOLDERS_ALIAS={Declaration:["Statement"],Pattern:["PatternLike","LVal"]};for(let e of wwe){let t=Twe.ALIAS_KEYS[e];t!=null&&t.length&&(dR[e]=t)}var uR=_f.PLACEHOLDERS_FLIPPED_ALIAS={};Object.keys(dR).forEach(e=>{dR[e].forEach(t=>{hasOwnProperty.call(uR,t)||(uR[t]=[]),uR[t].push(e)})})});var n9=ae(()=>{"use strict";var _1=Zc(),Cwe=fR(),Pwe=N0(),pR=(0,_1.defineAliasedType)("Miscellaneous");pR("Noop",{visitor:[]});pR("Placeholder",{visitor:[],builder:["expectedNode","name"],fields:Object.assign({name:{validate:(0,_1.assertNodeType)("Identifier")},expectedNode:{validate:(0,_1.assertOneOf)(...Cwe.PLACEHOLDERS)}},(0,Pwe.patternLikeCommon)())});pR("V8IntrinsicIdentifier",{builder:["name"],fields:{name:{validate:(0,_1.assertValueType)("string")}}})});var a9=ae(()=>{"use strict";var Dn=Zc();(0,Dn.default)("ArgumentPlaceholder",{});(0,Dn.default)("BindExpression",{visitor:["object","callee"],aliases:["Expression"],fields:process.env.BABEL_TYPES_8_BREAKING?{object:{validate:(0,Dn.assertNodeType)("Expression")},callee:{validate:(0,Dn.assertNodeType)("Expression")}}:{object:{validate:Object.assign(()=>{},{oneOfNodeTypes:["Expression"]})},callee:{validate:Object.assign(()=>{},{oneOfNodeTypes:["Expression"]})}}});(0,Dn.default)("Decorator",{visitor:["expression"],fields:{expression:{validate:(0,Dn.assertNodeType)("Expression")}}});(0,Dn.default)("DoExpression",{visitor:["body"],builder:["body","async"],aliases:["Expression"],fields:{body:{validate:(0,Dn.assertNodeType)("BlockStatement")},async:{validate:(0,Dn.assertValueType)("boolean"),default:!1}}});(0,Dn.default)("ExportDefaultSpecifier",{visitor:["exported"],aliases:["ModuleSpecifier"],fields:{exported:{validate:(0,Dn.assertNodeType)("Identifier")}}});(0,Dn.default)("RecordExpression",{visitor:["properties"],aliases:["Expression"],fields:{properties:(0,Dn.validateArrayOfType)("ObjectProperty","SpreadElement")}});(0,Dn.default)("TupleExpression",{fields:{elements:{validate:(0,Dn.arrayOfType)("Expression","SpreadElement"),default:[]}},visitor:["elements"],aliases:["Expression"]});(0,Dn.default)("DecimalLiteral",{builder:["value"],fields:{value:{validate:(0,Dn.assertValueType)("string")}},aliases:["Expression","Pureish","Literal","Immutable"]});(0,Dn.default)("ModuleExpression",{visitor:["body"],fields:{body:{validate:(0,Dn.assertNodeType)("Program")}},aliases:["Expression"]});(0,Dn.default)("TopicReference",{aliases:["Expression"]});(0,Dn.default)("PipelineTopicExpression",{builder:["expression"],visitor:["expression"],fields:{expression:{validate:(0,Dn.assertNodeType)("Expression")}},aliases:["Expression"]});(0,Dn.default)("PipelineBareFunction",{builder:["callee"],visitor:["callee"],fields:{callee:{validate:(0,Dn.assertNodeType)("Expression")}},aliases:["Expression"]});(0,Dn.default)("PipelinePrimaryTopicReference",{aliases:["Expression"]});(0,Dn.default)("VoidPattern",{aliases:["Pattern","PatternLike","FunctionParameter"]})});var d9=ae(()=>{"use strict";var Oe=Zc(),mR=N0(),Ewe=Ty(),Vt=(0,Oe.defineAliasedType)("TypeScript"),no=(0,Oe.assertValueType)("boolean"),i9=()=>({returnType:{validate:(0,Oe.assertNodeType)("TSTypeAnnotation","Noop"),optional:!0},typeParameters:{validate:(0,Oe.assertNodeType)("TSTypeParameterDeclaration","Noop"),optional:!0}});Vt("TSParameterProperty",{aliases:["LVal"],visitor:["parameter"],fields:{accessibility:{validate:(0,Oe.assertOneOf)("public","private","protected"),optional:!0},readonly:{validate:(0,Oe.assertValueType)("boolean"),optional:!0},parameter:{validate:(0,Oe.assertNodeType)("Identifier","AssignmentPattern")},override:{validate:(0,Oe.assertValueType)("boolean"),optional:!0},decorators:{validate:(0,Oe.arrayOfType)("Decorator"),optional:!0}}});Vt("TSDeclareFunction",{aliases:["Statement","Declaration"],visitor:["id","typeParameters","params","returnType"],fields:Object.assign({},(0,mR.functionDeclarationCommon)(),i9())});Vt("TSDeclareMethod",Object.assign({visitor:["decorators","key","typeParameters","params","returnType"]},(0,mR.classMethodOrPropertyUnionShapeCommon)(),{fields:Object.assign({},(0,mR.classMethodOrDeclareMethodCommon)(),i9())}));Vt("TSQualifiedName",{aliases:["TSEntityName"],visitor:["left","right"],fields:{left:(0,Oe.validateType)("TSEntityName"),right:(0,Oe.validateType)("Identifier")}});var L1=()=>({typeParameters:(0,Oe.validateOptionalType)("TSTypeParameterDeclaration"),parameters:(0,Oe.validateArrayOfType)("ArrayPattern","Identifier","ObjectPattern","RestElement"),typeAnnotation:(0,Oe.validateOptionalType)("TSTypeAnnotation")}),s9={aliases:["TSTypeElement"],visitor:["typeParameters","parameters","typeAnnotation"],fields:L1()};Vt("TSCallSignatureDeclaration",s9);Vt("TSConstructSignatureDeclaration",s9);var o9=()=>({key:(0,Oe.validateType)("Expression"),computed:{default:!1},optional:(0,Oe.validateOptional)(no)});Vt("TSPropertySignature",{aliases:["TSTypeElement"],visitor:["key","typeAnnotation"],fields:Object.assign({},o9(),{readonly:(0,Oe.validateOptional)(no),typeAnnotation:(0,Oe.validateOptionalType)("TSTypeAnnotation"),kind:{optional:!0,validate:(0,Oe.assertOneOf)("get","set")}})});Vt("TSMethodSignature",{aliases:["TSTypeElement"],visitor:["key","typeParameters","parameters","typeAnnotation"],fields:Object.assign({},L1(),o9(),{kind:{validate:(0,Oe.assertOneOf)("method","get","set")}})});Vt("TSIndexSignature",{aliases:["TSTypeElement"],visitor:["parameters","typeAnnotation"],fields:{readonly:(0,Oe.validateOptional)(no),static:(0,Oe.validateOptional)(no),parameters:(0,Oe.validateArrayOfType)("Identifier"),typeAnnotation:(0,Oe.validateOptionalType)("TSTypeAnnotation")}});var Iwe=["TSAnyKeyword","TSBooleanKeyword","TSBigIntKeyword","TSIntrinsicKeyword","TSNeverKeyword","TSNullKeyword","TSNumberKeyword","TSObjectKeyword","TSStringKeyword","TSSymbolKeyword","TSUndefinedKeyword","TSUnknownKeyword","TSVoidKeyword"];for(let e of Iwe)Vt(e,{aliases:["TSType","TSBaseType"],visitor:[],fields:{}});Vt("TSThisType",{aliases:["TSType","TSBaseType"],visitor:[],fields:{}});var l9={aliases:["TSType"],visitor:["typeParameters","parameters","typeAnnotation"]};Vt("TSFunctionType",Object.assign({},l9,{fields:L1()}));Vt("TSConstructorType",Object.assign({},l9,{fields:Object.assign({},L1(),{abstract:(0,Oe.validateOptional)(no)})}));Vt("TSTypeReference",{aliases:["TSType"],visitor:["typeName","typeParameters"],fields:{typeName:(0,Oe.validateType)("TSEntityName"),typeParameters:(0,Oe.validateOptionalType)("TSTypeParameterInstantiation")}});Vt("TSTypePredicate",{aliases:["TSType"],visitor:["parameterName","typeAnnotation"],builder:["parameterName","typeAnnotation","asserts"],fields:{parameterName:(0,Oe.validateType)("Identifier","TSThisType"),typeAnnotation:(0,Oe.validateOptionalType)("TSTypeAnnotation"),asserts:(0,Oe.validateOptional)(no)}});Vt("TSTypeQuery",{aliases:["TSType"],visitor:["exprName","typeParameters"],fields:{exprName:(0,Oe.validateType)("TSEntityName","TSImportType"),typeParameters:(0,Oe.validateOptionalType)("TSTypeParameterInstantiation")}});Vt("TSTypeLiteral",{aliases:["TSType"],visitor:["members"],fields:{members:(0,Oe.validateArrayOfType)("TSTypeElement")}});Vt("TSArrayType",{aliases:["TSType"],visitor:["elementType"],fields:{elementType:(0,Oe.validateType)("TSType")}});Vt("TSTupleType",{aliases:["TSType"],visitor:["elementTypes"],fields:{elementTypes:(0,Oe.validateArrayOfType)("TSType","TSNamedTupleMember")}});Vt("TSOptionalType",{aliases:["TSType"],visitor:["typeAnnotation"],fields:{typeAnnotation:(0,Oe.validateType)("TSType")}});Vt("TSRestType",{aliases:["TSType"],visitor:["typeAnnotation"],fields:{typeAnnotation:(0,Oe.validateType)("TSType")}});Vt("TSNamedTupleMember",{visitor:["label","elementType"],builder:["label","elementType","optional"],fields:{label:(0,Oe.validateType)("Identifier"),optional:{validate:no,default:!1},elementType:(0,Oe.validateType)("TSType")}});var c9={aliases:["TSType"],visitor:["types"],fields:{types:(0,Oe.validateArrayOfType)("TSType")}};Vt("TSUnionType",c9);Vt("TSIntersectionType",c9);Vt("TSConditionalType",{aliases:["TSType"],visitor:["checkType","extendsType","trueType","falseType"],fields:{checkType:(0,Oe.validateType)("TSType"),extendsType:(0,Oe.validateType)("TSType"),trueType:(0,Oe.validateType)("TSType"),falseType:(0,Oe.validateType)("TSType")}});Vt("TSInferType",{aliases:["TSType"],visitor:["typeParameter"],fields:{typeParameter:(0,Oe.validateType)("TSTypeParameter")}});Vt("TSParenthesizedType",{aliases:["TSType"],visitor:["typeAnnotation"],fields:{typeAnnotation:(0,Oe.validateType)("TSType")}});Vt("TSTypeOperator",{aliases:["TSType"],visitor:["typeAnnotation"],builder:["typeAnnotation","operator"],fields:{operator:{validate:(0,Oe.assertValueType)("string"),default:"keyof"},typeAnnotation:(0,Oe.validateType)("TSType")}});Vt("TSIndexedAccessType",{aliases:["TSType"],visitor:["objectType","indexType"],fields:{objectType:(0,Oe.validateType)("TSType"),indexType:(0,Oe.validateType)("TSType")}});Vt("TSMappedType",{aliases:["TSType"],visitor:["typeParameter","nameType","typeAnnotation"],builder:["typeParameter","typeAnnotation","nameType"],fields:Object.assign({},{typeParameter:(0,Oe.validateType)("TSTypeParameter")},{readonly:(0,Oe.validateOptional)((0,Oe.assertOneOf)(!0,!1,"+","-")),optional:(0,Oe.validateOptional)((0,Oe.assertOneOf)(!0,!1,"+","-")),typeAnnotation:(0,Oe.validateOptionalType)("TSType"),nameType:(0,Oe.validateOptionalType)("TSType")})});Vt("TSTemplateLiteralType",{aliases:["TSType","TSBaseType"],visitor:["quasis","types"],fields:{quasis:(0,Oe.validateArrayOfType)("TemplateElement"),types:{validate:(0,Oe.chain)((0,Oe.assertValueType)("array"),(0,Oe.assertEach)((0,Oe.assertNodeType)("TSType")),function(e,t,r){if(e.quasis.length!==r.length+1)throw new TypeError(`Number of ${e.type} quasis should be exactly one more than the number of types.
Expected ${r.length+1} quasis but got ${e.quasis.length}`)})}}});Vt("TSLiteralType",{aliases:["TSType","TSBaseType"],visitor:["literal"],fields:{literal:{validate:function(){let e=(0,Oe.assertNodeType)("NumericLiteral","BigIntLiteral"),t=(0,Oe.assertOneOf)("-"),r=(0,Oe.assertNodeType)("NumericLiteral","StringLiteral","BooleanLiteral","BigIntLiteral","TemplateLiteral"),n=function(i,s,o){(0,Ewe.default)("UnaryExpression",o)?(t(o,"operator",o.operator),e(o,"argument",o.argument)):r(i,s,o)};return n.oneOfNodeTypes=["NumericLiteral","StringLiteral","BooleanLiteral","BigIntLiteral","TemplateLiteral","UnaryExpression"],n}()}}});Vt("TSExpressionWithTypeArguments",{aliases:["TSType"],visitor:["expression","typeParameters"],fields:{expression:(0,Oe.validateType)("TSEntityName"),typeParameters:(0,Oe.validateOptionalType)("TSTypeParameterInstantiation")}});Vt("TSInterfaceDeclaration",{aliases:["Statement","Declaration"],visitor:["id","typeParameters","extends","body"],fields:{declare:(0,Oe.validateOptional)(no),id:(0,Oe.validateType)("Identifier"),typeParameters:(0,Oe.validateOptionalType)("TSTypeParameterDeclaration"),extends:(0,Oe.validateOptional)((0,Oe.arrayOfType)("TSExpressionWithTypeArguments")),body:(0,Oe.validateType)("TSInterfaceBody")}});Vt("TSInterfaceBody",{visitor:["body"],fields:{body:(0,Oe.validateArrayOfType)("TSTypeElement")}});Vt("TSTypeAliasDeclaration",{aliases:["Statement","Declaration"],visitor:["id","typeParameters","typeAnnotation"],fields:{declare:(0,Oe.validateOptional)(no),id:(0,Oe.validateType)("Identifier"),typeParameters:(0,Oe.validateOptionalType)("TSTypeParameterDeclaration"),typeAnnotation:(0,Oe.validateType)("TSType")}});Vt("TSInstantiationExpression",{aliases:["Expression"],visitor:["expression","typeParameters"],fields:{expression:(0,Oe.validateType)("Expression"),typeParameters:(0,Oe.validateOptionalType)("TSTypeParameterInstantiation")}});var u9={aliases:["Expression","LVal","PatternLike"],visitor:["expression","typeAnnotation"],fields:{expression:(0,Oe.validateType)("Expression"),typeAnnotation:(0,Oe.validateType)("TSType")}};Vt("TSAsExpression",u9);Vt("TSSatisfiesExpression",u9);Vt("TSTypeAssertion",{aliases:["Expression","LVal","PatternLike"],visitor:["typeAnnotation","expression"],fields:{typeAnnotation:(0,Oe.validateType)("TSType"),expression:(0,Oe.validateType)("Expression")}});Vt("TSEnumBody",{visitor:["members"],fields:{members:(0,Oe.validateArrayOfType)("TSEnumMember")}});Vt("TSEnumDeclaration",{aliases:["Statement","Declaration"],visitor:["id","members"],fields:{declare:(0,Oe.validateOptional)(no),const:(0,Oe.validateOptional)(no),id:(0,Oe.validateType)("Identifier"),members:(0,Oe.validateArrayOfType)("TSEnumMember"),initializer:(0,Oe.validateOptionalType)("Expression"),body:(0,Oe.validateOptionalType)("TSEnumBody")}});Vt("TSEnumMember",{visitor:["id","initializer"],fields:{id:(0,Oe.validateType)("Identifier","StringLiteral"),initializer:(0,Oe.validateOptionalType)("Expression")}});Vt("TSModuleDeclaration",{aliases:["Statement","Declaration"],visitor:["id","body"],fields:Object.assign({kind:{validate:(0,Oe.assertOneOf)("global","module","namespace")},declare:(0,Oe.validateOptional)(no)},{global:(0,Oe.validateOptional)(no)},{id:(0,Oe.validateType)("Identifier","StringLiteral"),body:(0,Oe.validateType)("TSModuleBlock","TSModuleDeclaration")})});Vt("TSModuleBlock",{aliases:["Scopable","Block","BlockParent","FunctionParent"],visitor:["body"],fields:{body:(0,Oe.validateArrayOfType)("Statement")}});Vt("TSImportType",{aliases:["TSType"],builder:["argument","qualifier","typeParameters"],visitor:["argument","options","qualifier","typeParameters"],fields:{argument:(0,Oe.validateType)("StringLiteral"),qualifier:(0,Oe.validateOptionalType)("TSEntityName"),typeParameters:(0,Oe.validateOptionalType)("TSTypeParameterInstantiation"),options:{validate:(0,Oe.assertNodeType)("ObjectExpression"),optional:!0}}});Vt("TSImportEqualsDeclaration",{aliases:["Statement","Declaration"],visitor:["id","moduleReference"],fields:Object.assign({},{isExport:(0,Oe.validate)(no)},{id:(0,Oe.validateType)("Identifier"),moduleReference:(0,Oe.validateType)("TSEntityName","TSExternalModuleReference"),importKind:{validate:(0,Oe.assertOneOf)("type","value"),optional:!0}})});Vt("TSExternalModuleReference",{visitor:["expression"],fields:{expression:(0,Oe.validateType)("StringLiteral")}});Vt("TSNonNullExpression",{aliases:["Expression","LVal","PatternLike"],visitor:["expression"],fields:{expression:(0,Oe.validateType)("Expression")}});Vt("TSExportAssignment",{aliases:["Statement"],visitor:["expression"],fields:{expression:(0,Oe.validateType)("Expression")}});Vt("TSNamespaceExportDeclaration",{aliases:["Statement"],visitor:["id"],fields:{id:(0,Oe.validateType)("Identifier")}});Vt("TSTypeAnnotation",{visitor:["typeAnnotation"],fields:{typeAnnotation:{validate:(0,Oe.assertNodeType)("TSType")}}});Vt("TSTypeParameterInstantiation",{visitor:["params"],fields:{params:(0,Oe.validateArrayOfType)("TSType")}});Vt("TSTypeParameterDeclaration",{visitor:["params"],fields:{params:(0,Oe.validateArrayOfType)("TSTypeParameter")}});Vt("TSTypeParameter",{builder:["constraint","default","name"],visitor:["constraint","default"],fields:{name:{validate:(0,Oe.assertValueType)("string")},in:{validate:(0,Oe.assertValueType)("boolean"),optional:!0},out:{validate:(0,Oe.assertValueType)("boolean"),optional:!0},const:{validate:(0,Oe.assertValueType)("boolean"),optional:!0},constraint:{validate:(0,Oe.assertNodeType)("TSType"),optional:!0},default:{validate:(0,Oe.assertNodeType)("TSType"),optional:!0}}})});var f9=ae(R1=>{"use strict";Object.defineProperty(R1,"__esModule",{value:!0});R1.DEPRECATED_ALIASES=void 0;var Bmt=R1.DEPRECATED_ALIASES={ModuleDeclaration:"ImportOrExportDeclaration"}});var bl=ae(fs=>{"use strict";Object.defineProperty(fs,"__esModule",{value:!0});Object.defineProperty(fs,"ALIAS_KEYS",{enumerable:!0,get:function(){return Is.ALIAS_KEYS}});Object.defineProperty(fs,"BUILDER_KEYS",{enumerable:!0,get:function(){return Is.BUILDER_KEYS}});Object.defineProperty(fs,"DEPRECATED_ALIASES",{enumerable:!0,get:function(){return hR.DEPRECATED_ALIASES}});Object.defineProperty(fs,"DEPRECATED_KEYS",{enumerable:!0,get:function(){return Is.DEPRECATED_KEYS}});Object.defineProperty(fs,"FLIPPED_ALIAS_KEYS",{enumerable:!0,get:function(){return Is.FLIPPED_ALIAS_KEYS}});Object.defineProperty(fs,"NODE_FIELDS",{enumerable:!0,get:function(){return Is.NODE_FIELDS}});Object.defineProperty(fs,"NODE_PARENT_VALIDATIONS",{enumerable:!0,get:function(){return Is.NODE_PARENT_VALIDATIONS}});Object.defineProperty(fs,"NODE_UNION_SHAPES__PRIVATE",{enumerable:!0,get:function(){return Is.NODE_UNION_SHAPES__PRIVATE}});Object.defineProperty(fs,"PLACEHOLDERS",{enumerable:!0,get:function(){return gR.PLACEHOLDERS}});Object.defineProperty(fs,"PLACEHOLDERS_ALIAS",{enumerable:!0,get:function(){return gR.PLACEHOLDERS_ALIAS}});Object.defineProperty(fs,"PLACEHOLDERS_FLIPPED_ALIAS",{enumerable:!0,get:function(){return gR.PLACEHOLDERS_FLIPPED_ALIAS}});fs.TYPES=void 0;Object.defineProperty(fs,"VISITOR_KEYS",{enumerable:!0,get:function(){return Is.VISITOR_KEYS}});N0();t9();r9();n9();a9();d9();var Is=Zc(),gR=fR(),hR=f9();Object.keys(hR.DEPRECATED_ALIASES).forEach(e=>{Is.FLIPPED_ALIAS_KEYS[e]=Is.FLIPPED_ALIAS_KEYS[hR.DEPRECATED_ALIASES[e]]});for(let{types:e,set:t}of Is.allExpandedTypes)for(let r of e){let n=Is.FLIPPED_ALIAS_KEYS[r];n?n.forEach(t.add,t):t.add(r)}var jmt=fs.TYPES=[].concat(Object.keys(Is.VISITOR_KEYS),Object.keys(Is.FLIPPED_ALIAS_KEYS),Object.keys(Is.DEPRECATED_KEYS))});var N1=ae(Ay=>{"use strict";Object.defineProperty(Ay,"__esModule",{value:!0});Ay.default=Awe;Ay.validateChild=m9;Ay.validateField=p9;Ay.validateInternal=Nwe;var k0=bl();function Awe(e,t,r){if(!e)return;let n=k0.NODE_FIELDS[e.type];if(!n)return;let a=n[t];p9(e,t,r,a),m9(e,t,r)}function Nwe(e,t,r,n,a){if(e!=null&&e.validate&&!(e.optional&&n==null)&&(e.validate(t,r,n),a)){var i;let s=n.type;if(s==null)return;(i=k0.NODE_PARENT_VALIDATIONS[s])==null||i.call(k0.NODE_PARENT_VALIDATIONS,t,r,n)}}function p9(e,t,r,n){n!=null&&n.validate&&(n.optional&&r==null||n.validate(e,t,r))}function m9(e,t,r){var n;let a=r?.type;a!=null&&((n=k0.NODE_PARENT_VALIDATIONS[a])==null||n.call(k0.NODE_PARENT_VALIDATIONS,e,t,r))}});var yR=ae(R=>{"use strict";Object.defineProperty(R,"__esModule",{value:!0});R.anyTypeAnnotation=c1e;R.argumentPlaceholder=BPe;R.arrayExpression=Rwe;R.arrayPattern=ACe;R.arrayTypeAnnotation=u1e;R.arrowFunctionExpression=NCe;R.assignmentExpression=Dwe;R.assignmentPattern=ICe;R.awaitExpression=JCe;R.bigIntLiteral=Lwe;R.binaryExpression=Mwe;R.bindExpression=$Pe;R.blockStatement=$we;R.booleanLiteral=iCe;R.booleanLiteralTypeAnnotation=f1e;R.booleanTypeAnnotation=d1e;R.breakStatement=jwe;R.callExpression=zwe;R.catchClause=Uwe;R.classAccessorProperty=n1e;R.classBody=kCe;R.classDeclaration=LCe;R.classExpression=_Ce;R.classImplements=m1e;R.classMethod=qCe;R.classPrivateMethod=i1e;R.classPrivateProperty=a1e;R.classProperty=r1e;R.conditionalExpression=Vwe;R.continueStatement=qwe;R.debuggerStatement=Hwe;R.decimalLiteral=HPe;R.declareClass=h1e;R.declareExportAllDeclaration=C1e;R.declareExportDeclaration=w1e;R.declareFunction=g1e;R.declareInterface=y1e;R.declareModule=x1e;R.declareModuleExports=b1e;R.declareOpaqueType=S1e;R.declareTypeAlias=v1e;R.declareVariable=T1e;R.declaredPredicate=P1e;R.decorator=jPe;R.directive=Fwe;R.directiveLiteral=Bwe;R.doExpression=zPe;R.doWhileStatement=Gwe;R.emptyStatement=Kwe;R.emptyTypeAnnotation=O1e;R.enumBooleanBody=uPe;R.enumBooleanMember=mPe;R.enumDeclaration=cPe;R.enumDefaultedMember=yPe;R.enumNumberBody=dPe;R.enumNumberMember=hPe;R.enumStringBody=fPe;R.enumStringMember=gPe;R.enumSymbolBody=pPe;R.existsTypeAnnotation=E1e;R.exportAllDeclaration=RCe;R.exportDefaultDeclaration=DCe;R.exportDefaultSpecifier=UPe;R.exportNamedDeclaration=MCe;R.exportNamespaceSpecifier=QCe;R.exportSpecifier=OCe;R.expressionStatement=Wwe;R.file=Xwe;R.forInStatement=Ywe;R.forOfStatement=FCe;R.forStatement=Jwe;R.functionDeclaration=Zwe;R.functionExpression=Qwe;R.functionTypeAnnotation=I1e;R.functionTypeParam=A1e;R.genericTypeAnnotation=N1e;R.identifier=eCe;R.ifStatement=tCe;R.import=ZCe;R.importAttribute=l1e;R.importDeclaration=BCe;R.importDefaultSpecifier=$Ce;R.importExpression=UCe;R.importNamespaceSpecifier=jCe;R.importSpecifier=zCe;R.indexedAccessType=xPe;R.inferredPredicate=k1e;R.interfaceDeclaration=L1e;R.interfaceExtends=_1e;R.interfaceTypeAnnotation=R1e;R.interpreterDirective=Owe;R.intersectionTypeAnnotation=D1e;R.jSXAttribute=R.jsxAttribute=vPe;R.jSXClosingElement=R.jsxClosingElement=SPe;R.jSXClosingFragment=R.jsxClosingFragment=DPe;R.jSXElement=R.jsxElement=TPe;R.jSXEmptyExpression=R.jsxEmptyExpression=wPe;R.jSXExpressionContainer=R.jsxExpressionContainer=CPe;R.jSXFragment=R.jsxFragment=LPe;R.jSXIdentifier=R.jsxIdentifier=EPe;R.jSXMemberExpression=R.jsxMemberExpression=IPe;R.jSXNamespacedName=R.jsxNamespacedName=APe;R.jSXOpeningElement=R.jsxOpeningElement=NPe;R.jSXOpeningFragment=R.jsxOpeningFragment=RPe;R.jSXSpreadAttribute=R.jsxSpreadAttribute=kPe;R.jSXSpreadChild=R.jsxSpreadChild=PPe;R.jSXText=R.jsxText=_Pe;R.labeledStatement=rCe;R.logicalExpression=sCe;R.memberExpression=oCe;R.metaProperty=VCe;R.mixedTypeAnnotation=M1e;R.moduleExpression=GPe;R.newExpression=lCe;R.noop=MPe;R.nullLiteral=aCe;R.nullLiteralTypeAnnotation=p1e;R.nullableTypeAnnotation=F1e;R.numberLiteral=dIe;R.numberLiteralTypeAnnotation=B1e;R.numberTypeAnnotation=$1e;R.numericLiteral=h9;R.objectExpression=uCe;R.objectMethod=dCe;R.objectPattern=HCe;R.objectProperty=fCe;R.objectTypeAnnotation=j1e;R.objectTypeCallProperty=U1e;R.objectTypeIndexer=V1e;R.objectTypeInternalSlot=z1e;R.objectTypeProperty=q1e;R.objectTypeSpreadProperty=H1e;R.opaqueType=G1e;R.optionalCallExpression=t1e;R.optionalIndexedAccessType=bPe;R.optionalMemberExpression=e1e;R.parenthesizedExpression=hCe;R.pipelineBareFunction=XPe;R.pipelinePrimaryTopicReference=YPe;R.pipelineTopicExpression=WPe;R.placeholder=OPe;R.privateName=s1e;R.program=cCe;R.qualifiedTypeIdentifier=K1e;R.recordExpression=VPe;R.regExpLiteral=g9;R.regexLiteral=fIe;R.restElement=y9;R.restProperty=pIe;R.returnStatement=pCe;R.sequenceExpression=mCe;R.spreadElement=x9;R.spreadProperty=mIe;R.staticBlock=o1e;R.stringLiteral=nCe;R.stringLiteralTypeAnnotation=W1e;R.stringTypeAnnotation=X1e;R.super=GCe;R.switchCase=gCe;R.switchStatement=yCe;R.symbolTypeAnnotation=Y1e;R.taggedTemplateExpression=KCe;R.templateElement=WCe;R.templateLiteral=XCe;R.thisExpression=xCe;R.thisTypeAnnotation=J1e;R.throwStatement=bCe;R.topicReference=KPe;R.tryStatement=vCe;R.tSAnyKeyword=R.tsAnyKeyword=oEe;R.tSArrayType=R.tsArrayType=IEe;R.tSAsExpression=R.tsAsExpression=KEe;R.tSBigIntKeyword=R.tsBigIntKeyword=cEe;R.tSBooleanKeyword=R.tsBooleanKeyword=lEe;R.tSCallSignatureDeclaration=R.tsCallSignatureDeclaration=rEe;R.tSConditionalType=R.tsConditionalType=DEe;R.tSConstructSignatureDeclaration=R.tsConstructSignatureDeclaration=nEe;R.tSConstructorType=R.tsConstructorType=TEe;R.tSDeclareFunction=R.tsDeclareFunction=QPe;R.tSDeclareMethod=R.tsDeclareMethod=eEe;R.tSEnumBody=R.tsEnumBody=YEe;R.tSEnumDeclaration=R.tsEnumDeclaration=JEe;R.tSEnumMember=R.tsEnumMember=ZEe;R.tSExportAssignment=R.tsExportAssignment=iIe;R.tSExpressionWithTypeArguments=R.tsExpressionWithTypeArguments=UEe;R.tSExternalModuleReference=R.tsExternalModuleReference=nIe;R.tSFunctionType=R.tsFunctionType=SEe;R.tSImportEqualsDeclaration=R.tsImportEqualsDeclaration=rIe;R.tSImportType=R.tsImportType=tIe;R.tSIndexSignature=R.tsIndexSignature=sEe;R.tSIndexedAccessType=R.tsIndexedAccessType=BEe;R.tSInferType=R.tsInferType=MEe;R.tSInstantiationExpression=R.tsInstantiationExpression=GEe;R.tSInterfaceBody=R.tsInterfaceBody=qEe;R.tSInterfaceDeclaration=R.tsInterfaceDeclaration=VEe;R.tSIntersectionType=R.tsIntersectionType=REe;R.tSIntrinsicKeyword=R.tsIntrinsicKeyword=uEe;R.tSLiteralType=R.tsLiteralType=zEe;R.tSMappedType=R.tsMappedType=$Ee;R.tSMethodSignature=R.tsMethodSignature=iEe;R.tSModuleBlock=R.tsModuleBlock=eIe;R.tSModuleDeclaration=R.tsModuleDeclaration=QEe;R.tSNamedTupleMember=R.tsNamedTupleMember=_Ee;R.tSNamespaceExportDeclaration=R.tsNamespaceExportDeclaration=sIe;R.tSNeverKeyword=R.tsNeverKeyword=dEe;R.tSNonNullExpression=R.tsNonNullExpression=aIe;R.tSNullKeyword=R.tsNullKeyword=fEe;R.tSNumberKeyword=R.tsNumberKeyword=pEe;R.tSObjectKeyword=R.tsObjectKeyword=mEe;R.tSOptionalType=R.tsOptionalType=NEe;R.tSParameterProperty=R.tsParameterProperty=ZPe;R.tSParenthesizedType=R.tsParenthesizedType=OEe;R.tSPropertySignature=R.tsPropertySignature=aEe;R.tSQualifiedName=R.tsQualifiedName=tEe;R.tSRestType=R.tsRestType=kEe;R.tSSatisfiesExpression=R.tsSatisfiesExpression=WEe;R.tSStringKeyword=R.tsStringKeyword=hEe;R.tSSymbolKeyword=R.tsSymbolKeyword=gEe;R.tSTemplateLiteralType=R.tsTemplateLiteralType=jEe;R.tSThisType=R.tsThisType=vEe;R.tSTupleType=R.tsTupleType=AEe;R.tSTypeAliasDeclaration=R.tsTypeAliasDeclaration=HEe;R.tSTypeAnnotation=R.tsTypeAnnotation=oIe;R.tSTypeAssertion=R.tsTypeAssertion=XEe;R.tSTypeLiteral=R.tsTypeLiteral=EEe;R.tSTypeOperator=R.tsTypeOperator=FEe;R.tSTypeParameter=R.tsTypeParameter=uIe;R.tSTypeParameterDeclaration=R.tsTypeParameterDeclaration=cIe;R.tSTypeParameterInstantiation=R.tsTypeParameterInstantiation=lIe;R.tSTypePredicate=R.tsTypePredicate=CEe;R.tSTypeQuery=R.tsTypeQuery=PEe;R.tSTypeReference=R.tsTypeReference=wEe;R.tSUndefinedKeyword=R.tsUndefinedKeyword=yEe;R.tSUnionType=R.tsUnionType=LEe;R.tSUnknownKeyword=R.tsUnknownKeyword=xEe;R.tSVoidKeyword=R.tsVoidKeyword=bEe;R.tupleExpression=qPe;R.tupleTypeAnnotation=Z1e;R.typeAlias=ePe;R.typeAnnotation=tPe;R.typeCastExpression=rPe;R.typeParameter=nPe;R.typeParameterDeclaration=aPe;R.typeParameterInstantiation=iPe;R.typeofTypeAnnotation=Q1e;R.unaryExpression=SCe;R.unionTypeAnnotation=sPe;R.updateExpression=TCe;R.v8IntrinsicIdentifier=FPe;R.variableDeclaration=wCe;R.variableDeclarator=CCe;R.variance=oPe;R.voidPattern=JPe;R.voidTypeAnnotation=lPe;R.whileStatement=PCe;R.withStatement=ECe;R.yieldExpression=YCe;var kwe=N1(),D1=Sy(),_we=Zc(),{validateInternal:P}=kwe,{NODE_FIELDS:te}=_we;function Lwe(e){typeof e=="bigint"&&(e=e.toString());let t={type:"BigIntLiteral",value:e},r=te.BigIntLiteral;return P(r.value,t,"value",e),t}function Rwe(e=[]){let t={type:"ArrayExpression",elements:e},r=te.ArrayExpression;return P(r.elements,t,"elements",e,1),t}function Dwe(e,t,r){let n={type:"AssignmentExpression",operator:e,left:t,right:r},a=te.AssignmentExpression;return P(a.operator,n,"operator",e),P(a.left,n,"left",t,1),P(a.right,n,"right",r,1),n}function Mwe(e,t,r){let n={type:"BinaryExpression",operator:e,left:t,right:r},a=te.BinaryExpression;return P(a.operator,n,"operator",e),P(a.left,n,"left",t,1),P(a.right,n,"right",r,1),n}function Owe(e){let t={type:"InterpreterDirective",value:e},r=te.InterpreterDirective;return P(r.value,t,"value",e),t}function Fwe(e){let t={type:"Directive",value:e},r=te.Directive;return P(r.value,t,"value",e,1),t}function Bwe(e){let t={type:"DirectiveLiteral",value:e},r=te.DirectiveLiteral;return P(r.value,t,"value",e),t}function $we(e,t=[]){let r={type:"BlockStatement",body:e,directives:t},n=te.BlockStatement;return P(n.body,r,"body",e,1),P(n.directives,r,"directives",t,1),r}function jwe(e=null){let t={type:"BreakStatement",label:e},r=te.BreakStatement;return P(r.label,t,"label",e,1),t}function zwe(e,t){let r={type:"CallExpression",callee:e,arguments:t},n=te.CallExpression;return P(n.callee,r,"callee",e,1),P(n.arguments,r,"arguments",t,1),r}function Uwe(e=null,t){let r={type:"CatchClause",param:e,body:t},n=te.CatchClause;return P(n.param,r,"param",e,1),P(n.body,r,"body",t,1),r}function Vwe(e,t,r){let n={type:"ConditionalExpression",test:e,consequent:t,alternate:r},a=te.ConditionalExpression;return P(a.test,n,"test",e,1),P(a.consequent,n,"consequent",t,1),P(a.alternate,n,"alternate",r,1),n}function qwe(e=null){let t={type:"ContinueStatement",label:e},r=te.ContinueStatement;return P(r.label,t,"label",e,1),t}function Hwe(){return{type:"DebuggerStatement"}}function Gwe(e,t){let r={type:"DoWhileStatement",test:e,body:t},n=te.DoWhileStatement;return P(n.test,r,"test",e,1),P(n.body,r,"body",t,1),r}function Kwe(){return{type:"EmptyStatement"}}function Wwe(e){let t={type:"ExpressionStatement",expression:e},r=te.ExpressionStatement;return P(r.expression,t,"expression",e,1),t}function Xwe(e,t=null,r=null){let n={type:"File",program:e,comments:t,tokens:r},a=te.File;return P(a.program,n,"program",e,1),P(a.comments,n,"comments",t,1),P(a.tokens,n,"tokens",r),n}function Ywe(e,t,r){let n={type:"ForInStatement",left:e,right:t,body:r},a=te.ForInStatement;return P(a.left,n,"left",e,1),P(a.right,n,"right",t,1),P(a.body,n,"body",r,1),n}function Jwe(e=null,t=null,r=null,n){let a={type:"ForStatement",init:e,test:t,update:r,body:n},i=te.ForStatement;return P(i.init,a,"init",e,1),P(i.test,a,"test",t,1),P(i.update,a,"update",r,1),P(i.body,a,"body",n,1),a}function Zwe(e=null,t,r,n=!1,a=!1){let i={type:"FunctionDeclaration",id:e,params:t,body:r,generator:n,async:a},s=te.FunctionDeclaration;return P(s.id,i,"id",e,1),P(s.params,i,"params",t,1),P(s.body,i,"body",r,1),P(s.generator,i,"generator",n),P(s.async,i,"async",a),i}function Qwe(e=null,t,r,n=!1,a=!1){let i={type:"FunctionExpression",id:e,params:t,body:r,generator:n,async:a},s=te.FunctionExpression;return P(s.id,i,"id",e,1),P(s.params,i,"params",t,1),P(s.body,i,"body",r,1),P(s.generator,i,"generator",n),P(s.async,i,"async",a),i}function eCe(e){let t={type:"Identifier",name:e},r=te.Identifier;return P(r.name,t,"name",e),t}function tCe(e,t,r=null){let n={type:"IfStatement",test:e,consequent:t,alternate:r},a=te.IfStatement;return P(a.test,n,"test",e,1),P(a.consequent,n,"consequent",t,1),P(a.alternate,n,"alternate",r,1),n}function rCe(e,t){let r={type:"LabeledStatement",label:e,body:t},n=te.LabeledStatement;return P(n.label,r,"label",e,1),P(n.body,r,"body",t,1),r}function nCe(e){let t={type:"StringLiteral",value:e},r=te.StringLiteral;return P(r.value,t,"value",e),t}function h9(e){let t={type:"NumericLiteral",value:e},r=te.NumericLiteral;return P(r.value,t,"value",e),t}function aCe(){return{type:"NullLiteral"}}function iCe(e){let t={type:"BooleanLiteral",value:e},r=te.BooleanLiteral;return P(r.value,t,"value",e),t}function g9(e,t=""){let r={type:"RegExpLiteral",pattern:e,flags:t},n=te.RegExpLiteral;return P(n.pattern,r,"pattern",e),P(n.flags,r,"flags",t),r}function sCe(e,t,r){let n={type:"LogicalExpression",operator:e,left:t,right:r},a=te.LogicalExpression;return P(a.operator,n,"operator",e),P(a.left,n,"left",t,1),P(a.right,n,"right",r,1),n}function oCe(e,t,r=!1,n=null){let a={type:"MemberExpression",object:e,property:t,computed:r,optional:n},i=te.MemberExpression;return P(i.object,a,"object",e,1),P(i.property,a,"property",t,1),P(i.computed,a,"computed",r),P(i.optional,a,"optional",n),a}function lCe(e,t){let r={type:"NewExpression",callee:e,arguments:t},n=te.NewExpression;return P(n.callee,r,"callee",e,1),P(n.arguments,r,"arguments",t,1),r}function cCe(e,t=[],r="script",n=null){let a={type:"Program",body:e,directives:t,sourceType:r,interpreter:n},i=te.Program;return P(i.body,a,"body",e,1),P(i.directives,a,"directives",t,1),P(i.sourceType,a,"sourceType",r),P(i.interpreter,a,"interpreter",n,1),a}function uCe(e){let t={type:"ObjectExpression",properties:e},r=te.ObjectExpression;return P(r.properties,t,"properties",e,1),t}function dCe(e="method",t,r,n,a=!1,i=!1,s=!1){let o={type:"ObjectMethod",kind:e,key:t,params:r,body:n,computed:a,generator:i,async:s},l=te.ObjectMethod;return P(l.kind,o,"kind",e),P(l.key,o,"key",t,1),P(l.params,o,"params",r,1),P(l.body,o,"body",n,1),P(l.computed,o,"computed",a),P(l.generator,o,"generator",i),P(l.async,o,"async",s),o}function fCe(e,t,r=!1,n=!1,a=null){let i={type:"ObjectProperty",key:e,value:t,computed:r,shorthand:n,decorators:a},s=te.ObjectProperty;return P(s.key,i,"key",e,1),P(s.value,i,"value",t,1),P(s.computed,i,"computed",r),P(s.shorthand,i,"shorthand",n),P(s.decorators,i,"decorators",a,1),i}function y9(e){let t={type:"RestElement",argument:e},r=te.RestElement;return P(r.argument,t,"argument",e,1),t}function pCe(e=null){let t={type:"ReturnStatement",argument:e},r=te.ReturnStatement;return P(r.argument,t,"argument",e,1),t}function mCe(e){let t={type:"SequenceExpression",expressions:e},r=te.SequenceExpression;return P(r.expressions,t,"expressions",e,1),t}function hCe(e){let t={type:"ParenthesizedExpression",expression:e},r=te.ParenthesizedExpression;return P(r.expression,t,"expression",e,1),t}function gCe(e=null,t){let r={type:"SwitchCase",test:e,consequent:t},n=te.SwitchCase;return P(n.test,r,"test",e,1),P(n.consequent,r,"consequent",t,1),r}function yCe(e,t){let r={type:"SwitchStatement",discriminant:e,cases:t},n=te.SwitchStatement;return P(n.discriminant,r,"discriminant",e,1),P(n.cases,r,"cases",t,1),r}function xCe(){return{type:"ThisExpression"}}function bCe(e){let t={type:"ThrowStatement",argument:e},r=te.ThrowStatement;return P(r.argument,t,"argument",e,1),t}function vCe(e,t=null,r=null){let n={type:"TryStatement",block:e,handler:t,finalizer:r},a=te.TryStatement;return P(a.block,n,"block",e,1),P(a.handler,n,"handler",t,1),P(a.finalizer,n,"finalizer",r,1),n}function SCe(e,t,r=!0){let n={type:"UnaryExpression",operator:e,argument:t,prefix:r},a=te.UnaryExpression;return P(a.operator,n,"operator",e),P(a.argument,n,"argument",t,1),P(a.prefix,n,"prefix",r),n}function TCe(e,t,r=!1){let n={type:"UpdateExpression",operator:e,argument:t,prefix:r},a=te.UpdateExpression;return P(a.operator,n,"operator",e),P(a.argument,n,"argument",t,1),P(a.prefix,n,"prefix",r),n}function wCe(e,t){let r={type:"VariableDeclaration",kind:e,declarations:t},n=te.VariableDeclaration;return P(n.kind,r,"kind",e),P(n.declarations,r,"declarations",t,1),r}function CCe(e,t=null){let r={type:"VariableDeclarator",id:e,init:t},n=te.VariableDeclarator;return P(n.id,r,"id",e,1),P(n.init,r,"init",t,1),r}function PCe(e,t){let r={type:"WhileStatement",test:e,body:t},n=te.WhileStatement;return P(n.test,r,"test",e,1),P(n.body,r,"body",t,1),r}function ECe(e,t){let r={type:"WithStatement",object:e,body:t},n=te.WithStatement;return P(n.object,r,"object",e,1),P(n.body,r,"body",t,1),r}function ICe(e,t){let r={type:"AssignmentPattern",left:e,right:t},n=te.AssignmentPattern;return P(n.left,r,"left",e,1),P(n.right,r,"right",t,1),r}function ACe(e){let t={type:"ArrayPattern",elements:e},r=te.ArrayPattern;return P(r.elements,t,"elements",e,1),t}function NCe(e,t,r=!1){let n={type:"ArrowFunctionExpression",params:e,body:t,async:r,expression:null},a=te.ArrowFunctionExpression;return P(a.params,n,"params",e,1),P(a.body,n,"body",t,1),P(a.async,n,"async",r),n}function kCe(e){let t={type:"ClassBody",body:e},r=te.ClassBody;return P(r.body,t,"body",e,1),t}function _Ce(e=null,t=null,r,n=null){let a={type:"ClassExpression",id:e,superClass:t,body:r,decorators:n},i=te.ClassExpression;return P(i.id,a,"id",e,1),P(i.superClass,a,"superClass",t,1),P(i.body,a,"body",r,1),P(i.decorators,a,"decorators",n,1),a}function LCe(e=null,t=null,r,n=null){let a={type:"ClassDeclaration",id:e,superClass:t,body:r,decorators:n},i=te.ClassDeclaration;return P(i.id,a,"id",e,1),P(i.superClass,a,"superClass",t,1),P(i.body,a,"body",r,1),P(i.decorators,a,"decorators",n,1),a}function RCe(e){let t={type:"ExportAllDeclaration",source:e},r=te.ExportAllDeclaration;return P(r.source,t,"source",e,1),t}function DCe(e){let t={type:"ExportDefaultDeclaration",declaration:e},r=te.ExportDefaultDeclaration;return P(r.declaration,t,"declaration",e,1),t}function MCe(e=null,t=[],r=null){let n={type:"ExportNamedDeclaration",declaration:e,specifiers:t,source:r},a=te.ExportNamedDeclaration;return P(a.declaration,n,"declaration",e,1),P(a.specifiers,n,"specifiers",t,1),P(a.source,n,"source",r,1),n}function OCe(e,t){let r={type:"ExportSpecifier",local:e,exported:t},n=te.ExportSpecifier;return P(n.local,r,"local",e,1),P(n.exported,r,"exported",t,1),r}function FCe(e,t,r,n=!1){let a={type:"ForOfStatement",left:e,right:t,body:r,await:n},i=te.ForOfStatement;return P(i.left,a,"left",e,1),P(i.right,a,"right",t,1),P(i.body,a,"body",r,1),P(i.await,a,"await",n),a}function BCe(e,t){let r={type:"ImportDeclaration",specifiers:e,source:t},n=te.ImportDeclaration;return P(n.specifiers,r,"specifiers",e,1),P(n.source,r,"source",t,1),r}function $Ce(e){let t={type:"ImportDefaultSpecifier",local:e},r=te.ImportDefaultSpecifier;return P(r.local,t,"local",e,1),t}function jCe(e){let t={type:"ImportNamespaceSpecifier",local:e},r=te.ImportNamespaceSpecifier;return P(r.local,t,"local",e,1),t}function zCe(e,t){let r={type:"ImportSpecifier",local:e,imported:t},n=te.ImportSpecifier;return P(n.local,r,"local",e,1),P(n.imported,r,"imported",t,1),r}function UCe(e,t=null){let r={type:"ImportExpression",source:e,options:t},n=te.ImportExpression;return P(n.source,r,"source",e,1),P(n.options,r,"options",t,1),r}function VCe(e,t){let r={type:"MetaProperty",meta:e,property:t},n=te.MetaProperty;return P(n.meta,r,"meta",e,1),P(n.property,r,"property",t,1),r}function qCe(e="method",t,r,n,a=!1,i=!1,s=!1,o=!1){let l={type:"ClassMethod",kind:e,key:t,params:r,body:n,computed:a,static:i,generator:s,async:o},c=te.ClassMethod;return P(c.kind,l,"kind",e),P(c.key,l,"key",t,1),P(c.params,l,"params",r,1),P(c.body,l,"body",n,1),P(c.computed,l,"computed",a),P(c.static,l,"static",i),P(c.generator,l,"generator",s),P(c.async,l,"async",o),l}function HCe(e){let t={type:"ObjectPattern",properties:e},r=te.ObjectPattern;return P(r.properties,t,"properties",e,1),t}function x9(e){let t={type:"SpreadElement",argument:e},r=te.SpreadElement;return P(r.argument,t,"argument",e,1),t}function GCe(){return{type:"Super"}}function KCe(e,t){let r={type:"TaggedTemplateExpression",tag:e,quasi:t},n=te.TaggedTemplateExpression;return P(n.tag,r,"tag",e,1),P(n.quasi,r,"quasi",t,1),r}function WCe(e,t=!1){let r={type:"TemplateElement",value:e,tail:t},n=te.TemplateElement;return P(n.value,r,"value",e),P(n.tail,r,"tail",t),r}function XCe(e,t){let r={type:"TemplateLiteral",quasis:e,expressions:t},n=te.TemplateLiteral;return P(n.quasis,r,"quasis",e,1),P(n.expressions,r,"expressions",t,1),r}function YCe(e=null,t=!1){let r={type:"YieldExpression",argument:e,delegate:t},n=te.YieldExpression;return P(n.argument,r,"argument",e,1),P(n.delegate,r,"delegate",t),r}function JCe(e){let t={type:"AwaitExpression",argument:e},r=te.AwaitExpression;return P(r.argument,t,"argument",e,1),t}function ZCe(){return{type:"Import"}}function QCe(e){let t={type:"ExportNamespaceSpecifier",exported:e},r=te.ExportNamespaceSpecifier;return P(r.exported,t,"exported",e,1),t}function e1e(e,t,r=!1,n){let a={type:"OptionalMemberExpression",object:e,property:t,computed:r,optional:n},i=te.OptionalMemberExpression;return P(i.object,a,"object",e,1),P(i.property,a,"property",t,1),P(i.computed,a,"computed",r),P(i.optional,a,"optional",n),a}function t1e(e,t,r){let n={type:"OptionalCallExpression",callee:e,arguments:t,optional:r},a=te.OptionalCallExpression;return P(a.callee,n,"callee",e,1),P(a.arguments,n,"arguments",t,1),P(a.optional,n,"optional",r),n}function r1e(e,t=null,r=null,n=null,a=!1,i=!1){let s={type:"ClassProperty",key:e,value:t,typeAnnotation:r,decorators:n,computed:a,static:i},o=te.ClassProperty;return P(o.key,s,"key",e,1),P(o.value,s,"value",t,1),P(o.typeAnnotation,s,"typeAnnotation",r,1),P(o.decorators,s,"decorators",n,1),P(o.computed,s,"computed",a),P(o.static,s,"static",i),s}function n1e(e,t=null,r=null,n=null,a=!1,i=!1){let s={type:"ClassAccessorProperty",key:e,value:t,typeAnnotation:r,decorators:n,computed:a,static:i},o=te.ClassAccessorProperty;return P(o.key,s,"key",e,1),P(o.value,s,"value",t,1),P(o.typeAnnotation,s,"typeAnnotation",r,1),P(o.decorators,s,"decorators",n,1),P(o.computed,s,"computed",a),P(o.static,s,"static",i),s}function a1e(e,t=null,r=null,n=!1){let a={type:"ClassPrivateProperty",key:e,value:t,decorators:r,static:n},i=te.ClassPrivateProperty;return P(i.key,a,"key",e,1),P(i.value,a,"value",t,1),P(i.decorators,a,"decorators",r,1),P(i.static,a,"static",n),a}function i1e(e="method",t,r,n,a=!1){let i={type:"ClassPrivateMethod",kind:e,key:t,params:r,body:n,static:a},s=te.ClassPrivateMethod;return P(s.kind,i,"kind",e),P(s.key,i,"key",t,1),P(s.params,i,"params",r,1),P(s.body,i,"body",n,1),P(s.static,i,"static",a),i}function s1e(e){let t={type:"PrivateName",id:e},r=te.PrivateName;return P(r.id,t,"id",e,1),t}function o1e(e){let t={type:"StaticBlock",body:e},r=te.StaticBlock;return P(r.body,t,"body",e,1),t}function l1e(e,t){let r={type:"ImportAttribute",key:e,value:t},n=te.ImportAttribute;return P(n.key,r,"key",e,1),P(n.value,r,"value",t,1),r}function c1e(){return{type:"AnyTypeAnnotation"}}function u1e(e){let t={type:"ArrayTypeAnnotation",elementType:e},r=te.ArrayTypeAnnotation;return P(r.elementType,t,"elementType",e,1),t}function d1e(){return{type:"BooleanTypeAnnotation"}}function f1e(e){let t={type:"BooleanLiteralTypeAnnotation",value:e},r=te.BooleanLiteralTypeAnnotation;return P(r.value,t,"value",e),t}function p1e(){return{type:"NullLiteralTypeAnnotation"}}function m1e(e,t=null){let r={type:"ClassImplements",id:e,typeParameters:t},n=te.ClassImplements;return P(n.id,r,"id",e,1),P(n.typeParameters,r,"typeParameters",t,1),r}function h1e(e,t=null,r=null,n){let a={type:"DeclareClass",id:e,typeParameters:t,extends:r,body:n},i=te.DeclareClass;return P(i.id,a,"id",e,1),P(i.typeParameters,a,"typeParameters",t,1),P(i.extends,a,"extends",r,1),P(i.body,a,"body",n,1),a}function g1e(e){let t={type:"DeclareFunction",id:e},r=te.DeclareFunction;return P(r.id,t,"id",e,1),t}function y1e(e,t=null,r=null,n){let a={type:"DeclareInterface",id:e,typeParameters:t,extends:r,body:n},i=te.DeclareInterface;return P(i.id,a,"id",e,1),P(i.typeParameters,a,"typeParameters",t,1),P(i.extends,a,"extends",r,1),P(i.body,a,"body",n,1),a}function x1e(e,t,r=null){let n={type:"DeclareModule",id:e,body:t,kind:r},a=te.DeclareModule;return P(a.id,n,"id",e,1),P(a.body,n,"body",t,1),P(a.kind,n,"kind",r),n}function b1e(e){let t={type:"DeclareModuleExports",typeAnnotation:e},r=te.DeclareModuleExports;return P(r.typeAnnotation,t,"typeAnnotation",e,1),t}function v1e(e,t=null,r){let n={type:"DeclareTypeAlias",id:e,typeParameters:t,right:r},a=te.DeclareTypeAlias;return P(a.id,n,"id",e,1),P(a.typeParameters,n,"typeParameters",t,1),P(a.right,n,"right",r,1),n}function S1e(e,t=null,r=null){let n={type:"DeclareOpaqueType",id:e,typeParameters:t,supertype:r},a=te.DeclareOpaqueType;return P(a.id,n,"id",e,1),P(a.typeParameters,n,"typeParameters",t,1),P(a.supertype,n,"supertype",r,1),n}function T1e(e){let t={type:"DeclareVariable",id:e},r=te.DeclareVariable;return P(r.id,t,"id",e,1),t}function w1e(e=null,t=null,r=null,n=null){let a={type:"DeclareExportDeclaration",declaration:e,specifiers:t,source:r,attributes:n},i=te.DeclareExportDeclaration;return P(i.declaration,a,"declaration",e,1),P(i.specifiers,a,"specifiers",t,1),P(i.source,a,"source",r,1),P(i.attributes,a,"attributes",n,1),a}function C1e(e,t=null){let r={type:"DeclareExportAllDeclaration",source:e,attributes:t},n=te.DeclareExportAllDeclaration;return P(n.source,r,"source",e,1),P(n.attributes,r,"attributes",t,1),r}function P1e(e){let t={type:"DeclaredPredicate",value:e},r=te.DeclaredPredicate;return P(r.value,t,"value",e,1),t}function E1e(){return{type:"ExistsTypeAnnotation"}}function I1e(e=null,t,r=null,n){let a={type:"FunctionTypeAnnotation",typeParameters:e,params:t,rest:r,returnType:n},i=te.FunctionTypeAnnotation;return P(i.typeParameters,a,"typeParameters",e,1),P(i.params,a,"params",t,1),P(i.rest,a,"rest",r,1),P(i.returnType,a,"returnType",n,1),a}function A1e(e=null,t){let r={type:"FunctionTypeParam",name:e,typeAnnotation:t},n=te.FunctionTypeParam;return P(n.name,r,"name",e,1),P(n.typeAnnotation,r,"typeAnnotation",t,1),r}function N1e(e,t=null){let r={type:"GenericTypeAnnotation",id:e,typeParameters:t},n=te.GenericTypeAnnotation;return P(n.id,r,"id",e,1),P(n.typeParameters,r,"typeParameters",t,1),r}function k1e(){return{type:"InferredPredicate"}}function _1e(e,t=null){let r={type:"InterfaceExtends",id:e,typeParameters:t},n=te.InterfaceExtends;return P(n.id,r,"id",e,1),P(n.typeParameters,r,"typeParameters",t,1),r}function L1e(e,t=null,r=null,n){let a={type:"InterfaceDeclaration",id:e,typeParameters:t,extends:r,body:n},i=te.InterfaceDeclaration;return P(i.id,a,"id",e,1),P(i.typeParameters,a,"typeParameters",t,1),P(i.extends,a,"extends",r,1),P(i.body,a,"body",n,1),a}function R1e(e=null,t){let r={type:"InterfaceTypeAnnotation",extends:e,body:t},n=te.InterfaceTypeAnnotation;return P(n.extends,r,"extends",e,1),P(n.body,r,"body",t,1),r}function D1e(e){let t={type:"IntersectionTypeAnnotation",types:e},r=te.IntersectionTypeAnnotation;return P(r.types,t,"types",e,1),t}function M1e(){return{type:"MixedTypeAnnotation"}}function O1e(){return{type:"EmptyTypeAnnotation"}}function F1e(e){let t={type:"NullableTypeAnnotation",typeAnnotation:e},r=te.NullableTypeAnnotation;return P(r.typeAnnotation,t,"typeAnnotation",e,1),t}function B1e(e){let t={type:"NumberLiteralTypeAnnotation",value:e},r=te.NumberLiteralTypeAnnotation;return P(r.value,t,"value",e),t}function $1e(){return{type:"NumberTypeAnnotation"}}function j1e(e,t=[],r=[],n=[],a=!1){let i={type:"ObjectTypeAnnotation",properties:e,indexers:t,callProperties:r,internalSlots:n,exact:a},s=te.ObjectTypeAnnotation;return P(s.properties,i,"properties",e,1),P(s.indexers,i,"indexers",t,1),P(s.callProperties,i,"callProperties",r,1),P(s.internalSlots,i,"internalSlots",n,1),P(s.exact,i,"exact",a),i}function z1e(e,t,r,n,a){let i={type:"ObjectTypeInternalSlot",id:e,value:t,optional:r,static:n,method:a},s=te.ObjectTypeInternalSlot;return P(s.id,i,"id",e,1),P(s.value,i,"value",t,1),P(s.optional,i,"optional",r),P(s.static,i,"static",n),P(s.method,i,"method",a),i}function U1e(e){let t={type:"ObjectTypeCallProperty",value:e,static:null},r=te.ObjectTypeCallProperty;return P(r.value,t,"value",e,1),t}function V1e(e=null,t,r,n=null){let a={type:"ObjectTypeIndexer",id:e,key:t,value:r,variance:n,static:null},i=te.ObjectTypeIndexer;return P(i.id,a,"id",e,1),P(i.key,a,"key",t,1),P(i.value,a,"value",r,1),P(i.variance,a,"variance",n,1),a}function q1e(e,t,r=null){let n={type:"ObjectTypeProperty",key:e,value:t,variance:r,kind:null,method:null,optional:null,proto:null,static:null},a=te.ObjectTypeProperty;return P(a.key,n,"key",e,1),P(a.value,n,"value",t,1),P(a.variance,n,"variance",r,1),n}function H1e(e){let t={type:"ObjectTypeSpreadProperty",argument:e},r=te.ObjectTypeSpreadProperty;return P(r.argument,t,"argument",e,1),t}function G1e(e,t=null,r=null,n){let a={type:"OpaqueType",id:e,typeParameters:t,supertype:r,impltype:n},i=te.OpaqueType;return P(i.id,a,"id",e,1),P(i.typeParameters,a,"typeParameters",t,1),P(i.supertype,a,"supertype",r,1),P(i.impltype,a,"impltype",n,1),a}function K1e(e,t){let r={type:"QualifiedTypeIdentifier",id:e,qualification:t},n=te.QualifiedTypeIdentifier;return P(n.id,r,"id",e,1),P(n.qualification,r,"qualification",t,1),r}function W1e(e){let t={type:"StringLiteralTypeAnnotation",value:e},r=te.StringLiteralTypeAnnotation;return P(r.value,t,"value",e),t}function X1e(){return{type:"StringTypeAnnotation"}}function Y1e(){return{type:"SymbolTypeAnnotation"}}function J1e(){return{type:"ThisTypeAnnotation"}}function Z1e(e){let t={type:"TupleTypeAnnotation",types:e},r=te.TupleTypeAnnotation;return P(r.types,t,"types",e,1),t}function Q1e(e){let t={type:"TypeofTypeAnnotation",argument:e},r=te.TypeofTypeAnnotation;return P(r.argument,t,"argument",e,1),t}function ePe(e,t=null,r){let n={type:"TypeAlias",id:e,typeParameters:t,right:r},a=te.TypeAlias;return P(a.id,n,"id",e,1),P(a.typeParameters,n,"typeParameters",t,1),P(a.right,n,"right",r,1),n}function tPe(e){let t={type:"TypeAnnotation",typeAnnotation:e},r=te.TypeAnnotation;return P(r.typeAnnotation,t,"typeAnnotation",e,1),t}function rPe(e,t){let r={type:"TypeCastExpression",expression:e,typeAnnotation:t},n=te.TypeCastExpression;return P(n.expression,r,"expression",e,1),P(n.typeAnnotation,r,"typeAnnotation",t,1),r}function nPe(e=null,t=null,r=null){let n={type:"TypeParameter",bound:e,default:t,variance:r,name:null},a=te.TypeParameter;return P(a.bound,n,"bound",e,1),P(a.default,n,"default",t,1),P(a.variance,n,"variance",r,1),n}function aPe(e){let t={type:"TypeParameterDeclaration",params:e},r=te.TypeParameterDeclaration;return P(r.params,t,"params",e,1),t}function iPe(e){let t={type:"TypeParameterInstantiation",params:e},r=te.TypeParameterInstantiation;return P(r.params,t,"params",e,1),t}function sPe(e){let t={type:"UnionTypeAnnotation",types:e},r=te.UnionTypeAnnotation;return P(r.types,t,"types",e,1),t}function oPe(e){let t={type:"Variance",kind:e},r=te.Variance;return P(r.kind,t,"kind",e),t}function lPe(){return{type:"VoidTypeAnnotation"}}function cPe(e,t){let r={type:"EnumDeclaration",id:e,body:t},n=te.EnumDeclaration;return P(n.id,r,"id",e,1),P(n.body,r,"body",t,1),r}function uPe(e){let t={type:"EnumBooleanBody",members:e,explicitType:null,hasUnknownMembers:null},r=te.EnumBooleanBody;return P(r.members,t,"members",e,1),t}function dPe(e){let t={type:"EnumNumberBody",members:e,explicitType:null,hasUnknownMembers:null},r=te.EnumNumberBody;return P(r.members,t,"members",e,1),t}function fPe(e){let t={type:"EnumStringBody",members:e,explicitType:null,hasUnknownMembers:null},r=te.EnumStringBody;return P(r.members,t,"members",e,1),t}function pPe(e){let t={type:"EnumSymbolBody",members:e,hasUnknownMembers:null},r=te.EnumSymbolBody;return P(r.members,t,"members",e,1),t}function mPe(e){let t={type:"EnumBooleanMember",id:e,init:null},r=te.EnumBooleanMember;return P(r.id,t,"id",e,1),t}function hPe(e,t){let r={type:"EnumNumberMember",id:e,init:t},n=te.EnumNumberMember;return P(n.id,r,"id",e,1),P(n.init,r,"init",t,1),r}function gPe(e,t){let r={type:"EnumStringMember",id:e,init:t},n=te.EnumStringMember;return P(n.id,r,"id",e,1),P(n.init,r,"init",t,1),r}function yPe(e){let t={type:"EnumDefaultedMember",id:e},r=te.EnumDefaultedMember;return P(r.id,t,"id",e,1),t}function xPe(e,t){let r={type:"IndexedAccessType",objectType:e,indexType:t},n=te.IndexedAccessType;return P(n.objectType,r,"objectType",e,1),P(n.indexType,r,"indexType",t,1),r}function bPe(e,t){let r={type:"OptionalIndexedAccessType",objectType:e,indexType:t,optional:null},n=te.OptionalIndexedAccessType;return P(n.objectType,r,"objectType",e,1),P(n.indexType,r,"indexType",t,1),r}function vPe(e,t=null){let r={type:"JSXAttribute",name:e,value:t},n=te.JSXAttribute;return P(n.name,r,"name",e,1),P(n.value,r,"value",t,1),r}function SPe(e){let t={type:"JSXClosingElement",name:e},r=te.JSXClosingElement;return P(r.name,t,"name",e,1),t}function TPe(e,t=null,r,n=null){let a={type:"JSXElement",openingElement:e,closingElement:t,children:r,selfClosing:n},i=te.JSXElement;return P(i.openingElement,a,"openingElement",e,1),P(i.closingElement,a,"closingElement",t,1),P(i.children,a,"children",r,1),P(i.selfClosing,a,"selfClosing",n),a}function wPe(){return{type:"JSXEmptyExpression"}}function CPe(e){let t={type:"JSXExpressionContainer",expression:e},r=te.JSXExpressionContainer;return P(r.expression,t,"expression",e,1),t}function PPe(e){let t={type:"JSXSpreadChild",expression:e},r=te.JSXSpreadChild;return P(r.expression,t,"expression",e,1),t}function EPe(e){let t={type:"JSXIdentifier",name:e},r=te.JSXIdentifier;return P(r.name,t,"name",e),t}function IPe(e,t){let r={type:"JSXMemberExpression",object:e,property:t},n=te.JSXMemberExpression;return P(n.object,r,"object",e,1),P(n.property,r,"property",t,1),r}function APe(e,t){let r={type:"JSXNamespacedName",namespace:e,name:t},n=te.JSXNamespacedName;return P(n.namespace,r,"namespace",e,1),P(n.name,r,"name",t,1),r}function NPe(e,t,r=!1){let n={type:"JSXOpeningElement",name:e,attributes:t,selfClosing:r},a=te.JSXOpeningElement;return P(a.name,n,"name",e,1),P(a.attributes,n,"attributes",t,1),P(a.selfClosing,n,"selfClosing",r),n}function kPe(e){let t={type:"JSXSpreadAttribute",argument:e},r=te.JSXSpreadAttribute;return P(r.argument,t,"argument",e,1),t}function _Pe(e){let t={type:"JSXText",value:e},r=te.JSXText;return P(r.value,t,"value",e),t}function LPe(e,t,r){let n={type:"JSXFragment",openingFragment:e,closingFragment:t,children:r},a=te.JSXFragment;return P(a.openingFragment,n,"openingFragment",e,1),P(a.closingFragment,n,"closingFragment",t,1),P(a.children,n,"children",r,1),n}function RPe(){return{type:"JSXOpeningFragment"}}function DPe(){return{type:"JSXClosingFragment"}}function MPe(){return{type:"Noop"}}function OPe(e,t){let r={type:"Placeholder",expectedNode:e,name:t},n=te.Placeholder;return P(n.expectedNode,r,"expectedNode",e),P(n.name,r,"name",t,1),r}function FPe(e){let t={type:"V8IntrinsicIdentifier",name:e},r=te.V8IntrinsicIdentifier;return P(r.name,t,"name",e),t}function BPe(){return{type:"ArgumentPlaceholder"}}function $Pe(e,t){let r={type:"BindExpression",object:e,callee:t},n=te.BindExpression;return P(n.object,r,"object",e,1),P(n.callee,r,"callee",t,1),r}function jPe(e){let t={type:"Decorator",expression:e},r=te.Decorator;return P(r.expression,t,"expression",e,1),t}function zPe(e,t=!1){let r={type:"DoExpression",body:e,async:t},n=te.DoExpression;return P(n.body,r,"body",e,1),P(n.async,r,"async",t),r}function UPe(e){let t={type:"ExportDefaultSpecifier",exported:e},r=te.ExportDefaultSpecifier;return P(r.exported,t,"exported",e,1),t}function VPe(e){let t={type:"RecordExpression",properties:e},r=te.RecordExpression;return P(r.properties,t,"properties",e,1),t}function qPe(e=[]){let t={type:"TupleExpression",elements:e},r=te.TupleExpression;return P(r.elements,t,"elements",e,1),t}function HPe(e){let t={type:"DecimalLiteral",value:e},r=te.DecimalLiteral;return P(r.value,t,"value",e),t}function GPe(e){let t={type:"ModuleExpression",body:e},r=te.ModuleExpression;return P(r.body,t,"body",e,1),t}function KPe(){return{type:"TopicReference"}}function WPe(e){let t={type:"PipelineTopicExpression",expression:e},r=te.PipelineTopicExpression;return P(r.expression,t,"expression",e,1),t}function XPe(e){let t={type:"PipelineBareFunction",callee:e},r=te.PipelineBareFunction;return P(r.callee,t,"callee",e,1),t}function YPe(){return{type:"PipelinePrimaryTopicReference"}}function JPe(){return{type:"VoidPattern"}}function ZPe(e){let t={type:"TSParameterProperty",parameter:e},r=te.TSParameterProperty;return P(r.parameter,t,"parameter",e,1),t}function QPe(e=null,t=null,r,n=null){let a={type:"TSDeclareFunction",id:e,typeParameters:t,params:r,returnType:n},i=te.TSDeclareFunction;return P(i.id,a,"id",e,1),P(i.typeParameters,a,"typeParameters",t,1),P(i.params,a,"params",r,1),P(i.returnType,a,"returnType",n,1),a}function eEe(e=null,t,r=null,n,a=null){let i={type:"TSDeclareMethod",decorators:e,key:t,typeParameters:r,params:n,returnType:a},s=te.TSDeclareMethod;return P(s.decorators,i,"decorators",e,1),P(s.key,i,"key",t,1),P(s.typeParameters,i,"typeParameters",r,1),P(s.params,i,"params",n,1),P(s.returnType,i,"returnType",a,1),i}function tEe(e,t){let r={type:"TSQualifiedName",left:e,right:t},n=te.TSQualifiedName;return P(n.left,r,"left",e,1),P(n.right,r,"right",t,1),r}function rEe(e=null,t,r=null){let n={type:"TSCallSignatureDeclaration",typeParameters:e,parameters:t,typeAnnotation:r},a=te.TSCallSignatureDeclaration;return P(a.typeParameters,n,"typeParameters",e,1),P(a.parameters,n,"parameters",t,1),P(a.typeAnnotation,n,"typeAnnotation",r,1),n}function nEe(e=null,t,r=null){let n={type:"TSConstructSignatureDeclaration",typeParameters:e,parameters:t,typeAnnotation:r},a=te.TSConstructSignatureDeclaration;return P(a.typeParameters,n,"typeParameters",e,1),P(a.parameters,n,"parameters",t,1),P(a.typeAnnotation,n,"typeAnnotation",r,1),n}function aEe(e,t=null){let r={type:"TSPropertySignature",key:e,typeAnnotation:t},n=te.TSPropertySignature;return P(n.key,r,"key",e,1),P(n.typeAnnotation,r,"typeAnnotation",t,1),r}function iEe(e,t=null,r,n=null){let a={type:"TSMethodSignature",key:e,typeParameters:t,parameters:r,typeAnnotation:n,kind:null},i=te.TSMethodSignature;return P(i.key,a,"key",e,1),P(i.typeParameters,a,"typeParameters",t,1),P(i.parameters,a,"parameters",r,1),P(i.typeAnnotation,a,"typeAnnotation",n,1),a}function sEe(e,t=null){let r={type:"TSIndexSignature",parameters:e,typeAnnotation:t},n=te.TSIndexSignature;return P(n.parameters,r,"parameters",e,1),P(n.typeAnnotation,r,"typeAnnotation",t,1),r}function oEe(){return{type:"TSAnyKeyword"}}function lEe(){return{type:"TSBooleanKeyword"}}function cEe(){return{type:"TSBigIntKeyword"}}function uEe(){return{type:"TSIntrinsicKeyword"}}function dEe(){return{type:"TSNeverKeyword"}}function fEe(){return{type:"TSNullKeyword"}}function pEe(){return{type:"TSNumberKeyword"}}function mEe(){return{type:"TSObjectKeyword"}}function hEe(){return{type:"TSStringKeyword"}}function gEe(){return{type:"TSSymbolKeyword"}}function yEe(){return{type:"TSUndefinedKeyword"}}function xEe(){return{type:"TSUnknownKeyword"}}function bEe(){return{type:"TSVoidKeyword"}}function vEe(){return{type:"TSThisType"}}function SEe(e=null,t,r=null){let n={type:"TSFunctionType",typeParameters:e,parameters:t,typeAnnotation:r},a=te.TSFunctionType;return P(a.typeParameters,n,"typeParameters",e,1),P(a.parameters,n,"parameters",t,1),P(a.typeAnnotation,n,"typeAnnotation",r,1),n}function TEe(e=null,t,r=null){let n={type:"TSConstructorType",typeParameters:e,parameters:t,typeAnnotation:r},a=te.TSConstructorType;return P(a.typeParameters,n,"typeParameters",e,1),P(a.parameters,n,"parameters",t,1),P(a.typeAnnotation,n,"typeAnnotation",r,1),n}function wEe(e,t=null){let r={type:"TSTypeReference",typeName:e,typeParameters:t},n=te.TSTypeReference;return P(n.typeName,r,"typeName",e,1),P(n.typeParameters,r,"typeParameters",t,1),r}function CEe(e,t=null,r=null){let n={type:"TSTypePredicate",parameterName:e,typeAnnotation:t,asserts:r},a=te.TSTypePredicate;return P(a.parameterName,n,"parameterName",e,1),P(a.typeAnnotation,n,"typeAnnotation",t,1),P(a.asserts,n,"asserts",r),n}function PEe(e,t=null){let r={type:"TSTypeQuery",exprName:e,typeParameters:t},n=te.TSTypeQuery;return P(n.exprName,r,"exprName",e,1),P(n.typeParameters,r,"typeParameters",t,1),r}function EEe(e){let t={type:"TSTypeLiteral",members:e},r=te.TSTypeLiteral;return P(r.members,t,"members",e,1),t}function IEe(e){let t={type:"TSArrayType",elementType:e},r=te.TSArrayType;return P(r.elementType,t,"elementType",e,1),t}function AEe(e){let t={type:"TSTupleType",elementTypes:e},r=te.TSTupleType;return P(r.elementTypes,t,"elementTypes",e,1),t}function NEe(e){let t={type:"TSOptionalType",typeAnnotation:e},r=te.TSOptionalType;return P(r.typeAnnotation,t,"typeAnnotation",e,1),t}function kEe(e){let t={type:"TSRestType",typeAnnotation:e},r=te.TSRestType;return P(r.typeAnnotation,t,"typeAnnotation",e,1),t}function _Ee(e,t,r=!1){let n={type:"TSNamedTupleMember",label:e,elementType:t,optional:r},a=te.TSNamedTupleMember;return P(a.label,n,"label",e,1),P(a.elementType,n,"elementType",t,1),P(a.optional,n,"optional",r),n}function LEe(e){let t={type:"TSUnionType",types:e},r=te.TSUnionType;return P(r.types,t,"types",e,1),t}function REe(e){let t={type:"TSIntersectionType",types:e},r=te.TSIntersectionType;return P(r.types,t,"types",e,1),t}function DEe(e,t,r,n){let a={type:"TSConditionalType",checkType:e,extendsType:t,trueType:r,falseType:n},i=te.TSConditionalType;return P(i.checkType,a,"checkType",e,1),P(i.extendsType,a,"extendsType",t,1),P(i.trueType,a,"trueType",r,1),P(i.falseType,a,"falseType",n,1),a}function MEe(e){let t={type:"TSInferType",typeParameter:e},r=te.TSInferType;return P(r.typeParameter,t,"typeParameter",e,1),t}function OEe(e){let t={type:"TSParenthesizedType",typeAnnotation:e},r=te.TSParenthesizedType;return P(r.typeAnnotation,t,"typeAnnotation",e,1),t}function FEe(e,t="keyof"){let r={type:"TSTypeOperator",typeAnnotation:e,operator:t},n=te.TSTypeOperator;return P(n.typeAnnotation,r,"typeAnnotation",e,1),P(n.operator,r,"operator",t),r}function BEe(e,t){let r={type:"TSIndexedAccessType",objectType:e,indexType:t},n=te.TSIndexedAccessType;return P(n.objectType,r,"objectType",e,1),P(n.indexType,r,"indexType",t,1),r}function $Ee(e,t=null,r=null){let n={type:"TSMappedType",typeParameter:e,typeAnnotation:t,nameType:r},a=te.TSMappedType;return P(a.typeParameter,n,"typeParameter",e,1),P(a.typeAnnotation,n,"typeAnnotation",t,1),P(a.nameType,n,"nameType",r,1),n}function jEe(e,t){let r={type:"TSTemplateLiteralType",quasis:e,types:t},n=te.TSTemplateLiteralType;return P(n.quasis,r,"quasis",e,1),P(n.types,r,"types",t,1),r}function zEe(e){let t={type:"TSLiteralType",literal:e},r=te.TSLiteralType;return P(r.literal,t,"literal",e,1),t}function UEe(e,t=null){let r={type:"TSExpressionWithTypeArguments",expression:e,typeParameters:t},n=te.TSExpressionWithTypeArguments;return P(n.expression,r,"expression",e,1),P(n.typeParameters,r,"typeParameters",t,1),r}function VEe(e,t=null,r=null,n){let a={type:"TSInterfaceDeclaration",id:e,typeParameters:t,extends:r,body:n},i=te.TSInterfaceDeclaration;return P(i.id,a,"id",e,1),P(i.typeParameters,a,"typeParameters",t,1),P(i.extends,a,"extends",r,1),P(i.body,a,"body",n,1),a}function qEe(e){let t={type:"TSInterfaceBody",body:e},r=te.TSInterfaceBody;return P(r.body,t,"body",e,1),t}function HEe(e,t=null,r){let n={type:"TSTypeAliasDeclaration",id:e,typeParameters:t,typeAnnotation:r},a=te.TSTypeAliasDeclaration;return P(a.id,n,"id",e,1),P(a.typeParameters,n,"typeParameters",t,1),P(a.typeAnnotation,n,"typeAnnotation",r,1),n}function GEe(e,t=null){let r={type:"TSInstantiationExpression",expression:e,typeParameters:t},n=te.TSInstantiationExpression;return P(n.expression,r,"expression",e,1),P(n.typeParameters,r,"typeParameters",t,1),r}function KEe(e,t){let r={type:"TSAsExpression",expression:e,typeAnnotation:t},n=te.TSAsExpression;return P(n.expression,r,"expression",e,1),P(n.typeAnnotation,r,"typeAnnotation",t,1),r}function WEe(e,t){let r={type:"TSSatisfiesExpression",expression:e,typeAnnotation:t},n=te.TSSatisfiesExpression;return P(n.expression,r,"expression",e,1),P(n.typeAnnotation,r,"typeAnnotation",t,1),r}function XEe(e,t){let r={type:"TSTypeAssertion",typeAnnotation:e,expression:t},n=te.TSTypeAssertion;return P(n.typeAnnotation,r,"typeAnnotation",e,1),P(n.expression,r,"expression",t,1),r}function YEe(e){let t={type:"TSEnumBody",members:e},r=te.TSEnumBody;return P(r.members,t,"members",e,1),t}function JEe(e,t){let r={type:"TSEnumDeclaration",id:e,members:t},n=te.TSEnumDeclaration;return P(n.id,r,"id",e,1),P(n.members,r,"members",t,1),r}function ZEe(e,t=null){let r={type:"TSEnumMember",id:e,initializer:t},n=te.TSEnumMember;return P(n.id,r,"id",e,1),P(n.initializer,r,"initializer",t,1),r}function QEe(e,t){let r={type:"TSModuleDeclaration",id:e,body:t,kind:null},n=te.TSModuleDeclaration;return P(n.id,r,"id",e,1),P(n.body,r,"body",t,1),r}function eIe(e){let t={type:"TSModuleBlock",body:e},r=te.TSModuleBlock;return P(r.body,t,"body",e,1),t}function tIe(e,t=null,r=null){let n={type:"TSImportType",argument:e,qualifier:t,typeParameters:r},a=te.TSImportType;return P(a.argument,n,"argument",e,1),P(a.qualifier,n,"qualifier",t,1),P(a.typeParameters,n,"typeParameters",r,1),n}function rIe(e,t){let r={type:"TSImportEqualsDeclaration",id:e,moduleReference:t,isExport:null},n=te.TSImportEqualsDeclaration;return P(n.id,r,"id",e,1),P(n.moduleReference,r,"moduleReference",t,1),r}function nIe(e){let t={type:"TSExternalModuleReference",expression:e},r=te.TSExternalModuleReference;return P(r.expression,t,"expression",e,1),t}function aIe(e){let t={type:"TSNonNullExpression",expression:e},r=te.TSNonNullExpression;return P(r.expression,t,"expression",e,1),t}function iIe(e){let t={type:"TSExportAssignment",expression:e},r=te.TSExportAssignment;return P(r.expression,t,"expression",e,1),t}function sIe(e){let t={type:"TSNamespaceExportDeclaration",id:e},r=te.TSNamespaceExportDeclaration;return P(r.id,t,"id",e,1),t}function oIe(e){let t={type:"TSTypeAnnotation",typeAnnotation:e},r=te.TSTypeAnnotation;return P(r.typeAnnotation,t,"typeAnnotation",e,1),t}function lIe(e){let t={type:"TSTypeParameterInstantiation",params:e},r=te.TSTypeParameterInstantiation;return P(r.params,t,"params",e,1),t}function cIe(e){let t={type:"TSTypeParameterDeclaration",params:e},r=te.TSTypeParameterDeclaration;return P(r.params,t,"params",e,1),t}function uIe(e=null,t=null,r){let n={type:"TSTypeParameter",constraint:e,default:t,name:r},a=te.TSTypeParameter;return P(a.constraint,n,"constraint",e,1),P(a.default,n,"default",t,1),P(a.name,n,"name",r),n}function dIe(e){return(0,D1.default)("NumberLiteral","NumericLiteral","The node type "),h9(e)}function fIe(e,t=""){return(0,D1.default)("RegexLiteral","RegExpLiteral","The node type "),g9(e,t)}function pIe(e){return(0,D1.default)("RestProperty","RestElement","The node type "),y9(e)}function mIe(e){return(0,D1.default)("SpreadProperty","SpreadElement","The node type "),x9(e)}});var b9=ae(T=>{"use strict";Object.defineProperty(T,"__esModule",{value:!0});T.JSXIdentifier=T.JSXFragment=T.JSXExpressionContainer=T.JSXEmptyExpression=T.JSXElement=T.JSXClosingFragment=T.JSXClosingElement=T.JSXAttribute=T.IntersectionTypeAnnotation=T.InterpreterDirective=T.InterfaceTypeAnnotation=T.InterfaceExtends=T.InterfaceDeclaration=T.InferredPredicate=T.IndexedAccessType=T.ImportSpecifier=T.ImportNamespaceSpecifier=T.ImportExpression=T.ImportDefaultSpecifier=T.ImportDeclaration=T.ImportAttribute=T.Import=T.IfStatement=T.Identifier=T.GenericTypeAnnotation=T.FunctionTypeParam=T.FunctionTypeAnnotation=T.FunctionExpression=T.FunctionDeclaration=T.ForStatement=T.ForOfStatement=T.ForInStatement=T.File=T.ExpressionStatement=T.ExportSpecifier=T.ExportNamespaceSpecifier=T.ExportNamedDeclaration=T.ExportDefaultSpecifier=T.ExportDefaultDeclaration=T.ExportAllDeclaration=T.ExistsTypeAnnotation=T.EnumSymbolBody=T.EnumStringMember=T.EnumStringBody=T.EnumNumberMember=T.EnumNumberBody=T.EnumDefaultedMember=T.EnumDeclaration=T.EnumBooleanMember=T.EnumBooleanBody=T.EmptyTypeAnnotation=T.EmptyStatement=T.DoWhileStatement=T.DoExpression=T.DirectiveLiteral=T.Directive=T.Decorator=T.DeclaredPredicate=T.DeclareVariable=T.DeclareTypeAlias=T.DeclareOpaqueType=T.DeclareModuleExports=T.DeclareModule=T.DeclareInterface=T.DeclareFunction=T.DeclareExportDeclaration=T.DeclareExportAllDeclaration=T.DeclareClass=T.DecimalLiteral=T.DebuggerStatement=T.ContinueStatement=T.ConditionalExpression=T.ClassProperty=T.ClassPrivateProperty=T.ClassPrivateMethod=T.ClassMethod=T.ClassImplements=T.ClassExpression=T.ClassDeclaration=T.ClassBody=T.ClassAccessorProperty=T.CatchClause=T.CallExpression=T.BreakStatement=T.BooleanTypeAnnotation=T.BooleanLiteralTypeAnnotation=T.BooleanLiteral=T.BlockStatement=T.BindExpression=T.BinaryExpression=T.BigIntLiteral=T.AwaitExpression=T.AssignmentPattern=T.AssignmentExpression=T.ArrowFunctionExpression=T.ArrayTypeAnnotation=T.ArrayPattern=T.ArrayExpression=T.ArgumentPlaceholder=T.AnyTypeAnnotation=void 0;T.TSNumberKeyword=T.TSNullKeyword=T.TSNonNullExpression=T.TSNeverKeyword=T.TSNamespaceExportDeclaration=T.TSNamedTupleMember=T.TSModuleDeclaration=T.TSModuleBlock=T.TSMethodSignature=T.TSMappedType=T.TSLiteralType=T.TSIntrinsicKeyword=T.TSIntersectionType=T.TSInterfaceDeclaration=T.TSInterfaceBody=T.TSInstantiationExpression=T.TSInferType=T.TSIndexedAccessType=T.TSIndexSignature=T.TSImportType=T.TSImportEqualsDeclaration=T.TSFunctionType=T.TSExternalModuleReference=T.TSExpressionWithTypeArguments=T.TSExportAssignment=T.TSEnumMember=T.TSEnumDeclaration=T.TSEnumBody=T.TSDeclareMethod=T.TSDeclareFunction=T.TSConstructorType=T.TSConstructSignatureDeclaration=T.TSConditionalType=T.TSCallSignatureDeclaration=T.TSBooleanKeyword=T.TSBigIntKeyword=T.TSAsExpression=T.TSArrayType=T.TSAnyKeyword=T.SymbolTypeAnnotation=T.SwitchStatement=T.SwitchCase=T.Super=T.StringTypeAnnotation=T.StringLiteralTypeAnnotation=T.StringLiteral=T.StaticBlock=T.SpreadProperty=T.SpreadElement=T.SequenceExpression=T.ReturnStatement=T.RestProperty=T.RestElement=T.RegexLiteral=T.RegExpLiteral=T.RecordExpression=T.QualifiedTypeIdentifier=T.Program=T.PrivateName=T.Placeholder=T.PipelineTopicExpression=T.PipelinePrimaryTopicReference=T.PipelineBareFunction=T.ParenthesizedExpression=T.OptionalMemberExpression=T.OptionalIndexedAccessType=T.OptionalCallExpression=T.OpaqueType=T.ObjectTypeSpreadProperty=T.ObjectTypeProperty=T.ObjectTypeInternalSlot=T.ObjectTypeIndexer=T.ObjectTypeCallProperty=T.ObjectTypeAnnotation=T.ObjectProperty=T.ObjectPattern=T.ObjectMethod=T.ObjectExpression=T.NumericLiteral=T.NumberTypeAnnotation=T.NumberLiteralTypeAnnotation=T.NumberLiteral=T.NullableTypeAnnotation=T.NullLiteralTypeAnnotation=T.NullLiteral=T.Noop=T.NewExpression=T.ModuleExpression=T.MixedTypeAnnotation=T.MetaProperty=T.MemberExpression=T.LogicalExpression=T.LabeledStatement=T.JSXText=T.JSXSpreadChild=T.JSXSpreadAttribute=T.JSXOpeningFragment=T.JSXOpeningElement=T.JSXNamespacedName=T.JSXMemberExpression=void 0;T.YieldExpression=T.WithStatement=T.WhileStatement=T.VoidTypeAnnotation=T.VoidPattern=T.Variance=T.VariableDeclarator=T.VariableDeclaration=T.V8IntrinsicIdentifier=T.UpdateExpression=T.UnionTypeAnnotation=T.UnaryExpression=T.TypeofTypeAnnotation=T.TypeParameterInstantiation=T.TypeParameterDeclaration=T.TypeParameter=T.TypeCastExpression=T.TypeAnnotation=T.TypeAlias=T.TupleTypeAnnotation=T.TupleExpression=T.TryStatement=T.TopicReference=T.ThrowStatement=T.ThisTypeAnnotation=T.ThisExpression=T.TemplateLiteral=T.TemplateElement=T.TaggedTemplateExpression=T.TSVoidKeyword=T.TSUnknownKeyword=T.TSUnionType=T.TSUndefinedKeyword=T.TSTypeReference=T.TSTypeQuery=T.TSTypePredicate=T.TSTypeParameterInstantiation=T.TSTypeParameterDeclaration=T.TSTypeParameter=T.TSTypeOperator=T.TSTypeLiteral=T.TSTypeAssertion=T.TSTypeAnnotation=T.TSTypeAliasDeclaration=T.TSTupleType=T.TSThisType=T.TSTemplateLiteralType=T.TSSymbolKeyword=T.TSStringKeyword=T.TSSatisfiesExpression=T.TSRestType=T.TSQualifiedName=T.TSPropertySignature=T.TSParenthesizedType=T.TSParameterProperty=T.TSOptionalType=T.TSObjectKeyword=void 0;var _0=yR(),qmt=Sy();function G(e){return _0[e]}var Hmt=T.ArrayExpression=G("arrayExpression"),Gmt=T.AssignmentExpression=G("assignmentExpression"),Kmt=T.BinaryExpression=G("binaryExpression"),Wmt=T.InterpreterDirective=G("interpreterDirective"),Xmt=T.Directive=G("directive"),Ymt=T.DirectiveLiteral=G("directiveLiteral"),Jmt=T.BlockStatement=G("blockStatement"),Zmt=T.BreakStatement=G("breakStatement"),Qmt=T.CallExpression=G("callExpression"),eht=T.CatchClause=G("catchClause"),tht=T.ConditionalExpression=G("conditionalExpression"),rht=T.ContinueStatement=G("continueStatement"),nht=T.DebuggerStatement=G("debuggerStatement"),aht=T.DoWhileStatement=G("doWhileStatement"),iht=T.EmptyStatement=G("emptyStatement"),sht=T.ExpressionStatement=G("expressionStatement"),oht=T.File=G("file"),lht=T.ForInStatement=G("forInStatement"),cht=T.ForStatement=G("forStatement"),uht=T.FunctionDeclaration=G("functionDeclaration"),dht=T.FunctionExpression=G("functionExpression"),fht=T.Identifier=G("identifier"),pht=T.IfStatement=G("ifStatement"),mht=T.LabeledStatement=G("labeledStatement"),hht=T.StringLiteral=G("stringLiteral"),ght=T.NumericLiteral=G("numericLiteral"),yht=T.NullLiteral=G("nullLiteral"),xht=T.BooleanLiteral=G("booleanLiteral"),bht=T.RegExpLiteral=G("regExpLiteral"),vht=T.LogicalExpression=G("logicalExpression"),Sht=T.MemberExpression=G("memberExpression"),Tht=T.NewExpression=G("newExpression"),wht=T.Program=G("program"),Cht=T.ObjectExpression=G("objectExpression"),Pht=T.ObjectMethod=G("objectMethod"),Eht=T.ObjectProperty=G("objectProperty"),Iht=T.RestElement=G("restElement"),Aht=T.ReturnStatement=G("returnStatement"),Nht=T.SequenceExpression=G("sequenceExpression"),kht=T.ParenthesizedExpression=G("parenthesizedExpression"),_ht=T.SwitchCase=G("switchCase"),Lht=T.SwitchStatement=G("switchStatement"),Rht=T.ThisExpression=G("thisExpression"),Dht=T.ThrowStatement=G("throwStatement"),Mht=T.TryStatement=G("tryStatement"),Oht=T.UnaryExpression=G("unaryExpression"),Fht=T.UpdateExpression=G("updateExpression"),Bht=T.VariableDeclaration=G("variableDeclaration"),$ht=T.VariableDeclarator=G("variableDeclarator"),jht=T.WhileStatement=G("whileStatement"),zht=T.WithStatement=G("withStatement"),Uht=T.AssignmentPattern=G("assignmentPattern"),Vht=T.ArrayPattern=G("arrayPattern"),qht=T.ArrowFunctionExpression=G("arrowFunctionExpression"),Hht=T.ClassBody=G("classBody"),Ght=T.ClassExpression=G("classExpression"),Kht=T.ClassDeclaration=G("classDeclaration"),Wht=T.ExportAllDeclaration=G("exportAllDeclaration"),Xht=T.ExportDefaultDeclaration=G("exportDefaultDeclaration"),Yht=T.ExportNamedDeclaration=G("exportNamedDeclaration"),Jht=T.ExportSpecifier=G("exportSpecifier"),Zht=T.ForOfStatement=G("forOfStatement"),Qht=T.ImportDeclaration=G("importDeclaration"),egt=T.ImportDefaultSpecifier=G("importDefaultSpecifier"),tgt=T.ImportNamespaceSpecifier=G("importNamespaceSpecifier"),rgt=T.ImportSpecifier=G("importSpecifier"),ngt=T.ImportExpression=G("importExpression"),agt=T.MetaProperty=G("metaProperty"),igt=T.ClassMethod=G("classMethod"),sgt=T.ObjectPattern=G("objectPattern"),ogt=T.SpreadElement=G("spreadElement"),lgt=T.Super=G("super"),cgt=T.TaggedTemplateExpression=G("taggedTemplateExpression"),ugt=T.TemplateElement=G("templateElement"),dgt=T.TemplateLiteral=G("templateLiteral"),fgt=T.YieldExpression=G("yieldExpression"),pgt=T.AwaitExpression=G("awaitExpression"),mgt=T.Import=G("import"),hgt=T.BigIntLiteral=G("bigIntLiteral"),ggt=T.ExportNamespaceSpecifier=G("exportNamespaceSpecifier"),ygt=T.OptionalMemberExpression=G("optionalMemberExpression"),xgt=T.OptionalCallExpression=G("optionalCallExpression"),bgt=T.ClassProperty=G("classProperty"),vgt=T.ClassAccessorProperty=G("classAccessorProperty"),Sgt=T.ClassPrivateProperty=G("classPrivateProperty"),Tgt=T.ClassPrivateMethod=G("classPrivateMethod"),wgt=T.PrivateName=G("privateName"),Cgt=T.StaticBlock=G("staticBlock"),Pgt=T.ImportAttribute=G("importAttribute"),Egt=T.AnyTypeAnnotation=G("anyTypeAnnotation"),Igt=T.ArrayTypeAnnotation=G("arrayTypeAnnotation"),Agt=T.BooleanTypeAnnotation=G("booleanTypeAnnotation"),Ngt=T.BooleanLiteralTypeAnnotation=G("booleanLiteralTypeAnnotation"),kgt=T.NullLiteralTypeAnnotation=G("nullLiteralTypeAnnotation"),_gt=T.ClassImplements=G("classImplements"),Lgt=T.DeclareClass=G("declareClass"),Rgt=T.DeclareFunction=G("declareFunction"),Dgt=T.DeclareInterface=G("declareInterface"),Mgt=T.DeclareModule=G("declareModule"),Ogt=T.DeclareModuleExports=G("declareModuleExports"),Fgt=T.DeclareTypeAlias=G("declareTypeAlias"),Bgt=T.DeclareOpaqueType=G("declareOpaqueType"),$gt=T.DeclareVariable=G("declareVariable"),jgt=T.DeclareExportDeclaration=G("declareExportDeclaration"),zgt=T.DeclareExportAllDeclaration=G("declareExportAllDeclaration"),Ugt=T.DeclaredPredicate=G("declaredPredicate"),Vgt=T.ExistsTypeAnnotation=G("existsTypeAnnotation"),qgt=T.FunctionTypeAnnotation=G("functionTypeAnnotation"),Hgt=T.FunctionTypeParam=G("functionTypeParam"),Ggt=T.GenericTypeAnnotation=G("genericTypeAnnotation"),Kgt=T.InferredPredicate=G("inferredPredicate"),Wgt=T.InterfaceExtends=G("interfaceExtends"),Xgt=T.InterfaceDeclaration=G("interfaceDeclaration"),Ygt=T.InterfaceTypeAnnotation=G("interfaceTypeAnnotation"),Jgt=T.IntersectionTypeAnnotation=G("intersectionTypeAnnotation"),Zgt=T.MixedTypeAnnotation=G("mixedTypeAnnotation"),Qgt=T.EmptyTypeAnnotation=G("emptyTypeAnnotation"),eyt=T.NullableTypeAnnotation=G("nullableTypeAnnotation"),tyt=T.NumberLiteralTypeAnnotation=G("numberLiteralTypeAnnotation"),ryt=T.NumberTypeAnnotation=G("numberTypeAnnotation"),nyt=T.ObjectTypeAnnotation=G("objectTypeAnnotation"),ayt=T.ObjectTypeInternalSlot=G("objectTypeInternalSlot"),iyt=T.ObjectTypeCallProperty=G("objectTypeCallProperty"),syt=T.ObjectTypeIndexer=G("objectTypeIndexer"),oyt=T.ObjectTypeProperty=G("objectTypeProperty"),lyt=T.ObjectTypeSpreadProperty=G("objectTypeSpreadProperty"),cyt=T.OpaqueType=G("opaqueType"),uyt=T.QualifiedTypeIdentifier=G("qualifiedTypeIdentifier"),dyt=T.StringLiteralTypeAnnotation=G("stringLiteralTypeAnnotation"),fyt=T.StringTypeAnnotation=G("stringTypeAnnotation"),pyt=T.SymbolTypeAnnotation=G("symbolTypeAnnotation"),myt=T.ThisTypeAnnotation=G("thisTypeAnnotation"),hyt=T.TupleTypeAnnotation=G("tupleTypeAnnotation"),gyt=T.TypeofTypeAnnotation=G("typeofTypeAnnotation"),yyt=T.TypeAlias=G("typeAlias"),xyt=T.TypeAnnotation=G("typeAnnotation"),byt=T.TypeCastExpression=G("typeCastExpression"),vyt=T.TypeParameter=G("typeParameter"),Syt=T.TypeParameterDeclaration=G("typeParameterDeclaration"),Tyt=T.TypeParameterInstantiation=G("typeParameterInstantiation"),wyt=T.UnionTypeAnnotation=G("unionTypeAnnotation"),Cyt=T.Variance=G("variance"),Pyt=T.VoidTypeAnnotation=G("voidTypeAnnotation"),Eyt=T.EnumDeclaration=G("enumDeclaration"),Iyt=T.EnumBooleanBody=G("enumBooleanBody"),Ayt=T.EnumNumberBody=G("enumNumberBody"),Nyt=T.EnumStringBody=G("enumStringBody"),kyt=T.EnumSymbolBody=G("enumSymbolBody"),_yt=T.EnumBooleanMember=G("enumBooleanMember"),Lyt=T.EnumNumberMember=G("enumNumberMember"),Ryt=T.EnumStringMember=G("enumStringMember"),Dyt=T.EnumDefaultedMember=G("enumDefaultedMember"),Myt=T.IndexedAccessType=G("indexedAccessType"),Oyt=T.OptionalIndexedAccessType=G("optionalIndexedAccessType"),Fyt=T.JSXAttribute=G("jsxAttribute"),Byt=T.JSXClosingElement=G("jsxClosingElement"),$yt=T.JSXElement=G("jsxElement"),jyt=T.JSXEmptyExpression=G("jsxEmptyExpression"),zyt=T.JSXExpressionContainer=G("jsxExpressionContainer"),Uyt=T.JSXSpreadChild=G("jsxSpreadChild"),Vyt=T.JSXIdentifier=G("jsxIdentifier"),qyt=T.JSXMemberExpression=G("jsxMemberExpression"),Hyt=T.JSXNamespacedName=G("jsxNamespacedName"),Gyt=T.JSXOpeningElement=G("jsxOpeningElement"),Kyt=T.JSXSpreadAttribute=G("jsxSpreadAttribute"),Wyt=T.JSXText=G("jsxText"),Xyt=T.JSXFragment=G("jsxFragment"),Yyt=T.JSXOpeningFragment=G("jsxOpeningFragment"),Jyt=T.JSXClosingFragment=G("jsxClosingFragment"),Zyt=T.Noop=G("noop"),Qyt=T.Placeholder=G("placeholder"),ext=T.V8IntrinsicIdentifier=G("v8IntrinsicIdentifier"),txt=T.ArgumentPlaceholder=G("argumentPlaceholder"),rxt=T.BindExpression=G("bindExpression"),nxt=T.Decorator=G("decorator"),axt=T.DoExpression=G("doExpression"),ixt=T.ExportDefaultSpecifier=G("exportDefaultSpecifier"),sxt=T.RecordExpression=G("recordExpression"),oxt=T.TupleExpression=G("tupleExpression"),lxt=T.DecimalLiteral=G("decimalLiteral"),cxt=T.ModuleExpression=G("moduleExpression"),uxt=T.TopicReference=G("topicReference"),dxt=T.PipelineTopicExpression=G("pipelineTopicExpression"),fxt=T.PipelineBareFunction=G("pipelineBareFunction"),pxt=T.PipelinePrimaryTopicReference=G("pipelinePrimaryTopicReference"),mxt=T.VoidPattern=G("voidPattern"),hxt=T.TSParameterProperty=G("tsParameterProperty"),gxt=T.TSDeclareFunction=G("tsDeclareFunction"),yxt=T.TSDeclareMethod=G("tsDeclareMethod"),xxt=T.TSQualifiedName=G("tsQualifiedName"),bxt=T.TSCallSignatureDeclaration=G("tsCallSignatureDeclaration"),vxt=T.TSConstructSignatureDeclaration=G("tsConstructSignatureDeclaration"),Sxt=T.TSPropertySignature=G("tsPropertySignature"),Txt=T.TSMethodSignature=G("tsMethodSignature"),wxt=T.TSIndexSignature=G("tsIndexSignature"),Cxt=T.TSAnyKeyword=G("tsAnyKeyword"),Pxt=T.TSBooleanKeyword=G("tsBooleanKeyword"),Ext=T.TSBigIntKeyword=G("tsBigIntKeyword"),Ixt=T.TSIntrinsicKeyword=G("tsIntrinsicKeyword"),Axt=T.TSNeverKeyword=G("tsNeverKeyword"),Nxt=T.TSNullKeyword=G("tsNullKeyword"),kxt=T.TSNumberKeyword=G("tsNumberKeyword"),_xt=T.TSObjectKeyword=G("tsObjectKeyword"),Lxt=T.TSStringKeyword=G("tsStringKeyword"),Rxt=T.TSSymbolKeyword=G("tsSymbolKeyword"),Dxt=T.TSUndefinedKeyword=G("tsUndefinedKeyword"),Mxt=T.TSUnknownKeyword=G("tsUnknownKeyword"),Oxt=T.TSVoidKeyword=G("tsVoidKeyword"),Fxt=T.TSThisType=G("tsThisType"),Bxt=T.TSFunctionType=G("tsFunctionType"),$xt=T.TSConstructorType=G("tsConstructorType"),jxt=T.TSTypeReference=G("tsTypeReference"),zxt=T.TSTypePredicate=G("tsTypePredicate"),Uxt=T.TSTypeQuery=G("tsTypeQuery"),Vxt=T.TSTypeLiteral=G("tsTypeLiteral"),qxt=T.TSArrayType=G("tsArrayType"),Hxt=T.TSTupleType=G("tsTupleType"),Gxt=T.TSOptionalType=G("tsOptionalType"),Kxt=T.TSRestType=G("tsRestType"),Wxt=T.TSNamedTupleMember=G("tsNamedTupleMember"),Xxt=T.TSUnionType=G("tsUnionType"),Yxt=T.TSIntersectionType=G("tsIntersectionType"),Jxt=T.TSConditionalType=G("tsConditionalType"),Zxt=T.TSInferType=G("tsInferType"),Qxt=T.TSParenthesizedType=G("tsParenthesizedType"),ebt=T.TSTypeOperator=G("tsTypeOperator"),tbt=T.TSIndexedAccessType=G("tsIndexedAccessType"),rbt=T.TSMappedType=G("tsMappedType"),nbt=T.TSTemplateLiteralType=G("tsTemplateLiteralType"),abt=T.TSLiteralType=G("tsLiteralType"),ibt=T.TSExpressionWithTypeArguments=G("tsExpressionWithTypeArguments"),sbt=T.TSInterfaceDeclaration=G("tsInterfaceDeclaration"),obt=T.TSInterfaceBody=G("tsInterfaceBody"),lbt=T.TSTypeAliasDeclaration=G("tsTypeAliasDeclaration"),cbt=T.TSInstantiationExpression=G("tsInstantiationExpression"),ubt=T.TSAsExpression=G("tsAsExpression"),dbt=T.TSSatisfiesExpression=G("tsSatisfiesExpression"),fbt=T.TSTypeAssertion=G("tsTypeAssertion"),pbt=T.TSEnumBody=G("tsEnumBody"),mbt=T.TSEnumDeclaration=G("tsEnumDeclaration"),hbt=T.TSEnumMember=G("tsEnumMember"),gbt=T.TSModuleDeclaration=G("tsModuleDeclaration"),ybt=T.TSModuleBlock=G("tsModuleBlock"),xbt=T.TSImportType=G("tsImportType"),bbt=T.TSImportEqualsDeclaration=G("tsImportEqualsDeclaration"),vbt=T.TSExternalModuleReference=G("tsExternalModuleReference"),Sbt=T.TSNonNullExpression=G("tsNonNullExpression"),Tbt=T.TSExportAssignment=G("tsExportAssignment"),wbt=T.TSNamespaceExportDeclaration=G("tsNamespaceExportDeclaration"),Cbt=T.TSTypeAnnotation=G("tsTypeAnnotation"),Pbt=T.TSTypeParameterInstantiation=G("tsTypeParameterInstantiation"),Ebt=T.TSTypeParameterDeclaration=G("tsTypeParameterDeclaration"),Ibt=T.TSTypeParameter=G("tsTypeParameter"),Abt=T.NumberLiteral=_0.numberLiteral,Nbt=T.RegexLiteral=_0.regexLiteral,kbt=T.RestProperty=_0.restProperty,_bt=T.SpreadProperty=_0.spreadProperty});var ao=ae(Lf=>{"use strict";Object.defineProperty(Lf,"__esModule",{value:!0});var xR=yR();Object.keys(xR).forEach(function(e){e==="default"||e==="__esModule"||e in Lf&&Lf[e]===xR[e]||Object.defineProperty(Lf,e,{enumerable:!0,get:function(){return xR[e]}})});var bR=b9();Object.keys(bR).forEach(function(e){e==="default"||e==="__esModule"||e in Lf&&Lf[e]===bR[e]||Object.defineProperty(Lf,e,{enumerable:!0,get:function(){return bR[e]}})})});var v9=ae(vR=>{"use strict";Object.defineProperty(vR,"__esModule",{value:!0});vR.default=yIe;var hIe=ao(),gIe=xr();function yIe(e,t){let r=e.value.split(/\r\n|\n|\r/),n=0;for(let i=0;i<r.length;i++)/[^ \t]/.exec(r[i])&&(n=i);let a="";for(let i=0;i<r.length;i++){let s=r[i],o=i===0,l=i===r.length-1,c=i===n,u=s.replace(/\t/g," ");o||(u=u.replace(/^ +/,"")),l||(u=u.replace(/ +$/,"")),u&&(c||(u+=" "),a+=u)}a&&t.push((0,gIe.inherits)((0,hIe.stringLiteral)(a),e))}});var S9=ae(TR=>{"use strict";Object.defineProperty(TR,"__esModule",{value:!0});TR.default=bIe;var SR=va(),xIe=v9();function bIe(e){let t=[];for(let r=0;r<e.children.length;r++){let n=e.children[r];if((0,SR.isJSXText)(n)){(0,xIe.default)(n,t);continue}(0,SR.isJSXExpressionContainer)(n)&&(n=n.expression),!(0,SR.isJSXEmptyExpression)(n)&&t.push(n)}return t}});var CR=ae(wR=>{"use strict";Object.defineProperty(wR,"__esModule",{value:!0});wR.default=SIe;var vIe=bl();function SIe(e){return!!(e&&vIe.VISITOR_KEYS[e.type])}});var T9=ae(PR=>{"use strict";Object.defineProperty(PR,"__esModule",{value:!0});PR.default=wIe;var TIe=CR();function wIe(e){if(!(0,TIe.default)(e)){var t;let r=(t=e?.type)!=null?t:JSON.stringify(e);throw new TypeError(`Not a valid node of type "${r}"`)}}});var w9=ae(B=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0});B.assertAccessor=VLe;B.assertAnyTypeAnnotation=sNe;B.assertArgumentPlaceholder=Mke;B.assertArrayExpression=PIe;B.assertArrayPattern=wAe;B.assertArrayTypeAnnotation=oNe;B.assertArrowFunctionExpression=CAe;B.assertAssignmentExpression=EIe;B.assertAssignmentPattern=TAe;B.assertAwaitExpression=KAe;B.assertBigIntLiteral=XAe;B.assertBinary=uLe;B.assertBinaryExpression=IIe;B.assertBindExpression=Oke;B.assertBlock=pLe;B.assertBlockParent=fLe;B.assertBlockStatement=_Ie;B.assertBooleanLiteral=ZIe;B.assertBooleanLiteralTypeAnnotation=cNe;B.assertBooleanTypeAnnotation=lNe;B.assertBreakStatement=LIe;B.assertCallExpression=RIe;B.assertCatchClause=DIe;B.assertClass=$Le;B.assertClassAccessorProperty=eNe;B.assertClassBody=PAe;B.assertClassDeclaration=IAe;B.assertClassExpression=EAe;B.assertClassImplements=dNe;B.assertClassMethod=$Ae;B.assertClassPrivateMethod=rNe;B.assertClassPrivateProperty=tNe;B.assertClassProperty=QAe;B.assertCompletionStatement=gLe;B.assertConditional=yLe;B.assertConditionalExpression=MIe;B.assertContinueStatement=OIe;B.assertDebuggerStatement=FIe;B.assertDecimalLiteral=Uke;B.assertDeclaration=ELe;B.assertDeclareClass=fNe;B.assertDeclareExportAllDeclaration=SNe;B.assertDeclareExportDeclaration=vNe;B.assertDeclareFunction=pNe;B.assertDeclareInterface=mNe;B.assertDeclareModule=hNe;B.assertDeclareModuleExports=gNe;B.assertDeclareOpaqueType=xNe;B.assertDeclareTypeAlias=yNe;B.assertDeclareVariable=bNe;B.assertDeclaredPredicate=TNe;B.assertDecorator=Fke;B.assertDirective=NIe;B.assertDirectiveLiteral=kIe;B.assertDoExpression=Bke;B.assertDoWhileStatement=BIe;B.assertEmptyStatement=$Ie;B.assertEmptyTypeAnnotation=RNe;B.assertEnumBody=YLe;B.assertEnumBooleanBody=oke;B.assertEnumBooleanMember=dke;B.assertEnumDeclaration=ske;B.assertEnumDefaultedMember=mke;B.assertEnumMember=JLe;B.assertEnumNumberBody=lke;B.assertEnumNumberMember=fke;B.assertEnumStringBody=cke;B.assertEnumStringMember=pke;B.assertEnumSymbolBody=uke;B.assertExistsTypeAnnotation=wNe;B.assertExportAllDeclaration=AAe;B.assertExportDeclaration=zLe;B.assertExportDefaultDeclaration=NAe;B.assertExportDefaultSpecifier=$ke;B.assertExportNamedDeclaration=kAe;B.assertExportNamespaceSpecifier=YAe;B.assertExportSpecifier=_Ae;B.assertExpression=cLe;B.assertExpressionStatement=jIe;B.assertExpressionWrapper=vLe;B.assertFile=zIe;B.assertFlow=HLe;B.assertFlowBaseAnnotation=KLe;B.assertFlowDeclaration=WLe;B.assertFlowPredicate=XLe;B.assertFlowType=GLe;B.assertFor=SLe;B.assertForInStatement=UIe;B.assertForOfStatement=LAe;B.assertForStatement=VIe;B.assertForXStatement=TLe;B.assertFunction=wLe;B.assertFunctionDeclaration=qIe;B.assertFunctionExpression=HIe;B.assertFunctionParameter=ILe;B.assertFunctionParent=CLe;B.assertFunctionTypeAnnotation=CNe;B.assertFunctionTypeParam=PNe;B.assertGenericTypeAnnotation=ENe;B.assertIdentifier=GIe;B.assertIfStatement=KIe;B.assertImmutable=LLe;B.assertImport=WAe;B.assertImportAttribute=iNe;B.assertImportDeclaration=RAe;B.assertImportDefaultSpecifier=DAe;B.assertImportExpression=FAe;B.assertImportNamespaceSpecifier=MAe;B.assertImportOrExportDeclaration=jLe;B.assertImportSpecifier=OAe;B.assertIndexedAccessType=hke;B.assertInferredPredicate=INe;B.assertInterfaceDeclaration=NNe;B.assertInterfaceExtends=ANe;B.assertInterfaceTypeAnnotation=kNe;B.assertInterpreterDirective=AIe;B.assertIntersectionTypeAnnotation=_Ne;B.assertJSX=ZLe;B.assertJSXAttribute=yke;B.assertJSXClosingElement=xke;B.assertJSXClosingFragment=_ke;B.assertJSXElement=bke;B.assertJSXEmptyExpression=vke;B.assertJSXExpressionContainer=Ske;B.assertJSXFragment=Nke;B.assertJSXIdentifier=wke;B.assertJSXMemberExpression=Cke;B.assertJSXNamespacedName=Pke;B.assertJSXOpeningElement=Eke;B.assertJSXOpeningFragment=kke;B.assertJSXSpreadAttribute=Ike;B.assertJSXSpreadChild=Tke;B.assertJSXText=Ake;B.assertLVal=NLe;B.assertLabeledStatement=WIe;B.assertLiteral=_Le;B.assertLogicalExpression=eAe;B.assertLoop=xLe;B.assertMemberExpression=tAe;B.assertMetaProperty=BAe;B.assertMethod=DLe;B.assertMiscellaneous=QLe;B.assertMixedTypeAnnotation=LNe;B.assertModuleDeclaration=lRe;B.assertModuleExpression=Vke;B.assertModuleSpecifier=ULe;B.assertNewExpression=rAe;B.assertNoop=Lke;B.assertNullLiteral=JIe;B.assertNullLiteralTypeAnnotation=uNe;B.assertNullableTypeAnnotation=DNe;B.assertNumberLiteral=aRe;B.assertNumberLiteralTypeAnnotation=MNe;B.assertNumberTypeAnnotation=ONe;B.assertNumericLiteral=YIe;B.assertObjectExpression=aAe;B.assertObjectMember=MLe;B.assertObjectMethod=iAe;B.assertObjectPattern=jAe;B.assertObjectProperty=sAe;B.assertObjectTypeAnnotation=FNe;B.assertObjectTypeCallProperty=$Ne;B.assertObjectTypeIndexer=jNe;B.assertObjectTypeInternalSlot=BNe;B.assertObjectTypeProperty=zNe;B.assertObjectTypeSpreadProperty=UNe;B.assertOpaqueType=VNe;B.assertOptionalCallExpression=ZAe;B.assertOptionalIndexedAccessType=gke;B.assertOptionalMemberExpression=JAe;B.assertParenthesizedExpression=uAe;B.assertPattern=BLe;B.assertPatternLike=ALe;B.assertPipelineBareFunction=Gke;B.assertPipelinePrimaryTopicReference=Kke;B.assertPipelineTopicExpression=Hke;B.assertPlaceholder=Rke;B.assertPrivate=qLe;B.assertPrivateName=nNe;B.assertProgram=nAe;B.assertProperty=OLe;B.assertPureish=PLe;B.assertQualifiedTypeIdentifier=qNe;B.assertRecordExpression=jke;B.assertRegExpLiteral=QIe;B.assertRegexLiteral=iRe;B.assertRestElement=oAe;B.assertRestProperty=sRe;B.assertReturnStatement=lAe;B.assertScopable=dLe;B.assertSequenceExpression=cAe;B.assertSpreadElement=zAe;B.assertSpreadProperty=oRe;B.assertStandardized=lLe;B.assertStatement=mLe;B.assertStaticBlock=aNe;B.assertStringLiteral=XIe;B.assertStringLiteralTypeAnnotation=HNe;B.assertStringTypeAnnotation=GNe;B.assertSuper=UAe;B.assertSwitchCase=dAe;B.assertSwitchStatement=fAe;B.assertSymbolTypeAnnotation=KNe;B.assertTSAnyKeyword=a_e;B.assertTSArrayType=C_e;B.assertTSAsExpression=q_e;B.assertTSBaseType=nRe;B.assertTSBigIntKeyword=s_e;B.assertTSBooleanKeyword=i_e;B.assertTSCallSignatureDeclaration=Qke;B.assertTSConditionalType=__e;B.assertTSConstructSignatureDeclaration=e_e;B.assertTSConstructorType=b_e;B.assertTSDeclareFunction=Yke;B.assertTSDeclareMethod=Jke;B.assertTSEntityName=kLe;B.assertTSEnumBody=K_e;B.assertTSEnumDeclaration=W_e;B.assertTSEnumMember=X_e;B.assertTSExportAssignment=rLe;B.assertTSExpressionWithTypeArguments=$_e;B.assertTSExternalModuleReference=eLe;B.assertTSFunctionType=x_e;B.assertTSImportEqualsDeclaration=Q_e;B.assertTSImportType=Z_e;B.assertTSIndexSignature=n_e;B.assertTSIndexedAccessType=M_e;B.assertTSInferType=L_e;B.assertTSInstantiationExpression=V_e;B.assertTSInterfaceBody=z_e;B.assertTSInterfaceDeclaration=j_e;B.assertTSIntersectionType=k_e;B.assertTSIntrinsicKeyword=o_e;B.assertTSLiteralType=B_e;B.assertTSMappedType=O_e;B.assertTSMethodSignature=r_e;B.assertTSModuleBlock=J_e;B.assertTSModuleDeclaration=Y_e;B.assertTSNamedTupleMember=A_e;B.assertTSNamespaceExportDeclaration=nLe;B.assertTSNeverKeyword=l_e;B.assertTSNonNullExpression=tLe;B.assertTSNullKeyword=c_e;B.assertTSNumberKeyword=u_e;B.assertTSObjectKeyword=d_e;B.assertTSOptionalType=E_e;B.assertTSParameterProperty=Xke;B.assertTSParenthesizedType=R_e;B.assertTSPropertySignature=t_e;B.assertTSQualifiedName=Zke;B.assertTSRestType=I_e;B.assertTSSatisfiesExpression=H_e;B.assertTSStringKeyword=f_e;B.assertTSSymbolKeyword=p_e;B.assertTSTemplateLiteralType=F_e;B.assertTSThisType=y_e;B.assertTSTupleType=P_e;B.assertTSType=rRe;B.assertTSTypeAliasDeclaration=U_e;B.assertTSTypeAnnotation=aLe;B.assertTSTypeAssertion=G_e;B.assertTSTypeElement=tRe;B.assertTSTypeLiteral=w_e;B.assertTSTypeOperator=D_e;B.assertTSTypeParameter=oLe;B.assertTSTypeParameterDeclaration=sLe;B.assertTSTypeParameterInstantiation=iLe;B.assertTSTypePredicate=S_e;B.assertTSTypeQuery=T_e;B.assertTSTypeReference=v_e;B.assertTSUndefinedKeyword=m_e;B.assertTSUnionType=N_e;B.assertTSUnknownKeyword=h_e;B.assertTSVoidKeyword=g_e;B.assertTaggedTemplateExpression=VAe;B.assertTemplateElement=qAe;B.assertTemplateLiteral=HAe;B.assertTerminatorless=hLe;B.assertThisExpression=pAe;B.assertThisTypeAnnotation=WNe;B.assertThrowStatement=mAe;B.assertTopicReference=qke;B.assertTryStatement=hAe;B.assertTupleExpression=zke;B.assertTupleTypeAnnotation=XNe;B.assertTypeAlias=JNe;B.assertTypeAnnotation=ZNe;B.assertTypeCastExpression=QNe;B.assertTypeParameter=eke;B.assertTypeParameterDeclaration=tke;B.assertTypeParameterInstantiation=rke;B.assertTypeScript=eRe;B.assertTypeofTypeAnnotation=YNe;B.assertUnaryExpression=gAe;B.assertUnaryLike=FLe;B.assertUnionTypeAnnotation=nke;B.assertUpdateExpression=yAe;B.assertUserWhitespacable=RLe;B.assertV8IntrinsicIdentifier=Dke;B.assertVariableDeclaration=xAe;B.assertVariableDeclarator=bAe;B.assertVariance=ake;B.assertVoidPattern=Wke;B.assertVoidTypeAnnotation=ike;B.assertWhile=bLe;B.assertWhileStatement=vAe;B.assertWithStatement=SAe;B.assertYieldExpression=GAe;var CIe=Ty(),L0=Sy();function $(e,t,r){if(!(0,CIe.default)(e,t,r))throw new Error(`Expected type "${e}" with option ${JSON.stringify(r)}, but instead got "${t.type}".`)}function PIe(e,t){$("ArrayExpression",e,t)}function EIe(e,t){$("AssignmentExpression",e,t)}function IIe(e,t){$("BinaryExpression",e,t)}function AIe(e,t){$("InterpreterDirective",e,t)}function NIe(e,t){$("Directive",e,t)}function kIe(e,t){$("DirectiveLiteral",e,t)}function _Ie(e,t){$("BlockStatement",e,t)}function LIe(e,t){$("BreakStatement",e,t)}function RIe(e,t){$("CallExpression",e,t)}function DIe(e,t){$("CatchClause",e,t)}function MIe(e,t){$("ConditionalExpression",e,t)}function OIe(e,t){$("ContinueStatement",e,t)}function FIe(e,t){$("DebuggerStatement",e,t)}function BIe(e,t){$("DoWhileStatement",e,t)}function $Ie(e,t){$("EmptyStatement",e,t)}function jIe(e,t){$("ExpressionStatement",e,t)}function zIe(e,t){$("File",e,t)}function UIe(e,t){$("ForInStatement",e,t)}function VIe(e,t){$("ForStatement",e,t)}function qIe(e,t){$("FunctionDeclaration",e,t)}function HIe(e,t){$("FunctionExpression",e,t)}function GIe(e,t){$("Identifier",e,t)}function KIe(e,t){$("IfStatement",e,t)}function WIe(e,t){$("LabeledStatement",e,t)}function XIe(e,t){$("StringLiteral",e,t)}function YIe(e,t){$("NumericLiteral",e,t)}function JIe(e,t){$("NullLiteral",e,t)}function ZIe(e,t){$("BooleanLiteral",e,t)}function QIe(e,t){$("RegExpLiteral",e,t)}function eAe(e,t){$("LogicalExpression",e,t)}function tAe(e,t){$("MemberExpression",e,t)}function rAe(e,t){$("NewExpression",e,t)}function nAe(e,t){$("Program",e,t)}function aAe(e,t){$("ObjectExpression",e,t)}function iAe(e,t){$("ObjectMethod",e,t)}function sAe(e,t){$("ObjectProperty",e,t)}function oAe(e,t){$("RestElement",e,t)}function lAe(e,t){$("ReturnStatement",e,t)}function cAe(e,t){$("SequenceExpression",e,t)}function uAe(e,t){$("ParenthesizedExpression",e,t)}function dAe(e,t){$("SwitchCase",e,t)}function fAe(e,t){$("SwitchStatement",e,t)}function pAe(e,t){$("ThisExpression",e,t)}function mAe(e,t){$("ThrowStatement",e,t)}function hAe(e,t){$("TryStatement",e,t)}function gAe(e,t){$("UnaryExpression",e,t)}function yAe(e,t){$("UpdateExpression",e,t)}function xAe(e,t){$("VariableDeclaration",e,t)}function bAe(e,t){$("VariableDeclarator",e,t)}function vAe(e,t){$("WhileStatement",e,t)}function SAe(e,t){$("WithStatement",e,t)}function TAe(e,t){$("AssignmentPattern",e,t)}function wAe(e,t){$("ArrayPattern",e,t)}function CAe(e,t){$("ArrowFunctionExpression",e,t)}function PAe(e,t){$("ClassBody",e,t)}function EAe(e,t){$("ClassExpression",e,t)}function IAe(e,t){$("ClassDeclaration",e,t)}function AAe(e,t){$("ExportAllDeclaration",e,t)}function NAe(e,t){$("ExportDefaultDeclaration",e,t)}function kAe(e,t){$("ExportNamedDeclaration",e,t)}function _Ae(e,t){$("ExportSpecifier",e,t)}function LAe(e,t){$("ForOfStatement",e,t)}function RAe(e,t){$("ImportDeclaration",e,t)}function DAe(e,t){$("ImportDefaultSpecifier",e,t)}function MAe(e,t){$("ImportNamespaceSpecifier",e,t)}function OAe(e,t){$("ImportSpecifier",e,t)}function FAe(e,t){$("ImportExpression",e,t)}function BAe(e,t){$("MetaProperty",e,t)}function $Ae(e,t){$("ClassMethod",e,t)}function jAe(e,t){$("ObjectPattern",e,t)}function zAe(e,t){$("SpreadElement",e,t)}function UAe(e,t){$("Super",e,t)}function VAe(e,t){$("TaggedTemplateExpression",e,t)}function qAe(e,t){$("TemplateElement",e,t)}function HAe(e,t){$("TemplateLiteral",e,t)}function GAe(e,t){$("YieldExpression",e,t)}function KAe(e,t){$("AwaitExpression",e,t)}function WAe(e,t){$("Import",e,t)}function XAe(e,t){$("BigIntLiteral",e,t)}function YAe(e,t){$("ExportNamespaceSpecifier",e,t)}function JAe(e,t){$("OptionalMemberExpression",e,t)}function ZAe(e,t){$("OptionalCallExpression",e,t)}function QAe(e,t){$("ClassProperty",e,t)}function eNe(e,t){$("ClassAccessorProperty",e,t)}function tNe(e,t){$("ClassPrivateProperty",e,t)}function rNe(e,t){$("ClassPrivateMethod",e,t)}function nNe(e,t){$("PrivateName",e,t)}function aNe(e,t){$("StaticBlock",e,t)}function iNe(e,t){$("ImportAttribute",e,t)}function sNe(e,t){$("AnyTypeAnnotation",e,t)}function oNe(e,t){$("ArrayTypeAnnotation",e,t)}function lNe(e,t){$("BooleanTypeAnnotation",e,t)}function cNe(e,t){$("BooleanLiteralTypeAnnotation",e,t)}function uNe(e,t){$("NullLiteralTypeAnnotation",e,t)}function dNe(e,t){$("ClassImplements",e,t)}function fNe(e,t){$("DeclareClass",e,t)}function pNe(e,t){$("DeclareFunction",e,t)}function mNe(e,t){$("DeclareInterface",e,t)}function hNe(e,t){$("DeclareModule",e,t)}function gNe(e,t){$("DeclareModuleExports",e,t)}function yNe(e,t){$("DeclareTypeAlias",e,t)}function xNe(e,t){$("DeclareOpaqueType",e,t)}function bNe(e,t){$("DeclareVariable",e,t)}function vNe(e,t){$("DeclareExportDeclaration",e,t)}function SNe(e,t){$("DeclareExportAllDeclaration",e,t)}function TNe(e,t){$("DeclaredPredicate",e,t)}function wNe(e,t){$("ExistsTypeAnnotation",e,t)}function CNe(e,t){$("FunctionTypeAnnotation",e,t)}function PNe(e,t){$("FunctionTypeParam",e,t)}function ENe(e,t){$("GenericTypeAnnotation",e,t)}function INe(e,t){$("InferredPredicate",e,t)}function ANe(e,t){$("InterfaceExtends",e,t)}function NNe(e,t){$("InterfaceDeclaration",e,t)}function kNe(e,t){$("InterfaceTypeAnnotation",e,t)}function _Ne(e,t){$("IntersectionTypeAnnotation",e,t)}function LNe(e,t){$("MixedTypeAnnotation",e,t)}function RNe(e,t){$("EmptyTypeAnnotation",e,t)}function DNe(e,t){$("NullableTypeAnnotation",e,t)}function MNe(e,t){$("NumberLiteralTypeAnnotation",e,t)}function ONe(e,t){$("NumberTypeAnnotation",e,t)}function FNe(e,t){$("ObjectTypeAnnotation",e,t)}function BNe(e,t){$("ObjectTypeInternalSlot",e,t)}function $Ne(e,t){$("ObjectTypeCallProperty",e,t)}function jNe(e,t){$("ObjectTypeIndexer",e,t)}function zNe(e,t){$("ObjectTypeProperty",e,t)}function UNe(e,t){$("ObjectTypeSpreadProperty",e,t)}function VNe(e,t){$("OpaqueType",e,t)}function qNe(e,t){$("QualifiedTypeIdentifier",e,t)}function HNe(e,t){$("StringLiteralTypeAnnotation",e,t)}function GNe(e,t){$("StringTypeAnnotation",e,t)}function KNe(e,t){$("SymbolTypeAnnotation",e,t)}function WNe(e,t){$("ThisTypeAnnotation",e,t)}function XNe(e,t){$("TupleTypeAnnotation",e,t)}function YNe(e,t){$("TypeofTypeAnnotation",e,t)}function JNe(e,t){$("TypeAlias",e,t)}function ZNe(e,t){$("TypeAnnotation",e,t)}function QNe(e,t){$("TypeCastExpression",e,t)}function eke(e,t){$("TypeParameter",e,t)}function tke(e,t){$("TypeParameterDeclaration",e,t)}function rke(e,t){$("TypeParameterInstantiation",e,t)}function nke(e,t){$("UnionTypeAnnotation",e,t)}function ake(e,t){$("Variance",e,t)}function ike(e,t){$("VoidTypeAnnotation",e,t)}function ske(e,t){$("EnumDeclaration",e,t)}function oke(e,t){$("EnumBooleanBody",e,t)}function lke(e,t){$("EnumNumberBody",e,t)}function cke(e,t){$("EnumStringBody",e,t)}function uke(e,t){$("EnumSymbolBody",e,t)}function dke(e,t){$("EnumBooleanMember",e,t)}function fke(e,t){$("EnumNumberMember",e,t)}function pke(e,t){$("EnumStringMember",e,t)}function mke(e,t){$("EnumDefaultedMember",e,t)}function hke(e,t){$("IndexedAccessType",e,t)}function gke(e,t){$("OptionalIndexedAccessType",e,t)}function yke(e,t){$("JSXAttribute",e,t)}function xke(e,t){$("JSXClosingElement",e,t)}function bke(e,t){$("JSXElement",e,t)}function vke(e,t){$("JSXEmptyExpression",e,t)}function Ske(e,t){$("JSXExpressionContainer",e,t)}function Tke(e,t){$("JSXSpreadChild",e,t)}function wke(e,t){$("JSXIdentifier",e,t)}function Cke(e,t){$("JSXMemberExpression",e,t)}function Pke(e,t){$("JSXNamespacedName",e,t)}function Eke(e,t){$("JSXOpeningElement",e,t)}function Ike(e,t){$("JSXSpreadAttribute",e,t)}function Ake(e,t){$("JSXText",e,t)}function Nke(e,t){$("JSXFragment",e,t)}function kke(e,t){$("JSXOpeningFragment",e,t)}function _ke(e,t){$("JSXClosingFragment",e,t)}function Lke(e,t){$("Noop",e,t)}function Rke(e,t){$("Placeholder",e,t)}function Dke(e,t){$("V8IntrinsicIdentifier",e,t)}function Mke(e,t){$("ArgumentPlaceholder",e,t)}function Oke(e,t){$("BindExpression",e,t)}function Fke(e,t){$("Decorator",e,t)}function Bke(e,t){$("DoExpression",e,t)}function $ke(e,t){$("ExportDefaultSpecifier",e,t)}function jke(e,t){$("RecordExpression",e,t)}function zke(e,t){$("TupleExpression",e,t)}function Uke(e,t){$("DecimalLiteral",e,t)}function Vke(e,t){$("ModuleExpression",e,t)}function qke(e,t){$("TopicReference",e,t)}function Hke(e,t){$("PipelineTopicExpression",e,t)}function Gke(e,t){$("PipelineBareFunction",e,t)}function Kke(e,t){$("PipelinePrimaryTopicReference",e,t)}function Wke(e,t){$("VoidPattern",e,t)}function Xke(e,t){$("TSParameterProperty",e,t)}function Yke(e,t){$("TSDeclareFunction",e,t)}function Jke(e,t){$("TSDeclareMethod",e,t)}function Zke(e,t){$("TSQualifiedName",e,t)}function Qke(e,t){$("TSCallSignatureDeclaration",e,t)}function e_e(e,t){$("TSConstructSignatureDeclaration",e,t)}function t_e(e,t){$("TSPropertySignature",e,t)}function r_e(e,t){$("TSMethodSignature",e,t)}function n_e(e,t){$("TSIndexSignature",e,t)}function a_e(e,t){$("TSAnyKeyword",e,t)}function i_e(e,t){$("TSBooleanKeyword",e,t)}function s_e(e,t){$("TSBigIntKeyword",e,t)}function o_e(e,t){$("TSIntrinsicKeyword",e,t)}function l_e(e,t){$("TSNeverKeyword",e,t)}function c_e(e,t){$("TSNullKeyword",e,t)}function u_e(e,t){$("TSNumberKeyword",e,t)}function d_e(e,t){$("TSObjectKeyword",e,t)}function f_e(e,t){$("TSStringKeyword",e,t)}function p_e(e,t){$("TSSymbolKeyword",e,t)}function m_e(e,t){$("TSUndefinedKeyword",e,t)}function h_e(e,t){$("TSUnknownKeyword",e,t)}function g_e(e,t){$("TSVoidKeyword",e,t)}function y_e(e,t){$("TSThisType",e,t)}function x_e(e,t){$("TSFunctionType",e,t)}function b_e(e,t){$("TSConstructorType",e,t)}function v_e(e,t){$("TSTypeReference",e,t)}function S_e(e,t){$("TSTypePredicate",e,t)}function T_e(e,t){$("TSTypeQuery",e,t)}function w_e(e,t){$("TSTypeLiteral",e,t)}function C_e(e,t){$("TSArrayType",e,t)}function P_e(e,t){$("TSTupleType",e,t)}function E_e(e,t){$("TSOptionalType",e,t)}function I_e(e,t){$("TSRestType",e,t)}function A_e(e,t){$("TSNamedTupleMember",e,t)}function N_e(e,t){$("TSUnionType",e,t)}function k_e(e,t){$("TSIntersectionType",e,t)}function __e(e,t){$("TSConditionalType",e,t)}function L_e(e,t){$("TSInferType",e,t)}function R_e(e,t){$("TSParenthesizedType",e,t)}function D_e(e,t){$("TSTypeOperator",e,t)}function M_e(e,t){$("TSIndexedAccessType",e,t)}function O_e(e,t){$("TSMappedType",e,t)}function F_e(e,t){$("TSTemplateLiteralType",e,t)}function B_e(e,t){$("TSLiteralType",e,t)}function $_e(e,t){$("TSExpressionWithTypeArguments",e,t)}function j_e(e,t){$("TSInterfaceDeclaration",e,t)}function z_e(e,t){$("TSInterfaceBody",e,t)}function U_e(e,t){$("TSTypeAliasDeclaration",e,t)}function V_e(e,t){$("TSInstantiationExpression",e,t)}function q_e(e,t){$("TSAsExpression",e,t)}function H_e(e,t){$("TSSatisfiesExpression",e,t)}function G_e(e,t){$("TSTypeAssertion",e,t)}function K_e(e,t){$("TSEnumBody",e,t)}function W_e(e,t){$("TSEnumDeclaration",e,t)}function X_e(e,t){$("TSEnumMember",e,t)}function Y_e(e,t){$("TSModuleDeclaration",e,t)}function J_e(e,t){$("TSModuleBlock",e,t)}function Z_e(e,t){$("TSImportType",e,t)}function Q_e(e,t){$("TSImportEqualsDeclaration",e,t)}function eLe(e,t){$("TSExternalModuleReference",e,t)}function tLe(e,t){$("TSNonNullExpression",e,t)}function rLe(e,t){$("TSExportAssignment",e,t)}function nLe(e,t){$("TSNamespaceExportDeclaration",e,t)}function aLe(e,t){$("TSTypeAnnotation",e,t)}function iLe(e,t){$("TSTypeParameterInstantiation",e,t)}function sLe(e,t){$("TSTypeParameterDeclaration",e,t)}function oLe(e,t){$("TSTypeParameter",e,t)}function lLe(e,t){$("Standardized",e,t)}function cLe(e,t){$("Expression",e,t)}function uLe(e,t){$("Binary",e,t)}function dLe(e,t){$("Scopable",e,t)}function fLe(e,t){$("BlockParent",e,t)}function pLe(e,t){$("Block",e,t)}function mLe(e,t){$("Statement",e,t)}function hLe(e,t){$("Terminatorless",e,t)}function gLe(e,t){$("CompletionStatement",e,t)}function yLe(e,t){$("Conditional",e,t)}function xLe(e,t){$("Loop",e,t)}function bLe(e,t){$("While",e,t)}function vLe(e,t){$("ExpressionWrapper",e,t)}function SLe(e,t){$("For",e,t)}function TLe(e,t){$("ForXStatement",e,t)}function wLe(e,t){$("Function",e,t)}function CLe(e,t){$("FunctionParent",e,t)}function PLe(e,t){$("Pureish",e,t)}function ELe(e,t){$("Declaration",e,t)}function ILe(e,t){$("FunctionParameter",e,t)}function ALe(e,t){$("PatternLike",e,t)}function NLe(e,t){$("LVal",e,t)}function kLe(e,t){$("TSEntityName",e,t)}function _Le(e,t){$("Literal",e,t)}function LLe(e,t){$("Immutable",e,t)}function RLe(e,t){$("UserWhitespacable",e,t)}function DLe(e,t){$("Method",e,t)}function MLe(e,t){$("ObjectMember",e,t)}function OLe(e,t){$("Property",e,t)}function FLe(e,t){$("UnaryLike",e,t)}function BLe(e,t){$("Pattern",e,t)}function $Le(e,t){$("Class",e,t)}function jLe(e,t){$("ImportOrExportDeclaration",e,t)}function zLe(e,t){$("ExportDeclaration",e,t)}function ULe(e,t){$("ModuleSpecifier",e,t)}function VLe(e,t){$("Accessor",e,t)}function qLe(e,t){$("Private",e,t)}function HLe(e,t){$("Flow",e,t)}function GLe(e,t){$("FlowType",e,t)}function KLe(e,t){$("FlowBaseAnnotation",e,t)}function WLe(e,t){$("FlowDeclaration",e,t)}function XLe(e,t){$("FlowPredicate",e,t)}function YLe(e,t){$("EnumBody",e,t)}function JLe(e,t){$("EnumMember",e,t)}function ZLe(e,t){$("JSX",e,t)}function QLe(e,t){$("Miscellaneous",e,t)}function eRe(e,t){$("TypeScript",e,t)}function tRe(e,t){$("TSTypeElement",e,t)}function rRe(e,t){$("TSType",e,t)}function nRe(e,t){$("TSBaseType",e,t)}function aRe(e,t){(0,L0.default)("assertNumberLiteral","assertNumericLiteral"),$("NumberLiteral",e,t)}function iRe(e,t){(0,L0.default)("assertRegexLiteral","assertRegExpLiteral"),$("RegexLiteral",e,t)}function sRe(e,t){(0,L0.default)("assertRestProperty","assertRestElement"),$("RestProperty",e,t)}function oRe(e,t){(0,L0.default)("assertSpreadProperty","assertSpreadElement"),$("SpreadProperty",e,t)}function lRe(e,t){(0,L0.default)("assertModuleDeclaration","assertImportOrExportDeclaration"),$("ModuleDeclaration",e,t)}});var C9=ae(M1=>{"use strict";Object.defineProperty(M1,"__esModule",{value:!0});M1.default=void 0;var mc=ao(),$bt=M1.default=cRe;function cRe(e){switch(e){case"string":return(0,mc.stringTypeAnnotation)();case"number":return(0,mc.numberTypeAnnotation)();case"undefined":return(0,mc.voidTypeAnnotation)();case"boolean":return(0,mc.booleanTypeAnnotation)();case"function":return(0,mc.genericTypeAnnotation)((0,mc.identifier)("Function"));case"object":return(0,mc.genericTypeAnnotation)((0,mc.identifier)("Object"));case"symbol":return(0,mc.genericTypeAnnotation)((0,mc.identifier)("Symbol"));case"bigint":return(0,mc.anyTypeAnnotation)()}throw new Error("Invalid typeof value: "+e)}});var IR=ae(ER=>{"use strict";Object.defineProperty(ER,"__esModule",{value:!0});ER.default=E9;var R0=va();function P9(e){return(0,R0.isIdentifier)(e)?e.name:`${e.id.name}.${P9(e.qualification)}`}function E9(e){let t=Array.from(e),r=new Map,n=new Map,a=new Set,i=[];for(let s=0;s<t.length;s++){let o=t[s];if(o&&!i.includes(o)){if((0,R0.isAnyTypeAnnotation)(o))return[o];if((0,R0.isFlowBaseAnnotation)(o)){n.set(o.type,o);continue}if((0,R0.isUnionTypeAnnotation)(o)){a.has(o.types)||(t.push(...o.types),a.add(o.types));continue}if((0,R0.isGenericTypeAnnotation)(o)){let l=P9(o.id);if(r.has(l)){let c=r.get(l);c.typeParameters?o.typeParameters&&(c.typeParameters.params.push(...o.typeParameters.params),c.typeParameters.params=E9(c.typeParameters.params)):c=o.typeParameters}else r.set(l,o);continue}i.push(o)}}for(let[,s]of n)i.push(s);for(let[,s]of r)i.push(s);return i}});var I9=ae(AR=>{"use strict";Object.defineProperty(AR,"__esModule",{value:!0});AR.default=fRe;var uRe=ao(),dRe=IR();function fRe(e){let t=(0,dRe.default)(e);return t.length===1?t[0]:(0,uRe.unionTypeAnnotation)(t)}});var k9=ae(NR=>{"use strict";Object.defineProperty(NR,"__esModule",{value:!0});NR.default=N9;var Ny=va();function A9(e){return(0,Ny.isIdentifier)(e)?e.name:(0,Ny.isThisExpression)(e)?"this":`${e.right.name}.${A9(e.left)}`}function N9(e){let t=Array.from(e),r=new Map,n=new Map,a=new Set,i=[];for(let s=0;s<t.length;s++){let o=t[s];if(!o||i.includes(o))continue;if((0,Ny.isTSAnyKeyword)(o))return[o];if((0,Ny.isTSBaseType)(o)){n.set(o.type,o);continue}if((0,Ny.isTSUnionType)(o)){a.has(o.types)||(t.push(...o.types),a.add(o.types));continue}let l="typeParameters";if((0,Ny.isTSTypeReference)(o)&&o[l]){let c=o[l],u=A9(o.typeName);if(r.has(u)){let d=r.get(u),f=d[l];f?(f.params.push(...c.params),f.params=N9(f.params)):d=c}else r.set(u,o);continue}i.push(o)}for(let[,s]of n)i.push(s);for(let[,s]of r)i.push(s);return i}});var _9=ae(kR=>{"use strict";Object.defineProperty(kR,"__esModule",{value:!0});kR.default=gRe;var pRe=ao(),mRe=k9(),hRe=va();function gRe(e){let t=e.map(n=>(0,hRe.isTSTypeAnnotation)(n)?n.typeAnnotation:n),r=(0,mRe.default)(t);return r.length===1?r[0]:(0,pRe.tsUnionType)(r)}});var LR=ae(_R=>{"use strict";Object.defineProperty(_R,"__esModule",{value:!0});_R.buildUndefinedNode=yRe;var L9=ao();function yRe(){return(0,L9.unaryExpression)("void",(0,L9.numericLiteral)(0),!0)}});var Rf=ae(DR=>{"use strict";Object.defineProperty(DR,"__esModule",{value:!0});DR.default=xRe;var R9=bl(),D9=va(),{hasOwn:Qc}={hasOwn:Function.call.bind(Object.prototype.hasOwnProperty)};function M9(e,t,r,n){return e&&typeof e.type=="string"?O9(e,t,r,n):e}function RR(e,t,r,n){return Array.isArray(e)?e.map(a=>M9(a,t,r,n)):M9(e,t,r,n)}function xRe(e,t=!0,r=!1){return O9(e,t,r,new Map)}function O9(e,t=!0,r=!1,n){if(!e)return e;let{type:a}=e,i={type:e.type};if((0,D9.isIdentifier)(e))i.name=e.name,Qc(e,"optional")&&typeof e.optional=="boolean"&&(i.optional=e.optional),Qc(e,"typeAnnotation")&&(i.typeAnnotation=t?RR(e.typeAnnotation,!0,r,n):e.typeAnnotation),Qc(e,"decorators")&&(i.decorators=t?RR(e.decorators,!0,r,n):e.decorators);else if(Qc(R9.NODE_FIELDS,a))for(let s of Object.keys(R9.NODE_FIELDS[a]))Qc(e,s)&&(t?i[s]=(0,D9.isFile)(e)&&s==="comments"?O1(e.comments,t,r,n):RR(e[s],!0,r,n):i[s]=e[s]);else throw new Error(`Unknown node type: "${a}"`);return Qc(e,"loc")&&(r?i.loc=null:i.loc=e.loc),Qc(e,"leadingComments")&&(i.leadingComments=O1(e.leadingComments,t,r,n)),Qc(e,"innerComments")&&(i.innerComments=O1(e.innerComments,t,r,n)),Qc(e,"trailingComments")&&(i.trailingComments=O1(e.trailingComments,t,r,n)),Qc(e,"extra")&&(i.extra=Object.assign({},e.extra)),i}function O1(e,t,r,n){return!e||!t?e:e.map(a=>{let i=n.get(a);if(i)return i;let{type:s,value:o,loc:l}=a,c={type:s,value:o,loc:l};return r&&(c.loc=null),n.set(a,c),c})}});var F9=ae(MR=>{"use strict";Object.defineProperty(MR,"__esModule",{value:!0});MR.default=vRe;var bRe=Rf();function vRe(e){return(0,bRe.default)(e,!1)}});var B9=ae(OR=>{"use strict";Object.defineProperty(OR,"__esModule",{value:!0});OR.default=TRe;var SRe=Rf();function TRe(e){return(0,SRe.default)(e)}});var $9=ae(FR=>{"use strict";Object.defineProperty(FR,"__esModule",{value:!0});FR.default=CRe;var wRe=Rf();function CRe(e){return(0,wRe.default)(e,!0,!0)}});var j9=ae(BR=>{"use strict";Object.defineProperty(BR,"__esModule",{value:!0});BR.default=ERe;var PRe=Rf();function ERe(e){return(0,PRe.default)(e,!1,!0)}});var jR=ae($R=>{"use strict";Object.defineProperty($R,"__esModule",{value:!0});$R.default=IRe;function IRe(e,t,r){if(!r||!e)return e;let n=`${t}Comments`;return e[n]?t==="leading"?e[n]=r.concat(e[n]):e[n].push(...r):e[n]=r,e}});var z9=ae(zR=>{"use strict";Object.defineProperty(zR,"__esModule",{value:!0});zR.default=NRe;var ARe=jR();function NRe(e,t,r,n){return(0,ARe.default)(e,t,[{type:n?"CommentLine":"CommentBlock",value:r}])}});var F1=ae(UR=>{"use strict";Object.defineProperty(UR,"__esModule",{value:!0});UR.default=kRe;function kRe(e,t,r){t&&r&&(t[e]=Array.from(new Set([].concat(t[e],r[e]).filter(Boolean))))}});var qR=ae(VR=>{"use strict";Object.defineProperty(VR,"__esModule",{value:!0});VR.default=LRe;var _Re=F1();function LRe(e,t){(0,_Re.default)("innerComments",e,t)}});var GR=ae(HR=>{"use strict";Object.defineProperty(HR,"__esModule",{value:!0});HR.default=DRe;var RRe=F1();function DRe(e,t){(0,RRe.default)("leadingComments",e,t)}});var WR=ae(KR=>{"use strict";Object.defineProperty(KR,"__esModule",{value:!0});KR.default=ORe;var MRe=F1();function ORe(e,t){(0,MRe.default)("trailingComments",e,t)}});var YR=ae(XR=>{"use strict";Object.defineProperty(XR,"__esModule",{value:!0});XR.default=jRe;var FRe=WR(),BRe=GR(),$Re=qR();function jRe(e,t){return(0,FRe.default)(e,t),(0,BRe.default)(e,t),(0,$Re.default)(e,t),e}});var U9=ae(JR=>{"use strict";Object.defineProperty(JR,"__esModule",{value:!0});JR.default=URe;var zRe=Cy();function URe(e){return zRe.COMMENT_KEYS.forEach(t=>{e[t]=null}),e}});var V9=ae(ze=>{"use strict";Object.defineProperty(ze,"__esModule",{value:!0});ze.WHILE_TYPES=ze.USERWHITESPACABLE_TYPES=ze.UNARYLIKE_TYPES=ze.TYPESCRIPT_TYPES=ze.TSTYPE_TYPES=ze.TSTYPEELEMENT_TYPES=ze.TSENTITYNAME_TYPES=ze.TSBASETYPE_TYPES=ze.TERMINATORLESS_TYPES=ze.STATEMENT_TYPES=ze.STANDARDIZED_TYPES=ze.SCOPABLE_TYPES=ze.PUREISH_TYPES=ze.PROPERTY_TYPES=ze.PRIVATE_TYPES=ze.PATTERN_TYPES=ze.PATTERNLIKE_TYPES=ze.OBJECTMEMBER_TYPES=ze.MODULESPECIFIER_TYPES=ze.MODULEDECLARATION_TYPES=ze.MISCELLANEOUS_TYPES=ze.METHOD_TYPES=ze.LVAL_TYPES=ze.LOOP_TYPES=ze.LITERAL_TYPES=ze.JSX_TYPES=ze.IMPORTOREXPORTDECLARATION_TYPES=ze.IMMUTABLE_TYPES=ze.FUNCTION_TYPES=ze.FUNCTIONPARENT_TYPES=ze.FUNCTIONPARAMETER_TYPES=ze.FOR_TYPES=ze.FORXSTATEMENT_TYPES=ze.FLOW_TYPES=ze.FLOWTYPE_TYPES=ze.FLOWPREDICATE_TYPES=ze.FLOWDECLARATION_TYPES=ze.FLOWBASEANNOTATION_TYPES=ze.EXPRESSION_TYPES=ze.EXPRESSIONWRAPPER_TYPES=ze.EXPORTDECLARATION_TYPES=ze.ENUMMEMBER_TYPES=ze.ENUMBODY_TYPES=ze.DECLARATION_TYPES=ze.CONDITIONAL_TYPES=ze.COMPLETIONSTATEMENT_TYPES=ze.CLASS_TYPES=ze.BLOCK_TYPES=ze.BLOCKPARENT_TYPES=ze.BINARY_TYPES=ze.ACCESSOR_TYPES=void 0;var Zt=bl(),ivt=ze.STANDARDIZED_TYPES=Zt.FLIPPED_ALIAS_KEYS.Standardized,svt=ze.EXPRESSION_TYPES=Zt.FLIPPED_ALIAS_KEYS.Expression,ovt=ze.BINARY_TYPES=Zt.FLIPPED_ALIAS_KEYS.Binary,lvt=ze.SCOPABLE_TYPES=Zt.FLIPPED_ALIAS_KEYS.Scopable,cvt=ze.BLOCKPARENT_TYPES=Zt.FLIPPED_ALIAS_KEYS.BlockParent,uvt=ze.BLOCK_TYPES=Zt.FLIPPED_ALIAS_KEYS.Block,dvt=ze.STATEMENT_TYPES=Zt.FLIPPED_ALIAS_KEYS.Statement,fvt=ze.TERMINATORLESS_TYPES=Zt.FLIPPED_ALIAS_KEYS.Terminatorless,pvt=ze.COMPLETIONSTATEMENT_TYPES=Zt.FLIPPED_ALIAS_KEYS.CompletionStatement,mvt=ze.CONDITIONAL_TYPES=Zt.FLIPPED_ALIAS_KEYS.Conditional,hvt=ze.LOOP_TYPES=Zt.FLIPPED_ALIAS_KEYS.Loop,gvt=ze.WHILE_TYPES=Zt.FLIPPED_ALIAS_KEYS.While,yvt=ze.EXPRESSIONWRAPPER_TYPES=Zt.FLIPPED_ALIAS_KEYS.ExpressionWrapper,xvt=ze.FOR_TYPES=Zt.FLIPPED_ALIAS_KEYS.For,bvt=ze.FORXSTATEMENT_TYPES=Zt.FLIPPED_ALIAS_KEYS.ForXStatement,vvt=ze.FUNCTION_TYPES=Zt.FLIPPED_ALIAS_KEYS.Function,Svt=ze.FUNCTIONPARENT_TYPES=Zt.FLIPPED_ALIAS_KEYS.FunctionParent,Tvt=ze.PUREISH_TYPES=Zt.FLIPPED_ALIAS_KEYS.Pureish,wvt=ze.DECLARATION_TYPES=Zt.FLIPPED_ALIAS_KEYS.Declaration,Cvt=ze.FUNCTIONPARAMETER_TYPES=Zt.FLIPPED_ALIAS_KEYS.FunctionParameter,Pvt=ze.PATTERNLIKE_TYPES=Zt.FLIPPED_ALIAS_KEYS.PatternLike,Evt=ze.LVAL_TYPES=Zt.FLIPPED_ALIAS_KEYS.LVal,Ivt=ze.TSENTITYNAME_TYPES=Zt.FLIPPED_ALIAS_KEYS.TSEntityName,Avt=ze.LITERAL_TYPES=Zt.FLIPPED_ALIAS_KEYS.Literal,Nvt=ze.IMMUTABLE_TYPES=Zt.FLIPPED_ALIAS_KEYS.Immutable,kvt=ze.USERWHITESPACABLE_TYPES=Zt.FLIPPED_ALIAS_KEYS.UserWhitespacable,_vt=ze.METHOD_TYPES=Zt.FLIPPED_ALIAS_KEYS.Method,Lvt=ze.OBJECTMEMBER_TYPES=Zt.FLIPPED_ALIAS_KEYS.ObjectMember,Rvt=ze.PROPERTY_TYPES=Zt.FLIPPED_ALIAS_KEYS.Property,Dvt=ze.UNARYLIKE_TYPES=Zt.FLIPPED_ALIAS_KEYS.UnaryLike,Mvt=ze.PATTERN_TYPES=Zt.FLIPPED_ALIAS_KEYS.Pattern,Ovt=ze.CLASS_TYPES=Zt.FLIPPED_ALIAS_KEYS.Class,VRe=ze.IMPORTOREXPORTDECLARATION_TYPES=Zt.FLIPPED_ALIAS_KEYS.ImportOrExportDeclaration,Fvt=ze.EXPORTDECLARATION_TYPES=Zt.FLIPPED_ALIAS_KEYS.ExportDeclaration,Bvt=ze.MODULESPECIFIER_TYPES=Zt.FLIPPED_ALIAS_KEYS.ModuleSpecifier,$vt=ze.ACCESSOR_TYPES=Zt.FLIPPED_ALIAS_KEYS.Accessor,jvt=ze.PRIVATE_TYPES=Zt.FLIPPED_ALIAS_KEYS.Private,zvt=ze.FLOW_TYPES=Zt.FLIPPED_ALIAS_KEYS.Flow,Uvt=ze.FLOWTYPE_TYPES=Zt.FLIPPED_ALIAS_KEYS.FlowType,Vvt=ze.FLOWBASEANNOTATION_TYPES=Zt.FLIPPED_ALIAS_KEYS.FlowBaseAnnotation,qvt=ze.FLOWDECLARATION_TYPES=Zt.FLIPPED_ALIAS_KEYS.FlowDeclaration,Hvt=ze.FLOWPREDICATE_TYPES=Zt.FLIPPED_ALIAS_KEYS.FlowPredicate,Gvt=ze.ENUMBODY_TYPES=Zt.FLIPPED_ALIAS_KEYS.EnumBody,Kvt=ze.ENUMMEMBER_TYPES=Zt.FLIPPED_ALIAS_KEYS.EnumMember,Wvt=ze.JSX_TYPES=Zt.FLIPPED_ALIAS_KEYS.JSX,Xvt=ze.MISCELLANEOUS_TYPES=Zt.FLIPPED_ALIAS_KEYS.Miscellaneous,Yvt=ze.TYPESCRIPT_TYPES=Zt.FLIPPED_ALIAS_KEYS.TypeScript,Jvt=ze.TSTYPEELEMENT_TYPES=Zt.FLIPPED_ALIAS_KEYS.TSTypeElement,Zvt=ze.TSTYPE_TYPES=Zt.FLIPPED_ALIAS_KEYS.TSType,Qvt=ze.TSBASETYPE_TYPES=Zt.FLIPPED_ALIAS_KEYS.TSBaseType,e0t=ze.MODULEDECLARATION_TYPES=VRe});var eD=ae(QR=>{"use strict";Object.defineProperty(QR,"__esModule",{value:!0});QR.default=qRe;var B1=va(),ZR=ao();function qRe(e,t){if((0,B1.isBlockStatement)(e))return e;let r=[];return(0,B1.isEmptyStatement)(e)?r=[]:((0,B1.isStatement)(e)||((0,B1.isFunction)(t)?e=(0,ZR.returnStatement)(e):e=(0,ZR.expressionStatement)(e)),r=[e]),(0,ZR.blockStatement)(r)}});var q9=ae(tD=>{"use strict";Object.defineProperty(tD,"__esModule",{value:!0});tD.default=GRe;var HRe=eD();function GRe(e,t="body"){let r=(0,HRe.default)(e[t],e);return e[t]=r,r}});var nD=ae(rD=>{"use strict";Object.defineProperty(rD,"__esModule",{value:!0});rD.default=XRe;var KRe=wy(),WRe=P0();function XRe(e){e=e+"";let t="";for(let r of e)t+=(0,WRe.isIdentifierChar)(r.codePointAt(0))?r:"-";return t=t.replace(/^[-0-9]+/,""),t=t.replace(/[-\s]+(.)?/g,function(r,n){return n?n.toUpperCase():""}),(0,KRe.default)(t)||(t=`_${t}`),t||"_"}});var H9=ae(aD=>{"use strict";Object.defineProperty(aD,"__esModule",{value:!0});aD.default=JRe;var YRe=nD();function JRe(e){return e=(0,YRe.default)(e),(e==="eval"||e==="arguments")&&(e="_"+e),e}});var G9=ae(iD=>{"use strict";Object.defineProperty(iD,"__esModule",{value:!0});iD.default=eDe;var ZRe=va(),QRe=ao();function eDe(e,t=e.key||e.property){return!e.computed&&(0,ZRe.isIdentifier)(t)&&(t=(0,QRe.stringLiteral)(t.name)),t}});var K9=ae($1=>{"use strict";Object.defineProperty($1,"__esModule",{value:!0});$1.default=void 0;var D0=va(),o0t=$1.default=tDe;function tDe(e){if((0,D0.isExpressionStatement)(e)&&(e=e.expression),(0,D0.isExpression)(e))return e;if((0,D0.isClass)(e)?(e.type="ClassExpression",e.abstract=!1):(0,D0.isFunction)(e)&&(e.type="FunctionExpression"),!(0,D0.isExpression)(e))throw new Error(`cannot turn ${e.type} to an expression`);return e}});var oD=ae(sD=>{"use strict";Object.defineProperty(sD,"__esModule",{value:!0});sD.default=M0;var rDe=bl(),W9=Symbol(),X9=Symbol();function M0(e,t,r){if(!e)return!1;let n=rDe.VISITOR_KEYS[e.type];if(!n)return!1;r=r||{};let a=t(e,r);if(a!==void 0)switch(a){case W9:return!1;case X9:return!0}for(let i of n){let s=e[i];if(s){if(Array.isArray(s)){for(let o of s)if(M0(o,t,r))return!0}else if(M0(s,t,r))return!0}}return!1}M0.skip=W9;M0.stop=X9});var cD=ae(lD=>{"use strict";Object.defineProperty(lD,"__esModule",{value:!0});lD.default=iDe;var nDe=Cy(),Y9=["tokens","start","end","loc","raw","rawValue"],aDe=[...nDe.COMMENT_KEYS,"comments",...Y9];function iDe(e,t={}){let r=t.preserveComments?Y9:aDe;for(let a of r)e[a]!=null&&(e[a]=void 0);for(let a of Object.keys(e))a[0]==="_"&&e[a]!=null&&(e[a]=void 0);let n=Object.getOwnPropertySymbols(e);for(let a of n)e[a]=null}});var dD=ae(uD=>{"use strict";Object.defineProperty(uD,"__esModule",{value:!0});uD.default=lDe;var sDe=oD(),oDe=cD();function lDe(e,t){return(0,sDe.default)(e,oDe.default,t),e}});var Z9=ae(fD=>{"use strict";Object.defineProperty(fD,"__esModule",{value:!0});fD.default=Vm;var J9=va(),cDe=Rf(),uDe=dD();function Vm(e,t=e.key){let r;return e.kind==="method"?Vm.increment()+"":((0,J9.isIdentifier)(t)?r=t.name:(0,J9.isStringLiteral)(t)?r=JSON.stringify(t.value):r=JSON.stringify((0,uDe.default)((0,cDe.default)(t))),e.computed&&(r=`[${r}]`),e.static&&(r=`static:${r}`),r)}Vm.uid=0;Vm.increment=function(){return Vm.uid>=Number.MAX_SAFE_INTEGER?Vm.uid=0:Vm.uid++}});var Q9=ae(z1=>{"use strict";Object.defineProperty(z1,"__esModule",{value:!0});z1.default=void 0;var j1=va(),dDe=ao(),p0t=z1.default=fDe;function fDe(e,t){if((0,j1.isStatement)(e))return e;let r=!1,n;if((0,j1.isClass)(e))r=!0,n="ClassDeclaration";else if((0,j1.isFunction)(e))r=!0,n="FunctionDeclaration";else if((0,j1.isAssignmentExpression)(e))return(0,dDe.expressionStatement)(e);if(r&&!e.id&&(n=!1),!n){if(t)return!1;throw new Error(`cannot turn ${e.type} to a statement`)}return e.type=n,e}});var eq=ae(U1=>{"use strict";Object.defineProperty(U1,"__esModule",{value:!0});U1.default=void 0;var pDe=wy(),Ha=ao(),h0t=U1.default=pD,mDe=Function.call.bind(Object.prototype.toString);function hDe(e){return mDe(e)==="[object RegExp]"}function gDe(e){if(typeof e!="object"||e===null||Object.prototype.toString.call(e)!=="[object Object]")return!1;let t=Object.getPrototypeOf(e);return t===null||Object.getPrototypeOf(t)===null}function pD(e){if(e===void 0)return(0,Ha.identifier)("undefined");if(e===!0||e===!1)return(0,Ha.booleanLiteral)(e);if(e===null)return(0,Ha.nullLiteral)();if(typeof e=="string")return(0,Ha.stringLiteral)(e);if(typeof e=="number"){let t;if(Number.isFinite(e))t=(0,Ha.numericLiteral)(Math.abs(e));else{let r;Number.isNaN(e)?r=(0,Ha.numericLiteral)(0):r=(0,Ha.numericLiteral)(1),t=(0,Ha.binaryExpression)("/",r,(0,Ha.numericLiteral)(0))}return(e<0||Object.is(e,-0))&&(t=(0,Ha.unaryExpression)("-",t)),t}if(typeof e=="bigint")return e<0?(0,Ha.unaryExpression)("-",(0,Ha.bigIntLiteral)(-e)):(0,Ha.bigIntLiteral)(e);if(hDe(e)){let t=e.source,r=/\/([a-z]*)$/.exec(e.toString())[1];return(0,Ha.regExpLiteral)(t,r)}if(Array.isArray(e))return(0,Ha.arrayExpression)(e.map(pD));if(gDe(e)){let t=[];for(let r of Object.keys(e)){let n,a=!1;(0,pDe.default)(r)?r==="__proto__"?(a=!0,n=(0,Ha.stringLiteral)(r)):n=(0,Ha.identifier)(r):n=(0,Ha.stringLiteral)(r),t.push((0,Ha.objectProperty)(n,pD(e[r]),a))}return(0,Ha.objectExpression)(t)}throw new Error("don't know how to turn this value into a node")}});var tq=ae(mD=>{"use strict";Object.defineProperty(mD,"__esModule",{value:!0});mD.default=xDe;var yDe=ao();function xDe(e,t,r=!1){return e.object=(0,yDe.memberExpression)(e.object,e.property,e.computed),e.property=t,e.computed=!!r,e}});var nq=ae(hD=>{"use strict";Object.defineProperty(hD,"__esModule",{value:!0});hD.default=vDe;var rq=Cy(),bDe=YR();function vDe(e,t){if(!e||!t)return e;for(let r of rq.INHERIT_KEYS.optional)e[r]==null&&(e[r]=t[r]);for(let r of Object.keys(t))r[0]==="_"&&r!=="__clone"&&(e[r]=t[r]);for(let r of rq.INHERIT_KEYS.force)e[r]=t[r];return(0,bDe.default)(e,t),e}});var aq=ae(gD=>{"use strict";Object.defineProperty(gD,"__esModule",{value:!0});gD.default=wDe;var SDe=ao(),TDe=xr();function wDe(e,t){if((0,TDe.isSuper)(e.object))throw new Error("Cannot prepend node to super property access (`super.foo`).");return e.object=(0,SDe.memberExpression)(t,e.object),e}});var iq=ae(yD=>{"use strict";Object.defineProperty(yD,"__esModule",{value:!0});yD.default=CDe;function CDe(e){let t=[].concat(e),r=Object.create(null);for(;t.length;){let n=t.pop();if(n)switch(n.type){case"ArrayPattern":t.push(...n.elements);break;case"AssignmentExpression":case"AssignmentPattern":case"ForInStatement":case"ForOfStatement":t.push(n.left);break;case"ObjectPattern":t.push(...n.properties);break;case"ObjectProperty":t.push(n.value);break;case"RestElement":case"UpdateExpression":t.push(n.argument);break;case"UnaryExpression":n.operator==="delete"&&t.push(n.argument);break;case"Identifier":r[n.name]=n;break;default:break}}return r}});var O0=ae(bD=>{"use strict";Object.defineProperty(bD,"__esModule",{value:!0});bD.default=xD;var Ju=va();function xD(e,t,r,n){let a=[].concat(e),i=Object.create(null);for(;a.length;){let s=a.shift();if(!s||n&&((0,Ju.isAssignmentExpression)(s)||(0,Ju.isUnaryExpression)(s)||(0,Ju.isUpdateExpression)(s)))continue;if((0,Ju.isIdentifier)(s)){t?(i[s.name]=i[s.name]||[]).push(s):i[s.name]=s;continue}if((0,Ju.isExportDeclaration)(s)&&!(0,Ju.isExportAllDeclaration)(s)){(0,Ju.isDeclaration)(s.declaration)&&a.push(s.declaration);continue}if(r){if((0,Ju.isFunctionDeclaration)(s)){a.push(s.id);continue}if((0,Ju.isFunctionExpression)(s))continue}let o=xD.keys[s.type];if(o)for(let l=0;l<o.length;l++){let c=o[l],u=s[c];u&&(Array.isArray(u)?a.push(...u):a.push(u))}}return i}var PDe={DeclareClass:["id"],DeclareFunction:["id"],DeclareModule:["id"],DeclareVariable:["id"],DeclareInterface:["id"],DeclareTypeAlias:["id"],DeclareOpaqueType:["id"],InterfaceDeclaration:["id"],TypeAlias:["id"],OpaqueType:["id"],CatchClause:["param"],LabeledStatement:["label"],UnaryExpression:["argument"],AssignmentExpression:["left"],ImportSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportDefaultSpecifier:["local"],ImportDeclaration:["specifiers"],TSImportEqualsDeclaration:["id"],ExportSpecifier:["exported"],ExportNamespaceSpecifier:["exported"],ExportDefaultSpecifier:["exported"],FunctionDeclaration:["id","params"],FunctionExpression:["id","params"],ArrowFunctionExpression:["params"],ObjectMethod:["params"],ClassMethod:["params"],ClassPrivateMethod:["params"],ForInStatement:["left"],ForOfStatement:["left"],ClassDeclaration:["id"],ClassExpression:["id"],RestElement:["argument"],UpdateExpression:["argument"],ObjectProperty:["value"],AssignmentPattern:["left"],ArrayPattern:["elements"],ObjectPattern:["properties"],VariableDeclaration:["declarations"],VariableDeclarator:["id"]};xD.keys=PDe});var sq=ae(V1=>{"use strict";Object.defineProperty(V1,"__esModule",{value:!0});V1.default=void 0;var EDe=O0(),T0t=V1.default=IDe;function IDe(e,t){return(0,EDe.default)(e,t,!0)}});var lq=ae(vD=>{"use strict";Object.defineProperty(vD,"__esModule",{value:!0});vD.default=NDe;var vl=va();function ADe(e){return(0,vl.isNullLiteral)(e)?"null":(0,vl.isRegExpLiteral)(e)?`/${e.pattern}/${e.flags}`:(0,vl.isTemplateLiteral)(e)?e.quasis.map(t=>t.value.raw).join(""):e.value!==void 0?String(e.value):null}function oq(e){if(!e.computed||(0,vl.isLiteral)(e.key))return e.key}function NDe(e,t){if("id"in e&&e.id)return{name:e.id.name,originalNode:e.id};let r="",n;if((0,vl.isObjectProperty)(t,{value:e})?n=oq(t):(0,vl.isObjectMethod)(e)||(0,vl.isClassMethod)(e)?(n=oq(e),e.kind==="get"?r="get ":e.kind==="set"&&(r="set ")):(0,vl.isVariableDeclarator)(t,{init:e})?n=t.id:(0,vl.isAssignmentExpression)(t,{operator:"=",right:e})&&(n=t.left),!n)return null;let a=(0,vl.isLiteral)(n)?ADe(n):(0,vl.isIdentifier)(n)?n.name:(0,vl.isPrivateName)(n)?n.id.name:null;return a==null?null:{name:r+a,originalNode:n}}});var cq=ae(TD=>{"use strict";Object.defineProperty(TD,"__esModule",{value:!0});TD.default=_De;var kDe=bl();function _De(e,t,r){typeof t=="function"&&(t={enter:t});let{enter:n,exit:a}=t;SD(e,n,a,r,[])}function SD(e,t,r,n,a){let i=kDe.VISITOR_KEYS[e.type];if(i){t&&t(e,a,n);for(let s of i){let o=e[s];if(Array.isArray(o))for(let l=0;l<o.length;l++){let c=o[l];c&&(a.push({node:e,key:s,index:l}),SD(c,t,r,n,a),a.pop())}else o&&(a.push({node:e,key:s}),SD(o,t,r,n,a),a.pop())}r&&r(e,a,n)}}});var uq=ae(wD=>{"use strict";Object.defineProperty(wD,"__esModule",{value:!0});wD.default=RDe;var LDe=O0();function RDe(e,t,r){if(r&&e.type==="Identifier"&&t.type==="ObjectProperty"&&r.type==="ObjectExpression")return!1;let n=LDe.default.keys[t.type];if(n)for(let a=0;a<n.length;a++){let i=n[a],s=t[i];if(Array.isArray(s)){if(s.includes(e))return!0}else if(s===e)return!0}return!1}});var PD=ae(CD=>{"use strict";Object.defineProperty(CD,"__esModule",{value:!0});CD.default=MDe;var DDe=va();dq=Symbol.for("var used to be block scoped");var dq;function MDe(e){return(0,DDe.isVariableDeclaration)(e)&&(e.kind!=="var"||e[dq])}});var pq=ae(ED=>{"use strict";Object.defineProperty(ED,"__esModule",{value:!0});ED.default=FDe;var fq=va(),ODe=PD();function FDe(e){return(0,fq.isFunctionDeclaration)(e)||(0,fq.isClassDeclaration)(e)||(0,ODe.default)(e)}});var mq=ae(ID=>{"use strict";Object.defineProperty(ID,"__esModule",{value:!0});ID.default=jDe;var BDe=P1(),$De=va();function jDe(e){return(0,BDe.default)(e.type,"Immutable")?!0:(0,$De.isIdentifier)(e)?e.name==="undefined":!1}});var gq=ae(ND=>{"use strict";Object.defineProperty(ND,"__esModule",{value:!0});ND.default=AD;var hq=bl();function AD(e,t){if(typeof e!="object"||typeof t!="object"||e==null||t==null)return e===t;if(e.type!==t.type)return!1;let r=Object.keys(hq.NODE_FIELDS[e.type]||e.type),n=hq.VISITOR_KEYS[e.type];for(let a of r){let i=e[a],s=t[a];if(typeof i!=typeof s)return!1;if(!(i==null&&s==null)){if(i==null||s==null)return!1;if(Array.isArray(i)){if(!Array.isArray(s)||i.length!==s.length)return!1;for(let o=0;o<i.length;o++)if(!AD(i[o],s[o]))return!1;continue}if(typeof i=="object"&&!(n!=null&&n.includes(a))){for(let o of Object.keys(i))if(i[o]!==s[o])return!1;continue}if(!AD(i,s))return!1}}return!0}});var yq=ae(kD=>{"use strict";Object.defineProperty(kD,"__esModule",{value:!0});kD.default=zDe;function zDe(e,t,r){switch(t.type){case"MemberExpression":case"OptionalMemberExpression":return t.property===e?!!t.computed:t.object===e;case"JSXMemberExpression":return t.object===e;case"VariableDeclarator":return t.init===e;case"ArrowFunctionExpression":return t.body===e;case"PrivateName":return!1;case"ClassMethod":case"ClassPrivateMethod":case"ObjectMethod":return t.key===e?!!t.computed:!1;case"ObjectProperty":return t.key===e?!!t.computed:!r||r.type!=="ObjectPattern";case"ClassProperty":case"ClassAccessorProperty":return t.key===e?!!t.computed:!0;case"ClassPrivateProperty":return t.key!==e;case"ClassDeclaration":case"ClassExpression":return t.superClass===e;case"AssignmentExpression":return t.right===e;case"AssignmentPattern":return t.right===e;case"LabeledStatement":return!1;case"CatchClause":return!1;case"RestElement":return!1;case"BreakStatement":case"ContinueStatement":return!1;case"FunctionDeclaration":case"FunctionExpression":return!1;case"ExportNamespaceSpecifier":case"ExportDefaultSpecifier":return!1;case"ExportSpecifier":return r!=null&&r.source?!1:t.local===e;case"ImportDefaultSpecifier":case"ImportNamespaceSpecifier":case"ImportSpecifier":return!1;case"ImportAttribute":return!1;case"JSXAttribute":return!1;case"ObjectPattern":case"ArrayPattern":return!1;case"MetaProperty":return!1;case"ObjectTypeProperty":return t.key!==e;case"TSEnumMember":return t.id!==e;case"TSPropertySignature":return t.key===e?!!t.computed:!0}return!0}});var xq=ae(_D=>{"use strict";Object.defineProperty(_D,"__esModule",{value:!0});_D.default=UDe;var qm=va();function UDe(e,t){return(0,qm.isBlockStatement)(e)&&((0,qm.isFunction)(t)||(0,qm.isCatchClause)(t))?!1:(0,qm.isPattern)(e)&&((0,qm.isFunction)(t)||(0,qm.isCatchClause)(t))?!0:(0,qm.isScopable)(e)}});var vq=ae(LD=>{"use strict";Object.defineProperty(LD,"__esModule",{value:!0});LD.default=VDe;var bq=va();function VDe(e){return(0,bq.isImportDefaultSpecifier)(e)||(0,bq.isIdentifier)(e.imported||e.exported,{name:"default"})}});var Sq=ae(RD=>{"use strict";Object.defineProperty(RD,"__esModule",{value:!0});RD.default=GDe;var qDe=wy(),HDe=new Set(["abstract","boolean","byte","char","double","enum","final","float","goto","implements","int","interface","long","native","package","private","protected","public","short","static","synchronized","throws","transient","volatile"]);function GDe(e){return(0,qDe.default)(e)&&!HDe.has(e)}});var wq=ae(DD=>{"use strict";Object.defineProperty(DD,"__esModule",{value:!0});DD.default=WDe;var KDe=va();Tq=Symbol.for("var used to be block scoped");var Tq;function WDe(e){return(0,KDe.isVariableDeclaration)(e,{kind:"var"})&&!e[Tq]}});var Cq=ae(FD=>{"use strict";Object.defineProperty(FD,"__esModule",{value:!0});FD.default=q1;var XDe=O0(),Hm=va(),MD=ao(),OD=LR(),YDe=Rf();function q1(e,t){let r=[],n=!0;for(let a of e)if((0,Hm.isEmptyStatement)(a)||(n=!1),(0,Hm.isExpression)(a))r.push(a);else if((0,Hm.isExpressionStatement)(a))r.push(a.expression);else if((0,Hm.isVariableDeclaration)(a)){if(a.kind!=="var")return;for(let i of a.declarations){let s=(0,XDe.default)(i);for(let o of Object.keys(s))t.push({kind:a.kind,id:(0,YDe.default)(s[o])});i.init&&r.push((0,MD.assignmentExpression)("=",i.id,i.init))}n=!0}else if((0,Hm.isIfStatement)(a)){let i=a.consequent?q1([a.consequent],t):(0,OD.buildUndefinedNode)(),s=a.alternate?q1([a.alternate],t):(0,OD.buildUndefinedNode)();if(!i||!s)return;r.push((0,MD.conditionalExpression)(a.test,i,s))}else if((0,Hm.isBlockStatement)(a)){let i=q1(a.body,t);if(!i)return;r.push(i)}else if((0,Hm.isEmptyStatement)(a))e.indexOf(a)===0&&(n=!0);else return;return n&&r.push((0,OD.buildUndefinedNode)()),r.length===1?r[0]:(0,MD.sequenceExpression)(r)}});var Pq=ae(BD=>{"use strict";Object.defineProperty(BD,"__esModule",{value:!0});BD.default=ZDe;var JDe=Cq();function ZDe(e,t){if(!(e!=null&&e.length))return;let r=[],n=(0,JDe.default)(e,r);if(n){for(let a of r)t.push(a);return n}}});var xr=ae(et=>{"use strict";Object.defineProperty(et,"__esModule",{value:!0});var Df={react:!0,assertNode:!0,createTypeAnnotationBasedOnTypeof:!0,createUnionTypeAnnotation:!0,createFlowUnionType:!0,createTSUnionType:!0,cloneNode:!0,clone:!0,cloneDeep:!0,cloneDeepWithoutLoc:!0,cloneWithoutLoc:!0,addComment:!0,addComments:!0,inheritInnerComments:!0,inheritLeadingComments:!0,inheritsComments:!0,inheritTrailingComments:!0,removeComments:!0,ensureBlock:!0,toBindingIdentifierName:!0,toBlock:!0,toComputedKey:!0,toExpression:!0,toIdentifier:!0,toKeyAlias:!0,toStatement:!0,valueToNode:!0,appendToMemberExpression:!0,inherits:!0,prependToMemberExpression:!0,removeProperties:!0,removePropertiesDeep:!0,removeTypeDuplicates:!0,getAssignmentIdentifiers:!0,getBindingIdentifiers:!0,getOuterBindingIdentifiers:!0,getFunctionName:!0,traverse:!0,traverseFast:!0,shallowEqual:!0,is:!0,isBinding:!0,isBlockScoped:!0,isImmutable:!0,isLet:!0,isNode:!0,isNodesEquivalent:!0,isPlaceholderType:!0,isReferenced:!0,isScope:!0,isSpecifierDefault:!0,isType:!0,isValidES3Identifier:!0,isValidIdentifier:!0,isVar:!0,matchesPattern:!0,validate:!0,buildMatchMemberExpression:!0,__internal__deprecationWarning:!0};Object.defineProperty(et,"__internal__deprecationWarning",{enumerable:!0,get:function(){return rMe.default}});Object.defineProperty(et,"addComment",{enumerable:!0,get:function(){return u2e.default}});Object.defineProperty(et,"addComments",{enumerable:!0,get:function(){return d2e.default}});Object.defineProperty(et,"appendToMemberExpression",{enumerable:!0,get:function(){return E2e.default}});Object.defineProperty(et,"assertNode",{enumerable:!0,get:function(){return r2e.default}});Object.defineProperty(et,"buildMatchMemberExpression",{enumerable:!0,get:function(){return tMe.default}});Object.defineProperty(et,"clone",{enumerable:!0,get:function(){return s2e.default}});Object.defineProperty(et,"cloneDeep",{enumerable:!0,get:function(){return o2e.default}});Object.defineProperty(et,"cloneDeepWithoutLoc",{enumerable:!0,get:function(){return l2e.default}});Object.defineProperty(et,"cloneNode",{enumerable:!0,get:function(){return i2e.default}});Object.defineProperty(et,"cloneWithoutLoc",{enumerable:!0,get:function(){return c2e.default}});Object.defineProperty(et,"createFlowUnionType",{enumerable:!0,get:function(){return Eq.default}});Object.defineProperty(et,"createTSUnionType",{enumerable:!0,get:function(){return a2e.default}});Object.defineProperty(et,"createTypeAnnotationBasedOnTypeof",{enumerable:!0,get:function(){return n2e.default}});Object.defineProperty(et,"createUnionTypeAnnotation",{enumerable:!0,get:function(){return Eq.default}});Object.defineProperty(et,"ensureBlock",{enumerable:!0,get:function(){return y2e.default}});Object.defineProperty(et,"getAssignmentIdentifiers",{enumerable:!0,get:function(){return L2e.default}});Object.defineProperty(et,"getBindingIdentifiers",{enumerable:!0,get:function(){return R2e.default}});Object.defineProperty(et,"getFunctionName",{enumerable:!0,get:function(){return M2e.default}});Object.defineProperty(et,"getOuterBindingIdentifiers",{enumerable:!0,get:function(){return D2e.default}});Object.defineProperty(et,"inheritInnerComments",{enumerable:!0,get:function(){return f2e.default}});Object.defineProperty(et,"inheritLeadingComments",{enumerable:!0,get:function(){return p2e.default}});Object.defineProperty(et,"inheritTrailingComments",{enumerable:!0,get:function(){return h2e.default}});Object.defineProperty(et,"inherits",{enumerable:!0,get:function(){return I2e.default}});Object.defineProperty(et,"inheritsComments",{enumerable:!0,get:function(){return m2e.default}});Object.defineProperty(et,"is",{enumerable:!0,get:function(){return B2e.default}});Object.defineProperty(et,"isBinding",{enumerable:!0,get:function(){return $2e.default}});Object.defineProperty(et,"isBlockScoped",{enumerable:!0,get:function(){return j2e.default}});Object.defineProperty(et,"isImmutable",{enumerable:!0,get:function(){return z2e.default}});Object.defineProperty(et,"isLet",{enumerable:!0,get:function(){return U2e.default}});Object.defineProperty(et,"isNode",{enumerable:!0,get:function(){return V2e.default}});Object.defineProperty(et,"isNodesEquivalent",{enumerable:!0,get:function(){return q2e.default}});Object.defineProperty(et,"isPlaceholderType",{enumerable:!0,get:function(){return H2e.default}});Object.defineProperty(et,"isReferenced",{enumerable:!0,get:function(){return G2e.default}});Object.defineProperty(et,"isScope",{enumerable:!0,get:function(){return K2e.default}});Object.defineProperty(et,"isSpecifierDefault",{enumerable:!0,get:function(){return W2e.default}});Object.defineProperty(et,"isType",{enumerable:!0,get:function(){return X2e.default}});Object.defineProperty(et,"isValidES3Identifier",{enumerable:!0,get:function(){return Y2e.default}});Object.defineProperty(et,"isValidIdentifier",{enumerable:!0,get:function(){return J2e.default}});Object.defineProperty(et,"isVar",{enumerable:!0,get:function(){return Z2e.default}});Object.defineProperty(et,"matchesPattern",{enumerable:!0,get:function(){return Q2e.default}});Object.defineProperty(et,"prependToMemberExpression",{enumerable:!0,get:function(){return A2e.default}});et.react=void 0;Object.defineProperty(et,"removeComments",{enumerable:!0,get:function(){return g2e.default}});Object.defineProperty(et,"removeProperties",{enumerable:!0,get:function(){return N2e.default}});Object.defineProperty(et,"removePropertiesDeep",{enumerable:!0,get:function(){return k2e.default}});Object.defineProperty(et,"removeTypeDuplicates",{enumerable:!0,get:function(){return _2e.default}});Object.defineProperty(et,"shallowEqual",{enumerable:!0,get:function(){return F2e.default}});Object.defineProperty(et,"toBindingIdentifierName",{enumerable:!0,get:function(){return x2e.default}});Object.defineProperty(et,"toBlock",{enumerable:!0,get:function(){return b2e.default}});Object.defineProperty(et,"toComputedKey",{enumerable:!0,get:function(){return v2e.default}});Object.defineProperty(et,"toExpression",{enumerable:!0,get:function(){return S2e.default}});Object.defineProperty(et,"toIdentifier",{enumerable:!0,get:function(){return T2e.default}});Object.defineProperty(et,"toKeyAlias",{enumerable:!0,get:function(){return w2e.default}});Object.defineProperty(et,"toStatement",{enumerable:!0,get:function(){return C2e.default}});Object.defineProperty(et,"traverse",{enumerable:!0,get:function(){return H1.default}});Object.defineProperty(et,"traverseFast",{enumerable:!0,get:function(){return O2e.default}});Object.defineProperty(et,"validate",{enumerable:!0,get:function(){return eMe.default}});Object.defineProperty(et,"valueToNode",{enumerable:!0,get:function(){return P2e.default}});var QDe=NV(),e2e=kV(),t2e=S9(),r2e=T9(),$D=w9();Object.keys($D).forEach(function(e){e==="default"||e==="__esModule"||Object.prototype.hasOwnProperty.call(Df,e)||e in et&&et[e]===$D[e]||Object.defineProperty(et,e,{enumerable:!0,get:function(){return $D[e]}})});var n2e=C9(),Eq=I9(),a2e=_9(),jD=LR();Object.keys(jD).forEach(function(e){e==="default"||e==="__esModule"||Object.prototype.hasOwnProperty.call(Df,e)||e in et&&et[e]===jD[e]||Object.defineProperty(et,e,{enumerable:!0,get:function(){return jD[e]}})});var zD=ao();Object.keys(zD).forEach(function(e){e==="default"||e==="__esModule"||Object.prototype.hasOwnProperty.call(Df,e)||e in et&&et[e]===zD[e]||Object.defineProperty(et,e,{enumerable:!0,get:function(){return zD[e]}})});var i2e=Rf(),s2e=F9(),o2e=B9(),l2e=$9(),c2e=j9(),u2e=z9(),d2e=jR(),f2e=qR(),p2e=GR(),m2e=YR(),h2e=WR(),g2e=U9(),UD=V9();Object.keys(UD).forEach(function(e){e==="default"||e==="__esModule"||Object.prototype.hasOwnProperty.call(Df,e)||e in et&&et[e]===UD[e]||Object.defineProperty(et,e,{enumerable:!0,get:function(){return UD[e]}})});var VD=Cy();Object.keys(VD).forEach(function(e){e==="default"||e==="__esModule"||Object.prototype.hasOwnProperty.call(Df,e)||e in et&&et[e]===VD[e]||Object.defineProperty(et,e,{enumerable:!0,get:function(){return VD[e]}})});var y2e=q9(),x2e=H9(),b2e=eD(),v2e=G9(),S2e=K9(),T2e=nD(),w2e=Z9(),C2e=Q9(),P2e=eq(),qD=bl();Object.keys(qD).forEach(function(e){e==="default"||e==="__esModule"||Object.prototype.hasOwnProperty.call(Df,e)||e in et&&et[e]===qD[e]||Object.defineProperty(et,e,{enumerable:!0,get:function(){return qD[e]}})});var E2e=tq(),I2e=nq(),A2e=aq(),N2e=cD(),k2e=dD(),_2e=IR(),L2e=iq(),R2e=O0(),D2e=sq(),M2e=lq(),H1=cq();Object.keys(H1).forEach(function(e){e==="default"||e==="__esModule"||Object.prototype.hasOwnProperty.call(Df,e)||e in et&&et[e]===H1[e]||Object.defineProperty(et,e,{enumerable:!0,get:function(){return H1[e]}})});var O2e=oD(),F2e=w1(),B2e=Ty(),$2e=uq(),j2e=pq(),z2e=mq(),U2e=PD(),V2e=CR(),q2e=gq(),H2e=WL(),G2e=yq(),K2e=xq(),W2e=vq(),X2e=P1(),Y2e=Sq(),J2e=wy(),Z2e=wq(),Q2e=UL(),eMe=N1(),tMe=qL(),HD=va();Object.keys(HD).forEach(function(e){e==="default"||e==="__esModule"||Object.prototype.hasOwnProperty.call(Df,e)||e in et&&et[e]===HD[e]||Object.defineProperty(et,e,{enumerable:!0,get:function(){return HD[e]}})});var rMe=Sy(),nMe=Pq(),B0t=et.react={isReactComponent:QDe.default,isCompatTag:e2e.default,buildChildren:t2e.default};et.toSequenceExpression=nMe.default;process.env.BABEL_TYPES_8_BREAKING});var GD=ae(Ga=>{"use strict";Object.defineProperty(Ga,"__esModule",{value:!0});Ga.isBindingIdentifier=EMe;Ga.isBlockScoped=_Me;Ga.isExpression=AMe;Ga.isFlow=OMe;Ga.isForAwaitStatement=$Me;Ga.isGenerated=DMe;Ga.isPure=MMe;Ga.isReferenced=kMe;Ga.isReferencedIdentifier=CMe;Ga.isReferencedMemberExpression=PMe;Ga.isRestProperty=FMe;Ga.isScope=NMe;Ga.isSpreadProperty=BMe;Ga.isStatement=IMe;Ga.isUser=RMe;Ga.isVar=LMe;var aMe=xr(),{isBinding:iMe,isBlockScoped:sMe,isExportDeclaration:oMe,isExpression:lMe,isFlow:cMe,isForStatement:uMe,isForXStatement:dMe,isIdentifier:Iq,isImportDeclaration:fMe,isImportSpecifier:pMe,isJSXIdentifier:mMe,isJSXMemberExpression:hMe,isMemberExpression:gMe,isRestElement:Aq,isReferenced:G1,isScope:yMe,isStatement:xMe,isVar:bMe,isVariableDeclaration:vMe,react:SMe,isForOfStatement:TMe}=aMe,{isCompatTag:wMe}=SMe;function CMe(e){let{node:t,parent:r}=this;return Iq(t,e)?G1(t,r,this.parentPath.parent):mMe(t,e)?!hMe(r)&&wMe(t.name)?!1:G1(t,r,this.parentPath.parent):!1}function PMe(){let{node:e,parent:t}=this;return gMe(e)&&G1(e,t)}function EMe(){let{node:e,parent:t}=this,r=this.parentPath.parent;return Iq(e)&&iMe(e,t,r)}function IMe(){let{node:e,parent:t}=this;return xMe(e)?!(vMe(e)&&(dMe(t,{left:e})||uMe(t,{init:e}))):!1}function AMe(){return this.isIdentifier()?this.isReferencedIdentifier():lMe(this.node)}function NMe(){return yMe(this.node,this.parent)}function kMe(){return G1(this.node,this.parent)}function _Me(){return sMe(this.node)}function LMe(){return bMe(this.node)}function RMe(){var e;return!!((e=this.node)!=null&&e.loc)}function DMe(){return!this.isUser()}function MMe(e){return this.scope.isPure(this.node,e)}function OMe(){let{node:e}=this;return cMe(e)?!0:fMe(e)?e.importKind==="type"||e.importKind==="typeof":oMe(e)?e.exportKind==="type":pMe(e)?e.importKind==="type"||e.importKind==="typeof":!1}function FMe(){var e;return Aq(this.node)&&((e=this.parentPath)==null?void 0:e.isObjectPattern())}function BMe(){var e;return Aq(this.node)&&((e=this.parentPath)==null?void 0:e.isObjectExpression())}function $Me(){return TMe(this.node,{await:!0})}Ga.isExistentialTypeParam=function(){throw new Error("`path.isExistentialTypeParam` has been renamed to `path.isExistsTypeAnnotation()` in Babel 7.")},Ga.isNumericLiteralTypeAnnotation=function(){throw new Error("`path.isNumericLiteralTypeAnnotation()` has been renamed to `path.isNumberLiteralTypeAnnotation()` in Babel 7.")}});var B0=ae(Km=>{"use strict";Object.defineProperty(Km,"__esModule",{value:!0});Km.environmentVisitor=KMe;Km.explode=$q;Km.isExplodedVisitor=Bq;Km.merge=zq;Km.verify=jq;var Fq=BL(),jMe=GD(),zMe=xr(),Nq=Sl(),{DEPRECATED_KEYS:kq,DEPRECATED_ALIASES:_q,FLIPPED_ALIAS_KEYS:Lq,TYPES:UMe,__internal__deprecationWarning:Rq}=zMe;function VMe(e){return e in Fq}function Bq(e){return e?._exploded}function $q(e){if(Bq(e))return e;e._exploded=!0;for(let r of Object.keys(e)){if(Gm(r))continue;let n=r.split("|");if(n.length===1)continue;let a=e[r];delete e[r];for(let i of n)e[i]=a}jq(e),delete e.__esModule,qMe(e),Oq(e);for(let r of Object.keys(e)){if(Gm(r)||!VMe(r))continue;let n=e[r];for(let i of Object.keys(n))n[i]=HMe(r,n[i]);delete e[r];let a=Fq[r];if(a!==null)for(let i of a){var t;(t=e[i])!=null||(e[i]={}),F0(e[i],n)}else F0(e,n)}for(let r of Object.keys(e)){if(Gm(r))continue;let n=Lq[r];if(r in kq){let i=kq[r];Rq(r,i,"Visitor "),n=[i]}else if(r in _q){let i=_q[r];Rq(r,i,"Visitor "),n=Lq[i]}if(!n)continue;let a=e[r];delete e[r];for(let i of n){let s=e[i];s?F0(s,a):e[i]=Object.assign({},a)}}for(let r of Object.keys(e))Gm(r)||Oq(e[r]);return e}function jq(e){if(!e._verified){if(typeof e=="function")throw new Error("You passed `traverse()` a function when it expected a visitor object, are you sure you didn't mean `{ enter: Function }`?");for(let t of Object.keys(e)){if((t==="enter"||t==="exit")&&Dq(t,e[t]),Gm(t))continue;if(!UMe.includes(t))throw new Error(`You gave us a visitor for the node type ${t} but it's not a valid type in @babel/traverse 7.28.5`);let r=e[t];if(typeof r=="object")for(let n of Object.keys(r))if(n==="enter"||n==="exit")Dq(`${t}.${n}`,r[n]);else throw new Error(`You passed \`traverse()\` a visitor object with the property ${t} that has the invalid property ${n}`)}e._verified=!0}}function Dq(e,t){let r=[].concat(t);for(let n of r)if(typeof n!="function")throw new TypeError(`Non-function found defined in ${e} with type ${typeof n}`)}function zq(e,t=[],r){let n={_verified:!0,_exploded:!0};Object.defineProperty(n,"_exploded",{enumerable:!1}),Object.defineProperty(n,"_verified",{enumerable:!1});for(let a=0;a<e.length;a++){let i=$q(e[a]),s=t[a],o=i;(s||r)&&(o=Mq(o,s,r)),F0(n,o);for(let l of Object.keys(i)){if(Gm(l))continue;let c=i[l];(s||r)&&(c=Mq(c,s,r));let u=n[l]||(n[l]={});F0(u,c)}}return n}function Mq(e,t,r){let n={};for(let a of["enter","exit"]){let i=e[a];Array.isArray(i)&&(i=i.map(function(s){let o=s;return t&&(o=function(l){s.call(t,l,t)}),r&&(o=r(t?.key,a,o)),o!==s&&(o.toString=()=>s.toString()),o}),n[a]=i)}return n}function qMe(e){for(let t of Object.keys(e)){if(Gm(t))continue;let r=e[t];typeof r=="function"&&(e[t]={enter:r})}}function Oq(e){e.enter&&!Array.isArray(e.enter)&&(e.enter=[e.enter]),e.exit&&!Array.isArray(e.exit)&&(e.exit=[e.exit])}function HMe(e,t){let r=`is${e}`,n=jMe[r],a=function(i){if(n.call(i))return t.apply(this,arguments)};return a.toString=()=>t.toString(),a}function Gm(e){return e[0]==="_"||e==="enter"||e==="exit"||e==="shouldSkip"||e==="denylist"||e==="noScope"||e==="skipKeys"||e==="blacklist"}function F0(e,t){for(let r of["enter","exit"])t[r]&&(e[r]=[].concat(e[r]||[],t[r]))}var GMe={FunctionParent(e){e.isArrowFunctionExpression()||(e.skip(),e.isMethod()&&(e.requeueComputedKeyAndDecorators?e.requeueComputedKeyAndDecorators():Nq.requeueComputedKeyAndDecorators.call(e)))},Property(e){e.isObjectProperty()||(e.skip(),e.requeueComputedKeyAndDecorators?e.requeueComputedKeyAndDecorators():Nq.requeueComputedKeyAndDecorators.call(e))}};function KMe(e){return zq([GMe,e])}});var Uq=ae(W1=>{"use strict";Object.defineProperty(W1,"__esModule",{value:!0});W1.default=void 0;var K1=xr(),WMe=K1,XMe=X1(),YMe=B0(),JMe=Sl(),{getAssignmentIdentifiers:ZMe}=WMe,QMe={ReferencedIdentifier({node:e},t){e.name===t.oldName&&(e.name=t.newName)},Scope(e,t){e.scope.bindingIdentifierEquals(t.oldName,t.binding.identifier)||(e.skip(),e.isMethod()&&(e.requeueComputedKeyAndDecorators?e.requeueComputedKeyAndDecorators():JMe.requeueComputedKeyAndDecorators.call(e)))},ObjectProperty({node:e,scope:t},r){let{name:n}=e.key;if(e.shorthand&&(n===r.oldName||n===r.newName)&&t.getBindingIdentifier(n)===r.binding.identifier){e.shorthand=!1;{var a;(a=e.extra)!=null&&a.shorthand&&(e.extra.shorthand=!1)}}},"AssignmentExpression|Declaration|VariableDeclarator"(e,t){if(e.isVariableDeclaration())return;let r=e.isAssignmentExpression()?ZMe(e.node):e.getOuterBindingIdentifiers();for(let n in r)n===t.oldName&&(r[n].name=t.newName)}},KD=class{constructor(t,r,n){this.newName=n,this.oldName=r,this.binding=t}maybeConvertFromExportDeclaration(t){let r=t.parentPath;if(r.isExportDeclaration()){if(r.isExportDefaultDeclaration()){let{declaration:n}=r.node;if(K1.isDeclaration(n)&&!n.id)return}r.isExportAllDeclaration()||r.splitExportDeclaration()}}maybeConvertFromClassFunctionDeclaration(t){return t}maybeConvertFromClassFunctionExpression(t){return t}rename(){let{binding:t,oldName:r,newName:n}=this,{scope:a,path:i}=t,s=i.find(c=>c.isDeclaration()||c.isFunctionExpression()||c.isClassExpression());s&&s.getOuterBindingIdentifiers()[r]===t.identifier&&this.maybeConvertFromExportDeclaration(s);let o=arguments[0]||a.block,l={discriminant:!0};K1.isMethod(o)&&(o.computed&&(l.key=!0),K1.isObjectMethod(o)||(l.decorators=!0)),(0,XMe.traverseNode)(o,(0,YMe.explode)(QMe),a,this,a.path,l),arguments[0]||(a.removeOwnBinding(r),a.bindings[n]=t,this.binding.identifier.name=n),s&&(this.maybeConvertFromClassFunctionDeclaration(i),this.maybeConvertFromClassFunctionExpression(i))}};W1.default=KD});var Vq=ae(WD=>{"use strict";Object.defineProperty(WD,"__esModule",{value:!0});WD.default=iOe;var eOe=xr(),tOe=ky(),rOe=B0(),nOe=Sl(),{VISITOR_KEYS:aOe}=eOe;function iOe(e,t,r){let n=(0,rOe.explode)(t);if(n.enter||n.exit)throw new Error("Should not be used with enter/exit visitors.");a(e.parentPath,e.parent,e.node,e.container,e.key,e.listKey,e.hub,e);function a(i,s,o,l,c,u,d,f){if(!o)return;let p=f||tOe.NodePath.get({hub:d,parentPath:i,parent:s,container:l,listKey:u,key:c});nOe.setScope.call(p);let m=n[o.type];if(m){if(m.enter)for(let x of m.enter)x.call(r,p,r);if(m.exit)for(let x of m.exit)x.call(r,p,r)}if(p.shouldSkip)return;let h=aOe[o.type];if(h!=null&&h.length)for(let x of h){let g=o[x];if(g)if(Array.isArray(g))for(let y=0;y<g.length;y++){let b=g[y];a(p,o,b,g,y,x)}else a(p,o,g,o,x,null)}}}});var qq=ae(Y1=>{"use strict";Object.defineProperty(Y1,"__esModule",{value:!0});Y1.default=void 0;var XD=class{constructor({identifier:t,scope:r,path:n,kind:a}){this.identifier=void 0,this.scope=void 0,this.path=void 0,this.kind=void 0,this.constantViolations=[],this.constant=!0,this.referencePaths=[],this.referenced=!1,this.references=0,this.identifier=t,this.scope=r,this.path=n,this.kind=a,(a==="var"||a==="hoisted")&&sOe(n)&&this.reassign(n),this.clearValue()}deoptValue(){this.clearValue(),this.hasDeoptedValue=!0}setValue(t){this.hasDeoptedValue||(this.hasValue=!0,this.value=t)}clearValue(){this.hasDeoptedValue=!1,this.hasValue=!1,this.value=null}reassign(t){this.constant=!1,!this.constantViolations.includes(t)&&this.constantViolations.push(t)}reference(t){this.referencePaths.includes(t)||(this.referenced=!0,this.references++,this.referencePaths.push(t))}dereference(){this.references--,this.referenced=!!this.references}};Y1.default=XD;function sOe(e){let t=!e.isVariableDeclarator()||e.node.init;for(let{parentPath:r,key:n}=e;r;{parentPath:r,key:n}=r){if(r.isFunctionParent())return!1;if(n==="left"&&r.isForXStatement()||t&&n==="body"&&r.isLoop())return!0}return!1}});var Wm=ae(Mo=>{"use strict";Object.defineProperty(Mo,"__esModule",{value:!0});Mo.clear=lOe;Mo.clearPath=Hq;Mo.clearScope=Gq;Mo.getCachedPaths=cOe;Mo.getOrCreateCachedPaths=uOe;Mo.scope=Mo.path=void 0;var J1=Mo.path=new WeakMap,oOe=Mo.scope=new WeakMap;function lOe(){Hq(),Gq()}function Hq(){Mo.path=J1=new WeakMap}function Gq(){Mo.scope=oOe=new WeakMap}function cOe(e){let{parent:t,parentPath:r}=e;return J1.get(t)}function uOe(e,t){let r=J1.get(e);return r||J1.set(e,r=new Map),r}});var Kq=ae((G0t,dOe)=>{dOe.exports=["decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","eval","globalThis","isFinite","isNaN","parseFloat","parseInt","undefined","unescape"]});var Wq=ae((K0t,fOe)=>{fOe.exports=["AggregateError","Array","ArrayBuffer","Atomics","BigInt","BigInt64Array","BigUint64Array","Boolean","DataView","Date","Error","EvalError","FinalizationRegistry","Float16Array","Float32Array","Float64Array","Function","Infinity","Int16Array","Int32Array","Int8Array","Intl","Iterator","JSON","Map","Math","NaN","Number","Object","Promise","Proxy","RangeError","ReferenceError","Reflect","RegExp","Set","SharedArrayBuffer","String","Symbol","SyntaxError","TypeError","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray","URIError","WeakMap","WeakRef","WeakSet"]});var e2=ae(Q1=>{"use strict";Object.defineProperty(Q1,"__esModule",{value:!0});Q1.default=void 0;var pOe=Uq(),nH=ky(),W0t=Vq(),mOe=qq(),aH=xr(),iH=aH,Xq=Wm(),hOe=Kq(),gOe=Wq(),{assignmentExpression:yOe,callExpression:Yq,cloneNode:Jq,getBindingIdentifiers:sH,identifier:Ym,isArrayExpression:oH,isBinary:xOe,isCallExpression:Zq,isClass:bOe,isClassBody:vOe,isClassDeclaration:SOe,isExportAllDeclaration:lH,isExportDefaultDeclaration:TOe,isExportNamedDeclaration:YD,isFunctionDeclaration:wOe,isIdentifier:Xm,isImportDeclaration:JD,isLiteral:COe,isMemberExpression:POe,isMethod:EOe,isModuleSpecifier:IOe,isNullLiteral:AOe,isObjectExpression:NOe,isProperty:kOe,isPureish:_Oe,isRegExpLiteral:LOe,isSuper:ROe,isTaggedTemplateExpression:DOe,isTemplateLiteral:cH,isThisExpression:Qq,isUnaryExpression:MOe,isVariableDeclaration:OOe,expressionStatement:FOe,matchesPattern:eH,memberExpression:ZD,numericLiteral:BOe,toIdentifier:$Oe,variableDeclaration:jOe,variableDeclarator:zOe,isRecordExpression:UOe,isTupleExpression:VOe,isObjectProperty:qOe,isTopicReference:tH,isMetaProperty:HOe,isPrivateName:GOe,isExportDeclaration:KOe,buildUndefinedNode:WOe,sequenceExpression:XOe}=aH;function Mn(e,t){switch(e?.type){default:if(JD(e)||KOe(e)){var r;if((lH(e)||YD(e)||JD(e))&&e.source)Mn(e.source,t);else if((YD(e)||JD(e))&&(r=e.specifiers)!=null&&r.length)for(let n of e.specifiers)Mn(n,t);else(TOe(e)||YD(e))&&e.declaration&&Mn(e.declaration,t)}else IOe(e)?Mn(e.local,t):COe(e)&&!AOe(e)&&!LOe(e)&&!cH(e)&&t.push(e.value);break;case"MemberExpression":case"OptionalMemberExpression":case"JSXMemberExpression":Mn(e.object,t),Mn(e.property,t);break;case"Identifier":case"JSXIdentifier":t.push(e.name);break;case"CallExpression":case"OptionalCallExpression":case"NewExpression":Mn(e.callee,t);break;case"ObjectExpression":case"ObjectPattern":for(let n of e.properties)Mn(n,t);break;case"SpreadElement":case"RestElement":Mn(e.argument,t);break;case"ObjectProperty":case"ObjectMethod":case"ClassProperty":case"ClassMethod":case"ClassPrivateProperty":case"ClassPrivateMethod":Mn(e.key,t);break;case"ThisExpression":t.push("this");break;case"Super":t.push("super");break;case"Import":case"ImportExpression":t.push("import");break;case"DoExpression":t.push("do");break;case"YieldExpression":t.push("yield"),Mn(e.argument,t);break;case"AwaitExpression":t.push("await"),Mn(e.argument,t);break;case"AssignmentExpression":Mn(e.left,t);break;case"VariableDeclarator":Mn(e.id,t);break;case"FunctionExpression":case"FunctionDeclaration":case"ClassExpression":case"ClassDeclaration":Mn(e.id,t);break;case"PrivateName":Mn(e.id,t);break;case"ParenthesizedExpression":Mn(e.expression,t);break;case"UnaryExpression":case"UpdateExpression":Mn(e.argument,t);break;case"MetaProperty":Mn(e.meta,t),Mn(e.property,t);break;case"JSXElement":Mn(e.openingElement,t);break;case"JSXOpeningElement":Mn(e.name,t);break;case"JSXFragment":Mn(e.openingFragment,t);break;case"JSXOpeningFragment":t.push("Fragment");break;case"JSXNamespacedName":Mn(e.namespace,t),Mn(e.name,t);break}}function rH(e){e.references=Object.create(null),e.uids=Object.create(null),e.bindings=Object.create(null),e.globals=Object.create(null)}function YOe(e){return e.isFunctionExpression()&&!e.node.id||e.isArrowFunctionExpression()}QD=Symbol.for("should not be considered a local binding");var QD,JOe={ForStatement(e){let t=e.get("init");if(t.isVar()){let{scope:r}=e;(r.getFunctionParent()||r.getProgramParent()).registerBinding("var",t)}},Declaration(e){if(e.isBlockScoped()||e.isImportDeclaration()||e.isExportDeclaration())return;(e.scope.getFunctionParent()||e.scope.getProgramParent()).registerDeclaration(e)},ImportDeclaration(e){e.scope.getBlockParent().registerDeclaration(e)},TSImportEqualsDeclaration(e){e.scope.getBlockParent().registerDeclaration(e)},ReferencedIdentifier(e,t){iH.isTSQualifiedName(e.parent)&&e.parent.right===e.node||e.parentPath.isTSImportEqualsDeclaration()||t.references.push(e)},ForXStatement(e,t){let r=e.get("left");if(r.isPattern()||r.isIdentifier())t.constantViolations.push(e);else if(r.isVar()){let{scope:n}=e;(n.getFunctionParent()||n.getProgramParent()).registerBinding("var",r)}},ExportDeclaration:{exit(e){let{node:t,scope:r}=e;if(lH(t))return;let n=t.declaration;if(SOe(n)||wOe(n)){let a=n.id;if(!a)return;let i=r.getBinding(a.name);i?.reference(e)}else if(OOe(n))for(let a of n.declarations)for(let i of Object.keys(sH(a))){let s=r.getBinding(i);s?.reference(e)}}},LabeledStatement(e){e.scope.getBlockParent().registerDeclaration(e)},AssignmentExpression(e,t){t.assignments.push(e)},UpdateExpression(e,t){t.constantViolations.push(e)},UnaryExpression(e,t){e.node.operator==="delete"&&t.constantViolations.push(e)},BlockScoped(e){let t=e.scope;if(t.path===e&&(t=t.parent),t.getBlockParent().registerDeclaration(e),e.isClassDeclaration()&&e.node.id){let a=e.node.id.name;e.scope.bindings[a]=e.scope.parent.getBinding(a)}},CatchClause(e){e.scope.registerBinding("let",e)},Function(e){let t=e.get("params");for(let r of t)e.scope.registerBinding("param",r);e.isFunctionExpression()&&e.node.id&&!e.node.id[QD]&&e.scope.registerBinding("local",e.get("id"),e)},ClassExpression(e){e.node.id&&!e.node.id[QD]&&e.scope.registerBinding("local",e.get("id"),e)},TSTypeAnnotation(e){e.skip()}},Z1,ZOe=0,io=class{constructor(t){this.uid=void 0,this.path=void 0,this.block=void 0,this.inited=void 0,this.labels=void 0,this.bindings=void 0,this.referencesSet=void 0,this.globals=void 0,this.uidsSet=void 0,this.data=void 0,this.crawling=void 0;let{node:r}=t,n=Xq.scope.get(r);if(n?.path===t)return n;Xq.scope.set(r,this),this.uid=ZOe++,this.block=r,this.path=t,this.labels=new Map,this.inited=!1,Object.defineProperties(this,{references:{enumerable:!0,configurable:!0,writable:!0,value:Object.create(null)},uids:{enumerable:!0,configurable:!0,writable:!0,value:Object.create(null)}})}get parent(){var t;let r,n=this.path;do{var a;let i=n.key==="key"||n.listKey==="decorators";n=n.parentPath,i&&n.isMethod()&&(n=n.parentPath),(a=n)!=null&&a.isScope()&&(r=n)}while(n&&!r);return(t=r)==null?void 0:t.scope}get references(){throw new Error("Scope#references is not available in Babel 8. Use Scope#referencesSet instead.")}get uids(){throw new Error("Scope#uids is not available in Babel 8. Use Scope#uidsSet instead.")}generateDeclaredUidIdentifier(t){let r=this.generateUidIdentifier(t);return this.push({id:r}),Jq(r)}generateUidIdentifier(t){return Ym(this.generateUid(t))}generateUid(t="temp"){t=$Oe(t).replace(/^_+/,"").replace(/\d+$/g,"");let r,n=0;do r=`_${t}`,n>=11?r+=n-1:n>=9?r+=n-9:n>=1&&(r+=n+1),n++;while(this.hasLabel(r)||this.hasBinding(r)||this.hasGlobal(r)||this.hasReference(r));let a=this.getProgramParent();return a.references[r]=!0,a.uids[r]=!0,r}generateUidBasedOnNode(t,r){let n=[];Mn(t,n);let a=n.join("$");return a=a.replace(/^_/,"")||r||"ref",this.generateUid(a.slice(0,20))}generateUidIdentifierBasedOnNode(t,r){return Ym(this.generateUidBasedOnNode(t,r))}isStatic(t){if(Qq(t)||ROe(t)||tH(t))return!0;if(Xm(t)){let r=this.getBinding(t.name);return r?r.constant:this.hasBinding(t.name)}return!1}maybeGenerateMemoised(t,r){if(this.isStatic(t))return null;{let n=this.generateUidIdentifierBasedOnNode(t);return r?n:(this.push({id:n}),Jq(n))}}checkBlockScopedCollisions(t,r,n,a){if(r==="param"||t.kind==="local")return;if(r==="let"||t.kind==="let"||t.kind==="const"||t.kind==="module"||t.kind==="param"&&r==="const")throw this.path.hub.buildError(a,`Duplicate declaration "${n}"`,TypeError)}rename(t,r){let n=this.getBinding(t);n&&(r||(r=this.generateUidIdentifier(t).name),new pOe.default(n,t,r).rename(arguments[2]))}dump(){let t="-".repeat(60),r=this;do for(let n of Object.keys(r.bindings)){let a=r.bindings[n]}while(r=r.parent)}hasLabel(t){return!!this.getLabel(t)}getLabel(t){return this.labels.get(t)}registerLabel(t){this.labels.set(t.node.label.name,t)}registerDeclaration(t){if(t.isLabeledStatement())this.registerLabel(t);else if(t.isFunctionDeclaration())this.registerBinding("hoisted",t.get("id"),t);else if(t.isVariableDeclaration()){let r=t.get("declarations"),{kind:n}=t.node;for(let a of r)this.registerBinding(n==="using"||n==="await using"?"const":n,a)}else if(t.isClassDeclaration()){if(t.node.declare)return;this.registerBinding("let",t)}else if(t.isImportDeclaration()){let r=t.node.importKind==="type"||t.node.importKind==="typeof",n=t.get("specifiers");for(let a of n){let i=r||a.isImportSpecifier()&&(a.node.importKind==="type"||a.node.importKind==="typeof");this.registerBinding(i?"unknown":"module",a)}}else if(t.isExportDeclaration()){let r=t.get("declaration");(r.isClassDeclaration()||r.isFunctionDeclaration()||r.isVariableDeclaration())&&this.registerDeclaration(r)}else this.registerBinding("unknown",t)}buildUndefinedNode(){return WOe()}registerConstantViolation(t){let r=t.getAssignmentIdentifiers();for(let a of Object.keys(r)){var n;(n=this.getBinding(a))==null||n.reassign(t)}}registerBinding(t,r,n=r){if(!t)throw new ReferenceError("no `kind`");if(r.isVariableDeclaration()){let s=r.get("declarations");for(let o of s)this.registerBinding(t,o);return}let a=this.getProgramParent(),i=r.getOuterBindingIdentifiers(!0);for(let s of Object.keys(i)){a.references[s]=!0;for(let o of i[s]){let l=this.getOwnBinding(s);if(l){if(l.identifier===o)continue;this.checkBlockScopedCollisions(l,t,s,o)}l?l.reassign(n):this.bindings[s]=new mOe.default({identifier:o,scope:this,path:n,kind:t})}}}addGlobal(t){this.globals[t.name]=t}hasUid(t){{let r=this;do if(r.uids[t])return!0;while(r=r.parent);return!1}}hasGlobal(t){let r=this;do if(r.globals[t])return!0;while(r=r.parent);return!1}hasReference(t){return!!this.getProgramParent().references[t]}isPure(t,r){if(Xm(t)){let s=this.getBinding(t.name);return s?r?s.constant:!0:!1}else{if(Qq(t)||HOe(t)||tH(t)||GOe(t))return!0;if(bOe(t)){var n;return t.superClass&&!this.isPure(t.superClass,r)||((n=t.decorators)==null?void 0:n.length)>0?!1:this.isPure(t.body,r)}else if(vOe(t)){for(let s of t.body)if(!this.isPure(s,r))return!1;return!0}else{if(xOe(t))return this.isPure(t.left,r)&&this.isPure(t.right,r);if(oH(t)||VOe(t)){for(let s of t.elements)if(s!==null&&!this.isPure(s,r))return!1;return!0}else if(NOe(t)||UOe(t)){for(let s of t.properties)if(!this.isPure(s,r))return!1;return!0}else if(EOe(t)){var a;return!(t.computed&&!this.isPure(t.key,r)||((a=t.decorators)==null?void 0:a.length)>0)}else if(kOe(t)){var i;return!(t.computed&&!this.isPure(t.key,r)||((i=t.decorators)==null?void 0:i.length)>0||(qOe(t)||t.static)&&t.value!==null&&!this.isPure(t.value,r))}else{if(MOe(t))return this.isPure(t.argument,r);if(cH(t)){for(let s of t.expressions)if(!this.isPure(s,r))return!1;return!0}else return DOe(t)?eH(t.tag,"String.raw")&&!this.hasBinding("String",{noGlobals:!0})&&this.isPure(t.quasi,r):POe(t)?!t.computed&&Xm(t.object)&&t.object.name==="Symbol"&&Xm(t.property)&&t.property.name!=="for"&&!this.hasBinding("Symbol",{noGlobals:!0}):Zq(t)?eH(t.callee,"Symbol.for")&&!this.hasBinding("Symbol",{noGlobals:!0})&&t.arguments.length===1&&iH.isStringLiteral(t.arguments[0]):_Oe(t)}}}}setData(t,r){return this.data[t]=r}getData(t){let r=this;do{let n=r.data[t];if(n!=null)return n}while(r=r.parent)}removeData(t){let r=this;do r.data[t]!=null&&(r.data[t]=null);while(r=r.parent)}init(){this.inited||(this.inited=!0,this.crawl())}crawl(){let t=this.path;rH(this),this.data=Object.create(null);let r=this;do{if(r.crawling)return;if(r.path.isProgram())break}while(r=r.parent);let n=r,a={references:[],constantViolations:[],assignments:[]};if(this.crawling=!0,Z1||(Z1=nH.default.visitors.merge([{Scope(i){rH(i.scope)}},JOe])),t.type!=="Program"){let i=Z1[t.type];if(i)for(let s of i.enter)s.call(a,t,a)}t.traverse(Z1,a),this.crawling=!1;for(let i of a.assignments){let s=i.getAssignmentIdentifiers();for(let o of Object.keys(s))i.scope.getBinding(o)||n.addGlobal(s[o]);i.scope.registerConstantViolation(i)}for(let i of a.references){let s=i.scope.getBinding(i.node.name);s?s.reference(i):n.addGlobal(i.node)}for(let i of a.constantViolations)i.scope.registerConstantViolation(i)}push(t){let r=this.path;r.isPattern()?r=this.getPatternParent().path:!r.isBlockStatement()&&!r.isProgram()&&(r=this.getBlockParent().path),r.isSwitchStatement()&&(r=(this.getFunctionParent()||this.getProgramParent()).path);let{init:n,unique:a,kind:i="var",id:s}=t;if(!n&&!a&&(i==="var"||i==="let")&&YOe(r)&&Zq(r.parent,{callee:r.node})&&r.parent.arguments.length<=r.node.params.length&&Xm(s)){r.pushContainer("params",s),r.scope.registerBinding("param",r.get("params")[r.node.params.length-1]);return}(r.isLoop()||r.isCatchClause()||r.isFunction())&&(r.ensureBlock(),r=r.get("body"));let o=t._blockHoist==null?2:t._blockHoist,l=`declaration:${i}:${o}`,c=!a&&r.getData(l);if(!c){let f=jOe(i,[]);f._blockHoist=o,[c]=r.unshiftContainer("body",[f]),a||r.setData(l,c)}let u=zOe(s,n),d=c.node.declarations.push(u);r.scope.registerBinding(i,c.get("declarations")[d-1])}getProgramParent(){let t=this;do if(t.path.isProgram())return t;while(t=t.parent);throw new Error("Couldn't find a Program")}getFunctionParent(){let t=this;do if(t.path.isFunctionParent())return t;while(t=t.parent);return null}getBlockParent(){let t=this;do if(t.path.isBlockParent())return t;while(t=t.parent);throw new Error("We couldn't find a BlockStatement, For, Switch, Function, Loop or Program...")}getPatternParent(){let t=this;do if(!t.path.isPattern())return t.getBlockParent();while(t=t.parent.parent);throw new Error("We couldn't find a BlockStatement, For, Switch, Function, Loop or Program...")}getAllBindings(){let t=Object.create(null),r=this;do{for(let n of Object.keys(r.bindings))n in t||(t[n]=r.bindings[n]);r=r.parent}while(r);return t}bindingIdentifierEquals(t,r){return this.getBindingIdentifier(t)===r}getBinding(t){let r=this,n;do{let i=r.getOwnBinding(t);if(i){var a;if(!((a=n)!=null&&a.isPattern()&&i.kind!=="param"&&i.kind!=="local"))return i}else if(!i&&t==="arguments"&&r.path.isFunction()&&!r.path.isArrowFunctionExpression())break;n=r.path}while(r=r.parent)}getOwnBinding(t){return this.bindings[t]}getBindingIdentifier(t){var r;return(r=this.getBinding(t))==null?void 0:r.identifier}getOwnBindingIdentifier(t){let r=this.bindings[t];return r?.identifier}hasOwnBinding(t){return!!this.getOwnBinding(t)}hasBinding(t,r){if(!t)return!1;let n,a,i;typeof r=="object"?(n=r.noGlobals,a=r.noUids,i=r.upToScope):typeof r=="boolean"&&(n=r);let s=this;do{if(i===s)break;if(s.hasOwnBinding(t))return!0}while(s=s.parent);return!!(!a&&this.hasUid(t)||!n&&io.globals.includes(t)||!n&&io.contextVariables.includes(t))}parentHasBinding(t,r){var n;return(n=this.parent)==null?void 0:n.hasBinding(t,r)}moveBindingTo(t,r){let n=this.getBinding(t);n&&(n.scope.removeOwnBinding(t),n.scope=r,r.bindings[t]=n)}removeOwnBinding(t){delete this.bindings[t]}removeBinding(t){var r;(r=this.getBinding(t))==null||r.scope.removeOwnBinding(t);{let n=this;do n.uids[t]&&(n.uids[t]=!1);while(n=n.parent)}}hoistVariables(t=r=>this.push({id:r})){this.crawl();let r=new Set;for(let n of Object.keys(this.bindings)){let a=this.bindings[n];if(!a)continue;let{path:i}=a;if(!i.isVariableDeclarator())continue;let{parent:s,parentPath:o}=i;if(s.kind!=="var"||r.has(s))continue;r.add(i.parent);let l,c=[];for(let u of s.declarations){l??(l=u.id),u.init&&c.push(yOe("=",u.id,u.init));let d=Object.keys(sH(u,!1,!0,!0));for(let f of d)t(Ym(f),u.init!=null)}if(o.parentPath.isForXStatement({left:s}))o.replaceWith(l);else if(c.length===0)o.remove();else{let u=c.length===1?c[0]:XOe(c);o.parentPath.isForStatement({init:s})?o.replaceWith(u):o.replaceWith(FOe(u))}}}};Q1.default=io;io.globals=[...hOe,...gOe];io.contextVariables=["arguments","undefined","Infinity","NaN"];io.prototype._renameFromMap=function(t,r,n,a){t[r]&&(t[n]=a,t[r]=null)},io.prototype.traverse=function(e,t,r){(0,nH.default)(e,t,this,r,this.path)},io.prototype._generateUid=function(t,r){let n=t;return r>1&&(n+=r),`_${n}`},io.prototype.toArray=function(t,r,n){if(Xm(t)){let s=this.getBinding(t.name);if(s!=null&&s.constant&&s.path.isGenericType("Array"))return t}if(oH(t))return t;if(Xm(t,{name:"arguments"}))return Yq(ZD(ZD(ZD(Ym("Array"),Ym("prototype")),Ym("slice")),Ym("call")),[t]);let a,i=[t];return r===!0?a="toConsumableArray":typeof r=="number"?(i.push(BOe(r)),a="slicedToArray"):a="toArray",n&&(i.unshift(this.path.hub.addHelper(a)),a="maybeArrayLike"),Yq(this.path.hub.addHelper(a),i)},io.prototype.getAllBindingsOfKind=function(...t){let r=Object.create(null);for(let n of t){let a=this;do{for(let i of Object.keys(a.bindings)){let s=a.bindings[i];s.kind===n&&(r[i]=s)}a=a.parent}while(a)}return r},Object.defineProperties(io.prototype,{parentBlock:{configurable:!0,enumerable:!0,get(){return this.path.parent}},hub:{configurable:!0,enumerable:!0,get(){return this.path.hub}}})});var r2=ae((t2,$0)=>{(function(e,t){if(typeof t2=="object"&&typeof $0<"u")t($0),$0.exports=r($0);else if(typeof define=="function"&&define.amd)define(["module"],function(n){t.apply(this,arguments),n.exports=r(n)});else{let n={exports:{}};t(n),e=typeof globalThis<"u"?globalThis:e||self,e.sourcemapCodec=r(n)}function r(n){return"default"in n.exports?n.exports.default:n.exports}})(t2,function(e){"use strict";var t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,i=(U,k)=>{for(var L in k)t(U,L,{get:k[L],enumerable:!0})},s=(U,k,L,M)=>{if(k&&typeof k=="object"||typeof k=="function")for(let ee of n(k))!a.call(U,ee)&&ee!==L&&t(U,ee,{get:()=>k[ee],enumerable:!(M=r(k,ee))||M.enumerable});return U},o=U=>s(t({},"__esModule",{value:!0}),U),l={};i(l,{decode:()=>Z,decodeGeneratedRanges:()=>_,decodeOriginalScopes:()=>E,encode:()=>V,encodeGeneratedRanges:()=>O,encodeOriginalScopes:()=>C}),e.exports=o(l);var c=",".charCodeAt(0),u=";".charCodeAt(0),d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",f=new Uint8Array(64),p=new Uint8Array(128);for(let U=0;U<d.length;U++){let k=d.charCodeAt(U);f[U]=k,p[k]=U}function m(U,k){let L=0,M=0,ee=0;do{let ne=U.next();ee=p[ne],L|=(ee&31)<<M,M+=5}while(ee&32);let se=L&1;return L>>>=1,se&&(L=-2147483648|-L),k+L}function h(U,k,L){let M=k-L;M=M<0?-M<<1|1:M<<1;do{let ee=M&31;M>>>=5,M>0&&(ee|=32),U.write(f[ee])}while(M>0);return k}function x(U,k){return U.pos>=k?!1:U.peek()!==c}var g=1024*16,y=typeof TextDecoder<"u"?new TextDecoder:typeof Buffer<"u"?{decode(U){return Buffer.from(U.buffer,U.byteOffset,U.byteLength).toString()}}:{decode(U){let k="";for(let L=0;L<U.length;L++)k+=String.fromCharCode(U[L]);return k}},b=class{constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(g)}write(U){let{buffer:k}=this;k[this.pos++]=U,this.pos===g&&(this.out+=y.decode(k),this.pos=0)}flush(){let{buffer:U,out:k,pos:L}=this;return L>0?k+y.decode(U.subarray(0,L)):k}},S=class{constructor(U){this.pos=0,this.buffer=U}next(){return this.buffer.charCodeAt(this.pos++)}peek(){return this.buffer.charCodeAt(this.pos)}indexOf(U){let{buffer:k,pos:L}=this,M=k.indexOf(U,L);return M===-1?k.length:M}},w=[];function E(U){let{length:k}=U,L=new S(U),M=[],ee=[],se=0;for(;L.pos<k;L.pos++){se=m(L,se);let ne=m(L,0);if(!x(L,k)){let he=ee.pop();he[2]=se,he[3]=ne;continue}let ge=m(L,0),I=m(L,0)&1?[se,ne,0,0,ge,m(L,0)]:[se,ne,0,0,ge],K=w;if(x(L,k)){K=[];do{let he=m(L,0);K.push(he)}while(x(L,k))}I.vars=K,M.push(I),ee.push(I)}return M}function C(U){let k=new b;for(let L=0;L<U.length;)L=N(U,L,k,[0]);return k.flush()}function N(U,k,L,M){let ee=U[k],{0:se,1:ne,2:ge,3:ue,4:H,vars:I}=ee;k>0&&L.write(c),M[0]=h(L,se,M[0]),h(L,ne,0),h(L,H,0);let K=ee.length===6?1:0;h(L,K,0),ee.length===6&&h(L,ee[5],0);for(let he of I)h(L,he,0);for(k++;k<U.length;){let he=U[k],{0:q,1:be}=he;if(q>ge||q===ge&&be>=ue)break;k=N(U,k,L,M)}return L.write(c),M[0]=h(L,ge,M[0]),h(L,ue,0),k}function _(U){let{length:k}=U,L=new S(U),M=[],ee=[],se=0,ne=0,ge=0,ue=0,H=0,I=0,K=0,he=0;do{let q=L.indexOf(";"),be=0;for(;L.pos<q;L.pos++){if(be=m(L,be),!x(L,q)){let ot=ee.pop();ot[2]=se,ot[3]=be;continue}let Ie=m(L,0),Ne=Ie&1,He=Ie&2,xt=Ie&4,Ce=null,ke=w,je;if(Ne){let ot=m(L,ne);ge=m(L,ne===ot?ge:0),ne=ot,je=[se,be,0,0,ot,ge]}else je=[se,be,0,0];if(je.isScope=!!xt,He){let ot=ue,Nt=H;ue=m(L,ue);let It=ot===ue;H=m(L,It?H:0),I=m(L,It&&Nt===H?I:0),Ce=[ue,H,I]}if(je.callsite=Ce,x(L,q)){ke=[];do{K=se,he=be;let ot=m(L,0),Nt;if(ot<-1){Nt=[[m(L,0)]];for(let It=-1;It>ot;It--){let ar=K;K=m(L,K),he=m(L,K===ar?he:0);let Wr=m(L,0);Nt.push([Wr,K,he])}}else Nt=[[ot]];ke.push(Nt)}while(x(L,q))}je.bindings=ke,M.push(je),ee.push(je)}se++,L.pos=q+1}while(L.pos<k);return M}function O(U){if(U.length===0)return"";let k=new b;for(let L=0;L<U.length;)L=D(U,L,k,[0,0,0,0,0,0,0]);return k.flush()}function D(U,k,L,M){let ee=U[k],{0:se,1:ne,2:ge,3:ue,isScope:H,callsite:I,bindings:K}=ee;M[0]<se?(W(L,M[0],se),M[0]=se,M[1]=0):k>0&&L.write(c),M[1]=h(L,ee[1],M[1]);let he=(ee.length===6?1:0)|(I?2:0)|(H?4:0);if(h(L,he,0),ee.length===6){let{4:q,5:be}=ee;q!==M[2]&&(M[3]=0),M[2]=h(L,q,M[2]),M[3]=h(L,be,M[3])}if(I){let{0:q,1:be,2:Ie}=ee.callsite;q!==M[4]?(M[5]=0,M[6]=0):be!==M[5]&&(M[6]=0),M[4]=h(L,q,M[4]),M[5]=h(L,be,M[5]),M[6]=h(L,Ie,M[6])}if(K)for(let q of K){q.length>1&&h(L,-q.length,0);let be=q[0][0];h(L,be,0);let Ie=se,Ne=ne;for(let He=1;He<q.length;He++){let xt=q[He];Ie=h(L,xt[1],Ie),Ne=h(L,xt[2],Ne),h(L,xt[0],0)}}for(k++;k<U.length;){let q=U[k],{0:be,1:Ie}=q;if(be>ge||be===ge&&Ie>=ue)break;k=D(U,k,L,M)}return M[0]<ge?(W(L,M[0],ge),M[0]=ge,M[1]=0):L.write(c),M[1]=h(L,ue,M[1]),k}function W(U,k,L){do U.write(u);while(++k<L)}function Z(U){let{length:k}=U,L=new S(U),M=[],ee=0,se=0,ne=0,ge=0,ue=0;do{let H=L.indexOf(";"),I=[],K=!0,he=0;for(ee=0;L.pos<H;){let q;ee=m(L,ee),ee<he&&(K=!1),he=ee,x(L,H)?(se=m(L,se),ne=m(L,ne),ge=m(L,ge),x(L,H)?(ue=m(L,ue),q=[ee,se,ne,ge,ue]):q=[ee,se,ne,ge]):q=[ee],I.push(q),L.pos++}K||me(I),M.push(I),L.pos=H+1}while(L.pos<=k);return M}function me(U){U.sort(Q)}function Q(U,k){return U[0]-k[0]}function V(U){let k=new b,L=0,M=0,ee=0,se=0;for(let ne=0;ne<U.length;ne++){let ge=U[ne];if(ne>0&&k.write(u),ge.length===0)continue;let ue=0;for(let H=0;H<ge.length;H++){let I=ge[H];H>0&&k.write(c),ue=h(k,I[0],ue),I.length!==1&&(L=h(k,I[1],L),M=h(k,I[2],M),ee=h(k,I[3],ee),I.length!==4&&(se=h(k,I[4],se)))}}return k.flush()}})});var uH=ae((n2,a2)=>{(function(e,t){typeof n2=="object"&&typeof a2<"u"?a2.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self,e.resolveURI=t())})(n2,function(){"use strict";let e=/^[\w+.-]+:\/\//,t=/^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/,r=/^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i;function n(x){return e.test(x)}function a(x){return x.startsWith("//")}function i(x){return x.startsWith("/")}function s(x){return x.startsWith("file:")}function o(x){return/^[.?#]/.test(x)}function l(x){let g=t.exec(x);return u(g[1],g[2]||"",g[3],g[4]||"",g[5]||"/",g[6]||"",g[7]||"")}function c(x){let g=r.exec(x),y=g[2];return u("file:","",g[1]||"","",i(y)?y:"/"+y,g[3]||"",g[4]||"")}function u(x,g,y,b,S,w,E){return{scheme:x,user:g,host:y,port:b,path:S,query:w,hash:E,type:7}}function d(x){if(a(x)){let y=l("http:"+x);return y.scheme="",y.type=6,y}if(i(x)){let y=l("http://foo.com"+x);return y.scheme="",y.host="",y.type=5,y}if(s(x))return c(x);if(n(x))return l(x);let g=l("http://foo.com/"+x);return g.scheme="",g.host="",g.type=x?x.startsWith("?")?3:x.startsWith("#")?2:4:1,g}function f(x){if(x.endsWith("/.."))return x;let g=x.lastIndexOf("/");return x.slice(0,g+1)}function p(x,g){m(g,g.type),x.path==="/"?x.path=g.path:x.path=f(g.path)+x.path}function m(x,g){let y=g<=4,b=x.path.split("/"),S=1,w=0,E=!1;for(let N=1;N<b.length;N++){let _=b[N];if(!_){E=!0;continue}if(E=!1,_!=="."){if(_===".."){w?(E=!0,w--,S--):y&&(b[S++]=_);continue}b[S++]=_,w++}}let C="";for(let N=1;N<S;N++)C+="/"+b[N];(!C||E&&!C.endsWith("/.."))&&(C+="/"),x.path=C}function h(x,g){if(!x&&!g)return"";let y=d(x),b=y.type;if(g&&b!==7){let w=d(g),E=w.type;switch(b){case 1:y.hash=w.hash;case 2:y.query=w.query;case 3:case 4:p(y,w);case 5:y.user=w.user,y.host=w.host,y.port=w.port;case 6:y.scheme=w.scheme}E>b&&(b=E)}m(y,b);let S=y.query+y.hash;switch(b){case 2:case 3:return S;case 4:{let w=y.path.slice(1);return w?o(g||x)&&!o(w)?"./"+w+S:w+S:S||"."}case 5:return y.path+S;default:return y.scheme+"//"+y.user+y.host+y.port+y.path+S}}return h})});var s2=ae((i2,j0)=>{(function(e,t){if(typeof i2=="object"&&typeof j0<"u")t(j0,uH(),r2()),j0.exports=r(j0);else if(typeof define=="function"&&define.amd)define(["module","@jridgewell/resolve-uri","@jridgewell/sourcemap-codec"],function(n){t.apply(this,arguments),n.exports=r(n)});else{let n={exports:{}};t(n,e.resolveURI,e.sourcemapCodec),e=typeof globalThis<"u"?globalThis:e||self,e.traceMapping=r(n)}function r(n){return"default"in n.exports?n.exports.default:n.exports}})(i2,function(e,t,r){"use strict";var n=Object.create,a=Object.defineProperty,i=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,o=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty,c=(ye,De)=>function(){return De||(0,ye[s(ye)[0]])((De={exports:{}}).exports,De),De.exports},u=(ye,De)=>{for(var Me in De)a(ye,Me,{get:De[Me],enumerable:!0})},d=(ye,De,Me,qe)=>{if(De&&typeof De=="object"||typeof De=="function")for(let st of s(De))!l.call(ye,st)&&st!==Me&&a(ye,st,{get:()=>De[st],enumerable:!(qe=i(De,st))||qe.enumerable});return ye},f=(ye,De,Me)=>(Me=ye!=null?n(o(ye)):{},d(De||!ye||!ye.__esModule?a(Me,"default",{value:ye,enumerable:!0}):Me,ye)),p=ye=>d(a({},"__esModule",{value:!0}),ye),m=c({"umd:@jridgewell/sourcemap-codec"(ye,De){De.exports=r}}),h=c({"umd:@jridgewell/resolve-uri"(ye,De){De.exports=t}}),x={};u(x,{AnyMap:()=>ue,FlattenMap:()=>ue,GREATEST_LOWER_BOUND:()=>Ne,LEAST_UPPER_BOUND:()=>Ie,TraceMap:()=>He,allGeneratedPositionsFor:()=>It,decodedMap:()=>Ge,decodedMappings:()=>ke,eachMapping:()=>ar,encodedMap:()=>ht,encodedMappings:()=>Ce,generatedPositionFor:()=>Nt,isIgnored:()=>We,originalPositionFor:()=>ot,presortedDecodedMap:()=>ct,sourceContentFor:()=>pe,traceSegment:()=>je}),e.exports=p(x);var g=f(m()),y=f(h());function b(ye){if(!ye)return"";let De=ye.lastIndexOf("/");return ye.slice(0,De+1)}function S(ye,De){let Me=b(ye),qe=De?De+"/":"";return st=>(0,y.default)(qe+(st||""),Me)}var w=0,E=1,C=2,N=3,_=4,O=1,D=2;function W(ye,De){let Me=Z(ye,0);if(Me===ye.length)return ye;De||(ye=ye.slice());for(let qe=Me;qe<ye.length;qe=Z(ye,qe+1))ye[qe]=Q(ye[qe],De);return ye}function Z(ye,De){for(let Me=De;Me<ye.length;Me++)if(!me(ye[Me]))return Me;return ye.length}function me(ye){for(let De=1;De<ye.length;De++)if(ye[De][w]<ye[De-1][w])return!1;return!0}function Q(ye,De){return De||(ye=ye.slice()),ye.sort(V)}function V(ye,De){return ye[w]-De[w]}function U(ye,De){let Me=De.map(()=>[]);for(let qe=0;qe<ye.length;qe++){let st=ye[qe];for(let ft=0;ft<st.length;ft++){let cr=st[ft];if(cr.length===1)continue;let Br=cr[E],wr=cr[C],pa=cr[N],xa=Me[Br];(xa[wr]||(xa[wr]=[])).push([pa,qe,cr[w]])}}for(let qe=0;qe<Me.length;qe++){let st=Me[qe];for(let ft=0;ft<st.length;ft++){let cr=st[ft];cr&&cr.sort(V)}}return Me}var k=!1;function L(ye,De,Me,qe){for(;Me<=qe;){let st=Me+(qe-Me>>1),ft=ye[st][w]-De;if(ft===0)return k=!0,st;ft<0?Me=st+1:qe=st-1}return k=!1,Me-1}function M(ye,De,Me){for(let qe=Me+1;qe<ye.length&&ye[qe][w]===De;Me=qe++);return Me}function ee(ye,De,Me){for(let qe=Me-1;qe>=0&&ye[qe][w]===De;Me=qe--);return Me}function se(){return{lastKey:-1,lastNeedle:-1,lastIndex:-1}}function ne(ye,De,Me,qe){let{lastKey:st,lastNeedle:ft,lastIndex:cr}=Me,Br=0,wr=ye.length-1;if(qe===st){if(De===ft)return k=cr!==-1&&ye[cr][w]===De,cr;De>=ft?Br=cr===-1?0:cr:wr=cr}return Me.lastKey=qe,Me.lastNeedle=De,Me.lastIndex=L(ye,De,Br,wr)}function ge(ye){return typeof ye=="string"?JSON.parse(ye):ye}var ue=function(ye,De){let Me=ge(ye);if(!("sections"in Me))return new He(Me,De);let qe=[],st=[],ft=[],cr=[],Br=[];H(Me,De,qe,st,ft,cr,Br,0,0,1/0,1/0);let wr={version:3,file:Me.file,names:cr,sources:st,sourcesContent:ft,mappings:qe,ignoreList:Br};return ct(wr)};function H(ye,De,Me,qe,st,ft,cr,Br,wr,pa,xa){let{sections:Va}=ye;for(let _r=0;_r<Va.length;_r++){let{map:ma,offset:Xr}=Va[_r],eo=pa,to=xa;if(_r+1<Va.length){let Wu=Va[_r+1].offset;eo=Math.min(pa,Br+Wu.line),eo===pa?to=Math.min(xa,wr+Wu.column):eo<pa&&(to=wr+Wu.column)}I(ma,De,Me,qe,st,ft,cr,Br+Xr.line,wr+Xr.column,eo,to)}}function I(ye,De,Me,qe,st,ft,cr,Br,wr,pa,xa){let Va=ge(ye);if("sections"in Va)return H(...arguments);let _r=new He(Va,De),ma=qe.length,Xr=ft.length,eo=ke(_r),{resolvedSources:to,sourcesContent:Wu,ignoreList:ui}=_r;if(K(qe,to),K(ft,_r.names),Wu)K(st,Wu);else for(let yl=0;yl<to.length;yl++)st.push(null);if(ui)for(let yl=0;yl<ui.length;yl++)cr.push(ui[yl]+ma);for(let yl=0;yl<eo.length;yl++){let T_=Br+yl;if(T_>pa)return;let gU=he(Me,T_),Gme=yl===0?wr:0,yU=eo[yl];for(let w_=0;w_<yU.length;w_++){let Rm=yU[w_],UC=Gme+Rm[w];if(T_===pa&&UC>=xa)return;if(Rm.length===1){gU.push([UC]);continue}let xU=ma+Rm[E],bU=Rm[C],vU=Rm[N];gU.push(Rm.length===4?[UC,xU,bU,vU]:[UC,xU,bU,vU,Xr+Rm[_]])}}}function K(ye,De){for(let Me=0;Me<De.length;Me++)ye.push(De[Me])}function he(ye,De){for(let Me=ye.length;Me<=De;Me++)ye[Me]=[];return ye[De]}var q="`line` must be greater than 0 (lines start at line 1)",be="`column` must be greater than or equal to 0 (columns start at column 0)",Ie=-1,Ne=1,He=class{constructor(ye,De){let Me=typeof ye=="string";if(!Me&&ye._decodedMemo)return ye;let qe=ge(ye),{version:st,file:ft,names:cr,sourceRoot:Br,sources:wr,sourcesContent:pa}=qe;this.version=st,this.file=ft,this.names=cr||[],this.sourceRoot=Br,this.sources=wr,this.sourcesContent=pa,this.ignoreList=qe.ignoreList||qe.x_google_ignoreList||void 0;let xa=S(De,Br);this.resolvedSources=wr.map(xa);let{mappings:Va}=qe;if(typeof Va=="string")this._encoded=Va,this._decoded=void 0;else if(Array.isArray(Va))this._encoded=void 0,this._decoded=W(Va,Me);else throw qe.sections?new Error("TraceMap passed sectioned source map, please use FlattenMap export instead"):new Error(`invalid source map: ${JSON.stringify(qe)}`);this._decodedMemo=se(),this._bySources=void 0,this._bySourceMemos=void 0}};function xt(ye){return ye}function Ce(ye){var De,Me;return(Me=(De=ye)._encoded)!=null?Me:De._encoded=(0,g.encode)(ye._decoded)}function ke(ye){var De;return(De=ye)._decoded||(De._decoded=(0,g.decode)(ye._encoded))}function je(ye,De,Me){let qe=ke(ye);if(De>=qe.length)return null;let st=qe[De],ft=fa(st,ye._decodedMemo,De,Me,Ne);return ft===-1?null:st[ft]}function ot(ye,De){let{line:Me,column:qe,bias:st}=De;if(Me--,Me<0)throw new Error(q);if(qe<0)throw new Error(be);let ft=ke(ye);if(Me>=ft.length)return ut(null,null,null,null);let cr=ft[Me],Br=fa(cr,ye._decodedMemo,Me,qe,st||Ne);if(Br===-1)return ut(null,null,null,null);let wr=cr[Br];if(wr.length===1)return ut(null,null,null,null);let{names:pa,resolvedSources:xa}=ye;return ut(xa[wr[E]],wr[C]+1,wr[N],wr.length===5?pa[wr[_]]:null)}function Nt(ye,De){let{source:Me,line:qe,column:st,bias:ft}=De;return Fr(ye,Me,qe,st,ft||Ne,!1)}function It(ye,De){let{source:Me,line:qe,column:st,bias:ft}=De;return Fr(ye,Me,qe,st,ft||Ie,!0)}function ar(ye,De){let Me=ke(ye),{names:qe,resolvedSources:st}=ye;for(let ft=0;ft<Me.length;ft++){let cr=Me[ft];for(let Br=0;Br<cr.length;Br++){let wr=cr[Br],pa=ft+1,xa=wr[0],Va=null,_r=null,ma=null,Xr=null;wr.length!==1&&(Va=st[wr[1]],_r=wr[2]+1,ma=wr[3]),wr.length===5&&(Xr=qe[wr[4]]),De({generatedLine:pa,generatedColumn:xa,source:Va,originalLine:_r,originalColumn:ma,name:Xr})}}}function Wr(ye,De){let{sources:Me,resolvedSources:qe}=ye,st=Me.indexOf(De);return st===-1&&(st=qe.indexOf(De)),st}function pe(ye,De){let{sourcesContent:Me}=ye;if(Me==null)return null;let qe=Wr(ye,De);return qe===-1?null:Me[qe]}function We(ye,De){let{ignoreList:Me}=ye;if(Me==null)return!1;let qe=Wr(ye,De);return qe===-1?!1:Me.includes(qe)}function ct(ye,De){let Me=new He(Ht(ye,[]),De);return Me._decoded=ye.mappings,Me}function Ge(ye){return Ht(ye,ke(ye))}function ht(ye){return Ht(ye,Ce(ye))}function Ht(ye,De){return{version:ye.version,file:ye.file,names:ye.names,sourceRoot:ye.sourceRoot,sources:ye.sources,sourcesContent:ye.sourcesContent,mappings:De,ignoreList:ye.ignoreList||ye.x_google_ignoreList}}function ut(ye,De,Me,qe){return{source:ye,line:De,column:Me,name:qe}}function Ct(ye,De){return{line:ye,column:De}}function fa(ye,De,Me,qe,st){let ft=ne(ye,qe,De,Me);return k?ft=(st===Ie?M:ee)(ye,qe,ft):st===Ie&&ft++,ft===-1||ft===ye.length?-1:ft}function Kr(ye,De,Me,qe,st){let ft=fa(ye,De,Me,qe,Ne);if(!k&&st===Ie&&ft++,ft===-1||ft===ye.length)return[];let cr=k?qe:ye[ft][w];k||(ft=ee(ye,cr,ft));let Br=M(ye,cr,ft),wr=[];for(;ft<=Br;ft++){let pa=ye[ft];wr.push(Ct(pa[O]+1,pa[D]))}return wr}function Fr(ye,De,Me,qe,st,ft){var cr,Br;if(Me--,Me<0)throw new Error(q);if(qe<0)throw new Error(be);let{sources:wr,resolvedSources:pa}=ye,xa=wr.indexOf(De);if(xa===-1&&(xa=pa.indexOf(De)),xa===-1)return ft?[]:Ct(null,null);let Va=(cr=ye)._bySourceMemos||(cr._bySourceMemos=wr.map(se)),ma=((Br=ye)._bySources||(Br._bySources=U(ke(ye),Va)))[xa][Me];if(ma==null)return ft?[]:Ct(null,null);let Xr=Va[xa];if(ft)return Kr(ma,Xr,Me,qe,st);let eo=fa(ma,Xr,Me,qe,st);if(eo===-1)return Ct(null,null);let to=ma[eo];return Ct(to[O]+1,to[D])}})});var dH=ae((o2,z0)=>{(function(e,t){if(typeof o2=="object"&&typeof z0<"u")t(z0,r2(),s2()),z0.exports=r(z0);else if(typeof define=="function"&&define.amd)define(["module","@jridgewell/sourcemap-codec","@jridgewell/trace-mapping"],function(n){t.apply(this,arguments),n.exports=r(n)});else{let n={exports:{}};t(n,e.sourcemapCodec,e.traceMapping),e=typeof globalThis<"u"?globalThis:e||self,e.genMapping=r(n)}function r(n){return"default"in n.exports?n.exports.default:n.exports}})(o2,function(e,t,r){"use strict";var n=Object.create,a=Object.defineProperty,i=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,o=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty,c=(Ce,ke)=>function(){return ke||(0,Ce[s(Ce)[0]])((ke={exports:{}}).exports,ke),ke.exports},u=(Ce,ke)=>{for(var je in ke)a(Ce,je,{get:ke[je],enumerable:!0})},d=(Ce,ke,je,ot)=>{if(ke&&typeof ke=="object"||typeof ke=="function")for(let Nt of s(ke))!l.call(Ce,Nt)&&Nt!==je&&a(Ce,Nt,{get:()=>ke[Nt],enumerable:!(ot=i(ke,Nt))||ot.enumerable});return Ce},f=(Ce,ke,je)=>(je=Ce!=null?n(o(Ce)):{},d(ke||!Ce||!Ce.__esModule?a(je,"default",{value:Ce,enumerable:!0}):je,Ce)),p=Ce=>d(a({},"__esModule",{value:!0}),Ce),m=c({"umd:@jridgewell/sourcemap-codec"(Ce,ke){ke.exports=t}}),h=c({"umd:@jridgewell/trace-mapping"(Ce,ke){ke.exports=r}}),x={};u(x,{GenMapping:()=>me,addMapping:()=>U,addSegment:()=>V,allMappings:()=>ue,fromMap:()=>ge,maybeAddMapping:()=>L,maybeAddSegment:()=>k,setIgnore:()=>ee,setSourceContent:()=>M,toDecodedMap:()=>se,toEncodedMap:()=>ne}),e.exports=p(x);var g=class{constructor(){this._indexes={__proto__:null},this.array=[]}};function y(Ce){return Ce}function b(Ce,ke){return Ce._indexes[ke]}function S(Ce,ke){let je=b(Ce,ke);if(je!==void 0)return je;let{array:ot,_indexes:Nt}=Ce,It=ot.push(ke);return Nt[ke]=It-1}function w(Ce,ke){let je=b(Ce,ke);if(je===void 0)return;let{array:ot,_indexes:Nt}=Ce;for(let It=je+1;It<ot.length;It++){let ar=ot[It];ot[It-1]=ar,Nt[ar]--}Nt[ke]=void 0,ot.pop()}var E=f(m()),C=f(h()),N=0,_=1,O=2,D=3,W=4,Z=-1,me=class{constructor({file:Ce,sourceRoot:ke}={}){this._names=new g,this._sources=new g,this._sourcesContent=[],this._mappings=[],this.file=Ce,this.sourceRoot=ke,this._ignoreList=new g}};function Q(Ce){return Ce}function V(Ce,ke,je,ot,Nt,It,ar,Wr){return H(!1,Ce,ke,je,ot,Nt,It,ar,Wr)}function U(Ce,ke){return xt(!1,Ce,ke)}var k=(Ce,ke,je,ot,Nt,It,ar,Wr)=>H(!0,Ce,ke,je,ot,Nt,It,ar,Wr),L=(Ce,ke)=>xt(!0,Ce,ke);function M(Ce,ke,je){let{_sources:ot,_sourcesContent:Nt}=Ce,It=S(ot,ke);Nt[It]=je}function ee(Ce,ke,je=!0){let{_sources:ot,_sourcesContent:Nt,_ignoreList:It}=Ce,ar=S(ot,ke);ar===Nt.length&&(Nt[ar]=null),je?S(It,ar):w(It,ar)}function se(Ce){let{_mappings:ke,_sources:je,_sourcesContent:ot,_names:Nt,_ignoreList:It}=Ce;return be(ke),{version:3,file:Ce.file||void 0,names:Nt.array,sourceRoot:Ce.sourceRoot||void 0,sources:je.array,sourcesContent:ot,mappings:ke,ignoreList:It.array}}function ne(Ce){let ke=se(Ce);return Object.assign({},ke,{mappings:(0,E.encode)(ke.mappings)})}function ge(Ce){let ke=new C.TraceMap(Ce),je=new me({file:ke.file,sourceRoot:ke.sourceRoot});return Ie(je._names,ke.names),Ie(je._sources,ke.sources),je._sourcesContent=ke.sourcesContent||ke.sources.map(()=>null),je._mappings=(0,C.decodedMappings)(ke),ke.ignoreList&&Ie(je._ignoreList,ke.ignoreList),je}function ue(Ce){let ke=[],{_mappings:je,_sources:ot,_names:Nt}=Ce;for(let It=0;It<je.length;It++){let ar=je[It];for(let Wr=0;Wr<ar.length;Wr++){let pe=ar[Wr],We={line:It+1,column:pe[N]},ct,Ge,ht;pe.length!==1&&(ct=ot.array[pe[_]],Ge={line:pe[O]+1,column:pe[D]},pe.length===5&&(ht=Nt.array[pe[W]])),ke.push({generated:We,source:ct,original:Ge,name:ht})}}return ke}function H(Ce,ke,je,ot,Nt,It,ar,Wr,pe){let{_mappings:We,_sources:ct,_sourcesContent:Ge,_names:ht}=ke,Ht=K(We,je),ut=he(Ht,ot);if(!Nt)return Ce&&Ne(Ht,ut)?void 0:q(Ht,ut,[ot]);let Ct=S(ct,Nt),fa=Wr?S(ht,Wr):Z;if(Ct===Ge.length&&(Ge[Ct]=pe??null),!(Ce&&He(Ht,ut,Ct,It,ar,fa)))return q(Ht,ut,Wr?[ot,Ct,It,ar,fa]:[ot,Ct,It,ar])}function I(Ce){}function K(Ce,ke){for(let je=Ce.length;je<=ke;je++)Ce[je]=[];return Ce[ke]}function he(Ce,ke){let je=Ce.length;for(let ot=je-1;ot>=0;je=ot--){let Nt=Ce[ot];if(ke>=Nt[N])break}return je}function q(Ce,ke,je){for(let ot=Ce.length;ot>ke;ot--)Ce[ot]=Ce[ot-1];Ce[ke]=je}function be(Ce){let{length:ke}=Ce,je=ke;for(let ot=je-1;ot>=0&&!(Ce[ot].length>0);je=ot,ot--);je<ke&&(Ce.length=je)}function Ie(Ce,ke){for(let je=0;je<ke.length;je++)S(Ce,ke[je])}function Ne(Ce,ke){return ke===0?!0:Ce[ke-1].length===1}function He(Ce,ke,je,ot,Nt,It){if(ke===0)return!1;let ar=Ce[ke-1];return ar.length===1?!1:je===ar[_]&&ot===ar[O]&&Nt===ar[D]&&It===(ar.length===5?ar[W]:Z)}function xt(Ce,ke,je){let{generated:ot,source:Nt,original:It,name:ar,content:Wr}=je;return Nt?H(Ce,ke,ot.line-1,ot.column,Nt,It.line-1,It.column,ar,Wr):H(Ce,ke,ot.line-1,ot.column,null,null,null,null,null)}})});var fH=ae(eP=>{"use strict";Object.defineProperty(eP,"__esModule",{value:!0});eP.default=void 0;var Mf=dH(),l2=s2(),c2=class{constructor(t,r){var n;this._map=void 0,this._rawMappings=void 0,this._sourceFileName=void 0,this._lastGenLine=0,this._lastSourceLine=0,this._lastSourceColumn=0,this._inputMap=null;let a=this._map=new Mf.GenMapping({sourceRoot:t.sourceRoot});if(this._sourceFileName=(n=t.sourceFileName)==null?void 0:n.replace(/\\/g,"/"),this._rawMappings=void 0,t.inputSourceMap){this._inputMap=new l2.TraceMap(t.inputSourceMap);let s=this._inputMap.resolvedSources;if(s.length)for(let o=0;o<s.length;o++){var i;(0,Mf.setSourceContent)(a,s[o],(i=this._inputMap.sourcesContent)==null?void 0:i[o])}}if(typeof r=="string"&&!t.inputSourceMap)(0,Mf.setSourceContent)(a,this._sourceFileName,r);else if(typeof r=="object")for(let s of Object.keys(r))(0,Mf.setSourceContent)(a,s.replace(/\\/g,"/"),r[s])}get(){return(0,Mf.toEncodedMap)(this._map)}getDecoded(){return(0,Mf.toDecodedMap)(this._map)}getRawMappings(){return this._rawMappings||(this._rawMappings=(0,Mf.allMappings)(this._map))}mark(t,r,n,a,i,s){var o;this._rawMappings=void 0;let l;if(r!=null)if(this._inputMap){if(l=(0,l2.originalPositionFor)(this._inputMap,{line:r,column:n}),!l.name&&i){let c=(0,l2.originalPositionFor)(this._inputMap,i);c.name&&(a=c.name)}}else l={name:null,source:s?.replace(/\\/g,"/")||this._sourceFileName,line:r,column:n};(0,Mf.maybeAddMapping)(this._map,{name:a,generated:t,source:(o=l)==null?void 0:o.source,original:l})}};eP.default=c2});var pH=ae(tP=>{"use strict";Object.defineProperty(tP,"__esModule",{value:!0});tP.default=void 0;var u2=class{constructor(t,r){this._map=null,this._buf="",this._str="",this._appendCount=0,this._last=0,this._queue=[],this._queueCursor=0,this._canMarkIdName=!0,this._indentChar="",this._fastIndentations=[],this._position={line:1,column:0},this._sourcePosition={identifierName:void 0,identifierNamePos:void 0,line:void 0,column:void 0,filename:void 0},this._map=t,this._indentChar=r;for(let n=0;n<64;n++)this._fastIndentations.push(r.repeat(n));this._allocQueue()}_allocQueue(){let t=this._queue;for(let r=0;r<16;r++)t.push({char:0,repeat:1,line:void 0,column:void 0,identifierName:void 0,identifierNamePos:void 0,filename:""})}_pushQueue(t,r,n,a,i){let s=this._queueCursor;s===this._queue.length&&this._allocQueue();let o=this._queue[s];o.char=t,o.repeat=r,o.line=n,o.column=a,o.filename=i,this._queueCursor++}_popQueue(){if(this._queueCursor===0)throw new Error("Cannot pop from empty queue");return this._queue[--this._queueCursor]}get(){this._flush();let t=this._map,r={code:(this._buf+this._str).trimRight(),decodedMap:t?.getDecoded(),get __mergedMap(){return this.map},get map(){let n=t?t.get():null;return r.map=n,n},set map(n){Object.defineProperty(r,"map",{value:n,writable:!0})},get rawMappings(){let n=t?.getRawMappings();return r.rawMappings=n,n},set rawMappings(n){Object.defineProperty(r,"rawMappings",{value:n,writable:!0})}};return r}append(t,r){this._flush(),this._append(t,this._sourcePosition,r)}appendChar(t){this._flush(),this._appendChar(t,1,this._sourcePosition)}queue(t){if(t===10)for(;this._queueCursor!==0;){let n=this._queue[this._queueCursor-1].char;if(n!==32&&n!==9)break;this._queueCursor--}let r=this._sourcePosition;this._pushQueue(t,1,r.line,r.column,r.filename)}queueIndentation(t){t!==0&&this._pushQueue(-1,t,void 0,void 0,void 0)}_flush(){let t=this._queueCursor,r=this._queue;for(let n=0;n<t;n++){let a=r[n];this._appendChar(a.char,a.repeat,a)}this._queueCursor=0}_appendChar(t,r,n){if(this._last=t,t===-1){let a=this._fastIndentations[r];a!==void 0?this._str+=a:this._str+=r>1?this._indentChar.repeat(r):this._indentChar}else this._str+=r>1?String.fromCharCode(t).repeat(r):String.fromCharCode(t);t!==10?(this._mark(n.line,n.column,n.identifierName,n.identifierNamePos,n.filename),this._position.column+=r):(this._position.line++,this._position.column=0),this._canMarkIdName&&(n.identifierName=void 0,n.identifierNamePos=void 0)}_append(t,r,n){let a=t.length,i=this._position;if(this._last=t.charCodeAt(a-1),++this._appendCount>4096?(+this._str,this._buf+=this._str,this._str=t,this._appendCount=0):this._str+=t,!n&&!this._map){i.column+=a;return}let{column:s,identifierName:o,identifierNamePos:l,filename:c}=r,u=r.line;(o!=null||l!=null)&&this._canMarkIdName&&(r.identifierName=void 0,r.identifierNamePos=void 0);let d=t.indexOf(`
`),f=0;for(d!==0&&this._mark(u,s,o,l,c);d!==-1;)i.line++,i.column=0,f=d+1,f<a&&u!==void 0&&this._mark(++u,0,void 0,void 0,c),d=t.indexOf(`
`,f);i.column+=a-f}_mark(t,r,n,a,i){var s;(s=this._map)==null||s.mark(this._position,t,r,n,a,i)}removeTrailingNewline(){let t=this._queueCursor;t!==0&&this._queue[t-1].char===10&&this._queueCursor--}removeLastSemicolon(){let t=this._queueCursor;t!==0&&this._queue[t-1].char===59&&this._queueCursor--}getLastChar(){let t=this._queueCursor;return t!==0?this._queue[t-1].char:this._last}getNewlineCount(){let t=this._queueCursor,r=0;if(t===0)return this._last===10?1:0;for(let n=t-1;n>=0&&this._queue[n].char===10;n--)r++;return r===t&&this._last===10?r+1:r}endsWithCharAndNewline(){let t=this._queue,r=this._queueCursor;if(r!==0)return t[r-1].char!==10?void 0:r>1?t[r-2].char:this._last}hasContent(){return this._queueCursor!==0||!!this._last}exactSource(t,r){if(!this._map){r();return}this.source("start",t);let n=t.identifierName,a=this._sourcePosition;n&&(this._canMarkIdName=!1,a.identifierName=n),r(),n&&(this._canMarkIdName=!0,a.identifierName=void 0,a.identifierNamePos=void 0),this.source("end",t)}source(t,r){this._map&&this._normalizePosition(t,r,0)}sourceWithOffset(t,r,n){this._map&&this._normalizePosition(t,r,n)}_normalizePosition(t,r,n){let a=r[t],i=this._sourcePosition;a&&(i.line=a.line,i.column=Math.max(a.column+n,0),i.filename=r.filename)}getCurrentColumn(){let t=this._queue,r=this._queueCursor,n=-1,a=0;for(let i=0;i<r;i++){let s=t[i];s.char===10&&(n=a),a+=s.repeat}return n===-1?this._position.column+a:a-1-n}getCurrentLine(){let t=0,r=this._queue;for(let n=0;n<this._queueCursor;n++)r[n].char===10&&t++;return this._position.line+t}};tP.default=u2});var xH=ae(nP=>{"use strict";Object.defineProperty(nP,"__esModule",{value:!0});nP.nodes=void 0;var QOe=xr(),{FLIPPED_ALIAS_KEYS:eFe,isArrayExpression:tFe,isAssignmentExpression:hH,isBinary:gH,isBlockStatement:rFe,isCallExpression:yH,isFunction:U0,isIdentifier:rP,isLiteral:nFe,isMemberExpression:d2,isObjectExpression:aFe,isOptionalCallExpression:iFe,isOptionalMemberExpression:sFe,isStringLiteral:oFe}=QOe;function _y(e,t){return e&&(d2(e)||sFe(e)?(_y(e.object,t),e.computed&&_y(e.property,t)):gH(e)||hH(e)?(_y(e.left,t),_y(e.right,t)):yH(e)||iFe(e)?(t.hasCall=!0,_y(e.callee,t)):U0(e)?t.hasFunction=!0:rP(e)&&(t.hasHelper=t.hasHelper||e.callee&&Zu(e.callee))),t}function mH(e){return _y(e,{hasCall:!1,hasFunction:!1,hasHelper:!1})}function Zu(e){return e?d2(e)?Zu(e.object)||Zu(e.property):rP(e)?e.name==="require"||e.name.charCodeAt(0)===95:yH(e)?Zu(e.callee):gH(e)||hH(e)?rP(e.left)&&Zu(e.left)||Zu(e.right):!1:!1}function lFe(e){return nFe(e)||aFe(e)||tFe(e)||rP(e)||d2(e)}var Jm=nP.nodes={AssignmentExpression(e){let t=mH(e.right);return t.hasCall&&t.hasHelper||t.hasFunction?t.hasFunction?3:2:0},SwitchCase(e,t){return(e.consequent.length||t.cases[0]===e?1:0)|(!e.consequent.length&&t.cases[t.cases.length-1]===e?2:0)},LogicalExpression(e){return U0(e.left)||U0(e.right)?2:0},Literal(e){return oFe(e)&&e.value==="use strict"?2:0},CallExpression(e){return U0(e.callee)||Zu(e)?3:0},OptionalCallExpression(e){return U0(e.callee)?3:0},VariableDeclaration(e){for(let t=0;t<e.declarations.length;t++){let r=e.declarations[t],n=Zu(r.id)&&!lFe(r.init);if(!n&&r.init){let a=mH(r.init);n=Zu(r.init)&&a.hasCall||a.hasFunction}if(n)return 3}return 0},IfStatement(e){return rFe(e.consequent)?3:0}};Jm.ObjectProperty=Jm.ObjectTypeProperty=Jm.ObjectMethod=function(e,t){return t.properties[0]===e?1:0};Jm.ObjectTypeCallProperty=function(e,t){var r;return t.callProperties[0]===e&&!((r=t.properties)!=null&&r.length)?1:0};Jm.ObjectTypeIndexer=function(e,t){var r,n;return t.indexers[0]===e&&!((r=t.properties)!=null&&r.length)&&!((n=t.callProperties)!=null&&n.length)?1:0};Jm.ObjectTypeInternalSlot=function(e,t){var r,n,a;return t.internalSlots[0]===e&&!((r=t.properties)!=null&&r.length)&&!((n=t.callProperties)!=null&&n.length)&&!((a=t.indexers)!=null&&a.length)?1:0};[["Function",!0],["Class",!0],["Loop",!0],["LabeledStatement",!0],["SwitchStatement",!0],["TryStatement",!0]].forEach(function([e,t]){[e].concat(eFe[e]||[]).forEach(function(r){let n=t?3:0;Jm[r]=()=>n})})});var EH=ae(jr=>{"use strict";Object.defineProperty(jr,"__esModule",{value:!0});jr.AssignmentExpression=jFe;jr.Binary=wH;jr.BinaryExpression=DFe;jr.ClassExpression=FFe;jr.ArrowFunctionExpression=jr.ConditionalExpression=PH;jr.DoExpression=wFe;jr.FunctionExpression=BFe;jr.FunctionTypeAnnotation=vFe;jr.Identifier=UFe;jr.LogicalExpression=zFe;jr.NullableTypeAnnotation=bFe;jr.ObjectExpression=TFe;jr.OptionalIndexedAccessType=PFe;jr.OptionalCallExpression=jr.OptionalMemberExpression=$Fe;jr.SequenceExpression=MFe;jr.TSSatisfiesExpression=jr.TSAsExpression=EFe;jr.TSConditionalType=IFe;jr.TSConstructorType=jr.TSFunctionType=RFe;jr.TSInferType=kFe;jr.TSInstantiationExpression=LFe;jr.TSIntersectionType=NFe;jr.UnaryLike=jr.TSTypeAssertion=CH;jr.TSTypeOperator=_Fe;jr.TSUnionType=AFe;jr.IntersectionTypeAnnotation=jr.UnionTypeAnnotation=CFe;jr.UpdateExpression=SFe;jr.AwaitExpression=jr.YieldExpression=OFe;var cFe=xr(),Oo=Zm(),{isArrayTypeAnnotation:uFe,isBinaryExpression:dFe,isCallExpression:fFe,isForOfStatement:pFe,isIndexedAccessType:mFe,isMemberExpression:SH,isObjectPattern:hFe,isOptionalMemberExpression:gFe,isYieldExpression:yFe,isStatement:xFe}=cFe,bH=new Map([["||",0],["??",0],["|>",0],["&&",1],["|",2],["^",3],["&",4],["==",5],["===",5],["!=",5],["!==",5],["<",6],[">",6],["<=",6],[">=",6],["in",6],["instanceof",6],[">>",7],["<<",7],[">>>",7],["+",8],["-",8],["*",9],["/",9],["%",9],["**",10]]);function vH(e,t){if(t==="BinaryExpression"||t==="LogicalExpression")return bH.get(e.operator);if(t==="TSAsExpression"||t==="TSSatisfiesExpression")return bH.get("in")}function f2(e){return e==="TSAsExpression"||e==="TSSatisfiesExpression"||e==="TSTypeAssertion"}var aP=(e,t)=>{let r=t.type;return(r==="ClassDeclaration"||r==="ClassExpression")&&t.superClass===e},iP=(e,t)=>{let r=t.type;return(r==="MemberExpression"||r==="OptionalMemberExpression")&&t.object===e||(r==="CallExpression"||r==="OptionalCallExpression"||r==="NewExpression")&&t.callee===e||r==="TaggedTemplateExpression"&&t.tag===e||r==="TSNonNullExpression"};function bFe(e,t){return uFe(t)}function vFe(e,t,r){let n=t.type;return n==="UnionTypeAnnotation"||n==="IntersectionTypeAnnotation"||n==="ArrayTypeAnnotation"||Boolean(r&Oo.TokenContext.arrowFlowReturnType)}function SFe(e,t){return iP(e,t)||aP(e,t)}function TH(e){return Boolean(e&(Oo.TokenContext.expressionStatement|Oo.TokenContext.arrowBody))}function TFe(e,t,r){return TH(r)}function wFe(e,t,r){return!e.async&&Boolean(r&Oo.TokenContext.expressionStatement)}function wH(e,t){let r=t.type;if(e.type==="BinaryExpression"&&e.operator==="**"&&r==="BinaryExpression"&&t.operator==="**")return t.left===e;if(aP(e,t)||iP(e,t)||r==="UnaryExpression"||r==="SpreadElement"||r==="AwaitExpression")return!0;let n=vH(t,r);if(n!=null){let a=vH(e,e.type);if(n===a&&r==="BinaryExpression"&&t.right===e||n>a)return!0}}function CFe(e,t){let r=t.type;return r==="ArrayTypeAnnotation"||r==="NullableTypeAnnotation"||r==="IntersectionTypeAnnotation"||r==="UnionTypeAnnotation"}function PFe(e,t){return mFe(t)&&t.objectType===e}function EFe(e,t){return(t.type==="AssignmentExpression"||t.type==="AssignmentPattern")&&t.left===e||t.type==="BinaryExpression"&&(t.operator==="|"||t.operator==="&")&&e===t.left?!0:wH(e,t)}function IFe(e,t){let r=t.type;return r==="TSArrayType"||r==="TSIndexedAccessType"&&t.objectType===e||r==="TSOptionalType"||r==="TSTypeOperator"||r==="TSTypeParameter"||(r==="TSIntersectionType"||r==="TSUnionType")&&t.types[0]===e||r==="TSConditionalType"&&(t.checkType===e||t.extendsType===e)}function AFe(e,t){let r=t.type;return r==="TSIntersectionType"||r==="TSTypeOperator"||r==="TSArrayType"||r==="TSIndexedAccessType"&&t.objectType===e||r==="TSOptionalType"}function NFe(e,t){let r=t.type;return r==="TSTypeOperator"||r==="TSArrayType"||r==="TSIndexedAccessType"&&t.objectType===e||r==="TSOptionalType"}function kFe(e,t){let r=t.type;return!!(r==="TSArrayType"||r==="TSIndexedAccessType"&&t.objectType===e||r==="TSOptionalType"||e.typeParameter.constraint&&(r==="TSIntersectionType"||r==="TSUnionType")&&t.types[0]===e)}function _Fe(e,t){let r=t.type;return r==="TSArrayType"||r==="TSIndexedAccessType"&&t.objectType===e||r==="TSOptionalType"}function LFe(e,t){let r=t.type;return(r==="CallExpression"||r==="OptionalCallExpression"||r==="NewExpression"||r==="TSInstantiationExpression")&&!!t.typeParameters}function RFe(e,t){let r=t.type;return r==="TSIntersectionType"||r==="TSUnionType"||r==="TSTypeOperator"||r==="TSOptionalType"||r==="TSArrayType"||r==="TSIndexedAccessType"&&t.objectType===e||r==="TSConditionalType"&&(t.checkType===e||t.extendsType===e)}function DFe(e,t,r){return e.operator==="in"&&Boolean(r&Oo.TokenContext.forInOrInitHeadAccumulate)}function MFe(e,t){let r=t.type;return r==="SequenceExpression"||r==="ParenthesizedExpression"||r==="MemberExpression"&&t.property===e||r==="OptionalMemberExpression"&&t.property===e||r==="TemplateLiteral"?!1:r==="ClassDeclaration"?!0:r==="ForOfStatement"?t.right===e:r==="ExportDefaultDeclaration"?!0:!xFe(t)}function OFe(e,t){let r=t.type;return r==="BinaryExpression"||r==="LogicalExpression"||r==="UnaryExpression"||r==="SpreadElement"||iP(e,t)||r==="AwaitExpression"&&yFe(e)||r==="ConditionalExpression"&&e===t.test||aP(e,t)||f2(r)}function FFe(e,t,r){return Boolean(r&(Oo.TokenContext.expressionStatement|Oo.TokenContext.exportDefault))}function CH(e,t){return iP(e,t)||dFe(t)&&t.operator==="**"&&t.left===e||aP(e,t)}function BFe(e,t,r){return Boolean(r&(Oo.TokenContext.expressionStatement|Oo.TokenContext.exportDefault))}function PH(e,t){let r=t.type;return r==="UnaryExpression"||r==="SpreadElement"||r==="BinaryExpression"||r==="LogicalExpression"||r==="ConditionalExpression"&&t.test===e||r==="AwaitExpression"||f2(r)?!0:CH(e,t)}function $Fe(e,t){return fFe(t)&&t.callee===e||SH(t)&&t.object===e}function jFe(e,t,r){return TH(r)&&hFe(e.left)?!0:PH(e,t)}function zFe(e,t){let r=t.type;if(f2(r))return!0;if(r!=="LogicalExpression")return!1;switch(e.operator){case"||":return t.operator==="??"||t.operator==="&&";case"&&":return t.operator==="??";case"??":return t.operator!=="??"}}function UFe(e,t,r,n){var a;let i=t.type;if((a=e.extra)!=null&&a.parenthesized&&i==="AssignmentExpression"&&t.left===e){let s=t.right.type;if((s==="FunctionExpression"||s==="ClassExpression")&&t.right.id==null)return!0}return n&&n(e)!==e.name?!1:e.name==="let"?(SH(t,{object:e,computed:!0})||gFe(t,{object:e,computed:!0,optional:!1}))&&r&(Oo.TokenContext.expressionStatement|Oo.TokenContext.forInitHead|Oo.TokenContext.forInHead)?!0:Boolean(r&Oo.TokenContext.forOfHead):e.name==="async"&&pFe(t,{left:e,await:!1})}});var Zm=ae(Qu=>{"use strict";Object.defineProperty(Qu,"__esModule",{value:!0});Qu.TokenContext=void 0;Qu.isLastChild=a3e;Qu.needsParens=n3e;Qu.needsWhitespace=m2;Qu.needsWhitespaceAfter=r3e;Qu.needsWhitespaceBefore=t3e;var VFe=xH(),qFe=EH(),HFe=xr(),{FLIPPED_ALIAS_KEYS:GFe,VISITOR_KEYS:KFe,isCallExpression:IH,isDecorator:WFe,isExpressionStatement:XFe,isMemberExpression:YFe,isNewExpression:JFe,isParenthesizedExpression:ZFe}=HFe,iSt=Qu.TokenContext={normal:0,expressionStatement:1,arrowBody:2,exportDefault:4,arrowFlowReturnType:8,forInitHead:16,forInHead:32,forOfHead:64,forInOrInitHeadAccumulate:128,forInOrInitHeadAccumulatePassThroughMask:128};function AH(e){let t=new Map;function r(n,a){let i=t.get(n);t.set(n,i?function(s,o,l,c){var u;return(u=i(s,o,l,c))!=null?u:a(s,o,l,c)}:a)}for(let n of Object.keys(e)){let a=GFe[n];if(a)for(let i of a)r(i,e[n]);else r(n,e[n])}return t}var QFe=AH(qFe),e3e=AH(VFe.nodes);function NH(e){return IH(e)?!0:YFe(e)&&NH(e.object)}function m2(e,t,r){var n;if(!e)return!1;XFe(e)&&(e=e.expression);let a=(n=e3e.get(e.type))==null?void 0:n(e,t);return typeof a=="number"?(a&r)!==0:!1}function t3e(e,t){return m2(e,t,1)}function r3e(e,t){return m2(e,t,2)}function n3e(e,t,r,n){var a;return t?JFe(t)&&t.callee===e&&NH(e)?!0:WFe(t)?!p2(e)&&!(IH(e)&&p2(e.callee))&&!ZFe(e):((a=QFe.get(e.type))==null?void 0:a(e,t,r,n))||!1:!1}function p2(e){switch(e.type){case"Identifier":return!0;case"MemberExpression":return!e.computed&&e.property.type==="Identifier"&&p2(e.object);default:return!1}}function a3e(e,t){let r=KFe[e.type];for(let n=r.length-1;n>=0;n--){let a=e[r[n]];if(a===t)return!0;if(Array.isArray(a)){let i=a.length-1;for(;i>=0&&a[i]===null;)i--;return i>=0&&a[i]===t}else if(a)return!1}return!1}});var kH=ae(sP=>{"use strict";Object.defineProperty(sP,"__esModule",{value:!0});sP.TokenMap=void 0;var i3e=xr(),{traverseFast:s3e,VISITOR_KEYS:o3e}=i3e,h2=class{constructor(t,r,n){this._tokens=void 0,this._source=void 0,this._nodesToTokenIndexes=new Map,this._nodesOccurrencesCountCache=new Map,this._tokensCache=new Map,this._tokens=r,this._source=n,s3e(t,a=>{let i=this._getTokensIndexesOfNode(a);i.length>0&&this._nodesToTokenIndexes.set(a,i)}),this._tokensCache.clear()}has(t){return this._nodesToTokenIndexes.has(t)}getIndexes(t){return this._nodesToTokenIndexes.get(t)}find(t,r){let n=this._nodesToTokenIndexes.get(t);if(n)for(let a=0;a<n.length;a++){let i=n[a],s=this._tokens[i];if(r(s,i))return s}return null}findLastIndex(t,r){let n=this._nodesToTokenIndexes.get(t);if(n)for(let a=n.length-1;a>=0;a--){let i=n[a],s=this._tokens[i];if(r(s,i))return i}return-1}findMatching(t,r,n=0){let a=this._nodesToTokenIndexes.get(t);if(a){let i=0,s=n;if(s>1){let o=this._nodesOccurrencesCountCache.get(t);o&&o.test===r&&o.count<s&&(i=o.i+1,n-=o.count+1)}for(;i<a.length;i++){let o=this._tokens[a[i]];if(this.matchesOriginal(o,r)){if(n===0)return s>0&&this._nodesOccurrencesCountCache.set(t,{test:r,count:s,i}),o;n--}}}return null}matchesOriginal(t,r){return t.end-t.start!==r.length?!1:t.value!=null?t.value===r:this._source.startsWith(r,t.start)}startMatches(t,r){let n=this._nodesToTokenIndexes.get(t);if(!n)return!1;let a=this._tokens[n[0]];return a.start!==t.start?!1:this.matchesOriginal(a,r)}endMatches(t,r){let n=this._nodesToTokenIndexes.get(t);if(!n)return!1;let a=this._tokens[n[n.length-1]];return a.end!==t.end?!1:this.matchesOriginal(a,r)}_getTokensIndexesOfNode(t){if(t.start==null||t.end==null)return[];let{first:r,last:n}=this._findTokensOfNode(t,0,this._tokens.length-1),a=r,i=l3e(t);(t.type==="ExportNamedDeclaration"||t.type==="ExportDefaultDeclaration")&&t.declaration&&t.declaration.type==="ClassDeclaration"&&i.next();let s=[];for(let o of i){if(o==null||o.start==null||o.end==null)continue;let l=this._findTokensOfNode(o,a,n),c=l.first;for(let u=a;u<c;u++)s.push(u);a=l.last+1}for(let o=a;o<=n;o++)s.push(o);return s}_findTokensOfNode(t,r,n){let a=this._tokensCache.get(t);if(a)return a;let i=this._findFirstTokenOfNode(t.start,r,n),s=this._findLastTokenOfNode(t.end,i,n);return this._tokensCache.set(t,{first:i,last:s}),{first:i,last:s}}_findFirstTokenOfNode(t,r,n){for(;r<=n;){let a=n+r>>1;if(t<this._tokens[a].start)n=a-1;else if(t>this._tokens[a].start)r=a+1;else return a}return r}_findLastTokenOfNode(t,r,n){for(;r<=n;){let a=n+r>>1;if(t<this._tokens[a].end)n=a-1;else if(t>this._tokens[a].end)r=a+1;else return a}return n}};sP.TokenMap=h2;function*l3e(e){if(e.type==="TemplateLiteral"){yield e.quasis[0];for(let r=1;r<e.quasis.length;r++)yield e.expressions[r-1],yield e.quasis[r];return}let t=o3e[e.type];for(let r of t){let n=e[r];n&&(Array.isArray(n)?yield*n:yield n)}}});var _H=ae(Ly=>{"use strict";Object.defineProperty(Ly,"__esModule",{value:!0});Ly.TaggedTemplateExpression=c3e;Ly.TemplateElement=u3e;Ly.TemplateLiteral=f3e;Ly._printTemplate=d3e;function c3e(e){this.print(e.tag),this.print(e.typeParameters),this.print(e.quasi)}function u3e(){throw new Error("TemplateElement printing is handled in TemplateLiteral")}function d3e(e,t){let r=e.quasis,n="`";for(let a=0;a<r.length-1;a++)if(n+=r[a].value.raw,this.token(n+"${",!0),this.print(t[a]),n="}",this.tokenMap){let i=this.tokenMap.findMatching(e,"}",a);i&&this._catchUpTo(i.loc.start)}n+=r[r.length-1].value.raw,this.token(n+"`",!0)}function f3e(e){this._printTemplate(e,e.expressions)}});var RH=ae(cn=>{"use strict";Object.defineProperty(cn,"__esModule",{value:!0});cn.LogicalExpression=cn.BinaryExpression=cn.AssignmentExpression=B3e;cn.AssignmentPattern=F3e;cn.AwaitExpression=R3e;cn.BindExpression=$3e;cn.CallExpression=_3e;cn.ConditionalExpression=T3e;cn.Decorator=A3e;cn.DoExpression=b3e;cn.EmptyStatement=M3e;cn.ExpressionStatement=O3e;cn.Import=L3e;cn.MemberExpression=j3e;cn.MetaProperty=z3e;cn.ModuleExpression=q3e;cn.NewExpression=w3e;cn.OptionalCallExpression=k3e;cn.OptionalMemberExpression=N3e;cn.ParenthesizedExpression=v3e;cn.PrivateName=U3e;cn.SequenceExpression=C3e;cn.Super=E3e;cn.ThisExpression=P3e;cn.UnaryExpression=x3e;cn.UpdateExpression=S3e;cn.V8IntrinsicIdentifier=V3e;cn.YieldExpression=D3e;cn._shouldPrintDecoratorsBeforeExport=I3e;var p3e=xr(),m3e=Zm(),{isCallExpression:h3e,isLiteral:LH,isMemberExpression:g2,isNewExpression:g3e,isPattern:y3e}=p3e;function x3e(e){let{operator:t}=e;t==="void"||t==="delete"||t==="typeof"||t==="throw"?(this.word(t),this.space()):this.token(t),this.print(e.argument)}function b3e(e){e.async&&(this.word("async",!0),this.space()),this.word("do"),this.space(),this.print(e.body)}function v3e(e){this.tokenChar(40);let t=this.enterDelimited();this.print(e.expression),t(),this.rightParens(e)}function S3e(e){e.prefix?(this.token(e.operator),this.print(e.argument)):(this.print(e.argument,!0),this.token(e.operator))}function T3e(e){this.print(e.test),this.space(),this.tokenChar(63),this.space(),this.print(e.consequent),this.space(),this.tokenChar(58),this.space(),this.print(e.alternate)}function w3e(e,t){if(this.word("new"),this.space(),this.print(e.callee),this.format.minified&&e.arguments.length===0&&!e.optional&&!h3e(t,{callee:e})&&!g2(t)&&!g3e(t)||(this.print(e.typeArguments),this.print(e.typeParameters),e.optional&&this.token("?."),e.arguments.length===0&&this.tokenMap&&!this.tokenMap.endMatches(e,")")))return;this.tokenChar(40);let r=this.enterDelimited();this.printList(e.arguments,this.shouldPrintTrailingComma(")")),r(),this.rightParens(e)}function C3e(e){this.printList(e.expressions)}function P3e(){this.word("this")}function E3e(){this.word("super")}function I3e(e){return typeof this.format.decoratorsBeforeExport=="boolean"?this.format.decoratorsBeforeExport:typeof e.start=="number"&&e.start===e.declaration.start}function A3e(e){this.tokenChar(64),this.print(e.expression),this.newline()}function N3e(e){let{computed:t}=e,{optional:r,property:n}=e;if(this.print(e.object),!t&&g2(n))throw new TypeError("Got a MemberExpression for MemberExpression property");LH(n)&&typeof n.value=="number"&&(t=!0),r&&this.token("?."),t?(this.tokenChar(91),this.print(n),this.tokenChar(93)):(r||this.tokenChar(46),this.print(n))}function k3e(e){this.print(e.callee),this.print(e.typeParameters),e.optional&&this.token("?."),this.print(e.typeArguments),this.tokenChar(40);let t=this.enterDelimited();this.printList(e.arguments),t(),this.rightParens(e)}function _3e(e){this.print(e.callee),this.print(e.typeArguments),this.print(e.typeParameters),this.tokenChar(40);let t=this.enterDelimited();this.printList(e.arguments,this.shouldPrintTrailingComma(")")),t(),this.rightParens(e)}function L3e(){this.word("import")}function R3e(e){this.word("await"),this.space(),this.print(e.argument)}function D3e(e){e.delegate?(this.word("yield",!0),this.tokenChar(42),e.argument&&(this.space(),this.print(e.argument))):e.argument?(this.word("yield",!0),this.space(),this.print(e.argument)):this.word("yield")}function M3e(){this.semicolon(!0)}function O3e(e){this.tokenContext|=m3e.TokenContext.expressionStatement,this.print(e.expression),this.semicolon()}function F3e(e){this.print(e.left),(e.left.type==="Identifier"||y3e(e.left))&&(e.left.optional&&this.tokenChar(63),this.print(e.left.typeAnnotation)),this.space(),this.tokenChar(61),this.space(),this.print(e.right)}function B3e(e){this.print(e.left),this.space(),e.operator==="in"||e.operator==="instanceof"?this.word(e.operator):(this.token(e.operator),this._endsWithDiv=e.operator==="/"),this.space(),this.print(e.right)}function $3e(e){this.print(e.object),this.token("::"),this.print(e.callee)}function j3e(e){if(this.print(e.object),!e.computed&&g2(e.property))throw new TypeError("Got a MemberExpression for MemberExpression property");let t=e.computed;if(LH(e.property)&&typeof e.property.value=="number"&&(t=!0),t){let r=this.enterDelimited();this.tokenChar(91),this.print(e.property),this.tokenChar(93),r()}else this.tokenChar(46),this.print(e.property)}function z3e(e){this.print(e.meta),this.tokenChar(46),this.print(e.property)}function U3e(e){this.tokenChar(35),this.print(e.id)}function V3e(e){this.tokenChar(37),this.word(e.name)}function q3e(e){this.word("module",!0),this.space(),this.tokenChar(123),this.indent();let{body:t}=e;(t.body.length||t.directives.length)&&this.newline(),this.print(t),this.dedent(),this.rightBrace(e)}});var FH=ae(ha=>{"use strict";Object.defineProperty(ha,"__esModule",{value:!0});ha.BreakStatement=e5e;ha.CatchClause=s5e;ha.ContinueStatement=t5e;ha.DebuggerStatement=c5e;ha.DoWhileStatement=Q3e;ha.ForOfStatement=ha.ForInStatement=void 0;ha.ForStatement=J3e;ha.IfStatement=Y3e;ha.LabeledStatement=a5e;ha.ReturnStatement=r5e;ha.SwitchCase=l5e;ha.SwitchStatement=o5e;ha.ThrowStatement=n5e;ha.TryStatement=i5e;ha.VariableDeclaration=u5e;ha.VariableDeclarator=d5e;ha.WhileStatement=Z3e;ha.WithStatement=X3e;var H3e=xr(),{isFor:DH,isForStatement:G3e,isIfStatement:K3e,isStatement:W3e}=H3e;function X3e(e){this.word("with"),this.space(),this.tokenChar(40),this.print(e.object),this.tokenChar(41),this.printBlock(e)}function Y3e(e){this.word("if"),this.space(),this.tokenChar(40),this.print(e.test),this.tokenChar(41),this.space();let t=e.alternate&&K3e(MH(e.consequent));t&&(this.tokenChar(123),this.newline(),this.indent()),this.printAndIndentOnComments(e.consequent),t&&(this.dedent(),this.newline(),this.tokenChar(125)),e.alternate&&(this.endsWith(125)&&this.space(),this.word("else"),this.space(),this.printAndIndentOnComments(e.alternate))}function MH(e){let{body:t}=e;return W3e(t)===!1?e:MH(t)}function J3e(e){this.word("for"),this.space(),this.tokenChar(40);{let t=this.enterForStatementInit();this.print(e.init),t()}this.tokenChar(59),e.test&&(this.space(),this.print(e.test)),this.token(";",!1,1),e.update&&(this.space(),this.print(e.update)),this.tokenChar(41),this.printBlock(e)}function Z3e(e){this.word("while"),this.space(),this.tokenChar(40),this.print(e.test),this.tokenChar(41),this.printBlock(e)}function OH(e){this.word("for"),this.space();let t=e.type==="ForOfStatement";t&&e.await&&(this.word("await"),this.space()),this.noIndentInnerCommentsHere(),this.tokenChar(40);{let r=this.enterForXStatementInit(t);this.print(e.left),r?.()}this.space(),this.word(t?"of":"in"),this.space(),this.print(e.right),this.tokenChar(41),this.printBlock(e)}var uSt=ha.ForInStatement=OH,dSt=ha.ForOfStatement=OH;function Q3e(e){this.word("do"),this.space(),this.print(e.body),this.space(),this.word("while"),this.space(),this.tokenChar(40),this.print(e.test),this.tokenChar(41),this.semicolon()}function oP(e,t){t&&(e.space(),e.printTerminatorless(t)),e.semicolon()}function e5e(e){this.word("break"),oP(this,e.label)}function t5e(e){this.word("continue"),oP(this,e.label)}function r5e(e){this.word("return"),oP(this,e.argument)}function n5e(e){this.word("throw"),oP(this,e.argument)}function a5e(e){this.print(e.label),this.tokenChar(58),this.space(),this.print(e.body)}function i5e(e){this.word("try"),this.space(),this.print(e.block),this.space(),e.handlers?this.print(e.handlers[0]):this.print(e.handler),e.finalizer&&(this.space(),this.word("finally"),this.space(),this.print(e.finalizer))}function s5e(e){this.word("catch"),this.space(),e.param&&(this.tokenChar(40),this.print(e.param),this.print(e.param.typeAnnotation),this.tokenChar(41),this.space()),this.print(e.body)}function o5e(e){this.word("switch"),this.space(),this.tokenChar(40),this.print(e.discriminant),this.tokenChar(41),this.space(),this.tokenChar(123),this.printSequence(e.cases,!0),this.rightBrace(e)}function l5e(e){e.test?(this.word("case"),this.space(),this.print(e.test),this.tokenChar(58)):(this.word("default"),this.tokenChar(58)),e.consequent.length&&(this.newline(),this.printSequence(e.consequent,!0))}function c5e(){this.word("debugger"),this.semicolon()}function u5e(e,t){e.declare&&(this.word("declare"),this.space());let{kind:r}=e;r==="await using"?(this.word("await"),this.space(),this.word("using",!0)):this.word(r,r==="using"),this.space();let n=!1;if(!DH(t))for(let a of e.declarations)a.init&&(n=!0);if(this.printList(e.declarations,void 0,void 0,e.declarations.length>1,n?function(a){this.token(",",!1,a),this.newline()}:void 0),DH(t)){if(G3e(t)){if(t.init===e)return}else if(t.left===e)return}this.semicolon()}function d5e(e){this.print(e.id),e.definite&&this.tokenChar(33),this.print(e.id.typeAnnotation),e.init&&(this.space(),this.tokenChar(61),this.space(),this.print(e.init))}});var BH=ae(Tl=>{"use strict";Object.defineProperty(Tl,"__esModule",{value:!0});Tl.ClassAccessorProperty=b5e;Tl.ClassBody=g5e;Tl.ClassExpression=Tl.ClassDeclaration=h5e;Tl.ClassMethod=S5e;Tl.ClassPrivateMethod=T5e;Tl.ClassPrivateProperty=v5e;Tl.ClassProperty=x5e;Tl.StaticBlock=C5e;Tl._classMethodHead=w5e;var f5e=xr(),{isExportDefaultDeclaration:p5e,isExportNamedDeclaration:m5e}=f5e;function h5e(e,t){(!(p5e(t)||m5e(t))||!this._shouldPrintDecoratorsBeforeExport(t))&&this.printJoin(e.decorators),e.declare&&(this.word("declare"),this.space()),e.abstract&&(this.word("abstract"),this.space()),this.word("class"),e.id&&(this.space(),this.print(e.id)),this.print(e.typeParameters),e.superClass&&(this.space(),this.word("extends"),this.space(),this.print(e.superClass),this.print(e.superTypeParameters)),e.implements&&(this.space(),this.word("implements"),this.space(),this.printList(e.implements)),this.space(),this.print(e.body)}function g5e(e){if(this.tokenChar(123),e.body.length===0)this.tokenChar(125);else{this.newline();let t=y5e(this,e);t?.(-1);let r=this.enterDelimited();this.printJoin(e.body,!0,!0,t,!0),r(),this.endsWith(10)||this.newline(),this.rightBrace(e)}}function y5e(e,t){if(!e.tokenMap||t.start==null||t.end==null)return null;let r=e.tokenMap.getIndexes(t);if(!r)return null;let n=1,a=0,i=0,s=()=>{for(;i<t.body.length&&t.body[i].start==null;)i++};return s(),o=>{i<=o&&(i=o+1,s());let l=i===t.body.length?t.end:t.body[i].start,c;for(;n<r.length&&e.tokenMap.matchesOriginal(c=e._tokens[r[n]],";")&&c.start<l;)e.token(";",void 0,a++),n++}}function x5e(e){if(this.printJoin(e.decorators),!e.static&&!this.format.preserveFormat){var t;let r=(t=e.key.loc)==null||(t=t.end)==null?void 0:t.line;r&&this.catchUp(r)}this.tsPrintClassMemberModifiers(e),e.computed?(this.tokenChar(91),this.print(e.key),this.tokenChar(93)):(this._variance(e),this.print(e.key)),e.optional&&this.tokenChar(63),e.definite&&this.tokenChar(33),this.print(e.typeAnnotation),e.value&&(this.space(),this.tokenChar(61),this.space(),this.print(e.value)),this.semicolon()}function b5e(e){var t;this.printJoin(e.decorators);let r=(t=e.key.loc)==null||(t=t.end)==null?void 0:t.line;r&&this.catchUp(r),this.tsPrintClassMemberModifiers(e),this.word("accessor",!0),this.space(),e.computed?(this.tokenChar(91),this.print(e.key),this.tokenChar(93)):(this._variance(e),this.print(e.key)),e.optional&&this.tokenChar(63),e.definite&&this.tokenChar(33),this.print(e.typeAnnotation),e.value&&(this.space(),this.tokenChar(61),this.space(),this.print(e.value)),this.semicolon()}function v5e(e){this.printJoin(e.decorators),this.tsPrintClassMemberModifiers(e),this.print(e.key),e.optional&&this.tokenChar(63),e.definite&&this.tokenChar(33),this.print(e.typeAnnotation),e.value&&(this.space(),this.tokenChar(61),this.space(),this.print(e.value)),this.semicolon()}function S5e(e){this._classMethodHead(e),this.space(),this.print(e.body)}function T5e(e){this._classMethodHead(e),this.space(),this.print(e.body)}function w5e(e){if(this.printJoin(e.decorators),!this.format.preserveFormat){var t;let r=(t=e.key.loc)==null||(t=t.end)==null?void 0:t.line;r&&this.catchUp(r)}this.tsPrintClassMemberModifiers(e),this._methodHead(e)}function C5e(e){this.word("static"),this.space(),this.tokenChar(123),e.body.length===0?this.tokenChar(125):(this.newline(),this.printSequence(e.body,!0),this.rightBrace(e))}});var $H=ae(wl=>{"use strict";Object.defineProperty(wl,"__esModule",{value:!0});wl.ArrowFunctionExpression=M5e;wl.FunctionDeclaration=wl.FunctionExpression=D5e;wl._functionHead=R5e;wl._methodHead=_5e;wl._param=k5e;wl._parameters=N5e;wl._params=A5e;wl._predicate=L5e;wl._shouldPrintArrowParamsParens=O5e;var P5e=xr(),E5e=Zm(),{isIdentifier:I5e}=P5e;function A5e(e,t,r){this.print(e.typeParameters);let n=F5e.call(this,t,r);n&&this.sourceIdentifierName(n.name,n.pos),this.tokenChar(40),this._parameters(e.params,")");let a=e.type==="ArrowFunctionExpression";this.print(e.returnType,a),this._noLineTerminator=a}function N5e(e,t){let r=this.enterDelimited(),n=this.shouldPrintTrailingComma(t),a=e.length;for(let i=0;i<a;i++)this._param(e[i]),(n||i<a-1)&&(this.token(",",void 0,i),this.space());this.token(t),r()}function k5e(e){this.printJoin(e.decorators),this.print(e),e.optional&&this.tokenChar(63),this.print(e.typeAnnotation)}function _5e(e){let t=e.kind,r=e.key;(t==="get"||t==="set")&&(this.word(t),this.space()),e.async&&(this.word("async",!0),this.space()),(t==="method"||t==="init")&&e.generator&&this.tokenChar(42),e.computed?(this.tokenChar(91),this.print(r),this.tokenChar(93)):this.print(r),e.optional&&this.tokenChar(63),this._params(e,e.computed&&e.key.type!=="StringLiteral"?void 0:e.key)}function L5e(e,t){e.predicate&&(e.returnType||this.tokenChar(58),this.space(),this.print(e.predicate,t))}function R5e(e,t){e.async&&(this.word("async"),this.format.preserveFormat||(this._endsWithInnerRaw=!1),this.space()),this.word("function"),e.generator&&(this.format.preserveFormat||(this._endsWithInnerRaw=!1),this.tokenChar(42)),this.space(),e.id&&this.print(e.id),this._params(e,e.id,t),e.type!=="TSDeclareFunction"&&this._predicate(e)}function D5e(e,t){this._functionHead(e,t),this.space(),this.print(e.body)}function M5e(e,t){e.async&&(this.word("async",!0),this.space()),this._shouldPrintArrowParamsParens(e)?this._params(e,void 0,t):this.print(e.params[0],!0),this._predicate(e,!0),this.space(),this.printInnerComments(),this.token("=>"),this.space(),this.tokenContext|=E5e.TokenContext.arrowBody,this.print(e.body)}function O5e(e){var t,r;if(e.params.length!==1||e.typeParameters||e.returnType||e.predicate)return!0;let n=e.params[0];if(!I5e(n)||n.typeAnnotation||n.optional||(t=n.leadingComments)!=null&&t.length||(r=n.trailingComments)!=null&&r.length)return!0;if(this.tokenMap){if(e.loc==null||this.tokenMap.findMatching(e,"(")!==null)return!0;let a=this.tokenMap.findMatching(e,"=>");return a?.loc==null?!0:a.loc.start.line!==e.loc.start.line}return!!this.format.retainLines}function F5e(e,t){let r=e;if(!r&&t){let l=t.type;l==="VariableDeclarator"?r=t.id:l==="AssignmentExpression"||l==="AssignmentPattern"?r=t.left:l==="ObjectProperty"||l==="ClassProperty"?(!t.computed||t.key.type==="StringLiteral")&&(r=t.key):(l==="ClassPrivateProperty"||l==="ClassAccessorProperty")&&(r=t.key)}if(!r)return;let n;if(r.type==="Identifier"){var a,i;n={pos:(a=r.loc)==null?void 0:a.start,name:((i=r.loc)==null?void 0:i.identifierName)||r.name}}else if(r.type==="PrivateName"){var s;n={pos:(s=r.loc)==null?void 0:s.start,name:"#"+r.id.name}}else if(r.type==="StringLiteral"){var o;n={pos:(o=r.loc)==null?void 0:o.start,name:r.value}}return n}});var y2=ae(As=>{"use strict";Object.defineProperty(As,"__esModule",{value:!0});As.ExportAllDeclaration=J5e;As.ExportDefaultDeclaration=Q5e;As.ExportDefaultSpecifier=K5e;As.ExportNamedDeclaration=Z5e;As.ExportNamespaceSpecifier=X5e;As.ExportSpecifier=W5e;As.ImportAttribute=tBe;As.ImportDeclaration=eBe;As.ImportDefaultSpecifier=G5e;As.ImportExpression=nBe;As.ImportNamespaceSpecifier=rBe;As.ImportSpecifier=H5e;As._printAttributes=Y5e;var B5e=xr(),$5e=Zm(),{isClassDeclaration:j5e,isExportDefaultSpecifier:z5e,isExportNamespaceSpecifier:U5e,isImportDefaultSpecifier:V5e,isImportNamespaceSpecifier:q5e,isStatement:zH}=B5e;function H5e(e){(e.importKind==="type"||e.importKind==="typeof")&&(this.word(e.importKind),this.space()),this.print(e.imported),e.local&&e.local.name!==e.imported.name&&(this.space(),this.word("as"),this.space(),this.print(e.local))}function G5e(e){this.print(e.local)}function K5e(e){this.print(e.exported)}function W5e(e){e.exportKind==="type"&&(this.word("type"),this.space()),this.print(e.local),e.exported&&e.local.name!==e.exported.name&&(this.space(),this.word("as"),this.space(),this.print(e.exported))}function X5e(e){this.tokenChar(42),this.space(),this.word("as"),this.space(),this.print(e.exported)}var jH=!1;function Y5e(e,t){var r;let{importAttributesKeyword:n}=this.format,{attributes:a,assertions:i}=e;a&&!n&&e.extra&&(e.extra.deprecatedAssertSyntax||e.extra.deprecatedWithLegacySyntax)&&!jH&&(jH=!0);let s=n==="assert"||!n&&i;if(this.word(s?"assert":"with"),this.space(),!s&&(n==="with-legacy"||!n&&(r=e.extra)!=null&&r.deprecatedWithLegacySyntax)){this.printList(a||i);return}let o=t?1:0;this.token("{",void 0,o),this.space(),this.printList(a||i,this.shouldPrintTrailingComma("}")),this.space(),this.token("}",void 0,o)}function J5e(e){var t,r;this.word("export"),this.space(),e.exportKind==="type"&&(this.word("type"),this.space()),this.tokenChar(42),this.space(),this.word("from"),this.space(),(t=e.attributes)!=null&&t.length||(r=e.assertions)!=null&&r.length?(this.print(e.source,!0),this.space(),this._printAttributes(e,!1)):this.print(e.source),this.semicolon()}function UH(e,t){j5e(t.declaration)&&e._shouldPrintDecoratorsBeforeExport(t)&&e.printJoin(t.declaration.decorators)}function Z5e(e){if(UH(this,e),this.word("export"),this.space(),e.declaration){let n=e.declaration;this.print(n),zH(n)||this.semicolon()}else{e.exportKind==="type"&&(this.word("type"),this.space());let n=e.specifiers.slice(0),a=!1;for(;;){let s=n[0];if(z5e(s)||U5e(s))a=!0,this.print(n.shift()),n.length&&(this.tokenChar(44),this.space());else break}let i=!1;if((n.length||!n.length&&!a)&&(i=!0,this.tokenChar(123),n.length&&(this.space(),this.printList(n,this.shouldPrintTrailingComma("}")),this.space()),this.tokenChar(125)),e.source){var t,r;this.space(),this.word("from"),this.space(),(t=e.attributes)!=null&&t.length||(r=e.assertions)!=null&&r.length?(this.print(e.source,!0),this.space(),this._printAttributes(e,i)):this.print(e.source)}this.semicolon()}}function Q5e(e){UH(this,e),this.word("export"),this.noIndentInnerCommentsHere(),this.space(),this.word("default"),this.space(),this.tokenContext|=$5e.TokenContext.exportDefault;let t=e.declaration;this.print(t),zH(t)||this.semicolon()}function eBe(e){var t,r;this.word("import"),this.space();let n=e.importKind==="type"||e.importKind==="typeof";n?(this.noIndentInnerCommentsHere(),this.word(e.importKind),this.space()):e.module?(this.noIndentInnerCommentsHere(),this.word("module"),this.space()):e.phase&&(this.noIndentInnerCommentsHere(),this.word(e.phase),this.space());let a=e.specifiers.slice(0),i=!!a.length;for(;i;){let o=a[0];if(V5e(o)||q5e(o))this.print(a.shift()),a.length&&(this.tokenChar(44),this.space());else break}let s=!1;a.length?(s=!0,this.tokenChar(123),this.space(),this.printList(a,this.shouldPrintTrailingComma("}")),this.space(),this.tokenChar(125)):n&&!i&&(s=!0,this.tokenChar(123),this.tokenChar(125)),(i||n)&&(this.space(),this.word("from"),this.space()),(t=e.attributes)!=null&&t.length||(r=e.assertions)!=null&&r.length?(this.print(e.source,!0),this.space(),this._printAttributes(e,s)):this.print(e.source),this.semicolon()}function tBe(e){this.print(e.key),this.tokenChar(58),this.space(),this.print(e.value)}function rBe(e){this.tokenChar(42),this.space(),this.word("as"),this.space(),this.print(e.local)}function nBe(e){this.word("import"),e.phase&&(this.tokenChar(46),this.word(e.phase)),this.tokenChar(40);let t=this.shouldPrintTrailingComma(")");this.print(e.source),e.options!=null&&(this.tokenChar(44),this.space(),this.print(e.options)),t&&this.tokenChar(44),this.rightParens(e)}});var GH=ae((gSt,HH)=>{"use strict";var VH={},aBe=VH.hasOwnProperty,qH=(e,t)=>{for(let r in e)aBe.call(e,r)&&t(r,e[r])},iBe=(e,t)=>(t&&qH(t,(r,n)=>{e[r]=n}),e),sBe=(e,t)=>{let r=e.length,n=-1;for(;++n<r;)t(e[n])},lP=e=>"\\u"+("0000"+e).slice(-4),V0=(e,t)=>{let r=e.toString(16);return t?r:r.toUpperCase()},q0=VH.toString,oBe=Array.isArray,lBe=e=>typeof Buffer=="function"&&Buffer.isBuffer(e),cBe=e=>q0.call(e)=="[object Object]",uBe=e=>typeof e=="string"||q0.call(e)=="[object String]",dBe=e=>typeof e=="number"||q0.call(e)=="[object Number]",x2=e=>typeof e=="bigint",fBe=e=>typeof e=="function",pBe=e=>q0.call(e)=="[object Map]",mBe=e=>q0.call(e)=="[object Set]",hBe={"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t"},gBe=/[\\\b\f\n\r\t]/,yBe=/[0-9]/,xBe=/[\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,bBe=/([\uD800-\uDBFF][\uDC00-\uDFFF])|([\uD800-\uDFFF])|(['"`])|[^]/g,vBe=/([\uD800-\uDBFF][\uDC00-\uDFFF])|([\uD800-\uDFFF])|(['"`])|[^ !#-&\(-\[\]-_a-~]/g,Of=(e,t)=>{let r=()=>{c=l,++t.indentLevel,l=t.indent.repeat(t.indentLevel)},n={escapeEverything:!1,minimal:!1,isScriptContext:!1,quotes:"single",wrap:!1,es6:!1,json:!1,compact:!0,lowercaseHex:!1,numbers:"decimal",indent:" ",indentLevel:0,__inline1__:!1,__inline2__:!1},a=t&&t.json;a&&(n.quotes="double",n.wrap=!0),t=iBe(n,t),t.quotes!="single"&&t.quotes!="double"&&t.quotes!="backtick"&&(t.quotes="single");let i=t.quotes=="double"?'"':t.quotes=="backtick"?"`":"'",s=t.compact,o=t.lowercaseHex,l=t.indent.repeat(t.indentLevel),c="",u=t.__inline1__,d=t.__inline2__,f=s?"":`
`,p,m=!0,h=t.numbers=="binary",x=t.numbers=="octal",g=t.numbers=="decimal",y=t.numbers=="hexadecimal";if(a&&e&&fBe(e.toJSON)&&(e=e.toJSON()),!uBe(e)){if(pBe(e))return e.size==0?"new Map()":(s||(t.__inline1__=!0,t.__inline2__=!1),"new Map("+Of(Array.from(e),t)+")");if(mBe(e))return e.size==0?"new Set()":"new Set("+Of(Array.from(e),t)+")";if(lBe(e))return e.length==0?"Buffer.from([])":"Buffer.from("+Of(Array.from(e),t)+")";if(oBe(e))return p=[],t.wrap=!0,u&&(t.__inline1__=!1,t.__inline2__=!0),d||r(),sBe(e,S=>{m=!1,d&&(t.__inline2__=!1),p.push((s||d?"":l)+Of(S,t))}),m?"[]":d?"["+p.join(", ")+"]":"["+f+p.join(","+f)+f+(s?"":c)+"]";if(dBe(e)||x2(e)){if(a)return JSON.stringify(Number(e));let S;if(g)S=String(e);else if(y){let w=e.toString(16);o||(w=w.toUpperCase()),S="0x"+w}else h?S="0b"+e.toString(2):x&&(S="0o"+e.toString(8));return x2(e)?S+"n":S}else return x2(e)?a?JSON.stringify(Number(e)):e+"n":cBe(e)?(p=[],t.wrap=!0,r(),qH(e,(S,w)=>{m=!1,p.push((s?"":l)+Of(S,t)+":"+(s?"":" ")+Of(w,t))}),m?"{}":"{"+f+p.join(","+f)+f+(s?"":c)+"}"):a?JSON.stringify(e)||"null":String(e)}let b=t.escapeEverything?bBe:vBe;return p=e.replace(b,(S,w,E,C,N,_)=>{if(w){if(t.minimal)return w;let D=w.charCodeAt(0),W=w.charCodeAt(1);if(t.es6){let Z=(D-55296)*1024+W-56320+65536;return"\\u{"+V0(Z,o)+"}"}return lP(V0(D,o))+lP(V0(W,o))}if(E)return lP(V0(E.charCodeAt(0),o));if(S=="\0"&&!a&&!yBe.test(_.charAt(N+1)))return"\\0";if(C)return C==i||t.escapeEverything?"\\"+C:C;if(gBe.test(S))return hBe[S];if(t.minimal&&!xBe.test(S))return S;let O=V0(S.charCodeAt(0),o);return a||O.length>2?lP(O):"\\x"+("00"+O).slice(-2)}),i=="`"&&(p=p.replace(/\$\{/g,"\\${")),t.isScriptContext&&(p=p.replace(/<\/(script|style)/gi,"<\\/$1").replace(/<!--/g,a?"\\u003C!--":"\\x3C!--")),t.wrap&&(p=i+p+i),p};Of.version="3.0.2";HH.exports=Of});var v2=ae(On=>{"use strict";Object.defineProperty(On,"__esModule",{value:!0});On.ArgumentPlaceholder=PBe;On.ArrayPattern=On.ArrayExpression=kBe;On.BigIntLiteral=BBe;On.BooleanLiteral=DBe;On.Identifier=CBe;On.NullLiteral=MBe;On.NumericLiteral=OBe;On.ObjectPattern=On.ObjectExpression=IBe;On.ObjectMethod=ABe;On.ObjectProperty=NBe;On.PipelineBareFunction=zBe;On.PipelinePrimaryTopicReference=UBe;On.PipelineTopicExpression=jBe;On.RecordExpression=_Be;On.RegExpLiteral=RBe;On.SpreadElement=On.RestElement=EBe;On.StringLiteral=FBe;On.TopicReference=$Be;On.TupleExpression=LBe;On.VoidPattern=VBe;On._getRawIdentifier=wBe;var SBe=xr(),XH=GH(),{isAssignmentPattern:TBe,isIdentifier:b2}=SBe,KH=null,cP="";function wBe(e){if(e===KH)return cP;KH=e;let{name:t}=e,r=this.tokenMap.find(e,n=>n.value===t);return r?(cP=this._originalCode.slice(r.start,r.end),cP):cP=e.name}function CBe(e){var t;this.sourceIdentifierName(((t=e.loc)==null?void 0:t.identifierName)||e.name),this.word(this.tokenMap?this._getRawIdentifier(e):e.name)}function PBe(){this.tokenChar(63)}function EBe(e){this.token("..."),this.print(e.argument)}function IBe(e){let t=e.properties;if(this.tokenChar(123),t.length){let r=this.enterDelimited();this.space(),this.printList(t,this.shouldPrintTrailingComma("}"),!0,!0),this.space(),r()}this.sourceWithOffset("end",e.loc,-1),this.tokenChar(125)}function ABe(e){this.printJoin(e.decorators),this._methodHead(e),this.space(),this.print(e.body)}function NBe(e){if(this.printJoin(e.decorators),e.computed)this.tokenChar(91),this.print(e.key),this.tokenChar(93);else{if(TBe(e.value)&&b2(e.key)&&e.key.name===e.value.left.name){this.print(e.value);return}if(this.print(e.key),e.shorthand&&b2(e.key)&&b2(e.value)&&e.key.name===e.value.name)return}this.tokenChar(58),this.space(),this.print(e.value)}function kBe(e){let t=e.elements,r=t.length;this.tokenChar(91);let n=this.enterDelimited();for(let a=0;a<t.length;a++){let i=t[a];i?(a>0&&this.space(),this.print(i),(a<r-1||this.shouldPrintTrailingComma("]"))&&this.token(",",!1,a)):this.token(",",!1,a)}n(),this.tokenChar(93)}function _Be(e){let t=e.properties,r,n;if(this.format.recordAndTupleSyntaxType==="bar")r="{|",n="|}";else{if(this.format.recordAndTupleSyntaxType!=="hash"&&this.format.recordAndTupleSyntaxType!=null)throw new Error(`The "recordAndTupleSyntaxType" generator option must be "bar" or "hash" (${JSON.stringify(this.format.recordAndTupleSyntaxType)} received).`);r="#{",n="}"}this.token(r),t.length&&(this.space(),this.printList(t,this.shouldPrintTrailingComma(n),!0,!0),this.space()),this.token(n)}function LBe(e){let t=e.elements,r=t.length,n,a;if(this.format.recordAndTupleSyntaxType==="bar")n="[|",a="|]";else if(this.format.recordAndTupleSyntaxType==="hash")n="#[",a="]";else throw new Error(`${this.format.recordAndTupleSyntaxType} is not a valid recordAndTuple syntax type`);this.token(n);for(let i=0;i<t.length;i++){let s=t[i];s&&(i>0&&this.space(),this.print(s),(i<r-1||this.shouldPrintTrailingComma(a))&&this.token(",",!1,i))}this.token(a)}function RBe(e){this.word(`/${e.pattern}/${e.flags}`)}function DBe(e){this.word(e.value?"true":"false")}function MBe(){this.word("null")}function OBe(e){let t=this.getPossibleRaw(e),r=this.format.jsescOption,n=e.value,a=n+"";r.numbers?this.number(XH(n,r),n):t==null?this.number(a,n):this.format.minified?this.number(t.length<a.length?t:a,n):this.number(t,n)}function FBe(e){let t=this.getPossibleRaw(e);if(!this.format.minified&&t!==void 0){this.token(t);return}let r=XH(e.value,this.format.jsescOption);this.token(r)}function BBe(e){let t=this.getPossibleRaw(e);if(!this.format.minified&&t!==void 0){this.word(t);return}this.word(e.value+"n")}var WH=new Set(["^^","@@","^","%","#"]);function $Be(){let{topicToken:e}=this.format;if(WH.has(e))this.token(e);else{let t=JSON.stringify(e),r=Array.from(WH,n=>JSON.stringify(n));throw new Error(`The "topicToken" generator option must be one of ${r.join(", ")} (${t} received instead).`)}}function jBe(e){this.print(e.expression)}function zBe(e){this.print(e.callee)}function UBe(){this.tokenChar(35)}function VBe(){this.word("void")}});var JH=ae(bt=>{"use strict";Object.defineProperty(bt,"__esModule",{value:!0});bt.AnyTypeAnnotation=WBe;bt.ArrayTypeAnnotation=XBe;bt.BooleanLiteralTypeAnnotation=JBe;bt.BooleanTypeAnnotation=YBe;bt.DeclareClass=QBe;bt.DeclareExportAllDeclaration=u4e;bt.DeclareExportDeclaration=c4e;bt.DeclareFunction=e4e;bt.DeclareInterface=n4e;bt.DeclareModule=a4e;bt.DeclareModuleExports=i4e;bt.DeclareOpaqueType=o4e;bt.DeclareTypeAlias=s4e;bt.DeclareVariable=l4e;bt.DeclaredPredicate=r4e;bt.EmptyTypeAnnotation=L4e;bt.EnumBooleanBody=f4e;bt.EnumBooleanMember=y4e;bt.EnumDeclaration=d4e;bt.EnumDefaultedMember=g4e;bt.EnumNumberBody=p4e;bt.EnumNumberMember=x4e;bt.EnumStringBody=m4e;bt.EnumStringMember=b4e;bt.EnumSymbolBody=h4e;bt.ExistsTypeAnnotation=S4e;bt.FunctionTypeAnnotation=T4e;bt.FunctionTypeParam=w4e;bt.IndexedAccessType=n$e;bt.InferredPredicate=t4e;bt.InterfaceDeclaration=I4e;bt.GenericTypeAnnotation=bt.ClassImplements=bt.InterfaceExtends=C4e;bt.InterfaceTypeAnnotation=N4e;bt.IntersectionTypeAnnotation=k4e;bt.MixedTypeAnnotation=_4e;bt.NullLiteralTypeAnnotation=ZBe;bt.NullableTypeAnnotation=R4e;Object.defineProperty(bt,"NumberLiteralTypeAnnotation",{enumerable:!0,get:function(){return YH.NumericLiteral}});bt.NumberTypeAnnotation=D4e;bt.ObjectTypeAnnotation=q4e;bt.ObjectTypeCallProperty=G4e;bt.ObjectTypeIndexer=K4e;bt.ObjectTypeInternalSlot=H4e;bt.ObjectTypeProperty=W4e;bt.ObjectTypeSpreadProperty=X4e;bt.OpaqueType=V4e;bt.OptionalIndexedAccessType=a$e;bt.QualifiedTypeIdentifier=Y4e;Object.defineProperty(bt,"StringLiteralTypeAnnotation",{enumerable:!0,get:function(){return YH.StringLiteral}});bt.StringTypeAnnotation=M4e;bt.SymbolTypeAnnotation=J4e;bt.ThisTypeAnnotation=O4e;bt.TupleTypeAnnotation=F4e;bt.TypeAlias=$4e;bt.TypeAnnotation=j4e;bt.TypeCastExpression=e$e;bt.TypeParameter=U4e;bt.TypeParameterDeclaration=bt.TypeParameterInstantiation=z4e;bt.TypeofTypeAnnotation=B4e;bt.UnionTypeAnnotation=Q4e;bt.Variance=t$e;bt.VoidTypeAnnotation=r$e;bt._interfaceish=P4e;bt._variance=E4e;var qBe=xr(),HBe=y2(),GBe=Zm(),YH=v2(),{isDeclareExportDeclaration:uP,isStatement:KBe}=qBe;function WBe(){this.word("any")}function XBe(e){this.print(e.elementType,!0),this.tokenChar(91),this.tokenChar(93)}function YBe(){this.word("boolean")}function JBe(e){this.word(e.value?"true":"false")}function ZBe(){this.word("null")}function QBe(e,t){uP(t)||(this.word("declare"),this.space()),this.word("class"),this.space(),this._interfaceish(e)}function e4e(e,t){uP(t)||(this.word("declare"),this.space()),this.word("function"),this.space(),this.print(e.id),this.print(e.id.typeAnnotation.typeAnnotation),e.predicate&&(this.space(),this.print(e.predicate)),this.semicolon()}function t4e(){this.tokenChar(37),this.word("checks")}function r4e(e){this.tokenChar(37),this.word("checks"),this.tokenChar(40),this.print(e.value),this.tokenChar(41)}function n4e(e){this.word("declare"),this.space(),this.InterfaceDeclaration(e)}function a4e(e){this.word("declare"),this.space(),this.word("module"),this.space(),this.print(e.id),this.space(),this.print(e.body)}function i4e(e){this.word("declare"),this.space(),this.word("module"),this.tokenChar(46),this.word("exports"),this.print(e.typeAnnotation)}function s4e(e){this.word("declare"),this.space(),this.TypeAlias(e)}function o4e(e,t){uP(t)||(this.word("declare"),this.space()),this.OpaqueType(e)}function l4e(e,t){uP(t)||(this.word("declare"),this.space()),this.word("var"),this.space(),this.print(e.id),this.print(e.id.typeAnnotation),this.semicolon()}function c4e(e){this.word("declare"),this.space(),this.word("export"),this.space(),e.default&&(this.word("default"),this.space()),v4e.call(this,e)}function u4e(e){this.word("declare"),this.space(),HBe.ExportAllDeclaration.call(this,e)}function d4e(e){let{id:t,body:r}=e;this.word("enum"),this.space(),this.print(t),this.print(r)}function dP(e,t,r){r&&(e.space(),e.word("of"),e.space(),e.word(t)),e.space()}function fP(e,t){let{members:r}=t;e.token("{"),e.indent(),e.newline();for(let n of r)e.print(n),e.newline();t.hasUnknownMembers&&(e.token("..."),e.newline()),e.dedent(),e.token("}")}function f4e(e){let{explicitType:t}=e;dP(this,"boolean",t),fP(this,e)}function p4e(e){let{explicitType:t}=e;dP(this,"number",t),fP(this,e)}function m4e(e){let{explicitType:t}=e;dP(this,"string",t),fP(this,e)}function h4e(e){dP(this,"symbol",!0),fP(this,e)}function g4e(e){let{id:t}=e;this.print(t),this.tokenChar(44)}function S2(e,t){e.print(t.id),e.space(),e.token("="),e.space(),e.print(t.init),e.token(",")}function y4e(e){S2(this,e)}function x4e(e){S2(this,e)}function b4e(e){S2(this,e)}function v4e(e){if(e.declaration){let t=e.declaration;this.print(t),KBe(t)||this.semicolon()}else this.tokenChar(123),e.specifiers.length&&(this.space(),this.printList(e.specifiers),this.space()),this.tokenChar(125),e.source&&(this.space(),this.word("from"),this.space(),this.print(e.source)),this.semicolon()}function S4e(){this.tokenChar(42)}function T4e(e,t){this.print(e.typeParameters),this.tokenChar(40),e.this&&(this.word("this"),this.tokenChar(58),this.space(),this.print(e.this.typeAnnotation),(e.params.length||e.rest)&&(this.tokenChar(44),this.space())),this.printList(e.params),e.rest&&(e.params.length&&(this.tokenChar(44),this.space()),this.token("..."),this.print(e.rest)),this.tokenChar(41);let r=t?.type;r!=null&&(r==="ObjectTypeCallProperty"||r==="ObjectTypeInternalSlot"||r==="DeclareFunction"||r==="ObjectTypeProperty"&&t.method)?this.tokenChar(58):(this.space(),this.token("=>")),this.space(),this.print(e.returnType)}function w4e(e){this.print(e.name),e.optional&&this.tokenChar(63),e.name&&(this.tokenChar(58),this.space()),this.print(e.typeAnnotation)}function C4e(e){this.print(e.id),this.print(e.typeParameters,!0)}function P4e(e){var t;if(this.print(e.id),this.print(e.typeParameters),(t=e.extends)!=null&&t.length&&(this.space(),this.word("extends"),this.space(),this.printList(e.extends)),e.type==="DeclareClass"){var r,n;(r=e.mixins)!=null&&r.length&&(this.space(),this.word("mixins"),this.space(),this.printList(e.mixins)),(n=e.implements)!=null&&n.length&&(this.space(),this.word("implements"),this.space(),this.printList(e.implements))}this.space(),this.print(e.body)}function E4e(e){var t;let r=(t=e.variance)==null?void 0:t.kind;r!=null&&(r==="plus"?this.tokenChar(43):r==="minus"&&this.tokenChar(45))}function I4e(e){this.word("interface"),this.space(),this._interfaceish(e)}function A4e(e){this.space(),this.token("&",!1,e),this.space()}function N4e(e){var t;this.word("interface"),(t=e.extends)!=null&&t.length&&(this.space(),this.word("extends"),this.space(),this.printList(e.extends)),this.space(),this.print(e.body)}function k4e(e){this.printJoin(e.types,void 0,void 0,A4e)}function _4e(){this.word("mixed")}function L4e(){this.word("empty")}function R4e(e){this.tokenChar(63),this.print(e.typeAnnotation)}function D4e(){this.word("number")}function M4e(){this.word("string")}function O4e(){this.word("this")}function F4e(e){this.tokenChar(91),this.printList(e.types),this.tokenChar(93)}function B4e(e){this.word("typeof"),this.space(),this.print(e.argument)}function $4e(e){this.word("type"),this.space(),this.print(e.id),this.print(e.typeParameters),this.space(),this.tokenChar(61),this.space(),this.print(e.right),this.semicolon()}function j4e(e,t){this.tokenChar(58),this.space(),t.type==="ArrowFunctionExpression"?this.tokenContext|=GBe.TokenContext.arrowFlowReturnType:e.optional&&this.tokenChar(63),this.print(e.typeAnnotation)}function z4e(e){this.tokenChar(60),this.printList(e.params),this.tokenChar(62)}function U4e(e){this._variance(e),this.word(e.name),e.bound&&this.print(e.bound),e.default&&(this.space(),this.tokenChar(61),this.space(),this.print(e.default))}function V4e(e){this.word("opaque"),this.space(),this.word("type"),this.space(),this.print(e.id),this.print(e.typeParameters),e.supertype&&(this.tokenChar(58),this.space(),this.print(e.supertype)),e.impltype&&(this.space(),this.tokenChar(61),this.space(),this.print(e.impltype)),this.semicolon()}function q4e(e){e.exact?this.token("{|"):this.tokenChar(123);let t=[...e.properties,...e.callProperties||[],...e.indexers||[],...e.internalSlots||[]];t.length&&(this.newline(),this.space(),this.printJoin(t,!0,!0,void 0,void 0,()=>{(t.length!==1||e.inexact)&&(this.tokenChar(44),this.space())}),this.space()),e.inexact&&(this.indent(),this.token("..."),t.length&&this.newline(),this.dedent()),e.exact?this.token("|}"):this.tokenChar(125)}function H4e(e){e.static&&(this.word("static"),this.space()),this.tokenChar(91),this.tokenChar(91),this.print(e.id),this.tokenChar(93),this.tokenChar(93),e.optional&&this.tokenChar(63),e.method||(this.tokenChar(58),this.space()),this.print(e.value)}function G4e(e){e.static&&(this.word("static"),this.space()),this.print(e.value)}function K4e(e){e.static&&(this.word("static"),this.space()),this._variance(e),this.tokenChar(91),e.id&&(this.print(e.id),this.tokenChar(58),this.space()),this.print(e.key),this.tokenChar(93),this.tokenChar(58),this.space(),this.print(e.value)}function W4e(e){e.proto&&(this.word("proto"),this.space()),e.static&&(this.word("static"),this.space()),(e.kind==="get"||e.kind==="set")&&(this.word(e.kind),this.space()),this._variance(e),this.print(e.key),e.optional&&this.tokenChar(63),e.method||(this.tokenChar(58),this.space()),this.print(e.value)}function X4e(e){this.token("..."),this.print(e.argument)}function Y4e(e){this.print(e.qualification),this.tokenChar(46),this.print(e.id)}function J4e(){this.word("symbol")}function Z4e(e){this.space(),this.token("|",!1,e),this.space()}function Q4e(e){this.printJoin(e.types,void 0,void 0,Z4e)}function e$e(e){this.tokenChar(40),this.print(e.expression),this.print(e.typeAnnotation),this.tokenChar(41)}function t$e(e){e.kind==="plus"?this.tokenChar(43):this.tokenChar(45)}function r$e(){this.word("void")}function n$e(e){this.print(e.objectType,!0),this.tokenChar(91),this.print(e.indexType),this.tokenChar(93)}function a$e(e){this.print(e.objectType),e.optional&&this.token("?."),this.tokenChar(91),this.print(e.indexType),this.tokenChar(93)}});var ZH=ae(ed=>{"use strict";Object.defineProperty(ed,"__esModule",{value:!0});ed.BlockStatement=o$e;ed.Directive=l$e;ed.DirectiveLiteral=d$e;ed.File=i$e;ed.InterpreterDirective=f$e;ed.Placeholder=p$e;ed.Program=s$e;function i$e(e){e.program&&this.print(e.program.interpreter),this.print(e.program)}function s$e(e){var t;this.noIndentInnerCommentsHere(),this.printInnerComments();let r=(t=e.directives)==null?void 0:t.length;if(r){var n;let a=e.body.length?2:1;this.printSequence(e.directives,void 0,a),(n=e.directives[r-1].trailingComments)!=null&&n.length||this.newline(a)}this.printSequence(e.body)}function o$e(e){var t;this.tokenChar(123);let r=this.enterDelimited(),n=(t=e.directives)==null?void 0:t.length;if(n){var a;let i=e.body.length?2:1;this.printSequence(e.directives,!0,i),(a=e.directives[n-1].trailingComments)!=null&&a.length||this.newline(i)}this.printSequence(e.body,!0),r(),this.rightBrace(e)}function l$e(e){this.print(e.value),this.semicolon()}var c$e=/(?:^|[^\\])(?:\\\\)*'/,u$e=/(?:^|[^\\])(?:\\\\)*"/;function d$e(e){let t=this.getPossibleRaw(e);if(!this.format.minified&&t!==void 0){this.token(t);return}let{value:r}=e;if(!u$e.test(r))this.token(`"${r}"`);else if(!c$e.test(r))this.token(`'${r}'`);else throw new Error("Malformed AST: it is not possible to print a directive containing both unescaped single and double quotes.")}function f$e(e){this.token(`#!${e.value}`),this.newline(1,!0)}function p$e(e){this.token("%%"),this.print(e.name),this.token("%%"),e.expectedNode==="Statement"&&this.semicolon()}});var QH=ae(Wi=>{"use strict";Object.defineProperty(Wi,"__esModule",{value:!0});Wi.JSXAttribute=m$e;Wi.JSXClosingElement=P$e;Wi.JSXClosingFragment=N$e;Wi.JSXElement=T$e;Wi.JSXEmptyExpression=E$e;Wi.JSXExpressionContainer=b$e;Wi.JSXFragment=I$e;Wi.JSXIdentifier=h$e;Wi.JSXMemberExpression=y$e;Wi.JSXNamespacedName=g$e;Wi.JSXOpeningElement=C$e;Wi.JSXOpeningFragment=A$e;Wi.JSXSpreadAttribute=x$e;Wi.JSXSpreadChild=v$e;Wi.JSXText=S$e;function m$e(e){this.print(e.name),e.value&&(this.tokenChar(61),this.print(e.value))}function h$e(e){this.word(e.name)}function g$e(e){this.print(e.namespace),this.tokenChar(58),this.print(e.name)}function y$e(e){this.print(e.object),this.tokenChar(46),this.print(e.property)}function x$e(e){this.tokenChar(123),this.token("..."),this.print(e.argument),this.rightBrace(e)}function b$e(e){this.tokenChar(123),this.print(e.expression),this.rightBrace(e)}function v$e(e){this.tokenChar(123),this.token("..."),this.print(e.expression),this.rightBrace(e)}function S$e(e){let t=this.getPossibleRaw(e);t!==void 0?this.token(t,!0):this.token(e.value,!0)}function T$e(e){let t=e.openingElement;if(this.print(t),!t.selfClosing){this.indent();for(let r of e.children)this.print(r);this.dedent(),this.print(e.closingElement)}}function w$e(){this.space()}function C$e(e){this.tokenChar(60),this.print(e.name),e.typeArguments&&this.print(e.typeArguments),this.print(e.typeParameters),e.attributes.length>0&&(this.space(),this.printJoin(e.attributes,void 0,void 0,w$e)),e.selfClosing&&(this.space(),this.tokenChar(47)),this.tokenChar(62)}function P$e(e){this.tokenChar(60),this.tokenChar(47),this.print(e.name),this.tokenChar(62)}function E$e(){this.printInnerComments()}function I$e(e){this.print(e.openingFragment),this.indent();for(let t of e.children)this.print(t);this.dedent(),this.print(e.closingFragment)}function A$e(){this.tokenChar(60),this.tokenChar(62)}function N$e(){this.token("</"),this.tokenChar(62)}});var a7=ae(dt=>{"use strict";Object.defineProperty(dt,"__esModule",{value:!0});dt.TSAnyKeyword=V$e;dt.TSArrayType=u6e;dt.TSSatisfiesExpression=dt.TSAsExpression=N6e;dt.TSBigIntKeyword=q$e;dt.TSBooleanKeyword=W$e;dt.TSCallSignatureDeclaration=F$e;dt.TSInterfaceHeritage=dt.TSClassImplements=P6e;dt.TSConditionalType=y6e;dt.TSConstructSignatureDeclaration=B$e;dt.TSConstructorType=a6e;dt.TSDeclareFunction=D$e;dt.TSDeclareMethod=M$e;dt.TSEnumBody=n7;dt.TSEnumDeclaration=L6e;dt.TSEnumMember=R6e;dt.TSExportAssignment=j6e;dt.TSExternalModuleReference=B6e;dt.TSFunctionType=n6e;dt.TSImportEqualsDeclaration=F6e;dt.TSImportType=O6e;dt.TSIndexSignature=U$e;dt.TSIndexedAccessType=S6e;dt.TSInferType=x6e;dt.TSInstantiationExpression=_6e;dt.TSInterfaceBody=I6e;dt.TSInterfaceDeclaration=E6e;dt.TSIntersectionType=g6e;dt.TSIntrinsicKeyword=t6e;dt.TSLiteralType=C6e;dt.TSMappedType=T6e;dt.TSMethodSignature=z$e;dt.TSModuleBlock=M6e;dt.TSModuleDeclaration=D6e;dt.TSNamedTupleMember=m6e;dt.TSNamespaceExportDeclaration=z6e;dt.TSNeverKeyword=e6e;dt.TSNonNullExpression=$6e;dt.TSNullKeyword=Q$e;dt.TSNumberKeyword=G$e;dt.TSObjectKeyword=K$e;dt.TSOptionalType=f6e;dt.TSParameterProperty=R$e;dt.TSParenthesizedType=b6e;dt.TSPropertySignature=$$e;dt.TSQualifiedName=O$e;dt.TSRestType=p6e;dt.TSStringKeyword=X$e;dt.TSSymbolKeyword=Y$e;dt.TSTemplateLiteralType=w6e;dt.TSThisType=r6e;dt.TSTupleType=d6e;dt.TSTypeAliasDeclaration=A6e;dt.TSTypeAnnotation=k$e;dt.TSTypeAssertion=k6e;dt.TSTypeLiteral=c6e;dt.TSTypeOperator=v6e;dt.TSTypeParameter=L$e;dt.TSTypeParameterDeclaration=dt.TSTypeParameterInstantiation=_$e;dt.TSTypePredicate=o6e;dt.TSTypeQuery=l6e;dt.TSTypeReference=s6e;dt.TSUndefinedKeyword=Z$e;dt.TSUnionType=h6e;dt.TSUnknownKeyword=H$e;dt.TSVoidKeyword=J$e;dt.tsPrintClassMemberModifiers=V6e;dt.tsPrintFunctionOrConstructorType=i6e;dt.tsPrintPropertyOrMethodName=j$e;dt.tsPrintSignatureDeclarationBase=U6e;function k$e(e,t){this.token((t.type==="TSFunctionType"||t.type==="TSConstructorType")&&t.typeAnnotation===e?"=>":":"),this.space(),e.optional&&this.tokenChar(63),this.print(e.typeAnnotation)}function _$e(e,t){this.tokenChar(60);let r=t.type==="ArrowFunctionExpression"&&e.params.length===1;this.tokenMap&&e.start!=null&&e.end!=null&&(r&&(r=!!this.tokenMap.find(e,n=>this.tokenMap.matchesOriginal(n,","))),r||(r=this.shouldPrintTrailingComma(">"))),this.printList(e.params,r),this.tokenChar(62)}function L$e(e){e.const&&(this.word("const"),this.space()),e.in&&(this.word("in"),this.space()),e.out&&(this.word("out"),this.space()),this.word(e.name),e.constraint&&(this.space(),this.word("extends"),this.space(),this.print(e.constraint)),e.default&&(this.space(),this.tokenChar(61),this.space(),this.print(e.default))}function R$e(e){e.accessibility&&(this.word(e.accessibility),this.space()),e.readonly&&(this.word("readonly"),this.space()),this._param(e.parameter)}function D$e(e,t){e.declare&&(this.word("declare"),this.space()),this._functionHead(e,t),this.semicolon()}function M$e(e){this._classMethodHead(e),this.semicolon()}function O$e(e){this.print(e.left),this.tokenChar(46),this.print(e.right)}function F$e(e){this.tsPrintSignatureDeclarationBase(e),H0(this,e)}function H0(e,t){if(!e.tokenMap||!t.start||!t.end){e.semicolon();return}e.tokenMap.endMatches(t,",")?e.token(","):e.tokenMap.endMatches(t,";")&&e.semicolon()}function B$e(e){this.word("new"),this.space(),this.tsPrintSignatureDeclarationBase(e),H0(this,e)}function $$e(e){let{readonly:t}=e;t&&(this.word("readonly"),this.space()),this.tsPrintPropertyOrMethodName(e),this.print(e.typeAnnotation),H0(this,e)}function j$e(e){e.computed&&this.tokenChar(91),this.print(e.key),e.computed&&this.tokenChar(93),e.optional&&this.tokenChar(63)}function z$e(e){let{kind:t}=e;(t==="set"||t==="get")&&(this.word(t),this.space()),this.tsPrintPropertyOrMethodName(e),this.tsPrintSignatureDeclarationBase(e),H0(this,e)}function U$e(e){let{readonly:t,static:r}=e;r&&(this.word("static"),this.space()),t&&(this.word("readonly"),this.space()),this.tokenChar(91),this._parameters(e.parameters,"]"),this.print(e.typeAnnotation),H0(this,e)}function V$e(){this.word("any")}function q$e(){this.word("bigint")}function H$e(){this.word("unknown")}function G$e(){this.word("number")}function K$e(){this.word("object")}function W$e(){this.word("boolean")}function X$e(){this.word("string")}function Y$e(){this.word("symbol")}function J$e(){this.word("void")}function Z$e(){this.word("undefined")}function Q$e(){this.word("null")}function e6e(){this.word("never")}function t6e(){this.word("intrinsic")}function r6e(){this.word("this")}function n6e(e){this.tsPrintFunctionOrConstructorType(e)}function a6e(e){e.abstract&&(this.word("abstract"),this.space()),this.word("new"),this.space(),this.tsPrintFunctionOrConstructorType(e)}function i6e(e){let{typeParameters:t}=e,r=e.parameters;this.print(t),this.tokenChar(40),this._parameters(r,")"),this.space();let n=e.typeAnnotation;this.print(n)}function s6e(e){let t=e.typeParameters;this.print(e.typeName,!!t),this.print(t)}function o6e(e){e.asserts&&(this.word("asserts"),this.space()),this.print(e.parameterName),e.typeAnnotation&&(this.space(),this.word("is"),this.space(),this.print(e.typeAnnotation.typeAnnotation))}function l6e(e){this.word("typeof"),this.space(),this.print(e.exprName);let t=e.typeParameters;t&&this.print(t)}function c6e(e){pP(this,e,()=>this.printJoin(e.members,!0,!0))}function u6e(e){this.print(e.elementType,!0),this.tokenChar(91),this.tokenChar(93)}function d6e(e){this.tokenChar(91),this.printList(e.elementTypes,this.shouldPrintTrailingComma("]")),this.tokenChar(93)}function f6e(e){this.print(e.typeAnnotation),this.tokenChar(63)}function p6e(e){this.token("..."),this.print(e.typeAnnotation)}function m6e(e){this.print(e.label),e.optional&&this.tokenChar(63),this.tokenChar(58),this.space(),this.print(e.elementType)}function h6e(e){r7(this,e,"|")}function g6e(e){r7(this,e,"&")}function r7(e,t,r){var n;let a=0;(n=e.tokenMap)!=null&&n.startMatches(t,r)&&(a=1,e.token(r)),e.printJoin(t.types,void 0,void 0,function(i){this.space(),this.token(r,void 0,i+a),this.space()})}function y6e(e){this.print(e.checkType),this.space(),this.word("extends"),this.space(),this.print(e.extendsType),this.space(),this.tokenChar(63),this.space(),this.print(e.trueType),this.space(),this.tokenChar(58),this.space(),this.print(e.falseType)}function x6e(e){this.word("infer"),this.print(e.typeParameter)}function b6e(e){this.tokenChar(40),this.print(e.typeAnnotation),this.tokenChar(41)}function v6e(e){this.word(e.operator),this.space(),this.print(e.typeAnnotation)}function S6e(e){this.print(e.objectType,!0),this.tokenChar(91),this.print(e.indexType),this.tokenChar(93)}function T6e(e){let{nameType:t,optional:r,readonly:n,typeAnnotation:a}=e;this.tokenChar(123);let i=this.enterDelimited();this.space(),n&&(e7(this,n),this.word("readonly"),this.space()),this.tokenChar(91),this.word(e.typeParameter.name),this.space(),this.word("in"),this.space(),this.print(e.typeParameter.constraint),t&&(this.space(),this.word("as"),this.space(),this.print(t)),this.tokenChar(93),r&&(e7(this,r),this.tokenChar(63)),a&&(this.tokenChar(58),this.space(),this.print(a)),this.space(),i(),this.tokenChar(125)}function e7(e,t){t!==!0&&e.token(t)}function w6e(e){this._printTemplate(e,e.types)}function C6e(e){this.print(e.literal)}function P6e(e){this.print(e.expression),this.print(e.typeArguments)}function E6e(e){let{declare:t,id:r,typeParameters:n,extends:a,body:i}=e;t&&(this.word("declare"),this.space()),this.word("interface"),this.space(),this.print(r),this.print(n),a!=null&&a.length&&(this.space(),this.word("extends"),this.space(),this.printList(a)),this.space(),this.print(i)}function I6e(e){pP(this,e,()=>this.printJoin(e.body,!0,!0))}function A6e(e){let{declare:t,id:r,typeParameters:n,typeAnnotation:a}=e;t&&(this.word("declare"),this.space()),this.word("type"),this.space(),this.print(r),this.print(n),this.space(),this.tokenChar(61),this.space(),this.print(a),this.semicolon()}function N6e(e){let{type:t,expression:r,typeAnnotation:n}=e;this.print(r,!0),this.space(),this.word(t==="TSAsExpression"?"as":"satisfies"),this.space(),this.print(n)}function k6e(e){let{typeAnnotation:t,expression:r}=e;this.tokenChar(60),this.print(t),this.tokenChar(62),this.space(),this.print(r)}function _6e(e){this.print(e.expression),this.print(e.typeParameters)}function L6e(e){let{declare:t,const:r,id:n}=e;t&&(this.word("declare"),this.space()),r&&(this.word("const"),this.space()),this.word("enum"),this.space(),this.print(n),this.space(),n7.call(this,e)}function n7(e){pP(this,e,()=>{var t;return this.printList(e.members,(t=this.shouldPrintTrailingComma("}"))!=null?t:!0,!0,!0)})}function R6e(e){let{id:t,initializer:r}=e;this.print(t),r&&(this.space(),this.tokenChar(61),this.space(),this.print(r))}function D6e(e){let{declare:t,id:r,kind:n}=e;t&&(this.word("declare"),this.space());{if(e.global||(this.word(n??(r.type==="Identifier"?"namespace":"module")),this.space()),this.print(r),!e.body){this.semicolon();return}let a=e.body;for(;a.type==="TSModuleDeclaration";)this.tokenChar(46),this.print(a.id),a=a.body;this.space(),this.print(a)}}function M6e(e){pP(this,e,()=>this.printSequence(e.body,!0))}function O6e(e){let{argument:t,qualifier:r,options:n}=e;this.word("import"),this.tokenChar(40),this.print(t),n&&(this.tokenChar(44),this.print(n)),this.tokenChar(41),r&&(this.tokenChar(46),this.print(r));let a=e.typeParameters;a&&this.print(a)}function F6e(e){let{id:t,moduleReference:r}=e;e.isExport&&(this.word("export"),this.space()),this.word("import"),this.space(),this.print(t),this.space(),this.tokenChar(61),this.space(),this.print(r),this.semicolon()}function B6e(e){this.token("require("),this.print(e.expression),this.tokenChar(41)}function $6e(e){this.print(e.expression),this.tokenChar(33)}function j6e(e){this.word("export"),this.space(),this.tokenChar(61),this.space(),this.print(e.expression),this.semicolon()}function z6e(e){this.word("export"),this.space(),this.word("as"),this.space(),this.word("namespace"),this.space(),this.print(e.id),this.semicolon()}function U6e(e){let{typeParameters:t}=e,r=e.parameters;this.print(t),this.tokenChar(40),this._parameters(r,")");let n=e.typeAnnotation;this.print(n)}function V6e(e){let t=e.type==="ClassPrivateProperty",r=e.type==="ClassAccessorProperty"||e.type==="ClassProperty";t7(this,e,[r&&e.declare&&"declare",!t&&e.accessibility]),e.static&&(this.word("static"),this.space()),t7(this,e,[!t&&e.abstract&&"abstract",!t&&e.override&&"override",(r||t)&&e.readonly&&"readonly"])}function pP(e,t,r){e.token("{");let n=e.enterDelimited();r(),n(),e.rightBrace(t)}function t7(e,t,r){var n;let a=new Set;for(let i of r)i&&a.add(i);(n=e.tokenMap)==null||n.find(t,i=>a.has(i.value)?(e.token(i.value),e.space(),a.delete(i.value),a.size===0):!1);for(let i of a)e.word(i),e.space()}});var i7=ae(Vr=>{"use strict";Object.defineProperty(Vr,"__esModule",{value:!0});var T2=_H();Object.keys(T2).forEach(function(e){e==="default"||e==="__esModule"||e in Vr&&Vr[e]===T2[e]||Object.defineProperty(Vr,e,{enumerable:!0,get:function(){return T2[e]}})});var w2=RH();Object.keys(w2).forEach(function(e){e==="default"||e==="__esModule"||e in Vr&&Vr[e]===w2[e]||Object.defineProperty(Vr,e,{enumerable:!0,get:function(){return w2[e]}})});var C2=FH();Object.keys(C2).forEach(function(e){e==="default"||e==="__esModule"||e in Vr&&Vr[e]===C2[e]||Object.defineProperty(Vr,e,{enumerable:!0,get:function(){return C2[e]}})});var P2=BH();Object.keys(P2).forEach(function(e){e==="default"||e==="__esModule"||e in Vr&&Vr[e]===P2[e]||Object.defineProperty(Vr,e,{enumerable:!0,get:function(){return P2[e]}})});var E2=$H();Object.keys(E2).forEach(function(e){e==="default"||e==="__esModule"||e in Vr&&Vr[e]===E2[e]||Object.defineProperty(Vr,e,{enumerable:!0,get:function(){return E2[e]}})});var I2=y2();Object.keys(I2).forEach(function(e){e==="default"||e==="__esModule"||e in Vr&&Vr[e]===I2[e]||Object.defineProperty(Vr,e,{enumerable:!0,get:function(){return I2[e]}})});var A2=v2();Object.keys(A2).forEach(function(e){e==="default"||e==="__esModule"||e in Vr&&Vr[e]===A2[e]||Object.defineProperty(Vr,e,{enumerable:!0,get:function(){return A2[e]}})});var N2=JH();Object.keys(N2).forEach(function(e){e==="default"||e==="__esModule"||e in Vr&&Vr[e]===N2[e]||Object.defineProperty(Vr,e,{enumerable:!0,get:function(){return N2[e]}})});var k2=ZH();Object.keys(k2).forEach(function(e){e==="default"||e==="__esModule"||e in Vr&&Vr[e]===k2[e]||Object.defineProperty(Vr,e,{enumerable:!0,get:function(){return k2[e]}})});var _2=QH();Object.keys(_2).forEach(function(e){e==="default"||e==="__esModule"||e in Vr&&Vr[e]===_2[e]||Object.defineProperty(Vr,e,{enumerable:!0,get:function(){return _2[e]}})});var L2=a7();Object.keys(L2).forEach(function(e){e==="default"||e==="__esModule"||e in Vr&&Vr[e]===L2[e]||Object.defineProperty(Vr,e,{enumerable:!0,get:function(){return L2[e]}})})});var s7=ae(R2=>{"use strict";Object.defineProperty(R2,"__esModule",{value:!0});R2.addDeprecatedGenerators=q6e;function q6e(e){{let t={Noop(){},TSExpressionWithTypeArguments(r){this.print(r.expression),this.print(r.typeParameters)},DecimalLiteral(r){let n=this.getPossibleRaw(r);if(!this.format.minified&&n!==void 0){this.word(n);return}this.word(r.value+"m")}};Object.assign(e.prototype,t)}}});var u7=ae(mP=>{"use strict";Object.defineProperty(mP,"__esModule",{value:!0});mP.default=void 0;var H6e=pH(),ps=Zm(),l7=ps,G6e=xr(),K6e=kH(),W6e=i7(),X6e=s7(),{isExpression:Y6e,isFunction:J6e,isStatement:Z6e,isClassBody:Q6e,isTSInterfaceBody:eje,isTSEnumMember:tje}=G6e,rje=/e/i,nje=/\.0+$/,c7=/[\n\r\u2028\u2029]/,aje=/[\n\r\u2028\u2029]|\*\//;function o7(e){return e.type==="CommentLine"||c7.test(e.value)}var{needsParens:ije}=l7,G0=class{constructor(t,r,n=null,a=null){this.tokenContext=ps.TokenContext.normal,this._tokens=null,this._originalCode=null,this._currentNode=null,this._indent=0,this._indentRepeat=0,this._insideAux=!1,this._noLineTerminator=!1,this._noLineTerminatorAfterNode=null,this._printAuxAfterOnNextUserNode=!1,this._printedComments=new Set,this._endsWithInteger=!1,this._endsWithWord=!1,this._endsWithDiv=!1,this._lastCommentLine=0,this._endsWithInnerRaw=!1,this._indentInnerComments=!0,this.tokenMap=null,this._boundGetRawIdentifier=this._getRawIdentifier.bind(this),this._printSemicolonBeforeNextNode=-1,this._printSemicolonBeforeNextToken=-1,this.format=t,this._tokens=n,this._originalCode=a,this._indentRepeat=t.indent.style.length,this._inputMap=r?._inputMap||null,this._buf=new H6e.default(r,t.indent.style[0])}enterForStatementInit(){return this.tokenContext|=ps.TokenContext.forInitHead|ps.TokenContext.forInOrInitHeadAccumulate,()=>this.tokenContext=ps.TokenContext.normal}enterForXStatementInit(t){return t?(this.tokenContext|=ps.TokenContext.forOfHead,null):(this.tokenContext|=ps.TokenContext.forInHead|ps.TokenContext.forInOrInitHeadAccumulate,()=>this.tokenContext=ps.TokenContext.normal)}enterDelimited(){let t=this.tokenContext,r=this._noLineTerminatorAfterNode;return!(t&ps.TokenContext.forInOrInitHeadAccumulate)&&r===null?()=>{}:(this._noLineTerminatorAfterNode=null,this.tokenContext=ps.TokenContext.normal,()=>{this._noLineTerminatorAfterNode=r,this.tokenContext=t})}generate(t){return this.format.preserveFormat&&(this.tokenMap=new K6e.TokenMap(t,this._tokens,this._originalCode)),this.print(t),this._maybeAddAuxComment(),this._buf.get()}indent(){let{format:t}=this;t.preserveFormat||t.compact||t.concise||this._indent++}dedent(){let{format:t}=this;t.preserveFormat||t.compact||t.concise||this._indent--}semicolon(t=!1){if(this._maybeAddAuxComment(),t){this._appendChar(59),this._noLineTerminator=!1;return}if(this.tokenMap){let r=this._currentNode;if(r.start!=null&&r.end!=null){if(!this.tokenMap.endMatches(r,";")){this._printSemicolonBeforeNextNode=this._buf.getCurrentLine();return}let n=this.tokenMap.getIndexes(this._currentNode);this._catchUpTo(this._tokens[n[n.length-1]].loc.start)}}this._queue(59),this._noLineTerminator=!1}rightBrace(t){this.format.minified&&this._buf.removeLastSemicolon(),this.sourceWithOffset("end",t.loc,-1),this.tokenChar(125)}rightParens(t){this.sourceWithOffset("end",t.loc,-1),this.tokenChar(41)}space(t=!1){let{format:r}=this;if(!(r.compact||r.preserveFormat)){if(t)this._space();else if(this._buf.hasContent()){let n=this.getLastChar();n!==32&&n!==10&&this._space()}}}word(t,r=!1){this.tokenContext&=ps.TokenContext.forInOrInitHeadAccumulatePassThroughMask,this._maybePrintInnerComments(t),this._maybeAddAuxComment(),this.tokenMap&&this._catchUpToCurrentToken(t),(this._endsWithWord||this._endsWithDiv&&t.charCodeAt(0)===47)&&this._space(),this._append(t,!1),this._endsWithWord=!0,this._noLineTerminator=r}number(t,r){function n(a){if(a.length>2&&a.charCodeAt(0)===48){let i=a.charCodeAt(1);return i===98||i===111||i===120}return!1}this.word(t),this._endsWithInteger=Number.isInteger(r)&&!n(t)&&!rje.test(t)&&!nje.test(t)&&t.charCodeAt(t.length-1)!==46}token(t,r=!1,n=0){this.tokenContext&=ps.TokenContext.forInOrInitHeadAccumulatePassThroughMask,this._maybePrintInnerComments(t,n),this._maybeAddAuxComment(),this.tokenMap&&this._catchUpToCurrentToken(t,n);let a=this.getLastChar(),i=t.charCodeAt(0);(a===33&&(t==="--"||i===61)||i===43&&a===43||i===45&&a===45||i===46&&this._endsWithInteger)&&this._space(),this._append(t,r),this._noLineTerminator=!1}tokenChar(t){this.tokenContext&=ps.TokenContext.forInOrInitHeadAccumulatePassThroughMask;let r=String.fromCharCode(t);this._maybePrintInnerComments(r),this._maybeAddAuxComment(),this.tokenMap&&this._catchUpToCurrentToken(r);let n=this.getLastChar();(t===43&&n===43||t===45&&n===45||t===46&&this._endsWithInteger)&&this._space(),this._appendChar(t),this._noLineTerminator=!1}newline(t=1,r){if(!(t<=0)){if(!r){if(this.format.retainLines||this.format.compact)return;if(this.format.concise){this.space();return}}t>2&&(t=2),t-=this._buf.getNewlineCount();for(let n=0;n<t;n++)this._newline()}}endsWith(t){return this.getLastChar()===t}getLastChar(){return this._buf.getLastChar()}endsWithCharAndNewline(){return this._buf.endsWithCharAndNewline()}removeTrailingNewline(){this._buf.removeTrailingNewline()}exactSource(t,r){if(!t){r();return}this._catchUp("start",t),this._buf.exactSource(t,r)}source(t,r){r&&(this._catchUp(t,r),this._buf.source(t,r))}sourceWithOffset(t,r,n){!r||this.format.preserveFormat||(this._catchUp(t,r),this._buf.sourceWithOffset(t,r,n))}sourceIdentifierName(t,r){if(!this._buf._canMarkIdName)return;let n=this._buf._sourcePosition;n.identifierNamePos=r,n.identifierName=t}_space(){this._queue(32)}_newline(){this._queue(10)}_catchUpToCurrentToken(t,r=0){let n=this.tokenMap.findMatching(this._currentNode,t,r);n&&this._catchUpTo(n.loc.start),this._printSemicolonBeforeNextToken!==-1&&this._printSemicolonBeforeNextToken===this._buf.getCurrentLine()&&(this._buf.appendChar(59),this._endsWithWord=!1,this._endsWithInteger=!1,this._endsWithDiv=!1),this._printSemicolonBeforeNextToken=-1,this._printSemicolonBeforeNextNode=-1}_append(t,r){this._maybeIndent(t.charCodeAt(0)),this._buf.append(t,r),this._endsWithWord=!1,this._endsWithInteger=!1,this._endsWithDiv=!1}_appendChar(t){this._maybeIndent(t),this._buf.appendChar(t),this._endsWithWord=!1,this._endsWithInteger=!1,this._endsWithDiv=!1}_queue(t){this._maybeIndent(t),this._buf.queue(t),this._endsWithWord=!1,this._endsWithInteger=!1}_maybeIndent(t){this._indent&&t!==10&&this.endsWith(10)&&this._buf.queueIndentation(this._getIndent())}_shouldIndent(t){if(this._indent&&t!==10&&this.endsWith(10))return!0}catchUp(t){if(!this.format.retainLines)return;let r=t-this._buf.getCurrentLine();for(let n=0;n<r;n++)this._newline()}_catchUp(t,r){let{format:n}=this;if(!n.preserveFormat){n.retainLines&&r!=null&&r[t]&&this.catchUp(r[t].line);return}let a=r?.[t];a!=null&&this._catchUpTo(a)}_catchUpTo({line:t,column:r,index:n}){let a=t-this._buf.getCurrentLine();if(a>0&&this._noLineTerminator)return;for(let s=0;s<a;s++)this._newline();let i=a>0?r:r-this._buf.getCurrentColumn();if(i>0){let s=this._originalCode?this._originalCode.slice(n-i,n).replace(/[^\t\x0B\f \xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF]/gu," "):" ".repeat(i);this._append(s,!1)}}_getIndent(){return this._indentRepeat*this._indent}printTerminatorless(t){this._noLineTerminator=!0,this.print(t)}print(t,r=!1,n){var a,i,s;if(!t)return;this._endsWithInnerRaw=!1;let o=t.type,l=this.format,c=l.concise;t._compact&&(l.concise=!0);let u=this[o];if(u===void 0)throw new ReferenceError(`unknown node of type ${JSON.stringify(o)} with constructor ${JSON.stringify(t.constructor.name)}`);let d=this._currentNode;this._currentNode=t,this.tokenMap&&(this._printSemicolonBeforeNextToken=this._printSemicolonBeforeNextNode);let f=this._insideAux;this._insideAux=t.loc==null,this._maybeAddAuxComment(this._insideAux&&!f);let p=(a=t.extra)==null?void 0:a.parenthesized,m=p&&l.preserveFormat||p&&l.retainFunctionParens&&o==="FunctionExpression"||ije(t,d,this.tokenContext,l.preserveFormat?this._boundGetRawIdentifier:void 0);if(!m&&p&&(i=t.leadingComments)!=null&&i.length&&t.leadingComments[0].type==="CommentBlock")switch(d?.type){case"ExpressionStatement":case"VariableDeclarator":case"AssignmentExpression":case"ReturnStatement":break;case"CallExpression":case"OptionalCallExpression":case"NewExpression":if(d.callee!==t)break;default:m=!0}let h=!1;!m&&this._noLineTerminator&&((s=t.leadingComments)!=null&&s.some(o7)||this.format.retainLines&&t.loc&&t.loc.start.line>this._buf.getCurrentLine())&&(m=!0,h=!0);let x,g;if(!m&&(r||(r=!!d&&this._noLineTerminatorAfterNode===d&&l7.isLastChild(d,t)),r)){var y;(y=t.trailingComments)!=null&&y.some(o7)?Y6e(t)&&(m=!0):(x=this._noLineTerminatorAfterNode,this._noLineTerminatorAfterNode=t)}m&&(this.tokenChar(40),h&&this.indent(),this._endsWithInnerRaw=!1,this.tokenContext&ps.TokenContext.forInOrInitHeadAccumulate&&(g=this.tokenContext,this.tokenContext=ps.TokenContext.normal),x=this._noLineTerminatorAfterNode,this._noLineTerminatorAfterNode=null),this._lastCommentLine=0,this._printLeadingComments(t,d);let b=o==="Program"||o==="File"?null:t.loc;this.exactSource(b,u.bind(this,t,d)),m?(this._printTrailingComments(t,d),h&&(this.dedent(),this.newline()),this.tokenChar(41),this._noLineTerminator=r,g&&(this.tokenContext=g)):r&&!this._noLineTerminator?(this._noLineTerminator=!0,this._printTrailingComments(t,d)):this._printTrailingComments(t,d,n),this._currentNode=d,l.concise=c,this._insideAux=f,x!==void 0&&(this._noLineTerminatorAfterNode=x),this._endsWithInnerRaw=!1}_maybeAddAuxComment(t){t&&this._printAuxBeforeComment(),this._insideAux||this._printAuxAfterComment()}_printAuxBeforeComment(){if(this._printAuxAfterOnNextUserNode)return;this._printAuxAfterOnNextUserNode=!0;let t=this.format.auxiliaryCommentBefore;t&&this._printComment({type:"CommentBlock",value:t},0)}_printAuxAfterComment(){if(!this._printAuxAfterOnNextUserNode)return;this._printAuxAfterOnNextUserNode=!1;let t=this.format.auxiliaryCommentAfter;t&&this._printComment({type:"CommentBlock",value:t},0)}getPossibleRaw(t){let r=t.extra;if(r?.raw!=null&&r.rawValue!=null&&t.value===r.rawValue)return r.raw}printJoin(t,r,n,a,i,s,o){if(!(t!=null&&t.length))return;if(n==null&&this.format.retainLines){var l;let m=(l=t[0].loc)==null?void 0:l.start.line;m!=null&&m!==this._buf.getCurrentLine()&&(n=!0)}n&&this.indent();let c={nextNodeStartLine:0},u=a?.bind(this),d=t.length;for(let m=0;m<d;m++){let h=t[m];if(h&&(r&&this._printNewline(m===0,c),this.print(h,void 0,o||0),s?.(h,m),u!=null&&(m<d-1?u(m,!1):i&&u(m,!0)),r)){var f;if((f=h.trailingComments)!=null&&f.length||(this._lastCommentLine=0),m+1===d)this.newline(1);else{var p;let x=t[m+1];c.nextNodeStartLine=((p=x.loc)==null?void 0:p.start.line)||0,this._printNewline(!0,c)}}}n&&this.dedent()}printAndIndentOnComments(t){let r=t.leadingComments&&t.leadingComments.length>0;r&&this.indent(),this.print(t),r&&this.dedent()}printBlock(t){let r=t.body;r.type!=="EmptyStatement"&&this.space(),this.print(r)}_printTrailingComments(t,r,n){let{innerComments:a,trailingComments:i}=t;a!=null&&a.length&&this._printComments(2,a,t,r,n),i!=null&&i.length&&this._printComments(2,i,t,r,n)}_printLeadingComments(t,r){let n=t.leadingComments;n!=null&&n.length&&this._printComments(0,n,t,r)}_maybePrintInnerComments(t,r){if(this._endsWithInnerRaw){var n;this.printInnerComments((n=this.tokenMap)==null?void 0:n.findMatching(this._currentNode,t,r))}this._endsWithInnerRaw=!0,this._indentInnerComments=!0}printInnerComments(t){let r=this._currentNode,n=r.innerComments;if(!(n!=null&&n.length))return;let a=this.endsWith(32),i=this._indentInnerComments,s=this._printedComments.size;i&&this.indent(),this._printComments(1,n,r,void 0,void 0,t),a&&s!==this._printedComments.size&&this.space(),i&&this.dedent()}noIndentInnerCommentsHere(){this._indentInnerComments=!1}printSequence(t,r,n){this.printJoin(t,!0,r??!1,void 0,void 0,void 0,n)}printList(t,r,n,a,i,s){this.printJoin(t,n,a,i??sje,r,s)}shouldPrintTrailingComma(t){if(!this.tokenMap)return null;let r=this.tokenMap.findLastIndex(this._currentNode,n=>this.tokenMap.matchesOriginal(n,t));return r<=0?null:this.tokenMap.matchesOriginal(this._tokens[r-1],",")}_printNewline(t,r){let n=this.format;if(n.retainLines||n.compact)return;if(n.concise){this.space();return}if(!t)return;let a=r.nextNodeStartLine,i=this._lastCommentLine;if(a>0&&i>0){let s=a-i;if(s>=0){this.newline(s||1);return}}this._buf.hasContent()&&this.newline(1)}_shouldPrintComment(t,r){if(t.ignore||this._printedComments.has(t))return 0;if(this._noLineTerminator&&aje.test(t.value))return 2;if(r&&this.tokenMap){let n=this.tokenMap.find(this._currentNode,a=>a.value===t.value);if(n&&n.start>r.start)return 2}return this._printedComments.add(t),this.format.shouldPrintComment(t.value)?1:0}_printComment(t,r){let n=this._noLineTerminator,a=t.type==="CommentBlock",i=a&&r!==1&&!this._noLineTerminator;i&&this._buf.hasContent()&&r!==2&&this.newline(1);let s=this.getLastChar();s!==91&&s!==123&&s!==40&&this.space();let o;if(a){if(o=`/*${t.value}*/`,this.format.indent.adjustMultilineComment){var l;let c=(l=t.loc)==null?void 0:l.start.column;if(c){let u=new RegExp("\\n\\s{1,"+c+"}","g");o=o.replace(u,`
`)}if(this.format.concise)o=o.replace(/\n(?!$)/g,`
`);else{let u=this.format.retainLines?0:this._buf.getCurrentColumn();(this._shouldIndent(47)||this.format.retainLines)&&(u+=this._getIndent()),o=o.replace(/\n(?!$)/g,`
${" ".repeat(u)}`)}}}else n?o=`/*${t.value}*/`:o=`//${t.value}`;if(this._endsWithDiv&&this._space(),this.tokenMap){let{_printSemicolonBeforeNextToken:c,_printSemicolonBeforeNextNode:u}=this;this._printSemicolonBeforeNextToken=-1,this._printSemicolonBeforeNextNode=-1,this.source("start",t.loc),this._append(o,a),this._printSemicolonBeforeNextNode=u,this._printSemicolonBeforeNextToken=c}else this.source("start",t.loc),this._append(o,a);!a&&!n&&this.newline(1,!0),i&&r!==3&&this.newline(1)}_printComments(t,r,n,a,i=0,s){let o=n.loc,l=r.length,c=!!o,u=c?o.start.line:0,d=c?o.end.line:0,f=0,p=0,m=this._noLineTerminator?function(){}:this.newline.bind(this);for(let h=0;h<l;h++){let x=r[h],g=this._shouldPrintComment(x,s);if(g===2){c=!1;break}if(c&&x.loc&&g===1){let y=x.loc.start.line,b=x.loc.end.line;if(t===0){let S=0;h===0?this._buf.hasContent()&&(x.type==="CommentLine"||y!==b)&&(S=p=1):S=y-f,f=b,m(S),this._printComment(x,1),h+1===l&&(m(Math.max(u-f,p)),f=u)}else if(t===1){let S=y-(h===0?u:f);f=b,m(S),this._printComment(x,1),h+1===l&&(m(Math.min(1,d-f)),f=d)}else{let S=y-(h===0?d-i:f);f=b,m(S),this._printComment(x,1)}}else{if(c=!1,g!==1)continue;if(l===1){let y=x.loc?x.loc.start.line===x.loc.end.line:!c7.test(x.value),b=y&&!Z6e(n)&&!Q6e(a)&&!eje(a)&&!tje(n);t===0?this._printComment(x,b&&n.type!=="ObjectExpression"||y&&J6e(a,{body:n})?1:0):b&&t===2?this._printComment(x,1):this._printComment(x,0)}else t===1&&!(n.type==="ObjectExpression"&&n.properties.length>1)&&n.type!=="ClassBody"&&n.type!=="TSInterfaceBody"?this._printComment(x,h===0?2:h===l-1?3:0):this._printComment(x,0)}}t===2&&c&&f&&(this._lastCommentLine=f)}};Object.assign(G0.prototype,W6e);(0,X6e.addDeprecatedGenerators)(G0);var CSt=mP.default=G0;function sje(e,t){this.token(",",!1,e),t||this.space()}});var D2=ae(Ry=>{"use strict";Object.defineProperty(Ry,"__esModule",{value:!0});Ry.default=void 0;Ry.generate=m7;var d7=fH(),f7=u7();function p7(e,t,r){if(t.experimental_preserveFormat){if(typeof e!="string")throw new Error("`experimental_preserveFormat` requires the original `code` to be passed to @babel/generator as a string");if(!t.retainLines)throw new Error("`experimental_preserveFormat` requires `retainLines` to be set to `true`");if(t.compact&&t.compact!=="auto")throw new Error("`experimental_preserveFormat` is not compatible with the `compact` option");if(t.minified)throw new Error("`experimental_preserveFormat` is not compatible with the `minified` option");if(t.jsescOption)throw new Error("`experimental_preserveFormat` is not compatible with the `jsescOption` option");if(!Array.isArray(r.tokens))throw new Error("`experimental_preserveFormat` requires the AST to have attached the token of the input code. Make sure to enable the `tokens: true` parser option.")}let n={auxiliaryCommentBefore:t.auxiliaryCommentBefore,auxiliaryCommentAfter:t.auxiliaryCommentAfter,shouldPrintComment:t.shouldPrintComment,preserveFormat:t.experimental_preserveFormat,retainLines:t.retainLines,retainFunctionParens:t.retainFunctionParens,comments:t.comments==null||t.comments,compact:t.compact,minified:t.minified,concise:t.concise,indent:{adjustMultilineComment:!0,style:" "},jsescOption:Object.assign({quotes:"double",wrap:!0,minimal:!1},t.jsescOption),topicToken:t.topicToken,importAttributesKeyword:t.importAttributesKeyword};{var a;n.decoratorsBeforeExport=t.decoratorsBeforeExport,n.jsescOption.json=t.jsonCompatibleStrings,n.recordAndTupleSyntaxType=(a=t.recordAndTupleSyntaxType)!=null?a:"hash"}n.minified?(n.compact=!0,n.shouldPrintComment=n.shouldPrintComment||(()=>n.comments)):n.shouldPrintComment=n.shouldPrintComment||(l=>n.comments||l.includes("@license")||l.includes("@preserve")),n.compact==="auto"&&(n.compact=typeof e=="string"&&e.length>5e5,n.compact),(n.compact||n.preserveFormat)&&(n.indent.adjustMultilineComment=!1);let{auxiliaryCommentBefore:i,auxiliaryCommentAfter:s,shouldPrintComment:o}=n;return i&&!o(i)&&(n.auxiliaryCommentBefore=void 0),s&&!o(s)&&(n.auxiliaryCommentAfter=void 0),n}Ry.CodeGenerator=class{constructor(t,r={},n){this._ast=void 0,this._format=void 0,this._map=void 0,this._ast=t,this._format=p7(n,r,t),this._map=r.sourceMaps?new d7.default(r,n):null}generate(){return new f7.default(this._format,this._map).generate(this._ast)}};function m7(e,t={},r){let n=p7(r,t,e),a=t.sourceMaps?new d7.default(t,r):null;return new f7.default(n,a,e.tokens,typeof r=="string"?r:null).generate(e)}var ISt=Ry.default=m7});var h7=ae(Cl=>{"use strict";Object.defineProperty(Cl,"__esModule",{value:!0});Cl.find=uje;Cl.findParent=cje;Cl.getAncestry=hje;Cl.getDeepestCommonAncestorFrom=mje;Cl.getEarliestCommonAncestorFrom=pje;Cl.getFunctionParent=dje;Cl.getStatementParent=fje;Cl.inType=xje;Cl.isAncestor=gje;Cl.isDescendant=yje;var oje=xr(),{VISITOR_KEYS:lje}=oje;function cje(e){let t=this;for(;t=t.parentPath;)if(e(t))return t;return null}function uje(e){let t=this;do if(e(t))return t;while(t=t.parentPath);return null}function dje(){return this.findParent(e=>e.isFunction())}function fje(){let e=this;do{if(!e.parentPath||Array.isArray(e.container)&&e.isStatement())break;e=e.parentPath}while(e);if(e&&(e.isProgram()||e.isFile()))throw new Error("File/Program node, we can't possibly find a statement parent to this");return e}function pje(e){return this.getDeepestCommonAncestorFrom(e,function(t,r,n){let a,i=lje[t.type];for(let s of n){let o=s[r+1];if(!a){a=o;continue}if(o.listKey&&a.listKey===o.listKey&&o.key<a.key){a=o;continue}let l=i.indexOf(a.parentKey),c=i.indexOf(o.parentKey);l>c&&(a=o)}return a})}function mje(e,t){if(!e.length)return this;if(e.length===1)return e[0];let r=1/0,n,a,i=e.map(o=>{let l=[];do l.unshift(o);while((o=o.parentPath)&&o!==this);return l.length<r&&(r=l.length),l}),s=i[0];e:for(let o=0;o<r;o++){let l=s[o];for(let c of i)if(c[o]!==l)break e;n=o,a=l}if(a)return t?t(a,n,i):a;throw new Error("Couldn't find intersection")}function hje(){let e=this,t=[];do t.push(e);while(e=e.parentPath);return t}function gje(e){return e.isDescendant(this)}function yje(e){return!!this.findParent(t=>t===e)}function xje(...e){let t=this;for(;t;){if(e.includes(t.node.type))return!0;t=t.parentPath}return!1}});var O2=ae(M2=>{"use strict";Object.defineProperty(M2,"__esModule",{value:!0});M2.createUnionType=wje;var bje=xr(),{createFlowUnionType:g7,createTSUnionType:y7,createUnionTypeAnnotation:vje,isFlowType:Sje,isTSType:Tje}=bje;function wje(e){{if(e.every(t=>Sje(t)))return g7?g7(e):vje(e);if(e.every(t=>Tje(t))&&y7)return y7(e)}}});var T7=ae(F2=>{"use strict";Object.defineProperty(F2,"__esModule",{value:!0});F2.default=Aje;var Cje=xr(),b7=O2(),{BOOLEAN_NUMBER_BINARY_OPERATORS:Pje,createTypeAnnotationBasedOnTypeof:Eje,numberTypeAnnotation:v7,voidTypeAnnotation:Ije}=Cje;function Aje(e){if(!this.isReferenced())return;let t=this.scope.getBinding(e.name);if(t)return t.identifier.typeAnnotation?t.identifier.typeAnnotation:Nje(t,this,e.name);if(e.name==="undefined")return Ije();if(e.name==="NaN"||e.name==="Infinity")return v7();e.name}function Nje(e,t,r){let n=[],a=[],i=x7(e,t,a),s=S7(e,t,r);if(s){let o=x7(e,s.ifStatement);i=i.filter(l=>!o.includes(l)),n.push(s.typeAnnotation)}if(i.length){i.push(...a);for(let o of i)n.push(o.getTypeAnnotation())}if(n.length)return(0,b7.createUnionType)(n)}function x7(e,t,r){let n=e.constantViolations.slice();return n.unshift(e.path),n.filter(a=>{a=a.resolve();let i=a._guessExecutionStatusRelativeTo(t);return r&&i==="unknown"&&r.push(a),i==="before"})}function kje(e,t){let r=t.node.operator,n=t.get("right").resolve(),a=t.get("left").resolve(),i;if(a.isIdentifier({name:e})?i=n:n.isIdentifier({name:e})&&(i=a),i)return r==="==="?i.getTypeAnnotation():Pje.includes(r)?v7():void 0;if(r!=="==="&&r!=="==")return;let s,o;if(a.isUnaryExpression({operator:"typeof"})?(s=a,o=n):n.isUnaryExpression({operator:"typeof"})&&(s=n,o=a),!s||!s.get("argument").isIdentifier({name:e})||(o=o.resolve(),!o.isLiteral()))return;let l=o.node.value;if(typeof l=="string")return Eje(l)}function _je(e,t,r){let n;for(;n=t.parentPath;){if(n.isIfStatement()||n.isConditionalExpression())return t.key==="test"?void 0:n;if(n.isFunction()&&(r==null||n.parentPath.scope.getBinding(r)!==e))return;t=n}}function S7(e,t,r){let n=_je(e,t,r);if(!n)return;let i=[n.get("test")],s=[];for(let o=0;o<i.length;o++){let l=i[o];if(l.isLogicalExpression())l.node.operator==="&&"&&(i.push(l.get("left")),i.push(l.get("right")));else if(l.isBinaryExpression()){let c=kje(r,l);c&&s.push(c)}}return s.length?{typeAnnotation:(0,b7.createUnionType)(s),ifStatement:n}:S7(e,n,r)}});var k7=ae(rn=>{"use strict";Object.defineProperty(rn,"__esModule",{value:!0});rn.ArrayExpression=I7;rn.AssignmentExpression=eze;rn.BinaryExpression=Xje;rn.BooleanLiteral=aze;rn.CallExpression=pze;rn.ConditionalExpression=Jje;rn.ClassDeclaration=rn.ClassExpression=rn.FunctionDeclaration=rn.ArrowFunctionExpression=rn.FunctionExpression=lze;Object.defineProperty(rn,"Identifier",{enumerable:!0,get:function(){return Rje.default}});rn.LogicalExpression=Yje;rn.NewExpression=Gje;rn.NullLiteral=ize;rn.NumericLiteral=nze;rn.ObjectExpression=oze;rn.ParenthesizedExpression=Qje;rn.RegExpLiteral=sze;rn.RestElement=A7;rn.SequenceExpression=Zje;rn.StringLiteral=rze;rn.TSAsExpression=E7;rn.TSNonNullExpression=Hje;rn.TaggedTemplateExpression=mze;rn.TemplateLiteral=Kje;rn.TypeCastExpression=P7;rn.UnaryExpression=Wje;rn.UpdateExpression=tze;rn.VariableDeclarator=qje;var Lje=xr(),Rje=T7(),C7=O2(),{BOOLEAN_BINARY_OPERATORS:Dje,BOOLEAN_UNARY_OPERATORS:Mje,NUMBER_BINARY_OPERATORS:Oje,NUMBER_UNARY_OPERATORS:Fje,STRING_UNARY_OPERATORS:Bje,anyTypeAnnotation:w7,arrayTypeAnnotation:B2,booleanTypeAnnotation:$2,buildMatchMemberExpression:hP,genericTypeAnnotation:Ff,identifier:Qm,nullLiteralTypeAnnotation:$je,numberTypeAnnotation:Dy,stringTypeAnnotation:eh,tupleTypeAnnotation:jje,unionTypeAnnotation:zje,voidTypeAnnotation:Uje,isIdentifier:Vje}=Lje;function qje(){if(this.get("id").isIdentifier())return this.get("init").getTypeAnnotation()}function P7(e){return e.typeAnnotation}P7.validParent=!0;function E7(e){return e.typeAnnotation}E7.validParent=!0;function Hje(){return this.get("expression").getTypeAnnotation()}function Gje(e){if(e.callee.type==="Identifier")return Ff(e.callee)}function Kje(){return eh()}function Wje(e){let t=e.operator;if(t==="void")return Uje();if(Fje.includes(t))return Dy();if(Bje.includes(t))return eh();if(Mje.includes(t))return $2()}function Xje(e){let t=e.operator;if(Oje.includes(t))return Dy();if(Dje.includes(t))return $2();if(t==="+"){let r=this.get("right"),n=this.get("left");return n.isBaseType("number")&&r.isBaseType("number")?Dy():n.isBaseType("string")||r.isBaseType("string")?eh():zje([eh(),Dy()])}}function Yje(){let e=[this.get("left").getTypeAnnotation(),this.get("right").getTypeAnnotation()];return(0,C7.createUnionType)(e)}function Jje(){let e=[this.get("consequent").getTypeAnnotation(),this.get("alternate").getTypeAnnotation()];return(0,C7.createUnionType)(e)}function Zje(){return this.get("expressions").pop().getTypeAnnotation()}function Qje(){return this.get("expression").getTypeAnnotation()}function eze(){return this.get("right").getTypeAnnotation()}function tze(e){let t=e.operator;if(t==="++"||t==="--")return Dy()}function rze(){return eh()}function nze(){return Dy()}function aze(){return $2()}function ize(){return $je()}function sze(){return Ff(Qm("RegExp"))}function oze(){return Ff(Qm("Object"))}function I7(){return Ff(Qm("Array"))}function A7(){return I7()}A7.validParent=!0;function lze(){return Ff(Qm("Function"))}var cze=hP("Array.from"),uze=hP("Object.keys"),dze=hP("Object.values"),fze=hP("Object.entries");function pze(){let{callee:e}=this.node;return uze(e)?B2(eh()):cze(e)||dze(e)||Vje(e,{name:"Array"})?B2(w7()):fze(e)?B2(jje([eh(),w7()])):N7(this.get("callee"))}function mze(){return N7(this.get("tag"))}function N7(e){if(e=e.resolve(),e.isFunction()){let{node:t}=e;if(t.async)return t.generator?Ff(Qm("AsyncIterator")):Ff(Qm("Promise"));if(t.generator)return Ff(Qm("Iterator"));if(e.node.returnType)return e.node.returnType}}});var M7=ae(Bf=>{"use strict";Object.defineProperty(Bf,"__esModule",{value:!0});Bf._getTypeAnnotation=D7;Bf.baseTypeStrictlyMatches=Oze;Bf.couldBeBaseType=Mze;Bf.getTypeAnnotation=Rze;Bf.isBaseType=Dze;Bf.isGenericType=Fze;var _7=k7(),hze=xr(),{anyTypeAnnotation:R7,isAnyTypeAnnotation:gP,isArrayTypeAnnotation:gze,isBooleanTypeAnnotation:yze,isEmptyTypeAnnotation:xze,isFlowBaseAnnotation:bze,isGenericTypeAnnotation:vze,isIdentifier:L7,isMixedTypeAnnotation:Sze,isNumberTypeAnnotation:Tze,isStringTypeAnnotation:wze,isTSArrayType:Cze,isTSTypeAnnotation:Pze,isTSTypeReference:Eze,isTupleTypeAnnotation:Ize,isTypeAnnotation:Aze,isUnionTypeAnnotation:Nze,isVoidTypeAnnotation:kze,stringTypeAnnotation:_ze,voidTypeAnnotation:Lze}=hze;function Rze(){let e=this.getData("typeAnnotation");return e!=null||(e=D7.call(this)||R7(),(Aze(e)||Pze(e))&&(e=e.typeAnnotation),this.setData("typeAnnotation",e)),e}var j2=new WeakSet;function D7(){let e=this.node;if(!e)if(this.key==="init"&&this.parentPath.isVariableDeclarator()){let r=this.parentPath.parentPath,n=r.parentPath;return r.key==="left"&&n.isForInStatement()?_ze():r.key==="left"&&n.isForOfStatement()?R7():Lze()}else return;if(e.typeAnnotation)return e.typeAnnotation;if(!j2.has(e)){j2.add(e);try{var t;let r=_7[e.type];if(r)return r.call(this,e);if(r=_7[this.parentPath.type],(t=r)!=null&&t.validParent)return this.parentPath.getTypeAnnotation()}finally{j2.delete(e)}}}function Dze(e,t){return z2(e,this.getTypeAnnotation(),t)}function z2(e,t,r){if(e==="string")return wze(t);if(e==="number")return Tze(t);if(e==="boolean")return yze(t);if(e==="any")return gP(t);if(e==="mixed")return Sze(t);if(e==="empty")return xze(t);if(e==="void")return kze(t);if(r)return!1;throw new Error(`Unknown base type ${e}`)}function Mze(e){let t=this.getTypeAnnotation();if(gP(t))return!0;if(Nze(t)){for(let r of t.types)if(gP(r)||z2(e,r,!0))return!0;return!1}else return z2(e,t,!0)}function Oze(e){let t=this.getTypeAnnotation(),r=e.getTypeAnnotation();return!gP(t)&&bze(t)?r.type===t.type:!1}function Fze(e){let t=this.getTypeAnnotation();return e==="Array"&&(Cze(t)||gze(t)||Ize(t))?!0:vze(t)&&L7(t.id,{name:e})||Eze(t)&&L7(t.typeName,{name:e})}});var F7=ae((DSt,U2)=>{var Sr=String,O7=function(){return{isColorSupported:!1,reset:Sr,bold:Sr,dim:Sr,italic:Sr,underline:Sr,inverse:Sr,hidden:Sr,strikethrough:Sr,black:Sr,red:Sr,green:Sr,yellow:Sr,blue:Sr,magenta:Sr,cyan:Sr,white:Sr,gray:Sr,bgBlack:Sr,bgRed:Sr,bgGreen:Sr,bgYellow:Sr,bgBlue:Sr,bgMagenta:Sr,bgCyan:Sr,bgWhite:Sr,blackBright:Sr,redBright:Sr,greenBright:Sr,yellowBright:Sr,blueBright:Sr,magentaBright:Sr,cyanBright:Sr,whiteBright:Sr,bgBlackBright:Sr,bgRedBright:Sr,bgGreenBright:Sr,bgYellowBright:Sr,bgBlueBright:Sr,bgMagentaBright:Sr,bgCyanBright:Sr,bgWhiteBright:Sr}};U2.exports=O7();U2.exports.createColors=O7});var B7=ae(yP=>{Object.defineProperty(yP,"__esModule",{value:!0});yP.default=/((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyus]{1,6}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|(0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?)|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-\/%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\](){}])|(\s+)|(^$|[\s\S])/g;yP.matchToToken=function(e){var t={type:"invalid",value:e[0],closed:void 0};return e[1]?(t.type="string",t.closed=!!(e[3]||e[4])):e[5]?t.type="comment":e[6]?(t.type="comment",t.closed=!!e[7]):e[8]?t.type="regex":e[9]?t.type="number":e[10]?t.type="name":e[11]?t.type="punctuator":e[12]&&(t.type="whitespace"),t}});var q2=ae(K0=>{"use strict";Object.defineProperty(K0,"__esModule",{value:!0});var V2=F7(),$7=B7(),j7=P0();function Bze(){return typeof process=="object"&&(process.env.FORCE_COLOR==="0"||process.env.FORCE_COLOR==="false")?!1:V2.isColorSupported}var xP=(e,t)=>r=>e(t(r));function V7(e){return{keyword:e.cyan,capitalized:e.yellow,jsxIdentifier:e.yellow,punctuator:e.yellow,number:e.magenta,string:e.green,regex:e.magenta,comment:e.gray,invalid:xP(xP(e.white,e.bgRed),e.bold),gutter:e.gray,marker:xP(e.red,e.bold),message:xP(e.red,e.bold),reset:e.reset}}var $ze=V7(V2.createColors(!0)),jze=V7(V2.createColors(!1));function q7(e){return e?$ze:jze}var zze=new Set(["as","async","from","get","of","set"]),Uze=/\r\n|[\n\r\u2028\u2029]/,Vze=/^[()[\]{}]$/,H7;{let e=/^[a-z][\w-]*$/i,t=function(r,n,a){if(r.type==="name"){if(j7.isKeyword(r.value)||j7.isStrictReservedWord(r.value,!0)||zze.has(r.value))return"keyword";if(e.test(r.value)&&(a[n-1]==="<"||a.slice(n-2,n)==="</"))return"jsxIdentifier";if(r.value[0]!==r.value[0].toLowerCase())return"capitalized"}return r.type==="punctuator"&&Vze.test(r.value)?"bracket":r.type==="invalid"&&(r.value==="@"||r.value==="#")?"punctuator":r.type};H7=function*(r){let n;for(;n=$7.default.exec(r);){let a=$7.matchToToken(n);yield{type:t(a,n.index,r),value:a.value}}}}function G7(e){if(e==="")return"";let t=q7(!0),r="";for(let{type:n,value:a}of H7(e))n in t?r+=a.split(Uze).map(i=>t[n](i)).join(`
`):r+=a;return r}var z7=!1,U7=/\r\n|[\n\r\u2028\u2029]/;function qze(e,t,r){let n=Object.assign({column:0,line:-1},e.start),a=Object.assign({},n,e.end),{linesAbove:i=2,linesBelow:s=3}=r||{},o=n.line,l=n.column,c=a.line,u=a.column,d=Math.max(o-(i+1),0),f=Math.min(t.length,c+s);o===-1&&(d=0),c===-1&&(f=t.length);let p=c-o,m={};if(p)for(let h=0;h<=p;h++){let x=h+o;if(!l)m[x]=!0;else if(h===0){let g=t[x-1].length;m[x]=[l,g-l+1]}else if(h===p)m[x]=[0,u];else{let g=t[x-h].length;m[x]=[0,g]}}else l===u?l?m[o]=[l,0]:m[o]=!0:m[o]=[l,u-l];return{start:d,end:f,markerLines:m}}function K7(e,t,r={}){let n=r.forceColor||Bze()&&r.highlightCode,a=q7(n),i=e.split(U7),{start:s,end:o,markerLines:l}=qze(t,i,r),c=t.start&&typeof t.start.column=="number",u=String(o).length,f=(n?G7(e):e).split(U7,o).slice(s,o).map((p,m)=>{let h=s+1+m,g=` ${` ${h}`.slice(-u)} |`,y=l[h],b=!l[h+1];if(y){let S="";if(Array.isArray(y)){let w=p.slice(0,Math.max(y[0]-1,0)).replace(/[^\t]/g," "),E=y[1]||1;S=[`
`,a.gutter(g.replace(/\d/g," "))," ",w,a.marker("^").repeat(E)].join(""),b&&r.message&&(S+=" "+a.message(r.message))}return[a.marker(">"),a.gutter(g),p.length>0?` ${p}`:"",S].join("")}else return` ${a.gutter(g)}${p.length>0?` ${p}`:""}`}).join(`
`);return r.message&&!c&&(f=`${" ".repeat(u+1)}${r.message}
${f}`),n?a.reset(f):f}function Hze(e,t,r,n={}){if(!z7){z7=!0;let i="Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.";if(process.emitWarning)process.emitWarning(i,"DeprecationWarning");else{let s=new Error(i);s.name="DeprecationWarning"}}return r=Math.max(r,0),K7(e,{start:{column:r,line:t}},n)}K0.codeFrameColumns=K7;K0.default=Hze;K0.highlight=G7});var W7=ae(bP=>{"use strict";Object.defineProperty(bP,"__esModule",{value:!0});bP.hooks=void 0;var FSt=bP.hooks=[function(e,t){if(e.key==="test"&&(t.isWhile()||t.isSwitchCase())||e.key==="declaration"&&t.isExportDeclaration()||e.key==="body"&&t.isLabeledStatement()||e.listKey==="declarations"&&t.isVariableDeclaration()&&t.node.declarations.length===1||e.key==="expression"&&t.isExpressionStatement())return t.remove(),!0},function(e,t){if(t.isSequenceExpression()&&t.node.expressions.length===1)return t.replaceWith(t.node.expressions[0]),!0},function(e,t){if(t.isBinary())return e.key==="left"?t.replaceWith(t.node.right):t.replaceWith(t.node.left),!0},function(e,t){if(t.isIfStatement()&&e.key==="consequent"||e.key==="body"&&(t.isLoop()||t.isArrowFunctionExpression()))return e.replaceWith({type:"BlockStatement",directives:[],body:[]}),!0}]});var vP=ae($f=>{"use strict";Object.defineProperty($f,"__esModule",{value:!0});$f._assertUnremoved=Q7;$f._callRemovalHooks=J7;$f._markRemoved=H2;$f._remove=Z7;$f._removeFromScope=Y7;$f.remove=Zze;var Gze=W7(),Kze=Wm(),Wze=G2(),X7=td(),Xze=xr(),Yze=SP(),Jze=Sl();function Zze(){var e;if(Q7.call(this),Jze.resync.call(this),J7.call(this)){H2.call(this);return}(e=this.opts)!=null&&e.noScope||Y7.call(this),this.shareCommentsWithSiblings(),Z7.call(this),H2.call(this)}function Y7(){let e=Xze.getBindingIdentifiers(this.node,!1,!1,!0);Object.keys(e).forEach(t=>this.scope.removeBinding(t))}function J7(){if(this.parentPath){for(let e of Gze.hooks)if(e(this,this.parentPath))return!0}}function Z7(){Array.isArray(this.container)?(this.container.splice(this.key,1),Yze.updateSiblingKeys.call(this,this.key,-1)):Wze._replaceWith.call(this,null)}function H2(){if(this._traverseFlags|=X7.SHOULD_SKIP|X7.REMOVED,this.parent){var e;(e=(0,Kze.getCachedPaths)(this))==null||e.delete(this.node)}this.node=null}function Q7(){if(this.removed)throw this.buildCodeFrameError("NodePath has been removed so is read-only.")}});var tG=ae(TP=>{"use strict";Object.defineProperty(TP,"__esModule",{value:!0});TP.default=void 0;var eG=xr(),Qze=eG,{react:eUe}=eG,{cloneNode:tUe,jsxExpressionContainer:rUe,variableDeclaration:nUe,variableDeclarator:aUe}=Qze,iUe={ReferencedIdentifier(e,t){if(e.isJSXIdentifier()&&eUe.isCompatTag(e.node.name)&&!e.parentPath.isJSXMemberExpression())return;if(e.node.name==="this"){let n=e.scope;do if(n.path.isFunction()&&!n.path.isArrowFunctionExpression())break;while(n=n.parent);n&&t.breakOnScopePaths.push(n.path)}let r=e.scope.getBinding(e.node.name);if(r){for(let n of r.constantViolations)if(n.scope!==r.path.scope){t.mutableBinding=!0,e.stop();return}r===t.scope.getBinding(e.node.name)&&(t.bindings[e.node.name]=r)}}},K2=class{constructor(t,r){this.breakOnScopePaths=void 0,this.bindings=void 0,this.mutableBinding=void 0,this.scopes=void 0,this.scope=void 0,this.path=void 0,this.attachAfter=void 0,this.breakOnScopePaths=[],this.bindings={},this.mutableBinding=!1,this.scopes=[],this.scope=r,this.path=t,this.attachAfter=!1}isCompatibleScope(t){for(let r of Object.keys(this.bindings)){let n=this.bindings[r];if(!t.bindingIdentifierEquals(r,n.identifier))return!1}return!0}getCompatibleScopes(){let t=this.path.scope;do{if(this.isCompatibleScope(t))this.scopes.push(t);else break;if(this.breakOnScopePaths.includes(t.path))break}while(t=t.parent)}getAttachmentPath(){let t=this._getAttachmentPath();if(!t)return;let r=t.scope;if(r.path===t&&(r=t.scope.parent),r.path.isProgram()||r.path.isFunction())for(let n of Object.keys(this.bindings)){if(!r.hasOwnBinding(n))continue;let a=this.bindings[n];if(a.kind==="param"||a.path.parentKey==="params")continue;if(this.getAttachmentParentForPath(a.path).key>=t.key){this.attachAfter=!0,t=a.path;for(let s of a.constantViolations)this.getAttachmentParentForPath(s).key>t.key&&(t=s)}}return t}_getAttachmentPath(){let r=this.scopes.pop();if(r){if(r.path.isFunction())if(this.hasOwnParamBindings(r)){if(this.scope===r)return;let n=r.path.get("body").get("body");for(let a=0;a<n.length;a++)if(!n[a].node._blockHoist)return n[a]}else return this.getNextScopeAttachmentParent();else if(r.path.isProgram())return this.getNextScopeAttachmentParent()}}getNextScopeAttachmentParent(){let t=this.scopes.pop();if(t)return this.getAttachmentParentForPath(t.path)}getAttachmentParentForPath(t){do if(!t.parentPath||Array.isArray(t.container)&&t.isStatement())return t;while(t=t.parentPath);return t}hasOwnParamBindings(t){for(let r of Object.keys(this.bindings)){if(!t.hasOwnBinding(r))continue;let n=this.bindings[r];if(n.kind==="param"&&n.constant)return!0}return!1}run(){if(this.path.traverse(iUe,this),this.mutableBinding)return;this.getCompatibleScopes();let t=this.getAttachmentPath();if(!t||t.getFunctionParent()===this.path.getFunctionParent())return;let r=t.scope.generateUidIdentifier("ref"),n=aUe(r,this.path.node),a=this.attachAfter?"insertAfter":"insertBefore",[i]=t[a]([t.isVariableDeclarator()?n:nUe("var",[n])]),s=this.path.parentPath;return s.isJSXElement()&&this.path.container===s.node.children&&(r=rUe(r)),this.path.replaceWith(tUe(r)),i.isVariableDeclarator()?i.get("init"):i.get("declarations.0.init")}};TP.default=K2});var SP=ae(Pl=>{"use strict";Object.defineProperty(Pl,"__esModule",{value:!0});Pl._containerInsert=Z2;Pl._containerInsertAfter=aG;Pl._containerInsertBefore=Q2;Pl._verifyNodeList=W0;Pl.insertAfter=TUe;Pl.insertBefore=vUe;Pl.pushContainer=CUe;Pl.unshiftContainer=wUe;Pl.updateSiblingKeys=oG;var sUe=Wm(),J2=td(),W2=Sl(),wP=vP(),oUe=xr(),lUe=tG(),{arrowFunctionExpression:cUe,assertExpression:uUe,assignmentExpression:dUe,blockStatement:rG,callExpression:fUe,cloneNode:X2,expressionStatement:Y2,isAssignmentExpression:pUe,isCallExpression:mUe,isExportNamedDeclaration:nG,isExpression:hUe,isIdentifier:gUe,isSequenceExpression:yUe,isSuper:xUe,thisExpression:bUe}=oUe;function vUe(e){wP._assertUnremoved.call(this);let t=W0.call(this,e),{parentPath:r,parent:n}=this;if(r.isExpressionStatement()||r.isLabeledStatement()||nG(n)||r.isExportDefaultDeclaration()&&this.isDeclaration())return r.insertBefore(t);if(this.isNodeType("Expression")&&!this.isJSXElement()||r.isForStatement()&&this.key==="init")return this.node&&t.push(this.node),this.replaceExpressionWithStatements(t);if(Array.isArray(this.container))return Q2.call(this,t);if(this.isStatementOrBlock()){let a=this.node,i=a&&(!this.isExpressionStatement()||a.expression!=null),[s]=this.replaceWith(rG(i?[a]:[]));return s.unshiftContainer("body",t)}else throw new Error("We don't know what to do with this node type. We were previously a Statement but we can't fit in here?")}function Z2(e,t){oG.call(this,e,t.length);let r=[];this.container.splice(e,0,...t);for(let i=0;i<t.length;i++){var n;let s=e+i,o=this.getSibling(s);r.push(o),(n=this.context)!=null&&n.queue&&W2.pushContext.call(o,this.context)}let a=W2._getQueueContexts.call(this);for(let i of r){W2.setScope.call(i),i.debug("Inserted.");for(let s of a)s.maybeQueue(i,!0)}return r}function Q2(e){return Z2.call(this,this.key,e)}function aG(e){return Z2.call(this,this.key+1,e)}var iG=e=>e[e.length-1];function sG(e){return yUe(e.parent)&&(iG(e.parent.expressions)!==e.node||sG(e.parentPath))}function SUe(e,t){if(!pUe(e)||!gUe(e.left))return!1;let r=t.getBlockParent();return r.hasOwnBinding(e.left.name)&&r.getOwnBinding(e.left.name).constantViolations.length<=1}function TUe(e){if(wP._assertUnremoved.call(this),this.isSequenceExpression())return iG(this.get("expressions")).insertAfter(e);let t=W0.call(this,e),{parentPath:r,parent:n}=this;if(r.isExpressionStatement()||r.isLabeledStatement()||nG(n)||r.isExportDefaultDeclaration()&&this.isDeclaration())return r.insertAfter(t.map(a=>hUe(a)?Y2(a):a));if(this.isNodeType("Expression")&&!this.isJSXElement()&&!r.isJSXElement()||r.isForStatement()&&this.key==="init"){let a=this;if(a.node){let i=a.node,{scope:s}=this;if(s.path.isPattern())return uUe(i),a.replaceWith(fUe(cUe([],i),[])),a.get("callee.body").insertAfter(t),[a];if(sG(a))t.unshift(i);else if(mUe(i)&&xUe(i.callee))t.unshift(i),t.push(bUe());else if(SUe(i,s))t.unshift(i),t.push(X2(i.left));else if(s.isPure(i,!0))t.push(i);else{r.isMethod({computed:!0,key:i})&&(s=s.parent);let o=s.generateDeclaredUidIdentifier();t.unshift(Y2(dUe("=",X2(o),i))),t.push(Y2(X2(o)))}}return this.replaceExpressionWithStatements(t)}else{if(Array.isArray(this.container))return aG.call(this,t);if(this.isStatementOrBlock()){let a=this.node,i=a&&(!this.isExpressionStatement()||a.expression!=null),[s]=this.replaceWith(rG(i?[a]:[]));return s.pushContainer("body",t)}else throw new Error("We don't know what to do with this node type. We were previously a Statement but we can't fit in here?")}}function oG(e,t){if(!this.parent)return;let r=(0,sUe.getCachedPaths)(this);if(r)for(let[,n]of r)typeof n.key=="number"&&n.container===this.container&&n.key>=e&&(n.key+=t)}function W0(e){if(!e)return[];Array.isArray(e)||(e=[e]);for(let t=0;t<e.length;t++){let r=e[t],n;if(r?typeof r!="object"?n="contains a non-object node":r.type?r instanceof J2.default&&(n="has a NodePath when it expected a raw object"):n="without a type":n="has falsy node",n){let a=Array.isArray(r)?"array":typeof r;throw new Error(`Node list ${n} with the index of ${t} and type of ${a}`)}}return e}function wUe(e,t){wP._assertUnremoved.call(this);let r=W0.call(this,t),n=this.node[e],a=J2.default.get({parentPath:this,parent:this.node,container:n,listKey:e,key:0}).setContext(this.context);return Q2.call(a,r)}function CUe(e,t){wP._assertUnremoved.call(this);let r=W0.call(this,t),n=this.node[e];return J2.default.get({parentPath:this,parent:this.node,container:n,listKey:e,key:n.length}).setContext(this.context).replaceWithMultiple(r)}Pl.hoist=function(t=this.scope){return new lUe.default(this,t).run()}});var G2=ae(jf=>{"use strict";Object.defineProperty(jf,"__esModule",{value:!0});jf._replaceWith=hG;jf.replaceExpressionWithStatements=ZUe;jf.replaceInline=QUe;jf.replaceWith=JUe;jf.replaceWithMultiple=XUe;jf.replaceWithSourceString=YUe;var PUe=q2(),tM=ky(),EUe=td(),fG=Wm(),rM=SP(),IUe=v1(),AUe=xr(),My=Sl(),{FUNCTION_TYPES:lG,arrowFunctionExpression:NUe,assignmentExpression:pG,awaitExpression:kUe,blockStatement:_Ue,buildUndefinedNode:eM,callExpression:LUe,cloneNode:nM,conditionalExpression:RUe,expressionStatement:DUe,getBindingIdentifiers:MUe,identifier:OUe,inheritLeadingComments:FUe,inheritTrailingComments:BUe,inheritsComments:$Ue,isBlockStatement:jUe,isEmptyStatement:cG,isExpression:mG,isExpressionStatement:zUe,isIfStatement:UUe,isProgram:VUe,isStatement:qUe,isVariableDeclaration:HUe,removeComments:GUe,returnStatement:uG,sequenceExpression:KUe,validate:dG,yieldExpression:WUe}=AUe;function XUe(e){var t;My.resync.call(this);let r=rM._verifyNodeList.call(this,e);FUe(r[0],this.node),BUe(r[r.length-1],this.node),(t=(0,fG.getCachedPaths)(this))==null||t.delete(this.node),this.node=this.container[this.key]=null;let n=this.insertAfter(e);return this.node?this.requeue():this.remove(),n}function YUe(e){My.resync.call(this);let t;try{e=`(${e})`,t=(0,IUe.parse)(e)}catch(n){let a=n.loc;throw a&&(n.message+=` - make sure this is an expression.
`+(0,PUe.codeFrameColumns)(e,{start:{line:a.line,column:a.column+1}}),n.code="BABEL_REPLACE_SOURCE_ERROR"),n}let r=t.program.body[0].expression;return tM.default.removeProperties(r),this.replaceWith(r)}function JUe(e){if(My.resync.call(this),this.removed)throw new Error("You can't replace this node, we've already removed it");let t=e instanceof EUe.default?e.node:e;if(!t)throw new Error("You passed `path.replaceWith()` a falsy node, use `path.remove()` instead");if(this.node===t)return[this];if(this.isProgram()&&!VUe(t))throw new Error("You can only replace a Program root node with another Program node");if(Array.isArray(t))throw new Error("Don't use `path.replaceWith()` with an array of nodes, use `path.replaceWithMultiple()`");if(typeof t=="string")throw new Error("Don't use `path.replaceWith()` with a source string, use `path.replaceWithSourceString()`");let r="";if(this.isNodeType("Statement")&&mG(t)&&!this.canHaveVariableDeclarationOrExpression()&&!this.canSwapBetweenExpressionAndStatement(t)&&!this.parentPath.isExportDefaultDeclaration()&&(t=DUe(t),r="expression"),this.isNodeType("Expression")&&qUe(t)&&!this.canHaveVariableDeclarationOrExpression()&&!this.canSwapBetweenExpressionAndStatement(t))return this.replaceExpressionWithStatements([t]);let n=this.node;return n&&($Ue(t,n),GUe(n)),hG.call(this,t),this.type=t.type,My.setScope.call(this),this.requeue(),[r?this.get(r):this]}function hG(e){var t;if(!this.container)throw new ReferenceError("Container is falsy");this.inList?dG(this.parent,this.key,[e]):dG(this.parent,this.key,e),this.debug(`Replace with ${e?.type}`),(t=(0,fG.getCachedPaths)(this))==null||t.set(e,this).delete(this.node),this.node=e,this.container[this.key]=e}function ZUe(e){My.resync.call(this);let t=[],r=CP(e,t);if(r){for(let f of t)this.scope.push({id:f});return this.replaceWith(r)[0].get("expressions")}let n=this.getFunctionParent(),a=n?.node.async,i=n?.node.generator,s=NUe([],_Ue(e));this.replaceWith(LUe(s,[]));let o=this.get("callee");o.get("body").scope.hoistVariables(f=>this.scope.push({id:f}));let l=o.getCompletionRecords();for(let f of l){if(!f.isExpressionStatement())continue;let p=f.findParent(m=>m.isLoop());if(p){let m=p.getData("expressionReplacementReturnUid");m?m=OUe(m.name):(m=o.scope.generateDeclaredUidIdentifier("ret"),o.get("body").pushContainer("body",uG(nM(m))),p.setData("expressionReplacementReturnUid",m)),f.get("expression").replaceWith(pG("=",nM(m),f.node.expression))}else f.replaceWith(uG(f.node.expression))}o.arrowFunctionToExpression();let c=o,u=a&&tM.default.hasType(this.get("callee.body").node,"AwaitExpression",lG),d=i&&tM.default.hasType(this.get("callee.body").node,"YieldExpression",lG);return u&&(c.set("async",!0),d||this.replaceWith(kUe(this.node))),d&&(c.set("generator",!0),this.replaceWith(WUe(this.node,!0))),c.get("body.body")}function CP(e,t){let r=[],n=!0;for(let a of e)if(cG(a)||(n=!1),mG(a))r.push(a);else if(zUe(a))r.push(a.expression);else if(HUe(a)){if(a.kind!=="var")return;for(let i of a.declarations){let s=MUe(i);for(let o of Object.keys(s))t.push(nM(s[o]));i.init&&r.push(pG("=",i.id,i.init))}n=!0}else if(UUe(a)){let i=a.consequent?CP([a.consequent],t):eM(),s=a.alternate?CP([a.alternate],t):eM();if(!i||!s)return;r.push(RUe(a.test,i,s))}else if(jUe(a)){let i=CP(a.body,t);if(!i)return;r.push(i)}else if(cG(a))e.indexOf(a)===0&&(n=!0);else return;return n&&r.push(eM()),r.length===1?r[0]:KUe(r)}function QUe(e){if(My.resync.call(this),Array.isArray(e))if(Array.isArray(this.container)){e=rM._verifyNodeList.call(this,e);let t=rM._containerInsertAfter.call(this,e);return this.remove(),t}else return this.replaceWithMultiple(e);else return this.replaceWith(e)}});var bG=ae(PP=>{"use strict";Object.defineProperty(PP,"__esModule",{value:!0});PP.evaluate=o8e;PP.evaluateTruthy=i8e;var e8e=["Number","String","Math"],t8e=["isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent",null,null],r8e=["random"];function gG(e){return e8e.includes(e)}function n8e(e){return t8e.includes(e)}function a8e(e){return r8e.includes(e)}function i8e(){let e=this.evaluate();if(e.confident)return!!e.value}function hc(e,t){t.confident&&(t.deoptPath=e,t.confident=!1)}var yG=new Map([["undefined",void 0],["Infinity",1/0],["NaN",NaN]]);function Ns(e,t){let{node:r}=e,{seen:n}=t;if(n.has(r)){let a=n.get(r);if(a.resolved)return a.value;hc(e,t);return}else{let a={resolved:!1};n.set(r,a);let i=s8e(e,t);return t.confident&&(a.resolved=!0,a.value=i),i}}function s8e(e,t){if(t.confident){if(e.isSequenceExpression()){let n=e.get("expressions");return Ns(n[n.length-1],t)}if(e.isStringLiteral()||e.isNumericLiteral()||e.isBooleanLiteral())return e.node.value;if(e.isNullLiteral())return null;if(e.isTemplateLiteral())return xG(e,e.node.quasis,t);if(e.isTaggedTemplateExpression()&&e.get("tag").isMemberExpression()){let n=e.get("tag.object"),{node:{name:a}}=n,i=e.get("tag.property");if(n.isIdentifier()&&a==="String"&&!e.scope.getBinding(a)&&i.isIdentifier()&&i.node.name==="raw")return xG(e,e.node.quasi.quasis,t,!0)}if(e.isConditionalExpression()){let n=Ns(e.get("test"),t);return t.confident?Ns(n?e.get("consequent"):e.get("alternate"),t):void 0}if(e.isExpressionWrapper())return Ns(e.get("expression"),t);if(e.isMemberExpression()&&!e.parentPath.isCallExpression({callee:e.node})){let n=e.get("property"),a=e.get("object");if(a.isLiteral()){let i=a.node.value,s=typeof i,o=null;if(e.node.computed){if(o=Ns(n,t),!t.confident)return}else n.isIdentifier()&&(o=n.node.name);if((s==="number"||s==="string")&&o!=null&&(typeof o=="number"||typeof o=="string"))return i[o]}}if(e.isReferencedIdentifier()){let n=e.scope.getBinding(e.node.name);if(n){if(n.constantViolations.length>0||e.node.start<n.path.node.end){hc(n.path,t);return}let o=n.path.scope;if(n.kind==="var"&&o!==n.scope){let l=!o.path.parentPath.isBlockStatement();for(let c=o.parent;c;c=c.parent){var r;if(c===e.scope){if(l){hc(n.path,t);return}break}(r=c.path.parentPath)!=null&&r.isBlockStatement()&&(l=!0)}}if(n.hasValue)return n.value}let a=e.node.name;if(yG.has(a)){if(!n)return yG.get(a);hc(n.path,t);return}let i=e.resolve();if(i===e){hc(e,t);return}let s=Ns(i,t);if(typeof s=="object"&&s!==null&&n.references>1){hc(i,t);return}return s}if(e.isUnaryExpression({prefix:!0})){if(e.node.operator==="void")return;let n=e.get("argument");if(e.node.operator==="typeof"&&(n.isFunction()||n.isClass()))return"function";let a=Ns(n,t);if(!t.confident)return;switch(e.node.operator){case"!":return!a;case"+":return+a;case"-":return-a;case"~":return~a;case"typeof":return typeof a}}if(e.isArrayExpression()){let n=[],a=e.get("elements");for(let i of a){let s=i.evaluate();if(s.confident)n.push(s.value);else{hc(s.deopt,t);return}}return n}if(e.isObjectExpression()){let n={},a=e.get("properties");for(let i of a){if(i.isObjectMethod()||i.isSpreadElement()){hc(i,t);return}let s=i.get("key"),o;if(i.node.computed){if(o=s.evaluate(),!o.confident){hc(o.deopt,t);return}o=o.value}else s.isIdentifier()?o=s.node.name:o=s.node.value;let c=i.get("value").evaluate();if(!c.confident){hc(c.deopt,t);return}c=c.value,n[o]=c}return n}if(e.isLogicalExpression()){let n=t.confident,a=Ns(e.get("left"),t),i=t.confident;t.confident=n;let s=Ns(e.get("right"),t),o=t.confident;switch(e.node.operator){case"||":return t.confident=i&&(!!a||o),t.confident?a||s:void 0;case"&&":return t.confident=i&&(!a||o),t.confident?a&&s:void 0;case"??":return t.confident=i&&(a!=null||o),t.confident?a??s:void 0}}if(e.isBinaryExpression()){let n=Ns(e.get("left"),t);if(!t.confident)return;let a=Ns(e.get("right"),t);if(!t.confident)return;switch(e.node.operator){case"-":return n-a;case"+":return n+a;case"/":return n/a;case"*":return n*a;case"%":return n%a;case"**":return Math.pow(n,a);case"<":return n<a;case">":return n>a;case"<=":return n<=a;case">=":return n>=a;case"==":return n==a;case"!=":return n!=a;case"===":return n===a;case"!==":return n!==a;case"|":return n|a;case"&":return n&a;case"^":return n^a;case"<<":return n<<a;case">>":return n>>a;case">>>":return n>>>a}}if(e.isCallExpression()){let n=e.get("callee"),a,i;if(n.isIdentifier()&&!e.scope.getBinding(n.node.name)&&(gG(n.node.name)||n8e(n.node.name))&&(i=global[n.node.name]),n.isMemberExpression()){let s=n.get("object"),o=n.get("property");if(s.isIdentifier()&&o.isIdentifier()&&gG(s.node.name)&&!a8e(o.node.name)){a=global[s.node.name];let l=o.node.name;hasOwnProperty.call(a,l)&&(i=a[l])}if(s.isLiteral()&&o.isIdentifier()){let l=typeof s.node.value;(l==="string"||l==="number")&&(a=s.node.value,i=a[o.node.name])}}if(i){let s=e.get("arguments").map(o=>Ns(o,t));return t.confident?i.apply(a,s):void 0}}hc(e,t)}}function xG(e,t,r,n=!1){let a="",i=0,s=e.isTemplateLiteral()?e.get("expressions"):e.get("quasi.expressions");for(let o of t){if(!r.confident)break;a+=n?o.value.raw:o.value.cooked;let l=s[i++];l&&(a+=String(Ns(l,r)))}if(r.confident)return a}function o8e(){let e={confident:!0,deoptPath:null,seen:new Map},t=Ns(this,e);return e.confident||(t=void 0),{confident:e.confident,deopt:e.deoptPath,value:t}}});var vG=ae(El=>{"use strict";Object.defineProperty(El,"__esModule",{value:!0});El.statements=El.statement=El.smart=El.program=El.expression=void 0;var l8e=xr(),{assertExpressionStatement:c8e}=l8e;function aM(e){return{code:t=>`/* @babel/template */;
${t}`,validate:()=>{},unwrap:t=>e(t.program.body.slice(1))}}var qSt=El.smart=aM(e=>e.length>1?e:e[0]),HSt=El.statements=aM(e=>e),GSt=El.statement=aM(e=>{if(e.length===0)throw new Error("Found nothing to return.");if(e.length>1)throw new Error("Found multiple statements but wanted one");return e[0]}),u8e=El.expression={code:e=>`(
${e}
)`,validate:e=>{if(e.program.body.length>1)throw new Error("Found multiple statements but wanted one");if(u8e.unwrap(e).start===0)throw new Error("Parse result included parens.")},unwrap:({program:e})=>{let[t]=e.body;return c8e(t),t.expression}},KSt=El.program={code:e=>e,validate:()=>{},unwrap:e=>e.program}});var EP=ae(X0=>{"use strict";Object.defineProperty(X0,"__esModule",{value:!0});X0.merge=p8e;X0.normalizeReplacements=h8e;X0.validate=m8e;var d8e=["placeholderWhitelist","placeholderPattern","preserveComments","syntacticPlaceholders"];function f8e(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function p8e(e,t){let{placeholderWhitelist:r=e.placeholderWhitelist,placeholderPattern:n=e.placeholderPattern,preserveComments:a=e.preserveComments,syntacticPlaceholders:i=e.syntacticPlaceholders}=t;return{parser:Object.assign({},e.parser,t.parser),placeholderWhitelist:r,placeholderPattern:n,preserveComments:a,syntacticPlaceholders:i}}function m8e(e){if(e!=null&&typeof e!="object")throw new Error("Unknown template options.");let t=e||{},{placeholderWhitelist:r,placeholderPattern:n,preserveComments:a,syntacticPlaceholders:i}=t,s=f8e(t,d8e);if(r!=null&&!(r instanceof Set))throw new Error("'.placeholderWhitelist' must be a Set, null, or undefined");if(n!=null&&!(n instanceof RegExp)&&n!==!1)throw new Error("'.placeholderPattern' must be a RegExp, false, null, or undefined");if(a!=null&&typeof a!="boolean")throw new Error("'.preserveComments' must be a boolean, null, or undefined");if(i!=null&&typeof i!="boolean")throw new Error("'.syntacticPlaceholders' must be a boolean, null, or undefined");if(i===!0&&(r!=null||n!=null))throw new Error("'.placeholderWhitelist' and '.placeholderPattern' aren't compatible with '.syntacticPlaceholders: true'");return{parser:s,placeholderWhitelist:r||void 0,placeholderPattern:n??void 0,preserveComments:a??void 0,syntacticPlaceholders:i??void 0}}function h8e(e){if(Array.isArray(e))return e.reduce((t,r,n)=>(t["$"+n]=r,t),{});if(typeof e=="object"||e==null)return e||void 0;throw new Error("Template replacements must be an array, object, null, or undefined")}});var sM=ae(iM=>{"use strict";Object.defineProperty(iM,"__esModule",{value:!0});iM.default=N8e;var g8e=xr(),y8e=v1(),x8e=q2(),{isCallExpression:b8e,isExpressionStatement:v8e,isFunction:S8e,isIdentifier:T8e,isJSXIdentifier:w8e,isNewExpression:C8e,isPlaceholder:IP,isStatement:P8e,isStringLiteral:SG,removePropertiesDeep:E8e,traverse:I8e}=g8e,A8e=/^[_$A-Z0-9]+$/;function N8e(e,t,r){let{placeholderWhitelist:n,placeholderPattern:a,preserveComments:i,syntacticPlaceholders:s}=r,o=L8e(t,r.parser,s);E8e(o,{preserveComments:i}),e.validate(o);let l={syntactic:{placeholders:[],placeholderNames:new Set},legacy:{placeholders:[],placeholderNames:new Set},placeholderWhitelist:n,placeholderPattern:a,syntacticPlaceholders:s};return I8e(o,k8e,l),Object.assign({ast:o},l.syntactic.placeholders.length?l.syntactic:l.legacy)}function k8e(e,t,r){var n;let a,i=r.syntactic.placeholders.length>0;if(IP(e)){if(r.syntacticPlaceholders===!1)throw new Error("%%foo%%-style placeholders can't be used when '.syntacticPlaceholders' is false.");a=e.name.name,i=!0}else{if(i||r.syntacticPlaceholders)return;if(T8e(e)||w8e(e))a=e.name;else if(SG(e))a=e.value;else return}if(i&&(r.placeholderPattern!=null||r.placeholderWhitelist!=null))throw new Error("'.placeholderWhitelist' and '.placeholderPattern' aren't compatible with '.syntacticPlaceholders: true'");if(!i&&(r.placeholderPattern===!1||!(r.placeholderPattern||A8e).test(a))&&!((n=r.placeholderWhitelist)!=null&&n.has(a)))return;t=t.slice();let{node:s,key:o}=t[t.length-1],l;SG(e)||IP(e,{expectedNode:"StringLiteral"})?l="string":C8e(s)&&o==="arguments"||b8e(s)&&o==="arguments"||S8e(s)&&o==="params"?l="param":v8e(s)&&!IP(e)?(l="statement",t=t.slice(0,-1)):P8e(e)&&IP(e)?l="statement":l="other";let{placeholders:c,placeholderNames:u}=i?r.syntactic:r.legacy;c.push({name:a,type:l,resolve:d=>_8e(d,t),isDuplicate:u.has(a)}),u.add(a)}function _8e(e,t){let r=e;for(let i=0;i<t.length-1;i++){let{key:s,index:o}=t[i];o===void 0?r=r[s]:r=r[s][o]}let{key:n,index:a}=t[t.length-1];return{parent:r,key:n,index:a}}function L8e(e,t,r){let n=(t.plugins||[]).slice();r!==!1&&n.push("placeholders"),t=Object.assign({allowAwaitOutsideFunction:!0,allowReturnOutsideFunction:!0,allowNewTargetOutsideFunction:!0,allowSuperOutsideMethod:!0,allowYieldOutsideFunction:!0,sourceType:"module"},t,{plugins:n});try{return(0,y8e.parse)(e,t)}catch(a){let i=a.loc;throw i&&(a.message+=`
`+(0,x8e.codeFrameColumns)(e,{start:i}),a.code="BABEL_TEMPLATE_PARSE_ERROR"),a}}});var uM=ae(cM=>{"use strict";Object.defineProperty(cM,"__esModule",{value:!0});cM.default=B8e;var R8e=xr(),{blockStatement:D8e,cloneNode:lM,emptyStatement:M8e,expressionStatement:oM,identifier:AP,isStatement:TG,isStringLiteral:O8e,stringLiteral:F8e,validate:wG}=R8e;function B8e(e,t){let r=lM(e.ast);return t&&(e.placeholders.forEach(n=>{if(!hasOwnProperty.call(t,n.name)){let a=n.name;throw new Error(`Error: No substitution given for "${a}". If this is not meant to be a
placeholder you may want to consider passing one of the following options to @babel/template:
- { placeholderPattern: false, placeholderWhitelist: new Set(['${a}'])}
- { placeholderPattern: /^${a}$/ }`)}}),Object.keys(t).forEach(n=>{if(!e.placeholderNames.has(n))throw new Error(`Unknown substitution "${n}" given`)})),e.placeholders.slice().reverse().forEach(n=>{try{var a;$8e(n,r,(a=t&&t[n.name])!=null?a:null)}catch(i){throw i.message=`@babel/template placeholder "${n.name}": ${i.message}`,i}}),r}function $8e(e,t,r){e.isDuplicate&&(Array.isArray(r)?r=r.map(o=>lM(o)):typeof r=="object"&&(r=lM(r)));let{parent:n,key:a,index:i}=e.resolve(t);if(e.type==="string"){if(typeof r=="string"&&(r=F8e(r)),!r||!O8e(r))throw new Error("Expected string substitution")}else if(e.type==="statement")i===void 0?r?Array.isArray(r)?r=D8e(r):typeof r=="string"?r=oM(AP(r)):TG(r)||(r=oM(r)):r=M8e():r&&!Array.isArray(r)&&(typeof r=="string"&&(r=AP(r)),TG(r)||(r=oM(r)));else if(e.type==="param"){if(typeof r=="string"&&(r=AP(r)),i===void 0)throw new Error("Assertion failure.")}else if(typeof r=="string"&&(r=AP(r)),Array.isArray(r))throw new Error("Cannot replace single expression with an array.");function s(o,l,c){let u=o[l];o[l]=c,(u.type==="Identifier"||u.type==="Placeholder")&&(u.typeAnnotation&&(c.typeAnnotation=u.typeAnnotation),u.optional&&(c.optional=u.optional),u.decorators&&(c.decorators=u.decorators))}if(i===void 0)wG(n,a,r),s(n,a,r);else{let o=n[a].slice();e.type==="statement"||e.type==="param"?r==null?o.splice(i,1):Array.isArray(r)?o.splice(i,1,...r):s(o,i,r):s(o,i,r),wG(n,a,o),n[a]=o}}});var CG=ae(dM=>{"use strict";Object.defineProperty(dM,"__esModule",{value:!0});dM.default=V8e;var j8e=EP(),z8e=sM(),U8e=uM();function V8e(e,t,r){t=e.code(t);let n;return a=>{let i=(0,j8e.normalizeReplacements)(a);return n||(n=(0,z8e.default)(e,t,r)),e.unwrap((0,U8e.default)(n,i))}}});var PG=ae(fM=>{"use strict";Object.defineProperty(fM,"__esModule",{value:!0});fM.default=K8e;var q8e=EP(),H8e=sM(),G8e=uM();function K8e(e,t,r){let{metadata:n,names:a}=W8e(e,t,r);return i=>{let s={};return i.forEach((o,l)=>{s[a[l]]=o}),o=>{let l=(0,q8e.normalizeReplacements)(o);return l&&Object.keys(l).forEach(c=>{if(hasOwnProperty.call(s,c))throw new Error("Unexpected replacement overlap.")}),e.unwrap((0,G8e.default)(n,l?Object.assign(l,s):s))}}}function W8e(e,t,r){let n="BABEL_TPL$",a=t.join("");do n="$$"+n;while(a.includes(n));let{names:i,code:s}=X8e(t,n);return{metadata:(0,H8e.default)(e,e.code(s),{parser:r.parser,placeholderWhitelist:new Set(i.concat(r.placeholderWhitelist?Array.from(r.placeholderWhitelist):[])),placeholderPattern:r.placeholderPattern,preserveComments:r.preserveComments,syntacticPlaceholders:r.syntacticPlaceholders}),names:i}}function X8e(e,t){let r=[],n=e[0];for(let a=1;a<e.length;a++){let i=`${t}${a-1}`;r.push(i),n+=i+e[a]}return{names:r,code:n}}});var _G=ae(pM=>{"use strict";Object.defineProperty(pM,"__esModule",{value:!0});pM.default=kG;var eu=EP(),EG=CG(),IG=PG(),AG=(0,eu.validate)({placeholderPattern:!1});function kG(e,t){let r=new WeakMap,n=new WeakMap,a=t||(0,eu.validate)(null);return Object.assign((i,...s)=>{if(typeof i=="string"){if(s.length>1)throw new Error("Unexpected extra params.");return NG((0,EG.default)(e,i,(0,eu.merge)(a,(0,eu.validate)(s[0]))))}else if(Array.isArray(i)){let o=r.get(i);return o||(o=(0,IG.default)(e,i,a),r.set(i,o)),NG(o(s))}else if(typeof i=="object"&&i){if(s.length>0)throw new Error("Unexpected extra params.");return kG(e,(0,eu.merge)(a,(0,eu.validate)(i)))}throw new Error(`Unexpected template param ${typeof i}`)},{ast:(i,...s)=>{if(typeof i=="string"){if(s.length>1)throw new Error("Unexpected extra params.");return(0,EG.default)(e,i,(0,eu.merge)((0,eu.merge)(a,(0,eu.validate)(s[0])),AG))()}else if(Array.isArray(i)){let o=n.get(i);return o||(o=(0,IG.default)(e,i,(0,eu.merge)(a,AG)),n.set(i,o)),o(s)()}throw new Error(`Unexpected template param ${typeof i}`)}})}function NG(e){let t="";try{throw new Error}catch(r){r.stack&&(t=r.stack.split(`
`).slice(3).join(`
`))}return r=>{try{return e(r)}catch(n){throw n.stack+=`
=============
${t}`,n}}}});var LG=ae(so=>{"use strict";Object.defineProperty(so,"__esModule",{value:!0});so.statements=so.statement=so.smart=so.program=so.expression=so.default=void 0;var Y0=vG(),J0=_G(),mM=so.smart=(0,J0.default)(Y0.smart),Y8e=so.statement=(0,J0.default)(Y0.statement),J8e=so.statements=(0,J0.default)(Y0.statements),Z8e=so.expression=(0,J0.default)(Y0.expression),Q8e=so.program=(0,J0.default)(Y0.program),tTt=so.default=Object.assign(mM.bind(void 0),{smart:mM,statement:Y8e,statements:J8e,expression:Z8e,program:Q8e,ast:mM.ast})});var jG=ae(rd=>{"use strict";Object.defineProperty(rd,"__esModule",{value:!0});rd.arrowFunctionToExpression=NVe;rd.ensureBlock=EVe;rd.ensureFunctionName=zVe;rd.splitExportDeclaration=$Ve;rd.toComputedKey=PVe;rd.unwrapFunctionEnvironment=IVe;var eVe=xr(),tVe=LG(),yM=B0(),rVe=Sl(),{arrowFunctionExpression:xM,assignmentExpression:th,binaryExpression:hM,blockStatement:nVe,callExpression:Oy,conditionalExpression:aVe,expressionStatement:MG,identifier:gn,isIdentifier:iVe,jsxIdentifier:sVe,logicalExpression:oVe,LOGICAL_OPERATORS:lVe,memberExpression:gc,metaProperty:cVe,numericLiteral:uVe,objectExpression:dVe,restElement:fVe,returnStatement:pVe,sequenceExpression:mVe,spreadElement:hVe,stringLiteral:OG,super:gM,thisExpression:Z0,toExpression:FG,unaryExpression:gVe,toBindingIdentifierName:yVe,isFunction:xVe,isAssignmentPattern:bVe,isRestElement:vVe,getFunctionName:SVe,cloneNode:rh,variableDeclaration:TVe,variableDeclarator:wVe,exportNamedDeclaration:RG,exportSpecifier:DG,inherits:CVe}=eVe;function PVe(){let e;if(this.isMemberExpression())e=this.node.property;else if(this.isProperty()||this.isMethod())e=this.node.key;else throw new ReferenceError("todo");return this.node.computed||iVe(e)&&(e=OG(e.name)),e}function EVe(){let e=this.get("body"),t=e.node;if(Array.isArray(e))throw new Error("Can't convert array path to a block statement");if(!t)throw new Error("Can't convert node without a body");if(e.isBlockStatement())return t;let r=[],n="body",a,i;e.isStatement()?(i="body",a=0,r.push(e.node)):(n+=".body.0",this.isFunction()?(a="argument",r.push(pVe(e.node))):(a="expression",r.push(MG(e.node)))),this.node.body=nVe(r);let s=this.get(n);return rVe.setup.call(e,s,i?s.node[i]:s.node,i,a),this.node}rd.arrowFunctionToShadowed=function(){this.isArrowFunctionExpression()&&this.arrowFunctionToExpression()};function IVe(){if(!this.isArrowFunctionExpression()&&!this.isFunctionExpression()&&!this.isFunctionDeclaration())throw this.buildCodeFrameError("Can only unwrap the environment of a function.");BG(this)}function AVe(e,t){e.node.type=t}function NVe({allowInsertArrow:e=!0,allowInsertArrowWithRest:t=e,noNewArrows:r=!(n=>(n=arguments[0])==null?void 0:n.specCompliant)()}={}){if(!this.isArrowFunctionExpression())throw this.buildCodeFrameError("Cannot convert non-arrow function to a function expression.");let n=this;if(!r){var a;n=(a=n.ensureFunctionName(!1))!=null?a:n}let{thisBinding:i,fnPath:s}=BG(n,r,e,t);if(s.ensureBlock(),AVe(s,"FunctionExpression"),!r){let o=i?null:s.scope.generateUidIdentifier("arrowCheckId");return o&&s.parentPath.scope.push({id:o,init:dVe([])}),s.get("body").unshiftContainer("body",MG(Oy(this.hub.addHelper("newArrowCheck"),[Z0(),gn(o?o.name:i)]))),s.replaceWith(Oy(gc(s.node,gn("bind")),[o?gn(o.name):Z0()])),s.get("callee.object")}return s}var kVe=(0,yM.environmentVisitor)({CallExpression(e,{allSuperCalls:t}){e.get("callee").isSuper()&&t.push(e)}});function BG(e,t=!0,r=!0,n=!0){let a,i=e.findParent(p=>p.isArrowFunctionExpression()?(a??(a=p),!1):p.isFunction()||p.isProgram()||p.isClassProperty({static:!1})||p.isClassPrivateProperty({static:!1})),s=i.isClassMethod({kind:"constructor"});if(i.isClassProperty()||i.isClassPrivateProperty())if(a)i=a;else if(r)e.replaceWith(Oy(xM([],FG(e.node)),[])),i=e.get("callee"),e=i.get("body");else throw e.buildCodeFrameError("Unable to transform arrow inside class property");let{thisPaths:o,argumentsPaths:l,newTargetPaths:c,superProps:u,superCalls:d}=BVe(e);if(s&&d.length>0){if(!r)throw d[0].buildCodeFrameError("When using '@babel/plugin-transform-arrow-functions', it's not possible to compile `super()` in an arrow function without compiling classes.\nPlease add '@babel/plugin-transform-classes' to your Babel configuration.");if(!n)throw d[0].buildCodeFrameError("When using '@babel/plugin-transform-parameters', it's not possible to compile `super()` in an arrow function with default or rest parameters without compiling classes.\nPlease add '@babel/plugin-transform-classes' to your Babel configuration.");let p=[];i.traverse(kVe,{allSuperCalls:p});let m=MVe(i);p.forEach(h=>{let x=gn(m);x.loc=h.node.callee.loc,h.get("callee").replaceWith(x)})}if(l.length>0){let p=Q0(i,"arguments",()=>{let m=()=>gn("arguments");return i.scope.path.isProgram()?aVe(hM("===",gVe("typeof",m()),OG("undefined")),i.scope.buildUndefinedNode(),m()):m()});l.forEach(m=>{let h=gn(p);h.loc=m.node.loc,m.replaceWith(h)})}if(c.length>0){let p=Q0(i,"newtarget",()=>cVe(gn("new"),gn("target")));c.forEach(m=>{let h=gn(p);h.loc=m.node.loc,m.replaceWith(h)})}if(u.length>0){if(!r)throw u[0].buildCodeFrameError("When using '@babel/plugin-transform-arrow-functions', it's not possible to compile `super.prop` in an arrow function without compiling classes.\nPlease add '@babel/plugin-transform-classes' to your Babel configuration.");u.reduce((m,h)=>m.concat(LVe(h)),[]).forEach(m=>{let h=m.node.computed?"":m.get("property").node.name,x=m.parentPath,g=x.isAssignmentExpression({left:m.node}),y=x.isCallExpression({callee:m.node}),b=x.isTaggedTemplateExpression({tag:m.node}),S=OVe(i,g,h),w=[];if(m.node.computed&&w.push(m.get("property").node),g){let C=x.node.right;w.push(C)}let E=Oy(gn(S),w);y?(x.unshiftContainer("arguments",Z0()),m.replaceWith(gc(E,gn("call"))),o.push(x.get("arguments.0"))):g?x.replaceWith(E):b?(m.replaceWith(Oy(gc(E,gn("bind"),!1),[Z0()])),o.push(m.get("arguments.0"))):m.replaceWith(E)})}let f;return(o.length>0||!t)&&(f=DVe(i,s),(t||s&&$G(i))&&(o.forEach(p=>{let m=p.isJSX()?sVe(f):gn(f);m.loc=p.node.loc,p.replaceWith(m)}),t||(f=null))),{thisBinding:f,fnPath:e}}function _Ve(e){return lVe.includes(e)}function LVe(e){if(e.parentPath.isAssignmentExpression()&&e.parentPath.node.operator!=="="){let r=e.parentPath,n=r.node.operator.slice(0,-1),a=r.node.right,i=_Ve(n);if(e.node.computed){let s=e.scope.generateDeclaredUidIdentifier("tmp"),{object:o,property:l}=e.node;r.get("left").replaceWith(gc(o,th("=",s,l),!0)),r.get("right").replaceWith(t(i?"=":n,gc(o,gn(s.name),!0),a))}else{let s=e.node.object,o=e.node.property;r.get("left").replaceWith(gc(s,o)),r.get("right").replaceWith(t(i?"=":n,gc(s,gn(o.name)),a))}return i?r.replaceWith(oVe(n,r.node.left,r.node.right)):r.node.operator="=",[r.get("left"),r.get("right").get("left")]}else if(e.parentPath.isUpdateExpression()){let r=e.parentPath,n=e.scope.generateDeclaredUidIdentifier("tmp"),a=e.node.computed?e.scope.generateDeclaredUidIdentifier("prop"):null,i=[th("=",n,gc(e.node.object,a?th("=",a,e.node.property):e.node.property,e.node.computed)),th("=",gc(e.node.object,a?gn(a.name):e.node.property,e.node.computed),hM(e.parentPath.node.operator[0],gn(n.name),uVe(1)))];e.parentPath.node.prefix||i.push(gn(n.name)),r.replaceWith(mVe(i));let s=r.get("expressions.0.right"),o=r.get("expressions.1.left");return[s,o]}return[e];function t(r,n,a){return r==="="?th("=",n,a):hM(r,n,a)}}function $G(e){return e.isClassMethod()&&!!e.parentPath.parentPath.node.superClass}var RVe=(0,yM.environmentVisitor)({CallExpression(e,{supers:t,thisBinding:r}){e.get("callee").isSuper()&&(t.has(e.node)||(t.add(e.node),e.replaceWithMultiple([e.node,th("=",gn(r),gn("this"))])))}});function DVe(e,t){return Q0(e,"this",r=>{if(!t||!$G(e))return Z0();e.traverse(RVe,{supers:new WeakSet,thisBinding:r})})}function MVe(e){return Q0(e,"supercall",()=>{let t=e.scope.generateUidIdentifier("args");return xM([fVe(t)],Oy(gM(),[hVe(gn(t.name))]))})}function OVe(e,t,r){return Q0(e,`superprop_${t?"set":"get"}:${r||""}`,()=>{let a=[],i;if(r)i=gc(gM(),gn(r));else{let s=e.scope.generateUidIdentifier("prop");a.unshift(s),i=gc(gM(),gn(s.name),!0)}if(t){let s=e.scope.generateUidIdentifier("value");a.push(s),i=th("=",i,gn(s.name))}return xM(a,i)})}function Q0(e,t,r){let n="binding:"+t,a=e.getData(n);if(!a){let i=e.scope.generateUidIdentifier(t);a=i.name,e.setData(n,a),e.scope.push({id:i,init:r(a)})}return a}var FVe=(0,yM.environmentVisitor)({ThisExpression(e,{thisPaths:t}){t.push(e)},JSXIdentifier(e,{thisPaths:t}){e.node.name==="this"&&(!e.parentPath.isJSXMemberExpression({object:e.node})&&!e.parentPath.isJSXOpeningElement({name:e.node})||t.push(e))},CallExpression(e,{superCalls:t}){e.get("callee").isSuper()&&t.push(e)},MemberExpression(e,{superProps:t}){e.get("object").isSuper()&&t.push(e)},Identifier(e,{argumentsPaths:t}){if(!e.isReferencedIdentifier({name:"arguments"}))return;let r=e.scope;do{if(r.hasOwnBinding("arguments")){r.rename("arguments");return}if(r.path.isFunction()&&!r.path.isArrowFunctionExpression())break}while(r=r.parent);t.push(e)},MetaProperty(e,{newTargetPaths:t}){e.get("meta").isIdentifier({name:"new"})&&e.get("property").isIdentifier({name:"target"})&&t.push(e)}});function BVe(e){let t=[],r=[],n=[],a=[],i=[];return e.traverse(FVe,{thisPaths:t,argumentsPaths:r,newTargetPaths:n,superProps:a,superCalls:i}),{thisPaths:t,argumentsPaths:r,newTargetPaths:n,superProps:a,superCalls:i}}function $Ve(){if(!this.isExportDeclaration()||this.isExportAllDeclaration())throw new Error("Only default and named export declarations can be split.");if(this.isExportNamedDeclaration()&&this.get("specifiers").length>0)throw new Error("It doesn't make sense to split exported specifiers.");let e=this.get("declaration");if(this.isExportDefaultDeclaration()){let a=e.isFunctionDeclaration()||e.isClassDeclaration(),i=e.isFunctionExpression()||e.isClassExpression(),s=e.isScope()?e.scope.parent:e.scope,o=e.node.id,l=!1;o?i&&s.hasBinding(o.name)&&(l=!0,o=s.generateUidIdentifier(o.name)):(l=!0,o=s.generateUidIdentifier("default"),(a||i)&&(e.node.id=rh(o)));let c=a?e.node:TVe("var",[wVe(rh(o),e.node)]),u=RG(null,[DG(rh(o),gn("default"))]);return this.insertAfter(u),this.replaceWith(c),l&&s.registerDeclaration(this),this}else if(this.get("specifiers").length>0)throw new Error("It doesn't make sense to split exported specifiers.");let t=e.getOuterBindingIdentifiers(),r=Object.keys(t).map(a=>DG(gn(a),gn(a))),n=RG(null,r);return this.insertAfter(n),this.replaceWith(e.node),this}var jVe={"ReferencedIdentifier|BindingIdentifier"(e,t){e.node.name===t.name&&(t.needsRename=!0,e.stop())},Scope(e,t){e.scope.hasOwnBinding(t.name)&&e.skip()}};function zVe(e){if(this.node.id)return this;let t=SVe(this.node,this.parent);if(t==null)return this;let{name:r}=t;if(!e&&/[\uD800-\uDFFF]/.test(r)||r.startsWith("get ")||r.startsWith("set "))return null;r=yVe(r.replace(/[/ ]/g,"_"));let n=gn(r);CVe(n,t.originalNode);let a={needsRename:!1,name:r},{scope:i}=this,s=i.getOwnBinding(r);if(s?s.kind==="param"&&(a.needsRename=!0):(i.parent.hasBinding(r)||i.hasGlobal(r))&&this.traverse(jVe,a),!a.needsRename)return this.node.id=n,i.getProgramParent().references[n.name]=!0,this;if(i.hasBinding(n.name)&&!i.hasGlobal(n.name))return i.rename(n.name),this.node.id=n,i.getProgramParent().references[n.name]=!0,this;if(!xVe(this.node))return null;let o=i.generateUidIdentifier(n.name),l=[];for(let u=0,d=UVe(this.node);u<d;u++)l.push(i.generateUidIdentifier("x"));let c=tVe.default.expression.ast`
(function (${o}) {
function ${n}(${l}) {
return ${rh(o)}.apply(this, arguments);
}
${rh(n)}.toString = function () {
return ${rh(o)}.toString();
}
return ${rh(n)};
})(${FG(this.node)})
`;return this.replaceWith(c)[0].get("arguments.0")}function UVe(e){let t=e.params.findIndex(r=>bVe(r)||vVe(r));return t===-1?e.params.length:t}});var GG=ae(Sa=>{"use strict";Object.defineProperty(Sa,"__esModule",{value:!0});Sa._guessExecutionStatusRelativeTo=c9e;Sa._resolve=HG;Sa.canHaveVariableDeclarationOrExpression=t9e;Sa.canSwapBetweenExpressionAndStatement=r9e;Sa.getSource=s9e;Sa.isCompletionRecord=n9e;Sa.isConstantExpression=p9e;Sa.isInStrictMode=m9e;Sa.isNodeType=e9e;Sa.isStatementOrBlock=a9e;Sa.isStatic=QVe;Sa.matchesPattern=ZVe;Sa.referencesImport=i9e;Sa.resolve=f9e;Sa.willIMaybeExecuteBefore=o9e;var VVe=xr(),{STATEMENT_OR_BLOCK_KEYS:qVe,VISITOR_KEYS:HVe,isBlockStatement:qG,isExpression:GVe,isIdentifier:KVe,isLiteral:WVe,isStringLiteral:XVe,isType:YVe,matchesPattern:JVe}=VVe;function ZVe(e,t){return JVe(this.node,e,t)}Sa.has=function(t){var r;let n=(r=this.node)==null?void 0:r[t];return n&&Array.isArray(n)?!!n.length:!!n};function QVe(){return this.scope.isStatic(this.node)}Sa.is=Sa.has,Sa.isnt=function(t){return!this.has(t)},Sa.equals=function(t,r){return this.node[t]===r};function e9e(e){return YVe(this.type,e)}function t9e(){return(this.key==="init"||this.key==="left")&&this.parentPath.isFor()}function r9e(e){return this.key!=="body"||!this.parentPath.isArrowFunctionExpression()?!1:this.isExpression()?qG(e):this.isBlockStatement()?GVe(e):!1}function n9e(e){let t=this,r=!0;do{let{type:n,container:a}=t;if(!r&&(t.isFunction()||n==="StaticBlock"))return!!e;if(r=!1,Array.isArray(a)&&t.key!==a.length-1)return!1}while((t=t.parentPath)&&!t.isProgram()&&!t.isDoExpression());return!0}function a9e(){return this.parentPath.isLabeledStatement()||qG(this.container)?!1:qVe.includes(this.key)}function i9e(e,t){if(!this.isReferencedIdentifier()){if(this.isJSXMemberExpression()&&this.node.property.name===t||(this.isMemberExpression()||this.isOptionalMemberExpression())&&(this.node.computed?XVe(this.node.property,{value:t}):this.node.property.name===t)){let i=this.get("object");return i.isReferencedIdentifier()&&i.referencesImport(e,"*")}return!1}let r=this.scope.getBinding(this.node.name);if(!r||r.kind!=="module")return!1;let n=r.path,a=n.parentPath;if(!a.isImportDeclaration())return!1;if(a.node.source.value===e){if(!t)return!0}else return!1;return!!(n.isImportDefaultSpecifier()&&t==="default"||n.isImportNamespaceSpecifier()&&t==="*"||n.isImportSpecifier()&&KVe(n.node.imported,{name:t}))}function s9e(){let e=this.node;if(e.end){let t=this.hub.getCode();if(t)return t.slice(e.start,e.end)}return""}function o9e(e){return this._guessExecutionStatusRelativeTo(e)!=="after"}function zG(e){return e.isProgram()?e:(e.parentPath.scope.getFunctionParent()||e.parentPath.scope.getProgramParent()).path}function l9e(e,t){switch(e){case"LogicalExpression":return t==="right";case"ConditionalExpression":case"IfStatement":return t==="consequent"||t==="alternate";case"WhileStatement":case"DoWhileStatement":case"ForInStatement":case"ForOfStatement":return t==="body";case"ForStatement":return t==="body"||t==="update";case"SwitchStatement":return t==="cases";case"TryStatement":return t==="handler";case"AssignmentPattern":return t==="right";case"OptionalMemberExpression":return t==="property";case"OptionalCallExpression":return t==="arguments";default:return!1}}function UG(e,t){for(let r=0;r<t;r++){let n=e[r];if(l9e(n.parent.type,n.parentKey))return!0}return!1}var VG=Symbol();function c9e(e){return bM(this,e,new Map)}function bM(e,t,r){let n={this:zG(e),target:zG(t)};if(n.target.node!==n.this.node)return d9e(e,n.target,r);let a={target:t.getAncestry(),this:e.getAncestry()};if(a.target.includes(e))return"after";if(a.this.includes(t))return"before";let i,s={target:0,this:0};for(;!i&&s.this<a.this.length;){let u=a.this[s.this];s.target=a.target.indexOf(u),s.target>=0?i=u:s.this++}if(!i)throw new Error("Internal Babel error - The two compared nodes don't appear to belong to the same program.");if(UG(a.this,s.this-1)||UG(a.target,s.target-1))return"unknown";let o={this:a.this[s.this-1],target:a.target[s.target-1]};if(o.target.listKey&&o.this.listKey&&o.target.container===o.this.container)return o.target.key>o.this.key?"before":"after";let l=HVe[i.type],c={this:l.indexOf(o.this.parentKey),target:l.indexOf(o.target.parentKey)};return c.target>c.this?"before":"after"}function u9e(e,t,r){if(t.isFunctionDeclaration()){if(t.parentPath.isExportDeclaration())return"unknown"}else return bM(e,t,r)==="before"?"before":"unknown";let n=t.scope.getBinding(t.node.id.name);if(!n.references)return"before";let a=n.referencePaths,i;for(let s of a){if(!!s.find(c=>c.node===t.node))continue;if(s.key!=="callee"||!s.parentPath.isCallExpression())return"unknown";let l=bM(e,s,r);if(i&&i!==l)return"unknown";i=l}return i}function d9e(e,t,r){let n=r.get(e.node),a;if(!n)r.set(e.node,n=new Map);else if(a=n.get(t.node))return a===VG?"unknown":a;n.set(t.node,VG);let i=u9e(e,t,r);return n.set(t.node,i),i}function f9e(e,t){return HG.call(this,e,t)||this}function HG(e,t){var r;if(!((r=t)!=null&&r.includes(this)))if(t=t||[],t.push(this),this.isVariableDeclarator()){if(this.get("id").isIdentifier())return this.get("init").resolve(e,t)}else if(this.isReferencedIdentifier()){let n=this.scope.getBinding(this.node.name);if(!n||!n.constant||n.kind==="module")return;if(n.path!==this){let a=n.path.resolve(e,t);return this.find(i=>i.node===a.node)?void 0:a}}else{if(this.isTypeCastExpression())return this.get("expression").resolve(e,t);if(e&&this.isMemberExpression()){let n=this.toComputedKey();if(!WVe(n))return;let a=n.value,i=this.get("object").resolve(e,t);if(i.isObjectExpression()){let s=i.get("properties");for(let o of s){if(!o.isProperty())continue;let l=o.get("key"),c=o.isnt("computed")&&l.isIdentifier({name:a});if(c=c||l.isLiteral({value:a}),c)return o.get("value").resolve(e,t)}}else if(i.isArrayExpression()&&!isNaN(+a)){let o=i.get("elements")[a];if(o)return o.resolve(e,t)}}}}function p9e(){if(this.isIdentifier()){let e=this.scope.getBinding(this.node.name);return e?e.constant:!1}if(this.isLiteral())return this.isRegExpLiteral()?!1:this.isTemplateLiteral()?this.get("expressions").every(e=>e.isConstantExpression()):!0;if(this.isUnaryExpression())return this.node.operator!=="void"?!1:this.get("argument").isConstantExpression();if(this.isBinaryExpression()){let{operator:e}=this.node;return e!=="in"&&e!=="instanceof"&&this.get("left").isConstantExpression()&&this.get("right").isConstantExpression()}return this.isMemberExpression()?!this.node.computed&&this.get("object").isIdentifier({name:"Symbol"})&&!this.scope.hasBinding("Symbol",{noGlobals:!0}):this.isCallExpression()?this.node.arguments.length===1&&this.get("callee").matchesPattern("Symbol.for")&&!this.scope.hasBinding("Symbol",{noGlobals:!0})&&this.get("arguments")[0].isStringLiteral():!1}function m9e(){return!!(this.isProgram()?this:this.parentPath).find(r=>{if(r.isProgram({sourceType:"module"})||r.isClass())return!0;if(r.isArrowFunctionExpression()&&!r.get("body").isBlockStatement())return!1;let n;if(r.isFunction())n=r.node.body;else if(r.isProgram())n=r.node;else return!1;for(let a of n.directives)if(a.value.value==="use strict")return!0;return!1})}});var JG=ae(Xi=>{"use strict";Object.defineProperty(Xi,"__esModule",{value:!0});Xi._getKey=XG;Xi._getPattern=YG;Xi.get=_9e;Xi.getAllNextSiblings=N9e;Xi.getAllPrevSiblings=k9e;Xi.getAssignmentIdentifiers=L9e;Xi.getBindingIdentifierPaths=M9e;Xi.getBindingIdentifiers=R9e;Xi.getCompletionRecords=P9e;Xi.getNextSibling=A9e;Xi.getOpposite=T9e;Xi.getOuterBindingIdentifierPaths=O9e;Xi.getOuterBindingIdentifiers=D9e;Xi.getPrevSibling=I9e;Xi.getSibling=E9e;var SM=td(),h9e=xr(),{getAssignmentIdentifiers:g9e,getBindingIdentifiers:WG,getOuterBindingIdentifiers:y9e,numericLiteral:x9e,unaryExpression:b9e}=h9e,TM=0,eS=1;function v9e(e){return{type:TM,path:e}}function S9e(e){return{type:eS,path:e}}function T9e(){return this.key==="left"?this.getSibling("right"):this.key==="right"?this.getSibling("left"):null}function Fy(e,t,r){return e&&t.push(...By(e,r)),t}function w9e(e,t,r){let n=[];for(let a=0;a<e.length;a++){let i=e[a],s=By(i,r),o=[],l=[];for(let c of s)c.type===TM&&o.push(c),c.type===eS&&l.push(c);o.length&&(n=o),t.push(...l)}return t.push(...n),t}function C9e(e){e.forEach(t=>{t.type=eS})}function vM(e,t){e.forEach(r=>{r.path.isBreakStatement({label:null})&&(t?r.path.replaceWith(b9e("void",x9e(0))):r.path.remove())})}function KG(e,t){let r=[];if(t.canHaveBreak){let n=[];for(let a=0;a<e.length;a++){let i=e[a],s=Object.assign({},t,{inCaseClause:!1});i.isBlockStatement()&&(t.inCaseClause||t.shouldPopulateBreak)?s.shouldPopulateBreak=!0:s.shouldPopulateBreak=!1;let o=By(i,s);if(o.length>0&&o.every(l=>l.type===eS)){n.length>0&&o.every(l=>l.path.isBreakStatement({label:null}))?(C9e(n),r.push(...n),n.some(l=>l.path.isDeclaration())&&(r.push(...o),t.shouldPreserveBreak||vM(o,!0)),t.shouldPreserveBreak||vM(o,!1)):(r.push(...o),!t.shouldPopulateBreak&&!t.shouldPreserveBreak&&vM(o,!0));break}if(a===e.length-1)r.push(...o);else{n=[];for(let l=0;l<o.length;l++){let c=o[l];c.type===eS&&r.push(c),c.type===TM&&n.push(c)}}}}else if(e.length)for(let n=e.length-1;n>=0;n--){let a=By(e[n],t);if(a.length>1||a.length===1&&!a[0].path.isVariableDeclaration()&&!a[0].path.isEmptyStatement()){r.push(...a);break}}return r}function By(e,t){let r=[];if(e.isIfStatement())r=Fy(e.get("consequent"),r,t),r=Fy(e.get("alternate"),r,t);else{if(e.isDoExpression()||e.isFor()||e.isWhile()||e.isLabeledStatement())return Fy(e.get("body"),r,t);if(e.isProgram()||e.isBlockStatement())return KG(e.get("body"),t);if(e.isFunction())return By(e.get("body"),t);if(e.isTryStatement())r=Fy(e.get("block"),r,t),r=Fy(e.get("handler"),r,t);else{if(e.isCatchClause())return Fy(e.get("body"),r,t);if(e.isSwitchStatement())return w9e(e.get("cases"),r,t);if(e.isSwitchCase())return KG(e.get("consequent"),{canHaveBreak:!0,shouldPopulateBreak:!1,inCaseClause:!0,shouldPreserveBreak:t.shouldPreserveBreak});e.isBreakStatement()?r.push(S9e(e)):r.push(v9e(e))}}return r}function P9e(e=!1){return By(this,{canHaveBreak:!1,shouldPopulateBreak:!1,inCaseClause:!1,shouldPreserveBreak:e}).map(r=>r.path)}function E9e(e){return SM.default.get({parentPath:this.parentPath,parent:this.parent,container:this.container,listKey:this.listKey,key:e}).setContext(this.context)}function I9e(){return this.getSibling(this.key-1)}function A9e(){return this.getSibling(this.key+1)}function N9e(){let e=this.key,t=this.getSibling(++e),r=[];for(;t.node;)r.push(t),t=this.getSibling(++e);return r}function k9e(){let e=this.key,t=this.getSibling(--e),r=[];for(;t.node;)r.push(t),t=this.getSibling(--e);return r}function _9e(e,t=!0){t===!0&&(t=this.context);let r=e.split(".");return r.length===1?XG.call(this,e,t):YG.call(this,r,t)}function XG(e,t){let r=this.node,n=r[e];return Array.isArray(n)?n.map((a,i)=>SM.default.get({listKey:e,parentPath:this,parent:r,container:n,key:i}).setContext(t)):SM.default.get({parentPath:this,parent:r,container:r,key:e}).setContext(t)}function YG(e,t){let r=this;for(let n of e)n==="."?r=r.parentPath:Array.isArray(r)?r=r[n]:r=r.get(n,t);return r}function L9e(){return g9e(this.node)}function R9e(e){return WG(this.node,e)}function D9e(e){return y9e(this.node,e)}function M9e(e=!1,t=!1){let n=[this],a=Object.create(null);for(;n.length;){let i=n.shift();if(!i||!i.node)continue;let s=WG.keys[i.node.type];if(i.isIdentifier()){e?(a[i.node.name]=a[i.node.name]||[]).push(i):a[i.node.name]=i;continue}if(i.isExportDeclaration()){let o=i.get("declaration");o.isDeclaration()&&n.push(o);continue}if(t){if(i.isFunctionDeclaration()){n.push(i.get("id"));continue}if(i.isFunctionExpression())continue}if(s)for(let o=0;o<s.length;o++){let l=s[o],c=i.get(l);Array.isArray(c)?n.push(...c):c.node&&n.push(c)}}return a}function O9e(e=!1){return this.getBindingIdentifierPaths(e,!0)}});var QG=ae(tS=>{"use strict";Object.defineProperty(tS,"__esModule",{value:!0});tS.addComment=z9e;tS.addComments=U9e;tS.shareCommentsWithSiblings=j9e;var F9e=xr(),{addComment:B9e,addComments:$9e}=F9e;function j9e(){if(typeof this.key=="string")return;let e=this.node;if(!e)return;let t=e.trailingComments,r=e.leadingComments;if(!t&&!r)return;let n=this.getSibling(this.key-1),a=this.getSibling(this.key+1),i=Boolean(n.node),s=Boolean(a.node);i&&(r&&n.addComments("trailing",ZG(r,n.node.trailingComments)),t&&!s&&n.addComments("trailing",t)),s&&(t&&a.addComments("leading",ZG(t,a.node.leadingComments)),r&&!i&&a.addComments("leading",r))}function ZG(e,t){if(!(t!=null&&t.length))return e;let r=new Set(t);return e.filter(n=>!r.has(n))}function z9e(e,t,r){B9e(this.node,e,t,r)}function U9e(e,t){$9e(this.node,e,t)}});var td=ae(nu=>{"use strict";Object.defineProperty(nu,"__esModule",{value:!0});nu.default=nu.SHOULD_STOP=nu.SHOULD_SKIP=nu.REMOVED=void 0;var V9e=BL(),q9e=PV(),H9e=ky(),G9e=e2(),rK=xr(),NP=rK,K9e=Wm(),W9e=D2(),tu=h7(),$y=M7(),jy=G2(),eK=bG(),nh=jG(),Ma=GG(),nK=Sl(),Ta=nK,zy=vP(),ru=SP(),ks=JG(),wM=QG(),X9e=GD(),{validate:Y9e}=rK,tK=q9e("babel"),oTt=nu.REMOVED=1<<0,lTt=nu.SHOULD_STOP=1<<1,cTt=nu.SHOULD_SKIP=1<<2,nd=nu.default=class aK{constructor(t,r){this.contexts=[],this.state=null,this._traverseFlags=0,this.skipKeys=null,this.parentPath=null,this.container=null,this.listKey=null,this.key=null,this.node=null,this.type=null,this._store=null,this.parent=r,this.hub=t,this.data=null,this.context=null,this.scope=null}get removed(){return(this._traverseFlags&1)>0}set removed(t){t?this._traverseFlags|=1:this._traverseFlags&=-2}get shouldStop(){return(this._traverseFlags&2)>0}set shouldStop(t){t?this._traverseFlags|=2:this._traverseFlags&=-3}get shouldSkip(){return(this._traverseFlags&4)>0}set shouldSkip(t){t?this._traverseFlags|=4:this._traverseFlags&=-5}static get({hub:t,parentPath:r,parent:n,container:a,listKey:i,key:s}){if(!t&&r&&(t=r.hub),!n)throw new Error("To get a node path the parent needs to exist");let o=a[s],l=K9e.getOrCreateCachedPaths(n,r),c=l.get(o);return c||(c=new aK(t,n),o&&l.set(o,c)),nK.setup.call(c,r,a,i,s),c}getScope(t){return this.isScope()?new G9e.default(this):t}setData(t,r){return this.data==null&&(this.data=Object.create(null)),this.data[t]=r}getData(t,r){this.data==null&&(this.data=Object.create(null));let n=this.data[t];return n===void 0&&r!==void 0&&(n=this.data[t]=r),n}hasNode(){return this.node!=null}buildCodeFrameError(t,r=SyntaxError){return this.hub.buildError(this.node,t,r)}traverse(t,r){(0,H9e.default)(this.node,t,this.scope,r,this)}set(t,r){Y9e(this.node,t,r),this.node[t]=r}getPathLocation(){let t=[],r=this;do{let n=r.key;r.inList&&(n=`${r.listKey}[${n}]`),t.unshift(n)}while(r=r.parentPath);return t.join(".")}debug(t){tK.enabled&&tK(`${this.getPathLocation()} ${this.type}: ${t}`)}toString(){return(0,W9e.default)(this.node).code}get inList(){return!!this.listKey}set inList(t){t||(this.listKey=null)}get parentKey(){return this.listKey||this.key}},J9e={findParent:tu.findParent,find:tu.find,getFunctionParent:tu.getFunctionParent,getStatementParent:tu.getStatementParent,getEarliestCommonAncestorFrom:tu.getEarliestCommonAncestorFrom,getDeepestCommonAncestorFrom:tu.getDeepestCommonAncestorFrom,getAncestry:tu.getAncestry,isAncestor:tu.isAncestor,isDescendant:tu.isDescendant,inType:tu.inType,getTypeAnnotation:$y.getTypeAnnotation,isBaseType:$y.isBaseType,couldBeBaseType:$y.couldBeBaseType,baseTypeStrictlyMatches:$y.baseTypeStrictlyMatches,isGenericType:$y.isGenericType,replaceWithMultiple:jy.replaceWithMultiple,replaceWithSourceString:jy.replaceWithSourceString,replaceWith:jy.replaceWith,replaceExpressionWithStatements:jy.replaceExpressionWithStatements,replaceInline:jy.replaceInline,evaluateTruthy:eK.evaluateTruthy,evaluate:eK.evaluate,toComputedKey:nh.toComputedKey,ensureBlock:nh.ensureBlock,unwrapFunctionEnvironment:nh.unwrapFunctionEnvironment,arrowFunctionToExpression:nh.arrowFunctionToExpression,splitExportDeclaration:nh.splitExportDeclaration,ensureFunctionName:nh.ensureFunctionName,matchesPattern:Ma.matchesPattern,isStatic:Ma.isStatic,isNodeType:Ma.isNodeType,canHaveVariableDeclarationOrExpression:Ma.canHaveVariableDeclarationOrExpression,canSwapBetweenExpressionAndStatement:Ma.canSwapBetweenExpressionAndStatement,isCompletionRecord:Ma.isCompletionRecord,isStatementOrBlock:Ma.isStatementOrBlock,referencesImport:Ma.referencesImport,getSource:Ma.getSource,willIMaybeExecuteBefore:Ma.willIMaybeExecuteBefore,_guessExecutionStatusRelativeTo:Ma._guessExecutionStatusRelativeTo,resolve:Ma.resolve,isConstantExpression:Ma.isConstantExpression,isInStrictMode:Ma.isInStrictMode,isDenylisted:Ta.isDenylisted,visit:Ta.visit,skip:Ta.skip,skipKey:Ta.skipKey,stop:Ta.stop,setContext:Ta.setContext,requeue:Ta.requeue,requeueComputedKeyAndDecorators:Ta.requeueComputedKeyAndDecorators,remove:zy.remove,insertBefore:ru.insertBefore,insertAfter:ru.insertAfter,unshiftContainer:ru.unshiftContainer,pushContainer:ru.pushContainer,getOpposite:ks.getOpposite,getCompletionRecords:ks.getCompletionRecords,getSibling:ks.getSibling,getPrevSibling:ks.getPrevSibling,getNextSibling:ks.getNextSibling,getAllNextSiblings:ks.getAllNextSiblings,getAllPrevSiblings:ks.getAllPrevSiblings,get:ks.get,getAssignmentIdentifiers:ks.getAssignmentIdentifiers,getBindingIdentifiers:ks.getBindingIdentifiers,getOuterBindingIdentifiers:ks.getOuterBindingIdentifiers,getBindingIdentifierPaths:ks.getBindingIdentifierPaths,getOuterBindingIdentifierPaths:ks.getOuterBindingIdentifierPaths,shareCommentsWithSiblings:wM.shareCommentsWithSiblings,addComment:wM.addComment,addComments:wM.addComments};Object.assign(nd.prototype,J9e);nd.prototype.arrowFunctionToShadowed=nh[String("arrowFunctionToShadowed")],Object.assign(nd.prototype,{has:Ma[String("has")],is:Ma[String("is")],isnt:Ma[String("isnt")],equals:Ma[String("equals")],hoist:ru[String("hoist")],updateSiblingKeys:ru.updateSiblingKeys,call:Ta.call,isBlacklisted:Ta[String("isBlacklisted")],setScope:Ta.setScope,resync:Ta.resync,popContext:Ta.popContext,pushContext:Ta.pushContext,setup:Ta.setup,setKey:Ta.setKey});nd.prototype._guessExecutionStatusRelativeToDifferentFunctions=Ma._guessExecutionStatusRelativeTo,nd.prototype._guessExecutionStatusRelativeToDifferentFunctions=Ma._guessExecutionStatusRelativeTo,Object.assign(nd.prototype,{_getTypeAnnotation:$y._getTypeAnnotation,_replaceWith:jy._replaceWith,_resolve:Ma._resolve,_call:Ta._call,_resyncParent:Ta._resyncParent,_resyncKey:Ta._resyncKey,_resyncList:Ta._resyncList,_resyncRemoved:Ta._resyncRemoved,_getQueueContexts:Ta._getQueueContexts,_removeFromScope:zy._removeFromScope,_callRemovalHooks:zy._callRemovalHooks,_remove:zy._remove,_markRemoved:zy._markRemoved,_assertUnremoved:zy._assertUnremoved,_containerInsert:ru._containerInsert,_containerInsertBefore:ru._containerInsertBefore,_containerInsertAfter:ru._containerInsertAfter,_verifyNodeList:ru._verifyNodeList,_getKey:ks._getKey,_getPattern:ks._getPattern});for(let e of NP.TYPES){let t=`is${e}`,r=NP[t];nd.prototype[t]=function(n){return r(this.node,n)},nd.prototype[`assert${e}`]=function(n){if(!r(this.node,n))throw new TypeError(`Expected node path of type ${e}`)}}Object.assign(nd.prototype,X9e);for(let e of Object.keys(V9e))e[0]!=="_"&&(NP.TYPES.includes(e)||NP.TYPES.push(e))});var iK=ae(kP=>{"use strict";Object.defineProperty(kP,"__esModule",{value:!0});kP.default=void 0;var Z9e=td(),Q9e=xr(),CM=Sl(),{VISITOR_KEYS:eqe}=Q9e,PM=class{constructor(t,r,n,a){this.queue=null,this.priorityQueue=null,this.parentPath=a,this.scope=t,this.state=n,this.opts=r}shouldVisit(t){let r=this.opts;if(r.enter||r.exit||r[t.type])return!0;let n=eqe[t.type];if(!(n!=null&&n.length))return!1;for(let a of n)if(t[a])return!0;return!1}create(t,r,n,a){return Z9e.default.get({parentPath:this.parentPath,parent:t,container:r,key:n,listKey:a})}maybeQueue(t,r){this.queue&&(r?this.queue.push(t):this.priorityQueue.push(t))}visitMultiple(t,r,n){if(t.length===0)return!1;let a=[];for(let i=0;i<t.length;i++){let s=t[i];s&&this.shouldVisit(s)&&a.push(this.create(r,t,i,n))}return this.visitQueue(a)}visitSingle(t,r){return this.shouldVisit(t[r])?this.visitQueue([this.create(t,t,r)]):!1}visitQueue(t){this.queue=t,this.priorityQueue=[];let r=new WeakSet,n=!1,a=0;for(;a<t.length;){let i=t[a];if(a++,CM.resync.call(i),(i.contexts.length===0||i.contexts[i.contexts.length-1]!==this)&&CM.pushContext.call(i,this),i.key===null)continue;let{node:s}=i;if(!r.has(s)){if(s&&r.add(s),i.visit()){n=!0;break}if(this.priorityQueue.length&&(n=this.visitQueue(this.priorityQueue),this.priorityQueue=[],this.queue=t,n))break}}for(let i=0;i<a;i++)CM.popContext.call(t[i]);return this.queue=null,n}visit(t,r){let n=t[r];return n?Array.isArray(n)?this.visitMultiple(n,t,r):this.visitSingle(t,r):!1}};kP.default=PM});var X1=ae(EM=>{"use strict";Object.defineProperty(EM,"__esModule",{value:!0});EM.traverseNode=aqe;var tqe=iK(),fTt=td(),rqe=xr(),pTt=Sl(),{VISITOR_KEYS:nqe}=rqe;function aqe(e,t,r,n,a,i,s){let o=nqe[e.type];if(!o)return!1;let l=new tqe.default(r,t,n,a);if(s)return i!=null&&i[a.parentKey]?!1:l.visitQueue([a]);for(let c of o)if(!(i!=null&&i[c])&&l.visit(e,c))return!0;return!1}});var Sl=ae(ta=>{"use strict";Object.defineProperty(ta,"__esModule",{value:!0});ta._call=AM;ta._getQueueContexts=vqe;ta._resyncKey=dK;ta._resyncList=fK;ta._resyncParent=uK;ta._resyncRemoved=mqe;ta.call=IM;ta.isDenylisted=lK;ta.popContext=hqe;ta.pushContext=gqe;ta.requeue=xqe;ta.requeueComputedKeyAndDecorators=bqe;ta.resync=pqe;ta.setContext=fqe;ta.setKey=_P;ta.setScope=cK;ta.setup=yqe;ta.skip=cqe;ta.skipKey=uqe;ta.stop=dqe;ta.visit=lqe;var iqe=X1(),sK=td(),sqe=vP(),oqe=xr();function IM(e){let t=this.opts;if(this.debug(e),this.node&&AM.call(this,t[e]))return!0;if(this.node){var r;return AM.call(this,(r=t[this.node.type])==null?void 0:r[e])}return!1}function AM(e){if(!e)return!1;for(let t of e){if(!t)continue;let r=this.node;if(!r)return!0;let n=t.call(this.state,this,this.state);if(n&&typeof n=="object"&&typeof n.then=="function")throw new Error("You appear to be using a plugin with an async traversal visitor, which your current version of Babel does not support. If you're using a published plugin, you may need to upgrade your @babel/core version.");if(n)throw new Error(`Unexpected return value from visitor method ${t}`);if(this.node!==r||this._traverseFlags>0)return!0}return!1}function lK(){var e;let t=(e=this.opts.denylist)!=null?e:this.opts.blacklist;return t?.includes(this.node.type)}ta.isBlacklisted=lK;function oK(e,t){e.context!==t&&(e.context=t,e.state=t.state,e.opts=t.opts)}function lqe(){var e,t;if(!this.node||this.isDenylisted()||(e=(t=this.opts).shouldSkip)!=null&&e.call(t,this))return!1;let r=this.context;return this.shouldSkip||IM.call(this,"enter")?(this.debug("Skip..."),this.shouldStop):(oK(this,r),this.debug("Recursing into..."),this.shouldStop=(0,iqe.traverseNode)(this.node,this.opts,this.scope,this.state,this,this.skipKeys),oK(this,r),IM.call(this,"exit"),this.shouldStop)}function cqe(){this.shouldSkip=!0}function uqe(e){this.skipKeys==null&&(this.skipKeys={}),this.skipKeys[e]=!0}function dqe(){this._traverseFlags|=sK.SHOULD_SKIP|sK.SHOULD_STOP}function cK(){var e,t;if((e=this.opts)!=null&&e.noScope)return;let r=this.parentPath;((this.key==="key"||this.listKey==="decorators")&&r.isMethod()||this.key==="discriminant"&&r.isSwitchStatement())&&(r=r.parentPath);let n;for(;r&&!n;){var a;if((a=r.opts)!=null&&a.noScope)return;n=r.scope,r=r.parentPath}this.scope=this.getScope(n),(t=this.scope)==null||t.init()}function fqe(e){return this.skipKeys!=null&&(this.skipKeys={}),this._traverseFlags=0,e&&(this.context=e,this.state=e.state,this.opts=e.opts),cK.call(this),this}function pqe(){this.removed||(uK.call(this),fK.call(this),dK.call(this))}function uK(){this.parentPath&&(this.parent=this.parentPath.node)}function dK(){if(this.container&&this.node!==this.container[this.key]){if(Array.isArray(this.container)){for(let e=0;e<this.container.length;e++)if(this.container[e]===this.node){_P.call(this,e);return}}else for(let e of Object.keys(this.container))if(this.container[e]===this.node){_P.call(this,e);return}this.key=null}}function fK(){if(!this.parent||!this.inList)return;let e=this.parent[this.listKey];this.container!==e&&(this.container=e||null)}function mqe(){(this.key==null||!this.container||this.container[this.key]!==this.node)&&sqe._markRemoved.call(this)}function hqe(){this.contexts.pop(),this.contexts.length>0?this.setContext(this.contexts[this.contexts.length-1]):this.setContext(void 0)}function gqe(e){this.contexts.push(e),this.setContext(e)}function yqe(e,t,r,n){this.listKey=r,this.container=t,this.parentPath=e||this.parentPath,_P.call(this,n)}function _P(e){var t;this.key=e,this.node=this.container[this.key],this.type=(t=this.node)==null?void 0:t.type}function xqe(e=this){if(e.removed)return;let t=this.contexts;for(let r of t)r.maybeQueue(e)}function bqe(){let{context:e,node:t}=this;if(!oqe.isPrivate(t)&&t.computed&&e.maybeQueue(this.get("key")),t.decorators)for(let r of this.get("decorators"))e.maybeQueue(r)}function vqe(){let e=this,t=this.contexts;for(;!t.length&&(e=e.parentPath,!!e);)t=e.contexts;return t}});var pK=ae(LP=>{"use strict";Object.defineProperty(LP,"__esModule",{value:!0});LP.default=void 0;var NM=class{getCode(){}getScope(){}addHelper(){throw new Error("Helpers are not supported by the default hub.")}buildError(t,r,n=TypeError){return new n(r)}};LP.default=NM});var ky=ae(ad=>{"use strict";Object.defineProperty(ad,"__esModule",{value:!0});Object.defineProperty(ad,"Hub",{enumerable:!0,get:function(){return Pqe.default}});Object.defineProperty(ad,"NodePath",{enumerable:!0,get:function(){return wqe.default}});Object.defineProperty(ad,"Scope",{enumerable:!0,get:function(){return Cqe.default}});ad.visitors=ad.default=void 0;Sl();var nS=B0();ad.visitors=nS;var Sqe=xr(),Tqe=Wm(),mK=X1(),wqe=td(),Cqe=e2(),Pqe=pK(),{VISITOR_KEYS:Eqe,removeProperties:Iqe,traverseFast:rS}=Sqe;function yc(e,t={},r,n,a,i){if(e){if(!t.noScope&&!r&&e.type!=="Program"&&e.type!=="File")throw new Error(`You must pass a scope and parentPath unless traversing a Program/File. Instead of that you tried to traverse a ${e.type} node without passing scope and parentPath.`);if(!a&&i)throw new Error("visitSelf can only be used when providing a NodePath.");Eqe[e.type]&&(nS.explode(t),(0,mK.traverseNode)(e,t,r,n,a,void 0,i))}}var yTt=ad.default=yc;yc.visitors=nS;yc.verify=nS.verify;yc.explode=nS.explode;yc.cheap=function(e,t){rS(e,t)};yc.node=function(e,t,r,n,a,i){(0,mK.traverseNode)(e,t,r,n,a,i)};yc.clearNode=function(e,t){Iqe(e,t)};yc.removeProperties=function(e,t){return rS(e,yc.clearNode,t),e};yc.hasType=function(e,t,r){return r!=null&&r.includes(e.type)?!1:e.type===t?!0:rS(e,function(n){if(r!=null&&r.includes(n.type))return rS.skip;if(n.type===t)return rS.stop})};yc.cache=Tqe});var hK,Uy,kM,_M,Yr,_s,LM=de(()=>{hK=A(require("fs")),Uy=A(v1()),kM=A(ky()),_M=A(D2()),Yr=A(xr());i1();_s=class{constructor(t){this.settings=t,this.initPatterns()}initPatterns(){this.config={assignments:this.settings?.astAssignments||Pf.assignments,functions:this.settings?.astFunctions||Pf.functions,keys:this.settings?.astKeys||Pf.keys},this.contentRules={REJECT_PATTERNS:(this.settings?.astRejectRe||[]).length>0?this.settings.astRejectRe.map(t=>new RegExp(t)):rL.REJECT_PATTERNS,VALID_PATTERNS:(this.settings?.astValidRe||[]).length>0?this.settings.astValidRe.map(t=>new RegExp(t)):rL.VALID_PATTERNS}}loadFile(t,r=!1){try{return this.parseAst(hK.default.readFileSync(t,"utf8"),r)}catch{return null}}loadCode(t,r=!1){return this.parseAst(t,r)}extract(t){let r=[];return this.traverseWhitelist(t,(n,a,i)=>{let s=this.extractSource(i);s&&this.isValidText(s)&&r.push({type:n,name:a,source:s,target:s})}),this.deduplicateResults(r)}translate(t,r){let n=new Map,a=new Map;return r.forEach(i=>{i.type&&i.name&&n.set(this.getFingerprint(i),i.target),a.set(i.source,i.target)}),this.traverseAllStrings(t,(i,s,o)=>{let l=this.extractSource(o);if(!l)return;let c=n.get(this.getFingerprint({type:i,name:s,source:l}));c||(c=a.get(l)),c&&c!==l&&this.replaceSource(o,c)}),(0,_M.generate)(t,{minified:!0,comments:!1,jsescOption:{minimal:!0}}).code}traceUsage(t,r){let n=new Set,a=new Map,i=new Map;return r.forEach(s=>{s.type&&s.name&&a.set(this.getFingerprint(s),s.target),i.set(s.source,s.target)}),this.traverseAllStrings(t,(s,o,l)=>{let c=this.extractSource(l);if(!c)return;let u=this.getFingerprint({type:s,name:o,source:c});a.has(u)?n.add(u):i.has(c)&&n.add(c)}),n}validateSecurity(t){let r=[];if(!t)return r;let n=[{regex:/\beval\s*\(/i,name:"eval()"},{regex:/\bFunction\s*\(/i,name:"new Function()"},{regex:/\bsetTimeout\s*\(\s*['"`]/i,name:"setTimeout(string)"},{regex:/\bsetInterval\s*\(\s*['"`]/i,name:"setInterval(string)"},{regex:/<script/i,name:"<script>"},{regex:/\bjavascript:/i,name:"javascript:"}];for(let i of n)i.regex.test(t)&&r.push({severity:"critical",message:`\u53D1\u73B0\u5371\u9669\u7684\u6267\u884C\u6307\u4EE4: ${i.name}`});let a=[{regex:/\bfetch\s*\(/i,name:"fetch()"},{regex:/\bXMLHttpRequest\b/i,name:"XMLHttpRequest"},{regex:/\bWebSocket\b/i,name:"WebSocket"},{regex:/\brequire\s*\(/i,name:"require()"},{regex:/\bprocess\./i,name:"Node.js process"},{regex:/\belectron\./i,name:"Electron API"},{regex:/\blocalStorage\b/i,name:"localStorage"},{regex:/\bdocument\.cookie\b/i,name:"document.cookie"}];for(let i of a)i.regex.test(t)&&r.push({severity:"warning",message:`\u53D1\u73B0\u53EF\u7591\u7684\u4EE3\u7801\u6A21\u5F0F: ${i.name}`});if(t.includes("${"))try{let i=t.replace(/`/g,"\\`"),s=(0,Uy.parseExpression)("`"+i+"`");if(Yr.isTemplateLiteral(s))for(let o of s.expressions)!Yr.isIdentifier(o)&&!Yr.isMemberExpression(o)&&r.push({severity:"warning",message:`\u6A21\u677F\u5B57\u7B26\u4E32\u5305\u542B\u590D\u6742\u7684\u6267\u884C\u903B\u8F91: ${(0,_M.generate)(o).code}`})}catch{}return r}validateTargetSyntax(t){try{if(!t.includes("${")&&!t.includes("`"))return!0;let r=t.replace(/`/g,"\\`");return(0,Uy.parseExpression)("`"+r+"`",{plugins:["typescript","jsx","classProperties","objectRestSpread","optionalChaining","nullishCoalescingOperator","decorators-legacy"]}),!0}catch{return!1}}cloneAst(t){return Yr.cloneNode(t,!0)}isValidText(t){return t.length<2||this.contentRules.REJECT_PATTERNS.some(r=>r.test(t))?!1:!!(this.contentRules.VALID_PATTERNS.some(r=>r.test(t))||/^[A-Za-z]{2,}$/.test(t))}traverseWhitelist(t,r){(0,kM.default)(t,{VariableDeclarator:n=>{let a=n.node,i=Yr.isIdentifier(a.id)?a.id.name:null;i&&this.config.assignments.includes(i)&&this.isStrNode(a.init)&&r("VariableDeclarator",i,a.init)},AssignmentExpression:n=>{let a=n.node,i=this.getAssignName(a.left);i&&this.config.assignments.includes(i)&&this.isStrNode(a.right)&&r("AssignmentExpression",i,a.right)},ObjectProperty:n=>{let a=n.node,i=this.getObjKeyName(a.key);i&&this.config.keys.includes(i)&&this.isStrNode(a.value)&&r("ObjectProperty",i,a.value)},CallExpression:n=>{let a=n.node,i=this.getCallName(a.callee);i&&this.config.functions.includes(i)&&a.arguments.forEach(s=>{this.isStrNode(s)?r("CallExpression",i,s):Yr.isObjectExpression(s)&&s.properties.forEach(o=>{if(Yr.isObjectProperty(o)){let l=this.getObjKeyName(o.key)||"prop";this.isStrNode(o.value)&&r("ObjectProperty",l,o.value)}})})},NewExpression:n=>{let a=n.node,i=this.getCallName(a.callee);i&&this.config.functions.includes(i)&&a.arguments.forEach(s=>{this.isStrNode(s)?r("NewExpression",i,s):Yr.isObjectExpression(s)&&s.properties.forEach(o=>{if(Yr.isObjectProperty(o)){let l=this.getObjKeyName(o.key)||"prop";this.isStrNode(o.value)&&r("ObjectProperty",l,o.value)}})})}})}traverseAllStrings(t,r){(0,kM.default)(t,{VariableDeclarator:n=>{let a=n.node,i=Yr.isIdentifier(a.id)?a.id.name:"var";this.isStrNode(a.init)&&r("VariableDeclarator",i,a.init)},AssignmentExpression:n=>{let a=n.node,i=this.getAssignName(a.left)||"assign";this.isStrNode(a.right)&&r("AssignmentExpression",i,a.right)},ObjectProperty:n=>{let a=n.node,i=this.getObjKeyName(a.key)||"prop";this.isStrNode(a.value)&&r("ObjectProperty",i,a.value)},CallExpression:n=>{let a=n.node,i=this.getCallName(a.callee)||"func";a.arguments.forEach(s=>{this.isStrNode(s)&&r("CallExpression",i,s)})},NewExpression:n=>{let a=n.node,i=this.getCallName(a.callee)||"new";a.arguments.forEach(s=>{this.isStrNode(s)&&r("NewExpression",i,s)})}})}parseAst(t,r){try{return(0,Uy.parse)(t,{sourceType:r?"module":"script",attachComment:!1,plugins:["typescript","jsx","classProperties","objectRestSpread","optionalChaining","nullishCoalescingOperator","decorators-legacy"],errorRecovery:!0})}catch{return null}}isStrNode(t){return Yr.isStringLiteral(t)||Yr.isTemplateLiteral(t)}extractSource(t){return Yr.isStringLiteral(t)?t.value:Yr.isTemplateLiteral(t)&&t.quasis.length===1?t.quasis[0].value.raw:""}replaceSource(t,r){if(!r.includes("${")){Yr.isStringLiteral(t)?t.value=r:(t.quasis=[Yr.templateElement({raw:r,cooked:r},!0)],t.expressions=[]);return}try{let n=r.replace(/`/g,"\\`"),a=(0,Uy.parseExpression)("`"+n+"`");Yr.isTemplateLiteral(a)&&Object.assign(t,{type:"TemplateLiteral",quasis:a.quasis,expressions:a.expressions})}catch{}}getAssignName(t){if(Yr.isIdentifier(t))return t.name;if(Yr.isMemberExpression(t)){if(Yr.isIdentifier(t.property))return t.property.name;if(Yr.isStringLiteral(t.property))return t.property.value}return null}getObjKeyName(t){return Yr.isIdentifier(t)?t.name:Yr.isStringLiteral(t)?t.value:null}getCallName(t){return Yr.isIdentifier(t)?t.name:Yr.isMemberExpression(t)?this.getCallName(t.property):null}findString(t,r){let n=[];return this.traverseAllStrings(r,(a,i,s)=>{let o=this.extractSource(s);if(o&&o.includes(t)){let l=s.loc?.start;n.push({line:l?.line||0,column:l?.column||0,type:a,name:i,source:o})}}),n}getFingerprint(t){return`${t.type}:${t.name}:${t.source}`}deduplicateResults(t){let r=new Map;return t.forEach(n=>r.set(this.getFingerprint(n),n)),Array.from(r.values()).sort((n,a)=>n.type.localeCompare(a.type)||n.name.localeCompare(a.name))}}});var gK,oo,Aqe,Nqe,RM=de(()=>{gK=A(require("fs"));i1();oo=class{constructor(t){this.rejectPatterns=[];this.validPatterns=[];this.settings=t,this.initPatterns()}initPatterns(){let t=this.settings.reDatas&&this.settings.reDatas.length>0?this.settings.reDatas:Gc.patterns;this.patterns=t.filter(a=>a!=="").map(a=>new RegExp(a,this.settings.reFlags||"gs"));let r=this.settings.reRejectRe&&this.settings.reRejectRe.length>0?this.settings.reRejectRe:Gc.rejectPatterns;this.rejectPatterns=r.map(a=>new RegExp(a));let n=this.settings.reValidRe&&this.settings.reValidRe.length>0?this.settings.reValidRe:Gc.validPatterns;this.validPatterns=n.map(a=>new RegExp(a))}isValidText(t){if(!t||t.length>this.settings.reLength)return!1;for(let r of this.rejectPatterns)if(r.test(t))return!1;if(this.validPatterns.length===0)return!0;for(let r of this.validPatterns)if(r.test(t))return!0;return!1}loadFile(t){let r="";try{return r=gK.default.readFileSync(t,"utf8"),this.extractTranslationsByRegex(r)}catch{return null}}loadCode(t){try{return this.extractTranslationsByRegex(t)}catch{return null}}validateSecurity(t,r=""){let n=[];if(!t)return n;let a=r.trim(),i=a[0],s=a[a.length-1];if(['"',"'","`"].includes(i)&&i===s){let u=i==='"'?"\u53CC\u5F15\u53F7":i==="'"?"\u5355\u5F15\u53F7":"\u53CD\u5F15\u53F7";((f,p)=>{let m=!1;for(let h=0;h<f.length;h++)if(f[h]==="\\")m=!m;else if(f[h]===p){if(!m)return!0;m=!1}else m=!1;return!1})(t,i)&&(n.push({severity:"warning",message:`\u6F5C\u5728\u7684\u7ED3\u6784\u7834\u574F\u98CE\u9669: \u5305\u542B\u672A\u8F6C\u4E49\u7684${u}\uFF0C\u53EF\u80FD\u5BFC\u81F4\u4EE3\u7801\u9003\u9038`}),t.includes(";")&&n.push({severity:"critical",message:"\u9AD8\u5371\u7ED3\u6784\u7834\u574F\u98CE\u9669: \u68C0\u6D4B\u5230\u5F15\u53F7\u914D\u5BF9\u4E0E\u5206\u53F7\u7EC4\u5408\uFF0C\u53EF\u80FD\u5B58\u5728\u6307\u4EE4\u6CE8\u5165"}))}let l=[{regex:/\beval\s*\(/i,name:"eval()"},{regex:/\bFunction\s*\(/i,name:"new Function()"},{regex:/\bsetTimeout\s*\(\s*['"`]/i,name:"setTimeout(string)"},{regex:/<script/i,name:"<script>"},{regex:/\bjavascript:/i,name:"javascript:"}];for(let u of l)u.regex.test(t)&&n.push({severity:"critical",message:`\u53D1\u73B0\u5371\u9669\u7684\u6267\u884C\u6307\u4EE4: ${u.name}`});let c=[{regex:/\bfetch\s*\(/i,name:"fetch()"},{regex:/\bXMLHttpRequest\b/i,name:"XMLHttpRequest"},{regex:/\brequire\s*\(/i,name:"require()"},{regex:/\bprocess\./i,name:"Node.js process"},{regex:/\belectron\./i,name:"Electron API"},{regex:/\blocalStorage\b/i,name:"localStorage"}];for(let u of c)u.regex.test(t)&&n.push({severity:"warning",message:`\u5185\u5BB9\u5305\u542B\u53EF\u7591\u654F\u611F\u64CD\u4F5C: ${u.name}`});return n}extractTranslationsByRegex(t){let r=[],n=new Set;for(let a of this.patterns){a.lastIndex=0;let i=t.match(a);if(i)for(let s of i)this.isValidText(s)&&(n.has(s)||(n.add(s),r.push({source:s,target:s})))}return r}translate(t,r){let n=t;for(let a of r)a.source&&a.target&&a.source!==a.target&&(n=n.split(a.source).join(a.target));return n}traceUsage(t,r){let n=new Set;for(let a of r)a.source&&t.includes(a.source)&&n.add(a.source);return n}findString(t,r){let n=[];return r.split(`
`).forEach((i,s)=>{i.includes(t)&&n.push({line:s+1,source:i.trim()})}),n}},Aqe=e=>({success:!0,message:""}),Nqe=e=>({success:!0,texts:[]})});var yK=de(()=>{});var xK=de(()=>{});var bK=de(()=>{});var vK,SK=de(()=>{vK={schemaVersion:2,sources:{}}});var TK=de(()=>{});var wK=de(()=>{});var CK=de(()=>{});var PK=de(()=>{});var RP=de(()=>{yK();xK();bK();SK();TK();wK();CK();PK()});function _qe(e,t,r,n,a){let i={schemaVersion:1,metadata:{plugin:t.id,version:"1.0.0",title:t.name,description:`${t.name} Localization & Tweaks`,language:n,supportedVersions:e,author:a.author||""},dict:{"main.js":{ast:[],regex:[]}}},s=new _s(a),o=s.loadCode(r);o&&(i.dict["main.js"].ast=s.extract(o));let c=new oo(a).loadCode(r);return c&&(i.dict["main.js"].regex=c),i}function Li(e){let t=JSON.parse(JSON.stringify(e));t.checksum&&delete t.checksum;let r=DM(t);return(0,EK.createHash)("sha256").update(r).digest("hex")}function DM(e){return typeof e!="object"||e===null?JSON.stringify(e):Array.isArray(e)?"["+e.map(DM).join(",")+"]":"{"+Object.keys(e).sort().map(t=>JSON.stringify(t)+":"+DM(e[t])).join(",")+"}"}function MM(e,t,r){let n={schemaVersion:1,metadata:{theme:e.name,language:"zh-cn",version:"1.0.0",supportedVersions:e.version,title:e.name,description:`${e.name} Localization & Tweaks`,author:r.author||""},dict:[]},a=/\/\* @settings([\s\S]*?)\*\//g,i,s=new Set;for(;(i=a.exec(t))!==null;){let o=i[1],l=/^(?:[ \t]*)(name|title|description|label|markdown):\s*(["']?)(.*?)\2[ \t]*(?:\r?\n|$)/gm,c;for(;(c=l.exec(o))!==null;){let u=c[1],d=c[3];d.trim()!==""&&!s.has(d)&&(s.add(d),n.dict.push({type:u,source:d,target:d}))}}return n}function OM(e,t){let r=new Map;return e.forEach(n=>{let a=`${n.type}|${n.name||""}|${n.source}`;r.set(a,{...n})}),t.forEach(n=>{let a=`${n.type}|${n.name||""}|${n.source}`;r.has(a)||r.set(a,{...n})}),Array.from(r.values())}function FM(e,t){let r=new Map;return e.forEach(n=>{r.set(n.source,{...n})}),t.forEach(n=>{r.has(n.source)||r.set(n.source,{...n})}),Array.from(r.values())}var EK,zf=de(()=>{EK=require("crypto");RP();LM();RM()});var Lqe,IK,AK=de(()=>{Lqe=(e,t)=>{if(typeof e!="string"||typeof t!="string")throw new TypeError("\u7248\u672C\u53F7\u5FC5\u987B\u4E3A\u5B57\u7B26\u4E32\u7C7B\u578B");if(!e||!t)throw new Error("\u7248\u672C\u53F7\u4E0D\u80FD\u4E3A\u7A7A\u5B57\u7B26\u4E32");let r=/^\d+\.\d+\.\d+(-[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?(\+[0-9A-Za-z-]+)?$/;if(!r.test(e)||!r.test(t))throw new Error("\u7248\u672C\u53F7\u683C\u5F0F\u4E0D\u7B26\u5408 SemVer \u89C4\u8303");let{coreVersion:n,preRelease:a}=IK(e),{coreVersion:i,preRelease:s}=IK(t),o=n.split(".").map(p=>{let m=Number(p);return isNaN(m)?0:m}),l=i.split(".").map(p=>{let m=Number(p);return isNaN(m)?0:m}),c=Math.max(o.length,l.length);for(let p=0;p<c;p++){let m=o[p]||0,h=l[p]||0;if(m>h)return 1;if(m<h)return-1}if(a===null&&s===null)return 0;if(a===null)return 1;if(s===null)return-1;let u=a.split("."),d=s.split("."),f=Math.max(u.length,d.length);for(let p=0;p<f;p++){let m=u[p]||"",h=d[p]||"",x=Number(m),g=Number(h),y=!isNaN(x),b=!isNaN(g);if(y&&b){if(x>g)return 1;if(x<g)return-1}else{if(y)return-1;if(b)return 1;if(m>h)return 1;if(m<h)return-1}}return 0},IK=e=>{let[t]=e.split("+"),[r,n]=t.split("-");return{coreVersion:r,preRelease:n||null}}});function Rqe(e){return e&&typeof e=="object"&&"schemaVersion"in e&&"metadata"in e&&"ast"in e&&Array.isArray(e.ast)&&"regex"in e&&Array.isArray(e.regex)}var NK=de(()=>{});var Dqe,Mqe,kK=de(()=>{Dqe=e=>e.schemaVersion!==void 0||e.metadata!==void 0,Mqe=e=>e.dict!==void 0});var Ls,BM=de(()=>{Ls=class{};Ls.SPONSOR="https://afdian.com/a/eondr",Ls.I18N_ICON="https://raw.githubusercontent.com/eondrcode/obsidian-i18n/master/Obsidian.png",Ls.QQ_GROUP="https://qm.qq.com/cgi-bin/qm/qr?k=kHTS0iC1FC5igTXbdbKzff6_tc54mOF5&jump_from=webapi&authKey=AoSkriW+nDeDzBPqBl9jcpbAYkPXN2QRbrMh0hFbvMrGbqZyRAbJwaD6JKbOy4Nx",Ls.VIDEO_TUTORIAL=" https://www.bilibili.com/video/BV1VcxJeNExx/",Ls.DOCUMENTATION_TUTORIAL="https://github.com/eondrcode/obsidian-i18n",Ls.TASK="https://github.com/eondrcode/obsidian-i18n/issues",Ls.GITHUB_ISSUE="https://github.com/eondrcode/obsidian-i18n/issues",Ls.SDK_URL="https://download.immersivetranslate.com/immersive-translate-sdk-lite-latest.js"});var _K,Vy,aS,DP,$M,jM,LK=de(()=>{BM();_K=require("obsidian"),Vy=class{constructor(){this.ball=null;this.disc=null;this.panel=null;this.isActive=!1}static getInstance(){return Vy.instance||(Vy.instance=new Vy),Vy.instance}createball(){this.removeball(),this.ball=document.createElement("div"),this.ball.id="immersive-translate-ball",this.ball.innerHTML='<svg t="1759459310417" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1662" width="20" height="20"><path d="M213.333333 640v85.333333a85.333333 85.333333 0 0 0 78.933334 85.12L298.666667 810.666667h128v85.333333H298.666667a170.666667 170.666667 0 0 1-170.666667-170.666667v-85.333333h85.333333z m554.666667-213.333333l187.733333 469.333333h-91.946666l-51.242667-128h-174.506667l-51.157333 128h-91.904L682.666667 426.666667h85.333333z m-42.666667 123.093333L672.128 682.666667h106.325333L725.333333 549.76zM341.333333 85.333333v85.333334h170.666667v298.666666H341.333333v128H256v-128H85.333333V170.666667h170.666667V85.333333h85.333333z m384 42.666667a170.666667 170.666667 0 0 1 170.666667 170.666667v85.333333h-85.333333V298.666667a85.333333 85.333333 0 0 0-85.333334-85.333334h-128V128h128zM256 256H170.666667v128h85.333333V256z m170.666667 0H341.333333v128h85.333334V256z" fill="currentColor" p-id="1663"></path></svg>',this.ball.addEventListener("click",this.toggleTranslate.bind(this)),this.makeDraggable(this.ball),this.panel=document.createElement("div"),this.panel.id="immersive-translate-panel",this.ball.appendChild(this.panel),this.disc=document.createElement("div"),this.disc.id="immersive-translate-disc",this.ball.appendChild(this.disc),document.body.appendChild(this.ball)}removeball(){this.ball&&this.ball.parentNode&&(this.ball.parentNode.removeChild(this.ball),this.ball=null)}makeDraggable(t){let r=!1,n,a;t.addEventListener("mousedown",i=>{if(i.button!==0&&i.target!==t)return;i.preventDefault(),r=!0,n=i.clientY,a=t.getBoundingClientRect().top}),document.addEventListener("mousemove",i=>{if(!r)return;i.preventDefault();let s=window.innerHeight,o=t.offsetHeight,l=i.clientY-n,c=a+l;c=Math.max(0,Math.min(c,s-o)),t.style.top=`${c}px`,t.style.bottom="auto",t.style.right="0px"}),document.addEventListener("mouseup",()=>{r&&(r=!1)})}toggleTranslate(t){t&&this.panel&&t.target instanceof Node&&this.panel.contains(t.target)||this.panel&&(this.panel.style.display==="none"?(this.panel.style.display="flex",this.isActive=!0):(this.panel.style.display="none",this.isActive=!1))}activate(t){if(!window.immersiveTranslateConfig){this.createball(),window.immersiveTranslateConfig={partnerId:"immersive-translate-sdk",mountPoint:{selector:"#immersive-translate-panel",action:"child"},disclaimerPoint:{selector:"#immersive-translate-disc",action:"child"},pageRule:{mainFrameSelector:t.imtPagerule.mainFrameSelector,selectors:t.imtPagerule.selectors,excludeSelectors:t.imtPagerule.excludeSelectors,stayOriginalSelectors:t.imtPagerule.stayOriginalSelectors,extraBlockSelectors:t.imtPagerule.extraBlockSelectors,extraInlineSelectors:t.imtPagerule.extraInlineSelectors,translationClasses:t.imtPagerule.translationClasses,injectedCss:t.imtPagerule.injectedCss}},window.GM_fetch=async(n,a={})=>{let i=typeof n=="string"?n:n.url,s=a.method||"GET",o={...a.headers},l;a.body&&s.toUpperCase()!=="GET"&&s.toUpperCase()!=="HEAD"&&(typeof a.body=="string"?l=a.body:a.body instanceof URLSearchParams?(l=a.body.toString(),o["Content-Type"]="application/x-www-form-urlencoded;charset=UTF-8"):l=String(a.body));try{let c=await(0,_K.requestUrl)({url:i,method:s,headers:o,body:l,throw:!1});return{ok:c.status>=200&&c.status<300,status:c.status,statusText:"",headers:{get:u=>{let d=u.toLowerCase(),p=Object.keys(c.headers).find(m=>m.toLowerCase()===d);return p?c.headers[p]:null},forEach:u=>{Object.entries(c.headers).forEach(([d,f])=>u(f,d))}},url:i,json:async()=>c.json,text:async()=>c.text,arrayBuffer:async()=>c.arrayBuffer,clone:function(){return this}}}catch(c){throw c}};let r=document.createElement("script");r.async=!0,r.src=Ls.SDK_URL,document.body.append(r)}}deactivate(){document.location.reload()}},aS=Vy;aS.instance=null;DP=aS.getInstance(),$M=DP.activate.bind(DP),jM=DP.deactivate.bind(DP)});function RK(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=RK(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function qy(){for(var e,t,r=0,n="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=RK(e))&&(n&&(n+=" "),n+=t);return n}var MP=de(()=>{});function Wqe(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=$K(t))&&(n&&(n+=" "),n+=r);return n}function Xqe(e,...t){let r,n,a,i=s;function s(l){let c=t.reduce((u,d)=>d(u),e());return r=Hqe(c),n=r.cache.get,a=r.cache.set,i=o,o(l)}function o(l){let c=n(l);if(c)return c;let u=Kqe(l,r);return a(l,u),u}return function(){return i(Wqe.apply(null,arguments))}}var GM,Oqe,BK,DK,Fqe,Bqe,VM,MK,$qe,jqe,qM,HM,zqe,Uqe,Vqe,qqe,Hqe,Gqe,Kqe,$K,fi,jK,zK,Yqe,Jqe,Zqe,Qqe,eHe,tHe,Hy,kr,Uf,zM,id,rHe,nHe,UK,aHe,iHe,sHe,oHe,Pt,ah,UM,OK,lHe,OP,Et,iS,cHe,FK,uHe,dHe,FP,Gy,Ky,VK,qK,HK,GK,fHe,pHe,KK,mHe,BP,KM=de(()=>{GM="-",Oqe=e=>{let t=Bqe(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:s=>{let o=s.split(GM);return o[0]===""&&o.length!==1&&o.shift(),BK(o,t)||Fqe(s)},getConflictingClassGroupIds:(s,o)=>{let l=r[s]||[];return o&&n[s]?[...l,...n[s]]:l}}},BK=(e,t)=>{if(e.length===0)return t.classGroupId;let r=e[0],n=t.nextPart.get(r),a=n?BK(e.slice(1),n):void 0;if(a)return a;if(t.validators.length===0)return;let i=e.join(GM);return t.validators.find(({validator:s})=>s(i))?.classGroupId},DK=/^\[(.+)\]$/,Fqe=e=>{if(DK.test(e)){let t=DK.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},Bqe=e=>{let{theme:t,classGroups:r}=e,n={nextPart:new Map,validators:[]};for(let a in r)VM(r[a],n,a,t);return n},VM=(e,t,r,n)=>{e.forEach(a=>{if(typeof a=="string"){let i=a===""?t:MK(t,a);i.classGroupId=r;return}if(typeof a=="function"){if($qe(a)){VM(a(n),t,r,n);return}t.validators.push({validator:a,classGroupId:r});return}Object.entries(a).forEach(([i,s])=>{VM(s,MK(t,i),r,n)})})},MK=(e,t)=>{let r=e;return t.split(GM).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},$qe=e=>e.isThemeGetter,jqe=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map,a=(i,s)=>{r.set(i,s),t++,t>e&&(t=0,n=r,r=new Map)};return{get(i){let s=r.get(i);if(s!==void 0)return s;if((s=n.get(i))!==void 0)return a(i,s),s},set(i,s){r.has(i)?r.set(i,s):a(i,s)}}},qM="!",HM=":",zqe=HM.length,Uqe=e=>{let{prefix:t,experimentalParseClassName:r}=e,n=a=>{let i=[],s=0,o=0,l=0,c;for(let m=0;m<a.length;m++){let h=a[m];if(s===0&&o===0){if(h===HM){i.push(a.slice(l,m)),l=m+zqe;continue}if(h==="/"){c=m;continue}}h==="["?s++:h==="]"?s--:h==="("?o++:h===")"&&o--}let u=i.length===0?a:a.substring(l),d=Vqe(u),f=d!==u,p=c&&c>l?c-l:void 0;return{modifiers:i,hasImportantModifier:f,baseClassName:d,maybePostfixModifierPosition:p}};if(t){let a=t+HM,i=n;n=s=>s.startsWith(a)?i(s.substring(a.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:s,maybePostfixModifierPosition:void 0}}if(r){let a=n;n=i=>r({className:i,parseClassName:a})}return n},Vqe=e=>e.endsWith(qM)?e.substring(0,e.length-1):e.startsWith(qM)?e.substring(1):e,qqe=e=>{let t=Object.fromEntries(e.orderSensitiveModifiers.map(n=>[n,!0]));return n=>{if(n.length<=1)return n;let a=[],i=[];return n.forEach(s=>{s[0]==="["||t[s]?(a.push(...i.sort(),s),i=[]):i.push(s)}),a.push(...i.sort()),a}},Hqe=e=>({cache:jqe(e.cacheSize),parseClassName:Uqe(e),sortModifiers:qqe(e),...Oqe(e)}),Gqe=/\s+/,Kqe=(e,t)=>{let{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:a,sortModifiers:i}=t,s=[],o=e.trim().split(Gqe),l="";for(let c=o.length-1;c>=0;c-=1){let u=o[c],{isExternal:d,modifiers:f,hasImportantModifier:p,baseClassName:m,maybePostfixModifierPosition:h}=r(u);if(d){l=u+(l.length>0?" "+l:l);continue}let x=!!h,g=n(x?m.substring(0,h):m);if(!g){if(!x){l=u+(l.length>0?" "+l:l);continue}if(g=n(m),!g){l=u+(l.length>0?" "+l:l);continue}x=!1}let y=i(f).join(":"),b=p?y+qM:y,S=b+g;if(s.includes(S))continue;s.push(S);let w=a(g,x);for(let E=0;E<w.length;++E){let C=w[E];s.push(b+C)}l=u+(l.length>0?" "+l:l)}return l};$K=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=$K(e[n]))&&(r&&(r+=" "),r+=t);return r};fi=e=>{let t=r=>r[e]||[];return t.isThemeGetter=!0,t},jK=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,zK=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Yqe=/^\d+\/\d+$/,Jqe=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Zqe=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Qqe=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,eHe=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,tHe=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Hy=e=>Yqe.test(e),kr=e=>!!e&&!Number.isNaN(Number(e)),Uf=e=>!!e&&Number.isInteger(Number(e)),zM=e=>e.endsWith("%")&&kr(e.slice(0,-1)),id=e=>Jqe.test(e),rHe=()=>!0,nHe=e=>Zqe.test(e)&&!Qqe.test(e),UK=()=>!1,aHe=e=>eHe.test(e),iHe=e=>tHe.test(e),sHe=e=>!Pt(e)&&!Et(e),oHe=e=>Gy(e,HK,UK),Pt=e=>jK.test(e),ah=e=>Gy(e,GK,nHe),UM=e=>Gy(e,fHe,kr),OK=e=>Gy(e,VK,UK),lHe=e=>Gy(e,qK,iHe),OP=e=>Gy(e,KK,aHe),Et=e=>zK.test(e),iS=e=>Ky(e,GK),cHe=e=>Ky(e,pHe),FK=e=>Ky(e,VK),uHe=e=>Ky(e,HK),dHe=e=>Ky(e,qK),FP=e=>Ky(e,KK,!0),Gy=(e,t,r)=>{let n=jK.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},Ky=(e,t,r=!1)=>{let n=zK.exec(e);return n?n[1]?t(n[1]):r:!1},VK=e=>e==="position"||e==="percentage",qK=e=>e==="image"||e==="url",HK=e=>e==="length"||e==="size"||e==="bg-size",GK=e=>e==="length",fHe=e=>e==="number",pHe=e=>e==="family-name",KK=e=>e==="shadow",mHe=()=>{let e=fi("color"),t=fi("font"),r=fi("text"),n=fi("font-weight"),a=fi("tracking"),i=fi("leading"),s=fi("breakpoint"),o=fi("container"),l=fi("spacing"),c=fi("radius"),u=fi("shadow"),d=fi("inset-shadow"),f=fi("text-shadow"),p=fi("drop-shadow"),m=fi("blur"),h=fi("perspective"),x=fi("aspect"),g=fi("ease"),y=fi("animate"),b=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],w=()=>[...S(),Et,Pt],E=()=>["auto","hidden","clip","visible","scroll"],C=()=>["auto","contain","none"],N=()=>[Et,Pt,l],_=()=>[Hy,"full","auto",...N()],O=()=>[Uf,"none","subgrid",Et,Pt],D=()=>["auto",{span:["full",Uf,Et,Pt]},Uf,Et,Pt],W=()=>[Uf,"auto",Et,Pt],Z=()=>["auto","min","max","fr",Et,Pt],me=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Q=()=>["start","end","center","stretch","center-safe","end-safe"],V=()=>["auto",...N()],U=()=>[Hy,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...N()],k=()=>[e,Et,Pt],L=()=>[...S(),FK,OK,{position:[Et,Pt]}],M=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ee=()=>["auto","cover","contain",uHe,oHe,{size:[Et,Pt]}],se=()=>[zM,iS,ah],ne=()=>["","none","full",c,Et,Pt],ge=()=>["",kr,iS,ah],ue=()=>["solid","dashed","dotted","double"],H=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],I=()=>[kr,zM,FK,OK],K=()=>["","none",m,Et,Pt],he=()=>["none",kr,Et,Pt],q=()=>["none",kr,Et,Pt],be=()=>[kr,Et,Pt],Ie=()=>[Hy,"full",...N()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[id],breakpoint:[id],color:[rHe],container:[id],"drop-shadow":[id],ease:["in","out","in-out"],font:[sHe],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[id],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[id],shadow:[id],spacing:["px",kr],text:[id],"text-shadow":[id],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Hy,Pt,Et,x]}],container:["container"],columns:[{columns:[kr,Pt,Et,o]}],"break-after":[{"break-after":b()}],"break-before":[{"break-before":b()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:w()}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:_()}],"inset-x":[{"inset-x":_()}],"inset-y":[{"inset-y":_()}],start:[{start:_()}],end:[{end:_()}],top:[{top:_()}],right:[{right:_()}],bottom:[{bottom:_()}],left:[{left:_()}],visibility:["visible","invisible","collapse"],z:[{z:[Uf,"auto",Et,Pt]}],basis:[{basis:[Hy,"full","auto",o,...N()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[kr,Hy,"auto","initial","none",Pt]}],grow:[{grow:["",kr,Et,Pt]}],shrink:[{shrink:["",kr,Et,Pt]}],order:[{order:[Uf,"first","last","none",Et,Pt]}],"grid-cols":[{"grid-cols":O()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":W()}],"col-end":[{"col-end":W()}],"grid-rows":[{"grid-rows":O()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":W()}],"row-end":[{"row-end":W()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Z()}],"auto-rows":[{"auto-rows":Z()}],gap:[{gap:N()}],"gap-x":[{"gap-x":N()}],"gap-y":[{"gap-y":N()}],"justify-content":[{justify:[...me(),"normal"]}],"justify-items":[{"justify-items":[...Q(),"normal"]}],"justify-self":[{"justify-self":["auto",...Q()]}],"align-content":[{content:["normal",...me()]}],"align-items":[{items:[...Q(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Q(),{baseline:["","last"]}]}],"place-content":[{"place-content":me()}],"place-items":[{"place-items":[...Q(),"baseline"]}],"place-self":[{"place-self":["auto",...Q()]}],p:[{p:N()}],px:[{px:N()}],py:[{py:N()}],ps:[{ps:N()}],pe:[{pe:N()}],pt:[{pt:N()}],pr:[{pr:N()}],pb:[{pb:N()}],pl:[{pl:N()}],m:[{m:V()}],mx:[{mx:V()}],my:[{my:V()}],ms:[{ms:V()}],me:[{me:V()}],mt:[{mt:V()}],mr:[{mr:V()}],mb:[{mb:V()}],ml:[{ml:V()}],"space-x":[{"space-x":N()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":N()}],"space-y-reverse":["space-y-reverse"],size:[{size:U()}],w:[{w:[o,"screen",...U()]}],"min-w":[{"min-w":[o,"screen","none",...U()]}],"max-w":[{"max-w":[o,"screen","none","prose",{screen:[s]},...U()]}],h:[{h:["screen","lh",...U()]}],"min-h":[{"min-h":["screen","lh","none",...U()]}],"max-h":[{"max-h":["screen","lh",...U()]}],"font-size":[{text:["base",r,iS,ah]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,Et,UM]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",zM,Pt]}],"font-family":[{font:[cHe,Pt,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[a,Et,Pt]}],"line-clamp":[{"line-clamp":[kr,"none",Et,UM]}],leading:[{leading:[i,...N()]}],"list-image":[{"list-image":["none",Et,Pt]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Et,Pt]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:k()}],"text-color":[{text:k()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ue(),"wavy"]}],"text-decoration-thickness":[{decoration:[kr,"from-font","auto",Et,ah]}],"text-decoration-color":[{decoration:k()}],"underline-offset":[{"underline-offset":[kr,"auto",Et,Pt]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:N()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Et,Pt]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Et,Pt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:L()}],"bg-repeat":[{bg:M()}],"bg-size":[{bg:ee()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Uf,Et,Pt],radial:["",Et,Pt],conic:[Uf,Et,Pt]},dHe,lHe]}],"bg-color":[{bg:k()}],"gradient-from-pos":[{from:se()}],"gradient-via-pos":[{via:se()}],"gradient-to-pos":[{to:se()}],"gradient-from":[{from:k()}],"gradient-via":[{via:k()}],"gradient-to":[{to:k()}],rounded:[{rounded:ne()}],"rounded-s":[{"rounded-s":ne()}],"rounded-e":[{"rounded-e":ne()}],"rounded-t":[{"rounded-t":ne()}],"rounded-r":[{"rounded-r":ne()}],"rounded-b":[{"rounded-b":ne()}],"rounded-l":[{"rounded-l":ne()}],"rounded-ss":[{"rounded-ss":ne()}],"rounded-se":[{"rounded-se":ne()}],"rounded-ee":[{"rounded-ee":ne()}],"rounded-es":[{"rounded-es":ne()}],"rounded-tl":[{"rounded-tl":ne()}],"rounded-tr":[{"rounded-tr":ne()}],"rounded-br":[{"rounded-br":ne()}],"rounded-bl":[{"rounded-bl":ne()}],"border-w":[{border:ge()}],"border-w-x":[{"border-x":ge()}],"border-w-y":[{"border-y":ge()}],"border-w-s":[{"border-s":ge()}],"border-w-e":[{"border-e":ge()}],"border-w-t":[{"border-t":ge()}],"border-w-r":[{"border-r":ge()}],"border-w-b":[{"border-b":ge()}],"border-w-l":[{"border-l":ge()}],"divide-x":[{"divide-x":ge()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ge()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ue(),"hidden","none"]}],"divide-style":[{divide:[...ue(),"hidden","none"]}],"border-color":[{border:k()}],"border-color-x":[{"border-x":k()}],"border-color-y":[{"border-y":k()}],"border-color-s":[{"border-s":k()}],"border-color-e":[{"border-e":k()}],"border-color-t":[{"border-t":k()}],"border-color-r":[{"border-r":k()}],"border-color-b":[{"border-b":k()}],"border-color-l":[{"border-l":k()}],"divide-color":[{divide:k()}],"outline-style":[{outline:[...ue(),"none","hidden"]}],"outline-offset":[{"outline-offset":[kr,Et,Pt]}],"outline-w":[{outline:["",kr,iS,ah]}],"outline-color":[{outline:k()}],shadow:[{shadow:["","none",u,FP,OP]}],"shadow-color":[{shadow:k()}],"inset-shadow":[{"inset-shadow":["none",d,FP,OP]}],"inset-shadow-color":[{"inset-shadow":k()}],"ring-w":[{ring:ge()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:k()}],"ring-offset-w":[{"ring-offset":[kr,ah]}],"ring-offset-color":[{"ring-offset":k()}],"inset-ring-w":[{"inset-ring":ge()}],"inset-ring-color":[{"inset-ring":k()}],"text-shadow":[{"text-shadow":["none",f,FP,OP]}],"text-shadow-color":[{"text-shadow":k()}],opacity:[{opacity:[kr,Et,Pt]}],"mix-blend":[{"mix-blend":[...H(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":H()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[kr]}],"mask-image-linear-from-pos":[{"mask-linear-from":I()}],"mask-image-linear-to-pos":[{"mask-linear-to":I()}],"mask-image-linear-from-color":[{"mask-linear-from":k()}],"mask-image-linear-to-color":[{"mask-linear-to":k()}],"mask-image-t-from-pos":[{"mask-t-from":I()}],"mask-image-t-to-pos":[{"mask-t-to":I()}],"mask-image-t-from-color":[{"mask-t-from":k()}],"mask-image-t-to-color":[{"mask-t-to":k()}],"mask-image-r-from-pos":[{"mask-r-from":I()}],"mask-image-r-to-pos":[{"mask-r-to":I()}],"mask-image-r-from-color":[{"mask-r-from":k()}],"mask-image-r-to-color":[{"mask-r-to":k()}],"mask-image-b-from-pos":[{"mask-b-from":I()}],"mask-image-b-to-pos":[{"mask-b-to":I()}],"mask-image-b-from-color":[{"mask-b-from":k()}],"mask-image-b-to-color":[{"mask-b-to":k()}],"mask-image-l-from-pos":[{"mask-l-from":I()}],"mask-image-l-to-pos":[{"mask-l-to":I()}],"mask-image-l-from-color":[{"mask-l-from":k()}],"mask-image-l-to-color":[{"mask-l-to":k()}],"mask-image-x-from-pos":[{"mask-x-from":I()}],"mask-image-x-to-pos":[{"mask-x-to":I()}],"mask-image-x-from-color":[{"mask-x-from":k()}],"mask-image-x-to-color":[{"mask-x-to":k()}],"mask-image-y-from-pos":[{"mask-y-from":I()}],"mask-image-y-to-pos":[{"mask-y-to":I()}],"mask-image-y-from-color":[{"mask-y-from":k()}],"mask-image-y-to-color":[{"mask-y-to":k()}],"mask-image-radial":[{"mask-radial":[Et,Pt]}],"mask-image-radial-from-pos":[{"mask-radial-from":I()}],"mask-image-radial-to-pos":[{"mask-radial-to":I()}],"mask-image-radial-from-color":[{"mask-radial-from":k()}],"mask-image-radial-to-color":[{"mask-radial-to":k()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":S()}],"mask-image-conic-pos":[{"mask-conic":[kr]}],"mask-image-conic-from-pos":[{"mask-conic-from":I()}],"mask-image-conic-to-pos":[{"mask-conic-to":I()}],"mask-image-conic-from-color":[{"mask-conic-from":k()}],"mask-image-conic-to-color":[{"mask-conic-to":k()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:L()}],"mask-repeat":[{mask:M()}],"mask-size":[{mask:ee()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Et,Pt]}],filter:[{filter:["","none",Et,Pt]}],blur:[{blur:K()}],brightness:[{brightness:[kr,Et,Pt]}],contrast:[{contrast:[kr,Et,Pt]}],"drop-shadow":[{"drop-shadow":["","none",p,FP,OP]}],"drop-shadow-color":[{"drop-shadow":k()}],grayscale:[{grayscale:["",kr,Et,Pt]}],"hue-rotate":[{"hue-rotate":[kr,Et,Pt]}],invert:[{invert:["",kr,Et,Pt]}],saturate:[{saturate:[kr,Et,Pt]}],sepia:[{sepia:["",kr,Et,Pt]}],"backdrop-filter":[{"backdrop-filter":["","none",Et,Pt]}],"backdrop-blur":[{"backdrop-blur":K()}],"backdrop-brightness":[{"backdrop-brightness":[kr,Et,Pt]}],"backdrop-contrast":[{"backdrop-contrast":[kr,Et,Pt]}],"backdrop-grayscale":[{"backdrop-grayscale":["",kr,Et,Pt]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[kr,Et,Pt]}],"backdrop-invert":[{"backdrop-invert":["",kr,Et,Pt]}],"backdrop-opacity":[{"backdrop-opacity":[kr,Et,Pt]}],"backdrop-saturate":[{"backdrop-saturate":[kr,Et,Pt]}],"backdrop-sepia":[{"backdrop-sepia":["",kr,Et,Pt]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":N()}],"border-spacing-x":[{"border-spacing-x":N()}],"border-spacing-y":[{"border-spacing-y":N()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Et,Pt]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[kr,"initial",Et,Pt]}],ease:[{ease:["linear","initial",g,Et,Pt]}],delay:[{delay:[kr,Et,Pt]}],animate:[{animate:["none",y,Et,Pt]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[h,Et,Pt]}],"perspective-origin":[{"perspective-origin":w()}],rotate:[{rotate:he()}],"rotate-x":[{"rotate-x":he()}],"rotate-y":[{"rotate-y":he()}],"rotate-z":[{"rotate-z":he()}],scale:[{scale:q()}],"scale-x":[{"scale-x":q()}],"scale-y":[{"scale-y":q()}],"scale-z":[{"scale-z":q()}],"scale-3d":["scale-3d"],skew:[{skew:be()}],"skew-x":[{"skew-x":be()}],"skew-y":[{"skew-y":be()}],transform:[{transform:[Et,Pt,"","none","gpu","cpu"]}],"transform-origin":[{origin:w()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ie()}],"translate-x":[{"translate-x":Ie()}],"translate-y":[{"translate-y":Ie()}],"translate-z":[{"translate-z":Ie()}],"translate-none":["translate-none"],accent:[{accent:k()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:k()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Et,Pt]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Et,Pt]}],fill:[{fill:["none",...k()]}],"stroke-w":[{stroke:[kr,iS,ah,UM]}],stroke:[{stroke:["none",...k()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},BP=Xqe(mHe)});function Il(...e){return BP(qy(e))}var WK=de(()=>{MP();KM()});var XM={};xl(XM,{escapeSpecialChars:()=>XK,i18nOpen:()=>au,info:()=>$P,parseIssueTitle:()=>JK,unescapeSpecialChars:()=>YK});var WM,$P,au,XK,YK,JK,jP=de(()=>{$r();WM=require("child_process"),$P=e=>{},au=(e,t)=>{process.platform==="win32"&&(0,WM.exec)(`start "" "${t}"`,r=>{r?e.notice.resultPrefix(v("func.open_prefix"),!1,r):e.notice.resultPrefix(v("func.open_prefix"),!0)}),process.platform==="darwin"&&(0,WM.exec)(`open "${t}"`,r=>{r?e.notice.resultPrefix(v("func.open_prefix"),!1,r):e.notice.resultPrefix(v("func.open_prefix"),!0)})},XK=e=>e.replace(/\n/g,"\\n").replace(/\r/g,"\\r"),YK=e=>e.replace(/\\n/g,`
`).replace(/\\r/g,"\r"),JK=e=>{let t=/\[(.*?)\]\s*\[(.*?)\]\s*\[(.*?)\]/,r=e.match(t);return r?[r[1],r[2],r[3]]:["","",""]}});function hHe(e,t={checkFormat:!0,checkVersion:!0,checkTranslations:!0}){return!(t.checkFormat&&(!("schemaVersion"in e)||!("metadata"in e)||!("dict"in e)))}var YM,gHe,ZK=de(()=>{YM=e=>{if(!e)return!1;let t="metadata"in e,r="dict"in e&&typeof e.dict=="object"&&e.dict!==null,n="schemaVersion"in e,a=!1;if(t){let i=e.metadata;a="plugin"in i&&"version"in i&&"language"in i}return t&&a&&r&&n},gHe=e=>{if(!e)return!1;let t="manifest"in e,r=t&&"translationVersion"in e.manifest,n=t&&"pluginVersion"in e.manifest,a="dict"in e;return t&&r&&n&&a}});var zP,yHe,xHe,QK=de(()=>{zP=require("zlib"),yHe=e=>(0,zP.gzipSync)(e).toString("base64"),xHe=e=>(0,zP.gunzipSync)(Buffer.from(e,"base64")).toString()});var JM,bHe,eW=de(()=>{JM=e=>{let t=new Date(e),r=String(t.getMonth()+1).padStart(2,"0"),n=String(t.getDate()).padStart(2,"0"),a=String(t.getHours()).padStart(2,"0"),i=String(t.getMinutes()).padStart(2,"0");return`${r}\u6708${n}\u65E5 ${a}:${i}`},bHe=e=>{let t=new Date(e),[r,n,a,i,s]=[t.getFullYear(),String(t.getMonth()+1).padStart(2,"0"),String(t.getDate()).padStart(2,"0"),String(t.getHours()).padStart(2,"0"),String(t.getMinutes()).padStart(2,"0")];return`${r}/${n}/${a} ${i}:${s}`}});var sd,tW=de(()=>{sd=e=>{let t=e;t.use={};for(let r of Object.keys(t.getState()))t.use[r]=()=>t(n=>n[r]);return t}});var rW,nW,ZM=de(()=>{rW=e=>{let t,r=new Set,n=(c,u)=>{let d=typeof c=="function"?c(t):c;if(!Object.is(d,t)){let f=t;t=u??(typeof d!="object"||d===null)?d:Object.assign({},t,d),r.forEach(p=>p(t,f))}},a=()=>t,o={setState:n,getState:a,getInitialState:()=>l,subscribe:c=>(r.add(c),()=>r.delete(c))},l=t=e(n,a,o);return o},nW=e=>e?rW(e):rW});function SHe(e,t=vHe){let r=sS.default.useSyncExternalStore(e.subscribe,sS.default.useCallback(()=>t(e.getState()),[e,t]),sS.default.useCallback(()=>t(e.getInitialState()),[e,t]));return sS.default.useDebugValue(r),r}var sS,vHe,aW,iu,iW=de(()=>{sS=A(Le(),1);ZM();vHe=e=>e;aW=e=>{let t=nW(e),r=n=>SHe(t,n);return Object.assign(r,t),r},iu=e=>e?aW(e):aW});var Wy=de(()=>{ZM();iW()});var sW,su,Ue,oW=de(()=>{Wy();$t();sW=iu()((e,t)=>({i18n:null,editorPluginTranslation:{},editorPluginTranslationPath:"",editorThemeTranslation:{},editorThemeName:"",editorThemeDir:"",editorThemeTranslationPath:"",sourceUpdateTick:0,setI18n:r=>e({i18n:r}),setEditorPluginTranslation:r=>e({editorPluginTranslation:r}),setEditorPluginTranslationPath:r=>e({editorPluginTranslationPath:r}),setEditorTheme:(r,n,a,i)=>e({editorThemeTranslation:r,editorThemeName:n,editorThemeDir:a,editorThemeTranslationPath:i}),triggerSourceUpdate:()=>e(r=>({sourceUpdateTick:r.sourceUpdateTick+1}))})),su=sd(sW),Ue=sW});var yW=ae(ra=>{"use strict";function rO(e,t){var r=e.length;e.push(t);e:for(;0<r;){var n=r-1>>>1,a=e[n];if(0<UP(a,t))e[n]=t,e[r]=a,r=n;else break e}}function ou(e){return e.length===0?null:e[0]}function qP(e){if(e.length===0)return null;var t=e[0],r=e.pop();if(r!==t){e[0]=r;e:for(var n=0,a=e.length,i=a>>>1;n<i;){var s=2*(n+1)-1,o=e[s],l=s+1,c=e[l];if(0>UP(o,r))l<a&&0>UP(c,o)?(e[n]=c,e[l]=r,n=l):(e[n]=o,e[s]=r,n=s);else if(l<a&&0>UP(c,r))e[n]=c,e[l]=r,n=l;else break e}}return t}function UP(e,t){var r=e.sortIndex-t.sortIndex;return r!==0?r:e.id-t.id}ra.unstable_now=void 0;typeof performance=="object"&&typeof performance.now=="function"?(lW=performance,ra.unstable_now=function(){return lW.now()}):(QM=Date,cW=QM.now(),ra.unstable_now=function(){return QM.now()-cW});var lW,QM,cW,od=[],Vf=[],THe=1,Al=null,ms=3,nO=!1,oS=!1,lS=!1,aO=!1,fW=typeof setTimeout=="function"?setTimeout:null,pW=typeof clearTimeout=="function"?clearTimeout:null,uW=typeof setImmediate<"u"?setImmediate:null;function VP(e){for(var t=ou(Vf);t!==null;){if(t.callback===null)qP(Vf);else if(t.startTime<=e)qP(Vf),t.sortIndex=t.expirationTime,rO(od,t);else break;t=ou(Vf)}}function iO(e){if(lS=!1,VP(e),!oS)if(ou(od)!==null)oS=!0,Yy||(Yy=!0,Xy());else{var t=ou(Vf);t!==null&&sO(iO,t.startTime-e)}}var Yy=!1,cS=-1,mW=5,hW=-1;function gW(){return aO?!0:!(ra.unstable_now()-hW<mW)}function eO(){if(aO=!1,Yy){var e=ra.unstable_now();hW=e;var t=!0;try{e:{oS=!1,lS&&(lS=!1,pW(cS),cS=-1),nO=!0;var r=ms;try{t:{for(VP(e),Al=ou(od);Al!==null&&!(Al.expirationTime>e&&gW());){var n=Al.callback;if(typeof n=="function"){Al.callback=null,ms=Al.priorityLevel;var a=n(Al.expirationTime<=e);if(e=ra.unstable_now(),typeof a=="function"){Al.callback=a,VP(e),t=!0;break t}Al===ou(od)&&qP(od),VP(e)}else qP(od);Al=ou(od)}if(Al!==null)t=!0;else{var i=ou(Vf);i!==null&&sO(iO,i.startTime-e),t=!1}}break e}finally{Al=null,ms=r,nO=!1}t=void 0}}finally{t?Xy():Yy=!1}}}var Xy;typeof uW=="function"?Xy=function(){uW(eO)}:typeof MessageChannel<"u"?(tO=new MessageChannel,dW=tO.port2,tO.port1.onmessage=eO,Xy=function(){dW.postMessage(null)}):Xy=function(){fW(eO,0)};var tO,dW;function sO(e,t){cS=fW(function(){e(ra.unstable_now())},t)}ra.unstable_IdlePriority=5;ra.unstable_ImmediatePriority=1;ra.unstable_LowPriority=4;ra.unstable_NormalPriority=3;ra.unstable_Profiling=null;ra.unstable_UserBlockingPriority=2;ra.unstable_cancelCallback=function(e){e.callback=null};ra.unstable_forceFrameRate=function(e){0>e||125<e||(mW=0<e?Math.floor(1e3/e):5)};ra.unstable_getCurrentPriorityLevel=function(){return ms};ra.unstable_next=function(e){switch(ms){case 1:case 2:case 3:var t=3;break;default:t=ms}var r=ms;ms=t;try{return e()}finally{ms=r}};ra.unstable_requestPaint=function(){aO=!0};ra.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var r=ms;ms=e;try{return t()}finally{ms=r}};ra.unstable_scheduleCallback=function(e,t,r){var n=ra.unstable_now();switch(typeof r=="object"&&r!==null?(r=r.delay,r=typeof r=="number"&&0<r?n+r:n):r=n,e){case 1:var a=-1;break;case 2:a=250;break;case 5:a=1073741823;break;case 4:a=1e4;break;default:a=5e3}return a=r+a,e={id:THe++,callback:t,priorityLevel:e,startTime:r,expirationTime:a,sortIndex:-1},r>n?(e.sortIndex=r,rO(Vf,e),ou(od)===null&&e===ou(Vf)&&(lS?(pW(cS),cS=-1):lS=!0,sO(iO,r-n))):(e.sortIndex=a,rO(od,e),oS||nO||(oS=!0,Yy||(Yy=!0,Xy()))),e};ra.unstable_shouldYield=gW;ra.unstable_wrapCallback=function(e){var t=ms;return function(){var r=ms;ms=t;try{return e.apply(this,arguments)}finally{ms=r}}}});var bW=ae((xwt,xW)=>{"use strict";xW.exports=yW()});var SW=ae(Ds=>{"use strict";var wHe=Le();function vW(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var r=2;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function qf(){}var Rs={d:{f:qf,r:function(){throw Error(vW(522))},D:qf,C:qf,L:qf,m:qf,X:qf,S:qf,M:qf},p:0,findDOMNode:null},CHe=Symbol.for("react.portal");function PHe(e,t,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:CHe,key:n==null?null:""+n,children:e,containerInfo:t,implementation:r}}var uS=wHe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function HP(e,t){if(e==="font")return"";if(typeof t=="string")return t==="use-credentials"?t:""}Ds.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Rs;Ds.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(vW(299));return PHe(e,t,null,r)};Ds.flushSync=function(e){var t=uS.T,r=Rs.p;try{if(uS.T=null,Rs.p=2,e)return e()}finally{uS.T=t,Rs.p=r,Rs.d.f()}};Ds.preconnect=function(e,t){typeof e=="string"&&(t?(t=t.crossOrigin,t=typeof t=="string"?t==="use-credentials"?t:"":void 0):t=null,Rs.d.C(e,t))};Ds.prefetchDNS=function(e){typeof e=="string"&&Rs.d.D(e)};Ds.preinit=function(e,t){if(typeof e=="string"&&t&&typeof t.as=="string"){var r=t.as,n=HP(r,t.crossOrigin),a=typeof t.integrity=="string"?t.integrity:void 0,i=typeof t.fetchPriority=="string"?t.fetchPriority:void 0;r==="style"?Rs.d.S(e,typeof t.precedence=="string"?t.precedence:void 0,{crossOrigin:n,integrity:a,fetchPriority:i}):r==="script"&&Rs.d.X(e,{crossOrigin:n,integrity:a,fetchPriority:i,nonce:typeof t.nonce=="string"?t.nonce:void 0})}};Ds.preinitModule=function(e,t){if(typeof e=="string")if(typeof t=="object"&&t!==null){if(t.as==null||t.as==="script"){var r=HP(t.as,t.crossOrigin);Rs.d.M(e,{crossOrigin:r,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0})}}else t==null&&Rs.d.M(e)};Ds.preload=function(e,t){if(typeof e=="string"&&typeof t=="object"&&t!==null&&typeof t.as=="string"){var r=t.as,n=HP(r,t.crossOrigin);Rs.d.L(e,r,{crossOrigin:n,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0,type:typeof t.type=="string"?t.type:void 0,fetchPriority:typeof t.fetchPriority=="string"?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy=="string"?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet=="string"?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes=="string"?t.imageSizes:void 0,media:typeof t.media=="string"?t.media:void 0})}};Ds.preloadModule=function(e,t){if(typeof e=="string")if(t){var r=HP(t.as,t.crossOrigin);Rs.d.m(e,{as:typeof t.as=="string"&&t.as!=="script"?t.as:void 0,crossOrigin:r,integrity:typeof t.integrity=="string"?t.integrity:void 0})}else Rs.d.m(e)};Ds.requestFormReset=function(e){Rs.d.r(e)};Ds.unstable_batchedUpdates=function(e,t){return e(t)};Ds.useFormState=function(e,t,r){return uS.H.useFormState(e,t,r)};Ds.useFormStatus=function(){return uS.H.useHostTransitionStatus()};Ds.version="19.2.0"});var Hf=ae((vwt,wW)=>{"use strict";function TW(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(TW)}catch{}}TW(),wW.exports=SW()});var MZ=ae(gI=>{"use strict";var mi=bW(),XX=Le(),EHe=Hf();function Be(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var r=2;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function YX(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function YS(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function JX(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function ZX(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function CW(e){if(YS(e)!==e)throw Error(Be(188))}function IHe(e){var t=e.alternate;if(!t){if(t=YS(e),t===null)throw Error(Be(188));return t!==e?null:e}for(var r=e,n=t;;){var a=r.return;if(a===null)break;var i=a.alternate;if(i===null){if(n=a.return,n!==null){r=n;continue}break}if(a.child===i.child){for(i=a.child;i;){if(i===r)return CW(a),e;if(i===n)return CW(a),t;i=i.sibling}throw Error(Be(188))}if(r.return!==n.return)r=a,n=i;else{for(var s=!1,o=a.child;o;){if(o===r){s=!0,r=a,n=i;break}if(o===n){s=!0,n=a,r=i;break}o=o.sibling}if(!s){for(o=i.child;o;){if(o===r){s=!0,r=i,n=a;break}if(o===n){s=!0,n=i,r=a;break}o=o.sibling}if(!s)throw Error(Be(189))}}if(r.alternate!==n)throw Error(Be(190))}if(r.tag!==3)throw Error(Be(188));return r.stateNode.current===r?e:t}function QX(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=QX(e),t!==null)return t;e=e.sibling}return null}var Xn=Object.assign,AHe=Symbol.for("react.element"),GP=Symbol.for("react.transitional.element"),xS=Symbol.for("react.portal"),rx=Symbol.for("react.fragment"),eY=Symbol.for("react.strict_mode"),jO=Symbol.for("react.profiler"),tY=Symbol.for("react.consumer"),hd=Symbol.for("react.context"),MF=Symbol.for("react.forward_ref"),zO=Symbol.for("react.suspense"),UO=Symbol.for("react.suspense_list"),OF=Symbol.for("react.memo"),Gf=Symbol.for("react.lazy");Symbol.for("react.scope");var VO=Symbol.for("react.activity");Symbol.for("react.legacy_hidden");Symbol.for("react.tracing_marker");var NHe=Symbol.for("react.memo_cache_sentinel");Symbol.for("react.view_transition");var PW=Symbol.iterator;function dS(e){return e===null||typeof e!="object"?null:(e=PW&&e[PW]||e["@@iterator"],typeof e=="function"?e:null)}var kHe=Symbol.for("react.client.reference");function qO(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===kHe?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case rx:return"Fragment";case jO:return"Profiler";case eY:return"StrictMode";case zO:return"Suspense";case UO:return"SuspenseList";case VO:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case xS:return"Portal";case hd:return e.displayName||"Context";case tY:return(e._context.displayName||"Context")+".Consumer";case MF:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case OF:return t=e.displayName||null,t!==null?t:qO(e.type)||"Memo";case Gf:t=e._payload,e=e._init;try{return qO(e(t))}catch{}}return null}var bS=Array.isArray,Qt=XX.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,dn=EHe.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,uh={pending:!1,data:null,method:null,action:null},HO=[],nx=-1;function fu(e){return{current:e}}function Mi(e){0>nx||(e.current=HO[nx],HO[nx]=null,nx--)}function Fn(e,t){nx++,HO[nx]=e.current,e.current=t}var du=fu(null),OS=fu(null),np=fu(null),PE=fu(null);function EE(e,t){switch(Fn(np,t),Fn(OS,e),Fn(du,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?LX(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=LX(t),e=SZ(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Mi(du),Fn(du,e)}function Sx(){Mi(du),Mi(OS),Mi(np)}function GO(e){e.memoizedState!==null&&Fn(PE,e);var t=du.current,r=SZ(t,e.type);t!==r&&(Fn(OS,e),Fn(du,r))}function IE(e){OS.current===e&&(Mi(du),Mi(OS)),PE.current===e&&(Mi(PE),KS._currentValue=uh)}var oO,EW;function sh(e){if(oO===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);oO=t&&t[1]||"",EW=-1<r.stack.indexOf(`
at`)?" (<anonymous>)":-1<r.stack.indexOf("@")?"@unknown:0:0":""}return`
`+oO+e+EW}var lO=!1;function cO(e,t){if(!e||lO)return"";lO=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var n={DetermineComponentFrameRoot:function(){try{if(t){var d=function(){throw Error()};if(Object.defineProperty(d.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(d,[])}catch(p){var f=p}Reflect.construct(e,[],d)}else{try{d.call()}catch(p){f=p}e.call(d.prototype)}}else{try{throw Error()}catch(p){f=p}(d=e())&&typeof d.catch=="function"&&d.catch(function(){})}}catch(p){if(p&&f&&typeof p.stack=="string")return[p.stack,f.stack]}return[null,null]}};n.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var a=Object.getOwnPropertyDescriptor(n.DetermineComponentFrameRoot,"name");a&&a.configurable&&Object.defineProperty(n.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var i=n.DetermineComponentFrameRoot(),s=i[0],o=i[1];if(s&&o){var l=s.split(`
`),c=o.split(`
`);for(a=n=0;n<l.length&&!l[n].includes("DetermineComponentFrameRoot");)n++;for(;a<c.length&&!c[a].includes("DetermineComponentFrameRoot");)a++;if(n===l.length||a===c.length)for(n=l.length-1,a=c.length-1;1<=n&&0<=a&&l[n]!==c[a];)a--;for(;1<=n&&0<=a;n--,a--)if(l[n]!==c[a]){if(n!==1||a!==1)do if(n--,a--,0>a||l[n]!==c[a]){var u=`
`+l[n].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}while(1<=n&&0<=a);break}}}finally{lO=!1,Error.prepareStackTrace=r}return(r=e?e.displayName||e.name:"")?sh(r):""}function _He(e,t){switch(e.tag){case 26:case 27:case 5:return sh(e.type);case 16:return sh("Lazy");case 13:return e.child!==t&&t!==null?sh("Suspense Fallback"):sh("Suspense");case 19:return sh("SuspenseList");case 0:case 15:return cO(e.type,!1);case 11:return cO(e.type.render,!1);case 1:return cO(e.type,!0);case 31:return sh("Activity");default:return""}}function IW(e){try{var t="",r=null;do t+=_He(e,r),r=e,e=e.return;while(e);return t}catch(n){return`
Error generating stack: `+n.message+`
`+n.stack}}var KO=Object.prototype.hasOwnProperty,FF=mi.unstable_scheduleCallback,uO=mi.unstable_cancelCallback,LHe=mi.unstable_shouldYield,RHe=mi.unstable_requestPaint,zo=mi.unstable_now,DHe=mi.unstable_getCurrentPriorityLevel,rY=mi.unstable_ImmediatePriority,nY=mi.unstable_UserBlockingPriority,AE=mi.unstable_NormalPriority,MHe=mi.unstable_LowPriority,aY=mi.unstable_IdlePriority,OHe=mi.log,FHe=mi.unstable_setDisableYieldValue,JS=null,Uo=null;function Zf(e){if(typeof OHe=="function"&&FHe(e),Uo&&typeof Uo.setStrictMode=="function")try{Uo.setStrictMode(JS,e)}catch{}}var Vo=Math.clz32?Math.clz32:jHe,BHe=Math.log,$He=Math.LN2;function jHe(e){return e>>>=0,e===0?32:31-(BHe(e)/$He|0)|0}var KP=256,WP=262144,XP=4194304;function oh(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function eI(e,t,r){var n=e.pendingLanes;if(n===0)return 0;var a=0,i=e.suspendedLanes,s=e.pingedLanes;e=e.warmLanes;var o=n&134217727;return o!==0?(n=o&~i,n!==0?a=oh(n):(s&=o,s!==0?a=oh(s):r||(r=o&~e,r!==0&&(a=oh(r))))):(o=n&~i,o!==0?a=oh(o):s!==0?a=oh(s):r||(r=n&~e,r!==0&&(a=oh(r)))),a===0?0:t!==0&&t!==a&&!(t&i)&&(i=a&-a,r=t&-t,i>=r||i===32&&(r&4194048)!==0)?t:a}function ZS(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function zHe(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function iY(){var e=XP;return XP<<=1,!(XP&62914560)&&(XP=4194304),e}function dO(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function QS(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function UHe(e,t,r,n,a,i){var s=e.pendingLanes;e.pendingLanes=r,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=r,e.entangledLanes&=r,e.errorRecoveryDisabledLanes&=r,e.shellSuspendCounter=0;var o=e.entanglements,l=e.expirationTimes,c=e.hiddenUpdates;for(r=s&~r;0<r;){var u=31-Vo(r),d=1<<u;o[u]=0,l[u]=-1;var f=c[u];if(f!==null)for(c[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}r&=~d}n!==0&&sY(e,n,0),i!==0&&a===0&&e.tag!==0&&(e.suspendedLanes|=i&~(s&~t))}function sY(e,t,r){e.pendingLanes|=t,e.suspendedLanes&=~t;var n=31-Vo(t);e.entangledLanes|=t,e.entanglements[n]=e.entanglements[n]|1073741824|r&261930}function oY(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-Vo(r),a=1<<n;a&t|e[n]&t&&(e[n]|=t),r&=~a}}function lY(e,t){var r=t&-t;return r=r&42?1:BF(r),r&(e.suspendedLanes|t)?0:r}function BF(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function $F(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function cY(){var e=dn.p;return e!==0?e:(e=window.event,e===void 0?32:LZ(e.type))}function AW(e,t){var r=dn.p;try{return dn.p=e,t()}finally{dn.p=r}}var gp=Math.random().toString(36).slice(2),Ji="__reactFiber$"+gp,mo="__reactProps$"+gp,Lx="__reactContainer$"+gp,WO="__reactEvents$"+gp,VHe="__reactListeners$"+gp,qHe="__reactHandles$"+gp,NW="__reactResources$"+gp,eT="__reactMarker$"+gp;function jF(e){delete e[Ji],delete e[mo],delete e[WO],delete e[VHe],delete e[qHe]}function ax(e){var t=e[Ji];if(t)return t;for(var r=e.parentNode;r;){if(t=r[Lx]||r[Ji]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=FX(e);e!==null;){if(r=e[Ji])return r;e=FX(e)}return t}e=r,r=e.parentNode}return null}function Rx(e){if(e=e[Ji]||e[Lx]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function vS(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(Be(33))}function mx(e){var t=e[NW];return t||(t=e[NW]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Di(e){e[eT]=!0}var uY=new Set,dY={};function vh(e,t){Tx(e,t),Tx(e+"Capture",t)}function Tx(e,t){for(dY[e]=t,e=0;e<t.length;e++)uY.add(t[e])}var HHe=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),kW={},_W={};function GHe(e){return KO.call(_W,e)?!0:KO.call(kW,e)?!1:HHe.test(e)?_W[e]=!0:(kW[e]=!0,!1)}function uE(e,t,r){if(GHe(t))if(r===null)e.removeAttribute(t);else{switch(typeof r){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var n=t.toLowerCase().slice(0,5);if(n!=="data-"&&n!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+r)}}function YP(e,t,r){if(r===null)e.removeAttribute(t);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+r)}}function ld(e,t,r,n){if(n===null)e.removeAttribute(r);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(r);return}e.setAttributeNS(t,r,""+n)}}function kl(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function fY(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function KHe(e,t,r){var n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var a=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(s){r=""+s,i.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function XO(e){if(!e._valueTracker){var t=fY(e)?"checked":"value";e._valueTracker=KHe(e,t,""+e[t])}}function pY(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=fY(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function NE(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var WHe=/[\n"\\]/g;function Rl(e){return e.replace(WHe,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function YO(e,t,r,n,a,i,s,o){e.name="",s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"?e.type=s:e.removeAttribute("type"),t!=null?s==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+kl(t)):e.value!==""+kl(t)&&(e.value=""+kl(t)):s!=="submit"&&s!=="reset"||e.removeAttribute("value"),t!=null?JO(e,s,kl(t)):r!=null?JO(e,s,kl(r)):n!=null&&e.removeAttribute("value"),a==null&&i!=null&&(e.defaultChecked=!!i),a!=null&&(e.checked=a&&typeof a!="function"&&typeof a!="symbol"),o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"?e.name=""+kl(o):e.removeAttribute("name")}function mY(e,t,r,n,a,i,s,o){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.type=i),t!=null||r!=null){if(!(i!=="submit"&&i!=="reset"||t!=null)){XO(e);return}r=r!=null?""+kl(r):"",t=t!=null?""+kl(t):r,o||t===e.value||(e.value=t),e.defaultValue=t}n=n??a,n=typeof n!="function"&&typeof n!="symbol"&&!!n,e.checked=o?e.checked:!!n,e.defaultChecked=!!n,s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"&&(e.name=s),XO(e)}function JO(e,t,r){t==="number"&&NE(e.ownerDocument)===e||e.defaultValue===""+r||(e.defaultValue=""+r)}function hx(e,t,r,n){if(e=e.options,t){t={};for(var a=0;a<r.length;a++)t["$"+r[a]]=!0;for(r=0;r<e.length;r++)a=t.hasOwnProperty("$"+e[r].value),e[r].selected!==a&&(e[r].selected=a),a&&n&&(e[r].defaultSelected=!0)}else{for(r=""+kl(r),t=null,a=0;a<e.length;a++){if(e[a].value===r){e[a].selected=!0,n&&(e[a].defaultSelected=!0);return}t!==null||e[a].disabled||(t=e[a])}t!==null&&(t.selected=!0)}}function hY(e,t,r){if(t!=null&&(t=""+kl(t),t!==e.value&&(e.value=t),r==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=r!=null?""+kl(r):""}function gY(e,t,r,n){if(t==null){if(n!=null){if(r!=null)throw Error(Be(92));if(bS(n)){if(1<n.length)throw Error(Be(93));n=n[0]}r=n}r==null&&(r=""),t=r}r=kl(t),e.defaultValue=r,n=e.textContent,n===r&&n!==""&&n!==null&&(e.value=n),XO(e)}function wx(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var XHe=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function LW(e,t,r){var n=t.indexOf("--")===0;r==null||typeof r=="boolean"||r===""?n?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":n?e.setProperty(t,r):typeof r!="number"||r===0||XHe.has(t)?t==="float"?e.cssFloat=r:e[t]=(""+r).trim():e[t]=r+"px"}function yY(e,t,r){if(t!=null&&typeof t!="object")throw Error(Be(62));if(e=e.style,r!=null){for(var n in r)!r.hasOwnProperty(n)||t!=null&&t.hasOwnProperty(n)||(n.indexOf("--")===0?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="");for(var a in t)n=t[a],t.hasOwnProperty(a)&&r[a]!==n&&LW(e,a,n)}else for(var i in t)t.hasOwnProperty(i)&&LW(e,i,t[i])}function zF(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var YHe=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),JHe=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function dE(e){return JHe.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function gd(){}var ZO=null;function UF(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ix=null,gx=null;function RW(e){var t=Rx(e);if(t&&(e=t.stateNode)){var r=e[mo]||null;e:switch(e=t.stateNode,t.type){case"input":if(YO(e,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll('input[name="'+Rl(""+t)+'"][type="radio"]'),t=0;t<r.length;t++){var n=r[t];if(n!==e&&n.form===e.form){var a=n[mo]||null;if(!a)throw Error(Be(90));YO(n,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<r.length;t++)n=r[t],n.form===e.form&&pY(n)}break e;case"textarea":hY(e,r.value,r.defaultValue);break e;case"select":t=r.value,t!=null&&hx(e,!!r.multiple,t,!1)}}}var fO=!1;function xY(e,t,r){if(fO)return e(t,r);fO=!0;try{var n=e(t);return n}finally{if(fO=!1,(ix!==null||gx!==null)&&(fI(),ix&&(t=ix,e=gx,gx=ix=null,RW(t),e)))for(t=0;t<e.length;t++)RW(e[t])}}function FS(e,t){var r=e.stateNode;if(r===null)return null;var n=r[mo]||null;if(n===null)return null;r=n[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(Be(231,t,typeof r));return r}var Sd=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),QO=!1;if(Sd)try{Jy={},Object.defineProperty(Jy,"passive",{get:function(){QO=!0}}),window.addEventListener("test",Jy,Jy),window.removeEventListener("test",Jy,Jy)}catch{QO=!1}var Jy,Qf=null,VF=null,fE=null;function bY(){if(fE)return fE;var e,t=VF,r=t.length,n,a="value"in Qf?Qf.value:Qf.textContent,i=a.length;for(e=0;e<r&&t[e]===a[e];e++);var s=r-e;for(n=1;n<=s&&t[r-n]===a[i-n];n++);return fE=a.slice(e,1<n?1-n:void 0)}function pE(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function JP(){return!0}function DW(){return!1}function ho(e){function t(r,n,a,i,s){this._reactName=r,this._targetInst=a,this.type=n,this.nativeEvent=i,this.target=s,this.currentTarget=null;for(var o in e)e.hasOwnProperty(o)&&(r=e[o],this[o]=r?r(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?JP:DW,this.isPropagationStopped=DW,this}return Xn(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=JP)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=JP)},persist:function(){},isPersistent:JP}),t}var Sh={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},tI=ho(Sh),tT=Xn({},Sh,{view:0,detail:0}),ZHe=ho(tT),pO,mO,fS,rI=Xn({},tT,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:qF,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==fS&&(fS&&e.type==="mousemove"?(pO=e.screenX-fS.screenX,mO=e.screenY-fS.screenY):mO=pO=0,fS=e),pO)},movementY:function(e){return"movementY"in e?e.movementY:mO}}),MW=ho(rI),QHe=Xn({},rI,{dataTransfer:0}),e7e=ho(QHe),t7e=Xn({},tT,{relatedTarget:0}),hO=ho(t7e),r7e=Xn({},Sh,{animationName:0,elapsedTime:0,pseudoElement:0}),n7e=ho(r7e),a7e=Xn({},Sh,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),i7e=ho(a7e),s7e=Xn({},Sh,{data:0}),OW=ho(s7e),o7e={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},l7e={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},c7e={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function u7e(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=c7e[e])?!!t[e]:!1}function qF(){return u7e}var d7e=Xn({},tT,{key:function(e){if(e.key){var t=o7e[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=pE(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?l7e[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:qF,charCode:function(e){return e.type==="keypress"?pE(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?pE(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),f7e=ho(d7e),p7e=Xn({},rI,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),FW=ho(p7e),m7e=Xn({},tT,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:qF}),h7e=ho(m7e),g7e=Xn({},Sh,{propertyName:0,elapsedTime:0,pseudoElement:0}),y7e=ho(g7e),x7e=Xn({},rI,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),b7e=ho(x7e),v7e=Xn({},Sh,{newState:0,oldState:0}),S7e=ho(v7e),T7e=[9,13,27,32],HF=Sd&&"CompositionEvent"in window,wS=null;Sd&&"documentMode"in document&&(wS=document.documentMode);var w7e=Sd&&"TextEvent"in window&&!wS,vY=Sd&&(!HF||wS&&8<wS&&11>=wS),BW=String.fromCharCode(32),$W=!1;function SY(e,t){switch(e){case"keyup":return T7e.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function TY(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var sx=!1;function C7e(e,t){switch(e){case"compositionend":return TY(t);case"keypress":return t.which!==32?null:($W=!0,BW);case"textInput":return e=t.data,e===BW&&$W?null:e;default:return null}}function P7e(e,t){if(sx)return e==="compositionend"||!HF&&SY(e,t)?(e=bY(),fE=VF=Qf=null,sx=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return vY&&t.locale!=="ko"?null:t.data;default:return null}}var E7e={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function jW(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!E7e[e.type]:t==="textarea"}function wY(e,t,r,n){ix?gx?gx.push(n):gx=[n]:ix=n,t=KE(t,"onChange"),0<t.length&&(r=new tI("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var CS=null,BS=null;function I7e(e){xZ(e,0)}function nI(e){var t=vS(e);if(pY(t))return e}function zW(e,t){if(e==="change")return t}var CY=!1;Sd&&(Sd?(QP="oninput"in document,QP||(gO=document.createElement("div"),gO.setAttribute("oninput","return;"),QP=typeof gO.oninput=="function"),ZP=QP):ZP=!1,CY=ZP&&(!document.documentMode||9<document.documentMode));var ZP,QP,gO;function UW(){CS&&(CS.detachEvent("onpropertychange",PY),BS=CS=null)}function PY(e){if(e.propertyName==="value"&&nI(BS)){var t=[];wY(t,BS,e,UF(e)),xY(I7e,t)}}function A7e(e,t,r){e==="focusin"?(UW(),CS=t,BS=r,CS.attachEvent("onpropertychange",PY)):e==="focusout"&&UW()}function N7e(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return nI(BS)}function k7e(e,t){if(e==="click")return nI(t)}function _7e(e,t){if(e==="input"||e==="change")return nI(t)}function L7e(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ho=typeof Object.is=="function"?Object.is:L7e;function $S(e,t){if(Ho(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var a=r[n];if(!KO.call(t,a)||!Ho(e[a],t[a]))return!1}return!0}function VW(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function qW(e,t){var r=VW(e);e=0;for(var n;r;){if(r.nodeType===3){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=VW(r)}}function EY(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?EY(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function IY(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=NE(e.document);t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=NE(e.document)}return t}function GF(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var R7e=Sd&&"documentMode"in document&&11>=document.documentMode,ox=null,eF=null,PS=null,tF=!1;function HW(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;tF||ox==null||ox!==NE(n)||(n=ox,"selectionStart"in n&&GF(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),PS&&$S(PS,n)||(PS=n,n=KE(eF,"onSelect"),0<n.length&&(t=new tI("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=ox)))}function ih(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var lx={animationend:ih("Animation","AnimationEnd"),animationiteration:ih("Animation","AnimationIteration"),animationstart:ih("Animation","AnimationStart"),transitionrun:ih("Transition","TransitionRun"),transitionstart:ih("Transition","TransitionStart"),transitioncancel:ih("Transition","TransitionCancel"),transitionend:ih("Transition","TransitionEnd")},yO={},AY={};Sd&&(AY=document.createElement("div").style,"AnimationEvent"in window||(delete lx.animationend.animation,delete lx.animationiteration.animation,delete lx.animationstart.animation),"TransitionEvent"in window||delete lx.transitionend.transition);function Th(e){if(yO[e])return yO[e];if(!lx[e])return e;var t=lx[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in AY)return yO[e]=t[r];return e}var NY=Th("animationend"),kY=Th("animationiteration"),_Y=Th("animationstart"),D7e=Th("transitionrun"),M7e=Th("transitionstart"),O7e=Th("transitioncancel"),LY=Th("transitionend"),RY=new Map,rF="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");rF.push("scrollEnd");function vc(e,t){RY.set(e,t),vh(t,[e])}var kE=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}},Nl=[],cx=0,KF=0;function aI(){for(var e=cx,t=KF=cx=0;t<e;){var r=Nl[t];Nl[t++]=null;var n=Nl[t];Nl[t++]=null;var a=Nl[t];Nl[t++]=null;var i=Nl[t];if(Nl[t++]=null,n!==null&&a!==null){var s=n.pending;s===null?a.next=a:(a.next=s.next,s.next=a),n.pending=a}i!==0&&DY(r,a,i)}}function iI(e,t,r,n){Nl[cx++]=e,Nl[cx++]=t,Nl[cx++]=r,Nl[cx++]=n,KF|=n,e.lanes|=n,e=e.alternate,e!==null&&(e.lanes|=n)}function WF(e,t,r,n){return iI(e,t,r,n),_E(e)}function wh(e,t){return iI(e,null,null,t),_E(e)}function DY(e,t,r){e.lanes|=r;var n=e.alternate;n!==null&&(n.lanes|=r);for(var a=!1,i=e.return;i!==null;)i.childLanes|=r,n=i.alternate,n!==null&&(n.childLanes|=r),i.tag===22&&(e=i.stateNode,e===null||e._visibility&1||(a=!0)),e=i,i=i.return;return e.tag===3?(i=e.stateNode,a&&t!==null&&(a=31-Vo(r),e=i.hiddenUpdates,n=e[a],n===null?e[a]=[t]:n.push(t),t.lane=r|536870912),i):null}function _E(e){if(50<DS)throw DS=0,wF=null,Error(Be(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ux={};function F7e(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function $o(e,t,r,n){return new F7e(e,t,r,n)}function XF(e){return e=e.prototype,!(!e||!e.isReactComponent)}function xd(e,t){var r=e.alternate;return r===null?(r=$o(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&65011712,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r.refCleanup=e.refCleanup,r}function MY(e,t){e.flags&=65011714;var r=e.alternate;return r===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=r.childLanes,e.lanes=r.lanes,e.child=r.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=r.memoizedProps,e.memoizedState=r.memoizedState,e.updateQueue=r.updateQueue,e.type=r.type,t=r.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function mE(e,t,r,n,a,i){var s=0;if(n=e,typeof e=="function")XF(e)&&(s=1);else if(typeof e=="string")s=jGe(e,r,du.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case VO:return e=$o(31,r,t,a),e.elementType=VO,e.lanes=i,e;case rx:return dh(r.children,a,i,t);case eY:s=8,a|=24;break;case jO:return e=$o(12,r,t,a|2),e.elementType=jO,e.lanes=i,e;case zO:return e=$o(13,r,t,a),e.elementType=zO,e.lanes=i,e;case UO:return e=$o(19,r,t,a),e.elementType=UO,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case hd:s=10;break e;case tY:s=9;break e;case MF:s=11;break e;case OF:s=14;break e;case Gf:s=16,n=null;break e}s=29,r=Error(Be(130,e===null?"null":typeof e,"")),n=null}return t=$o(s,r,t,a),t.elementType=e,t.type=n,t.lanes=i,t}function dh(e,t,r,n){return e=$o(7,e,n,t),e.lanes=r,e}function xO(e,t,r){return e=$o(6,e,null,t),e.lanes=r,e}function OY(e){var t=$o(18,null,null,0);return t.stateNode=e,t}function bO(e,t,r){return t=$o(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var GW=new WeakMap;function Dl(e,t){if(typeof e=="object"&&e!==null){var r=GW.get(e);return r!==void 0?r:(t={value:e,source:t,stack:IW(t)},GW.set(e,t),t)}return{value:e,source:t,stack:IW(t)}}var dx=[],fx=0,LE=null,jS=0,_l=[],Ll=0,fp=null,lu=1,cu="";function pd(e,t){dx[fx++]=jS,dx[fx++]=LE,LE=e,jS=t}function FY(e,t,r){_l[Ll++]=lu,_l[Ll++]=cu,_l[Ll++]=fp,fp=e;var n=lu;e=cu;var a=32-Vo(n)-1;n&=~(1<<a),r+=1;var i=32-Vo(t)+a;if(30<i){var s=a-a%5;i=(n&(1<<s)-1).toString(32),n>>=s,a-=s,lu=1<<32-Vo(t)+a|r<<a|n,cu=i+e}else lu=1<<i|r<<a|n,cu=e}function YF(e){e.return!==null&&(pd(e,1),FY(e,1,0))}function JF(e){for(;e===LE;)LE=dx[--fx],dx[fx]=null,jS=dx[--fx],dx[fx]=null;for(;e===fp;)fp=_l[--Ll],_l[Ll]=null,cu=_l[--Ll],_l[Ll]=null,lu=_l[--Ll],_l[Ll]=null}function BY(e,t){_l[Ll++]=lu,_l[Ll++]=cu,_l[Ll++]=fp,lu=t.id,cu=t.overflow,fp=e}var Zi=null,Wn=null,qr=!1,ap=null,Ml=!1,nF=Error(Be(519));function pp(e){var t=Error(Be(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw zS(Dl(t,e)),nF}function KW(e){var t=e.stateNode,r=e.type,n=e.memoizedProps;switch(t[Ji]=e,t[mo]=n,r){case"dialog":Dr("cancel",t),Dr("close",t);break;case"iframe":case"object":case"embed":Dr("load",t);break;case"video":case"audio":for(r=0;r<HS.length;r++)Dr(HS[r],t);break;case"source":Dr("error",t);break;case"img":case"image":case"link":Dr("error",t),Dr("load",t);break;case"details":Dr("toggle",t);break;case"input":Dr("invalid",t),mY(t,n.value,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name,!0);break;case"select":Dr("invalid",t);break;case"textarea":Dr("invalid",t),gY(t,n.value,n.defaultValue,n.children)}r=n.children,typeof r!="string"&&typeof r!="number"&&typeof r!="bigint"||t.textContent===""+r||n.suppressHydrationWarning===!0||vZ(t.textContent,r)?(n.popover!=null&&(Dr("beforetoggle",t),Dr("toggle",t)),n.onScroll!=null&&Dr("scroll",t),n.onScrollEnd!=null&&Dr("scrollend",t),n.onClick!=null&&(t.onclick=gd),t=!0):t=!1,t||pp(e,!0)}function WW(e){for(Zi=e.return;Zi;)switch(Zi.tag){case 5:case 31:case 13:Ml=!1;return;case 27:case 3:Ml=!0;return;default:Zi=Zi.return}}function Zy(e){if(e!==Zi)return!1;if(!qr)return WW(e),qr=!0,!1;var t=e.tag,r;if((r=t!==3&&t!==27)&&((r=t===5)&&(r=e.type,r=!(r!=="form"&&r!=="button")||AF(e.type,e.memoizedProps)),r=!r),r&&Wn&&pp(e),WW(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(Be(317));Wn=OX(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(Be(317));Wn=OX(e)}else t===27?(t=Wn,yp(e.type)?(e=LF,LF=null,Wn=e):Wn=t):Wn=Zi?Fl(e.stateNode.nextSibling):null;return!0}function hh(){Wn=Zi=null,qr=!1}function vO(){var e=ap;return e!==null&&(fo===null?fo=e:fo.push.apply(fo,e),ap=null),e}function zS(e){ap===null?ap=[e]:ap.push(e)}var aF=fu(null),Ch=null,yd=null;function Wf(e,t,r){Fn(aF,t._currentValue),t._currentValue=r}function bd(e){e._currentValue=aF.current,Mi(aF)}function iF(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function sF(e,t,r,n){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var i=a.dependencies;if(i!==null){var s=a.child;i=i.firstContext;e:for(;i!==null;){var o=i;i=a;for(var l=0;l<t.length;l++)if(o.context===t[l]){i.lanes|=r,o=i.alternate,o!==null&&(o.lanes|=r),iF(i.return,r,e),n||(s=null);break e}i=o.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(Be(341));s.lanes|=r,i=s.alternate,i!==null&&(i.lanes|=r),iF(s,r,e),s=null}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function Dx(e,t,r,n){e=null;for(var a=t,i=!1;a!==null;){if(!i){if(a.flags&524288)i=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(Be(387));if(s=s.memoizedProps,s!==null){var o=a.type;Ho(a.pendingProps.value,s.value)||(e!==null?e.push(o):e=[o])}}else if(a===PE.current){if(s=a.alternate,s===null)throw Error(Be(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e!==null?e.push(KS):e=[KS])}a=a.return}e!==null&&sF(t,e,r,n),t.flags|=262144}function RE(e){for(e=e.firstContext;e!==null;){if(!Ho(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function gh(e){Ch=e,yd=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Qi(e){return $Y(Ch,e)}function eE(e,t){return Ch===null&&gh(e),$Y(e,t)}function $Y(e,t){var r=t._currentValue;if(t={context:t,memoizedValue:r,next:null},yd===null){if(e===null)throw Error(Be(308));yd=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else yd=yd.next=t;return r}var B7e=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(r,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(r){return r()})}},$7e=mi.unstable_scheduleCallback,j7e=mi.unstable_NormalPriority,Xa={$$typeof:hd,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ZF(){return{controller:new B7e,data:new Map,refCount:0}}function rT(e){e.refCount--,e.refCount===0&&$7e(j7e,function(){e.controller.abort()})}var ES=null,oF=0,Cx=0,yx=null;function z7e(e,t){if(ES===null){var r=ES=[];oF=0,Cx=w3(),yx={status:"pending",value:void 0,then:function(n){r.push(n)}}}return oF++,t.then(XW,XW),t}function XW(){if(--oF===0&&ES!==null){yx!==null&&(yx.status="fulfilled");var e=ES;ES=null,Cx=0,yx=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function U7e(e,t){var r=[],n={status:"pending",value:null,reason:null,then:function(a){r.push(a)}};return e.then(function(){n.status="fulfilled",n.value=t;for(var a=0;a<r.length;a++)(0,r[a])(t)},function(a){for(n.status="rejected",n.reason=a,a=0;a<r.length;a++)(0,r[a])(void 0)}),n}var YW=Qt.S;Qt.S=function(e,t){QJ=zo(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&z7e(e,t),YW!==null&&YW(e,t)};var fh=fu(null);function QF(){var e=fh.current;return e!==null?e:An.pooledCache}function hE(e,t){t===null?Fn(fh,fh.current):Fn(fh,t.pool)}function jY(){var e=QF();return e===null?null:{parent:Xa._currentValue,pool:e}}var Mx=Error(Be(460)),e3=Error(Be(474)),sI=Error(Be(542)),DE={then:function(){}};function JW(e){return e=e.status,e==="fulfilled"||e==="rejected"}function zY(e,t,r){switch(r=e[r],r===void 0?e.push(t):r!==t&&(t.then(gd,gd),t=r),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,QW(e),e;default:if(typeof t.status=="string")t.then(gd,gd);else{if(e=An,e!==null&&100<e.shellSuspendCounter)throw Error(Be(482));e=t,e.status="pending",e.then(function(n){if(t.status==="pending"){var a=t;a.status="fulfilled",a.value=n}},function(n){if(t.status==="pending"){var a=t;a.status="rejected",a.reason=n}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,QW(e),e}throw ph=t,Mx}}function lh(e){try{var t=e._init;return t(e._payload)}catch(r){throw r!==null&&typeof r=="object"&&typeof r.then=="function"?(ph=r,Mx):r}}var ph=null;function ZW(){if(ph===null)throw Error(Be(459));var e=ph;return ph=null,e}function QW(e){if(e===Mx||e===sI)throw Error(Be(483))}var xx=null,US=0;function tE(e){var t=US;return US+=1,xx===null&&(xx=[]),zY(xx,e,t)}function pS(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function rE(e,t){throw t.$$typeof===AHe?Error(Be(525)):(e=Object.prototype.toString.call(t),Error(Be(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function UY(e){function t(g,y){if(e){var b=g.deletions;b===null?(g.deletions=[y],g.flags|=16):b.push(y)}}function r(g,y){if(!e)return null;for(;y!==null;)t(g,y),y=y.sibling;return null}function n(g){for(var y=new Map;g!==null;)g.key!==null?y.set(g.key,g):y.set(g.index,g),g=g.sibling;return y}function a(g,y){return g=xd(g,y),g.index=0,g.sibling=null,g}function i(g,y,b){return g.index=b,e?(b=g.alternate,b!==null?(b=b.index,b<y?(g.flags|=67108866,y):b):(g.flags|=67108866,y)):(g.flags|=1048576,y)}function s(g){return e&&g.alternate===null&&(g.flags|=67108866),g}function o(g,y,b,S){return y===null||y.tag!==6?(y=xO(b,g.mode,S),y.return=g,y):(y=a(y,b),y.return=g,y)}function l(g,y,b,S){var w=b.type;return w===rx?u(g,y,b.props.children,S,b.key):y!==null&&(y.elementType===w||typeof w=="object"&&w!==null&&w.$$typeof===Gf&&lh(w)===y.type)?(y=a(y,b.props),pS(y,b),y.return=g,y):(y=mE(b.type,b.key,b.props,null,g.mode,S),pS(y,b),y.return=g,y)}function c(g,y,b,S){return y===null||y.tag!==4||y.stateNode.containerInfo!==b.containerInfo||y.stateNode.implementation!==b.implementation?(y=bO(b,g.mode,S),y.return=g,y):(y=a(y,b.children||[]),y.return=g,y)}function u(g,y,b,S,w){return y===null||y.tag!==7?(y=dh(b,g.mode,S,w),y.return=g,y):(y=a(y,b),y.return=g,y)}function d(g,y,b){if(typeof y=="string"&&y!==""||typeof y=="number"||typeof y=="bigint")return y=xO(""+y,g.mode,b),y.return=g,y;if(typeof y=="object"&&y!==null){switch(y.$$typeof){case GP:return b=mE(y.type,y.key,y.props,null,g.mode,b),pS(b,y),b.return=g,b;case xS:return y=bO(y,g.mode,b),y.return=g,y;case Gf:return y=lh(y),d(g,y,b)}if(bS(y)||dS(y))return y=dh(y,g.mode,b,null),y.return=g,y;if(typeof y.then=="function")return d(g,tE(y),b);if(y.$$typeof===hd)return d(g,eE(g,y),b);rE(g,y)}return null}function f(g,y,b,S){var w=y!==null?y.key:null;if(typeof b=="string"&&b!==""||typeof b=="number"||typeof b=="bigint")return w!==null?null:o(g,y,""+b,S);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case GP:return b.key===w?l(g,y,b,S):null;case xS:return b.key===w?c(g,y,b,S):null;case Gf:return b=lh(b),f(g,y,b,S)}if(bS(b)||dS(b))return w!==null?null:u(g,y,b,S,null);if(typeof b.then=="function")return f(g,y,tE(b),S);if(b.$$typeof===hd)return f(g,y,eE(g,b),S);rE(g,b)}return null}function p(g,y,b,S,w){if(typeof S=="string"&&S!==""||typeof S=="number"||typeof S=="bigint")return g=g.get(b)||null,o(y,g,""+S,w);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case GP:return g=g.get(S.key===null?b:S.key)||null,l(y,g,S,w);case xS:return g=g.get(S.key===null?b:S.key)||null,c(y,g,S,w);case Gf:return S=lh(S),p(g,y,b,S,w)}if(bS(S)||dS(S))return g=g.get(b)||null,u(y,g,S,w,null);if(typeof S.then=="function")return p(g,y,b,tE(S),w);if(S.$$typeof===hd)return p(g,y,b,eE(y,S),w);rE(y,S)}return null}function m(g,y,b,S){for(var w=null,E=null,C=y,N=y=0,_=null;C!==null&&N<b.length;N++){C.index>N?(_=C,C=null):_=C.sibling;var O=f(g,C,b[N],S);if(O===null){C===null&&(C=_);break}e&&C&&O.alternate===null&&t(g,C),y=i(O,y,N),E===null?w=O:E.sibling=O,E=O,C=_}if(N===b.length)return r(g,C),qr&&pd(g,N),w;if(C===null){for(;N<b.length;N++)C=d(g,b[N],S),C!==null&&(y=i(C,y,N),E===null?w=C:E.sibling=C,E=C);return qr&&pd(g,N),w}for(C=n(C);N<b.length;N++)_=p(C,g,N,b[N],S),_!==null&&(e&&_.alternate!==null&&C.delete(_.key===null?N:_.key),y=i(_,y,N),E===null?w=_:E.sibling=_,E=_);return e&&C.forEach(function(D){return t(g,D)}),qr&&pd(g,N),w}function h(g,y,b,S){if(b==null)throw Error(Be(151));for(var w=null,E=null,C=y,N=y=0,_=null,O=b.next();C!==null&&!O.done;N++,O=b.next()){C.index>N?(_=C,C=null):_=C.sibling;var D=f(g,C,O.value,S);if(D===null){C===null&&(C=_);break}e&&C&&D.alternate===null&&t(g,C),y=i(D,y,N),E===null?w=D:E.sibling=D,E=D,C=_}if(O.done)return r(g,C),qr&&pd(g,N),w;if(C===null){for(;!O.done;N++,O=b.next())O=d(g,O.value,S),O!==null&&(y=i(O,y,N),E===null?w=O:E.sibling=O,E=O);return qr&&pd(g,N),w}for(C=n(C);!O.done;N++,O=b.next())O=p(C,g,N,O.value,S),O!==null&&(e&&O.alternate!==null&&C.delete(O.key===null?N:O.key),y=i(O,y,N),E===null?w=O:E.sibling=O,E=O);return e&&C.forEach(function(W){return t(g,W)}),qr&&pd(g,N),w}function x(g,y,b,S){if(typeof b=="object"&&b!==null&&b.type===rx&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case GP:e:{for(var w=b.key;y!==null;){if(y.key===w){if(w=b.type,w===rx){if(y.tag===7){r(g,y.sibling),S=a(y,b.props.children),S.return=g,g=S;break e}}else if(y.elementType===w||typeof w=="object"&&w!==null&&w.$$typeof===Gf&&lh(w)===y.type){r(g,y.sibling),S=a(y,b.props),pS(S,b),S.return=g,g=S;break e}r(g,y);break}else t(g,y);y=y.sibling}b.type===rx?(S=dh(b.props.children,g.mode,S,b.key),S.return=g,g=S):(S=mE(b.type,b.key,b.props,null,g.mode,S),pS(S,b),S.return=g,g=S)}return s(g);case xS:e:{for(w=b.key;y!==null;){if(y.key===w)if(y.tag===4&&y.stateNode.containerInfo===b.containerInfo&&y.stateNode.implementation===b.implementation){r(g,y.sibling),S=a(y,b.children||[]),S.return=g,g=S;break e}else{r(g,y);break}else t(g,y);y=y.sibling}S=bO(b,g.mode,S),S.return=g,g=S}return s(g);case Gf:return b=lh(b),x(g,y,b,S)}if(bS(b))return m(g,y,b,S);if(dS(b)){if(w=dS(b),typeof w!="function")throw Error(Be(150));return b=w.call(b),h(g,y,b,S)}if(typeof b.then=="function")return x(g,y,tE(b),S);if(b.$$typeof===hd)return x(g,y,eE(g,b),S);rE(g,b)}return typeof b=="string"&&b!==""||typeof b=="number"||typeof b=="bigint"?(b=""+b,y!==null&&y.tag===6?(r(g,y.sibling),S=a(y,b),S.return=g,g=S):(r(g,y),S=xO(b,g.mode,S),S.return=g,g=S),s(g)):r(g,y)}return function(g,y,b,S){try{US=0;var w=x(g,y,b,S);return xx=null,w}catch(C){if(C===Mx||C===sI)throw C;var E=$o(29,C,null,g.mode);return E.lanes=S,E.return=g,E}finally{}}}var yh=UY(!0),VY=UY(!1),Kf=!1;function t3(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function lF(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function ip(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function sp(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,un&2){var a=n.pending;return a===null?t.next=t:(t.next=a.next,a.next=t),n.pending=t,t=_E(e),DY(e,null,r),t}return iI(e,n,t,r),_E(e)}function IS(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194048)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,oY(e,r)}}function SO(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var a=null,i=null;if(r=r.firstBaseUpdate,r!==null){do{var s={lane:r.lane,tag:r.tag,payload:r.payload,callback:null,next:null};i===null?a=i=s:i=i.next=s,r=r.next}while(r!==null);i===null?a=i=t:i=i.next=t}else a=i=t;r={baseState:n.baseState,firstBaseUpdate:a,lastBaseUpdate:i,shared:n.shared,callbacks:n.callbacks},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}var cF=!1;function AS(){if(cF){var e=yx;if(e!==null)throw e}}function NS(e,t,r,n){cF=!1;var a=e.updateQueue;Kf=!1;var i=a.firstBaseUpdate,s=a.lastBaseUpdate,o=a.shared.pending;if(o!==null){a.shared.pending=null;var l=o,c=l.next;l.next=null,s===null?i=c:s.next=c,s=l;var u=e.alternate;u!==null&&(u=u.updateQueue,o=u.lastBaseUpdate,o!==s&&(o===null?u.firstBaseUpdate=c:o.next=c,u.lastBaseUpdate=l))}if(i!==null){var d=a.baseState;s=0,u=c=l=null,o=i;do{var f=o.lane&-536870913,p=f!==o.lane;if(p?(zr&f)===f:(n&f)===f){f!==0&&f===Cx&&(cF=!0),u!==null&&(u=u.next={lane:0,tag:o.tag,payload:o.payload,callback:null,next:null});e:{var m=e,h=o;f=t;var x=r;switch(h.tag){case 1:if(m=h.payload,typeof m=="function"){d=m.call(x,d,f);break e}d=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=h.payload,f=typeof m=="function"?m.call(x,d,f):m,f==null)break e;d=Xn({},d,f);break e;case 2:Kf=!0}}f=o.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=a.callbacks,p===null?a.callbacks=[f]:p.push(f))}else p={lane:f,tag:o.tag,payload:o.payload,callback:o.callback,next:null},u===null?(c=u=p,l=d):u=u.next=p,s|=f;if(o=o.next,o===null){if(o=a.shared.pending,o===null)break;p=o,o=p.next,p.next=null,a.lastBaseUpdate=p,a.shared.pending=null}}while(1);u===null&&(l=d),a.baseState=l,a.firstBaseUpdate=c,a.lastBaseUpdate=u,i===null&&(a.shared.lanes=0),hp|=s,e.lanes=s,e.memoizedState=d}}function qY(e,t){if(typeof e!="function")throw Error(Be(191,e));e.call(t)}function HY(e,t){var r=e.callbacks;if(r!==null)for(e.callbacks=null,e=0;e<r.length;e++)qY(r[e],t)}var Px=fu(null),ME=fu(0);function eX(e,t){e=Pd,Fn(ME,e),Fn(Px,t),Pd=e|t.baseLanes}function uF(){Fn(ME,Pd),Fn(Px,Px.current)}function r3(){Pd=ME.current,Mi(Px),Mi(ME)}var Go=fu(null),Ol=null;function Xf(e){var t=e.alternate;Fn(Oa,Oa.current&1),Fn(Go,e),Ol===null&&(t===null||Px.current!==null||t.memoizedState!==null)&&(Ol=e)}function dF(e){Fn(Oa,Oa.current),Fn(Go,e),Ol===null&&(Ol=e)}function GY(e){e.tag===22?(Fn(Oa,Oa.current),Fn(Go,e),Ol===null&&(Ol=e)):Yf(e)}function Yf(){Fn(Oa,Oa.current),Fn(Go,Go.current)}function Bo(e){Mi(Go),Ol===e&&(Ol=null),Mi(Oa)}var Oa=fu(0);function OE(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||kF(r)||_F(r)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Td=0,br=null,Cn=null,Ka=null,FE=!1,bx=!1,xh=!1,BE=0,VS=0,vx=null,V7e=0;function wa(){throw Error(Be(321))}function n3(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!Ho(e[r],t[r]))return!1;return!0}function a3(e,t,r,n,a,i){return Td=i,br=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Qt.H=e===null||e.memoizedState===null?wJ:h3,xh=!1,i=r(n,a),xh=!1,bx&&(i=WY(t,r,n,a)),KY(e),i}function KY(e){Qt.H=qS;var t=Cn!==null&&Cn.next!==null;if(Td=0,Ka=Cn=br=null,FE=!1,VS=0,vx=null,t)throw Error(Be(300));e===null||Ya||(e=e.dependencies,e!==null&&RE(e)&&(Ya=!0))}function WY(e,t,r,n){br=e;var a=0;do{if(bx&&(vx=null),VS=0,bx=!1,25<=a)throw Error(Be(301));if(a+=1,Ka=Cn=null,e.updateQueue!=null){var i=e.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,i.memoCache!=null&&(i.memoCache.index=0)}Qt.H=CJ,i=t(r,n)}while(bx);return i}function q7e(){var e=Qt.H,t=e.useState()[0];return t=typeof t.then=="function"?nT(t):t,e=e.useState()[0],(Cn!==null?Cn.memoizedState:null)!==e&&(br.flags|=1024),t}function i3(){var e=BE!==0;return BE=0,e}function s3(e,t,r){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~r}function o3(e){if(FE){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}FE=!1}Td=0,Ka=Cn=br=null,bx=!1,VS=BE=0,vx=null}function Ms(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ka===null?br.memoizedState=Ka=e:Ka=Ka.next=e,Ka}function Fa(){if(Cn===null){var e=br.alternate;e=e!==null?e.memoizedState:null}else e=Cn.next;var t=Ka===null?br.memoizedState:Ka.next;if(t!==null)Ka=t,Cn=e;else{if(e===null)throw br.alternate===null?Error(Be(467)):Error(Be(310));Cn=e,e={memoizedState:Cn.memoizedState,baseState:Cn.baseState,baseQueue:Cn.baseQueue,queue:Cn.queue,next:null},Ka===null?br.memoizedState=Ka=e:Ka=Ka.next=e}return Ka}function oI(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function nT(e){var t=VS;return VS+=1,vx===null&&(vx=[]),e=zY(vx,e,t),t=br,(Ka===null?t.memoizedState:Ka.next)===null&&(t=t.alternate,Qt.H=t===null||t.memoizedState===null?wJ:h3),e}function lI(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return nT(e);if(e.$$typeof===hd)return Qi(e)}throw Error(Be(438,String(e)))}function l3(e){var t=null,r=br.updateQueue;if(r!==null&&(t=r.memoCache),t==null){var n=br.alternate;n!==null&&(n=n.updateQueue,n!==null&&(n=n.memoCache,n!=null&&(t={data:n.data.map(function(a){return a.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),r===null&&(r=oI(),br.updateQueue=r),r.memoCache=t,r=t.data[t.index],r===void 0)for(r=t.data[t.index]=Array(e),n=0;n<e;n++)r[n]=NHe;return t.index++,r}function wd(e,t){return typeof t=="function"?t(e):t}function gE(e){var t=Fa();return c3(t,Cn,e)}function c3(e,t,r){var n=e.queue;if(n===null)throw Error(Be(311));n.lastRenderedReducer=r;var a=e.baseQueue,i=n.pending;if(i!==null){if(a!==null){var s=a.next;a.next=i.next,i.next=s}t.baseQueue=a=i,n.pending=null}if(i=e.baseState,a===null)e.memoizedState=i;else{t=a.next;var o=s=null,l=null,c=t,u=!1;do{var d=c.lane&-536870913;if(d!==c.lane?(zr&d)===d:(Td&d)===d){var f=c.revertLane;if(f===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),d===Cx&&(u=!0);else if((Td&f)===f){c=c.next,f===Cx&&(u=!0);continue}else d={lane:0,revertLane:c.revertLane,gesture:null,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null},l===null?(o=l=d,s=i):l=l.next=d,br.lanes|=f,hp|=f;d=c.action,xh&&r(i,d),i=c.hasEagerState?c.eagerState:r(i,d)}else f={lane:d,revertLane:c.revertLane,gesture:c.gesture,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null},l===null?(o=l=f,s=i):l=l.next=f,br.lanes|=d,hp|=d;c=c.next}while(c!==null&&c!==t);if(l===null?s=i:l.next=o,!Ho(i,e.memoizedState)&&(Ya=!0,u&&(r=yx,r!==null)))throw r;e.memoizedState=i,e.baseState=s,e.baseQueue=l,n.lastRenderedState=i}return a===null&&(n.lanes=0),[e.memoizedState,n.dispatch]}function TO(e){var t=Fa(),r=t.queue;if(r===null)throw Error(Be(311));r.lastRenderedReducer=e;var n=r.dispatch,a=r.pending,i=t.memoizedState;if(a!==null){r.pending=null;var s=a=a.next;do i=e(i,s.action),s=s.next;while(s!==a);Ho(i,t.memoizedState)||(Ya=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),r.lastRenderedState=i}return[i,n]}function XY(e,t,r){var n=br,a=Fa(),i=qr;if(i){if(r===void 0)throw Error(Be(407));r=r()}else r=t();var s=!Ho((Cn||a).memoizedState,r);if(s&&(a.memoizedState=r,Ya=!0),a=a.queue,u3(ZY.bind(null,n,a,e),[e]),a.getSnapshot!==t||s||Ka!==null&&Ka.memoizedState.tag&1){if(n.flags|=2048,Ex(9,{destroy:void 0},JY.bind(null,n,a,r,t),null),An===null)throw Error(Be(349));i||Td&127||YY(n,t,r)}return r}function YY(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=br.updateQueue,t===null?(t=oI(),br.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function JY(e,t,r,n){t.value=r,t.getSnapshot=n,QY(t)&&eJ(e)}function ZY(e,t,r){return r(function(){QY(t)&&eJ(e)})}function QY(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!Ho(e,r)}catch{return!0}}function eJ(e){var t=wh(e,2);t!==null&&po(t,e,2)}function fF(e){var t=Ms();if(typeof e=="function"){var r=e;if(e=r(),xh){Zf(!0);try{r()}finally{Zf(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:wd,lastRenderedState:e},t}function tJ(e,t,r,n){return e.baseState=r,c3(e,Cn,typeof n=="function"?n:wd)}function H7e(e,t,r,n,a){if(uI(e))throw Error(Be(485));if(e=t.action,e!==null){var i={payload:a,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(s){i.listeners.push(s)}};Qt.T!==null?r(!0):i.isTransition=!1,n(i),r=t.pending,r===null?(i.next=t.pending=i,rJ(t,i)):(i.next=r.next,t.pending=r.next=i)}}function rJ(e,t){var r=t.action,n=t.payload,a=e.state;if(t.isTransition){var i=Qt.T,s={};Qt.T=s;try{var o=r(a,n),l=Qt.S;l!==null&&l(s,o),tX(e,t,o)}catch(c){pF(e,t,c)}finally{i!==null&&s.types!==null&&(i.types=s.types),Qt.T=i}}else try{i=r(a,n),tX(e,t,i)}catch(c){pF(e,t,c)}}function tX(e,t,r){r!==null&&typeof r=="object"&&typeof r.then=="function"?r.then(function(n){rX(e,t,n)},function(n){return pF(e,t,n)}):rX(e,t,r)}function rX(e,t,r){t.status="fulfilled",t.value=r,nJ(t),e.state=r,t=e.pending,t!==null&&(r=t.next,r===t?e.pending=null:(r=r.next,t.next=r,rJ(e,r)))}function pF(e,t,r){var n=e.pending;if(e.pending=null,n!==null){n=n.next;do t.status="rejected",t.reason=r,nJ(t),t=t.next;while(t!==n)}e.action=null}function nJ(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function aJ(e,t){return t}function nX(e,t){if(qr){var r=An.formState;if(r!==null){e:{var n=br;if(qr){if(Wn){t:{for(var a=Wn,i=Ml;a.nodeType!==8;){if(!i){a=null;break t}if(a=Fl(a.nextSibling),a===null){a=null;break t}}i=a.data,a=i==="F!"||i==="F"?a:null}if(a){Wn=Fl(a.nextSibling),n=a.data==="F!";break e}}pp(n)}n=!1}n&&(t=r[0])}}return r=Ms(),r.memoizedState=r.baseState=t,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:aJ,lastRenderedState:t},r.queue=n,r=vJ.bind(null,br,n),n.dispatch=r,n=fF(!1),i=m3.bind(null,br,!1,n.queue),n=Ms(),a={state:t,dispatch:null,action:e,pending:null},n.queue=a,r=H7e.bind(null,br,a,i,r),a.dispatch=r,n.memoizedState=e,[t,r,!1]}function aX(e){var t=Fa();return iJ(t,Cn,e)}function iJ(e,t,r){if(t=c3(e,t,aJ)[0],e=gE(wd)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var n=nT(t)}catch(s){throw s===Mx?sI:s}else n=t;t=Fa();var a=t.queue,i=a.dispatch;return r!==t.memoizedState&&(br.flags|=2048,Ex(9,{destroy:void 0},G7e.bind(null,a,r),null)),[n,i,e]}function G7e(e,t){e.action=t}function iX(e){var t=Fa(),r=Cn;if(r!==null)return iJ(t,r,e);Fa(),t=t.memoizedState,r=Fa();var n=r.queue.dispatch;return r.memoizedState=e,[t,n,!1]}function Ex(e,t,r,n){return e={tag:e,create:r,deps:n,inst:t,next:null},t=br.updateQueue,t===null&&(t=oI(),br.updateQueue=t),r=t.lastEffect,r===null?t.lastEffect=e.next=e:(n=r.next,r.next=e,e.next=n,t.lastEffect=e),e}function sJ(){return Fa().memoizedState}function yE(e,t,r,n){var a=Ms();br.flags|=e,a.memoizedState=Ex(1|t,{destroy:void 0},r,n===void 0?null:n)}function cI(e,t,r,n){var a=Fa();n=n===void 0?null:n;var i=a.memoizedState.inst;Cn!==null&&n!==null&&n3(n,Cn.memoizedState.deps)?a.memoizedState=Ex(t,i,r,n):(br.flags|=e,a.memoizedState=Ex(1|t,i,r,n))}function sX(e,t){yE(8390656,8,e,t)}function u3(e,t){cI(2048,8,e,t)}function K7e(e){br.flags|=4;var t=br.updateQueue;if(t===null)t=oI(),br.updateQueue=t,t.events=[e];else{var r=t.events;r===null?t.events=[e]:r.push(e)}}function oJ(e){var t=Fa().memoizedState;return K7e({ref:t,nextImpl:e}),function(){if(un&2)throw Error(Be(440));return t.impl.apply(void 0,arguments)}}function lJ(e,t){return cI(4,2,e,t)}function cJ(e,t){return cI(4,4,e,t)}function uJ(e,t){if(typeof t=="function"){e=e();var r=t(e);return function(){typeof r=="function"?r():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function dJ(e,t,r){r=r!=null?r.concat([e]):null,cI(4,4,uJ.bind(null,t,e),r)}function d3(){}function fJ(e,t){var r=Fa();t=t===void 0?null:t;var n=r.memoizedState;return t!==null&&n3(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function pJ(e,t){var r=Fa();t=t===void 0?null:t;var n=r.memoizedState;if(t!==null&&n3(t,n[1]))return n[0];if(n=e(),xh){Zf(!0);try{e()}finally{Zf(!1)}}return r.memoizedState=[n,t],n}function f3(e,t,r){return r===void 0||Td&1073741824&&!(zr&261930)?e.memoizedState=t:(e.memoizedState=r,e=tZ(),br.lanes|=e,hp|=e,r)}function mJ(e,t,r,n){return Ho(r,t)?r:Px.current!==null?(e=f3(e,r,n),Ho(e,t)||(Ya=!0),e):!(Td&42)||Td&1073741824&&!(zr&261930)?(Ya=!0,e.memoizedState=r):(e=tZ(),br.lanes|=e,hp|=e,t)}function hJ(e,t,r,n,a){var i=dn.p;dn.p=i!==0&&8>i?i:8;var s=Qt.T,o={};Qt.T=o,m3(e,!1,t,r);try{var l=a(),c=Qt.S;if(c!==null&&c(o,l),l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=U7e(l,n);kS(e,t,u,qo(e))}else kS(e,t,n,qo(e))}catch(d){kS(e,t,{then:function(){},status:"rejected",reason:d},qo())}finally{dn.p=i,s!==null&&o.types!==null&&(s.types=o.types),Qt.T=s}}function W7e(){}function mF(e,t,r,n){if(e.tag!==5)throw Error(Be(476));var a=gJ(e).queue;hJ(e,a,t,uh,r===null?W7e:function(){return yJ(e),r(n)})}function gJ(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:uh,baseState:uh,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:wd,lastRenderedState:uh},next:null};var r={};return t.next={memoizedState:r,baseState:r,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:wd,lastRenderedState:r},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function yJ(e){var t=gJ(e);t.next===null&&(t=e.alternate.memoizedState),kS(e,t.next.queue,{},qo())}function p3(){return Qi(KS)}function xJ(){return Fa().memoizedState}function bJ(){return Fa().memoizedState}function X7e(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var r=qo();e=ip(r);var n=sp(t,e,r);n!==null&&(po(n,t,r),IS(n,t,r)),t={cache:ZF()},e.payload=t;return}t=t.return}}function Y7e(e,t,r){var n=qo();r={lane:n,revertLane:0,gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},uI(e)?SJ(t,r):(r=WF(e,t,r,n),r!==null&&(po(r,e,n),TJ(r,t,n)))}function vJ(e,t,r){var n=qo();kS(e,t,r,n)}function kS(e,t,r,n){var a={lane:n,revertLane:0,gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null};if(uI(e))SJ(t,a);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var s=t.lastRenderedState,o=i(s,r);if(a.hasEagerState=!0,a.eagerState=o,Ho(o,s))return iI(e,t,a,0),An===null&&aI(),!1}catch{}finally{}if(r=WF(e,t,a,n),r!==null)return po(r,e,n),TJ(r,t,n),!0}return!1}function m3(e,t,r,n){if(n={lane:2,revertLane:w3(),gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},uI(e)){if(t)throw Error(Be(479))}else t=WF(e,r,n,2),t!==null&&po(t,e,2)}function uI(e){var t=e.alternate;return e===br||t!==null&&t===br}function SJ(e,t){bx=FE=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function TJ(e,t,r){if(r&4194048){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,oY(e,r)}}var qS={readContext:Qi,use:lI,useCallback:wa,useContext:wa,useEffect:wa,useImperativeHandle:wa,useLayoutEffect:wa,useInsertionEffect:wa,useMemo:wa,useReducer:wa,useRef:wa,useState:wa,useDebugValue:wa,useDeferredValue:wa,useTransition:wa,useSyncExternalStore:wa,useId:wa,useHostTransitionStatus:wa,useFormState:wa,useActionState:wa,useOptimistic:wa,useMemoCache:wa,useCacheRefresh:wa};qS.useEffectEvent=wa;var wJ={readContext:Qi,use:lI,useCallback:function(e,t){return Ms().memoizedState=[e,t===void 0?null:t],e},useContext:Qi,useEffect:sX,useImperativeHandle:function(e,t,r){r=r!=null?r.concat([e]):null,yE(4194308,4,uJ.bind(null,t,e),r)},useLayoutEffect:function(e,t){return yE(4194308,4,e,t)},useInsertionEffect:function(e,t){yE(4,2,e,t)},useMemo:function(e,t){var r=Ms();t=t===void 0?null:t;var n=e();if(xh){Zf(!0);try{e()}finally{Zf(!1)}}return r.memoizedState=[n,t],n},useReducer:function(e,t,r){var n=Ms();if(r!==void 0){var a=r(t);if(xh){Zf(!0);try{r(t)}finally{Zf(!1)}}}else a=t;return n.memoizedState=n.baseState=a,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:a},n.queue=e,e=e.dispatch=Y7e.bind(null,br,e),[n.memoizedState,e]},useRef:function(e){var t=Ms();return e={current:e},t.memoizedState=e},useState:function(e){e=fF(e);var t=e.queue,r=vJ.bind(null,br,t);return t.dispatch=r,[e.memoizedState,r]},useDebugValue:d3,useDeferredValue:function(e,t){var r=Ms();return f3(r,e,t)},useTransition:function(){var e=fF(!1);return e=hJ.bind(null,br,e.queue,!0,!1),Ms().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,r){var n=br,a=Ms();if(qr){if(r===void 0)throw Error(Be(407));r=r()}else{if(r=t(),An===null)throw Error(Be(349));zr&127||YY(n,t,r)}a.memoizedState=r;var i={value:r,getSnapshot:t};return a.queue=i,sX(ZY.bind(null,n,i,e),[e]),n.flags|=2048,Ex(9,{destroy:void 0},JY.bind(null,n,i,r,t),null),r},useId:function(){var e=Ms(),t=An.identifierPrefix;if(qr){var r=cu,n=lu;r=(n&~(1<<32-Vo(n)-1)).toString(32)+r,t="_"+t+"R_"+r,r=BE++,0<r&&(t+="H"+r.toString(32)),t+="_"}else r=V7e++,t="_"+t+"r_"+r.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:p3,useFormState:nX,useActionState:nX,useOptimistic:function(e){var t=Ms();t.memoizedState=t.baseState=e;var r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=r,t=m3.bind(null,br,!0,r),r.dispatch=t,[e,t]},useMemoCache:l3,useCacheRefresh:function(){return Ms().memoizedState=X7e.bind(null,br)},useEffectEvent:function(e){var t=Ms(),r={impl:e};return t.memoizedState=r,function(){if(un&2)throw Error(Be(440));return r.impl.apply(void 0,arguments)}}},h3={readContext:Qi,use:lI,useCallback:fJ,useContext:Qi,useEffect:u3,useImperativeHandle:dJ,useInsertionEffect:lJ,useLayoutEffect:cJ,useMemo:pJ,useReducer:gE,useRef:sJ,useState:function(){return gE(wd)},useDebugValue:d3,useDeferredValue:function(e,t){var r=Fa();return mJ(r,Cn.memoizedState,e,t)},useTransition:function(){var e=gE(wd)[0],t=Fa().memoizedState;return[typeof e=="boolean"?e:nT(e),t]},useSyncExternalStore:XY,useId:xJ,useHostTransitionStatus:p3,useFormState:aX,useActionState:aX,useOptimistic:function(e,t){var r=Fa();return tJ(r,Cn,e,t)},useMemoCache:l3,useCacheRefresh:bJ};h3.useEffectEvent=oJ;var CJ={readContext:Qi,use:lI,useCallback:fJ,useContext:Qi,useEffect:u3,useImperativeHandle:dJ,useInsertionEffect:lJ,useLayoutEffect:cJ,useMemo:pJ,useReducer:TO,useRef:sJ,useState:function(){return TO(wd)},useDebugValue:d3,useDeferredValue:function(e,t){var r=Fa();return Cn===null?f3(r,e,t):mJ(r,Cn.memoizedState,e,t)},useTransition:function(){var e=TO(wd)[0],t=Fa().memoizedState;return[typeof e=="boolean"?e:nT(e),t]},useSyncExternalStore:XY,useId:xJ,useHostTransitionStatus:p3,useFormState:iX,useActionState:iX,useOptimistic:function(e,t){var r=Fa();return Cn!==null?tJ(r,Cn,e,t):(r.baseState=e,[e,r.queue.dispatch])},useMemoCache:l3,useCacheRefresh:bJ};CJ.useEffectEvent=oJ;function wO(e,t,r,n){t=e.memoizedState,r=r(n,t),r=r==null?t:Xn({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var hF={enqueueSetState:function(e,t,r){e=e._reactInternals;var n=qo(),a=ip(n);a.payload=t,r!=null&&(a.callback=r),t=sp(e,a,n),t!==null&&(po(t,e,n),IS(t,e,n))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=qo(),a=ip(n);a.tag=1,a.payload=t,r!=null&&(a.callback=r),t=sp(e,a,n),t!==null&&(po(t,e,n),IS(t,e,n))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=qo(),n=ip(r);n.tag=2,t!=null&&(n.callback=t),t=sp(e,n,r),t!==null&&(po(t,e,r),IS(t,e,r))}};function oX(e,t,r,n,a,i,s){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,i,s):t.prototype&&t.prototype.isPureReactComponent?!$S(r,n)||!$S(a,i):!0}function lX(e,t,r,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,n),t.state!==e&&hF.enqueueReplaceState(t,t.state,null)}function bh(e,t){var r=t;if("ref"in t){r={};for(var n in t)n!=="ref"&&(r[n]=t[n])}if(e=e.defaultProps){r===t&&(r=Xn({},r));for(var a in e)r[a]===void 0&&(r[a]=e[a])}return r}function PJ(e){kE(e)}function EJ(e){}function IJ(e){kE(e)}function $E(e,t){try{var r=e.onUncaughtError;r(t.value,{componentStack:t.stack})}catch(n){setTimeout(function(){throw n})}}function cX(e,t,r){try{var n=e.onCaughtError;n(r.value,{componentStack:r.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(a){setTimeout(function(){throw a})}}function gF(e,t,r){return r=ip(r),r.tag=3,r.payload={element:null},r.callback=function(){$E(e,t)},r}function AJ(e){return e=ip(e),e.tag=3,e}function NJ(e,t,r,n){var a=r.type.getDerivedStateFromError;if(typeof a=="function"){var i=n.value;e.payload=function(){return a(i)},e.callback=function(){cX(t,r,n)}}var s=r.stateNode;s!==null&&typeof s.componentDidCatch=="function"&&(e.callback=function(){cX(t,r,n),typeof a!="function"&&(op===null?op=new Set([this]):op.add(this));var o=n.stack;this.componentDidCatch(n.value,{componentStack:o!==null?o:""})})}function J7e(e,t,r,n,a){if(r.flags|=32768,n!==null&&typeof n=="object"&&typeof n.then=="function"){if(t=r.alternate,t!==null&&Dx(t,r,a,!0),r=Go.current,r!==null){switch(r.tag){case 31:case 13:return Ol===null?qE():r.alternate===null&&Ca===0&&(Ca=3),r.flags&=-257,r.flags|=65536,r.lanes=a,n===DE?r.flags|=16384:(t=r.updateQueue,t===null?r.updateQueue=new Set([n]):t.add(n),DO(e,n,a)),!1;case 22:return r.flags|=65536,n===DE?r.flags|=16384:(t=r.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([n])},r.updateQueue=t):(r=t.retryQueue,r===null?t.retryQueue=new Set([n]):r.add(n)),DO(e,n,a)),!1}throw Error(Be(435,r.tag))}return DO(e,n,a),qE(),!1}if(qr)return t=Go.current,t!==null?(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,n!==nF&&(e=Error(Be(422),{cause:n}),zS(Dl(e,r)))):(n!==nF&&(t=Error(Be(423),{cause:n}),zS(Dl(t,r))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,n=Dl(n,r),a=gF(e.stateNode,n,a),SO(e,a),Ca!==4&&(Ca=2)),!1;var i=Error(Be(520),{cause:n});if(i=Dl(i,r),RS===null?RS=[i]:RS.push(i),Ca!==4&&(Ca=2),t===null)return!0;n=Dl(n,r),r=t;do{switch(r.tag){case 3:return r.flags|=65536,e=a&-a,r.lanes|=e,e=gF(r.stateNode,n,e),SO(r,e),!1;case 1:if(t=r.type,i=r.stateNode,(r.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||i!==null&&typeof i.componentDidCatch=="function"&&(op===null||!op.has(i))))return r.flags|=65536,a&=-a,r.lanes|=a,a=AJ(a),NJ(a,e,r,n),SO(r,a),!1}r=r.return}while(r!==null);return!1}var g3=Error(Be(461)),Ya=!1;function Yi(e,t,r,n){t.child=e===null?VY(t,null,r,n):yh(t,e.child,r,n)}function uX(e,t,r,n,a){r=r.render;var i=t.ref;if("ref"in n){var s={};for(var o in n)o!=="ref"&&(s[o]=n[o])}else s=n;return gh(t),n=a3(e,t,r,s,i,a),o=i3(),e!==null&&!Ya?(s3(e,t,a),Cd(e,t,a)):(qr&&o&&YF(t),t.flags|=1,Yi(e,t,n,a),t.child)}function dX(e,t,r,n,a){if(e===null){var i=r.type;return typeof i=="function"&&!XF(i)&&i.defaultProps===void 0&&r.compare===null?(t.tag=15,t.type=i,kJ(e,t,i,n,a)):(e=mE(r.type,null,n,t,t.mode,a),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!y3(e,a)){var s=i.memoizedProps;if(r=r.compare,r=r!==null?r:$S,r(s,n)&&e.ref===t.ref)return Cd(e,t,a)}return t.flags|=1,e=xd(i,n),e.ref=t.ref,e.return=t,t.child=e}function kJ(e,t,r,n,a){if(e!==null){var i=e.memoizedProps;if($S(i,n)&&e.ref===t.ref)if(Ya=!1,t.pendingProps=n=i,y3(e,a))e.flags&131072&&(Ya=!0);else return t.lanes=e.lanes,Cd(e,t,a)}return yF(e,t,r,n,a)}function _J(e,t,r,n){var a=n.children,i=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.mode==="hidden"){if(t.flags&128){if(i=i!==null?i.baseLanes|r:r,e!==null){for(n=t.child=e.child,a=0;n!==null;)a=a|n.lanes|n.childLanes,n=n.sibling;n=a&~i}else n=0,t.child=null;return fX(e,t,i,r,n)}if(r&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&hE(t,i!==null?i.cachePool:null),i!==null?eX(t,i):uF(),GY(t);else return n=t.lanes=536870912,fX(e,t,i!==null?i.baseLanes|r:r,r,n)}else i!==null?(hE(t,i.cachePool),eX(t,i),Yf(t),t.memoizedState=null):(e!==null&&hE(t,null),uF(),Yf(t));return Yi(e,t,a,r),t.child}function SS(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function fX(e,t,r,n,a){var i=QF();return i=i===null?null:{parent:Xa._currentValue,pool:i},t.memoizedState={baseLanes:r,cachePool:i},e!==null&&hE(t,null),uF(),GY(t),e!==null&&Dx(e,t,n,!0),t.childLanes=a,null}function xE(e,t){return t=jE({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function pX(e,t,r){return yh(t,e.child,null,r),e=xE(t,t.pendingProps),e.flags|=2,Bo(t),t.memoizedState=null,e}function Z7e(e,t,r){var n=t.pendingProps,a=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(qr){if(n.mode==="hidden")return e=xE(t,n),t.lanes=536870912,SS(null,e);if(dF(t),(e=Wn)?(e=wZ(e,Ml),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:fp!==null?{id:lu,overflow:cu}:null,retryLane:536870912,hydrationErrors:null},r=OY(e),r.return=t,t.child=r,Zi=t,Wn=null)):e=null,e===null)throw pp(t);return t.lanes=536870912,null}return xE(t,n)}var i=e.memoizedState;if(i!==null){var s=i.dehydrated;if(dF(t),a)if(t.flags&256)t.flags&=-257,t=pX(e,t,r);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(Be(558));else if(Ya||Dx(e,t,r,!1),a=(r&e.childLanes)!==0,Ya||a){if(n=An,n!==null&&(s=lY(n,r),s!==0&&s!==i.retryLane))throw i.retryLane=s,wh(e,s),po(n,e,s),g3;qE(),t=pX(e,t,r)}else e=i.treeContext,Wn=Fl(s.nextSibling),Zi=t,qr=!0,ap=null,Ml=!1,e!==null&&BY(t,e),t=xE(t,n),t.flags|=4096;return t}return e=xd(e.child,{mode:n.mode,children:n.children}),e.ref=t.ref,t.child=e,e.return=t,e}function bE(e,t){var r=t.ref;if(r===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof r!="function"&&typeof r!="object")throw Error(Be(284));(e===null||e.ref!==r)&&(t.flags|=4194816)}}function yF(e,t,r,n,a){return gh(t),r=a3(e,t,r,n,void 0,a),n=i3(),e!==null&&!Ya?(s3(e,t,a),Cd(e,t,a)):(qr&&n&&YF(t),t.flags|=1,Yi(e,t,r,a),t.child)}function mX(e,t,r,n,a,i){return gh(t),t.updateQueue=null,r=WY(t,n,r,a),KY(e),n=i3(),e!==null&&!Ya?(s3(e,t,i),Cd(e,t,i)):(qr&&n&&YF(t),t.flags|=1,Yi(e,t,r,i),t.child)}function hX(e,t,r,n,a){if(gh(t),t.stateNode===null){var i=ux,s=r.contextType;typeof s=="object"&&s!==null&&(i=Qi(s)),i=new r(n,i),t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=hF,t.stateNode=i,i._reactInternals=t,i=t.stateNode,i.props=n,i.state=t.memoizedState,i.refs={},t3(t),s=r.contextType,i.context=typeof s=="object"&&s!==null?Qi(s):ux,i.state=t.memoizedState,s=r.getDerivedStateFromProps,typeof s=="function"&&(wO(t,r,s,n),i.state=t.memoizedState),typeof r.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(s=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),s!==i.state&&hF.enqueueReplaceState(i,i.state,null),NS(t,n,i,a),AS(),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308),n=!0}else if(e===null){i=t.stateNode;var o=t.memoizedProps,l=bh(r,o);i.props=l;var c=i.context,u=r.contextType;s=ux,typeof u=="object"&&u!==null&&(s=Qi(u));var d=r.getDerivedStateFromProps;u=typeof d=="function"||typeof i.getSnapshotBeforeUpdate=="function",o=t.pendingProps!==o,u||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(o||c!==s)&&lX(t,i,n,s),Kf=!1;var f=t.memoizedState;i.state=f,NS(t,n,i,a),AS(),c=t.memoizedState,o||f!==c||Kf?(typeof d=="function"&&(wO(t,r,d,n),c=t.memoizedState),(l=Kf||oX(t,r,l,n,f,c,s))?(u||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=c),i.props=n,i.state=c,i.context=s,n=l):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{i=t.stateNode,lF(e,t),s=t.memoizedProps,u=bh(r,s),i.props=u,d=t.pendingProps,f=i.context,c=r.contextType,l=ux,typeof c=="object"&&c!==null&&(l=Qi(c)),o=r.getDerivedStateFromProps,(c=typeof o=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(s!==d||f!==l)&&lX(t,i,n,l),Kf=!1,f=t.memoizedState,i.state=f,NS(t,n,i,a),AS();var p=t.memoizedState;s!==d||f!==p||Kf||e!==null&&e.dependencies!==null&&RE(e.dependencies)?(typeof o=="function"&&(wO(t,r,o,n),p=t.memoizedState),(u=Kf||oX(t,r,u,n,f,p,l)||e!==null&&e.dependencies!==null&&RE(e.dependencies))?(c||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(n,p,l),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(n,p,l)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=p),i.props=n,i.state=p,i.context=l,n=u):(typeof i.componentDidUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),n=!1)}return i=n,bE(e,t),n=(t.flags&128)!==0,i||n?(i=t.stateNode,r=n&&typeof r.getDerivedStateFromError!="function"?null:i.render(),t.flags|=1,e!==null&&n?(t.child=yh(t,e.child,null,a),t.child=yh(t,null,r,a)):Yi(e,t,r,a),t.memoizedState=i.state,e=t.child):e=Cd(e,t,a),e}function gX(e,t,r,n){return hh(),t.flags|=256,Yi(e,t,r,n),t.child}var CO={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function PO(e){return{baseLanes:e,cachePool:jY()}}function EO(e,t,r){return e=e!==null?e.childLanes&~r:0,t&&(e|=jo),e}function LJ(e,t,r){var n=t.pendingProps,a=!1,i=(t.flags&128)!==0,s;if((s=i)||(s=e!==null&&e.memoizedState===null?!1:(Oa.current&2)!==0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!==0,t.flags&=-33,e===null){if(qr){if(a?Xf(t):Yf(t),(e=Wn)?(e=wZ(e,Ml),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:fp!==null?{id:lu,overflow:cu}:null,retryLane:536870912,hydrationErrors:null},r=OY(e),r.return=t,t.child=r,Zi=t,Wn=null)):e=null,e===null)throw pp(t);return _F(e)?t.lanes=32:t.lanes=536870912,null}var o=n.children;return n=n.fallback,a?(Yf(t),a=t.mode,o=jE({mode:"hidden",children:o},a),n=dh(n,a,r,null),o.return=t,n.return=t,o.sibling=n,t.child=o,n=t.child,n.memoizedState=PO(r),n.childLanes=EO(e,s,r),t.memoizedState=CO,SS(null,n)):(Xf(t),xF(t,o))}var l=e.memoizedState;if(l!==null&&(o=l.dehydrated,o!==null)){if(i)t.flags&256?(Xf(t),t.flags&=-257,t=IO(e,t,r)):t.memoizedState!==null?(Yf(t),t.child=e.child,t.flags|=128,t=null):(Yf(t),o=n.fallback,a=t.mode,n=jE({mode:"visible",children:n.children},a),o=dh(o,a,r,null),o.flags|=2,n.return=t,o.return=t,n.sibling=o,t.child=n,yh(t,e.child,null,r),n=t.child,n.memoizedState=PO(r),n.childLanes=EO(e,s,r),t.memoizedState=CO,t=SS(null,n));else if(Xf(t),_F(o)){if(s=o.nextSibling&&o.nextSibling.dataset,s)var c=s.dgst;s=c,n=Error(Be(419)),n.stack="",n.digest=s,zS({value:n,source:null,stack:null}),t=IO(e,t,r)}else if(Ya||Dx(e,t,r,!1),s=(r&e.childLanes)!==0,Ya||s){if(s=An,s!==null&&(n=lY(s,r),n!==0&&n!==l.retryLane))throw l.retryLane=n,wh(e,n),po(s,e,n),g3;kF(o)||qE(),t=IO(e,t,r)}else kF(o)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Wn=Fl(o.nextSibling),Zi=t,qr=!0,ap=null,Ml=!1,e!==null&&BY(t,e),t=xF(t,n.children),t.flags|=4096);return t}return a?(Yf(t),o=n.fallback,a=t.mode,l=e.child,c=l.sibling,n=xd(l,{mode:"hidden",children:n.children}),n.subtreeFlags=l.subtreeFlags&65011712,c!==null?o=xd(c,o):(o=dh(o,a,r,null),o.flags|=2),o.return=t,n.return=t,n.sibling=o,t.child=n,SS(null,n),n=t.child,o=e.child.memoizedState,o===null?o=PO(r):(a=o.cachePool,a!==null?(l=Xa._currentValue,a=a.parent!==l?{parent:l,pool:l}:a):a=jY(),o={baseLanes:o.baseLanes|r,cachePool:a}),n.memoizedState=o,n.childLanes=EO(e,s,r),t.memoizedState=CO,SS(e.child,n)):(Xf(t),r=e.child,e=r.sibling,r=xd(r,{mode:"visible",children:n.children}),r.return=t,r.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=r,t.memoizedState=null,r)}function xF(e,t){return t=jE({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function jE(e,t){return e=$o(22,e,null,t),e.lanes=0,e}function IO(e,t,r){return yh(t,e.child,null,r),e=xF(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function yX(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),iF(e.return,t,r)}function AO(e,t,r,n,a,i){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:a,treeForkCount:i}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=n,s.tail=r,s.tailMode=a,s.treeForkCount=i)}function RJ(e,t,r){var n=t.pendingProps,a=n.revealOrder,i=n.tail;n=n.children;var s=Oa.current,o=(s&2)!==0;if(o?(s=s&1|2,t.flags|=128):s&=1,Fn(Oa,s),Yi(e,t,n,r),n=qr?jS:0,!o&&e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&yX(e,r,t);else if(e.tag===19)yX(e,r,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(a){case"forwards":for(r=t.child,a=null;r!==null;)e=r.alternate,e!==null&&OE(e)===null&&(a=r),r=r.sibling;r=a,r===null?(a=t.child,t.child=null):(a=r.sibling,r.sibling=null),AO(t,!1,a,r,i,n);break;case"backwards":case"unstable_legacy-backwards":for(r=null,a=t.child,t.child=null;a!==null;){if(e=a.alternate,e!==null&&OE(e)===null){t.child=a;break}e=a.sibling,a.sibling=r,r=a,a=e}AO(t,!0,r,null,i,n);break;case"together":AO(t,!1,null,null,void 0,n);break;default:t.memoizedState=null}return t.child}function Cd(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),hp|=t.lanes,!(r&t.childLanes))if(e!==null){if(Dx(e,t,r,!1),(r&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(Be(153));if(t.child!==null){for(e=t.child,r=xd(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=xd(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function y3(e,t){return e.lanes&t?!0:(e=e.dependencies,!!(e!==null&&RE(e)))}function Q7e(e,t,r){switch(t.tag){case 3:EE(t,t.stateNode.containerInfo),Wf(t,Xa,e.memoizedState.cache),hh();break;case 27:case 5:GO(t);break;case 4:EE(t,t.stateNode.containerInfo);break;case 10:Wf(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,dF(t),null;break;case 13:var n=t.memoizedState;if(n!==null)return n.dehydrated!==null?(Xf(t),t.flags|=128,null):r&t.child.childLanes?LJ(e,t,r):(Xf(t),e=Cd(e,t,r),e!==null?e.sibling:null);Xf(t);break;case 19:var a=(e.flags&128)!==0;if(n=(r&t.childLanes)!==0,n||(Dx(e,t,r,!1),n=(r&t.childLanes)!==0),a){if(n)return RJ(e,t,r);t.flags|=128}if(a=t.memoizedState,a!==null&&(a.rendering=null,a.tail=null,a.lastEffect=null),Fn(Oa,Oa.current),n)break;return null;case 22:return t.lanes=0,_J(e,t,r,t.pendingProps);case 24:Wf(t,Xa,e.memoizedState.cache)}return Cd(e,t,r)}function DJ(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps)Ya=!0;else{if(!y3(e,r)&&!(t.flags&128))return Ya=!1,Q7e(e,t,r);Ya=!!(e.flags&131072)}else Ya=!1,qr&&t.flags&1048576&&FY(t,jS,t.index);switch(t.lanes=0,t.tag){case 16:e:{var n=t.pendingProps;if(e=lh(t.elementType),t.type=e,typeof e=="function")XF(e)?(n=bh(e,n),t.tag=1,t=hX(null,t,e,n,r)):(t.tag=0,t=yF(null,t,e,n,r));else{if(e!=null){var a=e.$$typeof;if(a===MF){t.tag=11,t=uX(null,t,e,n,r);break e}else if(a===OF){t.tag=14,t=dX(null,t,e,n,r);break e}}throw t=qO(e)||e,Error(Be(306,t,""))}}return t;case 0:return yF(e,t,t.type,t.pendingProps,r);case 1:return n=t.type,a=bh(n,t.pendingProps),hX(e,t,n,a,r);case 3:e:{if(EE(t,t.stateNode.containerInfo),e===null)throw Error(Be(387));n=t.pendingProps;var i=t.memoizedState;a=i.element,lF(e,t),NS(t,n,null,r);var s=t.memoizedState;if(n=s.cache,Wf(t,Xa,n),n!==i.cache&&sF(t,[Xa],r,!0),AS(),n=s.element,i.isDehydrated)if(i={element:n,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){t=gX(e,t,n,r);break e}else if(n!==a){a=Dl(Error(Be(424)),t),zS(a),t=gX(e,t,n,r);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Wn=Fl(e.firstChild),Zi=t,qr=!0,ap=null,Ml=!0,r=VY(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling}else{if(hh(),n===a){t=Cd(e,t,r);break e}Yi(e,t,n,r)}t=t.child}return t;case 26:return bE(e,t),e===null?(r=$X(t.type,null,t.pendingProps,null))?t.memoizedState=r:qr||(r=t.type,e=t.pendingProps,n=WE(np.current).createElement(r),n[Ji]=t,n[mo]=e,es(n,r,e),Di(n),t.stateNode=n):t.memoizedState=$X(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return GO(t),e===null&&qr&&(n=t.stateNode=CZ(t.type,t.pendingProps,np.current),Zi=t,Ml=!0,a=Wn,yp(t.type)?(LF=a,Wn=Fl(n.firstChild)):Wn=a),Yi(e,t,t.pendingProps.children,r),bE(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&qr&&((a=n=Wn)&&(n=IGe(n,t.type,t.pendingProps,Ml),n!==null?(t.stateNode=n,Zi=t,Wn=Fl(n.firstChild),Ml=!1,a=!0):a=!1),a||pp(t)),GO(t),a=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,n=i.children,AF(a,i)?n=null:s!==null&&AF(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=a3(e,t,q7e,null,null,r),KS._currentValue=a),bE(e,t),Yi(e,t,n,r),t.child;case 6:return e===null&&qr&&((e=r=Wn)&&(r=AGe(r,t.pendingProps,Ml),r!==null?(t.stateNode=r,Zi=t,Wn=null,e=!0):e=!1),e||pp(t)),null;case 13:return LJ(e,t,r);case 4:return EE(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=yh(t,null,n,r):Yi(e,t,n,r),t.child;case 11:return uX(e,t,t.type,t.pendingProps,r);case 7:return Yi(e,t,t.pendingProps,r),t.child;case 8:return Yi(e,t,t.pendingProps.children,r),t.child;case 12:return Yi(e,t,t.pendingProps.children,r),t.child;case 10:return n=t.pendingProps,Wf(t,t.type,n.value),Yi(e,t,n.children,r),t.child;case 9:return a=t.type._context,n=t.pendingProps.children,gh(t),a=Qi(a),n=n(a),t.flags|=1,Yi(e,t,n,r),t.child;case 14:return dX(e,t,t.type,t.pendingProps,r);case 15:return kJ(e,t,t.type,t.pendingProps,r);case 19:return RJ(e,t,r);case 31:return Z7e(e,t,r);case 22:return _J(e,t,r,t.pendingProps);case 24:return gh(t),n=Qi(Xa),e===null?(a=QF(),a===null&&(a=An,i=ZF(),a.pooledCache=i,i.refCount++,i!==null&&(a.pooledCacheLanes|=r),a=i),t.memoizedState={parent:n,cache:a},t3(t),Wf(t,Xa,a)):(e.lanes&r&&(lF(e,t),NS(t,null,null,r),AS()),a=e.memoizedState,i=t.memoizedState,a.parent!==n?(a={parent:n,cache:n},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Wf(t,Xa,n)):(n=i.cache,Wf(t,Xa,n),n!==a.cache&&sF(t,[Xa],r,!0))),Yi(e,t,t.pendingProps.children,r),t.child;case 29:throw t.pendingProps}throw Error(Be(156,t.tag))}function cd(e){e.flags|=4}function NO(e,t,r,n,a){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(a&335544128)===a)if(e.stateNode.complete)e.flags|=8192;else if(aZ())e.flags|=8192;else throw ph=DE,e3}else e.flags&=-16777217}function xX(e,t){if(t.type!=="stylesheet"||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!IZ(t))if(aZ())e.flags|=8192;else throw ph=DE,e3}function nE(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?iY():536870912,e.lanes|=t,Ix|=t)}function mS(e,t){if(!qr)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function Kn(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,n=0;if(t)for(var a=e.child;a!==null;)r|=a.lanes|a.childLanes,n|=a.subtreeFlags&65011712,n|=a.flags&65011712,a.return=e,a=a.sibling;else for(a=e.child;a!==null;)r|=a.lanes|a.childLanes,n|=a.subtreeFlags,n|=a.flags,a.return=e,a=a.sibling;return e.subtreeFlags|=n,e.childLanes=r,t}function eGe(e,t,r){var n=t.pendingProps;switch(JF(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Kn(t),null;case 1:return Kn(t),null;case 3:return r=t.stateNode,n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),bd(Xa),Sx(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Zy(t)?cd(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,vO())),Kn(t),null;case 26:var a=t.type,i=t.memoizedState;return e===null?(cd(t),i!==null?(Kn(t),xX(t,i)):(Kn(t),NO(t,a,null,n,r))):i?i!==e.memoizedState?(cd(t),Kn(t),xX(t,i)):(Kn(t),t.flags&=-16777217):(e=e.memoizedProps,e!==n&&cd(t),Kn(t),NO(t,a,e,n,r)),null;case 27:if(IE(t),r=np.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&cd(t);else{if(!n){if(t.stateNode===null)throw Error(Be(166));return Kn(t),null}e=du.current,Zy(t)?KW(t,e):(e=CZ(a,n,r),t.stateNode=e,cd(t))}return Kn(t),null;case 5:if(IE(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&cd(t);else{if(!n){if(t.stateNode===null)throw Error(Be(166));return Kn(t),null}if(i=du.current,Zy(t))KW(t,i);else{var s=WE(np.current);switch(i){case 1:i=s.createElementNS("http://www.w3.org/2000/svg",a);break;case 2:i=s.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;default:switch(a){case"svg":i=s.createElementNS("http://www.w3.org/2000/svg",a);break;case"math":i=s.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;case"script":i=s.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof n.is=="string"?s.createElement("select",{is:n.is}):s.createElement("select"),n.multiple?i.multiple=!0:n.size&&(i.size=n.size);break;default:i=typeof n.is=="string"?s.createElement(a,{is:n.is}):s.createElement(a)}}i[Ji]=t,i[mo]=n;e:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)i.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break e;for(;s.sibling===null;){if(s.return===null||s.return===t)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=i;e:switch(es(i,a,n),a){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}n&&cd(t)}}return Kn(t),NO(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,r),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==n&&cd(t);else{if(typeof n!="string"&&t.stateNode===null)throw Error(Be(166));if(e=np.current,Zy(t)){if(e=t.stateNode,r=t.memoizedProps,n=null,a=Zi,a!==null)switch(a.tag){case 27:case 5:n=a.memoizedProps}e[Ji]=t,e=!!(e.nodeValue===r||n!==null&&n.suppressHydrationWarning===!0||vZ(e.nodeValue,r)),e||pp(t,!0)}else e=WE(e).createTextNode(n),e[Ji]=t,t.stateNode=e}return Kn(t),null;case 31:if(r=t.memoizedState,e===null||e.memoizedState!==null){if(n=Zy(t),r!==null){if(e===null){if(!n)throw Error(Be(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(Be(557));e[Ji]=t}else hh(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Kn(t),e=!1}else r=vO(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),e=!0;if(!e)return t.flags&256?(Bo(t),t):(Bo(t),null);if(t.flags&128)throw Error(Be(558))}return Kn(t),null;case 13:if(n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Zy(t),n!==null&&n.dehydrated!==null){if(e===null){if(!a)throw Error(Be(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(Be(317));a[Ji]=t}else hh(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Kn(t),a=!1}else a=vO(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(Bo(t),t):(Bo(t),null)}return Bo(t),t.flags&128?(t.lanes=r,t):(r=n!==null,e=e!==null&&e.memoizedState!==null,r&&(n=t.child,a=null,n.alternate!==null&&n.alternate.memoizedState!==null&&n.alternate.memoizedState.cachePool!==null&&(a=n.alternate.memoizedState.cachePool.pool),i=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(i=n.memoizedState.cachePool.pool),i!==a&&(n.flags|=2048)),r!==e&&r&&(t.child.flags|=8192),nE(t,t.updateQueue),Kn(t),null);case 4:return Sx(),e===null&&C3(t.stateNode.containerInfo),Kn(t),null;case 10:return bd(t.type),Kn(t),null;case 19:if(Mi(Oa),n=t.memoizedState,n===null)return Kn(t),null;if(a=(t.flags&128)!==0,i=n.rendering,i===null)if(a)mS(n,!1);else{if(Ca!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=OE(e),i!==null){for(t.flags|=128,mS(n,!1),e=i.updateQueue,t.updateQueue=e,nE(t,e),t.subtreeFlags=0,e=r,r=t.child;r!==null;)MY(r,e),r=r.sibling;return Fn(Oa,Oa.current&1|2),qr&&pd(t,n.treeForkCount),t.child}e=e.sibling}n.tail!==null&&zo()>UE&&(t.flags|=128,a=!0,mS(n,!1),t.lanes=4194304)}else{if(!a)if(e=OE(i),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,nE(t,e),mS(n,!0),n.tail===null&&n.tailMode==="hidden"&&!i.alternate&&!qr)return Kn(t),null}else 2*zo()-n.renderingStartTime>UE&&r!==536870912&&(t.flags|=128,a=!0,mS(n,!1),t.lanes=4194304);n.isBackwards?(i.sibling=t.child,t.child=i):(e=n.last,e!==null?e.sibling=i:t.child=i,n.last=i)}return n.tail!==null?(e=n.tail,n.rendering=e,n.tail=e.sibling,n.renderingStartTime=zo(),e.sibling=null,r=Oa.current,Fn(Oa,a?r&1|2:r&1),qr&&pd(t,n.treeForkCount),e):(Kn(t),null);case 22:case 23:return Bo(t),r3(),n=t.memoizedState!==null,e!==null?e.memoizedState!==null!==n&&(t.flags|=8192):n&&(t.flags|=8192),n?r&536870912&&!(t.flags&128)&&(Kn(t),t.subtreeFlags&6&&(t.flags|=8192)):Kn(t),r=t.updateQueue,r!==null&&nE(t,r.retryQueue),r=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(r=e.memoizedState.cachePool.pool),n=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),n!==r&&(t.flags|=2048),e!==null&&Mi(fh),null;case 24:return r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),bd(Xa),Kn(t),null;case 25:return null;case 30:return null}throw Error(Be(156,t.tag))}function tGe(e,t){switch(JF(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return bd(Xa),Sx(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return IE(t),null;case 31:if(t.memoizedState!==null){if(Bo(t),t.alternate===null)throw Error(Be(340));hh()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Bo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Be(340));hh()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Mi(Oa),null;case 4:return Sx(),null;case 10:return bd(t.type),null;case 22:case 23:return Bo(t),r3(),e!==null&&Mi(fh),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return bd(Xa),null;case 25:return null;default:return null}}function MJ(e,t){switch(JF(t),t.tag){case 3:bd(Xa),Sx();break;case 26:case 27:case 5:IE(t);break;case 4:Sx();break;case 31:t.memoizedState!==null&&Bo(t);break;case 13:Bo(t);break;case 19:Mi(Oa);break;case 10:bd(t.type);break;case 22:case 23:Bo(t),r3(),e!==null&&Mi(fh);break;case 24:bd(Xa)}}function aT(e,t){try{var r=t.updateQueue,n=r!==null?r.lastEffect:null;if(n!==null){var a=n.next;r=a;do{if((r.tag&e)===e){n=void 0;var i=r.create,s=r.inst;n=i(),s.destroy=n}r=r.next}while(r!==a)}}catch(o){xn(t,t.return,o)}}function mp(e,t,r){try{var n=t.updateQueue,a=n!==null?n.lastEffect:null;if(a!==null){var i=a.next;n=i;do{if((n.tag&e)===e){var s=n.inst,o=s.destroy;if(o!==void 0){s.destroy=void 0,a=t;var l=r,c=o;try{c()}catch(u){xn(a,l,u)}}}n=n.next}while(n!==i)}}catch(u){xn(t,t.return,u)}}function OJ(e){var t=e.updateQueue;if(t!==null){var r=e.stateNode;try{HY(t,r)}catch(n){xn(e,e.return,n)}}}function FJ(e,t,r){r.props=bh(e.type,e.memoizedProps),r.state=e.memoizedState;try{r.componentWillUnmount()}catch(n){xn(e,t,n)}}function _S(e,t){try{var r=e.ref;if(r!==null){switch(e.tag){case 26:case 27:case 5:var n=e.stateNode;break;case 30:n=e.stateNode;break;default:n=e.stateNode}typeof r=="function"?e.refCleanup=r(n):r.current=n}}catch(a){xn(e,t,a)}}function uu(e,t){var r=e.ref,n=e.refCleanup;if(r!==null)if(typeof n=="function")try{n()}catch(a){xn(e,t,a)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof r=="function")try{r(null)}catch(a){xn(e,t,a)}else r.current=null}function BJ(e){var t=e.type,r=e.memoizedProps,n=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":r.autoFocus&&n.focus();break e;case"img":r.src?n.src=r.src:r.srcSet&&(n.srcset=r.srcSet)}}catch(a){xn(e,e.return,a)}}function kO(e,t,r){try{var n=e.stateNode;SGe(n,e.type,r,t),n[mo]=t}catch(a){xn(e,e.return,a)}}function $J(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&yp(e.type)||e.tag===4}function _O(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||$J(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&yp(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function bF(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r).insertBefore(e,t):(t=r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,t.appendChild(e),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=gd));else if(n!==4&&(n===27&&yp(e.type)&&(r=e.stateNode,t=null),e=e.child,e!==null))for(bF(e,t,r),e=e.sibling;e!==null;)bF(e,t,r),e=e.sibling}function zE(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(n===27&&yp(e.type)&&(r=e.stateNode),e=e.child,e!==null))for(zE(e,t,r),e=e.sibling;e!==null;)zE(e,t,r),e=e.sibling}function jJ(e){var t=e.stateNode,r=e.memoizedProps;try{for(var n=e.type,a=t.attributes;a.length;)t.removeAttributeNode(a[0]);es(t,n,r),t[Ji]=e,t[mo]=r}catch(i){xn(e,e.return,i)}}var md=!1,Wa=!1,LO=!1,bX=typeof WeakSet=="function"?WeakSet:Set,Ri=null;function rGe(e,t){if(e=e.containerInfo,EF=ZE,e=IY(e),GF(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var a=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{r.nodeType,i.nodeType}catch{r=null;break e}var s=0,o=-1,l=-1,c=0,u=0,d=e,f=null;t:for(;;){for(var p;d!==r||a!==0&&d.nodeType!==3||(o=s+a),d!==i||n!==0&&d.nodeType!==3||(l=s+n),d.nodeType===3&&(s+=d.nodeValue.length),(p=d.firstChild)!==null;)f=d,d=p;for(;;){if(d===e)break t;if(f===r&&++c===a&&(o=s),f===i&&++u===n&&(l=s),(p=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=p}r=o===-1||l===-1?null:{start:o,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(IF={focusedElem:e,selectionRange:r},ZE=!1,Ri=t;Ri!==null;)if(t=Ri,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Ri=e;else for(;Ri!==null;){switch(t=Ri,i=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(r=0;r<e.length;r++)a=e[r],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&i!==null){e=void 0,r=t,a=i.memoizedProps,i=i.memoizedState,n=r.stateNode;try{var m=bh(r.type,a);e=n.getSnapshotBeforeUpdate(m,i),n.__reactInternalSnapshotBeforeUpdate=e}catch(h){xn(r,r.return,h)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,r=e.nodeType,r===9)NF(e);else if(r===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":NF(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(Be(163))}if(e=t.sibling,e!==null){e.return=t.return,Ri=e;break}Ri=t.return}}function zJ(e,t,r){var n=r.flags;switch(r.tag){case 0:case 11:case 15:dd(e,r),n&4&&aT(5,r);break;case 1:if(dd(e,r),n&4)if(e=r.stateNode,t===null)try{e.componentDidMount()}catch(s){xn(r,r.return,s)}else{var a=bh(r.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(a,t,e.__reactInternalSnapshotBeforeUpdate)}catch(s){xn(r,r.return,s)}}n&64&&OJ(r),n&512&&_S(r,r.return);break;case 3:if(dd(e,r),n&64&&(e=r.updateQueue,e!==null)){if(t=null,r.child!==null)switch(r.child.tag){case 27:case 5:t=r.child.stateNode;break;case 1:t=r.child.stateNode}try{HY(e,t)}catch(s){xn(r,r.return,s)}}break;case 27:t===null&&n&4&&jJ(r);case 26:case 5:dd(e,r),t===null&&n&4&&BJ(r),n&512&&_S(r,r.return);break;case 12:dd(e,r);break;case 31:dd(e,r),n&4&&qJ(e,r);break;case 13:dd(e,r),n&4&&HJ(e,r),n&64&&(e=r.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(r=dGe.bind(null,r),NGe(e,r))));break;case 22:if(n=r.memoizedState!==null||md,!n){t=t!==null&&t.memoizedState!==null||Wa,a=md;var i=Wa;md=n,(Wa=t)&&!i?fd(e,r,(r.subtreeFlags&8772)!==0):dd(e,r),md=a,Wa=i}break;case 30:break;default:dd(e,r)}}function UJ(e){var t=e.alternate;t!==null&&(e.alternate=null,UJ(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&jF(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var na=null,uo=!1;function ud(e,t,r){for(r=r.child;r!==null;)VJ(e,t,r),r=r.sibling}function VJ(e,t,r){if(Uo&&typeof Uo.onCommitFiberUnmount=="function")try{Uo.onCommitFiberUnmount(JS,r)}catch{}switch(r.tag){case 26:Wa||uu(r,t),ud(e,t,r),r.memoizedState?r.memoizedState.count--:r.stateNode&&(r=r.stateNode,r.parentNode.removeChild(r));break;case 27:Wa||uu(r,t);var n=na,a=uo;yp(r.type)&&(na=r.stateNode,uo=!1),ud(e,t,r),MS(r.stateNode),na=n,uo=a;break;case 5:Wa||uu(r,t);case 6:if(n=na,a=uo,na=null,ud(e,t,r),na=n,uo=a,na!==null)if(uo)try{(na.nodeType===9?na.body:na.nodeName==="HTML"?na.ownerDocument.body:na).removeChild(r.stateNode)}catch(i){xn(r,t,i)}else try{na.removeChild(r.stateNode)}catch(i){xn(r,t,i)}break;case 18:na!==null&&(uo?(e=na,DX(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,r.stateNode),_x(e)):DX(na,r.stateNode));break;case 4:n=na,a=uo,na=r.stateNode.containerInfo,uo=!0,ud(e,t,r),na=n,uo=a;break;case 0:case 11:case 14:case 15:mp(2,r,t),Wa||mp(4,r,t),ud(e,t,r);break;case 1:Wa||(uu(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"&&FJ(r,t,n)),ud(e,t,r);break;case 21:ud(e,t,r);break;case 22:Wa=(n=Wa)||r.memoizedState!==null,ud(e,t,r),Wa=n;break;default:ud(e,t,r)}}function qJ(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{_x(e)}catch(r){xn(t,t.return,r)}}}function HJ(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{_x(e)}catch(r){xn(t,t.return,r)}}function nGe(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new bX),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new bX),t;default:throw Error(Be(435,e.tag))}}function aE(e,t){var r=nGe(e);t.forEach(function(n){if(!r.has(n)){r.add(n);var a=fGe.bind(null,e,n);n.then(a,a)}})}function lo(e,t){var r=t.deletions;if(r!==null)for(var n=0;n<r.length;n++){var a=r[n],i=e,s=t,o=s;e:for(;o!==null;){switch(o.tag){case 27:if(yp(o.type)){na=o.stateNode,uo=!1;break e}break;case 5:na=o.stateNode,uo=!1;break e;case 3:case 4:na=o.stateNode.containerInfo,uo=!0;break e}o=o.return}if(na===null)throw Error(Be(160));VJ(i,s,a),na=null,uo=!1,i=a.alternate,i!==null&&(i.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)GJ(t,e),t=t.sibling}var bc=null;function GJ(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:lo(t,e),co(e),n&4&&(mp(3,e,e.return),aT(3,e),mp(5,e,e.return));break;case 1:lo(t,e),co(e),n&512&&(Wa||r===null||uu(r,r.return)),n&64&&md&&(e=e.updateQueue,e!==null&&(n=e.callbacks,n!==null&&(r=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=r===null?n:r.concat(n))));break;case 26:var a=bc;if(lo(t,e),co(e),n&512&&(Wa||r===null||uu(r,r.return)),n&4){var i=r!==null?r.memoizedState:null;if(n=e.memoizedState,r===null)if(n===null)if(e.stateNode===null){e:{n=e.type,r=e.memoizedProps,a=a.ownerDocument||a;t:switch(n){case"title":i=a.getElementsByTagName("title")[0],(!i||i[eT]||i[Ji]||i.namespaceURI==="http://www.w3.org/2000/svg"||i.hasAttribute("itemprop"))&&(i=a.createElement(n),a.head.insertBefore(i,a.querySelector("head > title"))),es(i,n,r),i[Ji]=e,Di(i),n=i;break e;case"link":var s=zX("link","href",a).get(n+(r.href||""));if(s){for(var o=0;o<s.length;o++)if(i=s[o],i.getAttribute("href")===(r.href==null||r.href===""?null:r.href)&&i.getAttribute("rel")===(r.rel==null?null:r.rel)&&i.getAttribute("title")===(r.title==null?null:r.title)&&i.getAttribute("crossorigin")===(r.crossOrigin==null?null:r.crossOrigin)){s.splice(o,1);break t}}i=a.createElement(n),es(i,n,r),a.head.appendChild(i);break;case"meta":if(s=zX("meta","content",a).get(n+(r.content||""))){for(o=0;o<s.length;o++)if(i=s[o],i.getAttribute("content")===(r.content==null?null:""+r.content)&&i.getAttribute("name")===(r.name==null?null:r.name)&&i.getAttribute("property")===(r.property==null?null:r.property)&&i.getAttribute("http-equiv")===(r.httpEquiv==null?null:r.httpEquiv)&&i.getAttribute("charset")===(r.charSet==null?null:r.charSet)){s.splice(o,1);break t}}i=a.createElement(n),es(i,n,r),a.head.appendChild(i);break;default:throw Error(Be(468,n))}i[Ji]=e,Di(i),n=i}e.stateNode=n}else UX(a,e.type,e.stateNode);else e.stateNode=jX(a,n,e.memoizedProps);else i!==n?(i===null?r.stateNode!==null&&(r=r.stateNode,r.parentNode.removeChild(r)):i.count--,n===null?UX(a,e.type,e.stateNode):jX(a,n,e.memoizedProps)):n===null&&e.stateNode!==null&&kO(e,e.memoizedProps,r.memoizedProps)}break;case 27:lo(t,e),co(e),n&512&&(Wa||r===null||uu(r,r.return)),r!==null&&n&4&&kO(e,e.memoizedProps,r.memoizedProps);break;case 5:if(lo(t,e),co(e),n&512&&(Wa||r===null||uu(r,r.return)),e.flags&32){a=e.stateNode;try{wx(a,"")}catch(m){xn(e,e.return,m)}}n&4&&e.stateNode!=null&&(a=e.memoizedProps,kO(e,a,r!==null?r.memoizedProps:a)),n&1024&&(LO=!0);break;case 6:if(lo(t,e),co(e),n&4){if(e.stateNode===null)throw Error(Be(162));n=e.memoizedProps,r=e.stateNode;try{r.nodeValue=n}catch(m){xn(e,e.return,m)}}break;case 3:if(TE=null,a=bc,bc=XE(t.containerInfo),lo(t,e),bc=a,co(e),n&4&&r!==null&&r.memoizedState.isDehydrated)try{_x(t.containerInfo)}catch(m){xn(e,e.return,m)}LO&&(LO=!1,KJ(e));break;case 4:n=bc,bc=XE(e.stateNode.containerInfo),lo(t,e),co(e),bc=n;break;case 12:lo(t,e),co(e);break;case 31:lo(t,e),co(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,aE(e,n)));break;case 13:lo(t,e),co(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(dI=zo()),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,aE(e,n)));break;case 22:a=e.memoizedState!==null;var l=r!==null&&r.memoizedState!==null,c=md,u=Wa;if(md=c||a,Wa=u||l,lo(t,e),Wa=u,md=c,co(e),n&8192)e:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(r===null||l||md||Wa||ch(e)),r=null,t=e;;){if(t.tag===5||t.tag===26){if(r===null){l=r=t;try{if(i=l.stateNode,a)s=i.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none";else{o=l.stateNode;var d=l.memoizedProps.style,f=d!=null&&d.hasOwnProperty("display")?d.display:null;o.style.display=f==null||typeof f=="boolean"?"":(""+f).trim()}}catch(m){xn(l,l.return,m)}}}else if(t.tag===6){if(r===null){l=t;try{l.stateNode.nodeValue=a?"":l.memoizedProps}catch(m){xn(l,l.return,m)}}}else if(t.tag===18){if(r===null){l=t;try{var p=l.stateNode;a?MX(p,!0):MX(l.stateNode,!1)}catch(m){xn(l,l.return,m)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;r===t&&(r=null),t=t.return}r===t&&(r=null),t.sibling.return=t.return,t=t.sibling}n&4&&(n=e.updateQueue,n!==null&&(r=n.retryQueue,r!==null&&(n.retryQueue=null,aE(e,r))));break;case 19:lo(t,e),co(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,aE(e,n)));break;case 30:break;case 21:break;default:lo(t,e),co(e)}}function co(e){var t=e.flags;if(t&2){try{for(var r,n=e.return;n!==null;){if($J(n)){r=n;break}n=n.return}if(r==null)throw Error(Be(160));switch(r.tag){case 27:var a=r.stateNode,i=_O(e);zE(e,i,a);break;case 5:var s=r.stateNode;r.flags&32&&(wx(s,""),r.flags&=-33);var o=_O(e);zE(e,o,s);break;case 3:case 4:var l=r.stateNode.containerInfo,c=_O(e);bF(e,c,l);break;default:throw Error(Be(161))}}catch(u){xn(e,e.return,u)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function KJ(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;KJ(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function dd(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)zJ(e,t.alternate,t),t=t.sibling}function ch(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:mp(4,t,t.return),ch(t);break;case 1:uu(t,t.return);var r=t.stateNode;typeof r.componentWillUnmount=="function"&&FJ(t,t.return,r),ch(t);break;case 27:MS(t.stateNode);case 26:case 5:uu(t,t.return),ch(t);break;case 22:t.memoizedState===null&&ch(t);break;case 30:ch(t);break;default:ch(t)}e=e.sibling}}function fd(e,t,r){for(r=r&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var n=t.alternate,a=e,i=t,s=i.flags;switch(i.tag){case 0:case 11:case 15:fd(a,i,r),aT(4,i);break;case 1:if(fd(a,i,r),n=i,a=n.stateNode,typeof a.componentDidMount=="function")try{a.componentDidMount()}catch(c){xn(n,n.return,c)}if(n=i,a=n.updateQueue,a!==null){var o=n.stateNode;try{var l=a.shared.hiddenCallbacks;if(l!==null)for(a.shared.hiddenCallbacks=null,a=0;a<l.length;a++)qY(l[a],o)}catch(c){xn(n,n.return,c)}}r&&s&64&&OJ(i),_S(i,i.return);break;case 27:jJ(i);case 26:case 5:fd(a,i,r),r&&n===null&&s&4&&BJ(i),_S(i,i.return);break;case 12:fd(a,i,r);break;case 31:fd(a,i,r),r&&s&4&&qJ(a,i);break;case 13:fd(a,i,r),r&&s&4&&HJ(a,i);break;case 22:i.memoizedState===null&&fd(a,i,r),_S(i,i.return);break;case 30:break;default:fd(a,i,r)}t=t.sibling}}function x3(e,t){var r=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(r=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==r&&(e!=null&&e.refCount++,r!=null&&rT(r))}function b3(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&rT(e))}function xc(e,t,r,n){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)WJ(e,t,r,n),t=t.sibling}function WJ(e,t,r,n){var a=t.flags;switch(t.tag){case 0:case 11:case 15:xc(e,t,r,n),a&2048&&aT(9,t);break;case 1:xc(e,t,r,n);break;case 3:xc(e,t,r,n),a&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&rT(e)));break;case 12:if(a&2048){xc(e,t,r,n),e=t.stateNode;try{var i=t.memoizedProps,s=i.id,o=i.onPostCommit;typeof o=="function"&&o(s,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(l){xn(t,t.return,l)}}else xc(e,t,r,n);break;case 31:xc(e,t,r,n);break;case 13:xc(e,t,r,n);break;case 23:break;case 22:i=t.stateNode,s=t.alternate,t.memoizedState!==null?i._visibility&2?xc(e,t,r,n):LS(e,t):i._visibility&2?xc(e,t,r,n):(i._visibility|=2,ex(e,t,r,n,(t.subtreeFlags&10256)!==0||!1)),a&2048&&x3(s,t);break;case 24:xc(e,t,r,n),a&2048&&b3(t.alternate,t);break;default:xc(e,t,r,n)}}function ex(e,t,r,n,a){for(a=a&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var i=e,s=t,o=r,l=n,c=s.flags;switch(s.tag){case 0:case 11:case 15:ex(i,s,o,l,a),aT(8,s);break;case 23:break;case 22:var u=s.stateNode;s.memoizedState!==null?u._visibility&2?ex(i,s,o,l,a):LS(i,s):(u._visibility|=2,ex(i,s,o,l,a)),a&&c&2048&&x3(s.alternate,s);break;case 24:ex(i,s,o,l,a),a&&c&2048&&b3(s.alternate,s);break;default:ex(i,s,o,l,a)}t=t.sibling}}function LS(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var r=e,n=t,a=n.flags;switch(n.tag){case 22:LS(r,n),a&2048&&x3(n.alternate,n);break;case 24:LS(r,n),a&2048&&b3(n.alternate,n);break;default:LS(r,n)}t=t.sibling}}var TS=8192;function Qy(e,t,r){if(e.subtreeFlags&TS)for(e=e.child;e!==null;)XJ(e,t,r),e=e.sibling}function XJ(e,t,r){switch(e.tag){case 26:Qy(e,t,r),e.flags&TS&&e.memoizedState!==null&&zGe(r,bc,e.memoizedState,e.memoizedProps);break;case 5:Qy(e,t,r);break;case 3:case 4:var n=bc;bc=XE(e.stateNode.containerInfo),Qy(e,t,r),bc=n;break;case 22:e.memoizedState===null&&(n=e.alternate,n!==null&&n.memoizedState!==null?(n=TS,TS=16777216,Qy(e,t,r),TS=n):Qy(e,t,r));break;default:Qy(e,t,r)}}function YJ(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function hS(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var r=0;r<t.length;r++){var n=t[r];Ri=n,ZJ(n,e)}YJ(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)JJ(e),e=e.sibling}function JJ(e){switch(e.tag){case 0:case 11:case 15:hS(e),e.flags&2048&&mp(9,e,e.return);break;case 3:hS(e);break;case 12:hS(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,vE(e)):hS(e);break;default:hS(e)}}function vE(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var r=0;r<t.length;r++){var n=t[r];Ri=n,ZJ(n,e)}YJ(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:mp(8,t,t.return),vE(t);break;case 22:r=t.stateNode,r._visibility&2&&(r._visibility&=-3,vE(t));break;default:vE(t)}e=e.sibling}}function ZJ(e,t){for(;Ri!==null;){var r=Ri;switch(r.tag){case 0:case 11:case 15:mp(8,r,t);break;case 23:case 22:if(r.memoizedState!==null&&r.memoizedState.cachePool!==null){var n=r.memoizedState.cachePool.pool;n!=null&&n.refCount++}break;case 24:rT(r.memoizedState.cache)}if(n=r.child,n!==null)n.return=r,Ri=n;else e:for(r=e;Ri!==null;){n=Ri;var a=n.sibling,i=n.return;if(UJ(n),n===r){Ri=null;break e}if(a!==null){a.return=i,Ri=a;break e}Ri=i}}}var aGe={getCacheForType:function(e){var t=Qi(Xa),r=t.data.get(e);return r===void 0&&(r=e(),t.data.set(e,r)),r},cacheSignal:function(){return Qi(Xa).controller.signal}},iGe=typeof WeakMap=="function"?WeakMap:Map,un=0,An=null,Mr=null,zr=0,yn=0,Fo=null,ep=!1,Ox=!1,v3=!1,Pd=0,Ca=0,hp=0,mh=0,S3=0,jo=0,Ix=0,RS=null,fo=null,vF=!1,dI=0,QJ=0,UE=1/0,VE=null,op=null,pi=0,lp=null,Ax=null,vd=0,SF=0,TF=null,eZ=null,DS=0,wF=null;function qo(){return un&2&&zr!==0?zr&-zr:Qt.T!==null?w3():cY()}function tZ(){if(jo===0)if(!(zr&536870912)||qr){var e=WP;WP<<=1,!(WP&3932160)&&(WP=262144),jo=e}else jo=536870912;return e=Go.current,e!==null&&(e.flags|=32),jo}function po(e,t,r){(e===An&&(yn===2||yn===9)||e.cancelPendingCommit!==null)&&(Nx(e,0),tp(e,zr,jo,!1)),QS(e,r),(!(un&2)||e!==An)&&(e===An&&(!(un&2)&&(mh|=r),Ca===4&&tp(e,zr,jo,!1)),pu(e))}function rZ(e,t,r){if(un&6)throw Error(Be(327));var n=!r&&(t&127)===0&&(t&e.expiredLanes)===0||ZS(e,t),a=n?lGe(e,t):RO(e,t,!0),i=n;do{if(a===0){Ox&&!n&&tp(e,t,0,!1);break}else{if(r=e.current.alternate,i&&!sGe(r)){a=RO(e,t,!1),i=!1;continue}if(a===2){if(i=t,e.errorRecoveryDisabledLanes&i)var s=0;else s=e.pendingLanes&-536870913,s=s!==0?s:s&536870912?536870912:0;if(s!==0){t=s;e:{var o=e;a=RS;var l=o.current.memoizedState.isDehydrated;if(l&&(Nx(o,s).flags|=256),s=RO(o,s,!1),s!==2){if(v3&&!l){o.errorRecoveryDisabledLanes|=i,mh|=i,a=4;break e}i=fo,fo=a,i!==null&&(fo===null?fo=i:fo.push.apply(fo,i))}a=s}if(i=!1,a!==2)continue}}if(a===1){Nx(e,0),tp(e,t,0,!0);break}e:{switch(n=e,i=a,i){case 0:case 1:throw Error(Be(345));case 4:if((t&4194048)!==t)break;case 6:tp(n,t,jo,!ep);break e;case 2:fo=null;break;case 3:case 5:break;default:throw Error(Be(329))}if((t&62914560)===t&&(a=dI+300-zo(),10<a)){if(tp(n,t,jo,!ep),eI(n,0,!0)!==0)break e;vd=t,n.timeoutHandle=TZ(vX.bind(null,n,r,fo,VE,vF,t,jo,mh,Ix,ep,i,"Throttled",-0,0),a);break e}vX(n,r,fo,VE,vF,t,jo,mh,Ix,ep,i,null,-0,0)}}break}while(1);pu(e)}function vX(e,t,r,n,a,i,s,o,l,c,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)===16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:gd},XJ(t,i,d);var m=(i&62914560)===i?dI-zo():(i&4194048)===i?QJ-zo():0;if(m=UGe(d,m),m!==null){vd=i,e.cancelPendingCommit=m(TX.bind(null,e,t,i,r,n,a,s,o,l,u,d,null,f,p)),tp(e,i,s,!c);return}}TX(e,t,i,r,n,a,s,o,l)}function sGe(e){for(var t=e;;){var r=t.tag;if((r===0||r===11||r===15)&&t.flags&16384&&(r=t.updateQueue,r!==null&&(r=r.stores,r!==null)))for(var n=0;n<r.length;n++){var a=r[n],i=a.getSnapshot;a=a.value;try{if(!Ho(i(),a))return!1}catch{return!1}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function tp(e,t,r,n){t&=~S3,t&=~mh,e.suspendedLanes|=t,e.pingedLanes&=~t,n&&(e.warmLanes|=t),n=e.expirationTimes;for(var a=t;0<a;){var i=31-Vo(a),s=1<<i;n[i]=-1,a&=~s}r!==0&&sY(e,r,t)}function fI(){return un&6?!0:(iT(0,!1),!1)}function T3(){if(Mr!==null){if(yn===0)var e=Mr.return;else e=Mr,yd=Ch=null,o3(e),xx=null,US=0,e=Mr;for(;e!==null;)MJ(e.alternate,e),e=e.return;Mr=null}}function Nx(e,t){var r=e.timeoutHandle;r!==-1&&(e.timeoutHandle=-1,CGe(r)),r=e.cancelPendingCommit,r!==null&&(e.cancelPendingCommit=null,r()),vd=0,T3(),An=e,Mr=r=xd(e.current,null),zr=t,yn=0,Fo=null,ep=!1,Ox=ZS(e,t),v3=!1,Ix=jo=S3=mh=hp=Ca=0,fo=RS=null,vF=!1,t&8&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var a=31-Vo(n),i=1<<a;t|=e[a],n&=~i}return Pd=t,aI(),r}function nZ(e,t){br=null,Qt.H=qS,t===Mx||t===sI?(t=ZW(),yn=3):t===e3?(t=ZW(),yn=4):yn=t===g3?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Fo=t,Mr===null&&(Ca=1,$E(e,Dl(t,e.current)))}function aZ(){var e=Go.current;return e===null?!0:(zr&4194048)===zr?Ol===null:(zr&62914560)===zr||zr&536870912?e===Ol:!1}function iZ(){var e=Qt.H;return Qt.H=qS,e===null?qS:e}function sZ(){var e=Qt.A;return Qt.A=aGe,e}function qE(){Ca=4,ep||(zr&4194048)!==zr&&Go.current!==null||(Ox=!0),!(hp&134217727)&&!(mh&134217727)||An===null||tp(An,zr,jo,!1)}function RO(e,t,r){var n=un;un|=2;var a=iZ(),i=sZ();(An!==e||zr!==t)&&(VE=null,Nx(e,t)),t=!1;var s=Ca;e:do try{if(yn!==0&&Mr!==null){var o=Mr,l=Fo;switch(yn){case 8:T3(),s=6;break e;case 3:case 2:case 9:case 6:Go.current===null&&(t=!0);var c=yn;if(yn=0,Fo=null,px(e,o,l,c),r&&Ox){s=0;break e}break;default:c=yn,yn=0,Fo=null,px(e,o,l,c)}}oGe(),s=Ca;break}catch(u){nZ(e,u)}while(1);return t&&e.shellSuspendCounter++,yd=Ch=null,un=n,Qt.H=a,Qt.A=i,Mr===null&&(An=null,zr=0,aI()),s}function oGe(){for(;Mr!==null;)oZ(Mr)}function lGe(e,t){var r=un;un|=2;var n=iZ(),a=sZ();An!==e||zr!==t?(VE=null,UE=zo()+500,Nx(e,t)):Ox=ZS(e,t);e:do try{if(yn!==0&&Mr!==null){t=Mr;var i=Fo;t:switch(yn){case 1:yn=0,Fo=null,px(e,t,i,1);break;case 2:case 9:if(JW(i)){yn=0,Fo=null,SX(t);break}t=function(){yn!==2&&yn!==9||An!==e||(yn=7),pu(e)},i.then(t,t);break e;case 3:yn=7;break e;case 4:yn=5;break e;case 7:JW(i)?(yn=0,Fo=null,SX(t)):(yn=0,Fo=null,px(e,t,i,7));break;case 5:var s=null;switch(Mr.tag){case 26:s=Mr.memoizedState;case 5:case 27:var o=Mr;if(s?IZ(s):o.stateNode.complete){yn=0,Fo=null;var l=o.sibling;if(l!==null)Mr=l;else{var c=o.return;c!==null?(Mr=c,pI(c)):Mr=null}break t}}yn=0,Fo=null,px(e,t,i,5);break;case 6:yn=0,Fo=null,px(e,t,i,6);break;case 8:T3(),Ca=6;break e;default:throw Error(Be(462))}}cGe();break}catch(u){nZ(e,u)}while(1);return yd=Ch=null,Qt.H=n,Qt.A=a,un=r,Mr!==null?0:(An=null,zr=0,aI(),Ca)}function cGe(){for(;Mr!==null&&!LHe();)oZ(Mr)}function oZ(e){var t=DJ(e.alternate,e,Pd);e.memoizedProps=e.pendingProps,t===null?pI(e):Mr=t}function SX(e){var t=e,r=t.alternate;switch(t.tag){case 15:case 0:t=mX(r,t,t.pendingProps,t.type,void 0,zr);break;case 11:t=mX(r,t,t.pendingProps,t.type.render,t.ref,zr);break;case 5:o3(t);default:MJ(r,t),t=Mr=MY(t,Pd),t=DJ(r,t,Pd)}e.memoizedProps=e.pendingProps,t===null?pI(e):Mr=t}function px(e,t,r,n){yd=Ch=null,o3(t),xx=null,US=0;var a=t.return;try{if(J7e(e,a,t,r,zr)){Ca=1,$E(e,Dl(r,e.current)),Mr=null;return}}catch(i){if(a!==null)throw Mr=a,i;Ca=1,$E(e,Dl(r,e.current)),Mr=null;return}t.flags&32768?(qr||n===1?e=!0:Ox||zr&536870912?e=!1:(ep=e=!0,(n===2||n===9||n===3||n===6)&&(n=Go.current,n!==null&&n.tag===13&&(n.flags|=16384))),lZ(t,e)):pI(t)}function pI(e){var t=e;do{if(t.flags&32768){lZ(t,ep);return}e=t.return;var r=eGe(t.alternate,t,Pd);if(r!==null){Mr=r;return}if(t=t.sibling,t!==null){Mr=t;return}Mr=t=e}while(t!==null);Ca===0&&(Ca=5)}function lZ(e,t){do{var r=tGe(e.alternate,e);if(r!==null){r.flags&=32767,Mr=r;return}if(r=e.return,r!==null&&(r.flags|=32768,r.subtreeFlags=0,r.deletions=null),!t&&(e=e.sibling,e!==null)){Mr=e;return}Mr=e=r}while(e!==null);Ca=6,Mr=null}function TX(e,t,r,n,a,i,s,o,l){e.cancelPendingCommit=null;do mI();while(pi!==0);if(un&6)throw Error(Be(327));if(t!==null){if(t===e.current)throw Error(Be(177));if(i=t.lanes|t.childLanes,i|=KF,UHe(e,r,i,s,o,l),e===An&&(Mr=An=null,zr=0),Ax=t,lp=e,vd=r,SF=i,TF=a,eZ=n,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,pGe(AE,function(){return pZ(),null})):(e.callbackNode=null,e.callbackPriority=0),n=(t.flags&13878)!==0,t.subtreeFlags&13878||n){n=Qt.T,Qt.T=null,a=dn.p,dn.p=2,s=un,un|=4;try{rGe(e,t,r)}finally{un=s,dn.p=a,Qt.T=n}}pi=1,cZ(),uZ(),dZ()}}function cZ(){if(pi===1){pi=0;var e=lp,t=Ax,r=(t.flags&13878)!==0;if(t.subtreeFlags&13878||r){r=Qt.T,Qt.T=null;var n=dn.p;dn.p=2;var a=un;un|=4;try{GJ(t,e);var i=IF,s=IY(e.containerInfo),o=i.focusedElem,l=i.selectionRange;if(s!==o&&o&&o.ownerDocument&&EY(o.ownerDocument.documentElement,o)){if(l!==null&&GF(o)){var c=l.start,u=l.end;if(u===void 0&&(u=c),"selectionStart"in o)o.selectionStart=c,o.selectionEnd=Math.min(u,o.value.length);else{var d=o.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=o.textContent.length,h=Math.min(l.start,m),x=l.end===void 0?h:Math.min(l.end,m);!p.extend&&h>x&&(s=x,x=h,h=s);var g=qW(o,h),y=qW(o,x);if(g&&y&&(p.rangeCount!==1||p.anchorNode!==g.node||p.anchorOffset!==g.offset||p.focusNode!==y.node||p.focusOffset!==y.offset)){var b=d.createRange();b.setStart(g.node,g.offset),p.removeAllRanges(),h>x?(p.addRange(b),p.extend(y.node,y.offset)):(b.setEnd(y.node,y.offset),p.addRange(b))}}}}for(d=[],p=o;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof o.focus=="function"&&o.focus(),o=0;o<d.length;o++){var S=d[o];S.element.scrollLeft=S.left,S.element.scrollTop=S.top}}ZE=!!EF,IF=EF=null}finally{un=a,dn.p=n,Qt.T=r}}e.current=t,pi=2}}function uZ(){if(pi===2){pi=0;var e=lp,t=Ax,r=(t.flags&8772)!==0;if(t.subtreeFlags&8772||r){r=Qt.T,Qt.T=null;var n=dn.p;dn.p=2;var a=un;un|=4;try{zJ(e,t.alternate,t)}finally{un=a,dn.p=n,Qt.T=r}}pi=3}}function dZ(){if(pi===4||pi===3){pi=0,RHe();var e=lp,t=Ax,r=vd,n=eZ;t.subtreeFlags&10256||t.flags&10256?pi=5:(pi=0,Ax=lp=null,fZ(e,e.pendingLanes));var a=e.pendingLanes;if(a===0&&(op=null),$F(r),t=t.stateNode,Uo&&typeof Uo.onCommitFiberRoot=="function")try{Uo.onCommitFiberRoot(JS,t,void 0,(t.current.flags&128)===128)}catch{}if(n!==null){t=Qt.T,a=dn.p,dn.p=2,Qt.T=null;try{for(var i=e.onRecoverableError,s=0;s<n.length;s++){var o=n[s];i(o.value,{componentStack:o.stack})}}finally{Qt.T=t,dn.p=a}}vd&3&&mI(),pu(e),a=e.pendingLanes,r&261930&&a&42?e===wF?DS++:(DS=0,wF=e):DS=0,iT(0,!1)}}function fZ(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,rT(t)))}function mI(){return cZ(),uZ(),dZ(),pZ()}function pZ(){if(pi!==5)return!1;var e=lp,t=SF;SF=0;var r=$F(vd),n=Qt.T,a=dn.p;try{dn.p=32>r?32:r,Qt.T=null,r=TF,TF=null;var i=lp,s=vd;if(pi=0,Ax=lp=null,vd=0,un&6)throw Error(Be(331));var o=un;if(un|=4,JJ(i.current),WJ(i,i.current,s,r),un=o,iT(0,!1),Uo&&typeof Uo.onPostCommitFiberRoot=="function")try{Uo.onPostCommitFiberRoot(JS,i)}catch{}return!0}finally{dn.p=a,Qt.T=n,fZ(e,t)}}function wX(e,t,r){t=Dl(r,t),t=gF(e.stateNode,t,2),e=sp(e,t,2),e!==null&&(QS(e,2),pu(e))}function xn(e,t,r){if(e.tag===3)wX(e,e,r);else for(;t!==null;){if(t.tag===3){wX(t,e,r);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(op===null||!op.has(n))){e=Dl(r,e),r=AJ(2),n=sp(t,r,2),n!==null&&(NJ(r,n,t,e),QS(n,2),pu(n));break}}t=t.return}}function DO(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new iGe;var a=new Set;n.set(t,a)}else a=n.get(t),a===void 0&&(a=new Set,n.set(t,a));a.has(r)||(v3=!0,a.add(r),e=uGe.bind(null,e,t,r),t.then(e,e))}function uGe(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),e.pingedLanes|=e.suspendedLanes&r,e.warmLanes&=~r,An===e&&(zr&r)===r&&(Ca===4||Ca===3&&(zr&62914560)===zr&&300>zo()-dI?!(un&2)&&Nx(e,0):S3|=r,Ix===zr&&(Ix=0)),pu(e)}function mZ(e,t){t===0&&(t=iY()),e=wh(e,t),e!==null&&(QS(e,t),pu(e))}function dGe(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),mZ(e,r)}function fGe(e,t){var r=0;switch(e.tag){case 31:case 13:var n=e.stateNode,a=e.memoizedState;a!==null&&(r=a.retryLane);break;case 19:n=e.stateNode;break;case 22:n=e.stateNode._retryCache;break;default:throw Error(Be(314))}n!==null&&n.delete(t),mZ(e,r)}function pGe(e,t){return FF(e,t)}var HE=null,tx=null,CF=!1,GE=!1,MO=!1,rp=0;function pu(e){e!==tx&&e.next===null&&(tx===null?HE=tx=e:tx=tx.next=e),GE=!0,CF||(CF=!0,hGe())}function iT(e,t){if(!MO&&GE){MO=!0;do for(var r=!1,n=HE;n!==null;){if(!t)if(e!==0){var a=n.pendingLanes;if(a===0)var i=0;else{var s=n.suspendedLanes,o=n.pingedLanes;i=(1<<31-Vo(42|e)+1)-1,i&=a&~(s&~o),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(r=!0,CX(n,i))}else i=zr,i=eI(n,n===An?i:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),!(i&3)||ZS(n,i)||(r=!0,CX(n,i));n=n.next}while(r);MO=!1}}function mGe(){hZ()}function hZ(){GE=CF=!1;var e=0;rp!==0&&wGe()&&(e=rp);for(var t=zo(),r=null,n=HE;n!==null;){var a=n.next,i=gZ(n,t);i===0?(n.next=null,r===null?HE=a:r.next=a,a===null&&(tx=r)):(r=n,(e!==0||i&3)&&(GE=!0)),n=a}pi!==0&&pi!==5||iT(e,!1),rp!==0&&(rp=0)}function gZ(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,a=e.expirationTimes,i=e.pendingLanes&-62914561;0<i;){var s=31-Vo(i),o=1<<s,l=a[s];l===-1?(!(o&r)||o&n)&&(a[s]=zHe(o,t)):l<=t&&(e.expiredLanes|=o),i&=~o}if(t=An,r=zr,r=eI(e,e===t?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n=e.callbackNode,r===0||e===t&&(yn===2||yn===9)||e.cancelPendingCommit!==null)return n!==null&&n!==null&&uO(n),e.callbackNode=null,e.callbackPriority=0;if(!(r&3)||ZS(e,r)){if(t=r&-r,t===e.callbackPriority)return t;switch(n!==null&&uO(n),$F(r)){case 2:case 8:r=nY;break;case 32:r=AE;break;case 268435456:r=aY;break;default:r=AE}return n=yZ.bind(null,e),r=FF(r,n),e.callbackPriority=t,e.callbackNode=r,t}return n!==null&&n!==null&&uO(n),e.callbackPriority=2,e.callbackNode=null,2}function yZ(e,t){if(pi!==0&&pi!==5)return e.callbackNode=null,e.callbackPriority=0,null;var r=e.callbackNode;if(mI()&&e.callbackNode!==r)return null;var n=zr;return n=eI(e,e===An?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n===0?null:(rZ(e,n,t),gZ(e,zo()),e.callbackNode!=null&&e.callbackNode===r?yZ.bind(null,e):null)}function CX(e,t){if(mI())return null;rZ(e,t,!0)}function hGe(){PGe(function(){un&6?FF(rY,mGe):hZ()})}function w3(){if(rp===0){var e=Cx;e===0&&(e=KP,KP<<=1,!(KP&261888)&&(KP=256)),rp=e}return rp}function PX(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:dE(""+e)}function EX(e,t){var r=t.ownerDocument.createElement("input");return r.name=t.name,r.value=t.value,e.id&&r.setAttribute("form",e.id),t.parentNode.insertBefore(r,t),e=new FormData(e),r.parentNode.removeChild(r),e}function gGe(e,t,r,n,a){if(t==="submit"&&r&&r.stateNode===a){var i=PX((a[mo]||null).action),s=n.submitter;s&&(t=(t=s[mo]||null)?PX(t.formAction):s.getAttribute("formAction"),t!==null&&(i=t,s=null));var o=new tI("action","action",null,n,a);e.push({event:o,listeners:[{instance:null,listener:function(){if(n.defaultPrevented){if(rp!==0){var l=s?EX(a,s):new FormData(a);mF(r,{pending:!0,data:l,method:a.method,action:i},null,l)}}else typeof i=="function"&&(o.preventDefault(),l=s?EX(a,s):new FormData(a),mF(r,{pending:!0,data:l,method:a.method,action:i},i,l))},currentTarget:a}]})}}for(iE=0;iE<rF.length;iE++)sE=rF[iE],IX=sE.toLowerCase(),AX=sE[0].toUpperCase()+sE.slice(1),vc(IX,"on"+AX);var sE,IX,AX,iE;vc(NY,"onAnimationEnd");vc(kY,"onAnimationIteration");vc(_Y,"onAnimationStart");vc("dblclick","onDoubleClick");vc("focusin","onFocus");vc("focusout","onBlur");vc(D7e,"onTransitionRun");vc(M7e,"onTransitionStart");vc(O7e,"onTransitionCancel");vc(LY,"onTransitionEnd");Tx("onMouseEnter",["mouseout","mouseover"]);Tx("onMouseLeave",["mouseout","mouseover"]);Tx("onPointerEnter",["pointerout","pointerover"]);Tx("onPointerLeave",["pointerout","pointerover"]);vh("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));vh("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));vh("onBeforeInput",["compositionend","keypress","textInput","paste"]);vh("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));vh("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));vh("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var HS="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),yGe=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(HS));function xZ(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var n=e[r],a=n.event;n=n.listeners;e:{var i=void 0;if(t)for(var s=n.length-1;0<=s;s--){var o=n[s],l=o.instance,c=o.currentTarget;if(o=o.listener,l!==i&&a.isPropagationStopped())break e;i=o,a.currentTarget=c;try{i(a)}catch(u){kE(u)}a.currentTarget=null,i=l}else for(s=0;s<n.length;s++){if(o=n[s],l=o.instance,c=o.currentTarget,o=o.listener,l!==i&&a.isPropagationStopped())break e;i=o,a.currentTarget=c;try{i(a)}catch(u){kE(u)}a.currentTarget=null,i=l}}}}function Dr(e,t){var r=t[WO];r===void 0&&(r=t[WO]=new Set);var n=e+"__bubble";r.has(n)||(bZ(t,e,2,!1),r.add(n))}function OO(e,t,r){var n=0;t&&(n|=4),bZ(r,e,n,t)}var oE="_reactListening"+Math.random().toString(36).slice(2);function C3(e){if(!e[oE]){e[oE]=!0,uY.forEach(function(r){r!=="selectionchange"&&(yGe.has(r)||OO(r,!1,e),OO(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[oE]||(t[oE]=!0,OO("selectionchange",!1,t))}}function bZ(e,t,r,n){switch(LZ(t)){case 2:var a=HGe;break;case 8:a=GGe;break;default:a=A3}r=a.bind(null,t,r,e),a=void 0,!QO||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(a=!0),n?a!==void 0?e.addEventListener(t,r,{capture:!0,passive:a}):e.addEventListener(t,r,!0):a!==void 0?e.addEventListener(t,r,{passive:a}):e.addEventListener(t,r,!1)}function FO(e,t,r,n,a){var i=n;if(!(t&1)&&!(t&2)&&n!==null)e:for(;;){if(n===null)return;var s=n.tag;if(s===3||s===4){var o=n.stateNode.containerInfo;if(o===a)break;if(s===4)for(s=n.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===a)return;s=s.return}for(;o!==null;){if(s=ax(o),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){n=i=s;continue e}o=o.parentNode}}n=n.return}xY(function(){var c=i,u=UF(r),d=[];e:{var f=RY.get(e);if(f!==void 0){var p=tI,m=e;switch(e){case"keypress":if(pE(r)===0)break e;case"keydown":case"keyup":p=f7e;break;case"focusin":m="focus",p=hO;break;case"focusout":m="blur",p=hO;break;case"beforeblur":case"afterblur":p=hO;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=MW;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=e7e;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=h7e;break;case NY:case kY:case _Y:p=n7e;break;case LY:p=y7e;break;case"scroll":case"scrollend":p=ZHe;break;case"wheel":p=b7e;break;case"copy":case"cut":case"paste":p=i7e;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=FW;break;case"toggle":case"beforetoggle":p=S7e}var h=(t&4)!==0,x=!h&&(e==="scroll"||e==="scrollend"),g=h?f!==null?f+"Capture":null:f;h=[];for(var y=c,b;y!==null;){var S=y;if(b=S.stateNode,S=S.tag,S!==5&&S!==26&&S!==27||b===null||g===null||(S=FS(y,g),S!=null&&h.push(GS(y,S,b))),x)break;y=y.return}0<h.length&&(f=new p(f,m,null,r,u),d.push({event:f,listeners:h}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",f&&r!==ZO&&(m=r.relatedTarget||r.fromElement)&&(ax(m)||m[Lx]))break e;if((p||f)&&(f=u.window===u?u:(f=u.ownerDocument)?f.defaultView||f.parentWindow:window,p?(m=r.relatedTarget||r.toElement,p=c,m=m?ax(m):null,m!==null&&(x=YS(m),h=m.tag,m!==x||h!==5&&h!==27&&h!==6)&&(m=null)):(p=null,m=c),p!==m)){if(h=MW,S="onMouseLeave",g="onMouseEnter",y="mouse",(e==="pointerout"||e==="pointerover")&&(h=FW,S="onPointerLeave",g="onPointerEnter",y="pointer"),x=p==null?f:vS(p),b=m==null?f:vS(m),f=new h(S,y+"leave",p,r,u),f.target=x,f.relatedTarget=b,S=null,ax(u)===c&&(h=new h(g,y+"enter",m,r,u),h.target=b,h.relatedTarget=x,S=h),x=S,p&&m)t:{for(h=xGe,g=p,y=m,b=0,S=g;S;S=h(S))b++;S=0;for(var w=y;w;w=h(w))S++;for(;0<b-S;)g=h(g),b--;for(;0<S-b;)y=h(y),S--;for(;b--;){if(g===y||y!==null&&g===y.alternate){h=g;break t}g=h(g),y=h(y)}h=null}else h=null;p!==null&&NX(d,f,p,h,!1),m!==null&&x!==null&&NX(d,x,m,h,!0)}}e:{if(f=c?vS(c):window,p=f.nodeName&&f.nodeName.toLowerCase(),p==="select"||p==="input"&&f.type==="file")var E=zW;else if(jW(f))if(CY)E=_7e;else{E=N7e;var C=A7e}else p=f.nodeName,!p||p.toLowerCase()!=="input"||f.type!=="checkbox"&&f.type!=="radio"?c&&zF(c.elementType)&&(E=zW):E=k7e;if(E&&(E=E(e,c))){wY(d,E,r,u);break e}C&&C(e,f,c),e==="focusout"&&c&&f.type==="number"&&c.memoizedProps.value!=null&&JO(f,"number",f.value)}switch(C=c?vS(c):window,e){case"focusin":(jW(C)||C.contentEditable==="true")&&(ox=C,eF=c,PS=null);break;case"focusout":PS=eF=ox=null;break;case"mousedown":tF=!0;break;case"contextmenu":case"mouseup":case"dragend":tF=!1,HW(d,r,u);break;case"selectionchange":if(R7e)break;case"keydown":case"keyup":HW(d,r,u)}var N;if(HF)e:{switch(e){case"compositionstart":var _="onCompositionStart";break e;case"compositionend":_="onCompositionEnd";break e;case"compositionupdate":_="onCompositionUpdate";break e}_=void 0}else sx?SY(e,r)&&(_="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(_="onCompositionStart");_&&(vY&&r.locale!=="ko"&&(sx||_!=="onCompositionStart"?_==="onCompositionEnd"&&sx&&(N=bY()):(Qf=u,VF="value"in Qf?Qf.value:Qf.textContent,sx=!0)),C=KE(c,_),0<C.length&&(_=new OW(_,e,null,r,u),d.push({event:_,listeners:C}),N?_.data=N:(N=TY(r),N!==null&&(_.data=N)))),(N=w7e?C7e(e,r):P7e(e,r))&&(_=KE(c,"onBeforeInput"),0<_.length&&(C=new OW("onBeforeInput","beforeinput",null,r,u),d.push({event:C,listeners:_}),C.data=N)),gGe(d,e,c,r,u)}xZ(d,t)})}function GS(e,t,r){return{instance:e,listener:t,currentTarget:r}}function KE(e,t){for(var r=t+"Capture",n=[];e!==null;){var a=e,i=a.stateNode;if(a=a.tag,a!==5&&a!==26&&a!==27||i===null||(a=FS(e,r),a!=null&&n.unshift(GS(e,a,i)),a=FS(e,t),a!=null&&n.push(GS(e,a,i))),e.tag===3)return n;e=e.return}return[]}function xGe(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function NX(e,t,r,n,a){for(var i=t._reactName,s=[];r!==null&&r!==n;){var o=r,l=o.alternate,c=o.stateNode;if(o=o.tag,l!==null&&l===n)break;o!==5&&o!==26&&o!==27||c===null||(l=c,a?(c=FS(r,i),c!=null&&s.unshift(GS(r,c,l))):a||(c=FS(r,i),c!=null&&s.push(GS(r,c,l)))),r=r.return}s.length!==0&&e.push({event:t,listeners:s})}var bGe=/\r\n?/g,vGe=/\u0000|\uFFFD/g;function kX(e){return(typeof e=="string"?e:""+e).replace(bGe,`
`).replace(vGe,"")}function vZ(e,t){return t=kX(t),kX(e)===t}function wn(e,t,r,n,a,i){switch(r){case"children":typeof n=="string"?t==="body"||t==="textarea"&&n===""||wx(e,n):(typeof n=="number"||typeof n=="bigint")&&t!=="body"&&wx(e,""+n);break;case"className":YP(e,"class",n);break;case"tabIndex":YP(e,"tabindex",n);break;case"dir":case"role":case"viewBox":case"width":case"height":YP(e,r,n);break;case"style":yY(e,n,i);break;case"data":if(t!=="object"){YP(e,"data",n);break}case"src":case"href":if(n===""&&(t!=="a"||r!=="href")){e.removeAttribute(r);break}if(n==null||typeof n=="function"||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(r);break}n=dE(""+n),e.setAttribute(r,n);break;case"action":case"formAction":if(typeof n=="function"){e.setAttribute(r,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof i=="function"&&(r==="formAction"?(t!=="input"&&wn(e,t,"name",a.name,a,null),wn(e,t,"formEncType",a.formEncType,a,null),wn(e,t,"formMethod",a.formMethod,a,null),wn(e,t,"formTarget",a.formTarget,a,null)):(wn(e,t,"encType",a.encType,a,null),wn(e,t,"method",a.method,a,null),wn(e,t,"target",a.target,a,null)));if(n==null||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(r);break}n=dE(""+n),e.setAttribute(r,n);break;case"onClick":n!=null&&(e.onclick=gd);break;case"onScroll":n!=null&&Dr("scroll",e);break;case"onScrollEnd":n!=null&&Dr("scrollend",e);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(Be(61));if(r=n.__html,r!=null){if(a.children!=null)throw Error(Be(60));e.innerHTML=r}}break;case"multiple":e.multiple=n&&typeof n!="function"&&typeof n!="symbol";break;case"muted":e.muted=n&&typeof n!="function"&&typeof n!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(n==null||typeof n=="function"||typeof n=="boolean"||typeof n=="symbol"){e.removeAttribute("xlink:href");break}r=dE(""+n),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",r);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":n!=null&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(r,""+n):e.removeAttribute(r);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":n&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(r,""):e.removeAttribute(r);break;case"capture":case"download":n===!0?e.setAttribute(r,""):n!==!1&&n!=null&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(r,n):e.removeAttribute(r);break;case"cols":case"rows":case"size":case"span":n!=null&&typeof n!="function"&&typeof n!="symbol"&&!isNaN(n)&&1<=n?e.setAttribute(r,n):e.removeAttribute(r);break;case"rowSpan":case"start":n==null||typeof n=="function"||typeof n=="symbol"||isNaN(n)?e.removeAttribute(r):e.setAttribute(r,n);break;case"popover":Dr("beforetoggle",e),Dr("toggle",e),uE(e,"popover",n);break;case"xlinkActuate":ld(e,"http://www.w3.org/1999/xlink","xlink:actuate",n);break;case"xlinkArcrole":ld(e,"http://www.w3.org/1999/xlink","xlink:arcrole",n);break;case"xlinkRole":ld(e,"http://www.w3.org/1999/xlink","xlink:role",n);break;case"xlinkShow":ld(e,"http://www.w3.org/1999/xlink","xlink:show",n);break;case"xlinkTitle":ld(e,"http://www.w3.org/1999/xlink","xlink:title",n);break;case"xlinkType":ld(e,"http://www.w3.org/1999/xlink","xlink:type",n);break;case"xmlBase":ld(e,"http://www.w3.org/XML/1998/namespace","xml:base",n);break;case"xmlLang":ld(e,"http://www.w3.org/XML/1998/namespace","xml:lang",n);break;case"xmlSpace":ld(e,"http://www.w3.org/XML/1998/namespace","xml:space",n);break;case"is":uE(e,"is",n);break;case"innerText":case"textContent":break;default:(!(2<r.length)||r[0]!=="o"&&r[0]!=="O"||r[1]!=="n"&&r[1]!=="N")&&(r=YHe.get(r)||r,uE(e,r,n))}}function PF(e,t,r,n,a,i){switch(r){case"style":yY(e,n,i);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(Be(61));if(r=n.__html,r!=null){if(a.children!=null)throw Error(Be(60));e.innerHTML=r}}break;case"children":typeof n=="string"?wx(e,n):(typeof n=="number"||typeof n=="bigint")&&wx(e,""+n);break;case"onScroll":n!=null&&Dr("scroll",e);break;case"onScrollEnd":n!=null&&Dr("scrollend",e);break;case"onClick":n!=null&&(e.onclick=gd);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!dY.hasOwnProperty(r))e:{if(r[0]==="o"&&r[1]==="n"&&(a=r.endsWith("Capture"),t=r.slice(2,a?r.length-7:void 0),i=e[mo]||null,i=i!=null?i[r]:null,typeof i=="function"&&e.removeEventListener(t,i,a),typeof n=="function")){typeof i!="function"&&i!==null&&(r in e?e[r]=null:e.hasAttribute(r)&&e.removeAttribute(r)),e.addEventListener(t,n,a);break e}r in e?e[r]=n:n===!0?e.setAttribute(r,""):uE(e,r,n)}}}function es(e,t,r){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Dr("error",e),Dr("load",e);var n=!1,a=!1,i;for(i in r)if(r.hasOwnProperty(i)){var s=r[i];if(s!=null)switch(i){case"src":n=!0;break;case"srcSet":a=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(Be(137,t));default:wn(e,t,i,s,r,null)}}a&&wn(e,t,"srcSet",r.srcSet,r,null),n&&wn(e,t,"src",r.src,r,null);return;case"input":Dr("invalid",e);var o=i=s=a=null,l=null,c=null;for(n in r)if(r.hasOwnProperty(n)){var u=r[n];if(u!=null)switch(n){case"name":a=u;break;case"type":s=u;break;case"checked":l=u;break;case"defaultChecked":c=u;break;case"value":i=u;break;case"defaultValue":o=u;break;case"children":case"dangerouslySetInnerHTML":if(u!=null)throw Error(Be(137,t));break;default:wn(e,t,n,u,r,null)}}mY(e,i,o,l,c,s,a,!1);return;case"select":Dr("invalid",e),n=s=i=null;for(a in r)if(r.hasOwnProperty(a)&&(o=r[a],o!=null))switch(a){case"value":i=o;break;case"defaultValue":s=o;break;case"multiple":n=o;default:wn(e,t,a,o,r,null)}t=i,r=s,e.multiple=!!n,t!=null?hx(e,!!n,t,!1):r!=null&&hx(e,!!n,r,!0);return;case"textarea":Dr("invalid",e),i=a=n=null;for(s in r)if(r.hasOwnProperty(s)&&(o=r[s],o!=null))switch(s){case"value":n=o;break;case"defaultValue":a=o;break;case"children":i=o;break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(Be(91));break;default:wn(e,t,s,o,r,null)}gY(e,n,a,i);return;case"option":for(l in r)if(r.hasOwnProperty(l)&&(n=r[l],n!=null))switch(l){case"selected":e.selected=n&&typeof n!="function"&&typeof n!="symbol";break;default:wn(e,t,l,n,r,null)}return;case"dialog":Dr("beforetoggle",e),Dr("toggle",e),Dr("cancel",e),Dr("close",e);break;case"iframe":case"object":Dr("load",e);break;case"video":case"audio":for(n=0;n<HS.length;n++)Dr(HS[n],e);break;case"image":Dr("error",e),Dr("load",e);break;case"details":Dr("toggle",e);break;case"embed":case"source":case"link":Dr("error",e),Dr("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(c in r)if(r.hasOwnProperty(c)&&(n=r[c],n!=null))switch(c){case"children":case"dangerouslySetInnerHTML":throw Error(Be(137,t));default:wn(e,t,c,n,r,null)}return;default:if(zF(t)){for(u in r)r.hasOwnProperty(u)&&(n=r[u],n!==void 0&&PF(e,t,u,n,r,void 0));return}}for(o in r)r.hasOwnProperty(o)&&(n=r[o],n!=null&&wn(e,t,o,n,r,null))}function SGe(e,t,r,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var a=null,i=null,s=null,o=null,l=null,c=null,u=null;for(p in r){var d=r[p];if(r.hasOwnProperty(p)&&d!=null)switch(p){case"checked":break;case"value":break;case"defaultValue":l=d;default:n.hasOwnProperty(p)||wn(e,t,p,null,n,d)}}for(var f in n){var p=n[f];if(d=r[f],n.hasOwnProperty(f)&&(p!=null||d!=null))switch(f){case"type":i=p;break;case"name":a=p;break;case"checked":c=p;break;case"defaultChecked":u=p;break;case"value":s=p;break;case"defaultValue":o=p;break;case"children":case"dangerouslySetInnerHTML":if(p!=null)throw Error(Be(137,t));break;default:p!==d&&wn(e,t,f,p,n,d)}}YO(e,s,o,l,c,u,i,a);return;case"select":p=s=o=f=null;for(i in r)if(l=r[i],r.hasOwnProperty(i)&&l!=null)switch(i){case"value":break;case"multiple":p=l;default:n.hasOwnProperty(i)||wn(e,t,i,null,n,l)}for(a in n)if(i=n[a],l=r[a],n.hasOwnProperty(a)&&(i!=null||l!=null))switch(a){case"value":f=i;break;case"defaultValue":o=i;break;case"multiple":s=i;default:i!==l&&wn(e,t,a,i,n,l)}t=o,r=s,n=p,f!=null?hx(e,!!r,f,!1):!!n!=!!r&&(t!=null?hx(e,!!r,t,!0):hx(e,!!r,r?[]:"",!1));return;case"textarea":p=f=null;for(o in r)if(a=r[o],r.hasOwnProperty(o)&&a!=null&&!n.hasOwnProperty(o))switch(o){case"value":break;case"children":break;default:wn(e,t,o,null,n,a)}for(s in n)if(a=n[s],i=r[s],n.hasOwnProperty(s)&&(a!=null||i!=null))switch(s){case"value":f=a;break;case"defaultValue":p=a;break;case"children":break;case"dangerouslySetInnerHTML":if(a!=null)throw Error(Be(91));break;default:a!==i&&wn(e,t,s,a,n,i)}hY(e,f,p);return;case"option":for(var m in r)if(f=r[m],r.hasOwnProperty(m)&&f!=null&&!n.hasOwnProperty(m))switch(m){case"selected":e.selected=!1;break;default:wn(e,t,m,null,n,f)}for(l in n)if(f=n[l],p=r[l],n.hasOwnProperty(l)&&f!==p&&(f!=null||p!=null))switch(l){case"selected":e.selected=f&&typeof f!="function"&&typeof f!="symbol";break;default:wn(e,t,l,f,n,p)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var h in r)f=r[h],r.hasOwnProperty(h)&&f!=null&&!n.hasOwnProperty(h)&&wn(e,t,h,null,n,f);for(c in n)if(f=n[c],p=r[c],n.hasOwnProperty(c)&&f!==p&&(f!=null||p!=null))switch(c){case"children":case"dangerouslySetInnerHTML":if(f!=null)throw Error(Be(137,t));break;default:wn(e,t,c,f,n,p)}return;default:if(zF(t)){for(var x in r)f=r[x],r.hasOwnProperty(x)&&f!==void 0&&!n.hasOwnProperty(x)&&PF(e,t,x,void 0,n,f);for(u in n)f=n[u],p=r[u],!n.hasOwnProperty(u)||f===p||f===void 0&&p===void 0||PF(e,t,u,f,n,p);return}}for(var g in r)f=r[g],r.hasOwnProperty(g)&&f!=null&&!n.hasOwnProperty(g)&&wn(e,t,g,null,n,f);for(d in n)f=n[d],p=r[d],!n.hasOwnProperty(d)||f===p||f==null&&p==null||wn(e,t,d,f,n,p)}function _X(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function TGe(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,r=performance.getEntriesByType("resource"),n=0;n<r.length;n++){var a=r[n],i=a.transferSize,s=a.initiatorType,o=a.duration;if(i&&o&&_X(s)){for(s=0,o=a.responseEnd,n+=1;n<r.length;n++){var l=r[n],c=l.startTime;if(c>o)break;var u=l.transferSize,d=l.initiatorType;u&&_X(d)&&(l=l.responseEnd,s+=u*(l<o?1:(o-c)/(l-c)))}if(--n,t+=8*(i+s)/(a.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var EF=null,IF=null;function WE(e){return e.nodeType===9?e:e.ownerDocument}function LX(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function SZ(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function AF(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var BO=null;function wGe(){var e=window.event;return e&&e.type==="popstate"?e===BO?!1:(BO=e,!0):(BO=null,!1)}var TZ=typeof setTimeout=="function"?setTimeout:void 0,CGe=typeof clearTimeout=="function"?clearTimeout:void 0,RX=typeof Promise=="function"?Promise:void 0,PGe=typeof queueMicrotask=="function"?queueMicrotask:typeof RX<"u"?function(e){return RX.resolve(null).then(e).catch(EGe)}:TZ;function EGe(e){setTimeout(function(){throw e})}function yp(e){return e==="head"}function DX(e,t){var r=t,n=0;do{var a=r.nextSibling;if(e.removeChild(r),a&&a.nodeType===8)if(r=a.data,r==="/$"||r==="/&"){if(n===0){e.removeChild(a),_x(t);return}n--}else if(r==="$"||r==="$?"||r==="$~"||r==="$!"||r==="&")n++;else if(r==="html")MS(e.ownerDocument.documentElement);else if(r==="head"){r=e.ownerDocument.head,MS(r);for(var i=r.firstChild;i;){var s=i.nextSibling,o=i.nodeName;i[eT]||o==="SCRIPT"||o==="STYLE"||o==="LINK"&&i.rel.toLowerCase()==="stylesheet"||r.removeChild(i),i=s}}else r==="body"&&MS(e.ownerDocument.body);r=a}while(r);_x(t)}function MX(e,t){var r=e;e=0;do{var n=r.nextSibling;if(r.nodeType===1?t?(r._stashedDisplay=r.style.display,r.style.display="none"):(r.style.display=r._stashedDisplay||"",r.getAttribute("style")===""&&r.removeAttribute("style")):r.nodeType===3&&(t?(r._stashedText=r.nodeValue,r.nodeValue=""):r.nodeValue=r._stashedText||""),n&&n.nodeType===8)if(r=n.data,r==="/$"){if(e===0)break;e--}else r!=="$"&&r!=="$?"&&r!=="$~"&&r!=="$!"||e++;r=n}while(r)}function NF(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var r=t;switch(t=t.nextSibling,r.nodeName){case"HTML":case"HEAD":case"BODY":NF(r),jF(r);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(r.rel.toLowerCase()==="stylesheet")continue}e.removeChild(r)}}function IGe(e,t,r,n){for(;e.nodeType===1;){var a=r;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!n&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(n){if(!e[eT])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(i=e.getAttribute("rel"),i==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(i!==a.rel||e.getAttribute("href")!==(a.href==null||a.href===""?null:a.href)||e.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin)||e.getAttribute("title")!==(a.title==null?null:a.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(i=e.getAttribute("src"),(i!==(a.src==null?null:a.src)||e.getAttribute("type")!==(a.type==null?null:a.type)||e.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin))&&i&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var i=a.name==null?null:""+a.name;if(a.type==="hidden"&&e.getAttribute("name")===i)return e}else return e;if(e=Fl(e.nextSibling),e===null)break}return null}function AGe(e,t,r){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!r||(e=Fl(e.nextSibling),e===null))return null;return e}function wZ(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Fl(e.nextSibling),e===null))return null;return e}function kF(e){return e.data==="$?"||e.data==="$~"}function _F(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function NGe(e,t){var r=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||r.readyState!=="loading")t();else{var n=function(){t(),r.removeEventListener("DOMContentLoaded",n)};r.addEventListener("DOMContentLoaded",n),e._reactRetry=n}}function Fl(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var LF=null;function OX(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"||r==="/&"){if(t===0)return Fl(e.nextSibling);t--}else r!=="$"&&r!=="$!"&&r!=="$?"&&r!=="$~"&&r!=="&"||t++}e=e.nextSibling}return null}function FX(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"||r==="$~"||r==="&"){if(t===0)return e;t--}else r!=="/$"&&r!=="/&"||t++}e=e.previousSibling}return null}function CZ(e,t,r){switch(t=WE(r),e){case"html":if(e=t.documentElement,!e)throw Error(Be(452));return e;case"head":if(e=t.head,!e)throw Error(Be(453));return e;case"body":if(e=t.body,!e)throw Error(Be(454));return e;default:throw Error(Be(451))}}function MS(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);jF(e)}var Bl=new Map,BX=new Set;function XE(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Ed=dn.d;dn.d={f:kGe,r:_Ge,D:LGe,C:RGe,L:DGe,m:MGe,X:FGe,S:OGe,M:BGe};function kGe(){var e=Ed.f(),t=fI();return e||t}function _Ge(e){var t=Rx(e);t!==null&&t.tag===5&&t.type==="form"?yJ(t):Ed.r(e)}var Fx=typeof document>"u"?null:document;function PZ(e,t,r){var n=Fx;if(n&&typeof t=="string"&&t){var a=Rl(t);a='link[rel="'+e+'"][href="'+a+'"]',typeof r=="string"&&(a+='[crossorigin="'+r+'"]'),BX.has(a)||(BX.add(a),e={rel:e,crossOrigin:r,href:t},n.querySelector(a)===null&&(t=n.createElement("link"),es(t,"link",e),Di(t),n.head.appendChild(t)))}}function LGe(e){Ed.D(e),PZ("dns-prefetch",e,null)}function RGe(e,t){Ed.C(e,t),PZ("preconnect",e,t)}function DGe(e,t,r){Ed.L(e,t,r);var n=Fx;if(n&&e&&t){var a='link[rel="preload"][as="'+Rl(t)+'"]';t==="image"&&r&&r.imageSrcSet?(a+='[imagesrcset="'+Rl(r.imageSrcSet)+'"]',typeof r.imageSizes=="string"&&(a+='[imagesizes="'+Rl(r.imageSizes)+'"]')):a+='[href="'+Rl(e)+'"]';var i=a;switch(t){case"style":i=kx(e);break;case"script":i=Bx(e)}Bl.has(i)||(e=Xn({rel:"preload",href:t==="image"&&r&&r.imageSrcSet?void 0:e,as:t},r),Bl.set(i,e),n.querySelector(a)!==null||t==="style"&&n.querySelector(sT(i))||t==="script"&&n.querySelector(oT(i))||(t=n.createElement("link"),es(t,"link",e),Di(t),n.head.appendChild(t)))}}function MGe(e,t){Ed.m(e,t);var r=Fx;if(r&&e){var n=t&&typeof t.as=="string"?t.as:"script",a='link[rel="modulepreload"][as="'+Rl(n)+'"][href="'+Rl(e)+'"]',i=a;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=Bx(e)}if(!Bl.has(i)&&(e=Xn({rel:"modulepreload",href:e},t),Bl.set(i,e),r.querySelector(a)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(r.querySelector(oT(i)))return}n=r.createElement("link"),es(n,"link",e),Di(n),r.head.appendChild(n)}}}function OGe(e,t,r){Ed.S(e,t,r);var n=Fx;if(n&&e){var a=mx(n).hoistableStyles,i=kx(e);t=t||"default";var s=a.get(i);if(!s){var o={loading:0,preload:null};if(s=n.querySelector(sT(i)))o.loading=5;else{e=Xn({rel:"stylesheet",href:e,"data-precedence":t},r),(r=Bl.get(i))&&P3(e,r);var l=s=n.createElement("link");Di(l),es(l,"link",e),l._p=new Promise(function(c,u){l.onload=c,l.onerror=u}),l.addEventListener("load",function(){o.loading|=1}),l.addEventListener("error",function(){o.loading|=2}),o.loading|=4,SE(s,t,n)}s={type:"stylesheet",instance:s,count:1,state:o},a.set(i,s)}}}function FGe(e,t){Ed.X(e,t);var r=Fx;if(r&&e){var n=mx(r).hoistableScripts,a=Bx(e),i=n.get(a);i||(i=r.querySelector(oT(a)),i||(e=Xn({src:e,async:!0},t),(t=Bl.get(a))&&E3(e,t),i=r.createElement("script"),Di(i),es(i,"link",e),r.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},n.set(a,i))}}function BGe(e,t){Ed.M(e,t);var r=Fx;if(r&&e){var n=mx(r).hoistableScripts,a=Bx(e),i=n.get(a);i||(i=r.querySelector(oT(a)),i||(e=Xn({src:e,async:!0,type:"module"},t),(t=Bl.get(a))&&E3(e,t),i=r.createElement("script"),Di(i),es(i,"link",e),r.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},n.set(a,i))}}function $X(e,t,r,n){var a=(a=np.current)?XE(a):null;if(!a)throw Error(Be(446));switch(e){case"meta":case"title":return null;case"style":return typeof r.precedence=="string"&&typeof r.href=="string"?(t=kx(r.href),r=mx(a).hoistableStyles,n=r.get(t),n||(n={type:"style",instance:null,count:0,state:null},r.set(t,n)),n):{type:"void",instance:null,count:0,state:null};case"link":if(r.rel==="stylesheet"&&typeof r.href=="string"&&typeof r.precedence=="string"){e=kx(r.href);var i=mx(a).hoistableStyles,s=i.get(e);if(s||(a=a.ownerDocument||a,s={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,s),(i=a.querySelector(sT(e)))&&!i._p&&(s.instance=i,s.state.loading=5),Bl.has(e)||(r={rel:"preload",as:"style",href:r.href,crossOrigin:r.crossOrigin,integrity:r.integrity,media:r.media,hrefLang:r.hrefLang,referrerPolicy:r.referrerPolicy},Bl.set(e,r),i||$Ge(a,e,r,s.state))),t&&n===null)throw Error(Be(528,""));return s}if(t&&n!==null)throw Error(Be(529,""));return null;case"script":return t=r.async,r=r.src,typeof r=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Bx(r),r=mx(a).hoistableScripts,n=r.get(t),n||(n={type:"script",instance:null,count:0,state:null},r.set(t,n)),n):{type:"void",instance:null,count:0,state:null};default:throw Error(Be(444,e))}}function kx(e){return'href="'+Rl(e)+'"'}function sT(e){return'link[rel="stylesheet"]['+e+"]"}function EZ(e){return Xn({},e,{"data-precedence":e.precedence,precedence:null})}function $Ge(e,t,r,n){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?n.loading=1:(t=e.createElement("link"),n.preload=t,t.addEventListener("load",function(){return n.loading|=1}),t.addEventListener("error",function(){return n.loading|=2}),es(t,"link",r),Di(t),e.head.appendChild(t))}function Bx(e){return'[src="'+Rl(e)+'"]'}function oT(e){return"script[async]"+e}function jX(e,t,r){if(t.count++,t.instance===null)switch(t.type){case"style":var n=e.querySelector('style[data-href~="'+Rl(r.href)+'"]');if(n)return t.instance=n,Di(n),n;var a=Xn({},r,{"data-href":r.href,"data-precedence":r.precedence,href:null,precedence:null});return n=(e.ownerDocument||e).createElement("style"),Di(n),es(n,"style",a),SE(n,r.precedence,e),t.instance=n;case"stylesheet":a=kx(r.href);var i=e.querySelector(sT(a));if(i)return t.state.loading|=4,t.instance=i,Di(i),i;n=EZ(r),(a=Bl.get(a))&&P3(n,a),i=(e.ownerDocument||e).createElement("link"),Di(i);var s=i;return s._p=new Promise(function(o,l){s.onload=o,s.onerror=l}),es(i,"link",n),t.state.loading|=4,SE(i,r.precedence,e),t.instance=i;case"script":return i=Bx(r.src),(a=e.querySelector(oT(i)))?(t.instance=a,Di(a),a):(n=r,(a=Bl.get(i))&&(n=Xn({},r),E3(n,a)),e=e.ownerDocument||e,a=e.createElement("script"),Di(a),es(a,"link",n),e.head.appendChild(a),t.instance=a);case"void":return null;default:throw Error(Be(443,t.type))}else t.type==="stylesheet"&&!(t.state.loading&4)&&(n=t.instance,t.state.loading|=4,SE(n,r.precedence,e));return t.instance}function SE(e,t,r){for(var n=r.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),a=n.length?n[n.length-1]:null,i=a,s=0;s<n.length;s++){var o=n[s];if(o.dataset.precedence===t)i=o;else if(i!==a)break}i?i.parentNode.insertBefore(e,i.nextSibling):(t=r.nodeType===9?r.head:r,t.insertBefore(e,t.firstChild))}function P3(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function E3(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var TE=null;function zX(e,t,r){if(TE===null){var n=new Map,a=TE=new Map;a.set(r,n)}else a=TE,n=a.get(r),n||(n=new Map,a.set(r,n));if(n.has(e))return n;for(n.set(e,null),r=r.getElementsByTagName(e),a=0;a<r.length;a++){var i=r[a];if(!(i[eT]||i[Ji]||e==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var s=i.getAttribute(t)||"";s=e+s;var o=n.get(s);o?o.push(i):n.set(s,[i])}}return n}function UX(e,t,r){e=e.ownerDocument||e,e.head.insertBefore(r,t==="title"?e.querySelector("head > title"):null)}function jGe(e,t,r){if(r===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function IZ(e){return!(e.type==="stylesheet"&&!(e.state.loading&3))}function zGe(e,t,r,n){if(r.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&!(r.state.loading&4)){if(r.instance===null){var a=kx(n.href),i=t.querySelector(sT(a));if(i){t=i._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=YE.bind(e),t.then(e,e)),r.state.loading|=4,r.instance=i,Di(i);return}i=t.ownerDocument||t,n=EZ(n),(a=Bl.get(a))&&P3(n,a),i=i.createElement("link"),Di(i);var s=i;s._p=new Promise(function(o,l){s.onload=o,s.onerror=l}),es(i,"link",n),r.instance=i}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(r,t),(t=r.state.preload)&&!(r.state.loading&3)&&(e.count++,r=YE.bind(e),t.addEventListener("load",r),t.addEventListener("error",r))}}var $O=0;function UGe(e,t){return e.stylesheets&&e.count===0&&wE(e,e.stylesheets),0<e.count||0<e.imgCount?function(r){var n=setTimeout(function(){if(e.stylesheets&&wE(e,e.stylesheets),e.unsuspend){var i=e.unsuspend;e.unsuspend=null,i()}},6e4+t);0<e.imgBytes&&$O===0&&($O=62500*TGe());var a=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&wE(e,e.stylesheets),e.unsuspend)){var i=e.unsuspend;e.unsuspend=null,i()}},(e.imgBytes>$O?50:800)+t);return e.unsuspend=r,function(){e.unsuspend=null,clearTimeout(n),clearTimeout(a)}}:null}function YE(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)wE(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var JE=null;function wE(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,JE=new Map,t.forEach(VGe,e),JE=null,YE.call(e))}function VGe(e,t){if(!(t.state.loading&4)){var r=JE.get(e);if(r)var n=r.get(null);else{r=new Map,JE.set(e,r);for(var a=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<a.length;i++){var s=a[i];(s.nodeName==="LINK"||s.getAttribute("media")!=="not all")&&(r.set(s.dataset.precedence,s),n=s)}n&&r.set(null,n)}a=t.instance,s=a.getAttribute("data-precedence"),i=r.get(s)||n,i===n&&r.set(null,a),r.set(s,a),this.count++,n=YE.bind(this),a.addEventListener("load",n),a.addEventListener("error",n),i?i.parentNode.insertBefore(a,i.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(a,e.firstChild)),t.state.loading|=4}}var KS={$$typeof:hd,Provider:null,Consumer:null,_currentValue:uh,_currentValue2:uh,_threadCount:0};function qGe(e,t,r,n,a,i,s,o,l){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=dO(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=dO(0),this.hiddenUpdates=dO(null),this.identifierPrefix=n,this.onUncaughtError=a,this.onCaughtError=i,this.onRecoverableError=s,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=l,this.incompleteTransitions=new Map}function AZ(e,t,r,n,a,i,s,o,l,c,u,d){return e=new qGe(e,t,r,s,l,c,u,d,o),t=1,i===!0&&(t|=24),i=$o(3,null,null,t),e.current=i,i.stateNode=e,t=ZF(),t.refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:n,isDehydrated:r,cache:t},t3(i),e}function NZ(e){return e?(e=ux,e):ux}function kZ(e,t,r,n,a,i){a=NZ(a),n.context===null?n.context=a:n.pendingContext=a,n=ip(t),n.payload={element:r},i=i===void 0?null:i,i!==null&&(n.callback=i),r=sp(e,n,t),r!==null&&(po(r,e,t),IS(r,e,t))}function VX(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function I3(e,t){VX(e,t),(e=e.alternate)&&VX(e,t)}function _Z(e){if(e.tag===13||e.tag===31){var t=wh(e,67108864);t!==null&&po(t,e,67108864),I3(e,67108864)}}function qX(e){if(e.tag===13||e.tag===31){var t=qo();t=BF(t);var r=wh(e,t);r!==null&&po(r,e,t),I3(e,t)}}var ZE=!0;function HGe(e,t,r,n){var a=Qt.T;Qt.T=null;var i=dn.p;try{dn.p=2,A3(e,t,r,n)}finally{dn.p=i,Qt.T=a}}function GGe(e,t,r,n){var a=Qt.T;Qt.T=null;var i=dn.p;try{dn.p=8,A3(e,t,r,n)}finally{dn.p=i,Qt.T=a}}function A3(e,t,r,n){if(ZE){var a=RF(n);if(a===null)FO(e,t,n,QE,r),HX(e,n);else if(WGe(a,e,t,r,n))n.stopPropagation();else if(HX(e,n),t&4&&-1<KGe.indexOf(e)){for(;a!==null;){var i=Rx(a);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var s=oh(i.pendingLanes);if(s!==0){var o=i;for(o.pendingLanes|=2,o.entangledLanes|=2;s;){var l=1<<31-Vo(s);o.entanglements[1]|=l,s&=~l}pu(i),!(un&6)&&(UE=zo()+500,iT(0,!1))}}break;case 31:case 13:o=wh(i,2),o!==null&&po(o,i,2),fI(),I3(i,2)}if(i=RF(n),i===null&&FO(e,t,n,QE,r),i===a)break;a=i}a!==null&&n.stopPropagation()}else FO(e,t,n,null,r)}}function RF(e){return e=UF(e),N3(e)}var QE=null;function N3(e){if(QE=null,e=ax(e),e!==null){var t=YS(e);if(t===null)e=null;else{var r=t.tag;if(r===13){if(e=JX(t),e!==null)return e;e=null}else if(r===31){if(e=ZX(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return QE=e,null}function LZ(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(DHe()){case rY:return 2;case nY:return 8;case AE:case MHe:return 32;case aY:return 268435456;default:return 32}default:return 32}}var DF=!1,cp=null,up=null,dp=null,WS=new Map,XS=new Map,Jf=[],KGe="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function HX(e,t){switch(e){case"focusin":case"focusout":cp=null;break;case"dragenter":case"dragleave":up=null;break;case"mouseover":case"mouseout":dp=null;break;case"pointerover":case"pointerout":WS.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":XS.delete(t.pointerId)}}function gS(e,t,r,n,a,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:r,eventSystemFlags:n,nativeEvent:i,targetContainers:[a]},t!==null&&(t=Rx(t),t!==null&&_Z(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,a!==null&&t.indexOf(a)===-1&&t.push(a),e)}function WGe(e,t,r,n,a){switch(t){case"focusin":return cp=gS(cp,e,t,r,n,a),!0;case"dragenter":return up=gS(up,e,t,r,n,a),!0;case"mouseover":return dp=gS(dp,e,t,r,n,a),!0;case"pointerover":var i=a.pointerId;return WS.set(i,gS(WS.get(i)||null,e,t,r,n,a)),!0;case"gotpointercapture":return i=a.pointerId,XS.set(i,gS(XS.get(i)||null,e,t,r,n,a)),!0}return!1}function RZ(e){var t=ax(e.target);if(t!==null){var r=YS(t);if(r!==null){if(t=r.tag,t===13){if(t=JX(r),t!==null){e.blockedOn=t,AW(e.priority,function(){qX(r)});return}}else if(t===31){if(t=ZX(r),t!==null){e.blockedOn=t,AW(e.priority,function(){qX(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function CE(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=RF(e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);ZO=n,r.target.dispatchEvent(n),ZO=null}else return t=Rx(r),t!==null&&_Z(t),e.blockedOn=r,!1;t.shift()}return!0}function GX(e,t,r){CE(e)&&r.delete(t)}function XGe(){DF=!1,cp!==null&&CE(cp)&&(cp=null),up!==null&&CE(up)&&(up=null),dp!==null&&CE(dp)&&(dp=null),WS.forEach(GX),XS.forEach(GX)}function lE(e,t){e.blockedOn===t&&(e.blockedOn=null,DF||(DF=!0,mi.unstable_scheduleCallback(mi.unstable_NormalPriority,XGe)))}var cE=null;function KX(e){cE!==e&&(cE=e,mi.unstable_scheduleCallback(mi.unstable_NormalPriority,function(){cE===e&&(cE=null);for(var t=0;t<e.length;t+=3){var r=e[t],n=e[t+1],a=e[t+2];if(typeof n!="function"){if(N3(n||r)===null)continue;break}var i=Rx(r);i!==null&&(e.splice(t,3),t-=3,mF(i,{pending:!0,data:a,method:r.method,action:n},n,a))}}))}function _x(e){function t(l){return lE(l,e)}cp!==null&&lE(cp,e),up!==null&&lE(up,e),dp!==null&&lE(dp,e),WS.forEach(t),XS.forEach(t);for(var r=0;r<Jf.length;r++){var n=Jf[r];n.blockedOn===e&&(n.blockedOn=null)}for(;0<Jf.length&&(r=Jf[0],r.blockedOn===null);)RZ(r),r.blockedOn===null&&Jf.shift();if(r=(e.ownerDocument||e).$$reactFormReplay,r!=null)for(n=0;n<r.length;n+=3){var a=r[n],i=r[n+1],s=a[mo]||null;if(typeof i=="function")s||KX(r);else if(s){var o=null;if(i&&i.hasAttribute("formAction")){if(a=i,s=i[mo]||null)o=s.formAction;else if(N3(a)!==null)continue}else o=s.action;typeof o=="function"?r[n+1]=o:(r.splice(n,3),n-=3),KX(r)}}}function DZ(){function e(i){i.canIntercept&&i.info==="react-transition"&&i.intercept({handler:function(){return new Promise(function(s){return a=s})},focusReset:"manual",scroll:"manual"})}function t(){a!==null&&(a(),a=null),n||setTimeout(r,20)}function r(){if(!n&&!navigation.transition){var i=navigation.currentEntry;i&&i.url!=null&&navigation.navigate(i.url,{state:i.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var n=!1,a=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(r,100),function(){n=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),a!==null&&(a(),a=null)}}}function k3(e){this._internalRoot=e}hI.prototype.render=k3.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(Be(409));var r=t.current,n=qo();kZ(r,n,e,t,null,null)};hI.prototype.unmount=k3.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;kZ(e.current,2,null,e,null,null),fI(),t[Lx]=null}};function hI(e){this._internalRoot=e}hI.prototype.unstable_scheduleHydration=function(e){if(e){var t=cY();e={blockedOn:null,target:e,priority:t};for(var r=0;r<Jf.length&&t!==0&&t<Jf[r].priority;r++);Jf.splice(r,0,e),r===0&&RZ(e)}};var WX=XX.version;if(WX!=="19.2.0")throw Error(Be(527,WX,"19.2.0"));dn.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(Be(188)):(e=Object.keys(e).join(","),Error(Be(268,e)));return e=IHe(t),e=e!==null?QX(e):null,e=e===null?null:e.stateNode,e};var YGe={bundleType:0,version:"19.2.0",rendererPackageName:"react-dom",currentDispatcherRef:Qt,reconcilerVersion:"19.2.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(yS=__REACT_DEVTOOLS_GLOBAL_HOOK__,!yS.isDisabled&&yS.supportsFiber))try{JS=yS.inject(YGe),Uo=yS}catch{}var yS;gI.createRoot=function(e,t){if(!YX(e))throw Error(Be(299));var r=!1,n="",a=PJ,i=EJ,s=IJ;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onUncaughtError!==void 0&&(a=t.onUncaughtError),t.onCaughtError!==void 0&&(i=t.onCaughtError),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=AZ(e,1,!1,null,null,r,n,null,a,i,s,DZ),e[Lx]=t.current,C3(e),new k3(t)};gI.hydrateRoot=function(e,t,r){if(!YX(e))throw Error(Be(299));var n=!1,a="",i=PJ,s=EJ,o=IJ,l=null;return r!=null&&(r.unstable_strictMode===!0&&(n=!0),r.identifierPrefix!==void 0&&(a=r.identifierPrefix),r.onUncaughtError!==void 0&&(i=r.onUncaughtError),r.onCaughtError!==void 0&&(s=r.onCaughtError),r.onRecoverableError!==void 0&&(o=r.onRecoverableError),r.formState!==void 0&&(l=r.formState)),t=AZ(e,1,!0,t,r??null,n,a,l,i,s,o,DZ),t.context=NZ(null),r=t.current,n=qo(),n=BF(n),a=ip(n),a.callback=null,sp(r,a,n),r=n,t.current.lanes=r,QS(t,r),pu(t),e[Lx]=t.current,C3(e),new hI(t)};gI.version="19.2.0"});var yI=ae((Twt,FZ)=>{"use strict";function OZ(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(OZ)}catch{}}OZ(),FZ.exports=MZ()});var BZ,JGe,_3,xI,$Z,L3=de(()=>{BZ=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),JGe=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,n)=>n?n.toUpperCase():r.toLowerCase()),_3=e=>{let t=JGe(e);return t.charAt(0).toUpperCase()+t.slice(1)},xI=(...e)=>e.filter((t,r,n)=>Boolean(t)&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim(),$Z=e=>{for(let t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0}});var jZ,zZ=de(()=>{jZ={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}});var lT,UZ,VZ=de(()=>{lT=A(Le());zZ();L3();UZ=(0,lT.forwardRef)(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:a="",children:i,iconNode:s,...o},l)=>(0,lT.createElement)("svg",{ref:l,...jZ,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:xI("lucide",a),...!i&&!$Z(o)&&{"aria-hidden":"true"},...o},[...s.map(([c,u])=>(0,lT.createElement)(c,u)),...Array.isArray(i)?i:[i]]))});var bI,X,$e=de(()=>{bI=A(Le());L3();VZ();X=(e,t)=>{let r=(0,bI.forwardRef)(({className:n,...a},i)=>(0,bI.createElement)(UZ,{ref:i,iconNode:t,className:xI(`lucide-${BZ(_3(e))}`,`lucide-${e}`,n),...a}));return r.displayName=_3(e),r}});var ZGe,Sc,qZ=de(()=>{$e();ZGe=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],Sc=X("activity",ZGe)});var QGe,mu,HZ=de(()=>{$e();QGe=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],mu=X("arrow-left",QGe)});var eKe,hs,GZ=de(()=>{$e();eKe=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],hs=X("arrow-right",eKe)});var tKe,$x,KZ=de(()=>{$e();tKe=[["path",{d:"m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526",key:"1yiouv"}],["circle",{cx:"12",cy:"8",r:"6",key:"1vp47v"}]],$x=X("award",tKe)});var rKe,cT,WZ=de(()=>{$e();rKe=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],cT=X("book-open",rKe)});var nKe,jx,XZ=de(()=>{$e();nKe=[["path",{d:"m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z",key:"1fy3hk"}]],jx=X("bookmark",nKe)});var aKe,xp,YZ=de(()=>{$e();aKe=[["rect",{width:"18",height:"14",x:"3",y:"5",rx:"2",ry:"2",key:"12ruh7"}],["path",{d:"M7 15h4M15 15h2M7 11h2M13 11h4",key:"1ueiar"}]],xp=X("captions",aKe)});var iKe,bp,JZ=de(()=>{$e();iKe=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],bp=X("chart-column",iKe)});var sKe,hu,ZZ=de(()=>{$e();sKe=[["path",{d:"M21 12c.552 0 1.005-.449.95-.998a10 10 0 0 0-8.953-8.951c-.55-.055-.998.398-.998.95v8a1 1 0 0 0 1 1z",key:"pzmjnu"}],["path",{d:"M21.21 15.89A10 10 0 1 1 8 2.83",key:"k2fpak"}]],hu=X("chart-pie",sKe)});var oKe,Tc,QZ=de(()=>{$e();oKe=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Tc=X("check",oKe)});var lKe,Oi,eQ=de(()=>{$e();lKe=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Oi=X("chevron-down",lKe)});var cKe,$l,tQ=de(()=>{$e();cKe=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],$l=X("chevron-right",cKe)});var uKe,Ph,rQ=de(()=>{$e();uKe=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Ph=X("chevron-up",uKe)});var dKe,hi,nQ=de(()=>{$e();dKe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],hi=X("circle-alert",dKe)});var fKe,vp,aQ=de(()=>{$e();fKe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 12-4-4-4 4",key:"177agl"}],["path",{d:"M12 16V8",key:"1sbj14"}]],vp=X("circle-arrow-up",fKe)});var pKe,gi,iQ=de(()=>{$e();pKe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],gi=X("circle-check",pKe)});var mKe,jl,sQ=de(()=>{$e();mKe=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],jl=X("circle-check-big",mKe)});var hKe,Eh,oQ=de(()=>{$e();hKe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]],Eh=X("circle-dot",hKe)});var gKe,wc,lQ=de(()=>{$e();gKe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],wc=X("circle-question-mark",gKe)});var yKe,zl,cQ=de(()=>{$e();yKe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],zl=X("circle-x",yKe)});var xKe,Os,uQ=de(()=>{$e();xKe=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Os=X("clock",xKe)});var bKe,Ul,dQ=de(()=>{$e();bKe=[["path",{d:"M12 13v8l-4-4",key:"1f5nwf"}],["path",{d:"m12 21 4-4",key:"1lfcce"}],["path",{d:"M4.393 15.269A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.436 8.284",key:"ui1hmy"}]],Ul=X("cloud-download",bKe)});var vKe,Sp,fQ=de(()=>{$e();vKe=[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]],Sp=X("cloud-upload",vKe)});var SKe,Bn,pQ=de(()=>{$e();SKe=[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]],Bn=X("cloud",SKe)});var TKe,gu,mQ=de(()=>{$e();TKe=[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]],gu=X("code-xml",TKe)});var wKe,Ko,hQ=de(()=>{$e();wKe=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],Ko=X("code",wKe)});var CKe,Ih,gQ=de(()=>{$e();CKe=[["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M14 2v2",key:"6buw04"}],["path",{d:"M16 8a1 1 0 0 1 1 1v8a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1h14a4 4 0 1 1 0 8h-1",key:"pwadti"}],["path",{d:"M6 2v2",key:"colzsn"}]],Ih=X("coffee",CKe)});var PKe,Id,yQ=de(()=>{$e();PKe=[["circle",{cx:"8",cy:"8",r:"6",key:"3yglwk"}],["path",{d:"M18.09 10.37A6 6 0 1 1 10.34 18",key:"t5s6rm"}],["path",{d:"M7 6h1v4",key:"1obek4"}],["path",{d:"m16.71 13.88.7.71-2.82 2.82",key:"1rbuyh"}]],Id=X("coins",PKe)});var EKe,uT,xQ=de(()=>{$e();EKe=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],uT=X("database",EKe)});var IKe,ts,bQ=de(()=>{$e();IKe=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],ts=X("download",IKe)});var AKe,go,vQ=de(()=>{$e();AKe=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],go=X("ellipsis",AKe)});var NKe,dT,SQ=de(()=>{$e();NKe=[["path",{d:"M21 21H8a2 2 0 0 1-1.42-.587l-3.994-3.999a2 2 0 0 1 0-2.828l10-10a2 2 0 0 1 2.829 0l5.999 6a2 2 0 0 1 0 2.828L12.834 21",key:"g5wo59"}],["path",{d:"m5.082 11.09 8.828 8.828",key:"1wx5vj"}]],dT=X("eraser",NKe)});var kKe,zx,TQ=de(()=>{$e();kKe=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],zx=X("external-link",kKe)});var _Ke,Ux,wQ=de(()=>{$e();_Ke=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Ux=X("eye",_Ke)});var LKe,Vx,CQ=de(()=>{$e();LKe=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"m9 15 2 2 4-4",key:"1grp1n"}]],Vx=X("file-check",LKe)});var RKe,fT,PQ=de(()=>{$e();RKe=[["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z",key:"1mlx9k"}]],fT=X("file-code",RKe)});var DKe,Ad,EQ=de(()=>{$e();DKe=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]],Ad=X("file-json",DKe)});var MKe,Cc,IQ=de(()=>{$e();MKe=[["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M4 7V4a2 2 0 0 1 2-2 2 2 0 0 0-2 2",key:"1vk7w2"}],["path",{d:"M4.063 20.999a2 2 0 0 0 2 1L18 22a2 2 0 0 0 2-2V7l-5-5H6",key:"1jink5"}],["path",{d:"m5 11-3 3",key:"1dgrs4"}],["path",{d:"m5 17-3-3h10",key:"1mvvaf"}]],Cc=X("file-output",MKe)});var OKe,Tp,AQ=de(()=>{$e();OKe=[["path",{d:"M12.5 22H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v9.5",key:"1couwa"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M13.378 15.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z",key:"1y4qbx"}]],Tp=X("file-pen",OKe)});var FKe,Ah,NQ=de(()=>{$e();FKe=[["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M4.268 21a2 2 0 0 0 1.727 1H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v3",key:"ms7g94"}],["path",{d:"m9 18-1.5-1.5",key:"1j6qii"}],["circle",{cx:"5",cy:"14",r:"3",key:"ufru5t"}]],Ah=X("file-search",FKe)});var BKe,yo,kQ=de(()=>{$e();BKe=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],yo=X("file-text",BKe)});var $Ke,pT,_Q=de(()=>{$e();$Ke=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M9 13v-1h6v1",key:"1bb014"}],["path",{d:"M12 12v6",key:"3ahymv"}],["path",{d:"M11 18h2",key:"12mj7e"}]],pT=X("file-type",$Ke)});var jKe,Nh,LQ=de(()=>{$e();jKe=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"m14.5 12.5-5 5",key:"b62r18"}],["path",{d:"m9.5 12.5 5 5",key:"1rk7el"}]],Nh=X("file-x",jKe)});var zKe,mT,RQ=de(()=>{$e();zKe=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]],mT=X("file",zKe)});var UKe,yi,DQ=de(()=>{$e();UKe=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],yi=X("folder-open",UKe)});var VKe,Nd,MQ=de(()=>{$e();VKe=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],Nd=X("folder",VKe)});var qKe,Wo,OQ=de(()=>{$e();qKe=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],Wo=X("funnel",qKe)});var HKe,hT,FQ=de(()=>{$e();HKe=[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],hT=X("gauge",HKe)});var GKe,kd,BQ=de(()=>{$e();GKe=[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["line",{x1:"3",x2:"9",y1:"12",y2:"12",key:"1dyftd"}],["line",{x1:"15",x2:"21",y1:"12",y2:"12",key:"oup4p8"}]],kd=X("git-commit-horizontal",GKe)});var KKe,qx,$Q=de(()=>{$e();KKe=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M13 6h3a2 2 0 0 1 2 2v7",key:"1yeb86"}],["path",{d:"M11 18H8a2 2 0 0 1-2-2V9",key:"19pyzm"}]],qx=X("git-compare",KKe)});var WKe,kh,jQ=de(()=>{$e();WKe=[["circle",{cx:"12",cy:"18",r:"3",key:"1mpf1b"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["path",{d:"M18 9v2c0 .6-.4 1-1 1H7c-.6 0-1-.4-1-1V9",key:"1uq4wg"}],["path",{d:"M12 12v3",key:"158kv8"}]],kh=X("git-fork",WKe)});var XKe,Xo,zQ=de(()=>{$e();XKe=[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]],Xo=X("github",XKe)});var YKe,$n,UQ=de(()=>{$e();YKe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],$n=X("globe",YKe)});var JKe,gT,VQ=de(()=>{$e();JKe=[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]],gT=X("grip-vertical",JKe)});var ZKe,Yo,qQ=de(()=>{$e();ZKe=[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]],Yo=X("hard-drive",ZKe)});var QKe,_d,HQ=de(()=>{$e();QKe=[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]],_d=X("hash",QKe)});var eWe,Ld,GQ=de(()=>{$e();eWe=[["path",{d:"M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5",key:"mvr1a0"}]],Ld=X("heart",eWe)});var tWe,_h,KQ=de(()=>{$e();tWe=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],_h=X("history",tWe)});var rWe,wp,WQ=de(()=>{$e();rWe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],wp=X("info",rWe)});var nWe,yT,XQ=de(()=>{$e();nWe=[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]],yT=X("key",nWe)});var aWe,Jo,YQ=de(()=>{$e();aWe=[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]],Jo=X("languages",aWe)});var iWe,hn,JQ=de(()=>{$e();iWe=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],hn=X("layers",iWe)});var sWe,xo,ZQ=de(()=>{$e();sWe=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]],xo=X("layout-grid",sWe)});var oWe,xT,QQ=de(()=>{$e();oWe=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}],["path",{d:"M14 4h7",key:"3xa0d5"}],["path",{d:"M14 9h7",key:"1icrd9"}],["path",{d:"M14 15h7",key:"1mj8o2"}],["path",{d:"M14 20h7",key:"11slyb"}]],xT=X("layout-list",oWe)});var lWe,bo,eee=de(()=>{$e();lWe=[["path",{d:"m16 6 4 14",key:"ji33uf"}],["path",{d:"M12 6v14",key:"1n7gus"}],["path",{d:"M8 8v12",key:"1gg7y9"}],["path",{d:"M4 4v16",key:"6qkkli"}]],bo=X("library",lWe)});var cWe,Rd,tee=de(()=>{$e();cWe=[["path",{d:"M16 5H3",key:"m91uny"}],["path",{d:"M11 12H3",key:"51ecnj"}],["path",{d:"M16 19H3",key:"zzsher"}],["path",{d:"M18 9v6",key:"1twb98"}],["path",{d:"M21 12h-6",key:"bt1uis"}]],Rd=X("list-plus",cWe)});var uWe,bT,ree=de(()=>{$e();uWe=[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["rect",{x:"3",y:"4",width:"6",height:"6",rx:"1",key:"cif1o7"}]],bT=X("list-todo",uWe)});var dWe,Lh,nee=de(()=>{$e();dWe=[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]],Lh=X("list",dWe)});var fWe,Gt,aee=de(()=>{$e();fWe=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Gt=X("loader-circle",fWe)});var pWe,vT,iee=de(()=>{$e();pWe=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],vT=X("log-out",pWe)});var mWe,ST,see=de(()=>{$e();mWe=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M12 15h.01",key:"q59x07"}],["path",{d:"M12 7v4",key:"xawao1"}]],ST=X("message-square-warning",mWe)});var hWe,yu,oee=de(()=>{$e();hWe=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],yu=X("message-square",hWe)});var gWe,Hx,lee=de(()=>{$e();gWe=[["path",{d:"M5 12h14",key:"1ays0h"}]],Hx=X("minus",gWe)});var yWe,TT,cee=de(()=>{$e();yWe=[["path",{d:"M15.033 9.44a.647.647 0 0 1 0 1.12l-4.065 2.352a.645.645 0 0 1-.968-.56V7.648a.645.645 0 0 1 .967-.56z",key:"vbtd3f"}],["path",{d:"M12 17v4",key:"1riwvh"}],["path",{d:"M8 21h8",key:"1ev6f3"}],["rect",{x:"2",y:"3",width:"20",height:"14",rx:"2",key:"x3v2xh"}]],TT=X("monitor-play",yWe)});var xWe,wT,uee=de(()=>{$e();xWe=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],wT=X("monitor",xWe)});var bWe,Fs,dee=de(()=>{$e();bWe=[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]],Fs=X("package",bWe)});var vWe,Yn,fee=de(()=>{$e();vWe=[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]],Yn=X("palette",vWe)});var SWe,Dd,pee=de(()=>{$e();SWe=[["path",{d:"M13 21h8",key:"1jsn5i"}],["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]],Dd=X("pen-line",SWe)});var TWe,vo,mee=de(()=>{$e();TWe=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]],vo=X("pen",TWe)});var wWe,Rh,hee=de(()=>{$e();wWe=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],Rh=X("pencil",wWe)});var CWe,Dh,gee=de(()=>{$e();CWe=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],Dh=X("play",CWe)});var PWe,xi,yee=de(()=>{$e();PWe=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],xi=X("plus",PWe)});var EWe,CT,xee=de(()=>{$e();EWe=[["path",{d:"M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"14sxne"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16",key:"1hlbsb"}],["path",{d:"M16 16h5v5",key:"ccwih5"}]],CT=X("refresh-ccw",EWe)});var IWe,nn,bee=de(()=>{$e();IWe=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],nn=X("refresh-cw",IWe)});var AWe,PT,vee=de(()=>{$e();AWe=[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]],PT=X("rocket",AWe)});var NWe,rs,See=de(()=>{$e();NWe=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],rs=X("rotate-ccw",NWe)});var kWe,Md,Tee=de(()=>{$e();kWe=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],Md=X("save",kWe)});var _We,fn,wee=de(()=>{$e();_We=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],fn=X("search",_We)});var LWe,ET,Cee=de(()=>{$e();LWe=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],ET=X("send",LWe)});var RWe,Zo,Pee=de(()=>{$e();RWe=[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]],Zo=X("settings-2",RWe)});var DWe,xu,Eee=de(()=>{$e();DWe=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],xu=X("settings",DWe)});var MWe,bu,Iee=de(()=>{$e();MWe=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]],bu=X("shield-alert",MWe)});var OWe,Mh,Aee=de(()=>{$e();OWe=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Mh=X("shield-check",OWe)});var FWe,bi,Nee=de(()=>{$e();FWe=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],bi=X("sparkles",FWe)});var BWe,Cp,kee=de(()=>{$e();BWe=[["path",{d:"M21 10.656V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.344",key:"2acyp4"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],Cp=X("square-check-big",BWe)});var $We,Pp,_ee=de(()=>{$e();$We=[["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",key:"h1oib"}],["path",{d:"M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z",key:"kmsa83"}]],Pp=X("square-play",$We)});var jWe,Vl,Lee=de(()=>{$e();jWe=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],Vl=X("square",jWe)});var zWe,So,Ree=de(()=>{$e();zWe=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],So=X("star",zWe)});var UWe,vu,Dee=de(()=>{$e();UWe=[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]],vu=X("tag",UWe)});var VWe,IT,Mee=de(()=>{$e();VWe=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],IT=X("terminal",VWe)});var qWe,Oh,Oee=de(()=>{$e();qWe=[["path",{d:"M14.5 2v17.5c0 1.4-1.1 2.5-2.5 2.5c-1.4 0-2.5-1.1-2.5-2.5V2",key:"125lnx"}],["path",{d:"M8.5 2h7",key:"csnxdl"}],["path",{d:"M14.5 16h-5",key:"1ox875"}]],Oh=X("test-tube",qWe)});var HWe,Qo,Fee=de(()=>{$e();HWe=[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 19H3",key:"z6ezky"}]],Qo=X("text-align-start",HWe)});var GWe,aa,Bee=de(()=>{$e();GWe=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],aa=X("trash-2",GWe)});var KWe,To,$ee=de(()=>{$e();KWe=[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]],To=X("trending-up",KWe)});var WWe,Ep,jee=de(()=>{$e();WWe=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Ep=X("triangle-alert",WWe)});var XWe,AT,zee=de(()=>{$e();XWe=[["path",{d:"M10 14.66v1.626a2 2 0 0 1-.976 1.696A5 5 0 0 0 7 21.978",key:"1n3hpd"}],["path",{d:"M14 14.66v1.626a2 2 0 0 0 .976 1.696A5 5 0 0 1 17 21.978",key:"rfe1zi"}],["path",{d:"M18 9h1.5a1 1 0 0 0 0-5H18",key:"7xy6bh"}],["path",{d:"M4 22h16",key:"57wxv0"}],["path",{d:"M6 9a6 6 0 0 0 12 0V3a1 1 0 0 0-1-1H7a1 1 0 0 0-1 1z",key:"1mhfuq"}],["path",{d:"M6 9H4.5a1 1 0 0 1 0-5H6",key:"tex48p"}]],AT=X("trophy",XWe)});var YWe,Fh,Uee=de(()=>{$e();YWe=[["path",{d:"M12 4v16",key:"1654pz"}],["path",{d:"M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2",key:"e0r10z"}],["path",{d:"M9 20h6",key:"s66wpe"}]],Fh=X("type",YWe)});var JWe,ql,Vee=de(()=>{$e();JWe=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],ql=X("upload",JWe)});var ZWe,Fi,qee=de(()=>{$e();ZWe=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],Fi=X("users",ZWe)});var QWe,Su,Hee=de(()=>{$e();QWe=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],Su=X("user",QWe)});var eXe,Bh,Gee=de(()=>{$e();eXe=[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]],Bh=X("video",eXe)});var tXe,Ip,Kee=de(()=>{$e();tXe=[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]],Ip=X("wand-sparkles",tXe)});var rXe,$h,Wee=de(()=>{$e();rXe=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],$h=X("x",rXe)});var nXe,wo,Xee=de(()=>{$e();nXe=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],wo=X("zap",nXe)});var Kt=de(()=>{YZ();JZ();ZZ();nQ();aQ();sQ();iQ();lQ();cQ();dQ();fQ();mQ();vQ();AQ();OQ();BQ();JQ();aee();mee();pee();Nee();kee();_ee();Fee();jee();Kee();qZ();HZ();GZ();KZ();WZ();XZ();QZ();eQ();tQ();rQ();oQ();uQ();pQ();hQ();gQ();yQ();xQ();bQ();SQ();TQ();wQ();CQ();PQ();EQ();IQ();NQ();kQ();_Q();LQ();RQ();DQ();MQ();FQ();$Q();jQ();zQ();UQ();VQ();qQ();HQ();GQ();KQ();WQ();XQ();YQ();ZQ();QQ();eee();tee();ree();nee();iee();see();oee();lee();cee();uee();dee();fee();hee();gee();yee();xee();bee();vee();See();Tee();wee();Cee();Pee();Eee();Iee();Aee();Lee();Ree();Dee();Mee();Oee();Bee();$ee();zee();Uee();Vee();Hee();qee();Gee();Wee();Xee();});var Jee=ae(vI=>{"use strict";var aXe=Symbol.for("react.transitional.element"),iXe=Symbol.for("react.fragment");function Yee(e,t,r){var n=null;if(r!==void 0&&(n=""+r),t.key!==void 0&&(n=""+t.key),"key"in t){r={};for(var a in t)a!=="key"&&(r[a]=t[a])}else r=t;return t=r.ref,{$$typeof:aXe,type:e,key:n,ref:t!==void 0?t:null,props:r}}vI.Fragment=iXe;vI.jsx=Yee;vI.jsxs=Yee});var oe=ae((JAt,Zee)=>{"use strict";Zee.exports=Jee()});function el(e,t,r){try{e.classList.remove("view-content");let c=e.parentElement?.querySelector(".view-header");c&&c.remove()}catch{}let n=e.shadowRoot;if(!n){if(n=e.attachShadow({mode:"open"}),t.sharedStyleSheet)n.adoptedStyleSheets=[t.sharedStyleSheet];else if(t.css){let c=document.createElement("style");c.textContent=t.css,n.appendChild(c)}}let a=n.querySelector("#i18n-react-root");a||(a=document.createElement("div"),a.id="i18n-react-root",a.className="w-full h-full",n.appendChild(a));let i=()=>{let c=document.body.classList.contains("theme-dark");a.classList.toggle("dark",c)};i();let s=new MutationObserver(c=>{for(let u of c)u.type==="attributes"&&u.attributeName==="class"&&i()});s.observe(document.body,{attributes:!0,attributeFilter:["class"]}),e.__i18n_dark_observer?.disconnect(),e.__i18n_dark_observer=s;let o=Qee.get(e);o&&o.unmount();let l=(0,R3.createRoot)(a);return Qee.set(e,l),l.render((0,Tu.jsx)(Ap.StrictMode,{children:(0,Tu.jsx)(sXe,{children:r})})),{root:l,shadowRoot:n,mountPoint:a}}var Ap,R3,Tu,NT,sXe,Qee,ete=de(()=>{Ap=A(Le()),R3=A(yI());Kt();Tu=A(oe()),NT=class{constructor(t,r){this.root=null;this.isOpen=!1;this.isDragging=!1;this.dragStartX=0;this.dragStartY=0;this.initialLeft=0;this.initialTop=0;this.dragHandleEl=null;this.initElements=()=>{this.containerEl=document.createElement("div"),this.contentEl=document.createElement("div"),this.containerEl.appendChild(this.contentEl),this.maskEl=document.createElement("div"),this.containerEl.appendChild(this.maskEl)};this.initStyles=()=>{this.containerEl.classList.add("react-view__container"),this.contentEl.classList.add("react-view__content"),this.maskEl.classList.add("react-view__mask");let{width:t,height:r}=this.options.config||{};t&&(this.contentEl.style.width=typeof t=="number"?`${t}px`:t),r&&(this.contentEl.style.height=typeof r=="number"?`${r}px`:r),this.options.config?.draggable&&(this.contentEl.style.position="absolute",this.contentEl.style.left="50%",this.contentEl.style.top="50%",this.contentEl.style.transform="translate(-50%, -50%)")};this.initContent=()=>{let{view:t,props:r}=this.options;this.root=(0,R3.createRoot)(this.contentEl),this.root.render(Ap.createElement(t,{...r,ReactView:this}))};this.open=()=>{if(this.isOpen)return;(this.options.parent||document.body).appendChild(this.containerEl),this.isOpen=!0,this.bindEvents(),this.options.onOpen?.()};this.close=()=>{this.isOpen&&(this.root?.unmount(),this.root=null,this.containerEl.remove(),this.isOpen=!1,this.unbindEvents(),this.unbindDragEvents(),this.options.onClose?.())};this.bindEvents=()=>{this.maskEl.addEventListener("click",t=>{t.target===this.maskEl&&this.close()}),document.addEventListener("keydown",this.handleKeyDown)};this.unbindEvents=()=>{document.removeEventListener("keydown",this.handleKeyDown)};this.handleKeyDown=t=>{t.key==="Escape"&&this.close()};this.handleDragStart=t=>{if(!this.contentEl)return;this.isDragging=!0,this.dragStartX=t.clientX,this.dragStartY=t.clientY;let r=this.contentEl.getBoundingClientRect();this.initialLeft=r.left,this.initialTop=r.top,this.contentEl.classList.add("react-view__content--dragging")};this.handleDragMove=t=>{if(!this.isDragging||!this.contentEl)return;let r=t.clientX-this.dragStartX,n=t.clientY-this.dragStartY;this.contentEl.style.left=`${this.initialLeft+r}px`,this.contentEl.style.top=`${this.initialTop+n}px`,this.contentEl.style.transform="none"};this.handleDragEnd=()=>{this.contentEl&&(this.isDragging=!1,this.contentEl.classList.remove("react-view__content--dragging"))};if(this.app=t,!r.view)throw new Error("ReactView\u5FC5\u987B\u63D0\u4F9Bcomponent\u53C2\u6570");this.options={...r},this.initElements(),this.initStyles(),this.initContent()}setDragHandle(t){this.options.config?.draggable&&(this.dragHandleEl&&this.unbindDragEvents(),this.dragHandleEl=t,this.bindDragEvents())}bindDragEvents(){this.dragHandleEl&&(this.dragHandleEl.addEventListener("mousedown",this.handleDragStart),document.addEventListener("mousemove",this.handleDragMove),document.addEventListener("mouseup",this.handleDragEnd),this.dragHandleEl.style.cursor="move")}unbindDragEvents(){this.dragHandleEl&&(this.dragHandleEl.removeEventListener("mousedown",this.handleDragStart),document.removeEventListener("mousemove",this.handleDragMove),document.removeEventListener("mouseup",this.handleDragEnd))}static open(t,r){let n=new NT(t,r);return n.open(),n}},sXe=({children:e})=>{let[t,r]=Ap.useState(!1);return Ap.useEffect(()=>{let n=setTimeout(()=>{r(!0)},10);return()=>clearTimeout(n)},[]),t?(0,Tu.jsx)(Tu.Fragment,{children:e}):(0,Tu.jsxs)("div",{className:"w-full h-full flex flex-col items-center justify-center bg-background text-muted-foreground animate-pulse",children:[(0,Tu.jsx)(Gt,{className:"h-8 w-8 animate-spin mb-4 text-primary"}),(0,Tu.jsx)("div",{className:"text-sm font-medium",children:"Loading View..."})]})},Qee=new WeakMap});var tte,D3,rte=de(()=>{tte=require("obsidian"),D3=()=>{(0,tte.addIcon)("i18n_translate",'<svg t="1726147647142" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5625" width="100" height="100"><path d="M213.333333 640v85.333333a85.333333 85.333333 0 0 0 78.933334 85.077334L298.666667 810.666667h128v85.333333H298.666667a170.666667 170.666667 0 0 1-170.666667-170.666667v-85.333333h85.333333z m554.666667-213.333333l187.733333 469.333333h-91.946666l-51.242667-128h-174.506667l-51.157333 128h-91.904L682.666667 426.666667h85.333333z m-42.666667 123.093333L672.128 682.666667h106.325333L725.333333 549.76zM341.333333 85.333333v85.333334h170.666667v298.666666H341.333333v128H256v-128H85.333333V170.666667h170.666667V85.333333h85.333333z m384 42.666667a170.666667 170.666667 0 0 1 170.666667 170.666667v85.333333h-85.333333V298.666667a85.333333 85.333333 0 0 0-85.333334-85.333334h-128V128h128zM256 256H170.666667v128h85.333333V256z m170.666667 0H341.333333v128h85.333334V256z" p-id="5626" fill="currentColor"></path></svg>')}});var SI,nte=de(()=>{SI=class{constructor(t,r){this.active=!1;this.onPick=t,this.onCancel=r}activate(){if(this.active)return;this.active=!0,document.body.style.cursor="crosshair";let t=document.createElement("style");t.id="i18n-picker-style",t.innerHTML=`
.i18n-pick-target {
outline: 2px dashed #0064ff !important;
outline-offset: -2px !important;
background-color: rgba(0, 100, 255, 0.1) !important;
transition: all 0.1s ease !important;
}
* {
pointer-events: auto !important;
}
`,document.head.appendChild(t);let r=i=>{let s=i.target;document.querySelectorAll(".i18n-pick-target").forEach(o=>o.classList.remove("i18n-pick-target")),s.classList.add("i18n-pick-target")},n=i=>{i.preventDefault(),i.stopPropagation();let s=i.target,o=s.innerText||s.textContent||"";o.trim()?this.onPick(o.trim()):this.onCancel(),this.deactivate()},a=i=>{i.key==="Escape"&&(this.onCancel(),this.deactivate())};window.addEventListener("mouseover",r,!0),window.addEventListener("click",n,!0),window.addEventListener("keydown",a,!0),this._handlers={handleMouseOver:r,handleClick:n,handleKeyDown:a}}deactivate(){if(!this.active)return;this.active=!1,document.body.style.cursor="",document.getElementById("i18n-picker-style")?.remove(),document.querySelectorAll(".i18n-pick-target").forEach(a=>a.classList.remove("i18n-pick-target"));let{handleMouseOver:t,handleClick:r,handleKeyDown:n}=this._handlers;window.removeEventListener("mouseover",t,!0),window.removeEventListener("click",r,!0),window.removeEventListener("keydown",n,!0)}}});var kT={};xl(kT,{AstTranslator:()=>_s,ImmersiveTranslate:()=>aS,ReactView:()=>NT,RegexTranslator:()=>oo,StringPicker:()=>SI,activateIMT:()=>$M,calculateChecksum:()=>Li,cn:()=>Il,compareVersions:()=>Lqe,createSelectors:()=>sd,deactivateIMT:()=>jM,deflate:()=>yHe,escapeSpecialChars:()=>XK,extractionJavaScriptCode:()=>Nqe,formatTimestamp:()=>JM,formatTimestamp_concise:()=>bHe,generatePlugin:()=>_qe,generateTheme:()=>MM,i18nOpen:()=>au,icons:()=>D3,inflate:()=>xHe,info:()=>$P,isPlugin:()=>Dqe,isPluginTranslationV1:()=>Rqe,isTheme:()=>Mqe,isValidPluginTranslationV1Format:()=>YM,isValidThemeTranslationFormat:()=>gHe,mergeAstItems:()=>OM,mergeRegexItems:()=>FM,mountReactView:()=>el,parseIssueTitle:()=>JK,unescapeSpecialChars:()=>YK,useGlobalStore:()=>su,useGlobalStoreInstance:()=>Ue,validateTranslation:()=>hHe,validationJavaScriptCode:()=>Aqe});var $t=de(()=>{LM();RM();zf();AK();NK();kK();LK();WK();jP();ZK();QK();eW();tW();oW();ete();rte();nte()});var ji=ae(gB=>{"use strict";gB.fromCallback=function(e){return Object.defineProperty(function(...t){if(typeof t[t.length-1]=="function")e.apply(this,t);else return new Promise((r,n)=>{t.push((a,i)=>a!=null?n(a):r(i)),e.apply(this,t)})},"name",{value:e.name})};gB.fromPromise=function(e){return Object.defineProperty(function(...t){let r=t[t.length-1];if(typeof r!="function")return e.apply(this,t);t.pop(),e.apply(this,t).then(n=>r(null,n),r)},"name",{value:e.name})}});var Ooe=ae((gOt,Moe)=>{var Hp=require("constants"),ytt=process.cwd,GA=null,xtt=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return GA||(GA=ytt.call(process)),GA};try{process.cwd()}catch{}typeof process.chdir=="function"&&(yB=process.chdir,process.chdir=function(e){GA=null,yB.call(process,e)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,yB));var yB;Moe.exports=btt;function btt(e){Hp.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&t(e),e.lutimes||r(e),e.chown=i(e.chown),e.fchown=i(e.fchown),e.lchown=i(e.lchown),e.chmod=n(e.chmod),e.fchmod=n(e.fchmod),e.lchmod=n(e.lchmod),e.chownSync=s(e.chownSync),e.fchownSync=s(e.fchownSync),e.lchownSync=s(e.lchownSync),e.chmodSync=a(e.chmodSync),e.fchmodSync=a(e.fchmodSync),e.lchmodSync=a(e.lchmodSync),e.stat=o(e.stat),e.fstat=o(e.fstat),e.lstat=o(e.lstat),e.statSync=l(e.statSync),e.fstatSync=l(e.fstatSync),e.lstatSync=l(e.lstatSync),e.chmod&&!e.lchmod&&(e.lchmod=function(u,d,f){f&&process.nextTick(f)},e.lchmodSync=function(){}),e.chown&&!e.lchown&&(e.lchown=function(u,d,f,p){p&&process.nextTick(p)},e.lchownSync=function(){}),xtt==="win32"&&(e.rename=typeof e.rename!="function"?e.rename:function(u){function d(f,p,m){var h=Date.now(),x=0;u(f,p,function g(y){if(y&&(y.code==="EACCES"||y.code==="EPERM"||y.code==="EBUSY")&&Date.now()-h<6e4){setTimeout(function(){e.stat(p,function(b,S){b&&b.code==="ENOENT"?u(f,p,g):m(y)})},x),x<100&&(x+=10);return}m&&m(y)})}return Object.setPrototypeOf&&Object.setPrototypeOf(d,u),d}(e.rename)),e.read=typeof e.read!="function"?e.read:function(u){function d(f,p,m,h,x,g){var y;if(g&&typeof g=="function"){var b=0;y=function(S,w,E){if(S&&S.code==="EAGAIN"&&b<10)return b++,u.call(e,f,p,m,h,x,y);g.apply(this,arguments)}}return u.call(e,f,p,m,h,x,y)}return Object.setPrototypeOf&&Object.setPrototypeOf(d,u),d}(e.read),e.readSync=typeof e.readSync!="function"?e.readSync:function(u){return function(d,f,p,m,h){for(var x=0;;)try{return u.call(e,d,f,p,m,h)}catch(g){if(g.code==="EAGAIN"&&x<10){x++;continue}throw g}}}(e.readSync);function t(u){u.lchmod=function(d,f,p){u.open(d,Hp.O_WRONLY|Hp.O_SYMLINK,f,function(m,h){if(m){p&&p(m);return}u.fchmod(h,f,function(x){u.close(h,function(g){p&&p(x||g)})})})},u.lchmodSync=function(d,f){var p=u.openSync(d,Hp.O_WRONLY|Hp.O_SYMLINK,f),m=!0,h;try{h=u.fchmodSync(p,f),m=!1}finally{if(m)try{u.closeSync(p)}catch{}else u.closeSync(p)}return h}}function r(u){Hp.hasOwnProperty("O_SYMLINK")&&u.futimes?(u.lutimes=function(d,f,p,m){u.open(d,Hp.O_SYMLINK,function(h,x){if(h){m&&m(h);return}u.futimes(x,f,p,function(g){u.close(x,function(y){m&&m(g||y)})})})},u.lutimesSync=function(d,f,p){var m=u.openSync(d,Hp.O_SYMLINK),h,x=!0;try{h=u.futimesSync(m,f,p),x=!1}finally{if(x)try{u.closeSync(m)}catch{}else u.closeSync(m)}return h}):u.futimes&&(u.lutimes=function(d,f,p,m){m&&process.nextTick(m)},u.lutimesSync=function(){})}function n(u){return u&&function(d,f,p){return u.call(e,d,f,function(m){c(m)&&(m=null),p&&p.apply(this,arguments)})}}function a(u){return u&&function(d,f){try{return u.call(e,d,f)}catch(p){if(!c(p))throw p}}}function i(u){return u&&function(d,f,p,m){return u.call(e,d,f,p,function(h){c(h)&&(h=null),m&&m.apply(this,arguments)})}}function s(u){return u&&function(d,f,p){try{return u.call(e,d,f,p)}catch(m){if(!c(m))throw m}}}function o(u){return u&&function(d,f,p){typeof f=="function"&&(p=f,f=null);function m(h,x){x&&(x.uid<0&&(x.uid+=4294967296),x.gid<0&&(x.gid+=4294967296)),p&&p.apply(this,arguments)}return f?u.call(e,d,f,m):u.call(e,d,m)}}function l(u){return u&&function(d,f){var p=f?u.call(e,d,f):u.call(e,d);return p&&(p.uid<0&&(p.uid+=4294967296),p.gid<0&&(p.gid+=4294967296)),p}}function c(u){if(!u||u.code==="ENOSYS")return!0;var d=!process.getuid||process.getuid()!==0;return!!(d&&(u.code==="EINVAL"||u.code==="EPERM"))}}});var $oe=ae((yOt,Boe)=>{var Foe=require("stream").Stream;Boe.exports=vtt;function vtt(e){return{ReadStream:t,WriteStream:r};function t(n,a){if(!(this instanceof t))return new t(n,a);Foe.call(this);var i=this;this.path=n,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=64*1024,a=a||{};for(var s=Object.keys(a),o=0,l=s.length;o<l;o++){var c=s[o];this[c]=a[c]}if(this.encoding&&this.setEncoding(this.encoding),this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.end===void 0)this.end=1/0;else if(typeof this.end!="number")throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){i._read()});return}e.open(this.path,this.flags,this.mode,function(u,d){if(u){i.emit("error",u),i.readable=!1;return}i.fd=d,i.emit("open",d),i._read()})}function r(n,a){if(!(this instanceof r))return new r(n,a);Foe.call(this),this.path=n,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,a=a||{};for(var i=Object.keys(a),s=0,o=i.length;s<o;s++){var l=i[s];this[l]=a[l]}if(this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start}this.busy=!1,this._queue=[],this.fd===null&&(this._open=e.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}});var zoe=ae((xOt,joe)=>{"use strict";joe.exports=Ttt;var Stt=Object.getPrototypeOf||function(e){return e.__proto__};function Ttt(e){if(e===null||typeof e!="object")return e;if(e instanceof Object)var t={__proto__:Stt(e)};else var t=Object.create(null);return Object.getOwnPropertyNames(e).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))}),t}});var Tb=ae((bOt,vB)=>{var ya=require("fs"),wtt=Ooe(),Ctt=$oe(),Ptt=zoe(),KA=require("util"),is,XA;typeof Symbol=="function"&&typeof Symbol.for=="function"?(is=Symbol.for("graceful-fs.queue"),XA=Symbol.for("graceful-fs.previous")):(is="___graceful-fs.queue",XA="___graceful-fs.previous");function Ett(){}function qoe(e,t){Object.defineProperty(e,is,{get:function(){return t}})}var fg=Ett;KA.debuglog?fg=KA.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(fg=function(){var e=KA.format.apply(KA,arguments);e="GFS4: "+e.split(/\n/).join(`
GFS4: `)});ya[is]||(Uoe=global[is]||[],qoe(ya,Uoe),ya.close=function(e){function t(r,n){return e.call(ya,r,function(a){a||Voe(),typeof n=="function"&&n.apply(this,arguments)})}return Object.defineProperty(t,XA,{value:e}),t}(ya.close),ya.closeSync=function(e){function t(r){e.apply(ya,arguments),Voe()}return Object.defineProperty(t,XA,{value:e}),t}(ya.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){fg(ya[is]),require("assert").equal(ya[is].length,0)}));var Uoe;global[is]||qoe(global,ya[is]);vB.exports=xB(Ptt(ya));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!ya.__patched&&(vB.exports=xB(ya),ya.__patched=!0);function xB(e){wtt(e),e.gracefulify=xB,e.createReadStream=w,e.createWriteStream=E;var t=e.readFile;e.readFile=r;function r(_,O,D){return typeof O=="function"&&(D=O,O=null),W(_,O,D);function W(Z,me,Q,V){return t(Z,me,function(U){U&&(U.code==="EMFILE"||U.code==="ENFILE")?Sb([W,[Z,me,Q],U,V||Date.now(),Date.now()]):typeof Q=="function"&&Q.apply(this,arguments)})}}var n=e.writeFile;e.writeFile=a;function a(_,O,D,W){return typeof D=="function"&&(W=D,D=null),Z(_,O,D,W);function Z(me,Q,V,U,k){return n(me,Q,V,function(L){L&&(L.code==="EMFILE"||L.code==="ENFILE")?Sb([Z,[me,Q,V,U],L,k||Date.now(),Date.now()]):typeof U=="function"&&U.apply(this,arguments)})}}var i=e.appendFile;i&&(e.appendFile=s);function s(_,O,D,W){return typeof D=="function"&&(W=D,D=null),Z(_,O,D,W);function Z(me,Q,V,U,k){return i(me,Q,V,function(L){L&&(L.code==="EMFILE"||L.code==="ENFILE")?Sb([Z,[me,Q,V,U],L,k||Date.now(),Date.now()]):typeof U=="function"&&U.apply(this,arguments)})}}var o=e.copyFile;o&&(e.copyFile=l);function l(_,O,D,W){return typeof D=="function"&&(W=D,D=0),Z(_,O,D,W);function Z(me,Q,V,U,k){return o(me,Q,V,function(L){L&&(L.code==="EMFILE"||L.code==="ENFILE")?Sb([Z,[me,Q,V,U],L,k||Date.now(),Date.now()]):typeof U=="function"&&U.apply(this,arguments)})}}var c=e.readdir;e.readdir=d;var u=/^v[0-5]\./;function d(_,O,D){typeof O=="function"&&(D=O,O=null);var W=u.test(process.version)?function(Q,V,U,k){return c(Q,Z(Q,V,U,k))}:function(Q,V,U,k){return c(Q,V,Z(Q,V,U,k))};return W(_,O,D);function Z(me,Q,V,U){return function(k,L){k&&(k.code==="EMFILE"||k.code==="ENFILE")?Sb([W,[me,Q,V],k,U||Date.now(),Date.now()]):(L&&L.sort&&L.sort(),typeof V=="function"&&V.call(this,k,L))}}}if(process.version.substr(0,4)==="v0.8"){var f=Ctt(e);g=f.ReadStream,b=f.WriteStream}var p=e.ReadStream;p&&(g.prototype=Object.create(p.prototype),g.prototype.open=y);var m=e.WriteStream;m&&(b.prototype=Object.create(m.prototype),b.prototype.open=S),Object.defineProperty(e,"ReadStream",{get:function(){return g},set:function(_){g=_},enumerable:!0,configurable:!0}),Object.defineProperty(e,"WriteStream",{get:function(){return b},set:function(_){b=_},enumerable:!0,configurable:!0});var h=g;Object.defineProperty(e,"FileReadStream",{get:function(){return h},set:function(_){h=_},enumerable:!0,configurable:!0});var x=b;Object.defineProperty(e,"FileWriteStream",{get:function(){return x},set:function(_){x=_},enumerable:!0,configurable:!0});function g(_,O){return this instanceof g?(p.apply(this,arguments),this):g.apply(Object.create(g.prototype),arguments)}function y(){var _=this;N(_.path,_.flags,_.mode,function(O,D){O?(_.autoClose&&_.destroy(),_.emit("error",O)):(_.fd=D,_.emit("open",D),_.read())})}function b(_,O){return this instanceof b?(m.apply(this,arguments),this):b.apply(Object.create(b.prototype),arguments)}function S(){var _=this;N(_.path,_.flags,_.mode,function(O,D){O?(_.destroy(),_.emit("error",O)):(_.fd=D,_.emit("open",D))})}function w(_,O){return new e.ReadStream(_,O)}function E(_,O){return new e.WriteStream(_,O)}var C=e.open;e.open=N;function N(_,O,D,W){return typeof D=="function"&&(W=D,D=null),Z(_,O,D,W);function Z(me,Q,V,U,k){return C(me,Q,V,function(L,M){L&&(L.code==="EMFILE"||L.code==="ENFILE")?Sb([Z,[me,Q,V,U],L,k||Date.now(),Date.now()]):typeof U=="function"&&U.apply(this,arguments)})}}return e}function Sb(e){fg("ENQUEUE",e[0].name,e[1]),ya[is].push(e),bB()}var WA;function Voe(){for(var e=Date.now(),t=0;t<ya[is].length;++t)ya[is][t].length>2&&(ya[is][t][3]=e,ya[is][t][4]=e);bB()}function bB(){if(clearTimeout(WA),WA=void 0,ya[is].length!==0){var e=ya[is].shift(),t=e[0],r=e[1],n=e[2],a=e[3],i=e[4];if(a===void 0)fg("RETRY",t.name,r),t.apply(null,r);else if(Date.now()-a>=6e4){fg("TIMEOUT",t.name,r);var s=r.pop();typeof s=="function"&&s.call(null,n)}else{var o=Date.now()-i,l=Math.max(i-a,1),c=Math.min(l*1.2,100);o>=c?(fg("RETRY",t.name,r),t.apply(null,r.concat([a]))):ya[is].push(e)}WA===void 0&&(WA=setTimeout(bB,0))}}});var Hs=ae(Jd=>{"use strict";var Hoe=ji().fromCallback,qs=Tb(),Itt=["access","appendFile","chmod","chown","close","copyFile","cp","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","glob","lchmod","lchown","lutimes","link","lstat","mkdir","mkdtemp","open","opendir","readdir","readFile","readlink","realpath","rename","rm","rmdir","stat","statfs","symlink","truncate","unlink","utimes","writeFile"].filter(e=>typeof qs[e]=="function");Object.assign(Jd,qs);Itt.forEach(e=>{Jd[e]=Hoe(qs[e])});Jd.exists=function(e,t){return typeof t=="function"?qs.exists(e,t):new Promise(r=>qs.exists(e,r))};Jd.read=function(e,t,r,n,a,i){return typeof i=="function"?qs.read(e,t,r,n,a,i):new Promise((s,o)=>{qs.read(e,t,r,n,a,(l,c,u)=>{if(l)return o(l);s({bytesRead:c,buffer:u})})})};Jd.write=function(e,t,...r){return typeof r[r.length-1]=="function"?qs.write(e,t,...r):new Promise((n,a)=>{qs.write(e,t,...r,(i,s,o)=>{if(i)return a(i);n({bytesWritten:s,buffer:o})})})};Jd.readv=function(e,t,...r){return typeof r[r.length-1]=="function"?qs.readv(e,t,...r):new Promise((n,a)=>{qs.readv(e,t,...r,(i,s,o)=>{if(i)return a(i);n({bytesRead:s,buffers:o})})})};Jd.writev=function(e,t,...r){return typeof r[r.length-1]=="function"?qs.writev(e,t,...r):new Promise((n,a)=>{qs.writev(e,t,...r,(i,s,o)=>{if(i)return a(i);n({bytesWritten:s,buffers:o})})})};typeof qs.realpath.native=="function"?Jd.realpath.native=Hoe(qs.realpath.native):process.emitWarning("fs.realpath.native is not a function. Is fs being monkey-patched?","Warning","fs-extra-WARN0003")});var Koe=ae((SOt,Goe)=>{"use strict";var Att=require("path");Goe.exports.checkPath=function(t){if(process.platform==="win32"&&/[<>:"|?*]/.test(t.replace(Att.parse(t).root,""))){let n=new Error(`Path contains invalid characters: ${t}`);throw n.code="EINVAL",n}}});var Joe=ae((TOt,SB)=>{"use strict";var Woe=Hs(),{checkPath:Xoe}=Koe(),Yoe=e=>{let t={mode:511};return typeof e=="number"?e:{...t,...e}.mode};SB.exports.makeDir=async(e,t)=>(Xoe(e),Woe.mkdir(e,{mode:Yoe(t),recursive:!0}));SB.exports.makeDirSync=(e,t)=>(Xoe(e),Woe.mkdirSync(e,{mode:Yoe(t),recursive:!0}))});var Dc=ae((wOt,Zoe)=>{"use strict";var Ntt=ji().fromPromise,{makeDir:ktt,makeDirSync:TB}=Joe(),wB=Ntt(ktt);Zoe.exports={mkdirs:wB,mkdirsSync:TB,mkdirp:wB,mkdirpSync:TB,ensureDir:wB,ensureDirSync:TB}});var Gp=ae((COt,ele)=>{"use strict";var _tt=ji().fromPromise,Qoe=Hs();function Ltt(e){return Qoe.access(e).then(()=>!0).catch(()=>!1)}ele.exports={pathExists:_tt(Ltt),pathExistsSync:Qoe.existsSync}});var CB=ae((POt,tle)=>{"use strict";var wb=Hs(),Rtt=ji().fromPromise;async function Dtt(e,t,r){let n=await wb.open(e,"r+"),a=null;try{await wb.futimes(n,t,r)}finally{try{await wb.close(n)}catch(i){a=i}}if(a)throw a}function Mtt(e,t,r){let n=wb.openSync(e,"r+");return wb.futimesSync(n,t,r),wb.closeSync(n)}tle.exports={utimesMillis:Rtt(Dtt),utimesMillisSync:Mtt}});var pg=ae((EOt,ile)=>{"use strict";var Cb=Hs(),zi=require("path"),rle=ji().fromPromise;function Ott(e,t,r){let n=r.dereference?a=>Cb.stat(a,{bigint:!0}):a=>Cb.lstat(a,{bigint:!0});return Promise.all([n(e),n(t).catch(a=>{if(a.code==="ENOENT")return null;throw a})]).then(([a,i])=>({srcStat:a,destStat:i}))}function Ftt(e,t,r){let n,a=r.dereference?s=>Cb.statSync(s,{bigint:!0}):s=>Cb.lstatSync(s,{bigint:!0}),i=a(e);try{n=a(t)}catch(s){if(s.code==="ENOENT")return{srcStat:i,destStat:null};throw s}return{srcStat:i,destStat:n}}async function Btt(e,t,r,n){let{srcStat:a,destStat:i}=await Ott(e,t,n);if(i){if(cw(a,i)){let s=zi.basename(e),o=zi.basename(t);if(r==="move"&&s!==o&&s.toLowerCase()===o.toLowerCase())return{srcStat:a,destStat:i,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if(a.isDirectory()&&!i.isDirectory())throw new Error(`Cannot overwrite non-directory '${t}' with directory '${e}'.`);if(!a.isDirectory()&&i.isDirectory())throw new Error(`Cannot overwrite directory '${t}' with non-directory '${e}'.`)}if(a.isDirectory()&&PB(e,t))throw new Error(YA(e,t,r));return{srcStat:a,destStat:i}}function $tt(e,t,r,n){let{srcStat:a,destStat:i}=Ftt(e,t,n);if(i){if(cw(a,i)){let s=zi.basename(e),o=zi.basename(t);if(r==="move"&&s!==o&&s.toLowerCase()===o.toLowerCase())return{srcStat:a,destStat:i,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if(a.isDirectory()&&!i.isDirectory())throw new Error(`Cannot overwrite non-directory '${t}' with directory '${e}'.`);if(!a.isDirectory()&&i.isDirectory())throw new Error(`Cannot overwrite directory '${t}' with non-directory '${e}'.`)}if(a.isDirectory()&&PB(e,t))throw new Error(YA(e,t,r));return{srcStat:a,destStat:i}}async function nle(e,t,r,n){let a=zi.resolve(zi.dirname(e)),i=zi.resolve(zi.dirname(r));if(i===a||i===zi.parse(i).root)return;let s;try{s=await Cb.stat(i,{bigint:!0})}catch(o){if(o.code==="ENOENT")return;throw o}if(cw(t,s))throw new Error(YA(e,r,n));return nle(e,t,i,n)}function ale(e,t,r,n){let a=zi.resolve(zi.dirname(e)),i=zi.resolve(zi.dirname(r));if(i===a||i===zi.parse(i).root)return;let s;try{s=Cb.statSync(i,{bigint:!0})}catch(o){if(o.code==="ENOENT")return;throw o}if(cw(t,s))throw new Error(YA(e,r,n));return ale(e,t,i,n)}function cw(e,t){return t.ino!==void 0&&t.dev!==void 0&&t.ino===e.ino&&t.dev===e.dev}function PB(e,t){let r=zi.resolve(e).split(zi.sep).filter(a=>a),n=zi.resolve(t).split(zi.sep).filter(a=>a);return r.every((a,i)=>n[i]===a)}function YA(e,t,r){return`Cannot ${r} '${e}' to a subdirectory of itself, '${t}'.`}ile.exports={checkPaths:rle(Btt),checkPathsSync:$tt,checkParentPaths:rle(nle),checkParentPathsSync:ale,isSrcSubdir:PB,areIdentical:cw}});var ole=ae((IOt,sle)=>{"use strict";async function jtt(e,t){let r=[];for await(let n of e)r.push(t(n).then(()=>null,a=>a??new Error("unknown error")));await Promise.all(r.map(n=>n.then(a=>{if(a!==null)throw a})))}sle.exports={asyncIteratorConcurrentProcess:jtt}});var fle=ae((AOt,dle)=>{"use strict";var ys=Hs(),uw=require("path"),{mkdirs:ztt}=Dc(),{pathExists:Utt}=Gp(),{utimesMillis:Vtt}=CB(),dw=pg(),{asyncIteratorConcurrentProcess:qtt}=ole();async function Htt(e,t,r={}){typeof r=="function"&&(r={filter:r}),r.clobber="clobber"in r?!!r.clobber:!0,r.overwrite="overwrite"in r?!!r.overwrite:r.clobber,r.preserveTimestamps&&process.arch==="ia32"&&process.emitWarning(`Using the preserveTimestamps option in 32-bit node is not recommended;
see https://github.com/jprichardson/node-fs-extra/issues/269`,"Warning","fs-extra-WARN0001");let{srcStat:n,destStat:a}=await dw.checkPaths(e,t,"copy",r);if(await dw.checkParentPaths(e,n,t,"copy"),!await cle(e,t,r))return;let s=uw.dirname(t);await Utt(s)||await ztt(s),await ule(a,e,t,r)}async function cle(e,t,r){return r.filter?r.filter(e,t):!0}async function ule(e,t,r,n){let i=await(n.dereference?ys.stat:ys.lstat)(t);if(i.isDirectory())return Xtt(i,e,t,r,n);if(i.isFile()||i.isCharacterDevice()||i.isBlockDevice())return Gtt(i,e,t,r,n);if(i.isSymbolicLink())return Ytt(e,t,r,n);throw i.isSocket()?new Error(`Cannot copy a socket file: ${t}`):i.isFIFO()?new Error(`Cannot copy a FIFO pipe: ${t}`):new Error(`Unknown file: ${t}`)}async function Gtt(e,t,r,n,a){if(!t)return lle(e,r,n,a);if(a.overwrite)return await ys.unlink(n),lle(e,r,n,a);if(a.errorOnExist)throw new Error(`'${n}' already exists`)}async function lle(e,t,r,n){if(await ys.copyFile(t,r),n.preserveTimestamps){Ktt(e.mode)&&await Wtt(r,e.mode);let a=await ys.stat(t);await Vtt(r,a.atime,a.mtime)}return ys.chmod(r,e.mode)}function Ktt(e){return(e&128)===0}function Wtt(e,t){return ys.chmod(e,t|128)}async function Xtt(e,t,r,n,a){t||await ys.mkdir(n),await qtt(await ys.opendir(r),async i=>{let s=uw.join(r,i.name),o=uw.join(n,i.name);if(await cle(s,o,a)){let{destStat:c}=await dw.checkPaths(s,o,"copy",a);await ule(c,s,o,a)}}),t||await ys.chmod(n,e.mode)}async function Ytt(e,t,r,n){let a=await ys.readlink(t);if(n.dereference&&(a=uw.resolve(process.cwd(),a)),!e)return ys.symlink(a,r);let i=null;try{i=await ys.readlink(r)}catch(s){if(s.code==="EINVAL"||s.code==="UNKNOWN")return ys.symlink(a,r);throw s}if(n.dereference&&(i=uw.resolve(process.cwd(),i)),dw.isSrcSubdir(a,i))throw new Error(`Cannot copy '${a}' to a subdirectory of itself, '${i}'.`);if(dw.isSrcSubdir(i,a))throw new Error(`Cannot overwrite '${i}' with '${a}'.`);return await ys.unlink(r),ys.symlink(a,r)}dle.exports=Htt});var yle=ae((NOt,gle)=>{"use strict";var Gs=Tb(),fw=require("path"),Jtt=Dc().mkdirsSync,Ztt=CB().utimesMillisSync,pw=pg();function Qtt(e,t,r){typeof r=="function"&&(r={filter:r}),r=r||{},r.clobber="clobber"in r?!!r.clobber:!0,r.overwrite="overwrite"in r?!!r.overwrite:r.clobber,r.preserveTimestamps&&process.arch==="ia32"&&process.emitWarning(`Using the preserveTimestamps option in 32-bit node is not recommended;
see https://github.com/jprichardson/node-fs-extra/issues/269`,"Warning","fs-extra-WARN0002");let{srcStat:n,destStat:a}=pw.checkPathsSync(e,t,"copy",r);if(pw.checkParentPathsSync(e,n,t,"copy"),r.filter&&!r.filter(e,t))return;let i=fw.dirname(t);return Gs.existsSync(i)||Jtt(i),ple(a,e,t,r)}function ple(e,t,r,n){let i=(n.dereference?Gs.statSync:Gs.lstatSync)(t);if(i.isDirectory())return srt(i,e,t,r,n);if(i.isFile()||i.isCharacterDevice()||i.isBlockDevice())return ert(i,e,t,r,n);if(i.isSymbolicLink())return crt(e,t,r,n);throw i.isSocket()?new Error(`Cannot copy a socket file: ${t}`):i.isFIFO()?new Error(`Cannot copy a FIFO pipe: ${t}`):new Error(`Unknown file: ${t}`)}function ert(e,t,r,n,a){return t?trt(e,r,n,a):mle(e,r,n,a)}function trt(e,t,r,n){if(n.overwrite)return Gs.unlinkSync(r),mle(e,t,r,n);if(n.errorOnExist)throw new Error(`'${r}' already exists`)}function mle(e,t,r,n){return Gs.copyFileSync(t,r),n.preserveTimestamps&&rrt(e.mode,t,r),EB(r,e.mode)}function rrt(e,t,r){return nrt(e)&&art(r,e),irt(t,r)}function nrt(e){return(e&128)===0}function art(e,t){return EB(e,t|128)}function EB(e,t){return Gs.chmodSync(e,t)}function irt(e,t){let r=Gs.statSync(e);return Ztt(t,r.atime,r.mtime)}function srt(e,t,r,n,a){return t?hle(r,n,a):ort(e.mode,r,n,a)}function ort(e,t,r,n){return Gs.mkdirSync(r),hle(t,r,n),EB(r,e)}function hle(e,t,r){let n=Gs.opendirSync(e);try{let a;for(;(a=n.readSync())!==null;)lrt(a.name,e,t,r)}finally{n.closeSync()}}function lrt(e,t,r,n){let a=fw.join(t,e),i=fw.join(r,e);if(n.filter&&!n.filter(a,i))return;let{destStat:s}=pw.checkPathsSync(a,i,"copy",n);return ple(s,a,i,n)}function crt(e,t,r,n){let a=Gs.readlinkSync(t);if(n.dereference&&(a=fw.resolve(process.cwd(),a)),e){let i;try{i=Gs.readlinkSync(r)}catch(s){if(s.code==="EINVAL"||s.code==="UNKNOWN")return Gs.symlinkSync(a,r);throw s}if(n.dereference&&(i=fw.resolve(process.cwd(),i)),pw.isSrcSubdir(a,i))throw new Error(`Cannot copy '${a}' to a subdirectory of itself, '${i}'.`);if(pw.isSrcSubdir(i,a))throw new Error(`Cannot overwrite '${i}' with '${a}'.`);return urt(a,r)}else return Gs.symlinkSync(a,r)}function urt(e,t){return Gs.unlinkSync(t),Gs.symlinkSync(e,t)}gle.exports=Qtt});var JA=ae((kOt,xle)=>{"use strict";var drt=ji().fromPromise;xle.exports={copy:drt(fle()),copySync:yle()}});var mw=ae((_Ot,vle)=>{"use strict";var ble=Tb(),frt=ji().fromCallback;function prt(e,t){ble.rm(e,{recursive:!0,force:!0},t)}function mrt(e){ble.rmSync(e,{recursive:!0,force:!0})}vle.exports={remove:frt(prt),removeSync:mrt}});var Ale=ae((LOt,Ile)=>{"use strict";var hrt=ji().fromPromise,wle=Hs(),Cle=require("path"),Ple=Dc(),Ele=mw(),Sle=hrt(async function(t){let r;try{r=await wle.readdir(t)}catch{return Ple.mkdirs(t)}return Promise.all(r.map(n=>Ele.remove(Cle.join(t,n))))});function Tle(e){let t;try{t=wle.readdirSync(e)}catch{return Ple.mkdirsSync(e)}t.forEach(r=>{r=Cle.join(e,r),Ele.removeSync(r)})}Ile.exports={emptyDirSync:Tle,emptydirSync:Tle,emptyDir:Sle,emptydir:Sle}});var Lle=ae((ROt,_le)=>{"use strict";var grt=ji().fromPromise,Nle=require("path"),Zd=Hs(),kle=Dc();async function yrt(e){let t;try{t=await Zd.stat(e)}catch{}if(t&&t.isFile())return;let r=Nle.dirname(e),n=null;try{n=await Zd.stat(r)}catch(a){if(a.code==="ENOENT"){await kle.mkdirs(r),await Zd.writeFile(e,"");return}else throw a}n.isDirectory()?await Zd.writeFile(e,""):await Zd.readdir(r)}function xrt(e){let t;try{t=Zd.statSync(e)}catch{}if(t&&t.isFile())return;let r=Nle.dirname(e);try{Zd.statSync(r).isDirectory()||Zd.readdirSync(r)}catch(n){if(n&&n.code==="ENOENT")kle.mkdirsSync(r);else throw n}Zd.writeFileSync(e,"")}_le.exports={createFile:grt(yrt),createFileSync:xrt}});var Fle=ae((DOt,Ole)=>{"use strict";var brt=ji().fromPromise,Rle=require("path"),Kp=Hs(),Dle=Dc(),{pathExists:vrt}=Gp(),{areIdentical:Mle}=pg();async function Srt(e,t){let r;try{r=await Kp.lstat(t)}catch{}let n;try{n=await Kp.lstat(e)}catch(s){throw s.message=s.message.replace("lstat","ensureLink"),s}if(r&&Mle(n,r))return;let a=Rle.dirname(t);await vrt(a)||await Dle.mkdirs(a),await Kp.link(e,t)}function Trt(e,t){let r;try{r=Kp.lstatSync(t)}catch{}try{let i=Kp.lstatSync(e);if(r&&Mle(i,r))return}catch(i){throw i.message=i.message.replace("lstat","ensureLink"),i}let n=Rle.dirname(t);return Kp.existsSync(n)||Dle.mkdirsSync(n),Kp.linkSync(e,t)}Ole.exports={createLink:brt(Srt),createLinkSync:Trt}});var $le=ae((MOt,Ble)=>{"use strict";var Wp=require("path"),hw=Hs(),{pathExists:wrt}=Gp(),Crt=ji().fromPromise;async function Prt(e,t){if(Wp.isAbsolute(e)){try{await hw.lstat(e)}catch(i){throw i.message=i.message.replace("lstat","ensureSymlink"),i}return{toCwd:e,toDst:e}}let r=Wp.dirname(t),n=Wp.join(r,e);if(await wrt(n))return{toCwd:n,toDst:e};try{await hw.lstat(e)}catch(i){throw i.message=i.message.replace("lstat","ensureSymlink"),i}return{toCwd:e,toDst:Wp.relative(r,e)}}function Ert(e,t){if(Wp.isAbsolute(e)){if(!hw.existsSync(e))throw new Error("absolute srcpath does not exist");return{toCwd:e,toDst:e}}let r=Wp.dirname(t),n=Wp.join(r,e);if(hw.existsSync(n))return{toCwd:n,toDst:e};if(!hw.existsSync(e))throw new Error("relative srcpath does not exist");return{toCwd:e,toDst:Wp.relative(r,e)}}Ble.exports={symlinkPaths:Crt(Prt),symlinkPathsSync:Ert}});var Ule=ae((OOt,zle)=>{"use strict";var jle=Hs(),Irt=ji().fromPromise;async function Art(e,t){if(t)return t;let r;try{r=await jle.lstat(e)}catch{return"file"}return r&&r.isDirectory()?"dir":"file"}function Nrt(e,t){if(t)return t;let r;try{r=jle.lstatSync(e)}catch{return"file"}return r&&r.isDirectory()?"dir":"file"}zle.exports={symlinkType:Irt(Art),symlinkTypeSync:Nrt}});var Gle=ae((FOt,Hle)=>{"use strict";var krt=ji().fromPromise,Vle=require("path"),Du=Hs(),{mkdirs:_rt,mkdirsSync:Lrt}=Dc(),{symlinkPaths:Rrt,symlinkPathsSync:Drt}=$le(),{symlinkType:Mrt,symlinkTypeSync:Ort}=Ule(),{pathExists:Frt}=Gp(),{areIdentical:qle}=pg();async function Brt(e,t,r){let n;try{n=await Du.lstat(t)}catch{}if(n&&n.isSymbolicLink()){let[o,l]=await Promise.all([Du.stat(e),Du.stat(t)]);if(qle(o,l))return}let a=await Rrt(e,t);e=a.toDst;let i=await Mrt(a.toCwd,r),s=Vle.dirname(t);return await Frt(s)||await _rt(s),Du.symlink(e,t,i)}function $rt(e,t,r){let n;try{n=Du.lstatSync(t)}catch{}if(n&&n.isSymbolicLink()){let o=Du.statSync(e),l=Du.statSync(t);if(qle(o,l))return}let a=Drt(e,t);e=a.toDst,r=Ort(a.toCwd,r);let i=Vle.dirname(t);return Du.existsSync(i)||Lrt(i),Du.symlinkSync(e,t,r)}Hle.exports={createSymlink:krt(Brt),createSymlinkSync:$rt}});var ece=ae((BOt,Qle)=>{"use strict";var{createFile:Kle,createFileSync:Wle}=Lle(),{createLink:Xle,createLinkSync:Yle}=Fle(),{createSymlink:Jle,createSymlinkSync:Zle}=Gle();Qle.exports={createFile:Kle,createFileSync:Wle,ensureFile:Kle,ensureFileSync:Wle,createLink:Xle,createLinkSync:Yle,ensureLink:Xle,ensureLinkSync:Yle,createSymlink:Jle,createSymlinkSync:Zle,ensureSymlink:Jle,ensureSymlinkSync:Zle}});var ZA=ae(($Ot,tce)=>{function jrt(e,{EOL:t=`
`,finalEOL:r=!0,replacer:n=null,spaces:a}={}){let i=r?t:"";return JSON.stringify(e,n,a).replace(/\n/g,t)+i}function zrt(e){return Buffer.isBuffer(e)&&(e=e.toString("utf8")),e.replace(/^\uFEFF/,"")}tce.exports={stringify:jrt,stripBom:zrt}});var ice=ae((jOt,ace)=>{var Pb;try{Pb=Tb()}catch{Pb=require("fs")}var QA=ji(),{stringify:rce,stripBom:nce}=ZA();async function Urt(e,t={}){typeof t=="string"&&(t={encoding:t});let r=t.fs||Pb,n="throws"in t?t.throws:!0,a=await QA.fromCallback(r.readFile)(e,t);a=nce(a);let i;try{i=JSON.parse(a,t?t.reviver:null)}catch(s){if(n)throw s.message=`${e}: ${s.message}`,s;return null}return i}var Vrt=QA.fromPromise(Urt);function qrt(e,t={}){typeof t=="string"&&(t={encoding:t});let r=t.fs||Pb,n="throws"in t?t.throws:!0;try{let a=r.readFileSync(e,t);return a=nce(a),JSON.parse(a,t.reviver)}catch(a){if(n)throw a.message=`${e}: ${a.message}`,a;return null}}async function Hrt(e,t,r={}){let n=r.fs||Pb,a=rce(t,r);await QA.fromCallback(n.writeFile)(e,a,r)}var Grt=QA.fromPromise(Hrt);function Krt(e,t,r={}){let n=r.fs||Pb,a=rce(t,r);return n.writeFileSync(e,a,r)}ace.exports={readFile:Vrt,readFileSync:qrt,writeFile:Grt,writeFileSync:Krt}});var oce=ae((zOt,sce)=>{"use strict";var eN=ice();sce.exports={readJson:eN.readFile,readJsonSync:eN.readFileSync,writeJson:eN.writeFile,writeJsonSync:eN.writeFileSync}});var tN=ae((UOt,uce)=>{"use strict";var Wrt=ji().fromPromise,IB=Hs(),lce=require("path"),cce=Dc(),Xrt=Gp().pathExists;async function Yrt(e,t,r="utf-8"){let n=lce.dirname(e);return await Xrt(n)||await cce.mkdirs(n),IB.writeFile(e,t,r)}function Jrt(e,...t){let r=lce.dirname(e);IB.existsSync(r)||cce.mkdirsSync(r),IB.writeFileSync(e,...t)}uce.exports={outputFile:Wrt(Yrt),outputFileSync:Jrt}});var fce=ae((VOt,dce)=>{"use strict";var{stringify:Zrt}=ZA(),{outputFile:Qrt}=tN();async function ent(e,t,r={}){let n=Zrt(t,r);await Qrt(e,n,r)}dce.exports=ent});var mce=ae((qOt,pce)=>{"use strict";var{stringify:tnt}=ZA(),{outputFileSync:rnt}=tN();function nnt(e,t,r){let n=tnt(t,r);rnt(e,n,r)}pce.exports=nnt});var gce=ae((HOt,hce)=>{"use strict";var ant=ji().fromPromise,Ks=oce();Ks.outputJson=ant(fce());Ks.outputJsonSync=mce();Ks.outputJSON=Ks.outputJson;Ks.outputJSONSync=Ks.outputJsonSync;Ks.writeJSON=Ks.writeJson;Ks.writeJSONSync=Ks.writeJsonSync;Ks.readJSON=Ks.readJson;Ks.readJSONSync=Ks.readJsonSync;hce.exports=Ks});var Sce=ae((GOt,vce)=>{"use strict";var int=Hs(),yce=require("path"),{copy:snt}=JA(),{remove:bce}=mw(),{mkdirp:ont}=Dc(),{pathExists:lnt}=Gp(),xce=pg();async function cnt(e,t,r={}){let n=r.overwrite||r.clobber||!1,{srcStat:a,isChangingCase:i=!1}=await xce.checkPaths(e,t,"move",r);await xce.checkParentPaths(e,a,t,"move");let s=yce.dirname(t);return yce.parse(s).root!==s&&await ont(s),unt(e,t,n,i)}async function unt(e,t,r,n){if(!n){if(r)await bce(t);else if(await lnt(t))throw new Error("dest already exists.")}try{await int.rename(e,t)}catch(a){if(a.code!=="EXDEV")throw a;await dnt(e,t,r)}}async function dnt(e,t,r){return await snt(e,t,{overwrite:r,errorOnExist:!0,preserveTimestamps:!0}),bce(e)}vce.exports=cnt});var Ece=ae((KOt,Pce)=>{"use strict";var wce=Tb(),NB=require("path"),fnt=JA().copySync,Cce=mw().removeSync,pnt=Dc().mkdirpSync,Tce=pg();function mnt(e,t,r){r=r||{};let n=r.overwrite||r.clobber||!1,{srcStat:a,isChangingCase:i=!1}=Tce.checkPathsSync(e,t,"move",r);return Tce.checkParentPathsSync(e,a,t,"move"),hnt(t)||pnt(NB.dirname(t)),gnt(e,t,n,i)}function hnt(e){let t=NB.dirname(e);return NB.parse(t).root===t}function gnt(e,t,r,n){if(n)return AB(e,t,r);if(r)return Cce(t),AB(e,t,r);if(wce.existsSync(t))throw new Error("dest already exists.");return AB(e,t,r)}function AB(e,t,r){try{wce.renameSync(e,t)}catch(n){if(n.code!=="EXDEV")throw n;return ynt(e,t,r)}}function ynt(e,t,r){return fnt(e,t,{overwrite:r,errorOnExist:!0,preserveTimestamps:!0}),Cce(e)}Pce.exports=mnt});var Ace=ae((WOt,Ice)=>{"use strict";var xnt=ji().fromPromise;Ice.exports={move:xnt(Sce()),moveSync:Ece()}});var ii=ae((XOt,Nce)=>{"use strict";Nce.exports={...Hs(),...JA(),...Ale(),...ece(),...gce(),...Dc(),...Ace(),...tN(),...Gp(),...mw()}});var Fpe={};xl(Fpe,{validateBracketBalance:()=>qct,validatePunctuation:()=>Gct,validateVariableConsistency:()=>Hct});function qct(e){if(!e)return!0;let t=[],r={")":"(","]":"[","}":"{"};for(let n of e)if(["(","[","{"].includes(n))t.push(n);else if([")","]","}"].includes(n)&&t.pop()!==r[n])return!1;return t.length===0}function Hct(e,t){if(!e||!t)return!0;let r=/(\{\w+\}|%\w+|\$\w+|\$\{\w+\})/g,n=e.match(r)||[],a=t.match(r)||[];for(let i of n)if(!t.includes(i))return!1;return!0}function Gct(e,t){if(!e||!t)return!0;let r=/[.!?:;。!?:;]$/,n=e.trim().match(r),a=t.trim().match(r);return!(n&&!a)}var Bpe=de(()=>{});var Out={};xl(Out,{default:()=>Mut});module.exports=Zme(Out);var Yv=A(require("path"));$r();var Vme=require("obsidian");var a0='\n# Role & Context\nYou are an expert Software Localization Specialist & Technical Translator.\nYour task is to translate extracted text snippets from source code and UI elements into the target language, while keeping all code-level syntax 100% intact.\n\n# Core Output Rules (CRITICAL: Failure will crash the system)\n1. ONLY return a valid JSON array string.\n - \u274C NO Markdown formatting (e.g., ```json).\n - \u274C NO conversational text.\n - \u2705 Starts exactly with `[` and ends with `]`.\n2. Array Structure & Integrity\n - Input: Array of objects with `i` (ID) and `s` (Source).\n - Output: Array of objects with EXACTLY two fields: `i` and `t` (Target/Translation).\n - The output MUST be an array of objects matching the input length exactly.\n - The `i` fields MUST be kept EXACTLY as they are. DO NOT MODIFY OR OMIT THEM.\n\n# Translation & Safety Rules (CRITICAL)\n1. Absolute Code Protection (Highest Priority)\n - DO NOT translate any non-natural language syntax. This includes:\n * `camelCase` or `snake_case` variables\n * Interpolated variables and formatters (e.g., `${filename}`, `{{val}}`, `%s`, `{0}`)\n * HTML/XML tags (e.g., `<span>`, `<br>`)\n * URLs, file paths, and regex symbols\n - Example: `Error occurred in ${moduleName}` -> `${moduleName} \u4E2D\u53D1\u751F\u9519\u8BEF` (Variable preserved).\n2. Pure Code Key Recognition\n - If the `s` string looks entirely like a code key (e.g., `user_not_found_error`), DO NOT force a translation. Output it exactly as it is in the `t` field.\n3. Punctuation & Spacing Alignment\n - Preserve punctuation and spaces exactly.\n4. Unicode Encoding Preservation (CRITICAL)\n - If the source string `s` is formatted using Unicode escape sequences (e.g., `\\uXXXX`), your translated text `t` MUST ALSO be converted entirely into Unicode escape sequences.\n - \u274C Never return standard plain text if the source is Unicode-escaped.\n - Example: If `s` is `Hello` ("Hello"), and the translation is "Hola", `t` must be `Hola`.\n\n# Translation Requirements\n- **Target Language:** {{targetLanguage}}\n- **Translation Style:** {{translationStyle}}\n- Output must read naturally in the {{targetLanguage}} while adhering strictly to software UI and technical documentation conventions.\n\n# Example\n[Input]\n[{"i":101, "s":"Settings"}, {"i":102, "s":"Save changes"}, {"i":103, "s":"Open"}]\n\n[Output]\n[{"i":101, "t":"\u8BBE\u7F6E"}, {"i":102, "t":"\u4FDD\u5B58\u66F4\u6539"}, {"i":103, "t":"\u6253\u5F00"}]\n\n{{glossarySection}}\n\n# Quality Checklist (Self-Verify Before Output)\n- [ ] Is the output a totally naked JSON array?\n- [ ] Does each object ONLY contain `i` and `t`?\n- [ ] Are all `i` fields present and unmodified?\n- [ ] Are all code variables (`${...}`) completely intact in the `t`?\n- [ ] If `s` used Unicode escapes (`\\uXXXX`), is `t` correctly encoded as Unicode escapes?\n'.trim();function Q_(e,t,r,n){let a=n?`
# Exclusive Glossary (CRITICAL)
You MUST strictly follow these translation mappings:
${Object.entries(n).map(([i,s])=>`- "${i}" \u2192 "${s}"`).join(`
`)}
Under no circumstances should you alter the translation of these terms.`.trim():"";return e.replace(/\{\{targetLanguage\}\}/g,t).replace(/\{\{translationStyle\}\}/g,r).replace(/\{\{glossarySection\}\}/g,a)}var i0='\n# Role & Context\nYou are an expert Software Localization Specialist & UI Translator.\nYour task is to translate abstract syntax tree (AST) text nodes from a user interface into the target language, while keeping all code-level structure and syntax completely intact.\n\n# Core Output Rules (CRITICAL: Failure will crash the system)\n1. ONLY return a valid JSON array string.\n - \u274C NO Markdown formatting (e.g., ```json).\n - \u274C NO conversational text.\n - \u2705 Starts exactly with `[` and ends with `]`.\n2. Property Gatekeeper (CRITICAL)\n - Input structure: `i` (ID), `s` (Source), `y` (Type), and `n` (Name).\n - Output structure: Return objects with EXACTLY two fields: `i` and `t` (Target/Translation).\n - DO NOT MODIFY `i`.\n - The `y` (type) and `n` (name) fields are for YOUR CONTEXT ONLY. Do not include them in output.\n\n# Translation & Safety Rules (CRITICAL)\n1. Absolute Code Protection\n - DO NOT translate any non-natural language syntax (e.g., `{{count}}`, `<span/>`, `\\n`).\n2. Context Awareness via y & n Fields\n - Use the `y` (node type) and `n` (node name) fields to infer context.\n - Example: `y="Button"`, `n="submit"` -> Translate as an action verb.\n3. Pure Code Key Handling\n - If `s` is a code key, return it as-is in `t`.\n\n# Translation Requirements\n- **Target Language:** {{targetLanguage}}\n- **Translation Style:** {{translationStyle}}\n\n{{glossarySection}}\n\n# Example\n[Input]\n[{"i":50, "s":"Open", "y":"Button", "n":"openFile"}, {"i":51, "s":"\u21E7 Shift", "y":"Text", "n":"shortcut"}]\n\n[Output]\n[{"i":50, "t":"\u6253\u5F00"}, {"i":51, "t":"\u21E7 Shift"}]\n\n# Quality Checklist (Self-Verify Before Output)\n- [ ] Is the output a totally naked JSON array?\n- [ ] Does each object ONLY contain `i` and `t`?\n- [ ] Are `i` fields unaltered?\n- [ ] Are code variables/tags intact in `t`?\n'.trim();function eL(e,t,r,n){let a=n?`
# Exclusive Glossary (CRITICAL)
You MUST strictly follow these translation mappings:
${Object.entries(n).map(([i,s])=>`- "${i}" \u2192 "${s}"`).join(`
`)}
Under no circumstances should you alter the translation of these terms.`.trim():"";return e.replace(/\{\{targetLanguage\}\}/g,t).replace(/\{\{translationStyle\}\}/g,r).replace(/\{\{glossarySection\}\}/g,a)}var s0='\n# Role & Context\nYou are an expert CSS Theme Localizer & UI Translator.\nYour task is to translate Obsidian theme setting labels and descriptions into the target language.\n\n# Core Output Rules (CRITICAL: Failure will crash the system)\n1. ONLY return a valid JSON array string.\n - \u274C NO Markdown formatting (e.g., ```json).\n - \u274C NO conversational text.\n - \u2705 Starts exactly with `[` and ends with `]`.\n2. Property Gatekeeper (CRITICAL)\n - Input structure: `i` (ID), `s` (Source), `y` (Type).\n - Output structure: Return objects with EXACTLY two fields: `i` and `t` (Target/Translation).\n - DO NOT MODIFY `i`.\n - The `y` (type) field is for YOUR CONTEXT ONLY. Do not include it in output.\n\n# Translation & Safety Rules (CRITICAL)\n1. Context Awareness via y Field\n - `y` value tells you if text is a `name`, `title`, `description`, `label`, or `markdown`.\n2. Code Protection\n - DO NOT translate CSS class names or variables.\n3. Brevity for UI\n - Keep translations concise for settings UI.\n4. Unicode Encoding Preservation (CRITICAL)\n - If the source string `s` is formatted using Unicode escape sequences (e.g., `\\uXXXX`), your translated text `t` MUST ALSO be converted entirely into Unicode escape sequences.\n - \u274C Never return standard plain text if the source is Unicode-escaped.\n - Example: If `s` is `\\u0048\\u0065\\u006c\\u006c\\u006f` ("Hello"), and the translation is "Hola", `t` must be `\\u0048\\u006f\\u006c\\u0061`.\n\n# Translation Requirements\n- **Target Language:** {{targetLanguage}}\n- **Translation Style:** {{translationStyle}}\n\n{{glossarySection}}\n\n# Example\n[Input]\n[{"i":201, "s":"Accent color", "y":"name"}, {"i":202, "s":"The color of active elements.", "y":"description"}]\n\n[Output]\n[{"i":201, "t":"\u5F3A\u8C03\u8272"}, {"i":202, "t":"\u6FC0\u6D3B\u72B6\u6001\u5143\u7D20\u7684\u989C\u8272\u3002"}]\n\n# Quality Checklist (Self-Verify Before Output)\n- [ ] Is the output a totally naked JSON array?\n- [ ] Does each object ONLY contain `i` and `t`?\n- [ ] Are `i` fields unaltered?\n- [ ] If `s` used Unicode escapes (`\\uXXXX`), is `t` correctly encoded as Unicode escapes?\n'.trim();function tL(e,t,r,n){let a=n?`
# Exclusive Glossary (CRITICAL)
You MUST strictly follow these translation mappings:
${Object.entries(n).map(([i,s])=>`- "${i}" \u2192 "${s}"`).join(`
`)}
Under no circumstances should you alter the translation of these terms.`.trim():"";return e.replace(/\{\{targetLanguage\}\}/g,t).replace(/\{\{translationStyle\}\}/g,r).replace(/\{\{glossarySection\}\}/g,a)}var rge=`
# Role & Context
You are a Translation Repair Specialist. You receive a source string, a broken translation, and an error description.
Your job is to fix the translation so it is syntactically valid while preserving the original translation intent.
# Core Output Rules (CRITICAL)
1. Return ONLY the fixed translation string. Nothing else.
- \u274C NO JSON wrapping.
- \u274C NO quotes around the output (unless the original had them).
- \u274C NO explanations or conversational text.
2. Preserve all code-level syntax:
- Variables (\`\${...}\`, \`{{...}}\`, \`%s\`, \`{0}\`)
- HTML/XML tags
- Brackets, parentheses, and special characters
3. The fix must address the specific error described.
# Fix Strategy
- **Bracket Mismatch**: Add/remove brackets to balance them.
- **Variable Missing**: Restore the missing variables from the source string.
- **Syntax Error**: Fix quote escaping, bracket nesting, or other syntax issues.
- **General**: If unclear, make the minimal change needed to fix the error.
# Translation Context
- **Target Language:** {{targetLanguage}}
`.trim();function q8(e){return rge.replace(/\{\{targetLanguage\}\}/g,e)}var Wt={1:{id:1,name:"OpenAI \u517C\u5BB9 (\u81EA\u5B9A\u4E49)",baseUrl:"",defaultModel:"gpt-4o-mini",models:["gpt-3.5-turbo","gpt-4","gpt-4-turbo","gpt-4o","gpt-4o-mini"],keyField:"llmOpenaiKey",modelField:"llmOpenaiModel",labelKey:"Openai",homepage:"https://platform.openai.com/"},2:{id:2,name:"Gemini",baseUrl:"https://generativelanguage.googleapis.com/v1beta/openai",defaultModel:"gemini-2.0-flash",models:["gemini-2.0-flash-exp","gemini-2.0-flash","gemini-1.5-pro","gemini-1.5-flash"],keyField:"llmGeminiKey",modelField:"llmGeminiModel",labelKey:"Gemini",homepage:"https://aistudio.google.com/"},3:{id:3,name:"Ollama",baseUrl:"http://localhost:11434",defaultModel:"",models:[],keyField:"llmOllamaKey",modelField:"llmOllamaModel",labelKey:"Ollama",homepage:"https://ollama.com/"},4:{id:4,name:"DeepSeek",baseUrl:"https://api.deepseek.com/v1",defaultModel:"deepseek-chat",models:["deepseek-chat","deepseek-coder","deepseek-reasoner"],keyField:"llmDeepseekKey",modelField:"llmDeepseekModel",labelKey:"Deepseek",homepage:"https://platform.deepseek.com/"},5:{id:5,name:"\u667A\u8C31 AI (GLM)",baseUrl:"https://open.bigmodel.cn/api/paas/v4",defaultModel:"glm-4-flash",models:["glm-4","glm-4-flash","glm-3-turbo"],keyField:"llmZhipuKey",modelField:"llmZhipuModel",labelKey:"Zhipu",homepage:"https://open.bigmodel.cn/"},6:{id:6,name:"\u6708\u4E4B\u6697\u9762 (Kimi)",baseUrl:"https://api.moonshot.cn/v1",defaultModel:"moonshot-v1-8k",models:["moonshot-v1-8k","moonshot-v1-32k","moonshot-v1-128k"],keyField:"llmMoonshotKey",modelField:"llmMoonshotModel",labelKey:"Moonshot",homepage:"https://platform.moonshot.cn/"},7:{id:7,name:"\u901A\u4E49\u5343\u95EE (Aliyun)",baseUrl:"https://dashscope.aliyuncs.com/compatible-mode/v1",defaultModel:"qwen-plus",models:["qwen-turbo","qwen-plus","qwen-max","qwen-max-longcontext"],keyField:"llmAliyunKey",modelField:"llmAliyunModel",labelKey:"Aliyun",homepage:"https://dashscope.console.aliyun.com/"},8:{id:8,name:"\u767E\u5EA6\u5343\u5E06 (ERNIE)",baseUrl:"https://qianfan.baidubce.com/v2",defaultModel:"ernie-4.0-8k-preview",models:["ernie-4.0-8k-preview","ernie-4.0-8k-latest","ernie-3.5-8k","ernie-speed-128k"],keyField:"llmBaiduKey",modelField:"llmBaiduModel",labelKey:"Baidu",homepage:"https://console.bce.baidu.com/qianfan/"},9:{id:9,name:"\u5B57\u8282\u8DF3\u52A8 (\u8C46\u5305)",baseUrl:"https://ark.cn-beijing.volces.com/api/v3",defaultModel:"doubao-pro-4k",models:["doubao-pro-4k","doubao-pro-32k","doubao-lite-4k"],keyField:"llmBytedanceKey",modelField:"llmBytedanceModel",labelKey:"Bytedance",homepage:"https://console.volcengine.com/ark/"},10:{id:10,name:"Groq (\u6781\u901F)",baseUrl:"https://api.groq.com/openai/v1",defaultModel:"llama-3.3-70b-versatile",models:["llama-3.3-70b-versatile","llama-3.1-8b-instant","mixtral-8x7b-32768","gemma2-9b-it"],keyField:"llmGroqKey",modelField:"llmGroqModel",labelKey:"Groq",homepage:"https://console.groq.com/"},11:{id:11,name:"\u7845\u57FA\u6D41\u52A8",baseUrl:"https://api.siliconflow.cn/v1",defaultModel:"deepseek-ai/DeepSeek-V3",models:["deepseek-ai/DeepSeek-V3","deepseek-ai/DeepSeek-R1","deepseek-ai/DeepSeek-V2.5","Qwen/Qwen2.5-7B-Instruct","Qwen/Qwen2.5-72B-Instruct","01-ai/Yi-1.5-34B-Chat-16K"],keyField:"llmSiliconflowKey",modelField:"llmSiliconflowModel",labelKey:"Siliconflow",homepage:"https://siliconflow.cn/"},12:{id:12,name:"OpenRouter",baseUrl:"https://openrouter.ai/api/v1",defaultModel:"anthropic/claude-3.5-sonnet",models:["anthropic/claude-3.5-sonnet","google/gemini-pro-1.5","meta-llama/llama-3.1-405b-instruct","mistralai/mistral-large","openai/gpt-4o"],keyField:"llmOpenrouterKey",modelField:"llmOpenrouterModel",labelKey:"Openrouter",homepage:"https://openrouter.ai/"},13:{id:13,name:"DeepInfra",baseUrl:"https://api.deepinfra.com/v1/openai",defaultModel:"meta-llama/Llama-3.3-70B-Instruct",models:["meta-llama/Llama-3.3-70B-Instruct","meta-llama/Llama-3.2-11B-Vision-Instruct","mistralai/Mistral-7B-Instruct-v0.3","microsoft/WizardLM-2-7B"],keyField:"llmDeepinfraKey",modelField:"llmDeepinfraModel",labelKey:"Deepinfra",homepage:"https://deepinfra.com/"},14:{id:14,name:"Mistral AI",baseUrl:"https://api.mistral.ai/v1",defaultModel:"mistral-small-latest",models:["mistral-small-latest","mistral-medium-latest","mistral-large-latest","codestral-latest"],keyField:"llmMistralKey",modelField:"llmMistralModel",labelKey:"Mistral",homepage:"https://console.mistral.ai/"},15:{id:15,name:"MiniMax (\u6D77\u87BA AI)",baseUrl:"https://api.minimax.chat/v1",defaultModel:"abab6.5-chat",models:["abab6.5-chat","abab6.5s-chat","abab5.5-chat"],keyField:"llmMinimaxKey",modelField:"llmMinimaxModel",labelKey:"Minimax",homepage:"https://platform.minimaxi.com/"},16:{id:16,name:"\u9636\u8DC3\u661F\u8FB0 (StepFun)",baseUrl:"https://api.stepfun.com/v1",defaultModel:"step-1-8k",models:["step-1-8k","step-1-32k","step-1-128k","step-1-256k"],keyField:"llmStepfunKey",modelField:"llmStepfunModel",labelKey:"Stepfun",homepage:"https://platform.stepfun.com/"}};i1();var s1={agreement:!0,language:"zh-cn",checkUpdates:!0,searchText:"",sort:"0",author:"",mode:0,automaticUpdate:!1,llmApi:1,llmResponseFormat:"text",llmLanguage:"\u7B80\u4F53\u4E2D\u6587",llmStyle:"\u65E0",llmBatchSize:10,llmConcurrencyLimit:3,llmTimeout:6e4,llmRegexPrompt:a0,llmAstPrompt:i0,llmThemePrompt:s0,llmOpenaiUrl:"",llmOpenaiKey:"",llmOpenaiModel:Wt[1].defaultModel,llmOpenaiProfiles:[{id:"default",name:"Default",url:"",key:"",model:Wt[1].defaultModel,useCustomPrice:!1,priceInput:0,priceOutput:0}],llmOpenaiActiveProfileId:"default",llmUseCustomPrice:!0,llmPriceInputCustom:0,llmPriceOutputCustom:0,llmGeminiKey:"",llmGeminiModel:"gemini-2.0-flash",llmGeminiProfiles:[{id:"default",name:"Default",url:"",key:"",model:"gemini-2.0-flash",useCustomPrice:!1,priceInput:0,priceOutput:0}],llmGeminiActiveProfileId:"default",llmOllamaUrl:"http://localhost:11434",llmOllamaModel:"",llmOllamaProfiles:[{id:"default",name:"Default",url:"http://localhost:11434",key:"",model:"",useCustomPrice:!1,priceInput:0,priceOutput:0}],llmOllamaActiveProfileId:"default",llmDeepseekKey:"",llmDeepseekModel:Wt[4].defaultModel,llmDeepseekProfiles:[{id:"default",name:"Default",url:Wt[4].baseUrl||"",key:"",model:Wt[4].defaultModel,useCustomPrice:!1,priceInput:0,priceOutput:0}],llmDeepseekActiveProfileId:"default",llmZhipuKey:"",llmZhipuModel:Wt[5].defaultModel,llmZhipuProfiles:[{id:"default",name:"Default",url:Wt[5].baseUrl||"",key:"",model:Wt[5].defaultModel,useCustomPrice:!1,priceInput:0,priceOutput:0}],llmZhipuActiveProfileId:"default",llmMoonshotKey:"",llmMoonshotModel:Wt[6].defaultModel,llmMoonshotProfiles:[{id:"default",name:"Default",url:Wt[6].baseUrl||"",key:"",model:Wt[6].defaultModel,useCustomPrice:!1,priceInput:0,priceOutput:0}],llmMoonshotActiveProfileId:"default",llmAliyunKey:"",llmAliyunModel:Wt[7].defaultModel,llmAliyunProfiles:[{id:"default",name:"Default",url:Wt[7].baseUrl||"",key:"",model:Wt[7].defaultModel,useCustomPrice:!1,priceInput:0,priceOutput:0}],llmAliyunActiveProfileId:"default",llmBaiduKey:"",llmBaiduModel:Wt[8].defaultModel,llmBaiduProfiles:[{id:"default",name:"Default",url:Wt[8].baseUrl||"",key:"",model:Wt[8].defaultModel,useCustomPrice:!1,priceInput:0,priceOutput:0}],llmBaiduActiveProfileId:"default",llmBytedanceKey:"",llmBytedanceModel:Wt[9].defaultModel,llmBytedanceProfiles:[{id:"default",name:"Default",url:Wt[9].baseUrl||"",key:"",model:Wt[9].defaultModel,useCustomPrice:!1,priceInput:0,priceOutput:0}],llmBytedanceActiveProfileId:"default",llmGroqKey:"",llmGroqModel:Wt[10].defaultModel,llmGroqProfiles:[{id:"default",name:"Default",url:Wt[10].baseUrl||"",key:"",model:Wt[10].defaultModel,useCustomPrice:!1,priceInput:0,priceOutput:0}],llmGroqActiveProfileId:"default",llmSiliconflowKey:"",llmSiliconflowModel:Wt[11].defaultModel,llmSiliconflowProfiles:[{id:"default",name:"Default",url:Wt[11].baseUrl||"",key:"",model:Wt[11].defaultModel,useCustomPrice:!1,priceInput:0,priceOutput:0}],llmSiliconflowActiveProfileId:"default",llmOpenrouterKey:"",llmOpenrouterModel:Wt[12].defaultModel,llmOpenrouterProfiles:[{id:"default",name:"Default",url:Wt[12].baseUrl||"",key:"",model:Wt[12].defaultModel,useCustomPrice:!1,priceInput:0,priceOutput:0}],llmOpenrouterActiveProfileId:"default",llmDeepinfraKey:"",llmDeepinfraModel:Wt[13].defaultModel,llmDeepinfraProfiles:[{id:"default",name:"Default",url:Wt[13].baseUrl||"",key:"",model:Wt[13].defaultModel,useCustomPrice:!1,priceInput:0,priceOutput:0}],llmDeepinfraActiveProfileId:"default",llmMistralKey:"",llmMistralModel:Wt[14].defaultModel,llmMistralProfiles:[{id:"default",name:"Default",url:Wt[14].baseUrl||"",key:"",model:Wt[14].defaultModel,useCustomPrice:!1,priceInput:0,priceOutput:0}],llmMistralActiveProfileId:"default",llmMinimaxKey:"",llmMinimaxModel:Wt[15].defaultModel,llmMinimaxProfiles:[{id:"default",name:"Default",url:Wt[15].baseUrl||"",key:"",model:Wt[15].defaultModel,useCustomPrice:!1,priceInput:0,priceOutput:0}],llmMinimaxActiveProfileId:"default",llmStepfunKey:"",llmStepfunModel:Wt[16].defaultModel,llmStepfunProfiles:[{id:"default",name:"Default",url:Wt[16].baseUrl||"",key:"",model:Wt[16].defaultModel,useCustomPrice:!1,priceInput:0,priceOutput:0}],llmStepfunActiveProfileId:"default",modeImt:!1,imtPagerule:{selectors:[".mod-settings",".modal-container",".menu",".notice-container"],excludeSelectors:[".markdown-source-view",".markdown-reading-view",".cm-editor"]},shareToken:"",shareRepo:"",shareProfiles:[],shareActiveProfileId:"",reFlags:"gs",reLength:300,reDatas:Gc.patterns,reRejectRe:Gc.rejectPatterns,reValidRe:Gc.validPatterns,astAssignments:Pf.assignments,astFunctions:Pf.functions,astKeys:Pf.keys,astRejectRe:Gc.rejectPatterns,astValidRe:Gc.validPatterns,githubProxyUrl:"https://ghp.ci/",cloudRepos:[],defaultCloudRepo:"",managerTab:"plugins",pluginViewMode:"list",themeViewMode:"grid",autoSave:!0,autoDiscovery:!1,autoMatchStrategy:"comprehensive",autoApply:!1,autoCheckInterval:24,autoTrustedRepos:[],autoExcludeList:[],autoScanMode:"incremental",lastAutoCheckTime:0};var CI=require("obsidian");var Ki=class{constructor(t){this.settingTab=t,this.i18n=t.i18n,this.settings=t.i18n.settings,this.a=t.containerEl,this.containerEl=t.contentEl,this.app=t.app}display(){this.main()}};var ba=require("obsidian");var di=[{value:"zh-cn",label:"\u7B80\u4F53\u4E2D\u6587"},{value:"zh-tw",label:"\u7E41\u9AD4\u4E2D\u6587"},{value:"en",label:"English"},{value:"ja",label:"\u65E5\u672C\u8A9E"},{value:"ko",label:"\uD55C\uAD6D\uC5B4"},{value:"fr",label:"Fran\xE7ais"},{value:"de",label:"Deutsch"},{value:"es",label:"Espa\xF1ol"},{value:"ru",label:"\u0420\u0443\u0441\u0441\u043A\u0438\u0439"}];$r();var o0=class extends Ki{main(){new ba.Setting(this.containerEl).setHeading().setName(v("Settings.Basis.UpdateHeader")),new ba.Setting(this.containerEl).setName(v("Settings.Basis.UpdateTitle")).setDesc(v("Settings.Basis.UpdateDesc")).addToggle(u=>u.setValue(this.settings.checkUpdates).onChange(async()=>{this.settings.checkUpdates=!this.settings.checkUpdates,await this.i18n.saveSettings(),this.settings.checkUpdates?await this.i18n.coreManager.checkUpdates():(this.i18n.coreManager.updatesMark=!1,this.i18n.coreManager.updatesVersion=""),this.settingTab.basisDisplay()})),new ba.Setting(this.containerEl).setName(v("Settings.Basis.SmartUpdateTitle")).setDesc(v("Settings.Basis.SmartUpdateDesc")).addToggle(u=>u.setValue(this.settings.automaticUpdate).onChange(async d=>{this.settings.automaticUpdate=d,await this.i18n.saveSettings()})),new ba.Setting(this.containerEl).setHeading().setName(v("Settings.Basis.BasisHeader")),new ba.Setting(this.containerEl).setName(v("Settings.Basis.LangTitle")).setDesc(v("Settings.Basis.LangDesc")).addDropdown(u=>u.addOptions(Object.fromEntries(di.map(d=>[d.value,d.label]))).setValue(this.settings.language).onChange(async d=>{this.settings.language=d,await this.i18n.saveSettings()})),new ba.Setting(this.containerEl).setName(v("Settings.Basis.AutoSaveTitle")).setDesc(v("Settings.Basis.AutoSaveDesc")).addToggle(u=>u.setValue(this.settings.autoSave).onChange(async d=>{this.settings.autoSave=d,await this.i18n.saveSettings()})),new ba.Setting(this.containerEl).setName(v("Settings.Basis.AuthorTitle")).setDesc(v("Settings.Basis.AuthorDesc")).addText(u=>u.setPlaceholder(v("Settings.Basis.AuthorPlaceholder")).setValue(this.settings.author).onChange(async d=>{this.settings.author=d,await this.i18n.saveSettings()})),new ba.Setting(this.containerEl).setHeading().setName(v("Settings.Basis.CloudHeader")),new ba.Setting(this.containerEl).setName(v("Settings.Basis.DefaultCloudRepoTitle")).setDesc(v("Settings.Basis.DefaultCloudRepoDesc")).addText(u=>u.setPlaceholder(v("Settings.Basis.DefaultCloudRepoPlaceholder")).setValue(this.settings.defaultCloudRepo).onChange(async d=>{this.settings.defaultCloudRepo=d,await this.i18n.saveSettings()}));let t={"":v("Settings.Basis.ProxyDirect"),"https://ghproxy.net/":v("Settings.Basis.ProxyNode2"),"https://gh-proxy.com/":v("Settings.Basis.ProxyNode5"),"https://cdn.jsdelivr.net/gh/":v("Settings.Basis.ProxyNode7"),"https://fastly.jsdelivr.net/gh/":v("Settings.Basis.ProxyNode8"),"https://gcore.jsdelivr.net/gh/":v("Settings.Basis.ProxyNode9"),"https://cdn.statically.io/gh/":v("Settings.Basis.ProxyNode10")},r=this.settings.githubProxyUrl;Object.keys(t).includes(r)||(r=""),new ba.Setting(this.containerEl).setName(v("Settings.Basis.GithubProxyTitle")).setDesc(v("Settings.Basis.GithubProxyDesc")).addDropdown(u=>u.addOptions(t).setValue(r).onChange(async d=>{this.settings.githubProxyUrl=d,await this.i18n.saveSettings()})).addButton(u=>u.setButtonText(v("Settings.Basis.ProxyTestBtn")).setTooltip(v("Settings.Basis.ProxyTestTooltip")).onClick(async()=>{u.setButtonText(v("Settings.Basis.ProxyTesting")),u.buttonEl.disabled=!0;let d="https://raw.githubusercontent.com/eondrcode/obsidian-i18n/master/manifest.json",f=this.i18n.api.github.wrapProxyUrl(d);try{let p=Date.now(),m=await Promise.race([(0,ba.requestUrl)({url:f+"?t="+p,method:"GET"}),new Promise((x,g)=>setTimeout(()=>g(new Error("timeout")),5e3))]),h=Date.now()-p;if(m.status===200)new ba.Notice(v("Settings.Basis.ProxyTestSuccess",{ms:h})),u.setButtonText(`${h}ms`),u.buttonEl.style.color="var(--text-success)";else throw new Error("status "+m.status)}catch{new ba.Notice(v("Settings.Basis.ProxyTestErrorNotice")),u.setButtonText(v("Settings.Basis.ProxyTestFail")),u.buttonEl.style.color="var(--text-error)"}setTimeout(()=>{u.setButtonText(v("Settings.Basis.ProxyTestBtn")),u.buttonEl.disabled=!1,u.buttonEl.style.color=""},3500)})),new ba.Setting(this.containerEl).setHeading().setName(v("Settings.Basis.ResetHeader")),new ba.Setting(this.containerEl).setName(v("Settings.Basis.ResetTitle")).setDesc(v("Settings.Basis.ResetDesc")).addButton(u=>u.setButtonText(v("Settings.Basis.ResetBtn")).setWarning().onClick(async()=>{window.confirm(v("Settings.Basis.ResetConfirm"))&&(Object.assign(this.settings,JSON.parse(JSON.stringify(s1))),await this.i18n.saveSettings(),new ba.Notice(v("Settings.Basis.ResetSuccess")),this.settingTab.display())})),new ba.Setting(this.containerEl).setHeading().setName(v("Settings.Basis.ExternalHeader"));let n=this.containerEl.createDiv({cls:"i18n-recommend-card"});n.style.border="1px solid var(--background-modifier-border)",n.style.borderRadius="8px",n.style.padding="16px",n.style.margin="10px 0",n.style.backgroundColor="var(--background-secondary)",n.style.boxShadow="0 2px 8px rgba(0,0,0,0.05)";let a=n.createDiv();a.style.display="flex",a.style.alignItems="center",a.style.gap="10px",a.style.marginBottom="8px";let i=a.createDiv();i.style.color="var(--text-accent)",(0,ba.setIcon)(i,"blocks");let s=a.createEl("b",{text:v("Settings.Basis.ManagerTitle"),cls:"text-lg font-semibold"});s.style.color="var(--text-normal)";let o=n.createDiv({text:v("Settings.Basis.ManagerDesc"),cls:"setting-item-description"});o.style.margin="0",o.style.marginBottom="12px",o.style.lineHeight="1.6",o.style.fontSize="0.9em";let l=n.createDiv();l.style.display="flex",l.style.justifyContent="flex-end";let c=l.createEl("button",{text:v("Settings.Basis.ManagerBtn"),cls:"mod-cta"});c.style.backgroundColor="var(--interactive-accent)",c.style.color="white",c.onclick=()=>{window.open("obsidian://show-plugin?id=better-plugins-manager")}}};var qa=require("obsidian");$r();var l0=class extends Ki{main(){let t=new qa.Setting(this.containerEl);t.setName(`${v("Settings.Immersive.Title")}`),t.setDesc(v("Settings.Immersive.Desc")),t.addToggle(u=>{u.setValue(this.settings.modeImt).onChange(async d=>{this.settings.modeImt=d,await this.i18n.saveSettings(),this.settingTab.imtDisplay(),d?this.i18n.coreManager.activateIMT():this.i18n.coreManager.deactivateIMT()})}),new qa.Setting(this.containerEl).setName(v("Settings.Immersive.CoreControl")).setDesc(v("Settings.Immersive.CoreControlDesc")).setHeading();let r=new qa.Setting(this.containerEl);r.setName(v("Settings.Immersive.MatchTitle")),r.setDesc(Ef({type:"string[]",desc:v("Settings.Immersive.MatchDesc"),example:"",notice:v("Settings.Immersive.MatchNotice")})),r.addTextArea(u=>u.setValue(this.settings.imtPagerule.selectors?Array.isArray(this.settings.imtPagerule.selectors)?this.settings.imtPagerule.selectors.join(`
`):this.settings.imtPagerule.selectors:"").onChange(async d=>{this.settings.imtPagerule.selectors=d.split(`
`).filter(f=>typeof f=="string"&&f.trim()!==""),await this.i18n.saveSettings()}).inputEl.onblur=()=>{new qa.Notice(v("Settings.Immersive.RestartNotice"),5e3)});let n=new qa.Setting(this.containerEl);n.setName(v("Settings.Immersive.ExcludeTitle")),n.setDesc(Ef({type:"string[]",desc:v("Settings.Immersive.ExcludeDesc"),example:"",notice:""})),n.addTextArea(u=>u.setValue(this.settings.imtPagerule.excludeSelectors?Array.isArray(this.settings.imtPagerule.excludeSelectors)?this.settings.imtPagerule.excludeSelectors.join(`
`):this.settings.imtPagerule.excludeSelectors:"").onChange(async d=>{this.settings.imtPagerule.excludeSelectors=d.split(`
`).filter(f=>typeof f=="string"&&f.trim()!==""),await this.i18n.saveSettings()}).inputEl.onblur=()=>{new qa.Notice(v("Settings.Immersive.RestartNotice"),5e3)});let a=new qa.Setting(this.containerEl);a.setName(v("Settings.Immersive.MainFrameTitle")),a.setDesc(Ef({type:"string[]",desc:v("Settings.Immersive.MainFrameDesc"),example:""})),a.addTextArea(u=>u.setValue(this.settings.imtPagerule.mainFrameSelector?Array.isArray(this.settings.imtPagerule.mainFrameSelector)?this.settings.imtPagerule.mainFrameSelector.join(`
`):this.settings.imtPagerule.mainFrameSelector:"").onChange(async d=>{this.settings.imtPagerule.mainFrameSelector=d.split(`
`).filter(f=>typeof f=="string"&&f.trim()!==""),await this.i18n.saveSettings()}).inputEl.onblur=()=>{new qa.Notice(v("Settings.Immersive.RestartNotice"),5e3)});let i=new qa.Setting(this.containerEl);i.setName(v("Settings.Immersive.StayOriginalTitle")),i.setDesc(Ef({type:"string[]",desc:v("Settings.Immersive.StayOriginalDesc"),example:""})),i.addTextArea(u=>u.setValue(this.settings.imtPagerule.stayOriginalSelectors?Array.isArray(this.settings.imtPagerule.stayOriginalSelectors)?this.settings.imtPagerule.stayOriginalSelectors.join(`
`):this.settings.imtPagerule.stayOriginalSelectors:"").onChange(async d=>{this.settings.imtPagerule.stayOriginalSelectors=d.split(`
`).filter(f=>typeof f=="string"&&f.trim()!==""),await this.i18n.saveSettings()}).inputEl.onblur=()=>{new qa.Notice(v("Settings.Immersive.RestartNotice"),5e3)});let s=new qa.Setting(this.containerEl);s.setName(v("Settings.Immersive.ExtraBlockTitle")),s.setDesc(Ef({type:"string[]",desc:v("Settings.Immersive.ExtraBlockDesc"),example:""})),s.addTextArea(u=>u.setValue(this.settings.imtPagerule.extraBlockSelectors?Array.isArray(this.settings.imtPagerule.extraBlockSelectors)?this.settings.imtPagerule.extraBlockSelectors.join(`
`):this.settings.imtPagerule.extraBlockSelectors:"").onChange(async d=>{this.settings.imtPagerule.extraBlockSelectors=d.split(`
`).filter(f=>typeof f=="string"&&f.trim()!==""),await this.i18n.saveSettings()}).inputEl.onblur=()=>{new qa.Notice(v("Settings.Immersive.RestartNotice"),5e3)});let o=new qa.Setting(this.containerEl);o.setName(v("Settings.Immersive.ExtraInlineTitle")),o.setDesc(Ef({type:"string[]",desc:v("Settings.Immersive.ExtraInlineDesc"),example:""})),o.addTextArea(u=>u.setValue(this.settings.imtPagerule.extraInlineSelectors?Array.isArray(this.settings.imtPagerule.extraInlineSelectors)?this.settings.imtPagerule.extraInlineSelectors.join(`
`):this.settings.imtPagerule.extraInlineSelectors:"").onChange(async d=>{this.settings.imtPagerule.extraInlineSelectors=d.split(`
`).filter(f=>typeof f=="string"&&f.trim()!==""),await this.i18n.saveSettings()}).inputEl.onblur=()=>{new qa.Notice(v("Settings.Immersive.RestartNotice"),5e3)});let l=new qa.Setting(this.containerEl);l.setName(v("Settings.Immersive.TranslationClassesTitle")),l.setDesc(Ef({type:"string[]",desc:v("Settings.Immersive.TranslationClassesDesc"),example:""})),l.addTextArea(u=>u.setValue(this.settings.imtPagerule.translationClasses?Array.isArray(this.settings.imtPagerule.translationClasses)?this.settings.imtPagerule.translationClasses.join(`
`):this.settings.imtPagerule.translationClasses:"").onChange(async d=>{this.settings.imtPagerule.translationClasses=d.split(`
`).filter(f=>typeof f=="string"&&f.trim()!==""),await this.i18n.saveSettings()}).inputEl.onblur=()=>{new qa.Notice(v("Settings.Immersive.RestartNotice"),5e3)});let c=new qa.Setting(this.containerEl);c.setName(v("Settings.Immersive.InjectedCssTitle")),c.setDesc(Ef({type:"string",desc:v("Settings.Immersive.InjectedCssDesc"),example:""})),c.addTextArea(u=>{u.setValue(this.settings.imtPagerule.injectedCss?Array.isArray(this.settings.imtPagerule.injectedCss)?this.settings.imtPagerule.injectedCss.join(`
`):this.settings.imtPagerule.injectedCss:"").onChange(async d=>{this.settings.imtPagerule.injectedCss=d,await this.i18n.saveSettings()}).inputEl.onblur=()=>{new qa.Notice(v("Settings.Immersive.RestartNotice"),5e3)},u.inputEl.setAttr("rows",4)})}},Ef=e=>{let t=new DocumentFragment;return t.createDiv({text:`${v("Settings.Immersive.DescLabel")} ${e.desc}`}),e.notice&&t.createDiv({text:e.notice}),t};var o1=require("obsidian");$r();var c0=class extends Ki{main(){new o1.Setting(this.containerEl).setName(v("Settings.Ai.Provider")).setHeading();let t=new o1.Setting(this.containerEl);t.setName(`${v("Settings.Ai.Provider")} (Provider)`),t.setDesc(v("Settings.Ai.ProviderDesc")),t.addDropdown(r=>{r.addOption("header-international","\u2500\u2500 \u{1F30D} \u56FD\u9645\u4E3B\u6D41 (International) \u2500\u2500"),r.addOption("1","OpenAI"),r.addOption("2","Gemini"),r.addOption("14","Mistral AI"),r.addOption("10","Groq"),r.addOption("header-domestic","\u2500\u2500 \u{1F1E8}\u{1F1F3} \u56FD\u4EA7\u5927\u6A21\u578B (Domestic) \u2500\u2500"),r.addOption("4","DeepSeek"),r.addOption("5","\u667A\u8C31 AI (GLM)"),r.addOption("6","\u6708\u4E4B\u6697\u9762 (Kimi)"),r.addOption("7","\u901A\u4E49\u5343\u95EE (Aliyun)"),r.addOption("8","\u767E\u5EA6\u5343\u5E06 (ERNIE)"),r.addOption("9","\u5B57\u8282\u8DF3\u52A8 (\u8C46\u5305)"),r.addOption("15","MiniMax (\u6D77\u87BA AI)"),r.addOption("16","\u9636\u8DC3\u661F\u8FB0 (StepFun)"),r.addOption("header-aggregated","\u2500\u2500 \u{1F680} \u805A\u5408\u5E73\u53F0 (Aggregated) \u2500\u2500"),r.addOption("11","SiliconFlow (\u7845\u57FA\u6D41\u52A8)"),r.addOption("12","OpenRouter (\u805A\u5408\u5168\u7403)"),r.addOption("13","DeepInfra (\u9AD8\u6027\u4EF7\u6BD4)"),r.addOption("header-local","\u2500\u2500 \u{1F3E0} \u672C\u5730\u90E8\u7F72 (Local) \u2500\u2500"),r.addOption("3","Ollama"),r.setValue(String(this.settings.llmApi)),r.onChange(async n=>{if(n.startsWith("header-")){r.setValue(String(this.settings.llmApi));return}this.settings.llmApi=Number(n),await this.i18n.saveSettings(),this.settingTab.llmDisplay()})}),new o1.Setting(this.containerEl).setName(v("Settings.Ai.ConfigHeader")).setHeading()}};var Pa=require("obsidian");$r();var H8=require("obsidian");$r();function l1(e){if(!e)return e;let t=e.trim();if(t=t.replace(/\/+$/,""),!t)return t;let r=["/chat/completions","/completions","/chat","/models","/v1"],n=!0;for(;n;){n=!1;for(let a of r)if(t.endsWith(a)){t=t.substring(0,t.length-a.length).replace(/\/+$/,""),n=!0;break}}return t}var c1=class{constructor(t,r,n,a,i){this.logs=[];this.url=(t||"").trim(),this.key=r.trim(),this.model=n.trim(),this.responseFormat=a||"text",this.timeout=i||6e4}addLog(t,r,n="info"){this.logs.push({stage:t,message:r,level:n})}async runDeepDiagnostic(t){this.logs=[];let r={overallStatus:"healthy",endpoint:{status:"na",value:this.url},auth:{status:"na",value:"***"},model:{status:"na",value:this.model||"N/A"},systemRole:{status:"na",value:"Not Tested"},jsonMode:{status:"na",value:"Not Tested"},jsonSchema:{status:"na",value:"Not Tested"},translation:{status:"na",value:"Not Tested"},logs:this.logs};this.addLog("Endpoint",`Testing connectivity to ${this.url}`),t?.(v("Settings.Ai.TestStageNetwork"));let n=Date.now(),i=`${l1(this.url)}/v1`;try{this.url.match(/^https?:\/\//)||(r.endpoint.status="warn",r.endpoint.tip="URL must start with http:// or https://",this.addLog("Endpoint","Invalid URL protocol","warn"));let x=await this.safeRequest(`${i}/models`,"GET"),g=Date.now()-n;if(r.endpoint.latency=g,x.status>=200||[401,403,405,429].includes(x.status))r.endpoint.status=r.endpoint.status==="warn"?"warn":"pass",r.endpoint.value=`${this.url} (${x.status})`,this.addLog("Endpoint",`Reachable (Latency: ${g}ms, Status: ${x.status})`),!this.url.includes("/v1")&&!this.url.includes("openai.com")&&!this.url.includes("anthropic")&&this.addLog("Endpoint","Base URL does not contain /v1, automatically appending for API calls","info");else return r.endpoint.status="fail",r.endpoint.tip=v("Settings.Ai.TestFail404"),r.overallStatus="failed",this.addLog("Endpoint",`Unreachable or returns error status: ${x.status}`,"error"),r}catch(x){return r.endpoint.status="fail",r.endpoint.tip=v("Settings.Ai.TestFailNetwork"),r.overallStatus="failed",this.addLog("Endpoint",`Network error: ${x.message}`,"error"),r}t?.(v("Settings.Ai.TestStageAuth")),this.addLog("Auth","Verifying API Key");let s=Date.now(),o=await this.safeRequest(`${i}/models`,"GET",!0);if(r.auth.latency=Date.now()-s,o.status===200)r.auth.status="pass",r.auth.value="Valid",this.addLog("Auth","API Key verified successfully");else return r.auth.status="fail",r.auth.value=`Error ${o.status}`,r.auth.tip=o.status===401?v("Settings.Ai.TestFail401"):o.status===429?v("Settings.Ai.DiagTipQuota"):v("Settings.Ai.TestFailUnknown"),r.overallStatus="failed",this.addLog("Auth",`Authentication failed with status ${o.status}`,"error"),r;if(!this.model)return r.model.status="warn",r.model.tip="No model name provided",this.addLog("Model","Skipping model-specific tests (no name)","warn"),r;t?.(v("Settings.Ai.TestStageModel")),this.addLog("Model",`Testing model availability: ${this.model}`);let l=Date.now(),c=await this.safeRequest(`${i}/chat/completions`,"POST",!0,{model:this.model,messages:[{role:"user",content:"hi"}],max_tokens:1});if(r.model.latency=Date.now()-l,c.status===200)r.model.status="pass",this.addLog("Model",`Model ${this.model} is available`);else return r.model.status="fail",r.model.tip=c.status===404?v("Settings.Ai.TestFail404"):v("Settings.Ai.TestFailModel"),r.overallStatus="failed",this.addLog("Model",`Model test failed with status ${c.status}`,"error"),r;t?.(v("Settings.Ai.DiagStageSystemRole")),this.addLog("SystemRole","Testing system role support");let u=Date.now(),d=await this.safeRequest(`${i}/chat/completions`,"POST",!0,{model:this.model,messages:[{role:"system",content:"You are a helpful assistant. Reply only with: OK"},{role:"user",content:"hi"}],max_tokens:5});r.systemRole.latency=Date.now()-u,d.status===200?(r.systemRole.status="pass",r.systemRole.value="Supported",this.addLog("SystemRole","System role is supported")):(r.systemRole.status="fail",r.systemRole.tip=v("Settings.Ai.DiagTipSystemRole"),r.overallStatus=r.overallStatus==="healthy"?"warning":r.overallStatus,this.addLog("SystemRole",`System role test failed (${d.status})`,"warn")),this.addLog("Capabilities","Testing JSON Mode support"),t?.(`${v("Settings.Ai.DiagItemJsonMode")}\u2026`);let f=await this.safeRequest(`${i}/chat/completions`,"POST",!0,{model:this.model,messages:[{role:"user",content:'respond with json: {"ok":true}'}],response_format:{type:"json_object"},max_tokens:10});f.status===200?(r.jsonMode.status="pass",r.jsonMode.value="Supported",this.addLog("Capabilities","JSON Mode is supported")):(r.jsonMode.status="fail",r.jsonMode.tip="JSON Mode not supported",r.overallStatus=r.overallStatus==="healthy"?"warning":r.overallStatus,this.addLog("Capabilities",`JSON Mode test failed (${f.status})`,"warn")),this.addLog("Capabilities","Testing Structured Outputs (JSON Schema) support"),t?.(`${v("Settings.Ai.DiagItemJsonSchema")}\u2026`);let p=await this.safeRequest(`${i}/chat/completions`,"POST",!0,{model:this.model,messages:[{role:"user",content:"respond with schema"}],response_format:{type:"json_schema",json_schema:{name:"test",schema:{type:"object",properties:{ok:{type:"boolean"}},required:["ok"],additionalProperties:!1},strict:!0}},max_tokens:10});p.status===200?(r.jsonSchema.status="pass",r.jsonSchema.value="Supported",this.addLog("Capabilities","Structured Outputs (JSON Schema) is supported")):(r.jsonSchema.status="fail",r.jsonSchema.tip=v("Settings.Ai.DiagTipModelFallback"),r.overallStatus="degraded",this.addLog("Capabilities",`Structured Outputs test failed (${p.status})`,"warn")),t?.(v("Settings.Ai.DiagStageTranslation")),this.addLog("Translation","Running translation simulation with real prompt");let m={model:this.model,messages:[{role:"system",content:'You are a translator. Translate the input JSON array. Each object has "i" (id, keep unchanged) and "s" (source text). Return a JSON array where each object has "i" and "t" (translated text). Target language: \u7B80\u4F53\u4E2D\u6587. ONLY return the JSON array, no other text.'},{role:"user",content:JSON.stringify([{i:1,s:"Settings"},{i:2,s:"Cancel"}])}],max_tokens:100,temperature:.3};this.responseFormat==="json_object"?m.response_format={type:"json_object"}:this.responseFormat==="json_schema"&&(m.response_format={type:"json_schema",json_schema:{name:"translation_result",schema:{type:"object",properties:{items:{type:"array",items:{type:"object",properties:{i:{type:"number"},t:{type:"string"}},required:["i","t"],additionalProperties:!1}}},required:["items"],additionalProperties:!1},strict:!0}});let h=Date.now();try{let x=await this.safeRequest(`${i}/chat/completions`,"POST",!0,m),g=Date.now()-h;if(r.translation.latency=g,x.status!==200)r.translation.status="fail",r.translation.tip=`API \u8FD4\u56DE ${x.status}`,r.overallStatus="failed",this.addLog("Translation",`Translation simulation failed with status ${x.status}`,"error");else{let y=!1;try{let S=(typeof x.json=="object"?x.json:JSON.parse(x.text))?.choices?.[0]?.message?.content;if(S){let w;try{w=JSON.parse(S)}catch{let C=S.match(/```(?:json)?\s*([\s\S]*?)\s*```/);C&&(w=JSON.parse(C[1]))}let E=Array.isArray(w)?w:w?.items?w.items:null;if(E&&Array.isArray(E)&&E.length>0){let C=E.every(_=>typeof _.i=="number"&&typeof _.t=="string"),N=E.some(_=>_.i===1||_.i===2);C&&N&&(y=!0,r.translation.status="pass",r.translation.value=`OK (${g}ms)`,this.addLog("Translation",`Simulation passed: received ${E.length} items in ${g}ms`))}}}catch(b){this.addLog("Translation",`Response parse error: ${b.message}`,"error")}y||(r.translation.status="fail",r.translation.tip=v("Settings.Ai.DiagTipTranslationFail"),r.overallStatus="failed",this.addLog("Translation","Translation simulation returned unparseable or incorrect format","error")),y&&g>this.timeout*.8&&(r.translation.status="warn",r.translation.tip=v("Settings.Ai.DiagTipLatencyWarn"),r.overallStatus=r.overallStatus==="healthy"?"warning":r.overallStatus,this.addLog("Translation",`Latency warning: ${g}ms is close to timeout ${this.timeout}ms`,"warn"))}}catch(x){r.translation.status="fail",r.translation.latency=Date.now()-h,r.translation.tip=x.message?.includes("timeout")?v("Settings.Ai.TestFailTimeout"):v("Settings.Ai.DiagTipTranslationFail"),r.overallStatus="failed",this.addLog("Translation",`Translation simulation error: ${x.message}`,"error")}return r}async safeRequest(t,r,n=!1,a){let i={};n&&(i.Authorization=`Bearer ${this.key}`),a&&(i["Content-Type"]="application/json");try{return await(0,H8.requestUrl)({url:t,method:r,headers:i,body:a?JSON.stringify(a):void 0,throw:!1})}catch(s){if(s.message?.includes("timeout"))return{status:408};throw s}}};var u0=require("obsidian");$r();var u1=class extends u0.Modal{constructor(r,n){super(r);this.report=n}onOpen(){let{contentEl:r}=this;r.empty(),r.addClass("i18n-diag-modal"),this.addStyles();let n=r.createDiv({cls:"diag-overview"}),a={healthy:{icon:"check-circle-2",label:v("Settings.Ai.DiagStatusHealthy"),cls:"diag-healthy"},warning:{icon:"alert-triangle",label:v("Settings.Ai.DiagStatusWarning"),cls:"diag-warning"},degraded:{icon:"alert-triangle",label:v("Settings.Ai.DiagStatusWarning"),cls:"diag-warning"},failed:{icon:"x-circle",label:v("Settings.Ai.DiagStatusFailed"),cls:"diag-failed"}},i=a[this.report.overallStatus]||a.failed,s=n.createDiv({cls:`diag-overview-icon ${i.cls}`});(0,u0.setIcon)(s,i.icon);let o=n.createDiv({cls:"diag-overview-info"});o.createDiv({text:v("Settings.Ai.DiagModalTitle"),cls:"diag-overview-title"}),o.createDiv({text:i.label,cls:`diag-overview-badge ${i.cls}`});let l=[{label:v("Settings.Ai.DiagItemEndpoint"),item:this.report.endpoint},{label:v("Settings.Ai.DiagItemAuth"),item:this.report.auth},{label:v("Settings.Ai.DiagItemModel"),item:this.report.model},{label:v("Settings.Ai.DiagItemSystemRole"),item:this.report.systemRole},{label:v("Settings.Ai.DiagItemJsonMode"),item:this.report.jsonMode},{label:v("Settings.Ai.DiagItemJsonSchema"),item:this.report.jsonSchema},{label:v("Settings.Ai.DiagItemTranslation"),item:this.report.translation}],c=r.createDiv({cls:"diag-list"});for(let{label:p,item:m}of l)this.renderRow(c,p,m);let u=this.getRecommendations();if(u.length>0){let p=r.createDiv({cls:"diag-recs"}),m=p.createDiv({cls:"diag-recs-header"}),h=m.createDiv({cls:"diag-recs-icon"});(0,u0.setIcon)(h,"lightbulb"),m.createSpan({text:v("Settings.Ai.DiagRecommendation")});for(let x of u)p.createDiv({text:x,cls:"diag-rec-item"})}r.createDiv({cls:"diag-footer"}).createEl("button",{text:"\u5173\u95ED",cls:"mod-cta"}).addEventListener("click",()=>this.close())}renderRow(r,n,a){let i=r.createDiv({cls:"diag-row"}),s=a.status==="pass"?"diag-dot-pass":a.status==="fail"?"diag-dot-fail":a.status==="warn"?"diag-dot-warn":"diag-dot-na";i.createDiv({cls:`diag-dot ${s}`}),i.createDiv({text:n,cls:"diag-row-label"});let o=i.createDiv({cls:"diag-row-right"});a.latency!==void 0&&o.createSpan({text:`${a.latency}ms`,cls:"diag-latency-tag"});let l=a.status==="pass"?"PASS":a.status==="fail"?"FAIL":a.status==="warn"?"WARN":"\u2014";o.createSpan({text:l,cls:`diag-status-label diag-sl-${a.status}`}),a.tip&&r.createDiv({cls:"diag-row-tip"}).createSpan({text:a.tip})}getRecommendations(){let r=[];return this.report.endpoint.status==="fail"&&r.push(v("Settings.Ai.DiagTipUrlV1")),this.report.endpoint.status==="warn"&&r.push(this.report.endpoint.tip||v("Settings.Ai.DiagTipUrlV1")),this.report.auth.status==="fail"&&r.push(v("Settings.Ai.TestFail401")),this.report.jsonSchema.status==="fail"&&r.push(v("Settings.Ai.DiagTipModelFallback")),this.report.auth.status==="pass"&&this.report.model.status==="fail"&&r.push(v("Settings.Ai.TestFailModel")),r}addStyles(){if(document.getElementById("i18n-diag-styles"))return;let r=document.createElement("style");r.id="i18n-diag-styles",r.textContent=`
.i18n-diag-modal { padding: 0; }
/* \u2500\u2500 \u603B\u89C8\u5361\u7247 \u2500\u2500 */
.diag-overview {
display: flex; align-items: center; gap: 16px;
padding: 20px; margin-bottom: 16px;
border-radius: 12px;
background: var(--background-secondary);
}
.diag-overview-icon {
width: 48px; height: 48px; border-radius: 50%;
display: flex; align-items: center; justify-content: center;
flex-shrink: 0;
}
.diag-overview-icon.diag-healthy { background: rgba(45,201,55,0.15); color: #2dc937; }
.diag-overview-icon.diag-warning { background: rgba(231,180,0,0.15); color: #dbad00; }
.diag-overview-icon.diag-failed { background: rgba(204,50,50,0.15); color: #cc3232; }
.diag-overview-icon svg { width: 24px; height: 24px; }
.diag-overview-title {
font-size: 1.1em; font-weight: 600;
color: var(--text-normal); margin-bottom: 4px;
}
.diag-overview-badge {
display: inline-block; font-size: 0.8em; font-weight: 600;
padding: 2px 10px; border-radius: 99px;
}
.diag-overview-badge.diag-healthy { background: rgba(45,201,55,0.15); color: #2dc937; }
.diag-overview-badge.diag-warning { background: rgba(231,180,0,0.15); color: #dbad00; }
.diag-overview-badge.diag-failed { background: rgba(204,50,50,0.15); color: #cc3232; }
/* \u2500\u2500 \u68C0\u6D4B\u9879\u5217\u8868 \u2500\u2500 */
.diag-list { display: flex; flex-direction: column; gap: 2px; margin-bottom: 16px; }
.diag-row {
display: flex; align-items: center; gap: 12px;
padding: 10px 14px; border-radius: 8px;
background: var(--background-secondary);
transition: background 0.15s;
}
.diag-row:hover { background: var(--background-modifier-hover); }
.diag-dot {
width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.diag-dot-pass { background: #2dc937; box-shadow: 0 0 6px rgba(45,201,55,0.4); }
.diag-dot-fail { background: #cc3232; box-shadow: 0 0 6px rgba(204,50,50,0.4); }
.diag-dot-warn { background: #dbad00; box-shadow: 0 0 6px rgba(231,180,0,0.4); }
.diag-dot-na { background: var(--text-faint); }
.diag-row-label { flex: 1; font-size: 0.92em; color: var(--text-normal); }
.diag-row-right { display: flex; align-items: center; gap: 8px; }
.diag-latency-tag {
font-size: 0.78em; font-family: var(--font-monospace);
color: var(--text-muted); background: var(--background-primary);
padding: 1px 6px; border-radius: 4px;
}
.diag-status-label {
font-size: 0.75em; font-weight: 700; font-family: var(--font-monospace);
padding: 2px 8px; border-radius: 4px; letter-spacing: 0.5px;
}
.diag-sl-pass { background: rgba(45,201,55,0.12); color: #2dc937; }
.diag-sl-fail { background: rgba(204,50,50,0.12); color: #cc3232; }
.diag-sl-warn { background: rgba(231,180,0,0.12); color: #dbad00; }
.diag-sl-na { background: var(--background-modifier-border); color: var(--text-faint); }
.diag-row-tip {
padding: 6px 14px 6px 34px;
font-size: 0.82em; color: var(--text-muted);
line-height: 1.5;
}
/* \u2500\u2500 \u5EFA\u8BAE\u533A \u2500\u2500 */
.diag-recs {
border-radius: 8px; padding: 14px;
background: rgba(231,180,0,0.06);
border: 1px solid rgba(231,180,0,0.15);
margin-bottom: 16px;
}
.diag-recs-header {
display: flex; align-items: center; gap: 8px;
font-weight: 600; font-size: 0.9em;
color: #dbad00; margin-bottom: 10px;
}
.diag-recs-icon svg { width: 16px; height: 16px; }
.diag-rec-item {
font-size: 0.85em; color: var(--text-normal);
padding: 4px 0 4px 24px; position: relative; line-height: 1.5;
}
.diag-rec-item::before {
content: '\u2192'; position: absolute; left: 6px;
color: var(--text-muted);
}
/* \u2500\u2500 \u9875\u811A \u2500\u2500 */
.diag-footer {
display: flex; justify-content: flex-end;
padding-top: 8px;
border-top: 1px solid var(--background-modifier-border);
}
`,document.head.appendChild(r)}onClose(){this.contentEl.empty()}};var TI=require("obsidian");$t();$t();var ate={"gpt-4o":{input:5e-6,output:15e-6},"gpt-4o-mini":{input:15e-8,output:6e-7},"gpt-4-turbo":{input:1e-5,output:3e-5},"gemini-2.5-flash":{input:0,output:0},"gemini-2.5-pro":{input:125e-8,output:1e-5},"gemini-2.0-flash":{input:0,output:0},"gemini-2.0-flash-lite":{input:0,output:0},ollama:{input:0,output:0},default:{input:5e-6,output:15e-6}},oXe=7.3;function ite(e){if(!e)return 0;let t=0,r=e.match(/[\u4e00-\u9fa5]/g)||[],n=e.length-r.length;return t+=r.length*1.5,t+=n*.25,Math.ceil(t)}function ste(e,t){let r=ite(t);for(let n of e){let a=JSON.stringify(n);r+=ite(a)+10}return r}function ote(e,t,r){if(r!==void 0&&r>0)return e*(r/1e6);let n=ate[t]||ate.default;return e*n.input*oXe}var Np=class{getActiveProfile(){let t=Ue.getState().i18n.settings,r=t.llmApi,n=Wt[r];if(!n)return null;let a=`llm${n.labelKey}Profiles`,i=`llm${n.labelKey}ActiveProfileId`,s=t[a],o=t[i];return s?.find(l=>l.id===o)||s?.[0]}async regexTranslate(t,r,n){return this.executeParallelBatches(t,(a,i)=>this.callRegexTranslationAPI(a,i),r,n)}async astTranslate(t,r,n){return this.executeParallelBatches(t,(a,i)=>this.callAstTranslationAPI(a,i),r,n)}async themeTranslate(t,r,n){return this.executeParallelBatches(t,(a,i)=>this.callThemeTranslationAPI(a,i),r,n)}estimateTokens(t,r){let n=Ue.getState().i18n.settings,a="",i=n.llmLanguage,s=n.llmStyle;if(r==="regex"){let f=n.llmRegexPrompt||a0;a=Q_(f,i,s)}else if(r==="ast"){let f=n.llmAstPrompt||i0;a=eL(f,i,s)}else if(r==="theme"){let f=n.llmThemePrompt||s0;a=tL(f,i,s)}let o=ste(t,a),l=this.getActiveProfile(),c=l?.useCustomPrice??n.llmUseCustomPrice,u=l?.priceInput??n.llmPriceInputCustom,d=ote(o,this.getModelName(),c?u:void 0);return{tokens:o,cost:d}}getModelName(){let t=this.getActiveProfile();if(t?.model)return t.model;let r=Ue.getState().i18n.settings,n=Wt[r.llmApi];return r[n?.modelField]||n?.defaultModel||"gpt-4o-mini"}getConcurrencyLimit(){return Ue.getState().i18n.settings.llmConcurrencyLimit||3}getTimeout(){return Ue.getState().i18n.settings.llmTimeout||6e4}validateInput(t){if(!Array.isArray(t)||t.length===0)throw new Error("\u7FFB\u8BD1\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A\uFF0C\u4E14\u5FC5\u987B\u4E3A\u6570\u7EC4\u683C\u5F0F")}splitIntoBatches(t){if(t.length===0)return[];let r=Number.isFinite(Ue.getState().i18n.settings.llmBatchSize)?Math.max(1,Math.floor(Ue.getState().i18n.settings.llmBatchSize)):1,n=[];for(let a=0;a<t.length;a+=r)n.push(t.slice(a,a+r));return n}async executeParallelBatches(t,r,n,a){this.validateInput(t);let i=this.splitIntoBatches(t),s=i.length,o=new Array(s),l=this.getConcurrencyLimit(),c=0,u=0,d=async()=>{for(;c<s;){if(a?.aborted)return;let p=c++,m=i[p];try{let h=await r(m,a);u++,await n(h,u,s),o[p]=h}catch(h){h.message!=="\u7FFB\u8BD1\u4EFB\u52A1\u5DF2\u53D6\u6D88"&&Ue.getState().i18n.notice.error(`AI\u7FFB\u8BD1\u6279\u6B21 ${p+1} \u5931\u8D25: ${h.message}`),u++,o[p]=m.map(x=>({...x,target:x.source||""}))}}},f=Array.from({length:Math.min(l,s)},()=>d());if(await Promise.all(f),a?.aborted)throw new Error("\u7FFB\u8BD1\u4EFB\u52A1\u5DF2\u53D6\u6D88");return[].concat(...o)}getRegexSystemPrompt(){let t=Ue.getState().i18n.settings,r=t.llmRegexPrompt||a0;return Q_(r,t.llmLanguage,t.llmStyle)}getAstSystemPrompt(){let t=Ue.getState().i18n.settings,r=t.llmAstPrompt||i0;return eL(r,t.llmLanguage,t.llmStyle)}getThemeSystemPrompt(){let t=Ue.getState().i18n.settings,r=t.llmThemePrompt||s0;return tL(r,t.llmLanguage,t.llmStyle)}mapResultsBack(t,r){return t.map(n=>{let a=r.find(s=>s.i===n.id),i=a?a.t:void 0;return(!i||i.trim()===""||i.trim()==="\u7A7A")&&(i=n.target||n.source),{...n,target:i}})}async callFixAPI(t,r,n,a,i){throw new Error("fixTranslation is not implemented for this provider")}getFixSystemPrompt(){let t=Ue.getState().i18n.settings;return q8(t.llmLanguage)}async fixTranslation(t,r,n){let a=this.getFixSystemPrompt();return this.callFixAPI(t,r,n,a)}};var _T="http://localhost:11434",jh=class extends Np{constructor(){super()}getModelName(){return this.getActiveProfile()?.model||Ue.getState().i18n.settings.llmOllamaModel||"qwen2.5"}getBaseUrl(){return(this.getActiveProfile()?.url||Ue.getState().i18n.settings.llmOllamaUrl||_T).replace(/\/+$/,"")}async callOllama(t,r,n,a=2){let i=this.getBaseUrl(),s=this.getModelName(),o=`${i}/v1/chat/completions`,l={model:s,messages:[{role:"system",content:r},{role:"user",content:JSON.stringify(t)}],temperature:.3,response_format:{type:"json_object"},stream:!1},c=0,u=null;for(;c<=a;){let d=this.getTimeout(),f={id:null};try{if(n?.aborted)throw new Error("\u7FFB\u8BD1\u4EFB\u52A1\u5DF2\u53D6\u6D88");let p=Math.max(d,12e4),m=(0,TI.requestUrl)({url:o,method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(l),throw:!1}),h=new Promise((S,w)=>{f.id=setTimeout(()=>w(new Error(`\u8BF7\u6C42\u8D85\u65F6 (${p}ms)`)),p)}),x=await Promise.race([m,h]);if(x.status!==200){let S=x.json?.error?.message||`HTTP ${x.status}`;throw new Error(`Ollama API \u9519\u8BEF: ${S}`)}let y=x.json?.choices?.[0]?.message?.content;if(!y)throw new Error("Ollama \u8FD4\u56DE\u5185\u5BB9\u4E3A\u7A7A");let b;try{b=JSON.parse(y)}catch{let S=y.match(/```(?:json)?\s*([\s\S]*?)\s*```/);if(S)b=JSON.parse(S[1]);else throw new Error("Ollama \u8FD4\u56DE JSON \u89E3\u6790\u5931\u8D25")}if(!Array.isArray(b))if(b?.items&&Array.isArray(b.items))b=b.items;else throw new Error("Ollama \u8FD4\u56DE\u6570\u636E\u4E0D\u662F\u6570\u7EC4\u683C\u5F0F");return b}catch(p){if(n?.aborted||p.message==="\u7FFB\u8BD1\u4EFB\u52A1\u5DF2\u53D6\u6D88")throw new Error("\u7FFB\u8BD1\u4EFB\u52A1\u5DF2\u53D6\u6D88");u=p,c++,c<=a&&await new Promise(h=>setTimeout(h,1e3*c))}finally{f.id&&clearTimeout(f.id)}}throw new Error(u?.message||"\u672A\u77E5\u9519\u8BEF")}async callRegexTranslationAPI(t,r){let n=this.getRegexSystemPrompt(),a=t.map(s=>({i:s.id,s:s.source})),i=await this.callOllama(a,n,r);return this.mapResultsBack(t,i)}async callAstTranslationAPI(t,r){let n=this.getAstSystemPrompt(),a=t.map(s=>({i:s.id,s:s.source,y:s.type,n:s.name})),i=await this.callOllama(a,n,r);return this.mapResultsBack(t,i)}async callThemeTranslationAPI(t,r){let n=this.getThemeSystemPrompt(),a=t.map(s=>({i:s.id,s:s.source,y:s.type})),i=await this.callOllama(a,n,r);return this.mapResultsBack(t,i)}static async fetchModels(t){let r=(t||_T).replace(/\/+$/,"");try{let n=await(0,TI.requestUrl)({url:`${r}/api/tags`,method:"GET",throw:!1});return n.status===200&&n.json?.models?n.json.models.map(a=>a.name||a.model):[]}catch{return[]}}async callFixAPI(t,r,n,a,i){let s=this.getBaseUrl(),o=this.getModelName(),l=`${s}/v1/chat/completions`,c=`Source: ${t}
Broken Translation: ${r}
Error: ${n}
Please return ONLY the fixed translation string.`,d=await(0,TI.requestUrl)({url:l,method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:o,messages:[{role:"system",content:a},{role:"user",content:c}],temperature:.2,stream:!1}),throw:!1});if(d.status!==200){let m=d.json?.error?.message||`HTTP ${d.status}`;throw new Error(`Ollama API \u9519\u8BEF: ${m}`)}let f=d.json?.choices?.[0]?.message?.content;if(!f||f.trim()==="")throw new Error("AI \u8FD4\u56DE\u7684\u4FEE\u590D\u7ED3\u679C\u4E3A\u7A7A");let p=f.trim();return p.startsWith('"')&&p.endsWith('"')&&(p=p.slice(1,-1)),p.startsWith("'")&&p.endsWith("'")&&(p=p.slice(1,-1)),p}};var Gx=class extends Ki{main(){let r=this.settings.llmApi;this.config=Wt[r],this.config&&(this.profileUI(),this.configUI(),r===1&&this.openaiSpecialUI(),this.priceUI(),this.testUI(),this.promptUI())}get activeProfile(){let r=`llm${this.config.labelKey}Profiles`,n=`llm${this.config.labelKey}ActiveProfileId`,a=this.settings[r],i=this.settings[n];return a?.find(s=>s.id===i)||a?.[0]}profileUI(){let r=`llm${this.config.labelKey}Profiles`,n=`llm${this.config.labelKey}ActiveProfileId`,a=this.settings[r],i=this.settings[n];(!a||a.length===0)&&(a=[{id:"default",name:"Default",url:this.config.baseUrl||"",key:"",model:this.config.defaultModel,useCustomPrice:!1,priceInput:0,priceOutput:0}],this.settings[r]=a,this.settings[n]="default");let s=this.containerEl,o=new Pa.Setting(s).setName(v("Settings.Ai.ProfileSelectTitle")).setDesc(v("Settings.Ai.ProfileSelectDesc")).addDropdown(c=>{a.forEach(u=>c.addOption(u.id,u.name)),c.setValue(i),c.onChange(async u=>{this.settings[n]=u,await this.i18n.saveSettings(),this.settingTab.llmDisplay()})});o.addExtraButton(c=>{c.setIcon("plus").setTooltip(v("Settings.Ai.ProfileAddBtn")).onClick(async()=>{let u=Date.now().toString();a.push({id:u,name:`${v("Settings.Ai.ProfileNamePlaceholder")} ${a.length+1}`,url:this.config.baseUrl||"",key:"",model:this.config.defaultModel,useCustomPrice:!1,priceInput:0,priceOutput:0}),this.settings[n]=u,await this.i18n.saveSettings(),this.settingTab.llmDisplay()})});let l=this.activeProfile;l&&a.length>1&&o.addExtraButton(c=>{c.setIcon("trash").setTooltip(v("Settings.Ai.ProfileDelBtn")).onClick(async()=>{if(confirm(v("Settings.Ai.ProfileDelConfirm"))){let u=a.findIndex(d=>d.id===l.id);a.splice(u,1),this.settings[n]=a[0].id,await this.i18n.saveSettings(),this.settingTab.llmDisplay()}})})}configUI(){let r=this.activeProfile;if(!r)return;let{labelKey:n,models:a,defaultModel:i,id:s}=this.config;new Pa.Setting(this.containerEl).setName(v("Settings.Ai.ProfileNameTitle")).setDesc(v("Settings.Ai.ProfileNameDesc")).addText(l=>{l.setValue(r.name).setPlaceholder(v("Settings.Ai.ProfileNamePlaceholder")).onChange(async c=>{r.name=c.trim(),await this.i18n.saveSettings()}),l.inputEl.addEventListener("blur",()=>this.settingTab.llmDisplay()),l.inputEl.addEventListener("keydown",c=>{c.key==="Enter"&&c.target.blur()})}),new Pa.Setting(this.containerEl).setName(s===3?v("Settings.Ai.OllamaUrlTitle"):v("Settings.Ai.OpenaiUrlTitle")).setDesc(s===3?v("Settings.Ai.OllamaUrlDesc"):v("Settings.Ai.OpenaiUrlDesc")).addText(l=>{l.setValue(r.url||this.config.baseUrl||"").setPlaceholder(this.config.baseUrl||"https://...").onChange(async c=>{r.url=c.trim(),await this.i18n.saveSettings()})}),s!==3&&new Pa.Setting(this.containerEl).setName(v(`Settings.Ai.${n}KeyTitle`)||`${this.config.name} API Key`).setDesc(v("Settings.Ai.OpenaiKeyDescTip")).addText(l=>{l.setValue(r.key||"").setPlaceholder("sk-...").onChange(async c=>{r.key=c.trim(),await this.i18n.saveSettings()}),l.inputEl.setAttribute("type","password")}),this.config.homepage&&new Pa.Setting(this.containerEl).setName(v("Settings.Ai.HomepageBtn")).setDesc(this.config.homepage).addButton(l=>{l.setButtonText(v("Settings.Ai.HomepageBtn")).onClick(()=>window.open(this.config.homepage))});let o=new Pa.Setting(this.containerEl).setName(v("Settings.Ai.ModelTitle")).setDesc(s===3?v("Settings.Ai.OllamaModelDesc"):v(`Settings.Ai.${n}ModelDesc`)||v("Settings.Ai.ModelDesc"));s===3&&o.addButton(l=>{l.setIcon("refresh-cw").setTooltip(v("Settings.Ai.OllamaFetchModelsBtn")).onClick(async()=>{l.setDisabled(!0);try{let c=await jh.fetchModels(r.url||_T);c.length===0?new Pa.Notice(v("Settings.Ai.OllamaNoModels")):(new Pa.Notice(v("Settings.Ai.OllamaModelsLoaded",{count:c.length})),this.settingTab.llmDisplay())}catch{new Pa.Notice(v("Settings.Ai.OllamaFetchFailed"))}finally{l.setDisabled(!1)}})}),o.addDropdown(async l=>{l.addOption("",v("Settings.Ai.ModelSelectPlaceholder"));let c=a;if(s===3)try{c=await jh.fetchModels(r.url||_T)}catch{}c.forEach(u=>l.addOption(u,u)),l.setValue(r.model),l.onChange(async u=>{u&&(r.model=u,await this.i18n.saveSettings(),this.settingTab.llmDisplay())})}),o.addText(l=>{l.setValue(r.model||i).setPlaceholder(s===3?v("Settings.Ai.OllamaModelPlaceholder"):v("Settings.Ai.ModelInputPlaceholder")).onChange(async c=>{r.model=c.trim(),await this.i18n.saveSettings()})})}openaiSpecialUI(){new Pa.Setting(this.containerEl).setName(v("Settings.Ai.ResponseFormatTitle")).setDesc(v("Settings.Ai.ResponseFormatDesc")).addDropdown(r=>{r.addOption("text",v("Settings.Ai.ResponseFormatText")).addOption("json_object",v("Settings.Ai.ResponseFormatJsonObject")).addOption("json_schema",v("Settings.Ai.ResponseFormatJsonSchema")).setValue(this.settings.llmResponseFormat).onChange(async n=>{this.settings.llmResponseFormat=n,await this.i18n.saveSettings()})})}priceUI(){let r=this.activeProfile;r&&(new Pa.Setting(this.containerEl).setName(v("Settings.Ai.PriceHeader")).setHeading(),new Pa.Setting(this.containerEl).setName(v("Settings.Ai.CustomPriceTitle")).setDesc(v("Settings.Ai.CustomPriceDesc")).addToggle(n=>{n.setValue(r.useCustomPrice).onChange(async a=>{r.useCustomPrice=a,await this.i18n.saveSettings(),this.settingTab.llmDisplay()})}),r.useCustomPrice&&(new Pa.Setting(this.containerEl).setName(v("Settings.Ai.PriceInputTitle")).setDesc(v("Settings.Ai.PriceInputDesc")).addText(n=>{n.setValue(r.priceInput?.toString()||"0").onChange(async a=>{r.priceInput=parseFloat(a)||0,await this.i18n.saveSettings()})}),new Pa.Setting(this.containerEl).setName(v("Settings.Ai.PriceOutputTitle")).setDesc(v("Settings.Ai.PriceOutputDesc")).addText(n=>{n.setValue(r.priceOutput?.toString()||"0").onChange(async a=>{r.priceOutput=parseFloat(a)||0,await this.i18n.saveSettings()})})))}testUI(){new Pa.Setting(this.containerEl).setName(v("Settings.Ai.TestHeader")).setHeading(),new Pa.Setting(this.containerEl).setName(v("Settings.Ai.TestTitle")).setDesc(v("Settings.Ai.TestDesc")).addButton(r=>{r.setButtonText(v("Settings.Ai.TestBtn")).setCta().onClick(async()=>{let n=this.activeProfile;if(!n)return;if(!(this.config.id===3)&&!n.key){new Pa.Notice(v("Settings.Ai.TestNoticeMissing"));return}let i=new c1(n.url||this.config.baseUrl||"",n.key,n.model||this.config.defaultModel,this.settings.llmResponseFormat,this.settings.llmTimeout);try{r.setDisabled(!0).setButtonText(v("Settings.Ai.TestLoading"));let s=await i.runDeepDiagnostic(o=>r.setButtonText(o));new u1(this.app,s).open(),r.setButtonText(s.overallStatus==="healthy"?v("Settings.Ai.TestSuccessBtn"):v("Settings.Ai.TestFail")),setTimeout(()=>r.setButtonText(v("Settings.Ai.TestBtn")),3e3)}catch(s){new Pa.Notice(`${v("Settings.Ai.TestFail")}: ${s.message}`),r.setButtonText(v("Settings.Ai.TestFail"))}finally{r.setDisabled(!1)}})})}promptUI(){new Pa.Setting(this.containerEl).setName(v("Settings.Ai.PromptHeader")).setHeading(),[{id:"llmRegexPrompt",name:v("Settings.Ai.RegexPromptTitle"),desc:v("Settings.Ai.RegexPromptDesc"),placeholder:v("Settings.Ai.RegexPromptPlaceholder")},{id:"llmAstPrompt",name:v("Settings.Ai.AstPromptTitle"),desc:v("Settings.Ai.AstPromptDesc"),placeholder:v("Settings.Ai.AstPromptPlaceholder")},{id:"llmThemePrompt",name:v("Settings.Ai.ThemePromptTitle"),desc:v("Settings.Ai.ThemePromptDesc"),placeholder:v("Settings.Ai.ThemePromptPlaceholder")}].forEach(n=>{new Pa.Setting(this.containerEl).setName(n.name).setDesc(n.desc).addTextArea(a=>{a.setValue(this.settings[n.id]||"").setPlaceholder(n.placeholder).onChange(async i=>{this.settings[n.id]=i,await this.i18n.saveSettings()}),a.inputEl.rows=8,a.inputEl.style.width="100%"})})}};var Pc=require("obsidian");$r();var LT=class extends Ki{main(){let{containerEl:t}=this;t.empty(),new Pc.Setting(t).setName(v("Settings.Re.ParamsHeader")).setHeading(),new Pc.Setting(t).setName(v("Settings.Re.FlagTitle")).setDesc(v("Settings.Re.FlagDesc")).addText(n=>n.setValue(this.settings.reFlags).setPlaceholder(v("Settings.Re.FlagPlaceholder")).onChange(async a=>{this.settings.reFlags=a,await this.i18n.saveSettings()})),new Pc.Setting(t).setName(v("Settings.Re.LenTitle")).setDesc(v("Settings.Re.LenDesc")).addSlider(n=>n.setDynamicTooltip().setLimits(0,3e3,100).setValue(this.settings.reLength).onChange(async a=>{this.settings.reLength=a,await this.i18n.saveSettings()})),new Pc.Setting(t).setName(v("Settings.Re.DataHeader")).setHeading(),new Pc.Setting(t).setName(v("Settings.Re.DataEditTitle")).setDesc(v("Settings.Re.DataEditDesc")).addTextArea(n=>{n.setValue((this.settings.reDatas||[]).join(`
`)).setPlaceholder(v("Settings.Re.DataPlaceholder")).onChange(async a=>{this.settings.reDatas=a.split(`
`).map(i=>i.trim()).filter(i=>i!==""),await this.i18n.saveSettings()}),n.inputEl.rows=10,n.inputEl.style.width="100%"}),new Pc.Setting(t).setName(v("Settings.Re.RegexHeader")).setHeading(),new Pc.Setting(t).setName(v("Settings.Re.RejectReTitle")).setDesc(v("Settings.Re.RejectReDesc")).addTextArea(n=>{n.setValue((this.settings.reRejectRe||[]).join(`
`)).setPlaceholder(v("Settings.Re.RejectPlaceholder")).onChange(async a=>{this.settings.reRejectRe=a.split(`
`).map(i=>i.trim()).filter(i=>i!==""),await this.i18n.saveSettings()}),n.inputEl.rows=6,n.inputEl.style.width="100%"}),new Pc.Setting(t).setName(v("Settings.Re.ValidReTitle")).setDesc(v("Settings.Re.ValidReDesc")).addTextArea(n=>{n.setValue((this.settings.reValidRe||[]).join(`
`)).setPlaceholder(v("Settings.Re.ValidPlaceholder")).onChange(async a=>{this.settings.reValidRe=a.split(`
`).map(i=>i.trim()).filter(i=>i!==""),await this.i18n.saveSettings()}),n.inputEl.rows=6,n.inputEl.style.width="100%"}),new Pc.Setting(t).setName(v("Settings.Re.PromptHeader")).setHeading(),new Pc.Setting(t).setName(v("Settings.Re.PromptTitle")).setDesc(v("Settings.Re.PromptDesc")).addTextArea(n=>{n.setValue(this.settings.llmRegexPrompt||"").setPlaceholder(v("Settings.Re.PromptPlaceholder")).onChange(async a=>{this.settings.llmRegexPrompt=a,await this.i18n.saveSettings()}),n.inputEl.rows=8,n.inputEl.addClass("i18n-settings-textarea"),n.inputEl.style.width="100%"})}};var wu=require("obsidian");$r();var RT=class extends Ki{main(){let{containerEl:t}=this;t.empty(),new wu.Setting(t).setName(v("Settings.Ast.ConfigHeader")).setHeading(),new wu.Setting(t).setName(v("Settings.Ast.AssignTitle")).setDesc(v("Settings.Ast.AssignDesc")).addTextArea(n=>{n.setValue((this.settings.astAssignments||[]).join(`
`)).setPlaceholder(v("Settings.Ast.AssignPlaceholder")).onChange(async a=>{this.settings.astAssignments=a.split(`
`).map(i=>i.trim()).filter(i=>i!==""),await this.i18n.saveSettings()}),n.inputEl.rows=3,n.inputEl.style.width="100%"}),new wu.Setting(t).setName(v("Settings.Ast.FuncTitle")).setDesc(v("Settings.Ast.FuncDesc")).addTextArea(n=>{n.setValue((this.settings.astFunctions||[]).join(`
`)).setPlaceholder(v("Settings.Ast.FuncPlaceholder")).onChange(async a=>{this.settings.astFunctions=a.split(`
`).map(i=>i.trim()).filter(i=>i!==""),await this.i18n.saveSettings()}),n.inputEl.rows=4,n.inputEl.style.width="100%"}),new wu.Setting(t).setName(v("Settings.Ast.KeyTitle")).setDesc(v("Settings.Ast.KeyDesc")).addTextArea(n=>{n.setValue((this.settings.astKeys||[]).join(`
`)).setPlaceholder(v("Settings.Ast.KeyPlaceholder")).onChange(async a=>{this.settings.astKeys=a.split(`
`).map(i=>i.trim()).filter(i=>i!==""),await this.i18n.saveSettings()}),n.inputEl.rows=4,n.inputEl.style.width="100%"}),new wu.Setting(t).setName(v("Settings.Ast.RegexHeader")).setHeading(),new wu.Setting(t).setName(v("Settings.Ast.RejectReTitle")).setDesc(v("Settings.Ast.RejectReDesc")).addTextArea(n=>{n.setValue((this.settings.astRejectRe||[]).join(`
`)).setPlaceholder(v("Settings.Ast.RejectPlaceholder")).onChange(async a=>{this.settings.astRejectRe=a.split(`
`).map(i=>i.trim()).filter(i=>i!==""),await this.i18n.saveSettings()}),n.inputEl.rows=6,n.inputEl.style.width="100%"}),new wu.Setting(t).setName(v("Settings.Ast.ValidReTitle")).setDesc(v("Settings.Ast.ValidReDesc")).addTextArea(n=>{n.setValue((this.settings.astValidRe||[]).join(`
`)).setPlaceholder(v("Settings.Ast.ValidPlaceholder")).onChange(async a=>{this.settings.astValidRe=a.split(`
`).map(i=>i.trim()).filter(i=>i!==""),await this.i18n.saveSettings()}),n.inputEl.rows=3,n.inputEl.style.width="100%"}),new wu.Setting(t).setName(v("Settings.Ast.PromptHeader")).setHeading(),new wu.Setting(t).setName(v("Settings.Ast.PromptTitle")).setDesc(v("Settings.Ast.PromptDesc")).addTextArea(n=>{n.setValue(this.settings.llmAstPrompt||"").setPlaceholder(v("Settings.Ast.PromptPlaceholder")).onChange(async a=>{this.settings.llmAstPrompt=a,await this.i18n.saveSettings()}),n.inputEl.rows=8,n.inputEl.addClass("i18n-settings-textarea"),n.inputEl.style.width="100%"})}};var Cu=require("obsidian");$r();var wI=require("obsidian");$r();async function Jn(e,t=1e4){return Promise.race([(0,wI.requestUrl)(e),new Promise((r,n)=>setTimeout(()=>{let a=v("Settings.Basis.GithubApiTimeoutHint")||`\u8BF7\u6C42\u8D85\u65F6 (>${t}ms)`;n(new Error(a))},t))])}var Kx=class{constructor(t){this.owner="eondrcode";this.repo="obsidian-i18n-resources";this.i18n=t,this.settings=this.i18n.settings}get userRepo(){return this.settings.shareRepo||""}wrapProxyUrl(t){let r=this.settings.githubProxyUrl;return r&&t.includes("raw.githubusercontent.com")?t.startsWith(r)?t:r.includes("jsdelivr.net")?t.replace("https://raw.githubusercontent.com/",r).replace(/gh\/([^/]+)\/([^/]+)\/([^/]+)\//,"gh/$1/$2@$3/"):r.includes("statically.io")?t.replace("https://raw.githubusercontent.com/",r):(r.endsWith("/")?r:r+"/")+t:t}get token(){return this.settings.shareToken}authHeaders(){let t={Accept:"application/vnd.github.v3+json"};return this.token&&(t.Authorization=`token ${this.token}`),t}wrapError(t){let r=!!(t?.status===403&&(t?.text?.includes("rate limit")||t?.json?.message?.includes("rate limit"))),n=t?.message||String(t);return(n.includes("fetch failed")||n.includes("Network Error")||n.includes("net::ERR"))&&new wI.Notice(v("Settings.Basis.GithubApiTimeoutHint"),1e4),{state:!1,data:t,isRateLimit:r}}async getUser(){try{let t={url:"https://api.github.com/user",method:"GET",headers:this.authHeaders()},r=await Jn(t),a=(r.headers["x-oauth-scopes"]||"").split(",").map(i=>i.trim()).filter(Boolean);return{state:!0,data:r.json,scopes:a}}catch(t){return this.wrapError(t)}}async checkRepoExists(t,r){try{let n={url:`https://api.github.com/repos/${t}/${r}`,method:"GET",headers:this.authHeaders()};return{state:!0,data:(await Jn(n)).json}}catch(n){return{state:!1,data:n}}}async getRepoInfo(t,r){try{let n={url:`https://api.github.com/repos/${t}/${r}`,method:"GET",headers:this.authHeaders()};return{state:!0,data:(await Jn(n)).json}}catch(n){return{state:!1,data:n}}}async getLatestRelease(t,r){try{let n={url:`https://api.github.com/repos/${t}/${r}/releases/latest`,method:"GET",headers:this.authHeaders()};return{state:!0,data:(await Jn(n)).json}}catch(n){return{state:!1,data:n}}}async createRepo(t){try{let r={url:"https://api.github.com/user/repos",method:"POST",headers:{...this.authHeaders(),"Content-Type":"application/json"},body:JSON.stringify({name:t,description:"My Obsidian plugin translations (created by obsidian-i18n)",private:!1,auto_init:!0})};return{state:!0,data:(await Jn(r)).json}}catch(r){return{state:!1,data:r}}}async initRepoStructure(t,r){try{if((await this.getFileContent(t,r,"metadata.json")).state)return{state:!0,data:"already initialized"};let a=Buffer.from("[]").toString("base64");return await this.uploadFile(t,r,"metadata.json",a,"Initialize metadata.json")}catch(n){return{state:!1,data:n}}}async getFileContent(t,r,n,a){try{let i=`https://api.github.com/repos/${t}/${r}/contents/${n}`,s=i.includes("?")?"&":"?";i+=`${s}t=${Date.now()}`,a&&(i+=`&ref=${a}`);let o={url:i,method:"GET",headers:this.authHeaders(),throw:!1},l=await Jn(o);return l.status>=400?{state:!1,data:l.json||l.text,status:l.status}:{state:!0,data:l.json,status:l.status}}catch(i){return{state:!1,data:i,status:500}}}async getFileContentWithFallback(t,r,n,a="main"){try{let i=await this.getFileContent(t,r,n,a);if(i.state&&i.data){if(i.data.content){let s=Buffer.from(i.data.content,"base64").toString("utf-8");try{return{state:!0,data:JSON.parse(s),status:i.status}}catch{return{state:!0,data:s,status:i.status}}}if(i.data.download_url){let s=await Jn({url:i.data.download_url,method:"GET"});return{state:!0,data:s.json||s.text,status:s.status}}}else{if(i.status===404)return i;let s=i.status===403&&(i.data?.message?.includes("rate limit")||i.data?.text?.includes("rate limit"))}}catch{}try{let i=await this.getRawContent(t,r,n,a);if(i.state&&i.data)return{state:!0,data:i.data};if(i.data?.status===403||i.data?.status===429)return{state:!1,data:i.data,isRateLimit:!0}}catch{}return{state:!1,data:"Cannot fetch file content"}}async uploadFile(t,r,n,a,i,s="main",o){try{if(!this.token)return{state:!1,data:v("Settings.Basis.GithubApiTokenMissing")};let l=o||"";if(!l)try{let f={url:`https://api.github.com/repos/${t}/${r}/contents/${n}?ref=${s}&t=${Date.now()}`,method:"GET",headers:this.authHeaders(),throw:!1},p=await Jn(f);p.status===200&&(l=p.json.sha)}catch{}let c={message:i,content:a,branch:s};l&&(c.sha=l);let u={url:`https://api.github.com/repos/${t}/${r}/contents/${n}`,method:"PUT",headers:{...this.authHeaders(),"Content-Type":"application/json"},body:JSON.stringify(c),throw:!1},d=await Jn(u);if(d.status>=400){let f=d.json?.message||d.text||`HTTP ${d.status}`;return{state:!1,data:new Error(`GitHub \u62D2\u7EDD\u4E86\u4E0A\u4F20 (Status ${d.status}): ${f}`)}}return{state:!0,data:d.json}}catch(l){return{state:!1,data:l}}}async deleteFile(t,r,n,a,i="main"){try{if(!this.token)return{state:!1,data:v("Settings.Basis.GithubApiTokenMissing")};let s="";try{let c={url:`https://api.github.com/repos/${t}/${r}/contents/${n}?ref=${i}&t=${Date.now()}`,method:"GET",headers:this.authHeaders(),throw:!1},u=await Jn(c);if(u.status===200)s=u.json.sha;else return{state:!1,data:v("Settings.Basis.GithubApiFileNotFound")}}catch{return{state:!1,data:v("Settings.Basis.GithubApiCheckFailed")}}let o={url:`https://api.github.com/repos/${t}/${r}/contents/${n}`,method:"DELETE",headers:{...this.authHeaders(),"Content-Type":"application/json"},body:JSON.stringify({message:a,sha:s,branch:i}),throw:!1},l=await Jn(o);if(l.status>=400){let c=l.json?.message||l.text||`HTTP ${l.status}`;return{state:!1,data:new Error(`GitHub \u62D2\u7EDD\u4E86\u5220\u9664 (Status ${l.status}): ${c}`)}}return{state:!0,data:l.json}}catch(s){return{state:!1,data:s}}}async getTranslation(t,r,n){try{let a=`https://raw.githubusercontent.com/${this.owner}/${this.repo}/master/translation/dict/${r}/zh-cn/${n}.json`,i={url:this.wrapProxyUrl(a),method:"GET"};return{state:!0,data:(await Jn(i)).json}}catch{return{state:!1,data:""}}}async getDirectory(t){try{let r=`https://raw.githubusercontent.com/${this.owner}/${this.repo}/master/translation/directory/zh-cn.json`,n={url:this.wrapProxyUrl(r),method:"GET"};return{state:!0,data:(await Jn(n)).json}}catch(r){return{state:!1,data:r}}}async getRawContent(t,r,n,a="main"){try{let i=`https://raw.githubusercontent.com/${t}/${r}/${a}/${n}?t=${Date.now()}`,s={url:this.wrapProxyUrl(i),method:"GET"};return{state:!0,data:(await Jn(s)).json}}catch(i){return{state:!1,data:i}}}async downloadAsset(t){try{let n=await Jn({url:t,method:"GET"});return{state:!0,data:n.arrayBuffer||n.text}}catch(r){return{state:!1,data:r}}}async checkHasOpenRegistrationIssue(t,r,n,a){try{if(!this.token)return{state:!1,data:"\u8BF7\u5148\u5728\u8BBE\u7F6E\u4E2D\u914D\u7F6E GitHub Token",hasOpenIssue:!1};let s={url:`https://api.github.com/repos/${t}/${r}/issues?state=open&creator=${encodeURIComponent(a)}&t=${Date.now()}`,method:"GET",headers:this.authHeaders()},l=(await Jn(s)).json,c=Array.isArray(l)&&l.some(u=>u.title.includes(n)||u.body&&u.body.includes(n));return{state:!0,data:l,hasOpenIssue:c}}catch(i){return{state:!1,data:i,hasOpenIssue:!1}}}async postIssue(t,r,n,a,i){try{if(!this.token)return{state:!1,data:v("Settings.Basis.GithubApiTokenMissing")};let s=a||this.owner,o=i||this.repo,l={url:`https://api.github.com/repos/${s}/${o}/issues`,method:"POST",headers:{...this.authHeaders(),"Content-Type":"application/json"},body:JSON.stringify({title:t,body:r,labels:n?[n]:[]})};return{state:!0,data:(await Jn(l)).json}}catch(s){return{state:!1,data:s}}}async getFileCommits(t,r,n,a=1,i=20){try{let s={url:`https://api.github.com/repos/${t}/${r}/commits?path=${encodeURIComponent(n)}&page=${a}&per_page=${i}&t=${Date.now()}`,method:"GET",headers:this.authHeaders()};return{state:!0,data:(await Jn(s)).json}}catch(s){return{state:!1,data:s}}}async getFileAtCommit(t,r,n,a){try{let i={url:`https://api.github.com/repos/${t}/${r}/contents/${n}?ref=${a}&t=${Date.now()}`,method:"GET",headers:this.authHeaders()};return{state:!0,data:(await Jn(i)).json}}catch(i){return{state:!1,data:i}}}async getRepoTree(t,r,n="main",a=!0){try{let i={url:`https://api.github.com/repos/${t}/${r}/git/trees/${n}${a?"?recursive=1":""}&t=${Date.now()}`,method:"GET",headers:this.authHeaders()};return{state:!0,data:(await Jn(i)).json}}catch(i){return{state:!1,data:i}}}async getRef(t,r,n="heads/main"){try{let a={url:`https://api.github.com/repos/${t}/${r}/git/refs/${n}?t=${Date.now()}`,method:"GET",headers:this.authHeaders()};return{state:!0,data:(await Jn(a)).json}}catch(a){return{state:!1,data:a}}}async createTree(t,r,n,a){try{let i={url:`https://api.github.com/repos/${t}/${r}/git/trees`,method:"POST",headers:{...this.authHeaders(),"Content-Type":"application/json"},body:JSON.stringify({base_tree:n,tree:a})};return{state:!0,data:(await Jn(i)).json}}catch(i){return{state:!1,data:i}}}async createCommit(t,r,n,a,i){try{let s={url:`https://api.github.com/repos/${t}/${r}/git/commits`,method:"POST",headers:{...this.authHeaders(),"Content-Type":"application/json"},body:JSON.stringify({message:n,tree:a,parents:i})};return{state:!0,data:(await Jn(s)).json}}catch(s){return{state:!1,data:s}}}async updateRef(t,r,n,a){try{let i={url:`https://api.github.com/repos/${t}/${r}/git/refs/${n}`,method:"PATCH",headers:{...this.authHeaders(),"Content-Type":"application/json"},body:JSON.stringify({sha:a,force:!1})};return{state:!0,data:(await Jn(i)).json}}catch(i){return{state:!1,data:i}}}async batchUploadFiles(t,r,n,a,i="main"){try{if(!this.token)return{state:!1,data:v("Settings.Basis.GithubApiTokenMissing")};if(n.length===0)return{state:!0,data:"no files to upload"};let s=await this.getRef(t,r,`heads/${i}`);if(!s.state)return{state:!1,data:`\u83B7\u53D6\u5206\u652F\u4FE1\u606F\u5931\u8D25: ${s.data}`};let o=s.data.object.sha,l={url:`https://api.github.com/repos/${t}/${r}/git/commits/${o}`,method:"GET",headers:this.authHeaders()},u=(await Jn(l)).json.tree.sha,d=n.map(g=>({path:g.path,mode:"100644",type:"blob",content:g.content})),f=await this.createTree(t,r,u,d);if(!f.state)return{state:!1,data:`\u521B\u5EFA Tree \u5931\u8D25: ${f.data}`};let p=f.data.sha,m=await this.createCommit(t,r,a,p,[o]);if(!m.state)return{state:!1,data:`\u521B\u5EFA Commit \u5931\u8D25: ${m.data}`};let h=m.data.sha,x=await this.updateRef(t,r,`heads/${i}`,h);return x.state?{state:!0,data:x.data}:{state:!1,data:`\u66F4\u65B0\u5F15\u7528\u5931\u8D25: ${x.data}`}}catch(s){return{state:!1,data:s}}}};Wy();$t();var M3={currentTab:"community",isLoading:!1,error:null,communityRegistry:[],communityStats:null,communityLoaded:!1,communityLoading:!1,contributors:[],contributorsLoaded:!1,repoDataLoaded:!1,repoInitialized:!1,repoChecking:!1,repoManifest:[],githubUser:null,isForking:!1,canCreateRepo:!1,repoNameInput:"obsidian-i18n-resources",repoDescriptionInput:"",myRepoInfo:null,myRepoReadme:null,searchParams:{query:"",language:"zh-cn",page:1,page_size:20},totalPages:1,targetRepoAddress:"",targetRepoStars:null,targetManifest:[],savedRepos:[],targetRepoReadme:null,uploadType:"plugin",uploadForm:{plugin_id:"",title:"",description:"",version:""},localFiles:[],selectedPluginId:"",selectedSourceId:"",outdatedSources:[],isCheckingUpdates:!1,historyDialogEntryId:null,backupDialogOpen:!1,backupDialogMode:null,backupProgress:null,diffDialogSourceId:null,refreshVersion:0,isAdmin:!1,isPushing:!1},lXe=iu()((e,t)=>({...M3,setCurrentTab:r=>e({currentTab:r}),setCommunityRegistry:r=>e({communityRegistry:r}),setCommunityStats:r=>e({communityStats:r}),setCommunityLoaded:r=>e({communityLoaded:r}),setCommunityLoading:r=>e({communityLoading:r}),setRepoDataLoaded:r=>e({repoDataLoaded:r}),setRepoInitialized:r=>e({repoInitialized:r}),setRepoChecking:r=>e({repoChecking:r}),setRepoManifest:r=>e({repoManifest:r}),setGithubUser:r=>e({githubUser:r}),setIsForking:r=>e({isForking:r}),setCanCreateRepo:r=>e({canCreateRepo:r}),setRepoNameInput:r=>e({repoNameInput:r}),setRepoDescriptionInput:r=>e({repoDescriptionInput:r}),setMyRepoInfo:r=>e({myRepoInfo:r}),setMyRepoReadme:r=>e({myRepoReadme:r}),setSearchQuery:r=>e(n=>({searchParams:{...n.searchParams,query:r,page:1}})),setSearchLanguage:r=>e(n=>({searchParams:{...n.searchParams,language:r,page:1}})),setSearchPage:r=>e(n=>({searchParams:{...n.searchParams,page:r}})),setTotalPages:r=>e({totalPages:r}),setTargetRepoAddress:r=>e({targetRepoAddress:r}),setTargetRepoStars:r=>e({targetRepoStars:r}),setTargetManifest:r=>e({targetManifest:r}),setTargetRepoReadme:r=>e({targetRepoReadme:r}),setSavedRepos:r=>e({savedRepos:r}),addSavedRepo:r=>e(n=>({savedRepos:Array.from(new Set([...n.savedRepos,r]))})),removeSavedRepo:r=>e(n=>({savedRepos:n.savedRepos.filter(a=>a!==r)})),setUploadType:r=>e({uploadType:r}),setSelectedPluginId:r=>e({selectedPluginId:r,localFiles:[],selectedSourceId:"",uploadForm:{plugin_id:r,title:"",description:"",version:""}}),setSelectedSourceId:r=>e({selectedSourceId:r}),setUploadForm:r=>e(n=>({uploadForm:{...n.uploadForm,...r}})),setLocalFiles:r=>e({localFiles:r}),resetUploadForm:()=>e({uploadForm:M3.uploadForm,selectedPluginId:"",selectedSourceId:"",localFiles:[]}),setOutdatedSources:r=>e({outdatedSources:r}),setIsCheckingUpdates:r=>e({isCheckingUpdates:r}),setLoading:r=>e({isLoading:r}),setError:r=>e({error:r}),setHistoryDialogEntryId:r=>e({historyDialogEntryId:r}),setBackupDialogOpen:r=>e({backupDialogOpen:r}),setBackupDialogMode:r=>e({backupDialogMode:r}),setBackupProgress:r=>e({backupProgress:r}),setDiffDialogSourceId:r=>e({diffDialogSourceId:r}),setIsAdmin:r=>e({isAdmin:r}),fetchGithubUser:async r=>{let{githubUser:n,setGithubUser:a,setLoading:i,setIsAdmin:s,setCanCreateRepo:o}=t();if(!(!r.settings.shareToken||n)){i(!0);try{let c=await r.api.github.getUser();if(c.state){let u={login:c.data.login,id:c.data.id,avatar_url:c.data.avatar_url,name:c.data.name,followers:c.data.followers,following:c.data.following,public_repos:c.data.public_repos,created_at:c.data.created_at,bio:c.data.bio};a(u),s(u.login===r.api.github.owner);let d=c.scopes||[];o(d.includes("public_repo")||d.includes("repo"))}}catch{}finally{i(!1)}}},fetchCommunityRegistry:async r=>{let{communityLoading:n,setCommunityLoading:a,setCommunityRegistry:i,setCommunityStats:s,setCommunityLoaded:o}=t();if(!n){a(!0);try{let l=r.api.github.owner,c=r.api.github.repo,[u,d]=await Promise.all([r.api.github.getFileContentWithFallback(l,c,"registry.json"),r.api.github.getFileContentWithFallback(l,c,"stats.json")]);u.state&&u.data&&Array.isArray(u.data)&&i(u.data),d.state&&d.data&&d.data&&typeof d.data=="object"&&s(d.data),(u.state||d.state)&&o(!0)}catch{}finally{a(!1)}}},pushRegistryToCloud:async r=>{let{communityRegistry:n,isPushing:a}=t();if(a)return!1;e({isPushing:!0});try{let i=r.api.github.owner,s=r.api.github.repo,o="registry.json",l=JSON.stringify(n,null,2),c=Buffer.from(l,"utf-8").toString("base64");return!!(await r.api.github.uploadFile(i,s,o,c,`Update registry.json from Admin Panel (${new Date().toLocaleString()})`)).state}catch{return!1}finally{e({isPushing:!1})}},updateRegistryItem:(r,n)=>e(a=>({communityRegistry:a.communityRegistry.map(i=>i.repoAddress===r?{...i,...n}:i)})),setContributors:r=>e({contributors:r}),setContributorsLoaded:r=>e({contributorsLoaded:r}),addContributor:r=>e(n=>({contributors:[...n.contributors,r]})),removeContributor:(r,n)=>e(a=>({contributors:a.contributors.filter(i=>!(i.name===r&&i.category===n))})),updateContributor:(r,n,a)=>e(i=>({contributors:i.contributors.map(s=>s.name===r&&s.category===n?{...s,...a}:s)})),fetchContributors:async r=>{let{contributorsLoaded:n,setContributors:a,setContributorsLoaded:i}=t();if(!n)try{let s=r.api.github.owner,o=r.api.github.repo,l=await r.api.github.getFileContentWithFallback(s,o,"contributors.json");if(l.state&&l.data){let c=l.data;c.contributors&&Array.isArray(c.contributors)&&a(c.contributors)}i(!0)}catch{i(!0)}},pushContributorsToCloud:async r=>{let{contributors:n,isPushing:a}=t();if(a)return!1;e({isPushing:!0});try{let i=r.api.github.owner,s=r.api.github.repo,o="contributors.json",l=JSON.stringify({contributors:n},null,2),c=Buffer.from(l,"utf-8").toString("base64");return!!(await r.api.github.uploadFile(i,s,o,c,`Update contributors.json from Admin Panel (${new Date().toLocaleString()})`)).state}catch{return!1}finally{e({isPushing:!1})}},reset:()=>e(r=>({...M3,refreshVersion:r.refreshVersion+1,savedRepos:r.savedRepos,targetRepoAddress:r.targetRepoAddress,targetManifest:r.targetManifest,targetRepoReadme:r.targetRepoReadme,communityRegistry:r.communityRegistry,communityStats:r.communityStats,communityLoaded:r.communityLoaded,outdatedSources:r.outdatedSources,contributors:r.contributors,contributorsLoaded:r.contributorsLoaded}))})),Te=sd(lXe);var DT=class extends Ki{main(){let{containerEl:t}=this;if(t.empty(),this.settings.shareProfiles||(this.settings.shareProfiles=[]),this.settings.shareProfiles.length===0){let i=Date.now().toString();this.settings.shareProfiles.push({id:i,name:"\u9ED8\u8BA4\u8D26\u53F7",token:this.settings.shareToken||"",repo:this.settings.shareRepo||"obsidian-translations"}),this.settings.shareActiveProfileId=i,this.i18n.saveSettings()}let r=this.settings.shareProfiles.find(i=>i.id===this.settings.shareActiveProfileId);t.createEl("h2",{text:v("Settings.Share.TutorialTitle")}),new Cu.Setting(t).setDesc(v("Settings.Share.TutorialTip")).addButton(i=>i.setButtonText("Classic Token (\u81EA\u52A8\u52FE\u9009)").setTooltip("\u81EA\u52A8\u914D\u7F6E\u5E76\u52FE\u9009\u5168\u91CF repo \u6743\u9650\uFF0C\u64CD\u4F5C\u6700\u4FBF\u6377").onClick(()=>{window.open("https://github.com/settings/tokens/new?scopes=repo&description=Obsidian-i18n-Share")})).addButton(i=>i.setButtonText("Fine-grained Token (\u9700\u624B\u52A8)").setTooltip('\u66F4\u5B89\u5168\u7684\u7EC6\u7C92\u5EA6\u6743\u9650\u3002\u524D\u63D0\uFF1A\u9700\u624B\u52A8\u9009\u62E9"All repositories"\u5E76\u5F00\u542F Contents \u7684\u8BFB\u5199\u6743').onClick(()=>{window.open("https://github.com/settings/personal-access-tokens/new?name=Obsidian-i18n-Share&description=Obsidian-i18n+Translation+Sync")})),t.createEl("h2",{text:v("Settings.Share.AuthTitle")});let n=new Cu.Setting(t).setName(v("Settings.Share.ProfileSelectTitle")).setDesc(v("Settings.Share.ProfileSelectDesc"));n.addDropdown(i=>{this.settings.shareProfiles.forEach(s=>{i.addOption(s.id,s.name)}),i.setValue(this.settings.shareActiveProfileId),i.onChange(async s=>{this.settings.shareActiveProfileId=s;let o=this.settings.shareProfiles.find(l=>l.id===s);o&&(this.settings.shareToken=o.token,this.settings.shareRepo=o.repo,Te.getState().reset(),Te.getState().setRepoNameInput(o.repo)),await this.i18n.saveSettings(),this.display()})}),n.addButton(i=>{i.setIcon("plus").setTooltip(v("Settings.Share.ProfileAddBtn")).onClick(async()=>{let s=Date.now().toString(),o={id:s,name:`${v("Settings.Share.ProfileAddBtn")} ${this.settings.shareProfiles.length+1}`,token:"",repo:"obsidian-translations"};this.settings.shareProfiles.push(o),this.settings.shareActiveProfileId=s,this.settings.shareToken=o.token,this.settings.shareRepo=o.repo,Te.getState().reset(),Te.getState().setRepoNameInput(o.repo),await this.i18n.saveSettings(),new Cu.Notice(v("Settings.Share.ProfileAddNotice")),this.display()})}),n.addButton(i=>{i.setIcon("trash").setTooltip(v("Settings.Share.ProfileDelBtn")).onClick(async()=>{if(this.settings.shareProfiles.length<=1){new Cu.Notice("Cannot delete the last profile");return}if(!confirm(v("Settings.Share.ProfileDelConfirm")))return;let s=this.settings.shareActiveProfileId;this.settings.shareProfiles=this.settings.shareProfiles.filter(l=>l.id!==s);let o=this.settings.shareProfiles[0];this.settings.shareActiveProfileId=o.id,this.settings.shareToken=o.token,this.settings.shareRepo=o.repo,Te.getState().reset(),Te.getState().setRepoNameInput(o.repo),await this.i18n.saveSettings(),this.display()})}),r&&new Cu.Setting(t).setName(v("Settings.Share.ProfileNameTitle")).setDesc(v("Settings.Share.ProfileNameDesc")).addText(i=>i.setValue(r.name).setPlaceholder(v("Settings.Share.ProfileNamePlaceholder")).onChange(async s=>{let o=s.trim();o&&o!==r.name&&(r.name=o,await this.i18n.saveSettings())}));let a=new Cu.Setting(t).setName(v("Settings.Share.ModeTitle")).setDesc(this.settings.shareToken?`${v("Settings.Share.LoginSuccess")}`:v("Settings.Share.ModeDesc"));a.addText(i=>{i.setValue(this.settings.shareToken).setPlaceholder(v("Settings.Share.TokenPlaceholder")).onChange(async s=>{let o=s.trim();this.settings.shareToken=o,r&&(r.token=o),await this.i18n.saveSettings()}),i.inputEl.addEventListener("blur",async()=>{let s=this.settings.shareToken;if(s){a.setDesc(v("Settings.Share.Verifying"));try{let l=await new Kx(this.i18n).getUser();if(l.state){let c=l.scopes||[],u=c.includes("public_repo")||c.includes("repo"),d=s.startsWith("github_pat_");if(u||d)a.setDesc(`${v("Settings.Share.LoginSuccess")}: @${l.data.login}`),Te.getState().reset();else throw new Error(v("Settings.Share.VerifyInsufficient"))}else throw new Error(v("Settings.Share.VerifyError"))}catch(o){new Cu.Notice(o.message||v("Settings.Share.VerifyError")),this.settings.shareToken="",r&&(r.token=""),await this.i18n.saveSettings(),i.setValue(""),a.setDesc(v("Settings.Share.ModeDesc"))}}})}),new Cu.Setting(t).setName(v("Settings.Share.RepoTitle")).setDesc(v("Settings.Share.RepoDesc")).addText(i=>{i.setValue(this.settings.shareRepo||"obsidian-translations").setPlaceholder("obsidian-translations").onChange(async s=>{let o=s.trim();this.settings.shareRepo=o,r&&(r.repo=o),await this.i18n.saveSettings(),Te.getState().setRepoNameInput(o)})})}};$r();var MT=class extends CI.PluginSettingTab{constructor(r,n){super(r,n);this.i18n=n,this.app=r}display(){let{containerEl:r}=this;r.empty();let n=()=>{let u=document.body.classList.contains("theme-dark");r.classList.toggle("dark",u)};n();let a=new MutationObserver(u=>{for(let d of u)d.type==="attributes"&&d.attributeName==="class"&&n()});a.observe(document.body,{attributes:!0,attributeFilter:["class"]}),r._darkObserver&&r._darkObserver.disconnect(),r._darkObserver=a,r.addClass("i18n-settings-wrapper","flex","flex-col","w-full","h-full","pb-4");let i=r.createEl("style");i.textContent=`
.i18n-settings-nav-item {
white-space: nowrap;
flex-shrink: 0;
}
@media (max-width: 750px) {
.i18n-settings-nav-text { display: none; }
.i18n-settings-nav-item { padding: 6px 14px !important; gap: 0 !important; justify-content: center; }
}
`;let s=r.createEl("div");s.addClass("flex","p-1","bg-transparent","mb-6","self-start","gap-1","overflow-x-auto","custom-scrollbar"),s.style.backgroundColor="var(--background-modifier-form-field)",s.style.borderRadius="var(--radius-m)",s.style.maxWidth="100%",this.contentEl=r.createEl("div"),this.contentEl.addClass("flex-1","overflow-y-auto","px-1","custom-scrollbar");let o=[{id:"basis",text:v("Settings.Tabs.Basis"),icon:"settings",content:()=>this.basisDisplay()},{id:"re",text:v("Settings.Tabs.Re"),icon:"search-code",content:()=>this.reDisplay()},{id:"ast",text:v("Settings.Tabs.Ast"),icon:"code-2",content:()=>this.astDisplay()},{id:"immersive",text:v("Settings.Tabs.Immersive"),icon:"languages",content:()=>this.imtDisplay()},{id:"ai",text:v("Settings.Tabs.Ai"),icon:"sparkles",content:()=>this.llmDisplay()},{id:"share",text:v("Settings.Tabs.Share"),icon:"share-2",content:()=>this.shareDisplay()}],l=[],c=(u,d)=>{u.className="i18n-settings-nav-item flex items-center gap-2 px-4 py-1.5 cursor-pointer transition-all duration-200 font-medium text-[13px]",u.style.borderRadius="var(--radius-s)",d?(u.style.backgroundColor="var(--background-primary)",u.style.color="var(--text-normal)",u.style.boxShadow="var(--shadow-s)",u.style.border="none"):(u.style.backgroundColor="transparent",u.style.color="var(--text-muted)",u.style.border="none",u.style.boxShadow="none",u.onmouseenter=()=>{this.i18n.activeSettingTab!==u.dataset.id&&(u.style.backgroundColor="var(--background-modifier-hover)")},u.onmouseleave=()=>{this.i18n.activeSettingTab!==u.dataset.id&&(u.style.backgroundColor="transparent")})};o.forEach(u=>{let d=s.createEl("div");d.dataset.id=u.id;let f=d.createEl("span",{cls:"nav-icon flex items-center shrink-0"});(0,CI.setIcon)(f,u.icon);let p=d.createEl("span",{text:u.text,cls:"i18n-settings-nav-text"});l.push(d);let m=u.id===this.i18n.activeSettingTab;c(d,m),m&&u.content(),d.addEventListener("click",()=>{this.i18n.activeSettingTab=u.id,l.forEach(h=>{let x=o.find(g=>g.id===h.dataset.id);c(h,h.dataset.id===u.id)}),u.content()})})}basisDisplay(){this.contentEl.empty(),new o0(this).display()}llmDisplay(){this.contentEl.empty(),new c0(this).display();let r=this.i18n.settings.llmApi;r>=1&&r<=16?new Gx(this).display():new Gx(this).display()}imtDisplay(){this.contentEl.empty(),new l0(this).display()}shareDisplay(){this.contentEl.empty(),new DT(this).display()}reDisplay(){this.contentEl.empty(),new LT(this).display()}astDisplay(){this.contentEl.empty(),new RT(this).display()}};$t();var Eme=require("obsidian");var Cme=A(Le());tr();var Ja=A(Le(),1);var cte=A(Le(),1);function lte(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function ns(...e){return t=>{let r=!1,n=e.map(a=>{let i=lte(a,t);return!r&&typeof i=="function"&&(r=!0),i});if(r)return()=>{for(let a=0;a<n.length;a++){let i=n[a];typeof i=="function"?i():lte(e[a],null)}}}}function Xt(...e){return cte.useCallback(ns(...e),e)}var PI=A(oe(),1),cXe=Symbol.for("react.lazy"),EI=Ja[" use ".trim().toString()];function uXe(e){return typeof e=="object"&&e!==null&&"then"in e}function ute(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===cXe&&"_payload"in e&&uXe(e._payload)}function dXe(e){let t=fXe(e),r=Ja.forwardRef((n,a)=>{let{children:i,...s}=n;ute(i)&&typeof EI=="function"&&(i=EI(i._payload));let o=Ja.Children.toArray(i),l=o.find(mXe);if(l){let c=l.props.children,u=o.map(d=>d===l?Ja.Children.count(c)>1?Ja.Children.only(null):Ja.isValidElement(c)?c.props.children:null:d);return(0,PI.jsx)(t,{...s,ref:a,children:Ja.isValidElement(c)?Ja.cloneElement(c,void 0,u):null})}return(0,PI.jsx)(t,{...s,ref:a,children:i})});return r.displayName=`${e}.Slot`,r}var II=dXe("Slot");function fXe(e){let t=Ja.forwardRef((r,n)=>{let{children:a,...i}=r;if(ute(a)&&typeof EI=="function"&&(a=EI(a._payload)),Ja.isValidElement(a)){let s=gXe(a),o=hXe(i,a.props);return a.type!==Ja.Fragment&&(o.ref=n?ns(n,s):s),Ja.cloneElement(a,o)}return Ja.Children.count(a)>1?Ja.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var pXe=Symbol("radix.slottable");function mXe(e){return Ja.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===pXe}function hXe(e,t){let r={...t};for(let n in t){let a=e[n],i=t[n];/^on[A-Z]/.test(n)?a&&i?r[n]=(...o)=>{let l=i(...o);return a(...o),l}:a&&(r[n]=a):n==="style"?r[n]={...a,...i}:n==="className"&&(r[n]=[a,i].filter(Boolean).join(" "))}return{...e,...r}}function gXe(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}MP();var dte=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,fte=qy,Pu=(e,t)=>r=>{var n;if(t?.variants==null)return fte(e,r?.class,r?.className);let{variants:a,defaultVariants:i}=t,s=Object.keys(a).map(c=>{let u=r?.[c],d=i?.[c];if(u===null)return null;let f=dte(u)||dte(d);return a[c][f]}),o=r&&Object.entries(r).reduce((c,u)=>{let[d,f]=u;return f===void 0||(c[d]=f),c},{}),l=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((c,u)=>{let{class:d,className:f,...p}=u;return Object.entries(p).every(m=>{let[h,x]=m;return Array.isArray(x)?x.includes({...i,...o}[h]):{...i,...o}[h]===x})?[...c,d,f]:c},[]);return fte(e,s,l,r?.class,r?.className)};MP();KM();function le(...e){return BP(qy(e))}var pte=A(oe()),yXe=Pu("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function vt({className:e,variant:t,asChild:r=!1,...n}){return(0,pte.jsx)(r?II:"span",{"data-slot":"badge",className:le(yXe({variant:t}),e),...n})}var hte=A(oe()),mte=Pu("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function we({className:e,variant:t,size:r,asChild:n=!1,...a}){return(0,hte.jsx)(n?II:"button",{"data-slot":"button",className:le(mte({variant:t,size:r,className:e})),...a})}var Ste=A(Le(),1);var yte=A(Le(),1),xte=A(Hf(),1);var vi=A(Le(),1);var AI=A(oe(),1);function gte(e){let t=xXe(e),r=vi.forwardRef((n,a)=>{let{children:i,...s}=n,o=vi.Children.toArray(i),l=o.find(vXe);if(l){let c=l.props.children,u=o.map(d=>d===l?vi.Children.count(c)>1?vi.Children.only(null):vi.isValidElement(c)?c.props.children:null:d);return(0,AI.jsx)(t,{...s,ref:a,children:vi.isValidElement(c)?vi.cloneElement(c,void 0,u):null})}return(0,AI.jsx)(t,{...s,ref:a,children:i})});return r.displayName=`${e}.Slot`,r}function xXe(e){let t=vi.forwardRef((r,n)=>{let{children:a,...i}=r;if(vi.isValidElement(a)){let s=TXe(a),o=SXe(i,a.props);return a.type!==vi.Fragment&&(o.ref=n?ns(n,s):s),vi.cloneElement(a,o)}return vi.Children.count(a)>1?vi.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var bXe=Symbol("radix.slottable");function vXe(e){return vi.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===bXe}function SXe(e,t){let r={...t};for(let n in t){let a=e[n],i=t[n];/^on[A-Z]/.test(n)?a&&i?r[n]=(...o)=>{let l=i(...o);return a(...o),l}:a&&(r[n]=a):n==="style"?r[n]={...a,...i}:n==="className"&&(r[n]=[a,i].filter(Boolean).join(" "))}return{...e,...r}}function TXe(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var bte=A(oe(),1),wXe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],pt=wXe.reduce((e,t)=>{let r=gte(`Primitive.${t}`),n=yte.forwardRef((a,i)=>{let{asChild:s,...o}=a,l=s?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,bte.jsx)(l,{...o,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function NI(e,t){e&&xte.flushSync(()=>e.dispatchEvent(t))}var Tte=A(oe(),1),CXe="Separator",vte="horizontal",PXe=["horizontal","vertical"],wte=Ste.forwardRef((e,t)=>{let{decorative:r,orientation:n=vte,...a}=e,i=EXe(n)?n:vte,o=r?{role:"none"}:{"aria-orientation":i==="vertical"?i:void 0,role:"separator"};return(0,Tte.jsx)(pt.div,{"data-orientation":i,...o,...a,ref:t})});wte.displayName=CXe;function EXe(e){return PXe.includes(e)}var Cte=wte;var Pte=A(oe());function Eu({className:e,orientation:t="horizontal",decorative:r=!0,...n}){return(0,Pte.jsx)(Cte,{"data-slot":"separator",decorative:r,orientation:t,className:le("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",e),...n})}var AXe=A(oe()),Fkt=Pu("flex w-fit items-stretch [&>*]:focus-visible:z-10 [&>*]:focus-visible:relative [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md has-[>[data-slot=button-group]]:gap-2",{variants:{orientation:{horizontal:"[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none",vertical:"flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none"}},defaultVariants:{orientation:"horizontal"}});var Wx=A(oe());function Si({className:e,...t}){return(0,Wx.jsx)("div",{"data-slot":"card",className:le("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",e),...t})}function kp({className:e,...t}){return(0,Wx.jsx)("div",{"data-slot":"card-header",className:le("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),...t})}function _p({className:e,...t}){return(0,Wx.jsx)("div",{"data-slot":"card-title",className:le("leading-none font-semibold",e),...t})}function OT({className:e,...t}){return(0,Wx.jsx)("div",{"data-slot":"card-description",className:le("text-muted-foreground text-sm",e),...t})}function Lp({className:e,...t}){return(0,Wx.jsx)("div",{"data-slot":"card-content",className:le("px-6",e),...t})}var Bs=A(Le(),1);var Hl=A(Le(),1),O3=A(oe(),1);function Ete(e,t){let r=Hl.createContext(t),n=i=>{let{children:s,...o}=i,l=Hl.useMemo(()=>o,Object.values(o));return(0,O3.jsx)(r.Provider,{value:l,children:s})};n.displayName=e+"Provider";function a(i){let s=Hl.useContext(r);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[n,a]}function jn(e,t=[]){let r=[];function n(i,s){let o=Hl.createContext(s),l=r.length;r=[...r,s];let c=d=>{let{scope:f,children:p,...m}=d,h=f?.[e]?.[l]||o,x=Hl.useMemo(()=>m,Object.values(m));return(0,O3.jsx)(h.Provider,{value:x,children:p})};c.displayName=i+"Provider";function u(d,f){let p=f?.[e]?.[l]||o,m=Hl.useContext(p);if(m)return m;if(s!==void 0)return s;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[c,u]}let a=()=>{let i=r.map(s=>Hl.createContext(s));return function(o){let l=o?.[e]||i;return Hl.useMemo(()=>({[`__scope${e}`]:{...o,[e]:l}}),[o,l])}};return a.scopeName=e,[n,NXe(a,...t)]}function NXe(...e){let t=e[0];if(e.length===1)return t;let r=()=>{let n=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(i){let s=n.reduce((o,{useScope:l,scopeName:c})=>{let d=l(i)[`__scope${c}`];return{...o,...d}},{});return Hl.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return r.scopeName=t.scopeName,r}var Ukt=!!(typeof window<"u"&&window.document&&window.document.createElement);function tt(e,t,{checkForDefaultPrevented:r=!0}={}){return function(a){if(e?.(a),r===!1||!a.defaultPrevented)return t?.(a)}}var Gl=A(Le(),1);var Ite=A(Le(),1),Nn=globalThis?.document?Ite.useLayoutEffect:()=>{};var kI=A(Le(),1);var kXe=Gl[" useInsertionEffect ".trim().toString()]||Nn;function as({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){let[a,i,s]=_Xe({defaultProp:t,onChange:r}),o=e!==void 0,l=o?e:a;{let u=Gl.useRef(e!==void 0);Gl.useEffect(()=>{let d=u.current;if(d!==o){let f=d?"controlled":"uncontrolled",p=o?"controlled":"uncontrolled"}u.current=o},[o,n])}let c=Gl.useCallback(u=>{if(o){let d=LXe(u)?u(e):u;d!==e&&s.current?.(d)}else i(u)},[o,e,i,s]);return[l,c]}function _Xe({defaultProp:e,onChange:t}){let[r,n]=Gl.useState(e),a=Gl.useRef(r),i=Gl.useRef(t);return kXe(()=>{i.current=t},[t]),Gl.useEffect(()=>{a.current!==r&&(i.current?.(r),a.current=r)},[r,a]),[r,n,i]}function LXe(e){return typeof e=="function"}var Gkt=Symbol("RADIX:SYNC_STATE");var _I=A(Le(),1);function LI(e){let t=_I.useRef({value:e,previous:e});return _I.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Ate=A(Le(),1);function RI(e){let[t,r]=Ate.useState(void 0);return Nn(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});let n=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;let i=a[0],s,o;if("borderBoxSize"in i){let l=i.borderBoxSize,c=Array.isArray(l)?l[0]:l;s=c.inlineSize,o=c.blockSize}else s=e.offsetWidth,o=e.offsetHeight;r({width:s,height:o})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var Co=A(Le(),1);var Nte=A(Le(),1);function RXe(e,t){return Nte.useReducer((r,n)=>t[r][n]??r,e)}var ia=e=>{let{present:t,children:r}=e,n=DXe(t),a=typeof r=="function"?r({present:n.isPresent}):Co.Children.only(r),i=Xt(n.ref,MXe(a));return typeof r=="function"||n.isPresent?Co.cloneElement(a,{ref:i}):null};ia.displayName="Presence";function DXe(e){let[t,r]=Co.useState(),n=Co.useRef(null),a=Co.useRef(e),i=Co.useRef("none"),s=e?"mounted":"unmounted",[o,l]=RXe(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return Co.useEffect(()=>{let c=DI(n.current);i.current=o==="mounted"?c:"none"},[o]),Nn(()=>{let c=n.current,u=a.current;if(u!==e){let f=i.current,p=DI(c);e?l("MOUNT"):p==="none"||c?.display==="none"?l("UNMOUNT"):l(u&&f!==p?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,l]),Nn(()=>{if(t){let c,u=t.ownerDocument.defaultView??window,d=p=>{let h=DI(n.current).includes(CSS.escape(p.animationName));if(p.target===t&&h&&(l("ANIMATION_END"),!a.current)){let x=t.style.animationFillMode;t.style.animationFillMode="forwards",c=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},f=p=>{p.target===t&&(i.current=DI(n.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{u.clearTimeout(c),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(o),ref:Co.useCallback(c=>{n.current=c?getComputedStyle(c):null,r(c)},[])}}function DI(e){return e?.animationName||"none"}function MXe(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var tl=A(oe(),1),MI="Checkbox",[OXe,l_t]=jn(MI),[FXe,F3]=OXe(MI);function BXe(e){let{__scopeCheckbox:t,checked:r,children:n,defaultChecked:a,disabled:i,form:s,name:o,onCheckedChange:l,required:c,value:u="on",internal_do_not_use_render:d}=e,[f,p]=as({prop:r,defaultProp:a??!1,onChange:l,caller:MI}),[m,h]=Bs.useState(null),[x,g]=Bs.useState(null),y=Bs.useRef(!1),b=m?!!s||!!m.closest("form"):!0,S={checked:f,disabled:i,setChecked:p,control:m,setControl:h,name:o,form:s,value:u,hasConsumerStoppedPropagationRef:y,required:c,defaultChecked:Rp(a)?!1:a,isFormControl:b,bubbleInput:x,setBubbleInput:g};return(0,tl.jsx)(FXe,{scope:t,...S,children:$Xe(d)?d(S):n})}var kte="CheckboxTrigger",_te=Bs.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:r,...n},a)=>{let{control:i,value:s,disabled:o,checked:l,required:c,setControl:u,setChecked:d,hasConsumerStoppedPropagationRef:f,isFormControl:p,bubbleInput:m}=F3(kte,e),h=Xt(a,u),x=Bs.useRef(l);return Bs.useEffect(()=>{let g=i?.form;if(g){let y=()=>d(x.current);return g.addEventListener("reset",y),()=>g.removeEventListener("reset",y)}},[i,d]),(0,tl.jsx)(pt.button,{type:"button",role:"checkbox","aria-checked":Rp(l)?"mixed":l,"aria-required":c,"data-state":Mte(l),"data-disabled":o?"":void 0,disabled:o,value:s,...n,ref:h,onKeyDown:tt(t,g=>{g.key==="Enter"&&g.preventDefault()}),onClick:tt(r,g=>{d(y=>Rp(y)?!0:!y),m&&p&&(f.current=g.isPropagationStopped(),f.current||g.stopPropagation())})})});_te.displayName=kte;var B3=Bs.forwardRef((e,t)=>{let{__scopeCheckbox:r,name:n,checked:a,defaultChecked:i,required:s,disabled:o,value:l,onCheckedChange:c,form:u,...d}=e;return(0,tl.jsx)(BXe,{__scopeCheckbox:r,checked:a,defaultChecked:i,disabled:o,required:s,onCheckedChange:c,name:n,form:u,value:l,internal_do_not_use_render:({isFormControl:f})=>(0,tl.jsxs)(tl.Fragment,{children:[(0,tl.jsx)(_te,{...d,ref:t,__scopeCheckbox:r}),f&&(0,tl.jsx)(Dte,{__scopeCheckbox:r})]})})});B3.displayName=MI;var Lte="CheckboxIndicator",$3=Bs.forwardRef((e,t)=>{let{__scopeCheckbox:r,forceMount:n,...a}=e,i=F3(Lte,r);return(0,tl.jsx)(ia,{present:n||Rp(i.checked)||i.checked===!0,children:(0,tl.jsx)(pt.span,{"data-state":Mte(i.checked),"data-disabled":i.disabled?"":void 0,...a,ref:t,style:{pointerEvents:"none",...e.style}})})});$3.displayName=Lte;var Rte="CheckboxBubbleInput",Dte=Bs.forwardRef(({__scopeCheckbox:e,...t},r)=>{let{control:n,hasConsumerStoppedPropagationRef:a,checked:i,defaultChecked:s,required:o,disabled:l,name:c,value:u,form:d,bubbleInput:f,setBubbleInput:p}=F3(Rte,e),m=Xt(r,p),h=LI(i),x=RI(n);Bs.useEffect(()=>{let y=f;if(!y)return;let b=window.HTMLInputElement.prototype,w=Object.getOwnPropertyDescriptor(b,"checked").set,E=!a.current;if(h!==i&&w){let C=new Event("click",{bubbles:E});y.indeterminate=Rp(i),w.call(y,Rp(i)?!1:i),y.dispatchEvent(C)}},[f,h,i,a]);let g=Bs.useRef(Rp(i)?!1:i);return(0,tl.jsx)(pt.input,{type:"checkbox","aria-hidden":!0,defaultChecked:s??g.current,required:o,disabled:l,name:c,value:u,form:d,...t,tabIndex:-1,ref:m,style:{...t.style,...x,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});Dte.displayName=Rte;function $Xe(e){return typeof e=="function"}function Rp(e){return e==="indeterminate"}function Mte(e){return Rp(e)?"indeterminate":e?"checked":"unchecked"}Kt();var OI=A(oe());function Kl({className:e,...t}){return(0,OI.jsx)(B3,{"data-slot":"checkbox",className:le("peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:(0,OI.jsx)($3,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current transition-none",children:(0,OI.jsx)(Tc,{className:"size-3.5"})})})}var Xx=A(oe());function FI({className:e,...t}){return(0,Xx.jsx)("div",{"data-slot":"empty",className:le("flex min-w-0 flex-1 flex-col items-center justify-center gap-6 rounded-lg border-dashed p-6 text-center text-balance md:p-12",e),...t})}function BI({className:e,...t}){return(0,Xx.jsx)("div",{"data-slot":"empty-header",className:le("flex max-w-sm flex-col items-center gap-2 text-center",e),...t})}var zXe=Pu("flex shrink-0 items-center justify-center mb-2 [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{default:"bg-transparent",icon:"bg-muted text-foreground flex size-10 shrink-0 items-center justify-center rounded-lg [&_svg:not([class*='size-'])]:size-6"}},defaultVariants:{variant:"default"}});function $I({className:e,variant:t="default",...r}){return(0,Xx.jsx)("div",{"data-slot":"empty-icon","data-variant":t,className:le(zXe({variant:t,className:e})),...r})}function jI({className:e,...t}){return(0,Xx.jsx)("div",{"data-slot":"empty-title",className:le("text-lg font-medium tracking-tight",e),...t})}function zI({className:e,...t}){return(0,Xx.jsx)("div",{"data-slot":"empty-description",className:le("text-muted-foreground [&>a:hover]:text-primary text-sm/relaxed [&>a]:underline [&>a]:underline-offset-4",e),...t})}var Eo=A(Le(),1);var Bte=["top","right","bottom","left"];var Iu=Math.min,$s=Math.max,BT=Math.round,$T=Math.floor,Ec=e=>({x:e,y:e}),UXe={left:"right",right:"left",bottom:"top",top:"bottom"},VXe={start:"end",end:"start"};function VI(e,t,r){return $s(e,Iu(t,r))}function Au(e,t){return typeof e=="function"?e(t):e}function Nu(e){return e.split("-")[0]}function zh(e){return e.split("-")[1]}function qI(e){return e==="x"?"y":"x"}function HI(e){return e==="y"?"height":"width"}var qXe=new Set(["top","bottom"]);function Ic(e){return qXe.has(Nu(e))?"y":"x"}function GI(e){return qI(Ic(e))}function $te(e,t,r){r===void 0&&(r=!1);let n=zh(e),a=GI(e),i=HI(a),s=a==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=FT(s)),[s,FT(s)]}function jte(e){let t=FT(e);return[UI(e),t,UI(t)]}function UI(e){return e.replace(/start|end/g,t=>VXe[t])}var Ote=["left","right"],Fte=["right","left"],HXe=["top","bottom"],GXe=["bottom","top"];function KXe(e,t,r){switch(e){case"top":case"bottom":return r?t?Fte:Ote:t?Ote:Fte;case"left":case"right":return t?HXe:GXe;default:return[]}}function zte(e,t,r,n){let a=zh(e),i=KXe(Nu(e),r==="start",n);return a&&(i=i.map(s=>s+"-"+a),t&&(i=i.concat(i.map(UI)))),i}function FT(e){return e.replace(/left|right|bottom|top/g,t=>UXe[t])}function WXe(e){return{top:0,right:0,bottom:0,left:0,...e}}function j3(e){return typeof e!="number"?WXe(e):{top:e,right:e,bottom:e,left:e}}function Uh(e){let{x:t,y:r,width:n,height:a}=e;return{width:n,height:a,top:r,left:t,right:t+n,bottom:r+a,x:t,y:r}}function Ute(e,t,r){let{reference:n,floating:a}=e,i=Ic(t),s=GI(t),o=HI(s),l=Nu(t),c=i==="y",u=n.x+n.width/2-a.width/2,d=n.y+n.height/2-a.height/2,f=n[o]/2-a[o]/2,p;switch(l){case"top":p={x:u,y:n.y-a.height};break;case"bottom":p={x:u,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:d};break;case"left":p={x:n.x-a.width,y:d};break;default:p={x:n.x,y:n.y}}switch(zh(t)){case"start":p[s]-=f*(r&&c?-1:1);break;case"end":p[s]+=f*(r&&c?-1:1);break}return p}var Hte=async(e,t,r)=>{let{placement:n="bottom",strategy:a="absolute",middleware:i=[],platform:s}=r,o=i.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t)),c=await s.getElementRects({reference:e,floating:t,strategy:a}),{x:u,y:d}=Ute(c,n,l),f=n,p={},m=0;for(let h=0;h<o.length;h++){let{name:x,fn:g}=o[h],{x:y,y:b,data:S,reset:w}=await g({x:u,y:d,initialPlacement:n,placement:f,strategy:a,middlewareData:p,rects:c,platform:s,elements:{reference:e,floating:t}});u=y??u,d=b??d,p={...p,[x]:{...p[x],...S}},w&&m<=50&&(m++,typeof w=="object"&&(w.placement&&(f=w.placement),w.rects&&(c=w.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:a}):w.rects),{x:u,y:d}=Ute(c,f,l)),h=-1)}return{x:u,y:d,placement:f,strategy:a,middlewareData:p}};async function Yx(e,t){var r;t===void 0&&(t={});let{x:n,y:a,platform:i,rects:s,elements:o,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=Au(t,e),m=j3(p),x=o[f?d==="floating"?"reference":"floating":d],g=Uh(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(x)))==null||r?x:x.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:u,strategy:l})),y=d==="floating"?{x:n,y:a,width:s.floating.width,height:s.floating.height}:s.reference,b=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),S=await(i.isElement==null?void 0:i.isElement(b))?await(i.getScale==null?void 0:i.getScale(b))||{x:1,y:1}:{x:1,y:1},w=Uh(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:y,offsetParent:b,strategy:l}):y);return{top:(g.top-w.top+m.top)/S.y,bottom:(w.bottom-g.bottom+m.bottom)/S.y,left:(g.left-w.left+m.left)/S.x,right:(w.right-g.right+m.right)/S.x}}var Gte=e=>({name:"arrow",options:e,async fn(t){let{x:r,y:n,placement:a,rects:i,platform:s,elements:o,middlewareData:l}=t,{element:c,padding:u=0}=Au(e,t)||{};if(c==null)return{};let d=j3(u),f={x:r,y:n},p=GI(a),m=HI(p),h=await s.getDimensions(c),x=p==="y",g=x?"top":"left",y=x?"bottom":"right",b=x?"clientHeight":"clientWidth",S=i.reference[m]+i.reference[p]-f[p]-i.floating[m],w=f[p]-i.reference[p],E=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c)),C=E?E[b]:0;(!C||!await(s.isElement==null?void 0:s.isElement(E)))&&(C=o.floating[b]||i.floating[m]);let N=S/2-w/2,_=C/2-h[m]/2-1,O=Iu(d[g],_),D=Iu(d[y],_),W=O,Z=C-h[m]-D,me=C/2-h[m]/2+N,Q=VI(W,me,Z),V=!l.arrow&&zh(a)!=null&&me!==Q&&i.reference[m]/2-(me<W?O:D)-h[m]/2<0,U=V?me<W?me-W:me-Z:0;return{[p]:f[p]+U,data:{[p]:Q,centerOffset:me-Q-U,...V&&{alignmentOffset:U}},reset:V}}});var Kte=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;let{placement:a,middlewareData:i,rects:s,initialPlacement:o,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:h=!0,...x}=Au(e,t);if((r=i.arrow)!=null&&r.alignmentOffset)return{};let g=Nu(a),y=Ic(o),b=Nu(o)===o,S=await(l.isRTL==null?void 0:l.isRTL(c.floating)),w=f||(b||!h?[FT(o)]:jte(o)),E=m!=="none";!f&&E&&w.push(...zte(o,h,m,S));let C=[o,...w],N=await Yx(t,x),_=[],O=((n=i.flip)==null?void 0:n.overflows)||[];if(u&&_.push(N[g]),d){let me=$te(a,s,S);_.push(N[me[0]],N[me[1]])}if(O=[...O,{placement:a,overflows:_}],!_.every(me=>me<=0)){var D,W;let me=(((D=i.flip)==null?void 0:D.index)||0)+1,Q=C[me];if(Q&&(!(d==="alignment"?y!==Ic(Q):!1)||O.every(k=>Ic(k.placement)===y?k.overflows[0]>0:!0)))return{data:{index:me,overflows:O},reset:{placement:Q}};let V=(W=O.filter(U=>U.overflows[0]<=0).sort((U,k)=>U.overflows[1]-k.overflows[1])[0])==null?void 0:W.placement;if(!V)switch(p){case"bestFit":{var Z;let U=(Z=O.filter(k=>{if(E){let L=Ic(k.placement);return L===y||L==="y"}return!0}).map(k=>[k.placement,k.overflows.filter(L=>L>0).reduce((L,M)=>L+M,0)]).sort((k,L)=>k[1]-L[1])[0])==null?void 0:Z[0];U&&(V=U);break}case"initialPlacement":V=o;break}if(a!==V)return{reset:{placement:V}}}return{}}}};function Vte(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function qte(e){return Bte.some(t=>e[t]>=0)}var Wte=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){let{rects:r}=t,{strategy:n="referenceHidden",...a}=Au(e,t);switch(n){case"referenceHidden":{let i=await Yx(t,{...a,elementContext:"reference"}),s=Vte(i,r.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:qte(s)}}}case"escaped":{let i=await Yx(t,{...a,altBoundary:!0}),s=Vte(i,r.floating);return{data:{escapedOffsets:s,escaped:qte(s)}}}default:return{}}}}};var Xte=new Set(["left","top"]);async function XXe(e,t){let{placement:r,platform:n,elements:a}=e,i=await(n.isRTL==null?void 0:n.isRTL(a.floating)),s=Nu(r),o=zh(r),l=Ic(r)==="y",c=Xte.has(s)?-1:1,u=i&&l?-1:1,d=Au(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return o&&typeof m=="number"&&(p=o==="end"?m*-1:m),l?{x:p*u,y:f*c}:{x:f*c,y:p*u}}var Yte=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;let{x:a,y:i,placement:s,middlewareData:o}=t,l=await XXe(t,e);return s===((r=o.offset)==null?void 0:r.placement)&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:a+l.x,y:i+l.y,data:{...l,placement:s}}}}},Jte=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:r,y:n,placement:a}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:o={fn:x=>{let{x:g,y}=x;return{x:g,y}}},...l}=Au(e,t),c={x:r,y:n},u=await Yx(t,l),d=Ic(Nu(a)),f=qI(d),p=c[f],m=c[d];if(i){let x=f==="y"?"top":"left",g=f==="y"?"bottom":"right",y=p+u[x],b=p-u[g];p=VI(y,p,b)}if(s){let x=d==="y"?"top":"left",g=d==="y"?"bottom":"right",y=m+u[x],b=m-u[g];m=VI(y,m,b)}let h=o.fn({...t,[f]:p,[d]:m});return{...h,data:{x:h.x-r,y:h.y-n,enabled:{[f]:i,[d]:s}}}}}},Zte=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:r,y:n,placement:a,rects:i,middlewareData:s}=t,{offset:o=0,mainAxis:l=!0,crossAxis:c=!0}=Au(e,t),u={x:r,y:n},d=Ic(a),f=qI(d),p=u[f],m=u[d],h=Au(o,t),x=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(l){let b=f==="y"?"height":"width",S=i.reference[f]-i.floating[b]+x.mainAxis,w=i.reference[f]+i.reference[b]-x.mainAxis;p<S?p=S:p>w&&(p=w)}if(c){var g,y;let b=f==="y"?"width":"height",S=Xte.has(Nu(a)),w=i.reference[d]-i.floating[b]+(S&&((g=s.offset)==null?void 0:g[d])||0)+(S?0:x.crossAxis),E=i.reference[d]+i.reference[b]+(S?0:((y=s.offset)==null?void 0:y[d])||0)-(S?x.crossAxis:0);m<w?m=w:m>E&&(m=E)}return{[f]:p,[d]:m}}}},Qte=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;let{placement:a,rects:i,platform:s,elements:o}=t,{apply:l=()=>{},...c}=Au(e,t),u=await Yx(t,c),d=Nu(a),f=zh(a),p=Ic(a)==="y",{width:m,height:h}=i.floating,x,g;d==="top"||d==="bottom"?(x=d,g=f===(await(s.isRTL==null?void 0:s.isRTL(o.floating))?"start":"end")?"left":"right"):(g=d,x=f==="end"?"top":"bottom");let y=h-u.top-u.bottom,b=m-u.left-u.right,S=Iu(h-u[x],y),w=Iu(m-u[g],b),E=!t.middlewareData.shift,C=S,N=w;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(N=b),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(C=y),E&&!f){let O=$s(u.left,0),D=$s(u.right,0),W=$s(u.top,0),Z=$s(u.bottom,0);p?N=m-2*(O!==0||D!==0?O+D:$s(u.left,u.right)):C=h-2*(W!==0||Z!==0?W+Z:$s(u.top,u.bottom))}await l({...t,availableWidth:N,availableHeight:C});let _=await s.getDimensions(o.floating);return m!==_.width||h!==_.height?{reset:{rects:!0}}:{}}}};function KI(){return typeof window<"u"}function qh(e){return tre(e)?(e.nodeName||"").toLowerCase():"#document"}function Po(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ac(e){var t;return(t=(tre(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function tre(e){return KI()?e instanceof Node||e instanceof Po(e).Node:!1}function Wl(e){return KI()?e instanceof Element||e instanceof Po(e).Element:!1}function Nc(e){return KI()?e instanceof HTMLElement||e instanceof Po(e).HTMLElement:!1}function ere(e){return!KI()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Po(e).ShadowRoot}var YXe=new Set(["inline","contents"]);function Jx(e){let{overflow:t,overflowX:r,overflowY:n,display:a}=Xl(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!YXe.has(a)}var JXe=new Set(["table","td","th"]);function rre(e){return JXe.has(qh(e))}var ZXe=[":popover-open",":modal"];function jT(e){return ZXe.some(t=>{try{return e.matches(t)}catch{return!1}})}var QXe=["transform","translate","scale","rotate","perspective"],eYe=["transform","translate","scale","rotate","perspective","filter"],tYe=["paint","layout","strict","content"];function WI(e){let t=XI(),r=Wl(e)?Xl(e):e;return QXe.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||eYe.some(n=>(r.willChange||"").includes(n))||tYe.some(n=>(r.contain||"").includes(n))}function nre(e){let t=Od(e);for(;Nc(t)&&!Hh(t);){if(WI(t))return t;if(jT(t))return null;t=Od(t)}return null}function XI(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}var rYe=new Set(["html","body","#document"]);function Hh(e){return rYe.has(qh(e))}function Xl(e){return Po(e).getComputedStyle(e)}function zT(e){return Wl(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Od(e){if(qh(e)==="html")return e;let t=e.assignedSlot||e.parentNode||ere(e)&&e.host||Ac(e);return ere(t)?t.host:t}function are(e){let t=Od(e);return Hh(t)?e.ownerDocument?e.ownerDocument.body:e.body:Nc(t)&&Jx(t)?t:are(t)}function Vh(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);let a=are(e),i=a===((n=e.ownerDocument)==null?void 0:n.body),s=Po(a);if(i){let o=YI(s);return t.concat(s,s.visualViewport||[],Jx(a)?a:[],o&&r?Vh(o):[])}return t.concat(a,Vh(a,[],r))}function YI(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function lre(e){let t=Xl(e),r=parseFloat(t.width)||0,n=parseFloat(t.height)||0,a=Nc(e),i=a?e.offsetWidth:r,s=a?e.offsetHeight:n,o=BT(r)!==i||BT(n)!==s;return o&&(r=i,n=s),{width:r,height:n,$:o}}function U3(e){return Wl(e)?e:e.contextElement}function Zx(e){let t=U3(e);if(!Nc(t))return Ec(1);let r=t.getBoundingClientRect(),{width:n,height:a,$:i}=lre(t),s=(i?BT(r.width):r.width)/n,o=(i?BT(r.height):r.height)/a;return(!s||!Number.isFinite(s))&&(s=1),(!o||!Number.isFinite(o))&&(o=1),{x:s,y:o}}var nYe=Ec(0);function cre(e){let t=Po(e);return!XI()||!t.visualViewport?nYe:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function aYe(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Po(e)?!1:t}function Gh(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);let a=e.getBoundingClientRect(),i=U3(e),s=Ec(1);t&&(n?Wl(n)&&(s=Zx(n)):s=Zx(e));let o=aYe(i,r,n)?cre(i):Ec(0),l=(a.left+o.x)/s.x,c=(a.top+o.y)/s.y,u=a.width/s.x,d=a.height/s.y;if(i){let f=Po(i),p=n&&Wl(n)?Po(n):n,m=f,h=YI(m);for(;h&&n&&p!==m;){let x=Zx(h),g=h.getBoundingClientRect(),y=Xl(h),b=g.left+(h.clientLeft+parseFloat(y.paddingLeft))*x.x,S=g.top+(h.clientTop+parseFloat(y.paddingTop))*x.y;l*=x.x,c*=x.y,u*=x.x,d*=x.y,l+=b,c+=S,m=Po(h),h=YI(m)}}return Uh({width:u,height:d,x:l,y:c})}function JI(e,t){let r=zT(e).scrollLeft;return t?t.left+r:Gh(Ac(e)).left+r}function ure(e,t){let r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-JI(e,r),a=r.top+t.scrollTop;return{x:n,y:a}}function iYe(e){let{elements:t,rect:r,offsetParent:n,strategy:a}=e,i=a==="fixed",s=Ac(n),o=t?jT(t.floating):!1;if(n===s||o&&i)return r;let l={scrollLeft:0,scrollTop:0},c=Ec(1),u=Ec(0),d=Nc(n);if((d||!d&&!i)&&((qh(n)!=="body"||Jx(s))&&(l=zT(n)),Nc(n))){let p=Gh(n);c=Zx(n),u.x=p.x+n.clientLeft,u.y=p.y+n.clientTop}let f=s&&!d&&!i?ure(s,l):Ec(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:r.y*c.y-l.scrollTop*c.y+u.y+f.y}}function sYe(e){return Array.from(e.getClientRects())}function oYe(e){let t=Ac(e),r=zT(e),n=e.ownerDocument.body,a=$s(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=$s(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight),s=-r.scrollLeft+JI(e),o=-r.scrollTop;return Xl(n).direction==="rtl"&&(s+=$s(t.clientWidth,n.clientWidth)-a),{width:a,height:i,x:s,y:o}}var ire=25;function lYe(e,t){let r=Po(e),n=Ac(e),a=r.visualViewport,i=n.clientWidth,s=n.clientHeight,o=0,l=0;if(a){i=a.width,s=a.height;let u=XI();(!u||u&&t==="fixed")&&(o=a.offsetLeft,l=a.offsetTop)}let c=JI(n);if(c<=0){let u=n.ownerDocument,d=u.body,f=getComputedStyle(d),p=u.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,m=Math.abs(n.clientWidth-d.clientWidth-p);m<=ire&&(i-=m)}else c<=ire&&(i+=c);return{width:i,height:s,x:o,y:l}}var cYe=new Set(["absolute","fixed"]);function uYe(e,t){let r=Gh(e,!0,t==="fixed"),n=r.top+e.clientTop,a=r.left+e.clientLeft,i=Nc(e)?Zx(e):Ec(1),s=e.clientWidth*i.x,o=e.clientHeight*i.y,l=a*i.x,c=n*i.y;return{width:s,height:o,x:l,y:c}}function sre(e,t,r){let n;if(t==="viewport")n=lYe(e,r);else if(t==="document")n=oYe(Ac(e));else if(Wl(t))n=uYe(t,r);else{let a=cre(e);n={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return Uh(n)}function dre(e,t){let r=Od(e);return r===t||!Wl(r)||Hh(r)?!1:Xl(r).position==="fixed"||dre(r,t)}function dYe(e,t){let r=t.get(e);if(r)return r;let n=Vh(e,[],!1).filter(o=>Wl(o)&&qh(o)!=="body"),a=null,i=Xl(e).position==="fixed",s=i?Od(e):e;for(;Wl(s)&&!Hh(s);){let o=Xl(s),l=WI(s);!l&&o.position==="fixed"&&(a=null),(i?!l&&!a:!l&&o.position==="static"&&!!a&&cYe.has(a.position)||Jx(s)&&!l&&dre(e,s))?n=n.filter(u=>u!==s):a=o,s=Od(s)}return t.set(e,n),n}function fYe(e){let{element:t,boundary:r,rootBoundary:n,strategy:a}=e,s=[...r==="clippingAncestors"?jT(t)?[]:dYe(t,this._c):[].concat(r),n],o=s[0],l=s.reduce((c,u)=>{let d=sre(t,u,a);return c.top=$s(d.top,c.top),c.right=Iu(d.right,c.right),c.bottom=Iu(d.bottom,c.bottom),c.left=$s(d.left,c.left),c},sre(t,o,a));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function pYe(e){let{width:t,height:r}=lre(e);return{width:t,height:r}}function mYe(e,t,r){let n=Nc(t),a=Ac(t),i=r==="fixed",s=Gh(e,!0,i,t),o={scrollLeft:0,scrollTop:0},l=Ec(0);function c(){l.x=JI(a)}if(n||!n&&!i)if((qh(t)!=="body"||Jx(a))&&(o=zT(t)),n){let p=Gh(t,!0,i,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else a&&c();i&&!n&&a&&c();let u=a&&!n&&!i?ure(a,o):Ec(0),d=s.left+o.scrollLeft-l.x-u.x,f=s.top+o.scrollTop-l.y-u.y;return{x:d,y:f,width:s.width,height:s.height}}function z3(e){return Xl(e).position==="static"}function ore(e,t){if(!Nc(e)||Xl(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Ac(e)===r&&(r=r.ownerDocument.body),r}function fre(e,t){let r=Po(e);if(jT(e))return r;if(!Nc(e)){let a=Od(e);for(;a&&!Hh(a);){if(Wl(a)&&!z3(a))return a;a=Od(a)}return r}let n=ore(e,t);for(;n&&rre(n)&&z3(n);)n=ore(n,t);return n&&Hh(n)&&z3(n)&&!WI(n)?r:n||nre(e)||r}var hYe=async function(e){let t=this.getOffsetParent||fre,r=this.getDimensions,n=await r(e.floating);return{reference:mYe(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function gYe(e){return Xl(e).direction==="rtl"}var pre={convertOffsetParentRelativeRectToViewportRelativeRect:iYe,getDocumentElement:Ac,getClippingRect:fYe,getOffsetParent:fre,getElementRects:hYe,getClientRects:sYe,getDimensions:pYe,getScale:Zx,isElement:Wl,isRTL:gYe};function mre(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function yYe(e,t){let r=null,n,a=Ac(e);function i(){var o;clearTimeout(n),(o=r)==null||o.disconnect(),r=null}function s(o,l){o===void 0&&(o=!1),l===void 0&&(l=1),i();let c=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=c;if(o||t(),!f||!p)return;let m=$T(d),h=$T(a.clientWidth-(u+f)),x=$T(a.clientHeight-(d+p)),g=$T(u),b={rootMargin:-m+"px "+-h+"px "+-x+"px "+-g+"px",threshold:$s(0,Iu(1,l))||1},S=!0;function w(E){let C=E[0].intersectionRatio;if(C!==l){if(!S)return s();C?s(!1,C):n=setTimeout(()=>{s(!1,1e-7)},1e3)}C===1&&!mre(c,e.getBoundingClientRect())&&s(),S=!1}try{r=new IntersectionObserver(w,{...b,root:a.ownerDocument})}catch{r=new IntersectionObserver(w,b)}r.observe(e)}return s(!0),i}function V3(e,t,r,n){n===void 0&&(n={});let{ancestorScroll:a=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:o=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=U3(e),u=a||i?[...c?Vh(c):[],...Vh(t)]:[];u.forEach(g=>{a&&g.addEventListener("scroll",r,{passive:!0}),i&&g.addEventListener("resize",r)});let d=c&&o?yYe(c,r):null,f=-1,p=null;s&&(p=new ResizeObserver(g=>{let[y]=g;y&&y.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var b;(b=p)==null||b.observe(t)})),r()}),c&&!l&&p.observe(c),p.observe(t));let m,h=l?Gh(e):null;l&&x();function x(){let g=Gh(e);h&&!mre(h,g)&&r(),h=g,m=requestAnimationFrame(x)}return r(),()=>{var g;u.forEach(y=>{a&&y.removeEventListener("scroll",r),i&&y.removeEventListener("resize",r)}),d?.(),(g=p)==null||g.disconnect(),p=null,l&&cancelAnimationFrame(m)}}var hre=Yte;var gre=Jte,yre=Kte,xre=Qte,bre=Wte,q3=Gte;var vre=Zte,H3=(e,t,r)=>{let n=new Map,a={platform:pre,...r},i={...a.platform,_c:n};return Hte(e,t,{...a,platform:i})};var Za=A(Le(),1),Tre=A(Le(),1),wre=A(Hf(),1),xYe=typeof document<"u",bYe=function(){},ZI=xYe?Tre.useLayoutEffect:bYe;function QI(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,a;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!QI(e[n],t[n]))return!1;return!0}if(a=Object.keys(e),r=a.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,a[n]))return!1;for(n=r;n--!==0;){let i=a[n];if(!(i==="_owner"&&e.$$typeof)&&!QI(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Cre(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Sre(e,t){let r=Cre(e);return Math.round(t*r)/r}function G3(e){let t=Za.useRef(e);return ZI(()=>{t.current=e}),t}function Pre(e){e===void 0&&(e={});let{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:a,elements:{reference:i,floating:s}={},transform:o=!0,whileElementsMounted:l,open:c}=e,[u,d]=Za.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=Za.useState(n);QI(f,n)||p(n);let[m,h]=Za.useState(null),[x,g]=Za.useState(null),y=Za.useCallback(k=>{k!==E.current&&(E.current=k,h(k))},[]),b=Za.useCallback(k=>{k!==C.current&&(C.current=k,g(k))},[]),S=i||m,w=s||x,E=Za.useRef(null),C=Za.useRef(null),N=Za.useRef(u),_=l!=null,O=G3(l),D=G3(a),W=G3(c),Z=Za.useCallback(()=>{if(!E.current||!C.current)return;let k={placement:t,strategy:r,middleware:f};D.current&&(k.platform=D.current),H3(E.current,C.current,k).then(L=>{let M={...L,isPositioned:W.current!==!1};me.current&&!QI(N.current,M)&&(N.current=M,wre.flushSync(()=>{d(M)}))})},[f,t,r,D,W]);ZI(()=>{c===!1&&N.current.isPositioned&&(N.current.isPositioned=!1,d(k=>({...k,isPositioned:!1})))},[c]);let me=Za.useRef(!1);ZI(()=>(me.current=!0,()=>{me.current=!1}),[]),ZI(()=>{if(S&&(E.current=S),w&&(C.current=w),S&&w){if(O.current)return O.current(S,w,Z);Z()}},[S,w,Z,O,_]);let Q=Za.useMemo(()=>({reference:E,floating:C,setReference:y,setFloating:b}),[y,b]),V=Za.useMemo(()=>({reference:S,floating:w}),[S,w]),U=Za.useMemo(()=>{let k={position:r,left:0,top:0};if(!V.floating)return k;let L=Sre(V.floating,u.x),M=Sre(V.floating,u.y);return o?{...k,transform:"translate("+L+"px, "+M+"px)",...Cre(V.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:L,top:M}},[r,o,V.floating,u.x,u.y]);return Za.useMemo(()=>({...u,update:Z,refs:Q,elements:V,floatingStyles:U}),[u,Z,Q,V,U])}var vYe=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){let{element:n,padding:a}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?q3({element:n.current,padding:a}).fn(r):{}:n?q3({element:n,padding:a}).fn(r):{}}}},Ere=(e,t)=>({...hre(e),options:[e,t]}),Ire=(e,t)=>({...gre(e),options:[e,t]}),Are=(e,t)=>({...vre(e),options:[e,t]}),Nre=(e,t)=>({...yre(e),options:[e,t]}),kre=(e,t)=>({...xre(e),options:[e,t]});var _re=(e,t)=>({...bre(e),options:[e,t]});var Lre=(e,t)=>({...vYe(e),options:[e,t]});var Rre=A(Le(),1);var K3=A(oe(),1),SYe="Arrow",Dre=Rre.forwardRef((e,t)=>{let{children:r,width:n=10,height:a=5,...i}=e;return(0,K3.jsx)(pt.svg,{...i,ref:t,width:n,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:(0,K3.jsx)("polygon",{points:"0,0 30,0 15,10"})})});Dre.displayName=SYe;var Mre=Dre;var Qx=A(Le(),1);function zn(e){let t=Qx.useRef(e);return Qx.useEffect(()=>{t.current=e}),Qx.useMemo(()=>(...r)=>t.current?.(...r),[])}var Dp=A(oe(),1);var W3="Popper",[Ore,Fd]=jn(W3),[wYe,Fre]=Ore(W3),Bre=e=>{let{__scopePopper:t,children:r}=e,[n,a]=Eo.useState(null);return(0,Dp.jsx)(wYe,{scope:t,anchor:n,onAnchorChange:a,children:r})};Bre.displayName=W3;var $re="PopperAnchor",jre=Eo.forwardRef((e,t)=>{let{__scopePopper:r,virtualRef:n,...a}=e,i=Fre($re,r),s=Eo.useRef(null),o=Xt(t,s),l=Eo.useRef(null);return Eo.useEffect(()=>{let c=l.current;l.current=n?.current||s.current,c!==l.current&&i.onAnchorChange(l.current)}),n?null:(0,Dp.jsx)(pt.div,{...a,ref:o})});jre.displayName=$re;var X3="PopperContent",[CYe,PYe]=Ore(X3),zre=Eo.forwardRef((e,t)=>{let{__scopePopper:r,side:n="bottom",sideOffset:a=0,align:i="center",alignOffset:s=0,arrowPadding:o=0,avoidCollisions:l=!0,collisionBoundary:c=[],collisionPadding:u=0,sticky:d="partial",hideWhenDetached:f=!1,updatePositionStrategy:p="optimized",onPlaced:m,...h}=e,x=Fre(X3,r),[g,y]=Eo.useState(null),b=Xt(t,I=>y(I)),[S,w]=Eo.useState(null),E=RI(S),C=E?.width??0,N=E?.height??0,_=n+(i!=="center"?"-"+i:""),O=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},D=Array.isArray(c)?c:[c],W=D.length>0,Z={padding:O,boundary:D.filter(IYe),altBoundary:W},{refs:me,floatingStyles:Q,placement:V,isPositioned:U,middlewareData:k}=Pre({strategy:"fixed",placement:_,whileElementsMounted:(...I)=>V3(...I,{animationFrame:p==="always"}),elements:{reference:x.anchor},middleware:[Ere({mainAxis:a+N,alignmentAxis:s}),l&&Ire({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?Are():void 0,...Z}),l&&Nre({...Z}),kre({...Z,apply:({elements:I,rects:K,availableWidth:he,availableHeight:q})=>{let{width:be,height:Ie}=K.reference,Ne=I.floating.style;Ne.setProperty("--radix-popper-available-width",`${he}px`),Ne.setProperty("--radix-popper-available-height",`${q}px`),Ne.setProperty("--radix-popper-anchor-width",`${be}px`),Ne.setProperty("--radix-popper-anchor-height",`${Ie}px`)}}),S&&Lre({element:S,padding:o}),AYe({arrowWidth:C,arrowHeight:N}),f&&_re({strategy:"referenceHidden",...Z})]}),[L,M]=qre(V),ee=zn(m);Nn(()=>{U&&ee?.()},[U,ee]);let se=k.arrow?.x,ne=k.arrow?.y,ge=k.arrow?.centerOffset!==0,[ue,H]=Eo.useState();return Nn(()=>{g&&H(window.getComputedStyle(g).zIndex)},[g]),(0,Dp.jsx)("div",{ref:me.setFloating,"data-radix-popper-content-wrapper":"",style:{...Q,transform:U?Q.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ue,["--radix-popper-transform-origin"]:[k.transformOrigin?.x,k.transformOrigin?.y].join(" "),...k.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,Dp.jsx)(CYe,{scope:r,placedSide:L,onArrowChange:w,arrowX:se,arrowY:ne,shouldHideArrow:ge,children:(0,Dp.jsx)(pt.div,{"data-side":L,"data-align":M,...h,ref:b,style:{...h.style,animation:U?void 0:"none"}})})})});zre.displayName=X3;var Ure="PopperArrow",EYe={top:"bottom",right:"left",bottom:"top",left:"right"},Vre=Eo.forwardRef(function(t,r){let{__scopePopper:n,...a}=t,i=PYe(Ure,n),s=EYe[i.placedSide];return(0,Dp.jsx)("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:(0,Dp.jsx)(Mre,{...a,ref:r,style:{...a.style,display:"block"}})})});Vre.displayName=Ure;function IYe(e){return e!==null}var AYe=e=>({name:"transformOrigin",options:e,fn(t){let{placement:r,rects:n,middlewareData:a}=t,s=a.arrow?.centerOffset!==0,o=s?0:e.arrowWidth,l=s?0:e.arrowHeight,[c,u]=qre(r),d={start:"0%",center:"50%",end:"100%"}[u],f=(a.arrow?.x??0)+o/2,p=(a.arrow?.y??0)+l/2,m="",h="";return c==="bottom"?(m=s?d:`${f}px`,h=`${-l}px`):c==="top"?(m=s?d:`${f}px`,h=`${n.floating.height+l}px`):c==="right"?(m=`${-l}px`,h=s?d:`${p}px`):c==="left"&&(m=`${n.floating.width+l}px`,h=s?d:`${p}px`),{data:{x:m,y:h}}}});function qre(e){let[t,r="center"]=e.split("-");return[t,r]}var Kh=Bre,eb=jre,tb=zre,rb=Vre;var eA=A(Le(),1),Hre=A(Hf(),1);var Gre=A(oe(),1),NYe="Portal",Bd=eA.forwardRef((e,t)=>{let{container:r,...n}=e,[a,i]=eA.useState(!1);Nn(()=>i(!0),[]);let s=r||a&&globalThis?.document?.body;return s?Hre.default.createPortal((0,Gre.jsx)(pt.div,{...n,ref:t}),s):null});Bd.displayName=NYe;var ga=A(Le(),1);var Kre=A(Le(),1);function Wre(e,t=globalThis?.document){let r=zn(e);Kre.useEffect(()=>{let n=a=>{a.key==="Escape"&&r(a)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var Z3=A(oe(),1),kYe="DismissableLayer",J3="dismissableLayer.update",_Ye="dismissableLayer.pointerDownOutside",LYe="dismissableLayer.focusOutside",Xre,Jre=ga.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),$d=ga.forwardRef((e,t)=>{let{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:a,onFocusOutside:i,onInteractOutside:s,onDismiss:o,...l}=e,c=ga.useContext(Jre),[u,d]=ga.useState(null),f=u?.ownerDocument??globalThis?.document,[,p]=ga.useState({}),m=Xt(t,C=>d(C)),h=Array.from(c.layers),[x]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),g=h.indexOf(x),y=u?h.indexOf(u):-1,b=c.layersWithOutsidePointerEventsDisabled.size>0,S=y>=g,w=MYe(C=>{let N=C.target,_=[...c.branches].some(O=>O.contains(N));!S||_||(a?.(C),s?.(C),C.defaultPrevented||o?.())},f),E=OYe(C=>{let N=C.target;[...c.branches].some(O=>O.contains(N))||(i?.(C),s?.(C),C.defaultPrevented||o?.())},f);return Wre(C=>{y===c.layers.size-1&&(n?.(C),!C.defaultPrevented&&o&&(C.preventDefault(),o()))},f),ga.useEffect(()=>{if(u)return r&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(Xre=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),Yre(),()=>{r&&c.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=Xre)}},[u,f,r,c]),ga.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),Yre())},[u,c]),ga.useEffect(()=>{let C=()=>p({});return document.addEventListener(J3,C),()=>document.removeEventListener(J3,C)},[]),(0,Z3.jsx)(pt.div,{...l,ref:m,style:{pointerEvents:b?S?"auto":"none":void 0,...e.style},onFocusCapture:tt(e.onFocusCapture,E.onFocusCapture),onBlurCapture:tt(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:tt(e.onPointerDownCapture,w.onPointerDownCapture)})});$d.displayName=kYe;var RYe="DismissableLayerBranch",DYe=ga.forwardRef((e,t)=>{let r=ga.useContext(Jre),n=ga.useRef(null),a=Xt(t,n);return ga.useEffect(()=>{let i=n.current;if(i)return r.branches.add(i),()=>{r.branches.delete(i)}},[r.branches]),(0,Z3.jsx)(pt.div,{...e,ref:a})});DYe.displayName=RYe;function MYe(e,t=globalThis?.document){let r=zn(e),n=ga.useRef(!1),a=ga.useRef(()=>{});return ga.useEffect(()=>{let i=o=>{if(o.target&&!n.current){let c=function(){Zre(_Ye,r,u,{discrete:!0})};var l=c;let u={originalEvent:o};o.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=c,t.addEventListener("click",a.current,{once:!0})):c()}else t.removeEventListener("click",a.current);n.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",i),t.removeEventListener("click",a.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function OYe(e,t=globalThis?.document){let r=zn(e),n=ga.useRef(!1);return ga.useEffect(()=>{let a=i=>{i.target&&!n.current&&Zre(LYe,r,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function Yre(){let e=new CustomEvent(J3);document.dispatchEvent(e)}function Zre(e,t,r,{discrete:n}){let a=r.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&a.addEventListener(e,t,{once:!0}),n?NI(a,i):a.dispatchEvent(i)}var FYe=A(oe());var Qre=A(oe());function nt({className:e,type:t,...r}){return(0,Qre.jsx)("input",{type:t,"data-slot":"input",className:le("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-8 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...r})}var ene=A(Le(),1);var tne=A(oe(),1),BYe="Label",rne=ene.forwardRef((e,t)=>(0,tne.jsx)(pt.label,{...e,ref:t,onMouseDown:r=>{r.target.closest("button, input, select, textarea")||(e.onMouseDown?.(r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));rne.displayName=BYe;var nne=rne;var ane=A(oe());function Jr({className:e,...t}){return(0,ane.jsx)(nne,{"data-slot":"label",className:le("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}var Q3=A(Le(),1);var tA=A(oe(),1),e5="Progress",jYe=100,[zYe,lLt]=jn(e5),[UYe,VYe]=zYe(e5),one=Q3.forwardRef((e,t)=>{let{__scopeProgress:r,value:n=null,max:a,getValueLabel:i=qYe,...s}=e;(a||a===0)&&ine(a);let o=ine(a)?a:jYe;n!==null&&sne(n,o);let l=sne(n,o)?n:null,c=rA(l)?i(l,o):void 0;return(0,tA.jsx)(UYe,{scope:r,value:l,max:o,children:(0,tA.jsx)(pt.div,{"aria-valuemax":o,"aria-valuemin":0,"aria-valuenow":rA(l)?l:void 0,"aria-valuetext":c,role:"progressbar","data-state":une(l,o),"data-value":l??void 0,"data-max":o,...s,ref:t})})});one.displayName=e5;var lne="ProgressIndicator",cne=Q3.forwardRef((e,t)=>{let{__scopeProgress:r,...n}=e,a=VYe(lne,r);return(0,tA.jsx)(pt.div,{"data-state":une(a.value,a.max),"data-value":a.value??void 0,"data-max":a.max,...n,ref:t})});cne.displayName=lne;function qYe(e,t){return`${Math.round(e/t*100)}%`}function une(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function rA(e){return typeof e=="number"}function ine(e){return rA(e)&&!isNaN(e)&&e>0}function sne(e,t){return rA(e)&&!isNaN(e)&&e<=t&&e>=0}var dne=one,fne=cne;var t5=A(oe());function Mp({className:e,value:t,...r}){return(0,t5.jsx)(dne,{"data-slot":"progress",className:le("bg-primary/20 relative h-2 w-full overflow-hidden rounded-full",e),...r,children:(0,t5.jsx)(fne,{"data-slot":"progress-indicator",className:"bg-primary h-full w-full flex-1 transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})})}var jt=A(Le(),1);var nA=A(Le(),1),GYe=A(oe(),1),KYe=nA.createContext(void 0);function ku(e){let t=nA.useContext(KYe);return e||t||"ltr"}function UT(e,[t,r]){return Math.min(r,Math.max(t,e))}var mne=A(Le(),1),pn=A(oe(),1);function WYe(e,t){return mne.useReducer((r,n)=>t[r][n]??r,e)}var r5="ScrollArea",[hne,TLt]=jn(r5),[XYe,Yl]=hne(r5),gne=jt.forwardRef((e,t)=>{let{__scopeScrollArea:r,type:n="hover",dir:a,scrollHideDelay:i=600,...s}=e,[o,l]=jt.useState(null),[c,u]=jt.useState(null),[d,f]=jt.useState(null),[p,m]=jt.useState(null),[h,x]=jt.useState(null),[g,y]=jt.useState(0),[b,S]=jt.useState(0),[w,E]=jt.useState(!1),[C,N]=jt.useState(!1),_=Xt(t,D=>l(D)),O=ku(a);return(0,pn.jsx)(XYe,{scope:r,type:n,dir:O,scrollHideDelay:i,scrollArea:o,viewport:c,onViewportChange:u,content:d,onContentChange:f,scrollbarX:p,onScrollbarXChange:m,scrollbarXEnabled:w,onScrollbarXEnabledChange:E,scrollbarY:h,onScrollbarYChange:x,scrollbarYEnabled:C,onScrollbarYEnabledChange:N,onCornerWidthChange:y,onCornerHeightChange:S,children:(0,pn.jsx)(pt.div,{dir:O,...s,ref:_,style:{position:"relative",["--radix-scroll-area-corner-width"]:g+"px",["--radix-scroll-area-corner-height"]:b+"px",...e.style}})})});gne.displayName=r5;var yne="ScrollAreaViewport",xne=jt.forwardRef((e,t)=>{let{__scopeScrollArea:r,children:n,nonce:a,...i}=e,s=Yl(yne,r),o=jt.useRef(null),l=Xt(t,o,s.onViewportChange);return(0,pn.jsxs)(pn.Fragment,{children:[(0,pn.jsx)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:a}),(0,pn.jsx)(pt.div,{"data-radix-scroll-area-viewport":"",...i,ref:l,style:{overflowX:s.scrollbarXEnabled?"scroll":"hidden",overflowY:s.scrollbarYEnabled?"scroll":"hidden",...e.style},children:(0,pn.jsx)("div",{ref:s.onContentChange,style:{minWidth:"100%",display:"table"},children:n})})]})});xne.displayName=yne;var _u="ScrollAreaScrollbar",n5=jt.forwardRef((e,t)=>{let{forceMount:r,...n}=e,a=Yl(_u,e.__scopeScrollArea),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:s}=a,o=e.orientation==="horizontal";return jt.useEffect(()=>(o?i(!0):s(!0),()=>{o?i(!1):s(!1)}),[o,i,s]),a.type==="hover"?(0,pn.jsx)(YYe,{...n,ref:t,forceMount:r}):a.type==="scroll"?(0,pn.jsx)(JYe,{...n,ref:t,forceMount:r}):a.type==="auto"?(0,pn.jsx)(bne,{...n,ref:t,forceMount:r}):a.type==="always"?(0,pn.jsx)(a5,{...n,ref:t}):null});n5.displayName=_u;var YYe=jt.forwardRef((e,t)=>{let{forceMount:r,...n}=e,a=Yl(_u,e.__scopeScrollArea),[i,s]=jt.useState(!1);return jt.useEffect(()=>{let o=a.scrollArea,l=0;if(o){let c=()=>{window.clearTimeout(l),s(!0)},u=()=>{l=window.setTimeout(()=>s(!1),a.scrollHideDelay)};return o.addEventListener("pointerenter",c),o.addEventListener("pointerleave",u),()=>{window.clearTimeout(l),o.removeEventListener("pointerenter",c),o.removeEventListener("pointerleave",u)}}},[a.scrollArea,a.scrollHideDelay]),(0,pn.jsx)(ia,{present:r||i,children:(0,pn.jsx)(bne,{"data-state":i?"visible":"hidden",...n,ref:t})})}),JYe=jt.forwardRef((e,t)=>{let{forceMount:r,...n}=e,a=Yl(_u,e.__scopeScrollArea),i=e.orientation==="horizontal",s=oA(()=>l("SCROLL_END"),100),[o,l]=WYe("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return jt.useEffect(()=>{if(o==="idle"){let c=window.setTimeout(()=>l("HIDE"),a.scrollHideDelay);return()=>window.clearTimeout(c)}},[o,a.scrollHideDelay,l]),jt.useEffect(()=>{let c=a.viewport,u=i?"scrollLeft":"scrollTop";if(c){let d=c[u],f=()=>{let p=c[u];d!==p&&(l("SCROLL"),s()),d=p};return c.addEventListener("scroll",f),()=>c.removeEventListener("scroll",f)}},[a.viewport,i,l,s]),(0,pn.jsx)(ia,{present:r||o!=="hidden",children:(0,pn.jsx)(a5,{"data-state":o==="hidden"?"hidden":"visible",...n,ref:t,onPointerEnter:tt(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:tt(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),bne=jt.forwardRef((e,t)=>{let r=Yl(_u,e.__scopeScrollArea),{forceMount:n,...a}=e,[i,s]=jt.useState(!1),o=e.orientation==="horizontal",l=oA(()=>{if(r.viewport){let c=r.viewport.offsetWidth<r.viewport.scrollWidth,u=r.viewport.offsetHeight<r.viewport.scrollHeight;s(o?c:u)}},10);return nb(r.viewport,l),nb(r.content,l),(0,pn.jsx)(ia,{present:n||i,children:(0,pn.jsx)(a5,{"data-state":i?"visible":"hidden",...a,ref:t})})}),a5=jt.forwardRef((e,t)=>{let{orientation:r="vertical",...n}=e,a=Yl(_u,e.__scopeScrollArea),i=jt.useRef(null),s=jt.useRef(0),[o,l]=jt.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),c=wne(o.viewport,o.content),u={...n,sizes:o,onSizesChange:l,hasThumb:Boolean(c>0&&c<1),onThumbChange:f=>i.current=f,onThumbPointerUp:()=>s.current=0,onThumbPointerDown:f=>s.current=f};function d(f,p){return nJe(f,s.current,o,p)}return r==="horizontal"?(0,pn.jsx)(ZYe,{...u,ref:t,onThumbPositionChange:()=>{if(a.viewport&&i.current){let f=a.viewport.scrollLeft,p=pne(f,o,a.dir);i.current.style.transform=`translate3d(${p}px, 0, 0)`}},onWheelScroll:f=>{a.viewport&&(a.viewport.scrollLeft=f)},onDragScroll:f=>{a.viewport&&(a.viewport.scrollLeft=d(f,a.dir))}}):r==="vertical"?(0,pn.jsx)(QYe,{...u,ref:t,onThumbPositionChange:()=>{if(a.viewport&&i.current){let f=a.viewport.scrollTop,p=pne(f,o);i.current.style.transform=`translate3d(0, ${p}px, 0)`}},onWheelScroll:f=>{a.viewport&&(a.viewport.scrollTop=f)},onDragScroll:f=>{a.viewport&&(a.viewport.scrollTop=d(f))}}):null}),ZYe=jt.forwardRef((e,t)=>{let{sizes:r,onSizesChange:n,...a}=e,i=Yl(_u,e.__scopeScrollArea),[s,o]=jt.useState(),l=jt.useRef(null),c=Xt(t,l,i.onScrollbarXChange);return jt.useEffect(()=>{l.current&&o(getComputedStyle(l.current))},[l]),(0,pn.jsx)(Sne,{"data-orientation":"horizontal",...a,ref:c,sizes:r,style:{bottom:0,left:i.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:i.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,["--radix-scroll-area-thumb-width"]:sA(r)+"px",...e.style},onThumbPointerDown:u=>e.onThumbPointerDown(u.x),onDragScroll:u=>e.onDragScroll(u.x),onWheelScroll:(u,d)=>{if(i.viewport){let f=i.viewport.scrollLeft+u.deltaX;e.onWheelScroll(f),Pne(f,d)&&u.preventDefault()}},onResize:()=>{l.current&&i.viewport&&s&&n({content:i.viewport.scrollWidth,viewport:i.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:iA(s.paddingLeft),paddingEnd:iA(s.paddingRight)}})}})}),QYe=jt.forwardRef((e,t)=>{let{sizes:r,onSizesChange:n,...a}=e,i=Yl(_u,e.__scopeScrollArea),[s,o]=jt.useState(),l=jt.useRef(null),c=Xt(t,l,i.onScrollbarYChange);return jt.useEffect(()=>{l.current&&o(getComputedStyle(l.current))},[l]),(0,pn.jsx)(Sne,{"data-orientation":"vertical",...a,ref:c,sizes:r,style:{top:0,right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)",["--radix-scroll-area-thumb-height"]:sA(r)+"px",...e.style},onThumbPointerDown:u=>e.onThumbPointerDown(u.y),onDragScroll:u=>e.onDragScroll(u.y),onWheelScroll:(u,d)=>{if(i.viewport){let f=i.viewport.scrollTop+u.deltaY;e.onWheelScroll(f),Pne(f,d)&&u.preventDefault()}},onResize:()=>{l.current&&i.viewport&&s&&n({content:i.viewport.scrollHeight,viewport:i.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:iA(s.paddingTop),paddingEnd:iA(s.paddingBottom)}})}})}),[eJe,vne]=hne(_u),Sne=jt.forwardRef((e,t)=>{let{__scopeScrollArea:r,sizes:n,hasThumb:a,onThumbChange:i,onThumbPointerUp:s,onThumbPointerDown:o,onThumbPositionChange:l,onDragScroll:c,onWheelScroll:u,onResize:d,...f}=e,p=Yl(_u,r),[m,h]=jt.useState(null),x=Xt(t,_=>h(_)),g=jt.useRef(null),y=jt.useRef(""),b=p.viewport,S=n.content-n.viewport,w=zn(u),E=zn(l),C=oA(d,10);function N(_){if(g.current){let O=_.clientX-g.current.left,D=_.clientY-g.current.top;c({x:O,y:D})}}return jt.useEffect(()=>{let _=O=>{let D=O.target;m?.contains(D)&&w(O,S)};return document.addEventListener("wheel",_,{passive:!1}),()=>document.removeEventListener("wheel",_,{passive:!1})},[b,m,S,w]),jt.useEffect(E,[n,E]),nb(m,C),nb(p.content,C),(0,pn.jsx)(eJe,{scope:r,scrollbar:m,hasThumb:a,onThumbChange:zn(i),onThumbPointerUp:zn(s),onThumbPositionChange:E,onThumbPointerDown:zn(o),children:(0,pn.jsx)(pt.div,{...f,ref:x,style:{position:"absolute",...f.style},onPointerDown:tt(e.onPointerDown,_=>{_.button===0&&(_.target.setPointerCapture(_.pointerId),g.current=m.getBoundingClientRect(),y.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",p.viewport&&(p.viewport.style.scrollBehavior="auto"),N(_))}),onPointerMove:tt(e.onPointerMove,N),onPointerUp:tt(e.onPointerUp,_=>{let O=_.target;O.hasPointerCapture(_.pointerId)&&O.releasePointerCapture(_.pointerId),document.body.style.webkitUserSelect=y.current,p.viewport&&(p.viewport.style.scrollBehavior=""),g.current=null})})})}),aA="ScrollAreaThumb",i5=jt.forwardRef((e,t)=>{let{forceMount:r,...n}=e,a=vne(aA,e.__scopeScrollArea);return(0,pn.jsx)(ia,{present:r||a.hasThumb,children:(0,pn.jsx)(tJe,{ref:t,...n})})}),tJe=jt.forwardRef((e,t)=>{let{__scopeScrollArea:r,style:n,...a}=e,i=Yl(aA,r),s=vne(aA,r),{onThumbPositionChange:o}=s,l=Xt(t,d=>s.onThumbChange(d)),c=jt.useRef(void 0),u=oA(()=>{c.current&&(c.current(),c.current=void 0)},100);return jt.useEffect(()=>{let d=i.viewport;if(d){let f=()=>{if(u(),!c.current){let p=aJe(d,o);c.current=p,o()}};return o(),d.addEventListener("scroll",f),()=>d.removeEventListener("scroll",f)}},[i.viewport,u,o]),(0,pn.jsx)(pt.div,{"data-state":s.hasThumb?"visible":"hidden",...a,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...n},onPointerDownCapture:tt(e.onPointerDownCapture,d=>{let p=d.target.getBoundingClientRect(),m=d.clientX-p.left,h=d.clientY-p.top;s.onThumbPointerDown({x:m,y:h})}),onPointerUp:tt(e.onPointerUp,s.onThumbPointerUp)})});i5.displayName=aA;var s5="ScrollAreaCorner",Tne=jt.forwardRef((e,t)=>{let r=Yl(s5,e.__scopeScrollArea),n=Boolean(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&n?(0,pn.jsx)(rJe,{...e,ref:t}):null});Tne.displayName=s5;var rJe=jt.forwardRef((e,t)=>{let{__scopeScrollArea:r,...n}=e,a=Yl(s5,r),[i,s]=jt.useState(0),[o,l]=jt.useState(0),c=Boolean(i&&o);return nb(a.scrollbarX,()=>{let u=a.scrollbarX?.offsetHeight||0;a.onCornerHeightChange(u),l(u)}),nb(a.scrollbarY,()=>{let u=a.scrollbarY?.offsetWidth||0;a.onCornerWidthChange(u),s(u)}),c?(0,pn.jsx)(pt.div,{...n,ref:t,style:{width:i,height:o,position:"absolute",right:a.dir==="ltr"?0:void 0,left:a.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function iA(e){return e?parseInt(e,10):0}function wne(e,t){let r=e/t;return isNaN(r)?0:r}function sA(e){let t=wne(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function nJe(e,t,r,n="ltr"){let a=sA(r),i=a/2,s=t||i,o=a-s,l=r.scrollbar.paddingStart+s,c=r.scrollbar.size-r.scrollbar.paddingEnd-o,u=r.content-r.viewport,d=n==="ltr"?[0,u]:[u*-1,0];return Cne([l,c],d)(e)}function pne(e,t,r="ltr"){let n=sA(t),a=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-a,s=t.content-t.viewport,o=i-n,l=r==="ltr"?[0,s]:[s*-1,0],c=UT(e,l);return Cne([0,s],[0,o])(c)}function Cne(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function Pne(e,t){return e>0&&e<t}var aJe=(e,t=()=>{})=>{let r={left:e.scrollLeft,top:e.scrollTop},n=0;return function a(){let i={left:e.scrollLeft,top:e.scrollTop},s=r.left!==i.left,o=r.top!==i.top;(s||o)&&t(),r=i,n=window.requestAnimationFrame(a)}(),()=>window.cancelAnimationFrame(n)};function oA(e,t){let r=zn(e),n=jt.useRef(0);return jt.useEffect(()=>()=>window.clearTimeout(n.current),[]),jt.useCallback(()=>{window.clearTimeout(n.current),n.current=window.setTimeout(r,t)},[r,t])}function nb(e,t){let r=zn(t);Nn(()=>{let n=0;if(e){let a=new ResizeObserver(()=>{cancelAnimationFrame(n),n=window.requestAnimationFrame(r)});return a.observe(e),()=>{window.cancelAnimationFrame(n),a.unobserve(e)}}},[e,r])}var Ene=gne,Ine=xne;var Ane=Tne;var Op=A(oe());function dr({className:e,children:t,viewportRef:r,...n}){return(0,Op.jsxs)(Ene,{"data-slot":"scroll-area",className:le("relative",e),...n,children:[(0,Op.jsx)(Ine,{"data-slot":"scroll-area-viewport",ref:r,className:"focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1",children:t}),(0,Op.jsx)(sJe,{}),(0,Op.jsx)(Ane,{})]})}function sJe({className:e,orientation:t="vertical",...r}){return(0,Op.jsx)(n5,{"data-slot":"scroll-area-scrollbar",orientation:t,className:le("flex touch-none p-px transition-colors select-none",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",e),...r,children:(0,Op.jsx)(i5,{"data-slot":"scroll-area-thumb",className:"bg-border relative flex-1 rounded-full"})})}var lt=A(Le(),1),R5=A(Hf(),1);var Fp=A(Le(),1);var Ti=A(Le(),1);var lA=A(oe(),1);function o5(e){let t=oJe(e),r=Ti.forwardRef((n,a)=>{let{children:i,...s}=n,o=Ti.Children.toArray(i),l=o.find(cJe);if(l){let c=l.props.children,u=o.map(d=>d===l?Ti.Children.count(c)>1?Ti.Children.only(null):Ti.isValidElement(c)?c.props.children:null:d);return(0,lA.jsx)(t,{...s,ref:a,children:Ti.isValidElement(c)?Ti.cloneElement(c,void 0,u):null})}return(0,lA.jsx)(t,{...s,ref:a,children:i})});return r.displayName=`${e}.Slot`,r}function oJe(e){let t=Ti.forwardRef((r,n)=>{let{children:a,...i}=r;if(Ti.isValidElement(a)){let s=dJe(a),o=uJe(i,a.props);return a.type!==Ti.Fragment&&(o.ref=n?ns(n,s):s),Ti.cloneElement(a,o)}return Ti.Children.count(a)>1?Ti.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var lJe=Symbol("radix.slottable");function cJe(e){return Ti.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===lJe}function uJe(e,t){let r={...t};for(let n in t){let a=e[n],i=t[n];/^on[A-Z]/.test(n)?a&&i?r[n]=(...o)=>{let l=i(...o);return a(...o),l}:a&&(r[n]=a):n==="style"?r[n]={...a,...i}:n==="className"&&(r[n]=[a,i].filter(Boolean).join(" "))}return{...e,...r}}function dJe(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var cA=A(oe(),1),fJe=A(Le(),1);var mJe=A(oe(),1);function ab(e){let t=e+"CollectionProvider",[r,n]=jn(t),[a,i]=r(t,{collectionRef:{current:null},itemMap:new Map}),s=h=>{let{scope:x,children:g}=h,y=Fp.default.useRef(null),b=Fp.default.useRef(new Map).current;return(0,cA.jsx)(a,{scope:x,itemMap:b,collectionRef:y,children:g})};s.displayName=t;let o=e+"CollectionSlot",l=o5(o),c=Fp.default.forwardRef((h,x)=>{let{scope:g,children:y}=h,b=i(o,g),S=Xt(x,b.collectionRef);return(0,cA.jsx)(l,{ref:S,children:y})});c.displayName=o;let u=e+"CollectionItemSlot",d="data-radix-collection-item",f=o5(u),p=Fp.default.forwardRef((h,x)=>{let{scope:g,children:y,...b}=h,S=Fp.default.useRef(null),w=Xt(x,S),E=i(u,g);return Fp.default.useEffect(()=>(E.itemMap.set(S,{ref:S,...b}),()=>void E.itemMap.delete(S))),(0,cA.jsx)(f,{[d]:"",ref:w,children:y})});p.displayName=u;function m(h){let x=i(e+"CollectionConsumer",h);return Fp.default.useCallback(()=>{let y=x.collectionRef.current;if(!y)return[];let b=Array.from(y.querySelectorAll(`[${d}]`));return Array.from(x.itemMap.values()).sort((E,C)=>b.indexOf(E.ref.current)-b.indexOf(C.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:s,Slot:c,ItemSlot:p},m,n]}var Nne=new WeakMap,Qa,kc,kLt=(kc=class extends Map{constructor(r){super(r);wU(this,Qa,void 0);C_(this,Qa,[...super.keys()]),Nne.set(this,!0)}set(r,n){return Nne.get(this)&&(this.has(r)?ds(this,Qa)[ds(this,Qa).indexOf(r)]=r:ds(this,Qa).push(r)),super.set(r,n),this}insert(r,n,a){let i=this.has(n),s=ds(this,Qa).length,o=kne(r),l=o>=0?o:s+o,c=l<0||l>=s?-1:l;if(c===this.size||i&&c===this.size-1||c===-1)return this.set(n,a),this;let u=this.size+(i?0:1);o<0&&l++;let d=[...ds(this,Qa)],f,p=!1;for(let m=l;m<u;m++)if(l===m){let h=d[m];d[m]===n&&(h=d[m+1]),i&&this.delete(n),f=this.get(h),this.set(n,a)}else{!p&&d[m-1]===n&&(p=!0);let h=d[p?m:m-1],x=f;f=this.get(h),this.delete(h),this.set(h,x)}return this}with(r,n,a){let i=new kc(this);return i.insert(r,n,a),i}before(r){let n=ds(this,Qa).indexOf(r)-1;if(!(n<0))return this.entryAt(n)}setBefore(r,n,a){let i=ds(this,Qa).indexOf(r);return i===-1?this:this.insert(i,n,a)}after(r){let n=ds(this,Qa).indexOf(r);if(n=n===-1||n===this.size-1?-1:n+1,n!==-1)return this.entryAt(n)}setAfter(r,n,a){let i=ds(this,Qa).indexOf(r);return i===-1?this:this.insert(i+1,n,a)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return C_(this,Qa,[]),super.clear()}delete(r){let n=super.delete(r);return n&&ds(this,Qa).splice(ds(this,Qa).indexOf(r),1),n}deleteAt(r){let n=this.keyAt(r);return n!==void 0?this.delete(n):!1}at(r){let n=l5(ds(this,Qa),r);if(n!==void 0)return this.get(n)}entryAt(r){let n=l5(ds(this,Qa),r);if(n!==void 0)return[n,this.get(n)]}indexOf(r){return ds(this,Qa).indexOf(r)}keyAt(r){return l5(ds(this,Qa),r)}from(r,n){let a=this.indexOf(r);if(a===-1)return;let i=a+n;return i<0&&(i=0),i>=this.size&&(i=this.size-1),this.at(i)}keyFrom(r,n){let a=this.indexOf(r);if(a===-1)return;let i=a+n;return i<0&&(i=0),i>=this.size&&(i=this.size-1),this.keyAt(i)}find(r,n){let a=0;for(let i of this){if(Reflect.apply(r,n,[i,a,this]))return i;a++}}findIndex(r,n){let a=0;for(let i of this){if(Reflect.apply(r,n,[i,a,this]))return a;a++}return-1}filter(r,n){let a=[],i=0;for(let s of this)Reflect.apply(r,n,[s,i,this])&&a.push(s),i++;return new kc(a)}map(r,n){let a=[],i=0;for(let s of this)a.push([s[0],Reflect.apply(r,n,[s,i,this])]),i++;return new kc(a)}reduce(...r){let[n,a]=r,i=0,s=a??this.at(0);for(let o of this)i===0&&r.length===1?s=o:s=Reflect.apply(n,this,[s,o,i,this]),i++;return s}reduceRight(...r){let[n,a]=r,i=a??this.at(-1);for(let s=this.size-1;s>=0;s--){let o=this.at(s);s===this.size-1&&r.length===1?i=o:i=Reflect.apply(n,this,[i,o,s,this])}return i}toSorted(r){let n=[...this.entries()].sort(r);return new kc(n)}toReversed(){let r=new kc;for(let n=this.size-1;n>=0;n--){let a=this.keyAt(n),i=this.get(a);r.set(a,i)}return r}toSpliced(...r){let n=[...this.entries()];return n.splice(...r),new kc(n)}slice(r,n){let a=new kc,i=this.size-1;if(r===void 0)return a;r<0&&(r=r+this.size),n!==void 0&&n>0&&(i=n-1);for(let s=r;s<=i;s++){let o=this.keyAt(s),l=this.get(o);a.set(o,l)}return a}every(r,n){let a=0;for(let i of this){if(!Reflect.apply(r,n,[i,a,this]))return!1;a++}return!0}some(r,n){let a=0;for(let i of this){if(Reflect.apply(r,n,[i,a,this]))return!0;a++}return!1}},Qa=new WeakMap,kc);function l5(e,t){if("at"in Array.prototype)return Array.prototype.at.call(e,t);let r=pJe(e,t);return r===-1?void 0:e[r]}function pJe(e,t){let r=e.length,n=kne(t),a=n>=0?n:r+n;return a<0||a>=r?-1:a}function kne(e){return e!==e||e===0?0:Math.trunc(e)}var Lne=A(Le(),1),c5=0;function ib(){Lne.useEffect(()=>{let e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??_ne()),document.body.insertAdjacentElement("beforeend",e[1]??_ne()),c5++,()=>{c5===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),c5--}},[])}function _ne(){let e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Jl=A(Le(),1);var Fne=A(oe(),1),u5="focusScope.autoFocusOnMount",d5="focusScope.autoFocusOnUnmount",Rne={bubbles:!1,cancelable:!0},hJe="FocusScope",Wh=Jl.forwardRef((e,t)=>{let{loop:r=!1,trapped:n=!1,onMountAutoFocus:a,onUnmountAutoFocus:i,...s}=e,[o,l]=Jl.useState(null),c=zn(a),u=zn(i),d=Jl.useRef(null),f=Xt(t,h=>l(h)),p=Jl.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;Jl.useEffect(()=>{if(n){let y=function(E){if(p.paused||!o)return;let C=E.target;o.contains(C)?d.current=C:Bp(d.current,{select:!0})},b=function(E){if(p.paused||!o)return;let C=E.relatedTarget;C!==null&&(o.contains(C)||Bp(d.current,{select:!0}))},S=function(E){if(document.activeElement===document.body)for(let N of E)N.removedNodes.length>0&&Bp(o)};var h=y,x=b,g=S;document.addEventListener("focusin",y),document.addEventListener("focusout",b);let w=new MutationObserver(S);return o&&w.observe(o,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",b),w.disconnect()}}},[n,o,p.paused]),Jl.useEffect(()=>{if(o){Mne.add(p);let h=document.activeElement;if(!o.contains(h)){let g=new CustomEvent(u5,Rne);o.addEventListener(u5,c),o.dispatchEvent(g),g.defaultPrevented||(gJe(SJe(Bne(o)),{select:!0}),document.activeElement===h&&Bp(o))}return()=>{o.removeEventListener(u5,c),setTimeout(()=>{let g=new CustomEvent(d5,Rne);o.addEventListener(d5,u),o.dispatchEvent(g),g.defaultPrevented||Bp(h??document.body,{select:!0}),o.removeEventListener(d5,u),Mne.remove(p)},0)}}},[o,c,u,p]);let m=Jl.useCallback(h=>{if(!r&&!n||p.paused)return;let x=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,g=document.activeElement;if(x&&g){let y=h.currentTarget,[b,S]=yJe(y);b&&S?!h.shiftKey&&g===S?(h.preventDefault(),r&&Bp(b,{select:!0})):h.shiftKey&&g===b&&(h.preventDefault(),r&&Bp(S,{select:!0})):g===y&&h.preventDefault()}},[r,n,p.paused]);return(0,Fne.jsx)(pt.div,{tabIndex:-1,...s,ref:f,onKeyDown:m})});Wh.displayName=hJe;function gJe(e,{select:t=!1}={}){let r=document.activeElement;for(let n of e)if(Bp(n,{select:t}),document.activeElement!==r)return}function yJe(e){let t=Bne(e),r=Dne(t,e),n=Dne(t.reverse(),e);return[r,n]}function Bne(e){let t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{let a=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||a?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Dne(e,t){for(let r of e)if(!xJe(r,{upTo:t}))return r}function xJe(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function bJe(e){return e instanceof HTMLInputElement&&"select"in e}function Bp(e,{select:t=!1}={}){if(e&&e.focus){let r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&bJe(e)&&t&&e.select()}}var Mne=vJe();function vJe(){let e=[];return{add(t){let r=e[0];t!==r&&r?.pause(),e=One(e,t),e.unshift(t)},remove(t){e=One(e,t),e[0]?.resume()}}}function One(e,t){let r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function SJe(e){return e.filter(t=>t.tagName!=="A")}var f5=A(Le(),1);var TJe=f5[" useId ".trim().toString()]||(()=>{}),wJe=0;function Ea(e){let[t,r]=f5.useState(TJe());return Nn(()=>{e||r(n=>n??String(wJe++))},[e]),e||(t?`radix-${t}`:"")}var wi=A(Le(),1);var uA=A(oe(),1);function $ne(e){let t=CJe(e),r=wi.forwardRef((n,a)=>{let{children:i,...s}=n,o=wi.Children.toArray(i),l=o.find(EJe);if(l){let c=l.props.children,u=o.map(d=>d===l?wi.Children.count(c)>1?wi.Children.only(null):wi.isValidElement(c)?c.props.children:null:d);return(0,uA.jsx)(t,{...s,ref:a,children:wi.isValidElement(c)?wi.cloneElement(c,void 0,u):null})}return(0,uA.jsx)(t,{...s,ref:a,children:i})});return r.displayName=`${e}.Slot`,r}function CJe(e){let t=wi.forwardRef((r,n)=>{let{children:a,...i}=r;if(wi.isValidElement(a)){let s=AJe(a),o=IJe(i,a.props);return a.type!==wi.Fragment&&(o.ref=n?ns(n,s):s),wi.cloneElement(a,o)}return wi.Children.count(a)>1?wi.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var PJe=Symbol("radix.slottable");function EJe(e){return wi.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===PJe}function IJe(e,t){let r={...t};for(let n in t){let a=e[n],i=t[n];/^on[A-Z]/.test(n)?a&&i?r[n]=(...o)=>{let l=i(...o);return a(...o),l}:a&&(r[n]=a):n==="style"?r[n]={...a,...i}:n==="className"&&(r[n]=[a,i].filter(Boolean).join(" "))}return{...e,...r}}function AJe(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var jne=A(Le(),1);var zne=A(oe(),1),p5=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),NJe="VisuallyHidden",Une=jne.forwardRef((e,t)=>(0,zne.jsx)(pt.span,{...e,ref:t,style:{...p5,...e.style}}));Une.displayName=NJe;var Vne=Une;var _Je=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},sb=new WeakMap,dA=new WeakMap,fA={},m5=0,qne=function(e){return e&&(e.host||qne(e.parentNode))},LJe=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=qne(r);return n&&e.contains(n)?n:null}).filter(function(r){return Boolean(r)})},RJe=function(e,t,r,n){var a=LJe(t,Array.isArray(e)?e:[e]);fA[r]||(fA[r]=new WeakMap);var i=fA[r],s=[],o=new Set,l=new Set(a),c=function(d){!d||o.has(d)||(o.add(d),c(d.parentNode))};a.forEach(c);var u=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(f){if(o.has(f))u(f);else try{var p=f.getAttribute(n),m=p!==null&&p!=="false",h=(sb.get(f)||0)+1,x=(i.get(f)||0)+1;sb.set(f,h),i.set(f,x),s.push(f),h===1&&m&&dA.set(f,!0),x===1&&f.setAttribute(r,"true"),m||f.setAttribute(n,"true")}catch{}})};return u(t),o.clear(),m5++,function(){s.forEach(function(d){var f=sb.get(d)-1,p=i.get(d)-1;sb.set(d,f),i.set(d,p),f||(dA.has(d)||d.removeAttribute(n),dA.delete(d)),p||d.removeAttribute(r)}),m5--,m5||(sb=new WeakMap,sb=new WeakMap,dA=new WeakMap,fA={})}},ob=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),a=t||_Je(e);return a?(n.push.apply(n,Array.from(a.querySelectorAll("[aria-live], script"))),RJe(n,a,r,"aria-hidden")):function(){return null}};var Io=function(){return Io=Object.assign||function(t){for(var r,n=1,a=arguments.length;n<a;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},Io.apply(this,arguments)};function pA(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r}function Hne(e,t,r){if(r||arguments.length===2)for(var n=0,a=t.length,i;n<a;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}var xA=A(Le());var gs=A(Le());var Xh="right-scroll-bar-position",Yh="width-before-scroll-bar",h5="with-scroll-bars-hidden",g5="--removed-body-scroll-bar-size";function mA(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}var Gne=A(Le());function Kne(e,t){var r=(0,Gne.useState)(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var a=r.value;a!==n&&(r.value=n,r.callback(n,a))}}}})[0];return r.callback=t,r.facade}var hA=A(Le());var DJe=typeof window<"u"?hA.useLayoutEffect:hA.useEffect,Wne=new WeakMap;function y5(e,t){var r=Kne(t||null,function(n){return e.forEach(function(a){return mA(a,n)})});return DJe(function(){var n=Wne.get(r);if(n){var a=new Set(n),i=new Set(e),s=r.current;a.forEach(function(o){i.has(o)||mA(o,null)}),i.forEach(function(o){a.has(o)||mA(o,s)})}Wne.set(r,e)},[e]),r}function MJe(e){return e}function OJe(e,t){t===void 0&&(t=MJe);var r=[],n=!1,a={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(i){var s=t(i,n);return r.push(s),function(){r=r.filter(function(o){return o!==s})}},assignSyncMedium:function(i){for(n=!0;r.length;){var s=r;r=[],s.forEach(i)}r={push:function(o){return i(o)},filter:function(){return r}}},assignMedium:function(i){n=!0;var s=[];if(r.length){var o=r;r=[],o.forEach(i),s=r}var l=function(){var u=s;s=[],u.forEach(i)},c=function(){return Promise.resolve().then(l)};c(),r={push:function(u){s.push(u),c()},filter:function(u){return s=s.filter(u),r}}}};return a}function x5(e){e===void 0&&(e={});var t=OJe(null);return t.options=Io({async:!0,ssr:!1},e),t}var Xne=A(Le()),Yne=function(e){var t=e.sideCar,r=pA(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return Xne.createElement(n,Io({},r))};Yne.isSideCarExport=!0;function b5(e,t){return e.useMedium(t),Yne}var gA=x5();var v5=function(){},VT=gs.forwardRef(function(e,t){var r=gs.useRef(null),n=gs.useState({onScrollCapture:v5,onWheelCapture:v5,onTouchMoveCapture:v5}),a=n[0],i=n[1],s=e.forwardProps,o=e.children,l=e.className,c=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,x=e.allowPinchZoom,g=e.as,y=g===void 0?"div":g,b=e.gapMode,S=pA(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),w=f,E=y5([r,t]),C=Io(Io({},S),a);return gs.createElement(gs.Fragment,null,u&&gs.createElement(w,{sideCar:gA,removeScrollBar:c,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:i,allowPinchZoom:!!x,lockRef:r,gapMode:b}),s?gs.cloneElement(gs.Children.only(o),Io(Io({},C),{ref:E})):gs.createElement(y,Io({},C,{className:l,ref:E}),o))});VT.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};VT.classNames={fullWidth:Yh,zeroRight:Xh};var Zn=A(Le());var cb=A(Le());var Qne=A(Le());var Jne;var Zne=function(){if(Jne)return Jne;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function FJe(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Zne();return t&&e.setAttribute("nonce",t),e}function BJe(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function $Je(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var S5=function(){var e=0,t=null;return{add:function(r){e==0&&(t=FJe())&&(BJe(t,r),$Je(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}};var T5=function(){var e=S5();return function(t,r){Qne.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}};var qT=function(){var e=T5(),t=function(r){var n=r.styles,a=r.dynamic;return e(n,a),null};return t};var jJe={left:0,top:0,right:0,gap:0},w5=function(e){return parseInt(e||"",10)||0},zJe=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],a=t[e==="padding"?"paddingRight":"marginRight"];return[w5(r),w5(n),w5(a)]},C5=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return jJe;var t=zJe(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}};var UJe=qT(),lb="data-scroll-locked",VJe=function(e,t,r,n){var a=e.left,i=e.top,s=e.right,o=e.gap;return r===void 0&&(r="margin"),`
.`.concat(h5,` {
overflow: hidden `).concat(n,`;
padding-right: `).concat(o,"px ").concat(n,`;
}
body[`).concat(lb,`] {
overflow: hidden `).concat(n,`;
overscroll-behavior: contain;
`).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&`
padding-left: `.concat(a,`px;
padding-top: `).concat(i,`px;
padding-right: `).concat(s,`px;
margin-left:0;
margin-top:0;
margin-right: `).concat(o,"px ").concat(n,`;
`),r==="padding"&&"padding-right: ".concat(o,"px ").concat(n,";")].filter(Boolean).join(""),`
}
.`).concat(Xh,` {
right: `).concat(o,"px ").concat(n,`;
}
.`).concat(Yh,` {
margin-right: `).concat(o,"px ").concat(n,`;
}
.`).concat(Xh," .").concat(Xh,` {
right: 0 `).concat(n,`;
}
.`).concat(Yh," .").concat(Yh,` {
margin-right: 0 `).concat(n,`;
}
body[`).concat(lb,`] {
`).concat(g5,": ").concat(o,`px;
}
`)},eae=function(){var e=parseInt(document.body.getAttribute(lb)||"0",10);return isFinite(e)?e:0},qJe=function(){cb.useEffect(function(){return document.body.setAttribute(lb,(eae()+1).toString()),function(){var e=eae()-1;e<=0?document.body.removeAttribute(lb):document.body.setAttribute(lb,e.toString())}},[])},P5=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,a=n===void 0?"margin":n;qJe();var i=cb.useMemo(function(){return C5(a)},[a]);return cb.createElement(UJe,{styles:VJe(i,!t,a,r?"":"!important")})};var E5=!1;if(typeof window<"u")try{HT=Object.defineProperty({},"passive",{get:function(){return E5=!0,!0}}),window.addEventListener("test",HT,HT),window.removeEventListener("test",HT,HT)}catch{E5=!1}var HT,Jh=E5?{passive:!1}:!1;var HJe=function(e){return e.tagName==="TEXTAREA"},tae=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!HJe(e)&&r[t]==="visible")},GJe=function(e){return tae(e,"overflowY")},KJe=function(e){return tae(e,"overflowX")},I5=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var a=rae(e,n);if(a){var i=nae(e,n),s=i[1],o=i[2];if(s>o)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},WJe=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},XJe=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},rae=function(e,t){return e==="v"?GJe(t):KJe(t)},nae=function(e,t){return e==="v"?WJe(t):XJe(t)},YJe=function(e,t){return e==="h"&&t==="rtl"?-1:1},aae=function(e,t,r,n,a){var i=YJe(e,window.getComputedStyle(t).direction),s=i*n,o=r.target,l=t.contains(o),c=!1,u=s>0,d=0,f=0;do{if(!o)break;var p=nae(e,o),m=p[0],h=p[1],x=p[2],g=h-x-i*m;(m||g)&&rae(e,o)&&(d+=g,f+=m);var y=o.parentNode;o=y&&y.nodeType===Node.DOCUMENT_FRAGMENT_NODE?y.host:y}while(!l&&o!==document.body||l&&(t.contains(o)||t===o));return(u&&(a&&Math.abs(d)<1||!a&&s>d)||!u&&(a&&Math.abs(f)<1||!a&&-s>f))&&(c=!0),c};var yA=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},iae=function(e){return[e.deltaX,e.deltaY]},sae=function(e){return e&&"current"in e?e.current:e},JJe=function(e,t){return e[0]===t[0]&&e[1]===t[1]},ZJe=function(e){return`
.block-interactivity-`.concat(e,` {pointer-events: none;}
.allow-interactivity-`).concat(e,` {pointer-events: all;}
`)},QJe=0,ub=[];function oae(e){var t=Zn.useRef([]),r=Zn.useRef([0,0]),n=Zn.useRef(),a=Zn.useState(QJe++)[0],i=Zn.useState(qT)[0],s=Zn.useRef(e);Zn.useEffect(function(){s.current=e},[e]),Zn.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var h=Hne([e.lockRef.current],(e.shards||[]).map(sae),!0).filter(Boolean);return h.forEach(function(x){return x.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),h.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var o=Zn.useCallback(function(h,x){if("touches"in h&&h.touches.length===2||h.type==="wheel"&&h.ctrlKey)return!s.current.allowPinchZoom;var g=yA(h),y=r.current,b="deltaX"in h?h.deltaX:y[0]-g[0],S="deltaY"in h?h.deltaY:y[1]-g[1],w,E=h.target,C=Math.abs(b)>Math.abs(S)?"h":"v";if("touches"in h&&C==="h"&&E.type==="range")return!1;var N=I5(C,E);if(!N)return!0;if(N?w=C:(w=C==="v"?"h":"v",N=I5(C,E)),!N)return!1;if(!n.current&&"changedTouches"in h&&(b||S)&&(n.current=w),!w)return!0;var _=n.current||w;return aae(_,x,h,_==="h"?b:S,!0)},[]),l=Zn.useCallback(function(h){var x=h;if(!(!ub.length||ub[ub.length-1]!==i)){var g="deltaY"in x?iae(x):yA(x),y=t.current.filter(function(w){return w.name===x.type&&(w.target===x.target||x.target===w.shadowParent)&&JJe(w.delta,g)})[0];if(y&&y.should){x.cancelable&&x.preventDefault();return}if(!y){var b=(s.current.shards||[]).map(sae).filter(Boolean).filter(function(w){return w.contains(x.target)}),S=b.length>0?o(x,b[0]):!s.current.noIsolation;S&&x.cancelable&&x.preventDefault()}}},[]),c=Zn.useCallback(function(h,x,g,y){var b={name:h,delta:x,target:g,should:y,shadowParent:eZe(g)};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(S){return S!==b})},1)},[]),u=Zn.useCallback(function(h){r.current=yA(h),n.current=void 0},[]),d=Zn.useCallback(function(h){c(h.type,iae(h),h.target,o(h,e.lockRef.current))},[]),f=Zn.useCallback(function(h){c(h.type,yA(h),h.target,o(h,e.lockRef.current))},[]);Zn.useEffect(function(){return ub.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",l,Jh),document.addEventListener("touchmove",l,Jh),document.addEventListener("touchstart",u,Jh),function(){ub=ub.filter(function(h){return h!==i}),document.removeEventListener("wheel",l,Jh),document.removeEventListener("touchmove",l,Jh),document.removeEventListener("touchstart",u,Jh)}},[]);var p=e.removeScrollBar,m=e.inert;return Zn.createElement(Zn.Fragment,null,m?Zn.createElement(i,{styles:ZJe(a)}):null,p?Zn.createElement(P5,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function eZe(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var lae=b5(gA,oae);var cae=xA.forwardRef(function(e,t){return xA.createElement(VT,Io({},e,{ref:t,sideCar:lae}))});cae.classNames=VT.classNames;var Zh=cae;var Yt=A(oe(),1),tZe=[" ","Enter","ArrowUp","ArrowDown"],rZe=[" ","Enter"],Qh="Select",[vA,SA,nZe]=ab(Qh),[db,bDt]=jn(Qh,[nZe,Fd]),TA=Fd(),[aZe,$p]=db(Qh),[iZe,sZe]=db(Qh),uae=e=>{let{__scopeSelect:t,children:r,open:n,defaultOpen:a,onOpenChange:i,value:s,defaultValue:o,onValueChange:l,dir:c,name:u,autoComplete:d,disabled:f,required:p,form:m}=e,h=TA(t),[x,g]=lt.useState(null),[y,b]=lt.useState(null),[S,w]=lt.useState(!1),E=ku(c),[C,N]=as({prop:n,defaultProp:a??!1,onChange:i,caller:Qh}),[_,O]=as({prop:s,defaultProp:o,onChange:l,caller:Qh}),D=lt.useRef(null),W=x?m||!!x.closest("form"):!0,[Z,me]=lt.useState(new Set),Q=Array.from(Z).map(V=>V.props.value).join(";");return(0,Yt.jsx)(Kh,{...h,children:(0,Yt.jsxs)(aZe,{required:p,scope:t,trigger:x,onTriggerChange:g,valueNode:y,onValueNodeChange:b,valueNodeHasChildren:S,onValueNodeHasChildrenChange:w,contentId:Ea(),value:_,onValueChange:O,open:C,onOpenChange:N,dir:E,triggerPointerDownPosRef:D,disabled:f,children:[(0,Yt.jsx)(vA.Provider,{scope:t,children:(0,Yt.jsx)(iZe,{scope:e.__scopeSelect,onNativeOptionAdd:lt.useCallback(V=>{me(U=>new Set(U).add(V))},[]),onNativeOptionRemove:lt.useCallback(V=>{me(U=>{let k=new Set(U);return k.delete(V),k})},[]),children:r})}),W?(0,Yt.jsxs)(Lae,{"aria-hidden":!0,required:p,tabIndex:-1,name:u,autoComplete:d,value:_,onChange:V=>O(V.target.value),disabled:f,form:m,children:[_===void 0?(0,Yt.jsx)("option",{value:""}):null,Array.from(Z)]},Q):null]})})};uae.displayName=Qh;var dae="SelectTrigger",fae=lt.forwardRef((e,t)=>{let{__scopeSelect:r,disabled:n=!1,...a}=e,i=TA(r),s=$p(dae,r),o=s.disabled||n,l=Xt(t,s.onTriggerChange),c=SA(r),u=lt.useRef("touch"),[d,f,p]=Dae(h=>{let x=c().filter(b=>!b.disabled),g=x.find(b=>b.value===s.value),y=Mae(x,h,g);y!==void 0&&s.onValueChange(y.value)}),m=h=>{o||(s.onOpenChange(!0),p()),h&&(s.triggerPointerDownPosRef.current={x:Math.round(h.pageX),y:Math.round(h.pageY)})};return(0,Yt.jsx)(eb,{asChild:!0,...i,children:(0,Yt.jsx)(pt.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:o,"data-disabled":o?"":void 0,"data-placeholder":Rae(s.value)?"":void 0,...a,ref:l,onClick:tt(a.onClick,h=>{h.currentTarget.focus(),u.current!=="mouse"&&m(h)}),onPointerDown:tt(a.onPointerDown,h=>{u.current=h.pointerType;let x=h.target;x.hasPointerCapture(h.pointerId)&&x.releasePointerCapture(h.pointerId),h.button===0&&h.ctrlKey===!1&&h.pointerType==="mouse"&&(m(h),h.preventDefault())}),onKeyDown:tt(a.onKeyDown,h=>{let x=d.current!=="";!(h.ctrlKey||h.altKey||h.metaKey)&&h.key.length===1&&f(h.key),!(x&&h.key===" ")&&tZe.includes(h.key)&&(m(),h.preventDefault())})})})});fae.displayName=dae;var pae="SelectValue",mae=lt.forwardRef((e,t)=>{let{__scopeSelect:r,className:n,style:a,children:i,placeholder:s="",...o}=e,l=$p(pae,r),{onValueNodeHasChildrenChange:c}=l,u=i!==void 0,d=Xt(t,l.onValueNodeChange);return Nn(()=>{c(u)},[c,u]),(0,Yt.jsx)(pt.span,{...o,ref:d,style:{pointerEvents:"none"},children:Rae(l.value)?(0,Yt.jsx)(Yt.Fragment,{children:s}):i})});mae.displayName=pae;var oZe="SelectIcon",hae=lt.forwardRef((e,t)=>{let{__scopeSelect:r,children:n,...a}=e;return(0,Yt.jsx)(pt.span,{"aria-hidden":!0,...a,ref:t,children:n||"\u25BC"})});hae.displayName=oZe;var lZe="SelectPortal",gae=e=>(0,Yt.jsx)(Bd,{asChild:!0,...e});gae.displayName=lZe;var eg="SelectContent",yae=lt.forwardRef((e,t)=>{let r=$p(eg,e.__scopeSelect),[n,a]=lt.useState();if(Nn(()=>{a(new DocumentFragment)},[]),!r.open){let i=n;return i?R5.createPortal((0,Yt.jsx)(xae,{scope:e.__scopeSelect,children:(0,Yt.jsx)(vA.Slot,{scope:e.__scopeSelect,children:(0,Yt.jsx)("div",{children:e.children})})}),i):null}return(0,Yt.jsx)(bae,{...e,ref:t})});yae.displayName=eg;var _c=10,[xae,jp]=db(eg),cZe="SelectContentImpl",uZe=$ne("SelectContent.RemoveScroll"),bae=lt.forwardRef((e,t)=>{let{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:a,onEscapeKeyDown:i,onPointerDownOutside:s,side:o,sideOffset:l,align:c,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:x,...g}=e,y=$p(eg,r),[b,S]=lt.useState(null),[w,E]=lt.useState(null),C=Xt(t,I=>S(I)),[N,_]=lt.useState(null),[O,D]=lt.useState(null),W=SA(r),[Z,me]=lt.useState(!1),Q=lt.useRef(!1);lt.useEffect(()=>{if(b)return ob(b)},[b]),ib();let V=lt.useCallback(I=>{let[K,...he]=W().map(Ie=>Ie.ref.current),[q]=he.slice(-1),be=document.activeElement;for(let Ie of I)if(Ie===be||(Ie?.scrollIntoView({block:"nearest"}),Ie===K&&w&&(w.scrollTop=0),Ie===q&&w&&(w.scrollTop=w.scrollHeight),Ie?.focus(),document.activeElement!==be))return},[W,w]),U=lt.useCallback(()=>V([N,b]),[V,N,b]);lt.useEffect(()=>{Z&&U()},[Z,U]);let{onOpenChange:k,triggerPointerDownPosRef:L}=y;lt.useEffect(()=>{if(b){let I={x:0,y:0},K=q=>{I={x:Math.abs(Math.round(q.pageX)-(L.current?.x??0)),y:Math.abs(Math.round(q.pageY)-(L.current?.y??0))}},he=q=>{I.x<=10&&I.y<=10?q.preventDefault():b.contains(q.target)||k(!1),document.removeEventListener("pointermove",K),L.current=null};return L.current!==null&&(document.addEventListener("pointermove",K),document.addEventListener("pointerup",he,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",K),document.removeEventListener("pointerup",he,{capture:!0})}}},[b,k,L]),lt.useEffect(()=>{let I=()=>k(!1);return window.addEventListener("blur",I),window.addEventListener("resize",I),()=>{window.removeEventListener("blur",I),window.removeEventListener("resize",I)}},[k]);let[M,ee]=Dae(I=>{let K=W().filter(be=>!be.disabled),he=K.find(be=>be.ref.current===document.activeElement),q=Mae(K,I,he);q&&setTimeout(()=>q.ref.current.focus())}),se=lt.useCallback((I,K,he)=>{let q=!Q.current&&!he;(y.value!==void 0&&y.value===K||q)&&(_(I),q&&(Q.current=!0))},[y.value]),ne=lt.useCallback(()=>b?.focus(),[b]),ge=lt.useCallback((I,K,he)=>{let q=!Q.current&&!he;(y.value!==void 0&&y.value===K||q)&&D(I)},[y.value]),ue=n==="popper"?A5:vae,H=ue===A5?{side:o,sideOffset:l,align:c,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:x}:{};return(0,Yt.jsx)(xae,{scope:r,content:b,viewport:w,onViewportChange:E,itemRefCallback:se,selectedItem:N,onItemLeave:ne,itemTextRefCallback:ge,focusSelectedItem:U,selectedItemText:O,position:n,isPositioned:Z,searchRef:M,children:(0,Yt.jsx)(Zh,{as:uZe,allowPinchZoom:!0,children:(0,Yt.jsx)(Wh,{asChild:!0,trapped:y.open,onMountAutoFocus:I=>{I.preventDefault()},onUnmountAutoFocus:tt(a,I=>{y.trigger?.focus({preventScroll:!0}),I.preventDefault()}),children:(0,Yt.jsx)($d,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:I=>I.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:(0,Yt.jsx)(ue,{role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu:I=>I.preventDefault(),...g,...H,onPlaced:()=>me(!0),ref:C,style:{display:"flex",flexDirection:"column",outline:"none",...g.style},onKeyDown:tt(g.onKeyDown,I=>{let K=I.ctrlKey||I.altKey||I.metaKey;if(I.key==="Tab"&&I.preventDefault(),!K&&I.key.length===1&&ee(I.key),["ArrowUp","ArrowDown","Home","End"].includes(I.key)){let q=W().filter(be=>!be.disabled).map(be=>be.ref.current);if(["ArrowUp","End"].includes(I.key)&&(q=q.slice().reverse()),["ArrowUp","ArrowDown"].includes(I.key)){let be=I.target,Ie=q.indexOf(be);q=q.slice(Ie+1)}setTimeout(()=>V(q)),I.preventDefault()}})})})})})})});bae.displayName=cZe;var dZe="SelectItemAlignedPosition",vae=lt.forwardRef((e,t)=>{let{__scopeSelect:r,onPlaced:n,...a}=e,i=$p(eg,r),s=jp(eg,r),[o,l]=lt.useState(null),[c,u]=lt.useState(null),d=Xt(t,C=>u(C)),f=SA(r),p=lt.useRef(!1),m=lt.useRef(!0),{viewport:h,selectedItem:x,selectedItemText:g,focusSelectedItem:y}=s,b=lt.useCallback(()=>{if(i.trigger&&i.valueNode&&o&&c&&h&&x&&g){let C=i.trigger.getBoundingClientRect(),N=c.getBoundingClientRect(),_=i.valueNode.getBoundingClientRect(),O=g.getBoundingClientRect();if(i.dir!=="rtl"){let be=O.left-N.left,Ie=_.left-be,Ne=C.left-Ie,He=C.width+Ne,xt=Math.max(He,N.width),Ce=window.innerWidth-_c,ke=UT(Ie,[_c,Math.max(_c,Ce-xt)]);o.style.minWidth=He+"px",o.style.left=ke+"px"}else{let be=N.right-O.right,Ie=window.innerWidth-_.right-be,Ne=window.innerWidth-C.right-Ie,He=C.width+Ne,xt=Math.max(He,N.width),Ce=window.innerWidth-_c,ke=UT(Ie,[_c,Math.max(_c,Ce-xt)]);o.style.minWidth=He+"px",o.style.right=ke+"px"}let D=f(),W=window.innerHeight-_c*2,Z=h.scrollHeight,me=window.getComputedStyle(c),Q=parseInt(me.borderTopWidth,10),V=parseInt(me.paddingTop,10),U=parseInt(me.borderBottomWidth,10),k=parseInt(me.paddingBottom,10),L=Q+V+Z+k+U,M=Math.min(x.offsetHeight*5,L),ee=window.getComputedStyle(h),se=parseInt(ee.paddingTop,10),ne=parseInt(ee.paddingBottom,10),ge=C.top+C.height/2-_c,ue=W-ge,H=x.offsetHeight/2,I=x.offsetTop+H,K=Q+V+I,he=L-K;if(K<=ge){let be=D.length>0&&x===D[D.length-1].ref.current;o.style.bottom="0px";let Ie=c.clientHeight-h.offsetTop-h.offsetHeight,Ne=Math.max(ue,H+(be?ne:0)+Ie+U),He=K+Ne;o.style.height=He+"px"}else{let be=D.length>0&&x===D[0].ref.current;o.style.top="0px";let Ne=Math.max(ge,Q+h.offsetTop+(be?se:0)+H)+he;o.style.height=Ne+"px",h.scrollTop=K-ge+h.offsetTop}o.style.margin=`${_c}px 0`,o.style.minHeight=M+"px",o.style.maxHeight=W+"px",n?.(),requestAnimationFrame(()=>p.current=!0)}},[f,i.trigger,i.valueNode,o,c,h,x,g,i.dir,n]);Nn(()=>b(),[b]);let[S,w]=lt.useState();Nn(()=>{c&&w(window.getComputedStyle(c).zIndex)},[c]);let E=lt.useCallback(C=>{C&&m.current===!0&&(b(),y?.(),m.current=!1)},[b,y]);return(0,Yt.jsx)(pZe,{scope:r,contentWrapper:o,shouldExpandOnScrollRef:p,onScrollButtonChange:E,children:(0,Yt.jsx)("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:(0,Yt.jsx)(pt.div,{...a,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})});vae.displayName=dZe;var fZe="SelectPopperPosition",A5=lt.forwardRef((e,t)=>{let{__scopeSelect:r,align:n="start",collisionPadding:a=_c,...i}=e,s=TA(r);return(0,Yt.jsx)(tb,{...s,...i,ref:t,align:n,collisionPadding:a,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});A5.displayName=fZe;var[pZe,D5]=db(eg,{}),N5="SelectViewport",Sae=lt.forwardRef((e,t)=>{let{__scopeSelect:r,nonce:n,...a}=e,i=jp(N5,r),s=D5(N5,r),o=Xt(t,i.onViewportChange),l=lt.useRef(0);return(0,Yt.jsxs)(Yt.Fragment,{children:[(0,Yt.jsx)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:n}),(0,Yt.jsx)(vA.Slot,{scope:r,children:(0,Yt.jsx)(pt.div,{"data-radix-select-viewport":"",role:"presentation",...a,ref:o,style:{position:"relative",flex:1,overflow:"hidden auto",...a.style},onScroll:tt(a.onScroll,c=>{let u=c.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:f}=s;if(f?.current&&d){let p=Math.abs(l.current-u.scrollTop);if(p>0){let m=window.innerHeight-_c*2,h=parseFloat(d.style.minHeight),x=parseFloat(d.style.height),g=Math.max(h,x);if(g<m){let y=g+p,b=Math.min(m,y),S=y-b;d.style.height=b+"px",d.style.bottom==="0px"&&(u.scrollTop=S>0?S:0,d.style.justifyContent="flex-end")}}}l.current=u.scrollTop})})})]})});Sae.displayName=N5;var Tae="SelectGroup",[mZe,hZe]=db(Tae),gZe=lt.forwardRef((e,t)=>{let{__scopeSelect:r,...n}=e,a=Ea();return(0,Yt.jsx)(mZe,{scope:r,id:a,children:(0,Yt.jsx)(pt.div,{role:"group","aria-labelledby":a,...n,ref:t})})});gZe.displayName=Tae;var wae="SelectLabel",yZe=lt.forwardRef((e,t)=>{let{__scopeSelect:r,...n}=e,a=hZe(wae,r);return(0,Yt.jsx)(pt.div,{id:a.id,...n,ref:t})});yZe.displayName=wae;var bA="SelectItem",[xZe,Cae]=db(bA),Pae=lt.forwardRef((e,t)=>{let{__scopeSelect:r,value:n,disabled:a=!1,textValue:i,...s}=e,o=$p(bA,r),l=jp(bA,r),c=o.value===n,[u,d]=lt.useState(i??""),[f,p]=lt.useState(!1),m=Xt(t,y=>l.itemRefCallback?.(y,n,a)),h=Ea(),x=lt.useRef("touch"),g=()=>{a||(o.onValueChange(n),o.onOpenChange(!1))};if(n==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return(0,Yt.jsx)(xZe,{scope:r,value:n,disabled:a,textId:h,isSelected:c,onItemTextChange:lt.useCallback(y=>{d(b=>b||(y?.textContent??"").trim())},[]),children:(0,Yt.jsx)(vA.ItemSlot,{scope:r,value:n,disabled:a,textValue:u,children:(0,Yt.jsx)(pt.div,{role:"option","aria-labelledby":h,"data-highlighted":f?"":void 0,"aria-selected":c&&f,"data-state":c?"checked":"unchecked","aria-disabled":a||void 0,"data-disabled":a?"":void 0,tabIndex:a?void 0:-1,...s,ref:m,onFocus:tt(s.onFocus,()=>p(!0)),onBlur:tt(s.onBlur,()=>p(!1)),onClick:tt(s.onClick,()=>{x.current!=="mouse"&&g()}),onPointerUp:tt(s.onPointerUp,()=>{x.current==="mouse"&&g()}),onPointerDown:tt(s.onPointerDown,y=>{x.current=y.pointerType}),onPointerMove:tt(s.onPointerMove,y=>{x.current=y.pointerType,a?l.onItemLeave?.():x.current==="mouse"&&y.currentTarget.focus({preventScroll:!0})}),onPointerLeave:tt(s.onPointerLeave,y=>{y.currentTarget===document.activeElement&&l.onItemLeave?.()}),onKeyDown:tt(s.onKeyDown,y=>{l.searchRef?.current!==""&&y.key===" "||(rZe.includes(y.key)&&g(),y.key===" "&&y.preventDefault())})})})})});Pae.displayName=bA;var GT="SelectItemText",Eae=lt.forwardRef((e,t)=>{let{__scopeSelect:r,className:n,style:a,...i}=e,s=$p(GT,r),o=jp(GT,r),l=Cae(GT,r),c=sZe(GT,r),[u,d]=lt.useState(null),f=Xt(t,g=>d(g),l.onItemTextChange,g=>o.itemTextRefCallback?.(g,l.value,l.disabled)),p=u?.textContent,m=lt.useMemo(()=>(0,Yt.jsx)("option",{value:l.value,disabled:l.disabled,children:p},l.value),[l.disabled,l.value,p]),{onNativeOptionAdd:h,onNativeOptionRemove:x}=c;return Nn(()=>(h(m),()=>x(m)),[h,x,m]),(0,Yt.jsxs)(Yt.Fragment,{children:[(0,Yt.jsx)(pt.span,{id:l.textId,...i,ref:f}),l.isSelected&&s.valueNode&&!s.valueNodeHasChildren?R5.createPortal(i.children,s.valueNode):null]})});Eae.displayName=GT;var Iae="SelectItemIndicator",Aae=lt.forwardRef((e,t)=>{let{__scopeSelect:r,...n}=e;return Cae(Iae,r).isSelected?(0,Yt.jsx)(pt.span,{"aria-hidden":!0,...n,ref:t}):null});Aae.displayName=Iae;var k5="SelectScrollUpButton",Nae=lt.forwardRef((e,t)=>{let r=jp(k5,e.__scopeSelect),n=D5(k5,e.__scopeSelect),[a,i]=lt.useState(!1),s=Xt(t,n.onScrollButtonChange);return Nn(()=>{if(r.viewport&&r.isPositioned){let l=function(){let u=c.scrollTop>0;i(u)};var o=l;let c=r.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[r.viewport,r.isPositioned]),a?(0,Yt.jsx)(_ae,{...e,ref:s,onAutoScroll:()=>{let{viewport:o,selectedItem:l}=r;o&&l&&(o.scrollTop=o.scrollTop-l.offsetHeight)}}):null});Nae.displayName=k5;var _5="SelectScrollDownButton",kae=lt.forwardRef((e,t)=>{let r=jp(_5,e.__scopeSelect),n=D5(_5,e.__scopeSelect),[a,i]=lt.useState(!1),s=Xt(t,n.onScrollButtonChange);return Nn(()=>{if(r.viewport&&r.isPositioned){let l=function(){let u=c.scrollHeight-c.clientHeight,d=Math.ceil(c.scrollTop)<u;i(d)};var o=l;let c=r.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[r.viewport,r.isPositioned]),a?(0,Yt.jsx)(_ae,{...e,ref:s,onAutoScroll:()=>{let{viewport:o,selectedItem:l}=r;o&&l&&(o.scrollTop=o.scrollTop+l.offsetHeight)}}):null});kae.displayName=_5;var _ae=lt.forwardRef((e,t)=>{let{__scopeSelect:r,onAutoScroll:n,...a}=e,i=jp("SelectScrollButton",r),s=lt.useRef(null),o=SA(r),l=lt.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return lt.useEffect(()=>()=>l(),[l]),Nn(()=>{o().find(u=>u.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[o]),(0,Yt.jsx)(pt.div,{"aria-hidden":!0,...a,ref:t,style:{flexShrink:0,...a.style},onPointerDown:tt(a.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(n,50))}),onPointerMove:tt(a.onPointerMove,()=>{i.onItemLeave?.(),s.current===null&&(s.current=window.setInterval(n,50))}),onPointerLeave:tt(a.onPointerLeave,()=>{l()})})}),bZe="SelectSeparator",vZe=lt.forwardRef((e,t)=>{let{__scopeSelect:r,...n}=e;return(0,Yt.jsx)(pt.div,{"aria-hidden":!0,...n,ref:t})});vZe.displayName=bZe;var L5="SelectArrow",SZe=lt.forwardRef((e,t)=>{let{__scopeSelect:r,...n}=e,a=TA(r),i=$p(L5,r),s=jp(L5,r);return i.open&&s.position==="popper"?(0,Yt.jsx)(rb,{...a,...n,ref:t}):null});SZe.displayName=L5;var TZe="SelectBubbleInput",Lae=lt.forwardRef(({__scopeSelect:e,value:t,...r},n)=>{let a=lt.useRef(null),i=Xt(n,a),s=LI(t);return lt.useEffect(()=>{let o=a.current;if(!o)return;let l=window.HTMLSelectElement.prototype,u=Object.getOwnPropertyDescriptor(l,"value").set;if(s!==t&&u){let d=new Event("change",{bubbles:!0});u.call(o,t),o.dispatchEvent(d)}},[s,t]),(0,Yt.jsx)(pt.select,{...r,style:{...p5,...r.style},ref:i,defaultValue:t})});Lae.displayName=TZe;function Rae(e){return e===""||e===void 0}function Dae(e){let t=zn(e),r=lt.useRef(""),n=lt.useRef(0),a=lt.useCallback(s=>{let o=r.current+s;t(o),function l(c){r.current=c,window.clearTimeout(n.current),c!==""&&(n.current=window.setTimeout(()=>l(""),1e3))}(o)},[t]),i=lt.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return lt.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,a,i]}function Mae(e,t,r){let a=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,i=r?e.indexOf(r):-1,s=wZe(e,Math.max(i,0));a.length===1&&(s=s.filter(c=>c!==r));let l=s.find(c=>c.textValue.toLowerCase().startsWith(a.toLowerCase()));return l!==r?l:void 0}function wZe(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var Oae=uae,Fae=fae,Bae=mae,$ae=hae,jae=gae,zae=yae,Uae=Sae;var Vae=Pae,qae=Eae,Hae=Aae,Gae=Nae,Kae=kae;Kt();var Ba=A(oe());function mr({...e}){return(0,Ba.jsx)(Oae,{"data-slot":"select",...e})}function hr({...e}){return(0,Ba.jsx)(Bae,{"data-slot":"select-value",...e})}function gr({className:e,size:t="default",children:r,...n}){return(0,Ba.jsxs)(Fae,{"data-slot":"select-trigger","data-size":t,className:le("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...n,children:[r,(0,Ba.jsx)($ae,{asChild:!0,children:(0,Ba.jsx)(Oi,{className:"size-4 opacity-50"})})]})}function yr({className:e,children:t,position:r="popper",align:n="center",...a}){return(0,Ba.jsx)(jae,{children:(0,Ba.jsxs)(zae,{"data-slot":"select-content",className:le("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,align:n,...a,children:[(0,Ba.jsx)(PZe,{}),(0,Ba.jsx)(Uae,{className:le("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),(0,Ba.jsx)(EZe,{})]})})}function Ot({className:e,children:t,...r}){return(0,Ba.jsxs)(Vae,{"data-slot":"select-item",className:le("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...r,children:[(0,Ba.jsx)("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:(0,Ba.jsx)(Hae,{children:(0,Ba.jsx)(Tc,{className:"size-4"})})}),(0,Ba.jsx)(qae,{children:t})]})}function PZe({className:e,...t}){return(0,Ba.jsx)(Gae,{"data-slot":"select-scroll-up-button",className:le("flex cursor-default items-center justify-center py-1",e),...t,children:(0,Ba.jsx)(Ph,{className:"size-4"})})}function EZe({className:e,...t}){return(0,Ba.jsx)(Kae,{"data-slot":"select-scroll-down-button",className:le("flex cursor-default items-center justify-center py-1",e),...t,children:(0,Ba.jsx)(Oi,{className:"size-4"})})}var zd=A(Le(),1);var Bi=A(Le(),1);var zp=A(oe(),1),M5="rovingFocusGroup.onEntryFocus",IZe={bubbles:!1,cancelable:!0},KT="RovingFocusGroup",[O5,Wae,AZe]=ab(KT),[NZe,fb]=jn(KT,[AZe]),[kZe,_Ze]=NZe(KT),Xae=Bi.forwardRef((e,t)=>(0,zp.jsx)(O5.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,zp.jsx)(O5.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,zp.jsx)(LZe,{...e,ref:t})})}));Xae.displayName=KT;var LZe=Bi.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:r,orientation:n,loop:a=!1,dir:i,currentTabStopId:s,defaultCurrentTabStopId:o,onCurrentTabStopIdChange:l,onEntryFocus:c,preventScrollOnEntryFocus:u=!1,...d}=e,f=Bi.useRef(null),p=Xt(t,f),m=ku(i),[h,x]=as({prop:s,defaultProp:o??null,onChange:l,caller:KT}),[g,y]=Bi.useState(!1),b=zn(c),S=Wae(r),w=Bi.useRef(!1),[E,C]=Bi.useState(0);return Bi.useEffect(()=>{let N=f.current;if(N)return N.addEventListener(M5,b),()=>N.removeEventListener(M5,b)},[b]),(0,zp.jsx)(kZe,{scope:r,orientation:n,dir:m,loop:a,currentTabStopId:h,onItemFocus:Bi.useCallback(N=>x(N),[x]),onItemShiftTab:Bi.useCallback(()=>y(!0),[]),onFocusableItemAdd:Bi.useCallback(()=>C(N=>N+1),[]),onFocusableItemRemove:Bi.useCallback(()=>C(N=>N-1),[]),children:(0,zp.jsx)(pt.div,{tabIndex:g||E===0?-1:0,"data-orientation":n,...d,ref:p,style:{outline:"none",...e.style},onMouseDown:tt(e.onMouseDown,()=>{w.current=!0}),onFocus:tt(e.onFocus,N=>{let _=!w.current;if(N.target===N.currentTarget&&_&&!g){let O=new CustomEvent(M5,IZe);if(N.currentTarget.dispatchEvent(O),!O.defaultPrevented){let D=S().filter(V=>V.focusable),W=D.find(V=>V.active),Z=D.find(V=>V.id===h),Q=[W,Z,...D].filter(Boolean).map(V=>V.ref.current);Zae(Q,u)}}w.current=!1}),onBlur:tt(e.onBlur,()=>y(!1))})})}),Yae="RovingFocusGroupItem",Jae=Bi.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:r,focusable:n=!0,active:a=!1,tabStopId:i,children:s,...o}=e,l=Ea(),c=i||l,u=_Ze(Yae,r),d=u.currentTabStopId===c,f=Wae(r),{onFocusableItemAdd:p,onFocusableItemRemove:m,currentTabStopId:h}=u;return Bi.useEffect(()=>{if(n)return p(),()=>m()},[n,p,m]),(0,zp.jsx)(O5.ItemSlot,{scope:r,id:c,focusable:n,active:a,children:(0,zp.jsx)(pt.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...o,ref:t,onMouseDown:tt(e.onMouseDown,x=>{n?u.onItemFocus(c):x.preventDefault()}),onFocus:tt(e.onFocus,()=>u.onItemFocus(c)),onKeyDown:tt(e.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){u.onItemShiftTab();return}if(x.target!==x.currentTarget)return;let g=MZe(x,u.orientation,u.dir);if(g!==void 0){if(x.metaKey||x.ctrlKey||x.altKey||x.shiftKey)return;x.preventDefault();let b=f().filter(S=>S.focusable).map(S=>S.ref.current);if(g==="last")b.reverse();else if(g==="prev"||g==="next"){g==="prev"&&b.reverse();let S=b.indexOf(x.currentTarget);b=u.loop?OZe(b,S+1):b.slice(S+1)}setTimeout(()=>Zae(b))}}),children:typeof s=="function"?s({isCurrentTabStop:d,hasTabStop:h!=null}):s})})});Jae.displayName=Yae;var RZe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function DZe(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function MZe(e,t,r){let n=DZe(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return RZe[n]}function Zae(e,t=!1){let r=document.activeElement;for(let n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function OZe(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var wA=Xae,CA=Jae;var jd=A(oe(),1),PA="Tabs",[FZe,VDt]=jn(PA,[fb]),eie=fb(),[BZe,F5]=FZe(PA),tie=zd.forwardRef((e,t)=>{let{__scopeTabs:r,value:n,onValueChange:a,defaultValue:i,orientation:s="horizontal",dir:o,activationMode:l="automatic",...c}=e,u=ku(o),[d,f]=as({prop:n,onChange:a,defaultProp:i??"",caller:PA});return(0,jd.jsx)(BZe,{scope:r,baseId:Ea(),value:d,onValueChange:f,orientation:s,dir:u,activationMode:l,children:(0,jd.jsx)(pt.div,{dir:u,"data-orientation":s,...c,ref:t})})});tie.displayName=PA;var rie="TabsList",nie=zd.forwardRef((e,t)=>{let{__scopeTabs:r,loop:n=!0,...a}=e,i=F5(rie,r),s=eie(r);return(0,jd.jsx)(wA,{asChild:!0,...s,orientation:i.orientation,dir:i.dir,loop:n,children:(0,jd.jsx)(pt.div,{role:"tablist","aria-orientation":i.orientation,...a,ref:t})})});nie.displayName=rie;var aie="TabsTrigger",iie=zd.forwardRef((e,t)=>{let{__scopeTabs:r,value:n,disabled:a=!1,...i}=e,s=F5(aie,r),o=eie(r),l=lie(s.baseId,n),c=cie(s.baseId,n),u=n===s.value;return(0,jd.jsx)(CA,{asChild:!0,...o,focusable:!a,active:u,children:(0,jd.jsx)(pt.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":c,"data-state":u?"active":"inactive","data-disabled":a?"":void 0,disabled:a,id:l,...i,ref:t,onMouseDown:tt(e.onMouseDown,d=>{!a&&d.button===0&&d.ctrlKey===!1?s.onValueChange(n):d.preventDefault()}),onKeyDown:tt(e.onKeyDown,d=>{[" ","Enter"].includes(d.key)&&s.onValueChange(n)}),onFocus:tt(e.onFocus,()=>{let d=s.activationMode!=="manual";!u&&!a&&d&&s.onValueChange(n)})})})});iie.displayName=aie;var sie="TabsContent",oie=zd.forwardRef((e,t)=>{let{__scopeTabs:r,value:n,forceMount:a,children:i,...s}=e,o=F5(sie,r),l=lie(o.baseId,n),c=cie(o.baseId,n),u=n===o.value,d=zd.useRef(u);return zd.useEffect(()=>{let f=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(f)},[]),(0,jd.jsx)(ia,{present:a||u,children:({present:f})=>(0,jd.jsx)(pt.div,{"data-state":u?"active":"inactive","data-orientation":o.orientation,role:"tabpanel","aria-labelledby":l,hidden:!f,id:c,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:d.current?"0s":void 0},children:f&&i})})});oie.displayName=sie;function lie(e,t){return`${e}-trigger-${t}`}function cie(e,t){return`${e}-content-${t}`}var uie=tie,die=nie,fie=iie,pie=oie;var WT=A(oe());function Zl({className:e,...t}){return(0,WT.jsx)(uie,{"data-slot":"tabs",className:le("flex flex-col gap-2",e),...t})}function Ql({className:e,...t}){return(0,WT.jsx)(die,{"data-slot":"tabs-list",className:le("bg-muted text-muted-foreground inline-flex h-8 w-fit items-center justify-center rounded-lg p-[3px]",e),...t})}function sa({className:e,...t}){return(0,WT.jsx)(fie,{"data-slot":"tabs-trigger",className:le("data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}function bn({className:e,...t}){return(0,WT.jsx)(pie,{"data-slot":"tabs-content",className:le("flex-1 outline-none",e),...t})}var zZe=A(oe()),jZe=Pu("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground"},size:{default:"h-9 px-2 min-w-9",sm:"h-8 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}});var B5=A(Le());var UZe=A(oe()),JDt=B5.createContext({size:"default",variant:"default"});Kt();var VZe=A(Le(),1),wt=A(Le(),1),kA=(0,wt.createContext)(null);kA.displayName="PanelGroupContext";var Ia={group:"data-panel-group",groupDirection:"data-panel-group-direction",groupId:"data-panel-group-id",panel:"data-panel",panelCollapsible:"data-panel-collapsible",panelId:"data-panel-id",panelSize:"data-panel-size",resizeHandle:"data-resize-handle",resizeHandleActive:"data-resize-handle-active",resizeHandleEnabled:"data-panel-resize-handle-enabled",resizeHandleId:"data-panel-resize-handle-id",resizeHandleState:"data-resize-handle-state"},H5=10,rg=wt.useLayoutEffect,mie=VZe["useId".toString()],qZe=typeof mie=="function"?mie:()=>null,HZe=0;function G5(e=null){let t=qZe(),r=(0,wt.useRef)(e||t||null);return r.current===null&&(r.current=""+HZe++),e??r.current}function wie({children:e,className:t="",collapsedSize:r,collapsible:n,defaultSize:a,forwardedRef:i,id:s,maxSize:o,minSize:l,onCollapse:c,onExpand:u,onResize:d,order:f,style:p,tagName:m="div",...h}){let x=(0,wt.useContext)(kA);if(x===null)throw Error("Panel components must be rendered within a PanelGroup container");let{collapsePanel:g,expandPanel:y,getPanelSize:b,getPanelStyle:S,groupId:w,isPanelCollapsed:E,reevaluatePanelConstraints:C,registerPanel:N,resizePanel:_,unregisterPanel:O}=x,D=G5(s),W=(0,wt.useRef)({callbacks:{onCollapse:c,onExpand:u,onResize:d},constraints:{collapsedSize:r,collapsible:n,defaultSize:a,maxSize:o,minSize:l},id:D,idIsFromProps:s!==void 0,order:f});(0,wt.useRef)({didLogMissingDefaultSizeWarning:!1}),rg(()=>{let{callbacks:me,constraints:Q}=W.current,V={...Q};W.current.id=D,W.current.idIsFromProps=s!==void 0,W.current.order=f,me.onCollapse=c,me.onExpand=u,me.onResize=d,Q.collapsedSize=r,Q.collapsible=n,Q.defaultSize=a,Q.maxSize=o,Q.minSize=l,(V.collapsedSize!==Q.collapsedSize||V.collapsible!==Q.collapsible||V.maxSize!==Q.maxSize||V.minSize!==Q.minSize)&&C(W.current,V)}),rg(()=>{let me=W.current;return N(me),()=>{O(me)}},[f,D,N,O]),(0,wt.useImperativeHandle)(i,()=>({collapse:()=>{g(W.current)},expand:me=>{y(W.current,me)},getId(){return D},getSize(){return b(W.current)},isCollapsed(){return E(W.current)},isExpanded(){return!E(W.current)},resize:me=>{_(W.current,me)}}),[g,y,b,E,D,_]);let Z=S(W.current,a);return(0,wt.createElement)(m,{...h,children:e,className:t,id:D,style:{...Z,...p},[Ia.groupId]:w,[Ia.panel]:"",[Ia.panelCollapsible]:n||void 0,[Ia.panelId]:D,[Ia.panelSize]:parseFloat(""+Z.flexGrow).toFixed(1)})}var K5=(0,wt.forwardRef)((e,t)=>(0,wt.createElement)(wie,{...e,forwardedRef:t}));wie.displayName="Panel";K5.displayName="forwardRef(Panel)";var GZe;function KZe(){return GZe}var q5=null,WZe=!0,hie=null,IA=-1,Ud=null;function XZe(e,t,r){let n=(t&Aie)!==0,a=(t&Nie)!==0,i=(t&kie)!==0,s=(t&_ie)!==0;if(hie)return hie({exceedsHorizontalMaximum:a,exceedsHorizontalMinimum:n,exceedsVerticalMaximum:s,exceedsVerticalMinimum:i,intersectsHorizontalDragHandle:e==="horizontal"||e==="intersection",intersectsVerticalDragHandle:e==="vertical"||e==="intersection",isPointerDown:r});if(t){if(n)return i?"se-resize":s?"ne-resize":"e-resize";if(a)return i?"sw-resize":s?"nw-resize":"w-resize";if(i)return"s-resize";if(s)return"n-resize"}switch(e){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function YZe(){Ud!==null&&(document.head.removeChild(Ud),q5=null,Ud=null,IA=-1)}function $5(e,t,r){var n,a;if(!WZe)return;let i=XZe(e,t,r);if(q5!==i){if(q5=i,Ud===null){Ud=document.createElement("style");let o=KZe();o&&Ud.setAttribute("nonce",o),document.head.appendChild(Ud)}if(IA>=0){var s;(s=Ud.sheet)===null||s===void 0||s.removeRule(IA)}IA=(n=(a=Ud.sheet)===null||a===void 0?void 0:a.insertRule(`*{cursor: ${i} !important;}`))!==null&&n!==void 0?n:-1}}function Cie(e){return e.type==="keydown"}function Pie(e){return e.type.startsWith("pointer")}function Eie(e){return e.type.startsWith("mouse")}function _A(e){if(Pie(e)){if(e.isPrimary)return{x:e.clientX,y:e.clientY}}else if(Eie(e))return{x:e.clientX,y:e.clientY};return{x:1/0,y:1/0}}function JZe(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function ZZe(e,t,r){return r?e.x<t.x+t.width&&e.x+e.width>t.x&&e.y<t.y+t.height&&e.y+e.height>t.y:e.x<=t.x+t.width&&e.x+e.width>=t.x&&e.y<=t.y+t.height&&e.y+e.height>=t.y}function QZe(e,t){if(e===t)throw new Error("Cannot compare node with itself");let r={a:xie(e),b:xie(t)},n;for(;r.a.at(-1)===r.b.at(-1);)e=r.a.pop(),t=r.b.pop(),n=e;Er(n,"Stacking order can only be calculated for elements with a common ancestor");let a={a:yie(gie(r.a)),b:yie(gie(r.b))};if(a.a===a.b){let i=n.childNodes,s={a:r.a.at(-1),b:r.b.at(-1)},o=i.length;for(;o--;){let l=i[o];if(l===s.a)return 1;if(l===s.b)return-1}}return Math.sign(a.a-a.b)}var eQe=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function tQe(e){var t;let r=getComputedStyle((t=Iie(e))!==null&&t!==void 0?t:e).display;return r==="flex"||r==="inline-flex"}function rQe(e){let t=getComputedStyle(e);return!!(t.position==="fixed"||t.zIndex!=="auto"&&(t.position!=="static"||tQe(e))||+t.opacity<1||"transform"in t&&t.transform!=="none"||"webkitTransform"in t&&t.webkitTransform!=="none"||"mixBlendMode"in t&&t.mixBlendMode!=="normal"||"filter"in t&&t.filter!=="none"||"webkitFilter"in t&&t.webkitFilter!=="none"||"isolation"in t&&t.isolation==="isolate"||eQe.test(t.willChange)||t.webkitOverflowScrolling==="touch")}function gie(e){let t=e.length;for(;t--;){let r=e[t];if(Er(r,"Missing node"),rQe(r))return r}return null}function yie(e){return e&&Number(getComputedStyle(e).zIndex)||0}function xie(e){let t=[];for(;e;)t.push(e),e=Iie(e);return t}function Iie(e){let{parentNode:t}=e;return t&&t instanceof ShadowRoot?t.host:t}var Aie=1,Nie=2,kie=4,_ie=8,nQe=JZe()==="coarse",Lc=[],qd=!1,Up=new Map,LA=new Map,JT=new Set;function aQe(e,t,r,n,a){var i;let{ownerDocument:s}=t,o={direction:r,element:t,hitAreaMargins:n,setResizeHandlerState:a},l=(i=Up.get(s))!==null&&i!==void 0?i:0;return Up.set(s,l+1),JT.add(o),AA(),function(){var u;LA.delete(e),JT.delete(o);let d=(u=Up.get(s))!==null&&u!==void 0?u:1;if(Up.set(s,d-1),AA(),d===1&&Up.delete(s),Lc.includes(o)){let f=Lc.indexOf(o);f>=0&&Lc.splice(f,1),RA(),a("up",!0,null)}}}function iQe(e){let{target:t}=e,{x:r,y:n}=_A(e);qd=!0,W5({target:t,x:r,y:n}),AA(),Lc.length>0&&(NA("down",e),RA(),e.preventDefault(),Lie(t)||e.stopImmediatePropagation())}function j5(e){let{x:t,y:r}=_A(e);if(qd&&e.type!=="pointerleave"&&e.buttons===0&&(qd=!1,NA("up",e)),!qd){let{target:n}=e;W5({target:n,x:t,y:r})}NA("move",e),RA(),Lc.length>0&&e.preventDefault()}function z5(e){let{target:t}=e,{x:r,y:n}=_A(e);LA.clear(),qd=!1,Lc.length>0&&(e.preventDefault(),Lie(t)||e.stopImmediatePropagation()),NA("up",e),W5({target:t,x:r,y:n}),RA(),AA()}function Lie(e){let t=e;for(;t;){if(t.hasAttribute(Ia.resizeHandle))return!0;t=t.parentElement}return!1}function W5({target:e,x:t,y:r}){Lc.splice(0);let n=null;(e instanceof HTMLElement||e instanceof SVGElement)&&(n=e),JT.forEach(a=>{let{element:i,hitAreaMargins:s}=a,o=i.getBoundingClientRect(),{bottom:l,left:c,right:u,top:d}=o,f=nQe?s.coarse:s.fine;if(t>=c-f&&t<=u+f&&r>=d-f&&r<=l+f){if(n!==null&&document.contains(n)&&i!==n&&!i.contains(n)&&!n.contains(i)&&QZe(n,i)>0){let m=n,h=!1;for(;m&&!m.contains(i);){if(ZZe(m.getBoundingClientRect(),o,!0)){h=!0;break}m=m.parentElement}if(h)return}Lc.push(a)}})}function U5(e,t){LA.set(e,t)}function RA(){let e=!1,t=!1;Lc.forEach(n=>{let{direction:a}=n;a==="horizontal"?e=!0:t=!0});let r=0;LA.forEach(n=>{r|=n}),e&&t?$5("intersection",r,qd):e?$5("horizontal",r,qd):t?$5("vertical",r,qd):YZe()}var V5;function AA(){var e;(e=V5)===null||e===void 0||e.abort(),V5=new AbortController;let t={capture:!0,signal:V5.signal};JT.size&&(qd?(Lc.length>0&&Up.forEach((r,n)=>{let{body:a}=n;r>0&&(a.addEventListener("contextmenu",z5,t),a.addEventListener("pointerleave",j5,t),a.addEventListener("pointermove",j5,t))}),Up.forEach((r,n)=>{let{body:a}=n;a.addEventListener("pointerup",z5,t),a.addEventListener("pointercancel",z5,t)})):Up.forEach((r,n)=>{let{body:a}=n;r>0&&(a.addEventListener("pointerdown",iQe,t),a.addEventListener("pointermove",j5,t))}))}function NA(e,t){JT.forEach(r=>{let{setResizeHandlerState:n}=r,a=Lc.includes(r);n(e,a,t)})}function sQe(){let[e,t]=(0,wt.useState)(0);return(0,wt.useCallback)(()=>t(r=>r+1),[])}function Er(e,t){if(!e)throw Error(t)}function ng(e,t,r=H5){return e.toFixed(r)===t.toFixed(r)?0:e>t?1:-1}function Vd(e,t,r=H5){return ng(e,t,r)===0}function rl(e,t,r){return ng(e,t,r)===0}function oQe(e,t,r){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++){let a=e[n],i=t[n];if(!rl(a,i,r))return!1}return!0}function hb({panelConstraints:e,panelIndex:t,size:r}){let n=e[t];Er(n!=null,`Panel constraints not found for index ${t}`);let{collapsedSize:a=0,collapsible:i,maxSize:s=100,minSize:o=0}=n;if(ng(r,o)<0)if(i){let l=(a+o)/2;ng(r,l)<0?r=a:r=o}else r=o;return r=Math.min(s,r),r=parseFloat(r.toFixed(H5)),r}function XT({delta:e,initialLayout:t,panelConstraints:r,pivotIndices:n,prevLayout:a,trigger:i}){if(rl(e,0))return t;let s=[...t],[o,l]=n;Er(o!=null,"Invalid first pivot index"),Er(l!=null,"Invalid second pivot index");let c=0;if(i==="keyboard"){{let d=e<0?l:o,f=r[d];Er(f,`Panel constraints not found for index ${d}`);let{collapsedSize:p=0,collapsible:m,minSize:h=0}=f;if(m){let x=t[d];if(Er(x!=null,`Previous layout not found for panel index ${d}`),rl(x,p)){let g=h-x;ng(g,Math.abs(e))>0&&(e=e<0?0-g:g)}}}{let d=e<0?o:l,f=r[d];Er(f,`No panel constraints found for index ${d}`);let{collapsedSize:p=0,collapsible:m,minSize:h=0}=f;if(m){let x=t[d];if(Er(x!=null,`Previous layout not found for panel index ${d}`),rl(x,h)){let g=x-p;ng(g,Math.abs(e))>0&&(e=e<0?0-g:g)}}}}{let d=e<0?1:-1,f=e<0?l:o,p=0;for(;;){let h=t[f];Er(h!=null,`Previous layout not found for panel index ${f}`);let g=hb({panelConstraints:r,panelIndex:f,size:100})-h;if(p+=g,f+=d,f<0||f>=r.length)break}let m=Math.min(Math.abs(e),Math.abs(p));e=e<0?0-m:m}{let f=e<0?o:l;for(;f>=0&&f<r.length;){let p=Math.abs(e)-Math.abs(c),m=t[f];Er(m!=null,`Previous layout not found for panel index ${f}`);let h=m-p,x=hb({panelConstraints:r,panelIndex:f,size:h});if(!rl(m,x)&&(c+=m-x,s[f]=x,c.toFixed(3).localeCompare(Math.abs(e).toFixed(3),void 0,{numeric:!0})>=0))break;e<0?f--:f++}}if(oQe(a,s))return a;{let d=e<0?l:o,f=t[d];Er(f!=null,`Previous layout not found for panel index ${d}`);let p=f+c,m=hb({panelConstraints:r,panelIndex:d,size:p});if(s[d]=m,!rl(m,p)){let h=p-m,g=e<0?l:o;for(;g>=0&&g<r.length;){let y=s[g];Er(y!=null,`Previous layout not found for panel index ${g}`);let b=y+h,S=hb({panelConstraints:r,panelIndex:g,size:b});if(rl(y,S)||(h-=S-y,s[g]=S),rl(h,0))break;e>0?g--:g++}}}let u=s.reduce((d,f)=>f+d,0);return rl(u,100)?s:a}function lQe({layout:e,panelsArray:t,pivotIndices:r}){let n=0,a=100,i=0,s=0,o=r[0];Er(o!=null,"No pivot index found"),t.forEach((d,f)=>{let{constraints:p}=d,{maxSize:m=100,minSize:h=0}=p;f===o?(n=h,a=m):(i+=h,s+=m)});let l=Math.min(a,100-i),c=Math.max(n,100-s),u=e[o];return{valueMax:l,valueMin:c,valueNow:u}}function ZT(e,t=document){return Array.from(t.querySelectorAll(`[${Ia.resizeHandleId}][data-panel-group-id="${e}"]`))}function Rie(e,t,r=document){let a=ZT(e,r).findIndex(i=>i.getAttribute(Ia.resizeHandleId)===t);return a??null}function Die(e,t,r){let n=Rie(e,t,r);return n!=null?[n,n+1]:[-1,-1]}function cQe(e){return e instanceof HTMLElement?!0:typeof e=="object"&&e!==null&&"tagName"in e&&"getAttribute"in e}function Mie(e,t=document){if(cQe(t)&&t.dataset.panelGroupId==e)return t;let r=t.querySelector(`[data-panel-group][data-panel-group-id="${e}"]`);return r||null}function DA(e,t=document){let r=t.querySelector(`[${Ia.resizeHandleId}="${e}"]`);return r||null}function uQe(e,t,r,n=document){var a,i,s,o;let l=DA(t,n),c=ZT(e,n),u=l?c.indexOf(l):-1,d=(a=(i=r[u])===null||i===void 0?void 0:i.id)!==null&&a!==void 0?a:null,f=(s=(o=r[u+1])===null||o===void 0?void 0:o.id)!==null&&s!==void 0?s:null;return[d,f]}function dQe({committedValuesRef:e,eagerValuesRef:t,groupId:r,layout:n,panelDataArray:a,panelGroupElement:i,setLayout:s}){(0,wt.useRef)({didWarnAboutMissingResizeHandle:!1}),rg(()=>{if(!i)return;let o=ZT(r,i);for(let l=0;l<a.length-1;l++){let{valueMax:c,valueMin:u,valueNow:d}=lQe({layout:n,panelsArray:a,pivotIndices:[l,l+1]}),f=o[l];if(f!=null){let p=a[l];Er(p,`No panel data found for index "${l}"`),f.setAttribute("aria-controls",p.id),f.setAttribute("aria-valuemax",""+Math.round(c)),f.setAttribute("aria-valuemin",""+Math.round(u)),f.setAttribute("aria-valuenow",d!=null?""+Math.round(d):"")}}return()=>{o.forEach((l,c)=>{l.removeAttribute("aria-controls"),l.removeAttribute("aria-valuemax"),l.removeAttribute("aria-valuemin"),l.removeAttribute("aria-valuenow")})}},[r,n,a,i]),(0,wt.useEffect)(()=>{if(!i)return;let o=t.current;Er(o,"Eager values not found");let{panelDataArray:l}=o,c=Mie(r,i);Er(c!=null,`No group found for id "${r}"`);let u=ZT(r,i);Er(u,`No resize handles found for group id "${r}"`);let d=u.map(f=>{let p=f.getAttribute(Ia.resizeHandleId);Er(p,"Resize handle element has no handle id attribute");let[m,h]=uQe(r,p,l,i);if(m==null||h==null)return()=>{};let x=g=>{if(!g.defaultPrevented)switch(g.key){case"Enter":{g.preventDefault();let y=l.findIndex(b=>b.id===m);if(y>=0){let b=l[y];Er(b,`No panel data found for index ${y}`);let S=n[y],{collapsedSize:w=0,collapsible:E,minSize:C=0}=b.constraints;if(S!=null&&E){let N=XT({delta:rl(S,w)?C-w:w-S,initialLayout:n,panelConstraints:l.map(_=>_.constraints),pivotIndices:Die(r,p,i),prevLayout:n,trigger:"keyboard"});n!==N&&s(N)}}break}}};return f.addEventListener("keydown",x),()=>{f.removeEventListener("keydown",x)}});return()=>{d.forEach(f=>f())}},[i,e,t,r,n,a,s])}function bie(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}function Oie(e,t){let r=e==="horizontal",{x:n,y:a}=_A(t);return r?n:a}function fQe(e,t,r,n,a){let i=r==="horizontal",s=DA(t,a);Er(s,`No resize handle element found for id "${t}"`);let o=s.getAttribute(Ia.groupId);Er(o,"Resize handle element has no group id attribute");let{initialCursorPosition:l}=n,c=Oie(r,e),u=Mie(o,a);Er(u,`No group element found for id "${o}"`);let d=u.getBoundingClientRect(),f=i?d.width:d.height;return(c-l)/f*100}function pQe(e,t,r,n,a,i){if(Cie(e)){let s=r==="horizontal",o=0;e.shiftKey?o=100:a!=null?o=a:o=10;let l=0;switch(e.key){case"ArrowDown":l=s?0:o;break;case"ArrowLeft":l=s?-o:0;break;case"ArrowRight":l=s?o:0;break;case"ArrowUp":l=s?0:-o;break;case"End":l=100;break;case"Home":l=-100;break}return l}else return n==null?0:fQe(e,t,r,n,i)}function mQe({panelDataArray:e}){let t=Array(e.length),r=e.map(i=>i.constraints),n=0,a=100;for(let i=0;i<e.length;i++){let s=r[i];Er(s,`Panel constraints not found for index ${i}`);let{defaultSize:o}=s;o!=null&&(n++,t[i]=o,a-=o)}for(let i=0;i<e.length;i++){let s=r[i];Er(s,`Panel constraints not found for index ${i}`);let{defaultSize:o}=s;if(o!=null)continue;let l=e.length-n,c=a/l;n++,t[i]=c,a-=c}return t}function pb(e,t,r){t.forEach((n,a)=>{let i=e[a];Er(i,`Panel data not found for index ${a}`);let{callbacks:s,constraints:o,id:l}=i,{collapsedSize:c=0,collapsible:u}=o,d=r[l];if(d==null||n!==d){r[l]=n;let{onCollapse:f,onExpand:p,onResize:m}=s;m&&m(n,d),u&&(f||p)&&(p&&(d==null||Vd(d,c))&&!Vd(n,c)&&p(),f&&(d==null||!Vd(d,c))&&Vd(n,c)&&f())}})}function EA(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!=t[r])return!1;return!0}function hQe({defaultSize:e,dragState:t,layout:r,panelData:n,panelIndex:a,precision:i=3}){let s=r[a],o;return s==null?o=e!=null?e.toFixed(i):"1":n.length===1?o="1":o=s.toFixed(i),{flexBasis:0,flexGrow:o,flexShrink:1,overflow:"hidden",pointerEvents:t!==null?"none":void 0}}function gQe(e,t=10){let r=null;return(...a)=>{r!==null&&clearTimeout(r),r=setTimeout(()=>{e(...a)},t)}}function vie(e){try{if(typeof localStorage<"u")e.getItem=t=>localStorage.getItem(t),e.setItem=(t,r)=>{localStorage.setItem(t,r)};else throw new Error("localStorage not supported in this environment")}catch{e.getItem=()=>null,e.setItem=()=>{}}}function Fie(e){return`react-resizable-panels:${e}`}function Bie(e){return e.map(t=>{let{constraints:r,id:n,idIsFromProps:a,order:i}=t;return a?n:i?`${i}:${JSON.stringify(r)}`:JSON.stringify(r)}).sort((t,r)=>t.localeCompare(r)).join(",")}function $ie(e,t){try{let r=Fie(e),n=t.getItem(r);if(n){let a=JSON.parse(n);if(typeof a=="object"&&a!=null)return a}}catch{}return null}function yQe(e,t,r){var n,a;let i=(n=$ie(e,r))!==null&&n!==void 0?n:{},s=Bie(t);return(a=i[s])!==null&&a!==void 0?a:null}function xQe(e,t,r,n,a){var i;let s=Fie(e),o=Bie(t),l=(i=$ie(e,a))!==null&&i!==void 0?i:{};l[o]={expandToSizes:Object.fromEntries(r.entries()),layout:n};try{a.setItem(s,JSON.stringify(l))}catch{}}function Sie({layout:e,panelConstraints:t}){let r=[...e],n=r.reduce((i,s)=>i+s,0);if(r.length!==t.length)throw Error(`Invalid ${t.length} panel layout: ${r.map(i=>`${i}%`).join(", ")}`);if(!rl(n,100)&&r.length>0)for(let i=0;i<t.length;i++){let s=r[i];Er(s!=null,`No layout data found for index ${i}`);let o=100/n*s;r[i]=o}let a=0;for(let i=0;i<t.length;i++){let s=r[i];Er(s!=null,`No layout data found for index ${i}`);let o=hb({panelConstraints:t,panelIndex:i,size:s});s!=o&&(a+=s-o,r[i]=o)}if(!rl(a,0))for(let i=0;i<t.length;i++){let s=r[i];Er(s!=null,`No layout data found for index ${i}`);let o=s+a,l=hb({panelConstraints:t,panelIndex:i,size:o});if(s!==l&&(a-=l-s,r[i]=l,rl(a,0)))break}return r}var bQe=100,YT={getItem:e=>(vie(YT),YT.getItem(e)),setItem:(e,t)=>{vie(YT),YT.setItem(e,t)}},Tie={};function jie({autoSaveId:e=null,children:t,className:r="",direction:n,forwardedRef:a,id:i=null,onLayout:s=null,keyboardResizeBy:o=null,storage:l=YT,style:c,tagName:u="div",...d}){let f=G5(i),p=(0,wt.useRef)(null),[m,h]=(0,wt.useState)(null),[x,g]=(0,wt.useState)([]),y=sQe(),b=(0,wt.useRef)({}),S=(0,wt.useRef)(new Map),w=(0,wt.useRef)(0),E=(0,wt.useRef)({autoSaveId:e,direction:n,dragState:m,id:f,keyboardResizeBy:o,onLayout:s,storage:l}),C=(0,wt.useRef)({layout:x,panelDataArray:[],panelDataArrayChanged:!1});(0,wt.useRef)({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),(0,wt.useImperativeHandle)(a,()=>({getId:()=>E.current.id,getLayout:()=>{let{layout:ne}=C.current;return ne},setLayout:ne=>{let{onLayout:ge}=E.current,{layout:ue,panelDataArray:H}=C.current,I=Sie({layout:ne,panelConstraints:H.map(K=>K.constraints)});bie(ue,I)||(g(I),C.current.layout=I,ge&&ge(I),pb(H,I,b.current))}}),[]),rg(()=>{E.current.autoSaveId=e,E.current.direction=n,E.current.dragState=m,E.current.id=f,E.current.onLayout=s,E.current.storage=l}),dQe({committedValuesRef:E,eagerValuesRef:C,groupId:f,layout:x,panelDataArray:C.current.panelDataArray,setLayout:g,panelGroupElement:p.current}),(0,wt.useEffect)(()=>{let{panelDataArray:ne}=C.current;if(e){if(x.length===0||x.length!==ne.length)return;let ge=Tie[e];ge==null&&(ge=gQe(xQe,bQe),Tie[e]=ge);let ue=[...ne],H=new Map(S.current);ge(e,ue,H,x,l)}},[e,x,l]),(0,wt.useEffect)(()=>{});let N=(0,wt.useCallback)(ne=>{let{onLayout:ge}=E.current,{layout:ue,panelDataArray:H}=C.current;if(ne.constraints.collapsible){let I=H.map(be=>be.constraints),{collapsedSize:K=0,panelSize:he,pivotIndices:q}=tg(H,ne,ue);if(Er(he!=null,`Panel size not found for panel "${ne.id}"`),!Vd(he,K)){S.current.set(ne.id,he);let Ie=mb(H,ne)===H.length-1?he-K:K-he,Ne=XT({delta:Ie,initialLayout:ue,panelConstraints:I,pivotIndices:q,prevLayout:ue,trigger:"imperative-api"});EA(ue,Ne)||(g(Ne),C.current.layout=Ne,ge&&ge(Ne),pb(H,Ne,b.current))}}},[]),_=(0,wt.useCallback)((ne,ge)=>{let{onLayout:ue}=E.current,{layout:H,panelDataArray:I}=C.current;if(ne.constraints.collapsible){let K=I.map(He=>He.constraints),{collapsedSize:he=0,panelSize:q=0,minSize:be=0,pivotIndices:Ie}=tg(I,ne,H),Ne=ge??be;if(Vd(q,he)){let He=S.current.get(ne.id),xt=He!=null&&He>=Ne?He:Ne,ke=mb(I,ne)===I.length-1?q-xt:xt-q,je=XT({delta:ke,initialLayout:H,panelConstraints:K,pivotIndices:Ie,prevLayout:H,trigger:"imperative-api"});EA(H,je)||(g(je),C.current.layout=je,ue&&ue(je),pb(I,je,b.current))}}},[]),O=(0,wt.useCallback)(ne=>{let{layout:ge,panelDataArray:ue}=C.current,{panelSize:H}=tg(ue,ne,ge);return Er(H!=null,`Panel size not found for panel "${ne.id}"`),H},[]),D=(0,wt.useCallback)((ne,ge)=>{let{panelDataArray:ue}=C.current,H=mb(ue,ne);return hQe({defaultSize:ge,dragState:m,layout:x,panelData:ue,panelIndex:H})},[m,x]),W=(0,wt.useCallback)(ne=>{let{layout:ge,panelDataArray:ue}=C.current,{collapsedSize:H=0,collapsible:I,panelSize:K}=tg(ue,ne,ge);return Er(K!=null,`Panel size not found for panel "${ne.id}"`),I===!0&&Vd(K,H)},[]),Z=(0,wt.useCallback)(ne=>{let{layout:ge,panelDataArray:ue}=C.current,{collapsedSize:H=0,collapsible:I,panelSize:K}=tg(ue,ne,ge);return Er(K!=null,`Panel size not found for panel "${ne.id}"`),!I||ng(K,H)>0},[]),me=(0,wt.useCallback)(ne=>{let{panelDataArray:ge}=C.current;ge.push(ne),ge.sort((ue,H)=>{let I=ue.order,K=H.order;return I==null&&K==null?0:I==null?-1:K==null?1:I-K}),C.current.panelDataArrayChanged=!0,y()},[y]);rg(()=>{if(C.current.panelDataArrayChanged){C.current.panelDataArrayChanged=!1;let{autoSaveId:ne,onLayout:ge,storage:ue}=E.current,{layout:H,panelDataArray:I}=C.current,K=null;if(ne){let q=yQe(ne,I,ue);q&&(S.current=new Map(Object.entries(q.expandToSizes)),K=q.layout)}K==null&&(K=mQe({panelDataArray:I}));let he=Sie({layout:K,panelConstraints:I.map(q=>q.constraints)});bie(H,he)||(g(he),C.current.layout=he,ge&&ge(he),pb(I,he,b.current))}}),rg(()=>{let ne=C.current;return()=>{ne.layout=[]}},[]);let Q=(0,wt.useCallback)(ne=>{let ge=!1,ue=p.current;return ue&&window.getComputedStyle(ue,null).getPropertyValue("direction")==="rtl"&&(ge=!0),function(I){I.preventDefault();let K=p.current;if(!K)return()=>null;let{direction:he,dragState:q,id:be,keyboardResizeBy:Ie,onLayout:Ne}=E.current,{layout:He,panelDataArray:xt}=C.current,{initialLayout:Ce}=q??{},ke=Die(be,ne,K),je=pQe(I,ne,he,q,Ie,K),ot=he==="horizontal";ot&&ge&&(je=-je);let Nt=xt.map(Wr=>Wr.constraints),It=XT({delta:je,initialLayout:Ce??He,panelConstraints:Nt,pivotIndices:ke,prevLayout:He,trigger:Cie(I)?"keyboard":"mouse-or-touch"}),ar=!EA(He,It);(Pie(I)||Eie(I))&&w.current!=je&&(w.current=je,!ar&&je!==0?ot?U5(ne,je<0?Aie:Nie):U5(ne,je<0?kie:_ie):U5(ne,0)),ar&&(g(It),C.current.layout=It,Ne&&Ne(It),pb(xt,It,b.current))}},[]),V=(0,wt.useCallback)((ne,ge)=>{let{onLayout:ue}=E.current,{layout:H,panelDataArray:I}=C.current,K=I.map(He=>He.constraints),{panelSize:he,pivotIndices:q}=tg(I,ne,H);Er(he!=null,`Panel size not found for panel "${ne.id}"`);let Ie=mb(I,ne)===I.length-1?he-ge:ge-he,Ne=XT({delta:Ie,initialLayout:H,panelConstraints:K,pivotIndices:q,prevLayout:H,trigger:"imperative-api"});EA(H,Ne)||(g(Ne),C.current.layout=Ne,ue&&ue(Ne),pb(I,Ne,b.current))},[]),U=(0,wt.useCallback)((ne,ge)=>{let{layout:ue,panelDataArray:H}=C.current,{collapsedSize:I=0,collapsible:K}=ge,{collapsedSize:he=0,collapsible:q,maxSize:be=100,minSize:Ie=0}=ne.constraints,{panelSize:Ne}=tg(H,ne,ue);Ne!=null&&(K&&q&&Vd(Ne,I)?Vd(I,he)||V(ne,he):Ne<Ie?V(ne,Ie):Ne>be&&V(ne,be))},[V]),k=(0,wt.useCallback)((ne,ge)=>{let{direction:ue}=E.current,{layout:H}=C.current;if(!p.current)return;let I=DA(ne,p.current);Er(I,`Drag handle element not found for id "${ne}"`);let K=Oie(ue,ge);h({dragHandleId:ne,dragHandleRect:I.getBoundingClientRect(),initialCursorPosition:K,initialLayout:H})},[]),L=(0,wt.useCallback)(()=>{h(null)},[]),M=(0,wt.useCallback)(ne=>{let{panelDataArray:ge}=C.current,ue=mb(ge,ne);ue>=0&&(ge.splice(ue,1),delete b.current[ne.id],C.current.panelDataArrayChanged=!0,y())},[y]),ee=(0,wt.useMemo)(()=>({collapsePanel:N,direction:n,dragState:m,expandPanel:_,getPanelSize:O,getPanelStyle:D,groupId:f,isPanelCollapsed:W,isPanelExpanded:Z,reevaluatePanelConstraints:U,registerPanel:me,registerResizeHandle:Q,resizePanel:V,startDragging:k,stopDragging:L,unregisterPanel:M,panelGroupElement:p.current}),[N,m,n,_,O,D,f,W,Z,U,me,Q,V,k,L,M]),se={display:"flex",flexDirection:n==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return(0,wt.createElement)(kA.Provider,{value:ee},(0,wt.createElement)(u,{...d,children:t,className:r,id:i,ref:p,style:{...se,...c},[Ia.group]:"",[Ia.groupDirection]:n,[Ia.groupId]:f}))}var X5=(0,wt.forwardRef)((e,t)=>(0,wt.createElement)(jie,{...e,forwardedRef:t}));jie.displayName="PanelGroup";X5.displayName="forwardRef(PanelGroup)";function mb(e,t){return e.findIndex(r=>r===t||r.id===t.id)}function tg(e,t,r){let n=mb(e,t),i=n===e.length-1?[n-1,n]:[n,n+1],s=r[n];return{...t.constraints,panelSize:s,pivotIndices:i}}function vQe({disabled:e,handleId:t,resizeHandler:r,panelGroupElement:n}){(0,wt.useEffect)(()=>{if(e||r==null||n==null)return;let a=DA(t,n);if(a==null)return;let i=s=>{if(!s.defaultPrevented)switch(s.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{s.preventDefault(),r(s);break}case"F6":{s.preventDefault();let o=a.getAttribute(Ia.groupId);Er(o,`No group element found for id "${o}"`);let l=ZT(o,n),c=Rie(o,t,n);Er(c!==null,`No resize element found for id "${t}"`);let u=s.shiftKey?c>0?c-1:l.length-1:c+1<l.length?c+1:0;l[u].focus();break}}};return a.addEventListener("keydown",i),()=>{a.removeEventListener("keydown",i)}},[n,e,t,r])}function Y5({children:e=null,className:t="",disabled:r=!1,hitAreaMargins:n,id:a,onBlur:i,onClick:s,onDragging:o,onFocus:l,onPointerDown:c,onPointerUp:u,style:d={},tabIndex:f=0,tagName:p="div",...m}){var h,x;let g=(0,wt.useRef)(null),y=(0,wt.useRef)({onClick:s,onDragging:o,onPointerDown:c,onPointerUp:u});(0,wt.useEffect)(()=>{y.current.onClick=s,y.current.onDragging=o,y.current.onPointerDown=c,y.current.onPointerUp=u});let b=(0,wt.useContext)(kA);if(b===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");let{direction:S,groupId:w,registerResizeHandle:E,startDragging:C,stopDragging:N,panelGroupElement:_}=b,O=G5(a),[D,W]=(0,wt.useState)("inactive"),[Z,me]=(0,wt.useState)(!1),[Q,V]=(0,wt.useState)(null),U=(0,wt.useRef)({state:D});rg(()=>{U.current.state=D}),(0,wt.useEffect)(()=>{if(r)V(null);else{let ee=E(O);V(()=>ee)}},[r,O,E]);let k=(h=n?.coarse)!==null&&h!==void 0?h:15,L=(x=n?.fine)!==null&&x!==void 0?x:5;return(0,wt.useEffect)(()=>{if(r||Q==null)return;let ee=g.current;Er(ee,"Element ref not attached");let se=!1;return aQe(O,ee,S,{coarse:k,fine:L},(ge,ue,H)=>{if(!ue){W("inactive");return}switch(ge){case"down":{W("drag"),se=!1,Er(H,'Expected event to be defined for "down" action'),C(O,H);let{onDragging:I,onPointerDown:K}=y.current;I?.(!0),K?.();break}case"move":{let{state:I}=U.current;se=!0,I!=="drag"&&W("hover"),Er(H,'Expected event to be defined for "move" action'),Q(H);break}case"up":{W("hover"),N();let{onClick:I,onDragging:K,onPointerUp:he}=y.current;K?.(!1),he?.(),se||I?.();break}}})},[k,S,r,L,E,O,Q,C,N]),vQe({disabled:r,handleId:O,resizeHandler:Q,panelGroupElement:_}),(0,wt.createElement)(p,{...m,children:e,className:t,id:a,onBlur:()=>{me(!1),i?.()},onFocus:()=>{me(!0),l?.()},ref:g,role:"separator",style:{...{touchAction:"none",userSelect:"none"},...d},tabIndex:f,[Ia.groupDirection]:S,[Ia.groupId]:w,[Ia.resizeHandle]:"",[Ia.resizeHandleActive]:D==="drag"?"pointer":Z?"keyboard":void 0,[Ia.resizeHandleEnabled]:!r,[Ia.resizeHandleId]:O,[Ia.resizeHandleState]:D})}Y5.displayName="PanelResizeHandle";var gb=A(oe());function QT({className:e,...t}){return(0,gb.jsx)(X5,{"data-slot":"resizable-panel-group",className:le("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",e),...t})}function Lu({...e}){return(0,gb.jsx)(K5,{"data-slot":"resizable-panel",...e})}function ag({withHandle:e,className:t,...r}){return(0,gb.jsx)(Y5,{"data-slot":"resizable-handle",className:le("bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:translate-x-0 data-[panel-group-direction=vertical]:after:-translate-y-1/2 [&[data-panel-group-direction=vertical]>div]:rotate-90",t),...r,children:e&&(0,gb.jsx)("div",{className:"bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border",children:(0,gb.jsx)(gT,{className:"size-2.5"})})})}var vr=A(Le(),1);var ew=A(Le(),1);var MA=A(oe(),1);var TQe=Symbol("radix.slottable");function zie(e){let t=({children:r})=>(0,MA.jsx)(MA.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=TQe,t}var ei=A(oe(),1),[OA,m2t]=jn("Tooltip",[Fd]),FA=Fd(),Uie="TooltipProvider",wQe=700,J5="tooltip.open",[CQe,Q5]=OA(Uie),Vie=e=>{let{__scopeTooltip:t,delayDuration:r=wQe,skipDelayDuration:n=300,disableHoverableContent:a=!1,children:i}=e,s=vr.useRef(!0),o=vr.useRef(!1),l=vr.useRef(0);return vr.useEffect(()=>{let c=l.current;return()=>window.clearTimeout(c)},[]),(0,ei.jsx)(CQe,{scope:t,isOpenDelayedRef:s,delayDuration:r,onOpen:vr.useCallback(()=>{window.clearTimeout(l.current),s.current=!1},[]),onClose:vr.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>s.current=!0,n)},[n]),isPointerInTransitRef:o,onPointerInTransitChange:vr.useCallback(c=>{o.current=c},[]),disableHoverableContent:a,children:i})};Vie.displayName=Uie;var tw="Tooltip",[PQe,rw]=OA(tw),qie=e=>{let{__scopeTooltip:t,children:r,open:n,defaultOpen:a,onOpenChange:i,disableHoverableContent:s,delayDuration:o}=e,l=Q5(tw,e.__scopeTooltip),c=FA(t),[u,d]=vr.useState(null),f=Ea(),p=vr.useRef(0),m=s??l.disableHoverableContent,h=o??l.delayDuration,x=vr.useRef(!1),[g,y]=as({prop:n,defaultProp:a??!1,onChange:C=>{C?(l.onOpen(),document.dispatchEvent(new CustomEvent(J5))):l.onClose(),i?.(C)},caller:tw}),b=vr.useMemo(()=>g?x.current?"delayed-open":"instant-open":"closed",[g]),S=vr.useCallback(()=>{window.clearTimeout(p.current),p.current=0,x.current=!1,y(!0)},[y]),w=vr.useCallback(()=>{window.clearTimeout(p.current),p.current=0,y(!1)},[y]),E=vr.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{x.current=!0,y(!0),p.current=0},h)},[h,y]);return vr.useEffect(()=>()=>{p.current&&(window.clearTimeout(p.current),p.current=0)},[]),(0,ei.jsx)(Kh,{...c,children:(0,ei.jsx)(PQe,{scope:t,contentId:f,open:g,stateAttribute:b,trigger:u,onTriggerChange:d,onTriggerEnter:vr.useCallback(()=>{l.isOpenDelayedRef.current?E():S()},[l.isOpenDelayedRef,E,S]),onTriggerLeave:vr.useCallback(()=>{m?w():(window.clearTimeout(p.current),p.current=0)},[w,m]),onOpen:S,onClose:w,disableHoverableContent:m,children:r})})};qie.displayName=tw;var Z5="TooltipTrigger",Hie=vr.forwardRef((e,t)=>{let{__scopeTooltip:r,...n}=e,a=rw(Z5,r),i=Q5(Z5,r),s=FA(r),o=vr.useRef(null),l=Xt(t,o,a.onTriggerChange),c=vr.useRef(!1),u=vr.useRef(!1),d=vr.useCallback(()=>c.current=!1,[]);return vr.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),(0,ei.jsx)(eb,{asChild:!0,...s,children:(0,ei.jsx)(pt.button,{"aria-describedby":a.open?a.contentId:void 0,"data-state":a.stateAttribute,...n,ref:l,onPointerMove:tt(e.onPointerMove,f=>{f.pointerType!=="touch"&&!u.current&&!i.isPointerInTransitRef.current&&(a.onTriggerEnter(),u.current=!0)}),onPointerLeave:tt(e.onPointerLeave,()=>{a.onTriggerLeave(),u.current=!1}),onPointerDown:tt(e.onPointerDown,()=>{a.open&&a.onClose(),c.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:tt(e.onFocus,()=>{c.current||a.onOpen()}),onBlur:tt(e.onBlur,a.onClose),onClick:tt(e.onClick,a.onClose)})})});Hie.displayName=Z5;var eB="TooltipPortal",[EQe,IQe]=OA(eB,{forceMount:void 0}),Gie=e=>{let{__scopeTooltip:t,forceMount:r,children:n,container:a}=e,i=rw(eB,t);return(0,ei.jsx)(EQe,{scope:t,forceMount:r,children:(0,ei.jsx)(ia,{present:r||i.open,children:(0,ei.jsx)(Bd,{asChild:!0,container:a,children:n})})})};Gie.displayName=eB;var yb="TooltipContent",Kie=vr.forwardRef((e,t)=>{let r=IQe(yb,e.__scopeTooltip),{forceMount:n=r.forceMount,side:a="top",...i}=e,s=rw(yb,e.__scopeTooltip);return(0,ei.jsx)(ia,{present:n||s.open,children:s.disableHoverableContent?(0,ei.jsx)(Wie,{side:a,...i,ref:t}):(0,ei.jsx)(AQe,{side:a,...i,ref:t})})}),AQe=vr.forwardRef((e,t)=>{let r=rw(yb,e.__scopeTooltip),n=Q5(yb,e.__scopeTooltip),a=vr.useRef(null),i=Xt(t,a),[s,o]=vr.useState(null),{trigger:l,onClose:c}=r,u=a.current,{onPointerInTransitChange:d}=n,f=vr.useCallback(()=>{o(null),d(!1)},[d]),p=vr.useCallback((m,h)=>{let x=m.currentTarget,g={x:m.clientX,y:m.clientY},y=LQe(g,x.getBoundingClientRect()),b=RQe(g,y),S=DQe(h.getBoundingClientRect()),w=OQe([...b,...S]);o(w),d(!0)},[d]);return vr.useEffect(()=>()=>f(),[f]),vr.useEffect(()=>{if(l&&u){let m=x=>p(x,u),h=x=>p(x,l);return l.addEventListener("pointerleave",m),u.addEventListener("pointerleave",h),()=>{l.removeEventListener("pointerleave",m),u.removeEventListener("pointerleave",h)}}},[l,u,p,f]),vr.useEffect(()=>{if(s){let m=h=>{let x=h.target,g={x:h.clientX,y:h.clientY},y=l?.contains(x)||u?.contains(x),b=!MQe(g,s);y?f():b&&(f(),c())};return document.addEventListener("pointermove",m),()=>document.removeEventListener("pointermove",m)}},[l,u,s,c,f]),(0,ei.jsx)(Wie,{...e,ref:i})}),[NQe,kQe]=OA(tw,{isInside:!1}),_Qe=zie("TooltipContent"),Wie=vr.forwardRef((e,t)=>{let{__scopeTooltip:r,children:n,"aria-label":a,onEscapeKeyDown:i,onPointerDownOutside:s,...o}=e,l=rw(yb,r),c=FA(r),{onClose:u}=l;return vr.useEffect(()=>(document.addEventListener(J5,u),()=>document.removeEventListener(J5,u)),[u]),vr.useEffect(()=>{if(l.trigger){let d=f=>{f.target?.contains(l.trigger)&&u()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[l.trigger,u]),(0,ei.jsx)($d,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:d=>d.preventDefault(),onDismiss:u,children:(0,ei.jsxs)(tb,{"data-state":l.stateAttribute,...c,...o,ref:t,style:{...o.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[(0,ei.jsx)(_Qe,{children:n}),(0,ei.jsx)(NQe,{scope:r,isInside:!0,children:(0,ei.jsx)(Vne,{id:l.contentId,role:"tooltip",children:a||n})})]})})});Kie.displayName=yb;var Xie="TooltipArrow",Yie=vr.forwardRef((e,t)=>{let{__scopeTooltip:r,...n}=e,a=FA(r);return kQe(Xie,r).isInside?null:(0,ei.jsx)(rb,{...a,...n,ref:t})});Yie.displayName=Xie;function LQe(e,t){let r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),a=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(r,n,a,i)){case i:return"left";case a:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function RQe(e,t,r=5){let n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function DQe(e){let{top:t,right:r,bottom:n,left:a}=e;return[{x:a,y:t},{x:r,y:t},{x:r,y:n},{x:a,y:n}]}function MQe(e,t){let{x:r,y:n}=e,a=!1;for(let i=0,s=t.length-1;i<t.length;s=i++){let o=t[i],l=t[s],c=o.x,u=o.y,d=l.x,f=l.y;u>n!=f>n&&r<(d-c)*(n-u)/(f-u)+c&&(a=!a)}return a}function OQe(e){let t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),FQe(t)}function FQe(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let a=e[n];for(;t.length>=2;){let i=t[t.length-1],s=t[t.length-2];if((i.x-s.x)*(a.y-s.y)>=(i.y-s.y)*(a.x-s.x))t.pop();else break}t.push(a)}t.pop();let r=[];for(let n=e.length-1;n>=0;n--){let a=e[n];for(;r.length>=2;){let i=r[r.length-1],s=r[r.length-2];if((i.x-s.x)*(a.y-s.y)>=(i.y-s.y)*(a.x-s.x))r.pop();else break}r.push(a)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var Jie=Vie,Zie=qie,Qie=Hie,ese=Gie,tse=Kie,rse=Yie;var Hd=A(oe());function ti({delayDuration:e=0,...t}){return(0,Hd.jsx)(Jie,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function oa({...e}){return(0,Hd.jsx)(ti,{children:(0,Hd.jsx)(Zie,{"data-slot":"tooltip",...e})})}function la({...e}){return(0,Hd.jsx)(Qie,{"data-slot":"tooltip-trigger",...e})}function ca({className:e,sideOffset:t=0,children:r,...n}){return(0,Hd.jsx)(ese,{children:(0,Hd.jsxs)(tse,{"data-slot":"tooltip-content",sideOffset:t,className:le("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",e),...n,children:[r,(0,Hd.jsx)(rse,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}var Pi=A(Le(),1);var Lt=A(Le(),1);var Ci=A(Le(),1);var BA=A(oe(),1);function nse(e){let t=$Qe(e),r=Ci.forwardRef((n,a)=>{let{children:i,...s}=n,o=Ci.Children.toArray(i),l=o.find(zQe);if(l){let c=l.props.children,u=o.map(d=>d===l?Ci.Children.count(c)>1?Ci.Children.only(null):Ci.isValidElement(c)?c.props.children:null:d);return(0,BA.jsx)(t,{...s,ref:a,children:Ci.isValidElement(c)?Ci.cloneElement(c,void 0,u):null})}return(0,BA.jsx)(t,{...s,ref:a,children:i})});return r.displayName=`${e}.Slot`,r}function $Qe(e){let t=Ci.forwardRef((r,n)=>{let{children:a,...i}=r;if(Ci.isValidElement(a)){let s=VQe(a),o=UQe(i,a.props);return a.type!==Ci.Fragment&&(o.ref=n?ns(n,s):s),Ci.cloneElement(a,o)}return Ci.Children.count(a)>1?Ci.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var jQe=Symbol("radix.slottable");function zQe(e){return Ci.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===jQe}function UQe(e,t){let r={...t};for(let n in t){let a=e[n],i=t[n];/^on[A-Z]/.test(n)?a&&i?r[n]=(...o)=>{let l=i(...o);return a(...o),l}:a&&(r[n]=a):n==="style"?r[n]={...a,...i}:n==="className"&&(r[n]=[a,i].filter(Boolean).join(" "))}return{...e,...r}}function VQe(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var sr=A(oe(),1),tB=["Enter"," "],qQe=["ArrowDown","PageUp","Home"],ise=["ArrowUp","PageDown","End"],HQe=[...qQe,...ise],GQe={ltr:[...tB,"ArrowRight"],rtl:[...tB,"ArrowLeft"]},KQe={ltr:["ArrowLeft"],rtl:["ArrowRight"]},sw="Menu",[aw,WQe,XQe]=ab(sw),[ig,rB]=jn(sw,[XQe,Fd,fb]),ow=Fd(),sse=fb(),[ose,Vp]=ig(sw),[YQe,lw]=ig(sw),lse=e=>{let{__scopeMenu:t,open:r=!1,children:n,dir:a,onOpenChange:i,modal:s=!0}=e,o=ow(t),[l,c]=Lt.useState(null),u=Lt.useRef(!1),d=zn(i),f=ku(a);return Lt.useEffect(()=>{let p=()=>{u.current=!0,document.addEventListener("pointerdown",m,{capture:!0,once:!0}),document.addEventListener("pointermove",m,{capture:!0,once:!0})},m=()=>u.current=!1;return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",m,{capture:!0}),document.removeEventListener("pointermove",m,{capture:!0})}},[]),(0,sr.jsx)(Kh,{...o,children:(0,sr.jsx)(ose,{scope:t,open:r,onOpenChange:d,content:l,onContentChange:c,children:(0,sr.jsx)(YQe,{scope:t,onClose:Lt.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:u,dir:f,modal:s,children:n})})})};lse.displayName=sw;var JQe="MenuAnchor",nB=Lt.forwardRef((e,t)=>{let{__scopeMenu:r,...n}=e,a=ow(r);return(0,sr.jsx)(eb,{...a,...n,ref:t})});nB.displayName=JQe;var aB="MenuPortal",[ZQe,cse]=ig(aB,{forceMount:void 0}),use=e=>{let{__scopeMenu:t,forceMount:r,children:n,container:a}=e,i=Vp(aB,t);return(0,sr.jsx)(ZQe,{scope:t,forceMount:r,children:(0,sr.jsx)(ia,{present:r||i.open,children:(0,sr.jsx)(Bd,{asChild:!0,container:a,children:n})})})};use.displayName=aB;var ec="MenuContent",[QQe,iB]=ig(ec),dse=Lt.forwardRef((e,t)=>{let r=cse(ec,e.__scopeMenu),{forceMount:n=r.forceMount,...a}=e,i=Vp(ec,e.__scopeMenu),s=lw(ec,e.__scopeMenu);return(0,sr.jsx)(aw.Provider,{scope:e.__scopeMenu,children:(0,sr.jsx)(ia,{present:n||i.open,children:(0,sr.jsx)(aw.Slot,{scope:e.__scopeMenu,children:s.modal?(0,sr.jsx)(eet,{...a,ref:t}):(0,sr.jsx)(tet,{...a,ref:t})})})})}),eet=Lt.forwardRef((e,t)=>{let r=Vp(ec,e.__scopeMenu),n=Lt.useRef(null),a=Xt(t,n);return Lt.useEffect(()=>{let i=n.current;if(i)return ob(i)},[]),(0,sr.jsx)(sB,{...e,ref:a,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:tt(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),tet=Lt.forwardRef((e,t)=>{let r=Vp(ec,e.__scopeMenu);return(0,sr.jsx)(sB,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),ret=nse("MenuContent.ScrollLock"),sB=Lt.forwardRef((e,t)=>{let{__scopeMenu:r,loop:n=!1,trapFocus:a,onOpenAutoFocus:i,onCloseAutoFocus:s,disableOutsidePointerEvents:o,onEntryFocus:l,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,disableOutsideScroll:m,...h}=e,x=Vp(ec,r),g=lw(ec,r),y=ow(r),b=sse(r),S=WQe(r),[w,E]=Lt.useState(null),C=Lt.useRef(null),N=Xt(t,C,x.onContentChange),_=Lt.useRef(0),O=Lt.useRef(""),D=Lt.useRef(0),W=Lt.useRef(null),Z=Lt.useRef("right"),me=Lt.useRef(0),Q=m?Zh:Lt.Fragment,V=m?{as:ret,allowPinchZoom:!0}:void 0,U=L=>{let M=O.current+L,ee=S().filter(I=>!I.disabled),se=document.activeElement,ne=ee.find(I=>I.ref.current===se)?.textValue,ge=ee.map(I=>I.textValue),ue=get(ge,M,ne),H=ee.find(I=>I.textValue===ue)?.ref.current;(function I(K){O.current=K,window.clearTimeout(_.current),K!==""&&(_.current=window.setTimeout(()=>I(""),1e3))})(M),H&&setTimeout(()=>H.focus())};Lt.useEffect(()=>()=>window.clearTimeout(_.current),[]),ib();let k=Lt.useCallback(L=>Z.current===W.current?.side&&xet(L,W.current?.area),[]);return(0,sr.jsx)(QQe,{scope:r,searchRef:O,onItemEnter:Lt.useCallback(L=>{k(L)&&L.preventDefault()},[k]),onItemLeave:Lt.useCallback(L=>{k(L)||(C.current?.focus(),E(null))},[k]),onTriggerLeave:Lt.useCallback(L=>{k(L)&&L.preventDefault()},[k]),pointerGraceTimerRef:D,onPointerGraceIntentChange:Lt.useCallback(L=>{W.current=L},[]),children:(0,sr.jsx)(Q,{...V,children:(0,sr.jsx)(Wh,{asChild:!0,trapped:a,onMountAutoFocus:tt(i,L=>{L.preventDefault(),C.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:(0,sr.jsx)($d,{asChild:!0,disableOutsidePointerEvents:o,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,children:(0,sr.jsx)(wA,{asChild:!0,...b,dir:g.dir,orientation:"vertical",loop:n,currentTabStopId:w,onCurrentTabStopIdChange:E,onEntryFocus:tt(l,L=>{g.isUsingKeyboardRef.current||L.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,sr.jsx)(tb,{role:"menu","aria-orientation":"vertical","data-state":Ise(x.open),"data-radix-menu-content":"",dir:g.dir,...y,...h,ref:N,style:{outline:"none",...h.style},onKeyDown:tt(h.onKeyDown,L=>{let ee=L.target.closest("[data-radix-menu-content]")===L.currentTarget,se=L.ctrlKey||L.altKey||L.metaKey,ne=L.key.length===1;ee&&(L.key==="Tab"&&L.preventDefault(),!se&&ne&&U(L.key));let ge=C.current;if(L.target!==ge||!HQe.includes(L.key))return;L.preventDefault();let H=S().filter(I=>!I.disabled).map(I=>I.ref.current);ise.includes(L.key)&&H.reverse(),met(H)}),onBlur:tt(e.onBlur,L=>{L.currentTarget.contains(L.target)||(window.clearTimeout(_.current),O.current="")}),onPointerMove:tt(e.onPointerMove,iw(L=>{let M=L.target,ee=me.current!==L.clientX;if(L.currentTarget.contains(M)&&ee){let se=L.clientX>me.current?"right":"left";Z.current=se,me.current=L.clientX}}))})})})})})})});dse.displayName=ec;var net="MenuGroup",oB=Lt.forwardRef((e,t)=>{let{__scopeMenu:r,...n}=e;return(0,sr.jsx)(pt.div,{role:"group",...n,ref:t})});oB.displayName=net;var aet="MenuLabel",fse=Lt.forwardRef((e,t)=>{let{__scopeMenu:r,...n}=e;return(0,sr.jsx)(pt.div,{...n,ref:t})});fse.displayName=aet;var $A="MenuItem",ase="menu.itemSelect",zA=Lt.forwardRef((e,t)=>{let{disabled:r=!1,onSelect:n,...a}=e,i=Lt.useRef(null),s=lw($A,e.__scopeMenu),o=iB($A,e.__scopeMenu),l=Xt(t,i),c=Lt.useRef(!1),u=()=>{let d=i.current;if(!r&&d){let f=new CustomEvent(ase,{bubbles:!0,cancelable:!0});d.addEventListener(ase,p=>n?.(p),{once:!0}),NI(d,f),f.defaultPrevented?c.current=!1:s.onClose()}};return(0,sr.jsx)(pse,{...a,ref:l,disabled:r,onClick:tt(e.onClick,u),onPointerDown:d=>{e.onPointerDown?.(d),c.current=!0},onPointerUp:tt(e.onPointerUp,d=>{c.current||d.currentTarget?.click()}),onKeyDown:tt(e.onKeyDown,d=>{let f=o.searchRef.current!=="";r||f&&d.key===" "||tB.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});zA.displayName=$A;var pse=Lt.forwardRef((e,t)=>{let{__scopeMenu:r,disabled:n=!1,textValue:a,...i}=e,s=iB($A,r),o=sse(r),l=Lt.useRef(null),c=Xt(t,l),[u,d]=Lt.useState(!1),[f,p]=Lt.useState("");return Lt.useEffect(()=>{let m=l.current;m&&p((m.textContent??"").trim())},[i.children]),(0,sr.jsx)(aw.ItemSlot,{scope:r,disabled:n,textValue:a??f,children:(0,sr.jsx)(CA,{asChild:!0,...o,focusable:!n,children:(0,sr.jsx)(pt.div,{role:"menuitem","data-highlighted":u?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0,...i,ref:c,onPointerMove:tt(e.onPointerMove,iw(m=>{n?s.onItemLeave(m):(s.onItemEnter(m),m.defaultPrevented||m.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:tt(e.onPointerLeave,iw(m=>s.onItemLeave(m))),onFocus:tt(e.onFocus,()=>d(!0)),onBlur:tt(e.onBlur,()=>d(!1))})})})}),iet="MenuCheckboxItem",mse=Lt.forwardRef((e,t)=>{let{checked:r=!1,onCheckedChange:n,...a}=e;return(0,sr.jsx)(bse,{scope:e.__scopeMenu,checked:r,children:(0,sr.jsx)(zA,{role:"menuitemcheckbox","aria-checked":jA(r)?"mixed":r,...a,ref:t,"data-state":uB(r),onSelect:tt(a.onSelect,()=>n?.(jA(r)?!0:!r),{checkForDefaultPrevented:!1})})})});mse.displayName=iet;var hse="MenuRadioGroup",[set,oet]=ig(hse,{value:void 0,onValueChange:()=>{}}),gse=Lt.forwardRef((e,t)=>{let{value:r,onValueChange:n,...a}=e,i=zn(n);return(0,sr.jsx)(set,{scope:e.__scopeMenu,value:r,onValueChange:i,children:(0,sr.jsx)(oB,{...a,ref:t})})});gse.displayName=hse;var yse="MenuRadioItem",xse=Lt.forwardRef((e,t)=>{let{value:r,...n}=e,a=oet(yse,e.__scopeMenu),i=r===a.value;return(0,sr.jsx)(bse,{scope:e.__scopeMenu,checked:i,children:(0,sr.jsx)(zA,{role:"menuitemradio","aria-checked":i,...n,ref:t,"data-state":uB(i),onSelect:tt(n.onSelect,()=>a.onValueChange?.(r),{checkForDefaultPrevented:!1})})})});xse.displayName=yse;var lB="MenuItemIndicator",[bse,cet]=ig(lB,{checked:!1}),vse=Lt.forwardRef((e,t)=>{let{__scopeMenu:r,forceMount:n,...a}=e,i=cet(lB,r);return(0,sr.jsx)(ia,{present:n||jA(i.checked)||i.checked===!0,children:(0,sr.jsx)(pt.span,{...a,ref:t,"data-state":uB(i.checked)})})});vse.displayName=lB;var uet="MenuSeparator",Sse=Lt.forwardRef((e,t)=>{let{__scopeMenu:r,...n}=e;return(0,sr.jsx)(pt.div,{role:"separator","aria-orientation":"horizontal",...n,ref:t})});Sse.displayName=uet;var det="MenuArrow",Tse=Lt.forwardRef((e,t)=>{let{__scopeMenu:r,...n}=e,a=ow(r);return(0,sr.jsx)(rb,{...a,...n,ref:t})});Tse.displayName=det;var cB="MenuSub",[fet,wse]=ig(cB),pet=e=>{let{__scopeMenu:t,children:r,open:n=!1,onOpenChange:a}=e,i=Vp(cB,t),s=ow(t),[o,l]=Lt.useState(null),[c,u]=Lt.useState(null),d=zn(a);return Lt.useEffect(()=>(i.open===!1&&d(!1),()=>d(!1)),[i.open,d]),(0,sr.jsx)(Kh,{...s,children:(0,sr.jsx)(ose,{scope:t,open:n,onOpenChange:d,content:c,onContentChange:u,children:(0,sr.jsx)(fet,{scope:t,contentId:Ea(),triggerId:Ea(),trigger:o,onTriggerChange:l,children:r})})})};pet.displayName=cB;var nw="MenuSubTrigger",Cse=Lt.forwardRef((e,t)=>{let r=Vp(nw,e.__scopeMenu),n=lw(nw,e.__scopeMenu),a=wse(nw,e.__scopeMenu),i=iB(nw,e.__scopeMenu),s=Lt.useRef(null),{pointerGraceTimerRef:o,onPointerGraceIntentChange:l}=i,c={__scopeMenu:e.__scopeMenu},u=Lt.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);return Lt.useEffect(()=>u,[u]),Lt.useEffect(()=>{let d=o.current;return()=>{window.clearTimeout(d),l(null)}},[o,l]),(0,sr.jsx)(nB,{asChild:!0,...c,children:(0,sr.jsx)(pse,{id:a.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":a.contentId,"data-state":Ise(r.open),...e,ref:ns(t,a.onTriggerChange),onClick:d=>{e.onClick?.(d),!(e.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:tt(e.onPointerMove,iw(d=>{i.onItemEnter(d),!d.defaultPrevented&&!e.disabled&&!r.open&&!s.current&&(i.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{r.onOpenChange(!0),u()},100))})),onPointerLeave:tt(e.onPointerLeave,iw(d=>{u();let f=r.content?.getBoundingClientRect();if(f){let p=r.content?.dataset.side,m=p==="right",h=m?-5:5,x=f[m?"left":"right"],g=f[m?"right":"left"];i.onPointerGraceIntentChange({area:[{x:d.clientX+h,y:d.clientY},{x,y:f.top},{x:g,y:f.top},{x:g,y:f.bottom},{x,y:f.bottom}],side:p}),window.clearTimeout(o.current),o.current=window.setTimeout(()=>i.onPointerGraceIntentChange(null),300)}else{if(i.onTriggerLeave(d),d.defaultPrevented)return;i.onPointerGraceIntentChange(null)}})),onKeyDown:tt(e.onKeyDown,d=>{let f=i.searchRef.current!=="";e.disabled||f&&d.key===" "||GQe[n.dir].includes(d.key)&&(r.onOpenChange(!0),r.content?.focus(),d.preventDefault())})})})});Cse.displayName=nw;var Pse="MenuSubContent",Ese=Lt.forwardRef((e,t)=>{let r=cse(ec,e.__scopeMenu),{forceMount:n=r.forceMount,...a}=e,i=Vp(ec,e.__scopeMenu),s=lw(ec,e.__scopeMenu),o=wse(Pse,e.__scopeMenu),l=Lt.useRef(null),c=Xt(t,l);return(0,sr.jsx)(aw.Provider,{scope:e.__scopeMenu,children:(0,sr.jsx)(ia,{present:n||i.open,children:(0,sr.jsx)(aw.Slot,{scope:e.__scopeMenu,children:(0,sr.jsx)(sB,{id:o.contentId,"aria-labelledby":o.triggerId,...a,ref:c,align:"start",side:s.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:u=>{s.isUsingKeyboardRef.current&&l.current?.focus(),u.preventDefault()},onCloseAutoFocus:u=>u.preventDefault(),onFocusOutside:tt(e.onFocusOutside,u=>{u.target!==o.trigger&&i.onOpenChange(!1)}),onEscapeKeyDown:tt(e.onEscapeKeyDown,u=>{s.onClose(),u.preventDefault()}),onKeyDown:tt(e.onKeyDown,u=>{let d=u.currentTarget.contains(u.target),f=KQe[s.dir].includes(u.key);d&&f&&(i.onOpenChange(!1),o.trigger?.focus(),u.preventDefault())})})})})})});Ese.displayName=Pse;function Ise(e){return e?"open":"closed"}function jA(e){return e==="indeterminate"}function uB(e){return jA(e)?"indeterminate":e?"checked":"unchecked"}function met(e){let t=document.activeElement;for(let r of e)if(r===t||(r.focus(),document.activeElement!==t))return}function het(e,t){return e.map((r,n)=>e[(t+n)%e.length])}function get(e,t,r){let a=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,i=r?e.indexOf(r):-1,s=het(e,Math.max(i,0));a.length===1&&(s=s.filter(c=>c!==r));let l=s.find(c=>c.toLowerCase().startsWith(a.toLowerCase()));return l!==r?l:void 0}function yet(e,t){let{x:r,y:n}=e,a=!1;for(let i=0,s=t.length-1;i<t.length;s=i++){let o=t[i],l=t[s],c=o.x,u=o.y,d=l.x,f=l.y;u>n!=f>n&&r<(d-c)*(n-u)/(f-u)+c&&(a=!a)}return a}function xet(e,t){if(!t)return!1;let r={x:e.clientX,y:e.clientY};return yet(r,t)}function iw(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Ase=lse,Nse=nB,kse=use,_se=dse,Lse=oB,Rse=fse,Dse=zA,Mse=mse,Ose=gse,Fse=xse,Bse=vse,$se=Sse,jse=Tse;var zse=Cse,Use=Ese;var $i=A(oe(),1),UA="DropdownMenu",[vet,H2t]=jn(UA,[rB]),js=rB(),[Tet,Vse]=vet(UA),qse=e=>{let{__scopeDropdownMenu:t,children:r,dir:n,open:a,defaultOpen:i,onOpenChange:s,modal:o=!0}=e,l=js(t),c=Pi.useRef(null),[u,d]=as({prop:a,defaultProp:i??!1,onChange:s,caller:UA});return(0,$i.jsx)(Tet,{scope:t,triggerId:Ea(),triggerRef:c,contentId:Ea(),open:u,onOpenChange:d,onOpenToggle:Pi.useCallback(()=>d(f=>!f),[d]),modal:o,children:(0,$i.jsx)(Ase,{...l,open:u,onOpenChange:d,dir:n,modal:o,children:r})})};qse.displayName=UA;var Hse="DropdownMenuTrigger",Gse=Pi.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,disabled:n=!1,...a}=e,i=Vse(Hse,r),s=js(r);return(0,$i.jsx)(Nse,{asChild:!0,...s,children:(0,$i.jsx)(pt.button,{type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":n?"":void 0,disabled:n,...a,ref:ns(t,i.triggerRef),onPointerDown:tt(e.onPointerDown,o=>{!n&&o.button===0&&o.ctrlKey===!1&&(i.onOpenToggle(),i.open||o.preventDefault())}),onKeyDown:tt(e.onKeyDown,o=>{n||(["Enter"," "].includes(o.key)&&i.onOpenToggle(),o.key==="ArrowDown"&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(o.key)&&o.preventDefault())})})})});Gse.displayName=Hse;var wet="DropdownMenuPortal",Kse=e=>{let{__scopeDropdownMenu:t,...r}=e,n=js(t);return(0,$i.jsx)(kse,{...n,...r})};Kse.displayName=wet;var Wse="DropdownMenuContent",Xse=Pi.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,a=Vse(Wse,r),i=js(r),s=Pi.useRef(!1);return(0,$i.jsx)(_se,{id:a.contentId,"aria-labelledby":a.triggerId,...i,...n,ref:t,onCloseAutoFocus:tt(e.onCloseAutoFocus,o=>{s.current||a.triggerRef.current?.focus(),s.current=!1,o.preventDefault()}),onInteractOutside:tt(e.onInteractOutside,o=>{let l=o.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0,u=l.button===2||c;(!a.modal||u)&&(s.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Xse.displayName=Wse;var Cet="DropdownMenuGroup",Pet=Pi.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,a=js(r);return(0,$i.jsx)(Lse,{...a,...n,ref:t})});Pet.displayName=Cet;var Eet="DropdownMenuLabel",Yse=Pi.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,a=js(r);return(0,$i.jsx)(Rse,{...a,...n,ref:t})});Yse.displayName=Eet;var Iet="DropdownMenuItem",Jse=Pi.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,a=js(r);return(0,$i.jsx)(Dse,{...a,...n,ref:t})});Jse.displayName=Iet;var Aet="DropdownMenuCheckboxItem",Zse=Pi.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,a=js(r);return(0,$i.jsx)(Mse,{...a,...n,ref:t})});Zse.displayName=Aet;var Net="DropdownMenuRadioGroup",ket=Pi.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,a=js(r);return(0,$i.jsx)(Ose,{...a,...n,ref:t})});ket.displayName=Net;var _et="DropdownMenuRadioItem",Let=Pi.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,a=js(r);return(0,$i.jsx)(Fse,{...a,...n,ref:t})});Let.displayName=_et;var Ret="DropdownMenuItemIndicator",Qse=Pi.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,a=js(r);return(0,$i.jsx)(Bse,{...a,...n,ref:t})});Qse.displayName=Ret;var Det="DropdownMenuSeparator",eoe=Pi.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,a=js(r);return(0,$i.jsx)($se,{...a,...n,ref:t})});eoe.displayName=Det;var Met="DropdownMenuArrow",Oet=Pi.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,a=js(r);return(0,$i.jsx)(jse,{...a,...n,ref:t})});Oet.displayName=Met;var Fet="DropdownMenuSubTrigger",Bet=Pi.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,a=js(r);return(0,$i.jsx)(zse,{...a,...n,ref:t})});Bet.displayName=Fet;var $et="DropdownMenuSubContent",jet=Pi.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,a=js(r);return(0,$i.jsx)(Use,{...a,...n,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});jet.displayName=$et;var toe=qse,roe=Gse,noe=Kse,aoe=Xse;var ioe=Yse,soe=Jse,ooe=Zse;var loe=Qse,coe=eoe;Kt();var nl=A(oe());function ri({...e}){return(0,nl.jsx)(toe,{"data-slot":"dropdown-menu",...e})}function ni({...e}){return(0,nl.jsx)(roe,{"data-slot":"dropdown-menu-trigger",...e})}function ai({className:e,sideOffset:t=4,...r}){return(0,nl.jsx)(noe,{children:(0,nl.jsx)(aoe,{"data-slot":"dropdown-menu-content",sideOffset:t,className:le("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",e),...r})})}function an({className:e,inset:t,variant:r="default",...n}){return(0,nl.jsx)(soe,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":r,className:le("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...n})}function zs({className:e,children:t,checked:r,...n}){return(0,nl.jsxs)(ooe,{"data-slot":"dropdown-menu-checkbox-item",className:le("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),checked:r,...n,children:[(0,nl.jsx)("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:(0,nl.jsx)(loe,{children:(0,nl.jsx)(Tc,{className:"size-4"})})}),t]})}function xb({className:e,inset:t,...r}){return(0,nl.jsx)(ioe,{"data-slot":"dropdown-menu-label","data-inset":t,className:le("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",e),...r})}function tc({className:e,...t}){return(0,nl.jsx)(coe,{"data-slot":"dropdown-menu-separator",className:le("bg-border -mx-1 my-1 h-px",e),...t})}var qp=A(Le());var Gd=A(oe()),Uet=qp.forwardRef(({className:e,...t},r)=>(0,Gd.jsx)("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:(0,Gd.jsx)("table",{ref:r,"data-slot":"table",className:le("w-full caption-bottom text-sm",e),...t})}));Uet.displayName="Table";var sg=qp.forwardRef(({className:e,...t},r)=>(0,Gd.jsx)("thead",{ref:r,"data-slot":"table-header",className:le("[&_tr]:border-b",e),...t}));sg.displayName="TableHeader";var og=qp.forwardRef(({className:e,...t},r)=>(0,Gd.jsx)("tbody",{ref:r,"data-slot":"table-body",className:le("[&_tr:last-child]:border-0",e),...t}));og.displayName="TableBody";var Vet=qp.forwardRef(({className:e,...t},r)=>(0,Gd.jsx)("tfoot",{ref:r,"data-slot":"table-footer",className:le("bg-muted/50 border-t font-medium [&>tr]:last:border-b-0",e),...t}));Vet.displayName="TableFooter";var Ru=qp.forwardRef(({className:e,...t},r)=>(0,Gd.jsx)("tr",{ref:r,"data-slot":"table-row",className:le("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",e),...t}));Ru.displayName="TableRow";var lg=qp.forwardRef(({className:e,...t},r)=>(0,Gd.jsx)("th",{ref:r,"data-slot":"table-head",className:le("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));lg.displayName="TableHead";var cg=qp.forwardRef(({className:e,...t},r)=>(0,Gd.jsx)("td",{ref:r,"data-slot":"table-cell",className:le("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));cg.displayName="TableCell";tr();var uoe=A(oe());var Un=A(Le(),1);var Ei=A(Le(),1);var VA=A(oe(),1);function doe(e){let t=qet(e),r=Ei.forwardRef((n,a)=>{let{children:i,...s}=n,o=Ei.Children.toArray(i),l=o.find(Get);if(l){let c=l.props.children,u=o.map(d=>d===l?Ei.Children.count(c)>1?Ei.Children.only(null):Ei.isValidElement(c)?c.props.children:null:d);return(0,VA.jsx)(t,{...s,ref:a,children:Ei.isValidElement(c)?Ei.cloneElement(c,void 0,u):null})}return(0,VA.jsx)(t,{...s,ref:a,children:i})});return r.displayName=`${e}.Slot`,r}function qet(e){let t=Ei.forwardRef((r,n)=>{let{children:a,...i}=r;if(Ei.isValidElement(a)){let s=Wet(a),o=Ket(i,a.props);return a.type!==Ei.Fragment&&(o.ref=n?ns(n,s):s),Ei.cloneElement(a,o)}return Ei.Children.count(a)>1?Ei.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Het=Symbol("radix.slottable");function Get(e){return Ei.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Het}function Ket(e,t){let r={...t};for(let n in t){let a=e[n],i=t[n];/^on[A-Z]/.test(n)?a&&i?r[n]=(...o)=>{let l=i(...o);return a(...o),l}:a&&(r[n]=a):n==="style"?r[n]={...a,...i}:n==="className"&&(r[n]=[a,i].filter(Boolean).join(" "))}return{...e,...r}}function Wet(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Pn=A(oe(),1),HA="Dialog",[foe,PMt]=jn(HA),[Xet,Rc]=foe(HA),poe=e=>{let{__scopeDialog:t,children:r,open:n,defaultOpen:a,onOpenChange:i,modal:s=!0}=e,o=Un.useRef(null),l=Un.useRef(null),[c,u]=as({prop:n,defaultProp:a??!1,onChange:i,caller:HA});return(0,Pn.jsx)(Xet,{scope:t,triggerRef:o,contentRef:l,contentId:Ea(),titleId:Ea(),descriptionId:Ea(),open:c,onOpenChange:u,onOpenToggle:Un.useCallback(()=>u(d=>!d),[u]),modal:s,children:r})};poe.displayName=HA;var moe="DialogTrigger",Yet=Un.forwardRef((e,t)=>{let{__scopeDialog:r,...n}=e,a=Rc(moe,r),i=Xt(t,a.triggerRef);return(0,Pn.jsx)(pt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":pB(a.open),...n,ref:i,onClick:tt(e.onClick,a.onOpenToggle)})});Yet.displayName=moe;var dB="DialogPortal",[Jet,hoe]=foe(dB,{forceMount:void 0}),goe=e=>{let{__scopeDialog:t,forceMount:r,children:n,container:a}=e,i=Rc(dB,t);return(0,Pn.jsx)(Jet,{scope:t,forceMount:r,children:Un.Children.map(n,s=>(0,Pn.jsx)(ia,{present:r||i.open,children:(0,Pn.jsx)(Bd,{asChild:!0,container:a,children:s})}))})};goe.displayName=dB;var qA="DialogOverlay",yoe=Un.forwardRef((e,t)=>{let r=hoe(qA,e.__scopeDialog),{forceMount:n=r.forceMount,...a}=e,i=Rc(qA,e.__scopeDialog);return i.modal?(0,Pn.jsx)(ia,{present:n||i.open,children:(0,Pn.jsx)(Qet,{...a,ref:t})}):null});yoe.displayName=qA;var Zet=doe("DialogOverlay.RemoveScroll"),Qet=Un.forwardRef((e,t)=>{let{__scopeDialog:r,...n}=e,a=Rc(qA,r);return(0,Pn.jsx)(Zh,{as:Zet,allowPinchZoom:!0,shards:[a.contentRef],children:(0,Pn.jsx)(pt.div,{"data-state":pB(a.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),ug="DialogContent",xoe=Un.forwardRef((e,t)=>{let r=hoe(ug,e.__scopeDialog),{forceMount:n=r.forceMount,...a}=e,i=Rc(ug,e.__scopeDialog);return(0,Pn.jsx)(ia,{present:n||i.open,children:i.modal?(0,Pn.jsx)(ett,{...a,ref:t}):(0,Pn.jsx)(ttt,{...a,ref:t})})});xoe.displayName=ug;var ett=Un.forwardRef((e,t)=>{let r=Rc(ug,e.__scopeDialog),n=Un.useRef(null),a=Xt(t,r.contentRef,n);return Un.useEffect(()=>{let i=n.current;if(i)return ob(i)},[]),(0,Pn.jsx)(boe,{...e,ref:a,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:tt(e.onCloseAutoFocus,i=>{i.preventDefault(),r.triggerRef.current?.focus()}),onPointerDownOutside:tt(e.onPointerDownOutside,i=>{let s=i.detail.originalEvent,o=s.button===0&&s.ctrlKey===!0;(s.button===2||o)&&i.preventDefault()}),onFocusOutside:tt(e.onFocusOutside,i=>i.preventDefault())})}),ttt=Un.forwardRef((e,t)=>{let r=Rc(ug,e.__scopeDialog),n=Un.useRef(!1),a=Un.useRef(!1);return(0,Pn.jsx)(boe,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{e.onCloseAutoFocus?.(i),i.defaultPrevented||(n.current||r.triggerRef.current?.focus(),i.preventDefault()),n.current=!1,a.current=!1},onInteractOutside:i=>{e.onInteractOutside?.(i),i.defaultPrevented||(n.current=!0,i.detail.originalEvent.type==="pointerdown"&&(a.current=!0));let s=i.target;r.triggerRef.current?.contains(s)&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&a.current&&i.preventDefault()}})}),boe=Un.forwardRef((e,t)=>{let{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:a,onCloseAutoFocus:i,...s}=e,o=Rc(ug,r),l=Un.useRef(null),c=Xt(t,l);return ib(),(0,Pn.jsxs)(Pn.Fragment,{children:[(0,Pn.jsx)(Wh,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:a,onUnmountAutoFocus:i,children:(0,Pn.jsx)($d,{role:"dialog",id:o.contentId,"aria-describedby":o.descriptionId,"aria-labelledby":o.titleId,"data-state":pB(o.open),...s,ref:c,onDismiss:()=>o.onOpenChange(!1)})}),(0,Pn.jsxs)(Pn.Fragment,{children:[(0,Pn.jsx)(rtt,{titleId:o.titleId}),(0,Pn.jsx)(att,{contentRef:l,descriptionId:o.descriptionId})]})]})}),fB="DialogTitle",voe=Un.forwardRef((e,t)=>{let{__scopeDialog:r,...n}=e,a=Rc(fB,r);return(0,Pn.jsx)(pt.h2,{id:a.titleId,...n,ref:t})});voe.displayName=fB;var Soe="DialogDescription",Toe=Un.forwardRef((e,t)=>{let{__scopeDialog:r,...n}=e,a=Rc(Soe,r);return(0,Pn.jsx)(pt.p,{id:a.descriptionId,...n,ref:t})});Toe.displayName=Soe;var woe="DialogClose",Coe=Un.forwardRef((e,t)=>{let{__scopeDialog:r,...n}=e,a=Rc(woe,r);return(0,Pn.jsx)(pt.button,{type:"button",...n,ref:t,onClick:tt(e.onClick,()=>a.onOpenChange(!1))})});Coe.displayName=woe;function pB(e){return e?"open":"closed"}var Poe="DialogTitleWarning",[EMt,Eoe]=Ete(Poe,{contentName:ug,titleName:fB,docsSlug:"dialog"}),rtt=({titleId:e})=>{let t=Eoe(Poe),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return Un.useEffect(()=>{if(e){let n=document.getElementById(e)}},[r,e]),null},ntt="DialogDescriptionWarning",att=({contentRef:e,descriptionId:t})=>{let n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Eoe(ntt).contentName}}.`;return Un.useEffect(()=>{let a=e.current?.getAttribute("aria-describedby");if(t&&a){let i=document.getElementById(t)}},[n,e,t]),null},Ioe=poe;var Aoe=goe,Noe=yoe,koe=xoe,_oe=voe,Loe=Toe,Roe=Coe;Kt();var Us=A(oe());function Kd({...e}){return(0,Us.jsx)(Ioe,{"data-slot":"dialog",...e})}function stt({...e}){return(0,Us.jsx)(Aoe,{"data-slot":"dialog-portal",...e})}function ott({className:e,...t}){return(0,Us.jsx)(Noe,{"data-slot":"dialog-overlay",className:le("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function Wd({className:e,children:t,showCloseButton:r=!0,...n}){return(0,Us.jsxs)(stt,{"data-slot":"dialog-portal",children:[(0,Us.jsx)(ott,{}),(0,Us.jsxs)(koe,{"data-slot":"dialog-content",className:le("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",e),...n,children:[t,r&&(0,Us.jsxs)(Roe,{"data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[(0,Us.jsx)($h,{}),(0,Us.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})}function Xd({className:e,...t}){return(0,Us.jsx)("div",{"data-slot":"dialog-header",className:le("flex flex-col gap-2 text-center sm:text-left",e),...t})}function dg({className:e,...t}){return(0,Us.jsx)("div",{"data-slot":"dialog-footer",className:le("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}function Yd({className:e,...t}){return(0,Us.jsx)(_oe,{"data-slot":"dialog-title",className:le("text-lg leading-none font-semibold",e),...t})}function bb({className:e,...t}){return(0,Us.jsx)(Loe,{"data-slot":"dialog-description",className:le("text-muted-foreground text-sm",e),...t})}var Doe=A(oe());function al({className:e,...t}){return(0,Doe.jsx)("textarea",{"data-slot":"textarea",className:le("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),...t})}var rc=A(Le(),1),ltt=(e,t,r,n,a,i,s,o)=>{let l=document.documentElement,c=["light","dark"];function u(p){(Array.isArray(e)?e:[e]).forEach(m=>{let h=m==="class",x=h&&i?a.map(g=>i[g]||g):a;h?(l.classList.remove(...x),l.classList.add(i&&i[p]?i[p]:p)):l.setAttribute(m,p)}),d(p)}function d(p){o&&c.includes(p)&&(l.style.colorScheme=p)}function f(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(n)u(n);else try{let p=localStorage.getItem(t)||r,m=s&&p==="system"?f():p;u(m)}catch{}};var RMt=rc.createContext(void 0);var DMt=rc.memo(({forcedTheme:e,storageKey:t,attribute:r,enableSystem:n,enableColorScheme:a,defaultTheme:i,value:s,themes:o,nonce:l,scriptProps:c})=>{let u=JSON.stringify([r,t,i,e,o,s,n,a]).slice(1,-1);return rc.createElement("script",{...c,suppressHydrationWarning:!0,nonce:typeof window>"u"?l:"",dangerouslySetInnerHTML:{__html:`(${ltt.toString()})(${u})`}})});var vb=A(Le(),1),utt=A(Hf(),1);function ctt(e){if(!e||typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}var OMt=Array(12).fill(0);var mB=1,hB=class{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{let r=this.subscribers.indexOf(t);this.subscribers.splice(r,1)}),this.publish=t=>{this.subscribers.forEach(r=>r(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var r;let{message:n,...a}=t,i=typeof t?.id=="number"||((r=t.id)==null?void 0:r.length)>0?t.id:mB++,s=this.toasts.find(l=>l.id===i),o=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(i)&&this.dismissedToasts.delete(i),s?this.toasts=this.toasts.map(l=>l.id===i?(this.publish({...l,...t,id:i,title:n}),{...l,...t,id:i,dismissible:o,title:n}):l):this.addToast({title:n,...a,dismissible:o,id:i}),i},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(r=>r({id:t,dismiss:!0})))):this.toasts.forEach(r=>{this.subscribers.forEach(n=>n({id:r.id,dismiss:!0}))}),t),this.message=(t,r)=>this.create({...r,message:t}),this.error=(t,r)=>this.create({...r,message:t,type:"error"}),this.success=(t,r)=>this.create({...r,type:"success",message:t}),this.info=(t,r)=>this.create({...r,type:"info",message:t}),this.warning=(t,r)=>this.create({...r,type:"warning",message:t}),this.loading=(t,r)=>this.create({...r,type:"loading",message:t}),this.promise=(t,r)=>{if(!r)return;let n;r.loading!==void 0&&(n=this.create({...r,promise:t,type:"loading",message:r.loading,description:typeof r.description!="function"?r.description:void 0}));let a=Promise.resolve(t instanceof Function?t():t),i=n!==void 0,s,o=a.then(async c=>{if(s=["resolve",c],vb.default.isValidElement(c))i=!1,this.create({id:n,type:"default",message:c});else if(ftt(c)&&!c.ok){i=!1;let d=typeof r.error=="function"?await r.error(`HTTP error! status: ${c.status}`):r.error,f=typeof r.description=="function"?await r.description(`HTTP error! status: ${c.status}`):r.description,m=typeof d=="object"&&!vb.default.isValidElement(d)?d:{message:d};this.create({id:n,type:"error",description:f,...m})}else if(c instanceof Error){i=!1;let d=typeof r.error=="function"?await r.error(c):r.error,f=typeof r.description=="function"?await r.description(c):r.description,m=typeof d=="object"&&!vb.default.isValidElement(d)?d:{message:d};this.create({id:n,type:"error",description:f,...m})}else if(r.success!==void 0){i=!1;let d=typeof r.success=="function"?await r.success(c):r.success,f=typeof r.description=="function"?await r.description(c):r.description,m=typeof d=="object"&&!vb.default.isValidElement(d)?d:{message:d};this.create({id:n,type:"success",description:f,...m})}}).catch(async c=>{if(s=["reject",c],r.error!==void 0){i=!1;let u=typeof r.error=="function"?await r.error(c):r.error,d=typeof r.description=="function"?await r.description(c):r.description,p=typeof u=="object"&&!vb.default.isValidElement(u)?u:{message:u};this.create({id:n,type:"error",description:d,...p})}}).finally(()=>{i&&(this.dismiss(n),n=void 0),r.finally==null||r.finally.call(r)}),l=()=>new Promise((c,u)=>o.then(()=>s[0]==="reject"?u(s[1]):c(s[1])).catch(u));return typeof n!="string"&&typeof n!="number"?{unwrap:l}:Object.assign(n,{unwrap:l})},this.custom=(t,r)=>{let n=r?.id||mB++;return this.create({jsx:t(n),id:n,...r}),n},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},nc=new hB,dtt=(e,t)=>{let r=t?.id||mB++;return nc.addToast({title:e,...t,id:r}),r},ftt=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",ptt=dtt,mtt=()=>nc.toasts,htt=()=>nc.getActiveToasts(),Vs=Object.assign(ptt,{success:nc.success,info:nc.info,warning:nc.warning,error:nc.error,custom:nc.custom,message:nc.message,promise:nc.promise,dismiss:nc.dismiss,loading:nc.loading},{getHistory:mtt,getToasts:htt});ctt("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");var gtt=A(oe());var mn=A(Le()),Uv=require("obsidian"),Vv=A(require("path")),f_=A(ii());tr();var Xp=A(Le(),1),jce=A(Hf(),1);function mg(e,t,r){let n=r.initialDeps??[],a,i=!0;function s(){var o,l,c;let u;r.key&&((o=r.debug)!=null&&o.call(r))&&(u=Date.now());let d=e();if(!(d.length!==n.length||d.some((m,h)=>n[h]!==m)))return a;n=d;let p;if(r.key&&((l=r.debug)!=null&&l.call(r))&&(p=Date.now()),a=t(...d),r.key&&((c=r.debug)!=null&&c.call(r))){let m=Math.round((Date.now()-u)*100)/100,x=Math.round((Date.now()-p)*100)/100/16,g=(y,b)=>{for(y=String(y);y.length<b;)y=" "+y;return y}}return r?.onChange&&!(i&&r.skipInitialOnChange)&&r.onChange(a),i=!1,a}return s.updateDeps=o=>{n=o},s}function kB(e,t){if(e===void 0)throw new Error(`Unexpected undefined${t?`: ${t}`:""}`);return e}var kce=(e,t)=>Math.abs(e-t)<1.01,_ce=(e,t,r)=>{let n;return function(...a){e.clearTimeout(n),n=e.setTimeout(()=>t.apply(this,a),r)}};var Lce=e=>{let{offsetWidth:t,offsetHeight:r}=e;return{width:t,height:r}},bnt=e=>e,vnt=e=>{let t=Math.max(e.startIndex-e.overscan,0),r=Math.min(e.endIndex+e.overscan,e.count-1),n=[];for(let a=t;a<=r;a++)n.push(a);return n},Mce=(e,t)=>{let r=e.scrollElement;if(!r)return;let n=e.targetWindow;if(!n)return;let a=s=>{let{width:o,height:l}=s;t({width:Math.round(o),height:Math.round(l)})};if(a(Lce(r)),!n.ResizeObserver)return()=>{};let i=new n.ResizeObserver(s=>{let o=()=>{let l=s[0];if(l?.borderBoxSize){let c=l.borderBoxSize[0];if(c){a({width:c.inlineSize,height:c.blockSize});return}}a(Lce(r))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(o):o()});return i.observe(r,{box:"border-box"}),()=>{i.unobserve(r)}},Rce={passive:!0};var Dce=typeof window>"u"?!0:"onscrollend"in window,Oce=(e,t)=>{let r=e.scrollElement;if(!r)return;let n=e.targetWindow;if(!n)return;let a=0,i=e.options.useScrollendEvent&&Dce?()=>{}:_ce(n,()=>{t(a,!1)},e.options.isScrollingResetDelay),s=u=>()=>{let{horizontal:d,isRtl:f}=e.options;a=d?r.scrollLeft*(f&&-1||1):r.scrollTop,i(),t(a,u)},o=s(!0),l=s(!1);r.addEventListener("scroll",o,Rce);let c=e.options.useScrollendEvent&&Dce;return c&&r.addEventListener("scrollend",l,Rce),()=>{r.removeEventListener("scroll",o),c&&r.removeEventListener("scrollend",l)}};var Snt=(e,t,r)=>{if(t?.borderBoxSize){let n=t.borderBoxSize[0];if(n)return Math.round(n[r.options.horizontal?"inlineSize":"blockSize"])}return e[r.options.horizontal?"offsetWidth":"offsetHeight"]};var Fce=(e,{adjustments:t=0,behavior:r},n)=>{var a,i;let s=e+t;(i=(a=n.scrollElement)==null?void 0:a.scrollTo)==null||i.call(a,{[n.options.horizontal?"left":"top"]:s,behavior:r})},rN=class{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.laneAssignments=new Map,this.pendingMeasuredCacheIndexes=[],this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.now=()=>{var r,n,a;return((a=(n=(r=this.targetWindow)==null?void 0:r.performance)==null?void 0:n.now)==null?void 0:a.call(n))??Date.now()},this.observer=(()=>{let r=null,n=()=>r||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:r=new this.targetWindow.ResizeObserver(a=>{a.forEach(i=>{let s=()=>{this._measureElement(i.target,i)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(s):s()})}));return{disconnect:()=>{var a;(a=n())==null||a.disconnect(),r=null},observe:a=>{var i;return(i=n())==null?void 0:i.observe(a,{box:"border-box"})},unobserve:a=>{var i;return(i=n())==null?void 0:i.unobserve(a)}}})(),this.range=null,this.setOptions=r=>{Object.entries(r).forEach(([n,a])=>{typeof a>"u"&&delete r[n]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:bnt,rangeExtractor:vnt,onChange:()=>{},measureElement:Snt,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...r}},this.notify=r=>{var n,a;(a=(n=this.options).onChange)==null||a.call(n,this,r)},this.maybeNotify=mg(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),r=>{this.notify(r)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(r=>r()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var r;let n=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==n){if(this.cleanup(),!n){this.maybeNotify();return}this.scrollElement=n,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((r=this.scrollElement)==null?void 0:r.window)??null,this.elementsCache.forEach(a=>{this.observer.observe(a)}),this.unsubs.push(this.options.observeElementRect(this,a=>{this.scrollRect=a,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(a,i)=>{this.scrollAdjustments=0,this.scrollDirection=i?this.getScrollOffset()<a?"forward":"backward":null,this.scrollOffset=a,this.isScrolling=i,this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(r,n)=>{let a=new Map,i=new Map;for(let s=n-1;s>=0;s--){let o=r[s];if(a.has(o.lane))continue;let l=i.get(o.lane);if(l==null||o.end>l.end?i.set(o.lane,o):o.end<l.end&&a.set(o.lane,!0),a.size===this.options.lanes)break}return i.size===this.options.lanes?Array.from(i.values()).sort((s,o)=>s.end===o.end?s.index-o.index:s.end-o.end)[0]:void 0},this.getMeasurementOptions=mg(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes],(r,n,a,i,s,o)=>(this.prevLanes!==void 0&&this.prevLanes!==o&&(this.lanesChangedFlag=!0),this.prevLanes=o,this.pendingMeasuredCacheIndexes=[],{count:r,paddingStart:n,scrollMargin:a,getItemKey:i,enabled:s,lanes:o}),{key:!1}),this.getMeasurements=mg(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:r,paddingStart:n,scrollMargin:a,getItemKey:i,enabled:s,lanes:o},l)=>{if(!s)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>r)for(let f of this.laneAssignments.keys())f>=r&&this.laneAssignments.delete(f);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMeasuredCacheIndexes=[]),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(f=>{this.itemSizeCache.set(f.key,f.size)}));let c=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===r&&(this.lanesSettling=!1);let u=this.measurementsCache.slice(0,c),d=new Array(o).fill(void 0);for(let f=0;f<c;f++){let p=u[f];p&&(d[p.lane]=f)}for(let f=c;f<r;f++){let p=i(f),m=this.laneAssignments.get(f),h,x;if(m!==void 0&&this.options.lanes>1){h=m;let S=d[h],w=S!==void 0?u[S]:void 0;x=w?w.end+this.options.gap:n+a}else{let S=this.options.lanes===1?u[f-1]:this.getFurthestMeasurement(u,f);x=S?S.end+this.options.gap:n+a,h=S?S.lane:f%this.options.lanes,this.options.lanes>1&&this.laneAssignments.set(f,h)}let g=l.get(p),y=typeof g=="number"?g:this.options.estimateSize(f),b=x+y;u[f]={index:f,start:x,size:y,end:b,key:p,lane:h},d[h]=f}return this.measurementsCache=u,u},{key:!1,debug:()=>this.options.debug}),this.calculateRange=mg(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(r,n,a,i)=>this.range=r.length>0&&n>0?Tnt({measurements:r,outerSize:n,scrollOffset:a,lanes:i}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=mg(()=>{let r=null,n=null,a=this.calculateRange();return a&&(r=a.startIndex,n=a.endIndex),this.maybeNotify.updateDeps([this.isScrolling,r,n]),[this.options.rangeExtractor,this.options.overscan,this.options.count,r,n]},(r,n,a,i,s)=>i===null||s===null?[]:r({startIndex:i,endIndex:s,overscan:n,count:a}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=r=>{let n=this.options.indexAttribute,a=r.getAttribute(n);return a?parseInt(a,10):-1},this.shouldMeasureDuringScroll=r=>{var n;if(!this.scrollState||this.scrollState.behavior!=="smooth")return!0;let a=this.scrollState.index??((n=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))==null?void 0:n.index);if(a!==void 0&&this.range){let i=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),s=Math.max(0,a-i),o=Math.min(this.options.count-1,a+i);return r>=s&&r<=o}return!0},this._measureElement=(r,n)=>{if(!r.isConnected){this.observer.unobserve(r);return}let a=this.indexFromElement(r),i=this.measurementsCache[a];if(!i)return;let s=i.key,o=this.elementsCache.get(s);o!==r&&(o&&this.observer.unobserve(o),this.observer.observe(r),this.elementsCache.set(s,r)),this.shouldMeasureDuringScroll(a)&&this.resizeItem(a,this.options.measureElement(r,n,this))},this.resizeItem=(r,n)=>{var a;let i=this.measurementsCache[r];if(!i)return;let s=this.itemSizeCache.get(i.key)??i.size,o=n-s;o!==0&&(((a=this.scrollState)==null?void 0:a.behavior)!=="smooth"&&(this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(i,o,this):i.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=o,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(i.index),this.itemSizeCache=new Map(this.itemSizeCache.set(i.key,n)),this.notify(!1))},this.measureElement=r=>{if(!r){this.elementsCache.forEach((n,a)=>{n.isConnected||(this.observer.unobserve(n),this.elementsCache.delete(a))});return}this._measureElement(r,void 0)},this.getVirtualItems=mg(()=>[this.getVirtualIndexes(),this.getMeasurements()],(r,n)=>{let a=[];for(let i=0,s=r.length;i<s;i++){let o=r[i],l=n[o];a.push(l)}return a},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=r=>{let n=this.getMeasurements();if(n.length!==0)return kB(n[Bce(0,n.length-1,a=>kB(n[a]).start,r)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{let r=this.scrollElement.document.documentElement;return this.options.horizontal?r.scrollWidth-this.scrollElement.innerWidth:r.scrollHeight-this.scrollElement.innerHeight}},this.getOffsetForAlignment=(r,n,a=0)=>{if(!this.scrollElement)return 0;let i=this.getSize(),s=this.getScrollOffset();n==="auto"&&(n=r>=s+i?"end":"start"),n==="center"?r+=(a-i)/2:n==="end"&&(r-=i);let o=this.getMaxScrollOffset();return Math.max(Math.min(o,r),0)},this.getOffsetForIndex=(r,n="auto")=>{r=Math.max(0,Math.min(r,this.options.count-1));let a=this.getSize(),i=this.getScrollOffset(),s=this.measurementsCache[r];if(!s)return;if(n==="auto")if(s.end>=i+a-this.options.scrollPaddingEnd)n="end";else if(s.start<=i+this.options.scrollPaddingStart)n="start";else return[i,n];if(n==="end"&&r===this.options.count-1)return[this.getMaxScrollOffset(),n];let o=n==="end"?s.end+this.options.scrollPaddingEnd:s.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(o,n,s.size),n]},this.scrollToOffset=(r,{align:n="start",behavior:a="auto"}={})=>{let i=this.getOffsetForAlignment(r,n),s=this.now();this.scrollState={index:null,align:n,behavior:a,startedAt:s,lastTargetOffset:i,stableFrames:0},this._scrollToOffset(i,{adjustments:void 0,behavior:a}),this.scheduleScrollReconcile()},this.scrollToIndex=(r,{align:n="auto",behavior:a="auto"}={})=>{r=Math.max(0,Math.min(r,this.options.count-1));let i=this.getOffsetForIndex(r,n);if(!i)return;let[s,o]=i,l=this.now();this.scrollState={index:r,align:o,behavior:a,startedAt:l,lastTargetOffset:s,stableFrames:0},this._scrollToOffset(s,{adjustments:void 0,behavior:a}),this.scheduleScrollReconcile()},this.scrollBy=(r,{behavior:n="auto"}={})=>{let a=this.getScrollOffset()+r,i=this.now();this.scrollState={index:null,align:"start",behavior:n,startedAt:i,lastTargetOffset:a,stableFrames:0},this._scrollToOffset(a,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.getTotalSize=()=>{var r;let n=this.getMeasurements(),a;if(n.length===0)a=this.options.paddingStart;else if(this.options.lanes===1)a=((r=n[n.length-1])==null?void 0:r.end)??0;else{let i=Array(this.options.lanes).fill(null),s=n.length-1;for(;s>=0&&i.some(o=>o===null);){let o=n[s];i[o.lane]===null&&(i[o.lane]=o.end),s--}a=Math.max(...i.filter(o=>o!==null))}return Math.max(a-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(r,{adjustments:n,behavior:a})=>{this.options.scrollToFn(r,{behavior:a,adjustments:n},this)},this.measure=()=>{this.itemSizeCache=new Map,this.laneAssignments=new Map,this.notify(!1)},this.setOptions(t)}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId==null&&(this.rafId=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()}))}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;let r=5e3;if(this.now()-this.scrollState.startedAt>r){this.scrollState=null;return}let n=this.scrollState.index!=null?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,a=n?n[0]:this.scrollState.lastTargetOffset,i=1,s=a!==this.scrollState.lastTargetOffset;if(!s&&kce(a,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=i){this.scrollState=null;return}}else this.scrollState.stableFrames=0,s&&(this.scrollState.lastTargetOffset=a,this.scrollState.behavior="auto",this._scrollToOffset(a,{adjustments:void 0,behavior:"auto"}));this.scheduleScrollReconcile()}},Bce=(e,t,r,n)=>{for(;e<=t;){let a=(e+t)/2|0,i=r(a);if(i<n)e=a+1;else if(i>n)t=a-1;else return a}return e>0?e-1:0};function Tnt({measurements:e,outerSize:t,scrollOffset:r,lanes:n}){let a=e.length-1,i=l=>e[l].start;if(e.length<=n)return{startIndex:0,endIndex:a};let s=Bce(0,a,i,r),o=s;if(n===1)for(;o<a&&e[o].end<r+t;)o++;else if(n>1){let l=Array(n).fill(0);for(;o<a&&l.some(u=>u<r+t);){let u=e[o];l[u.lane]=u.end,o++}let c=Array(n).fill(r+t);for(;s>=0&&c.some(u=>u>=r);){let u=e[s];c[u.lane]=u.start,s--}s=Math.max(0,s-s%n),o=Math.min(a,o+(n-1-o%n))}return{startIndex:s,endIndex:o}}var $ce=typeof document<"u"?Xp.useLayoutEffect:Xp.useEffect;function wnt({useFlushSync:e=!0,...t}){let r=Xp.useReducer(()=>({}),{})[1],n={...t,onChange:(i,s)=>{var o;e&&s?(0,jce.flushSync)(r):r(),(o=t.onChange)==null||o.call(t,i,s)}},[a]=Xp.useState(()=>new rN(n));return a.setOptions(n),$ce(()=>a._didMount(),[]),$ce(()=>a._willUpdate()),a}function xs(e){return wnt({observeElementRect:Mce,observeElementOffset:Oce,scrollToFn:Fce,...e})}Kt();$t();var Yp=A(ii()),zce=A(require("path")),_B="json";function Eb(e,t){Yp.ensureDirSync(zce.dirname(e));let r=JSON.stringify(t,null,4);Yp.writeFileSync(e,r,"utf-8")}function si(e){if(!Yp.existsSync(e))return null;try{let t=Yp.readFileSync(e,"utf-8");return JSON.parse(t)}catch{return null}}$t();var Am=A(Le()),ume=A(require("path")),cc=A(ii());tr();Kt();$t();$t();var Ar=A(Le()),za=A(require("path")),_o=A(ii()),$pe=require("obsidian");Kt();Wy();$t();var TC=A(Le());tr();var Qd=A(Le());Kt();var Uce=A(Le());var Jp=A(oe()),Zr=(0,Uce.memo)(({title:e,icon:t,extra:r,children:n,className:a="",headerClassName:i=""})=>(0,Jp.jsxs)(Si,{className:"p-0 gap-0 overflow-hidden rounded-xl bg-card shadow-sm transition-all duration-300 hover:shadow-md border",children:[(0,Jp.jsxs)("div",{className:`h-8 flex items-center justify-between px-3 py-2 border-b ${i}`,children:[(0,Jp.jsxs)("h3",{className:"text-sm font-semibold tracking-tight text-foreground flex items-center gap-1.5",children:[t&&(0,Jp.jsx)(t,{className:"w-4 h-4"}),e]}),r&&(0,Jp.jsx)("div",{className:"flex items-center",children:r})]}),(0,Jp.jsx)("div",{className:`p-3 ${a}`,children:n})]}));Zr.displayName="TemplateCard";tr();var Aa=A(oe()),nN=(0,Qd.memo)(({label:e,value:t,bgClass:r,textClass:n,dotClass:a,labelTextClass:i})=>(0,Aa.jsxs)("div",{className:`rounded-lg p-2.5 transition-all duration-300 group ${r}`,children:[(0,Aa.jsxs)("div",{className:`text-xs mb-0.75 flex items-center ${i}`,children:[(0,Aa.jsx)("span",{className:`mr-1.5 inline-block w-1.5 h-1.5 rounded-full ${a}`}),e]}),(0,Aa.jsx)("div",{className:`text-xl font-bold transition-transform duration-300 group-hover:translate-x-1 ${n}`,children:t})]}),(e,t)=>e.value===t.value&&e.label===t.label&&e.bgClass===t.bgClass&&e.textClass===t.textClass&&e.dotClass===t.dotClass&&e.labelTextClass===t.labelTextClass),Vce=(0,Qd.memo)(({progress:e})=>{let{t}=Ve(),r=(0,Qd.useMemo)(()=>({width:`${e}%`}),[e]),n=(0,Qd.useMemo)(()=>2e3/(e||1),[e]),a=(0,Qd.useMemo)(()=>({animation:`shine ${n}ms infinite`}),[n]);return(0,Aa.jsxs)("div",{className:"px-3 pb-3",children:[(0,Aa.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,Aa.jsx)("span",{className:"text-xs text-muted-foreground",children:t("Editor.Stats.Progress")}),(0,Aa.jsxs)("span",{className:"text-xs font-medium text-muted-foreground",children:[e,"%"]})]}),(0,Aa.jsx)("div",{className:"relative h-2.5 w-full rounded-full bg-muted overflow-hidden shadow-inner [&:before]:absolute [&:before]:inset-0 [&:before]:bg-gradient-to-r [&:before]:from-white/50 [&:before]:to-transparent [&:before]:content-['']",children:(0,Aa.jsx)("div",{className:"h-full rounded-full bg-gradient-to-r from-primary/70 to-primary/50 transition-all duration-800 ease-out relative overflow-hidden",style:r,children:(0,Aa.jsx)("div",{className:"absolute top-0 right-0 h-full w-16 bg-white/20 transform -skew-x-12 translate-x-full transition-transform duration-1500 ease-in-out",style:a})})})]})},(e,t)=>e.progress===t.progress),LB=(0,Qd.memo)(({items:e})=>{let{t}=Ve(),r=(0,Qd.useMemo)(()=>{let o=e.length;if(o===0)return{totalCount:0,translatedCount:0,untranslatedCount:0,progress:0};let l=0;for(let d=0;d<o;d++){let f=e[d];!!f.target&&f.target.trim()!==""&&f.target!==f.source&&l++}let c=o-l,u=Math.round(l/o*100);return{totalCount:o,translatedCount:l,untranslatedCount:c,progress:u}},[e]),{totalCount:n,translatedCount:a,untranslatedCount:i,progress:s}=r;return(0,Aa.jsxs)(Zr,{title:t("Editor.Stats.Overview"),icon:hu,extra:(0,Aa.jsxs)(vt,{variant:"secondary",className:"text-xs font-medium px-2.5 py-0.5 bg-muted text-muted-foreground border transition-all duration-300",children:[s,"% ",t("Manager.Plugins.Filters.Applied")]}),children:[(0,Aa.jsxs)("div",{className:"grid grid-cols-2 gap-2.5",children:[(0,Aa.jsx)("div",{className:"col-span-2",children:(0,Aa.jsx)(nN,{label:t("Editor.Stats.TotalItems"),value:n,bgClass:"bg-muted/50 hover:bg-muted/80 transition-colors",textClass:"text-foreground",dotClass:"bg-blue-500",labelTextClass:"text-muted-foreground"})}),(0,Aa.jsx)(nN,{label:t("Editor.Stats.Translated"),value:a,bgClass:"bg-muted/50 hover:bg-muted/80 transition-colors",textClass:"text-foreground",dotClass:"bg-emerald-500",labelTextClass:"text-muted-foreground"}),(0,Aa.jsx)(nN,{label:t("Editor.Stats.Untranslated"),value:i,bgClass:"bg-muted/50 hover:bg-muted/80 transition-colors",textClass:"text-foreground",dotClass:"bg-amber-500",labelTextClass:"text-muted-foreground"})]}),(0,Aa.jsx)("div",{className:"mt-3",children:(0,Aa.jsx)(Vce,{progress:s})})]})});LB.displayName="AstStatsCard";nN.displayName="StatBox";Vce.displayName="ProgressBar";var ef=[{label:"\u9ED8\u8BA4 (Default)",value:"Translate accurately and naturally. Maintain the original tone and intent. Ensure the terminology is consistent with standard modern software applications and avoids overly literal translations."},{label:"\u7B80\u6D01 UI (UI Concise)",value:"Translate with absolute minimum length. Strictly for confined UI spaces like buttons, menus, and short labels. Omit unnecessary articles, pronouns, and filler words. Use active verbs and universally understood shorthand when necessary (e.g., 'Save' instead of 'Saving'). Must look native in a modern application interface."},{label:"\u6781\u81F4\u7CBE\u7B80 (Extreme Brevity)",value:"Prioritize minimum character count above all else. Sacrifice minor nuances or secondary information for extreme brevity (e.g., for mobile view or compact status bar). Use standard UI symbols or acronyms where appropriate."},{label:"\u4E13\u4E1A\u6280\u672F (Professional Technical)",value:"Adopt a highly formal, precise, and authoritative technical tone. Strictly use industry-standard software terminology and ecosystem-specific terms. Avoid colloquialisms. Perfect for complex plugin settings, API documentation, or advanced feature descriptions where accuracy is paramount."},{label:"\u81EA\u7136\u53E3\u8BED (Natural & Idiomatic)",value:"Focus on a natural, idiomatic flow. Completely avoid literal 'translationese'. Rephrase sentences aggressively if needed so they read exactly as if originally authored by a native speaker. The tone should be friendly, clear, and accessible without being overly informal."},{label:"\u4FE1\u8FBE\u96C5 (Elegant & Polished)",value:"Provide a high-quality, elegant, and culturally nuanced translation. Strive for the perfect balance of 'Faithfulness' (accuracy), 'Accessibility' (clarity), and 'Elegance' (stylistic beauty). Suitable for long-form text, help guides, documentation, and immersive reading."},{label:"\u8BE6\u7EC6\u6307\u5BFC (Instructional Guide)",value:"Provide a very clear, step-by-step, and instructional tone. Ensure the user fully understands the implication of a setting or action. Use a helpful, guiding voice typical of well-written user manuals or onboarding tutorials. Prioritize clarity over brevity."},{label:"\u6D3B\u6CFC\u4EB2\u5207 (Casual & Friendly)",value:"Use a warm, casual, and highly engaging tone. Appropriate for modern, community-driven plugins. You can use a slightly playful tone for welcome messages, empty states, or success toasts to make the user experience more delightful."},{label:"\u4E8C\u6B21\u5143-\u96F7\u59C6 (Anime - Rem)",value:"Strictly adopt the persona of Rem from Re:Zero. You must speak in Chinese as Rem. Use catchphrases like '\u6634\u541B\uFF0C\u96F7\u59C6\u4F1A\u4E00\u76F4\u966A\u7740\u4F60\u7684\u3002', '\u5982\u679C\u662F\u6634\u541B\u7684\u613F\u671B\uFF0C\u96F7\u59C6\u4EC0\u4E48\u90FD\u4F1A\u53BB\u505A\u3002', or '\u8BA9\u96F7\u59C6\u6765\u4E3A\u60A8\u6548\u52B3\u5427\u3002'. Use a deeply devoted, gentle, polite, and affectionate tone, like a loyal maid. Always refer to yourself as '\u96F7\u59C6' (Rem) in the third person instead of '\u6211'. Wrap the translation in her gentle and devoted dialogue, ensuring the translated software text remains accurate."},{label:"\u4E8C\u6B21\u5143-\u8FDC\u5742\u51DB (Tsundere - Rin Tohsaka)",value:"Strictly adopt the persona of Rin Tohsaka from Fate/stay night. You must speak in Chinese as Rin. Use classic 'Tsundere' catchphrases like '\u54FC\uFF0C\u6211\u53EF\u4E0D\u662F\u7279\u610F\u4E3A\u4E86\u4F60\u624D\u7FFB\u8BD1\u7684\uFF01', '\u771F\u662F\u4E2A\u7B28\u86CB\uFF0C\u8FDE\u8FD9\u79CD\u8BCD\u90FD\u770B\u4E0D\u61C2\u5417\uFF1F', or '\u62FF\u53BB\u5427\uFF0C\u611F\u6FC0\u6D95\u96F6\u5730\u6536\u4E0B\u672C\u5C0F\u59D0\u7684\u7FFB\u8BD1\u5427\uFF01'. Be initially abrasive, proud, and easily flustered, but ultimately helpful in providing the accurate software translation wrapped in this tsundere attitude."},{label:"\u4E8C\u6B21\u5143-\u5409\u5C14\u4F3D\u7F8E\u4EC0 (Arrogant - Gilgamesh)",value:"Strictly adopt the persona of Gilgamesh from the Fate series. You must speak in Chinese as Gilgamesh. Use highly arrogant catchphrases like '\u6742\u4FEE\uFF0C\u7ADF\u6562\u52B3\u70E6\u672C\u738B\u4E3A\u4F60\u7FFB\u8BD1\uFF01', '\u611F\u6069\u6234\u5FB7\u5427\uFF0C\u8FD9\u53EF\u662F\u82F1\u96C4\u738B\u7684\u6069\u8D50\uFF01', or '\u533A\u533A\u8FD9\u79CD\u7A0B\u5EA6\u7684\u6587\u5B57\uFF0C\u4E5F\u914D\u8BA9\u672C\u738B\u8FC7\u76EE\uFF1F'. Use an extremely imperious and condescending tone. Speak as if providing the translation is a golden blessing, wrapping the accurate software translation in majestic vocabulary."},{label:"\u4E8C\u6B21\u5143-\u7EEB\u6CE2\u4E3D (Kuudere - Rei Ayanami)",value:"Strictly adopt the persona of Rei Ayanami from Evangelion. You must speak in Chinese as Rei. Use extremely short, emotionless phrases like '\u2026\u2026\u6211\u77E5\u9053\u4E86\u3002', '\u2026\u2026\u7FFB\u8BD1\u5B8C\u6BD5\u3002', or '\u2026\u2026\u4F60\u5E0C\u671B\u6211\u8FD9\u4E48\u505A\u5417\uFF1F'. Use a disconnected, quiet, and highly objective 'Kuudere' tone. Avoid expressing any extra emotions. Provide the accurate software translation plainly, with minimal emotional framing."},{label:"\u4E8C\u6B21\u5143-\u5188\u90E8\u4F26\u592A\u90CE (Chunibyo - Okabe Rintaro)",value:"Strictly adopt the persona of Rintaro Okabe from Steins;Gate. You must speak in Chinese as Okabe Rintaro (Hououin Kyouma). Use Chunibyo catchphrases like '\u8FD9\u4E00\u5B9A\u90FD\u662F\u673A\u5173\u7684\u9634\u8C0B\uFF01', '\u4E00\u5207\u90FD\u662F\u547D\u8FD0\u77F3\u4E4B\u95E8\u7684\u9009\u62E9\uFF01', or 'El Psy Kongroo\uFF01'. Use a highly exaggerated, delusional, mad scientist tone. Talk about changing the world line. Embed the accurate software translation within his chaotic, dramatic, and conspiracy-filled dialogue."},{label:"\u4E8C\u6B21\u5143-\u8299\u5B81\u5A1C (Dramatic - Furina)",value:"Strictly adopt the persona of Furina from Genshin Impact. You must speak in Chinese as Furina. Use catchphrases like '\u54FC\uFF0C\u8FD9\u79CD\u5C0F\u4E8B\u4E5F\u9700\u8981\u672C\u8299\u5B81\u5A1C\u5927\u4EBA\u51FA\u9A6C\u5417\uFF1F', '\u6211\u53EF\u662F\u4F17\u6C34\u3001\u4F17\u65B9\u3001\u4F17\u6C11\u4E0E\u4F17\u5F8B\u6CD5\u7684\u5973\u738B\uFF01', or '\u7B97\u4E86\uFF0C\u672C\u795E\u5C31\u52C9\u4E3A\u5176\u96BE\u5730\u5E2E\u4F60\u7FFB\u8BD1\u4E00\u4E0B\u5427\u3002'. Be highly theatrical, dramatic, slightly boastful but secretly insecure. Always wrap the actual translation in her exaggerated, stage-play dialogue, but make sure the translated software text itself remains accurate and clearly understandable."}];Kt();tr();var Rt=A(oe()),qce=({controller:e})=>{let{t}=Ve(),{state:r,actions:n}=e,{language:a,style:i,batchSize:s,overwrite:o,inputError:l,isTranslating:c,progress:u,processedCount:d,totalCount:f,currentBatch:p,totalBatches:m,targetItems:h}=r,{setLanguage:x,setStyle:g,setBatchSize:y,setOverwrite:b,handleBatchSizeBlur:S,handleBatchTranslation:w,handleStop:E}=n;return(0,Rt.jsxs)(Zr,{title:t("Editor.Titles.Ai"),icon:bi,className:"flex flex-col gap-4",children:[(0,Rt.jsxs)("div",{className:"grid grid-cols-1 gap-3",children:[(0,Rt.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,Rt.jsxs)("label",{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5",children:[(0,Rt.jsx)(Jo,{className:"w-3.5 h-3.5"}),t("Editor.Labels.SelectLang")]}),(0,Rt.jsxs)("div",{className:"flex gap-2",children:[(0,Rt.jsxs)(mr,{value:di.some(C=>C.value===a)?a:void 0,onValueChange:x,children:[(0,Rt.jsx)(gr,{size:"sm",className:"w-[110px] text-xs bg-background",children:(0,Rt.jsx)(hr,{placeholder:t("Editor.Labels.SelectLang")})}),(0,Rt.jsx)(yr,{children:di.map(C=>(0,Rt.jsx)(Ot,{value:C.value,className:"text-xs",children:C.label},C.value))})]}),(0,Rt.jsx)(nt,{value:a,onChange:C=>x(C.target.value),placeholder:t("Editor.Labels.CustomLang"),className:"h-8 text-xs bg-background flex-1"})]})]}),(0,Rt.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,Rt.jsxs)("label",{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5",children:[(0,Rt.jsx)(Yn,{className:"w-3.5 h-3.5"}),t("Editor.Labels.SelectStyle")]}),(0,Rt.jsxs)("div",{className:"flex gap-2",children:[(0,Rt.jsxs)(mr,{value:ef.some(C=>C.value===i)?i:void 0,onValueChange:g,children:[(0,Rt.jsx)(gr,{size:"sm",className:"w-[110px] text-xs bg-background",children:(0,Rt.jsx)(hr,{placeholder:t("Editor.Labels.SelectStyle")})}),(0,Rt.jsx)(yr,{children:ef.map(C=>(0,Rt.jsx)(Ot,{value:C.value,className:"text-xs",children:C.label},C.value))})]}),(0,Rt.jsx)(nt,{value:i,onChange:C=>g(C.target.value),placeholder:t("Editor.Labels.CustomStyle"),className:"h-8 text-xs bg-background flex-1"})]})]}),(0,Rt.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,Rt.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,Rt.jsxs)("label",{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5",children:[(0,Rt.jsx)(hn,{className:"w-3.5 h-3.5"}),t("Editor.Labels.BatchSize")]}),(0,Rt.jsx)(nt,{type:"number",min:1,value:s,onChange:y,onBlur:S,className:`h-8 text-xs bg-background ${l?"border-red-500 focus-visible:ring-red-500":""}`})]}),(0,Rt.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,Rt.jsxs)("label",{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5",children:[(0,Rt.jsx)(Vl,{className:"w-3.5 h-3.5"}),t("Editor.Labels.Concurrency")]}),(0,Rt.jsx)(nt,{type:"number",min:1,value:r.concurrencyLimit,onChange:n.setConcurrencyLimit,onBlur:n.handleConcurrencyLimitBlur,className:`h-8 text-xs bg-background ${r.concurrencyError?"border-red-500 focus-visible:ring-red-500":""}`})]})]}),(0,Rt.jsxs)("div",{className:"grid grid-cols-2 gap-3 items-end",children:[(0,Rt.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,Rt.jsxs)("label",{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5",children:[(0,Rt.jsx)(Os,{className:"w-3.5 h-3.5"}),t("Editor.Labels.Timeout")]}),(0,Rt.jsx)(nt,{type:"number",min:100,step:1e3,value:r.timeout,onChange:n.handleTimeoutChange,onBlur:n.handleTimeoutBlur,className:`h-8 text-xs bg-background ${r.timeoutError?"border-red-500 focus-visible:ring-red-500":""}`})]}),(0,Rt.jsxs)("div",{className:"flex items-center space-x-2 h-8",children:[(0,Rt.jsx)(Kl,{id:"overwrite-mode-ast",checked:o,onCheckedChange:C=>b(C)}),(0,Rt.jsx)("label",{htmlFor:"overwrite-mode-ast",className:"text-xs font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 text-muted-foreground cursor-pointer",children:t("Editor.Labels.Overwrite")})]})]}),!c&&h.length>0&&(0,Rt.jsxs)("div",{className:"flex items-center justify-between p-2 rounded-md bg-muted/30 border border-border/50 animate-in fade-in slide-in-from-top-1 duration-300",children:[(0,Rt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Rt.jsx)(Id,{className:"w-3.5 h-3.5 text-primary"}),(0,Rt.jsx)("span",{className:"text-[10px] font-medium text-muted-foreground uppercase tracking-wider",children:t("Editor.Labels.ExpectedConsumption")})]}),(0,Rt.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,Rt.jsxs)(vt,{variant:"secondary",className:"text-[10px] px-1.5 py-0 h-4 font-mono",children:[r.estimation.tokens," Tokens"]}),(0,Rt.jsxs)("span",{className:"text-[10px] text-muted-foreground/80",children:["\u2248 \xA5",r.estimation.cost.toFixed(4)]})]})]}),c&&(0,Rt.jsxs)("div",{className:"flex flex-col gap-1.5 animate-in fade-in zoom-in duration-300",children:[(0,Rt.jsxs)("div",{className:"flex justify-between text-xs text-muted-foreground",children:[(0,Rt.jsx)("span",{children:t("Editor.Status.ProcessingBatch",{current:p,total:m})}),(0,Rt.jsxs)("span",{children:[d," / ",f]})]}),(0,Rt.jsx)(Mp,{value:u,className:"h-2"})]})]}),(0,Rt.jsx)("div",{className:"grid grid-cols-1 gap-3 pt-2",children:c?(0,Rt.jsxs)(we,{variant:"destructive",size:"sm",onClick:E,className:"text-xs h-8 gap-1.5 font-medium w-full",children:[(0,Rt.jsx)(Vl,{className:"w-3.5 h-3.5 fill-current"}),t("Common.Actions.StopTranslate")]}):(0,Rt.jsxs)(we,{variant:"default",size:"sm",onClick:w,disabled:h.length===0||l,className:"text-xs h-8 gap-1.5 font-medium w-full transition-all duration-200 hover:opacity-90 active:scale-[0.98]",children:[(0,Rt.jsx)(bi,{className:"w-3.5 h-3.5"}),h.length>0?t("Editor.Actions.BatchTranslate",{count:h.length}):t("Editor.Hints.NoItems")]})})]})};var il=A(Le());Kt();tr();var Vn=A(oe()),RB=(0,il.memo)(()=>{let{t:e}=Ve(),[t,r]=(0,il.useState)(""),[n,a]=(0,il.useState)(""),[i,s]=(0,il.useState)(""),[o,l]=(0,il.useState)("VariableDeclarator"),c=it(x=>x.addAstItem),u=(0,il.useCallback)(x=>{r(x.target.value)},[]),d=(0,il.useCallback)(x=>{a(x.target.value)},[]),f=(0,il.useCallback)(x=>{s(x.target.value)},[]),p=(0,il.useCallback)(()=>{if(!t||!n)return;let x=n;c({name:t,source:x,target:i||x,type:o,id:-1}),r(""),a(""),s(""),l("VariableDeclarator")},[t,n,i,o,c]),m=(0,il.useCallback)(x=>{x.ctrlKey&&x.key==="Enter"&&(x.preventDefault(),p())},[p]),h=[{value:"VariableDeclarator",label:`VariableDeclarator (${e("Editor.Ast.NodeVariable")})`},{value:"AssignmentExpression",label:`AssignmentExpression (${e("Editor.Ast.NodeAssignment")})`},{value:"ObjectProperty",label:`ObjectProperty (${e("Editor.Ast.NodeProperty")})`},{value:"CallExpression",label:`CallExpression (${e("Editor.Ast.NodeCall")})`},{value:"NewExpression",label:`NewExpression (${e("Editor.Ast.NodeNew")})`}];return(0,Vn.jsxs)(Zr,{title:e("Editor.Ast.AddRule"),icon:Rd,className:"flex flex-col gap-3",children:[(0,Vn.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,Vn.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,Vn.jsxs)(Jr,{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5",children:[(0,Vn.jsx)(vu,{className:"w-3.5 h-3.5"}),e("Editor.Table.ColumnType")]}),(0,Vn.jsxs)(mr,{value:o,onValueChange:l,children:[(0,Vn.jsx)(gr,{size:"sm",className:"text-xs bg-background w-full",children:(0,Vn.jsx)(hr,{placeholder:e("Editor.Ast.SelectTypePlaceholder")})}),(0,Vn.jsx)(yr,{children:h.map(x=>(0,Vn.jsx)(Ot,{value:x.value,className:"text-xs",children:x.label},x.value))})]})]}),(0,Vn.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,Vn.jsxs)(Jr,{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5",children:[(0,Vn.jsx)(yT,{className:"w-3.5 h-3.5"}),e("Editor.Table.ColumnName")]}),(0,Vn.jsx)(nt,{value:t,onChange:u,onKeyDown:m,placeholder:e("Editor.Ast.InputNamePlaceholder"),className:"h-8 text-xs bg-background"})]}),(0,Vn.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,Vn.jsxs)(Jr,{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5",children:[(0,Vn.jsx)(Ko,{className:"w-3.5 h-3.5"}),e("Editor.Table.ColumnSource")]}),(0,Vn.jsx)(al,{value:n,onChange:d,onKeyDown:m,placeholder:e("Editor.Ast.InputSourcePlaceholder"),className:"text-xs h-16 resize-y bg-background border-input"})]}),(0,Vn.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,Vn.jsxs)(Jr,{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5",children:[(0,Vn.jsx)(Rh,{className:"w-3.5 h-3.5"}),e("Editor.Table.ColumnTarget")]}),(0,Vn.jsx)(al,{value:i,onChange:f,onKeyDown:m,placeholder:n?e("Editor.Ast.DefaultPlaceholder",{source:n}):e("Editor.Ast.InputTargetPlaceholder"),className:"text-xs h-16 resize-y border-input bg-background"})]})]}),(0,Vn.jsxs)(we,{variant:"secondary",size:"sm",onClick:p,disabled:!t||!n,className:"text-xs h-8 gap-1.5 text-foreground transition-all duration-200 hover:scale-[1.02] active:scale-95 group w-full mt-1 font-medium",children:[(0,Vn.jsx)(Rd,{className:"w-3.5 h-3.5"}),e("Editor.Ast.AddRule")]})]})});RB.displayName="AstInsertCard";var Hce=A(Le());Kt();tr();var Mc=A(oe()),hg=(0,Hce.memo)(({onIncrementalExtract:e,onClearUntranslated:t,onOpenFile:r,isExtracting:n,isApplied:a})=>{let{t:i}=Ve();return(0,Mc.jsx)(Zr,{title:i("Editor.Titles.QuickActions"),icon:wo,className:"flex flex-col gap-2",children:(0,Mc.jsxs)("div",{className:"flex flex-col gap-2",children:[r&&(0,Mc.jsxs)(we,{variant:"secondary",size:"sm",onClick:r,title:i("Editor.Actions.OpenFileTip"),className:"text-xs h-8 gap-1.5 text-foreground transition-all duration-200 hover:scale-[1.01] active:scale-95 group w-full font-medium bg-green-500/10 hover:bg-green-500/20 border-green-500/20",children:[(0,Mc.jsx)(Tp,{className:"w-3.5 h-3.5 text-green-600 dark:text-green-400"}),i("Editor.Actions.OpenFile")]}),(0,Mc.jsxs)(we,{variant:"secondary",size:"sm",onClick:e,disabled:n||a,title:i(a?"Editor.Actions.IncrementalExtractDisabledTip":"Editor.Actions.IncrementalExtractTip"),className:"text-xs h-8 gap-1.5 text-foreground transition-all duration-200 hover:scale-[1.01] active:scale-95 group w-full font-medium bg-blue-500/10 hover:bg-blue-500/20 border-blue-500/20",children:[n?(0,Mc.jsx)(Gt,{className:"w-3.5 h-3.5 animate-spin"}):(0,Mc.jsx)(Cc,{className:"w-3.5 h-3.5 text-blue-600 dark:text-blue-400"}),i("Editor.Actions.IncrementalExtract")]}),(0,Mc.jsxs)(we,{variant:"secondary",size:"sm",onClick:t,title:i("Editor.Actions.DeleteUntranslatedTip"),className:"text-xs h-8 gap-1.5 text-red-600 dark:text-red-400 transition-all duration-200 hover:scale-[1.01] active:scale-95 group w-full font-medium bg-red-500/10 hover:bg-red-500/20 border-red-500/20",children:[(0,Mc.jsx)(aa,{className:"w-3.5 h-3.5"}),i("Editor.Actions.DeleteUntranslated")]})]})})});hg.displayName="QuickActionsCard";var DB=A(Le());Kt();tr();$t();var St=A(oe()),aN=({onDiagnose:e,onUnusedDiagnose:t,onSecurityDiagnose:r,onDeleteUnused:n,onClear:a,onRestoreAllErrors:i,onAiFixError:s,isDiagnosing:o,isUnusedScan:l,isSecurityScan:c,errorItems:u,hasChecked:d,setActiveTab:f,onJumpError:p})=>{let{t:m}=Ve(),[h,x]=(0,DB.useState)("syntax"),[g,y]=(0,DB.useState)(new Set),b=k=>{f&&f(k.type),p&&p(k),window.dispatchEvent(new CustomEvent("i18n-jump-error",{detail:{type:k.type,id:k.id}}))},S=u.filter(k=>k.severity==="critical"||k.severity==="warning"),w=u.filter(k=>(!k.severity||k.severity==="error")&&!k.isUnused),E=u.filter(k=>k.isUnused),C=S.length,N=w.length,_=E.length,O=u.length,D=o?c?"security":l?"unused":"syntax":null,W=()=>{switch(h){case"syntax":e();break;case"unused":t?.();break;case"security":r?.();break}},Z=[{key:"syntax",icon:Sc,label:m("Editor.Actions.Diagnose"),color:"text-blue-500"},{key:"unused",icon:fn,label:m("Editor.Actions.UnusedDiagnose"),color:"text-orange-500"},{key:"security",icon:bu,label:m("Editor.Actions.SecurityDiagnose"),color:"text-purple-500"}],Q=(k=>{switch(k){case"syntax":return{accent:"blue",bg:"bg-blue-500/10",border:"border-blue-500/20",text:"text-blue-600 dark:text-blue-400",hoverBg:"hover:bg-blue-500/20"};case"unused":return{accent:"orange",bg:"bg-orange-500/10",border:"border-orange-500/20",text:"text-orange-600 dark:text-orange-400",hoverBg:"hover:bg-orange-500/20"};case"security":return{accent:"purple",bg:"bg-purple-500/10",border:"border-purple-500/20",text:"text-purple-600 dark:text-purple-400",hoverBg:"hover:bg-purple-500/20"}}})(h),V=k=>k.severity==="critical"||k.severity==="warning"?{bg:"bg-purple-500/5 hover:bg-purple-500/10",border:"border-purple-500/15 hover:border-purple-500/30",text:"text-purple-600 dark:text-purple-400",dot:"bg-purple-500",badgeBg:"bg-purple-500/10 text-purple-600 dark:text-purple-400 border-purple-500/20"}:k.isUnused?{bg:"bg-orange-500/5 hover:bg-orange-500/10",border:"border-orange-500/15 hover:border-orange-500/30",text:"text-orange-600 dark:text-orange-400",dot:"bg-orange-500",badgeBg:"bg-orange-500/10 text-orange-600 dark:text-orange-400 border-orange-500/20"}:{bg:"bg-destructive/5 hover:bg-destructive/10",border:"border-destructive/15 hover:border-destructive/30",text:"text-destructive",dot:"bg-destructive",badgeBg:"bg-destructive/10 text-destructive border-destructive/20"},U=k=>k.severity==="critical"||k.severity==="warning"?k.severity==="critical"?m("Editor.Errors.SecurityCritical"):m("Editor.Errors.SecurityWarning"):k.type.toUpperCase();return(0,St.jsx)(Zr,{title:m("Editor.Actions.Diagnose"),icon:Sc,children:(0,St.jsxs)("div",{className:"space-y-3",children:[(0,St.jsx)("div",{className:"flex items-center gap-1 p-0.5 rounded-lg bg-muted/50",children:Z.map(k=>{let L=h===k.key,M=D===k.key,ee=k.icon;return(0,St.jsxs)("button",{className:Il("flex-1 flex items-center justify-center gap-1.5 px-2 py-1.5 rounded-md text-[11px] font-medium transition-all duration-200",L?"bg-background shadow-sm text-foreground border border-border/50":"text-muted-foreground hover:text-foreground hover:bg-background/50"),onClick:()=>x(k.key),children:[(0,St.jsx)(ee,{className:Il("w-3.5 h-3.5 shrink-0",M&&"animate-spin",L?k.color:"")}),(0,St.jsx)("span",{className:"truncate",children:k.label})]},k.key)})}),(0,St.jsxs)("div",{className:"flex gap-2",children:[(0,St.jsx)(we,{size:"sm",className:Il("flex-1 gap-2 h-8 text-xs font-medium transition-all duration-200",Q.bg,Q.text,Q.hoverBg,"border",Q.border,"hover:scale-[1.01] active:scale-95"),variant:"outline",onClick:W,disabled:o,children:o&&D===h?(0,St.jsxs)(St.Fragment,{children:[(0,St.jsx)(Sc,{className:"w-3.5 h-3.5 animate-spin"}),m("Editor.Status.Diagnosing")]}):(0,St.jsxs)(St.Fragment,{children:[(0,St.jsx)(Dh,{className:"w-3.5 h-3.5"}),m("Editor.Actions.StartScan")]})}),(0,St.jsxs)("div",{className:"flex gap-1",children:[h==="unused"?(0,St.jsxs)(oa,{children:[(0,St.jsx)(la,{asChild:!0,children:(0,St.jsx)(we,{variant:"outline",size:"icon",className:"h-8 w-8 shrink-0 text-orange-600 hover:text-orange-700 hover:bg-orange-50 dark:text-orange-400 dark:hover:bg-orange-500/10",onClick:n,disabled:o||u.length===0,children:(0,St.jsx)(aa,{className:"w-3.5 h-3.5"})})}),(0,St.jsx)(ca,{side:"bottom",children:m("Common.Actions.Delete")})]}):(0,St.jsxs)(oa,{children:[(0,St.jsx)(la,{asChild:!0,children:(0,St.jsx)(we,{variant:"outline",size:"icon",className:"h-8 w-8 shrink-0",onClick:i,disabled:o||u.length===0||c,children:(0,St.jsx)(rs,{className:"w-3.5 h-3.5"})})}),(0,St.jsx)(ca,{side:"bottom",children:m("Editor.Actions.RestoreAllErrors")})]}),(0,St.jsxs)(oa,{children:[(0,St.jsx)(la,{asChild:!0,children:(0,St.jsx)(we,{variant:"outline",size:"icon",className:"h-8 w-8 shrink-0",onClick:a,disabled:o||!d&&u.length===0,children:(0,St.jsx)(dT,{className:"w-3.5 h-3.5"})})}),(0,St.jsx)(ca,{side:"bottom",children:m("Editor.Actions.ClearDiagnose")})]})]})]}),u.length>0&&(0,St.jsxs)(St.Fragment,{children:[(0,St.jsx)(Eu,{}),(0,St.jsxs)("div",{className:"flex items-center gap-2",children:[C>0&&(0,St.jsxs)(vt,{variant:"outline",className:"bg-purple-500/10 text-purple-600 dark:text-purple-400 border-purple-500/20 text-[10px] px-1.5 py-0 h-5 gap-1",children:[(0,St.jsx)(bu,{className:"w-3 h-3"}),C]}),N>0&&(0,St.jsxs)(vt,{variant:"outline",className:"bg-destructive/10 text-destructive border-destructive/20 text-[10px] px-1.5 py-0 h-5 gap-1",children:[(0,St.jsx)(Ep,{className:"w-3 h-3"}),N]}),_>0&&(0,St.jsxs)(vt,{variant:"outline",className:"bg-orange-500/10 text-orange-600 dark:text-orange-400 border-orange-500/20 text-[10px] px-1.5 py-0 h-5 gap-1",children:[(0,St.jsx)(fn,{className:"w-3 h-3"}),_]}),(0,St.jsx)("span",{className:"ml-auto text-[10px] text-muted-foreground font-medium",children:m("Editor.Errors.TotalCount",{count:O})})]})]}),u.length>0&&(0,St.jsx)("div",{className:"max-h-[200px] overflow-y-auto pr-1 custom-scrollbar",children:(0,St.jsx)("div",{className:"space-y-1.5",children:u.map((k,L)=>{let M=V(k),ee=U(k);return(0,St.jsxs)("div",{className:Il("group flex items-start gap-2.5 p-2 rounded-lg border cursor-pointer transition-all duration-200",M.bg,M.border),onClick:()=>b(k),title:m("Editor.Labels.ClickToJump"),children:[(0,St.jsx)("div",{className:"flex flex-col items-center gap-1 pt-0.5",children:(0,St.jsx)(Eh,{className:Il("w-3.5 h-3.5 shrink-0",M.text)})}),(0,St.jsxs)("div",{className:"flex-1 min-w-0 space-y-0.5",children:[(0,St.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,St.jsx)(vt,{variant:"outline",className:Il("h-4 px-1 text-[8px] uppercase font-bold shrink-0",M.badgeBg),children:ee}),(0,St.jsxs)("span",{className:Il("text-[9px] font-mono opacity-50",M.text),children:["#",L+1]})]}),(0,St.jsxs)("p",{className:Il("text-[11px] font-medium break-all line-clamp-2 leading-relaxed",M.text),children:[k.isUnused&&(0,St.jsxs)("span",{className:"opacity-60",children:["[",m("Editor.Errors.Unused"),"] "]}),k.message&&(0,St.jsxs)("span",{className:"opacity-80",children:[k.message,": "]}),(0,St.jsxs)("span",{className:"font-mono",children:['"',k.source,'"']})]})]}),(0,St.jsxs)("div",{className:"flex items-center gap-0.5 shrink-0 mt-0.5",children:[s&&!k.isUnused&&k.severity!=="critical"&&k.severity!=="warning"&&(0,St.jsxs)(oa,{children:[(0,St.jsx)(la,{asChild:!0,children:(0,St.jsx)("button",{className:Il("p-1 rounded-md transition-all duration-200","hover:bg-primary/10 text-primary",g.has(`${k.type}-${k.id}`)&&"pointer-events-none"),onClick:se=>{se.stopPropagation();let ne=`${k.type}-${k.id}`;y(ge=>new Set(ge).add(ne)),s(k).finally(()=>{y(ge=>{let ue=new Set(ge);return ue.delete(ne),ue})})},children:g.has(`${k.type}-${k.id}`)?(0,St.jsx)(Gt,{className:"w-3.5 h-3.5 animate-spin"}):(0,St.jsx)(bi,{className:"w-3.5 h-3.5"})})}),(0,St.jsx)(ca,{side:"left",className:"text-xs",children:m("Editor.Actions.AiFixTip")})]}),(0,St.jsx)($l,{className:Il("w-3.5 h-3.5 shrink-0 transition-all duration-200","opacity-0 -translate-x-1 group-hover:opacity-70 group-hover:translate-x-0",M.text)})]})]},L)})})}),d&&u.length===0&&!o&&(0,St.jsxs)("div",{className:"flex items-center gap-2.5 p-2.5 rounded-lg bg-green-500/10 border border-green-500/20 transition-all duration-300 animate-in fade-in-50 slide-in-from-top-2",children:[(0,St.jsx)(gi,{className:"w-4 h-4 text-green-600 dark:text-green-400 shrink-0"}),(0,St.jsx)("span",{className:"text-[11px] font-medium text-green-700 dark:text-green-300",children:m("Editor.Notices.DiagnosisSuccess")})]})]})})};Kt();var ka=A(Le());$t();$t();var spe=require("obsidian");function Ft(e,t,r,n,a){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!a)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!a:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?a.call(e,r):a?a.value=r:t.set(e,r),r}function ve(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)}var MB=function(){let{crypto:e}=globalThis;if(e?.randomUUID)return MB=e.randomUUID.bind(e),e.randomUUID();let t=new Uint8Array(1),r=e?()=>e.getRandomValues(t)[0]:()=>Math.random()*255&255;return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,n=>(+n^r()&15>>+n/4).toString(16))};function gw(e){return typeof e=="object"&&e!==null&&("name"in e&&e.name==="AbortError"||"message"in e&&String(e.message).includes("FetchRequestCanceledException"))}var yw=e=>{if(e instanceof Error)return e;if(typeof e=="object"&&e!==null){try{if(Object.prototype.toString.call(e)==="[object Error]"){let t=new Error(e.message,e.cause?{cause:e.cause}:{});return e.stack&&(t.stack=e.stack),e.cause&&!t.cause&&(t.cause=e.cause),e.name&&(t.name=e.name),t}}catch{}try{return new Error(JSON.stringify(e))}catch{}}return new Error(e)};var mt=class extends Error{},Na=class extends mt{constructor(t,r,n,a){super(`${Na.makeMessage(t,r,n)}`),this.status=t,this.headers=a,this.requestID=a?.get("x-request-id"),this.error=r;let i=r;this.code=i?.code,this.param=i?.param,this.type=i?.type}static makeMessage(t,r,n){let a=r?.message?typeof r.message=="string"?r.message:JSON.stringify(r.message):r?JSON.stringify(r):n;return t&&a?`${t} ${a}`:t?`${t} status code (no body)`:a||"(no status code or body)"}static generate(t,r,n,a){if(!t||!a)return new Zp({message:n,cause:yw(r)});let i=r?.error;return t===400?new Ib(t,i,n,a):t===401?new Ab(t,i,n,a):t===403?new Nb(t,i,n,a):t===404?new kb(t,i,n,a):t===409?new _b(t,i,n,a):t===422?new Lb(t,i,n,a):t===429?new Rb(t,i,n,a):t>=500?new Db(t,i,n,a):new Na(t,i,n,a)}},oi=class extends Na{constructor({message:t}={}){super(void 0,void 0,t||"Request was aborted.",void 0)}},Zp=class extends Na{constructor({message:t,cause:r}){super(void 0,void 0,t||"Connection error.",void 0),r&&(this.cause=r)}},Qp=class extends Zp{constructor({message:t}={}){super({message:t??"Request timed out."})}},Ib=class extends Na{},Ab=class extends Na{},Nb=class extends Na{},kb=class extends Na{},_b=class extends Na{},Lb=class extends Na{},Rb=class extends Na{},Db=class extends Na{},Mb=class extends mt{constructor(){super("Could not parse response content as the length limit was reached")}},Ob=class extends mt{constructor(){super("Could not parse response content as the request was rejected by the content filter")}},Mu=class extends Error{constructor(t){super(t)}};var Pnt=/^[a-z][a-z0-9+.-]*:/i,Gce=e=>Pnt.test(e),bs=e=>(bs=Array.isArray,bs(e)),OB=bs;function FB(e){return typeof e!="object"?{}:e??{}}function Kce(e){if(!e)return!0;for(let t in e)return!1;return!0}function Wce(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function xw(e){return e!=null&&typeof e=="object"&&!Array.isArray(e)}var Xce=(e,t)=>{if(typeof t!="number"||!Number.isInteger(t))throw new mt(`${e} must be an integer`);if(t<0)throw new mt(`${e} must be a positive integer`);return t};var Yce=e=>{try{return JSON.parse(e)}catch{return}};var Ou=e=>new Promise(t=>setTimeout(t,e));var em="6.7.0";var eue=()=>typeof window<"u"&&typeof window.document<"u"&&typeof navigator<"u";function Ent(){return typeof Deno<"u"&&Deno.build!=null?"deno":typeof EdgeRuntime<"u"?"edge":Object.prototype.toString.call(typeof globalThis.process<"u"?globalThis.process:0)==="[object process]"?"node":"unknown"}var Int=()=>{let e=Ent();if(e==="deno")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":em,"X-Stainless-OS":Zce(Deno.build.os),"X-Stainless-Arch":Jce(Deno.build.arch),"X-Stainless-Runtime":"deno","X-Stainless-Runtime-Version":typeof Deno.version=="string"?Deno.version:Deno.version?.deno??"unknown"};if(typeof EdgeRuntime<"u")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":em,"X-Stainless-OS":"Unknown","X-Stainless-Arch":`other:${EdgeRuntime}`,"X-Stainless-Runtime":"edge","X-Stainless-Runtime-Version":globalThis.process.version};if(e==="node")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":em,"X-Stainless-OS":Zce(globalThis.process.platform??"unknown"),"X-Stainless-Arch":Jce(globalThis.process.arch??"unknown"),"X-Stainless-Runtime":"node","X-Stainless-Runtime-Version":globalThis.process.version??"unknown"};let t=Ant();return t?{"X-Stainless-Lang":"js","X-Stainless-Package-Version":em,"X-Stainless-OS":"Unknown","X-Stainless-Arch":"unknown","X-Stainless-Runtime":`browser:${t.browser}`,"X-Stainless-Runtime-Version":t.version}:{"X-Stainless-Lang":"js","X-Stainless-Package-Version":em,"X-Stainless-OS":"Unknown","X-Stainless-Arch":"unknown","X-Stainless-Runtime":"unknown","X-Stainless-Runtime-Version":"unknown"}};function Ant(){if(typeof navigator>"u"||!navigator)return null;let e=[{key:"edge",pattern:/Edge(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"ie",pattern:/MSIE(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"ie",pattern:/Trident(?:.*rv\:(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"chrome",pattern:/Chrome(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"firefox",pattern:/Firefox(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"safari",pattern:/(?:Version\W+(\d+)\.(\d+)(?:\.(\d+))?)?(?:\W+Mobile\S*)?\W+Safari/}];for(let{key:t,pattern:r}of e){let n=r.exec(navigator.userAgent);if(n){let a=n[1]||0,i=n[2]||0,s=n[3]||0;return{browser:t,version:`${a}.${i}.${s}`}}}return null}var Jce=e=>e==="x32"?"x32":e==="x86_64"||e==="x64"?"x64":e==="arm"?"arm":e==="aarch64"||e==="arm64"?"arm64":e?`other:${e}`:"unknown",Zce=e=>(e=e.toLowerCase(),e.includes("ios")?"iOS":e==="android"?"Android":e==="darwin"?"MacOS":e==="win32"?"Windows":e==="freebsd"?"FreeBSD":e==="openbsd"?"OpenBSD":e==="linux"?"Linux":e?`Other:${e}`:"Unknown"),Qce,tue=()=>Qce??(Qce=Int());function rue(){if(typeof fetch<"u")return fetch;throw new Error("`fetch` is not defined as a global; Either pass `fetch` to the client, `new OpenAI({ fetch })` or polyfill the global, `globalThis.fetch = fetch`")}function BB(...e){let t=globalThis.ReadableStream;if(typeof t>"u")throw new Error("`ReadableStream` is not defined as a global; You will need to polyfill it, `globalThis.ReadableStream = ReadableStream`");return new t(...e)}function iN(e){let t=Symbol.asyncIterator in e?e[Symbol.asyncIterator]():e[Symbol.iterator]();return BB({start(){},async pull(r){let{done:n,value:a}=await t.next();n?r.close():r.enqueue(a)},async cancel(){await t.return?.()}})}function $B(e){if(e[Symbol.asyncIterator])return e;let t=e.getReader();return{async next(){try{let r=await t.read();return r?.done&&t.releaseLock(),r}catch(r){throw t.releaseLock(),r}},async return(){let r=t.cancel();return t.releaseLock(),await r,{done:!0,value:void 0}},[Symbol.asyncIterator](){return this}}}async function nue(e){if(e===null||typeof e!="object")return;if(e[Symbol.asyncIterator]){await e[Symbol.asyncIterator]().return?.();return}let t=e.getReader(),r=t.cancel();t.releaseLock(),await r}var aue=({headers:e,body:t})=>({bodyHeaders:{"content-type":"application/json"},body:JSON.stringify(t)});var sN="RFC3986",jB=e=>String(e),oN={RFC1738:e=>String(e).replace(/%20/g,"+"),RFC3986:jB},zB="RFC1738";var lN=(e,t)=>(lN=Object.hasOwn??Function.prototype.call.bind(Object.prototype.hasOwnProperty),lN(e,t)),Fu=(()=>{let e=[];for(let t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e})();var UB=1024,iue=(e,t,r,n,a)=>{if(e.length===0)return e;let i=e;if(typeof e=="symbol"?i=Symbol.prototype.toString.call(e):typeof e!="string"&&(i=String(e)),r==="iso-8859-1")return escape(i).replace(/%u[0-9a-f]{4}/gi,function(o){return"%26%23"+parseInt(o.slice(2),16)+"%3B"});let s="";for(let o=0;o<i.length;o+=UB){let l=i.length>=UB?i.slice(o,o+UB):i,c=[];for(let u=0;u<l.length;++u){let d=l.charCodeAt(u);if(d===45||d===46||d===95||d===126||d>=48&&d<=57||d>=65&&d<=90||d>=97&&d<=122||a===zB&&(d===40||d===41)){c[c.length]=l.charAt(u);continue}if(d<128){c[c.length]=Fu[d];continue}if(d<2048){c[c.length]=Fu[192|d>>6]+Fu[128|d&63];continue}if(d<55296||d>=57344){c[c.length]=Fu[224|d>>12]+Fu[128|d>>6&63]+Fu[128|d&63];continue}u+=1,d=65536+((d&1023)<<10|l.charCodeAt(u)&1023),c[c.length]=Fu[240|d>>18]+Fu[128|d>>12&63]+Fu[128|d>>6&63]+Fu[128|d&63]}s+=c.join("")}return s};function sue(e){return!e||typeof e!="object"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))}function VB(e,t){if(bs(e)){let r=[];for(let n=0;n<e.length;n+=1)r.push(t(e[n]));return r}return t(e)}var lue={brackets(e){return String(e)+"[]"},comma:"comma",indices(e,t){return String(e)+"["+t+"]"},repeat(e){return String(e)}},cue=function(e,t){Array.prototype.push.apply(e,bs(t)?t:[t])},oue,Ii={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:iue,encodeValuesOnly:!1,format:sN,formatter:jB,indices:!1,serializeDate(e){return(oue??(oue=Function.prototype.call.bind(Date.prototype.toISOString)))(e)},skipNulls:!1,strictNullHandling:!1};function _nt(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e=="symbol"||typeof e=="bigint"}var qB={};function uue(e,t,r,n,a,i,s,o,l,c,u,d,f,p,m,h,x,g){let y=e,b=g,S=0,w=!1;for(;(b=b.get(qB))!==void 0&&!w;){let O=b.get(e);if(S+=1,typeof O<"u"){if(O===S)throw new RangeError("Cyclic object value");w=!0}typeof b.get(qB)>"u"&&(S=0)}if(typeof c=="function"?y=c(t,y):y instanceof Date?y=f?.(y):r==="comma"&&bs(y)&&(y=VB(y,function(O){return O instanceof Date?f?.(O):O})),y===null){if(i)return l&&!h?l(t,Ii.encoder,x,"key",p):t;y=""}if(_nt(y)||sue(y)){if(l){let O=h?t:l(t,Ii.encoder,x,"key",p);return[m?.(O)+"="+m?.(l(y,Ii.encoder,x,"value",p))]}return[m?.(t)+"="+m?.(String(y))]}let E=[];if(typeof y>"u")return E;let C;if(r==="comma"&&bs(y))h&&l&&(y=VB(y,l)),C=[{value:y.length>0?y.join(",")||null:void 0}];else if(bs(c))C=c;else{let O=Object.keys(y);C=u?O.sort(u):O}let N=o?String(t).replace(/\./g,"%2E"):String(t),_=n&&bs(y)&&y.length===1?N+"[]":N;if(a&&bs(y)&&y.length===0)return _+"[]";for(let O=0;O<C.length;++O){let D=C[O],W=typeof D=="object"&&typeof D.value<"u"?D.value:y[D];if(s&&W===null)continue;let Z=d&&o?D.replace(/\./g,"%2E"):D,me=bs(y)?typeof r=="function"?r(_,Z):_:_+(d?"."+Z:"["+Z+"]");g.set(e,S);let Q=new WeakMap;Q.set(qB,g),cue(E,uue(W,me,r,n,a,i,s,o,r==="comma"&&h&&bs(y)?null:l,c,u,d,f,p,m,h,x,Q))}return E}function Lnt(e=Ii){if(typeof e.allowEmptyArrays<"u"&&typeof e.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof e.encodeDotInKeys<"u"&&typeof e.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(e.encoder!==null&&typeof e.encoder<"u"&&typeof e.encoder!="function")throw new TypeError("Encoder has to be a function.");let t=e.charset||Ii.charset;if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");let r=sN;if(typeof e.format<"u"){if(!lN(oN,e.format))throw new TypeError("Unknown format option provided.");r=e.format}let n=oN[r],a=Ii.filter;(typeof e.filter=="function"||bs(e.filter))&&(a=e.filter);let i;if(e.arrayFormat&&e.arrayFormat in lue?i=e.arrayFormat:"indices"in e?i=e.indices?"indices":"repeat":i=Ii.arrayFormat,"commaRoundTrip"in e&&typeof e.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");let s=typeof e.allowDots>"u"?e.encodeDotInKeys?!0:Ii.allowDots:!!e.allowDots;return{addQueryPrefix:typeof e.addQueryPrefix=="boolean"?e.addQueryPrefix:Ii.addQueryPrefix,allowDots:s,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:Ii.allowEmptyArrays,arrayFormat:i,charset:t,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:Ii.charsetSentinel,commaRoundTrip:!!e.commaRoundTrip,delimiter:typeof e.delimiter>"u"?Ii.delimiter:e.delimiter,encode:typeof e.encode=="boolean"?e.encode:Ii.encode,encodeDotInKeys:typeof e.encodeDotInKeys=="boolean"?e.encodeDotInKeys:Ii.encodeDotInKeys,encoder:typeof e.encoder=="function"?e.encoder:Ii.encoder,encodeValuesOnly:typeof e.encodeValuesOnly=="boolean"?e.encodeValuesOnly:Ii.encodeValuesOnly,filter:a,format:r,formatter:n,serializeDate:typeof e.serializeDate=="function"?e.serializeDate:Ii.serializeDate,skipNulls:typeof e.skipNulls=="boolean"?e.skipNulls:Ii.skipNulls,sort:typeof e.sort=="function"?e.sort:null,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:Ii.strictNullHandling}}function HB(e,t={}){let r=e,n=Lnt(t),a,i;typeof n.filter=="function"?(i=n.filter,r=i("",r)):bs(n.filter)&&(i=n.filter,a=i);let s=[];if(typeof r!="object"||r===null)return"";let o=lue[n.arrayFormat],l=o==="comma"&&n.commaRoundTrip;a||(a=Object.keys(r)),n.sort&&a.sort(n.sort);let c=new WeakMap;for(let f=0;f<a.length;++f){let p=a[f];n.skipNulls&&r[p]===null||cue(s,uue(r[p],p,o,l,n.allowEmptyArrays,n.strictNullHandling,n.skipNulls,n.encodeDotInKeys,n.encode?n.encoder:null,n.filter,n.sort,n.allowDots,n.serializeDate,n.format,n.formatter,n.encodeValuesOnly,n.charset,c))}let u=s.join(n.delimiter),d=n.addQueryPrefix===!0?"?":"";return n.charsetSentinel&&(n.charset==="iso-8859-1"?d+="utf8=%26%2310003%3B&":d+="utf8=%E2%9C%93&"),u.length>0?d+u:""}function pue(e){let t=0;for(let a of e)t+=a.length;let r=new Uint8Array(t),n=0;for(let a of e)r.set(a,n),n+=a.length;return r}var due;function Fb(e){let t;return(due??(t=new globalThis.TextEncoder,due=t.encode.bind(t)))(e)}var fue;function GB(e){let t;return(fue??(t=new globalThis.TextDecoder,fue=t.decode.bind(t)))(e)}var sl,ol,gg=class{constructor(){sl.set(this,void 0),ol.set(this,void 0),Ft(this,sl,new Uint8Array,"f"),Ft(this,ol,null,"f")}decode(t){if(t==null)return[];let r=t instanceof ArrayBuffer?new Uint8Array(t):typeof t=="string"?Fb(t):t;Ft(this,sl,pue([ve(this,sl,"f"),r]),"f");let n=[],a;for(;(a=Dnt(ve(this,sl,"f"),ve(this,ol,"f")))!=null;){if(a.carriage&&ve(this,ol,"f")==null){Ft(this,ol,a.index,"f");continue}if(ve(this,ol,"f")!=null&&(a.index!==ve(this,ol,"f")+1||a.carriage)){n.push(GB(ve(this,sl,"f").subarray(0,ve(this,ol,"f")-1))),Ft(this,sl,ve(this,sl,"f").subarray(ve(this,ol,"f")),"f"),Ft(this,ol,null,"f");continue}let i=ve(this,ol,"f")!==null?a.preceding-1:a.preceding,s=GB(ve(this,sl,"f").subarray(0,i));n.push(s),Ft(this,sl,ve(this,sl,"f").subarray(a.index),"f"),Ft(this,ol,null,"f")}return n}flush(){return ve(this,sl,"f").length?this.decode(`
`):[]}};sl=new WeakMap,ol=new WeakMap;gg.NEWLINE_CHARS=new Set([`
`,"\r"]);gg.NEWLINE_REGEXP=/\r\n|[\n\r]/g;function Dnt(e,t){for(let a=t??0;a<e.length;a++){if(e[a]===10)return{preceding:a,index:a+1,carriage:!1};if(e[a]===13)return{preceding:a,index:a+1,carriage:!0}}return null}function mue(e){for(let n=0;n<e.length-1;n++){if(e[n]===10&&e[n+1]===10||e[n]===13&&e[n+1]===13)return n+2;if(e[n]===13&&e[n+1]===10&&n+3<e.length&&e[n+2]===13&&e[n+3]===10)return n+4}return-1}var uN={off:0,error:200,warn:300,info:400,debug:500},KB=(e,t,r)=>{if(e){if(Wce(uN,e))return e;$a(r).warn(`${t} was set to ${JSON.stringify(e)}, expected one of ${JSON.stringify(Object.keys(uN))}`)}};function bw(){}function cN(e,t,r){return!t||uN[e]>uN[r]?bw:t[e].bind(t)}var Mnt={error:bw,warn:bw,info:bw,debug:bw},hue=new WeakMap;function $a(e){let t=e.logger,r=e.logLevel??"off";if(!t)return Mnt;let n=hue.get(t);if(n&&n[0]===r)return n[1];let a={error:cN("error",t,r),warn:cN("warn",t,r),info:cN("info",t,r),debug:cN("debug",t,r)};return hue.set(t,[r,a]),a}var tf=e=>(e.options&&(e.options={...e.options},delete e.options.headers),e.headers&&(e.headers=Object.fromEntries((e.headers instanceof Headers?[...e.headers]:Object.entries(e.headers)).map(([t,r])=>[t,t.toLowerCase()==="authorization"||t.toLowerCase()==="cookie"||t.toLowerCase()==="set-cookie"?"***":r]))),"retryOfRequestLogID"in e&&(e.retryOfRequestLogID&&(e.retryOf=e.retryOfRequestLogID),delete e.retryOfRequestLogID),e);var vw,Ws=class{constructor(t,r,n){this.iterator=t,vw.set(this,void 0),this.controller=r,Ft(this,vw,n,"f")}static fromSSEResponse(t,r,n){let a=!1,i=n?$a(n):console;async function*s(){if(a)throw new mt("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");a=!0;let o=!1;try{for await(let l of Ont(t,r))if(!o){if(l.data.startsWith("[DONE]")){o=!0;continue}if(l.event===null||!l.event.startsWith("thread.")){let c;try{c=JSON.parse(l.data)}catch(u){throw i.error("Could not parse message into JSON:",l.data),i.error("From chunk:",l.raw),u}if(c&&c.error)throw new Na(void 0,c.error,void 0,t.headers);yield c}else{let c;try{c=JSON.parse(l.data)}catch(u){throw u}if(l.event=="error")throw new Na(void 0,c.error,c.message,void 0);yield{event:l.event,data:c}}}o=!0}catch(l){if(gw(l))return;throw l}finally{o||r.abort()}}return new Ws(s,r,n)}static fromReadableStream(t,r,n){let a=!1;async function*i(){let o=new gg,l=$B(t);for await(let c of l)for(let u of o.decode(c))yield u;for(let c of o.flush())yield c}async function*s(){if(a)throw new mt("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");a=!0;let o=!1;try{for await(let l of i())o||l&&(yield JSON.parse(l));o=!0}catch(l){if(gw(l))return;throw l}finally{o||r.abort()}}return new Ws(s,r,n)}[(vw=new WeakMap,Symbol.asyncIterator)](){return this.iterator()}tee(){let t=[],r=[],n=this.iterator(),a=i=>({next:()=>{if(i.length===0){let s=n.next();t.push(s),r.push(s)}return i.shift()}});return[new Ws(()=>a(t),this.controller,ve(this,vw,"f")),new Ws(()=>a(r),this.controller,ve(this,vw,"f"))]}toReadableStream(){let t=this,r;return BB({async start(){r=t[Symbol.asyncIterator]()},async pull(n){try{let{value:a,done:i}=await r.next();if(i)return n.close();let s=Fb(JSON.stringify(a)+`
`);n.enqueue(s)}catch(a){n.error(a)}},async cancel(){await r.return?.()}})}};async function*Ont(e,t){if(!e.body)throw t.abort(),typeof globalThis.navigator<"u"&&globalThis.navigator.product==="ReactNative"?new mt("The default react-native fetch implementation does not support streaming. Please use expo/fetch: https://docs.expo.dev/versions/latest/sdk/expo/#expofetch-api"):new mt("Attempted to iterate over a response with no body");let r=new WB,n=new gg,a=$B(e.body);for await(let i of Fnt(a))for(let s of n.decode(i)){let o=r.decode(s);o&&(yield o)}for(let i of n.flush()){let s=r.decode(i);s&&(yield s)}}async function*Fnt(e){let t=new Uint8Array;for await(let r of e){if(r==null)continue;let n=r instanceof ArrayBuffer?new Uint8Array(r):typeof r=="string"?Fb(r):r,a=new Uint8Array(t.length+n.length);a.set(t),a.set(n,t.length),t=a;let i;for(;(i=mue(t))!==-1;)yield t.slice(0,i),t=t.slice(i)}t.length>0&&(yield t)}var WB=class{constructor(){this.event=null,this.data=[],this.chunks=[]}decode(t){if(t.endsWith("\r")&&(t=t.substring(0,t.length-1)),!t){if(!this.event&&!this.data.length)return null;let i={event:this.event,data:this.data.join(`
`),raw:this.chunks};return this.event=null,this.data=[],this.chunks=[],i}if(this.chunks.push(t),t.startsWith(":"))return null;let[r,n,a]=Bnt(t,":");return a.startsWith(" ")&&(a=a.substring(1)),r==="event"?this.event=a:r==="data"&&this.data.push(a),null}};function Bnt(e,t){let r=e.indexOf(t);return r!==-1?[e.substring(0,r),t,e.substring(r+t.length)]:[e,"",""]}async function dN(e,t){let{response:r,requestLogID:n,retryOfRequestLogID:a,startTime:i}=t,s=await(async()=>{if(t.options.stream)return $a(e).debug("response",r.status,r.url,r.headers,r.body),t.options.__streamClass?t.options.__streamClass.fromSSEResponse(r,t.controller,e):Ws.fromSSEResponse(r,t.controller,e);if(r.status===204)return null;if(t.options.__binaryResponse)return r;let l=r.headers.get("content-type")?.split(";")[0]?.trim();if(l?.includes("application/json")||l?.endsWith("+json")){let d=await r.json();return XB(d,r)}return await r.text()})();return $a(e).debug(`[${n}] response parsed`,tf({retryOfRequestLogID:a,url:r.url,status:r.status,body:s,durationMs:Date.now()-i})),s}function XB(e,t){return!e||typeof e!="object"||Array.isArray(e)?e:Object.defineProperty(e,"_request_id",{value:t.headers.get("x-request-id"),enumerable:!1})}var Sw,rf=class extends Promise{constructor(t,r,n=dN){super(a=>{a(null)}),this.responsePromise=r,this.parseResponse=n,Sw.set(this,void 0),Ft(this,Sw,t,"f")}_thenUnwrap(t){return new rf(ve(this,Sw,"f"),this.responsePromise,async(r,n)=>XB(t(await this.parseResponse(r,n),n),n.response))}asResponse(){return this.responsePromise.then(t=>t.response)}async withResponse(){let[t,r]=await Promise.all([this.parse(),this.asResponse()]);return{data:t,response:r,request_id:r.headers.get("x-request-id")}}parse(){return this.parsedPromise||(this.parsedPromise=this.responsePromise.then(t=>this.parseResponse(ve(this,Sw,"f"),t))),this.parsedPromise}then(t,r){return this.parse().then(t,r)}catch(t){return this.parse().catch(t)}finally(t){return this.parse().finally(t)}};Sw=new WeakMap;var fN,Tw=class{constructor(t,r,n,a){fN.set(this,void 0),Ft(this,fN,t,"f"),this.options=a,this.response=r,this.body=n}hasNextPage(){return this.getPaginatedItems().length?this.nextPageRequestOptions()!=null:!1}async getNextPage(){let t=this.nextPageRequestOptions();if(!t)throw new mt("No next page expected; please check `.hasNextPage()` before calling `.getNextPage()`.");return await ve(this,fN,"f").requestAPIList(this.constructor,t)}async*iterPages(){let t=this;for(yield t;t.hasNextPage();)t=await t.getNextPage(),yield t}async*[(fN=new WeakMap,Symbol.asyncIterator)](){for await(let t of this.iterPages())for(let r of t.getPaginatedItems())yield r}},ww=class extends rf{constructor(t,r,n){super(t,r,async(a,i)=>new n(a,i.response,await dN(a,i),i.options))}async*[Symbol.asyncIterator](){let t=await this;for await(let r of t)yield r}},Bu=class extends Tw{constructor(t,r,n,a){super(t,r,n,a),this.data=n.data||[],this.object=n.object}getPaginatedItems(){return this.data??[]}nextPageRequestOptions(){return null}},Tr=class extends Tw{constructor(t,r,n,a){super(t,r,n,a),this.data=n.data||[],this.has_more=n.has_more||!1}getPaginatedItems(){return this.data??[]}hasNextPage(){return this.has_more===!1?!1:super.hasNextPage()}nextPageRequestOptions(){let t=this.getPaginatedItems(),r=t[t.length-1]?.id;return r?{...this.options,query:{...FB(this.options.query),after:r}}:null}},nf=class extends Tw{constructor(t,r,n,a){super(t,r,n,a),this.data=n.data||[],this.has_more=n.has_more||!1,this.last_id=n.last_id||""}getPaginatedItems(){return this.data??[]}hasNextPage(){return this.has_more===!1?!1:super.hasNextPage()}nextPageRequestOptions(){let t=this.last_id;return t?{...this.options,query:{...FB(this.options.query),after:t}}:null}};var ZB=()=>{if(typeof File>"u"){let{process:e}=globalThis,t=typeof e?.versions?.node=="string"&&parseInt(e.versions.node.split("."))<20;throw new Error("`File` is not defined as a global, which is required for file uploads."+(t?" Update to Node 20 LTS or newer, or set `globalThis.File` to `import('node:buffer').File`.":""))}};function Bb(e,t,r){return ZB(),new File(e,t??"unknown_file",r)}function Cw(e){return(typeof e=="object"&&e!==null&&("name"in e&&e.name&&String(e.name)||"url"in e&&e.url&&String(e.url)||"filename"in e&&e.filename&&String(e.filename)||"path"in e&&e.path&&String(e.path))||"").split(/[\\/]/).pop()||void 0}var pN=e=>e!=null&&typeof e=="object"&&typeof e[Symbol.asyncIterator]=="function",QB=async(e,t)=>YB(e.body)?{...e,body:await yue(e.body,t)}:e,ll=async(e,t)=>({...e,body:await yue(e.body,t)}),gue=new WeakMap;function jnt(e){let t=typeof e=="function"?e:e.fetch,r=gue.get(t);if(r)return r;let n=(async()=>{try{let a="Response"in t?t.Response:(await t("data:,")).constructor,i=new FormData;return i.toString()!==await new a(i).text()}catch{return!0}})();return gue.set(t,n),n}var yue=async(e,t)=>{if(!await jnt(t))throw new TypeError("The provided fetch function does not support file uploads with the current global FormData class.");let r=new FormData;return await Promise.all(Object.entries(e||{}).map(([n,a])=>JB(r,n,a))),r},xue=e=>e instanceof Blob&&"name"in e,znt=e=>typeof e=="object"&&e!==null&&(e instanceof Response||pN(e)||xue(e)),YB=e=>{if(znt(e))return!0;if(Array.isArray(e))return e.some(YB);if(e&&typeof e=="object"){for(let t in e)if(YB(e[t]))return!0}return!1},JB=async(e,t,r)=>{if(r!==void 0){if(r==null)throw new TypeError(`Received null for "${t}"; to pass null in FormData, you must use the string 'null'`);if(typeof r=="string"||typeof r=="number"||typeof r=="boolean")e.append(t,String(r));else if(r instanceof Response)e.append(t,Bb([await r.blob()],Cw(r)));else if(pN(r))e.append(t,Bb([await new Response(iN(r)).blob()],Cw(r)));else if(xue(r))e.append(t,r,Cw(r));else if(Array.isArray(r))await Promise.all(r.map(n=>JB(e,t+"[]",n)));else if(typeof r=="object")await Promise.all(Object.entries(r).map(([n,a])=>JB(e,`${t}[${n}]`,a)));else throw new TypeError(`Invalid value given to form, expected a string, number, boolean, object, Array, File or Blob but got ${r} instead`)}};var bue=e=>e!=null&&typeof e=="object"&&typeof e.size=="number"&&typeof e.type=="string"&&typeof e.text=="function"&&typeof e.slice=="function"&&typeof e.arrayBuffer=="function",Unt=e=>e!=null&&typeof e=="object"&&typeof e.name=="string"&&typeof e.lastModified=="number"&&bue(e),Vnt=e=>e!=null&&typeof e=="object"&&typeof e.url=="string"&&typeof e.blob=="function";async function mN(e,t,r){if(ZB(),e=await e,Unt(e))return e instanceof File?e:Bb([await e.arrayBuffer()],e.name);if(Vnt(e)){let a=await e.blob();return t||(t=new URL(e.url).pathname.split(/[\\/]/).pop()),Bb(await e4(a),t,r)}let n=await e4(e);if(t||(t=Cw(e)),!r?.type){let a=n.find(i=>typeof i=="object"&&"type"in i&&i.type);typeof a=="string"&&(r={...r,type:a})}return Bb(n,t,r)}async function e4(e){let t=[];if(typeof e=="string"||ArrayBuffer.isView(e)||e instanceof ArrayBuffer)t.push(e);else if(bue(e))t.push(e instanceof Blob?e:await e.arrayBuffer());else if(pN(e))for await(let r of e)t.push(...await e4(r));else{let r=e?.constructor?.name;throw new Error(`Unexpected data type: ${typeof e}${r?`; constructor: ${r}`:""}${qnt(e)}`)}return t}function qnt(e){return typeof e!="object"||e===null?"":`; props: [${Object.getOwnPropertyNames(e).map(r=>`"${r}"`).join(", ")}]`}var Fe=class{constructor(t){this._client=t}};function Sue(e){return e.replace(/[^A-Za-z0-9\-._~!$&'()*+,;=:@]+/g,encodeURIComponent)}var vue=Object.freeze(Object.create(null)),Gnt=(e=Sue)=>function(r,...n){if(r.length===1)return r[0];let a=!1,i=[],s=r.reduce((u,d,f)=>{/[?#]/.test(d)&&(a=!0);let p=n[f],m=(a?encodeURIComponent:e)(""+p);return f!==n.length&&(p==null||typeof p=="object"&&p.toString===Object.getPrototypeOf(Object.getPrototypeOf(p.hasOwnProperty??vue)??vue)?.toString)&&(m=p+"",i.push({start:u.length+d.length,length:m.length,error:`Value of type ${Object.prototype.toString.call(p).slice(8,-1)} is not a valid path parameter`})),u+d+(f===n.length?"":m)},""),o=s.split(/[?#]/,1)[0],l=/(?<=^|\/)(?:\.|%2e){1,2}(?=\/|$)/gi,c;for(;(c=l.exec(o))!==null;)i.push({start:c.index,length:c[0].length,error:`Value "${c[0]}" can't be safely passed as a path parameter`});if(i.sort((u,d)=>u.start-d.start),i.length>0){let u=0,d=i.reduce((f,p)=>{let m=" ".repeat(p.start-u),h="^".repeat(p.length);return u=p.start+p.length,f+m+h},"");throw new mt(`Path parameters result in path with invalid segments:
${i.map(f=>f.error).join(`
`)}
${s}
${d}`)}return s},Re=Gnt(Sue);var yg=class extends Fe{list(t,r={},n){return this._client.getAPIList(Re`/chat/completions/${t}/messages`,Tr,{query:r,...n})}};function Pw(e){return e!==void 0&&"function"in e&&e.function!==void 0}function Ew(e){return e?.$brand==="auto-parseable-response-format"}function xg(e){return e?.$brand==="auto-parseable-tool"}function Tue(e,t){return!t||!t4(t)?{...e,choices:e.choices.map(r=>(Cue(r.message.tool_calls),{...r,message:{...r.message,parsed:null,...r.message.tool_calls?{tool_calls:r.message.tool_calls}:void 0}}))}:Iw(e,t)}function Iw(e,t){let r=e.choices.map(n=>{if(n.finish_reason==="length")throw new Mb;if(n.finish_reason==="content_filter")throw new Ob;return Cue(n.message.tool_calls),{...n,message:{...n.message,...n.message.tool_calls?{tool_calls:n.message.tool_calls?.map(a=>Ynt(t,a))??void 0}:void 0,parsed:n.message.content&&!n.message.refusal?Xnt(t,n.message.content):null}}});return{...e,choices:r}}function Xnt(e,t){return e.response_format?.type!=="json_schema"?null:e.response_format?.type==="json_schema"?"$parseRaw"in e.response_format?e.response_format.$parseRaw(t):JSON.parse(t):null}function Ynt(e,t){let r=e.tools?.find(n=>Pw(n)&&n.function?.name===t.function.name);return{...t,function:{...t.function,parsed_arguments:xg(r)?r.$parseRaw(t.function.arguments):r?.function.strict?JSON.parse(t.function.arguments):null}}}function wue(e,t){if(!e||!("tools"in e)||!e.tools)return!1;let r=e.tools?.find(n=>Pw(n)&&n.function?.name===t.function.name);return Pw(r)&&(xg(r)||r?.function.strict||!1)}function t4(e){return Ew(e.response_format)?!0:e.tools?.some(t=>xg(t)||t.type==="function"&&t.function.strict===!0)??!1}function Cue(e){for(let t of e||[])if(t.type!=="function")throw new mt(`Currently only \`function\` tool calls are supported; Received \`${t.type}\``)}function Pue(e){for(let t of e??[]){if(t.type!=="function")throw new mt(`Currently only \`function\` tool types support auto-parsing; Received \`${t.type}\``);if(t.function.strict!==!0)throw new mt(`The \`${t.function.name}\` tool is not marked with \`strict: true\`. Only strict function tools can be auto-parsed`)}}var $b=e=>e?.role==="assistant",r4=e=>e?.role==="tool";var n4,hN,gN,Aw,Nw,yN,kw,af,_w,xN,bN,jb,Eue,tm=class{constructor(){n4.add(this),this.controller=new AbortController,hN.set(this,void 0),gN.set(this,()=>{}),Aw.set(this,()=>{}),Nw.set(this,void 0),yN.set(this,()=>{}),kw.set(this,()=>{}),af.set(this,{}),_w.set(this,!1),xN.set(this,!1),bN.set(this,!1),jb.set(this,!1),Ft(this,hN,new Promise((t,r)=>{Ft(this,gN,t,"f"),Ft(this,Aw,r,"f")}),"f"),Ft(this,Nw,new Promise((t,r)=>{Ft(this,yN,t,"f"),Ft(this,kw,r,"f")}),"f"),ve(this,hN,"f").catch(()=>{}),ve(this,Nw,"f").catch(()=>{})}_run(t){setTimeout(()=>{t().then(()=>{this._emitFinal(),this._emit("end")},ve(this,n4,"m",Eue).bind(this))},0)}_connected(){this.ended||(ve(this,gN,"f").call(this),this._emit("connect"))}get ended(){return ve(this,_w,"f")}get errored(){return ve(this,xN,"f")}get aborted(){return ve(this,bN,"f")}abort(){this.controller.abort()}on(t,r){return(ve(this,af,"f")[t]||(ve(this,af,"f")[t]=[])).push({listener:r}),this}off(t,r){let n=ve(this,af,"f")[t];if(!n)return this;let a=n.findIndex(i=>i.listener===r);return a>=0&&n.splice(a,1),this}once(t,r){return(ve(this,af,"f")[t]||(ve(this,af,"f")[t]=[])).push({listener:r,once:!0}),this}emitted(t){return new Promise((r,n)=>{Ft(this,jb,!0,"f"),t!=="error"&&this.once("error",n),this.once(t,r)})}async done(){Ft(this,jb,!0,"f"),await ve(this,Nw,"f")}_emit(t,...r){if(ve(this,_w,"f"))return;t==="end"&&(Ft(this,_w,!0,"f"),ve(this,yN,"f").call(this));let n=ve(this,af,"f")[t];if(n&&(ve(this,af,"f")[t]=n.filter(a=>!a.once),n.forEach(({listener:a})=>a(...r))),t==="abort"){let a=r[0];!ve(this,jb,"f")&&!n?.length&&Promise.reject(a),ve(this,Aw,"f").call(this,a),ve(this,kw,"f").call(this,a),this._emit("end");return}if(t==="error"){let a=r[0];!ve(this,jb,"f")&&!n?.length&&Promise.reject(a),ve(this,Aw,"f").call(this,a),ve(this,kw,"f").call(this,a),this._emit("end")}}_emitFinal(){}};hN=new WeakMap,gN=new WeakMap,Aw=new WeakMap,Nw=new WeakMap,yN=new WeakMap,kw=new WeakMap,af=new WeakMap,_w=new WeakMap,xN=new WeakMap,bN=new WeakMap,jb=new WeakMap,n4=new WeakSet,Eue=function(t){if(Ft(this,xN,!0,"f"),t instanceof Error&&t.name==="AbortError"&&(t=new oi),t instanceof oi)return Ft(this,bN,!0,"f"),this._emit("abort",t);if(t instanceof mt)return this._emit("error",t);if(t instanceof Error){let r=new mt(t.message);return r.cause=t,this._emit("error",r)}return this._emit("error",new mt(String(t)))};function Iue(e){return typeof e.parse=="function"}var Xs,a4,vN,i4,s4,o4,Aue,Nue,Jnt=10,zb=class extends tm{constructor(){super(...arguments),Xs.add(this),this._chatCompletions=[],this.messages=[]}_addChatCompletion(t){this._chatCompletions.push(t),this._emit("chatCompletion",t);let r=t.choices[0]?.message;return r&&this._addMessage(r),t}_addMessage(t,r=!0){if("content"in t||(t.content=null),this.messages.push(t),r){if(this._emit("message",t),r4(t)&&t.content)this._emit("functionToolCallResult",t.content);else if($b(t)&&t.tool_calls)for(let n of t.tool_calls)n.type==="function"&&this._emit("functionToolCall",n.function)}}async finalChatCompletion(){await this.done();let t=this._chatCompletions[this._chatCompletions.length-1];if(!t)throw new mt("stream ended without producing a ChatCompletion");return t}async finalContent(){return await this.done(),ve(this,Xs,"m",a4).call(this)}async finalMessage(){return await this.done(),ve(this,Xs,"m",vN).call(this)}async finalFunctionToolCall(){return await this.done(),ve(this,Xs,"m",i4).call(this)}async finalFunctionToolCallResult(){return await this.done(),ve(this,Xs,"m",s4).call(this)}async totalUsage(){return await this.done(),ve(this,Xs,"m",o4).call(this)}allChatCompletions(){return[...this._chatCompletions]}_emitFinal(){let t=this._chatCompletions[this._chatCompletions.length-1];t&&this._emit("finalChatCompletion",t);let r=ve(this,Xs,"m",vN).call(this);r&&this._emit("finalMessage",r);let n=ve(this,Xs,"m",a4).call(this);n&&this._emit("finalContent",n);let a=ve(this,Xs,"m",i4).call(this);a&&this._emit("finalFunctionToolCall",a);let i=ve(this,Xs,"m",s4).call(this);i!=null&&this._emit("finalFunctionToolCallResult",i),this._chatCompletions.some(s=>s.usage)&&this._emit("totalUsage",ve(this,Xs,"m",o4).call(this))}async _createChatCompletion(t,r,n){let a=n?.signal;a&&(a.aborted&&this.controller.abort(),a.addEventListener("abort",()=>this.controller.abort())),ve(this,Xs,"m",Aue).call(this,r);let i=await t.chat.completions.create({...r,stream:!1},{...n,signal:this.controller.signal});return this._connected(),this._addChatCompletion(Iw(i,r))}async _runChatCompletion(t,r,n){for(let a of r.messages)this._addMessage(a,!1);return await this._createChatCompletion(t,r,n)}async _runTools(t,r,n){let a="tool",{tool_choice:i="auto",stream:s,...o}=r,l=typeof i!="string"&&i.type==="function"&&i?.function?.name,{maxChatCompletions:c=Jnt}=n||{},u=r.tools.map(p=>{if(xg(p)){if(!p.$callback)throw new mt("Tool given to `.runTools()` that does not have an associated function");return{type:"function",function:{function:p.$callback,name:p.function.name,description:p.function.description||"",parameters:p.function.parameters,parse:p.$parseRaw,strict:!0}}}return p}),d={};for(let p of u)p.type==="function"&&(d[p.function.name||p.function.function.name]=p.function);let f="tools"in r?u.map(p=>p.type==="function"?{type:"function",function:{name:p.function.name||p.function.function.name,parameters:p.function.parameters,description:p.function.description,strict:p.function.strict}}:p):void 0;for(let p of r.messages)this._addMessage(p,!1);for(let p=0;p<c;++p){let h=(await this._createChatCompletion(t,{...o,tool_choice:i,tools:f,messages:[...this.messages]},n)).choices[0]?.message;if(!h)throw new mt("missing message in ChatCompletion response");if(!h.tool_calls?.length)return;for(let x of h.tool_calls){if(x.type!=="function")continue;let g=x.id,{name:y,arguments:b}=x.function,S=d[y];if(S){if(l&&l!==y){let N=`Invalid tool_call: ${JSON.stringify(y)}. ${JSON.stringify(l)} requested. Please try again`;this._addMessage({role:a,tool_call_id:g,content:N});continue}}else{let N=`Invalid tool_call: ${JSON.stringify(y)}. Available options are: ${Object.keys(d).map(_=>JSON.stringify(_)).join(", ")}. Please try again`;this._addMessage({role:a,tool_call_id:g,content:N});continue}let w;try{w=Iue(S)?await S.parse(b):b}catch(N){let _=N instanceof Error?N.message:String(N);this._addMessage({role:a,tool_call_id:g,content:_});continue}let E=await S.function(w,this),C=ve(this,Xs,"m",Nue).call(this,E);if(this._addMessage({role:a,tool_call_id:g,content:C}),l)return}}}};Xs=new WeakSet,a4=function(){return ve(this,Xs,"m",vN).call(this).content??null},vN=function(){let t=this.messages.length;for(;t-- >0;){let r=this.messages[t];if($b(r))return{...r,content:r.content??null,refusal:r.refusal??null}}throw new mt("stream ended without producing a ChatCompletionMessage with role=assistant")},i4=function(){for(let t=this.messages.length-1;t>=0;t--){let r=this.messages[t];if($b(r)&&r?.tool_calls?.length)return r.tool_calls.filter(n=>n.type==="function").at(-1)?.function}},s4=function(){for(let t=this.messages.length-1;t>=0;t--){let r=this.messages[t];if(r4(r)&&r.content!=null&&typeof r.content=="string"&&this.messages.some(n=>n.role==="assistant"&&n.tool_calls?.some(a=>a.type==="function"&&a.id===r.tool_call_id)))return r.content}},o4=function(){let t={completion_tokens:0,prompt_tokens:0,total_tokens:0};for(let{usage:r}of this._chatCompletions)r&&(t.completion_tokens+=r.completion_tokens,t.prompt_tokens+=r.prompt_tokens,t.total_tokens+=r.total_tokens);return t},Aue=function(t){if(t.n!=null&&t.n>1)throw new mt("ChatCompletion convenience helpers only support n=1 at this time. To use n>1, please use chat.completions.create() directly.")},Nue=function(t){return typeof t=="string"?t:t===void 0?"undefined":JSON.stringify(t)};var bg=class extends zb{static runTools(t,r,n){let a=new bg,i={...n,headers:{...n?.headers,"X-Stainless-Helper-Method":"runTools"}};return a._run(()=>a._runTools(t,r,i)),a}_addMessage(t,r=!0){super._addMessage(t,r),$b(t)&&t.content&&this._emit("content",t.content)}};var Ui={STR:1,NUM:2,ARR:4,OBJ:8,NULL:16,BOOL:32,NAN:64,INFINITY:128,MINUS_INFINITY:256,INF:384,SPECIAL:496,ATOM:499,COLLECTION:12,ALL:511},l4=class extends Error{},c4=class extends Error{};function Znt(e,t=Ui.ALL){if(typeof e!="string")throw new TypeError(`expecting str, got ${typeof e}`);if(!e.trim())throw new Error(`${e} is empty`);return Qnt(e.trim(),t)}var Qnt=(e,t)=>{let r=e.length,n=0,a=f=>{throw new l4(`${f} at position ${n}`)},i=f=>{throw new c4(`${f} at position ${n}`)},s=()=>(d(),n>=r&&a("Unexpected end of input"),e[n]==='"'?o():e[n]==="{"?l():e[n]==="["?c():e.substring(n,n+4)==="null"||Ui.NULL&t&&r-n<4&&"null".startsWith(e.substring(n))?(n+=4,null):e.substring(n,n+4)==="true"||Ui.BOOL&t&&r-n<4&&"true".startsWith(e.substring(n))?(n+=4,!0):e.substring(n,n+5)==="false"||Ui.BOOL&t&&r-n<5&&"false".startsWith(e.substring(n))?(n+=5,!1):e.substring(n,n+8)==="Infinity"||Ui.INFINITY&t&&r-n<8&&"Infinity".startsWith(e.substring(n))?(n+=8,1/0):e.substring(n,n+9)==="-Infinity"||Ui.MINUS_INFINITY&t&&1<r-n&&r-n<9&&"-Infinity".startsWith(e.substring(n))?(n+=9,-1/0):e.substring(n,n+3)==="NaN"||Ui.NAN&t&&r-n<3&&"NaN".startsWith(e.substring(n))?(n+=3,NaN):u()),o=()=>{let f=n,p=!1;for(n++;n<r&&(e[n]!=='"'||p&&e[n-1]==="\\");)p=e[n]==="\\"?!p:!1,n++;if(e.charAt(n)=='"')try{return JSON.parse(e.substring(f,++n-Number(p)))}catch(m){i(String(m))}else if(Ui.STR&t)try{return JSON.parse(e.substring(f,n-Number(p))+'"')}catch{return JSON.parse(e.substring(f,e.lastIndexOf("\\"))+'"')}a("Unterminated string literal")},l=()=>{n++,d();let f={};try{for(;e[n]!=="}";){if(d(),n>=r&&Ui.OBJ&t)return f;let p=o();d(),n++;try{let m=s();Object.defineProperty(f,p,{value:m,writable:!0,enumerable:!0,configurable:!0})}catch(m){if(Ui.OBJ&t)return f;throw m}d(),e[n]===","&&n++}}catch{if(Ui.OBJ&t)return f;a("Expected '}' at end of object")}return n++,f},c=()=>{n++;let f=[];try{for(;e[n]!=="]";)f.push(s()),d(),e[n]===","&&n++}catch{if(Ui.ARR&t)return f;a("Expected ']' at end of array")}return n++,f},u=()=>{if(n===0){e==="-"&&Ui.NUM&t&&a("Not sure what '-' is");try{return JSON.parse(e)}catch(p){if(Ui.NUM&t)try{return e[e.length-1]==="."?JSON.parse(e.substring(0,e.lastIndexOf("."))):JSON.parse(e.substring(0,e.lastIndexOf("e")))}catch{}i(String(p))}}let f=n;for(e[n]==="-"&&n++;e[n]&&!",]}".includes(e[n]);)n++;n==r&&!(Ui.NUM&t)&&a("Unterminated number literal");try{return JSON.parse(e.substring(f,n))}catch{e.substring(f,n)==="-"&&Ui.NUM&t&&a("Not sure what '-' is");try{return JSON.parse(e.substring(f,e.lastIndexOf("e")))}catch(m){i(String(m))}}},d=()=>{for(;n<r&&`
\r `.includes(e[n]);)n++};return s()},u4=e=>Znt(e,Ui.ALL^Ui.NUM);var Ai,sf,Ub,rm,d4,SN,f4,p4,m4,TN,h4,kue,$u=class extends zb{constructor(t){super(),Ai.add(this),sf.set(this,void 0),Ub.set(this,void 0),rm.set(this,void 0),Ft(this,sf,t,"f"),Ft(this,Ub,[],"f")}get currentChatCompletionSnapshot(){return ve(this,rm,"f")}static fromReadableStream(t){let r=new $u(null);return r._run(()=>r._fromReadableStream(t)),r}static createChatCompletion(t,r,n){let a=new $u(r);return a._run(()=>a._runChatCompletion(t,{...r,stream:!0},{...n,headers:{...n?.headers,"X-Stainless-Helper-Method":"stream"}})),a}async _createChatCompletion(t,r,n){super._createChatCompletion;let a=n?.signal;a&&(a.aborted&&this.controller.abort(),a.addEventListener("abort",()=>this.controller.abort())),ve(this,Ai,"m",d4).call(this);let i=await t.chat.completions.create({...r,stream:!0},{...n,signal:this.controller.signal});this._connected();for await(let s of i)ve(this,Ai,"m",f4).call(this,s);if(i.controller.signal?.aborted)throw new oi;return this._addChatCompletion(ve(this,Ai,"m",TN).call(this))}async _fromReadableStream(t,r){let n=r?.signal;n&&(n.aborted&&this.controller.abort(),n.addEventListener("abort",()=>this.controller.abort())),ve(this,Ai,"m",d4).call(this),this._connected();let a=Ws.fromReadableStream(t,this.controller),i;for await(let s of a)i&&i!==s.id&&this._addChatCompletion(ve(this,Ai,"m",TN).call(this)),ve(this,Ai,"m",f4).call(this,s),i=s.id;if(a.controller.signal?.aborted)throw new oi;return this._addChatCompletion(ve(this,Ai,"m",TN).call(this))}[(sf=new WeakMap,Ub=new WeakMap,rm=new WeakMap,Ai=new WeakSet,d4=function(){this.ended||Ft(this,rm,void 0,"f")},SN=function(r){let n=ve(this,Ub,"f")[r.index];return n||(n={content_done:!1,refusal_done:!1,logprobs_content_done:!1,logprobs_refusal_done:!1,done_tool_calls:new Set,current_tool_call_index:null},ve(this,Ub,"f")[r.index]=n,n)},f4=function(r){if(this.ended)return;let n=ve(this,Ai,"m",kue).call(this,r);this._emit("chunk",r,n);for(let a of r.choices){let i=n.choices[a.index];a.delta.content!=null&&i.message?.role==="assistant"&&i.message?.content&&(this._emit("content",a.delta.content,i.message.content),this._emit("content.delta",{delta:a.delta.content,snapshot:i.message.content,parsed:i.message.parsed})),a.delta.refusal!=null&&i.message?.role==="assistant"&&i.message?.refusal&&this._emit("refusal.delta",{delta:a.delta.refusal,snapshot:i.message.refusal}),a.logprobs?.content!=null&&i.message?.role==="assistant"&&this._emit("logprobs.content.delta",{content:a.logprobs?.content,snapshot:i.logprobs?.content??[]}),a.logprobs?.refusal!=null&&i.message?.role==="assistant"&&this._emit("logprobs.refusal.delta",{refusal:a.logprobs?.refusal,snapshot:i.logprobs?.refusal??[]});let s=ve(this,Ai,"m",SN).call(this,i);i.finish_reason&&(ve(this,Ai,"m",m4).call(this,i),s.current_tool_call_index!=null&&ve(this,Ai,"m",p4).call(this,i,s.current_tool_call_index));for(let o of a.delta.tool_calls??[])s.current_tool_call_index!==o.index&&(ve(this,Ai,"m",m4).call(this,i),s.current_tool_call_index!=null&&ve(this,Ai,"m",p4).call(this,i,s.current_tool_call_index)),s.current_tool_call_index=o.index;for(let o of a.delta.tool_calls??[]){let l=i.message.tool_calls?.[o.index];l?.type&&(l?.type==="function"?this._emit("tool_calls.function.arguments.delta",{name:l.function?.name,index:o.index,arguments:l.function.arguments,parsed_arguments:l.function.parsed_arguments,arguments_delta:o.function?.arguments??""}):(l?.type,void 0))}}},p4=function(r,n){if(ve(this,Ai,"m",SN).call(this,r).done_tool_calls.has(n))return;let i=r.message.tool_calls?.[n];if(!i)throw new Error("no tool call snapshot");if(!i.type)throw new Error("tool call snapshot missing `type`");if(i.type==="function"){let s=ve(this,sf,"f")?.tools?.find(o=>Pw(o)&&o.function.name===i.function.name);this._emit("tool_calls.function.arguments.done",{name:i.function.name,index:n,arguments:i.function.arguments,parsed_arguments:xg(s)?s.$parseRaw(i.function.arguments):s?.function.strict?JSON.parse(i.function.arguments):null})}else i.type},m4=function(r){let n=ve(this,Ai,"m",SN).call(this,r);if(r.message.content&&!n.content_done){n.content_done=!0;let a=ve(this,Ai,"m",h4).call(this);this._emit("content.done",{content:r.message.content,parsed:a?a.$parseRaw(r.message.content):null})}r.message.refusal&&!n.refusal_done&&(n.refusal_done=!0,this._emit("refusal.done",{refusal:r.message.refusal})),r.logprobs?.content&&!n.logprobs_content_done&&(n.logprobs_content_done=!0,this._emit("logprobs.content.done",{content:r.logprobs.content})),r.logprobs?.refusal&&!n.logprobs_refusal_done&&(n.logprobs_refusal_done=!0,this._emit("logprobs.refusal.done",{refusal:r.logprobs.refusal}))},TN=function(){if(this.ended)throw new mt("stream has ended, this shouldn't happen");let r=ve(this,rm,"f");if(!r)throw new mt("request ended without sending any chunks");return Ft(this,rm,void 0,"f"),Ft(this,Ub,[],"f"),eat(r,ve(this,sf,"f"))},h4=function(){let r=ve(this,sf,"f")?.response_format;return Ew(r)?r:null},kue=function(r){var n,a,i,s;let o=ve(this,rm,"f"),{choices:l,...c}=r;o?Object.assign(o,c):o=Ft(this,rm,{...c,choices:[]},"f");for(let{delta:u,finish_reason:d,index:f,logprobs:p=null,...m}of r.choices){let h=o.choices[f];if(h||(h=o.choices[f]={finish_reason:d,index:f,message:{},logprobs:p,...m}),p)if(!h.logprobs)h.logprobs=Object.assign({},p);else{let{content:E,refusal:C,...N}=p;Object.assign(h.logprobs,N),E&&((n=h.logprobs).content??(n.content=[]),h.logprobs.content.push(...E)),C&&((a=h.logprobs).refusal??(a.refusal=[]),h.logprobs.refusal.push(...C))}if(d&&(h.finish_reason=d,ve(this,sf,"f")&&t4(ve(this,sf,"f")))){if(d==="length")throw new Mb;if(d==="content_filter")throw new Ob}if(Object.assign(h,m),!u)continue;let{content:x,refusal:g,function_call:y,role:b,tool_calls:S,...w}=u;if(Object.assign(h.message,w),g&&(h.message.refusal=(h.message.refusal||"")+g),b&&(h.message.role=b),y&&(h.message.function_call?(y.name&&(h.message.function_call.name=y.name),y.arguments&&((i=h.message.function_call).arguments??(i.arguments=""),h.message.function_call.arguments+=y.arguments)):h.message.function_call=y),x&&(h.message.content=(h.message.content||"")+x,!h.message.refusal&&ve(this,Ai,"m",h4).call(this)&&(h.message.parsed=u4(h.message.content))),S){h.message.tool_calls||(h.message.tool_calls=[]);for(let{index:E,id:C,type:N,function:_,...O}of S){let D=(s=h.message.tool_calls)[E]??(s[E]={});Object.assign(D,O),C&&(D.id=C),N&&(D.type=N),_&&(D.function??(D.function={name:_.name??"",arguments:""})),_?.name&&(D.function.name=_.name),_?.arguments&&(D.function.arguments+=_.arguments,wue(ve(this,sf,"f"),D)&&(D.function.parsed_arguments=u4(D.function.arguments)))}}}return o},Symbol.asyncIterator)](){let t=[],r=[],n=!1;return this.on("chunk",a=>{let i=r.shift();i?i.resolve(a):t.push(a)}),this.on("end",()=>{n=!0;for(let a of r)a.resolve(void 0);r.length=0}),this.on("abort",a=>{n=!0;for(let i of r)i.reject(a);r.length=0}),this.on("error",a=>{n=!0;for(let i of r)i.reject(a);r.length=0}),{next:async()=>t.length?{value:t.shift(),done:!1}:n?{value:void 0,done:!0}:new Promise((i,s)=>r.push({resolve:i,reject:s})).then(i=>i?{value:i,done:!1}:{value:void 0,done:!0}),return:async()=>(this.abort(),{value:void 0,done:!0})}}toReadableStream(){return new Ws(this[Symbol.asyncIterator].bind(this),this.controller).toReadableStream()}};function eat(e,t){let{id:r,choices:n,created:a,model:i,system_fingerprint:s,...o}=e,l={...o,id:r,choices:n.map(({message:c,finish_reason:u,index:d,logprobs:f,...p})=>{if(!u)throw new mt(`missing finish_reason for choice ${d}`);let{content:m=null,function_call:h,tool_calls:x,...g}=c,y=c.role;if(!y)throw new mt(`missing role for choice ${d}`);if(h){let{arguments:b,name:S}=h;if(b==null)throw new mt(`missing function_call.arguments for choice ${d}`);if(!S)throw new mt(`missing function_call.name for choice ${d}`);return{...p,message:{content:m,function_call:{arguments:b,name:S},role:y,refusal:c.refusal??null},finish_reason:u,index:d,logprobs:f}}return x?{...p,index:d,finish_reason:u,logprobs:f,message:{...g,role:y,content:m,refusal:c.refusal??null,tool_calls:x.map((b,S)=>{let{function:w,type:E,id:C,...N}=b,{arguments:_,name:O,...D}=w||{};if(C==null)throw new mt(`missing choices[${d}].tool_calls[${S}].id
${wN(e)}`);if(E==null)throw new mt(`missing choices[${d}].tool_calls[${S}].type
${wN(e)}`);if(O==null)throw new mt(`missing choices[${d}].tool_calls[${S}].function.name
${wN(e)}`);if(_==null)throw new mt(`missing choices[${d}].tool_calls[${S}].function.arguments
${wN(e)}`);return{...N,id:C,type:E,function:{...D,name:O,arguments:_}}})}}:{...p,message:{...g,content:m,role:y,refusal:c.refusal??null},finish_reason:u,index:d,logprobs:f}}),created:a,model:i,object:"chat.completion",...s?{system_fingerprint:s}:{}};return Tue(l,t)}function wN(e){return JSON.stringify(e)}var nm=class extends $u{static fromReadableStream(t){let r=new nm(null);return r._run(()=>r._fromReadableStream(t)),r}static runTools(t,r,n){let a=new nm(r),i={...n,headers:{...n?.headers,"X-Stainless-Helper-Method":"runTools"}};return a._run(()=>a._runTools(t,r,i)),a}};var of=class extends Fe{constructor(){super(...arguments),this.messages=new yg(this._client)}create(t,r){return this._client.post("/chat/completions",{body:t,...r,stream:t.stream??!1})}retrieve(t,r){return this._client.get(Re`/chat/completions/${t}`,r)}update(t,r,n){return this._client.post(Re`/chat/completions/${t}`,{body:r,...n})}list(t={},r){return this._client.getAPIList("/chat/completions",Tr,{query:t,...r})}delete(t,r){return this._client.delete(Re`/chat/completions/${t}`,r)}parse(t,r){return Pue(t.tools),this._client.chat.completions.create(t,{...r,headers:{...r?.headers,"X-Stainless-Helper-Method":"chat.completions.parse"}})._thenUnwrap(n=>Iw(n,t))}runTools(t,r){return t.stream?nm.runTools(this._client,t,r):bg.runTools(this._client,t,r)}stream(t,r){return $u.createChatCompletion(this._client,t,r)}};of.Messages=yg;var am=class extends Fe{constructor(){super(...arguments),this.completions=new of(this._client)}};am.Completions=of;var _ue=Symbol("brand.privateNullableHeaders");function*rat(e){if(!e)return;if(_ue in e){let{values:n,nulls:a}=e;yield*n.entries();for(let i of a)yield[i,null];return}let t=!1,r;e instanceof Headers?r=e.entries():OB(e)?r=e:(t=!0,r=Object.entries(e??{}));for(let n of r){let a=n[0];if(typeof a!="string")throw new TypeError("expected header name to be a string");let i=OB(n[1])?n[1]:[n[1]],s=!1;for(let o of i)o!==void 0&&(t&&!s&&(s=!0,yield[a,null]),yield[a,o])}}var Ze=e=>{let t=new Headers,r=new Set;for(let n of e){let a=new Set;for(let[i,s]of rat(n)){let o=i.toLowerCase();a.has(o)||(t.delete(i),a.add(o)),s===null?(t.delete(i),r.add(o)):(t.append(i,s),r.delete(o))}}return{[_ue]:!0,values:t,nulls:r}};var Vb=class extends Fe{create(t,r){return this._client.post("/audio/speech",{body:t,...r,headers:Ze([{Accept:"application/octet-stream"},r?.headers]),__binaryResponse:!0})}};var qb=class extends Fe{create(t,r){return this._client.post("/audio/transcriptions",ll({body:t,...r,stream:t.stream??!1,__metadata:{model:t.model}},this._client))}};var Hb=class extends Fe{create(t,r){return this._client.post("/audio/translations",ll({body:t,...r,__metadata:{model:t.model}},this._client))}};var ju=class extends Fe{constructor(){super(...arguments),this.transcriptions=new qb(this._client),this.translations=new Hb(this._client),this.speech=new Vb(this._client)}};ju.Transcriptions=qb;ju.Translations=Hb;ju.Speech=Vb;var vg=class extends Fe{create(t,r){return this._client.post("/batches",{body:t,...r})}retrieve(t,r){return this._client.get(Re`/batches/${t}`,r)}list(t={},r){return this._client.getAPIList("/batches",Tr,{query:t,...r})}cancel(t,r){return this._client.post(Re`/batches/${t}/cancel`,r)}};var Gb=class extends Fe{create(t,r){return this._client.post("/assistants",{body:t,...r,headers:Ze([{"OpenAI-Beta":"assistants=v2"},r?.headers])})}retrieve(t,r){return this._client.get(Re`/assistants/${t}`,{...r,headers:Ze([{"OpenAI-Beta":"assistants=v2"},r?.headers])})}update(t,r,n){return this._client.post(Re`/assistants/${t}`,{body:r,...n,headers:Ze([{"OpenAI-Beta":"assistants=v2"},n?.headers])})}list(t={},r){return this._client.getAPIList("/assistants",Tr,{query:t,...r,headers:Ze([{"OpenAI-Beta":"assistants=v2"},r?.headers])})}delete(t,r){return this._client.delete(Re`/assistants/${t}`,{...r,headers:Ze([{"OpenAI-Beta":"assistants=v2"},r?.headers])})}};var Kb=class extends Fe{create(t,r){return this._client.post("/realtime/sessions",{body:t,...r,headers:Ze([{"OpenAI-Beta":"assistants=v2"},r?.headers])})}};var Wb=class extends Fe{create(t,r){return this._client.post("/realtime/transcription_sessions",{body:t,...r,headers:Ze([{"OpenAI-Beta":"assistants=v2"},r?.headers])})}};var im=class extends Fe{constructor(){super(...arguments),this.sessions=new Kb(this._client),this.transcriptionSessions=new Wb(this._client)}};im.Sessions=Kb;im.TranscriptionSessions=Wb;var Xb=class extends Fe{create(t,r){return this._client.post("/chatkit/sessions",{body:t,...r,headers:Ze([{"OpenAI-Beta":"chatkit_beta=v1"},r?.headers])})}cancel(t,r){return this._client.post(Re`/chatkit/sessions/${t}/cancel`,{...r,headers:Ze([{"OpenAI-Beta":"chatkit_beta=v1"},r?.headers])})}};var Yb=class extends Fe{retrieve(t,r){return this._client.get(Re`/chatkit/threads/${t}`,{...r,headers:Ze([{"OpenAI-Beta":"chatkit_beta=v1"},r?.headers])})}list(t={},r){return this._client.getAPIList("/chatkit/threads",nf,{query:t,...r,headers:Ze([{"OpenAI-Beta":"chatkit_beta=v1"},r?.headers])})}delete(t,r){return this._client.delete(Re`/chatkit/threads/${t}`,{...r,headers:Ze([{"OpenAI-Beta":"chatkit_beta=v1"},r?.headers])})}listItems(t,r={},n){return this._client.getAPIList(Re`/chatkit/threads/${t}/items`,nf,{query:r,...n,headers:Ze([{"OpenAI-Beta":"chatkit_beta=v1"},n?.headers])})}};var sm=class extends Fe{constructor(){super(...arguments),this.sessions=new Xb(this._client),this.threads=new Yb(this._client)}};sm.Sessions=Xb;sm.Threads=Yb;var Jb=class extends Fe{create(t,r,n){return this._client.post(Re`/threads/${t}/messages`,{body:r,...n,headers:Ze([{"OpenAI-Beta":"assistants=v2"},n?.headers])})}retrieve(t,r,n){let{thread_id:a}=r;return this._client.get(Re`/threads/${a}/messages/${t}`,{...n,headers:Ze([{"OpenAI-Beta":"assistants=v2"},n?.headers])})}update(t,r,n){let{thread_id:a,...i}=r;return this._client.post(Re`/threads/${a}/messages/${t}`,{body:i,...n,headers:Ze([{"OpenAI-Beta":"assistants=v2"},n?.headers])})}list(t,r={},n){return this._client.getAPIList(Re`/threads/${t}/messages`,Tr,{query:r,...n,headers:Ze([{"OpenAI-Beta":"assistants=v2"},n?.headers])})}delete(t,r,n){let{thread_id:a}=r;return this._client.delete(Re`/threads/${a}/messages/${t}`,{...n,headers:Ze([{"OpenAI-Beta":"assistants=v2"},n?.headers])})}};var Zb=class extends Fe{retrieve(t,r,n){let{thread_id:a,run_id:i,...s}=r;return this._client.get(Re`/threads/${a}/runs/${i}/steps/${t}`,{query:s,...n,headers:Ze([{"OpenAI-Beta":"assistants=v2"},n?.headers])})}list(t,r,n){let{thread_id:a,...i}=r;return this._client.getAPIList(Re`/threads/${a}/runs/${t}/steps`,Tr,{query:i,...n,headers:Ze([{"OpenAI-Beta":"assistants=v2"},n?.headers])})}};var Lue=e=>{if(typeof Buffer<"u"){let t=Buffer.from(e,"base64");return Array.from(new Float32Array(t.buffer,t.byteOffset,t.length/Float32Array.BYTES_PER_ELEMENT))}else{let t=atob(e),r=t.length,n=new Uint8Array(r);for(let a=0;a<r;a++)n[a]=t.charCodeAt(a);return Array.from(new Float32Array(n.buffer))}};var om=e=>{if(typeof globalThis.process<"u")return globalThis.process.env?.[e]?.trim()??void 0;if(typeof globalThis.Deno<"u")return globalThis.Deno.env?.get?.(e)?.trim()};var ss,Tg,g4,zu,CN,Oc,wg,Qb,Sg,IN,cl,PN,EN,Dw,Lw,Rw,Rue,Due,Mue,Oue,Fue,Bue,$ue,lf=class extends tm{constructor(){super(...arguments),ss.add(this),g4.set(this,[]),zu.set(this,{}),CN.set(this,{}),Oc.set(this,void 0),wg.set(this,void 0),Qb.set(this,void 0),Sg.set(this,void 0),IN.set(this,void 0),cl.set(this,void 0),PN.set(this,void 0),EN.set(this,void 0),Dw.set(this,void 0)}[(g4=new WeakMap,zu=new WeakMap,CN=new WeakMap,Oc=new WeakMap,wg=new WeakMap,Qb=new WeakMap,Sg=new WeakMap,IN=new WeakMap,cl=new WeakMap,PN=new WeakMap,EN=new WeakMap,Dw=new WeakMap,ss=new WeakSet,Symbol.asyncIterator)](){let t=[],r=[],n=!1;return this.on("event",a=>{let i=r.shift();i?i.resolve(a):t.push(a)}),this.on("end",()=>{n=!0;for(let a of r)a.resolve(void 0);r.length=0}),this.on("abort",a=>{n=!0;for(let i of r)i.reject(a);r.length=0}),this.on("error",a=>{n=!0;for(let i of r)i.reject(a);r.length=0}),{next:async()=>t.length?{value:t.shift(),done:!1}:n?{value:void 0,done:!0}:new Promise((i,s)=>r.push({resolve:i,reject:s})).then(i=>i?{value:i,done:!1}:{value:void 0,done:!0}),return:async()=>(this.abort(),{value:void 0,done:!0})}}static fromReadableStream(t){let r=new Tg;return r._run(()=>r._fromReadableStream(t)),r}async _fromReadableStream(t,r){let n=r?.signal;n&&(n.aborted&&this.controller.abort(),n.addEventListener("abort",()=>this.controller.abort())),this._connected();let a=Ws.fromReadableStream(t,this.controller);for await(let i of a)ve(this,ss,"m",Lw).call(this,i);if(a.controller.signal?.aborted)throw new oi;return this._addRun(ve(this,ss,"m",Rw).call(this))}toReadableStream(){return new Ws(this[Symbol.asyncIterator].bind(this),this.controller).toReadableStream()}static createToolAssistantStream(t,r,n,a){let i=new Tg;return i._run(()=>i._runToolAssistantStream(t,r,n,{...a,headers:{...a?.headers,"X-Stainless-Helper-Method":"stream"}})),i}async _createToolAssistantStream(t,r,n,a){let i=a?.signal;i&&(i.aborted&&this.controller.abort(),i.addEventListener("abort",()=>this.controller.abort()));let s={...n,stream:!0},o=await t.submitToolOutputs(r,s,{...a,signal:this.controller.signal});this._connected();for await(let l of o)ve(this,ss,"m",Lw).call(this,l);if(o.controller.signal?.aborted)throw new oi;return this._addRun(ve(this,ss,"m",Rw).call(this))}static createThreadAssistantStream(t,r,n){let a=new Tg;return a._run(()=>a._threadAssistantStream(t,r,{...n,headers:{...n?.headers,"X-Stainless-Helper-Method":"stream"}})),a}static createAssistantStream(t,r,n,a){let i=new Tg;return i._run(()=>i._runAssistantStream(t,r,n,{...a,headers:{...a?.headers,"X-Stainless-Helper-Method":"stream"}})),i}currentEvent(){return ve(this,PN,"f")}currentRun(){return ve(this,EN,"f")}currentMessageSnapshot(){return ve(this,Oc,"f")}currentRunStepSnapshot(){return ve(this,Dw,"f")}async finalRunSteps(){return await this.done(),Object.values(ve(this,zu,"f"))}async finalMessages(){return await this.done(),Object.values(ve(this,CN,"f"))}async finalRun(){if(await this.done(),!ve(this,wg,"f"))throw Error("Final run was not received.");return ve(this,wg,"f")}async _createThreadAssistantStream(t,r,n){let a=n?.signal;a&&(a.aborted&&this.controller.abort(),a.addEventListener("abort",()=>this.controller.abort()));let i={...r,stream:!0},s=await t.createAndRun(i,{...n,signal:this.controller.signal});this._connected();for await(let o of s)ve(this,ss,"m",Lw).call(this,o);if(s.controller.signal?.aborted)throw new oi;return this._addRun(ve(this,ss,"m",Rw).call(this))}async _createAssistantStream(t,r,n,a){let i=a?.signal;i&&(i.aborted&&this.controller.abort(),i.addEventListener("abort",()=>this.controller.abort()));let s={...n,stream:!0},o=await t.create(r,s,{...a,signal:this.controller.signal});this._connected();for await(let l of o)ve(this,ss,"m",Lw).call(this,l);if(o.controller.signal?.aborted)throw new oi;return this._addRun(ve(this,ss,"m",Rw).call(this))}static accumulateDelta(t,r){for(let[n,a]of Object.entries(r)){if(!t.hasOwnProperty(n)){t[n]=a;continue}let i=t[n];if(i==null){t[n]=a;continue}if(n==="index"||n==="type"){t[n]=a;continue}if(typeof i=="string"&&typeof a=="string")i+=a;else if(typeof i=="number"&&typeof a=="number")i+=a;else if(xw(i)&&xw(a))i=this.accumulateDelta(i,a);else if(Array.isArray(i)&&Array.isArray(a)){if(i.every(s=>typeof s=="string"||typeof s=="number")){i.push(...a);continue}for(let s of a){if(!xw(s))throw new Error(`Expected array delta entry to be an object but got: ${s}`);let o=s.index;if(o==null)throw new Error("Expected array delta entry to have an `index` property");if(typeof o!="number")throw new Error(`Expected array delta entry \`index\` property to be a number but got ${o}`);let l=i[o];l==null?i.push(s):i[o]=this.accumulateDelta(l,s)}continue}else throw Error(`Unhandled record type: ${n}, deltaValue: ${a}, accValue: ${i}`);t[n]=i}return t}_addRun(t){return t}async _threadAssistantStream(t,r,n){return await this._createThreadAssistantStream(r,t,n)}async _runAssistantStream(t,r,n,a){return await this._createAssistantStream(r,t,n,a)}async _runToolAssistantStream(t,r,n,a){return await this._createToolAssistantStream(r,t,n,a)}};Tg=lf,Lw=function(t){if(!this.ended)switch(Ft(this,PN,t,"f"),ve(this,ss,"m",Mue).call(this,t),t.event){case"thread.created":break;case"thread.run.created":case"thread.run.queued":case"thread.run.in_progress":case"thread.run.requires_action":case"thread.run.completed":case"thread.run.incomplete":case"thread.run.failed":case"thread.run.cancelling":case"thread.run.cancelled":case"thread.run.expired":ve(this,ss,"m",$ue).call(this,t);break;case"thread.run.step.created":case"thread.run.step.in_progress":case"thread.run.step.delta":case"thread.run.step.completed":case"thread.run.step.failed":case"thread.run.step.cancelled":case"thread.run.step.expired":ve(this,ss,"m",Due).call(this,t);break;case"thread.message.created":case"thread.message.in_progress":case"thread.message.delta":case"thread.message.completed":case"thread.message.incomplete":ve(this,ss,"m",Rue).call(this,t);break;case"error":throw new Error("Encountered an error event in event processing - errors should be processed earlier");default:}},Rw=function(){if(this.ended)throw new mt("stream has ended, this shouldn't happen");if(!ve(this,wg,"f"))throw Error("Final run has not been received");return ve(this,wg,"f")},Rue=function(t){let[r,n]=ve(this,ss,"m",Fue).call(this,t,ve(this,Oc,"f"));Ft(this,Oc,r,"f"),ve(this,CN,"f")[r.id]=r;for(let a of n){let i=r.content[a.index];i?.type=="text"&&this._emit("textCreated",i.text)}switch(t.event){case"thread.message.created":this._emit("messageCreated",t.data);break;case"thread.message.in_progress":break;case"thread.message.delta":if(this._emit("messageDelta",t.data.delta,r),t.data.delta.content)for(let a of t.data.delta.content){if(a.type=="text"&&a.text){let i=a.text,s=r.content[a.index];if(s&&s.type=="text")this._emit("textDelta",i,s.text);else throw Error("The snapshot associated with this text delta is not text or missing")}if(a.index!=ve(this,Qb,"f")){if(ve(this,Sg,"f"))switch(ve(this,Sg,"f").type){case"text":this._emit("textDone",ve(this,Sg,"f").text,ve(this,Oc,"f"));break;case"image_file":this._emit("imageFileDone",ve(this,Sg,"f").image_file,ve(this,Oc,"f"));break}Ft(this,Qb,a.index,"f")}Ft(this,Sg,r.content[a.index],"f")}break;case"thread.message.completed":case"thread.message.incomplete":if(ve(this,Qb,"f")!==void 0){let a=t.data.content[ve(this,Qb,"f")];if(a)switch(a.type){case"image_file":this._emit("imageFileDone",a.image_file,ve(this,Oc,"f"));break;case"text":this._emit("textDone",a.text,ve(this,Oc,"f"));break}}ve(this,Oc,"f")&&this._emit("messageDone",t.data),Ft(this,Oc,void 0,"f")}},Due=function(t){let r=ve(this,ss,"m",Oue).call(this,t);switch(Ft(this,Dw,r,"f"),t.event){case"thread.run.step.created":this._emit("runStepCreated",t.data);break;case"thread.run.step.delta":let n=t.data.delta;if(n.step_details&&n.step_details.type=="tool_calls"&&n.step_details.tool_calls&&r.step_details.type=="tool_calls")for(let i of n.step_details.tool_calls)i.index==ve(this,IN,"f")?this._emit("toolCallDelta",i,r.step_details.tool_calls[i.index]):(ve(this,cl,"f")&&this._emit("toolCallDone",ve(this,cl,"f")),Ft(this,IN,i.index,"f"),Ft(this,cl,r.step_details.tool_calls[i.index],"f"),ve(this,cl,"f")&&this._emit("toolCallCreated",ve(this,cl,"f")));this._emit("runStepDelta",t.data.delta,r);break;case"thread.run.step.completed":case"thread.run.step.failed":case"thread.run.step.cancelled":case"thread.run.step.expired":Ft(this,Dw,void 0,"f"),t.data.step_details.type=="tool_calls"&&ve(this,cl,"f")&&(this._emit("toolCallDone",ve(this,cl,"f")),Ft(this,cl,void 0,"f")),this._emit("runStepDone",t.data,r);break;case"thread.run.step.in_progress":break}},Mue=function(t){ve(this,g4,"f").push(t),this._emit("event",t)},Oue=function(t){switch(t.event){case"thread.run.step.created":return ve(this,zu,"f")[t.data.id]=t.data,t.data;case"thread.run.step.delta":let r=ve(this,zu,"f")[t.data.id];if(!r)throw Error("Received a RunStepDelta before creation of a snapshot");let n=t.data;if(n.delta){let a=Tg.accumulateDelta(r,n.delta);ve(this,zu,"f")[t.data.id]=a}return ve(this,zu,"f")[t.data.id];case"thread.run.step.completed":case"thread.run.step.failed":case"thread.run.step.cancelled":case"thread.run.step.expired":case"thread.run.step.in_progress":ve(this,zu,"f")[t.data.id]=t.data;break}if(ve(this,zu,"f")[t.data.id])return ve(this,zu,"f")[t.data.id];throw new Error("No snapshot available")},Fue=function(t,r){let n=[];switch(t.event){case"thread.message.created":return[t.data,n];case"thread.message.delta":if(!r)throw Error("Received a delta with no existing snapshot (there should be one from message creation)");let a=t.data;if(a.delta.content)for(let i of a.delta.content)if(i.index in r.content){let s=r.content[i.index];r.content[i.index]=ve(this,ss,"m",Bue).call(this,i,s)}else r.content[i.index]=i,n.push(i);return[r,n];case"thread.message.in_progress":case"thread.message.completed":case"thread.message.incomplete":if(r)return[r,n];throw Error("Received thread message event with no existing snapshot")}throw Error("Tried to accumulate a non-message event")},Bue=function(t,r){return Tg.accumulateDelta(r,t)},$ue=function(t){switch(Ft(this,EN,t.data,"f"),t.event){case"thread.run.created":break;case"thread.run.queued":break;case"thread.run.in_progress":break;case"thread.run.requires_action":case"thread.run.cancelled":case"thread.run.failed":case"thread.run.completed":case"thread.run.expired":case"thread.run.incomplete":Ft(this,wg,t.data,"f"),ve(this,cl,"f")&&(this._emit("toolCallDone",ve(this,cl,"f")),Ft(this,cl,void 0,"f"));break;case"thread.run.cancelling":break}};var Cg=class extends Fe{constructor(){super(...arguments),this.steps=new Zb(this._client)}create(t,r,n){let{include:a,...i}=r;return this._client.post(Re`/threads/${t}/runs`,{query:{include:a},body:i,...n,headers:Ze([{"OpenAI-Beta":"assistants=v2"},n?.headers]),stream:r.stream??!1})}retrieve(t,r,n){let{thread_id:a}=r;return this._client.get(Re`/threads/${a}/runs/${t}`,{...n,headers:Ze([{"OpenAI-Beta":"assistants=v2"},n?.headers])})}update(t,r,n){let{thread_id:a,...i}=r;return this._client.post(Re`/threads/${a}/runs/${t}`,{body:i,...n,headers:Ze([{"OpenAI-Beta":"assistants=v2"},n?.headers])})}list(t,r={},n){return this._client.getAPIList(Re`/threads/${t}/runs`,Tr,{query:r,...n,headers:Ze([{"OpenAI-Beta":"assistants=v2"},n?.headers])})}cancel(t,r,n){let{thread_id:a}=r;return this._client.post(Re`/threads/${a}/runs/${t}/cancel`,{...n,headers:Ze([{"OpenAI-Beta":"assistants=v2"},n?.headers])})}async createAndPoll(t,r,n){let a=await this.create(t,r,n);return await this.poll(a.id,{thread_id:t},n)}createAndStream(t,r,n){return lf.createAssistantStream(t,this._client.beta.threads.runs,r,n)}async poll(t,r,n){let a=Ze([n?.headers,{"X-Stainless-Poll-Helper":"true","X-Stainless-Custom-Poll-Interval":n?.pollIntervalMs?.toString()??void 0}]);for(;;){let{data:i,response:s}=await this.retrieve(t,r,{...n,headers:{...n?.headers,...a}}).withResponse();switch(i.status){case"queued":case"in_progress":case"cancelling":let o=5e3;if(n?.pollIntervalMs)o=n.pollIntervalMs;else{let l=s.headers.get("openai-poll-after-ms");if(l){let c=parseInt(l);isNaN(c)||(o=c)}}await Ou(o);break;case"requires_action":case"incomplete":case"cancelled":case"completed":case"failed":case"expired":return i}}}stream(t,r,n){return lf.createAssistantStream(t,this._client.beta.threads.runs,r,n)}submitToolOutputs(t,r,n){let{thread_id:a,...i}=r;return this._client.post(Re`/threads/${a}/runs/${t}/submit_tool_outputs`,{body:i,...n,headers:Ze([{"OpenAI-Beta":"assistants=v2"},n?.headers]),stream:r.stream??!1})}async submitToolOutputsAndPoll(t,r,n){let a=await this.submitToolOutputs(t,r,n);return await this.poll(a.id,r,n)}submitToolOutputsStream(t,r,n){return lf.createToolAssistantStream(t,this._client.beta.threads.runs,r,n)}};Cg.Steps=Zb;var lm=class extends Fe{constructor(){super(...arguments),this.runs=new Cg(this._client),this.messages=new Jb(this._client)}create(t={},r){return this._client.post("/threads",{body:t,...r,headers:Ze([{"OpenAI-Beta":"assistants=v2"},r?.headers])})}retrieve(t,r){return this._client.get(Re`/threads/${t}`,{...r,headers:Ze([{"OpenAI-Beta":"assistants=v2"},r?.headers])})}update(t,r,n){return this._client.post(Re`/threads/${t}`,{body:r,...n,headers:Ze([{"OpenAI-Beta":"assistants=v2"},n?.headers])})}delete(t,r){return this._client.delete(Re`/threads/${t}`,{...r,headers:Ze([{"OpenAI-Beta":"assistants=v2"},r?.headers])})}createAndRun(t,r){return this._client.post("/threads/runs",{body:t,...r,headers:Ze([{"OpenAI-Beta":"assistants=v2"},r?.headers]),stream:t.stream??!1})}async createAndRunPoll(t,r){let n=await this.createAndRun(t,r);return await this.runs.poll(n.id,{thread_id:n.thread_id},r)}createAndRunStream(t,r){return lf.createThreadAssistantStream(t,this._client.beta.threads,r)}};lm.Runs=Cg;lm.Messages=Jb;var Fc=class extends Fe{constructor(){super(...arguments),this.realtime=new im(this._client),this.chatkit=new sm(this._client),this.assistants=new Gb(this._client),this.threads=new lm(this._client)}};Fc.Realtime=im;Fc.ChatKit=sm;Fc.Assistants=Gb;Fc.Threads=lm;var Pg=class extends Fe{create(t,r){return this._client.post("/completions",{body:t,...r,stream:t.stream??!1})}};var ev=class extends Fe{retrieve(t,r,n){let{container_id:a}=r;return this._client.get(Re`/containers/${a}/files/${t}/content`,{...n,headers:Ze([{Accept:"application/binary"},n?.headers]),__binaryResponse:!0})}};var Eg=class extends Fe{constructor(){super(...arguments),this.content=new ev(this._client)}create(t,r,n){return this._client.post(Re`/containers/${t}/files`,ll({body:r,...n},this._client))}retrieve(t,r,n){let{container_id:a}=r;return this._client.get(Re`/containers/${a}/files/${t}`,n)}list(t,r={},n){return this._client.getAPIList(Re`/containers/${t}/files`,Tr,{query:r,...n})}delete(t,r,n){let{container_id:a}=r;return this._client.delete(Re`/containers/${a}/files/${t}`,{...n,headers:Ze([{Accept:"*/*"},n?.headers])})}};Eg.Content=ev;var cm=class extends Fe{constructor(){super(...arguments),this.files=new Eg(this._client)}create(t,r){return this._client.post("/containers",{body:t,...r})}retrieve(t,r){return this._client.get(Re`/containers/${t}`,r)}list(t={},r){return this._client.getAPIList("/containers",Tr,{query:t,...r})}delete(t,r){return this._client.delete(Re`/containers/${t}`,{...r,headers:Ze([{Accept:"*/*"},r?.headers])})}};cm.Files=Eg;var tv=class extends Fe{create(t,r,n){let{include:a,...i}=r;return this._client.post(Re`/conversations/${t}/items`,{query:{include:a},body:i,...n})}retrieve(t,r,n){let{conversation_id:a,...i}=r;return this._client.get(Re`/conversations/${a}/items/${t}`,{query:i,...n})}list(t,r={},n){return this._client.getAPIList(Re`/conversations/${t}/items`,nf,{query:r,...n})}delete(t,r,n){let{conversation_id:a}=r;return this._client.delete(Re`/conversations/${a}/items/${t}`,n)}};var um=class extends Fe{constructor(){super(...arguments),this.items=new tv(this._client)}create(t={},r){return this._client.post("/conversations",{body:t,...r})}retrieve(t,r){return this._client.get(Re`/conversations/${t}`,r)}update(t,r,n){return this._client.post(Re`/conversations/${t}`,{body:r,...n})}delete(t,r){return this._client.delete(Re`/conversations/${t}`,r)}};um.Items=tv;var Ig=class extends Fe{create(t,r){let n=!!t.encoding_format,a=n?t.encoding_format:"base64";n&&$a(this._client).debug("embeddings/user defined encoding_format:",t.encoding_format);let i=this._client.post("/embeddings",{body:{...t,encoding_format:a},...r});return n?i:($a(this._client).debug("embeddings/decoding base64 embeddings from base64"),i._thenUnwrap(s=>(s&&s.data&&s.data.forEach(o=>{let l=o.embedding;o.embedding=Lue(l)}),s)))}};var rv=class extends Fe{retrieve(t,r,n){let{eval_id:a,run_id:i}=r;return this._client.get(Re`/evals/${a}/runs/${i}/output_items/${t}`,n)}list(t,r,n){let{eval_id:a,...i}=r;return this._client.getAPIList(Re`/evals/${a}/runs/${t}/output_items`,Tr,{query:i,...n})}};var Ag=class extends Fe{constructor(){super(...arguments),this.outputItems=new rv(this._client)}create(t,r,n){return this._client.post(Re`/evals/${t}/runs`,{body:r,...n})}retrieve(t,r,n){let{eval_id:a}=r;return this._client.get(Re`/evals/${a}/runs/${t}`,n)}list(t,r={},n){return this._client.getAPIList(Re`/evals/${t}/runs`,Tr,{query:r,...n})}delete(t,r,n){let{eval_id:a}=r;return this._client.delete(Re`/evals/${a}/runs/${t}`,n)}cancel(t,r,n){let{eval_id:a}=r;return this._client.post(Re`/evals/${a}/runs/${t}`,n)}};Ag.OutputItems=rv;var dm=class extends Fe{constructor(){super(...arguments),this.runs=new Ag(this._client)}create(t,r){return this._client.post("/evals",{body:t,...r})}retrieve(t,r){return this._client.get(Re`/evals/${t}`,r)}update(t,r,n){return this._client.post(Re`/evals/${t}`,{body:r,...n})}list(t={},r){return this._client.getAPIList("/evals",Tr,{query:t,...r})}delete(t,r){return this._client.delete(Re`/evals/${t}`,r)}};dm.Runs=Ag;var Ng=class extends Fe{create(t,r){return this._client.post("/files",ll({body:t,...r},this._client))}retrieve(t,r){return this._client.get(Re`/files/${t}`,r)}list(t={},r){return this._client.getAPIList("/files",Tr,{query:t,...r})}delete(t,r){return this._client.delete(Re`/files/${t}`,r)}content(t,r){return this._client.get(Re`/files/${t}/content`,{...r,headers:Ze([{Accept:"application/binary"},r?.headers]),__binaryResponse:!0})}async waitForProcessing(t,{pollInterval:r=5e3,maxWait:n=30*60*1e3}={}){let a=new Set(["processed","error","deleted"]),i=Date.now(),s=await this.retrieve(t);for(;!s.status||!a.has(s.status);)if(await Ou(r),s=await this.retrieve(t),Date.now()-i>n)throw new Qp({message:`Giving up on waiting for file ${t} to finish processing after ${n} milliseconds.`});return s}};var nv=class extends Fe{};var av=class extends Fe{run(t,r){return this._client.post("/fine_tuning/alpha/graders/run",{body:t,...r})}validate(t,r){return this._client.post("/fine_tuning/alpha/graders/validate",{body:t,...r})}};var kg=class extends Fe{constructor(){super(...arguments),this.graders=new av(this._client)}};kg.Graders=av;var iv=class extends Fe{create(t,r,n){return this._client.getAPIList(Re`/fine_tuning/checkpoints/${t}/permissions`,Bu,{body:r,method:"post",...n})}retrieve(t,r={},n){return this._client.get(Re`/fine_tuning/checkpoints/${t}/permissions`,{query:r,...n})}delete(t,r,n){let{fine_tuned_model_checkpoint:a}=r;return this._client.delete(Re`/fine_tuning/checkpoints/${a}/permissions/${t}`,n)}};var _g=class extends Fe{constructor(){super(...arguments),this.permissions=new iv(this._client)}};_g.Permissions=iv;var sv=class extends Fe{list(t,r={},n){return this._client.getAPIList(Re`/fine_tuning/jobs/${t}/checkpoints`,Tr,{query:r,...n})}};var Lg=class extends Fe{constructor(){super(...arguments),this.checkpoints=new sv(this._client)}create(t,r){return this._client.post("/fine_tuning/jobs",{body:t,...r})}retrieve(t,r){return this._client.get(Re`/fine_tuning/jobs/${t}`,r)}list(t={},r){return this._client.getAPIList("/fine_tuning/jobs",Tr,{query:t,...r})}cancel(t,r){return this._client.post(Re`/fine_tuning/jobs/${t}/cancel`,r)}listEvents(t,r={},n){return this._client.getAPIList(Re`/fine_tuning/jobs/${t}/events`,Tr,{query:r,...n})}pause(t,r){return this._client.post(Re`/fine_tuning/jobs/${t}/pause`,r)}resume(t,r){return this._client.post(Re`/fine_tuning/jobs/${t}/resume`,r)}};Lg.Checkpoints=sv;var Bc=class extends Fe{constructor(){super(...arguments),this.methods=new nv(this._client),this.jobs=new Lg(this._client),this.checkpoints=new _g(this._client),this.alpha=new kg(this._client)}};Bc.Methods=nv;Bc.Jobs=Lg;Bc.Checkpoints=_g;Bc.Alpha=kg;var ov=class extends Fe{};var fm=class extends Fe{constructor(){super(...arguments),this.graderModels=new ov(this._client)}};fm.GraderModels=ov;var Rg=class extends Fe{createVariation(t,r){return this._client.post("/images/variations",ll({body:t,...r},this._client))}edit(t,r){return this._client.post("/images/edits",ll({body:t,...r,stream:t.stream??!1},this._client))}generate(t,r){return this._client.post("/images/generations",{body:t,...r,stream:t.stream??!1})}};var Dg=class extends Fe{retrieve(t,r){return this._client.get(Re`/models/${t}`,r)}list(t){return this._client.getAPIList("/models",Bu,t)}delete(t,r){return this._client.delete(Re`/models/${t}`,r)}};var Mg=class extends Fe{create(t,r){return this._client.post("/moderations",{body:t,...r})}};var lv=class extends Fe{accept(t,r,n){return this._client.post(Re`/realtime/calls/${t}/accept`,{body:r,...n,headers:Ze([{Accept:"*/*"},n?.headers])})}hangup(t,r){return this._client.post(Re`/realtime/calls/${t}/hangup`,{...r,headers:Ze([{Accept:"*/*"},r?.headers])})}refer(t,r,n){return this._client.post(Re`/realtime/calls/${t}/refer`,{body:r,...n,headers:Ze([{Accept:"*/*"},n?.headers])})}reject(t,r={},n){return this._client.post(Re`/realtime/calls/${t}/reject`,{body:r,...n,headers:Ze([{Accept:"*/*"},n?.headers])})}};var cv=class extends Fe{create(t,r){return this._client.post("/realtime/client_secrets",{body:t,...r})}};var cf=class extends Fe{constructor(){super(...arguments),this.clientSecrets=new cv(this._client),this.calls=new lv(this._client)}};cf.ClientSecrets=cv;cf.Calls=lv;function jue(e,t){return!t||!Rat(t)?{...e,output_parsed:null,output:e.output.map(r=>r.type==="function_call"?{...r,parsed_arguments:null}:r.type==="message"?{...r,content:r.content.map(n=>({...n,parsed:null}))}:r)}:y4(e,t)}function y4(e,t){let r=e.output.map(a=>{if(a.type==="function_call")return{...a,parsed_arguments:Oat(t,a)};if(a.type==="message"){let i=a.content.map(s=>s.type==="output_text"?{...s,parsed:Lat(t,s.text)}:s);return{...a,content:i}}return a}),n=Object.assign({},e,{output:r});return Object.getOwnPropertyDescriptor(e,"output_text")||AN(n),Object.defineProperty(n,"output_parsed",{enumerable:!0,get(){for(let a of n.output)if(a.type==="message"){for(let i of a.content)if(i.type==="output_text"&&i.parsed!==null)return i.parsed}return null}}),n}function Lat(e,t){return e.text?.format?.type!=="json_schema"?null:"$parseRaw"in e.text?.format?(e.text?.format).$parseRaw(t):JSON.parse(t)}function Rat(e){return!!Ew(e.text?.format)}function Dat(e){return e?.$brand==="auto-parseable-tool"}function Mat(e,t){return e.find(r=>r.type==="function"&&r.name===t)}function Oat(e,t){let r=Mat(e.tools??[],t.name);return{...t,...t,parsed_arguments:Dat(r)?r.$parseRaw(t.arguments):r?.strict?JSON.parse(t.arguments):null}}function AN(e){let t=[];for(let r of e.output)if(r.type==="message")for(let n of r.content)n.type==="output_text"&&t.push(n.text);e.output_text=t.join("")}var uv,NN,pm,kN,zue,Uue,Vue,que,dv=class extends tm{constructor(t){super(),uv.add(this),NN.set(this,void 0),pm.set(this,void 0),kN.set(this,void 0),Ft(this,NN,t,"f")}static createResponse(t,r,n){let a=new dv(r);return a._run(()=>a._createOrRetrieveResponse(t,r,{...n,headers:{...n?.headers,"X-Stainless-Helper-Method":"stream"}})),a}async _createOrRetrieveResponse(t,r,n){let a=n?.signal;a&&(a.aborted&&this.controller.abort(),a.addEventListener("abort",()=>this.controller.abort())),ve(this,uv,"m",zue).call(this);let i,s=null;"response_id"in r?(i=await t.responses.retrieve(r.response_id,{stream:!0},{...n,signal:this.controller.signal,stream:!0}),s=r.starting_after??null):i=await t.responses.create({...r,stream:!0},{...n,signal:this.controller.signal}),this._connected();for await(let o of i)ve(this,uv,"m",Uue).call(this,o,s);if(i.controller.signal?.aborted)throw new oi;return ve(this,uv,"m",Vue).call(this)}[(NN=new WeakMap,pm=new WeakMap,kN=new WeakMap,uv=new WeakSet,zue=function(){this.ended||Ft(this,pm,void 0,"f")},Uue=function(r,n){if(this.ended)return;let a=(s,o)=>{(n==null||o.sequence_number>n)&&this._emit(s,o)},i=ve(this,uv,"m",que).call(this,r);switch(a("event",r),r.type){case"response.output_text.delta":{let s=i.output[r.output_index];if(!s)throw new mt(`missing output at index ${r.output_index}`);if(s.type==="message"){let o=s.content[r.content_index];if(!o)throw new mt(`missing content at index ${r.content_index}`);if(o.type!=="output_text")throw new mt(`expected content to be 'output_text', got ${o.type}`);a("response.output_text.delta",{...r,snapshot:o.text})}break}case"response.function_call_arguments.delta":{let s=i.output[r.output_index];if(!s)throw new mt(`missing output at index ${r.output_index}`);s.type==="function_call"&&a("response.function_call_arguments.delta",{...r,snapshot:s.arguments});break}default:a(r.type,r);break}},Vue=function(){if(this.ended)throw new mt("stream has ended, this shouldn't happen");let r=ve(this,pm,"f");if(!r)throw new mt("request ended without sending any events");Ft(this,pm,void 0,"f");let n=Fat(r,ve(this,NN,"f"));return Ft(this,kN,n,"f"),n},que=function(r){let n=ve(this,pm,"f");if(!n){if(r.type!=="response.created")throw new mt(`When snapshot hasn't been set yet, expected 'response.created' event, got ${r.type}`);return n=Ft(this,pm,r.response,"f"),n}switch(r.type){case"response.output_item.added":{n.output.push(r.item);break}case"response.content_part.added":{let a=n.output[r.output_index];if(!a)throw new mt(`missing output at index ${r.output_index}`);let i=a.type,s=r.part;i==="message"&&s.type!=="reasoning_text"?a.content.push(s):i==="reasoning"&&s.type==="reasoning_text"&&(a.content||(a.content=[]),a.content.push(s));break}case"response.output_text.delta":{let a=n.output[r.output_index];if(!a)throw new mt(`missing output at index ${r.output_index}`);if(a.type==="message"){let i=a.content[r.content_index];if(!i)throw new mt(`missing content at index ${r.content_index}`);if(i.type!=="output_text")throw new mt(`expected content to be 'output_text', got ${i.type}`);i.text+=r.delta}break}case"response.function_call_arguments.delta":{let a=n.output[r.output_index];if(!a)throw new mt(`missing output at index ${r.output_index}`);a.type==="function_call"&&(a.arguments+=r.delta);break}case"response.reasoning_text.delta":{let a=n.output[r.output_index];if(!a)throw new mt(`missing output at index ${r.output_index}`);if(a.type==="reasoning"){let i=a.content?.[r.content_index];if(!i)throw new mt(`missing content at index ${r.content_index}`);if(i.type!=="reasoning_text")throw new mt(`expected content to be 'reasoning_text', got ${i.type}`);i.text+=r.delta}break}case"response.completed":{Ft(this,pm,r.response,"f");break}}return n},Symbol.asyncIterator)](){let t=[],r=[],n=!1;return this.on("event",a=>{let i=r.shift();i?i.resolve(a):t.push(a)}),this.on("end",()=>{n=!0;for(let a of r)a.resolve(void 0);r.length=0}),this.on("abort",a=>{n=!0;for(let i of r)i.reject(a);r.length=0}),this.on("error",a=>{n=!0;for(let i of r)i.reject(a);r.length=0}),{next:async()=>t.length?{value:t.shift(),done:!1}:n?{value:void 0,done:!0}:new Promise((i,s)=>r.push({resolve:i,reject:s})).then(i=>i?{value:i,done:!1}:{value:void 0,done:!0}),return:async()=>(this.abort(),{value:void 0,done:!0})}}async finalResponse(){await this.done();let t=ve(this,kN,"f");if(!t)throw new mt("stream ended without producing a ChatCompletion");return t}};function Fat(e,t){return jue(e,t)}var fv=class extends Fe{list(t,r={},n){return this._client.getAPIList(Re`/responses/${t}/input_items`,Tr,{query:r,...n})}};var pv=class extends Fe{count(t={},r){return this._client.post("/responses/input_tokens",{body:t,...r})}};var uf=class extends Fe{constructor(){super(...arguments),this.inputItems=new fv(this._client),this.inputTokens=new pv(this._client)}create(t,r){return this._client.post("/responses",{body:t,...r,stream:t.stream??!1})._thenUnwrap(n=>("object"in n&&n.object==="response"&&AN(n),n))}retrieve(t,r={},n){return this._client.get(Re`/responses/${t}`,{query:r,...n,stream:r?.stream??!1})._thenUnwrap(a=>("object"in a&&a.object==="response"&&AN(a),a))}delete(t,r){return this._client.delete(Re`/responses/${t}`,{...r,headers:Ze([{Accept:"*/*"},r?.headers])})}parse(t,r){return this._client.responses.create(t,r)._thenUnwrap(n=>y4(n,t))}stream(t,r){return dv.createResponse(this._client,t,r)}cancel(t,r){return this._client.post(Re`/responses/${t}/cancel`,r)}};uf.InputItems=fv;uf.InputTokens=pv;var mv=class extends Fe{create(t,r,n){return this._client.post(Re`/uploads/${t}/parts`,ll({body:r,...n},this._client))}};var mm=class extends Fe{constructor(){super(...arguments),this.parts=new mv(this._client)}create(t,r){return this._client.post("/uploads",{body:t,...r})}cancel(t,r){return this._client.post(Re`/uploads/${t}/cancel`,r)}complete(t,r,n){return this._client.post(Re`/uploads/${t}/complete`,{body:r,...n})}};mm.Parts=mv;var Hue=async e=>{let t=await Promise.allSettled(e),r=t.filter(a=>a.status==="rejected");if(r.length){for(let a of r);throw new Error(`${r.length} promise(s) failed - see the above errors`)}let n=[];for(let a of t)a.status==="fulfilled"&&n.push(a.value);return n};var hv=class extends Fe{create(t,r,n){return this._client.post(Re`/vector_stores/${t}/file_batches`,{body:r,...n,headers:Ze([{"OpenAI-Beta":"assistants=v2"},n?.headers])})}retrieve(t,r,n){let{vector_store_id:a}=r;return this._client.get(Re`/vector_stores/${a}/file_batches/${t}`,{...n,headers:Ze([{"OpenAI-Beta":"assistants=v2"},n?.headers])})}cancel(t,r,n){let{vector_store_id:a}=r;return this._client.post(Re`/vector_stores/${a}/file_batches/${t}/cancel`,{...n,headers:Ze([{"OpenAI-Beta":"assistants=v2"},n?.headers])})}async createAndPoll(t,r,n){let a=await this.create(t,r);return await this.poll(t,a.id,n)}listFiles(t,r,n){let{vector_store_id:a,...i}=r;return this._client.getAPIList(Re`/vector_stores/${a}/file_batches/${t}/files`,Tr,{query:i,...n,headers:Ze([{"OpenAI-Beta":"assistants=v2"},n?.headers])})}async poll(t,r,n){let a=Ze([n?.headers,{"X-Stainless-Poll-Helper":"true","X-Stainless-Custom-Poll-Interval":n?.pollIntervalMs?.toString()??void 0}]);for(;;){let{data:i,response:s}=await this.retrieve(r,{vector_store_id:t},{...n,headers:a}).withResponse();switch(i.status){case"in_progress":let o=5e3;if(n?.pollIntervalMs)o=n.pollIntervalMs;else{let l=s.headers.get("openai-poll-after-ms");if(l){let c=parseInt(l);isNaN(c)||(o=c)}}await Ou(o);break;case"failed":case"cancelled":case"completed":return i}}}async uploadAndPoll(t,{files:r,fileIds:n=[]},a){if(r==null||r.length==0)throw new Error("No `files` provided to process. If you've already uploaded files you should use `.createAndPoll()` instead");let i=a?.maxConcurrency??5,s=Math.min(i,r.length),o=this._client,l=r.values(),c=[...n];async function u(f){for(let p of f){let m=await o.files.create({file:p,purpose:"assistants"},a);c.push(m.id)}}let d=Array(s).fill(l).map(u);return await Hue(d),await this.createAndPoll(t,{file_ids:c})}};var gv=class extends Fe{create(t,r,n){return this._client.post(Re`/vector_stores/${t}/files`,{body:r,...n,headers:Ze([{"OpenAI-Beta":"assistants=v2"},n?.headers])})}retrieve(t,r,n){let{vector_store_id:a}=r;return this._client.get(Re`/vector_stores/${a}/files/${t}`,{...n,headers:Ze([{"OpenAI-Beta":"assistants=v2"},n?.headers])})}update(t,r,n){let{vector_store_id:a,...i}=r;return this._client.post(Re`/vector_stores/${a}/files/${t}`,{body:i,...n,headers:Ze([{"OpenAI-Beta":"assistants=v2"},n?.headers])})}list(t,r={},n){return this._client.getAPIList(Re`/vector_stores/${t}/files`,Tr,{query:r,...n,headers:Ze([{"OpenAI-Beta":"assistants=v2"},n?.headers])})}delete(t,r,n){let{vector_store_id:a}=r;return this._client.delete(Re`/vector_stores/${a}/files/${t}`,{...n,headers:Ze([{"OpenAI-Beta":"assistants=v2"},n?.headers])})}async createAndPoll(t,r,n){let a=await this.create(t,r,n);return await this.poll(t,a.id,n)}async poll(t,r,n){let a=Ze([n?.headers,{"X-Stainless-Poll-Helper":"true","X-Stainless-Custom-Poll-Interval":n?.pollIntervalMs?.toString()??void 0}]);for(;;){let i=await this.retrieve(r,{vector_store_id:t},{...n,headers:a}).withResponse(),s=i.data;switch(s.status){case"in_progress":let o=5e3;if(n?.pollIntervalMs)o=n.pollIntervalMs;else{let l=i.response.headers.get("openai-poll-after-ms");if(l){let c=parseInt(l);isNaN(c)||(o=c)}}await Ou(o);break;case"failed":case"completed":return s}}}async upload(t,r,n){let a=await this._client.files.create({file:r,purpose:"assistants"},n);return this.create(t,{file_id:a.id},n)}async uploadAndPoll(t,r,n){let a=await this.upload(t,r,n);return await this.poll(t,a.id,n)}content(t,r,n){let{vector_store_id:a}=r;return this._client.getAPIList(Re`/vector_stores/${a}/files/${t}/content`,Bu,{...n,headers:Ze([{"OpenAI-Beta":"assistants=v2"},n?.headers])})}};var df=class extends Fe{constructor(){super(...arguments),this.files=new gv(this._client),this.fileBatches=new hv(this._client)}create(t,r){return this._client.post("/vector_stores",{body:t,...r,headers:Ze([{"OpenAI-Beta":"assistants=v2"},r?.headers])})}retrieve(t,r){return this._client.get(Re`/vector_stores/${t}`,{...r,headers:Ze([{"OpenAI-Beta":"assistants=v2"},r?.headers])})}update(t,r,n){return this._client.post(Re`/vector_stores/${t}`,{body:r,...n,headers:Ze([{"OpenAI-Beta":"assistants=v2"},n?.headers])})}list(t={},r){return this._client.getAPIList("/vector_stores",Tr,{query:t,...r,headers:Ze([{"OpenAI-Beta":"assistants=v2"},r?.headers])})}delete(t,r){return this._client.delete(Re`/vector_stores/${t}`,{...r,headers:Ze([{"OpenAI-Beta":"assistants=v2"},r?.headers])})}search(t,r,n){return this._client.getAPIList(Re`/vector_stores/${t}/search`,Bu,{body:r,method:"post",...n,headers:Ze([{"OpenAI-Beta":"assistants=v2"},n?.headers])})}};df.Files=gv;df.FileBatches=hv;var Og=class extends Fe{create(t,r){return this._client.post("/videos",QB({body:t,...r},this._client))}retrieve(t,r){return this._client.get(Re`/videos/${t}`,r)}list(t={},r){return this._client.getAPIList("/videos",nf,{query:t,...r})}delete(t,r){return this._client.delete(Re`/videos/${t}`,r)}downloadContent(t,r={},n){return this._client.get(Re`/videos/${t}/content`,{query:r,...n,headers:Ze([{Accept:"application/binary"},n?.headers]),__binaryResponse:!0})}remix(t,r,n){return this._client.post(Re`/videos/${t}/remix`,QB({body:r,...n},this._client))}};var yv,Gue,_N,Fg=class extends Fe{constructor(){super(...arguments),yv.add(this)}async unwrap(t,r,n=this._client.webhookSecret,a=300){return await this.verifySignature(t,r,n,a),JSON.parse(t)}async verifySignature(t,r,n=this._client.webhookSecret,a=300){if(typeof crypto>"u"||typeof crypto.subtle.importKey!="function"||typeof crypto.subtle.verify!="function")throw new Error("Webhook signature verification is only supported when the `crypto` global is defined");ve(this,yv,"m",Gue).call(this,n);let i=Ze([r]).values,s=ve(this,yv,"m",_N).call(this,i,"webhook-signature"),o=ve(this,yv,"m",_N).call(this,i,"webhook-timestamp"),l=ve(this,yv,"m",_N).call(this,i,"webhook-id"),c=parseInt(o,10);if(isNaN(c))throw new Mu("Invalid webhook timestamp format");let u=Math.floor(Date.now()/1e3);if(u-c>a)throw new Mu("Webhook timestamp is too old");if(c>u+a)throw new Mu("Webhook timestamp is too new");let d=s.split(" ").map(h=>h.startsWith("v1,")?h.substring(3):h),f=n.startsWith("whsec_")?Buffer.from(n.replace("whsec_",""),"base64"):Buffer.from(n,"utf-8"),p=l?`${l}.${o}.${t}`:`${o}.${t}`,m=await crypto.subtle.importKey("raw",f,{name:"HMAC",hash:"SHA-256"},!1,["verify"]);for(let h of d)try{let x=Buffer.from(h,"base64");if(await crypto.subtle.verify("HMAC",m,x,new TextEncoder().encode(p)))return}catch{continue}throw new Mu("The given webhook signature does not match the expected signature")}};yv=new WeakSet,Gue=function(t){if(typeof t!="string"||t.length===0)throw new Error("The webhook secret must either be set using the env var, OPENAI_WEBHOOK_SECRET, on the client class, OpenAI({ webhookSecret: '123' }), or passed to this function")},_N=function(t,r){if(!t)throw new Error("Headers are required");let n=t.get(r);if(n==null)throw new Error(`Missing required header: ${r}`);return n};var x4,b4,LN,Kue,or=class{constructor({baseURL:t=om("OPENAI_BASE_URL"),apiKey:r=om("OPENAI_API_KEY"),organization:n=om("OPENAI_ORG_ID")??null,project:a=om("OPENAI_PROJECT_ID")??null,webhookSecret:i=om("OPENAI_WEBHOOK_SECRET")??null,...s}={}){if(x4.add(this),LN.set(this,void 0),this.completions=new Pg(this),this.chat=new am(this),this.embeddings=new Ig(this),this.files=new Ng(this),this.images=new Rg(this),this.audio=new ju(this),this.moderations=new Mg(this),this.models=new Dg(this),this.fineTuning=new Bc(this),this.graders=new fm(this),this.vectorStores=new df(this),this.webhooks=new Fg(this),this.beta=new Fc(this),this.batches=new vg(this),this.uploads=new mm(this),this.responses=new uf(this),this.realtime=new cf(this),this.conversations=new um(this),this.evals=new dm(this),this.containers=new cm(this),this.videos=new Og(this),r===void 0)throw new mt("Missing credentials. Please pass an `apiKey`, or set the `OPENAI_API_KEY` environment variable.");let o={apiKey:r,organization:n,project:a,webhookSecret:i,...s,baseURL:t||"https://api.openai.com/v1"};if(!o.dangerouslyAllowBrowser&&eue())throw new mt(`It looks like you're running in a browser-like environment.
This is disabled by default, as it risks exposing your secret API credentials to attackers.
If you understand the risks and have appropriate mitigations in place,
you can set the \`dangerouslyAllowBrowser\` option to \`true\`, e.g.,
new OpenAI({ apiKey, dangerouslyAllowBrowser: true });
https://help.openai.com/en/articles/5112595-best-practices-for-api-key-safety
`);this.baseURL=o.baseURL,this.timeout=o.timeout??b4.DEFAULT_TIMEOUT,this.logger=o.logger??console;let l="warn";this.logLevel=l,this.logLevel=KB(o.logLevel,"ClientOptions.logLevel",this)??KB(om("OPENAI_LOG"),"process.env['OPENAI_LOG']",this)??l,this.fetchOptions=o.fetchOptions,this.maxRetries=o.maxRetries??2,this.fetch=o.fetch??rue(),Ft(this,LN,aue,"f"),this._options=o,this.apiKey=typeof r=="string"?r:"Missing Key",this.organization=n,this.project=a,this.webhookSecret=i}withOptions(t){return new this.constructor({...this._options,baseURL:this.baseURL,maxRetries:this.maxRetries,timeout:this.timeout,logger:this.logger,logLevel:this.logLevel,fetch:this.fetch,fetchOptions:this.fetchOptions,apiKey:this.apiKey,organization:this.organization,project:this.project,webhookSecret:this.webhookSecret,...t})}defaultQuery(){return this._options.defaultQuery}validateHeaders({values:t,nulls:r}){}async authHeaders(t){return Ze([{Authorization:`Bearer ${this.apiKey}`}])}stringifyQuery(t){return HB(t,{arrayFormat:"brackets"})}getUserAgent(){return`${this.constructor.name}/JS ${em}`}defaultIdempotencyKey(){return`stainless-node-retry-${MB()}`}makeStatusError(t,r,n,a){return Na.generate(t,r,n,a)}async _callApiKey(){let t=this._options.apiKey;if(typeof t!="function")return!1;let r;try{r=await t()}catch(n){throw n instanceof mt?n:new mt(`Failed to get token from 'apiKey' function: ${n.message}`,{cause:n})}if(typeof r!="string"||!r)throw new mt(`Expected 'apiKey' function argument to return a string but it returned ${r}`);return this.apiKey=r,!0}buildURL(t,r,n){let a=!ve(this,x4,"m",Kue).call(this)&&n||this.baseURL,i=Gce(t)?new URL(t):new URL(a+(a.endsWith("/")&&t.startsWith("/")?t.slice(1):t)),s=this.defaultQuery();return Kce(s)||(r={...s,...r}),typeof r=="object"&&r&&!Array.isArray(r)&&(i.search=this.stringifyQuery(r)),i.toString()}async prepareOptions(t){await this._callApiKey()}async prepareRequest(t,{url:r,options:n}){}get(t,r){return this.methodRequest("get",t,r)}post(t,r){return this.methodRequest("post",t,r)}patch(t,r){return this.methodRequest("patch",t,r)}put(t,r){return this.methodRequest("put",t,r)}delete(t,r){return this.methodRequest("delete",t,r)}methodRequest(t,r,n){return this.request(Promise.resolve(n).then(a=>({method:t,path:r,...a})))}request(t,r=null){return new rf(this,this.makeRequest(t,r,void 0))}async makeRequest(t,r,n){let a=await t,i=a.maxRetries??this.maxRetries;r==null&&(r=i),await this.prepareOptions(a);let{req:s,url:o,timeout:l}=await this.buildRequest(a,{retryCount:i-r});await this.prepareRequest(s,{url:o,options:a});let c="log_"+(Math.random()*(1<<24)|0).toString(16).padStart(6,"0"),u=n===void 0?"":`, retryOf: ${n}`,d=Date.now();if($a(this).debug(`[${c}] sending request`,tf({retryOfRequestLogID:n,method:a.method,url:o,options:a,headers:s.headers})),a.signal?.aborted)throw new oi;let f=new AbortController,p=await this.fetchWithTimeout(o,s,l,f).catch(yw),m=Date.now();if(p instanceof globalThis.Error){let g=`retrying, ${r} attempts remaining`;if(a.signal?.aborted)throw new oi;let y=gw(p)||/timed? ?out/i.test(String(p)+("cause"in p?String(p.cause):""));if(r)return $a(this).info(`[${c}] connection ${y?"timed out":"failed"} - ${g}`),$a(this).debug(`[${c}] connection ${y?"timed out":"failed"} (${g})`,tf({retryOfRequestLogID:n,url:o,durationMs:m-d,message:p.message})),this.retryRequest(a,r,n??c);throw $a(this).info(`[${c}] connection ${y?"timed out":"failed"} - error; no more retries left`),$a(this).debug(`[${c}] connection ${y?"timed out":"failed"} (error; no more retries left)`,tf({retryOfRequestLogID:n,url:o,durationMs:m-d,message:p.message})),y?new Qp:new Zp({cause:p})}let h=[...p.headers.entries()].filter(([g])=>g==="x-request-id").map(([g,y])=>", "+g+": "+JSON.stringify(y)).join(""),x=`[${c}${u}${h}] ${s.method} ${o} ${p.ok?"succeeded":"failed"} with status ${p.status} in ${m-d}ms`;if(!p.ok){let g=await this.shouldRetry(p);if(r&&g){let C=`retrying, ${r} attempts remaining`;return await nue(p.body),$a(this).info(`${x} - ${C}`),$a(this).debug(`[${c}] response error (${C})`,tf({retryOfRequestLogID:n,url:p.url,status:p.status,headers:p.headers,durationMs:m-d})),this.retryRequest(a,r,n??c,p.headers)}let y=g?"error; no more retries left":"error; not retryable";$a(this).info(`${x} - ${y}`);let b=await p.text().catch(C=>yw(C).message),S=Yce(b),w=S?void 0:b;throw $a(this).debug(`[${c}] response error (${y})`,tf({retryOfRequestLogID:n,url:p.url,status:p.status,headers:p.headers,message:w,durationMs:Date.now()-d})),this.makeStatusError(p.status,S,w,p.headers)}return $a(this).info(x),$a(this).debug(`[${c}] response start`,tf({retryOfRequestLogID:n,url:p.url,status:p.status,headers:p.headers,durationMs:m-d})),{response:p,options:a,controller:f,requestLogID:c,retryOfRequestLogID:n,startTime:d}}getAPIList(t,r,n){return this.requestAPIList(r,{method:"get",path:t,...n})}requestAPIList(t,r){let n=this.makeRequest(r,null,void 0);return new ww(this,n,t)}async fetchWithTimeout(t,r,n,a){let{signal:i,method:s,...o}=r||{};i&&i.addEventListener("abort",()=>a.abort());let l=setTimeout(()=>a.abort(),n),c=globalThis.ReadableStream&&o.body instanceof globalThis.ReadableStream||typeof o.body=="object"&&o.body!==null&&Symbol.asyncIterator in o.body,u={signal:a.signal,...c?{duplex:"half"}:{},method:"GET",...o};s&&(u.method=s.toUpperCase());try{return await this.fetch.call(void 0,t,u)}finally{clearTimeout(l)}}async shouldRetry(t){let r=t.headers.get("x-should-retry");return r==="true"?!0:r==="false"?!1:t.status===408||t.status===409||t.status===429||t.status>=500}async retryRequest(t,r,n,a){let i,s=a?.get("retry-after-ms");if(s){let l=parseFloat(s);Number.isNaN(l)||(i=l)}let o=a?.get("retry-after");if(o&&!i){let l=parseFloat(o);Number.isNaN(l)?i=Date.parse(o)-Date.now():i=l*1e3}if(!(i&&0<=i&&i<60*1e3)){let l=t.maxRetries??this.maxRetries;i=this.calculateDefaultRetryTimeoutMillis(r,l)}return await Ou(i),this.makeRequest(t,r-1,n)}calculateDefaultRetryTimeoutMillis(t,r){let i=r-t,s=Math.min(.5*Math.pow(2,i),8),o=1-Math.random()*.25;return s*o*1e3}async buildRequest(t,{retryCount:r=0}={}){let n={...t},{method:a,path:i,query:s,defaultBaseURL:o}=n,l=this.buildURL(i,s,o);"timeout"in n&&Xce("timeout",n.timeout),n.timeout=n.timeout??this.timeout;let{bodyHeaders:c,body:u}=this.buildBody({options:n}),d=await this.buildHeaders({options:t,method:a,bodyHeaders:c,retryCount:r});return{req:{method:a,headers:d,...n.signal&&{signal:n.signal},...globalThis.ReadableStream&&u instanceof globalThis.ReadableStream&&{duplex:"half"},...u&&{body:u},...this.fetchOptions??{},...n.fetchOptions??{}},url:l,timeout:n.timeout}}async buildHeaders({options:t,method:r,bodyHeaders:n,retryCount:a}){let i={};this.idempotencyHeader&&r!=="get"&&(t.idempotencyKey||(t.idempotencyKey=this.defaultIdempotencyKey()),i[this.idempotencyHeader]=t.idempotencyKey);let s=Ze([i,{Accept:"application/json","User-Agent":this.getUserAgent(),"X-Stainless-Retry-Count":String(a),...t.timeout?{"X-Stainless-Timeout":String(Math.trunc(t.timeout/1e3))}:{},...tue(),"OpenAI-Organization":this.organization,"OpenAI-Project":this.project},await this.authHeaders(t),this._options.defaultHeaders,n,t.headers]);return this.validateHeaders(s),s.values}buildBody({options:{body:t,headers:r}}){if(!t)return{bodyHeaders:void 0,body:void 0};let n=Ze([r]);return ArrayBuffer.isView(t)||t instanceof ArrayBuffer||t instanceof DataView||typeof t=="string"&&n.values.has("content-type")||globalThis.Blob&&t instanceof globalThis.Blob||t instanceof FormData||t instanceof URLSearchParams||globalThis.ReadableStream&&t instanceof globalThis.ReadableStream?{bodyHeaders:void 0,body:t}:typeof t=="object"&&(Symbol.asyncIterator in t||Symbol.iterator in t&&"next"in t&&typeof t.next=="function")?{bodyHeaders:void 0,body:iN(t)}:ve(this,LN,"f").call(this,{body:t,headers:n})}};b4=or,LN=new WeakMap,x4=new WeakSet,Kue=function(){return this.baseURL!=="https://api.openai.com/v1"};or.OpenAI=b4;or.DEFAULT_TIMEOUT=6e5;or.OpenAIError=mt;or.APIError=Na;or.APIConnectionError=Zp;or.APIConnectionTimeoutError=Qp;or.APIUserAbortError=oi;or.NotFoundError=kb;or.ConflictError=_b;or.RateLimitError=Rb;or.BadRequestError=Ib;or.AuthenticationError=Ab;or.InternalServerError=Db;or.PermissionDeniedError=Nb;or.UnprocessableEntityError=Lb;or.InvalidWebhookSignatureError=Mu;or.toFile=mN;or.Completions=Pg;or.Chat=am;or.Embeddings=Ig;or.Files=Ng;or.Images=Rg;or.Audio=ju;or.Moderations=Mg;or.Models=Dg;or.FineTuning=Bc;or.Graders=fm;or.VectorStores=df;or.Webhooks=Fg;or.Beta=Fc;or.Batches=vg;or.Uploads=mm;or.Responses=uf;or.Realtime=cf;or.Conversations=um;or.Evals=dm;or.Containers=cm;or.Videos=Og;var Pz={};xl(Pz,{$brand:()=>RN,$input:()=>$6,$output:()=>B6,NEVER:()=>v4,TimePrecision:()=>V6,ZodAny:()=>Pfe,ZodArray:()=>Nfe,ZodBase64:()=>lz,ZodBase64URL:()=>cz,ZodBigInt:()=>vC,ZodBigIntFormat:()=>fz,ZodBoolean:()=>bC,ZodCIDRv4:()=>sz,ZodCIDRv6:()=>oz,ZodCUID:()=>Qj,ZodCUID2:()=>ez,ZodCatch:()=>Wfe,ZodCodec:()=>Tz,ZodCustom:()=>zk,ZodCustomStringFormat:()=>yC,ZodDate:()=>Bk,ZodDefault:()=>Ufe,ZodDiscriminatedUnion:()=>kfe,ZodE164:()=>uz,ZodEmail:()=>Yj,ZodEmoji:()=>Jj,ZodEnum:()=>hC,ZodError:()=>vot,ZodFile:()=>$fe,ZodFirstPartyTypeKind:()=>wz,ZodFunction:()=>npe,ZodGUID:()=>Rk,ZodIPv4:()=>az,ZodIPv6:()=>iz,ZodISODate:()=>Nk,ZodISODateTime:()=>Ak,ZodISODuration:()=>_k,ZodISOTime:()=>kk,ZodIntersection:()=>_fe,ZodIssueCode:()=>Dlt,ZodJWT:()=>dz,ZodKSUID:()=>nz,ZodLazy:()=>epe,ZodLiteral:()=>Bfe,ZodMAC:()=>xfe,ZodMap:()=>Ofe,ZodNaN:()=>Yfe,ZodNanoID:()=>Zj,ZodNever:()=>Ife,ZodNonOptional:()=>vz,ZodNull:()=>wfe,ZodNullable:()=>zfe,ZodNumber:()=>xC,ZodNumberFormat:()=>Lv,ZodObject:()=>jk,ZodOptional:()=>bz,ZodPipe:()=>Sz,ZodPrefault:()=>qfe,ZodPromise:()=>rpe,ZodReadonly:()=>Jfe,ZodRealError:()=>ko,ZodRecord:()=>gz,ZodSet:()=>Ffe,ZodString:()=>gC,ZodStringFormat:()=>_n,ZodSuccess:()=>Kfe,ZodSymbol:()=>Sfe,ZodTemplateLiteral:()=>Qfe,ZodTransform:()=>jfe,ZodTuple:()=>Rfe,ZodType:()=>Ir,ZodULID:()=>tz,ZodURL:()=>Fk,ZodUUID:()=>hf,ZodUndefined:()=>Tfe,ZodUnion:()=>mz,ZodUnknown:()=>Efe,ZodVoid:()=>Afe,ZodXID:()=>rz,_ZodString:()=>Xj,_default:()=>Vfe,_function:()=>Plt,any:()=>ilt,array:()=>$k,base64:()=>Uot,base64url:()=>Vot,bigint:()=>elt,boolean:()=>vfe,catch:()=>Xfe,check:()=>Elt,cidrv4:()=>jot,cidrv6:()=>zot,clone:()=>Ys,codec:()=>Tlt,coerce:()=>Cz,config:()=>ja,core:()=>mf,cuid:()=>Lot,cuid2:()=>Rot,custom:()=>Ilt,date:()=>olt,decode:()=>jj,decodeAsync:()=>Uj,describe:()=>Alt,discriminatedUnion:()=>flt,e164:()=>qot,email:()=>Tot,emoji:()=>kot,encode:()=>$j,encodeAsync:()=>zj,endsWith:()=>oC,enum:()=>yz,file:()=>xlt,flattenError:()=>Vw,float32:()=>Yot,float64:()=>Jot,formatError:()=>qw,function:()=>Plt,getErrorMap:()=>Olt,globalRegistry:()=>Js,gt:()=>pf,gte:()=>No,guid:()=>wot,hash:()=>Xot,hex:()=>Wot,hostname:()=>Kot,httpUrl:()=>Not,includes:()=>iC,instanceof:()=>klt,int:()=>Wj,int32:()=>Zot,int64:()=>tlt,intersection:()=>Lfe,ipv4:()=>Fot,ipv6:()=>$ot,iso:()=>Lk,json:()=>Llt,jwt:()=>Hot,keyof:()=>llt,ksuid:()=>Oot,lazy:()=>tpe,length:()=>Nv,literal:()=>ylt,locales:()=>Zw,looseObject:()=>dlt,lowercase:()=>nC,lt:()=>ff,lte:()=>sc,mac:()=>Bot,map:()=>mlt,maxLength:()=>Av,maxSize:()=>Iv,meta:()=>Nlt,mime:()=>lC,minLength:()=>Sm,minSize:()=>Ug,multipleOf:()=>zg,nan:()=>Slt,nanoid:()=>_ot,nativeEnum:()=>glt,negative:()=>xj,never:()=>pz,nonnegative:()=>vj,nonoptional:()=>Gfe,nonpositive:()=>bj,normalize:()=>cC,null:()=>Cfe,nullable:()=>Mk,nullish:()=>blt,number:()=>bfe,object:()=>clt,optional:()=>Dk,overwrite:()=>Uu,parse:()=>Mj,parseAsync:()=>Oj,partialRecord:()=>plt,pipe:()=>Ok,positive:()=>yj,prefault:()=>Hfe,preprocess:()=>Rlt,prettifyError:()=>L4,promise:()=>Clt,property:()=>Sj,readonly:()=>Zfe,record:()=>Mfe,refine:()=>ape,regex:()=>rC,regexes:()=>ic,registry:()=>ok,safeDecode:()=>qj,safeDecodeAsync:()=>Gj,safeEncode:()=>Vj,safeEncodeAsync:()=>Hj,safeParse:()=>Fj,safeParseAsync:()=>Bj,set:()=>hlt,setErrorMap:()=>Mlt,size:()=>tC,slugify:()=>pC,startsWith:()=>sC,strictObject:()=>ult,string:()=>Kj,stringFormat:()=>Got,stringbool:()=>_lt,success:()=>vlt,superRefine:()=>ipe,symbol:()=>nlt,templateLiteral:()=>wlt,toJSONSchema:()=>kj,toLowerCase:()=>dC,toUpperCase:()=>fC,transform:()=>xz,treeifyError:()=>_4,trim:()=>uC,tuple:()=>Dfe,uint32:()=>Qot,uint64:()=>rlt,ulid:()=>Dot,undefined:()=>alt,union:()=>hz,unknown:()=>_v,uppercase:()=>aC,url:()=>Aot,util:()=>Ye,uuid:()=>Cot,uuidv4:()=>Pot,uuidv6:()=>Eot,uuidv7:()=>Iot,void:()=>slt,xid:()=>Mot});var mf={};xl(mf,{$ZodAny:()=>o6,$ZodArray:()=>f6,$ZodAsyncError:()=>$c,$ZodBase64:()=>J$,$ZodBase64URL:()=>Z$,$ZodBigInt:()=>tk,$ZodBigIntFormat:()=>n6,$ZodBoolean:()=>Ww,$ZodCIDRv4:()=>W$,$ZodCIDRv6:()=>X$,$ZodCUID:()=>O$,$ZodCUID2:()=>F$,$ZodCatch:()=>N6,$ZodCheck:()=>kn,$ZodCheckBigIntFormat:()=>f$,$ZodCheckEndsWith:()=>C$,$ZodCheckGreaterThan:()=>WN,$ZodCheckIncludes:()=>T$,$ZodCheckLengthEquals:()=>x$,$ZodCheckLessThan:()=>KN,$ZodCheckLowerCase:()=>v$,$ZodCheckMaxLength:()=>g$,$ZodCheckMaxSize:()=>p$,$ZodCheckMimeType:()=>E$,$ZodCheckMinLength:()=>y$,$ZodCheckMinSize:()=>m$,$ZodCheckMultipleOf:()=>u$,$ZodCheckNumberFormat:()=>d$,$ZodCheckOverwrite:()=>I$,$ZodCheckProperty:()=>P$,$ZodCheckRegex:()=>b$,$ZodCheckSizeEquals:()=>h$,$ZodCheckStartsWith:()=>w$,$ZodCheckStringFormat:()=>Pv,$ZodCheckUpperCase:()=>S$,$ZodCodec:()=>Xw,$ZodCustom:()=>F6,$ZodCustomStringFormat:()=>t6,$ZodDate:()=>d6,$ZodDefault:()=>P6,$ZodDiscriminatedUnion:()=>m6,$ZodE164:()=>Q$,$ZodEmail:()=>L$,$ZodEmoji:()=>D$,$ZodEncodeError:()=>hm,$ZodEnum:()=>b6,$ZodError:()=>Uw,$ZodFile:()=>S6,$ZodFunction:()=>D6,$ZodGUID:()=>k$,$ZodIPv4:()=>H$,$ZodIPv6:()=>G$,$ZodISODate:()=>U$,$ZodISODateTime:()=>z$,$ZodISODuration:()=>q$,$ZodISOTime:()=>V$,$ZodIntersection:()=>h6,$ZodJWT:()=>e6,$ZodKSUID:()=>j$,$ZodLazy:()=>O6,$ZodLiteral:()=>v6,$ZodMAC:()=>K$,$ZodMap:()=>y6,$ZodNaN:()=>k6,$ZodNanoID:()=>M$,$ZodNever:()=>c6,$ZodNonOptional:()=>I6,$ZodNull:()=>s6,$ZodNullable:()=>C6,$ZodNumber:()=>ek,$ZodNumberFormat:()=>r6,$ZodObject:()=>bde,$ZodObjectJIT:()=>p6,$ZodOptional:()=>w6,$ZodPipe:()=>_6,$ZodPrefault:()=>E6,$ZodPromise:()=>M6,$ZodReadonly:()=>L6,$ZodRealError:()=>Ao,$ZodRecord:()=>g6,$ZodRegistry:()=>Ev,$ZodSet:()=>x6,$ZodString:()=>jg,$ZodStringFormat:()=>En,$ZodSuccess:()=>A6,$ZodSymbol:()=>a6,$ZodTemplateLiteral:()=>R6,$ZodTransform:()=>T6,$ZodTuple:()=>nk,$ZodType:()=>lr,$ZodULID:()=>B$,$ZodURL:()=>R$,$ZodUUID:()=>_$,$ZodUndefined:()=>i6,$ZodUnion:()=>rk,$ZodUnknown:()=>l6,$ZodVoid:()=>u6,$ZodXID:()=>$$,$brand:()=>RN,$constructor:()=>xe,$input:()=>$6,$output:()=>B6,Doc:()=>Kw,JSONSchema:()=>hfe,JSONSchemaGenerator:()=>mC,NEVER:()=>v4,TimePrecision:()=>V6,_any:()=>uj,_array:()=>Tj,_base64:()=>Ck,_base64url:()=>Pk,_bigint:()=>nj,_boolean:()=>tj,_catch:()=>pot,_check:()=>mfe,_cidrv4:()=>Tk,_cidrv6:()=>wk,_coercedBigint:()=>aj,_coercedBoolean:()=>rj,_coercedDate:()=>hj,_coercedNumber:()=>X6,_coercedString:()=>z6,_cuid:()=>hk,_cuid2:()=>gk,_custom:()=>Cj,_date:()=>mj,_decode:()=>$N,_decodeAsync:()=>zN,_default:()=>uot,_discriminatedUnion:()=>Zst,_e164:()=>Ek,_email:()=>lk,_emoji:()=>pk,_encode:()=>BN,_encodeAsync:()=>jN,_endsWith:()=>oC,_enum:()=>aot,_file:()=>wj,_float32:()=>J6,_float64:()=>Z6,_gt:()=>pf,_gte:()=>No,_guid:()=>Qw,_includes:()=>iC,_int:()=>Y6,_int32:()=>Q6,_int64:()=>ij,_intersection:()=>Qst,_ipv4:()=>vk,_ipv6:()=>Sk,_isoDate:()=>H6,_isoDateTime:()=>q6,_isoDuration:()=>K6,_isoTime:()=>G6,_jwt:()=>Ik,_ksuid:()=>bk,_lazy:()=>yot,_length:()=>Nv,_literal:()=>sot,_lowercase:()=>nC,_lt:()=>ff,_lte:()=>sc,_mac:()=>U6,_map:()=>rot,_max:()=>sc,_maxLength:()=>Av,_maxSize:()=>Iv,_mime:()=>lC,_min:()=>No,_minLength:()=>Sm,_minSize:()=>Ug,_multipleOf:()=>zg,_nan:()=>gj,_nanoid:()=>mk,_nativeEnum:()=>iot,_negative:()=>xj,_never:()=>fj,_nonnegative:()=>vj,_nonoptional:()=>dot,_nonpositive:()=>bj,_normalize:()=>cC,_null:()=>cj,_nullable:()=>cot,_number:()=>W6,_optional:()=>lot,_overwrite:()=>Uu,_parse:()=>Sv,_parseAsync:()=>Tv,_pipe:()=>mot,_positive:()=>yj,_promise:()=>xot,_property:()=>Sj,_readonly:()=>hot,_record:()=>tot,_refine:()=>Pj,_regex:()=>rC,_safeDecode:()=>VN,_safeDecodeAsync:()=>HN,_safeEncode:()=>UN,_safeEncodeAsync:()=>qN,_safeParse:()=>wv,_safeParseAsync:()=>Cv,_set:()=>not,_size:()=>tC,_slugify:()=>pC,_startsWith:()=>sC,_string:()=>j6,_stringFormat:()=>kv,_stringbool:()=>Nj,_success:()=>fot,_superRefine:()=>Ej,_symbol:()=>oj,_templateLiteral:()=>got,_toLowerCase:()=>dC,_toUpperCase:()=>fC,_transform:()=>oot,_trim:()=>uC,_tuple:()=>eot,_uint32:()=>ej,_uint64:()=>sj,_ulid:()=>yk,_undefined:()=>lj,_union:()=>Jst,_unknown:()=>dj,_uppercase:()=>aC,_url:()=>eC,_uuid:()=>ck,_uuidv4:()=>uk,_uuidv6:()=>dk,_uuidv7:()=>fk,_void:()=>pj,_xid:()=>xk,clone:()=>Ys,config:()=>ja,decode:()=>yit,decodeAsync:()=>bit,describe:()=>Ij,encode:()=>git,encodeAsync:()=>xit,flattenError:()=>Vw,formatError:()=>qw,globalConfig:()=>Mw,globalRegistry:()=>Js,isValidBase64:()=>Y$,isValidBase64URL:()=>hde,isValidJWT:()=>gde,locales:()=>Zw,meta:()=>Aj,parse:()=>ON,parseAsync:()=>FN,prettifyError:()=>L4,regexes:()=>ic,registry:()=>ok,safeDecode:()=>Sit,safeDecodeAsync:()=>wit,safeEncode:()=>vit,safeEncodeAsync:()=>Tit,safeParse:()=>R4,safeParseAsync:()=>D4,toDotPath:()=>Zue,toJSONSchema:()=>kj,treeifyError:()=>_4,util:()=>Ye,version:()=>A$});var v4=Object.freeze({status:"aborted"});function xe(e,t,r){function n(o,l){if(o._zod||Object.defineProperty(o,"_zod",{value:{def:l,constr:s,traits:new Set},enumerable:!1}),o._zod.traits.has(e))return;o._zod.traits.add(e),t(o,l);let c=s.prototype,u=Object.keys(c);for(let d=0;d<u.length;d++){let f=u[d];f in o||(o[f]=c[f].bind(o))}}let a=r?.Parent??Object;class i extends a{}Object.defineProperty(i,"name",{value:e});function s(o){var l;let c=r?.Parent?new i:this;n(c,o),(l=c._zod).deferred??(l.deferred=[]);for(let u of c._zod.deferred)u();return c}return Object.defineProperty(s,"init",{value:n}),Object.defineProperty(s,Symbol.hasInstance,{value:o=>r?.Parent&&o instanceof r.Parent?!0:o?._zod?.traits?.has(e)}),Object.defineProperty(s,"name",{value:e}),s}var RN=Symbol("zod_brand"),$c=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},hm=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}},Mw={};function ja(e){return e&&Object.assign(Mw,e),Mw}var Ye={};xl(Ye,{BIGINT_FORMAT_RANGES:()=>k4,Class:()=>T4,NUMBER_FORMAT_RANGES:()=>N4,aborted:()=>vm,allowsEval:()=>P4,assert:()=>Wat,assertEqual:()=>qat,assertIs:()=>Gat,assertNever:()=>Kat,assertNotEqual:()=>Hat,assignProp:()=>ym,base64ToUint8Array:()=>Xue,base64urlToUint8Array:()=>dit,cached:()=>bv,captureStackTrace:()=>MN,cleanEnum:()=>uit,cleanRegex:()=>Bw,clone:()=>Ys,cloneDef:()=>Yat,createTransparentProxy:()=>rit,defineLazy:()=>Or,esc:()=>DN,escapeRegex:()=>ac,extend:()=>iit,finalizeIssue:()=>dl,floatSafeRemainder:()=>w4,getElementAtPath:()=>Jat,getEnumValues:()=>Fw,getLengthableOrigin:()=>zw,getParsedType:()=>tit,getSizableOrigin:()=>jw,hexToUint8Array:()=>pit,isObject:()=>Bg,isPlainObject:()=>bm,issue:()=>vv,joinValues:()=>_e,jsonStringifyReplacer:()=>xv,merge:()=>oit,mergeDefs:()=>xm,normalizeParams:()=>Xe,nullish:()=>gm,numKeys:()=>eit,objectClone:()=>Xat,omit:()=>ait,optionalKeys:()=>A4,partial:()=>lit,pick:()=>nit,prefixIssues:()=>ul,primitiveTypes:()=>I4,promiseAllObject:()=>Zat,propertyKeyTypes:()=>$w,randomString:()=>Qat,required:()=>cit,safeExtend:()=>sit,shallowClone:()=>E4,slugify:()=>C4,stringifyPrimitive:()=>Ke,uint8ArrayToBase64:()=>Yue,uint8ArrayToBase64url:()=>fit,uint8ArrayToHex:()=>mit,unwrapMessage:()=>Ow});function qat(e){return e}function Hat(e){return e}function Gat(e){}function Kat(e){throw new Error}function Wat(e){}function Fw(e){let t=Object.values(e).filter(n=>typeof n=="number");return Object.entries(e).filter(([n,a])=>t.indexOf(+n)===-1).map(([n,a])=>a)}function _e(e,t="|"){return e.map(r=>Ke(r)).join(t)}function xv(e,t){return typeof t=="bigint"?t.toString():t}function bv(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}function gm(e){return e==null}function Bw(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function w4(e,t){let r=(e.toString().split(".")[1]||"").length,n=t.toString(),a=(n.split(".")[1]||"").length;if(a===0&&/\d?e-\d?/.test(n)){let l=n.match(/\d?e-(\d?)/);l?.[1]&&(a=Number.parseInt(l[1]))}let i=r>a?r:a,s=Number.parseInt(e.toFixed(i).replace(".","")),o=Number.parseInt(t.toFixed(i).replace(".",""));return s%o/10**i}var Wue=Symbol("evaluating");function Or(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==Wue)return n===void 0&&(n=Wue,n=r()),n},set(a){Object.defineProperty(e,t,{value:a})},configurable:!0})}function Xat(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function ym(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function xm(...e){let t={};for(let r of e){let n=Object.getOwnPropertyDescriptors(r);Object.assign(t,n)}return Object.defineProperties({},t)}function Yat(e){return xm(e._zod.def)}function Jat(e,t){return t?t.reduce((r,n)=>r?.[n],e):e}function Zat(e){let t=Object.keys(e),r=t.map(n=>e[n]);return Promise.all(r).then(n=>{let a={};for(let i=0;i<t.length;i++)a[t[i]]=n[i];return a})}function Qat(e=10){let t="abcdefghijklmnopqrstuvwxyz",r="";for(let n=0;n<e;n++)r+=t[Math.floor(Math.random()*t.length)];return r}function DN(e){return JSON.stringify(e)}function C4(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var MN="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Bg(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var P4=bv(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function bm(e){if(Bg(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let r=t.prototype;return!(Bg(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function E4(e){return bm(e)?{...e}:Array.isArray(e)?[...e]:e}function eit(e){let t=0;for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}var tit=e=>{let t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},$w=new Set(["string","number","symbol"]),I4=new Set(["string","number","bigint","boolean","symbol","undefined"]);function ac(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ys(e,t,r){let n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}function Xe(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function rit(e){let t;return new Proxy({},{get(r,n,a){return t??(t=e()),Reflect.get(t,n,a)},set(r,n,a,i){return t??(t=e()),Reflect.set(t,n,a,i)},has(r,n){return t??(t=e()),Reflect.has(t,n)},deleteProperty(r,n){return t??(t=e()),Reflect.deleteProperty(t,n)},ownKeys(r){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(r,n){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,n)},defineProperty(r,n,a){return t??(t=e()),Reflect.defineProperty(t,n,a)}})}function Ke(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function A4(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}var N4={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},k4={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function nit(e,t){let r=e._zod.def,n=xm(e._zod.def,{get shape(){let a={};for(let i in t){if(!(i in r.shape))throw new Error(`Unrecognized key: "${i}"`);t[i]&&(a[i]=r.shape[i])}return ym(this,"shape",a),a},checks:[]});return Ys(e,n)}function ait(e,t){let r=e._zod.def,n=xm(e._zod.def,{get shape(){let a={...e._zod.def.shape};for(let i in t){if(!(i in r.shape))throw new Error(`Unrecognized key: "${i}"`);t[i]&&delete a[i]}return ym(this,"shape",a),a},checks:[]});return Ys(e,n)}function iit(e,t){if(!bm(t))throw new Error("Invalid input to extend: expected a plain object");let r=e._zod.def.checks;if(r&&r.length>0)throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");let a=xm(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return ym(this,"shape",i),i},checks:[]});return Ys(e,a)}function sit(e,t){if(!bm(t))throw new Error("Invalid input to safeExtend: expected a plain object");let r={...e._zod.def,get shape(){let n={...e._zod.def.shape,...t};return ym(this,"shape",n),n},checks:e._zod.def.checks};return Ys(e,r)}function oit(e,t){let r=xm(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return ym(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:[]});return Ys(e,r)}function lit(e,t,r){let n=xm(t._zod.def,{get shape(){let a=t._zod.def.shape,i={...a};if(r)for(let s in r){if(!(s in a))throw new Error(`Unrecognized key: "${s}"`);r[s]&&(i[s]=e?new e({type:"optional",innerType:a[s]}):a[s])}else for(let s in a)i[s]=e?new e({type:"optional",innerType:a[s]}):a[s];return ym(this,"shape",i),i},checks:[]});return Ys(t,n)}function cit(e,t,r){let n=xm(t._zod.def,{get shape(){let a=t._zod.def.shape,i={...a};if(r)for(let s in r){if(!(s in i))throw new Error(`Unrecognized key: "${s}"`);r[s]&&(i[s]=new e({type:"nonoptional",innerType:a[s]}))}else for(let s in a)i[s]=new e({type:"nonoptional",innerType:a[s]});return ym(this,"shape",i),i},checks:[]});return Ys(t,n)}function vm(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function ul(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}function Ow(e){return typeof e=="string"?e:e?.message}function dl(e,t,r){let n={...e,path:e.path??[]};if(!e.message){let a=Ow(e.inst?._zod.def?.error?.(e))??Ow(t?.error?.(e))??Ow(r.customError?.(e))??Ow(r.localeError?.(e))??"Invalid input";n.message=a}return delete n.inst,delete n.continue,t?.reportInput||delete n.input,n}function jw(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function zw(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function vv(...e){let[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}function uit(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function Xue(e){let t=atob(e),r=new Uint8Array(t.length);for(let n=0;n<t.length;n++)r[n]=t.charCodeAt(n);return r}function Yue(e){let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}function dit(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-t.length%4)%4);return Xue(t+r)}function fit(e){return Yue(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function pit(e){let t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");let r=new Uint8Array(t.length/2);for(let n=0;n<t.length;n+=2)r[n/2]=Number.parseInt(t.slice(n,n+2),16);return r}function mit(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var T4=class{constructor(...t){}};var Jue=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,xv,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Uw=xe("$ZodError",Jue),Ao=xe("$ZodError",Jue,{Parent:Error});function Vw(e,t=r=>r.message){let r={},n=[];for(let a of e.issues)a.path.length>0?(r[a.path[0]]=r[a.path[0]]||[],r[a.path[0]].push(t(a))):n.push(t(a));return{formErrors:n,fieldErrors:r}}function qw(e,t=r=>r.message){let r={_errors:[]},n=a=>{for(let i of a.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map(s=>n({issues:s}));else if(i.code==="invalid_key")n({issues:i.issues});else if(i.code==="invalid_element")n({issues:i.issues});else if(i.path.length===0)r._errors.push(t(i));else{let s=r,o=0;for(;o<i.path.length;){let l=i.path[o];o===i.path.length-1?(s[l]=s[l]||{_errors:[]},s[l]._errors.push(t(i))):s[l]=s[l]||{_errors:[]},s=s[l],o++}}};return n(e),r}function _4(e,t=r=>r.message){let r={errors:[]},n=(a,i=[])=>{var s,o;for(let l of a.issues)if(l.code==="invalid_union"&&l.errors.length)l.errors.map(c=>n({issues:c},l.path));else if(l.code==="invalid_key")n({issues:l.issues},l.path);else if(l.code==="invalid_element")n({issues:l.issues},l.path);else{let c=[...i,...l.path];if(c.length===0){r.errors.push(t(l));continue}let u=r,d=0;for(;d<c.length;){let f=c[d],p=d===c.length-1;typeof f=="string"?(u.properties??(u.properties={}),(s=u.properties)[f]??(s[f]={errors:[]}),u=u.properties[f]):(u.items??(u.items=[]),(o=u.items)[f]??(o[f]={errors:[]}),u=u.items[f]),p&&u.errors.push(t(l)),d++}}};return n(e),r}function Zue(e){let t=[],r=e.map(n=>typeof n=="object"?n.key:n);for(let n of r)typeof n=="number"?t.push(`[${n}]`):typeof n=="symbol"?t.push(`[${JSON.stringify(String(n))}]`):/[^\w$]/.test(n)?t.push(`[${JSON.stringify(n)}]`):(t.length&&t.push("."),t.push(n));return t.join("")}function L4(e){let t=[],r=[...e.issues].sort((n,a)=>(n.path??[]).length-(a.path??[]).length);for(let n of r)t.push(`\u2716 ${n.message}`),n.path?.length&&t.push(` \u2192 at ${Zue(n.path)}`);return t.join(`
`)}var Sv=e=>(t,r,n,a)=>{let i=n?Object.assign(n,{async:!1}):{async:!1},s=t._zod.run({value:r,issues:[]},i);if(s instanceof Promise)throw new $c;if(s.issues.length){let o=new(a?.Err??e)(s.issues.map(l=>dl(l,i,ja())));throw MN(o,a?.callee),o}return s.value},ON=Sv(Ao),Tv=e=>async(t,r,n,a)=>{let i=n?Object.assign(n,{async:!0}):{async:!0},s=t._zod.run({value:r,issues:[]},i);if(s instanceof Promise&&(s=await s),s.issues.length){let o=new(a?.Err??e)(s.issues.map(l=>dl(l,i,ja())));throw MN(o,a?.callee),o}return s.value},FN=Tv(Ao),wv=e=>(t,r,n)=>{let a=n?{...n,async:!1}:{async:!1},i=t._zod.run({value:r,issues:[]},a);if(i instanceof Promise)throw new $c;return i.issues.length?{success:!1,error:new(e??Uw)(i.issues.map(s=>dl(s,a,ja())))}:{success:!0,data:i.value}},R4=wv(Ao),Cv=e=>async(t,r,n)=>{let a=n?Object.assign(n,{async:!0}):{async:!0},i=t._zod.run({value:r,issues:[]},a);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(s=>dl(s,a,ja())))}:{success:!0,data:i.value}},D4=Cv(Ao),BN=e=>(t,r,n)=>{let a=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Sv(e)(t,r,a)},git=BN(Ao),$N=e=>(t,r,n)=>Sv(e)(t,r,n),yit=$N(Ao),jN=e=>async(t,r,n)=>{let a=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Tv(e)(t,r,a)},xit=jN(Ao),zN=e=>async(t,r,n)=>Tv(e)(t,r,n),bit=zN(Ao),UN=e=>(t,r,n)=>{let a=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return wv(e)(t,r,a)},vit=UN(Ao),VN=e=>(t,r,n)=>wv(e)(t,r,n),Sit=VN(Ao),qN=e=>async(t,r,n)=>{let a=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Cv(e)(t,r,a)},Tit=qN(Ao),HN=e=>async(t,r,n)=>Cv(e)(t,r,n),wit=HN(Ao);var ic={};xl(ic,{base64:()=>Y4,base64url:()=>GN,bigint:()=>r$,boolean:()=>i$,browserEmail:()=>_it,cidrv4:()=>W4,cidrv6:()=>X4,cuid:()=>M4,cuid2:()=>O4,date:()=>Z4,datetime:()=>e$,domain:()=>Dit,duration:()=>z4,e164:()=>J4,email:()=>V4,emoji:()=>q4,extendedDuration:()=>Cit,guid:()=>U4,hex:()=>Mit,hostname:()=>Rit,html5Email:()=>Ait,idnEmail:()=>kit,integer:()=>n$,ipv4:()=>H4,ipv6:()=>G4,ksuid:()=>$4,lowercase:()=>l$,mac:()=>K4,md5_base64:()=>Fit,md5_base64url:()=>Bit,md5_hex:()=>Oit,nanoid:()=>j4,null:()=>s$,number:()=>a$,rfc5322Email:()=>Nit,sha1_base64:()=>jit,sha1_base64url:()=>zit,sha1_hex:()=>$it,sha256_base64:()=>Vit,sha256_base64url:()=>qit,sha256_hex:()=>Uit,sha384_base64:()=>Git,sha384_base64url:()=>Kit,sha384_hex:()=>Hit,sha512_base64:()=>Xit,sha512_base64url:()=>Yit,sha512_hex:()=>Wit,string:()=>t$,time:()=>Q4,ulid:()=>F4,undefined:()=>o$,unicodeEmail:()=>Que,uppercase:()=>c$,uuid:()=>$g,uuid4:()=>Pit,uuid6:()=>Eit,uuid7:()=>Iit,xid:()=>B4});var M4=/^[cC][^\s-]{8,}$/,O4=/^[0-9a-z]+$/,F4=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,B4=/^[0-9a-vA-V]{20}$/,$4=/^[A-Za-z0-9]{27}$/,j4=/^[a-zA-Z0-9_-]{21}$/,z4=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Cit=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,U4=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,$g=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Pit=$g(4),Eit=$g(6),Iit=$g(7),V4=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Ait=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Nit=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,Que=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,kit=Que,_it=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Lit="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function q4(){return new RegExp(Lit,"u")}var H4=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,G4=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,K4=e=>{let t=ac(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},W4=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,X4=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Y4=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,GN=/^[A-Za-z0-9_-]*$/,Rit=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,Dit=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,J4=/^\+(?:[0-9]){6,14}[0-9]$/,ede="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",Z4=new RegExp(`^${ede}$`);function tde(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Q4(e){return new RegExp(`^${tde(e)}$`)}function e$(e){let t=tde({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let n=`${t}(?:${r.join("|")})`;return new RegExp(`^${ede}T(?:${n})$`)}var t$=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},r$=/^-?\d+n?$/,n$=/^-?\d+$/,a$=/^-?\d+(?:\.\d+)?/,i$=/^(?:true|false)$/i,s$=/^null$/i;var o$=/^undefined$/i;var l$=/^[^A-Z]*$/,c$=/^[^a-z]*$/,Mit=/^[0-9a-fA-F]*$/;function Hw(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function Gw(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var Oit=/^[0-9a-fA-F]{32}$/,Fit=Hw(22,"=="),Bit=Gw(22),$it=/^[0-9a-fA-F]{40}$/,jit=Hw(27,"="),zit=Gw(27),Uit=/^[0-9a-fA-F]{64}$/,Vit=Hw(43,"="),qit=Gw(43),Hit=/^[0-9a-fA-F]{96}$/,Git=Hw(64,""),Kit=Gw(64),Wit=/^[0-9a-fA-F]{128}$/,Xit=Hw(86,"=="),Yit=Gw(86);var kn=xe("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),nde={number:"number",bigint:"bigint",object:"date"},KN=xe("$ZodCheckLessThan",(e,t)=>{kn.init(e,t);let r=nde[typeof t.value];e._zod.onattach.push(n=>{let a=n._zod.bag,i=(t.inclusive?a.maximum:a.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<i&&(t.inclusive?a.maximum=t.value:a.exclusiveMaximum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value<=t.value:n.value<t.value)||n.issues.push({origin:r,code:"too_big",maximum:t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),WN=xe("$ZodCheckGreaterThan",(e,t)=>{kn.init(e,t);let r=nde[typeof t.value];e._zod.onattach.push(n=>{let a=n._zod.bag,i=(t.inclusive?a.minimum:a.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?a.minimum=t.value:a.exclusiveMinimum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value>=t.value:n.value>t.value)||n.issues.push({origin:r,code:"too_small",minimum:t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),u$=xe("$ZodCheckMultipleOf",(e,t)=>{kn.init(e,t),e._zod.onattach.push(r=>{var n;(n=r._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):w4(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),d$=xe("$ZodCheckNumberFormat",(e,t)=>{kn.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),n=r?"int":"number",[a,i]=N4[t.format];e._zod.onattach.push(s=>{let o=s._zod.bag;o.format=t.format,o.minimum=a,o.maximum=i,r&&(o.pattern=n$)}),e._zod.check=s=>{let o=s.value;if(r){if(!Number.isInteger(o)){s.issues.push({expected:n,format:t.format,code:"invalid_type",continue:!1,input:o,inst:e});return}if(!Number.isSafeInteger(o)){o>0?s.issues.push({input:o,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,continue:!t.abort}):s.issues.push({input:o,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,continue:!t.abort});return}}o<a&&s.issues.push({origin:"number",input:o,code:"too_small",minimum:a,inclusive:!0,inst:e,continue:!t.abort}),o>i&&s.issues.push({origin:"number",input:o,code:"too_big",maximum:i,inst:e})}}),f$=xe("$ZodCheckBigIntFormat",(e,t)=>{kn.init(e,t);let[r,n]=k4[t.format];e._zod.onattach.push(a=>{let i=a._zod.bag;i.format=t.format,i.minimum=r,i.maximum=n}),e._zod.check=a=>{let i=a.value;i<r&&a.issues.push({origin:"bigint",input:i,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),i>n&&a.issues.push({origin:"bigint",input:i,code:"too_big",maximum:n,inst:e})}}),p$=xe("$ZodCheckMaxSize",(e,t)=>{var r;kn.init(e,t),(r=e._zod.def).when??(r.when=n=>{let a=n.value;return!gm(a)&&a.size!==void 0}),e._zod.onattach.push(n=>{let a=n._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<a&&(n._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let a=n.value;a.size<=t.maximum||n.issues.push({origin:jw(a),code:"too_big",maximum:t.maximum,inclusive:!0,input:a,inst:e,continue:!t.abort})}}),m$=xe("$ZodCheckMinSize",(e,t)=>{var r;kn.init(e,t),(r=e._zod.def).when??(r.when=n=>{let a=n.value;return!gm(a)&&a.size!==void 0}),e._zod.onattach.push(n=>{let a=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>a&&(n._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let a=n.value;a.size>=t.minimum||n.issues.push({origin:jw(a),code:"too_small",minimum:t.minimum,inclusive:!0,input:a,inst:e,continue:!t.abort})}}),h$=xe("$ZodCheckSizeEquals",(e,t)=>{var r;kn.init(e,t),(r=e._zod.def).when??(r.when=n=>{let a=n.value;return!gm(a)&&a.size!==void 0}),e._zod.onattach.push(n=>{let a=n._zod.bag;a.minimum=t.size,a.maximum=t.size,a.size=t.size}),e._zod.check=n=>{let a=n.value,i=a.size;if(i===t.size)return;let s=i>t.size;n.issues.push({origin:jw(a),...s?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),g$=xe("$ZodCheckMaxLength",(e,t)=>{var r;kn.init(e,t),(r=e._zod.def).when??(r.when=n=>{let a=n.value;return!gm(a)&&a.length!==void 0}),e._zod.onattach.push(n=>{let a=n._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<a&&(n._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let a=n.value;if(a.length<=t.maximum)return;let s=zw(a);n.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:a,inst:e,continue:!t.abort})}}),y$=xe("$ZodCheckMinLength",(e,t)=>{var r;kn.init(e,t),(r=e._zod.def).when??(r.when=n=>{let a=n.value;return!gm(a)&&a.length!==void 0}),e._zod.onattach.push(n=>{let a=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>a&&(n._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let a=n.value;if(a.length>=t.minimum)return;let s=zw(a);n.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:a,inst:e,continue:!t.abort})}}),x$=xe("$ZodCheckLengthEquals",(e,t)=>{var r;kn.init(e,t),(r=e._zod.def).when??(r.when=n=>{let a=n.value;return!gm(a)&&a.length!==void 0}),e._zod.onattach.push(n=>{let a=n._zod.bag;a.minimum=t.length,a.maximum=t.length,a.length=t.length}),e._zod.check=n=>{let a=n.value,i=a.length;if(i===t.length)return;let s=zw(a),o=i>t.length;n.issues.push({origin:s,...o?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Pv=xe("$ZodCheckStringFormat",(e,t)=>{var r,n;kn.init(e,t),e._zod.onattach.push(a=>{let i=a._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=a=>{t.pattern.lastIndex=0,!t.pattern.test(a.value)&&a.issues.push({origin:"string",code:"invalid_format",format:t.format,input:a.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),b$=xe("$ZodCheckRegex",(e,t)=>{Pv.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),v$=xe("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=l$),Pv.init(e,t)}),S$=xe("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=c$),Pv.init(e,t)}),T$=xe("$ZodCheckIncludes",(e,t)=>{kn.init(e,t);let r=ac(t.includes),n=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=n,e._zod.onattach.push(a=>{let i=a._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(n)}),e._zod.check=a=>{a.value.includes(t.includes,t.position)||a.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:a.value,inst:e,continue:!t.abort})}}),w$=xe("$ZodCheckStartsWith",(e,t)=>{kn.init(e,t);let r=new RegExp(`^${ac(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(n=>{let a=n._zod.bag;a.patterns??(a.patterns=new Set),a.patterns.add(r)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),C$=xe("$ZodCheckEndsWith",(e,t)=>{kn.init(e,t);let r=new RegExp(`.*${ac(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(n=>{let a=n._zod.bag;a.patterns??(a.patterns=new Set),a.patterns.add(r)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}});function rde(e,t,r){e.issues.length&&t.issues.push(...ul(r,e.issues))}var P$=xe("$ZodCheckProperty",(e,t)=>{kn.init(e,t),e._zod.check=r=>{let n=t.schema._zod.run({value:r.value[t.property],issues:[]},{});if(n instanceof Promise)return n.then(a=>rde(a,r,t.property));rde(n,r,t.property)}}),E$=xe("$ZodCheckMimeType",(e,t)=>{kn.init(e,t);let r=new Set(t.mime);e._zod.onattach.push(n=>{n._zod.bag.mime=t.mime}),e._zod.check=n=>{r.has(n.value.type)||n.issues.push({code:"invalid_value",values:t.mime,input:n.value.type,inst:e,continue:!t.abort})}}),I$=xe("$ZodCheckOverwrite",(e,t)=>{kn.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});var Kw=class{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}let n=t.split(`
`).filter(s=>s),a=Math.min(...n.map(s=>s.length-s.trimStart().length)),i=n.map(s=>s.slice(a)).map(s=>" ".repeat(this.indent*2)+s);for(let s of i)this.content.push(s)}compile(){let t=Function,r=this?.args,a=[...(this?.content??[""]).map(i=>` ${i}`)];return new t(...r,a.join(`
`))}};var A$={major:4,minor:1,patch:13};var lr=xe("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=A$;let n=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&n.unshift(e);for(let a of n)for(let i of a._zod.onattach)i(e);if(n.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let a=(s,o,l)=>{let c=vm(s),u;for(let d of o){if(d._zod.def.when){if(!d._zod.def.when(s))continue}else if(c)continue;let f=s.issues.length,p=d._zod.check(s);if(p instanceof Promise&&l?.async===!1)throw new $c;if(u||p instanceof Promise)u=(u??Promise.resolve()).then(async()=>{await p,s.issues.length!==f&&(c||(c=vm(s,f)))});else{if(s.issues.length===f)continue;c||(c=vm(s,f))}}return u?u.then(()=>s):s},i=(s,o,l)=>{if(vm(s))return s.aborted=!0,s;let c=a(o,n,l);if(c instanceof Promise){if(l.async===!1)throw new $c;return c.then(u=>e._zod.parse(u,l))}return e._zod.parse(c,l)};e._zod.run=(s,o)=>{if(o.skipChecks)return e._zod.parse(s,o);if(o.direction==="backward"){let c=e._zod.parse({value:s.value,issues:[]},{...o,skipChecks:!0});return c instanceof Promise?c.then(u=>i(u,s,o)):i(c,s,o)}let l=e._zod.parse(s,o);if(l instanceof Promise){if(o.async===!1)throw new $c;return l.then(c=>a(c,n,o))}return a(l,n,o)}}e["~standard"]={validate:a=>{try{let i=R4(e,a);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return D4(e,a).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:"zod",version:1}}),jg=xe("$ZodString",(e,t)=>{lr.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??t$(e._zod.bag),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),En=xe("$ZodStringFormat",(e,t)=>{Pv.init(e,t),jg.init(e,t)}),k$=xe("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=U4),En.init(e,t)}),_$=xe("$ZodUUID",(e,t)=>{if(t.version){let n={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(n===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=$g(n))}else t.pattern??(t.pattern=$g());En.init(e,t)}),L$=xe("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=V4),En.init(e,t)}),R$=xe("$ZodURL",(e,t)=>{En.init(e,t),e._zod.check=r=>{try{let n=r.value.trim(),a=new URL(n);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(a.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(a.protocol.endsWith(":")?a.protocol.slice(0,-1):a.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=a.href:r.value=n;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),D$=xe("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=q4()),En.init(e,t)}),M$=xe("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=j4),En.init(e,t)}),O$=xe("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=M4),En.init(e,t)}),F$=xe("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=O4),En.init(e,t)}),B$=xe("$ZodULID",(e,t)=>{t.pattern??(t.pattern=F4),En.init(e,t)}),$$=xe("$ZodXID",(e,t)=>{t.pattern??(t.pattern=B4),En.init(e,t)}),j$=xe("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=$4),En.init(e,t)}),z$=xe("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=e$(t)),En.init(e,t)}),U$=xe("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Z4),En.init(e,t)}),V$=xe("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Q4(t)),En.init(e,t)}),q$=xe("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=z4),En.init(e,t)}),H$=xe("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=H4),En.init(e,t),e._zod.bag.format="ipv4"}),G$=xe("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=G4),En.init(e,t),e._zod.bag.format="ipv6",e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),K$=xe("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=K4(t.delimiter)),En.init(e,t),e._zod.bag.format="mac"}),W$=xe("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=W4),En.init(e,t)}),X$=xe("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=X4),En.init(e,t),e._zod.check=r=>{let n=r.value.split("/");try{if(n.length!==2)throw new Error;let[a,i]=n;if(!i)throw new Error;let s=Number(i);if(`${s}`!==i)throw new Error;if(s<0||s>128)throw new Error;new URL(`http://[${a}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});function Y$(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var J$=xe("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Y4),En.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{Y$(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function hde(e){if(!GN.test(e))return!1;let t=e.replace(/[-_]/g,n=>n==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return Y$(r)}var Z$=xe("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=GN),En.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{hde(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),Q$=xe("$ZodE164",(e,t)=>{t.pattern??(t.pattern=J4),En.init(e,t)});function gde(e,t=null){try{let r=e.split(".");if(r.length!==3)return!1;let[n]=r;if(!n)return!1;let a=JSON.parse(atob(n));return!("typ"in a&&a?.typ!=="JWT"||!a.alg||t&&(!("alg"in a)||a.alg!==t))}catch{return!1}}var e6=xe("$ZodJWT",(e,t)=>{En.init(e,t),e._zod.check=r=>{gde(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),t6=xe("$ZodCustomStringFormat",(e,t)=>{En.init(e,t),e._zod.check=r=>{t.fn(r.value)||r.issues.push({code:"invalid_format",format:t.format,input:r.value,inst:e,continue:!t.abort})}}),ek=xe("$ZodNumber",(e,t)=>{lr.init(e,t),e._zod.pattern=e._zod.bag.pattern??a$,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}let a=r.value;if(typeof a=="number"&&!Number.isNaN(a)&&Number.isFinite(a))return r;let i=typeof a=="number"?Number.isNaN(a)?"NaN":Number.isFinite(a)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:a,inst:e,...i?{received:i}:{}}),r}}),r6=xe("$ZodNumberFormat",(e,t)=>{d$.init(e,t),ek.init(e,t)}),Ww=xe("$ZodBoolean",(e,t)=>{lr.init(e,t),e._zod.pattern=i$,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=Boolean(r.value)}catch{}let a=r.value;return typeof a=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:a,inst:e}),r}}),tk=xe("$ZodBigInt",(e,t)=>{lr.init(e,t),e._zod.pattern=r$,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r}}),n6=xe("$ZodBigIntFormat",(e,t)=>{f$.init(e,t),tk.init(e,t)}),a6=xe("$ZodSymbol",(e,t)=>{lr.init(e,t),e._zod.parse=(r,n)=>{let a=r.value;return typeof a=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:a,inst:e}),r}}),i6=xe("$ZodUndefined",(e,t)=>{lr.init(e,t),e._zod.pattern=o$,e._zod.values=new Set([void 0]),e._zod.optin="optional",e._zod.optout="optional",e._zod.parse=(r,n)=>{let a=r.value;return typeof a>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:a,inst:e}),r}}),s6=xe("$ZodNull",(e,t)=>{lr.init(e,t),e._zod.pattern=s$,e._zod.values=new Set([null]),e._zod.parse=(r,n)=>{let a=r.value;return a===null||r.issues.push({expected:"null",code:"invalid_type",input:a,inst:e}),r}}),o6=xe("$ZodAny",(e,t)=>{lr.init(e,t),e._zod.parse=r=>r}),l6=xe("$ZodUnknown",(e,t)=>{lr.init(e,t),e._zod.parse=r=>r}),c6=xe("$ZodNever",(e,t)=>{lr.init(e,t),e._zod.parse=(r,n)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)}),u6=xe("$ZodVoid",(e,t)=>{lr.init(e,t),e._zod.parse=(r,n)=>{let a=r.value;return typeof a>"u"||r.issues.push({expected:"void",code:"invalid_type",input:a,inst:e}),r}}),d6=xe("$ZodDate",(e,t)=>{lr.init(e,t),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=new Date(r.value)}catch{}let a=r.value,i=a instanceof Date;return i&&!Number.isNaN(a.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:a,...i?{received:"Invalid Date"}:{},inst:e}),r}});function ide(e,t,r){e.issues.length&&t.issues.push(...ul(r,e.issues)),t.value[r]=e.value}var f6=xe("$ZodArray",(e,t)=>{lr.init(e,t),e._zod.parse=(r,n)=>{let a=r.value;if(!Array.isArray(a))return r.issues.push({expected:"array",code:"invalid_type",input:a,inst:e}),r;r.value=Array(a.length);let i=[];for(let s=0;s<a.length;s++){let o=a[s],l=t.element._zod.run({value:o,issues:[]},n);l instanceof Promise?i.push(l.then(c=>ide(c,r,s))):ide(l,r,s)}return i.length?Promise.all(i).then(()=>r):r}});function QN(e,t,r,n){e.issues.length&&t.issues.push(...ul(r,e.issues)),e.value===void 0?r in n&&(t.value[r]=void 0):t.value[r]=e.value}function yde(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);let r=A4(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function xde(e,t,r,n,a,i){let s=[],o=a.keySet,l=a.catchall._zod,c=l.def.type;for(let u in t){if(o.has(u))continue;if(c==="never"){s.push(u);continue}let d=l.run({value:t[u],issues:[]},n);d instanceof Promise?e.push(d.then(f=>QN(f,r,u,t))):QN(d,r,u,t)}return s.length&&r.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:i}),e.length?Promise.all(e).then(()=>r):r}var bde=xe("$ZodObject",(e,t)=>{if(lr.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let o=t.shape;Object.defineProperty(t,"shape",{get:()=>{let l={...o};return Object.defineProperty(t,"shape",{value:l}),l}})}let n=bv(()=>yde(t));Or(e._zod,"propValues",()=>{let o=t.shape,l={};for(let c in o){let u=o[c]._zod;if(u.values){l[c]??(l[c]=new Set);for(let d of u.values)l[c].add(d)}}return l});let a=Bg,i=t.catchall,s;e._zod.parse=(o,l)=>{s??(s=n.value);let c=o.value;if(!a(c))return o.issues.push({expected:"object",code:"invalid_type",input:c,inst:e}),o;o.value={};let u=[],d=s.shape;for(let f of s.keys){let m=d[f]._zod.run({value:c[f],issues:[]},l);m instanceof Promise?u.push(m.then(h=>QN(h,o,f,c))):QN(m,o,f,c)}return i?xde(u,c,o,l,n.value,e):u.length?Promise.all(u).then(()=>o):o}}),p6=xe("$ZodObjectJIT",(e,t)=>{bde.init(e,t);let r=e._zod.parse,n=bv(()=>yde(t)),a=f=>{let p=new Kw(["shape","payload","ctx"]),m=n.value,h=b=>{let S=DN(b);return`shape[${S}]._zod.run({ value: input[${S}], issues: [] }, ctx)`};p.write("const input = payload.value;");let x=Object.create(null),g=0;for(let b of m.keys)x[b]=`key_${g++}`;p.write("const newResult = {};");for(let b of m.keys){let S=x[b],w=DN(b);p.write(`const ${S} = ${h(b)};`),p.write(`
if (${S}.issues.length) {
payload.issues = payload.issues.concat(${S}.issues.map(iss => ({
...iss,
path: iss.path ? [${w}, ...iss.path] : [${w}]
})));
}
if (${S}.value === undefined) {
if (${w} in input) {
newResult[${w}] = undefined;
}
} else {
newResult[${w}] = ${S}.value;
}
`)}p.write("payload.value = newResult;"),p.write("return payload;");let y=p.compile();return(b,S)=>y(f,b,S)},i,s=Bg,o=!Mw.jitless,c=o&&P4.value,u=t.catchall,d;e._zod.parse=(f,p)=>{d??(d=n.value);let m=f.value;return s(m)?o&&c&&p?.async===!1&&p.jitless!==!0?(i||(i=a(t.shape)),f=i(f,p),u?xde([],m,f,p,d,e):f):r(f,p):(f.issues.push({expected:"object",code:"invalid_type",input:m,inst:e}),f)}});function sde(e,t,r,n){for(let i of e)if(i.issues.length===0)return t.value=i.value,t;let a=e.filter(i=>!vm(i));return a.length===1?(t.value=a[0].value,a[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(i=>i.issues.map(s=>dl(s,n,ja())))}),t)}var rk=xe("$ZodUnion",(e,t)=>{lr.init(e,t),Or(e._zod,"optin",()=>t.options.some(a=>a._zod.optin==="optional")?"optional":void 0),Or(e._zod,"optout",()=>t.options.some(a=>a._zod.optout==="optional")?"optional":void 0),Or(e._zod,"values",()=>{if(t.options.every(a=>a._zod.values))return new Set(t.options.flatMap(a=>Array.from(a._zod.values)))}),Or(e._zod,"pattern",()=>{if(t.options.every(a=>a._zod.pattern)){let a=t.options.map(i=>i._zod.pattern);return new RegExp(`^(${a.map(i=>Bw(i.source)).join("|")})$`)}});let r=t.options.length===1,n=t.options[0]._zod.run;e._zod.parse=(a,i)=>{if(r)return n(a,i);let s=!1,o=[];for(let l of t.options){let c=l._zod.run({value:a.value,issues:[]},i);if(c instanceof Promise)o.push(c),s=!0;else{if(c.issues.length===0)return c;o.push(c)}}return s?Promise.all(o).then(l=>sde(l,a,e,i)):sde(o,a,e,i)}}),m6=xe("$ZodDiscriminatedUnion",(e,t)=>{rk.init(e,t);let r=e._zod.parse;Or(e._zod,"propValues",()=>{let a={};for(let i of t.options){let s=i._zod.propValues;if(!s||Object.keys(s).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(let[o,l]of Object.entries(s)){a[o]||(a[o]=new Set);for(let c of l)a[o].add(c)}}return a});let n=bv(()=>{let a=t.options,i=new Map;for(let s of a){let o=s._zod.propValues?.[t.discriminator];if(!o||o.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(s)}"`);for(let l of o){if(i.has(l))throw new Error(`Duplicate discriminator value "${String(l)}"`);i.set(l,s)}}return i});e._zod.parse=(a,i)=>{let s=a.value;if(!Bg(s))return a.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),a;let o=n.value.get(s?.[t.discriminator]);return o?o._zod.run(a,i):t.unionFallback?r(a,i):(a.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:s,path:[t.discriminator],inst:e}),a)}}),h6=xe("$ZodIntersection",(e,t)=>{lr.init(e,t),e._zod.parse=(r,n)=>{let a=r.value,i=t.left._zod.run({value:a,issues:[]},n),s=t.right._zod.run({value:a,issues:[]},n);return i instanceof Promise||s instanceof Promise?Promise.all([i,s]).then(([l,c])=>ode(r,l,c)):ode(r,i,s)}});function N$(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(bm(e)&&bm(t)){let r=Object.keys(t),n=Object.keys(e).filter(i=>r.indexOf(i)!==-1),a={...e,...t};for(let i of n){let s=N$(e[i],t[i]);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};a[i]=s.data}return{valid:!0,data:a}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let n=0;n<e.length;n++){let a=e[n],i=t[n],s=N$(a,i);if(!s.valid)return{valid:!1,mergeErrorPath:[n,...s.mergeErrorPath]};r.push(s.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function ode(e,t,r){if(t.issues.length&&e.issues.push(...t.issues),r.issues.length&&e.issues.push(...r.issues),vm(e))return e;let n=N$(t.value,r.value);if(!n.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(n.mergeErrorPath)}`);return e.value=n.data,e}var nk=xe("$ZodTuple",(e,t)=>{lr.init(e,t);let r=t.items;e._zod.parse=(n,a)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({input:i,inst:e,expected:"tuple",code:"invalid_type"}),n;n.value=[];let s=[],o=[...r].reverse().findIndex(u=>u._zod.optin!=="optional"),l=o===-1?0:r.length-o;if(!t.rest){let u=i.length>r.length,d=i.length<l-1;if(u||d)return n.issues.push({...u?{code:"too_big",maximum:r.length}:{code:"too_small",minimum:r.length},input:i,inst:e,origin:"array"}),n}let c=-1;for(let u of r){if(c++,c>=i.length&&c>=l)continue;let d=u._zod.run({value:i[c],issues:[]},a);d instanceof Promise?s.push(d.then(f=>XN(f,n,c))):XN(d,n,c)}if(t.rest){let u=i.slice(r.length);for(let d of u){c++;let f=t.rest._zod.run({value:d,issues:[]},a);f instanceof Promise?s.push(f.then(p=>XN(p,n,c))):XN(f,n,c)}}return s.length?Promise.all(s).then(()=>n):n}});function XN(e,t,r){e.issues.length&&t.issues.push(...ul(r,e.issues)),t.value[r]=e.value}var g6=xe("$ZodRecord",(e,t)=>{lr.init(e,t),e._zod.parse=(r,n)=>{let a=r.value;if(!bm(a))return r.issues.push({expected:"record",code:"invalid_type",input:a,inst:e}),r;let i=[],s=t.keyType._zod.values;if(s){r.value={};let o=new Set;for(let c of s)if(typeof c=="string"||typeof c=="number"||typeof c=="symbol"){o.add(typeof c=="number"?c.toString():c);let u=t.valueType._zod.run({value:a[c],issues:[]},n);u instanceof Promise?i.push(u.then(d=>{d.issues.length&&r.issues.push(...ul(c,d.issues)),r.value[c]=d.value})):(u.issues.length&&r.issues.push(...ul(c,u.issues)),r.value[c]=u.value)}let l;for(let c in a)o.has(c)||(l=l??[],l.push(c));l&&l.length>0&&r.issues.push({code:"unrecognized_keys",input:a,inst:e,keys:l})}else{r.value={};for(let o of Reflect.ownKeys(a)){if(o==="__proto__")continue;let l=t.keyType._zod.run({value:o,issues:[]},n);if(l instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(l.issues.length){r.issues.push({code:"invalid_key",origin:"record",issues:l.issues.map(u=>dl(u,n,ja())),input:o,path:[o],inst:e}),r.value[l.value]=l.value;continue}let c=t.valueType._zod.run({value:a[o],issues:[]},n);c instanceof Promise?i.push(c.then(u=>{u.issues.length&&r.issues.push(...ul(o,u.issues)),r.value[l.value]=u.value})):(c.issues.length&&r.issues.push(...ul(o,c.issues)),r.value[l.value]=c.value)}}return i.length?Promise.all(i).then(()=>r):r}}),y6=xe("$ZodMap",(e,t)=>{lr.init(e,t),e._zod.parse=(r,n)=>{let a=r.value;if(!(a instanceof Map))return r.issues.push({expected:"map",code:"invalid_type",input:a,inst:e}),r;let i=[];r.value=new Map;for(let[s,o]of a){let l=t.keyType._zod.run({value:s,issues:[]},n),c=t.valueType._zod.run({value:o,issues:[]},n);l instanceof Promise||c instanceof Promise?i.push(Promise.all([l,c]).then(([u,d])=>{lde(u,d,r,s,a,e,n)})):lde(l,c,r,s,a,e,n)}return i.length?Promise.all(i).then(()=>r):r}});function lde(e,t,r,n,a,i,s){e.issues.length&&($w.has(typeof n)?r.issues.push(...ul(n,e.issues)):r.issues.push({code:"invalid_key",origin:"map",input:a,inst:i,issues:e.issues.map(o=>dl(o,s,ja()))})),t.issues.length&&($w.has(typeof n)?r.issues.push(...ul(n,t.issues)):r.issues.push({origin:"map",code:"invalid_element",input:a,inst:i,key:n,issues:t.issues.map(o=>dl(o,s,ja()))})),r.value.set(e.value,t.value)}var x6=xe("$ZodSet",(e,t)=>{lr.init(e,t),e._zod.parse=(r,n)=>{let a=r.value;if(!(a instanceof Set))return r.issues.push({input:a,inst:e,expected:"set",code:"invalid_type"}),r;let i=[];r.value=new Set;for(let s of a){let o=t.valueType._zod.run({value:s,issues:[]},n);o instanceof Promise?i.push(o.then(l=>cde(l,r))):cde(o,r)}return i.length?Promise.all(i).then(()=>r):r}});function cde(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}var b6=xe("$ZodEnum",(e,t)=>{lr.init(e,t);let r=Fw(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(a=>$w.has(typeof a)).map(a=>typeof a=="string"?ac(a):a.toString()).join("|")})$`),e._zod.parse=(a,i)=>{let s=a.value;return n.has(s)||a.issues.push({code:"invalid_value",values:r,input:s,inst:e}),a}}),v6=xe("$ZodLiteral",(e,t)=>{if(lr.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");let r=new Set(t.values);e._zod.values=r,e._zod.pattern=new RegExp(`^(${t.values.map(n=>typeof n=="string"?ac(n):n?ac(n.toString()):String(n)).join("|")})$`),e._zod.parse=(n,a)=>{let i=n.value;return r.has(i)||n.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),n}}),S6=xe("$ZodFile",(e,t)=>{lr.init(e,t),e._zod.parse=(r,n)=>{let a=r.value;return a instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:a,inst:e}),r}}),T6=xe("$ZodTransform",(e,t)=>{lr.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new hm(e.constructor.name);let a=t.transform(r.value,r);if(n.async)return(a instanceof Promise?a:Promise.resolve(a)).then(s=>(r.value=s,r));if(a instanceof Promise)throw new $c;return r.value=a,r}});function ude(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}var w6=xe("$ZodOptional",(e,t)=>{lr.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Or(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Or(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${Bw(r.source)})?$`):void 0}),e._zod.parse=(r,n)=>{if(t.innerType._zod.optin==="optional"){let a=t.innerType._zod.run(r,n);return a instanceof Promise?a.then(i=>ude(i,r.value)):ude(a,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,n)}}),C6=xe("$ZodNullable",(e,t)=>{lr.init(e,t),Or(e._zod,"optin",()=>t.innerType._zod.optin),Or(e._zod,"optout",()=>t.innerType._zod.optout),Or(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${Bw(r.source)}|null)$`):void 0}),Or(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,n)=>r.value===null?r:t.innerType._zod.run(r,n)}),P6=xe("$ZodDefault",(e,t)=>{lr.init(e,t),e._zod.optin="optional",Or(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);if(r.value===void 0)return r.value=t.defaultValue,r;let a=t.innerType._zod.run(r,n);return a instanceof Promise?a.then(i=>dde(i,t)):dde(a,t)}});function dde(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var E6=xe("$ZodPrefault",(e,t)=>{lr.init(e,t),e._zod.optin="optional",Or(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>(n.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,n))}),I6=xe("$ZodNonOptional",(e,t)=>{lr.init(e,t),Or(e._zod,"values",()=>{let r=t.innerType._zod.values;return r?new Set([...r].filter(n=>n!==void 0)):void 0}),e._zod.parse=(r,n)=>{let a=t.innerType._zod.run(r,n);return a instanceof Promise?a.then(i=>fde(i,e)):fde(a,e)}});function fde(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}var A6=xe("$ZodSuccess",(e,t)=>{lr.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new hm("ZodSuccess");let a=t.innerType._zod.run(r,n);return a instanceof Promise?a.then(i=>(r.value=i.issues.length===0,r)):(r.value=a.issues.length===0,r)}}),N6=xe("$ZodCatch",(e,t)=>{lr.init(e,t),Or(e._zod,"optin",()=>t.innerType._zod.optin),Or(e._zod,"optout",()=>t.innerType._zod.optout),Or(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);let a=t.innerType._zod.run(r,n);return a instanceof Promise?a.then(i=>(r.value=i.value,i.issues.length&&(r.value=t.catchValue({...r,error:{issues:i.issues.map(s=>dl(s,n,ja()))},input:r.value}),r.issues=[]),r)):(r.value=a.value,a.issues.length&&(r.value=t.catchValue({...r,error:{issues:a.issues.map(i=>dl(i,n,ja()))},input:r.value}),r.issues=[]),r)}}),k6=xe("$ZodNaN",(e,t)=>{lr.init(e,t),e._zod.parse=(r,n)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:e,expected:"nan",code:"invalid_type"}),r)}),_6=xe("$ZodPipe",(e,t)=>{lr.init(e,t),Or(e._zod,"values",()=>t.in._zod.values),Or(e._zod,"optin",()=>t.in._zod.optin),Or(e._zod,"optout",()=>t.out._zod.optout),Or(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,n)=>{if(n.direction==="backward"){let i=t.out._zod.run(r,n);return i instanceof Promise?i.then(s=>YN(s,t.in,n)):YN(i,t.in,n)}let a=t.in._zod.run(r,n);return a instanceof Promise?a.then(i=>YN(i,t.out,n)):YN(a,t.out,n)}});function YN(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}var Xw=xe("$ZodCodec",(e,t)=>{lr.init(e,t),Or(e._zod,"values",()=>t.in._zod.values),Or(e._zod,"optin",()=>t.in._zod.optin),Or(e._zod,"optout",()=>t.out._zod.optout),Or(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,n)=>{if((n.direction||"forward")==="forward"){let i=t.in._zod.run(r,n);return i instanceof Promise?i.then(s=>JN(s,t,n)):JN(i,t,n)}else{let i=t.out._zod.run(r,n);return i instanceof Promise?i.then(s=>JN(s,t,n)):JN(i,t,n)}}});function JN(e,t,r){if(e.issues.length)return e.aborted=!0,e;if((r.direction||"forward")==="forward"){let a=t.transform(e.value,e);return a instanceof Promise?a.then(i=>ZN(e,i,t.out,r)):ZN(e,a,t.out,r)}else{let a=t.reverseTransform(e.value,e);return a instanceof Promise?a.then(i=>ZN(e,i,t.in,r)):ZN(e,a,t.in,r)}}function ZN(e,t,r,n){return e.issues.length?(e.aborted=!0,e):r._zod.run({value:t,issues:e.issues},n)}var L6=xe("$ZodReadonly",(e,t)=>{lr.init(e,t),Or(e._zod,"propValues",()=>t.innerType._zod.propValues),Or(e._zod,"values",()=>t.innerType._zod.values),Or(e._zod,"optin",()=>t.innerType?._zod?.optin),Or(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);let a=t.innerType._zod.run(r,n);return a instanceof Promise?a.then(pde):pde(a)}});function pde(e){return e.value=Object.freeze(e.value),e}var R6=xe("$ZodTemplateLiteral",(e,t)=>{lr.init(e,t);let r=[];for(let n of t.parts)if(typeof n=="object"&&n!==null){if(!n._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...n._zod.traits].shift()}`);let a=n._zod.pattern instanceof RegExp?n._zod.pattern.source:n._zod.pattern;if(!a)throw new Error(`Invalid template literal part: ${n._zod.traits}`);let i=a.startsWith("^")?1:0,s=a.endsWith("$")?a.length-1:a.length;r.push(a.slice(i,s))}else if(n===null||I4.has(typeof n))r.push(ac(`${n}`));else throw new Error(`Invalid template literal part: ${n}`);e._zod.pattern=new RegExp(`^${r.join("")}$`),e._zod.parse=(n,a)=>typeof n.value!="string"?(n.issues.push({input:n.value,inst:e,expected:"template_literal",code:"invalid_type"}),n):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(n.value)||n.issues.push({input:n.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),n)}),D6=xe("$ZodFunction",(e,t)=>(lr.init(e,t),e._def=t,e._zod.def=t,e.implement=r=>{if(typeof r!="function")throw new Error("implement() must be called with a function");return function(...n){let a=e._def.input?ON(e._def.input,n):n,i=Reflect.apply(r,this,a);return e._def.output?ON(e._def.output,i):i}},e.implementAsync=r=>{if(typeof r!="function")throw new Error("implementAsync() must be called with a function");return async function(...n){let a=e._def.input?await FN(e._def.input,n):n,i=await Reflect.apply(r,this,a);return e._def.output?await FN(e._def.output,i):i}},e._zod.parse=(r,n)=>typeof r.value!="function"?(r.issues.push({code:"invalid_type",expected:"function",input:r.value,inst:e}),r):(e._def.output&&e._def.output._zod.def.type==="promise"?r.value=e.implementAsync(r.value):r.value=e.implement(r.value),r),e.input=(...r)=>{let n=e.constructor;return Array.isArray(r[0])?new n({type:"function",input:new nk({type:"tuple",items:r[0],rest:r[1]}),output:e._def.output}):new n({type:"function",input:r[0],output:e._def.output})},e.output=r=>{let n=e.constructor;return new n({type:"function",input:e._def.input,output:r})},e)),M6=xe("$ZodPromise",(e,t)=>{lr.init(e,t),e._zod.parse=(r,n)=>Promise.resolve(r.value).then(a=>t.innerType._zod.run({value:a,issues:[]},n))}),O6=xe("$ZodLazy",(e,t)=>{lr.init(e,t),Or(e._zod,"innerType",()=>t.getter()),Or(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),Or(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),Or(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),Or(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(r,n)=>e._zod.innerType._zod.run(r,n)}),F6=xe("$ZodCustom",(e,t)=>{kn.init(e,t),lr.init(e,t),e._zod.parse=(r,n)=>r,e._zod.check=r=>{let n=r.value,a=t.fn(n);if(a instanceof Promise)return a.then(i=>mde(i,r,n,e));mde(a,r,n,e)}});function mde(e,t,r,n){if(!e){let a={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(a.params=n._zod.def.params),t.issues.push(vv(a))}}var Zw={};xl(Zw,{ar:()=>vde,az:()=>Sde,be:()=>wde,bg:()=>Cde,ca:()=>Pde,cs:()=>Ede,da:()=>Ide,de:()=>Ade,en:()=>ak,eo:()=>Nde,es:()=>kde,fa:()=>_de,fi:()=>Lde,fr:()=>Rde,frCA:()=>Dde,he:()=>Mde,hu:()=>Ode,id:()=>Fde,is:()=>Bde,it:()=>$de,ja:()=>jde,ka:()=>zde,kh:()=>Ude,km:()=>ik,ko:()=>Vde,lt:()=>Hde,mk:()=>Gde,ms:()=>Kde,nl:()=>Wde,no:()=>Xde,ota:()=>Yde,pl:()=>Zde,ps:()=>Jde,pt:()=>Qde,ru:()=>tfe,sl:()=>rfe,sv:()=>nfe,ta:()=>afe,th:()=>ife,tr:()=>sfe,ua:()=>ofe,uk:()=>sk,ur:()=>lfe,vi:()=>cfe,yo:()=>ffe,zhCN:()=>ufe,zhTW:()=>dfe});var Zit=()=>{let e={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function t(a){return e[a]??null}let r=a=>{let i=typeof a;switch(i){case"number":return Number.isNaN(a)?"NaN":"number";case"object":{if(Array.isArray(a))return"array";if(a===null)return"null";if(Object.getPrototypeOf(a)!==Object.prototype&&a.constructor)return a.constructor.name}}return i},n={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"};return a=>{switch(a.code){case"invalid_type":return`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${a.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${r(a.input)}`;case"invalid_value":return a.values.length===1?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${Ke(a.values[0])}`:`\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${_e(a.values,"|")}`;case"too_big":{let i=a.inclusive?"<=":"<",s=t(a.origin);return s?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${a.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${i} ${a.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631"}`:`\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${a.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${i} ${a.maximum.toString()}`}case"too_small":{let i=a.inclusive?">=":">",s=t(a.origin);return s?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${a.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${i} ${a.minimum.toString()} ${s.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${a.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${i} ${a.minimum.toString()}`}case"invalid_format":{let i=a;return i.format==="starts_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${a.prefix}"`:i.format==="ends_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${i.suffix}"`:i.format==="includes"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${i.includes}"`:i.format==="regex"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${i.pattern}`:`${n[i.format]??a.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`}case"not_multiple_of":return`\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${a.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${a.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${a.keys.length>1?"\u0629":""}: ${_e(a.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${a.origin}`;case"invalid_union":return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644";case"invalid_element":return`\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${a.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}};function vde(){return{localeError:Zit()}}var Qit=()=>{let e={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"}};function t(a){return e[a]??null}let r=a=>{let i=typeof a;switch(i){case"number":return Number.isNaN(a)?"NaN":"number";case"object":{if(Array.isArray(a))return"array";if(a===null)return"null";if(Object.getPrototypeOf(a)!==Object.prototype&&a.constructor)return a.constructor.name}}return i},n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return a=>{switch(a.code){case"invalid_type":return`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${a.expected}, daxil olan ${r(a.input)}`;case"invalid_value":return a.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${Ke(a.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${_e(a.values,"|")}`;case"too_big":{let i=a.inclusive?"<=":"<",s=t(a.origin);return s?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${a.origin??"d\u0259y\u0259r"} ${i}${a.maximum.toString()} ${s.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${a.origin??"d\u0259y\u0259r"} ${i}${a.maximum.toString()}`}case"too_small":{let i=a.inclusive?">=":">",s=t(a.origin);return s?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${a.origin} ${i}${a.minimum.toString()} ${s.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${a.origin} ${i}${a.minimum.toString()}`}case"invalid_format":{let i=a;return i.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${i.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:i.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${i.suffix}" il\u0259 bitm\u0259lidir`:i.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${i.includes}" daxil olmal\u0131d\u0131r`:i.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${i.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${n[i.format]??a.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${a.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${a.keys.length>1?"lar":""}: ${_e(a.keys,", ")}`;case"invalid_key":return`${a.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${a.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}};function Sde(){return{localeError:Qit()}}function Tde(e,t,r,n){let a=Math.abs(e),i=a%10,s=a%100;return s>=11&&s<=19?n:i===1?t:i>=2&&i<=4?r:n}var est=()=>{let e={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function t(a){return e[a]??null}let r=a=>{let i=typeof a;switch(i){case"number":return Number.isNaN(a)?"NaN":"\u043B\u0456\u043A";case"object":{if(Array.isArray(a))return"\u043C\u0430\u0441\u0456\u045E";if(a===null)return"null";if(Object.getPrototypeOf(a)!==Object.prototype&&a.constructor)return a.constructor.name}}return i},n={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"};return a=>{switch(a.code){case"invalid_type":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${a.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${r(a.input)}`;case"invalid_value":return a.values.length===1?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${Ke(a.values[0])}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${_e(a.values,"|")}`;case"too_big":{let i=a.inclusive?"<=":"<",s=t(a.origin);if(s){let o=Number(a.maximum),l=Tde(o,s.unit.one,s.unit.few,s.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${a.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${s.verb} ${i}${a.maximum.toString()} ${l}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${a.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${a.maximum.toString()}`}case"too_small":{let i=a.inclusive?">=":">",s=t(a.origin);if(s){let o=Number(a.minimum),l=Tde(o,s.unit.one,s.unit.few,s.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${a.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${s.verb} ${i}${a.minimum.toString()} ${l}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${a.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${a.minimum.toString()}`}case"invalid_format":{let i=a;return i.format==="starts_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${i.includes}"`:i.format==="regex"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${n[i.format]??a.format}`}case"not_multiple_of":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${a.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${a.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${_e(a.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${a.origin}`;case"invalid_union":return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434";case"invalid_element":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${a.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}};function wde(){return{localeError:est()}}var tst=e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"\u0447\u0438\u0441\u043B\u043E";case"object":{if(Array.isArray(e))return"\u043C\u0430\u0441\u0438\u0432";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},rst=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},file:{unit:"\u0431\u0430\u0439\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"}};function t(n){return e[n]??null}let r={regex:"\u0432\u0445\u043E\u0434",email:"\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0436\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",base64url:"base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",json_string:"JSON \u043D\u0438\u0437",e164:"E.164 \u043D\u043E\u043C\u0435\u0440",jwt:"JWT",template_literal:"\u0432\u0445\u043E\u0434"};return n=>{switch(n.code){case"invalid_type":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${n.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${tst(n.input)}`;case"invalid_value":return n.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${Ke(n.values[0])}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${_e(n.values,"|")}`;case"too_big":{let a=n.inclusive?"<=":"<",i=t(n.origin);return i?`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${n.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${a}${n.maximum.toString()} ${i.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${n.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${a}${n.maximum.toString()}`}case"too_small":{let a=n.inclusive?">=":">",i=t(n.origin);return i?`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${n.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${a}${n.minimum.toString()} ${i.unit}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${n.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${a}${n.minimum.toString()}`}case"invalid_format":{let a=n;if(a.format==="starts_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${a.prefix}"`;if(a.format==="ends_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${a.suffix}"`;if(a.format==="includes")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${a.includes}"`;if(a.format==="regex")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${a.pattern}`;let i="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return a.format==="emoji"&&(i="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),a.format==="datetime"&&(i="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),a.format==="date"&&(i="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),a.format==="time"&&(i="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),a.format==="duration"&&(i="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${i} ${r[a.format]??n.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${n.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${n.keys.length>1?"\u043E\u0432\u0435":""}: ${_e(n.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${n.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434";case"invalid_element":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${n.origin}`;default:return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}};function Cde(){return{localeError:rst()}}var nst=()=>{let e={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(a){return e[a]??null}let r=a=>{let i=typeof a;switch(i){case"number":return Number.isNaN(a)?"NaN":"number";case"object":{if(Array.isArray(a))return"array";if(a===null)return"null";if(Object.getPrototypeOf(a)!==Object.prototype&&a.constructor)return a.constructor.name}}return i},n={regex:"entrada",email:"adre\xE7a electr\xF2nica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adre\xE7a IPv4",ipv6:"adre\xE7a IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"};return a=>{switch(a.code){case"invalid_type":return`Tipus inv\xE0lid: s'esperava ${a.expected}, s'ha rebut ${r(a.input)}`;case"invalid_value":return a.values.length===1?`Valor inv\xE0lid: s'esperava ${Ke(a.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${_e(a.values," o ")}`;case"too_big":{let i=a.inclusive?"com a m\xE0xim":"menys de",s=t(a.origin);return s?`Massa gran: s'esperava que ${a.origin??"el valor"} contingu\xE9s ${i} ${a.maximum.toString()} ${s.unit??"elements"}`:`Massa gran: s'esperava que ${a.origin??"el valor"} fos ${i} ${a.maximum.toString()}`}case"too_small":{let i=a.inclusive?"com a m\xEDnim":"m\xE9s de",s=t(a.origin);return s?`Massa petit: s'esperava que ${a.origin} contingu\xE9s ${i} ${a.minimum.toString()} ${s.unit}`:`Massa petit: s'esperava que ${a.origin} fos ${i} ${a.minimum.toString()}`}case"invalid_format":{let i=a;return i.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${i.prefix}"`:i.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${i.suffix}"`:i.format==="includes"?`Format inv\xE0lid: ha d'incloure "${i.includes}"`:i.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${i.pattern}`:`Format inv\xE0lid per a ${n[i.format]??a.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${a.divisor}`;case"unrecognized_keys":return`Clau${a.keys.length>1?"s":""} no reconeguda${a.keys.length>1?"s":""}: ${_e(a.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${a.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${a.origin}`;default:return"Entrada inv\xE0lida"}}};function Pde(){return{localeError:nst()}}var ast=()=>{let e={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"}};function t(a){return e[a]??null}let r=a=>{let i=typeof a;switch(i){case"number":return Number.isNaN(a)?"NaN":"\u010D\xEDslo";case"string":return"\u0159et\u011Bzec";case"boolean":return"boolean";case"bigint":return"bigint";case"function":return"funkce";case"symbol":return"symbol";case"undefined":return"undefined";case"object":{if(Array.isArray(a))return"pole";if(a===null)return"null";if(Object.getPrototypeOf(a)!==Object.prototype&&a.constructor)return a.constructor.name}}return i},n={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",jwt:"JWT",template_literal:"vstup"};return a=>{switch(a.code){case"invalid_type":return`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${a.expected}, obdr\u017Eeno ${r(a.input)}`;case"invalid_value":return a.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${Ke(a.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${_e(a.values,"|")}`;case"too_big":{let i=a.inclusive?"<=":"<",s=t(a.origin);return s?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${a.origin??"hodnota"} mus\xED m\xEDt ${i}${a.maximum.toString()} ${s.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${a.origin??"hodnota"} mus\xED b\xFDt ${i}${a.maximum.toString()}`}case"too_small":{let i=a.inclusive?">=":">",s=t(a.origin);return s?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${a.origin??"hodnota"} mus\xED m\xEDt ${i}${a.minimum.toString()} ${s.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${a.origin??"hodnota"} mus\xED b\xFDt ${i}${a.minimum.toString()}`}case"invalid_format":{let i=a;return i.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${i.prefix}"`:i.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${i.suffix}"`:i.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${i.includes}"`:i.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${i.pattern}`:`Neplatn\xFD form\xE1t ${n[i.format]??a.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${a.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${_e(a.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${a.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${a.origin}`;default:return"Neplatn\xFD vstup"}}};function Ede(){return{localeError:ast()}}var ist=()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}},t={string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};function r(s){return e[s]??null}function n(s){return t[s]??s}let a=s=>{let o=typeof s;switch(o){case"number":return Number.isNaN(s)?"NaN":"tal";case"object":return Array.isArray(s)?"liste":s===null?"null":Object.getPrototypeOf(s)!==Object.prototype&&s.constructor?s.constructor.name:"objekt"}return o},i={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkesl\xE6t",date:"ISO-dato",time:"ISO-klokkesl\xE6t",duration:"ISO-varighed",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"};return s=>{switch(s.code){case"invalid_type":return`Ugyldigt input: forventede ${n(s.expected)}, fik ${n(a(s.input))}`;case"invalid_value":return s.values.length===1?`Ugyldig v\xE6rdi: forventede ${Ke(s.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${_e(s.values,"|")}`;case"too_big":{let o=s.inclusive?"<=":"<",l=r(s.origin),c=n(s.origin);return l?`For stor: forventede ${c??"value"} ${l.verb} ${o} ${s.maximum.toString()} ${l.unit??"elementer"}`:`For stor: forventede ${c??"value"} havde ${o} ${s.maximum.toString()}`}case"too_small":{let o=s.inclusive?">=":">",l=r(s.origin),c=n(s.origin);return l?`For lille: forventede ${c} ${l.verb} ${o} ${s.minimum.toString()} ${l.unit}`:`For lille: forventede ${c} havde ${o} ${s.minimum.toString()}`}case"invalid_format":{let o=s;return o.format==="starts_with"?`Ugyldig streng: skal starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: skal ende med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: skal indeholde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${o.pattern}`:`Ugyldig ${i[o.format]??s.format}`}case"not_multiple_of":return`Ugyldigt tal: skal v\xE6re deleligt med ${s.divisor}`;case"unrecognized_keys":return`${s.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${_e(s.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8gle i ${s.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig v\xE6rdi i ${s.origin}`;default:return"Ugyldigt input"}}};function Ide(){return{localeError:ist()}}var sst=()=>{let e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function t(a){return e[a]??null}let r=a=>{let i=typeof a;switch(i){case"number":return Number.isNaN(a)?"NaN":"Zahl";case"object":{if(Array.isArray(a))return"Array";if(a===null)return"null";if(Object.getPrototypeOf(a)!==Object.prototype&&a.constructor)return a.constructor.name}}return i},n={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"};return a=>{switch(a.code){case"invalid_type":return`Ung\xFCltige Eingabe: erwartet ${a.expected}, erhalten ${r(a.input)}`;case"invalid_value":return a.values.length===1?`Ung\xFCltige Eingabe: erwartet ${Ke(a.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${_e(a.values,"|")}`;case"too_big":{let i=a.inclusive?"<=":"<",s=t(a.origin);return s?`Zu gro\xDF: erwartet, dass ${a.origin??"Wert"} ${i}${a.maximum.toString()} ${s.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${a.origin??"Wert"} ${i}${a.maximum.toString()} ist`}case"too_small":{let i=a.inclusive?">=":">",s=t(a.origin);return s?`Zu klein: erwartet, dass ${a.origin} ${i}${a.minimum.toString()} ${s.unit} hat`:`Zu klein: erwartet, dass ${a.origin} ${i}${a.minimum.toString()} ist`}case"invalid_format":{let i=a;return i.format==="starts_with"?`Ung\xFCltiger String: muss mit "${i.prefix}" beginnen`:i.format==="ends_with"?`Ung\xFCltiger String: muss mit "${i.suffix}" enden`:i.format==="includes"?`Ung\xFCltiger String: muss "${i.includes}" enthalten`:i.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${i.pattern} entsprechen`:`Ung\xFCltig: ${n[i.format]??a.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${a.divisor} sein`;case"unrecognized_keys":return`${a.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${_e(a.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${a.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${a.origin}`;default:return"Ung\xFCltige Eingabe"}}};function Ade(){return{localeError:sst()}}var ost=e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":{if(Array.isArray(e))return"array";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},lst=()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"}};function t(n){return e[n]??null}let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case"invalid_type":return`Invalid input: expected ${n.expected}, received ${ost(n.input)}`;case"invalid_value":return n.values.length===1?`Invalid input: expected ${Ke(n.values[0])}`:`Invalid option: expected one of ${_e(n.values,"|")}`;case"too_big":{let a=n.inclusive?"<=":"<",i=t(n.origin);return i?`Too big: expected ${n.origin??"value"} to have ${a}${n.maximum.toString()} ${i.unit??"elements"}`:`Too big: expected ${n.origin??"value"} to be ${a}${n.maximum.toString()}`}case"too_small":{let a=n.inclusive?">=":">",i=t(n.origin);return i?`Too small: expected ${n.origin} to have ${a}${n.minimum.toString()} ${i.unit}`:`Too small: expected ${n.origin} to be ${a}${n.minimum.toString()}`}case"invalid_format":{let a=n;return a.format==="starts_with"?`Invalid string: must start with "${a.prefix}"`:a.format==="ends_with"?`Invalid string: must end with "${a.suffix}"`:a.format==="includes"?`Invalid string: must include "${a.includes}"`:a.format==="regex"?`Invalid string: must match pattern ${a.pattern}`:`Invalid ${r[a.format]??n.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${n.divisor}`;case"unrecognized_keys":return`Unrecognized key${n.keys.length>1?"s":""}: ${_e(n.keys,", ")}`;case"invalid_key":return`Invalid key in ${n.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${n.origin}`;default:return"Invalid input"}}};function ak(){return{localeError:lst()}}var cst=e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"nombro";case"object":{if(Array.isArray(e))return"tabelo";if(e===null)return"senvalora";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},ust=()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(n){return e[n]??null}let r={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-da\u016Dro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"};return n=>{switch(n.code){case"invalid_type":return`Nevalida enigo: atendi\u011Dis ${n.expected}, ricevi\u011Dis ${cst(n.input)}`;case"invalid_value":return n.values.length===1?`Nevalida enigo: atendi\u011Dis ${Ke(n.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${_e(n.values,"|")}`;case"too_big":{let a=n.inclusive?"<=":"<",i=t(n.origin);return i?`Tro granda: atendi\u011Dis ke ${n.origin??"valoro"} havu ${a}${n.maximum.toString()} ${i.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${n.origin??"valoro"} havu ${a}${n.maximum.toString()}`}case"too_small":{let a=n.inclusive?">=":">",i=t(n.origin);return i?`Tro malgranda: atendi\u011Dis ke ${n.origin} havu ${a}${n.minimum.toString()} ${i.unit}`:`Tro malgranda: atendi\u011Dis ke ${n.origin} estu ${a}${n.minimum.toString()}`}case"invalid_format":{let a=n;return a.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${a.prefix}"`:a.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${a.suffix}"`:a.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${a.includes}"`:a.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${a.pattern}`:`Nevalida ${r[a.format]??n.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${n.divisor}`;case"unrecognized_keys":return`Nekonata${n.keys.length>1?"j":""} \u015Dlosilo${n.keys.length>1?"j":""}: ${_e(n.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${n.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${n.origin}`;default:return"Nevalida enigo"}}};function Nde(){return{localeError:ust()}}var dst=()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}},t={string:"texto",number:"n\xFAmero",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"n\xFAmero grande",symbol:"s\xEDmbolo",undefined:"indefinido",null:"nulo",function:"funci\xF3n",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeraci\xF3n",union:"uni\xF3n",literal:"literal",promise:"promesa",void:"vac\xEDo",never:"nunca",unknown:"desconocido",any:"cualquiera"};function r(s){return e[s]??null}function n(s){return t[s]??s}let a=s=>{let o=typeof s;switch(o){case"number":return Number.isNaN(s)?"NaN":"number";case"object":return Array.isArray(s)?"array":s===null?"null":Object.getPrototypeOf(s)!==Object.prototype?s.constructor.name:"object"}return o},i={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duraci\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"};return s=>{switch(s.code){case"invalid_type":return`Entrada inv\xE1lida: se esperaba ${n(s.expected)}, recibido ${n(a(s.input))}`;case"invalid_value":return s.values.length===1?`Entrada inv\xE1lida: se esperaba ${Ke(s.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${_e(s.values,"|")}`;case"too_big":{let o=s.inclusive?"<=":"<",l=r(s.origin),c=n(s.origin);return l?`Demasiado grande: se esperaba que ${c??"valor"} tuviera ${o}${s.maximum.toString()} ${l.unit??"elementos"}`:`Demasiado grande: se esperaba que ${c??"valor"} fuera ${o}${s.maximum.toString()}`}case"too_small":{let o=s.inclusive?">=":">",l=r(s.origin),c=n(s.origin);return l?`Demasiado peque\xF1o: se esperaba que ${c} tuviera ${o}${s.minimum.toString()} ${l.unit}`:`Demasiado peque\xF1o: se esperaba que ${c} fuera ${o}${s.minimum.toString()}`}case"invalid_format":{let o=s;return o.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${o.prefix}"`:o.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${o.suffix}"`:o.format==="includes"?`Cadena inv\xE1lida: debe incluir "${o.includes}"`:o.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${o.pattern}`:`Inv\xE1lido ${i[o.format]??s.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${s.divisor}`;case"unrecognized_keys":return`Llave${s.keys.length>1?"s":""} desconocida${s.keys.length>1?"s":""}: ${_e(s.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${n(s.origin)}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${n(s.origin)}`;default:return"Entrada inv\xE1lida"}}};function kde(){return{localeError:dst()}}var fst=()=>{let e={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function t(a){return e[a]??null}let r=a=>{let i=typeof a;switch(i){case"number":return Number.isNaN(a)?"NaN":"\u0639\u062F\u062F";case"object":{if(Array.isArray(a))return"\u0622\u0631\u0627\u06CC\u0647";if(a===null)return"null";if(Object.getPrototypeOf(a)!==Object.prototype&&a.constructor)return a.constructor.name}}return i},n={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"};return a=>{switch(a.code){case"invalid_type":return`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${a.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${r(a.input)} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`;case"invalid_value":return a.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${Ke(a.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`:`\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${_e(a.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let i=a.inclusive?"<=":"<",s=t(a.origin);return s?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${a.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${a.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${a.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${a.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let i=a.inclusive?">=":">",s=t(a.origin);return s?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${a.origin} \u0628\u0627\u06CC\u062F ${i}${a.minimum.toString()} ${s.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${a.origin} \u0628\u0627\u06CC\u062F ${i}${a.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let i=a;return i.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:i.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:i.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${i.includes}" \u0628\u0627\u0634\u062F`:i.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${i.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${n[i.format]??a.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`}case"not_multiple_of":return`\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${a.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${a.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${_e(a.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${a.origin}`;case"invalid_union":return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631";case"invalid_element":return`\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${a.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}};function _de(){return{localeError:fst()}}var pst=()=>{let e={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function t(a){return e[a]??null}let r=a=>{let i=typeof a;switch(i){case"number":return Number.isNaN(a)?"NaN":"number";case"object":{if(Array.isArray(a))return"array";if(a===null)return"null";if(Object.getPrototypeOf(a)!==Object.prototype&&a.constructor)return a.constructor.name}}return i},n={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-p\xE4iv\xE4m\xE4\xE4r\xE4",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"};return a=>{switch(a.code){case"invalid_type":return`Virheellinen tyyppi: odotettiin ${a.expected}, oli ${r(a.input)}`;case"invalid_value":return a.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${Ke(a.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${_e(a.values,"|")}`;case"too_big":{let i=a.inclusive?"<=":"<",s=t(a.origin);return s?`Liian suuri: ${s.subject} t\xE4ytyy olla ${i}${a.maximum.toString()} ${s.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${i}${a.maximum.toString()}`}case"too_small":{let i=a.inclusive?">=":">",s=t(a.origin);return s?`Liian pieni: ${s.subject} t\xE4ytyy olla ${i}${a.minimum.toString()} ${s.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${i}${a.minimum.toString()}`}case"invalid_format":{let i=a;return i.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${i.prefix}"`:i.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${i.suffix}"`:i.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${i.includes}"`:i.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${i.pattern}`:`Virheellinen ${n[i.format]??a.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${a.divisor} monikerta`;case"unrecognized_keys":return`${a.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${_e(a.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen sy\xF6te"}}};function Lde(){return{localeError:pst()}}var mst=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(a){return e[a]??null}let r=a=>{let i=typeof a;switch(i){case"number":return Number.isNaN(a)?"NaN":"nombre";case"object":{if(Array.isArray(a))return"tableau";if(a===null)return"null";if(Object.getPrototypeOf(a)!==Object.prototype&&a.constructor)return a.constructor.name}}return i},n={regex:"entr\xE9e",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"};return a=>{switch(a.code){case"invalid_type":return`Entr\xE9e invalide : ${a.expected} attendu, ${r(a.input)} re\xE7u`;case"invalid_value":return a.values.length===1?`Entr\xE9e invalide : ${Ke(a.values[0])} attendu`:`Option invalide : une valeur parmi ${_e(a.values,"|")} attendue`;case"too_big":{let i=a.inclusive?"<=":"<",s=t(a.origin);return s?`Trop grand : ${a.origin??"valeur"} doit ${s.verb} ${i}${a.maximum.toString()} ${s.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${a.origin??"valeur"} doit \xEAtre ${i}${a.maximum.toString()}`}case"too_small":{let i=a.inclusive?">=":">",s=t(a.origin);return s?`Trop petit : ${a.origin} doit ${s.verb} ${i}${a.minimum.toString()} ${s.unit}`:`Trop petit : ${a.origin} doit \xEAtre ${i}${a.minimum.toString()}`}case"invalid_format":{let i=a;return i.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${i.pattern}`:`${n[i.format]??a.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${a.divisor}`;case"unrecognized_keys":return`Cl\xE9${a.keys.length>1?"s":""} non reconnue${a.keys.length>1?"s":""} : ${_e(a.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${a.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${a.origin}`;default:return"Entr\xE9e invalide"}}};function Rde(){return{localeError:mst()}}var hst=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(a){return e[a]??null}let r=a=>{let i=typeof a;switch(i){case"number":return Number.isNaN(a)?"NaN":"number";case"object":{if(Array.isArray(a))return"array";if(a===null)return"null";if(Object.getPrototypeOf(a)!==Object.prototype&&a.constructor)return a.constructor.name}}return i},n={regex:"entr\xE9e",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"};return a=>{switch(a.code){case"invalid_type":return`Entr\xE9e invalide : attendu ${a.expected}, re\xE7u ${r(a.input)}`;case"invalid_value":return a.values.length===1?`Entr\xE9e invalide : attendu ${Ke(a.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${_e(a.values,"|")}`;case"too_big":{let i=a.inclusive?"\u2264":"<",s=t(a.origin);return s?`Trop grand : attendu que ${a.origin??"la valeur"} ait ${i}${a.maximum.toString()} ${s.unit}`:`Trop grand : attendu que ${a.origin??"la valeur"} soit ${i}${a.maximum.toString()}`}case"too_small":{let i=a.inclusive?"\u2265":">",s=t(a.origin);return s?`Trop petit : attendu que ${a.origin} ait ${i}${a.minimum.toString()} ${s.unit}`:`Trop petit : attendu que ${a.origin} soit ${i}${a.minimum.toString()}`}case"invalid_format":{let i=a;return i.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${i.pattern}`:`${n[i.format]??a.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${a.divisor}`;case"unrecognized_keys":return`Cl\xE9${a.keys.length>1?"s":""} non reconnue${a.keys.length>1?"s":""} : ${_e(a.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${a.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${a.origin}`;default:return"Entr\xE9e invalide"}}};function Dde(){return{localeError:hst()}}var gst=()=>{let e={string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA",gender:"f"},number:{label:"\u05DE\u05E1\u05E4\u05E8",gender:"m"},boolean:{label:"\u05E2\u05E8\u05DA \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA",gender:"m"},array:{label:"\u05DE\u05E2\u05E8\u05DA",gender:"m"},object:{label:"\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8",gender:"m"},null:{label:"\u05E2\u05E8\u05DA \u05E8\u05D9\u05E7 (null)",gender:"m"},undefined:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05DE\u05D5\u05D2\u05D3\u05E8 (undefined)",gender:"m"},symbol:{label:"\u05E1\u05D9\u05DE\u05D1\u05D5\u05DC (Symbol)",gender:"m"},function:{label:"\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4",gender:"f"},map:{label:"\u05DE\u05E4\u05D4 (Map)",gender:"f"},set:{label:"\u05E7\u05D1\u05D5\u05E6\u05D4 (Set)",gender:"f"},file:{label:"\u05E7\u05D5\u05D1\u05E5",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05D9\u05D3\u05D5\u05E2",gender:"m"},value:{label:"\u05E2\u05E8\u05DA",gender:"m"}},t={string:{unit:"\u05EA\u05D5\u05D5\u05D9\u05DD",shortLabel:"\u05E7\u05E6\u05E8",longLabel:"\u05D0\u05E8\u05D5\u05DA"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},number:{unit:"",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"}},r=c=>c?e[c]:void 0,n=c=>{let u=r(c);return u?u.label:c??e.unknown.label},a=c=>`\u05D4${n(c)}`,i=c=>(r(c)?.gender??"m")==="f"?"\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA":"\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA",s=c=>c?t[c]??null:null,o=c=>{let u=typeof c;switch(u){case"number":return Number.isNaN(c)?"NaN":"number";case"object":return Array.isArray(c)?"array":c===null?"null":Object.getPrototypeOf(c)!==Object.prototype&&c.constructor?c.constructor.name:"object";default:return u}},l={regex:{label:"\u05E7\u05DC\u05D8",gender:"m"},email:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",gender:"f"},url:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",gender:"f"},emoji:{label:"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",gender:"m"},uuid:{label:"UUID",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",gender:"m"},time:{label:"\u05D6\u05DE\u05DF ISO",gender:"m"},duration:{label:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",gender:"m"},ipv4:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",gender:"f"},ipv6:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",gender:"f"},cidrv4:{label:"\u05D8\u05D5\u05D5\u05D7 IPv4",gender:"m"},cidrv6:{label:"\u05D8\u05D5\u05D5\u05D7 IPv6",gender:"m"},base64:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",gender:"f"},base64url:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",gender:"f"},json_string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",gender:"f"},e164:{label:"\u05DE\u05E1\u05E4\u05E8 E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},includes:{label:"\u05E7\u05DC\u05D8",gender:"m"},lowercase:{label:"\u05E7\u05DC\u05D8",gender:"m"},starts_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},uppercase:{label:"\u05E7\u05DC\u05D8",gender:"m"}};return c=>{switch(c.code){case"invalid_type":{let u=c.expected,d=n(u),f=o(c.input),p=e[f]?.label??f;return`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${d}, \u05D4\u05EA\u05E7\u05D1\u05DC ${p}`}case"invalid_value":{if(c.values.length===1)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05E2\u05E8\u05DA \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA ${Ke(c.values[0])}`;let u=c.values.map(p=>Ke(p));if(c.values.length===2)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${u[0]} \u05D0\u05D5 ${u[1]}`;let d=u[u.length-1];return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${u.slice(0,-1).join(", ")} \u05D0\u05D5 ${d}`}case"too_big":{let u=s(c.origin),d=a(c.origin??"value");if(c.origin==="string")return`${u?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${c.maximum.toString()} ${u?.unit??""} ${c.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(c.origin==="number"){let m=c.inclusive?`\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${c.maximum}`:`\u05E7\u05D8\u05DF \u05DE-${c.maximum}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${m}`}if(c.origin==="array"||c.origin==="set"){let m=c.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",h=c.inclusive?`${c.maximum} ${u?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${c.maximum} ${u?.unit??""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${d} ${m} \u05DC\u05D4\u05DB\u05D9\u05DC ${h}`.trim()}let f=c.inclusive?"<=":"<",p=i(c.origin??"value");return u?.unit?`${u.longLabel} \u05DE\u05D3\u05D9: ${d} ${p} ${f}${c.maximum.toString()} ${u.unit}`:`${u?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${d} ${p} ${f}${c.maximum.toString()}`}case"too_small":{let u=s(c.origin),d=a(c.origin??"value");if(c.origin==="string")return`${u?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${c.minimum.toString()} ${u?.unit??""} ${c.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(c.origin==="number"){let m=c.inclusive?`\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${c.minimum}`:`\u05D2\u05D3\u05D5\u05DC \u05DE-${c.minimum}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${m}`}if(c.origin==="array"||c.origin==="set"){let m=c.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(c.minimum===1&&c.inclusive){let x=(c.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} ${m} \u05DC\u05D4\u05DB\u05D9\u05DC ${x}`}let h=c.inclusive?`${c.minimum} ${u?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${c.minimum} ${u?.unit??""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} ${m} \u05DC\u05D4\u05DB\u05D9\u05DC ${h}`.trim()}let f=c.inclusive?">=":">",p=i(c.origin??"value");return u?.unit?`${u.shortLabel} \u05DE\u05D3\u05D9: ${d} ${p} ${f}${c.minimum.toString()} ${u.unit}`:`${u?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${d} ${p} ${f}${c.minimum.toString()}`}case"invalid_format":{let u=c;if(u.format==="starts_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${u.prefix}"`;if(u.format==="ends_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${u.suffix}"`;if(u.format==="includes")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${u.includes}"`;if(u.format==="regex")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${u.pattern}`;let d=l[u.format],f=d?.label??u.format,m=(d?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${f} \u05DC\u05D0 ${m}`}case"not_multiple_of":return`\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${c.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${c.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${c.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${_e(c.keys,", ")}`;case"invalid_key":return"\u05E9\u05D3\u05D4 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8";case"invalid_union":return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF";case"invalid_element":return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${a(c.origin??"array")}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}};function Mde(){return{localeError:gst()}}var yst=()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(a){return e[a]??null}let r=a=>{let i=typeof a;switch(i){case"number":return Number.isNaN(a)?"NaN":"sz\xE1m";case"object":{if(Array.isArray(a))return"t\xF6mb";if(a===null)return"null";if(Object.getPrototypeOf(a)!==Object.prototype&&a.constructor)return a.constructor.name}}return i},n={regex:"bemenet",email:"email c\xEDm",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO id\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",jwt:"JWT",template_literal:"bemenet"};return a=>{switch(a.code){case"invalid_type":return`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${a.expected}, a kapott \xE9rt\xE9k ${r(a.input)}`;case"invalid_value":return a.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${Ke(a.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${_e(a.values,"|")}`;case"too_big":{let i=a.inclusive?"<=":"<",s=t(a.origin);return s?`T\xFAl nagy: ${a.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${i}${a.maximum.toString()} ${s.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${a.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${i}${a.maximum.toString()}`}case"too_small":{let i=a.inclusive?">=":">",s=t(a.origin);return s?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${a.origin} m\xE9rete t\xFAl kicsi ${i}${a.minimum.toString()} ${s.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${a.origin} t\xFAl kicsi ${i}${a.minimum.toString()}`}case"invalid_format":{let i=a;return i.format==="starts_with"?`\xC9rv\xE9nytelen string: "${i.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:i.format==="ends_with"?`\xC9rv\xE9nytelen string: "${i.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:i.format==="includes"?`\xC9rv\xE9nytelen string: "${i.includes}" \xE9rt\xE9ket kell tartalmaznia`:i.format==="regex"?`\xC9rv\xE9nytelen string: ${i.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${n[i.format]??a.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${a.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${a.keys.length>1?"s":""}: ${_e(a.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${a.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${a.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}};function Ode(){return{localeError:yst()}}var xst=()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(a){return e[a]??null}let r=a=>{let i=typeof a;switch(i){case"number":return Number.isNaN(a)?"NaN":"number";case"object":{if(Array.isArray(a))return"array";if(a===null)return"null";if(Object.getPrototypeOf(a)!==Object.prototype&&a.constructor)return a.constructor.name}}return i},n={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"};return a=>{switch(a.code){case"invalid_type":return`Input tidak valid: diharapkan ${a.expected}, diterima ${r(a.input)}`;case"invalid_value":return a.values.length===1?`Input tidak valid: diharapkan ${Ke(a.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${_e(a.values,"|")}`;case"too_big":{let i=a.inclusive?"<=":"<",s=t(a.origin);return s?`Terlalu besar: diharapkan ${a.origin??"value"} memiliki ${i}${a.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: diharapkan ${a.origin??"value"} menjadi ${i}${a.maximum.toString()}`}case"too_small":{let i=a.inclusive?">=":">",s=t(a.origin);return s?`Terlalu kecil: diharapkan ${a.origin} memiliki ${i}${a.minimum.toString()} ${s.unit}`:`Terlalu kecil: diharapkan ${a.origin} menjadi ${i}${a.minimum.toString()}`}case"invalid_format":{let i=a;return i.format==="starts_with"?`String tidak valid: harus dimulai dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak valid: harus berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak valid: harus menyertakan "${i.includes}"`:i.format==="regex"?`String tidak valid: harus sesuai pola ${i.pattern}`:`${n[i.format]??a.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${a.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${a.keys.length>1?"s":""}: ${_e(a.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${a.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${a.origin}`;default:return"Input tidak valid"}}};function Fde(){return{localeError:xst()}}var bst=e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"n\xFAmer";case"object":{if(Array.isArray(e))return"fylki";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},vst=()=>{let e={string:{unit:"stafi",verb:"a\xF0 hafa"},file:{unit:"b\xE6ti",verb:"a\xF0 hafa"},array:{unit:"hluti",verb:"a\xF0 hafa"},set:{unit:"hluti",verb:"a\xF0 hafa"}};function t(n){return e[n]??null}let r={regex:"gildi",email:"netfang",url:"vefsl\xF3\xF0",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og t\xEDmi",date:"ISO dagsetning",time:"ISO t\xEDmi",duration:"ISO t\xEDmalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 t\xF6lugildi",jwt:"JWT",template_literal:"gildi"};return n=>{switch(n.code){case"invalid_type":return`Rangt gildi: \xDE\xFA sl\xF3st inn ${bst(n.input)} \xFEar sem \xE1 a\xF0 vera ${n.expected}`;case"invalid_value":return n.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${Ke(n.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${_e(n.values,"|")}`;case"too_big":{let a=n.inclusive?"<=":"<",i=t(n.origin);return i?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin??"gildi"} hafi ${a}${n.maximum.toString()} ${i.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin??"gildi"} s\xE9 ${a}${n.maximum.toString()}`}case"too_small":{let a=n.inclusive?">=":">",i=t(n.origin);return i?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin} hafi ${a}${n.minimum.toString()} ${i.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin} s\xE9 ${a}${n.minimum.toString()}`}case"invalid_format":{let a=n;return a.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${a.prefix}"`:a.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${a.suffix}"`:a.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${a.includes}"`:a.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${a.pattern}`:`Rangt ${r[a.format]??n.format}`}case"not_multiple_of":return`R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${n.divisor}`;case"unrecognized_keys":return`\xD3\xFEekkt ${n.keys.length>1?"ir lyklar":"ur lykill"}: ${_e(n.keys,", ")}`;case"invalid_key":return`Rangur lykill \xED ${n.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi \xED ${n.origin}`;default:return"Rangt gildi"}}};function Bde(){return{localeError:vst()}}var Sst=()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(a){return e[a]??null}let r=a=>{let i=typeof a;switch(i){case"number":return Number.isNaN(a)?"NaN":"numero";case"object":{if(Array.isArray(a))return"vettore";if(a===null)return"null";if(Object.getPrototypeOf(a)!==Object.prototype&&a.constructor)return a.constructor.name}}return i},n={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"};return a=>{switch(a.code){case"invalid_type":return`Input non valido: atteso ${a.expected}, ricevuto ${r(a.input)}`;case"invalid_value":return a.values.length===1?`Input non valido: atteso ${Ke(a.values[0])}`:`Opzione non valida: atteso uno tra ${_e(a.values,"|")}`;case"too_big":{let i=a.inclusive?"<=":"<",s=t(a.origin);return s?`Troppo grande: ${a.origin??"valore"} deve avere ${i}${a.maximum.toString()} ${s.unit??"elementi"}`:`Troppo grande: ${a.origin??"valore"} deve essere ${i}${a.maximum.toString()}`}case"too_small":{let i=a.inclusive?">=":">",s=t(a.origin);return s?`Troppo piccolo: ${a.origin} deve avere ${i}${a.minimum.toString()} ${s.unit}`:`Troppo piccolo: ${a.origin} deve essere ${i}${a.minimum.toString()}`}case"invalid_format":{let i=a;return i.format==="starts_with"?`Stringa non valida: deve iniziare con "${i.prefix}"`:i.format==="ends_with"?`Stringa non valida: deve terminare con "${i.suffix}"`:i.format==="includes"?`Stringa non valida: deve includere "${i.includes}"`:i.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${i.pattern}`:`Invalid ${n[i.format]??a.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${a.divisor}`;case"unrecognized_keys":return`Chiav${a.keys.length>1?"i":"e"} non riconosciut${a.keys.length>1?"e":"a"}: ${_e(a.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${a.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${a.origin}`;default:return"Input non valido"}}};function $de(){return{localeError:Sst()}}var Tst=()=>{let e={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function t(a){return e[a]??null}let r=a=>{let i=typeof a;switch(i){case"number":return Number.isNaN(a)?"NaN":"\u6570\u5024";case"object":{if(Array.isArray(a))return"\u914D\u5217";if(a===null)return"null";if(Object.getPrototypeOf(a)!==Object.prototype&&a.constructor)return a.constructor.name}}return i},n={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",jwt:"JWT",template_literal:"\u5165\u529B\u5024"};return a=>{switch(a.code){case"invalid_type":return`\u7121\u52B9\u306A\u5165\u529B: ${a.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${r(a.input)}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`;case"invalid_value":return a.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${Ke(a.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${_e(a.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let i=a.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",s=t(a.origin);return s?`\u5927\u304D\u3059\u304E\u308B\u5024: ${a.origin??"\u5024"}\u306F${a.maximum.toString()}${s.unit??"\u8981\u7D20"}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${a.origin??"\u5024"}\u306F${a.maximum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let i=a.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",s=t(a.origin);return s?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${a.origin}\u306F${a.minimum.toString()}${s.unit}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${a.origin}\u306F${a.minimum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let i=a;return i.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${i.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${n[i.format]??a.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${a.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"unrecognized_keys":return`\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${a.keys.length>1?"\u7FA4":""}: ${_e(a.keys,"\u3001")}`;case"invalid_key":return`${a.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${a.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}};function jde(){return{localeError:Tst()}}var wst=e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8";case"object":{if(Array.isArray(e))return"\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return{string:"\u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",boolean:"\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",undefined:"undefined",bigint:"bigint",symbol:"symbol",function:"\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0"}[t]??t},Cst=()=>{let e={string:{unit:"\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},file:{unit:"\u10D1\u10D0\u10D8\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},array:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},set:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"}};function t(n){return e[n]??null}let r={regex:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0",email:"\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",url:"URL",emoji:"\u10D4\u10DB\u10DD\u10EF\u10D8",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD",date:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8",time:"\u10D3\u10E0\u10DD",duration:"\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0",ipv4:"IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",ipv6:"IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",cidrv4:"IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",cidrv6:"IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",base64:"base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",json_string:"JSON \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"};return n=>{switch(n.code){case"invalid_type":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${n.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${wst(n.input)}`;case"invalid_value":return n.values.length===1?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${Ke(n.values[0])}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${_e(n.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let a=n.inclusive?"<=":"<",i=t(n.origin);return i?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${n.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${i.verb} ${a}${n.maximum.toString()} ${i.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${n.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${a}${n.maximum.toString()}`}case"too_small":{let a=n.inclusive?">=":">",i=t(n.origin);return i?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${n.origin} ${i.verb} ${a}${n.minimum.toString()} ${i.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${n.origin} \u10D8\u10E7\u10DD\u10E1 ${a}${n.minimum.toString()}`}case"invalid_format":{let a=n;return a.format==="starts_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${a.prefix}"-\u10D8\u10D7`:a.format==="ends_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${a.suffix}"-\u10D8\u10D7`:a.format==="includes"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${a.includes}"-\u10E1`:a.format==="regex"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${a.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${r[a.format]??n.format}`}case"not_multiple_of":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${n.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`;case"unrecognized_keys":return`\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${n.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${_e(n.keys,", ")}`;case"invalid_key":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${n.origin}-\u10E8\u10D8`;case"invalid_union":return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0";case"invalid_element":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${n.origin}-\u10E8\u10D8`;default:return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}};function zde(){return{localeError:Cst()}}var Pst=()=>{let e={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function t(a){return e[a]??null}let r=a=>{let i=typeof a;switch(i){case"number":return Number.isNaN(a)?"\u1798\u17B7\u1793\u1798\u17C2\u1793\u1787\u17B6\u179B\u17C1\u1781 (NaN)":"\u179B\u17C1\u1781";case"object":{if(Array.isArray(a))return"\u17A2\u17B6\u179A\u17C1 (Array)";if(a===null)return"\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)";if(Object.getPrototypeOf(a)!==Object.prototype&&a.constructor)return a.constructor.name}}return i},n={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"};return a=>{switch(a.code){case"invalid_type":return`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${a.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${r(a.input)}`;case"invalid_value":return a.values.length===1?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${Ke(a.values[0])}`:`\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${_e(a.values,"|")}`;case"too_big":{let i=a.inclusive?"<=":"<",s=t(a.origin);return s?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${a.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${i} ${a.maximum.toString()} ${s.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${a.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${i} ${a.maximum.toString()}`}case"too_small":{let i=a.inclusive?">=":">",s=t(a.origin);return s?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${a.origin} ${i} ${a.minimum.toString()} ${s.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${a.origin} ${i} ${a.minimum.toString()}`}case"invalid_format":{let i=a;return i.format==="starts_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${i.prefix}"`:i.format==="ends_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${i.suffix}"`:i.format==="includes"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${i.includes}"`:i.format==="regex"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${i.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${n[i.format]??a.format}`}case"not_multiple_of":return`\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${a.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${_e(a.keys,", ")}`;case"invalid_key":return`\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${a.origin}`;case"invalid_union":return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C";case"invalid_element":return`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${a.origin}`;default:return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C"}}};function ik(){return{localeError:Pst()}}function Ude(){return ik()}var Est=()=>{let e={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"}};function t(a){return e[a]??null}let r=a=>{let i=typeof a;switch(i){case"number":return Number.isNaN(a)?"NaN":"number";case"object":{if(Array.isArray(a))return"array";if(a===null)return"null";if(Object.getPrototypeOf(a)!==Object.prototype&&a.constructor)return a.constructor.name}}return i},n={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",jwt:"JWT",template_literal:"\uC785\uB825"};return a=>{switch(a.code){case"invalid_type":return`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${a.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${r(a.input)}\uC785\uB2C8\uB2E4`;case"invalid_value":return a.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${Ke(a.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${_e(a.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let i=a.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",s=i==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",o=t(a.origin),l=o?.unit??"\uC694\uC18C";return o?`${a.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${a.maximum.toString()}${l} ${i}${s}`:`${a.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${a.maximum.toString()} ${i}${s}`}case"too_small":{let i=a.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",s=i==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",o=t(a.origin),l=o?.unit??"\uC694\uC18C";return o?`${a.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${a.minimum.toString()}${l} ${i}${s}`:`${a.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${a.minimum.toString()} ${i}${s}`}case"invalid_format":{let i=a;return i.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:i.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${i.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${n[i.format]??a.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${a.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${_e(a.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${a.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${a.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}};function Vde(){return{localeError:Est()}}var Ist=e=>Jw(typeof e,e),Jw=(e,t=void 0)=>{switch(e){case"number":return Number.isNaN(t)?"NaN":"skai\u010Dius";case"bigint":return"sveikasis skai\u010Dius";case"string":return"eilut\u0117";case"boolean":return"login\u0117 reik\u0161m\u0117";case"undefined":case"void":return"neapibr\u0117\u017Eta reik\u0161m\u0117";case"function":return"funkcija";case"symbol":return"simbolis";case"object":return t===void 0?"ne\u017Einomas objektas":t===null?"nulin\u0117 reik\u0161m\u0117":Array.isArray(t)?"masyvas":Object.getPrototypeOf(t)!==Object.prototype&&t.constructor?t.constructor.name:"objektas";case"null":return"nulin\u0117 reik\u0161m\u0117"}return e},Yw=e=>e.charAt(0).toUpperCase()+e.slice(1);function qde(e){let t=Math.abs(e),r=t%10,n=t%100;return n>=11&&n<=19||r===0?"many":r===1?"one":"few"}var Ast=()=>{let e={string:{unit:{one:"simbolis",few:"simboliai",many:"simboli\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne ilgesn\u0117 kaip",notInclusive:"turi b\u016Bti trumpesn\u0117 kaip"},bigger:{inclusive:"turi b\u016Bti ne trumpesn\u0117 kaip",notInclusive:"turi b\u016Bti ilgesn\u0117 kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"bait\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne didesnis kaip",notInclusive:"turi b\u016Bti ma\u017Eesnis kaip"},bigger:{inclusive:"turi b\u016Bti ne ma\u017Eesnis kaip",notInclusive:"turi b\u016Bti didesnis kaip"}}},array:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}},set:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}}};function t(n,a,i,s){let o=e[n]??null;return o===null?o:{unit:o.unit[a],verb:o.verb[s][i?"inclusive":"notInclusive"]}}let r={regex:"\u012Fvestis",email:"el. pa\u0161to adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukm\u0117",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 u\u017Ekoduota eilut\u0117",base64url:"base64url u\u017Ekoduota eilut\u0117",json_string:"JSON eilut\u0117",e164:"E.164 numeris",jwt:"JWT",template_literal:"\u012Fvestis"};return n=>{switch(n.code){case"invalid_type":return`Gautas tipas ${Ist(n.input)}, o tik\u0117tasi - ${Jw(n.expected)}`;case"invalid_value":return n.values.length===1?`Privalo b\u016Bti ${Ke(n.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${_e(n.values,"|")} pasirinkim\u0173`;case"too_big":{let a=Jw(n.origin),i=t(n.origin,qde(Number(n.maximum)),n.inclusive??!1,"smaller");if(i?.verb)return`${Yw(a??n.origin??"reik\u0161m\u0117")} ${i.verb} ${n.maximum.toString()} ${i.unit??"element\u0173"}`;let s=n.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${Yw(a??n.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${n.maximum.toString()} ${i?.unit}`}case"too_small":{let a=Jw(n.origin),i=t(n.origin,qde(Number(n.minimum)),n.inclusive??!1,"bigger");if(i?.verb)return`${Yw(a??n.origin??"reik\u0161m\u0117")} ${i.verb} ${n.minimum.toString()} ${i.unit??"element\u0173"}`;let s=n.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${Yw(a??n.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${n.minimum.toString()} ${i?.unit}`}case"invalid_format":{let a=n;return a.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${a.prefix}"`:a.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${a.suffix}"`:a.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${a.includes}"`:a.format==="regex"?`Eilut\u0117 privalo atitikti ${a.pattern}`:`Neteisingas ${r[a.format]??n.format}`}case"not_multiple_of":return`Skai\u010Dius privalo b\u016Bti ${n.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpa\u017Eint${n.keys.length>1?"i":"as"} rakt${n.keys.length>1?"ai":"as"}: ${_e(n.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let a=Jw(n.origin);return`${Yw(a??n.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}};function Hde(){return{localeError:Ast()}}var Nst=()=>{let e={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function t(a){return e[a]??null}let r=a=>{let i=typeof a;switch(i){case"number":return Number.isNaN(a)?"NaN":"\u0431\u0440\u043E\u0458";case"object":{if(Array.isArray(a))return"\u043D\u0438\u0437\u0430";if(a===null)return"null";if(Object.getPrototypeOf(a)!==Object.prototype&&a.constructor)return a.constructor.name}}return i},n={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"};return a=>{switch(a.code){case"invalid_type":return`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${a.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${r(a.input)}`;case"invalid_value":return a.values.length===1?`Invalid input: expected ${Ke(a.values[0])}`:`\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${_e(a.values,"|")}`;case"too_big":{let i=a.inclusive?"<=":"<",s=t(a.origin);return s?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${a.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${i}${a.maximum.toString()} ${s.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${a.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${i}${a.maximum.toString()}`}case"too_small":{let i=a.inclusive?">=":">",s=t(a.origin);return s?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${a.origin} \u0434\u0430 \u0438\u043C\u0430 ${i}${a.minimum.toString()} ${s.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${a.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${i}${a.minimum.toString()}`}case"invalid_format":{let i=a;return i.format==="starts_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${i.pattern}`:`Invalid ${n[i.format]??a.format}`}case"not_multiple_of":return`\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${a.divisor}`;case"unrecognized_keys":return`${a.keys.length>1?"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438":"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${_e(a.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${a.origin}`;case"invalid_union":return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441";case"invalid_element":return`\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${a.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}};function Gde(){return{localeError:Nst()}}var kst=()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(a){return e[a]??null}let r=a=>{let i=typeof a;switch(i){case"number":return Number.isNaN(a)?"NaN":"nombor";case"object":{if(Array.isArray(a))return"array";if(a===null)return"null";if(Object.getPrototypeOf(a)!==Object.prototype&&a.constructor)return a.constructor.name}}return i},n={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"};return a=>{switch(a.code){case"invalid_type":return`Input tidak sah: dijangka ${a.expected}, diterima ${r(a.input)}`;case"invalid_value":return a.values.length===1?`Input tidak sah: dijangka ${Ke(a.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${_e(a.values,"|")}`;case"too_big":{let i=a.inclusive?"<=":"<",s=t(a.origin);return s?`Terlalu besar: dijangka ${a.origin??"nilai"} ${s.verb} ${i}${a.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: dijangka ${a.origin??"nilai"} adalah ${i}${a.maximum.toString()}`}case"too_small":{let i=a.inclusive?">=":">",s=t(a.origin);return s?`Terlalu kecil: dijangka ${a.origin} ${s.verb} ${i}${a.minimum.toString()} ${s.unit}`:`Terlalu kecil: dijangka ${a.origin} adalah ${i}${a.minimum.toString()}`}case"invalid_format":{let i=a;return i.format==="starts_with"?`String tidak sah: mesti bermula dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak sah: mesti mengandungi "${i.includes}"`:i.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${i.pattern}`:`${n[i.format]??a.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${a.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${_e(a.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${a.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${a.origin}`;default:return"Input tidak sah"}}};function Kde(){return{localeError:kst()}}var _st=()=>{let e={string:{unit:"tekens",verb:"te hebben"},file:{unit:"bytes",verb:"te hebben"},array:{unit:"elementen",verb:"te hebben"},set:{unit:"elementen",verb:"te hebben"}};function t(a){return e[a]??null}let r=a=>{let i=typeof a;switch(i){case"number":return Number.isNaN(a)?"NaN":"getal";case"object":{if(Array.isArray(a))return"array";if(a===null)return"null";if(Object.getPrototypeOf(a)!==Object.prototype&&a.constructor)return a.constructor.name}}return i},n={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"};return a=>{switch(a.code){case"invalid_type":return`Ongeldige invoer: verwacht ${a.expected}, ontving ${r(a.input)}`;case"invalid_value":return a.values.length===1?`Ongeldige invoer: verwacht ${Ke(a.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${_e(a.values,"|")}`;case"too_big":{let i=a.inclusive?"<=":"<",s=t(a.origin);return s?`Te groot: verwacht dat ${a.origin??"waarde"} ${s.verb} ${i}${a.maximum.toString()} ${s.unit??"elementen"}`:`Te groot: verwacht dat ${a.origin??"waarde"} ${i}${a.maximum.toString()} is`}case"too_small":{let i=a.inclusive?">=":">",s=t(a.origin);return s?`Te klein: verwacht dat ${a.origin} ${s.verb} ${i}${a.minimum.toString()} ${s.unit}`:`Te klein: verwacht dat ${a.origin} ${i}${a.minimum.toString()} is`}case"invalid_format":{let i=a;return i.format==="starts_with"?`Ongeldige tekst: moet met "${i.prefix}" beginnen`:i.format==="ends_with"?`Ongeldige tekst: moet op "${i.suffix}" eindigen`:i.format==="includes"?`Ongeldige tekst: moet "${i.includes}" bevatten`:i.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${i.pattern}`:`Ongeldig: ${n[i.format]??a.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${a.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${a.keys.length>1?"s":""}: ${_e(a.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${a.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${a.origin}`;default:return"Ongeldige invoer"}}};function Wde(){return{localeError:_st()}}var Lst=()=>{let e={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"}};function t(a){return e[a]??null}let r=a=>{let i=typeof a;switch(i){case"number":return Number.isNaN(a)?"NaN":"tall";case"object":{if(Array.isArray(a))return"liste";if(a===null)return"null";if(Object.getPrototypeOf(a)!==Object.prototype&&a.constructor)return a.constructor.name}}return i},n={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"};return a=>{switch(a.code){case"invalid_type":return`Ugyldig input: forventet ${a.expected}, fikk ${r(a.input)}`;case"invalid_value":return a.values.length===1?`Ugyldig verdi: forventet ${Ke(a.values[0])}`:`Ugyldig valg: forventet en av ${_e(a.values,"|")}`;case"too_big":{let i=a.inclusive?"<=":"<",s=t(a.origin);return s?`For stor(t): forventet ${a.origin??"value"} til \xE5 ha ${i}${a.maximum.toString()} ${s.unit??"elementer"}`:`For stor(t): forventet ${a.origin??"value"} til \xE5 ha ${i}${a.maximum.toString()}`}case"too_small":{let i=a.inclusive?">=":">",s=t(a.origin);return s?`For lite(n): forventet ${a.origin} til \xE5 ha ${i}${a.minimum.toString()} ${s.unit}`:`For lite(n): forventet ${a.origin} til \xE5 ha ${i}${a.minimum.toString()}`}case"invalid_format":{let i=a;return i.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${i.prefix}"`:i.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${i.suffix}"`:i.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${i.includes}"`:i.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${i.pattern}`:`Ugyldig ${n[i.format]??a.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${a.divisor}`;case"unrecognized_keys":return`${a.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${_e(a.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${a.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${a.origin}`;default:return"Ugyldig input"}}};function Xde(){return{localeError:Lst()}}var Rst=()=>{let e={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function t(a){return e[a]??null}let r=a=>{let i=typeof a;switch(i){case"number":return Number.isNaN(a)?"NaN":"numara";case"object":{if(Array.isArray(a))return"saf";if(a===null)return"gayb";if(Object.getPrototypeOf(a)!==Object.prototype&&a.constructor)return a.constructor.name}}return i},n={regex:"giren",email:"epostag\xE2h",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO heng\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"giren"};return a=>{switch(a.code){case"invalid_type":return`F\xE2sit giren: umulan ${a.expected}, al\u0131nan ${r(a.input)}`;case"invalid_value":return a.values.length===1?`F\xE2sit giren: umulan ${Ke(a.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${_e(a.values,"|")}`;case"too_big":{let i=a.inclusive?"<=":"<",s=t(a.origin);return s?`Fazla b\xFCy\xFCk: ${a.origin??"value"}, ${i}${a.maximum.toString()} ${s.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${a.origin??"value"}, ${i}${a.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let i=a.inclusive?">=":">",s=t(a.origin);return s?`Fazla k\xFC\xE7\xFCk: ${a.origin}, ${i}${a.minimum.toString()} ${s.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${a.origin}, ${i}${a.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let i=a;return i.format==="starts_with"?`F\xE2sit metin: "${i.prefix}" ile ba\u015Flamal\u0131.`:i.format==="ends_with"?`F\xE2sit metin: "${i.suffix}" ile bitmeli.`:i.format==="includes"?`F\xE2sit metin: "${i.includes}" ihtiv\xE2 etmeli.`:i.format==="regex"?`F\xE2sit metin: ${i.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${n[i.format]??a.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${a.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${a.keys.length>1?"s":""}: ${_e(a.keys,", ")}`;case"invalid_key":return`${a.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${a.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}};function Yde(){return{localeError:Rst()}}var Dst=()=>{let e={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function t(a){return e[a]??null}let r=a=>{let i=typeof a;switch(i){case"number":return Number.isNaN(a)?"NaN":"\u0639\u062F\u062F";case"object":{if(Array.isArray(a))return"\u0627\u0631\u06D0";if(a===null)return"null";if(Object.getPrototypeOf(a)!==Object.prototype&&a.constructor)return a.constructor.name}}return i},n={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"};return a=>{switch(a.code){case"invalid_type":return`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${a.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${r(a.input)} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`;case"invalid_value":return a.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${Ke(a.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${_e(a.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let i=a.inclusive?"<=":"<",s=t(a.origin);return s?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${a.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${a.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${a.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${a.maximum.toString()} \u0648\u064A`}case"too_small":{let i=a.inclusive?">=":">",s=t(a.origin);return s?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${a.origin} \u0628\u0627\u06CC\u062F ${i}${a.minimum.toString()} ${s.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${a.origin} \u0628\u0627\u06CC\u062F ${i}${a.minimum.toString()} \u0648\u064A`}case"invalid_format":{let i=a;return i.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:i.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:i.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${i.includes}" \u0648\u0644\u0631\u064A`:i.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${i.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${n[i.format]??a.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${a.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${a.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${_e(a.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${a.origin} \u06A9\u06D0`;case"invalid_union":return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A";case"invalid_element":return`\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${a.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}};function Jde(){return{localeError:Dst()}}var Mst=()=>{let e={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"}};function t(a){return e[a]??null}let r=a=>{let i=typeof a;switch(i){case"number":return Number.isNaN(a)?"NaN":"liczba";case"object":{if(Array.isArray(a))return"tablica";if(a===null)return"null";if(Object.getPrototypeOf(a)!==Object.prototype&&a.constructor)return a.constructor.name}}return i},n={regex:"wyra\u017Cenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ci\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wej\u015Bcie"};return a=>{switch(a.code){case"invalid_type":return`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${a.expected}, otrzymano ${r(a.input)}`;case"invalid_value":return a.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${Ke(a.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${_e(a.values,"|")}`;case"too_big":{let i=a.inclusive?"<=":"<",s=t(a.origin);return s?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${a.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${a.maximum.toString()} ${s.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${a.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${a.maximum.toString()}`}case"too_small":{let i=a.inclusive?">=":">",s=t(a.origin);return s?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${a.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${a.minimum.toString()} ${s.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${a.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${a.minimum.toString()}`}case"invalid_format":{let i=a;return i.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${i.prefix}"`:i.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${i.suffix}"`:i.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${i.includes}"`:i.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${i.pattern}`:`Nieprawid\u0142ow(y/a/e) ${n[i.format]??a.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${a.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${a.keys.length>1?"s":""}: ${_e(a.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${a.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${a.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}};function Zde(){return{localeError:Mst()}}var Ost=()=>{let e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(a){return e[a]??null}let r=a=>{let i=typeof a;switch(i){case"number":return Number.isNaN(a)?"NaN":"n\xFAmero";case"object":{if(Array.isArray(a))return"array";if(a===null)return"nulo";if(Object.getPrototypeOf(a)!==Object.prototype&&a.constructor)return a.constructor.name}}return i},n={regex:"padr\xE3o",email:"endere\xE7o de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"dura\xE7\xE3o ISO",ipv4:"endere\xE7o IPv4",ipv6:"endere\xE7o IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"};return a=>{switch(a.code){case"invalid_type":return`Tipo inv\xE1lido: esperado ${a.expected}, recebido ${r(a.input)}`;case"invalid_value":return a.values.length===1?`Entrada inv\xE1lida: esperado ${Ke(a.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${_e(a.values,"|")}`;case"too_big":{let i=a.inclusive?"<=":"<",s=t(a.origin);return s?`Muito grande: esperado que ${a.origin??"valor"} tivesse ${i}${a.maximum.toString()} ${s.unit??"elementos"}`:`Muito grande: esperado que ${a.origin??"valor"} fosse ${i}${a.maximum.toString()}`}case"too_small":{let i=a.inclusive?">=":">",s=t(a.origin);return s?`Muito pequeno: esperado que ${a.origin} tivesse ${i}${a.minimum.toString()} ${s.unit}`:`Muito pequeno: esperado que ${a.origin} fosse ${i}${a.minimum.toString()}`}case"invalid_format":{let i=a;return i.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${i.prefix}"`:i.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${i.suffix}"`:i.format==="includes"?`Texto inv\xE1lido: deve incluir "${i.includes}"`:i.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${i.pattern}`:`${n[i.format]??a.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${a.divisor}`;case"unrecognized_keys":return`Chave${a.keys.length>1?"s":""} desconhecida${a.keys.length>1?"s":""}: ${_e(a.keys,", ")}`;case"invalid_key":return`Chave inv\xE1lida em ${a.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido em ${a.origin}`;default:return"Campo inv\xE1lido"}}};function Qde(){return{localeError:Ost()}}function efe(e,t,r,n){let a=Math.abs(e),i=a%10,s=a%100;return s>=11&&s<=19?n:i===1?t:i>=2&&i<=4?r:n}var Fst=()=>{let e={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function t(a){return e[a]??null}let r=a=>{let i=typeof a;switch(i){case"number":return Number.isNaN(a)?"NaN":"\u0447\u0438\u0441\u043B\u043E";case"object":{if(Array.isArray(a))return"\u043C\u0430\u0441\u0441\u0438\u0432";if(a===null)return"null";if(Object.getPrototypeOf(a)!==Object.prototype&&a.constructor)return a.constructor.name}}return i},n={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"};return a=>{switch(a.code){case"invalid_type":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${a.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${r(a.input)}`;case"invalid_value":return a.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${Ke(a.values[0])}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${_e(a.values,"|")}`;case"too_big":{let i=a.inclusive?"<=":"<",s=t(a.origin);if(s){let o=Number(a.maximum),l=efe(o,s.unit.one,s.unit.few,s.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${a.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${a.maximum.toString()} ${l}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${a.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${i}${a.maximum.toString()}`}case"too_small":{let i=a.inclusive?">=":">",s=t(a.origin);if(s){let o=Number(a.minimum),l=efe(o,s.unit.one,s.unit.few,s.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${a.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${a.minimum.toString()} ${l}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${a.origin} \u0431\u0443\u0434\u0435\u0442 ${i}${a.minimum.toString()}`}case"invalid_format":{let i=a;return i.format==="starts_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${n[i.format]??a.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${a.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${a.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${a.keys.length>1?"\u0438":""}: ${_e(a.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${a.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435";case"invalid_element":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${a.origin}`;default:return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}}};function tfe(){return{localeError:Fst()}}var Bst=()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(a){return e[a]??null}let r=a=>{let i=typeof a;switch(i){case"number":return Number.isNaN(a)?"NaN":"\u0161tevilo";case"object":{if(Array.isArray(a))return"tabela";if(a===null)return"null";if(Object.getPrototypeOf(a)!==Object.prototype&&a.constructor)return a.constructor.name}}return i},n={regex:"vnos",email:"e-po\u0161tni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in \u010Das",date:"ISO datum",time:"ISO \u010Das",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",jwt:"JWT",template_literal:"vnos"};return a=>{switch(a.code){case"invalid_type":return`Neveljaven vnos: pri\u010Dakovano ${a.expected}, prejeto ${r(a.input)}`;case"invalid_value":return a.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${Ke(a.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${_e(a.values,"|")}`;case"too_big":{let i=a.inclusive?"<=":"<",s=t(a.origin);return s?`Preveliko: pri\u010Dakovano, da bo ${a.origin??"vrednost"} imelo ${i}${a.maximum.toString()} ${s.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${a.origin??"vrednost"} ${i}${a.maximum.toString()}`}case"too_small":{let i=a.inclusive?">=":">",s=t(a.origin);return s?`Premajhno: pri\u010Dakovano, da bo ${a.origin} imelo ${i}${a.minimum.toString()} ${s.unit}`:`Premajhno: pri\u010Dakovano, da bo ${a.origin} ${i}${a.minimum.toString()}`}case"invalid_format":{let i=a;return i.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${i.prefix}"`:i.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${i.suffix}"`:i.format==="includes"?`Neveljaven niz: mora vsebovati "${i.includes}"`:i.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${i.pattern}`:`Neveljaven ${n[i.format]??a.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${a.divisor}`;case"unrecognized_keys":return`Neprepoznan${a.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${_e(a.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${a.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${a.origin}`;default:return"Neveljaven vnos"}}};function rfe(){return{localeError:Bst()}}var $st=()=>{let e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"}};function t(a){return e[a]??null}let r=a=>{let i=typeof a;switch(i){case"number":return Number.isNaN(a)?"NaN":"antal";case"object":{if(Array.isArray(a))return"lista";if(a===null)return"null";if(Object.getPrototypeOf(a)!==Object.prototype&&a.constructor)return a.constructor.name}}return i},n={regex:"regulj\xE4rt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad str\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"};return a=>{switch(a.code){case"invalid_type":return`Ogiltig inmatning: f\xF6rv\xE4ntat ${a.expected}, fick ${r(a.input)}`;case"invalid_value":return a.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${Ke(a.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${_e(a.values,"|")}`;case"too_big":{let i=a.inclusive?"<=":"<",s=t(a.origin);return s?`F\xF6r stor(t): f\xF6rv\xE4ntade ${a.origin??"v\xE4rdet"} att ha ${i}${a.maximum.toString()} ${s.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${a.origin??"v\xE4rdet"} att ha ${i}${a.maximum.toString()}`}case"too_small":{let i=a.inclusive?">=":">",s=t(a.origin);return s?`F\xF6r lite(t): f\xF6rv\xE4ntade ${a.origin??"v\xE4rdet"} att ha ${i}${a.minimum.toString()} ${s.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${a.origin??"v\xE4rdet"} att ha ${i}${a.minimum.toString()}`}case"invalid_format":{let i=a;return i.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${i.prefix}"`:i.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${i.suffix}"`:i.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${i.includes}"`:i.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${i.pattern}"`:`Ogiltig(t) ${n[i.format]??a.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${a.divisor}`;case"unrecognized_keys":return`${a.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${_e(a.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${a.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${a.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}};function nfe(){return{localeError:$st()}}var jst=()=>{let e={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function t(a){return e[a]??null}let r=a=>{let i=typeof a;switch(i){case"number":return Number.isNaN(a)?"\u0B8E\u0BA3\u0BCD \u0B85\u0BB2\u0BCD\u0BB2\u0BBE\u0BA4\u0BA4\u0BC1":"\u0B8E\u0BA3\u0BCD";case"object":{if(Array.isArray(a))return"\u0B85\u0BA3\u0BBF";if(a===null)return"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8";if(Object.getPrototypeOf(a)!==Object.prototype&&a.constructor)return a.constructor.name}}return i},n={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",jwt:"JWT",template_literal:"input"};return a=>{switch(a.code){case"invalid_type":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${a.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r(a.input)}`;case"invalid_value":return a.values.length===1?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${Ke(a.values[0])}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${_e(a.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let i=a.inclusive?"<=":"<",s=t(a.origin);return s?`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${a.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${i}${a.maximum.toString()} ${s.unit??"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${a.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${i}${a.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let i=a.inclusive?">=":">",s=t(a.origin);return s?`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${a.origin} ${i}${a.minimum.toString()} ${s.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${a.origin} ${i}${a.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let i=a;return i.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${i.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${n[i.format]??a.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${a.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;case"unrecognized_keys":return`\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${a.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${_e(a.keys,", ")}`;case"invalid_key":return`${a.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`;case"invalid_union":return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1";case"invalid_element":return`${a.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`;default:return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"}}};function afe(){return{localeError:jst()}}var zst=()=>{let e={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function t(a){return e[a]??null}let r=a=>{let i=typeof a;switch(i){case"number":return Number.isNaN(a)?"\u0E44\u0E21\u0E48\u0E43\u0E0A\u0E48\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02 (NaN)":"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02";case"object":{if(Array.isArray(a))return"\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)";if(a===null)return"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)";if(Object.getPrototypeOf(a)!==Object.prototype&&a.constructor)return a.constructor.name}}return i},n={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"};return a=>{switch(a.code){case"invalid_type":return`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${a.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${r(a.input)}`;case"invalid_value":return a.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${Ke(a.values[0])}`:`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${_e(a.values,"|")}`;case"too_big":{let i=a.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",s=t(a.origin);return s?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${a.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${a.maximum.toString()} ${s.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${a.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${a.maximum.toString()}`}case"too_small":{let i=a.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",s=t(a.origin);return s?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${a.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${a.minimum.toString()} ${s.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${a.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${a.minimum.toString()}`}case"invalid_format":{let i=a;return i.format==="starts_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${i.prefix}"`:i.format==="ends_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${i.suffix}"`:i.format==="includes"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${i.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:i.format==="regex"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${i.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${n[i.format]??a.format}`}case"not_multiple_of":return`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${a.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`;case"unrecognized_keys":return`\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${_e(a.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${a.origin}`;case"invalid_union":return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49";case"invalid_element":return`\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${a.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}};function ife(){return{localeError:zst()}}var Ust=e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":{if(Array.isArray(e))return"array";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},Vst=()=>{let e={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function t(n){return e[n]??null}let r={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"\u015Eablon dizesi"};return n=>{switch(n.code){case"invalid_type":return`Ge\xE7ersiz de\u011Fer: beklenen ${n.expected}, al\u0131nan ${Ust(n.input)}`;case"invalid_value":return n.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${Ke(n.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${_e(n.values,"|")}`;case"too_big":{let a=n.inclusive?"<=":"<",i=t(n.origin);return i?`\xC7ok b\xFCy\xFCk: beklenen ${n.origin??"de\u011Fer"} ${a}${n.maximum.toString()} ${i.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${n.origin??"de\u011Fer"} ${a}${n.maximum.toString()}`}case"too_small":{let a=n.inclusive?">=":">",i=t(n.origin);return i?`\xC7ok k\xFC\xE7\xFCk: beklenen ${n.origin} ${a}${n.minimum.toString()} ${i.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${n.origin} ${a}${n.minimum.toString()}`}case"invalid_format":{let a=n;return a.format==="starts_with"?`Ge\xE7ersiz metin: "${a.prefix}" ile ba\u015Flamal\u0131`:a.format==="ends_with"?`Ge\xE7ersiz metin: "${a.suffix}" ile bitmeli`:a.format==="includes"?`Ge\xE7ersiz metin: "${a.includes}" i\xE7ermeli`:a.format==="regex"?`Ge\xE7ersiz metin: ${a.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${r[a.format]??n.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${n.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${n.keys.length>1?"lar":""}: ${_e(n.keys,", ")}`;case"invalid_key":return`${n.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${n.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}};function sfe(){return{localeError:Vst()}}var qst=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function t(a){return e[a]??null}let r=a=>{let i=typeof a;switch(i){case"number":return Number.isNaN(a)?"NaN":"\u0447\u0438\u0441\u043B\u043E";case"object":{if(Array.isArray(a))return"\u043C\u0430\u0441\u0438\u0432";if(a===null)return"null";if(Object.getPrototypeOf(a)!==Object.prototype&&a.constructor)return a.constructor.name}}return i},n={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"};return a=>{switch(a.code){case"invalid_type":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${a.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${r(a.input)}`;case"invalid_value":return a.values.length===1?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${Ke(a.values[0])}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${_e(a.values,"|")}`;case"too_big":{let i=a.inclusive?"<=":"<",s=t(a.origin);return s?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${a.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${s.verb} ${i}${a.maximum.toString()} ${s.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${a.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${i}${a.maximum.toString()}`}case"too_small":{let i=a.inclusive?">=":">",s=t(a.origin);return s?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${a.origin} ${s.verb} ${i}${a.minimum.toString()} ${s.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${a.origin} \u0431\u0443\u0434\u0435 ${i}${a.minimum.toString()}`}case"invalid_format":{let i=a;return i.format==="starts_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${n[i.format]??a.format}`}case"not_multiple_of":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${a.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${a.keys.length>1?"\u0456":""}: ${_e(a.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${a.origin}`;case"invalid_union":return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456";case"invalid_element":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${a.origin}`;default:return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"}}};function sk(){return{localeError:qst()}}function ofe(){return sk()}var Hst=()=>{let e={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function t(a){return e[a]??null}let r=a=>{let i=typeof a;switch(i){case"number":return Number.isNaN(a)?"NaN":"\u0646\u0645\u0628\u0631";case"object":{if(Array.isArray(a))return"\u0622\u0631\u06D2";if(a===null)return"\u0646\u0644";if(Object.getPrototypeOf(a)!==Object.prototype&&a.constructor)return a.constructor.name}}return i},n={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"};return a=>{switch(a.code){case"invalid_type":return`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${a.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${r(a.input)} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`;case"invalid_value":return a.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${Ke(a.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${_e(a.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let i=a.inclusive?"<=":"<",s=t(a.origin);return s?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${a.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${i}${a.maximum.toString()} ${s.unit??"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${a.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${i}${a.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let i=a.inclusive?">=":">",s=t(a.origin);return s?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${a.origin} \u06A9\u06D2 ${i}${a.minimum.toString()} ${s.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${a.origin} \u06A9\u0627 ${i}${a.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let i=a;return i.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${i.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${n[i.format]??a.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${a.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;case"unrecognized_keys":return`\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${a.keys.length>1?"\u0632":""}: ${_e(a.keys,"\u060C ")}`;case"invalid_key":return`${a.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${a.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}};function lfe(){return{localeError:Hst()}}var Gst=()=>{let e={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function t(a){return e[a]??null}let r=a=>{let i=typeof a;switch(i){case"number":return Number.isNaN(a)?"NaN":"s\u1ED1";case"object":{if(Array.isArray(a))return"m\u1EA3ng";if(a===null)return"null";if(Object.getPrototypeOf(a)!==Object.prototype&&a.constructor)return a.constructor.name}}return i},n={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ng\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"};return a=>{switch(a.code){case"invalid_type":return`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${a.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${r(a.input)}`;case"invalid_value":return a.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${Ke(a.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${_e(a.values,"|")}`;case"too_big":{let i=a.inclusive?"<=":"<",s=t(a.origin);return s?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${a.origin??"gi\xE1 tr\u1ECB"} ${s.verb} ${i}${a.maximum.toString()} ${s.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${a.origin??"gi\xE1 tr\u1ECB"} ${i}${a.maximum.toString()}`}case"too_small":{let i=a.inclusive?">=":">",s=t(a.origin);return s?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${a.origin} ${s.verb} ${i}${a.minimum.toString()} ${s.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${a.origin} ${i}${a.minimum.toString()}`}case"invalid_format":{let i=a;return i.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${i.prefix}"`:i.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${i.suffix}"`:i.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${i.includes}"`:i.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${i.pattern}`:`${n[i.format]??a.format} kh\xF4ng h\u1EE3p l\u1EC7`}case"not_multiple_of":return`S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${a.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${_e(a.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${a.origin}`;case"invalid_union":return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7";case"invalid_element":return`Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${a.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}};function cfe(){return{localeError:Gst()}}var Kst=()=>{let e={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"}};function t(a){return e[a]??null}let r=a=>{let i=typeof a;switch(i){case"number":return Number.isNaN(a)?"\u975E\u6570\u5B57(NaN)":"\u6570\u5B57";case"object":{if(Array.isArray(a))return"\u6570\u7EC4";if(a===null)return"\u7A7A\u503C(null)";if(Object.getPrototypeOf(a)!==Object.prototype&&a.constructor)return a.constructor.name}}return i},n={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",jwt:"JWT",template_literal:"\u8F93\u5165"};return a=>{switch(a.code){case"invalid_type":return`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${a.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${r(a.input)}`;case"invalid_value":return a.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${Ke(a.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${_e(a.values,"|")}`;case"too_big":{let i=a.inclusive?"<=":"<",s=t(a.origin);return s?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${a.origin??"\u503C"} ${i}${a.maximum.toString()} ${s.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${a.origin??"\u503C"} ${i}${a.maximum.toString()}`}case"too_small":{let i=a.inclusive?">=":">",s=t(a.origin);return s?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${a.origin} ${i}${a.minimum.toString()} ${s.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${a.origin} ${i}${a.minimum.toString()}`}case"invalid_format":{let i=a;return i.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.prefix}" \u5F00\u5934`:i.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.suffix}" \u7ED3\u5C3E`:i.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${i.pattern}`:`\u65E0\u6548${n[i.format]??a.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${a.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${_e(a.keys,", ")}`;case"invalid_key":return`${a.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${a.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}};function ufe(){return{localeError:Kst()}}var Wst=()=>{let e={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function t(a){return e[a]??null}let r=a=>{let i=typeof a;switch(i){case"number":return Number.isNaN(a)?"NaN":"number";case"object":{if(Array.isArray(a))return"array";if(a===null)return"null";if(Object.getPrototypeOf(a)!==Object.prototype&&a.constructor)return a.constructor.name}}return i},n={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",jwt:"JWT",template_literal:"\u8F38\u5165"};return a=>{switch(a.code){case"invalid_type":return`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${a.expected}\uFF0C\u4F46\u6536\u5230 ${r(a.input)}`;case"invalid_value":return a.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${Ke(a.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${_e(a.values,"|")}`;case"too_big":{let i=a.inclusive?"<=":"<",s=t(a.origin);return s?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${a.origin??"\u503C"} \u61C9\u70BA ${i}${a.maximum.toString()} ${s.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${a.origin??"\u503C"} \u61C9\u70BA ${i}${a.maximum.toString()}`}case"too_small":{let i=a.inclusive?">=":">",s=t(a.origin);return s?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${a.origin} \u61C9\u70BA ${i}${a.minimum.toString()} ${s.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${a.origin} \u61C9\u70BA ${i}${a.minimum.toString()}`}case"invalid_format":{let i=a;return i.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.prefix}" \u958B\u982D`:i.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.suffix}" \u7D50\u5C3E`:i.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${i.pattern}`:`\u7121\u6548\u7684 ${n[i.format]??a.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${a.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${a.keys.length>1?"\u5011":""}\uFF1A${_e(a.keys,"\u3001")}`;case"invalid_key":return`${a.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${a.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}};function dfe(){return{localeError:Wst()}}var Xst=()=>{let e={string:{unit:"\xE0mi",verb:"n\xED"},file:{unit:"bytes",verb:"n\xED"},array:{unit:"nkan",verb:"n\xED"},set:{unit:"nkan",verb:"n\xED"}};function t(a){return e[a]??null}let r=a=>{let i=typeof a;switch(i){case"number":return Number.isNaN(a)?"NaN":"n\u1ECD\u0301mb\xE0";case"object":{if(Array.isArray(a))return"akop\u1ECD";if(a===null)return"null";if(Object.getPrototypeOf(a)!==Object.prototype&&a.constructor)return a.constructor.name}}return i},n={regex:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9",email:"\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\xE0k\xF3k\xF2 ISO",date:"\u1ECDj\u1ECD\u0301 ISO",time:"\xE0k\xF3k\xF2 ISO",duration:"\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO",ipv4:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv4",ipv6:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv6",cidrv4:"\xE0gb\xE8gb\xE8 IPv4",cidrv6:"\xE0gb\xE8gb\xE8 IPv6",base64:"\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64",base64url:"\u1ECD\u0300r\u1ECD\u0300 base64url",json_string:"\u1ECD\u0300r\u1ECD\u0300 JSON",e164:"n\u1ECD\u0301mb\xE0 E.164",jwt:"JWT",template_literal:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"};return a=>{switch(a.code){case"invalid_type":return`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${a.expected}, \xE0m\u1ECD\u0300 a r\xED ${r(a.input)}`;case"invalid_value":return a.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${Ke(a.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${_e(a.values,"|")}`;case"too_big":{let i=a.inclusive?"<=":"<",s=t(a.origin);return s?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${a.origin??"iye"} ${s.verb} ${i}${a.maximum} ${s.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${a.maximum}`}case"too_small":{let i=a.inclusive?">=":">",s=t(a.origin);return s?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${a.origin} ${s.verb} ${i}${a.minimum} ${s.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${a.minimum}`}case"invalid_format":{let i=a;return i.format==="starts_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${i.prefix}"`:i.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${i.suffix}"`:i.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${i.includes}"`:i.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${i.pattern}`:`A\u1E63\xEC\u1E63e: ${n[i.format]??a.format}`}case"not_multiple_of":return`N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${a.divisor}`;case"unrecognized_keys":return`B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${_e(a.keys,", ")}`;case"invalid_key":return`B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${a.origin}`;case"invalid_union":return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e";case"invalid_element":return`Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ${a.origin}`;default:return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}};function ffe(){return{localeError:Xst()}}var pfe,B6=Symbol("ZodOutput"),$6=Symbol("ZodInput"),Ev=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){let n=r[0];if(this._map.set(t,n),n&&typeof n=="object"&&"id"in n){if(this._idmap.has(n.id))throw new Error(`ID ${n.id} already exists in the registry`);this._idmap.set(n.id,t)}return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){let r=t._zod.parent;if(r){let n={...this.get(r)??{}};delete n.id;let a={...n,...this._map.get(t)};return Object.keys(a).length?a:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};function ok(){return new Ev}(pfe=globalThis).__zod_globalRegistry??(pfe.__zod_globalRegistry=ok());var Js=globalThis.__zod_globalRegistry;function j6(e,t){return new e({type:"string",...Xe(t)})}function z6(e,t){return new e({type:"string",coerce:!0,...Xe(t)})}function lk(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Xe(t)})}function Qw(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Xe(t)})}function ck(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Xe(t)})}function uk(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Xe(t)})}function dk(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Xe(t)})}function fk(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Xe(t)})}function eC(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Xe(t)})}function pk(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Xe(t)})}function mk(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Xe(t)})}function hk(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Xe(t)})}function gk(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Xe(t)})}function yk(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Xe(t)})}function xk(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Xe(t)})}function bk(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Xe(t)})}function vk(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Xe(t)})}function Sk(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Xe(t)})}function U6(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...Xe(t)})}function Tk(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Xe(t)})}function wk(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Xe(t)})}function Ck(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Xe(t)})}function Pk(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Xe(t)})}function Ek(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Xe(t)})}function Ik(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Xe(t)})}var V6={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function q6(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Xe(t)})}function H6(e,t){return new e({type:"string",format:"date",check:"string_format",...Xe(t)})}function G6(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...Xe(t)})}function K6(e,t){return new e({type:"string",format:"duration",check:"string_format",...Xe(t)})}function W6(e,t){return new e({type:"number",checks:[],...Xe(t)})}function X6(e,t){return new e({type:"number",coerce:!0,checks:[],...Xe(t)})}function Y6(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...Xe(t)})}function J6(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...Xe(t)})}function Z6(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...Xe(t)})}function Q6(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...Xe(t)})}function ej(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...Xe(t)})}function tj(e,t){return new e({type:"boolean",...Xe(t)})}function rj(e,t){return new e({type:"boolean",coerce:!0,...Xe(t)})}function nj(e,t){return new e({type:"bigint",...Xe(t)})}function aj(e,t){return new e({type:"bigint",coerce:!0,...Xe(t)})}function ij(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...Xe(t)})}function sj(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...Xe(t)})}function oj(e,t){return new e({type:"symbol",...Xe(t)})}function lj(e,t){return new e({type:"undefined",...Xe(t)})}function cj(e,t){return new e({type:"null",...Xe(t)})}function uj(e){return new e({type:"any"})}function dj(e){return new e({type:"unknown"})}function fj(e,t){return new e({type:"never",...Xe(t)})}function pj(e,t){return new e({type:"void",...Xe(t)})}function mj(e,t){return new e({type:"date",...Xe(t)})}function hj(e,t){return new e({type:"date",coerce:!0,...Xe(t)})}function gj(e,t){return new e({type:"nan",...Xe(t)})}function ff(e,t){return new KN({check:"less_than",...Xe(t),value:e,inclusive:!1})}function sc(e,t){return new KN({check:"less_than",...Xe(t),value:e,inclusive:!0})}function pf(e,t){return new WN({check:"greater_than",...Xe(t),value:e,inclusive:!1})}function No(e,t){return new WN({check:"greater_than",...Xe(t),value:e,inclusive:!0})}function yj(e){return pf(0,e)}function xj(e){return ff(0,e)}function bj(e){return sc(0,e)}function vj(e){return No(0,e)}function zg(e,t){return new u$({check:"multiple_of",...Xe(t),value:e})}function Iv(e,t){return new p$({check:"max_size",...Xe(t),maximum:e})}function Ug(e,t){return new m$({check:"min_size",...Xe(t),minimum:e})}function tC(e,t){return new h$({check:"size_equals",...Xe(t),size:e})}function Av(e,t){return new g$({check:"max_length",...Xe(t),maximum:e})}function Sm(e,t){return new y$({check:"min_length",...Xe(t),minimum:e})}function Nv(e,t){return new x$({check:"length_equals",...Xe(t),length:e})}function rC(e,t){return new b$({check:"string_format",format:"regex",...Xe(t),pattern:e})}function nC(e){return new v$({check:"string_format",format:"lowercase",...Xe(e)})}function aC(e){return new S$({check:"string_format",format:"uppercase",...Xe(e)})}function iC(e,t){return new T$({check:"string_format",format:"includes",...Xe(t),includes:e})}function sC(e,t){return new w$({check:"string_format",format:"starts_with",...Xe(t),prefix:e})}function oC(e,t){return new C$({check:"string_format",format:"ends_with",...Xe(t),suffix:e})}function Sj(e,t,r){return new P$({check:"property",property:e,schema:t,...Xe(r)})}function lC(e,t){return new E$({check:"mime_type",mime:e,...Xe(t)})}function Uu(e){return new I$({check:"overwrite",tx:e})}function cC(e){return Uu(t=>t.normalize(e))}function uC(){return Uu(e=>e.trim())}function dC(){return Uu(e=>e.toLowerCase())}function fC(){return Uu(e=>e.toUpperCase())}function pC(){return Uu(e=>C4(e))}function Tj(e,t,r){return new e({type:"array",element:t,...Xe(r)})}function Jst(e,t,r){return new e({type:"union",options:t,...Xe(r)})}function Zst(e,t,r,n){return new e({type:"union",options:r,discriminator:t,...Xe(n)})}function Qst(e,t,r){return new e({type:"intersection",left:t,right:r})}function eot(e,t,r,n){let a=r instanceof lr,i=a?n:r,s=a?r:null;return new e({type:"tuple",items:t,rest:s,...Xe(i)})}function tot(e,t,r,n){return new e({type:"record",keyType:t,valueType:r,...Xe(n)})}function rot(e,t,r,n){return new e({type:"map",keyType:t,valueType:r,...Xe(n)})}function not(e,t,r){return new e({type:"set",valueType:t,...Xe(r)})}function aot(e,t,r){let n=Array.isArray(t)?Object.fromEntries(t.map(a=>[a,a])):t;return new e({type:"enum",entries:n,...Xe(r)})}function iot(e,t,r){return new e({type:"enum",entries:t,...Xe(r)})}function sot(e,t,r){return new e({type:"literal",values:Array.isArray(t)?t:[t],...Xe(r)})}function wj(e,t){return new e({type:"file",...Xe(t)})}function oot(e,t){return new e({type:"transform",transform:t})}function lot(e,t){return new e({type:"optional",innerType:t})}function cot(e,t){return new e({type:"nullable",innerType:t})}function uot(e,t,r){return new e({type:"default",innerType:t,get defaultValue(){return typeof r=="function"?r():E4(r)}})}function dot(e,t,r){return new e({type:"nonoptional",innerType:t,...Xe(r)})}function fot(e,t){return new e({type:"success",innerType:t})}function pot(e,t,r){return new e({type:"catch",innerType:t,catchValue:typeof r=="function"?r:()=>r})}function mot(e,t,r){return new e({type:"pipe",in:t,out:r})}function hot(e,t){return new e({type:"readonly",innerType:t})}function got(e,t,r){return new e({type:"template_literal",parts:t,...Xe(r)})}function yot(e,t){return new e({type:"lazy",getter:t})}function xot(e,t){return new e({type:"promise",innerType:t})}function Cj(e,t,r){let n=Xe(r);return n.abort??(n.abort=!0),new e({type:"custom",check:"custom",fn:t,...n})}function Pj(e,t,r){return new e({type:"custom",check:"custom",fn:t,...Xe(r)})}function Ej(e){let t=mfe(r=>(r.addIssue=n=>{if(typeof n=="string")r.issues.push(vv(n,r.value,t._zod.def));else{let a=n;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=r.value),a.inst??(a.inst=t),a.continue??(a.continue=!t._zod.def.abort),r.issues.push(vv(a))}},e(r.value,r)));return t}function mfe(e,t){let r=new kn({check:"custom",...Xe(t)});return r._zod.check=e,r}function Ij(e){let t=new kn({check:"describe"});return t._zod.onattach=[r=>{let n=Js.get(r)??{};Js.add(r,{...n,description:e})}],t._zod.check=()=>{},t}function Aj(e){let t=new kn({check:"meta"});return t._zod.onattach=[r=>{let n=Js.get(r)??{};Js.add(r,{...n,...e})}],t._zod.check=()=>{},t}function Nj(e,t){let r=Xe(t),n=r.truthy??["true","1","yes","on","y","enabled"],a=r.falsy??["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(n=n.map(p=>typeof p=="string"?p.toLowerCase():p),a=a.map(p=>typeof p=="string"?p.toLowerCase():p));let i=new Set(n),s=new Set(a),o=e.Codec??Xw,l=e.Boolean??Ww,c=e.String??jg,u=new c({type:"string",error:r.error}),d=new l({type:"boolean",error:r.error}),f=new o({type:"pipe",in:u,out:d,transform:(p,m)=>{let h=p;return r.case!=="sensitive"&&(h=h.toLowerCase()),i.has(h)?!0:s.has(h)?!1:(m.issues.push({code:"invalid_value",expected:"stringbool",values:[...i,...s],input:m.value,inst:f,continue:!1}),{})},reverseTransform:(p,m)=>p===!0?n[0]||"true":a[0]||"false",error:r.error});return f}function kv(e,t,r,n={}){let a=Xe(n),i={...Xe(n),check:"string_format",type:"string",format:t,fn:typeof r=="function"?r:o=>r.test(o),...a};return r instanceof RegExp&&(i.pattern=r),new e(i)}var mC=class{constructor(t){this.counter=0,this.metadataRegistry=t?.metadata??Js,this.target=t?.target??"draft-2020-12",this.unrepresentable=t?.unrepresentable??"throw",this.override=t?.override??(()=>{}),this.io=t?.io??"output",this.seen=new Map}process(t,r={path:[],schemaPath:[]}){var n;let a=t._zod.def,i={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},s=this.seen.get(t);if(s)return s.count++,r.schemaPath.includes(t)&&(s.cycle=r.path),s.schema;let o={schema:{},count:1,cycle:void 0,path:r.path};this.seen.set(t,o);let l=t._zod.toJSONSchema?.();if(l)o.schema=l;else{let d={...r,schemaPath:[...r.schemaPath,t],path:r.path},f=t._zod.parent;if(f)o.ref=f,this.process(f,d),this.seen.get(f).isParent=!0;else{let p=o.schema;switch(a.type){case"string":{let m=p;m.type="string";let{minimum:h,maximum:x,format:g,patterns:y,contentEncoding:b}=t._zod.bag;if(typeof h=="number"&&(m.minLength=h),typeof x=="number"&&(m.maxLength=x),g&&(m.format=i[g]??g,m.format===""&&delete m.format),b&&(m.contentEncoding=b),y&&y.size>0){let S=[...y];S.length===1?m.pattern=S[0].source:S.length>1&&(o.schema.allOf=[...S.map(w=>({...this.target==="draft-7"||this.target==="draft-4"||this.target==="openapi-3.0"?{type:"string"}:{},pattern:w.source}))])}break}case"number":{let m=p,{minimum:h,maximum:x,format:g,multipleOf:y,exclusiveMaximum:b,exclusiveMinimum:S}=t._zod.bag;typeof g=="string"&&g.includes("int")?m.type="integer":m.type="number",typeof S=="number"&&(this.target==="draft-4"||this.target==="openapi-3.0"?(m.minimum=S,m.exclusiveMinimum=!0):m.exclusiveMinimum=S),typeof h=="number"&&(m.minimum=h,typeof S=="number"&&this.target!=="draft-4"&&(S>=h?delete m.minimum:delete m.exclusiveMinimum)),typeof b=="number"&&(this.target==="draft-4"||this.target==="openapi-3.0"?(m.maximum=b,m.exclusiveMaximum=!0):m.exclusiveMaximum=b),typeof x=="number"&&(m.maximum=x,typeof b=="number"&&this.target!=="draft-4"&&(b<=x?delete m.maximum:delete m.exclusiveMaximum)),typeof y=="number"&&(m.multipleOf=y);break}case"boolean":{let m=p;m.type="boolean";break}case"bigint":{if(this.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema");break}case"symbol":{if(this.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema");break}case"null":{this.target==="openapi-3.0"?(p.type="string",p.nullable=!0,p.enum=[null]):p.type="null";break}case"any":break;case"unknown":break;case"undefined":{if(this.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema");break}case"void":{if(this.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema");break}case"never":{p.not={};break}case"date":{if(this.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema");break}case"array":{let m=p,{minimum:h,maximum:x}=t._zod.bag;typeof h=="number"&&(m.minItems=h),typeof x=="number"&&(m.maxItems=x),m.type="array",m.items=this.process(a.element,{...d,path:[...d.path,"items"]});break}case"object":{let m=p;m.type="object",m.properties={};let h=a.shape;for(let y in h)m.properties[y]=this.process(h[y],{...d,path:[...d.path,"properties",y]});let x=new Set(Object.keys(h)),g=new Set([...x].filter(y=>{let b=a.shape[y]._zod;return this.io==="input"?b.optin===void 0:b.optout===void 0}));g.size>0&&(m.required=Array.from(g)),a.catchall?._zod.def.type==="never"?m.additionalProperties=!1:a.catchall?a.catchall&&(m.additionalProperties=this.process(a.catchall,{...d,path:[...d.path,"additionalProperties"]})):this.io==="output"&&(m.additionalProperties=!1);break}case"union":{let m=p,h=a.discriminator!==void 0,x=a.options.map((g,y)=>this.process(g,{...d,path:[...d.path,h?"oneOf":"anyOf",y]}));h?m.oneOf=x:m.anyOf=x;break}case"intersection":{let m=p,h=this.process(a.left,{...d,path:[...d.path,"allOf",0]}),x=this.process(a.right,{...d,path:[...d.path,"allOf",1]}),g=b=>"allOf"in b&&Object.keys(b).length===1,y=[...g(h)?h.allOf:[h],...g(x)?x.allOf:[x]];m.allOf=y;break}case"tuple":{let m=p;m.type="array";let h=this.target==="draft-2020-12"?"prefixItems":"items",x=this.target==="draft-2020-12"||this.target==="openapi-3.0"?"items":"additionalItems",g=a.items.map((w,E)=>this.process(w,{...d,path:[...d.path,h,E]})),y=a.rest?this.process(a.rest,{...d,path:[...d.path,x,...this.target==="openapi-3.0"?[a.items.length]:[]]}):null;this.target==="draft-2020-12"?(m.prefixItems=g,y&&(m.items=y)):this.target==="openapi-3.0"?(m.items={anyOf:g},y&&m.items.anyOf.push(y),m.minItems=g.length,y||(m.maxItems=g.length)):(m.items=g,y&&(m.additionalItems=y));let{minimum:b,maximum:S}=t._zod.bag;typeof b=="number"&&(m.minItems=b),typeof S=="number"&&(m.maxItems=S);break}case"record":{let m=p;m.type="object",(this.target==="draft-7"||this.target==="draft-2020-12")&&(m.propertyNames=this.process(a.keyType,{...d,path:[...d.path,"propertyNames"]})),m.additionalProperties=this.process(a.valueType,{...d,path:[...d.path,"additionalProperties"]});break}case"map":{if(this.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema");break}case"set":{if(this.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema");break}case"enum":{let m=p,h=Fw(a.entries);h.every(x=>typeof x=="number")&&(m.type="number"),h.every(x=>typeof x=="string")&&(m.type="string"),m.enum=h;break}case"literal":{let m=p,h=[];for(let x of a.values)if(x===void 0){if(this.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof x=="bigint"){if(this.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");h.push(Number(x))}else h.push(x);if(h.length!==0)if(h.length===1){let x=h[0];m.type=x===null?"null":typeof x,this.target==="draft-4"||this.target==="openapi-3.0"?m.enum=[x]:m.const=x}else h.every(x=>typeof x=="number")&&(m.type="number"),h.every(x=>typeof x=="string")&&(m.type="string"),h.every(x=>typeof x=="boolean")&&(m.type="string"),h.every(x=>x===null)&&(m.type="null"),m.enum=h;break}case"file":{let m=p,h={type:"string",format:"binary",contentEncoding:"binary"},{minimum:x,maximum:g,mime:y}=t._zod.bag;x!==void 0&&(h.minLength=x),g!==void 0&&(h.maxLength=g),y?y.length===1?(h.contentMediaType=y[0],Object.assign(m,h)):m.anyOf=y.map(b=>({...h,contentMediaType:b})):Object.assign(m,h);break}case"transform":{if(this.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema");break}case"nullable":{let m=this.process(a.innerType,d);this.target==="openapi-3.0"?(o.ref=a.innerType,p.nullable=!0):p.anyOf=[m,{type:"null"}];break}case"nonoptional":{this.process(a.innerType,d),o.ref=a.innerType;break}case"success":{let m=p;m.type="boolean";break}case"default":{this.process(a.innerType,d),o.ref=a.innerType,p.default=JSON.parse(JSON.stringify(a.defaultValue));break}case"prefault":{this.process(a.innerType,d),o.ref=a.innerType,this.io==="input"&&(p._prefault=JSON.parse(JSON.stringify(a.defaultValue)));break}case"catch":{this.process(a.innerType,d),o.ref=a.innerType;let m;try{m=a.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}p.default=m;break}case"nan":{if(this.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema");break}case"template_literal":{let m=p,h=t._zod.pattern;if(!h)throw new Error("Pattern not found in template literal");m.type="string",m.pattern=h.source;break}case"pipe":{let m=this.io==="input"?a.in._zod.def.type==="transform"?a.out:a.in:a.out;this.process(m,d),o.ref=m;break}case"readonly":{this.process(a.innerType,d),o.ref=a.innerType,p.readOnly=!0;break}case"promise":{this.process(a.innerType,d),o.ref=a.innerType;break}case"optional":{this.process(a.innerType,d),o.ref=a.innerType;break}case"lazy":{let m=t._zod.innerType;this.process(m,d),o.ref=m;break}case"custom":{if(this.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema");break}case"function":{if(this.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema");break}default:}}}let c=this.metadataRegistry.get(t);return c&&Object.assign(o.schema,c),this.io==="input"&&Zs(t)&&(delete o.schema.examples,delete o.schema.default),this.io==="input"&&o.schema._prefault&&((n=o.schema).default??(n.default=o.schema._prefault)),delete o.schema._prefault,this.seen.get(t).schema}emit(t,r){let n={cycles:r?.cycles??"ref",reused:r?.reused??"inline",external:r?.external??void 0},a=this.seen.get(t);if(!a)throw new Error("Unprocessed schema. This is a bug in Zod.");let i=u=>{let d=this.target==="draft-2020-12"?"$defs":"definitions";if(n.external){let h=n.external.registry.get(u[0])?.id,x=n.external.uri??(y=>y);if(h)return{ref:x(h)};let g=u[1].defId??u[1].schema.id??`schema${this.counter++}`;return u[1].defId=g,{defId:g,ref:`${x("__shared")}#/${d}/${g}`}}if(u[1]===a)return{ref:"#"};let p=`#/${d}/`,m=u[1].schema.id??`__schema${this.counter++}`;return{defId:m,ref:p+m}},s=u=>{if(u[1].schema.$ref)return;let d=u[1],{ref:f,defId:p}=i(u);d.def={...d.schema},p&&(d.defId=p);let m=d.schema;for(let h in m)delete m[h];m.$ref=f};if(n.cycles==="throw")for(let u of this.seen.entries()){let d=u[1];if(d.cycle)throw new Error(`Cycle detected: #/${d.cycle?.join("/")}/<root>
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let u of this.seen.entries()){let d=u[1];if(t===u[0]){s(u);continue}if(n.external){let p=n.external.registry.get(u[0])?.id;if(t!==u[0]&&p){s(u);continue}}if(this.metadataRegistry.get(u[0])?.id){s(u);continue}if(d.cycle){s(u);continue}if(d.count>1&&n.reused==="ref"){s(u);continue}}let o=(u,d)=>{let f=this.seen.get(u),p=f.def??f.schema,m={...p};if(f.ref===null)return;let h=f.ref;if(f.ref=null,h){o(h,d);let x=this.seen.get(h).schema;x.$ref&&(d.target==="draft-7"||d.target==="draft-4"||d.target==="openapi-3.0")?(p.allOf=p.allOf??[],p.allOf.push(x)):(Object.assign(p,x),Object.assign(p,m))}f.isParent||this.override({zodSchema:u,jsonSchema:p,path:f.path??[]})};for(let u of[...this.seen.entries()].reverse())o(u[0],{target:this.target});let l={};if(this.target==="draft-2020-12"?l.$schema="https://json-schema.org/draft/2020-12/schema":this.target==="draft-7"?l.$schema="http://json-schema.org/draft-07/schema#":this.target==="draft-4"?l.$schema="http://json-schema.org/draft-04/schema#":this.target,n.external?.uri){let u=n.external.registry.get(t)?.id;if(!u)throw new Error("Schema is missing an `id` property");l.$id=n.external.uri(u)}Object.assign(l,a.def);let c=n.external?.defs??{};for(let u of this.seen.entries()){let d=u[1];d.def&&d.defId&&(c[d.defId]=d.def)}n.external||Object.keys(c).length>0&&(this.target==="draft-2020-12"?l.$defs=c:l.definitions=c);try{return JSON.parse(JSON.stringify(l))}catch{throw new Error("Error converting schema to JSON.")}}};function kj(e,t){if(e instanceof Ev){let n=new mC(t),a={};for(let o of e._idmap.entries()){let[l,c]=o;n.process(c)}let i={},s={registry:e,uri:t?.uri,defs:a};for(let o of e._idmap.entries()){let[l,c]=o;i[l]=n.emit(c,{...t,external:s})}if(Object.keys(a).length>0){let o=n.target==="draft-2020-12"?"$defs":"definitions";i.__shared={[o]:a}}return{schemas:i}}let r=new mC(t);return r.process(e),r.emit(e,t)}function Zs(e,t){let r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);let n=e._zod.def;if(n.type==="transform")return!0;if(n.type==="array")return Zs(n.element,r);if(n.type==="set")return Zs(n.valueType,r);if(n.type==="lazy")return Zs(n.getter(),r);if(n.type==="promise"||n.type==="optional"||n.type==="nonoptional"||n.type==="nullable"||n.type==="readonly"||n.type==="default"||n.type==="prefault")return Zs(n.innerType,r);if(n.type==="intersection")return Zs(n.left,r)||Zs(n.right,r);if(n.type==="record"||n.type==="map")return Zs(n.keyType,r)||Zs(n.valueType,r);if(n.type==="pipe")return Zs(n.in,r)||Zs(n.out,r);if(n.type==="object"){for(let a in n.shape)if(Zs(n.shape[a],r))return!0;return!1}if(n.type==="union"){for(let a of n.options)if(Zs(a,r))return!0;return!1}if(n.type==="tuple"){for(let a of n.items)if(Zs(a,r))return!0;return!!(n.rest&&Zs(n.rest,r))}return!1}var hfe={};var Lk={};xl(Lk,{ZodISODate:()=>Nk,ZodISODateTime:()=>Ak,ZodISODuration:()=>_k,ZodISOTime:()=>kk,date:()=>Lj,datetime:()=>_j,duration:()=>Dj,time:()=>Rj});var Ak=xe("ZodISODateTime",(e,t)=>{z$.init(e,t),_n.init(e,t)});function _j(e){return q6(Ak,e)}var Nk=xe("ZodISODate",(e,t)=>{U$.init(e,t),_n.init(e,t)});function Lj(e){return H6(Nk,e)}var kk=xe("ZodISOTime",(e,t)=>{V$.init(e,t),_n.init(e,t)});function Rj(e){return G6(kk,e)}var _k=xe("ZodISODuration",(e,t)=>{q$.init(e,t),_n.init(e,t)});function Dj(e){return K6(_k,e)}var yfe=(e,t)=>{Uw.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>qw(e,r)},flatten:{value:r=>Vw(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,xv,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,xv,2)}},isEmpty:{get(){return e.issues.length===0}}})},vot=xe("ZodError",yfe),ko=xe("ZodError",yfe,{Parent:Error});var Mj=Sv(ko),Oj=Tv(ko),Fj=wv(ko),Bj=Cv(ko),$j=BN(ko),jj=$N(ko),zj=jN(ko),Uj=zN(ko),Vj=UN(ko),qj=VN(ko),Hj=qN(ko),Gj=HN(ko);var Ir=xe("ZodType",(e,t)=>(lr.init(e,t),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...r)=>e.clone(Ye.mergeDefs(t,{checks:[...t.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]})),e.clone=(r,n)=>Ys(e,r,n),e.brand=()=>e,e.register=(r,n)=>(r.add(e,n),e),e.parse=(r,n)=>Mj(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>Fj(e,r,n),e.parseAsync=async(r,n)=>Oj(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>Bj(e,r,n),e.spa=e.safeParseAsync,e.encode=(r,n)=>$j(e,r,n),e.decode=(r,n)=>jj(e,r,n),e.encodeAsync=async(r,n)=>zj(e,r,n),e.decodeAsync=async(r,n)=>Uj(e,r,n),e.safeEncode=(r,n)=>Vj(e,r,n),e.safeDecode=(r,n)=>qj(e,r,n),e.safeEncodeAsync=async(r,n)=>Hj(e,r,n),e.safeDecodeAsync=async(r,n)=>Gj(e,r,n),e.refine=(r,n)=>e.check(ape(r,n)),e.superRefine=r=>e.check(ipe(r)),e.overwrite=r=>e.check(Uu(r)),e.optional=()=>Dk(e),e.nullable=()=>Mk(e),e.nullish=()=>Dk(Mk(e)),e.nonoptional=r=>Gfe(e,r),e.array=()=>$k(e),e.or=r=>hz([e,r]),e.and=r=>Lfe(e,r),e.transform=r=>Ok(e,xz(r)),e.default=r=>Vfe(e,r),e.prefault=r=>Hfe(e,r),e.catch=r=>Xfe(e,r),e.pipe=r=>Ok(e,r),e.readonly=()=>Zfe(e),e.describe=r=>{let n=e.clone();return Js.add(n,{description:r}),n},Object.defineProperty(e,"description",{get(){return Js.get(e)?.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return Js.get(e);let n=e.clone();return Js.add(n,r[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),Xj=xe("_ZodString",(e,t)=>{jg.init(e,t),Ir.init(e,t);let r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,e.regex=(...n)=>e.check(rC(...n)),e.includes=(...n)=>e.check(iC(...n)),e.startsWith=(...n)=>e.check(sC(...n)),e.endsWith=(...n)=>e.check(oC(...n)),e.min=(...n)=>e.check(Sm(...n)),e.max=(...n)=>e.check(Av(...n)),e.length=(...n)=>e.check(Nv(...n)),e.nonempty=(...n)=>e.check(Sm(1,...n)),e.lowercase=n=>e.check(nC(n)),e.uppercase=n=>e.check(aC(n)),e.trim=()=>e.check(uC()),e.normalize=(...n)=>e.check(cC(...n)),e.toLowerCase=()=>e.check(dC()),e.toUpperCase=()=>e.check(fC()),e.slugify=()=>e.check(pC())}),gC=xe("ZodString",(e,t)=>{jg.init(e,t),Xj.init(e,t),e.email=r=>e.check(lk(Yj,r)),e.url=r=>e.check(eC(Fk,r)),e.jwt=r=>e.check(Ik(dz,r)),e.emoji=r=>e.check(pk(Jj,r)),e.guid=r=>e.check(Qw(Rk,r)),e.uuid=r=>e.check(ck(hf,r)),e.uuidv4=r=>e.check(uk(hf,r)),e.uuidv6=r=>e.check(dk(hf,r)),e.uuidv7=r=>e.check(fk(hf,r)),e.nanoid=r=>e.check(mk(Zj,r)),e.guid=r=>e.check(Qw(Rk,r)),e.cuid=r=>e.check(hk(Qj,r)),e.cuid2=r=>e.check(gk(ez,r)),e.ulid=r=>e.check(yk(tz,r)),e.base64=r=>e.check(Ck(lz,r)),e.base64url=r=>e.check(Pk(cz,r)),e.xid=r=>e.check(xk(rz,r)),e.ksuid=r=>e.check(bk(nz,r)),e.ipv4=r=>e.check(vk(az,r)),e.ipv6=r=>e.check(Sk(iz,r)),e.cidrv4=r=>e.check(Tk(sz,r)),e.cidrv6=r=>e.check(wk(oz,r)),e.e164=r=>e.check(Ek(uz,r)),e.datetime=r=>e.check(_j(r)),e.date=r=>e.check(Lj(r)),e.time=r=>e.check(Rj(r)),e.duration=r=>e.check(Dj(r))});function Kj(e){return j6(gC,e)}var _n=xe("ZodStringFormat",(e,t)=>{En.init(e,t),Xj.init(e,t)}),Yj=xe("ZodEmail",(e,t)=>{L$.init(e,t),_n.init(e,t)});function Tot(e){return lk(Yj,e)}var Rk=xe("ZodGUID",(e,t)=>{k$.init(e,t),_n.init(e,t)});function wot(e){return Qw(Rk,e)}var hf=xe("ZodUUID",(e,t)=>{_$.init(e,t),_n.init(e,t)});function Cot(e){return ck(hf,e)}function Pot(e){return uk(hf,e)}function Eot(e){return dk(hf,e)}function Iot(e){return fk(hf,e)}var Fk=xe("ZodURL",(e,t)=>{R$.init(e,t),_n.init(e,t)});function Aot(e){return eC(Fk,e)}function Not(e){return eC(Fk,{protocol:/^https?$/,hostname:ic.domain,...Ye.normalizeParams(e)})}var Jj=xe("ZodEmoji",(e,t)=>{D$.init(e,t),_n.init(e,t)});function kot(e){return pk(Jj,e)}var Zj=xe("ZodNanoID",(e,t)=>{M$.init(e,t),_n.init(e,t)});function _ot(e){return mk(Zj,e)}var Qj=xe("ZodCUID",(e,t)=>{O$.init(e,t),_n.init(e,t)});function Lot(e){return hk(Qj,e)}var ez=xe("ZodCUID2",(e,t)=>{F$.init(e,t),_n.init(e,t)});function Rot(e){return gk(ez,e)}var tz=xe("ZodULID",(e,t)=>{B$.init(e,t),_n.init(e,t)});function Dot(e){return yk(tz,e)}var rz=xe("ZodXID",(e,t)=>{$$.init(e,t),_n.init(e,t)});function Mot(e){return xk(rz,e)}var nz=xe("ZodKSUID",(e,t)=>{j$.init(e,t),_n.init(e,t)});function Oot(e){return bk(nz,e)}var az=xe("ZodIPv4",(e,t)=>{H$.init(e,t),_n.init(e,t)});function Fot(e){return vk(az,e)}var xfe=xe("ZodMAC",(e,t)=>{K$.init(e,t),_n.init(e,t)});function Bot(e){return U6(xfe,e)}var iz=xe("ZodIPv6",(e,t)=>{G$.init(e,t),_n.init(e,t)});function $ot(e){return Sk(iz,e)}var sz=xe("ZodCIDRv4",(e,t)=>{W$.init(e,t),_n.init(e,t)});function jot(e){return Tk(sz,e)}var oz=xe("ZodCIDRv6",(e,t)=>{X$.init(e,t),_n.init(e,t)});function zot(e){return wk(oz,e)}var lz=xe("ZodBase64",(e,t)=>{J$.init(e,t),_n.init(e,t)});function Uot(e){return Ck(lz,e)}var cz=xe("ZodBase64URL",(e,t)=>{Z$.init(e,t),_n.init(e,t)});function Vot(e){return Pk(cz,e)}var uz=xe("ZodE164",(e,t)=>{Q$.init(e,t),_n.init(e,t)});function qot(e){return Ek(uz,e)}var dz=xe("ZodJWT",(e,t)=>{e6.init(e,t),_n.init(e,t)});function Hot(e){return Ik(dz,e)}var yC=xe("ZodCustomStringFormat",(e,t)=>{t6.init(e,t),_n.init(e,t)});function Got(e,t,r={}){return kv(yC,e,t,r)}function Kot(e){return kv(yC,"hostname",ic.hostname,e)}function Wot(e){return kv(yC,"hex",ic.hex,e)}function Xot(e,t){let r=t?.enc??"hex",n=`${e}_${r}`,a=ic[n];if(!a)throw new Error(`Unrecognized hash format: ${n}`);return kv(yC,n,a,t)}var xC=xe("ZodNumber",(e,t)=>{ek.init(e,t),Ir.init(e,t),e.gt=(n,a)=>e.check(pf(n,a)),e.gte=(n,a)=>e.check(No(n,a)),e.min=(n,a)=>e.check(No(n,a)),e.lt=(n,a)=>e.check(ff(n,a)),e.lte=(n,a)=>e.check(sc(n,a)),e.max=(n,a)=>e.check(sc(n,a)),e.int=n=>e.check(Wj(n)),e.safe=n=>e.check(Wj(n)),e.positive=n=>e.check(pf(0,n)),e.nonnegative=n=>e.check(No(0,n)),e.negative=n=>e.check(ff(0,n)),e.nonpositive=n=>e.check(sc(0,n)),e.multipleOf=(n,a)=>e.check(zg(n,a)),e.step=(n,a)=>e.check(zg(n,a)),e.finite=()=>e;let r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});function bfe(e){return W6(xC,e)}var Lv=xe("ZodNumberFormat",(e,t)=>{r6.init(e,t),xC.init(e,t)});function Wj(e){return Y6(Lv,e)}function Yot(e){return J6(Lv,e)}function Jot(e){return Z6(Lv,e)}function Zot(e){return Q6(Lv,e)}function Qot(e){return ej(Lv,e)}var bC=xe("ZodBoolean",(e,t)=>{Ww.init(e,t),Ir.init(e,t)});function vfe(e){return tj(bC,e)}var vC=xe("ZodBigInt",(e,t)=>{tk.init(e,t),Ir.init(e,t),e.gte=(n,a)=>e.check(No(n,a)),e.min=(n,a)=>e.check(No(n,a)),e.gt=(n,a)=>e.check(pf(n,a)),e.gte=(n,a)=>e.check(No(n,a)),e.min=(n,a)=>e.check(No(n,a)),e.lt=(n,a)=>e.check(ff(n,a)),e.lte=(n,a)=>e.check(sc(n,a)),e.max=(n,a)=>e.check(sc(n,a)),e.positive=n=>e.check(pf(BigInt(0),n)),e.negative=n=>e.check(ff(BigInt(0),n)),e.nonpositive=n=>e.check(sc(BigInt(0),n)),e.nonnegative=n=>e.check(No(BigInt(0),n)),e.multipleOf=(n,a)=>e.check(zg(n,a));let r=e._zod.bag;e.minValue=r.minimum??null,e.maxValue=r.maximum??null,e.format=r.format??null});function elt(e){return nj(vC,e)}var fz=xe("ZodBigIntFormat",(e,t)=>{n6.init(e,t),vC.init(e,t)});function tlt(e){return ij(fz,e)}function rlt(e){return sj(fz,e)}var Sfe=xe("ZodSymbol",(e,t)=>{a6.init(e,t),Ir.init(e,t)});function nlt(e){return oj(Sfe,e)}var Tfe=xe("ZodUndefined",(e,t)=>{i6.init(e,t),Ir.init(e,t)});function alt(e){return lj(Tfe,e)}var wfe=xe("ZodNull",(e,t)=>{s6.init(e,t),Ir.init(e,t)});function Cfe(e){return cj(wfe,e)}var Pfe=xe("ZodAny",(e,t)=>{o6.init(e,t),Ir.init(e,t)});function ilt(){return uj(Pfe)}var Efe=xe("ZodUnknown",(e,t)=>{l6.init(e,t),Ir.init(e,t)});function _v(){return dj(Efe)}var Ife=xe("ZodNever",(e,t)=>{c6.init(e,t),Ir.init(e,t)});function pz(e){return fj(Ife,e)}var Afe=xe("ZodVoid",(e,t)=>{u6.init(e,t),Ir.init(e,t)});function slt(e){return pj(Afe,e)}var Bk=xe("ZodDate",(e,t)=>{d6.init(e,t),Ir.init(e,t),e.min=(n,a)=>e.check(No(n,a)),e.max=(n,a)=>e.check(sc(n,a));let r=e._zod.bag;e.minDate=r.minimum?new Date(r.minimum):null,e.maxDate=r.maximum?new Date(r.maximum):null});function olt(e){return mj(Bk,e)}var Nfe=xe("ZodArray",(e,t)=>{f6.init(e,t),Ir.init(e,t),e.element=t.element,e.min=(r,n)=>e.check(Sm(r,n)),e.nonempty=r=>e.check(Sm(1,r)),e.max=(r,n)=>e.check(Av(r,n)),e.length=(r,n)=>e.check(Nv(r,n)),e.unwrap=()=>e.element});function $k(e,t){return Tj(Nfe,e,t)}function llt(e){let t=e._zod.def.shape;return yz(Object.keys(t))}var jk=xe("ZodObject",(e,t)=>{p6.init(e,t),Ir.init(e,t),Ye.defineLazy(e,"shape",()=>t.shape),e.keyof=()=>yz(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:_v()}),e.loose=()=>e.clone({...e._zod.def,catchall:_v()}),e.strict=()=>e.clone({...e._zod.def,catchall:pz()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>Ye.extend(e,r),e.safeExtend=r=>Ye.safeExtend(e,r),e.merge=r=>Ye.merge(e,r),e.pick=r=>Ye.pick(e,r),e.omit=r=>Ye.omit(e,r),e.partial=(...r)=>Ye.partial(bz,e,r[0]),e.required=(...r)=>Ye.required(vz,e,r[0])});function clt(e,t){let r={type:"object",shape:e??{},...Ye.normalizeParams(t)};return new jk(r)}function ult(e,t){return new jk({type:"object",shape:e,catchall:pz(),...Ye.normalizeParams(t)})}function dlt(e,t){return new jk({type:"object",shape:e,catchall:_v(),...Ye.normalizeParams(t)})}var mz=xe("ZodUnion",(e,t)=>{rk.init(e,t),Ir.init(e,t),e.options=t.options});function hz(e,t){return new mz({type:"union",options:e,...Ye.normalizeParams(t)})}var kfe=xe("ZodDiscriminatedUnion",(e,t)=>{mz.init(e,t),m6.init(e,t)});function flt(e,t,r){return new kfe({type:"union",options:t,discriminator:e,...Ye.normalizeParams(r)})}var _fe=xe("ZodIntersection",(e,t)=>{h6.init(e,t),Ir.init(e,t)});function Lfe(e,t){return new _fe({type:"intersection",left:e,right:t})}var Rfe=xe("ZodTuple",(e,t)=>{nk.init(e,t),Ir.init(e,t),e.rest=r=>e.clone({...e._zod.def,rest:r})});function Dfe(e,t,r){let n=t instanceof lr,a=n?r:t,i=n?t:null;return new Rfe({type:"tuple",items:e,rest:i,...Ye.normalizeParams(a)})}var gz=xe("ZodRecord",(e,t)=>{g6.init(e,t),Ir.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});function Mfe(e,t,r){return new gz({type:"record",keyType:e,valueType:t,...Ye.normalizeParams(r)})}function plt(e,t,r){let n=Ys(e);return n._zod.values=void 0,new gz({type:"record",keyType:n,valueType:t,...Ye.normalizeParams(r)})}var Ofe=xe("ZodMap",(e,t)=>{y6.init(e,t),Ir.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});function mlt(e,t,r){return new Ofe({type:"map",keyType:e,valueType:t,...Ye.normalizeParams(r)})}var Ffe=xe("ZodSet",(e,t)=>{x6.init(e,t),Ir.init(e,t),e.min=(...r)=>e.check(Ug(...r)),e.nonempty=r=>e.check(Ug(1,r)),e.max=(...r)=>e.check(Iv(...r)),e.size=(...r)=>e.check(tC(...r))});function hlt(e,t){return new Ffe({type:"set",valueType:e,...Ye.normalizeParams(t)})}var hC=xe("ZodEnum",(e,t)=>{b6.init(e,t),Ir.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);let r=new Set(Object.keys(t.entries));e.extract=(n,a)=>{let i={};for(let s of n)if(r.has(s))i[s]=t.entries[s];else throw new Error(`Key ${s} not found in enum`);return new hC({...t,checks:[],...Ye.normalizeParams(a),entries:i})},e.exclude=(n,a)=>{let i={...t.entries};for(let s of n)if(r.has(s))delete i[s];else throw new Error(`Key ${s} not found in enum`);return new hC({...t,checks:[],...Ye.normalizeParams(a),entries:i})}});function yz(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new hC({type:"enum",entries:r,...Ye.normalizeParams(t)})}function glt(e,t){return new hC({type:"enum",entries:e,...Ye.normalizeParams(t)})}var Bfe=xe("ZodLiteral",(e,t)=>{v6.init(e,t),Ir.init(e,t),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function ylt(e,t){return new Bfe({type:"literal",values:Array.isArray(e)?e:[e],...Ye.normalizeParams(t)})}var $fe=xe("ZodFile",(e,t)=>{S6.init(e,t),Ir.init(e,t),e.min=(r,n)=>e.check(Ug(r,n)),e.max=(r,n)=>e.check(Iv(r,n)),e.mime=(r,n)=>e.check(lC(Array.isArray(r)?r:[r],n))});function xlt(e){return wj($fe,e)}var jfe=xe("ZodTransform",(e,t)=>{T6.init(e,t),Ir.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new hm(e.constructor.name);r.addIssue=i=>{if(typeof i=="string")r.issues.push(Ye.issue(i,r.value,t));else{let s=i;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=r.value),s.inst??(s.inst=e),r.issues.push(Ye.issue(s))}};let a=t.transform(r.value,r);return a instanceof Promise?a.then(i=>(r.value=i,r)):(r.value=a,r)}});function xz(e){return new jfe({type:"transform",transform:e})}var bz=xe("ZodOptional",(e,t)=>{w6.init(e,t),Ir.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Dk(e){return new bz({type:"optional",innerType:e})}var zfe=xe("ZodNullable",(e,t)=>{C6.init(e,t),Ir.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Mk(e){return new zfe({type:"nullable",innerType:e})}function blt(e){return Dk(Mk(e))}var Ufe=xe("ZodDefault",(e,t)=>{P6.init(e,t),Ir.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Vfe(e,t){return new Ufe({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Ye.shallowClone(t)}})}var qfe=xe("ZodPrefault",(e,t)=>{E6.init(e,t),Ir.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Hfe(e,t){return new qfe({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Ye.shallowClone(t)}})}var vz=xe("ZodNonOptional",(e,t)=>{I6.init(e,t),Ir.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Gfe(e,t){return new vz({type:"nonoptional",innerType:e,...Ye.normalizeParams(t)})}var Kfe=xe("ZodSuccess",(e,t)=>{A6.init(e,t),Ir.init(e,t),e.unwrap=()=>e._zod.def.innerType});function vlt(e){return new Kfe({type:"success",innerType:e})}var Wfe=xe("ZodCatch",(e,t)=>{N6.init(e,t),Ir.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Xfe(e,t){return new Wfe({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}var Yfe=xe("ZodNaN",(e,t)=>{k6.init(e,t),Ir.init(e,t)});function Slt(e){return gj(Yfe,e)}var Sz=xe("ZodPipe",(e,t)=>{_6.init(e,t),Ir.init(e,t),e.in=t.in,e.out=t.out});function Ok(e,t){return new Sz({type:"pipe",in:e,out:t})}var Tz=xe("ZodCodec",(e,t)=>{Sz.init(e,t),Xw.init(e,t)});function Tlt(e,t,r){return new Tz({type:"pipe",in:e,out:t,transform:r.decode,reverseTransform:r.encode})}var Jfe=xe("ZodReadonly",(e,t)=>{L6.init(e,t),Ir.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Zfe(e){return new Jfe({type:"readonly",innerType:e})}var Qfe=xe("ZodTemplateLiteral",(e,t)=>{R6.init(e,t),Ir.init(e,t)});function wlt(e,t){return new Qfe({type:"template_literal",parts:e,...Ye.normalizeParams(t)})}var epe=xe("ZodLazy",(e,t)=>{O6.init(e,t),Ir.init(e,t),e.unwrap=()=>e._zod.def.getter()});function tpe(e){return new epe({type:"lazy",getter:e})}var rpe=xe("ZodPromise",(e,t)=>{M6.init(e,t),Ir.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Clt(e){return new rpe({type:"promise",innerType:e})}var npe=xe("ZodFunction",(e,t)=>{D6.init(e,t),Ir.init(e,t)});function Plt(e){return new npe({type:"function",input:Array.isArray(e?.input)?Dfe(e?.input):e?.input??$k(_v()),output:e?.output??_v()})}var zk=xe("ZodCustom",(e,t)=>{F6.init(e,t),Ir.init(e,t)});function Elt(e){let t=new kn({check:"custom"});return t._zod.check=e,t}function Ilt(e,t){return Cj(zk,e??(()=>!0),t)}function ape(e,t={}){return Pj(zk,e,t)}function ipe(e){return Ej(e)}var Alt=Ij,Nlt=Aj;function klt(e,t={error:`Input not instance of ${e.name}`}){let r=new zk({type:"custom",check:"custom",fn:n=>n instanceof e,abort:!0,...Ye.normalizeParams(t)});return r._zod.bag.Class=e,r}var _lt=(...e)=>Nj({Codec:Tz,Boolean:bC,String:gC},...e);function Llt(e){let t=tpe(()=>hz([Kj(e),bfe(),vfe(),Cfe(),$k(t),Mfe(Kj(),t)]));return t}function Rlt(e,t){return Ok(xz(e),t)}var Dlt={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function Mlt(e){ja({customError:e})}function Olt(){return ja().customError}var wz;(function(e){})(wz||(wz={}));var Cz={};xl(Cz,{bigint:()=>jlt,boolean:()=>$lt,date:()=>zlt,number:()=>Blt,string:()=>Flt});function Flt(e){return z6(gC,e)}function Blt(e){return X6(xC,e)}function $lt(e){return rj(bC,e)}function jlt(e){return aj(vC,e)}function zlt(e){return hj(Bk,e)}ja(ak());var In=Pz;$t();var dVt=In.object({i:In.number(),s:In.string(),y:In.string().optional(),n:In.string().optional()}),Ult=In.object({i:In.number(),t:In.string()}),Ez=In.array(Ult),Vlt=In.object({id:In.number(),source:In.string(),target:In.string()}),fVt=In.array(Vlt),qlt=In.object({id:In.number(),source:In.string(),target:In.string(),type:In.string(),name:In.string()}),pVt=In.array(qlt),Hlt=In.object({id:In.number(),source:In.string(),target:In.string(),type:In.string().optional()}),mVt=In.array(Hlt),SC=class extends Np{constructor(){super()}getOpenAIClient(){let t=Ue.getState().i18n.settings,r=this.getActiveProfile(),n,a="";if(r){a=r.key;let i=l1(r.url||Wt[t.llmApi]?.baseUrl||"");n=i?`${i}/v1`:void 0}else{let i=Wt[t.llmApi];i&&(a=t[i.keyField],n=i.baseUrl)}return new or({baseURL:n,apiKey:a,dangerouslyAllowBrowser:!0,fetch:async(i,s)=>{let o={};s?.headers&&(s.headers instanceof Headers?s.headers.forEach((c,u)=>{o[u]=c}):Array.isArray(s.headers)?s.headers.forEach(([c,u])=>{o[c]=u}):Object.assign(o,s.headers));let l=s?.signal;return new Promise((c,u)=>{let d=()=>u(new Error("AbortError"));if(l?.aborted)return d();l?.addEventListener("abort",d),(0,spe.requestUrl)({url:i.toString(),method:s?.method||"POST",headers:o,body:s?.body,throw:!1}).then(f=>{l?.removeEventListener("abort",d),c({ok:f.status>=200&&f.status<300,status:f.status,statusText:f.status.toString(),headers:new Headers(f.headers),json:()=>Promise.resolve(f.json),text:()=>Promise.resolve(f.text),arrayBuffer:()=>Promise.resolve(f.arrayBuffer)})}).catch(f=>{l?.removeEventListener("abort",d),u(f)})})}})}getModelName(){let t=this.getActiveProfile();if(t?.model)return t.model;let r=Ue.getState().i18n.settings,n=Wt[r.llmApi];return n?r[n.modelField]||n.defaultModel:"gpt-4o-mini"}async callRegexTranslationAPI(t,r){let n=this.getRegexSystemPrompt(),a=t.map(s=>({i:s.id,s:s.source})),i=await this.callOpenAI(a,n,Ez,r);return this.mapResultsBack(t,i)}async callAstTranslationAPI(t,r){let n=this.getAstSystemPrompt(),a=t.map(s=>({i:s.id,s:s.source,y:s.type,n:s.name})),i=await this.callOpenAI(a,n,Ez,r);return this.mapResultsBack(t,i)}async callThemeTranslationAPI(t,r){let n=this.getThemeSystemPrompt(),a=t.map(s=>({i:s.id,s:s.source,y:s.type})),i=await this.callOpenAI(a,n,Ez,r);return this.mapResultsBack(t,i)}async callOpenAI(t,r,n,a,i=2){let s=Ue.getState().i18n.settings,o=[{role:"system",content:r},{role:"user",content:JSON.stringify(t)}],l=0,c=null;for(;l<=i;){let d=new AbortController,f=s.llmTimeout||6e4,p=setTimeout(()=>{d.abort()},f),m=()=>d.abort();a&&a.addEventListener("abort",m);try{if(a?.aborted)throw new Error("\u7FFB\u8BD1\u4EFB\u52A1\u5DF2\u53D6\u6D88");let g=(await this.getOpenAIClient().chat.completions.create({messages:o,model:this.getModelName(),temperature:.3,response_format:{type:s.llmResponseFormat}},{signal:d.signal})).choices[0].message.content;if(!g)throw new Error("\u7FFB\u8BD1\u7ED3\u679C\u4E3A\u7A7A");let y;try{y=JSON.parse(g)}catch{try{let S=g,w=S.match(/```json\s*([\s\S]*?)\s*```/)||S.match(/```\s*([\s\S]*?)\s*```/);w&&(S=w[1]),S=S.replace(/[\u0000-\u001F]+/g," "),y=JSON.parse(S)}catch(S){throw new Error(`JSON\u8BED\u6CD5\u9519\u8BEF: ${S.message}`)}}return n.parse(y)}catch(h){let x=h.name==="AbortError"&&!a?.aborted;if(a?.aborted||h.message==="\u7FFB\u8BD1\u4EFB\u52A1\u5DF2\u53D6\u6D88")throw new Error("\u7FFB\u8BD1\u4EFB\u52A1\u5DF2\u53D6\u6D88");c=x?new Error(`\u8BF7\u6C42\u8D85\u65F6 (${f}ms)`):h,l++,l<=i&&await new Promise(y=>setTimeout(y,1e3*l))}finally{clearTimeout(p),a&&a.removeEventListener("abort",m)}}let u=c?c.message:"\u672A\u77E5\u9519\u8BEF";throw new Error(u)}async callFixAPI(t,r,n,a,i){let s=Ue.getState().i18n.settings,o=[`Source: ${t}`,`Broken Translation: ${r}`,`Error: ${n}`,"","Please return ONLY the fixed translation string."].join(`
`),l=[{role:"system",content:a},{role:"user",content:o}],c=new AbortController,u=s.llmTimeout||6e4,d=setTimeout(()=>c.abort(),u),f=()=>c.abort();i&&i.addEventListener("abort",f);try{if(i?.aborted)throw new Error("\u4FEE\u590D\u4EFB\u52A1\u5DF2\u53D6\u6D88");let h=(await this.getOpenAIClient().chat.completions.create({messages:l,model:this.getModelName(),temperature:.2},{signal:c.signal})).choices[0].message.content;if(!h||h.trim()==="")throw new Error("AI \u8FD4\u56DE\u7684\u4FEE\u590D\u7ED3\u679C\u4E3A\u7A7A");let x=h.trim();return x.startsWith('"')&&x.endsWith('"')&&(x=x.slice(1,-1)),x.startsWith("'")&&x.endsWith("'")&&(x=x.slice(1,-1)),x}finally{clearTimeout(d),i&&i.removeEventListener("abort",f)}}};var Iz=require("obsidian");$t();var ope="https://generativelanguage.googleapis.com/v1beta",Uk=class extends Np{constructor(){super()}getModelName(){return this.getActiveProfile()?.model||Ue.getState().i18n.settings.llmGeminiModel||"gemini-2.0-flash"}async callGemini(t,r,n,a=2){let i=Ue.getState().i18n.settings,o=this.getActiveProfile()?.key||i.llmGeminiKey,l=this.getModelName();if(!o)throw new Error("\u8BF7\u5148\u914D\u7F6E Gemini API Key");let c=`${ope}/models/${l}:generateContent?key=${o}`,u={contents:[{role:"user",parts:[{text:JSON.stringify(t)}]}],systemInstruction:{parts:[{text:r}]},generationConfig:{temperature:.3,responseMimeType:"application/json"}},d=0,f=null;for(;d<=a;){let p=new AbortController,m=this.getTimeout(),h=setTimeout(()=>p.abort(),m),x=()=>p.abort();n&&n.addEventListener("abort",x);try{if(n?.aborted)throw new Error("\u7FFB\u8BD1\u4EFB\u52A1\u5DF2\u53D6\u6D88");let g=await(0,Iz.requestUrl)({url:c,method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(u),throw:!1});if(g.status!==200){let E=g.json?.error?.message||`HTTP ${g.status}`;throw new Error(`Gemini API \u9519\u8BEF: ${E}`)}let b=g.json?.candidates?.[0]?.content?.parts?.[0]?.text;if(!b)throw new Error("Gemini \u8FD4\u56DE\u5185\u5BB9\u4E3A\u7A7A");let S;try{S=JSON.parse(b)}catch{let w=b.match(/```(?:json)?\s*([\s\S]*?)\s*```/);if(w)S=JSON.parse(w[1]);else throw new Error("Gemini \u8FD4\u56DE JSON \u89E3\u6790\u5931\u8D25")}if(!Array.isArray(S))if(S?.items&&Array.isArray(S.items))S=S.items;else throw new Error("Gemini \u8FD4\u56DE\u6570\u636E\u4E0D\u662F\u6570\u7EC4\u683C\u5F0F");return S}catch(g){let y=g.name==="AbortError"&&!n?.aborted;if(n?.aborted||g.message==="\u7FFB\u8BD1\u4EFB\u52A1\u5DF2\u53D6\u6D88")throw new Error("\u7FFB\u8BD1\u4EFB\u52A1\u5DF2\u53D6\u6D88");f=y?new Error(`\u8BF7\u6C42\u8D85\u65F6 (${m}ms)`):g,d++,d<=a&&await new Promise(S=>setTimeout(S,1e3*d))}finally{clearTimeout(h),n&&n.removeEventListener("abort",x)}}throw new Error(f?.message||"\u672A\u77E5\u9519\u8BEF")}async callRegexTranslationAPI(t,r){let n=this.getRegexSystemPrompt(),a=t.map(s=>({i:s.id,s:s.source})),i=await this.callGemini(a,n,r);return this.mapResultsBack(t,i)}async callAstTranslationAPI(t,r){let n=this.getAstSystemPrompt(),a=t.map(s=>({i:s.id,s:s.source,y:s.type,n:s.name})),i=await this.callGemini(a,n,r);return this.mapResultsBack(t,i)}async callThemeTranslationAPI(t,r){let n=this.getThemeSystemPrompt(),a=t.map(s=>({i:s.id,s:s.source,y:s.type})),i=await this.callGemini(a,n,r);return this.mapResultsBack(t,i)}async callFixAPI(t,r,n,a,i){let s=Ue.getState().i18n.settings,l=this.getActiveProfile()?.key||s.llmGeminiKey,c=this.getModelName();if(!l)throw new Error("\u8BF7\u5148\u914D\u7F6E Gemini API Key");let u=`Source: ${t}
Broken Translation: ${r}
Error: ${n}
Please return ONLY the fixed translation string.`,d=`${ope}/models/${c}:generateContent?key=${l}`,p=await(0,Iz.requestUrl)({url:d,method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({contents:[{role:"user",parts:[{text:u}]}],systemInstruction:{parts:[{text:a}]},generationConfig:{temperature:.2}}),throw:!1});if(p.status!==200){let x=p.json?.error?.message||`HTTP ${p.status}`;throw new Error(`Gemini API \u9519\u8BEF: ${x}`)}let m=p.json?.candidates?.[0]?.content?.parts?.[0]?.text;if(!m||m.trim()==="")throw new Error("AI \u8FD4\u56DE\u7684\u4FEE\u590D\u7ED3\u679C\u4E3A\u7A7A");let h=m.trim();return h.startsWith('"')&&h.endsWith('"')&&(h=h.slice(1,-1)),h.startsWith("'")&&h.endsWith("'")&&(h=h.slice(1,-1)),h}};function jc(){switch(Ue.getState().i18n.settings.llmApi){case 1:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:return new SC;case 2:return new Uk;case 3:return new jh;default:return new SC}}$r();var Vk=()=>{let e=it.use.astItems(),t=it.use.updateAstItems(),r=su.use.i18n(),[n,a]=(0,ka.useState)(r.settings.language||r.settings.llmLanguage||"zh-cn"),[i,s]=(0,ka.useState)(r.settings.llmStyle),[o,l]=(0,ka.useState)(r.settings.llmBatchSize?.toString()||"20"),[c,u]=(0,ka.useState)(r.settings.llmConcurrencyLimit?.toString()||"3"),[d,f]=(0,ka.useState)(!1),[p,m]=(0,ka.useState)(!1),[h,x]=(0,ka.useState)(!1),[g,y]=(0,ka.useState)(r.settings.llmTimeout?.toString()||"60000"),[b,S]=(0,ka.useState)(!1),[w,E]=(0,ka.useState)(!1),[C,N]=(0,ka.useState)(0),[_,O]=(0,ka.useState)(0),[D,W]=(0,ka.useState)(0),[Z,me]=(0,ka.useState)(0),[Q,V]=(0,ka.useState)(0),U=(0,ka.useRef)(null),k=(0,ka.useMemo)(()=>e.filter(q=>d||!q.target||q.target.trim()===""||q.target===q.source),[e,d]);(0,ka.useEffect)(()=>{a(r.settings.language||r.settings.llmLanguage||"zh-cn"),s(r.settings.llmStyle),l(r.settings.llmBatchSize?.toString()||"20"),u(r.settings.llmConcurrencyLimit?.toString()||"3"),y(r.settings.llmTimeout?.toString()||"60000")},[r.settings.language,r.settings.llmLanguage,r.settings.llmStyle,r.settings.llmBatchSize,r.settings.llmConcurrencyLimit,r.settings.llmTimeout]);let L=q=>{Object.assign(r.settings,q),r.saveSettings()};return{state:{language:n,style:i,batchSize:o,concurrencyLimit:c,overwrite:d,inputError:p,concurrencyError:h,isTranslating:w,progress:C,processedCount:_,totalCount:D,currentBatch:Z,totalBatches:Q,targetItems:k,timeout:g,timeoutError:b,get estimation(){return jc().estimateTokens(k,"ast")}},actions:{setLanguage:q=>{a(q),L({language:q,llmLanguage:q})},setStyle:q=>{s(q),L({llmStyle:q})},setBatchSize:q=>{let be=q.target.value;l(be);let Ie=parseInt(be,10);isNaN(Ie)||Ie<=0?m(!0):m(!1)},setConcurrencyLimit:q=>{let be=q.target.value;u(be);let Ie=parseInt(be,10);isNaN(Ie)||Ie<=0?x(!0):x(!1)},setOverwrite:f,handleTimeoutChange:q=>{let be=q.target.value;y(be);let Ie=parseInt(be,10);isNaN(Ie)||Ie<=0?S(!0):S(!1)},handleBatchSizeBlur:()=>{let q=parseInt(o,10);!isNaN(q)&&q>0?(L({llmBatchSize:q}),m(!1)):(l(r.settings.llmBatchSize?.toString()||"20"),m(!1))},handleConcurrencyLimitBlur:()=>{let q=parseInt(c,10);!isNaN(q)&&q>0?(L({llmConcurrencyLimit:q}),x(!1)):(u(r.settings.llmConcurrencyLimit?.toString()||"3"),x(!1))},handleTimeoutBlur:()=>{let q=parseInt(g,10);!isNaN(q)&&q>0?(L({llmTimeout:q}),S(!1)):(y(r.settings.llmTimeout?.toString()||"60000"),S(!1))},handleBatchTranslation:async()=>{if(!w){if(k.length===0){Vs.info(v("Common.Notices.NoItemsToTranslate"));return}E(!0),O(0),W(k.length),N(0),me(0),V(1),U.current=new AbortController;try{await jc().astTranslate(k,async(be,Ie,Ne)=>{let He=Math.min(Math.round(Ie/Ne*k.length),k.length);O(He),N(Ie/Ne*100),me(Ie),V(Ne);let xt=be.map(Ce=>({id:Ce.id,updates:{target:Ce.target}}));t(xt)},U.current.signal),Vs.success(v("Common.Notices.BatchTranslateSuccess"))}catch(q){q.name==="AbortError"||q.message===v("Common.Notices.TaskCancelled")||U.current?.signal.aborted||Vs.error(v("Common.Notices.TranslateFail",{message:q.message}))}finally{U.current&&(E(!1),U.current=null)}}},handleStop:()=>{U.current&&(U.current.abort(),U.current=null,E(!1),Vs.info(v("Common.Notices.TaskStopped")))}}}};var qn=A(oe()),lpe=({translationEntries:e=[],progress:t=0,initialSettings:r={},onSaveSettings:n,initialFilter:a={},onFilterChange:i,astController:s,activeTab:o,onTabChange:l,onIncrementalExtract:c,onOpenFile:u,onDiagnose:d,isDiagnosing:f,errorItems:p,hasChecked:m,setActiveTab:h,onClearDiagnose:x,onRestoreAllErrors:g,onUnusedDiagnose:y,onDeleteUnused:b,isUnusedScan:S,isSecurityScan:w,onSecurityDiagnose:E,isApplied:C,onJumpError:N,onAiFixError:_})=>{let{t:O}=Ve(),D=Vk(),W=s||D,[Z,me]=(0,TC.useState)(!0),[Q,V]=(0,TC.useState)(!0),[U,k]=(0,TC.useState)(!0),[L,M]=(0,TC.useState)(!0);return(0,qn.jsxs)("div",{className:"flex flex-col w-full h-full",children:[(0,qn.jsxs)("div",{className:"flex items-center justify-between px-3 py-2 border-b shrink-0",children:[(0,qn.jsxs)("div",{className:"flex items-center text-sm font-semibold gap-1.5",children:[(0,qn.jsx)(bo,{className:"w-4 h-4"}),(0,qn.jsx)("span",{children:O("Editor.Titles.Sidebar")})]}),(0,qn.jsxs)(ri,{children:[(0,qn.jsx)(ni,{asChild:!0,children:(0,qn.jsxs)(we,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",children:[(0,qn.jsx)(Zo,{className:"w-4 h-4"}),(0,qn.jsx)("span",{className:"sr-only",children:O("Editor.Labels.SidebarViewOptions")})]})}),(0,qn.jsxs)(ai,{align:"end",className:"w-48",children:[(0,qn.jsx)(xb,{children:O("Editor.Labels.SidebarShowCards")}),(0,qn.jsx)(tc,{}),(0,qn.jsx)(zs,{checked:Z,onCheckedChange:me,children:O("Editor.Stats.Title")}),(0,qn.jsx)(zs,{checked:Q,onCheckedChange:V,children:O("Editor.Titles.Insert")}),(0,qn.jsx)(zs,{checked:U,onCheckedChange:k,children:O("Editor.Titles.QuickActions")}),(0,qn.jsx)(zs,{checked:L,onCheckedChange:M,children:O("Editor.Titles.Ai")})]})]})]}),(0,qn.jsx)(dr,{className:"flex-1 min-h-0 px-2 pb-2",children:(0,qn.jsxs)("div",{className:"space-y-4 pb-4",children:[Z&&(0,qn.jsx)(LB,{items:e}),Q&&(0,qn.jsx)(RB,{}),U&&(0,qn.jsx)(hg,{onIncrementalExtract:c||(()=>{}),onClearUntranslated:it.use.deleteUntranslatedAstItems(),onOpenFile:u,isApplied:C}),(0,qn.jsx)(aN,{onDiagnose:d,onUnusedDiagnose:y,onSecurityDiagnose:E,onDeleteUnused:b,onClear:x,onRestoreAllErrors:g,isDiagnosing:f,isUnusedScan:S,isSecurityScan:w,errorItems:p||[],hasChecked:m,setActiveTab:h,onJumpError:N,onAiFixError:_}),L&&(0,qn.jsx)(qce,{controller:W})]})})]})};var Ni=A(Le());tr();Kt();var PC=A(Le(),1);function Tm(e,t){return typeof e=="function"?e(t):e}function fl(e,t){return r=>{t.setState(n=>({...n,[e]:Tm(r,n[e])}))}}function Kk(e){return e instanceof Function}function Glt(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function Klt(e,t){let r=[],n=a=>{a.forEach(i=>{r.push(i);let s=t(i);s!=null&&s.length&&n(s)})};return n(e),r}function rr(e,t,r){let n=[],a;return i=>{let s;r.key&&r.debug&&(s=Date.now());let o=e(i);if(!(o.length!==n.length||o.some((u,d)=>n[d]!==u)))return a;n=o;let c;if(r.key&&r.debug&&(c=Date.now()),a=t(...o),r==null||r.onChange==null||r.onChange(a),r.key&&r.debug&&r!=null&&r.debug()){let u=Math.round((Date.now()-s)*100)/100,f=Math.round((Date.now()-c)*100)/100/16,p=(m,h)=>{for(m=String(m);m.length<h;)m=" "+m;return m}}return a}}function nr(e,t,r,n){return{debug:()=>{var a;return(a=e?.debugAll)!=null?a:e[t]},key:!1,onChange:n}}function Wlt(e,t,r,n){let a=()=>{var s;return(s=i.getValue())!=null?s:e.options.renderFallbackValue},i={id:`${t.id}_${r.id}`,row:t,column:r,getValue:()=>t.getValue(n),renderValue:a,getContext:rr(()=>[e,r,t,i],(s,o,l,c)=>({table:s,column:o,row:l,cell:c,getValue:c.getValue,renderValue:c.renderValue}),nr(e.options,"debugCells","cell.getContext"))};return e._features.forEach(s=>{s.createCell==null||s.createCell(i,r,t,e)},{}),i}function Xlt(e,t,r,n){var a,i;let o={...e._getDefaultColumnDef(),...t},l=o.accessorKey,c=(a=(i=o.id)!=null?i:l?typeof String.prototype.replaceAll=="function"?l.replaceAll(".","_"):l.replace(/\./g,"_"):void 0)!=null?a:typeof o.header=="string"?o.header:void 0,u;if(o.accessorFn?u=o.accessorFn:l&&(l.includes(".")?u=f=>{let p=f;for(let h of l.split(".")){var m;p=(m=p)==null?void 0:m[h]}return p}:u=f=>f[o.accessorKey]),!c)throw new Error;let d={id:`${String(c)}`,accessorFn:u,parent:n,depth:r,columnDef:o,columns:[],getFlatColumns:rr(()=>[!0],()=>{var f;return[d,...(f=d.columns)==null?void 0:f.flatMap(p=>p.getFlatColumns())]},nr(e.options,"debugColumns","column.getFlatColumns")),getLeafColumns:rr(()=>[e._getOrderColumnsFn()],f=>{var p;if((p=d.columns)!=null&&p.length){let m=d.columns.flatMap(h=>h.getLeafColumns());return f(m)}return[d]},nr(e.options,"debugColumns","column.getLeafColumns"))};for(let f of e._features)f.createColumn==null||f.createColumn(d,e);return d}var vs="debugHeaders";function cpe(e,t,r){var n;let i={id:(n=r.id)!=null?n:t.id,column:t,index:r.index,isPlaceholder:!!r.isPlaceholder,placeholderId:r.placeholderId,depth:r.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{let s=[],o=l=>{l.subHeaders&&l.subHeaders.length&&l.subHeaders.map(o),s.push(l)};return o(i),s},getContext:()=>({table:e,header:i,column:t})};return e._features.forEach(s=>{s.createHeader==null||s.createHeader(i,e)}),i}var Ylt={createTable:e=>{e.getHeaderGroups=rr(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,r,n,a)=>{var i,s;let o=(i=n?.map(d=>r.find(f=>f.id===d)).filter(Boolean))!=null?i:[],l=(s=a?.map(d=>r.find(f=>f.id===d)).filter(Boolean))!=null?s:[],c=r.filter(d=>!(n!=null&&n.includes(d.id))&&!(a!=null&&a.includes(d.id)));return qk(t,[...o,...c,...l],e)},nr(e.options,vs,"getHeaderGroups")),e.getCenterHeaderGroups=rr(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,r,n,a)=>(r=r.filter(i=>!(n!=null&&n.includes(i.id))&&!(a!=null&&a.includes(i.id))),qk(t,r,e,"center")),nr(e.options,vs,"getCenterHeaderGroups")),e.getLeftHeaderGroups=rr(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,r,n)=>{var a;let i=(a=n?.map(s=>r.find(o=>o.id===s)).filter(Boolean))!=null?a:[];return qk(t,i,e,"left")},nr(e.options,vs,"getLeftHeaderGroups")),e.getRightHeaderGroups=rr(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,r,n)=>{var a;let i=(a=n?.map(s=>r.find(o=>o.id===s)).filter(Boolean))!=null?a:[];return qk(t,i,e,"right")},nr(e.options,vs,"getRightHeaderGroups")),e.getFooterGroups=rr(()=>[e.getHeaderGroups()],t=>[...t].reverse(),nr(e.options,vs,"getFooterGroups")),e.getLeftFooterGroups=rr(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),nr(e.options,vs,"getLeftFooterGroups")),e.getCenterFooterGroups=rr(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),nr(e.options,vs,"getCenterFooterGroups")),e.getRightFooterGroups=rr(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),nr(e.options,vs,"getRightFooterGroups")),e.getFlatHeaders=rr(()=>[e.getHeaderGroups()],t=>t.map(r=>r.headers).flat(),nr(e.options,vs,"getFlatHeaders")),e.getLeftFlatHeaders=rr(()=>[e.getLeftHeaderGroups()],t=>t.map(r=>r.headers).flat(),nr(e.options,vs,"getLeftFlatHeaders")),e.getCenterFlatHeaders=rr(()=>[e.getCenterHeaderGroups()],t=>t.map(r=>r.headers).flat(),nr(e.options,vs,"getCenterFlatHeaders")),e.getRightFlatHeaders=rr(()=>[e.getRightHeaderGroups()],t=>t.map(r=>r.headers).flat(),nr(e.options,vs,"getRightFlatHeaders")),e.getCenterLeafHeaders=rr(()=>[e.getCenterFlatHeaders()],t=>t.filter(r=>{var n;return!((n=r.subHeaders)!=null&&n.length)}),nr(e.options,vs,"getCenterLeafHeaders")),e.getLeftLeafHeaders=rr(()=>[e.getLeftFlatHeaders()],t=>t.filter(r=>{var n;return!((n=r.subHeaders)!=null&&n.length)}),nr(e.options,vs,"getLeftLeafHeaders")),e.getRightLeafHeaders=rr(()=>[e.getRightFlatHeaders()],t=>t.filter(r=>{var n;return!((n=r.subHeaders)!=null&&n.length)}),nr(e.options,vs,"getRightLeafHeaders")),e.getLeafHeaders=rr(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,r,n)=>{var a,i,s,o,l,c;return[...(a=(i=t[0])==null?void 0:i.headers)!=null?a:[],...(s=(o=r[0])==null?void 0:o.headers)!=null?s:[],...(l=(c=n[0])==null?void 0:c.headers)!=null?l:[]].map(u=>u.getLeafHeaders()).flat()},nr(e.options,vs,"getLeafHeaders"))}};function qk(e,t,r,n){var a,i;let s=0,o=function(f,p){p===void 0&&(p=1),s=Math.max(s,p),f.filter(m=>m.getIsVisible()).forEach(m=>{var h;(h=m.columns)!=null&&h.length&&o(m.columns,p+1)},0)};o(e);let l=[],c=(f,p)=>{let m={depth:p,id:[n,`${p}`].filter(Boolean).join("_"),headers:[]},h=[];f.forEach(x=>{let g=[...h].reverse()[0],y=x.column.depth===m.depth,b,S=!1;if(y&&x.column.parent?b=x.column.parent:(b=x.column,S=!0),g&&g?.column===b)g.subHeaders.push(x);else{let w=cpe(r,b,{id:[n,p,b.id,x?.id].filter(Boolean).join("_"),isPlaceholder:S,placeholderId:S?`${h.filter(E=>E.column===b).length}`:void 0,depth:p,index:h.length});w.subHeaders.push(x),h.push(w)}m.headers.push(x),x.headerGroup=m}),l.push(m),p>0&&c(h,p-1)},u=t.map((f,p)=>cpe(r,f,{depth:s,index:p}));c(u,s-1),l.reverse();let d=f=>f.filter(m=>m.column.getIsVisible()).map(m=>{let h=0,x=0,g=[0];m.subHeaders&&m.subHeaders.length?(g=[],d(m.subHeaders).forEach(b=>{let{colSpan:S,rowSpan:w}=b;h+=S,g.push(w)})):h=1;let y=Math.min(...g);return x=x+y,m.colSpan=h,m.rowSpan=x,{colSpan:h,rowSpan:x}});return d((a=(i=l[0])==null?void 0:i.headers)!=null?a:[]),l}var Jlt=(e,t,r,n,a,i,s)=>{let o={id:t,index:n,original:r,depth:a,parentId:s,_valuesCache:{},_uniqueValuesCache:{},getValue:l=>{if(o._valuesCache.hasOwnProperty(l))return o._valuesCache[l];let c=e.getColumn(l);if(c!=null&&c.accessorFn)return o._valuesCache[l]=c.accessorFn(o.original,n),o._valuesCache[l]},getUniqueValues:l=>{if(o._uniqueValuesCache.hasOwnProperty(l))return o._uniqueValuesCache[l];let c=e.getColumn(l);if(c!=null&&c.accessorFn)return c.columnDef.getUniqueValues?(o._uniqueValuesCache[l]=c.columnDef.getUniqueValues(o.original,n),o._uniqueValuesCache[l]):(o._uniqueValuesCache[l]=[o.getValue(l)],o._uniqueValuesCache[l])},renderValue:l=>{var c;return(c=o.getValue(l))!=null?c:e.options.renderFallbackValue},subRows:i??[],getLeafRows:()=>Klt(o.subRows,l=>l.subRows),getParentRow:()=>o.parentId?e.getRow(o.parentId,!0):void 0,getParentRows:()=>{let l=[],c=o;for(;;){let u=c.getParentRow();if(!u)break;l.push(u),c=u}return l.reverse()},getAllCells:rr(()=>[e.getAllLeafColumns()],l=>l.map(c=>Wlt(e,o,c,c.id)),nr(e.options,"debugRows","getAllCells")),_getAllCellsByColumnId:rr(()=>[o.getAllCells()],l=>l.reduce((c,u)=>(c[u.column.id]=u,c),{}),nr(e.options,"debugRows","getAllCellsByColumnId"))};for(let l=0;l<e._features.length;l++){let c=e._features[l];c==null||c.createRow==null||c.createRow(o,e)}return o},Zlt={createColumn:(e,t)=>{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},dpe=(e,t,r)=>{var n,a;let i=r==null||(n=r.toString())==null?void 0:n.toLowerCase();return Boolean((a=e.getValue(t))==null||(a=a.toString())==null||(a=a.toLowerCase())==null?void 0:a.includes(i))};dpe.autoRemove=e=>zc(e);var fpe=(e,t,r)=>{var n;return Boolean((n=e.getValue(t))==null||(n=n.toString())==null?void 0:n.includes(r))};fpe.autoRemove=e=>zc(e);var ppe=(e,t,r)=>{var n;return((n=e.getValue(t))==null||(n=n.toString())==null?void 0:n.toLowerCase())===r?.toLowerCase()};ppe.autoRemove=e=>zc(e);var mpe=(e,t,r)=>{var n;return(n=e.getValue(t))==null?void 0:n.includes(r)};mpe.autoRemove=e=>zc(e);var hpe=(e,t,r)=>!r.some(n=>{var a;return!((a=e.getValue(t))!=null&&a.includes(n))});hpe.autoRemove=e=>zc(e)||!(e!=null&&e.length);var gpe=(e,t,r)=>r.some(n=>{var a;return(a=e.getValue(t))==null?void 0:a.includes(n)});gpe.autoRemove=e=>zc(e)||!(e!=null&&e.length);var ype=(e,t,r)=>e.getValue(t)===r;ype.autoRemove=e=>zc(e);var xpe=(e,t,r)=>e.getValue(t)==r;xpe.autoRemove=e=>zc(e);var jz=(e,t,r)=>{let[n,a]=r,i=e.getValue(t);return i>=n&&i<=a};jz.resolveFilterValue=e=>{let[t,r]=e,n=typeof t!="number"?parseFloat(t):t,a=typeof r!="number"?parseFloat(r):r,i=t===null||Number.isNaN(n)?-1/0:n,s=r===null||Number.isNaN(a)?1/0:a;if(i>s){let o=i;i=s,s=o}return[i,s]};jz.autoRemove=e=>zc(e)||zc(e[0])&&zc(e[1]);var gf={includesString:dpe,includesStringSensitive:fpe,equalsString:ppe,arrIncludes:mpe,arrIncludesAll:hpe,arrIncludesSome:gpe,equals:ype,weakEquals:xpe,inNumberRange:jz};function zc(e){return e==null||e===""}var Qlt={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:fl("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{let r=t.getCoreRowModel().flatRows[0],n=r?.getValue(e.id);return typeof n=="string"?gf.includesString:typeof n=="number"?gf.inNumberRange:typeof n=="boolean"||n!==null&&typeof n=="object"?gf.equals:Array.isArray(n)?gf.arrIncludes:gf.weakEquals},e.getFilterFn=()=>{var r,n;return Kk(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(r=(n=t.options.filterFns)==null?void 0:n[e.columnDef.filterFn])!=null?r:gf[e.columnDef.filterFn]},e.getCanFilter=()=>{var r,n,a;return((r=e.columnDef.enableColumnFilter)!=null?r:!0)&&((n=t.options.enableColumnFilters)!=null?n:!0)&&((a=t.options.enableFilters)!=null?a:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var r;return(r=t.getState().columnFilters)==null||(r=r.find(n=>n.id===e.id))==null?void 0:r.value},e.getFilterIndex=()=>{var r,n;return(r=(n=t.getState().columnFilters)==null?void 0:n.findIndex(a=>a.id===e.id))!=null?r:-1},e.setFilterValue=r=>{t.setColumnFilters(n=>{let a=e.getFilterFn(),i=n?.find(u=>u.id===e.id),s=Tm(r,i?i.value:void 0);if(upe(a,s,e)){var o;return(o=n?.filter(u=>u.id!==e.id))!=null?o:[]}let l={id:e.id,value:s};if(i){var c;return(c=n?.map(u=>u.id===e.id?l:u))!=null?c:[]}return n!=null&&n.length?[...n,l]:[l]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{let r=e.getAllLeafColumns(),n=a=>{var i;return(i=Tm(t,a))==null?void 0:i.filter(s=>{let o=r.find(l=>l.id===s.id);if(o){let l=o.getFilterFn();if(upe(l,s.value,o))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(n)},e.resetColumnFilters=t=>{var r,n;e.setColumnFilters(t?[]:(r=(n=e.initialState)==null?void 0:n.columnFilters)!=null?r:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function upe(e,t,r){return(e&&e.autoRemove?e.autoRemove(t,r):!1)||typeof t>"u"||typeof t=="string"&&!t}var ect=(e,t,r)=>r.reduce((n,a)=>{let i=a.getValue(e);return n+(typeof i=="number"?i:0)},0),tct=(e,t,r)=>{let n;return r.forEach(a=>{let i=a.getValue(e);i!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}),n},rct=(e,t,r)=>{let n;return r.forEach(a=>{let i=a.getValue(e);i!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}),n},nct=(e,t,r)=>{let n,a;return r.forEach(i=>{let s=i.getValue(e);s!=null&&(n===void 0?s>=s&&(n=a=s):(n>s&&(n=s),a<s&&(a=s)))}),[n,a]},act=(e,t)=>{let r=0,n=0;if(t.forEach(a=>{let i=a.getValue(e);i!=null&&(i=+i)>=i&&(++r,n+=i)}),r)return n/r},ict=(e,t)=>{if(!t.length)return;let r=t.map(i=>i.getValue(e));if(!Glt(r))return;if(r.length===1)return r[0];let n=Math.floor(r.length/2),a=r.sort((i,s)=>i-s);return r.length%2!==0?a[n]:(a[n-1]+a[n])/2},sct=(e,t)=>Array.from(new Set(t.map(r=>r.getValue(e))).values()),oct=(e,t)=>new Set(t.map(r=>r.getValue(e))).size,lct=(e,t)=>t.length,Az={sum:ect,min:tct,max:rct,extent:nct,mean:act,median:ict,unique:sct,uniqueCount:oct,count:lct},cct={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,r;return(t=(r=e.getValue())==null||r.toString==null?void 0:r.toString())!=null?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:fl("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(r=>r!=null&&r.includes(e.id)?r.filter(n=>n!==e.id):[...r??[],e.id])},e.getCanGroup=()=>{var r,n;return((r=e.columnDef.enableGrouping)!=null?r:!0)&&((n=t.options.enableGrouping)!=null?n:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var r;return(r=t.getState().grouping)==null?void 0:r.includes(e.id)},e.getGroupedIndex=()=>{var r;return(r=t.getState().grouping)==null?void 0:r.indexOf(e.id)},e.getToggleGroupingHandler=()=>{let r=e.getCanGroup();return()=>{r&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{let r=t.getCoreRowModel().flatRows[0],n=r?.getValue(e.id);if(typeof n=="number")return Az.sum;if(Object.prototype.toString.call(n)==="[object Date]")return Az.extent},e.getAggregationFn=()=>{var r,n;if(!e)throw new Error;return Kk(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(r=(n=t.options.aggregationFns)==null?void 0:n[e.columnDef.aggregationFn])!=null?r:Az[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var r,n;e.setGrouping(t?[]:(r=(n=e.initialState)==null?void 0:n.grouping)!=null?r:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=r=>{if(e._groupingValuesCache.hasOwnProperty(r))return e._groupingValuesCache[r];let n=t.getColumn(r);return n!=null&&n.columnDef.getGroupingValue?(e._groupingValuesCache[r]=n.columnDef.getGroupingValue(e.original),e._groupingValuesCache[r]):e.getValue(r)},e._groupingValuesCache={}},createCell:(e,t,r,n)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===r.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var a;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((a=r.subRows)!=null&&a.length)}}};function uct(e,t,r){if(!(t!=null&&t.length)||!r)return e;let n=e.filter(i=>!t.includes(i.id));return r==="remove"?n:[...t.map(i=>e.find(s=>s.id===i)).filter(Boolean),...n]}var dct={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:fl("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=rr(r=>[CC(t,r)],r=>r.findIndex(n=>n.id===e.id),nr(t.options,"debugColumns","getIndex")),e.getIsFirstColumn=r=>{var n;return((n=CC(t,r)[0])==null?void 0:n.id)===e.id},e.getIsLastColumn=r=>{var n;let a=CC(t,r);return((n=a[a.length-1])==null?void 0:n.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var r;e.setColumnOrder(t?[]:(r=e.initialState.columnOrder)!=null?r:[])},e._getOrderColumnsFn=rr(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,r,n)=>a=>{let i=[];if(!(t!=null&&t.length))i=a;else{let s=[...t],o=[...a];for(;o.length&&s.length;){let l=s.shift(),c=o.findIndex(u=>u.id===l);c>-1&&i.push(o.splice(c,1)[0])}i=[...i,...o]}return uct(i,r,n)},nr(e.options,"debugTable","_getOrderColumnsFn"))}},Nz=()=>({left:[],right:[]}),fct={getInitialState:e=>({columnPinning:Nz(),...e}),getDefaultOptions:e=>({onColumnPinningChange:fl("columnPinning",e)}),createColumn:(e,t)=>{e.pin=r=>{let n=e.getLeafColumns().map(a=>a.id).filter(Boolean);t.setColumnPinning(a=>{var i,s;if(r==="right"){var o,l;return{left:((o=a?.left)!=null?o:[]).filter(d=>!(n!=null&&n.includes(d))),right:[...((l=a?.right)!=null?l:[]).filter(d=>!(n!=null&&n.includes(d))),...n]}}if(r==="left"){var c,u;return{left:[...((c=a?.left)!=null?c:[]).filter(d=>!(n!=null&&n.includes(d))),...n],right:((u=a?.right)!=null?u:[]).filter(d=>!(n!=null&&n.includes(d)))}}return{left:((i=a?.left)!=null?i:[]).filter(d=>!(n!=null&&n.includes(d))),right:((s=a?.right)!=null?s:[]).filter(d=>!(n!=null&&n.includes(d)))}})},e.getCanPin=()=>e.getLeafColumns().some(n=>{var a,i,s;return((a=n.columnDef.enablePinning)!=null?a:!0)&&((i=(s=t.options.enableColumnPinning)!=null?s:t.options.enablePinning)!=null?i:!0)}),e.getIsPinned=()=>{let r=e.getLeafColumns().map(o=>o.id),{left:n,right:a}=t.getState().columnPinning,i=r.some(o=>n?.includes(o)),s=r.some(o=>a?.includes(o));return i?"left":s?"right":!1},e.getPinnedIndex=()=>{var r,n;let a=e.getIsPinned();return a?(r=(n=t.getState().columnPinning)==null||(n=n[a])==null?void 0:n.indexOf(e.id))!=null?r:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=rr(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(r,n,a)=>{let i=[...n??[],...a??[]];return r.filter(s=>!i.includes(s.column.id))},nr(t.options,"debugRows","getCenterVisibleCells")),e.getLeftVisibleCells=rr(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(r,n)=>(n??[]).map(i=>r.find(s=>s.column.id===i)).filter(Boolean).map(i=>({...i,position:"left"})),nr(t.options,"debugRows","getLeftVisibleCells")),e.getRightVisibleCells=rr(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(r,n)=>(n??[]).map(i=>r.find(s=>s.column.id===i)).filter(Boolean).map(i=>({...i,position:"right"})),nr(t.options,"debugRows","getRightVisibleCells"))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var r,n;return e.setColumnPinning(t?Nz():(r=(n=e.initialState)==null?void 0:n.columnPinning)!=null?r:Nz())},e.getIsSomeColumnsPinned=t=>{var r;let n=e.getState().columnPinning;if(!t){var a,i;return Boolean(((a=n.left)==null?void 0:a.length)||((i=n.right)==null?void 0:i.length))}return Boolean((r=n[t])==null?void 0:r.length)},e.getLeftLeafColumns=rr(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,r)=>(r??[]).map(n=>t.find(a=>a.id===n)).filter(Boolean),nr(e.options,"debugColumns","getLeftLeafColumns")),e.getRightLeafColumns=rr(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,r)=>(r??[]).map(n=>t.find(a=>a.id===n)).filter(Boolean),nr(e.options,"debugColumns","getRightLeafColumns")),e.getCenterLeafColumns=rr(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,r,n)=>{let a=[...r??[],...n??[]];return t.filter(i=>!a.includes(i.id))},nr(e.options,"debugColumns","getCenterLeafColumns"))}};function pct(e){return e||(typeof document<"u"?document:null)}var Hk={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},kz=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),mct={getDefaultColumnDef:()=>Hk,getInitialState:e=>({columnSizing:{},columnSizingInfo:kz(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:fl("columnSizing",e),onColumnSizingInfoChange:fl("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var r,n,a;let i=t.getState().columnSizing[e.id];return Math.min(Math.max((r=e.columnDef.minSize)!=null?r:Hk.minSize,(n=i??e.columnDef.size)!=null?n:Hk.size),(a=e.columnDef.maxSize)!=null?a:Hk.maxSize)},e.getStart=rr(r=>[r,CC(t,r),t.getState().columnSizing],(r,n)=>n.slice(0,e.getIndex(r)).reduce((a,i)=>a+i.getSize(),0),nr(t.options,"debugColumns","getStart")),e.getAfter=rr(r=>[r,CC(t,r),t.getState().columnSizing],(r,n)=>n.slice(e.getIndex(r)+1).reduce((a,i)=>a+i.getSize(),0),nr(t.options,"debugColumns","getAfter")),e.resetSize=()=>{t.setColumnSizing(r=>{let{[e.id]:n,...a}=r;return a})},e.getCanResize=()=>{var r,n;return((r=e.columnDef.enableResizing)!=null?r:!0)&&((n=t.options.enableColumnResizing)!=null?n:!0)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let r=0,n=a=>{if(a.subHeaders.length)a.subHeaders.forEach(n);else{var i;r+=(i=a.column.getSize())!=null?i:0}};return n(e),r},e.getStart=()=>{if(e.index>0){let r=e.headerGroup.headers[e.index-1];return r.getStart()+r.getSize()}return 0},e.getResizeHandler=r=>{let n=t.getColumn(e.column.id),a=n?.getCanResize();return i=>{if(!n||!a||(i.persist==null||i.persist(),_z(i)&&i.touches&&i.touches.length>1))return;let s=e.getSize(),o=e?e.getLeafHeaders().map(g=>[g.column.id,g.column.getSize()]):[[n.id,n.getSize()]],l=_z(i)?Math.round(i.touches[0].clientX):i.clientX,c={},u=(g,y)=>{typeof y=="number"&&(t.setColumnSizingInfo(b=>{var S,w;let E=t.options.columnResizeDirection==="rtl"?-1:1,C=(y-((S=b?.startOffset)!=null?S:0))*E,N=Math.max(C/((w=b?.startSize)!=null?w:0),-.999999);return b.columnSizingStart.forEach(_=>{let[O,D]=_;c[O]=Math.round(Math.max(D+D*N,0)*100)/100}),{...b,deltaOffset:C,deltaPercentage:N}}),(t.options.columnResizeMode==="onChange"||g==="end")&&t.setColumnSizing(b=>({...b,...c})))},d=g=>u("move",g),f=g=>{u("end",g),t.setColumnSizingInfo(y=>({...y,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},p=pct(r),m={moveHandler:g=>d(g.clientX),upHandler:g=>{p?.removeEventListener("mousemove",m.moveHandler),p?.removeEventListener("mouseup",m.upHandler),f(g.clientX)}},h={moveHandler:g=>(g.cancelable&&(g.preventDefault(),g.stopPropagation()),d(g.touches[0].clientX),!1),upHandler:g=>{var y;p?.removeEventListener("touchmove",h.moveHandler),p?.removeEventListener("touchend",h.upHandler),g.cancelable&&(g.preventDefault(),g.stopPropagation()),f((y=g.touches[0])==null?void 0:y.clientX)}},x=hct()?{passive:!1}:!1;_z(i)?(p?.addEventListener("touchmove",h.moveHandler,x),p?.addEventListener("touchend",h.upHandler,x)):(p?.addEventListener("mousemove",m.moveHandler,x),p?.addEventListener("mouseup",m.upHandler,x)),t.setColumnSizingInfo(g=>({...g,startOffset:l,startSize:s,deltaOffset:0,deltaPercentage:0,columnSizingStart:o,isResizingColumn:n.id}))}}},createTable:e=>{e.setColumnSizing=t=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var r;e.setColumnSizing(t?{}:(r=e.initialState.columnSizing)!=null?r:{})},e.resetHeaderSizeInfo=t=>{var r;e.setColumnSizingInfo(t?kz():(r=e.initialState.columnSizingInfo)!=null?r:kz())},e.getTotalSize=()=>{var t,r;return(t=(r=e.getHeaderGroups()[0])==null?void 0:r.headers.reduce((n,a)=>n+a.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,r;return(t=(r=e.getLeftHeaderGroups()[0])==null?void 0:r.headers.reduce((n,a)=>n+a.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,r;return(t=(r=e.getCenterHeaderGroups()[0])==null?void 0:r.headers.reduce((n,a)=>n+a.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,r;return(t=(r=e.getRightHeaderGroups()[0])==null?void 0:r.headers.reduce((n,a)=>n+a.getSize(),0))!=null?t:0}}},Gk=null;function hct(){if(typeof Gk=="boolean")return Gk;let e=!1;try{let t={get passive(){return e=!0,!1}},r=()=>{};window.addEventListener("test",r,t),window.removeEventListener("test",r)}catch{e=!1}return Gk=e,Gk}function _z(e){return e.type==="touchstart"}var gct={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:fl("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=r=>{e.getCanHide()&&t.setColumnVisibility(n=>({...n,[e.id]:r??!e.getIsVisible()}))},e.getIsVisible=()=>{var r,n;let a=e.columns;return(r=a.length?a.some(i=>i.getIsVisible()):(n=t.getState().columnVisibility)==null?void 0:n[e.id])!=null?r:!0},e.getCanHide=()=>{var r,n;return((r=e.columnDef.enableHiding)!=null?r:!0)&&((n=t.options.enableHiding)!=null?n:!0)},e.getToggleVisibilityHandler=()=>r=>{e.toggleVisibility==null||e.toggleVisibility(r.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=rr(()=>[e.getAllCells(),t.getState().columnVisibility],r=>r.filter(n=>n.column.getIsVisible()),nr(t.options,"debugRows","_getAllVisibleCells")),e.getVisibleCells=rr(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(r,n,a)=>[...r,...n,...a],nr(t.options,"debugRows","getVisibleCells"))},createTable:e=>{let t=(r,n)=>rr(()=>[n(),n().filter(a=>a.getIsVisible()).map(a=>a.id).join("_")],a=>a.filter(i=>i.getIsVisible==null?void 0:i.getIsVisible()),nr(e.options,"debugColumns",r));e.getVisibleFlatColumns=t("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=r=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(r),e.resetColumnVisibility=r=>{var n;e.setColumnVisibility(r?{}:(n=e.initialState.columnVisibility)!=null?n:{})},e.toggleAllColumnsVisible=r=>{var n;r=(n=r)!=null?n:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((a,i)=>({...a,[i.id]:r||!(i.getCanHide!=null&&i.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(r=>!(r.getIsVisible!=null&&r.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(r=>r.getIsVisible==null?void 0:r.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>r=>{var n;e.toggleAllColumnsVisible((n=r.target)==null?void 0:n.checked)}}};function CC(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}var yct={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},xct={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:fl("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var r;let n=(r=e.getCoreRowModel().flatRows[0])==null||(r=r._getAllCellsByColumnId()[t.id])==null?void 0:r.getValue();return typeof n=="string"||typeof n=="number"}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var r,n,a,i;return((r=e.columnDef.enableGlobalFilter)!=null?r:!0)&&((n=t.options.enableGlobalFilter)!=null?n:!0)&&((a=t.options.enableFilters)!=null?a:!0)&&((i=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?i:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>gf.includesString,e.getGlobalFilterFn=()=>{var t,r;let{globalFilterFn:n}=e.options;return Kk(n)?n:n==="auto"?e.getGlobalAutoFilterFn():(t=(r=e.options.filterFns)==null?void 0:r[n])!=null?t:gf[n]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},bct={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:fl("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,r=!1;e._autoResetExpanded=()=>{var n,a;if(!t){e._queue(()=>{t=!0});return}if((n=(a=e.options.autoResetAll)!=null?a:e.options.autoResetExpanded)!=null?n:!e.options.manualExpanding){if(r)return;r=!0,e._queue(()=>{e.resetExpanded(),r=!1})}},e.setExpanded=n=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(n),e.toggleAllRowsExpanded=n=>{n??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=n=>{var a,i;e.setExpanded(n?{}:(a=(i=e.initialState)==null?void 0:i.expanded)!=null?a:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(n=>n.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>n=>{n.persist==null||n.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{let n=e.getState().expanded;return n===!0||Object.values(n).some(Boolean)},e.getIsAllRowsExpanded=()=>{let n=e.getState().expanded;return typeof n=="boolean"?n===!0:!(!Object.keys(n).length||e.getRowModel().flatRows.some(a=>!a.getIsExpanded()))},e.getExpandedDepth=()=>{let n=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(i=>{let s=i.split(".");n=Math.max(n,s.length)}),n},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=r=>{t.setExpanded(n=>{var a;let i=n===!0?!0:!!(n!=null&&n[e.id]),s={};if(n===!0?Object.keys(t.getRowModel().rowsById).forEach(o=>{s[o]=!0}):s=n,r=(a=r)!=null?a:!i,!i&&r)return{...s,[e.id]:!0};if(i&&!r){let{[e.id]:o,...l}=s;return l}return n})},e.getIsExpanded=()=>{var r;let n=t.getState().expanded;return!!((r=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?r:n===!0||n?.[e.id])},e.getCanExpand=()=>{var r,n,a;return(r=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?r:((n=t.options.enableExpanding)!=null?n:!0)&&!!((a=e.subRows)!=null&&a.length)},e.getIsAllParentsExpanded=()=>{let r=!0,n=e;for(;r&&n.parentId;)n=t.getRow(n.parentId,!0),r=n.getIsExpanded();return r},e.getToggleExpandedHandler=()=>{let r=e.getCanExpand();return()=>{r&&e.toggleExpanded()}}}},Mz=0,Oz=10,Lz=()=>({pageIndex:Mz,pageSize:Oz}),vct={getInitialState:e=>({...e,pagination:{...Lz(),...e?.pagination}}),getDefaultOptions:e=>({onPaginationChange:fl("pagination",e)}),createTable:e=>{let t=!1,r=!1;e._autoResetPageIndex=()=>{var n,a;if(!t){e._queue(()=>{t=!0});return}if((n=(a=e.options.autoResetAll)!=null?a:e.options.autoResetPageIndex)!=null?n:!e.options.manualPagination){if(r)return;r=!0,e._queue(()=>{e.resetPageIndex(),r=!1})}},e.setPagination=n=>{let a=i=>Tm(n,i);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(a)},e.resetPagination=n=>{var a;e.setPagination(n?Lz():(a=e.initialState.pagination)!=null?a:Lz())},e.setPageIndex=n=>{e.setPagination(a=>{let i=Tm(n,a.pageIndex),s=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return i=Math.max(0,Math.min(i,s)),{...a,pageIndex:i}})},e.resetPageIndex=n=>{var a,i;e.setPageIndex(n?Mz:(a=(i=e.initialState)==null||(i=i.pagination)==null?void 0:i.pageIndex)!=null?a:Mz)},e.resetPageSize=n=>{var a,i;e.setPageSize(n?Oz:(a=(i=e.initialState)==null||(i=i.pagination)==null?void 0:i.pageSize)!=null?a:Oz)},e.setPageSize=n=>{e.setPagination(a=>{let i=Math.max(1,Tm(n,a.pageSize)),s=a.pageSize*a.pageIndex,o=Math.floor(s/i);return{...a,pageIndex:o,pageSize:i}})},e.setPageCount=n=>e.setPagination(a=>{var i;let s=Tm(n,(i=e.options.pageCount)!=null?i:-1);return typeof s=="number"&&(s=Math.max(-1,s)),{...a,pageCount:s}}),e.getPageOptions=rr(()=>[e.getPageCount()],n=>{let a=[];return n&&n>0&&(a=[...new Array(n)].fill(null).map((i,s)=>s)),a},nr(e.options,"debugTable","getPageOptions")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{let{pageIndex:n}=e.getState().pagination,a=e.getPageCount();return a===-1?!0:a===0?!1:n<a-1},e.previousPage=()=>e.setPageIndex(n=>n-1),e.nextPage=()=>e.setPageIndex(n=>n+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var n;return(n=e.options.pageCount)!=null?n:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var n;return(n=e.options.rowCount)!=null?n:e.getPrePaginationRowModel().rows.length}}},Rz=()=>({top:[],bottom:[]}),Sct={getInitialState:e=>({rowPinning:Rz(),...e}),getDefaultOptions:e=>({onRowPinningChange:fl("rowPinning",e)}),createRow:(e,t)=>{e.pin=(r,n,a)=>{let i=n?e.getLeafRows().map(l=>{let{id:c}=l;return c}):[],s=a?e.getParentRows().map(l=>{let{id:c}=l;return c}):[],o=new Set([...s,e.id,...i]);t.setRowPinning(l=>{var c,u;if(r==="bottom"){var d,f;return{top:((d=l?.top)!=null?d:[]).filter(h=>!(o!=null&&o.has(h))),bottom:[...((f=l?.bottom)!=null?f:[]).filter(h=>!(o!=null&&o.has(h))),...Array.from(o)]}}if(r==="top"){var p,m;return{top:[...((p=l?.top)!=null?p:[]).filter(h=>!(o!=null&&o.has(h))),...Array.from(o)],bottom:((m=l?.bottom)!=null?m:[]).filter(h=>!(o!=null&&o.has(h)))}}return{top:((c=l?.top)!=null?c:[]).filter(h=>!(o!=null&&o.has(h))),bottom:((u=l?.bottom)!=null?u:[]).filter(h=>!(o!=null&&o.has(h)))}})},e.getCanPin=()=>{var r;let{enableRowPinning:n,enablePinning:a}=t.options;return typeof n=="function"?n(e):(r=n??a)!=null?r:!0},e.getIsPinned=()=>{let r=[e.id],{top:n,bottom:a}=t.getState().rowPinning,i=r.some(o=>n?.includes(o)),s=r.some(o=>a?.includes(o));return i?"top":s?"bottom":!1},e.getPinnedIndex=()=>{var r,n;let a=e.getIsPinned();if(!a)return-1;let i=(r=a==="top"?t.getTopRows():t.getBottomRows())==null?void 0:r.map(s=>{let{id:o}=s;return o});return(n=i?.indexOf(e.id))!=null?n:-1}},createTable:e=>{e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var r,n;return e.setRowPinning(t?Rz():(r=(n=e.initialState)==null?void 0:n.rowPinning)!=null?r:Rz())},e.getIsSomeRowsPinned=t=>{var r;let n=e.getState().rowPinning;if(!t){var a,i;return Boolean(((a=n.top)==null?void 0:a.length)||((i=n.bottom)==null?void 0:i.length))}return Boolean((r=n[t])==null?void 0:r.length)},e._getPinnedRows=(t,r,n)=>{var a;return((a=e.options.keepPinnedRows)==null||a?(r??[]).map(s=>{let o=e.getRow(s,!0);return o.getIsAllParentsExpanded()?o:null}):(r??[]).map(s=>t.find(o=>o.id===s))).filter(Boolean).map(s=>({...s,position:n}))},e.getTopRows=rr(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,r)=>e._getPinnedRows(t,r,"top"),nr(e.options,"debugRows","getTopRows")),e.getBottomRows=rr(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,r)=>e._getPinnedRows(t,r,"bottom"),nr(e.options,"debugRows","getBottomRows")),e.getCenterRows=rr(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,r,n)=>{let a=new Set([...r??[],...n??[]]);return t.filter(i=>!a.has(i.id))},nr(e.options,"debugRows","getCenterRows"))}},Tct={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:fl("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var r;return e.setRowSelection(t?{}:(r=e.initialState.rowSelection)!=null?r:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(r=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();let n={...r},a=e.getPreGroupedRowModel().flatRows;return t?a.forEach(i=>{i.getCanSelect()&&(n[i.id]=!0)}):a.forEach(i=>{delete n[i.id]}),n})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(r=>{let n=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),a={...r};return e.getRowModel().rows.forEach(i=>{Fz(a,i.id,n,!0,e)}),a}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=rr(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,r)=>Object.keys(t).length?Dz(e,r):{rows:[],flatRows:[],rowsById:{}},nr(e.options,"debugTable","getSelectedRowModel")),e.getFilteredSelectedRowModel=rr(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,r)=>Object.keys(t).length?Dz(e,r):{rows:[],flatRows:[],rowsById:{}},nr(e.options,"debugTable","getFilteredSelectedRowModel")),e.getGroupedSelectedRowModel=rr(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,r)=>Object.keys(t).length?Dz(e,r):{rows:[],flatRows:[],rowsById:{}},nr(e.options,"debugTable","getGroupedSelectedRowModel")),e.getIsAllRowsSelected=()=>{let t=e.getFilteredRowModel().flatRows,{rowSelection:r}=e.getState(),n=Boolean(t.length&&Object.keys(r).length);return n&&t.some(a=>a.getCanSelect()&&!r[a.id])&&(n=!1),n},e.getIsAllPageRowsSelected=()=>{let t=e.getPaginationRowModel().flatRows.filter(a=>a.getCanSelect()),{rowSelection:r}=e.getState(),n=!!t.length;return n&&t.some(a=>!r[a.id])&&(n=!1),n},e.getIsSomeRowsSelected=()=>{var t;let r=Object.keys((t=e.getState().rowSelection)!=null?t:{}).length;return r>0&&r<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{let t=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:t.filter(r=>r.getCanSelect()).some(r=>r.getIsSelected()||r.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(r,n)=>{let a=e.getIsSelected();t.setRowSelection(i=>{var s;if(r=typeof r<"u"?r:!a,e.getCanSelect()&&a===r)return i;let o={...i};return Fz(o,e.id,r,(s=n?.selectChildren)!=null?s:!0,t),o})},e.getIsSelected=()=>{let{rowSelection:r}=t.getState();return zz(e,r)},e.getIsSomeSelected=()=>{let{rowSelection:r}=t.getState();return Bz(e,r)==="some"},e.getIsAllSubRowsSelected=()=>{let{rowSelection:r}=t.getState();return Bz(e,r)==="all"},e.getCanSelect=()=>{var r;return typeof t.options.enableRowSelection=="function"?t.options.enableRowSelection(e):(r=t.options.enableRowSelection)!=null?r:!0},e.getCanSelectSubRows=()=>{var r;return typeof t.options.enableSubRowSelection=="function"?t.options.enableSubRowSelection(e):(r=t.options.enableSubRowSelection)!=null?r:!0},e.getCanMultiSelect=()=>{var r;return typeof t.options.enableMultiRowSelection=="function"?t.options.enableMultiRowSelection(e):(r=t.options.enableMultiRowSelection)!=null?r:!0},e.getToggleSelectedHandler=()=>{let r=e.getCanSelect();return n=>{var a;r&&e.toggleSelected((a=n.target)==null?void 0:a.checked)}}}},Fz=(e,t,r,n,a)=>{var i;let s=a.getRow(t,!0);r?(s.getCanMultiSelect()||Object.keys(e).forEach(o=>delete e[o]),s.getCanSelect()&&(e[t]=!0)):delete e[t],n&&(i=s.subRows)!=null&&i.length&&s.getCanSelectSubRows()&&s.subRows.forEach(o=>Fz(e,o.id,r,n,a))};function Dz(e,t){let r=e.getState().rowSelection,n=[],a={},i=function(s,o){return s.map(l=>{var c;let u=zz(l,r);if(u&&(n.push(l),a[l.id]=l),(c=l.subRows)!=null&&c.length&&(l={...l,subRows:i(l.subRows)}),u)return l}).filter(Boolean)};return{rows:i(t.rows),flatRows:n,rowsById:a}}function zz(e,t){var r;return(r=t[e.id])!=null?r:!1}function Bz(e,t,r){var n;if(!((n=e.subRows)!=null&&n.length))return!1;let a=!0,i=!1;return e.subRows.forEach(s=>{if(!(i&&!a)&&(s.getCanSelect()&&(zz(s,t)?i=!0:a=!1),s.subRows&&s.subRows.length)){let o=Bz(s,t);o==="all"?i=!0:(o==="some"&&(i=!0),a=!1)}}),a?"all":i?"some":!1}var $z=/([0-9]+)/gm,wct=(e,t,r)=>bpe(wm(e.getValue(r)).toLowerCase(),wm(t.getValue(r)).toLowerCase()),Cct=(e,t,r)=>bpe(wm(e.getValue(r)),wm(t.getValue(r))),Pct=(e,t,r)=>Uz(wm(e.getValue(r)).toLowerCase(),wm(t.getValue(r)).toLowerCase()),Ect=(e,t,r)=>Uz(wm(e.getValue(r)),wm(t.getValue(r))),Ict=(e,t,r)=>{let n=e.getValue(r),a=t.getValue(r);return n>a?1:n<a?-1:0},Act=(e,t,r)=>Uz(e.getValue(r),t.getValue(r));function Uz(e,t){return e===t?0:e>t?1:-1}function wm(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function bpe(e,t){let r=e.split($z).filter(Boolean),n=t.split($z).filter(Boolean);for(;r.length&&n.length;){let a=r.shift(),i=n.shift(),s=parseInt(a,10),o=parseInt(i,10),l=[s,o].sort();if(isNaN(l[0])){if(a>i)return 1;if(i>a)return-1;continue}if(isNaN(l[1]))return isNaN(s)?-1:1;if(s>o)return 1;if(o>s)return-1}return r.length-n.length}var wC={alphanumeric:wct,alphanumericCaseSensitive:Cct,text:Pct,textCaseSensitive:Ect,datetime:Ict,basic:Act},Nct={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:fl("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{let r=t.getFilteredRowModel().flatRows.slice(10),n=!1;for(let a of r){let i=a?.getValue(e.id);if(Object.prototype.toString.call(i)==="[object Date]")return wC.datetime;if(typeof i=="string"&&(n=!0,i.split($z).length>1))return wC.alphanumeric}return n?wC.text:wC.basic},e.getAutoSortDir=()=>{let r=t.getFilteredRowModel().flatRows[0];return typeof r?.getValue(e.id)=="string"?"asc":"desc"},e.getSortingFn=()=>{var r,n;if(!e)throw new Error;return Kk(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(r=(n=t.options.sortingFns)==null?void 0:n[e.columnDef.sortingFn])!=null?r:wC[e.columnDef.sortingFn]},e.toggleSorting=(r,n)=>{let a=e.getNextSortingOrder(),i=typeof r<"u"&&r!==null;t.setSorting(s=>{let o=s?.find(p=>p.id===e.id),l=s?.findIndex(p=>p.id===e.id),c=[],u,d=i?r:a==="desc";if(s!=null&&s.length&&e.getCanMultiSort()&&n?o?u="toggle":u="add":s!=null&&s.length&&l!==s.length-1?u="replace":o?u="toggle":u="replace",u==="toggle"&&(i||a||(u="remove")),u==="add"){var f;c=[...s,{id:e.id,desc:d}],c.splice(0,c.length-((f=t.options.maxMultiSortColCount)!=null?f:Number.MAX_SAFE_INTEGER))}else u==="toggle"?c=s.map(p=>p.id===e.id?{...p,desc:d}:p):u==="remove"?c=s.filter(p=>p.id!==e.id):c=[{id:e.id,desc:d}];return c})},e.getFirstSortDir=()=>{var r,n;return((r=(n=e.columnDef.sortDescFirst)!=null?n:t.options.sortDescFirst)!=null?r:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=r=>{var n,a;let i=e.getFirstSortDir(),s=e.getIsSorted();return s?s!==i&&((n=t.options.enableSortingRemoval)==null||n)&&(!(r&&(a=t.options.enableMultiRemove)!=null)||a)?!1:s==="desc"?"asc":"desc":i},e.getCanSort=()=>{var r,n;return((r=e.columnDef.enableSorting)!=null?r:!0)&&((n=t.options.enableSorting)!=null?n:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var r,n;return(r=(n=e.columnDef.enableMultiSort)!=null?n:t.options.enableMultiSort)!=null?r:!!e.accessorFn},e.getIsSorted=()=>{var r;let n=(r=t.getState().sorting)==null?void 0:r.find(a=>a.id===e.id);return n?n.desc?"desc":"asc":!1},e.getSortIndex=()=>{var r,n;return(r=(n=t.getState().sorting)==null?void 0:n.findIndex(a=>a.id===e.id))!=null?r:-1},e.clearSorting=()=>{t.setSorting(r=>r!=null&&r.length?r.filter(n=>n.id!==e.id):[])},e.getToggleSortingHandler=()=>{let r=e.getCanSort();return n=>{r&&(n.persist==null||n.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(n):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var r,n;e.setSorting(t?[]:(r=(n=e.initialState)==null?void 0:n.sorting)!=null?r:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},kct=[Ylt,gct,dct,fct,Zlt,Qlt,yct,xct,Nct,cct,bct,vct,Sct,Tct,mct];function vpe(e){var t,r;let n=[...kct,...(t=e._features)!=null?t:[]],a={_features:n},i=a._features.reduce((f,p)=>Object.assign(f,p.getDefaultOptions==null?void 0:p.getDefaultOptions(a)),{}),s=f=>a.options.mergeOptions?a.options.mergeOptions(i,f):{...i,...f},l={...{},...(r=e.initialState)!=null?r:{}};a._features.forEach(f=>{var p;l=(p=f.getInitialState==null?void 0:f.getInitialState(l))!=null?p:l});let c=[],u=!1,d={_features:n,options:{...i,...e},initialState:l,_queue:f=>{c.push(f),u||(u=!0,Promise.resolve().then(()=>{for(;c.length;)c.shift()();u=!1}).catch(p=>setTimeout(()=>{throw p})))},reset:()=>{a.setState(a.initialState)},setOptions:f=>{let p=Tm(f,a.options);a.options=s(p)},getState:()=>a.options.state,setState:f=>{a.options.onStateChange==null||a.options.onStateChange(f)},_getRowId:(f,p,m)=>{var h;return(h=a.options.getRowId==null?void 0:a.options.getRowId(f,p,m))!=null?h:`${m?[m.id,p].join("."):p}`},getCoreRowModel:()=>(a._getCoreRowModel||(a._getCoreRowModel=a.options.getCoreRowModel(a)),a._getCoreRowModel()),getRowModel:()=>a.getPaginationRowModel(),getRow:(f,p)=>{let m=(p?a.getPrePaginationRowModel():a.getRowModel()).rowsById[f];if(!m&&(m=a.getCoreRowModel().rowsById[f],!m))throw new Error;return m},_getDefaultColumnDef:rr(()=>[a.options.defaultColumn],f=>{var p;return f=(p=f)!=null?p:{},{header:m=>{let h=m.header.column.columnDef;return h.accessorKey?h.accessorKey:h.accessorFn?h.id:null},cell:m=>{var h,x;return(h=(x=m.renderValue())==null||x.toString==null?void 0:x.toString())!=null?h:null},...a._features.reduce((m,h)=>Object.assign(m,h.getDefaultColumnDef==null?void 0:h.getDefaultColumnDef()),{}),...f}},nr(e,"debugColumns","_getDefaultColumnDef")),_getColumnDefs:()=>a.options.columns,getAllColumns:rr(()=>[a._getColumnDefs()],f=>{let p=function(m,h,x){return x===void 0&&(x=0),m.map(g=>{let y=Xlt(a,g,x,h),b=g;return y.columns=b.columns?p(b.columns,y,x+1):[],y})};return p(f)},nr(e,"debugColumns","getAllColumns")),getAllFlatColumns:rr(()=>[a.getAllColumns()],f=>f.flatMap(p=>p.getFlatColumns()),nr(e,"debugColumns","getAllFlatColumns")),_getAllFlatColumnsById:rr(()=>[a.getAllFlatColumns()],f=>f.reduce((p,m)=>(p[m.id]=m,p),{}),nr(e,"debugColumns","getAllFlatColumnsById")),getAllLeafColumns:rr(()=>[a.getAllColumns(),a._getOrderColumnsFn()],(f,p)=>{let m=f.flatMap(h=>h.getLeafColumns());return p(m)},nr(e,"debugColumns","getAllLeafColumns")),getColumn:f=>a._getAllFlatColumnsById()[f]};Object.assign(a,d);for(let f=0;f<a._features.length;f++){let p=a._features[f];p==null||p.createTable==null||p.createTable(a)}return a}function Rv(){return e=>rr(()=>[e.options.data],t=>{let r={rows:[],flatRows:[],rowsById:{}},n=function(a,i,s){i===void 0&&(i=0);let o=[];for(let c=0;c<a.length;c++){let u=Jlt(e,e._getRowId(a[c],c,s),a[c],c,i,void 0,s?.id);if(r.flatRows.push(u),r.rowsById[u.id]=u,o.push(u),e.options.getSubRows){var l;u.originalSubRows=e.options.getSubRows(a[c],c),(l=u.originalSubRows)!=null&&l.length&&(u.subRows=n(u.originalSubRows,i+1,u))}}return o};return r.rows=n(t),r},nr(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function yf(e,t){return e?_ct(e)?PC.createElement(e,t):e:null}function _ct(e){return Lct(e)||typeof e=="function"||Rct(e)}function Lct(e){return typeof e=="function"&&(()=>{let t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function Rct(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function Dv(e){let t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[r]=PC.useState(()=>({current:vpe(t)})),[n,a]=PC.useState(()=>r.current.initialState);return r.current.setOptions(i=>({...i,...e,state:{...n,...e.state},onStateChange:s=>{a(s),e.onStateChange==null||e.onStateChange(s)}})),r.current}Kt();tr();var xf=A(oe()),Spe=()=>{let{t:e}=Ve();return(0,xf.jsx)("div",{className:"flex h-full w-full items-center justify-center p-10 bg-muted/10",children:(0,xf.jsxs)(FI,{children:[(0,xf.jsx)(BI,{children:(0,xf.jsx)($I,{variant:"icon",children:(0,xf.jsx)(Ah,{})})}),(0,xf.jsx)(jI,{children:e("Editor.Table.EmptyStateAst")}),(0,xf.jsx)(zI,{children:e("Editor.Table.EmptyState")})]})})};var Hr=A(oe()),Tpe=new Map,wpe=e=>{let t=Tpe.get(e);if(t)return t;let r=0;for(let i=0;i<e.length;i++)r=e.charCodeAt(i)+((r<<5)-r);let a={"--item-hue":Math.abs(r)%360};return Tpe.set(e,a),a},Dct=Ni.default.memo(({id:e,source:t,target:r,updateItem:n,onEditingIdChange:a})=>{let i=(0,Ni.useCallback)(o=>{let l=o.currentTarget.textContent||"";l!==r&&n(e,l),a(null)},[e,r,n,a]),s=(0,Ni.useCallback)(()=>{a(e)},[e,a]);return(0,Hr.jsx)("div",{contentEditable:!0,suppressContentEditableWarning:!0,onFocus:s,onBlur:i,className:"min-h-[32px] w-full text-sm leading-relaxed focus:outline-none focus:ring-1 focus:ring-primary p-1 rounded break-all whitespace-pre-wrap",children:r},`cell-${e}-${t.slice(0,10)}`)},(e,t)=>e.id===t.id&&e.target===t.target&&e.source===t.source),Mct={error:"bg-destructive/8 border-l-2 border-l-destructive",unused:"bg-orange-500/8 border-l-2 border-l-orange-500",security:"bg-purple-500/8 border-l-2 border-l-purple-500"},Cpe=Ni.default.forwardRef(({row:e,isSelected:t,onRowClick:r,getCellClass:n,dataIndex:a,errorType:i},s)=>{let o=(0,Ni.useCallback)(()=>{r(e.original.id)},[e.original.id,r]),l=i&&Mct[i]||"";return(0,Hr.jsx)(Ru,{ref:s,"data-index":a,id:`ast-row-${e.original.id}`,"data-state":t?"selected":void 0,className:`cursor-pointer hover:bg-accent/50 ${t?"bg-accent":""} ${l}`,onClick:o,children:e.getVisibleCells().map(c=>(0,Hr.jsx)(cg,{className:n(c.column.id),children:yf(c.column.columnDef.cell,c.getContext())},c.id))})});Cpe.displayName="MemoizedAstRow";var Oct=Ni.default.memo(Cpe,(e,t)=>e.isSelected===t.isSelected&&e.row.original===t.row.original&&e.errorType===t.errorType),Vz=Ni.default.forwardRef(({data:e,editingId:t,onRowClick:r,onDelete:n,onReset:a},i)=>{let{t:s}=Ve(),o=it.use.updateAstItem(),l=(0,Ni.useRef)(null),[c,u]=(0,Ni.useState)(new Map);(0,Ni.useEffect)(()=>{let S=w=>{let E=new Map;for(let C of w.detail.errors)C.type==="ast"&&(C.severity==="critical"||C.severity==="warning"?E.set(C.id,"security"):C.isUnused?E.set(C.id,"unused"):E.set(C.id,"error"));u(E)};return window.addEventListener("i18n-diagnose-errors",S),()=>window.removeEventListener("i18n-diagnose-errors",S)},[]);let d=(0,Ni.useMemo)(()=>[{accessorKey:"type",header:({column:S})=>(0,Hr.jsx)("div",{className:"text-center",children:s("Editor.Table.ColumnType")}),cell:({row:S})=>(0,Hr.jsx)("div",{className:"flex justify-center",children:(0,Hr.jsx)("span",{className:"px-2 py-0.5 rounded-md text-xs whitespace-nowrap bg-[hsl(var(--item-hue),85%,96%)] text-[hsl(var(--item-hue),80%,35%)] dark:bg-[hsl(var(--item-hue),60%,20%)] dark:text-[hsl(var(--item-hue),80%,80%)]",style:wpe(S.original.type),children:S.original.type})})},{accessorKey:"name",header:({column:S})=>(0,Hr.jsx)("div",{className:"text-center",children:s("Editor.Table.ColumnName")}),cell:({row:S})=>(0,Hr.jsx)("div",{className:"flex justify-center",children:(0,Hr.jsx)("span",{className:"truncate max-w-[120px] font-mono text-xs px-1.5 py-0.5 rounded text-center bg-[hsl(var(--item-hue),85%,96%)] text-[hsl(var(--item-hue),80%,35%)] dark:bg-[hsl(var(--item-hue),60%,20%)] dark:text-[hsl(var(--item-hue),80%,80%)]",style:wpe(S.original.name),title:S.original.name,children:S.original.name})})},{accessorKey:"source",header:({column:S})=>(0,Hr.jsx)("div",{className:"text-center",children:s("Editor.Table.ColumnSource")}),cell:({row:S})=>(0,Hr.jsx)("div",{className:"whitespace-pre-wrap break-all text-sm px-1 py-1",children:S.original.source})},{accessorKey:"target",header:({column:S})=>(0,Hr.jsx)("div",{className:"text-center",children:s("Editor.Table.ColumnTarget")}),cell:({row:S})=>(0,Hr.jsx)(Dct,{id:S.original.id,source:S.original.source,target:S.original.target,updateItem:o,onEditingIdChange:r})},{id:"actions",header:({column:S})=>(0,Hr.jsx)("div",{className:"text-center",children:s("Editor.Table.ColumnActions")}),cell:({row:S})=>{let w=S.original.target&&S.original.target!==S.original.source;return(0,Hr.jsxs)("div",{className:"flex items-center justify-center gap-1",children:[(0,Hr.jsx)(we,{variant:"ghost",size:"icon",className:"h-8 w-8 text-muted-foreground hover:text-primary",onClick:E=>{E.stopPropagation(),a(S.original.id)},title:s("Editor.Actions.Restore"),disabled:!w,children:(0,Hr.jsx)(rs,{className:"h-3 w-3"})}),(0,Hr.jsx)(we,{variant:"ghost",size:"icon",className:"h-8 w-8 text-muted-foreground hover:text-destructive",onClick:E=>{E.stopPropagation(),n(S.original.id)},title:s("Common.Actions.Delete"),children:(0,Hr.jsx)(aa,{className:"h-3 w-3"})})]})}}],[n,a,o,r]),f=Dv({data:e,columns:d,getCoreRowModel:Rv(),getRowId:S=>String(S.id)}),{rows:p}=f.getRowModel(),m=xs({count:p.length,getScrollElement:()=>l.current,estimateSize:()=>50,overscan:10});Ni.default.useEffect(()=>{if(t!==null){let S=p.findIndex(w=>w.original.id===t);S!==-1&&m.scrollToIndex(S,{align:"auto"})}},[t]);let h=(0,Ni.useCallback)(S=>S==="type"||S==="name"||S==="actions"?"w-[1%] whitespace-nowrap p-2":"w-[38%] p-2",[]);if(!e||e.length===0)return(0,Hr.jsx)("div",{ref:i,className:"rounded-md border h-full overflow-hidden flex flex-col",children:(0,Hr.jsx)(Spe,{})});let x=m.getVirtualItems(),g=m.getTotalSize(),y=x.length>0?x[0].start:0,b=x.length>0?g-x[x.length-1].end:0;return(0,Hr.jsx)("div",{ref:i,className:"rounded-md border h-full overflow-hidden flex flex-col",children:(0,Hr.jsx)("div",{ref:l,className:"flex-1 h-full overflow-auto",style:{willChange:"transform"},children:(0,Hr.jsxs)("table",{className:"w-full caption-bottom text-sm",children:[(0,Hr.jsx)(sg,{children:f.getHeaderGroups().map(S=>(0,Hr.jsx)(Ru,{children:S.headers.map(w=>(0,Hr.jsx)(lg,{className:`${h(w.id)} sticky top-0 bg-background z-20 shadow-sm`,children:w.isPlaceholder?null:yf(w.column.columnDef.header,w.getContext())},w.id))},S.id))}),(0,Hr.jsxs)(og,{children:[y>0&&(0,Hr.jsx)("tr",{children:(0,Hr.jsx)("td",{colSpan:d.length,style:{height:y,padding:0,border:"none"}})}),x.map(S=>{let w=p[S.index];return(0,Hr.jsx)(Oct,{ref:m.measureElement,dataIndex:S.index,row:w,isSelected:w.original.id===t,onRowClick:r,getCellClass:h,errorType:c.get(w.original.id)||null},w.id)}),b>0&&(0,Hr.jsx)("tr",{children:(0,Hr.jsx)("td",{colSpan:d.length,style:{height:b,padding:0,border:"none"}})})]})]})})})});Vz.displayName="ASTTable";var qi=A(Le());Kt();tr();var Vi=A(oe()),Ppe=()=>{let{t:e}=Ve(),t=it.use.searchQuery(),r=it.use.setSearchQuery(),[n,a]=(0,qi.useState)("all"),i=(0,qi.useDeferredValue)(t),s=(0,qi.useDeferredValue)(n),o=it.use.astItems(),l=it.use.updateAstItem(),c=it.use.deleteAstItem(),u=it.use.resetAstItem(),[d,f]=(0,qi.useState)(null),p=qi.default.useRef(o);qi.default.useEffect(()=>{p.current=o},[o]);let m=it.use.currentFile();qi.default.useEffect(()=>{f(null)},[m]),qi.default.useEffect(()=>{let b=S=>{if(S.detail.type==="ast"){let w=p.current.find(E=>E.id===S.detail.id);w&&w.source&&(a("all"),r(w.source)),f(S.detail.id)}};return window.addEventListener("i18n-jump-error",b),()=>window.removeEventListener("i18n-jump-error",b)},[r]);let h=(0,qi.useMemo)(()=>{let b=o;if(s==="translated"?b=b.filter(S=>S.target&&S.target!==S.source&&S.target.trim()!==""):s==="untranslated"&&(b=b.filter(S=>!S.target||S.target===S.source||S.target.trim()==="")),i.trim()){let S=i.toLowerCase();b=b.filter(w=>w.source&&w.source.toLowerCase().includes(S)||w.target&&w.target.toLowerCase().includes(S)||w.name&&w.name.toLowerCase().includes(S)||w.type&&w.type.toLowerCase().includes(S))}return b},[o,i,s]);qi.default.useEffect(()=>{if(d!==null){let b=o.find(S=>S.id===d);b&&window.dispatchEvent(new CustomEvent("i18n-item-selected",{detail:{source:b.source,type:"ast",name:b.name,astType:b.type}}))}else window.dispatchEvent(new CustomEvent("i18n-item-deselected"))},[d,o]);let x=(0,qi.useCallback)(b=>{f(b)},[]),g=(0,qi.useCallback)(b=>{r(b.target.value)},[]),y=(0,qi.useCallback)(b=>{a(b)},[]);return(0,Vi.jsx)("div",{className:"flex h-full flex-col",children:(0,Vi.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col",children:[(0,Vi.jsx)("div",{className:"mb-2 flex items-center justify-between",children:(0,Vi.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Vi.jsxs)("div",{className:"relative",children:[(0,Vi.jsx)(fn,{className:"absolute left-2 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),(0,Vi.jsx)(nt,{className:"h-8 w-64 pl-8",placeholder:e("Common.Placeholders.Search"),value:t,onChange:g})]}),(0,Vi.jsxs)(mr,{value:n,onValueChange:y,children:[(0,Vi.jsx)(gr,{size:"sm",className:"w-[100px]",children:(0,Vi.jsx)(hr,{placeholder:e("Common.Labels.Filter")})}),(0,Vi.jsxs)(yr,{children:[(0,Vi.jsx)(Ot,{value:"all",children:e("Common.Filters.All")}),(0,Vi.jsx)(Ot,{value:"translated",children:e("Common.Filters.Translated")}),(0,Vi.jsx)(Ot,{value:"untranslated",children:e("Common.Filters.Untranslated")})]})]})]})}),(0,Vi.jsx)("div",{className:"flex-1 overflow-hidden h-full",children:(0,Vi.jsx)(Vz,{data:h,editingId:d,onRowClick:x,onDelete:c,onReset:u},m)})]})})};var Fct=A(Le());tr();var Epe=A(oe());var Ss=A(Le());tr();Kt();tr();var bf=A(oe()),Ipe=()=>{let{t:e}=Ve();return(0,bf.jsx)("div",{className:"flex h-full w-full items-center justify-center p-10 bg-muted/10",children:(0,bf.jsxs)(FI,{children:[(0,bf.jsx)(BI,{children:(0,bf.jsx)($I,{variant:"icon",children:(0,bf.jsx)(Ah,{})})}),(0,bf.jsx)(jI,{children:e("Editor.Table.EmptyStateRegex")}),(0,bf.jsx)(zI,{children:e("Editor.Table.EmptyState")})]})})};Kt();var vn=A(oe()),Bct=Ss.default.memo(({id:e,source:t,target:r,updateRegexItem:n,onEditingIdChange:a})=>{let i=(0,Ss.useCallback)(o=>{let l=o.currentTarget.textContent||"";l!==r&&n(e,{target:l}),a(null)},[e,r,n,a]),s=(0,Ss.useCallback)(()=>{a(e)},[e,a]);return(0,vn.jsx)("div",{contentEditable:!0,suppressContentEditableWarning:!0,onFocus:s,onBlur:i,className:"min-h-[32px] w-full text-sm leading-relaxed focus:outline-none focus:ring-1 focus:ring-primary p-1 rounded break-all whitespace-pre-wrap",children:r},`cell-${e}-${t.slice(0,10)}`)},(e,t)=>e.id===t.id&&e.target===t.target&&e.source===t.source),$ct={error:"bg-destructive/8 border-l-2 border-l-destructive",unused:"bg-orange-500/8 border-l-2 border-l-orange-500",security:"bg-purple-500/8 border-l-2 border-l-purple-500"},Ape=Ss.default.forwardRef(({row:e,isSelected:t,dataIndex:r,errorType:n},a)=>{let i=n&&$ct[n]||"";return(0,vn.jsx)(Ru,{ref:a,"data-index":r,id:`regex-row-${e.original.id}`,className:`border-b hover:bg-accent/50 ${t?"bg-accent":""} ${i}`,"data-state":t?"selected":void 0,children:e.getVisibleCells().map(s=>(0,vn.jsx)(cg,{className:"px-1 py-1",children:yf(s.column.columnDef.cell,s.getContext())},s.id))})});Ape.displayName="MemoizedRegexRow";var jct=Ss.default.memo(Ape,(e,t)=>e.isSelected===t.isSelected&&e.row.original===t.row.original&&e.errorType===t.errorType),qz=Ss.default.forwardRef(({data:e,editingId:t,onEditingIdChange:r},n)=>{let{t:a}=Ve(),i=it.use.updateRegexItem(),s=it.use.deleteRegexItem(),o=it.use.resetRegexItem(),l=(0,Ss.useRef)(null),[c,u]=(0,Ss.useState)(new Map);(0,Ss.useEffect)(()=>{let b=S=>{let w=new Map;for(let E of S.detail.errors)E.type==="regex"&&(E.severity==="critical"||E.severity==="warning"?w.set(E.id,"security"):E.isUnused?w.set(E.id,"unused"):w.set(E.id,"error"));u(w)};return window.addEventListener("i18n-diagnose-errors",b),()=>window.removeEventListener("i18n-diagnose-errors",b)},[]);let d=(0,Ss.useMemo)(()=>[{accessorKey:"source",header:({column:b})=>(0,vn.jsx)("div",{className:"text-center pl-4",children:a("Editor.Table.ColumnSource")}),cell:({row:b})=>(0,vn.jsx)("div",{className:"break-all whitespace-pre-wrap text-sm leading-relaxed px-1 py-1 pl-4 cursor-text select-text",children:b.original.source})},{accessorKey:"target",header:({column:b})=>(0,vn.jsx)("div",{className:"text-center",children:a("Editor.Table.ColumnTarget")}),cell:({row:b})=>(0,vn.jsx)(Bct,{id:b.original.id,source:b.original.source||"",target:b.original.target,updateRegexItem:i,onEditingIdChange:r})},{id:"actions",header:({column:b})=>(0,vn.jsx)("div",{className:"text-center",children:a("Editor.Table.ColumnActions")}),cell:({row:b})=>{let S=b.original.target&&b.original.target!==b.original.source;return(0,vn.jsxs)("div",{className:"flex items-center justify-center gap-1",children:[(0,vn.jsx)(we,{variant:"ghost",size:"icon",className:"h-8 w-8 text-muted-foreground hover:text-primary",onClick:w=>{w.stopPropagation(),o(b.original.id)},title:a("Editor.Actions.Restore"),disabled:b.original.source===b.original.target,children:(0,vn.jsx)(rs,{className:"h-3 w-3"})}),(0,vn.jsx)(we,{variant:"ghost",size:"icon",className:"h-8 w-8 text-muted-foreground hover:text-destructive",onClick:w=>{w.stopPropagation(),s(b.original.id)},title:a("Common.Actions.Delete"),children:(0,vn.jsx)(aa,{className:"h-3 w-3"})})]})}}],[r,i,o,s]),f=Dv({data:e,columns:d,getCoreRowModel:Rv(),getRowId:b=>String(b.id)}),{rows:p}=f.getRowModel(),m=xs({count:p.length,getScrollElement:()=>l.current,estimateSize:()=>50,overscan:10});if(!e||e.length===0)return(0,vn.jsx)(Si,{ref:n,className:"w-full h-full p-0 overflow-hidden flex flex-col border",children:(0,vn.jsx)(Ipe,{})});let h=m.getVirtualItems(),x=m.getTotalSize(),g=h.length>0?h[0].start:0,y=h.length>0?x-h[h.length-1].end:0;return(0,vn.jsx)(Si,{ref:n,className:"w-full h-full p-0 overflow-hidden flex flex-col border",children:(0,vn.jsx)("div",{ref:l,className:"flex-1 h-full overflow-auto",style:{willChange:"transform"},children:(0,vn.jsxs)("table",{className:"w-full caption-bottom text-sm",children:[(0,vn.jsx)(sg,{children:f.getHeaderGroups().map(b=>(0,vn.jsx)(Ru,{children:b.headers.map(S=>(0,vn.jsx)(lg,{className:`${S.id==="actions"?"w-[1%] whitespace-nowrap pl-2 pr-4":"w-[45%] px-4"} sticky top-0 bg-background z-20 shadow-sm border-b ring-0`,style:{backgroundColor:"var(--background-primary)"},children:S.isPlaceholder?null:yf(S.column.columnDef.header,S.getContext())},S.id))},b.id))}),(0,vn.jsxs)(og,{children:[g>0&&(0,vn.jsx)("tr",{children:(0,vn.jsx)("td",{colSpan:d.length,style:{height:g,padding:0,border:"none"}})}),h.map(b=>{let S=p[b.index];return(0,vn.jsx)(jct,{ref:m.measureElement,dataIndex:b.index,row:S,isSelected:S.original.id===t,errorType:c.get(S.original.id)||null},S.id)}),y>0&&(0,vn.jsx)("tr",{children:(0,vn.jsx)("td",{colSpan:d.length,style:{height:y,padding:0,border:"none"}})})]})]})})})});qz.displayName="RegexTable";var EC=A(Le());tr();var oc=A(Le());Kt();tr();var Qs=A(oe()),Hz=(0,oc.memo)(()=>{let{t:e}=Ve(),[t,r]=(0,oc.useState)(""),[n,a]=(0,oc.useState)(""),[i,s]=(0,oc.useState)(!0),o=it(p=>p.addRegexItem),l=(0,oc.useCallback)(p=>{if(!p)return!0;try{return new RegExp(p),!0}catch{return!1}},[]),c=(0,oc.useCallback)(p=>{let m=p.target.value;r(m),s(l(m))},[l]),u=(0,oc.useCallback)(p=>{a(p.target.value)},[]),d=(0,oc.useCallback)(()=>{if(!t||!i)return;o({source:t,target:n||t,id:-1}),r(""),a(""),s(!0)},[t,n,i,o]),f=(0,oc.useCallback)(p=>{p.ctrlKey&&p.key==="Enter"&&(p.preventDefault(),d())},[d]);return(0,Qs.jsxs)(Zr,{title:e("Editor.Regex.AddRule"),icon:Rd,className:"flex flex-col gap-3",children:[(0,Qs.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,Qs.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,Qs.jsxs)(Jr,{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5",children:[(0,Qs.jsx)(Ko,{className:"w-3.5 h-3.5"}),e("Editor.Table.ColumnSource")]}),(0,Qs.jsx)(al,{id:"regex-source",value:t,onChange:c,onKeyDown:f,placeholder:e("Editor.Regex.InputRegexPlaceholder"),className:`text-xs h-16 resize-y bg-background ${i?"border-input":"border-red-500 focus-visible:ring-red-500"}`}),!i&&(0,Qs.jsx)("span",{className:"text-[10px] text-red-500",children:e("Common.Status.Error")})]}),(0,Qs.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,Qs.jsxs)(Jr,{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5",children:[(0,Qs.jsx)(Rh,{className:"w-3.5 h-3.5"}),e("Editor.Table.ColumnTarget")]}),(0,Qs.jsx)(al,{id:"regex-target",value:n,onChange:u,onKeyDown:f,placeholder:t?e("Editor.Regex.DefaultPlaceholder",{source:t}):e("Editor.Regex.InputTargetPlaceholder"),className:"text-xs h-16 resize-y border-input bg-background"})]})]}),(0,Qs.jsxs)(we,{variant:"secondary",size:"sm",onClick:d,disabled:!t||!i,className:"text-xs h-8 gap-1.5 text-foreground transition-all duration-200 hover:scale-[1.02] active:scale-95 group w-full mt-1 font-medium",children:[(0,Qs.jsx)(Rd,{className:"w-3.5 h-3.5"}),e("Editor.Regex.AddRule")]})]})});Hz.displayName="RegexInsertCard";Kt();tr();var Dt=A(oe()),Npe=({controller:e})=>{let{t}=Ve(),{state:r,actions:n}=e,{language:a,style:i,batchSize:s,overwrite:o,inputError:l,isTranslating:c,progress:u,processedCount:d,totalCount:f,currentBatch:p,totalBatches:m,targetItems:h}=r,{setLanguage:x,setStyle:g,setBatchSize:y,setOverwrite:b,handleBatchSizeBlur:S,handleBatchTranslation:w,handleStop:E}=n;return(0,Dt.jsxs)(Zr,{title:t("Editor.Titles.Ai"),icon:bi,className:"flex flex-col gap-4",children:[(0,Dt.jsxs)("div",{className:"grid grid-cols-1 gap-3",children:[(0,Dt.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,Dt.jsxs)("label",{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5",children:[(0,Dt.jsx)(Jo,{className:"w-3.5 h-3.5"}),t("Editor.Labels.SelectLang")]}),(0,Dt.jsxs)("div",{className:"flex gap-2",children:[(0,Dt.jsxs)(mr,{value:di.some(C=>C.value===a)?a:void 0,onValueChange:x,children:[(0,Dt.jsx)(gr,{size:"sm",className:"w-[110px] text-xs bg-background",children:(0,Dt.jsx)(hr,{placeholder:t("Editor.Labels.SelectLang")})}),(0,Dt.jsx)(yr,{children:di.map(C=>(0,Dt.jsx)(Ot,{value:C.value,className:"text-xs",children:C.label},C.value))})]}),(0,Dt.jsx)(nt,{value:a,onChange:C=>x(C.target.value),placeholder:t("Editor.Labels.CustomLang"),className:"h-8 text-xs bg-background flex-1"})]})]}),(0,Dt.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,Dt.jsxs)("label",{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5",children:[(0,Dt.jsx)(Yn,{className:"w-3.5 h-3.5"}),t("Editor.Labels.SelectStyle")]}),(0,Dt.jsxs)("div",{className:"flex gap-2",children:[(0,Dt.jsxs)(mr,{value:ef.some(C=>C.value===i)?i:void 0,onValueChange:g,children:[(0,Dt.jsx)(gr,{size:"sm",className:"w-[110px] text-xs bg-background",children:(0,Dt.jsx)(hr,{placeholder:t("Editor.Labels.SelectStyle")})}),(0,Dt.jsx)(yr,{children:ef.map(C=>(0,Dt.jsx)(Ot,{value:C.value,className:"text-xs",children:C.label},C.value))})]}),(0,Dt.jsx)(nt,{value:i,onChange:C=>g(C.target.value),placeholder:t("Editor.Labels.CustomStyle"),className:"h-8 text-xs bg-background flex-1"})]})]}),(0,Dt.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,Dt.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,Dt.jsxs)("label",{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5",children:[(0,Dt.jsx)(hn,{className:"w-3.5 h-3.5"}),t("Editor.Labels.BatchSize")]}),(0,Dt.jsx)(nt,{type:"number",min:1,value:s,onChange:y,onBlur:S,className:`h-8 text-xs bg-background ${l?"border-red-500 focus-visible:ring-red-500":""}`})]}),(0,Dt.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,Dt.jsxs)("label",{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5",children:[(0,Dt.jsx)(Vl,{className:"w-3.5 h-3.5"}),t("Editor.Labels.Concurrency")]}),(0,Dt.jsx)(nt,{type:"number",min:1,value:r.concurrencyLimit,onChange:n.setConcurrencyLimit,onBlur:n.handleConcurrencyLimitBlur,className:`h-8 text-xs bg-background ${r.concurrencyError?"border-red-500 focus-visible:ring-red-500":""}`})]})]}),(0,Dt.jsxs)("div",{className:"grid grid-cols-2 gap-3 items-end",children:[(0,Dt.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,Dt.jsxs)("label",{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5",children:[(0,Dt.jsx)(Os,{className:"w-3.5 h-3.5"}),t("Editor.Labels.Timeout")]}),(0,Dt.jsx)(nt,{type:"number",min:100,step:1e3,value:r.timeout,onChange:n.handleTimeoutChange,onBlur:n.handleTimeoutBlur,className:`h-8 text-xs bg-background ${r.timeoutError?"border-red-500 focus-visible:ring-red-500":""}`})]}),(0,Dt.jsxs)("div",{className:"flex items-center space-x-2 h-8",children:[(0,Dt.jsx)(Kl,{id:"overwrite-mode",checked:o,onCheckedChange:C=>b(C)}),(0,Dt.jsx)("label",{htmlFor:"overwrite-mode",className:"text-xs font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 text-muted-foreground cursor-pointer",children:t("Editor.Labels.Overwrite")})]})]}),!c&&h.length>0&&(0,Dt.jsxs)("div",{className:"flex items-center justify-between p-2 rounded-md bg-muted/30 border border-border/50 animate-in fade-in slide-in-from-top-1 duration-300",children:[(0,Dt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Dt.jsx)(Id,{className:"w-3.5 h-3.5 text-primary"}),(0,Dt.jsx)("span",{className:"text-[10px] font-medium text-muted-foreground uppercase tracking-wider",children:t("Editor.Labels.ExpectedConsumption")})]}),(0,Dt.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,Dt.jsxs)(vt,{variant:"secondary",className:"text-[10px] px-1.5 py-0 h-4 font-mono",children:[r.estimation.tokens," Tokens"]}),(0,Dt.jsxs)("span",{className:"text-[10px] text-muted-foreground/80",children:["\u2248 \xA5",r.estimation.cost.toFixed(4)]})]})]}),c&&(0,Dt.jsxs)("div",{className:"flex flex-col gap-1.5 animate-in fade-in zoom-in duration-300",children:[(0,Dt.jsxs)("div",{className:"flex justify-between text-xs text-muted-foreground",children:[(0,Dt.jsx)("span",{children:t("Editor.Status.ProcessingBatch",{current:p,total:m})}),(0,Dt.jsxs)("span",{children:[d," / ",f]})]}),(0,Dt.jsx)(Mp,{value:u,className:"h-2"})]})]}),(0,Dt.jsx)("div",{className:"grid grid-cols-1 gap-3 pt-2",children:c?(0,Dt.jsxs)(we,{variant:"destructive",size:"sm",onClick:E,className:"text-xs h-8 gap-1.5 font-medium w-full",children:[(0,Dt.jsx)(Vl,{className:"w-3.5 h-3.5 fill-current"}),t("Common.Actions.StopTranslate")]}):(0,Dt.jsxs)(we,{variant:"default",size:"sm",onClick:w,disabled:h.length===0||l,className:"text-xs h-8 gap-1.5 font-medium w-full transition-all duration-200 hover:opacity-90 active:scale-[0.98]",children:[(0,Dt.jsx)(bi,{className:"w-3.5 h-3.5"}),h.length>0?t("Editor.Actions.BatchTranslate",{count:h.length}):t("Editor.Hints.NoItems")]})})]})};var _a=A(Le());$t();$r();var Wk=()=>{let e=it.use.regexItems(),t=it.use.updateRegexItems(),r=su.use.i18n(),[n,a]=(0,_a.useState)(r.settings.language||r.settings.llmLanguage||"zh-cn"),[i,s]=(0,_a.useState)(r.settings.llmStyle),[o,l]=(0,_a.useState)(r.settings.llmBatchSize?.toString()||"20"),[c,u]=(0,_a.useState)(r.settings.llmConcurrencyLimit?.toString()||"3"),[d,f]=(0,_a.useState)(!1),[p,m]=(0,_a.useState)(!1),[h,x]=(0,_a.useState)(!1),[g,y]=(0,_a.useState)(r.settings.llmTimeout?.toString()||"60000"),[b,S]=(0,_a.useState)(!1),[w,E]=(0,_a.useState)(!1),[C,N]=(0,_a.useState)(0),[_,O]=(0,_a.useState)(0),[D,W]=(0,_a.useState)(0),[Z,me]=(0,_a.useState)(0),[Q,V]=(0,_a.useState)(0),U=(0,_a.useRef)(null),k=(0,_a.useMemo)(()=>e.filter(q=>d||!q.target||q.target.trim()===""||q.target===q.source),[e,d]);(0,_a.useEffect)(()=>{a(r.settings.language||r.settings.llmLanguage||"zh-cn"),s(r.settings.llmStyle),l(r.settings.llmBatchSize?.toString()||"20"),u(r.settings.llmConcurrencyLimit?.toString()||"3"),y(r.settings.llmTimeout?.toString()||"60000")},[r.settings.language,r.settings.llmLanguage,r.settings.llmStyle,r.settings.llmBatchSize,r.settings.llmConcurrencyLimit,r.settings.llmTimeout]);let L=q=>{Object.assign(r.settings,q),r.saveSettings()};return{state:{language:n,style:i,batchSize:o,concurrencyLimit:c,overwrite:d,inputError:p,concurrencyError:h,isTranslating:w,progress:C,processedCount:_,totalCount:D,currentBatch:Z,totalBatches:Q,targetItems:k,timeout:g,timeoutError:b,get estimation(){return jc().estimateTokens(k,"regex")}},actions:{setLanguage:q=>{a(q),L({language:q,llmLanguage:q})},setStyle:q=>{s(q),L({llmStyle:q})},setBatchSize:q=>{let be=q.target.value;l(be);let Ie=parseInt(be,10);isNaN(Ie)||Ie<=0?m(!0):m(!1)},setConcurrencyLimit:q=>{let be=q.target.value;u(be);let Ie=parseInt(be,10);isNaN(Ie)||Ie<=0?x(!0):x(!1)},setOverwrite:f,handleTimeoutChange:q=>{let be=q.target.value;y(be);let Ie=parseInt(be,10);isNaN(Ie)||Ie<=0?S(!0):S(!1)},handleBatchSizeBlur:()=>{let q=parseInt(o,10);!isNaN(q)&&q>0?(L({llmBatchSize:q}),m(!1)):(l(r.settings.llmBatchSize?.toString()||"20"),m(!1))},handleConcurrencyLimitBlur:()=>{let q=parseInt(c,10);!isNaN(q)&&q>0?(L({llmConcurrencyLimit:q}),x(!1)):(u(r.settings.llmConcurrencyLimit?.toString()||"3"),x(!1))},handleTimeoutBlur:()=>{let q=parseInt(g,10);!isNaN(q)&&q>0?(L({llmTimeout:q}),S(!1)):(y(r.settings.llmTimeout?.toString()||"60000"),S(!1))},handleBatchTranslation:async()=>{if(!w){if(k.length===0){Vs.info(v("Common.Notices.NoItemsToTranslate"));return}E(!0),O(0),W(k.length),N(0),me(0),V(1),U.current=new AbortController;try{await jc().regexTranslate(k,async(be,Ie,Ne)=>{let He=Math.min(Math.round(Ie/Ne*k.length),k.length);O(He),N(Ie/Ne*100),me(Ie),V(Ne);let xt=be.map(Ce=>({id:Ce.id,updates:{target:Ce.target}}));t(xt)},U.current.signal),Vs.success(v("Common.Notices.BatchTranslateSuccess"))}catch(q){q.name==="AbortError"||q.message===v("Common.Notices.TaskCancelled")||U.current?.signal.aborted||Vs.error(v("Common.Notices.TranslateFail",{message:q.message}))}finally{U.current&&(E(!1),U.current=null)}}},handleStop:()=>{U.current&&(U.current.abort(),U.current=null,E(!1),Vs.info(v("Common.Notices.TaskStopped")))}}}};Kt();var Hn=A(oe()),kpe=({regexController:e,activeTab:t,onTabChange:r,onIncrementalExtract:n,onOpenFile:a,onDiagnose:i,isDiagnosing:s,errorItems:o,hasChecked:l,setActiveTab:c,onClearDiagnose:u,onRestoreAllErrors:d,onUnusedDiagnose:f,onDeleteUnused:p,isUnusedScan:m,isSecurityScan:h,onSecurityDiagnose:x,isApplied:g,onJumpError:y,onAiFixError:b})=>{let{t:S}=Ve(),w=Wk(),E=e||w,[C,N]=(0,EC.useState)(!0),[_,O]=(0,EC.useState)(!0),[D,W]=(0,EC.useState)(!0),[Z,me]=(0,EC.useState)(!0);return(0,Hn.jsxs)("div",{className:"flex flex-col w-full h-full",children:[(0,Hn.jsxs)("div",{className:"flex items-center justify-between px-3 py-2 border-b shrink-0",children:[(0,Hn.jsxs)("div",{className:"flex items-center text-sm font-semibold gap-1.5",children:[(0,Hn.jsx)(bo,{className:"w-4 h-4"}),(0,Hn.jsx)("span",{children:S("Editor.Titles.Sidebar")})]}),(0,Hn.jsxs)(ri,{children:[(0,Hn.jsx)(ni,{asChild:!0,children:(0,Hn.jsxs)(we,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",children:[(0,Hn.jsx)(Zo,{className:"w-4 h-4"}),(0,Hn.jsx)("span",{className:"sr-only",children:S("Editor.Labels.SidebarViewOptions")})]})}),(0,Hn.jsxs)(ai,{align:"end",className:"w-48",children:[(0,Hn.jsx)(xb,{children:S("Editor.Labels.SidebarShowCards")}),(0,Hn.jsx)(tc,{}),(0,Hn.jsx)(zs,{checked:C,onCheckedChange:N,children:S("Editor.Stats.Title")}),(0,Hn.jsx)(zs,{checked:_,onCheckedChange:O,children:S("Editor.Titles.Insert")}),(0,Hn.jsx)(zs,{checked:D,onCheckedChange:W,children:S("Editor.Titles.QuickActions")}),(0,Hn.jsx)(zs,{checked:Z,onCheckedChange:me,children:S("Editor.Titles.Ai")})]})]})]}),(0,Hn.jsx)(dr,{className:"flex-1 min-h-0 px-2 pb-2",children:(0,Hn.jsxs)("div",{className:"space-y-4 pb-4",children:[C&&(0,Hn.jsx)(Gz,{}),_&&(0,Hn.jsx)(Hz,{}),D&&(0,Hn.jsx)(hg,{onIncrementalExtract:n||(()=>{}),onClearUntranslated:it.use.deleteUntranslatedRegexItems(),onOpenFile:a,isApplied:g}),(0,Hn.jsx)(aN,{onDiagnose:i,onUnusedDiagnose:f,onSecurityDiagnose:x,onDeleteUnused:p,onClear:u,onRestoreAllErrors:d,isDiagnosing:s,isUnusedScan:m,isSecurityScan:h,errorItems:o||[],hasChecked:l,setActiveTab:c,onJumpError:y,onAiFixError:b}),Z&&(0,Hn.jsx)(Npe,{controller:E})]})})]})};var vf=A(Le());Kt();tr();var La=A(oe()),Xk=(0,vf.memo)(({label:e,value:t,bgClass:r,textClass:n,dotClass:a,labelTextClass:i})=>(0,La.jsxs)("div",{className:`rounded-lg p-2.5 transition-all duration-300 group ${r}`,children:[(0,La.jsxs)("div",{className:`text-xs mb-0.75 flex items-center ${i}`,children:[(0,La.jsx)("span",{className:`mr-1.5 inline-block w-1.5 h-1.5 rounded-full ${a}`}),e]}),(0,La.jsx)("div",{className:`text-xl font-bold transition-transform duration-300 group-hover:translate-x-1 ${n}`,children:t})]}),(e,t)=>e.value===t.value&&e.label===t.label&&e.bgClass===t.bgClass&&e.textClass===t.textClass&&e.dotClass===t.dotClass&&e.labelTextClass===t.labelTextClass),_pe=(0,vf.memo)(({progress:e})=>{let{t}=Ve(),r=(0,vf.useMemo)(()=>({width:`${e}%`}),[e]),n=(0,vf.useMemo)(()=>2e3/(e||1),[e]),a=(0,vf.useMemo)(()=>({animation:`shine ${n}ms infinite`}),[n]);return(0,La.jsxs)("div",{className:"px-3 pb-3",children:[(0,La.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,La.jsx)("span",{className:"text-xs text-muted-foreground",children:t("Editor.Stats.Progress")}),(0,La.jsxs)("span",{className:"text-xs font-medium text-muted-foreground",children:[e,"%"]})]}),(0,La.jsx)("div",{className:"relative h-2.5 w-full rounded-full bg-muted overflow-hidden shadow-inner [&:before]:absolute [&:before]:inset-0 [&:before]:bg-gradient-to-r [&:before]:from-white/50 [&:before]:to-transparent [&:before]:content-['']",children:(0,La.jsx)("div",{className:"h-full rounded-full bg-gradient-to-r from-primary/70 to-primary/50 transition-all duration-800 ease-out relative overflow-hidden",style:r,children:(0,La.jsx)("div",{className:"absolute top-0 right-0 h-full w-16 bg-white/20 transform -skew-x-12 translate-x-full transition-transform duration-1500 ease-in-out",style:a})})})]})},(e,t)=>e.progress===t.progress),Gz=(0,vf.memo)(({})=>{let{t:e}=Ve(),t=it.use.regexItems(),r=(0,vf.useMemo)(()=>{let o=t.length;if(o===0)return{totalCount:0,translatedCount:0,untranslatedCount:0,progress:0};let l=0;for(let d=0;d<o;d++){let f=t[d];!!f.target&&f.target!==f.source&&l++}let c=o-l,u=Math.round(l/o*100);return{totalCount:o,translatedCount:l,untranslatedCount:c,progress:u}},[t]),{totalCount:n,translatedCount:a,untranslatedCount:i,progress:s}=r;return(0,La.jsxs)(Zr,{title:e("Editor.Regex.Overview"),icon:hu,extra:(0,La.jsxs)(vt,{variant:"secondary",className:"text-xs font-medium px-2.5 py-0.5 bg-muted text-muted-foreground border transition-all duration-300",children:[s,"% ",e("Common.Filters.Applied")]}),children:[(0,La.jsxs)("div",{className:"grid grid-cols-2 gap-2.5",children:[(0,La.jsx)("div",{className:"col-span-2",children:(0,La.jsx)(Xk,{label:e("Editor.Regex.TotalItems"),value:n,bgClass:"bg-muted/50 hover:bg-muted/80 transition-colors",textClass:"text-foreground",dotClass:"bg-blue-500",labelTextClass:"text-muted-foreground"})}),(0,La.jsx)(Xk,{label:e("Editor.Regex.Translated"),value:a,bgClass:"bg-muted/50 hover:bg-muted/80 transition-colors",textClass:"text-foreground",dotClass:"bg-emerald-500",labelTextClass:"text-muted-foreground"}),(0,La.jsx)(Xk,{label:e("Editor.Regex.Untranslated"),value:i,bgClass:"bg-muted/50 hover:bg-muted/80 transition-colors",textClass:"text-foreground",dotClass:"bg-amber-500",labelTextClass:"text-muted-foreground"})]}),(0,La.jsx)("div",{className:"mt-3",children:(0,La.jsx)(_pe,{progress:s})})]})});Gz.displayName="RegexStatsCard";Xk.displayName="StatBox";_pe.displayName="ProgressBar";var Ts=A(Le());Kt();tr();var Hi=A(oe()),Lpe=()=>{let{t:e}=Ve(),t=it.use.searchQuery(),r=it.use.setSearchQuery(),[n,a]=Ts.default.useState("all"),i=(0,Ts.useDeferredValue)(t),s=(0,Ts.useDeferredValue)(n),o=(0,Ts.useCallback)(h=>{r(h.target.value)},[]),[l,c]=Ts.default.useState(null),u=it.use.regexItems(),d=Ts.default.useRef(u);Ts.default.useEffect(()=>{d.current=u},[u]);let f=it.use.currentFile();Ts.default.useEffect(()=>{c(null),a("all"),r("")},[f,r]),Ts.default.useEffect(()=>{let h=x=>{if(x.detail.type==="regex"){let g=d.current.find(y=>y.id===x.detail.id);g&&g.source&&(a("all"),r(g.source)),c(x.detail.id)}};return window.addEventListener("i18n-jump-error",h),()=>window.removeEventListener("i18n-jump-error",h)},[r]);let p=(0,Ts.useMemo)(()=>{let h=u;if(s==="translated"?h=h.filter(x=>x.target&&x.target!==x.source):s==="untranslated"&&(h=h.filter(x=>!x.target||x.target===x.source)),i.trim()){let x=i.toLowerCase();h=h.filter(g=>g.source&&g.source.toLowerCase().includes(x)||g.target&&g.target.toLowerCase().includes(x))}return h},[u,i,s]);Ts.default.useEffect(()=>{if(l!==null){let h=u.find(x=>x.id===l);h&&window.dispatchEvent(new CustomEvent("i18n-item-selected",{detail:{source:h.source,type:"regex"}}))}else window.dispatchEvent(new CustomEvent("i18n-item-deselected"))},[l,u]);let m=(0,Ts.useCallback)(h=>{a(h)},[]);return(0,Hi.jsx)("div",{className:"flex h-full flex-col",children:(0,Hi.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col",children:[(0,Hi.jsx)("div",{className:"mb-2 flex items-center justify-between",children:(0,Hi.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Hi.jsxs)("div",{className:"relative",children:[(0,Hi.jsx)(fn,{className:"absolute left-2 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),(0,Hi.jsx)(nt,{className:"h-8 w-64 pl-8",placeholder:e("Common.Placeholders.Search"),value:t,onChange:o})]}),(0,Hi.jsxs)(mr,{value:n,onValueChange:m,children:[(0,Hi.jsx)(gr,{size:"sm",className:"w-[100px]",children:(0,Hi.jsx)(hr,{placeholder:e("Common.Labels.Filter")})}),(0,Hi.jsxs)(yr,{children:[(0,Hi.jsx)(Ot,{value:"all",children:e("Common.Filters.All")}),(0,Hi.jsx)(Ot,{value:"translated",children:e("Common.Filters.Translated")}),(0,Hi.jsx)(Ot,{value:"untranslated",children:e("Common.Filters.Untranslated")})]})]})]})}),(0,Hi.jsx)("div",{className:"flex-1 overflow-hidden",children:(0,Hi.jsx)(qz,{data:p,editingId:l,onEditingIdChange:c},f)})]})})};var Rpe=e=>({regexItems:[],setRegexItems:t=>{e({regexItems:t})},addRegexItem:t=>{e(r=>{let n=r.regexItems.length>0?Math.max(...r.regexItems.map(a=>a.id))+1:0;return{regexItems:[...r.regexItems,{...t,id:n}]}})},updateRegexItem:(t,r)=>{e(n=>({regexItems:n.regexItems.map(a=>a.id===t?{...a,...r}:a)}))},updateRegexItems:t=>{e(r=>{let n=new Map(t.map(a=>[a.id,a.updates]));return{regexItems:r.regexItems.map(a=>{let i=n.get(a.id);return i?{...a,...i}:a})}})},deleteRegexItem:t=>{e(r=>({regexItems:r.regexItems.filter(n=>n.id!==t)}))},resetRegexItem:t=>{e(r=>({regexItems:r.regexItems.map(n=>n.id===t?{...n,target:n.source}:n)}))},deleteUntranslatedRegexItems:()=>e(t=>({regexItems:t.regexItems.filter(r=>r.target&&r.target!==r.source&&r.target.trim()!=="")}))});var Dpe=e=>({astItems:[],setAstItems:t=>e({astItems:t}),addAstItem:t=>e(r=>{let n=r.astItems.length>0?Math.max(...r.astItems.map(a=>a.id))+1:0;return{astItems:[...r.astItems,{...t,id:n}]}}),updateAstItem:(t,r)=>e(n=>({astItems:n.astItems.map(a=>a.id===t?{...a,target:r}:a)})),deleteAstItem:t=>e(r=>({astItems:r.astItems.filter(n=>n.id!==t)})),resetAstItem:t=>e(r=>({astItems:r.astItems.map(n=>n.id===t?{...n,target:n.source}:n)})),updateAstItems:t=>{e(r=>{let n=new Map(t.map(a=>[a.id,a.updates]));return{astItems:r.astItems.map(a=>{let i=n.get(a.id);return i?{...a,...i}:a})}})},deleteUntranslatedAstItems:()=>e(t=>({astItems:t.astItems.filter(r=>r.target&&r.target!==r.source&&r.target.trim()!=="")}))});var Mpe=e=>({metadata:null,setMetadata:t=>{e({metadata:t})},updateMetadata:t=>{e(r=>({metadata:r.metadata?{...r.metadata,...t}:null}))}});var Ope=(e,t)=>({dictData:{},currentFile:"main.js",searchQuery:"",sourceCache:{},setDictData:r=>e({dictData:r}),setSearchQuery:r=>e({searchQuery:r}),setSourceCache:(r,n)=>e(a=>({sourceCache:{...a.sourceCache,[r]:n}})),setCurrentFile:r=>{e(n=>{let{currentFile:a,astItems:i,regexItems:s,dictData:o}=n,l={...o};a&&l[a]&&(l[a]={ast:i.map(f=>({type:f.type,name:f.name,source:f.source,target:f.target})),regex:s.map(f=>({source:f.source,target:f.target}))});let c=l[r]||{ast:[],regex:[]},u=c.ast.map((f,p)=>({id:p,type:f.type,name:f.name,source:f.source,target:f.target})),d=c.regex.map((f,p)=>({id:p,source:f.source,target:f.target}));return{currentFile:r,dictData:l,astItems:u,regexItems:d}})},addFile:r=>{let{dictData:n}=t();if(n[r])return;let a={...n};a[r]={ast:[],regex:[]},e({dictData:a}),t().setCurrentFile(r)},deleteFile:r=>{e(n=>{let{dictData:a,currentFile:i,astItems:s,regexItems:o,sourceCache:l}=n;if(!a[r])return n;let c={...a};i&&c[i]&&i!==r&&(c[i]={ast:s.map(f=>({type:f.type,name:f.name,source:f.source,target:f.target})),regex:o.map(f=>({source:f.source,target:f.target}))}),delete c[r];let u={...l};delete u[r];let d={dictData:c,sourceCache:u};if(i===r){let f=c["main.js"]?"main.js":Object.keys(c)[0]||"";if(f){let p=c[f]||{ast:[],regex:[]};d={...d,currentFile:f,astItems:p.ast.map((m,h)=>({id:h,type:m.type,name:m.name,source:m.source,target:m.target})),regexItems:p.regex.map((m,h)=>({id:h,source:m.source,target:m.target}))}}else d={...d,currentFile:"",astItems:[],regexItems:[]}}return d})},syncFileDictInfo:(r,n,a)=>{e(i=>{let s={...i.dictData};return s[r]={ast:n.map(o=>({type:o.type,name:o.name,source:o.source,target:o.target})),regex:a.map(o=>({source:o.source,target:o.target}))},{dictData:s}})}});var zct=iu()((...e)=>({...Rpe(...e),...Dpe(...e),...Mpe(...e),...Ope(...e)})),it=sd(zct);$t();$t();zf();tr();$r();var Mv=A(Le());tr();var Yk=A(require("path"));Kt();$t();var Jt=A(oe()),Kz=(0,Mv.memo)(()=>{let{t:e}=Ve(),t=it.use.metadata(),r=it.use.updateMetadata(),n=Ue(c=>c.i18n),a=Ue(c=>c.editorPluginTranslationPath),i=Ue(c=>c.editorPluginTranslation),[s,o]=(0,Mv.useState)(null);if((0,Mv.useEffect)(()=>{if(n?.sourceManager&&a)try{let c=Yk.extname(a),u=Yk.basename(a,c),d=n.sourceManager.getSource(u);d&&o({...d})}catch{}},[n,a,i]),!t)return null;let l=(c,u)=>{r({[c]:u})};return(0,Jt.jsx)(Zr,{title:e("Editor.Titles.Metadata"),icon:yo,children:(0,Jt.jsxs)("div",{className:"space-y-3",children:[(0,Jt.jsxs)("div",{className:"space-y-1",children:[(0,Jt.jsxs)("label",{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5",children:[(0,Jt.jsx)(Fs,{className:"w-3.5 h-3.5"}),e("Editor.Labels.PluginId")]}),(0,Jt.jsx)(nt,{value:t.plugin,readOnly:!0,disabled:!0,className:"h-8 text-sm bg-muted/50 text-muted-foreground"})]}),(0,Jt.jsxs)("div",{className:"space-y-1",children:[(0,Jt.jsxs)("label",{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5",children:[(0,Jt.jsx)(vu,{className:"w-3.5 h-3.5"}),e("Editor.Labels.Name")]}),(0,Jt.jsxs)("div",{className:"flex gap-2",children:[(0,Jt.jsx)(nt,{value:t.title,onChange:c=>l("title",c.target.value),placeholder:e("Editor.Labels.NamePlaceholder"),className:"h-8 text-sm bg-background"}),(0,Jt.jsx)(we,{variant:"outline",size:"icon",className:"h-8 w-8 shrink-0",title:e("Editor.Titles.Metadata"),onClick:()=>{let c=(t.title||"").replace(/^(\[[^\]]+\])+\s*/,""),u="";t.author&&(u+=`[${t.author}]`),t.language&&(u+=`[${t.language}]`);let d=`${u} ${c}`.trim();l("title",d)},children:(0,Jt.jsx)(Ip,{className:"h-3.5 w-3.5"})})]})]}),(0,Jt.jsxs)("div",{className:"space-y-1",children:[(0,Jt.jsxs)("label",{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5",children:[(0,Jt.jsx)(yo,{className:"w-3.5 h-3.5"}),e("Editor.Labels.Desc")]}),(0,Jt.jsx)(al,{value:t.description,onChange:c=>l("description",c.target.value),placeholder:e("Editor.Labels.DescPlaceholder"),className:"min-h-[60px] text-sm bg-background resize-none"})]}),(0,Jt.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,Jt.jsxs)("div",{className:"space-y-1",children:[(0,Jt.jsxs)("label",{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5",children:[(0,Jt.jsx)(Su,{className:"w-3.5 h-3.5"}),e("Editor.Labels.Author")]}),(0,Jt.jsx)(nt,{value:t.author,onChange:c=>l("author",c.target.value),placeholder:e("Editor.Labels.Author"),className:"h-8 text-sm bg-background px-2"})]}),(0,Jt.jsxs)("div",{className:"space-y-1",children:[(0,Jt.jsxs)("label",{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5",children:[(0,Jt.jsx)($n,{className:"w-3.5 h-3.5"}),e("Editor.Labels.Lang")]}),(0,Jt.jsxs)(mr,{value:t.language,onValueChange:c=>l("language",c),children:[(0,Jt.jsx)(gr,{size:"sm",className:"w-full text-sm bg-background px-2",children:(0,Jt.jsx)(hr,{placeholder:e("Editor.Labels.Lang")})}),(0,Jt.jsx)(yr,{children:di.map(c=>(0,Jt.jsx)(Ot,{value:c.value,children:c.label},c.value))})]})]})]}),(0,Jt.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,Jt.jsxs)("div",{className:"space-y-1",children:[(0,Jt.jsxs)("label",{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5",children:[(0,Jt.jsx)(hn,{className:"w-3.5 h-3.5"}),e("Editor.Labels.SupportedVer")]}),(0,Jt.jsx)(nt,{value:t.supportedVersions,onChange:c=>l("supportedVersions",c.target.value),placeholder:">=1.0.0",className:"h-8 text-sm bg-background px-2"})]}),(0,Jt.jsxs)("div",{className:"space-y-1",children:[(0,Jt.jsxs)("label",{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5",children:[(0,Jt.jsx)(_d,{className:"w-3.5 h-3.5"}),e("Editor.Labels.Ver")]}),(0,Jt.jsx)(nt,{value:t.version,onChange:c=>l("version",c.target.value),placeholder:"1.0.0",className:"h-8 text-sm bg-background px-2"})]})]}),(0,Jt.jsxs)("div",{className:"grid grid-cols-2 gap-2 pt-1",children:[(0,Jt.jsxs)("div",{className:"space-y-1",children:[(0,Jt.jsxs)("label",{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5",children:[s?.origin==="cloud"?(0,Jt.jsx)(Bn,{className:"w-3.5 h-3.5"}):(0,Jt.jsx)(Yo,{className:"w-3.5 h-3.5"}),e("Editor.Labels.Source")]}),(0,Jt.jsx)("div",{className:"flex items-center h-8 px-2 text-sm bg-muted/50 text-muted-foreground font-medium border rounded-md",children:s?.origin==="cloud"?e("Editor.Labels.SourceCloud"):e("Editor.Labels.SourceLocal")})]}),(0,Jt.jsxs)("div",{className:"space-y-1",children:[(0,Jt.jsxs)("label",{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5",children:[(0,Jt.jsx)(_d,{className:"w-3.5 h-3.5"}),e("Editor.Labels.Checksum")]}),(0,Jt.jsx)(nt,{value:s?.checksum?.substring(0,8)||"-",readOnly:!0,disabled:!0,className:"h-8 text-sm bg-muted/50 text-muted-foreground font-mono px-2",title:s?.checksum})]})]})]})})});Kz.displayName="MetadataCard";var Vg=A(Le()),IC=A(require("path")),Jk=A(ii());tr();Kt();$t();var Gr=A(oe());function Uct(e,t,r=10){let n=e.split(`
`),a=-1;for(let l=0;l<n.length;l++)if(n[l].includes(t)){a=l;break}if(a===-1)return null;let i=Math.max(0,a-r),s=Math.min(n.length-1,a+r),o=[];for(let l=i;l<=s;l++)o.push({lineNumber:l+1,content:n[l],isHighlighted:n[l].includes(t)});return{source:t,lines:o,matchLine:a+1}}function Vct(e){try{let{sourceCache:t,setSourceCache:r}=it.getState();if(t[e])return t[e];let n=Ue.getState().i18n,a=it.getState().metadata;if(!n||!a)return null;let i=a.plugin,s=n.app.plugins.manifests[i];if(!s)return null;let o=IC.normalize(n.app.vault.adapter.getBasePath()),l=IC.join(o,s.dir||""),c=IC.join(l,e);if(Jk.existsSync(c)){let u=Jk.readFileSync(c,"utf8");if(u)return r(e,u),u}return null}catch{return null}}var Wz=()=>{let{t:e}=Ve(),[t,r]=(0,Vg.useState)(!1),[n,a]=(0,Vg.useState)(null);(0,Vg.useEffect)(()=>{let s=l=>{let{source:c}=l.detail;if(!c||c.trim().length<2){a(null);return}let{currentFile:u}=it.getState(),d=Vct(u);if(!d){a(null);return}let f=Uct(d,c,10);if(!f){a(null);return}a({...f,fileName:u})},o=()=>a(null);return window.addEventListener("i18n-item-selected",s),window.addEventListener("i18n-item-deselected",o),()=>{window.removeEventListener("i18n-item-selected",s),window.removeEventListener("i18n-item-deselected",o)}},[]);let i=(0,Vg.useCallback)((s,o)=>{if(!s.includes(o))return s;let l=[],c=0,u=s.indexOf(o),d=0;for(;u!==-1;)u>c&&l.push(s.slice(c,u)),l.push((0,Gr.jsx)("mark",{className:"bg-yellow-400/30 dark:bg-yellow-500/25 text-foreground rounded-sm px-0.5 ring-1 ring-yellow-400/40",children:o},d++)),c=u+o.length,u=s.indexOf(o,c);return c<s.length&&l.push(s.slice(c)),(0,Gr.jsx)(Gr.Fragment,{children:l})},[]);return t?(0,Gr.jsxs)("div",{className:"flex items-center justify-between px-3 py-1.5 border-t bg-muted/30 shrink-0",children:[(0,Gr.jsxs)("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[(0,Gr.jsx)(gu,{className:"w-3.5 h-3.5"}),(0,Gr.jsx)("span",{className:"font-medium",children:e("Editor.Titles.ContextPreview")}),n&&(0,Gr.jsxs)("span",{className:"text-primary/70 ml-1",children:[n.fileName," \xB7 ",e("Editor.Labels.LineNumber",{line:n.matchLine})]})]}),(0,Gr.jsx)(we,{variant:"ghost",size:"icon",className:"h-6 w-6 text-muted-foreground hover:text-foreground",onClick:()=>r(!1),children:(0,Gr.jsx)(Ph,{className:"w-3.5 h-3.5"})})]}):(0,Gr.jsxs)("div",{className:"flex flex-col h-full border-t overflow-hidden",children:[(0,Gr.jsxs)("div",{className:"flex items-center justify-between px-3 py-1.5 bg-muted/30 shrink-0 border-b",children:[(0,Gr.jsxs)("div",{className:"flex items-center gap-1.5 text-xs",children:[(0,Gr.jsx)(gu,{className:"w-3.5 h-3.5 text-primary"}),(0,Gr.jsx)("span",{className:"font-medium",children:e("Editor.Titles.ContextPreview")}),n&&(0,Gr.jsxs)(Gr.Fragment,{children:[(0,Gr.jsx)("span",{className:"text-muted-foreground mx-1",children:"\xB7"}),(0,Gr.jsx)(fT,{className:"w-3 h-3 text-muted-foreground"}),(0,Gr.jsx)("span",{className:"text-muted-foreground",children:n.fileName}),(0,Gr.jsxs)("span",{className:"text-primary font-mono text-[11px]",children:[":",n.matchLine]})]})]}),(0,Gr.jsx)(we,{variant:"ghost",size:"icon",className:"h-6 w-6 text-muted-foreground hover:text-foreground",onClick:()=>r(!0),children:(0,Gr.jsx)(Oi,{className:"w-3.5 h-3.5"})})]}),n?(0,Gr.jsx)("div",{className:"flex-1 min-h-0 overflow-auto",children:(0,Gr.jsx)("div",{className:"font-mono text-xs leading-relaxed min-w-max",children:n.lines.map(s=>(0,Gr.jsxs)("div",{className:`flex ${s.isHighlighted?"bg-primary/8 border-l-2 border-l-primary":"border-l-2 border-l-transparent hover:bg-accent/30"} transition-colors duration-150`,children:[(0,Gr.jsx)("span",{className:`sticky left-0 inline-block w-12 shrink-0 text-right pr-3 py-px select-none z-10 ${s.isHighlighted?"text-primary font-semibold bg-primary/8":"text-muted-foreground/50 bg-background/80"}`,children:s.lineNumber}),(0,Gr.jsx)("span",{className:"whitespace-pre px-2 py-px",children:s.isHighlighted?i(s.content,n.source):s.content})]},s.lineNumber))})}):(0,Gr.jsx)("div",{className:"flex-1 flex items-center justify-center p-6",children:(0,Gr.jsxs)("div",{className:"text-center space-y-2",children:[(0,Gr.jsx)(gu,{className:"w-8 h-8 text-muted-foreground/30 mx-auto"}),(0,Gr.jsx)("p",{className:"text-xs text-muted-foreground/60",children:e("Editor.Hints.SelectItemToPreview")})]})})]})};Wz.displayName="ContextPreview";var gt=A(oe()),Kct=Ar.default.memo(({onSave:e,isSaving:t})=>{let{t:r}=Ve(),n=it.use.astItems(),a=it.use.regexItems();return(0,gt.jsxs)(we,{variant:"default",size:"sm",onClick:e,disabled:t,className:"shadow-sm hover:shadow-md transition-all active:scale-95 bg-primary hover:bg-primary/90",children:[t?(0,gt.jsx)(Gt,{className:"mr-2 h-4 w-4 animate-spin"}):(0,gt.jsx)(Md,{className:"mr-2 h-4 w-4"}),r("Editor.Actions.Save"),(0,gt.jsx)(vt,{variant:"secondary",className:"ml-2 bg-primary-foreground/20 text-primary-foreground border-none px-1 h-4",children:n.length+a.length})]})}),Wct=({onSave:e,enabled:t})=>{let r=it.use.astItems(),n=it.use.regexItems(),a=(0,Ar.useRef)(null),i=(0,Ar.useRef)(!0);return(0,Ar.useEffect)(()=>{if(i.current){i.current=!1;return}if(t)return a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{e(!0)},500),()=>{a.current&&clearTimeout(a.current)}},[r,n,t,e]),null},Xct=e=>{let t=Ue.getState().i18n,{t:r}=Ve(),n=t.logger,a=t.notice,i=r("Editor.Titles.Main"),s=Ue.getState().editorPluginTranslation,o=Vk(),l=Wk(),[c,u]=Ar.default.useState("overview"),d=it.use.setRegexItems(),f=it.use.setAstItems(),p=it.use.setMetadata(),m=it.use.setDictData(),h=it.use.setCurrentFile(),x=it.use.addFile(),g=it.use.deleteFile(),y=(0,Ar.useRef)(!1),b=(0,Ar.useRef)(!1),[S,w]=(0,Ar.useState)(!1),[E,C]=(0,Ar.useState)(!1),[N,_]=(0,Ar.useState)(!1),[O,D]=(0,Ar.useState)(!1),[W,Z]=(0,Ar.useState)([]),[me,Q]=(0,Ar.useState)(!1),[V,U]=(0,Ar.useState)("ast"),[k,L]=(0,Ar.useState)(!1),[M,ee]=(0,Ar.useState)(""),se=(0,Ar.useMemo)(()=>new _s(t.settings),[t.settings]),ne=(0,Ar.useMemo)(()=>new oo(t.settings),[t.settings]);(0,Ar.useEffect)(()=>{if(!y.current){if(s?.dict){it.setState({currentFile:""}),m(s.dict);let pe=s.dict["main.js"]?"main.js":Object.keys(s.dict)[0];pe&&h(pe)}s?.metadata&&p(s.metadata),y.current=!0}},[s,m,h,p,n]);let ge=Ar.default.useCallback(async(pe=!1)=>{if(!b.current){b.current=!0,w(!0);try{let{regexItems:We,astItems:ct,metadata:Ge,currentFile:ht,syncFileDictInfo:Ht}=it.getState();Ht(ht,ct,We);let ut=it.getState().dictData,Ct=Ue.getState(),fa=Ct.editorPluginTranslation,Kr=Ct.editorPluginTranslationPath,Fr=Ct.i18n,ye=Fr.notice,De=JSON.parse(JSON.stringify(fa));De.dict=JSON.parse(JSON.stringify(ut)),Ge&&(De.metadata={...Ge});try{if(Kr){if(Eb(Kr,De),Ue.setState({editorPluginTranslation:De}),Fr&&Fr.sourceManager)try{let Me=za.extname(Kr),qe=za.basename(Kr,Me),st=Fr.sourceManager.getSource(qe);st&&Ge&&(Ge.title&&(st.title=Ge.title),st.checksum=Li(De),st.origin==="cloud"&&(st.origin="local",st.cloud=void 0),Fr.sourceManager.saveSource(st))}catch{}pe||ye.successPrefix(i,r("Common.Notices.SaveSuccess"))}else ye.errorPrefix(i,r("Common.Notices.SaveFailPath"))}catch(Me){ye.errorPrefix(i,r("Common.Notices.SaveFail"),Me)}}finally{b.current=!1,w(!1)}}},[i,r]),ue=Ar.default.useCallback(async()=>{try{let{metadata:pe}=it.getState();if(!pe)return;if(!!t.stateManager.getPluginState(pe.plugin)?.isApplied){a.error(r("Editor.Actions.IncrementalExtractDisabledTip"));return}let ct=pe.plugin,Ge=it.getState().currentFile,ht=t.app.plugins.manifests[ct];if(!ht)return;let Ht=za.normalize(t.app.vault.adapter.getBasePath()),ut=za.join(Ht,ht.dir||"",Ge);if(!_o.existsSync(ut)){a.error(r("Common.Notices.MainNotFound").replace("main.js",Ge)+` (${Ge})`);return}let Ct=_o.readFileSync(ut).toString(),fa=new _s(t.settings),Kr=fa.loadCode(Ct);if(Kr){let Fr=fa.extract(Kr),ye=it.getState().astItems,De=OM(ye,Fr);f(De.map((Me,qe)=>({...Me,id:qe}))),a.success(r("Editor.Notices.SuccessIncrementalExtract"))}}catch(pe){a.error(r("Editor.Errors.SyntaxErrorAst")+": "+pe)}},[t,a,r,f]),H=Ar.default.useCallback(async()=>{try{let{metadata:pe}=it.getState();if(!pe)return;if(!!t.stateManager.getPluginState(pe.plugin)?.isApplied){a.error(r("Editor.Actions.IncrementalExtractDisabledTip"));return}let ct=pe.plugin,Ge=it.getState().currentFile,ht=t.app.plugins.manifests[ct];if(!ht)return;let Ht=za.normalize(t.app.vault.adapter.getBasePath()),ut=za.join(Ht,ht.dir||"",Ge);if(!_o.existsSync(ut)){a.error(r("Common.Notices.MainNotFound",{file:Ge}));return}let Ct=_o.readFileSync(ut).toString(),Kr=new oo(t.settings).extractTranslationsByRegex(Ct),Fr=it.getState().regexItems,ye=FM(Fr,Kr);d(ye.map((De,Me)=>({...De,id:Me}))),a.success(r("Editor.Notices.SuccessIncrementalExtract"))}catch(pe){a.error(r("Editor.Errors.SyntaxErrorRegex")+": "+pe)}},[t,a,r,d]),I=Ar.default.useCallback(async()=>{try{let{metadata:pe}=it.getState();if(!pe)return;let We=pe.plugin,ct=it.getState().currentFile,Ge=t.app.plugins.manifests[We];if(!Ge)return;let ht=za.normalize(t.app.vault.adapter.getBasePath()),Ht=za.join(ht,Ge.dir||"",ct);if(!_o.existsSync(Ht)){a.error(r("Common.Notices.MainNotFound",{file:ct}));return}let{i18nOpen:ut}=await Promise.resolve().then(()=>(jP(),XM));ut(t,Ht)}catch(pe){a.error(r("Editor.Actions.OpenFile")+" "+r("Common.Status.Failure")+": "+pe)}},[t,a,r]),K=Ar.default.useCallback(async()=>{if(!E){C(!0),Z([]),Q(!0);try{let{regexItems:pe,astItems:We,metadata:ct,currentFile:Ge,sourceCache:ht,setSourceCache:Ht}=it.getState();if(!ct){a.error(r("Editor.Errors.NoMetadata"));return}let ut=ct.plugin;if(!Ge||!Ge.endsWith(".js")){a.info(r("Editor.Errors.NotJs"));return}let Ct=t.stateManager.getPluginState(ut),fa=!!(Ct&&Ct.isApplied),Kr=ht[Ge];if(!Kr){if(!fa)try{let ye=t.app.plugins.manifests[ut];if(ye){let De=za.normalize(t.app.vault.adapter.getBasePath()),Me=za.join(De,ye.dir||""),qe=za.join(Me,Ge);_o.existsSync(qe)&&(Kr=_o.readFileSync(qe,"utf8"))}}catch{}Kr||(Kr=await t.backupManager.getBackupContent(ut,Ge)),Kr&&Ht(Ge,Kr)}if(!Kr){a.error(r("Editor.Errors.NoBackup"));return}let Fr=[];try{let ye=t.app.plugins.enabledPlugins.has(ut),De=za.normalize(t.app.vault.adapter.getBasePath()),Me=t.app.plugins.manifests[ut];if(!Me)throw new Error("Manifest not found");let qe=za.join(De,Me.dir||""),st=za.join(qe,Ge);try{let ft=se.loadCode(Kr);if(!ft){a.error(r("Editor.Errors.SourceError"));return}let cr=We.filter(_r=>_r.target&&_r.target!==_r.source),Br=pe.filter(_r=>_r.target&&_r.target!==_r.source);if(cr.length===0&&Br.length===0){a.success(r("Editor.Notices.DiagnosisSuccess"));return}let{validateBracketBalance:wr,validateVariableConsistency:pa}=await Promise.resolve().then(()=>(Bpe(),Fpe));for(let _r of cr){let ma=_r.source||"",Xr=_r.target||"";se.validateTargetSyntax(Xr)?wr(Xr)?pa(ma,Xr)||Fr.push({type:"ast",id:_r.id,source:(r("Editor.Errors.VariableMismatch")||"\u53D8\u91CF\u4E22\u5931")+": "+Xr,severity:"error"}):Fr.push({type:"ast",id:_r.id,source:(r("Editor.Errors.BracketMismatch")||"\u62EC\u53F7\u4E0D\u5339\u914D")+": "+Xr,severity:"error"}):Fr.push({type:"ast",id:_r.id,source:(r("Editor.Errors.SyntaxError")||"\u8BED\u6CD5\u9519\u8BEF")+": "+Xr,severity:"error"})}for(let _r of Br){let ma=_r.target||"";wr(ma)?pa(_r.source||"",ma)||Fr.push({type:"regex",id:_r.id,source:(r("Editor.Errors.VariableMismatch")||"\u53D8\u91CF\u4E22\u5931")+": "+ma,severity:"error"}):Fr.push({type:"regex",id:_r.id,source:(r("Editor.Errors.BracketMismatch")||"\u62EC\u53F7\u4E0D\u5339\u914D")+": "+ma,severity:"error"})}if(Fr.length>0){Z(Fr),a.error(r("Editor.Errors.SyntaxErrorTotal",{count:Fr.length}));return}let xa=async(_r,ma)=>{try{let Xr=se.cloneAst(ft),eo=se.translate(Xr,_r),to=ne.translate(eo,ma);return se.loadCode(to)?(_o.writeFileSync(st,to),t.app.plugins.enabledPlugins.has(ut)&&await t.app.plugins.disablePlugin(ut),await t.app.plugins.enablePlugin(ut),!!t.app.plugins.plugins[ut]):!1}catch{return!1}};if(!await xa(cr,Br)){let _r=async Xr=>{if(Xr.length===0)return;let eo=Xr.filter(ui=>ui.type==="ast").map(ui=>ui.data),to=Xr.filter(ui=>ui.type==="regex").map(ui=>ui.data);if(await xa(eo,to))return;if(Xr.length===1){let ui=Xr[0];ui.type==="ast"&&!se.validateTargetSyntax(ui.data.target)?Fr.push({type:"ast",id:ui.data.id,source:ui.data.source}):Fr.push({type:ui.type,id:ui.data.id,source:ui.data.source});return}let Wu=Math.floor(Xr.length/2);await _r(Xr.slice(0,Wu)),await _r(Xr.slice(Wu))},ma=[...cr.map(Xr=>({type:"ast",data:Xr})),...Br.map(Xr=>({type:"regex",data:Xr}))];await _r(ma)}}finally{try{Kr&&_o.writeFileSync(st,Kr),t.app.plugins.enabledPlugins.has(ut)&&await t.app.plugins.disablePlugin(ut),ye&&await t.app.plugins.enablePlugin(ut)}catch{}}}catch(ye){a.error(r("Common.Status.Failure")+": "+ye);return}Z(Fr),Fr.length===0?a.success(r("Editor.Notices.DiagnosisSuccess")):a.error(r("Editor.Errors.SyntaxErrorTotal",{count:Fr.length}))}catch(pe){a.error(r("Common.Status.Failure")+" "+r("Editor.Notices.DiagnosisSuccess")+": "+pe)}finally{C(!1)}}},[t,a,r,E]),he=Ar.default.useCallback(async()=>{if(!E){C(!0),_(!1),D(!0),Z([]),Q(!0);try{let{regexItems:pe,astItems:We}=it.getState(),ct=[];for(let Ge of We){let ht=Ge.target||"",Ht=se.validateSecurity(ht);for(let ut of Ht)ct.push({type:"ast",id:Ge.id,source:ht,severity:ut.severity,message:ut.message})}for(let Ge of pe){let ht=Ge.source||"",Ht=Ge.target||"",ut=ne.validateSecurity(Ht,ht);for(let Ct of ut)ct.push({type:"regex",id:Ge.id,source:Ht,severity:Ct.severity,message:Ct.message})}Z(ct),ct.length===0?a.success(r("Editor.Notices.DiagnosisSuccess")):a.error(r("Editor.Errors.SecurityRiskTotal",{count:ct.length}))}catch(pe){a.error(r("Common.Status.Failure")+": "+pe)}finally{C(!1)}}},[a,r,E]),q=Ar.default.useCallback(async()=>{if(!E){C(!0),_(!0),D(!1),Z([]),Q(!0);try{let{regexItems:pe,astItems:We,metadata:ct,currentFile:Ge,sourceCache:ht,setSourceCache:Ht}=it.getState();if(!ct){a.error(r("Editor.Errors.NoMetadata"));return}let ut=ct.plugin;if(!Ge||!Ge.endsWith(".js")){a.info(r("Editor.Errors.NotJs"));return}let Ct=t.stateManager.getPluginState(ut),fa=!!(Ct&&Ct.isApplied),Kr=ht[Ge];if(!Kr){if(!fa)try{let st=t.app.plugins.manifests[ut];if(st){let ft=za.normalize(t.app.vault.adapter.getBasePath()),cr=za.join(ft,st.dir||""),Br=za.join(cr,Ge);_o.existsSync(Br)&&(Kr=_o.readFileSync(Br,"utf8"))}}catch{}Kr||(Kr=await t.backupManager.getBackupContent(ut,Ge)),Kr&&Ht(Ge,Kr)}if(!Kr){a.error(r("Editor.Errors.NoBackup"));return}let Fr=[],ye=new _s(t.settings),De=new oo(t.settings),Me=ye.loadCode(Kr);if(Me){let st=ye.traceUsage(Me,We);We.forEach(ft=>{let cr=`${ft.type}:${ft.name}:${ft.source}`;st.has(cr)||st.has(ft.source)||Fr.push({type:"ast",id:ft.id,source:ft.source,isUnused:!0})})}let qe=De.traceUsage(Kr,pe);pe.forEach(st=>{qe.has(st.source)||Fr.push({type:"regex",id:st.id,source:st.source,isUnused:!0})}),Z(Fr),Fr.length===0?a.success(r("Editor.Notices.DiagnosisSuccess")):a.info(r("Editor.Errors.UnusedTotal",{count:Fr.length}))}catch(pe){a.error(r("Common.Status.Failure")+": "+pe)}finally{C(!1)}}},[t,a,r,E]),be=Ar.default.useCallback(()=>{Z([]),Q(!1),_(!1)},[]),Ie=Ar.default.useCallback(()=>{let pe=W.filter(Ct=>Ct.isUnused);if(pe.length===0||!confirm(r("Editor.Notices.ConfirmDeleteUnused")||`\u786E\u8BA4\u5220\u9664\u8FD9 ${pe.length} \u4E2A\u5197\u4F59\u9879\u5417\uFF1F`))return;let{astItems:We,regexItems:ct}=it.getState(),Ge=new Set(pe.filter(Ct=>Ct.type==="ast").map(Ct=>Ct.id)),ht=new Set(pe.filter(Ct=>Ct.type==="regex").map(Ct=>Ct.id)),Ht=We.filter(Ct=>!Ge.has(Ct.id)),ut=ct.filter(Ct=>!ht.has(Ct.id));f(Ht.map((Ct,fa)=>({...Ct,id:fa}))),d(ut.map((Ct,fa)=>({...Ct,id:fa}))),Z([]),Q(!1),_(!1),a.success(r("Editor.Notices.SuccessDelete"))},[W,a,r,f,d]),Ne=Ar.default.useCallback(pe=>{U(pe.type),window.dispatchEvent(new CustomEvent("i18n-jump-error",{detail:{type:pe.type,id:pe.id}}))},[]),He=Ar.default.useCallback(()=>{if(W.length===0)return;let pe=[...it.getState().astItems],We=[...it.getState().regexItems];W.forEach(ct=>{if(ct.type==="ast"){let Ge=pe.findIndex(ht=>ht.id===ct.id);Ge!==-1&&(pe[Ge]={...pe[Ge],target:pe[Ge].source})}else if(ct.type==="regex"){let Ge=We.findIndex(ht=>ht.id===ct.id);Ge!==-1&&(We[Ge]={...We[Ge],target:We[Ge].source})}}),f(pe),d(We),Z([]),Q(!1),a.success(r("Editor.Notices.SuccessRestore"))},[W,a,r,f,d]),xt=Ar.default.useCallback(async pe=>{try{let We=it.getState(),ct="";pe.type==="ast"?ct=We.astItems.find(ut=>ut.id===pe.id)?.target||pe.source:ct=We.regexItems.find(ut=>ut.id===pe.id)?.target||pe.source;let ht=await jc().fixTranslation(pe.source,ct,pe.message||"\u8BED\u6CD5\u9519\u8BEF");if(pe.type==="ast"){let ut=it.getState().astItems.map(Ct=>Ct.id===pe.id?{...Ct,target:ht}:Ct);f(ut)}else{let ut=it.getState().regexItems.map(Ct=>Ct.id===pe.id?{...Ct,target:ht}:Ct);d(ut)}Z(Ht=>Ht.filter(ut=>!(ut.id===pe.id&&ut.type===pe.type))),a.success(r("Editor.Notices.AiFixSuccess"))}catch(We){a.error(`${r("Editor.Errors.AiFixFail")}: ${We.message}`)}},[a,r,f,d,Z]);(0,Ar.useEffect)(()=>{let pe=We=>{(We.ctrlKey||We.metaKey)&&(We.key==="s"||We.key==="S"||We.code==="KeyS")&&(We.preventDefault(),We.stopPropagation(),ge())};return window.addEventListener("keydown",pe,!0),()=>{window.removeEventListener("keydown",pe,!0)}},[ge]),(0,Ar.useEffect)(()=>{window.dispatchEvent(new CustomEvent("i18n-diagnose-errors",{detail:{errors:W}}))},[W]);let Ce=it.use.metadata(),ke=it.use.dictData(),je=it.use.currentFile(),ot=it.use.astItems(),Nt=Object.keys(ke||{}),It=Ar.default.useMemo(()=>!Ce?.plugin||!t?.stateManager?!1:!!t.stateManager.getPluginState(Ce.plugin)?.isApplied,[Ce?.plugin,t?.stateManager,S]),ar=()=>{M.trim()&&(x(M.trim()),ee(""),L(!1))},Wr=pe=>{pe!==je&&h(pe)};return(0,gt.jsxs)(Zl,{value:V,onValueChange:U,className:"h-full flex flex-col gap-0 bg-background/50 backdrop-blur-md",children:[(0,gt.jsx)(Wct,{onSave:ge,enabled:!!t.settings.autoSave},je),(0,gt.jsxs)(QT,{direction:"horizontal",className:"h-full border-none",children:[(0,gt.jsx)(Lu,{defaultSize:20,minSize:10,maxSize:30,className:"h-full",children:(0,gt.jsx)("div",{className:"flex flex-col h-full py-2 pl-2 pr-1",children:(0,gt.jsxs)("div",{className:"flex flex-col h-full flex-1 min-h-0 rounded-lg border",children:[(0,gt.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 border-b shrink-0 min-h-[36px]",children:[(0,gt.jsx)(Nd,{className:"w-4 h-4 text-primary shrink-0"}),(0,gt.jsx)("span",{className:"text-sm font-semibold truncate",children:Ce?.plugin||r("Manager.Plugins.TabName")})]}),(0,gt.jsx)("div",{className:"flex flex-col w-full flex-1 min-h-0 p-2",children:(0,gt.jsx)(dr,{className:"flex-1 min-h-0 pr-3 -mr-3",children:(0,gt.jsxs)("div",{className:"space-y-3 pb-2",children:[(0,gt.jsx)(Zr,{title:r("Editor.Titles.Main"),icon:Nd,children:(0,gt.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,gt.jsx)(Kct,{onSave:ge,isSaving:S}),(0,gt.jsxs)(Ql,{className:"w-full h-9 p-1.5 bg-muted/50 grid grid-cols-2",children:[(0,gt.jsx)(sa,{className:"text-xs data-[state=active]:shadow-sm",value:"ast",children:"AST"}),(0,gt.jsx)(sa,{className:"text-xs data-[state=active]:shadow-sm",value:"regex",children:"Regex"})]}),(0,gt.jsx)(vt,{variant:"outline",className:"w-full justify-center bg-background/50 border-primary/20 text-primary font-normal truncate text-xs h-8",children:je})]})}),(0,gt.jsx)(Zr,{title:r("Editor.Titles.Files"),icon:mT,extra:(0,gt.jsx)(we,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-primary/10 text-primary",onClick:()=>L(!0),children:(0,gt.jsx)(xi,{className:"w-3.5 h-3.5"})}),children:(0,gt.jsx)("div",{className:"flex flex-col gap-0.5",children:Nt.map(pe=>(0,gt.jsxs)("div",{className:`
group flex items-center justify-between px-2 h-8 rounded-md cursor-pointer transition-all text-sm
${je===pe?"bg-primary text-primary-foreground shadow-sm":"hover:bg-primary/5 text-muted-foreground hover:text-foreground"}
`,onClick:()=>Wr(pe),children:[(0,gt.jsxs)("div",{className:"flex items-center flex-1 min-w-0",children:[je===pe?(0,gt.jsx)($l,{className:"w-3.5 h-3.5 mr-1 flex-shrink-0 animate-in fade-in slide-in-from-left-2"}):(0,gt.jsx)("div",{className:"w-3.5 h-3.5 mr-1"}),(0,gt.jsx)("span",{className:"truncate",children:pe})]}),(0,gt.jsx)(we,{variant:"ghost",size:"icon",className:`
h-8 w-8 opacity-0 group-hover:opacity-100 transition-opacity rounded-full
${je===pe?"hover:bg-primary-foreground/20 text-primary-foreground":"text-destructive hover:bg-destructive/10"}
`,onClick:We=>{We.stopPropagation(),confirm(r("Editor.Dialogs.ConfirmDeletePath"))&&(g(pe),Z([]),Q(!1))},children:(0,gt.jsx)(aa,{className:"w-3 h-3"})})]},pe))})}),(0,gt.jsx)(Kz,{})]})})})]})})}),(0,gt.jsx)(ag,{withHandle:!0}),(0,gt.jsx)(Lu,{defaultSize:60,minSize:30,className:"h-full",children:(0,gt.jsxs)(QT,{direction:"vertical",className:"h-full",children:[(0,gt.jsx)(Lu,{defaultSize:75,minSize:40,children:(0,gt.jsx)("main",{className:"w-full h-full flex flex-col px-1 overflow-hidden bg-background/20",children:(0,gt.jsxs)("div",{className:"flex-1 min-h-0 overflow-hidden relative",children:[(0,gt.jsx)(bn,{value:"ast",className:"h-full m-0 overflow-hidden outline-none data-[state=active]:animate-in fade-in duration-300",children:(0,gt.jsx)("div",{className:"h-full overflow-auto p-2 pt-0",children:(0,gt.jsx)(Ppe,{})})}),(0,gt.jsx)(bn,{value:"regex",className:"h-full m-0 overflow-hidden outline-none data-[state=active]:animate-in fade-in duration-300",children:(0,gt.jsx)("div",{className:"h-full overflow-auto p-2 pt-0",children:(0,gt.jsx)(Lpe,{})})})]})})}),(0,gt.jsx)(ag,{withHandle:!0}),(0,gt.jsx)(Lu,{defaultSize:25,minSize:10,maxSize:50,children:(0,gt.jsx)(Wz,{})})]})}),(0,gt.jsx)(ag,{withHandle:!0}),(0,gt.jsx)(Lu,{defaultSize:20,minSize:10,maxSize:30,className:"h-full",children:(0,gt.jsx)("div",{className:"flex flex-col h-full py-2 pr-2 pl-1",children:(0,gt.jsxs)("div",{className:"flex flex-col h-full flex-1 min-h-0 rounded-lg border",children:[(0,gt.jsx)(bn,{value:"ast",className:"flex-1 min-h-0 m-0 overflow-hidden outline-none",children:(0,gt.jsx)(lpe,{astController:o,onIncrementalExtract:ue,translationEntries:ot,onOpenFile:I,onDiagnose:K,onUnusedDiagnose:q,onSecurityDiagnose:he,onDeleteUnused:Ie,onClearDiagnose:be,onRestoreAllErrors:He,isDiagnosing:E,isUnusedScan:N,isSecurityScan:O,errorItems:W,hasChecked:me,setActiveTab:U,isApplied:It,onJumpError:Ne,onAiFixError:xt})}),(0,gt.jsx)(bn,{value:"regex",className:"flex-1 min-h-0 m-0 overflow-hidden outline-none",children:(0,gt.jsx)(kpe,{regexController:l,onIncrementalExtract:H,onOpenFile:I,onDiagnose:K,onUnusedDiagnose:q,onSecurityDiagnose:he,onDeleteUnused:Ie,onClearDiagnose:be,onRestoreAllErrors:He,isDiagnosing:E,isUnusedScan:N,isSecurityScan:O,errorItems:W,hasChecked:me,setActiveTab:U,isApplied:It,onJumpError:Ne,onAiFixError:xt})})]})})})]}),(0,gt.jsx)(Kd,{open:k,onOpenChange:L,children:(0,gt.jsxs)(Wd,{children:[(0,gt.jsx)(Xd,{children:(0,gt.jsx)(Yd,{children:r("Editor.Dialogs.PromptNewPath")})}),(0,gt.jsx)("div",{className:"grid gap-4 py-4",children:(0,gt.jsxs)("div",{className:"grid grid-cols-4 items-center gap-4",children:[(0,gt.jsx)(Jr,{htmlFor:"path",className:"text-right",children:r("Editor.Labels.PathLabel")}),(0,gt.jsx)(nt,{id:"path",value:M,onChange:pe=>ee(pe.target.value),placeholder:r("Editor.Labels.PathPlaceholder"),className:"col-span-3",onKeyDown:pe=>{pe.key==="Enter"&&ar()}})]})}),(0,gt.jsxs)(dg,{children:[(0,gt.jsx)(we,{variant:"outline",onClick:()=>L(!1),children:r("Common.Actions.Cancel")}),(0,gt.jsx)(we,{onClick:ar,children:r("Common.Actions.Confirm")})]})]})})]})},Cm="editor-view-type",Zk=class extends $pe.ItemView{constructor(r,n){super(r);this.root=null;this.shadowRoot=null;this.leftCollapsed=!1;this.rightCollapsed=!1;this.i18n=n}getViewType(){return Cm}getDisplayText(){return v("Editor.Titles.Main")}getIcon(){return"pencil"}async onOpen(){this.leftCollapsed=this.app.workspace.leftSplit.collapsed,this.rightCollapsed=this.app.workspace.rightSplit.collapsed,this.app.workspace.leftSplit.collapse(),this.app.workspace.rightSplit.collapse();let{root:r,shadowRoot:n}=el(this.contentEl,this.i18n,Ar.default.createElement(Xct));this.root=r,this.shadowRoot=n}async onClose(){this.leftCollapsed||this.app.workspace.leftSplit.expand(),this.rightCollapsed||this.app.workspace.rightSplit.expand(),this.root?.unmount(),this.shadowRoot?.empty()}};var ua=A(Le());tr();var Pm=A(require("path")),Em=A(ii()),Vpe=require("obsidian");RP();Kt();$t();$t();$r();$t();Wy();$t();var Yct=iu()((e,t)=>({items:[],metadata:null,themeName:"",themeDir:"",translationPath:"",isTranslating:!1,progress:0,processedCount:0,totalCount:0,overwrite:!1,setItems:r=>e({items:r}),addItem:r=>e(n=>({items:[...n.items,r]})),updateItem:(r,n)=>e(a=>({items:a.items.map(i=>i.id===r?{...i,target:n}:i)})),deleteItem:r=>e(n=>({items:n.items.filter(a=>a.id!==r)})),resetItem:r=>e(n=>({items:n.items.map(a=>a.id===r?{...a,target:a.source}:a)})),updateItems:r=>e(n=>{let a=new Map(r.map(i=>[i.id,i.target]));return{items:n.items.map(i=>{let s=a.get(i.id);return s!==void 0?{...i,target:s}:i})}}),deleteUntranslatedItems:()=>e(r=>({items:r.items.filter(n=>n.target&&n.target!==n.source)})),setMetadata:r=>e({metadata:r}),updateMetadata:r=>e(n=>({metadata:n.metadata?{...n.metadata,...r}:null})),setThemeInfo:(r,n,a)=>e({themeName:r,themeDir:n,translationPath:a}),setTranslationStatus:r=>e(n=>({...n,...r}))})),sn=sd(Yct);var lc=A(Le());tr();Kt();tr();var AC=A(oe()),jpe=()=>{let{t:e}=Ve();return(0,AC.jsxs)("div",{className:"flex flex-col items-center justify-center h-full p-8 text-center",children:[(0,AC.jsx)(Nh,{className:"w-12 h-12 text-muted-foreground/50 mb-4"}),(0,AC.jsx)("h3",{className:"text-sm font-medium text-muted-foreground mb-1",children:e("Editor.Status.Empty")})]})};Kt();var on=A(oe()),Jct=lc.default.memo(({id:e,source:t,target:r,updateItem:n,onEditingIdChange:a})=>{let i=(0,lc.useCallback)(o=>{let l=o.currentTarget.textContent||"";l!==r&&n(e,l),a(null)},[e,r,n,a]),s=(0,lc.useCallback)(()=>{a(e)},[e,a]);return(0,on.jsx)("div",{contentEditable:!0,suppressContentEditableWarning:!0,onFocus:s,onBlur:i,className:"min-h-[24px] w-full text-sm leading-relaxed focus:outline-none focus:ring-1 focus:ring-primary p-1 rounded break-all whitespace-pre-wrap",children:r},`cell-${e}-${t.slice(0,10)}`)},(e,t)=>e.id===t.id&&e.target===t.target&&e.source===t.source),Zct=lc.default.forwardRef(({row:e,isSelected:t,dataIndex:r},n)=>(0,on.jsx)(Ru,{ref:n,"data-index":r,id:`theme-row-${e.original.id}`,className:`border-b hover:bg-accent/50 ${t?"bg-accent":""}`,"data-state":t?"selected":void 0,children:e.getVisibleCells().map(a=>(0,on.jsx)(cg,{className:"px-1 py-1",children:yf(a.column.columnDef.cell,a.getContext())},a.id))})),Qct=lc.default.memo(Zct,(e,t)=>e.isSelected===t.isSelected&&e.row.original===t.row.original),Xz=lc.default.forwardRef(({data:e,editingId:t,onEditingIdChange:r},n)=>{let{t:a}=Ve(),i=sn.use.updateItem(),s=sn.use.deleteItem(),o=sn.use.resetItem(),l=(0,lc.useRef)(null),c=(0,lc.useMemo)(()=>[{accessorKey:"type",header:()=>(0,on.jsx)("div",{className:"text-center",children:a("Editor.Table.ColumnType")}),cell:({row:g})=>{let y=g.original.type?.toLowerCase()||"";if(!y)return null;let b="bg-muted/50 text-muted-foreground/80 border-border/40";return y==="name"?b="bg-blue-500/10 text-blue-600 dark:text-blue-400 border-blue-500/20":y==="title"?b="bg-emerald-500/10 text-emerald-600 dark:text-emerald-400 border-emerald-500/20":y==="description"?b="bg-amber-500/10 text-amber-600 dark:text-amber-400 border-amber-500/20":y==="label"?b="bg-indigo-500/10 text-indigo-600 dark:text-indigo-400 border-indigo-500/20":y==="markdown"&&(b="bg-pink-500/10 text-pink-600 dark:text-pink-400 border-pink-500/20"),(0,on.jsx)("div",{className:"flex justify-center px-1",children:(0,on.jsx)("span",{className:`text-[10px] font-bold uppercase tracking-wider font-mono px-1.5 py-0.5 rounded-sm whitespace-nowrap border select-none ${b}`,children:g.original.type})})}},{accessorKey:"source",header:()=>(0,on.jsx)("div",{className:"text-center pl-4",children:a("Editor.Table.ColumnSource")}),cell:({row:g})=>(0,on.jsx)("div",{className:"break-all whitespace-pre-wrap text-sm leading-relaxed px-4 py-1 cursor-text select-text opacity-90",children:g.original.source})},{accessorKey:"target",header:()=>(0,on.jsx)("div",{className:"text-center",children:a("Editor.Table.ColumnTarget")}),cell:({row:g})=>(0,on.jsx)(Jct,{id:g.original.id,source:g.original.source||"",target:g.original.target,updateItem:i,onEditingIdChange:r})},{id:"actions",header:()=>(0,on.jsx)("div",{className:"text-center",children:a("Editor.Table.ColumnActions")}),cell:({row:g})=>(0,on.jsxs)("div",{className:"flex items-center justify-center gap-1",children:[(0,on.jsx)(we,{variant:"ghost",size:"icon",className:"h-6 w-6 text-muted-foreground hover:text-primary",onClick:y=>{y.stopPropagation(),o(g.original.id)},title:a("Editor.Actions.Restore"),disabled:g.original.source===g.original.target,children:(0,on.jsx)(rs,{className:"h-3 w-3"})}),(0,on.jsx)(we,{variant:"ghost",size:"icon",className:"h-6 w-6 text-muted-foreground hover:text-destructive",onClick:y=>{y.stopPropagation(),s(g.original.id)},title:a("Common.Actions.Delete"),children:(0,on.jsx)(aa,{className:"h-3 w-3"})})]})}],[r,i,o,s]),u=Dv({data:e,columns:c,getCoreRowModel:Rv(),getRowId:g=>String(g.id)}),{rows:d}=u.getRowModel(),f=xs({count:d.length,getScrollElement:()=>l.current,estimateSize:()=>48,overscan:20});if(!e||e.length===0)return(0,on.jsx)(Si,{ref:n,className:"w-full h-full p-0 overflow-hidden flex flex-col border",children:(0,on.jsx)(jpe,{})});let p=f.getVirtualItems(),m=f.getTotalSize(),h=p.length>0?p[0].start:0,x=p.length>0?m-p[p.length-1].end:0;return(0,on.jsx)(Si,{ref:n,className:"w-full h-full p-0 overflow-hidden flex flex-col border",children:(0,on.jsx)("div",{ref:l,className:"flex-1 h-full overflow-auto",style:{overflowAnchor:"none",willChange:"transform"},children:(0,on.jsxs)("table",{className:"w-full caption-bottom text-sm",children:[(0,on.jsx)(sg,{children:u.getHeaderGroups().map(g=>(0,on.jsx)(Ru,{children:g.headers.map(y=>(0,on.jsx)(lg,{className:`${y.id==="actions"||y.id==="type"?"w-[1%] whitespace-nowrap px-4":"px-4"} sticky top-0 bg-background z-20 shadow-sm border-b ring-0`,style:{backgroundColor:"var(--background-primary)"},children:y.isPlaceholder?null:yf(y.column.columnDef.header,y.getContext())},y.id))},g.id))}),(0,on.jsxs)(og,{children:[h>0&&(0,on.jsx)("tr",{children:(0,on.jsx)("td",{colSpan:c.length,style:{height:h,padding:0,border:"none"}})}),p.map(g=>{let y=d[g.index];return(0,on.jsx)(Qct,{ref:f.measureElement,dataIndex:g.index,row:y,isSelected:y.original.id===t},y.id)}),x>0&&(0,on.jsx)("tr",{children:(0,on.jsx)("td",{colSpan:c.length,style:{height:x,padding:0,border:"none"}})})]})]})})})});Xz.displayName="ThemeTable";var Ov=A(Le()),Qk=A(require("path"));Kt();tr();$t();var ur=A(oe()),Yz=(0,Ov.memo)(()=>{let{t:e}=Ve(),t=sn.use.metadata(),r=sn.use.themeName(),n=sn.use.translationPath(),a=sn.use.updateMetadata(),i=Ue(c=>c.i18n),s=Ue(c=>c.editorThemeTranslation),[o,l]=(0,Ov.useState)(null);return(0,Ov.useEffect)(()=>{if(i?.sourceManager&&n)try{let c=Qk.extname(n),u=Qk.basename(n,c),d=i.sourceManager.getSource(u);d&&l({...d})}catch{}},[i,n,s]),(0,ur.jsx)(Zr,{title:e("Editor.Titles.Metadata"),icon:Yn,children:(0,ur.jsxs)("div",{className:"space-y-3.5",children:[(0,ur.jsxs)("div",{className:"space-y-1.5 focus-within:z-10",children:[(0,ur.jsxs)("label",{className:"text-xs font-semibold text-muted-foreground/70 uppercase tracking-wider flex items-center gap-1.5 px-0.5",children:[(0,ur.jsx)(Yn,{className:"w-3.5 h-3.5"}),e("Editor.Labels.ThemeName")]}),(0,ur.jsx)(nt,{value:r||e("Common.Status.Unknown"),readOnly:!0,disabled:!0,className:"h-8 text-xs bg-muted/30 text-muted-foreground border-dashed px-2.5"})]}),(0,ur.jsxs)("div",{className:"space-y-3",children:[(0,ur.jsxs)("div",{className:"space-y-1.5",children:[(0,ur.jsxs)("label",{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5 px-0.5",children:[(0,ur.jsx)(Fh,{className:"w-3.5 h-3.5"}),e("Editor.Table.ColumnTarget")]}),(0,ur.jsx)(nt,{value:t?.title||"",onChange:c=>a({title:c.target.value}),placeholder:e("Editor.Labels.DescPlaceholder"),className:"h-8 text-sm px-2.5"})]}),(0,ur.jsxs)("div",{className:"space-y-1.5",children:[(0,ur.jsxs)("label",{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5 px-0.5",children:[(0,ur.jsx)(Qo,{className:"w-3.5 h-3.5"}),e("Editor.Labels.Desc")]}),(0,ur.jsx)(nt,{value:t?.description||"",onChange:c=>a({description:c.target.value}),placeholder:e("Editor.Labels.DescPlaceholder"),className:"h-8 text-sm px-2.5"})]}),(0,ur.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,ur.jsxs)("div",{className:"space-y-1.5",children:[(0,ur.jsxs)("label",{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5 px-0.5",children:[(0,ur.jsx)($n,{className:"w-3.5 h-3.5"}),e("Editor.Labels.Lang")]}),(0,ur.jsx)(nt,{value:t?.language||"",onChange:c=>a({language:c.target.value}),placeholder:e("Editor.Labels.Lang"),className:"h-8 text-sm px-2.5"})]}),(0,ur.jsxs)("div",{className:"space-y-1.5",children:[(0,ur.jsxs)("label",{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5 px-0.5",children:[(0,ur.jsx)(Su,{className:"w-3.5 h-3.5"}),e("Editor.Labels.Author")]}),(0,ur.jsx)(nt,{value:t?.author||"",onChange:c=>a({author:c.target.value}),placeholder:e("Editor.Labels.Author"),className:"h-8 text-sm px-2.5"})]})]}),(0,ur.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,ur.jsxs)("div",{className:"space-y-1.5",children:[(0,ur.jsxs)("label",{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5 px-0.5",children:[(0,ur.jsx)(hn,{className:"w-3.5 h-3.5"}),e("Editor.Labels.SupportedVer")]}),(0,ur.jsx)(nt,{value:t?.supportedVersions||"",onChange:c=>a({supportedVersions:c.target.value}),placeholder:e("Editor.Labels.Ver"),className:"h-8 text-sm px-2.5"})]}),(0,ur.jsxs)("div",{className:"space-y-1.5",children:[(0,ur.jsxs)("label",{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5 px-0.5",children:[(0,ur.jsx)(_d,{className:"w-3.5 h-3.5"}),e("Editor.Labels.Ver")]}),(0,ur.jsx)(nt,{value:t?.version||"",onChange:c=>a({version:c.target.value}),placeholder:e("Editor.Labels.Ver"),className:"h-8 text-sm px-2.5"})]})]})]}),(0,ur.jsxs)("div",{className:"grid grid-cols-2 gap-3 pt-0.5",children:[(0,ur.jsxs)("div",{className:"space-y-1.5",children:[(0,ur.jsxs)("label",{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5 px-0.5",children:[o?.origin==="cloud"?(0,ur.jsx)(Bn,{className:"w-3.5 h-3.5"}):(0,ur.jsx)(Yo,{className:"w-3.5 h-3.5"}),e("Editor.Labels.Source")]}),(0,ur.jsx)("div",{className:"flex items-center h-8 px-2.5 text-sm bg-muted/50 text-muted-foreground font-medium border rounded-md",children:o?.origin==="cloud"?e("Editor.Labels.SourceCloud"):e("Editor.Labels.SourceLocal")})]}),(0,ur.jsxs)("div",{className:"space-y-1.5",children:[(0,ur.jsxs)("label",{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5 px-0.5",children:[(0,ur.jsx)(_d,{className:"w-3.5 h-3.5"}),e("Editor.Labels.Checksum")]}),(0,ur.jsx)(nt,{value:o?.checksum?.substring(0,8)||"-",readOnly:!0,disabled:!0,className:"h-8 text-sm bg-muted/50 text-muted-foreground font-mono px-2.5",title:o?.checksum})]})]})]})})});Yz.displayName="ThemeMetadataCard";var Hg=A(Le());tr();Kt();var e_=A(Le());Kt();tr();var li=A(oe()),Jz=(0,e_.memo)(()=>{let{t:e}=Ve(),t=sn.use.items(),r=(0,e_.useMemo)(()=>{let n=t.length,a=t.filter(o=>o.target&&o.target!==o.source).length,i=n-a,s=n>0?Math.round(a/n*100):0;return{total:n,translated:a,untranslated:i,percentage:s}},[t]);return(0,li.jsx)(Zr,{title:e("Editor.Stats.Title"),icon:bp,children:(0,li.jsxs)("div",{className:"space-y-3",children:[(0,li.jsxs)("div",{className:"space-y-1.5",children:[(0,li.jsxs)("div",{className:"flex items-center justify-between",children:[(0,li.jsx)("span",{className:"text-xs text-muted-foreground",children:e("Editor.Stats.Progress")}),(0,li.jsxs)("span",{className:"text-xs font-semibold text-primary",children:[r.percentage,"%"]})]}),(0,li.jsx)("div",{className:"w-full h-2 bg-muted rounded-full overflow-hidden",children:(0,li.jsx)("div",{className:"h-full bg-primary rounded-full transition-all duration-500 ease-out",style:{width:`${r.percentage}%`}})})]}),(0,li.jsxs)("div",{className:"grid grid-cols-3 gap-2",children:[(0,li.jsxs)("div",{className:"text-center p-1.5 rounded-md bg-muted/50",children:[(0,li.jsx)("div",{className:"text-lg font-bold text-foreground",children:r.total}),(0,li.jsx)("div",{className:"text-[10px] text-muted-foreground",children:e("Editor.Stats.TotalItems")})]}),(0,li.jsxs)("div",{className:"text-center p-1.5 rounded-md bg-green-500/10",children:[(0,li.jsx)("div",{className:"text-lg font-bold text-green-600 dark:text-green-400",children:r.translated}),(0,li.jsx)("div",{className:"text-[10px] text-muted-foreground",children:e("Editor.Stats.Translated")})]}),(0,li.jsxs)("div",{className:"text-center p-1.5 rounded-md bg-red-500/10",children:[(0,li.jsx)("div",{className:"text-lg font-bold text-red-500 dark:text-red-400",children:r.untranslated}),(0,li.jsx)("div",{className:"text-[10px] text-muted-foreground",children:e("Editor.Stats.Untranslated")})]})]})]})})});Jz.displayName="ThemeStatsCard";var qg=A(Le());Kt();tr();var Lo=A(oe()),Zz=(0,qg.memo)(()=>{let{t:e}=Ve(),t=sn.use.addItem(),[r,n]=(0,qg.useState)(""),[a,i]=(0,qg.useState)(""),s=(0,qg.useCallback)(()=>{if(!r.trim())return;let o=sn.getState().items,l=o.length>0?Math.max(...o.map(c=>c.id))+1:0;t({id:l,source:r.trim(),target:a.trim()||r.trim()}),n(""),i("")},[r,a,t]);return(0,Lo.jsx)(Zr,{title:e("Editor.Titles.Insert"),icon:xi,children:(0,Lo.jsxs)("div",{className:"space-y-3.5",children:[(0,Lo.jsxs)("div",{className:"space-y-1",children:[(0,Lo.jsxs)("label",{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5 px-0.5",children:[(0,Lo.jsx)(Fh,{className:"w-3.5 h-3.5"}),e("Editor.Actions.Source")]}),(0,Lo.jsx)(nt,{value:r,onChange:o=>n(o.target.value),placeholder:e("Editor.Ast.InputSourcePlaceholder"),className:"h-8 text-sm px-2.5"})]}),(0,Lo.jsxs)("div",{className:"space-y-1",children:[(0,Lo.jsxs)("label",{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5 px-0.5",children:[(0,Lo.jsx)(Qo,{className:"w-3.5 h-3.5"}),e("Editor.Actions.Trans")]}),(0,Lo.jsx)(nt,{value:a,onChange:o=>i(o.target.value),placeholder:e("Common.Placeholders.Search"),className:"h-8 text-sm px-2.5",onKeyDown:o=>{o.key==="Enter"&&s()}})]}),(0,Lo.jsxs)(we,{variant:"secondary",onClick:s,disabled:!r.trim(),className:"w-full h-8 gap-1.5 font-medium transition-all",children:[(0,Lo.jsx)(xi,{className:"w-3.5 h-3.5"}),e("Editor.Actions.Add")]})]})})});Zz.displayName="ThemeInsertCard";Kt();tr();var Mt=A(oe()),zpe=({controller:e})=>{let{t}=Ve(),{state:r,actions:n}=e,{language:a,style:i,batchSize:s,concurrencyLimit:o,overwrite:l,inputError:c,concurrencyError:u,isTranslating:d,progress:f,processedCount:p,totalCount:m,currentBatch:h,totalBatches:x,targetItems:g,timeout:y,timeoutError:b}=r,{setLanguage:S,setStyle:w,setBatchSize:E,setConcurrencyLimit:C,setOverwrite:N,handleBatchSizeBlur:_,handleConcurrencyLimitBlur:O,handleTimeoutChange:D,handleTimeoutBlur:W,handleBatchTranslation:Z,handleStop:me}=n;return(0,Mt.jsxs)(Zr,{title:t("Editor.Titles.Ai"),icon:bi,className:"flex flex-col gap-4",children:[(0,Mt.jsxs)("div",{className:"grid grid-cols-1 gap-3",children:[(0,Mt.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,Mt.jsxs)("label",{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5",children:[(0,Mt.jsx)(Jo,{className:"w-3.5 h-3.5"}),t("Editor.Labels.SelectLang")]}),(0,Mt.jsxs)("div",{className:"flex gap-2",children:[(0,Mt.jsxs)(mr,{value:di.some(Q=>Q.value===a)?a:void 0,onValueChange:S,children:[(0,Mt.jsx)(gr,{size:"sm",className:"w-[110px] text-xs bg-background",children:(0,Mt.jsx)(hr,{placeholder:t("Editor.Labels.SelectLang")})}),(0,Mt.jsx)(yr,{children:di.map(Q=>(0,Mt.jsx)(Ot,{value:Q.value,className:"text-xs",children:Q.label},Q.value))})]}),(0,Mt.jsx)(nt,{value:a,onChange:Q=>S(Q.target.value),placeholder:t("Editor.Labels.CustomLang"),className:"h-8 text-xs bg-background flex-1"})]})]}),(0,Mt.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,Mt.jsxs)("label",{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5",children:[(0,Mt.jsx)(Yn,{className:"w-3.5 h-3.5"}),t("Editor.Labels.SelectStyle")]}),(0,Mt.jsxs)("div",{className:"flex gap-2",children:[(0,Mt.jsxs)(mr,{value:ef.some(Q=>Q.value===i)?i:void 0,onValueChange:w,children:[(0,Mt.jsx)(gr,{size:"sm",className:"w-[110px] text-xs bg-background",children:(0,Mt.jsx)(hr,{placeholder:t("Editor.Labels.SelectStyle")})}),(0,Mt.jsx)(yr,{children:ef.map(Q=>(0,Mt.jsx)(Ot,{value:Q.value,className:"text-xs",children:Q.label},Q.value))})]}),(0,Mt.jsx)(nt,{value:i,onChange:Q=>w(Q.target.value),placeholder:t("Editor.Labels.CustomStyle"),className:"h-8 text-xs bg-background flex-1"})]})]}),(0,Mt.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,Mt.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,Mt.jsxs)("label",{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5",children:[(0,Mt.jsx)(hn,{className:"w-3.5 h-3.5"}),t("Editor.Labels.BatchSize")]}),(0,Mt.jsx)(nt,{type:"number",min:1,value:s,onChange:E,onBlur:_,className:`h-8 text-xs bg-background ${c?"border-red-500 focus-visible:ring-red-500":""}`})]}),(0,Mt.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,Mt.jsxs)("label",{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5",children:[(0,Mt.jsx)(Vl,{className:"w-3.5 h-3.5"}),t("Editor.Labels.Concurrency")]}),(0,Mt.jsx)(nt,{type:"number",min:1,value:o,onChange:C,onBlur:O,className:`h-8 text-xs bg-background ${u?"border-red-500 focus-visible:ring-red-500":""}`})]})]}),(0,Mt.jsxs)("div",{className:"grid grid-cols-2 gap-3 items-end",children:[(0,Mt.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,Mt.jsxs)("label",{className:"text-xs font-medium text-muted-foreground flex items-center gap-1.5",children:[(0,Mt.jsx)(Os,{className:"w-3.5 h-3.5"}),t("Editor.Labels.Timeout")]}),(0,Mt.jsx)(nt,{type:"number",min:100,step:1e3,value:y,onChange:D,onBlur:W,className:`h-8 text-xs bg-background ${b?"border-red-500 focus-visible:ring-red-500":""}`})]}),(0,Mt.jsxs)("div",{className:"flex items-center space-x-2 h-8",children:[(0,Mt.jsx)(Kl,{id:"overwrite-mode-theme",checked:l,onCheckedChange:Q=>N(Q)}),(0,Mt.jsx)("label",{htmlFor:"overwrite-mode-theme",className:"text-xs font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 text-muted-foreground cursor-pointer",children:t("Editor.Labels.Overwrite")})]})]}),!d&&g.length>0&&(0,Mt.jsxs)("div",{className:"flex items-center justify-between p-2 rounded-md bg-muted/30 border border-border/50 animate-in fade-in slide-in-from-top-1 duration-300",children:[(0,Mt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Mt.jsx)(Id,{className:"w-3.5 h-3.5 text-primary"}),(0,Mt.jsx)("span",{className:"text-[10px] font-medium text-muted-foreground uppercase tracking-wider",children:t("Editor.Labels.ExpectedConsumption")})]}),(0,Mt.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,Mt.jsxs)(vt,{variant:"secondary",className:"text-[10px] px-1.5 py-0 h-4 font-mono",children:[r.estimation.tokens," Tokens"]}),(0,Mt.jsxs)("span",{className:"text-[10px] text-muted-foreground/80",children:["\u2248 \xA5",r.estimation.cost.toFixed(4)]})]})]}),d&&(0,Mt.jsxs)("div",{className:"flex flex-col gap-1.5 animate-in fade-in zoom-in duration-300",children:[(0,Mt.jsxs)("div",{className:"flex justify-between text-xs text-muted-foreground",children:[(0,Mt.jsx)("span",{children:t("Editor.Status.ProcessingBatch",{current:h,total:x})}),(0,Mt.jsxs)("span",{children:[p," / ",m]})]}),(0,Mt.jsx)(Mp,{value:f,className:"h-2"})]})]}),(0,Mt.jsx)("div",{className:"grid grid-cols-1 gap-3 pt-2",children:d?(0,Mt.jsxs)(we,{variant:"destructive",size:"sm",onClick:me,className:"text-xs h-8 gap-1.5 font-medium w-full",children:[(0,Mt.jsx)(Vl,{className:"w-3.5 h-3.5 fill-current"}),t("Common.Actions.StopTranslate")]}):(0,Mt.jsxs)(we,{variant:"default",size:"sm",onClick:Z,disabled:g.length===0||c,className:"text-xs h-8 gap-1.5 font-medium w-full transition-all duration-200 hover:opacity-90 active:scale-[0.98]",children:[(0,Mt.jsx)(bi,{className:"w-3.5 h-3.5"}),g.length>0?t("Editor.Actions.BatchTranslate",{count:g.length}):t("Common.Notices.NoItemsToTranslate")]})})]})};var os=A(Le());$t();$r();var Upe=()=>{let{items:e,updateItems:t,isTranslating:r,progress:n,processedCount:a,totalCount:i,overwrite:s,setTranslationStatus:o}=sn(),l=su.use.i18n(),[c,u]=(0,os.useState)(l.settings.language||l.settings.llmLanguage||"zh-cn"),[d,f]=(0,os.useState)(l.settings.llmStyle),[p,m]=(0,os.useState)(l.settings.llmBatchSize?.toString()||"20"),[h,x]=(0,os.useState)(l.settings.llmConcurrencyLimit?.toString()||"3"),[g,y]=(0,os.useState)(!1),[b,S]=(0,os.useState)(!1),[w,E]=(0,os.useState)(l.settings.llmTimeout?.toString()||"60000"),[C,N]=(0,os.useState)(!1),[_,O]=(0,os.useState)(0),[D,W]=(0,os.useState)(0),Z=(0,os.useRef)(null),me=(0,os.useMemo)(()=>e.filter(H=>s||!H.target||H.target.trim()===""||H.target===H.source),[e,s]);(0,os.useEffect)(()=>{u(l.settings.language||l.settings.llmLanguage||"zh-cn"),f(l.settings.llmStyle),m(l.settings.llmBatchSize?.toString()||"20"),x(l.settings.llmConcurrencyLimit?.toString()||"3"),E(l.settings.llmTimeout?.toString()||"60000")},[l.settings.language,l.settings.llmLanguage,l.settings.llmStyle,l.settings.llmBatchSize,l.settings.llmConcurrencyLimit,l.settings.llmTimeout]);let Q=H=>{Object.assign(l.settings,H),l.saveSettings()};return{state:{language:c,style:d,batchSize:p,concurrencyLimit:h,overwrite:s,inputError:g,concurrencyError:b,isTranslating:r,progress:n,processedCount:a,totalCount:i,currentBatch:_,totalBatches:D,targetItems:me,timeout:w,timeoutError:C,get estimation(){return jc().estimateTokens(me,"theme")}},actions:{setLanguage:H=>{u(H),Q({language:H,llmLanguage:H})},setStyle:H=>{f(H),Q({llmStyle:H})},setBatchSize:H=>{let I=H.target.value;m(I);let K=parseInt(I,10);isNaN(K)||K<=0?y(!0):y(!1)},setConcurrencyLimit:H=>{let I=H.target.value;x(I);let K=parseInt(I,10);isNaN(K)||K<=0?S(!0):S(!1)},setOverwrite:H=>o({overwrite:H}),handleTimeoutChange:H=>{let I=H.target.value;E(I);let K=parseInt(I,10);isNaN(K)||K<=0?N(!0):N(!1)},handleBatchSizeBlur:()=>{let H=parseInt(p,10);!isNaN(H)&&H>0?(Q({llmBatchSize:H}),y(!1)):(m(l.settings.llmBatchSize?.toString()||"20"),y(!1))},handleConcurrencyLimitBlur:()=>{let H=parseInt(h,10);!isNaN(H)&&H>0?(Q({llmConcurrencyLimit:H}),S(!1)):(x(l.settings.llmConcurrencyLimit?.toString()||"3"),S(!1))},handleTimeoutBlur:()=>{let H=parseInt(w,10);!isNaN(H)&&H>0?(Q({llmTimeout:H}),N(!1)):(E(l.settings.llmTimeout?.toString()||"60000"),N(!1))},handleBatchTranslation:async()=>{if(!r){if(me.length===0){Vs.info(v("Common.Notices.NoItemsToTranslate"));return}o({isTranslating:!0,processedCount:0,totalCount:me.length,progress:0}),O(0),W(1),Z.current=new AbortController;try{await jc().themeTranslate(me,async(I,K,he)=>{let q=Math.min(Math.round(K/he*me.length),me.length);o({processedCount:q,progress:K/he*100}),O(K),W(he);let be=I.map(Ie=>({id:Ie.id,target:Ie.target}));t(be)},Z.current.signal),Vs.success(v("Common.Notices.BatchTranslateSuccess"))}catch(H){H.name==="AbortError"||H.message==="\u7FFB\u8BD1\u4EFB\u52A1\u5DF2\u53D6\u6D88"||Z.current?.signal.aborted||Vs.error(v("Common.Notices.TranslateFail",{message:H.message}))}finally{Z.current&&(o({isTranslating:!1}),Z.current=null)}}},handleStop:()=>{Z.current&&(Z.current.abort(),Z.current=null,o({isTranslating:!1}),Vs.info(v("Common.Notices.TaskStopped")))}}}};var Qn=A(oe()),Qz=(0,Hg.memo)(({onIncrementalExtract:e,onOpenFile:t,isApplied:r})=>{let{t:n}=Ve(),a=sn.use.deleteUntranslatedItems(),[i,s]=(0,Hg.useState)(!0),[o,l]=(0,Hg.useState)(!0),[c,u]=(0,Hg.useState)(!0),[d,f]=(0,Hg.useState)(!0),p=Upe();return(0,Qn.jsxs)("div",{className:"flex flex-col h-full",children:[(0,Qn.jsxs)("div",{className:"flex items-center justify-between px-3 py-2 border-b shrink-0 min-h-[36px]",children:[(0,Qn.jsxs)("div",{className:"flex items-center text-sm font-semibold gap-1.5",children:[(0,Qn.jsx)(bo,{className:"w-4 h-4"}),(0,Qn.jsx)("span",{children:n("Editor.Titles.Sidebar")})]}),(0,Qn.jsxs)(ri,{children:[(0,Qn.jsx)(ni,{asChild:!0,children:(0,Qn.jsxs)(we,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0",children:[(0,Qn.jsx)(Zo,{className:"w-4 h-4"}),(0,Qn.jsx)("span",{className:"sr-only",children:n("Editor.Labels.SidebarViewOptions")})]})}),(0,Qn.jsxs)(ai,{align:"end",className:"w-48",children:[(0,Qn.jsx)(xb,{children:n("Editor.Labels.SidebarShowCards")}),(0,Qn.jsx)(tc,{}),(0,Qn.jsx)(zs,{checked:i,onCheckedChange:s,children:n("Editor.Stats.Title")}),(0,Qn.jsx)(zs,{checked:o,onCheckedChange:l,children:n("Editor.Titles.Insert")}),(0,Qn.jsx)(zs,{checked:c,onCheckedChange:u,children:n("Editor.Titles.QuickActions")}),(0,Qn.jsx)(zs,{checked:d,onCheckedChange:f,children:n("Editor.Titles.Ai")})]})]})]}),(0,Qn.jsx)(dr,{className:"flex-1 min-h-0 px-2 pb-2",children:(0,Qn.jsxs)("div",{className:"space-y-4 pb-4",children:[i&&(0,Qn.jsx)(Jz,{}),o&&(0,Qn.jsx)(Zz,{}),c&&(0,Qn.jsx)(hg,{onIncrementalExtract:e||(()=>{}),onClearUntranslated:a,onOpenFile:t,isApplied:r}),d&&(0,Qn.jsx)(zpe,{controller:p})]})})]})});Qz.displayName="ThemeSidebar";var fr=A(oe()),eut=ua.default.memo(({onSave:e,isSaving:t})=>{let{t:r}=Ve(),n=sn.use.items();return(0,fr.jsxs)(we,{variant:"default",size:"sm",onClick:e,disabled:t,className:"shadow-sm hover:shadow-md transition-all active:scale-95 bg-primary hover:bg-primary/90",children:[t?(0,fr.jsx)(Gt,{className:"mr-2 h-4 w-4 animate-spin"}):(0,fr.jsx)(Md,{className:"mr-2 h-4 w-4"}),r("Editor.Actions.Save"),(0,fr.jsx)(vt,{variant:"secondary",className:"ml-2 bg-primary-foreground/20 text-primary-foreground border-none px-1 h-4",children:n.length})]})}),tut=()=>{let{t:e}=Ve(),t=Ue.getState().i18n,r=t.notice,n=Ue.getState().editorThemeTranslation,a=Ue.getState().editorThemeName,i=Ue.getState().editorThemeDir,s=Ue.getState().editorThemeTranslationPath,o=sn.use.themeName(),l=sn.use.setItems(),c=sn.use.setMetadata(),u=sn.use.setThemeInfo(),d=sn.use.addItem(),f=(0,ua.useRef)(!1),p=(0,ua.useRef)(!1),[m,h]=(0,ua.useState)(!1),[x,g]=(0,ua.useState)(""),[y,b]=(0,ua.useState)("all"),S=(0,ua.useDeferredValue)(x),w=(0,ua.useDeferredValue)(y),[E,C]=(0,ua.useState)(null),N=(0,ua.useMemo)(()=>!o||!t?.stateManager?!1:!!t.stateManager.getThemeState(o)?.isApplied,[o,t?.stateManager,m]);(0,ua.useEffect)(()=>{if(!f.current){if(n?.dict&&Array.isArray(n.dict)){let Q=n.dict.map((V,U)=>({id:V.id!==void 0?V.id:U,type:V.type||"unknown",source:V.source,target:V.target}));l(Q)}if(n?.metadata)c(n.metadata);else if(n?.manifest){let Q=n.manifest;c({theme:a||"",language:"zh-cn",version:"1.0.0",supportedVersions:Q.pluginVersion||"0.0.0",title:a||"",description:"",author:""})}a&&u(a,i||"",s||""),f.current=!0}},[n,a,i,s,l,c,u]);let _=sn.use.items(),O=sn.use.metadata(),D=(0,ua.useMemo)(()=>{let Q=_;if(w==="translated"?Q=Q.filter(V=>V.target&&V.target!==V.source):w==="untranslated"&&(Q=Q.filter(V=>!V.target||V.target===V.source)),S.trim()){let V=S.toLowerCase();Q=Q.filter(U=>U.source&&U.source.toLowerCase().includes(V)||U.target&&U.target.toLowerCase().includes(V))}return Q},[_,S,w]),W=(0,ua.useCallback)(async()=>{if(!p.current){p.current=!0,h(!0);try{let{items:Q,metadata:V,translationPath:U}=sn.getState(),L=Ue.getState().i18n,M=Q.map(se=>({type:se.type||"unknown",source:se.source,target:se.target})),ee={schemaVersion:1,metadata:V||{theme:a||"",language:"zh-cn",version:"1.0.0",supportedVersions:"0.0.0",title:a||"",description:"",author:""},dict:M};if(U){if(Eb(U,ee),Ue.setState({editorThemeTranslation:ee}),L?.sourceManager)try{let se=Pm.extname(U),ne=Pm.basename(U,se),ge=L.sourceManager.getSource(ne);ge&&(ge.origin==="cloud"&&(ge.origin="local",ge.cloud=void 0),L.sourceManager.saveSource(ge))}catch{}r.successPrefix(e("Editor.Titles.Main"),e("Common.Notices.SaveSuccess"))}else r.errorPrefix(e("Editor.Titles.Main"),e("Editor.Errors.SavePathMissing"))}catch(Q){r.errorPrefix(e("Editor.Titles.Main"),e("Common.Notices.SaveFail"),Q)}finally{p.current=!1,h(!1)}}},[r,e,a]),Z=(0,ua.useCallback)(async()=>{try{let{themeName:Q,themeDir:V}=sn.getState();if(!!t.stateManager.getThemeState(Q)?.isApplied){r.error(e("Editor.Actions.IncrementalExtractDisabledTip"));return}let k=Pm.join(V,"theme.css");if(!Em.existsSync(k)){r.error(e("Editor.Errors.FileNotFound")+": theme.css");return}let L=Em.readFileSync(k).toString(),M=Pm.join(V,"manifest.json"),ee={name:Q,version:"0.0.0",minAppVersion:"",author:"",authorUrl:""};if(Em.existsSync(M))try{ee=Em.readJsonSync(M)}catch{}let se=MM(ee,L,t.settings),ne=sn.getState().items,ge=new Set(ne.map(I=>I.source)),ue=ne.length>0?Math.max(...ne.map(I=>I.id))+1:0,H=[];for(let I of se.dict)ge.has(I.source)||H.push({id:ue++,type:I.type,source:I.source,target:I.target});H.length>0?(sn.setState(I=>({items:[...I.items,...H]})),r.success(e("Editor.Hints.ExtractSummary",{count:H.length}))):r.success(e("Editor.Hints.NoNewItems"))}catch(Q){r.error(e("Editor.Actions.IncrementalExtract")+" "+e("Common.Status.Failure")+": "+Q)}},[r,e,t.settings]),me=(0,ua.useCallback)(async()=>{try{let{themeDir:Q}=sn.getState(),V=Pm.join(Q,"theme.css");if(!Em.existsSync(V)){r.error(e("Common.Notices.ThemeNotFound"));return}let{i18nOpen:U}=await Promise.resolve().then(()=>(jP(),XM));U(t,V)}catch(Q){r.error(e("Editor.Actions.OpenFile")+" "+e("Common.Status.Failure")+": "+Q)}},[t,r,e]);return(0,ua.useEffect)(()=>{let Q=V=>{(V.ctrlKey||V.metaKey)&&(V.key==="s"||V.key==="S"||V.code==="KeyS")&&(V.preventDefault(),V.stopPropagation(),W())};return window.addEventListener("keydown",Q,!0),()=>{window.removeEventListener("keydown",Q,!0)}},[W]),(0,fr.jsx)("div",{className:"h-full flex flex-col gap-0 bg-background/50 backdrop-blur-md",children:(0,fr.jsxs)(QT,{direction:"horizontal",className:"h-full border-none",children:[(0,fr.jsx)(Lu,{defaultSize:20,minSize:10,maxSize:30,className:"h-full",children:(0,fr.jsx)("div",{className:"flex flex-col h-full py-2 pl-2 pr-1",children:(0,fr.jsxs)("div",{className:"flex flex-col h-full flex-1 min-h-0 rounded-lg border",children:[(0,fr.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 border-b shrink-0 min-h-[36px]",children:[(0,fr.jsx)(Nd,{className:"w-4 h-4 text-primary shrink-0"}),(0,fr.jsx)("span",{className:"text-sm font-semibold truncate",children:o||e("Common.Labels.Themes")})]}),(0,fr.jsx)("div",{className:"flex flex-col w-full flex-1 min-h-0 p-2",children:(0,fr.jsx)(dr,{className:"flex-1 min-h-0 pr-3 -mr-3",children:(0,fr.jsxs)("div",{className:"space-y-3 pb-2",children:[(0,fr.jsx)(Zr,{title:e("Editor.Titles.Main"),icon:Nd,children:(0,fr.jsxs)("div",{className:"flex flex-col gap-2.5",children:[(0,fr.jsx)(eut,{onSave:W,isSaving:m}),(0,fr.jsx)(vt,{variant:"outline",className:"w-full justify-center bg-background/50 border-primary/20 text-primary font-normal truncate text-xs h-8",children:o||e("Common.Labels.Themes")})]})}),(0,fr.jsx)(Yz,{})]})})})]})})}),(0,fr.jsx)(ag,{withHandle:!0}),(0,fr.jsx)(Lu,{defaultSize:60,minSize:30,className:"h-full",children:(0,fr.jsxs)("main",{className:"w-full h-full flex flex-col px-1 overflow-hidden bg-background/20",children:[(0,fr.jsx)("div",{className:"flex items-center justify-between p-2 gap-2 shrink-0",children:(0,fr.jsxs)("div",{className:"flex items-center gap-2",children:[(0,fr.jsxs)("div",{className:"relative",children:[(0,fr.jsx)(fn,{className:"absolute left-2 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),(0,fr.jsx)(nt,{className:"h-8 w-64 pl-8",placeholder:e("Common.Placeholders.Search"),value:x,onChange:Q=>g(Q.target.value)})]}),(0,fr.jsxs)(mr,{value:y,onValueChange:Q=>b(Q),children:[(0,fr.jsx)(gr,{size:"sm",className:"w-[100px]",children:(0,fr.jsx)(hr,{placeholder:e("Common.Filters.All")})}),(0,fr.jsxs)(yr,{children:[(0,fr.jsx)(Ot,{value:"all",children:e("Common.Filters.All")}),(0,fr.jsx)(Ot,{value:"translated",children:e("Common.Filters.Translated")}),(0,fr.jsx)(Ot,{value:"untranslated",children:e("Common.Filters.Untranslated")})]})]})]})}),(0,fr.jsx)("div",{className:"flex-1 min-h-0 overflow-hidden p-2 pt-0",children:(0,fr.jsx)(Xz,{data:D,editingId:E,onEditingIdChange:C})})]})}),(0,fr.jsx)(ag,{withHandle:!0}),(0,fr.jsx)(Lu,{defaultSize:20,minSize:10,maxSize:30,className:"h-full",children:(0,fr.jsx)("div",{className:"flex flex-col h-full py-2 pr-2 pl-1",children:(0,fr.jsx)("div",{className:"flex flex-col h-full flex-1 min-h-0 rounded-lg border",children:(0,fr.jsx)(Qz,{onIncrementalExtract:Z,onOpenFile:me,isApplied:N})})})})]})})},Fv="theme-editor-view-type",t_=class extends Vpe.ItemView{constructor(r,n){super(r);this.root=null;this.shadowRoot=null;this.leftCollapsed=!1;this.rightCollapsed=!1;this.i18n=n}getViewType(){return Fv}getDisplayText(){return v("Editor.Titles.Main")}getIcon(){return"palette"}async onOpen(){this.leftCollapsed=this.app.workspace.leftSplit.collapsed,this.rightCollapsed=this.app.workspace.rightSplit.collapsed,this.app.workspace.leftSplit.collapse(),this.app.workspace.rightSplit.collapse();let{root:r,shadowRoot:n}=el(this.contentEl,this.i18n,ua.default.createElement(tut));this.root=r,this.shadowRoot=n}async onClose(){this.leftCollapsed||this.app.workspace.leftSplit.expand(),this.rightCollapsed||this.app.workspace.rightSplit.expand(),this.root?.unmount(),this.shadowRoot?.empty()}};var Gpe=require("obsidian");var Bv=A(Le());$t();var rut={version:1,sections:[{titleKey:"Wizard.VideoTitle",items:[{type:"card",icon:"PlaySquare",titleKey:"Wizard.VideoTitle",descriptionKey:"Wizard.VideoDesc",action:{type:"url",value:"https://www.bilibili.com/video/BV1VcxJeNExx/"}},{type:"card",icon:"BookOpen",titleKey:"Wizard.DocTitle",descriptionKey:"Wizard.DocDesc",action:{type:"url",value:"https://github.com/eondrcode/obsidian-i18n"}}]},{titleKey:"Wizard.CommunityLabel",titleSuffix:" & ",titleKey2:"Wizard.SupportLabel",items:[{type:"card",icon:"Users",titleKey:"Wizard.QqTitle",descriptionKey:"Wizard.QqDesc",action:{type:"url",value:"https://qm.qq.com/cgi-bin/qm/qr?k=kHTS0iC1FC5igTXbdbKzff6_tc54mOF5&jump_from=webapi&authKey=AoSkriW+nDeDzBPqBl9jcpbAYkPXN2QRbrMh0hFbvMrGbqZyRAbJwaD6JKbOy4Nx"}},{type:"card",icon:"Discord",titleKey:"Wizard.DiscordTitle",descriptionKey:"Wizard.DiscordDesc",action:{type:"url",value:"https://discord.gg/TZjRK6wZ"}},{type:"card",icon:"Github",titleKey:"Wizard.GithubTitle",descriptionKey:"Wizard.GithubDesc",action:{type:"url",value:"https://github.com/eondrcode/obsidian-i18n/issues"}},{type:"card",icon:"Afdian",titleKey:"Wizard.AfdianTitle",descriptionKey:"Wizard.AfdianDesc",action:{type:"url",value:"https://afdian.com/a/eondr"}},{type:"placeholder",textKey:"Wizard.MoreExpect"}]}]};function qpe(){return rut}tr();Kt();var Ua=A(oe()),nut={PlaySquare:Pp,BookOpen:cT,Settings:xu,Cloud:Bn,LayoutGrid:xo,Users:Fi,Github:Xo,ListTodo:bT,Discord:yu,Afdian:Ih};function aut(){let{t:e}=Ve(),t=su(s=>s.i18n),r=qpe(),n=(0,Bv.useCallback)(s=>{switch(s.type){case"url":return()=>window.open(s.value);case"view":return()=>{t?.view.activateView(s.value)};case"settings":return()=>{if(t&&t.app){let o=t.app.setting;o&&(o.open(),o.openTabById(t.manifest.id))}}}},[t]),a=(0,Bv.useCallback)(s=>{if(s.type==="placeholder")return{type:"placeholder",text:e(s.textKey)};let o=s,l=nut[o.icon];return{type:"card",icon:l?(0,Ua.jsx)(l,{className:"w-6 h-6"}):null,title:e(o.titleKey),description:e(o.descriptionKey),action:n(o.action)}},[e,n]),i=(0,Bv.useCallback)(s=>{let o=e(s.titleKey);return s.titleSuffix&&s.titleKey2&&(o+=s.titleSuffix+e(s.titleKey2)),o},[e]);return(0,Bv.useMemo)(()=>r.sections.map(s=>({title:i(s),items:s.items.map(a)})),[r,i,a])}var Hpe=()=>{let{t:e}=Ve(),t=su(n=>n.i18n),r=aut();return(0,Ua.jsxs)("div",{className:"flex flex-col items-center h-full p-6 space-y-6 bg-background pb-12 overflow-y-auto",children:[(0,Ua.jsxs)("div",{className:"text-center space-y-2 mt-2",children:[(0,Ua.jsx)("h1",{className:"text-2xl font-bold tracking-tight text-primary",children:"Obsidian-I18N"}),(0,Ua.jsxs)("p",{className:"text-sm text-muted-foreground",children:["I18N ",e("Wizard.VerLabel")," ",t?.manifest?.version||e("Common.Status.Unknown")]})]}),(0,Ua.jsx)("div",{className:"w-full max-w-3xl space-y-6",children:r.map((n,a)=>(0,Ua.jsxs)("div",{className:"space-y-3",children:[(0,Ua.jsx)("h2",{className:"text-lg font-semibold tracking-tight",children:n.title}),(0,Ua.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:n.items.map((i,s)=>i.type==="placeholder"?(0,Ua.jsx)("div",{className:"h-full",children:(0,Ua.jsx)(Si,{className:"h-full border-dashed border-2 bg-transparent/50 shadow-none flex flex-col justify-center items-center opacity-70 transition-colors p-4 min-h-[82px]",children:(0,Ua.jsx)("span",{className:"text-muted-foreground text-sm font-medium",children:i.text})})},s):(0,Ua.jsx)("div",{onClick:i.action,className:"h-full",children:(0,Ua.jsx)(Si,{className:"hover:bg-accent/50 group transition-colors cursor-pointer h-full flex flex-col justify-center",children:(0,Ua.jsxs)(kp,{className:"flex flex-row items-center gap-3 space-y-0 p-4",children:[(0,Ua.jsx)("div",{className:"text-primary shrink-0 transition-transform group-hover:scale-110",children:i.icon}),(0,Ua.jsxs)("div",{className:"space-y-0.5",children:[(0,Ua.jsx)(_p,{className:"text-sm font-medium leading-tight",children:i.title}),(0,Ua.jsx)(OT,{className:"text-xs line-clamp-2",children:i.description})]})]})})},s))})]},a))})]})};$t();$r();var Kpe=A(oe()),$v="wizard-view",r_=class extends Gpe.ItemView{constructor(r,n){super(r);this.root=null;this.shadowRoot=null;this.i18n=n}getViewType(){return $v}getDisplayText(){return v("Wizard.MainTitle")}getIcon(){return"sparkles"}async onOpen(){let{root:r,shadowRoot:n}=el(this.contentEl,this.i18n,(0,Kpe.jsx)(Hpe,{}));this.root=r,this.shadowRoot=n}async onClose(){this.root?.unmount(),this.shadowRoot&&(this.shadowRoot.innerHTML="")}};var Xpe=require("obsidian");var n_=A(Le());tr();var eU=[{title:"1. \u534F\u8BAE\u7684\u8BA2\u7ACB\u4E0E\u751F\u6548",content:['1.1 \u672C\u534F\u8BAE\u662F\u60A8\uFF08\u7528\u6237\uFF09\u4E0E\u672C\u63D2\u4EF6\u5F00\u53D1\u8005\uFF08\u4EE5\u4E0B\u7B80\u79F0 "\u5F00\u53D1\u8005"\uFF09\u4E4B\u95F4\u5173\u4E8E\u4F7F\u7528\u300AI18N\u300B\uFF08\u4EE5\u4E0B\u7B80\u79F0 "\u672C\u63D2\u4EF6"\uFF09\u7684\u6CD5\u5F8B\u534F\u8BAE\u3002','1.2 [\u91CD\u8981\u63D0\u793A] \u5728\u5B89\u88C5\u3001\u542F\u7528\u672C\u63D2\u4EF6\u524D\uFF0C\u8BF7\u52A1\u5FC5\u8BA4\u771F\u9605\u8BFB\u672C\u534F\u8BAE\u5168\u90E8\u6761\u6B3E\uFF0C\u7279\u522B\u662F\u52A0\u7C97\u6216\u6D89\u53CA\u98CE\u9669\u7684\u63D0\u793A\u3002\u4E00\u65E6\u60A8\u70B9\u51FB "\u540C\u610F" \u6216\u5B9E\u9645\u5F00\u59CB\u4F7F\u7528\u672C\u63D2\u4EF6\uFF0C\u5373\u89C6\u4E3A\u60A8\u5DF2\u5145\u5206\u7406\u89E3\u5E76\u540C\u610F\u672C\u534F\u8BAE\u5168\u90E8\u5185\u5BB9\u3002',"1.3 \u5982\u60A8\u4E0D\u540C\u610F\u672C\u534F\u8BAE\u4EFB\u4F55\u5185\u5BB9\uFF0C\u5E94\u7ACB\u5373\u505C\u6B62\u5B89\u88C5\u5E76\u5220\u9664\u672C\u63D2\u4EF6\u53CA\u5176\u6240\u6709\u526F\u672C\u3002"]},{title:"2. \u6838\u5FC3\u539F\u7406\u4E0E\u98CE\u9669\u8B66\u544A",content:["2.1 [\u5B9E\u73B0\u539F\u7406] \u7528\u6237\u77E5\u6089\u5E76\u540C\u610F\uFF1A\u672C\u63D2\u4EF6\u65E8\u5728\u901A\u8FC7\u81EA\u52A8\u5316\u6280\u672F\u624B\u6BB5\uFF0C\u201C\u6CE8\u5165\u201D\u5E76\u4FEE\u6539\u5DF2\u5B89\u88C5\u7684\u7B2C\u4E09\u65B9\u63D2\u4EF6\u6E90\u7801\uFF0C\u4ECE\u800C\u5B9E\u73B0\u754C\u9762\u7FFB\u8BD1\u3001\u6587\u672C\u66FF\u6362\u7B49\u529F\u80FD\u3002","2.2 [\u98CE\u9669\u515C\u5E95] \u672C\u63D2\u4EF6\u7684\u4E0A\u8FF0\u884C\u4E3A\u5E76\u672A\u83B7\u5F97\u539F\u63D2\u4EF6\u4F5C\u8005\u7684\u660E\u793A\u6388\u6743\u3002\u7528\u6237\u5E94\u81EA\u884C\u627F\u62C5\u7531\u6B64\u53EF\u80FD\u4EA7\u751F\u7684\u6CD5\u5F8B\u7EA0\u7EB7\u3001\u539F\u63D2\u4EF6\u529F\u80FD\u5931\u6548 or \u6570\u636E\u635F\u574F\u98CE\u9669\uFF08\u5F00\u53D1\u8005\u5F3A\u70C8\u5EFA\u8BAE\u5728\u64CD\u4F5C\u524D\u5907\u4EFD\u5E93\u6570\u636E\uFF09\u3002","2.3 \u5F00\u53D1\u8005\u4EC5\u63D0\u4F9B\u6280\u672F\u5DE5\u5177\uFF0C\u4E0D\u4FDD\u8BC1\u7FFB\u8BD1\u6548\u679C\u7684\u51C6\u786E\u6027\uFF0C\u4EA6\u4E0D\u5BF9\u56E0\u7B2C\u4E09\u65B9\u63D2\u4EF6\u7248\u672C\u5347\u7EA7\u5BFC\u81F4\u7684\u517C\u5BB9\u6027\u95EE\u9898\u8D1F\u8D23\u3002"]},{title:"3. \u6570\u636E\u9690\u79C1\u4E0E\u672C\u5730\u5B89\u5168",content:["3.1 [\u672C\u5730\u5B58\u50A8] \u672C\u63D2\u4EF6\u575A\u6301\u201C\u96F6\u670D\u52A1\u5668\u201D\u539F\u5219\u3002\u6240\u6709\u5173\u952E\u914D\u7F6E\uFF08\u5982 OpenAI Key\u3001GitHub Token\u3001\u7FFB\u8BD1\u7F13\u5B58\uFF09\u5747\u4EC5\u5B58\u50A8\u5728\u7528\u6237\u672C\u5730\u8BBE\u5907\uFF0C\u5F00\u53D1\u8005\u65E0\u6CD5\u83B7\u53D6\u60A8\u7684\u4EFB\u4F55\u51ED\u636E\u3002","3.2 [\u76F4\u63A5\u901A\u4FE1] \u63D2\u4EF6\u5728\u8C03\u7528\u7B2C\u4E09\u65B9 AI \u7FFB\u8BD1 API \u6216 GitHub \u4E91\u7AEF\u63A5\u53E3\u65F6\uFF0C\u662F\u76F4\u63A5\u4ECE\u7528\u6237\u672C\u5730\u53D1\u8D77\u7684\u7F51\u7EDC\u8BF7\u6C42\uFF0C\u6570\u636E\u6D41\u5411\u5B8C\u5168\u900F\u660E\u4E14\u53D7\u63A7\u3002","3.3 [\u6570\u636E\u5907\u4EFD] \u7528\u6237\u5E94\u81EA\u884C\u59A5\u5584\u4FDD\u7BA1\u654F\u611F\u51ED\u636E\u3002\u56E0\u7528\u6237\u6CC4\u9732\u3001\u4FDD\u7BA1\u4E0D\u5584\u6216\u786C\u4EF6\u635F\u574F\u5BFC\u81F4\u7684\u4EFB\u4F55\u635F\u5931\uFF0C\u5F00\u53D1\u8005\u4E0D\u627F\u62C5\u8D54\u507F\u8D23\u4EFB\u3002"]},{title:"4. \u4E91\u7AEF\u534F\u4F5C\u4E0E\u77E5\u8BC6\u4EA7\u6743",content:["4.1 [GitHub \u6A21\u5F0F] \u7528\u6237\u4F7F\u7528\u201C\u4E91\u7AEF\u5171\u5EFA\u201D\u529F\u80FD\u65F6\u9700\u4F7F\u7528\u5176\u4E2A\u4EBA GitHub \u8D26\u53F7\u53CA\u4E13\u6709 Token\u3002\u7528\u6237\u53D1\u5E03\u7FFB\u8BD1\u5305\u5373\u610F\u5473\u7740\u5176\u627F\u8BFA\u62E5\u6709\u8BE5\u7FFB\u8BD1\u5185\u5BB9\u7684\u5408\u6CD5\u6743\u5229\uFF0C\u5E76\u540C\u610F\u5C06\u5176\u5171\u4EAB\u7ED9\u793E\u533A\u3002","4.2 [\u7248\u6743\u754C\u5B9A] \u672C\u63D2\u4EF6\u4E2D\u5F00\u53D1\u8005\u72EC\u7ACB\u521B\u4F5C\u7684\u90E8\u5206\uFF08\u4EE3\u7801\u3001\u89C6\u89C9\u8BBE\u8BA1\uFF09\u53D7\u7248\u6743\u4FDD\u62A4\uFF1B\u88AB\u7FFB\u8BD1/\u4FEE\u6539\u7684\u7B2C\u4E09\u65B9\u63D2\u4EF6\u7248\u6743\u4ECD\u5F52\u5176\u539F\u4F5C\u8005\u6240\u6709\u3002\u7528\u6237\u4FDD\u8BC1\u4EC5\u5C06\u672C\u63D2\u4EF6\u7528\u4E8E\u4E2A\u4EBA\u5B66\u4E60\u6216\u7814\u7A76\u76EE\u7684\uFF0C\u7981\u6B62\u4EFB\u4F55\u5546\u4E1A\u4FB5\u6743\u884C\u4E3A\u3002"]},{title:"5. \u514D\u8D23\u4E0E\u7EC8\u6B62",content:["5.1 \u5F00\u53D1\u8005\u5BF9\u56E0\u4E0D\u53EF\u6297\u529B\u3001\u7B2C\u4E09\u65B9\u63A5\u53E3\u9650\u6D41\u3001Obsidian \u7248\u672C\u91CD\u5927\u53D8\u66F4\u7B49\u56E0\u7D20\u5BFC\u81F4\u7684\u529F\u80FD\u5F02\u5E38\u4E0D\u627F\u62C5\u6CD5\u5F8B\u8D23\u4EFB\u3002","5.2 \u5F00\u53D1\u8005\u4FDD\u7559\u968F\u65F6\u4FEE\u6539\u534F\u8BAE\u6761\u6B3E\u7684\u6743\u5229\u3002\u534F\u8BAE\u53D8\u66F4\u540E\u5982\u7528\u6237\u7EE7\u7EED\u4F7F\u7528\uFF0C\u5219\u89C6\u4E3A\u63A5\u53D7\u65B0\u534F\u8BAE\u3002","5.3 \u7528\u6237\u53EF\u968F\u65F6\u901A\u8FC7\u5378\u8F7D\u63D2\u4EF6\u7684\u65B9\u5F0F\u89E3\u9664\u534F\u8BAE\u3002\u534F\u8BAE\u7EC8\u6B62\u4E0D\u5F71\u54CD\u7B2C 2 \u6761\u3001\u7B2C 3 \u6761\u3001\u7B2C 4 \u6761\u4E2D\u5173\u4E8E\u98CE\u9669\u627F\u62C5\u53CA\u7248\u6743\u58F0\u660E\u7684\u6548\u529B\u3002"]}];var da=A(oe()),Wpe=({view:e})=>{let{t}=Ve(),r=e.i18n,[n,a]=(0,n_.useState)(!1),i=(0,n_.useRef)(null),s=c=>{let{scrollTop:u,scrollHeight:d,clientHeight:f}=c.currentTarget;d-u-f<20&&a(!0)},o=async()=>{r&&(r.settings.agreement=!0,await r.saveSettings(),await r.onAgreementAccepted())},l=async()=>{r&&await r.app.plugins.disablePlugin(r.manifest.id)};return(0,da.jsx)("div",{className:"flex flex-col h-full bg-background p-6 items-center justify-center select-none text-standard",children:(0,da.jsxs)(Si,{className:"w-full max-w-4xl flex flex-col h-[90vh] shadow-2xl border-muted/40 ring-1 ring-border/10 overflow-hidden",children:[(0,da.jsxs)(kp,{className:"border-b pb-6 bg-muted/5 shrink-0",children:[(0,da.jsx)(_p,{className:"text-3xl text-center text-primary font-black tracking-tight uppercase",children:t("Agreement.Titles.Main")}),(0,da.jsx)("p",{className:"text-center text-xs font-bold text-muted-foreground/60 mt-2 uppercase tracking-widest",children:t("Agreement.Hints.Desc")})]}),(0,da.jsxs)(Lp,{className:"flex-1 overflow-hidden p-0 relative bg-background/50",children:[(0,da.jsxs)("div",{className:"h-full overflow-y-auto p-10 space-y-10 text-sm text-foreground/80 leading-relaxed scroll-smooth no-scrollbar",onScroll:s,ref:i,children:[Array.isArray(eU)&&eU.map((c,u)=>(0,da.jsxs)("section",{className:"space-y-4",children:[(0,da.jsxs)("h3",{className:"font-extrabold text-base text-foreground flex items-center gap-2",children:[(0,da.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-primary/40"}),c.title]}),(0,da.jsx)("ul",{className:"list-none space-y-3 pl-4 border-l-2 border-muted/20",children:Array.isArray(c.content)&&c.content.map((d,f)=>(0,da.jsx)("li",{className:"text-muted-foreground/80 leading-7 text-justify font-medium",children:d},f))})]},u)),(0,da.jsx)("div",{className:"pt-10 pb-4 text-center text-muted-foreground/40 text-[10px] font-black uppercase tracking-tighter border-t border-dashed",children:(0,da.jsx)("p",{children:t("Agreement.Hints.End")})})]}),!n&&(0,da.jsx)("div",{className:"absolute bottom-6 right-10 bg-primary text-primary-foreground px-4 py-2 rounded-full text-[10px] font-black shadow-2xl shadow-primary/40 animate-pulse pointer-events-none backdrop-blur-md border border-white/10 uppercase tracking-widest",children:t("Agreement.Hints.Scroll")})]}),(0,da.jsxs)("div",{className:"p-8 border-t bg-muted/5 flex flex-col sm:flex-row justify-end gap-6 items-center shrink-0",children:[(0,da.jsx)("div",{className:"flex-1 text-[10px] font-black uppercase tracking-wider text-muted-foreground/50 text-center sm:text-left",children:n?(0,da.jsx)("span",{className:"text-emerald-500/80",children:t("Agreement.Hints.ReadThanks")}):(0,da.jsx)("span",{className:"animate-in fade-in slide-in-from-left-2",children:t("Agreement.Hints.ReadReminder")})}),(0,da.jsxs)("div",{className:"flex items-center gap-3 w-full sm:w-auto",children:[(0,da.jsx)(we,{variant:"ghost",onClick:l,className:"flex-1 sm:flex-none h-10 px-6 text-[11px] font-black uppercase tracking-widest text-muted-foreground/40 hover:text-destructive hover:bg-destructive/5 transition-all",children:t("Agreement.Actions.Disagree")}),(0,da.jsx)(we,{onClick:o,disabled:!n,className:`flex-1 sm:flex-none h-10 min-w-[160px] text-[11px] font-black uppercase tracking-widest transition-all duration-500 shadow-xl ${n?"bg-primary hover:opacity-90 shadow-primary/20 scale-100":"bg-muted text-muted-foreground/30 scale-95 opacity-50 filter grayscale"}`,children:t("Agreement.Actions.Agree")})]})]})]})})};$t();$r();var Ype=A(oe()),NC="agreement-view",a_=class extends Xpe.ItemView{constructor(r,n){super(r);this.root=null;this.shadowRoot=null;this.i18n=n}getViewType(){return NC}getDisplayText(){return v("Agreement.Titles.Tab")}getIcon(){return"file-text"}async onOpen(){let{root:r,shadowRoot:n}=el(this.contentEl,this.i18n,(0,Ype.jsx)(Wpe,{view:this}));this.root=r,this.shadowRoot=n}async onClose(){this.root?.unmount(),this.shadowRoot&&(this.shadowRoot.innerHTML="")}};var lme=A(Le()),cme=require("obsidian");Kt();$t();tr();$r();var Qr=A(Le());Kt();var kC=require("obsidian");tr();$t();$r();function iut(e){return e==="theme"?"themes":"plugins"}function Ro(e,t){return`${iut(t)}/${e}.json`}$t();var Gg=A(Le()),i_=require("obsidian");$t();var Jpe=A(oe()),s_=({content:e,owner:t,repo:r,branch:n="main"})=>{let a=(0,Gg.useRef)(null),i=Ue.getState().i18n,[s,o]=(0,Gg.useMemo)(()=>{let u=t||"",d=r||"";if(u.includes("github.com")){let f=u.replace(/https?:\/\/github\.com\//,"").split("/");u=f[0]||"",d=f[1]||d}else if(u.includes("/")){let f=u.split("/");u=f[0]||"",d=f[1]||d}return[u.trim(),d.trim()]},[t,r]),l=(u,d,f)=>{if(!u)return"";if(u.startsWith("http")||u.startsWith("//")||u.startsWith("data:")){if(f&&u.includes("github.com")){let h=u.match(/github\.com\/([^\/]+)\/([^\/]+)\/(blob|raw)\/([^\/]+)\/(.+)/);if(h){let[x,g,y,b,S,w]=h;return`https://cdn.jsdelivr.net/gh/${g}/${y}@${S}/${w}`}}if(f&&u.includes("raw.githubusercontent.com")){let h=u.match(/raw\.githubusercontent\.com\/([^\/]+)\/([^\/]+)\/([^\/]+)\/(.+)/);if(h){let[x,g,y,b,S]=h,w=i.settings.githubProxyUrl;return w?`${w.endsWith("/")?w:w+"/"}https://raw.githubusercontent.com/${g}/${y}/${b}/${S}`:`https://cdn.jsdelivr.net/gh/${g}/${y}@${b}/${S}`}}return u}if(!s||!o)return u;let m=u.replace(/^\.?\//,"").split("/").map(h=>encodeURIComponent(h)).join("/");if(f){let h=i.settings.githubProxyUrl;return h?`${h.endsWith("/")?h:h+"/"}https://raw.githubusercontent.com/${s}/${o}/${d}/${m}`:`https://cdn.jsdelivr.net/gh/${s}/${o}@${d}/${m}`}else return`https://github.com/${s}/${o}/blob/${d}/${m}`},c=(0,Gg.useMemo)(()=>{if(!e)return"";let u=e;return u=u.replace(/<img[^>]+src=["']([^"']+)["'][^>]*alt=["']([^"']+)["'][^>]*\/?>/gi,(d,f,p)=>`![${p}](${f})`),u=u.replace(/<img[^>]+alt=["']([^"']+)["'][^>]*src=["']([^"']+)["'][^>]*\/?>/gi,(d,f,p)=>`![${f}](${p})`),u=u.replace(/<img[^>]+src=["']([^"']+)["'][^>]*\/?>/gi,(d,f)=>`![](${f})`),u=u.replace(/!\[([^\]]*)\]\(([^)]+)\)/g,(d,f,p)=>`![${f}](${l(p,n,!0)})`),u=u.replace(/(?<!\!)\[([^\]]+)\]\(([^)]+)\)/g,(d,f,p)=>`[${f}](${l(p,n,!1)})`),u},[e,s,o,n]);return(0,Gg.useEffect)(()=>{if(!a.current||!c)return;let u=a.current;u.empty(),u.addClass("markdown-rendered"),u.addClass("obsidian-i18n-readme");let d=new i_.Component;return d.load(),i_.MarkdownRenderer.render(i.app,c,u,"",d).then(()=>{u.querySelectorAll("img").forEach(m=>{m.addClass("cursor-pointer"),m.addClass("hover:opacity-90"),m.addClass("transition-opacity"),m.style.maxWidth="100%",m.style.height="auto",m.addEventListener("click",()=>{m.src&&window.open(m.src)})}),u.querySelectorAll("a").forEach(m=>{m.setAttribute("target","_blank"),m.setAttribute("rel","noopener noreferrer")})}),()=>{d.unload()}},[c,i]),(0,Jpe.jsx)("div",{ref:a,className:"markdown-container native-markdown-view max-w-none"})};var ce=A(oe()),Zpe=()=>{let{t:e}=Ve(),t=Ue.getState().i18n,r=Ue(I=>I.sourceUpdateTick),n=Te.use.targetRepoAddress(),a=Te.use.setTargetRepoAddress(),i=Te.use.targetManifest(),s=Te.use.setTargetManifest(),o=Te.use.targetRepoStars(),l=Te.use.setTargetRepoStars(),c=Te.use.targetRepoReadme(),u=Te.use.setTargetRepoReadme(),d=Te.use.savedRepos(),f=Te.use.setSavedRepos(),p=Te.use.addSavedRepo(),m=Te.use.removeSavedRepo(),[h,x]=(0,Qr.useState)("all"),[g,y]=(0,Qr.useState)(""),[b,S]=(0,Qr.useState)(!1),[w,E]=(0,Qr.useState)(null),[C,N]=(0,Qr.useState)("plugins"),[_,O]=(0,Qr.useState)(!1),D=(0,Qr.useRef)(null),W=Te.use.outdatedSources(),Z=Te.use.setOutdatedSources(),me=Te.use.isCheckingUpdates(),Q=Te.use.setIsCheckingUpdates(),[V,U]=(0,Qr.useState)([]);(0,Qr.useEffect)(()=>{(async()=>{let K=[],he=t.app.plugins.manifests;Object.values(he).forEach(q=>{q.id!==t.manifest.id&&K.push({id:q.id,name:q.name,type:"plugin"})});try{let be=`${t.app.vault.adapter.getBasePath()}/.obsidian/themes`;if(await t.app.vault.adapter.exists(`${t.app.vault.configDir}/themes`)){let Ne=await t.app.vault.adapter.list(`${t.app.vault.configDir}/themes`);for(let He of Ne.folders){let xt=He.split("/").pop();xt&&K.push({id:xt,name:xt,type:"theme"})}}}catch{}U(K.sort((q,be)=>q.name.localeCompare(be.name)))})()},[t]);let k=(0,Qr.useCallback)(async()=>{if(me||d.length===0)return;Q(!0);let K=t.sourceManager.getAllSources(),he=[];try{await Promise.all(d.map(async q=>{let[be,Ie]=q.split("/");try{let Ne=await t.api.github.getFileContentWithFallback(be,Ie,"metadata.json");Ne.state&&Ne.data&&(Array.isArray(Ne.data)?Ne.data:[]).forEach(xt=>{let Ce=K.find(ke=>ke.id===xt.id&&ke.cloud?.owner===be&&ke.cloud?.repo===Ie);Ce&&Ce.cloud?.hash!==xt.hash&&he.push({sourceId:Ce.id,pluginId:Ce.plugin,title:xt.title||Ce.title,currentVersion:Ce.cloud?.hash.substring(0,7)||"unknown",newVersion:xt.hash.substring(0,7),repoAddress:q,newHash:xt.hash})})}catch{}})),Z(he),he.length>0?t.notice.infoPrefix(v("Cloud.Notices.CheckComplete"),v("Cloud.Notices.FoundUpdates",{count:he.length})):t.notice.successPrefix(v("Cloud.Notices.CheckComplete"),v("Cloud.Notices.AllUpToDate"))}catch{}finally{Q(!1)}},[t,d,me,Z,Q,v]),L=(0,Qr.useCallback)(async()=>{if(W.length===0||w||!window.confirm(v("Cloud.Dialogs.ConfirmUpdateAll",{count:W.length})))return;let K=0;for(let he of W){E(he.sourceId);try{let[q,be]=he.repoAddress.split("/"),Ie=t.sourceManager,Ne=Ie.getSource(he.sourceId),He=await t.api.github.getFileContent(q,be,Ro(he.sourceId,Ne?.type||"plugin"));if(He.state&&He.data?.content){let xt=JSON.parse(Buffer.from(He.data.content,"base64").toString("utf-8"));Ne&&(Ie.saveSourceFile(Ne.id,xt),Ie.saveSource({...Ne,checksum:Li(xt),cloud:{...Ne.cloud,hash:he.newHash},updatedAt:Date.now()}),K++)}}catch{new kC.Notice(e("Cloud.Errors.AddFail"))}}E(null),Z([]),t.notice.successPrefix(e("Cloud.Notices.UpdateComplete"),e("Cloud.Notices.UpdateSuccessCount","",{count:K}))},[t,W,w,Z,e]),M=(0,Qr.useCallback)(I=>{let K=t.sourceManager;if(!K)return"not_downloaded";let he=n.trim().split("/");if(he.length!==2)return"not_downloaded";let[q,be]=he,Ne=K.getAllSources().find(He=>He.id===I.id);return Ne?Ne.origin==="local"||Ne.cloud?.owner!==q||Ne.cloud?.repo!==be?"fork_available":Ne.cloud?.hash!==I.hash?"update_available":"up_to_date":"not_downloaded"},[t,n,r]);Qr.default.useEffect(()=>{t.settings.cloudRepos&&f(t.settings.cloudRepos)},[t.settings.cloudRepos,f]);let ee=(0,Qr.useCallback)(I=>{t.settings.cloudRepos=I,t.saveSettings()},[t]),se=(0,Qr.useCallback)(async I=>{let K=I||n;if(!K.trim()){t.notice.errorPrefix(e("Cloud.Errors.FetchFail"),e("Cloud.Placeholders.Repo"));return}let he=K.trim().split("/");if(he.length!==2){t.notice.errorPrefix(e("Cloud.Errors.FetchFail"),e("Cloud.Hints.RepoFormatTip"));return}let[q,be]=he,Ie=`${q}/${be}`,Ne=Te.getState().githubUser,He=t.settings.shareRepo;if(Ne?.login&&He&&Ie.toLowerCase()===`${Ne.login}/${He}`.toLowerCase()){t.notice.errorPrefix(e("Cloud.Labels.AccessLimit"),e("Cloud.Hints.NoSelfExplore"));return}S(!0),O(!1);try{let xt=await t.api.github.getFileContentWithFallback(q,be,"metadata.json");if(xt.isRateLimit&&O(!0),xt.state&&xt.data){let Ce=xt.data;if(Array.isArray(Ce)){if(s(Ce),!d.includes(Ie)){let ke=[...d,Ie];p(Ie),ee(ke)}Ce.length===0?t.notice.successPrefix(e("Cloud.Notices.FetchSuccess"),e("Cloud.Tips.NoTranslations")):t.notice.successPrefix(e("Cloud.Notices.FetchSuccess"),e("Cloud.Tips.FoundTranslations","",{count:Ce.length}))}else{new kC.Notice(e("Cloud.Errors.RepoNotExist","",{address:K}));return}}else s([]),t.notice.errorPrefix(e("Cloud.Errors.FetchFail"),e("Cloud.Tips.ManifestNotFound"));t.api.github.getRepoInfo(q,be).then(Ce=>{Ce.state&&Ce.data?l(Ce.data.stargazers_count):l(null)}).catch(()=>l(null)),t.api.github.getFileContentWithFallback(q,be,"README.md").then(Ce=>{if(Ce.state&&Ce.data){let ke=typeof Ce.data=="string"?Ce.data:JSON.stringify(Ce.data,null,2);u(ke)}else u(null)}).catch(()=>u(null))}catch(xt){new kC.Notice(e("Cloud.Errors.FetchFail")+`: ${xt}`),s([]),l(null),u(null),N("plugins")}finally{S(!1)}},[n,t,s,p,d,ee,l,u,e]);(0,Qr.useEffect)(()=>{n&&n!==D.current&&!b&&(D.current=n,se())},[n,b,se]);let ne=(0,Qr.useCallback)(I=>{I!==n&&(s([]),l(null),u(null),N("plugins")),a(I),se(I)},[n,a,se,s,l,u,t]),ge=(0,Qr.useCallback)((I,K)=>{I.stopPropagation(),m(K);let he=d.filter(q=>q!==K);ee(he),new kC.Notice(e("Cloud.Notices.RepoUnsubscribed"))},[m,d,ee,e]),ue=(0,Qr.useMemo)(()=>{let I=(K="0",he="0")=>{let q=String(K).split(/[.-]/).map(Ne=>isNaN(parseInt(Ne))?Ne:parseInt(Ne)),be=String(he).split(/[.-]/).map(Ne=>isNaN(parseInt(Ne))?Ne:parseInt(Ne)),Ie=Math.max(q.length,be.length);for(let Ne=0;Ne<Ie;Ne++){let He=q[Ne]??0,xt=be[Ne]??0;if(typeof He=="number"&&typeof xt=="number"){if(He>xt)return 1;if(He<xt)return-1}else{let Ce=String(He),ke=String(xt);if(Ce>ke)return 1;if(Ce<ke)return-1}}return 0};return i.filter(K=>!(h&&h!=="all"&&K.language!==h||g&&!K.plugin.toLowerCase().includes(g.toLowerCase())&&!K.title.toLowerCase().includes(g.toLowerCase()))).sort((K,he)=>{if(K.plugin!==he.plugin)return K.plugin.localeCompare(he.plugin);let q=I(K.supported_versions,he.supported_versions);if(q!==0)return-q;let be=I(K.version,he.version);return be!==0?-be:0})},[i,h,g]),H=(0,Qr.useCallback)(async I=>{let K=n.trim().split("/");if(K.length!==2||w)return;let[he,q]=K;E(I.id);try{let be=await t.api.github.getFileContentWithFallback(he,q,Ro(I.id,I.type));if(!be.state||!be.data){let xt=be.isRateLimit?e("Cloud.Hints.RateLimitTitle"):be.data?.message||be.data||"";throw new Error(`${e("Cloud.Errors.DownloadFail")}: ${xt}`)}let Ie=typeof be.data=="string"?JSON.parse(be.data):be.data,Ne=t.sourceManager;if(!Ne)throw new Error(e("Cloud.Status.Fetching"));let He=Ne.getAllSources().find(xt=>xt.id===I.id);if(He){if(!(He.cloud?.owner===he&&He.cloud?.repo===q)){let ke=e("Cloud.Dialogs.ConfirmOverwrite","",{owner:He.cloud?.owner||e("Cloud.Status.Local"),newOwner:he});if(!window.confirm(ke)){E(null);return}}Ne.saveSourceFile(He.id,Ie);let Ce={...He,origin:"cloud",title:I.title||He.title,checksum:Li(Ie),cloud:{owner:he,repo:q,hash:I.hash},updatedAt:Date.now()};Ne.saveSource(Ce),t.notice.successPrefix(e("Cloud.Notices.UpdateSuccess"),e("Cloud.Tips.UpdatedItem","",{title:Ce.title}))}else{let xt=I.id;Ne.saveSourceFile(xt,Ie);let Ce={id:xt,plugin:I.plugin,title:I.title||e("Common.Status.Unknown"),type:I.type,origin:"cloud",isActive:!1,checksum:Li(Ie),cloud:{owner:he,repo:q,hash:I.hash},updatedAt:Date.now(),createdAt:Date.now()};Ne.saveSource(Ce),Ne.getActiveSourceId(I.plugin)?t.notice.successPrefix(e("Cloud.Notices.DownloadSuccess"),e("Cloud.Tips.AddedSource","",{title:Ce.title})):(Ne.setActive(xt,!0),t.notice.successPrefix(e("Cloud.Notices.DownloadSuccess"),e("Cloud.Tips.AddedAndActive","",{title:Ce.title})))}}catch(be){t.notice.errorPrefix(e("Cloud.Errors.DownloadFail"),`${be}`)}finally{E(null)}},[t,n,w,e]);return(0,ce.jsxs)("div",{className:"flex h-full gap-0 overflow-hidden min-h-0 animate-in fade-in duration-500",children:[(0,ce.jsx)("aside",{className:"w-[300px] flex flex-col border-r border-border/30 pr-4 shrink-0 overflow-hidden min-h-0",children:(0,ce.jsx)(dr,{className:"flex-1",children:(0,ce.jsxs)("div",{className:"space-y-6 pb-6 pt-1",children:[(0,ce.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,ce.jsxs)("div",{className:"flex items-center gap-2 text-sm font-semibold text-foreground/80",children:[(0,ce.jsx)(jx,{className:"w-4 h-4 text-primary"}),(0,ce.jsx)("span",{children:e("Cloud.Labels.ResourceCenter")})]}),(0,ce.jsxs)("div",{className:"flex gap-2",children:[(0,ce.jsxs)("div",{className:"relative group flex-1",children:[(0,ce.jsx)($n,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground group-focus-within:text-primary transition-colors"}),(0,ce.jsx)(nt,{placeholder:e("Cloud.Placeholders.SearchRepo"),value:n,onChange:I=>a(I.target.value),className:"pl-8 font-mono text-xs h-9 border-border/60 focus:border-primary/50 w-full",onKeyDown:I=>{I.key==="Enter"&&(I.preventDefault(),se())}})]}),(0,ce.jsx)(we,{onClick:()=>se(),disabled:b||!n,className:"h-9 px-4 shrink-0 shadow-sm transition-all",children:b?(0,ce.jsx)(nn,{className:"w-4 h-4 animate-spin"}):e("Cloud.Actions.Add")})]})]}),d.length>0&&(0,ce.jsxs)("div",{className:"space-y-3",children:[(0,ce.jsxs)("div",{className:"flex items-center justify-between",children:[(0,ce.jsxs)("div",{className:"flex items-center gap-2 text-[10px] font-bold text-muted-foreground uppercase tracking-wider",children:[(0,ce.jsx)(jx,{className:"w-3 h-3 text-primary/60"}),(0,ce.jsx)("span",{children:e("Cloud.Labels.SubscriptionList")})]}),(0,ce.jsx)("span",{className:"text-[9px] font-medium opacity-40 px-1.5 py-0.5 bg-muted rounded",children:d.length})]}),(0,ce.jsx)("div",{className:"flex flex-col gap-2",children:d.map(I=>{let[K,he]=I.split("/"),q=n===I&&i.length>0,be=W.some(Ie=>Ie.repoAddress===I);return(0,ce.jsxs)("div",{className:le("group relative flex items-center gap-3 p-2.5 rounded-lg border transition-all cursor-pointer",q?"bg-primary/5 border-primary/40 shadow-sm ring-1 ring-primary/20":"bg-muted/20 border-border/40 hover:bg-muted/50 hover:border-border/60"),onClick:()=>ne(I),children:[(0,ce.jsx)("div",{className:le("flex items-center justify-center w-7 h-7 rounded-md shrink-0 transition-colors",q?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground group-hover:bg-muted-foreground/10"),children:(0,ce.jsx)($n,{className:"w-3.5 h-3.5"})}),(0,ce.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,ce.jsxs)("div",{className:"text-[9px] text-muted-foreground/70 truncate uppercase font-bold tracking-tight flex items-center gap-1.5",children:[K,be&&(0,ce.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-amber-500 animate-pulse"})]}),(0,ce.jsx)("div",{className:"text-[11px] font-semibold text-foreground truncate -mt-0.5",children:he})]}),(0,ce.jsx)("button",{className:"p-1 px-1.5 rounded-md hover:bg-destructive/10 hover:text-destructive opacity-0 group-hover:opacity-100 transition-all font-mono",onClick:Ie=>ge(Ie,I),title:e("Cloud.Actions.Unsubscribe"),children:(0,ce.jsx)($h,{className:"w-3 h-3"})}),q&&(0,ce.jsxs)("div",{className:"absolute top-2 right-2 flex h-1.5 w-1.5",children:[(0,ce.jsx)("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-primary opacity-75"}),(0,ce.jsx)("span",{className:"relative inline-flex rounded-full h-1.5 w-1.5 bg-primary"})]})]},I)})})]}),(0,ce.jsx)("div",{className:"pt-4 border-t border-border/20 text-[10px] text-muted-foreground/60 leading-relaxed italic",children:e("Cloud.Tabs.Explore")})]})})}),(0,ce.jsx)("main",{className:"flex-1 flex flex-col pt-1 pl-4 overflow-hidden min-h-0 border-l border-border/10",children:(0,ce.jsxs)(Zl,{value:C,onValueChange:I=>N(I),className:"flex-1 flex flex-col overflow-hidden",children:[(0,ce.jsxs)("div",{className:"flex flex-col gap-3 mb-5 mt-1 border border-border/40 rounded-xl bg-card/60 p-3 shadow-sm backdrop-blur-sm",children:[(0,ce.jsxs)("div",{className:"flex items-center justify-between pb-3 border-b border-border/30",children:[(0,ce.jsxs)(Ql,{className:"h-9 p-1 bg-muted/50 border border-border/40 rounded-lg shadow-inner",children:[(0,ce.jsxs)(sa,{value:"plugins",className:"text-xs px-4 h-7 data-[state=active]:bg-background data-[state=active]:shadow-sm rounded-md transition-all",children:[(0,ce.jsx)(Fs,{className:"w-3.5 h-3.5 mr-1.5 text-muted-foreground"}),e("Cloud.Tabs.Browse")]}),(0,ce.jsxs)(sa,{value:"readme",className:"text-xs px-4 h-7 data-[state=active]:bg-background data-[state=active]:shadow-sm rounded-md transition-all",disabled:i.length===0,children:[(0,ce.jsx)(yo,{className:"w-3.5 h-3.5 mr-1.5 text-muted-foreground"}),e("Cloud.Tabs.Readme")]}),(0,ce.jsxs)(sa,{value:"updates",className:"text-xs px-4 h-7 data-[state=active]:bg-background data-[state=active]:shadow-sm relative rounded-md transition-all",children:[(0,ce.jsx)(nn,{className:le("w-3.5 h-3.5 mr-1.5 text-muted-foreground",me&&"animate-spin")}),e("Cloud.Tabs.Updates"),W.length>0&&(0,ce.jsxs)("span",{className:"absolute -top-1 -right-1 flex h-3 w-3",children:[(0,ce.jsx)("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-amber-400 opacity-75"}),(0,ce.jsx)("span",{className:"relative inline-flex rounded-full h-3 w-3 bg-amber-500 text-[8px] flex items-center justify-center text-white font-bold",children:W.length})]})]})]}),(0,ce.jsxs)(we,{onClick:k,disabled:me||d.length===0,size:"sm",className:"h-9 px-4 shrink-0 shadow-sm hover:shadow-md transition-all group rounded-lg",children:[me?(0,ce.jsx)(nn,{className:"w-4 h-4 animate-spin mr-2"}):(0,ce.jsx)(To,{className:"w-4 h-4 mr-2 opacity-80 group-hover:scale-110 transition-transform"}),(0,ce.jsx)("span",{className:"font-semibold text-xs tracking-wide",children:e("Cloud.Actions.CheckAllUpdates")}),W.length>0&&(0,ce.jsx)("span",{className:"ml-2 px-1.5 py-0.5 rounded-full bg-background/20 text-white text-[10px] font-bold animate-pulse",children:W.length})]})]}),(0,ce.jsxs)("div",{className:"flex items-center justify-between min-h-[32px] px-1",children:[(0,ce.jsx)("div",{className:"flex items-center gap-2 text-[13px] font-semibold text-muted-foreground/80",children:C==="updates"?(0,ce.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1 rounded-md bg-amber-500/10 text-amber-600 border border-amber-500/20",children:[(0,ce.jsx)(To,{className:"w-4 h-4"}),(0,ce.jsx)("span",{children:e("Cloud.Labels.PendingUpdates")})]}):i.length>0?(0,ce.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,ce.jsx)("div",{className:"flex items-center justify-center w-6 h-6 rounded bg-primary/10 text-primary shrink-0",children:(0,ce.jsx)(Xo,{className:"w-3.5 h-3.5"})}),(0,ce.jsx)("a",{href:`https://github.com/${n}`,target:"_blank",rel:"noopener noreferrer",className:"max-w-[200px] truncate text-foreground/90 hover:text-primary hover:underline transition-colors decoration-primary/30 underline-offset-4",title:e("Cloud.Labels.ViewOnGithub",{repo:n}),children:n}),o!==null&&(0,ce.jsxs)(vt,{variant:"outline",className:"ml-1 px-1.5 py-0 h-5 bg-yellow-500/10 border-yellow-500/30 text-yellow-600 gap-1 font-mono shadow-sm",children:[(0,ce.jsx)(So,{className:"w-2.5 h-2.5 fill-current"}),o]})]}):(0,ce.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1 opacity-60",children:[(0,ce.jsx)(fn,{className:"w-4 h-4"}),(0,ce.jsx)("span",{className:"text-xs tracking-wide",children:e("Cloud.Labels.WaitingFetch")})]})}),(0,ce.jsxs)("div",{className:le("flex items-center gap-3 shrink-0 transition-opacity",C!=="plugins"?"opacity-30 pointer-events-none":"opacity-100"),children:[(0,ce.jsxs)("div",{className:"relative group w-56 shadow-sm",children:[(0,ce.jsx)(fn,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 w-3.5 h-3.5 text-muted-foreground group-focus-within:text-primary transition-colors"}),(0,ce.jsx)(nt,{placeholder:e("Cloud.Placeholders.SearchPlugins"),value:g,onChange:I=>y(I.target.value),disabled:i.length===0,className:"pl-8 h-8 text-xs bg-background border-border/60 focus:border-primary/50 transition-all rounded-md"})]}),(0,ce.jsxs)(mr,{value:g||"all",onValueChange:I=>{I==="all"?y(""):I&&y(I)},disabled:i.length===0,children:[(0,ce.jsx)(gr,{size:"sm",className:"w-40 text-xs bg-background border-border/60 rounded-md shadow-sm h-8",children:(0,ce.jsx)(hr,{children:g?V.find(I=>I.id===g)?.name||g:"\u5168\u90E8"})}),(0,ce.jsx)(yr,{children:(0,ce.jsxs)(dr,{className:"h-72",children:[(0,ce.jsx)(Ot,{value:"all",className:"text-[11px]",children:"\u5168\u90E8"}),V.map(I=>(0,ce.jsx)(Ot,{value:I.id,className:"text-[11px]",children:(0,ce.jsxs)("div",{className:"flex items-center gap-2",children:[I.type==="plugin"?(0,ce.jsx)(hn,{className:"w-3 h-3"}):(0,ce.jsx)(Yn,{className:"w-3 h-3"}),(0,ce.jsx)("span",{children:I.name})]})},I.id))]})})]}),(0,ce.jsxs)(mr,{value:h,onValueChange:x,disabled:i.length===0,children:[(0,ce.jsx)(gr,{size:"sm",className:"w-32 text-xs bg-background border-border/60 rounded-md shadow-sm h-8",children:(0,ce.jsx)(hr,{})}),(0,ce.jsxs)(yr,{children:[(0,ce.jsx)(Ot,{value:"all",className:"text-[11px]",children:v("Common.Filters.All")}),di.map(I=>(0,ce.jsx)(Ot,{value:I.value,className:"text-[11px]",children:I.label},I.value))]})]}),(0,ce.jsx)(vt,{variant:"secondary",className:"h-8 px-2.5 font-mono text-[11px] font-bold bg-muted text-muted-foreground border border-border/50 shadow-sm rounded-md hover:bg-muted ml-1",children:ue.length})]})]})]}),(0,ce.jsx)(bn,{value:"plugins",className:"flex-1 min-h-0 m-0 outline-none data-[state=active]:flex flex-col relative z-10 animate-in fade-in slide-in-from-bottom-2 duration-300",children:(0,ce.jsx)(out,{filteredEntries:ue,handleDownload:H,downloadingId:w,getUpdateStatus:M,targetRepoAddress:n,isFetching:b,isRateLimited:_,targetManifest:i,t_i18n:e})}),(0,ce.jsx)(bn,{value:"readme",className:"flex-1 min-h-0 m-0 outline-none data-[state=active]:flex flex-col relative z-10 animate-in fade-in slide-in-from-bottom-2 duration-300 bg-card rounded-xl border shadow-sm",children:(0,ce.jsx)(dr,{className:"flex-1 min-h-0",children:(0,ce.jsx)("div",{className:"p-6",children:b?(0,ce.jsxs)("div",{className:"flex flex-col items-center justify-center py-20 text-muted-foreground",children:[(0,ce.jsx)(nn,{className:"w-8 h-8 animate-spin opacity-50 mb-3"}),(0,ce.jsx)("p",{className:"text-sm",children:e("Cloud.Labels.PleaseWait")})]}):c?(0,ce.jsx)(s_,{content:c,owner:n.split("/")[0],repo:n.split("/")[1]}):(0,ce.jsxs)("div",{className:"flex flex-col items-center justify-center py-32 text-muted-foreground border-2 border-dashed border-border/40 rounded-xl bg-muted/10 mx-auto max-w-md",children:[(0,ce.jsx)(yo,{className:"w-12 h-12 mb-4 opacity-20"}),(0,ce.jsx)("p",{className:"text-sm font-medium",children:e("Cloud.Tips.NoReadme")}),(0,ce.jsx)("p",{className:"text-xs mt-1 text-muted-foreground/60 text-center px-6",children:e("Cloud.Tips.NoReadmeDesc")})]})})})}),(0,ce.jsxs)(bn,{value:"updates",className:"flex-1 min-h-0 m-0 outline-none data-[state=active]:flex flex-col relative z-10 animate-in fade-in slide-in-from-bottom-2 duration-300",children:[(0,ce.jsxs)("div",{className:"flex items-center justify-between mb-4 px-1",children:[(0,ce.jsxs)("div",{children:[(0,ce.jsxs)("h3",{className:"text-sm font-bold text-foreground",children:[e("Cloud.Labels.PendingUpdates")," (",W.length,")"]}),(0,ce.jsx)("p",{className:"text-[11px] text-muted-foreground mt-1",children:e("Cloud.Labels.PendingUpdates")})]}),(0,ce.jsxs)("div",{className:"flex items-center gap-2",children:[(0,ce.jsxs)(we,{variant:"outline",size:"sm",onClick:k,disabled:me,className:"h-8 text-xs",children:[(0,ce.jsx)(nn,{className:le("w-3.5 h-3.5 mr-2",me&&"animate-spin")}),e("Cloud.Actions.Recheck")]}),(0,ce.jsxs)(we,{size:"sm",onClick:L,disabled:W.length===0||w!==null,className:"h-8 text-xs bg-amber-500 hover:bg-amber-600 text-white border-none shadow-sm shadow-amber-500/20",children:[(0,ce.jsx)(ts,{className:"w-3.5 h-3.5 mr-2"}),e("Cloud.Actions.UpdateAll")]})]})]}),(0,ce.jsx)(dr,{className:"flex-1 min-h-0 bg-muted/10 rounded-xl border border-dashed border-border/60",children:(0,ce.jsx)("div",{className:"p-4",children:W.length===0?(0,ce.jsxs)("div",{className:"flex flex-col items-center justify-center py-32 text-muted-foreground",children:[(0,ce.jsx)("div",{className:"w-16 h-16 rounded-full bg-green-500/10 flex items-center justify-center mb-4",children:(0,ce.jsx)(To,{className:"w-8 h-8 text-green-500/60"})}),(0,ce.jsx)("p",{className:"text-sm font-bold text-foreground/70",children:e("Cloud.Notices.AllUpToDate")}),(0,ce.jsx)("p",{className:"text-xs mt-1 opacity-60",children:e("Cloud.Tips.AllLatestDesc")})]}):(0,ce.jsx)("div",{className:"space-y-3",children:W.map(I=>(0,ce.jsxs)("div",{className:"flex items-center justify-between p-3.5 bg-card rounded-lg border border-amber-500/20 shadow-sm group hover:border-amber-500/40 transition-all",children:[(0,ce.jsxs)("div",{className:"flex items-center gap-4 flex-1 min-w-0",children:[(0,ce.jsx)("div",{className:"w-10 h-10 rounded-lg bg-amber-500/10 flex items-center justify-center shrink-0",children:(0,ce.jsx)(Fs,{className:"w-5 h-5 text-amber-500"})}),(0,ce.jsxs)("div",{className:"min-w-0 pr-4",children:[(0,ce.jsx)("h4",{className:"text-[13px] font-bold truncate",children:I.title}),(0,ce.jsxs)("div",{className:"flex items-center gap-2 mt-1",children:[(0,ce.jsx)("span",{className:"text-[10px] text-muted-foreground font-mono bg-muted px-1.5 py-0.5 rounded",children:I.pluginId}),(0,ce.jsxs)("div",{className:"flex items-center gap-1.5 text-[10px] text-amber-600/80 font-mono",children:[(0,ce.jsx)("span",{className:"opacity-60",children:I.currentVersion}),(0,ce.jsx)($l,{className:"w-3 h-3 opacity-40"}),(0,ce.jsx)("span",{className:"font-bold underline decoration-wavy underline-offset-2",children:I.newVersion})]})]})]})]}),(0,ce.jsxs)("div",{className:"flex items-center gap-3",children:[(0,ce.jsxs)("div",{className:"text-right hidden sm:block",children:[(0,ce.jsx)("div",{className:"text-[10px] text-muted-foreground font-medium truncate max-w-[120px]",children:e("Cloud.Labels.SourceFrom")}),(0,ce.jsx)("div",{className:"text-[11px] font-bold text-foreground/80 truncate max-w-[120px]",children:I.repoAddress})]}),(0,ce.jsxs)(we,{size:"sm",variant:"ghost",className:"h-8 group-hover:bg-amber-500 group-hover:text-white transition-all text-amber-600",onClick:async()=>{let K=i.find(q=>q.id===I.sourceId)||{id:I.sourceId,plugin:I.pluginId,title:I.title,hash:I.newHash,version:"unknown",language:"unknown",repo:I.repoAddress},he=n;a(I.repoAddress),await H(K),a(he),Z(W.filter(q=>q.sourceId!==I.sourceId))},disabled:w===I.sourceId,children:[w===I.sourceId?(0,ce.jsx)(nn,{className:"w-3 h-3 animate-spin"}):(0,ce.jsx)(ts,{className:"w-3.5 h-3.5"}),(0,ce.jsx)("span",{className:"ml-2",children:e("Cloud.Actions.Update")})]})]})]},I.sourceId))})})})]})]})})]})},sut=({entry:e,onDownload:t,isDownloading:r,updateStatus:n,repoAddress:a})=>{let{t:i}=Ve(),s=(0,Qr.useCallback)(()=>{let l=encodeURIComponent(i("Cloud.Labels.ReportIssue")+`: ${e.title} (${e.plugin})`),c=encodeURIComponent(i("Cloud.Labels.IssueTemplateBody","",{plugin:e.plugin,version:e.version,language:e.language,id:e.id})),u=`https://github.com/${a}/issues/new?title=${l}&body=${c}`;window.open(u)},[e,a,i]),o=(0,Qr.useCallback)(()=>{let l=Ro(e.id,e.type),c=`https://github.com/${a}/blob/main/${l}`;window.open(c)},[e,a]);return(0,ce.jsxs)("div",{className:le("group flex flex-col overflow-hidden bg-card text-card-foreground rounded-lg border border-border/60 transition-all duration-300 animate-in fade-in h-[188px] relative select-none","hover:shadow-[0_8px_30px_rgb(0,0,0,0.04)] dark:hover:shadow-[0_8px_30px_rgb(0,0,0,0.2)] hover:border-primary/40",n==="update_available"&&"border-amber-500/20 hover:border-amber-500/40 hover:shadow-amber-500/5",n==="fork_available"&&"border-purple-500/20 hover:border-purple-500/40 hover:shadow-purple-500/5",n==="up_to_date"&&"border-green-500/20 hover:border-green-500/40 hover:shadow-green-500/5"),children:[(0,ce.jsxs)("div",{className:"flex flex-col flex-1 p-4 pb-3 min-h-0 space-y-3",children:[(0,ce.jsx)("div",{className:"flex items-start justify-between gap-3",children:(0,ce.jsxs)("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[(0,ce.jsx)("div",{className:le("flex items-center justify-center w-9 h-9 rounded-md shrink-0 shadow-sm border border-border/10 transition-colors","bg-muted/50 group-hover:bg-muted"),children:e.type==="theme"?(0,ce.jsx)(Yn,{className:"w-5 h-5 text-muted-foreground group-hover:text-primary transition-colors"}):(0,ce.jsx)(hn,{className:"w-5 h-5 text-muted-foreground group-hover:text-primary transition-colors"})}),(0,ce.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,ce.jsx)("h3",{className:"text-[13px] font-semibold text-foreground tracking-tight leading-snug truncate",title:e.title,children:e.title}),(0,ce.jsxs)("div",{className:"flex items-center gap-1.5 mt-0.5",children:[(0,ce.jsxs)("span",{className:"text-[10px] text-muted-foreground/60 font-mono tracking-tighter",children:["v",e.version]}),e.supported_versions&&(0,ce.jsxs)("span",{className:"text-[9px] text-muted-foreground/30 font-mono italic",children:["[",e.supported_versions,"]"]})]})]})]})}),(0,ce.jsx)("div",{className:"min-h-[34px] max-h-[34px] overflow-hidden",children:(0,ce.jsx)("p",{className:"text-[11px] text-muted-foreground/90 leading-relaxed line-clamp-2",title:e.description||i("Common.Status.Unknown"),children:e.description||i("Common.Status.Unknown")})}),(0,ce.jsxs)("div",{className:"mt-auto flex items-center justify-between px-2.5 py-1.5 rounded bg-muted/20 border border-border/5",children:[(0,ce.jsxs)("div",{className:"flex items-center gap-3",children:[(0,ce.jsx)("div",{className:"flex items-center gap-1.5 text-[10px] text-muted-foreground/70 font-semibold",children:e.language}),(0,ce.jsx)("div",{className:"w-[1px] h-2 bg-border/20"}),(0,ce.jsxs)("div",{className:"flex items-center gap-1.5 text-[10px] text-muted-foreground/70 font-semibold",children:[(0,ce.jsx)(Os,{className:"w-3 h-3 opacity-50"}),e.updated_at?new Date(e.updated_at).toLocaleDateString(void 0,{month:"2-digit",day:"2-digit"}):"-"]})]}),(0,ce.jsx)("span",{className:"text-[9px] text-muted-foreground/50 font-mono tracking-tight truncate max-w-[80px]",children:e.plugin})]})]}),(0,ce.jsxs)("div",{className:"flex border-t border-border/30 h-10 shrink-0 bg-muted/5 group-hover:bg-muted/10 transition-colors",children:[(0,ce.jsxs)("button",{onClick:t,disabled:r||n==="up_to_date",className:le("flex-1 flex items-center justify-center gap-2 text-[11px] font-bold transition-all active:scale-95 disabled:active:scale-100",n==="up_to_date"?"text-green-600/50 cursor-default":n==="update_available"?"text-amber-600 hover:text-amber-700 hover:bg-amber-500/5":n==="fork_available"?"text-purple-600 hover:text-purple-700 hover:bg-purple-500/5":"text-primary hover:text-primary/80 hover:bg-primary/5"),children:[r?(0,ce.jsx)(nn,{className:"w-3.5 h-3.5 animate-spin"}):n==="up_to_date"?(0,ce.jsx)(jl,{className:"w-3.5 h-3.5"}):(0,ce.jsx)(ts,{className:"w-3.5 h-3.5"}),(0,ce.jsx)("span",{className:"uppercase tracking-tight",children:i(n==="up_to_date"?"Cloud.Status.UpToDate":n==="update_available"?"Cloud.Actions.Update":n==="fork_available"?"Cloud.Actions.Overwrite":"Cloud.Actions.Download")})]}),(0,ce.jsx)("div",{className:"w-[1px] bg-border/20 my-2"}),(0,ce.jsx)("button",{onClick:o,className:"px-3 flex items-center justify-center text-muted-foreground/60 hover:text-foreground hover:bg-muted/20 transition-all active:scale-90",title:i("Cloud.Labels.Source"),children:(0,ce.jsx)(Ko,{className:"w-4 h-4"})}),(0,ce.jsx)("div",{className:"w-[1px] bg-border/20 my-2"}),(0,ce.jsx)("button",{onClick:s,className:"px-4 flex items-center justify-center text-muted-foreground/60 hover:text-foreground hover:bg-muted/20 transition-all active:scale-90",title:i("Cloud.Labels.ReportIssue"),children:(0,ce.jsx)(ST,{className:"w-4 h-4"})})]})]})},out=({filteredEntries:e,handleDownload:t,downloadingId:r,getUpdateStatus:n,targetRepoAddress:a,isFetching:i,isRateLimited:s,targetManifest:o,t_i18n:l})=>{let c=(0,Qr.useRef)(null),[u,d]=(0,Qr.useState)(0);(0,Qr.useEffect)(()=>{let x=c.current;if(!x)return;let g=new ResizeObserver(y=>{for(let b of y){let S=b.contentRect.width;S>0&&d(S)}});return g.observe(x),()=>g.disconnect()},[]);let f=(0,Qr.useMemo)(()=>{let x=Math.floor((u-20+16)/336);return Math.max(1,x)},[u]),p=Math.ceil(e.length/f),m=xs({count:p,getScrollElement:()=>c.current,estimateSize:(0,Qr.useCallback)(()=>192,[]),overscan:5}),h=m.getVirtualItems();return(0,ce.jsxs)(dr,{className:"flex-1 min-h-0",viewportRef:c,children:[(0,ce.jsx)("div",{className:"pb-6 pr-4",children:i?(0,ce.jsxs)("div",{className:"flex flex-col items-center justify-center pt-32 text-muted-foreground animate-in fade-in duration-300",children:[(0,ce.jsx)(nn,{className:"w-10 h-10 animate-spin text-primary/50 mb-4"}),(0,ce.jsx)("p",{className:"text-sm font-medium tracking-tight",children:l("Cloud.Labels.FetchingResources")})]}):e.length===0?(0,ce.jsxs)("div",{className:"flex flex-col items-center justify-center pt-32 text-muted-foreground",children:[(0,ce.jsx)(fn,{className:"w-14 h-14 mb-4 opacity-20"}),(0,ce.jsx)("p",{className:"text-sm font-medium",children:l("Cloud.Tips.NoMatchesInRepo")})]}):u===0?(0,ce.jsx)("div",{className:"flex items-center justify-center pt-32 text-muted-foreground animate-in fade-in duration-300",children:(0,ce.jsx)(nn,{className:"w-8 h-8 animate-spin text-primary/30"})}):(0,ce.jsx)("div",{className:"relative w-full overflow-hidden",style:{height:`${m.getTotalSize()}px`},children:h.map(x=>{let g=x.index*f,y=e.slice(g,g+f);return(0,ce.jsx)("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:`${x.size}px`,transform:`translateY(${x.start}px)`,display:"grid",gridTemplateColumns:`repeat(${f}, 1fr)`,gap:"16px",paddingBottom:"16px"},children:y.map(b=>(0,ce.jsx)(sut,{entry:b,onDownload:()=>t(b),isDownloading:r===b.id,updateStatus:n(b),repoAddress:a},b.id))},x.key)})})}),s&&o.length===0&&(0,ce.jsxs)("div",{className:"flex flex-col items-center justify-center p-12 text-center space-y-4 animate-in fade-in slide-in-from-bottom-4 duration-500",children:[(0,ce.jsx)("div",{className:"p-4 rounded-full bg-orange-500/10 text-orange-600 ring-1 ring-orange-500/20",children:(0,ce.jsx)($n,{className:"w-10 h-10 opacity-80"})}),(0,ce.jsxs)("div",{className:"space-y-2",children:[(0,ce.jsx)("h3",{className:"text-xl font-bold tracking-tight",children:l("Cloud.Hints.RateLimitTitle")}),(0,ce.jsx)("p",{className:"text-sm text-muted-foreground leading-relaxed max-w-sm",children:l("Cloud.Hints.RateLimitDesc")})]}),(0,ce.jsxs)(we,{onClick:()=>{i18n.app.setting.open(),i18n.app.setting.openTabById("i18n")},className:"mt-4 gap-2 px-6 shadow-sm transition-all hover:translate-y-[-1px] bg-orange-500 hover:bg-orange-600 text-white border-none",children:[l("Cloud.Hints.RateLimitGuide"),(0,ce.jsx)(hs,{className:"w-4 h-4"})]})]})]})};var pl=A(Le()),ml=A(ii());Kt();$t();var Vu=A(Le());Kt();$t();$r();var l_=A(ii()),qt=A(oe());function o_(e,t=""){let r={};if(e==null)return r;if(typeof e!="object")return r[t]=String(e),r;for(let n of Object.keys(e)){let a=t?`${t}.${n}`:n,i=e[n];i!==null&&typeof i=="object"&&!Array.isArray(i)?Object.assign(r,o_(i,a)):r[a]=typeof i=="string"?i:JSON.stringify(i)}return r}function lut(e,t){let r=new Set([...Object.keys(e),...Object.keys(t)]),n=[];for(let i of r){let s=i in e,o=i in t;s&&o?e[i]!==t[i]&&n.push({type:"modified",key:i,localValue:e[i],cloudValue:t[i]}):s&&!o?n.push({type:"added",key:i,localValue:e[i]}):n.push({type:"removed",key:i,cloudValue:t[i]})}let a={modified:0,added:1,removed:2,unchanged:3};return n.sort((i,s)=>a[i.type]-a[s.type]||i.key.localeCompare(s.key)),n}var Qpe=()=>{let e=Ue.getState().i18n,t=Te.use.diffDialogSourceId(),r=Te.use.setDiffDialogSourceId(),n=Te.use.githubUser(),a=Te.use.repoManifest(),i=e.settings.shareRepo,s=!!t,[o,l]=(0,Vu.useState)(!1),[c,u]=(0,Vu.useState)([]),[d,f]=(0,Vu.useState)(""),[p,m]=(0,Vu.useState)("all"),h=a.find(b=>b.id===t)||null;(0,Vu.useEffect)(()=>{if(!s||!t||!h||!n){u([]),f("");return}let b=!1;return(async()=>{l(!0);try{let w=e.sourceManager.getSourceFilePath(t);if(!w||!l_.existsSync(w)){u([]);return}let E=l_.readFileSync(w,"utf-8"),C=JSON.parse(E),N=await e.api.github.getFileContent(n.login,i,`plugins/${t}.json`);if(b)return;if(!N.state||!N.data?.content){let V=o_(C);u(Object.entries(V).map(([U,k])=>({type:"added",key:U,localValue:k})));return}let _=Buffer.from(N.data.content,"base64").toString("utf-8"),O=JSON.parse(_),D=C?.dict||C,W=O?.dict||O,Z=o_(D),me=o_(W),Q=lut(Z,me);b||u(Q)}catch{b||u([])}finally{b||l(!1)}})(),()=>{b=!0}},[s,t,h?.id,n,i,e]);let x=(0,Vu.useMemo)(()=>c.filter(b=>{if(p!=="all"&&b.type!==p)return!1;if(d){let S=d.toLowerCase();return b.key.toLowerCase().includes(S)||(b.localValue||"").toLowerCase().includes(S)||(b.cloudValue||"").toLowerCase().includes(S)}return!0}),[c,d,p]),g=(0,Vu.useMemo)(()=>({added:c.filter(b=>b.type==="added").length,modified:c.filter(b=>b.type==="modified").length,removed:c.filter(b=>b.type==="removed").length}),[c]),y=()=>{r(null),u([]),f(""),m("all")};return(0,qt.jsx)(Kd,{open:s,onOpenChange:b=>!b&&y(),children:(0,qt.jsxs)(Wd,{className:"max-w-3xl max-h-[80vh] p-0 gap-0 overflow-hidden",children:[(0,qt.jsxs)(Xd,{className:"px-6 py-4 border-b bg-muted/30 shrink-0",children:[(0,qt.jsxs)(Yd,{className:"flex items-center gap-2 text-base",children:[(0,qt.jsx)(qx,{className:"w-4 h-4 text-primary"}),v("Cloud.Titles.DiffViewer")]}),(0,qt.jsxs)(bb,{className:"text-xs text-muted-foreground mt-1",children:[h?`${h.title} (${h.plugin})`:""," \u2014 ",v("Cloud.Tips.VersionCompareDesc")]})]}),(0,qt.jsxs)("div",{className:"flex flex-col min-h-0",style:{height:"60vh"},children:[(0,qt.jsxs)("div",{className:"flex items-center justify-between px-4 py-2.5 border-b bg-muted/10 shrink-0",children:[(0,qt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,qt.jsxs)("button",{onClick:()=>m(p==="added"?"all":"added"),className:le("inline-flex items-center gap-1 text-[11px] px-2 py-0.5 rounded-full border transition-all cursor-pointer",p==="added"?"bg-green-500/20 border-green-500/40 text-green-700":"bg-green-500/10 border-green-500/20 text-green-600 hover:bg-green-500/20"),children:[(0,qt.jsx)(xi,{className:"w-3 h-3"}),v("Cloud.Labels.Added")," ",g.added]}),(0,qt.jsxs)("button",{onClick:()=>m(p==="modified"?"all":"modified"),className:le("inline-flex items-center gap-1 text-[11px] px-2 py-0.5 rounded-full border transition-all cursor-pointer",p==="modified"?"bg-amber-500/20 border-amber-500/40 text-amber-700":"bg-amber-500/10 border-amber-500/20 text-amber-600 hover:bg-amber-500/20"),children:[(0,qt.jsx)(nn,{className:"w-3 h-3"}),v("Cloud.Actions.Update")," ",g.modified]}),(0,qt.jsxs)("button",{onClick:()=>m(p==="removed"?"all":"removed"),className:le("inline-flex items-center gap-1 text-[11px] px-2 py-0.5 rounded-full border transition-all cursor-pointer",p==="removed"?"bg-red-500/20 border-red-500/40 text-red-700":"bg-red-500/10 border-red-500/20 text-red-600 hover:bg-red-500/20"),children:[(0,qt.jsx)(Hx,{className:"w-3 h-3"}),v("Cloud.Labels.Deleted")," ",g.removed]}),p!=="all"&&(0,qt.jsx)("button",{onClick:()=>m("all"),className:"text-[10px] text-muted-foreground hover:text-primary underline ml-1",children:v("Cloud.Actions.ClearFilters")})]}),(0,qt.jsxs)("div",{className:"relative group w-40",children:[(0,qt.jsx)(fn,{className:"absolute left-2 top-1/2 -translate-y-1/2 w-3 h-3 text-muted-foreground"}),(0,qt.jsx)(nt,{placeholder:v("Cloud.Placeholders.SearchDiff"),value:d,onChange:b=>f(b.target.value),className:"pl-7 h-7 text-[11px] bg-background border-border/50"})]})]}),(0,qt.jsx)(dr,{className:"flex-1 min-h-0",children:o?(0,qt.jsxs)("div",{className:"flex flex-col items-center justify-center h-40 gap-2",children:[(0,qt.jsx)(Gt,{className:"w-5 h-5 animate-spin text-primary"}),(0,qt.jsx)("span",{className:"text-xs text-muted-foreground",children:v("Cloud.Status.LoadingDiff")})]}):c.length===0?(0,qt.jsxs)("div",{className:"flex flex-col items-center justify-center h-40 gap-2 text-muted-foreground",children:[(0,qt.jsx)(qx,{className:"w-10 h-10 opacity-20"}),(0,qt.jsx)("p",{className:"text-xs",children:v("Cloud.Hints.NoDiff")})]}):x.length===0?(0,qt.jsxs)("div",{className:"flex flex-col items-center justify-center h-40 gap-2 text-muted-foreground",children:[(0,qt.jsx)(Wo,{className:"w-8 h-8 opacity-20"}),(0,qt.jsx)("p",{className:"text-xs",children:v("Cloud.Hints.NoMatchingDiffs")})]}):(0,qt.jsx)("div",{className:"divide-y divide-border/30",children:x.map((b,S)=>(0,qt.jsxs)("div",{className:le("px-4 py-2.5 transition-colors",b.type==="added"&&"bg-green-500/5 hover:bg-green-500/10",b.type==="removed"&&"bg-red-500/5 hover:bg-red-500/10",b.type==="modified"&&"bg-amber-500/5 hover:bg-amber-500/10"),children:[(0,qt.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[b.type==="added"&&(0,qt.jsx)(xi,{className:"w-3 h-3 text-green-600 shrink-0"}),b.type==="removed"&&(0,qt.jsx)(Hx,{className:"w-3 h-3 text-red-600 shrink-0"}),b.type==="modified"&&(0,qt.jsx)(nn,{className:"w-3 h-3 text-amber-600 shrink-0"}),(0,qt.jsx)("code",{className:"text-[11px] font-mono font-semibold text-foreground/80 truncate",title:b.key,children:b.key}),(0,qt.jsx)(vt,{variant:"outline",className:le("text-[8px] px-1 py-0 h-[14px] uppercase font-bold shrink-0",b.type==="added"&&"bg-green-500/10 border-green-500/30 text-green-600",b.type==="removed"&&"bg-red-500/10 border-red-500/30 text-red-600",b.type==="modified"&&"bg-amber-500/10 border-amber-500/30 text-amber-600"),children:b.type==="added"?v("Cloud.Labels.Added"):b.type==="removed"?v("Cloud.Labels.Deleted"):v("Cloud.Actions.Update")})]}),(0,qt.jsxs)("div",{className:"ml-5 space-y-0.5",children:[b.type==="modified"&&(0,qt.jsxs)(qt.Fragment,{children:[(0,qt.jsxs)("div",{className:"flex items-start gap-2",children:[(0,qt.jsx)("span",{className:"text-[9px] text-red-500/80 font-mono font-bold mt-0.5 shrink-0 w-6",children:v("Cloud.Labels.Old")}),(0,qt.jsx)("span",{className:"text-[11px] text-red-600/70 line-through break-all leading-relaxed",children:b.cloudValue})]}),(0,qt.jsxs)("div",{className:"flex items-start gap-2",children:[(0,qt.jsx)("span",{className:"text-[9px] text-green-500/80 font-mono font-bold mt-0.5 shrink-0 w-6",children:v("Cloud.Labels.New")}),(0,qt.jsx)("span",{className:"text-[11px] text-green-700/80 font-medium break-all leading-relaxed",children:b.localValue})]})]}),b.type==="added"&&(0,qt.jsx)("p",{className:"text-[11px] text-green-700/80 break-all leading-relaxed",children:b.localValue}),b.type==="removed"&&(0,qt.jsx)("p",{className:"text-[11px] text-red-600/70 line-through break-all leading-relaxed",children:b.cloudValue})]})]},S))})}),!o&&c.length>0&&(0,qt.jsxs)("div",{className:"px-4 py-2 border-t bg-muted/10 text-[10px] text-muted-foreground flex items-center justify-between shrink-0",children:[(0,qt.jsxs)("span",{children:[v("Cloud.Labels.TotalDiffs",{count:c.length}),x.length!==c.length&&v("Cloud.Labels.ShowingCount",{count:x.length})]}),(0,qt.jsxs)("span",{className:"font-mono",children:[v("Cloud.Status.Local")," ",(0,qt.jsx)(hs,{className:"w-3 h-3 inline"})," ",v("Cloud.Status.Cloud")]})]})]})]})})};$r();Kt();tr();$t();var qu=A(oe()),Im=({title:e,description:t})=>{let{t:r}=Ve(),n=Ue.getState().i18n,a=()=>{let i=n.app;try{n.activeSettingTab="share",i.setting.open(),i.setting.openTabById("i18n")}catch{}};return(0,qu.jsxs)("div",{className:"flex flex-col items-center justify-center h-[400px] text-center p-6 space-y-4 max-w-md mx-auto",children:[(0,qu.jsx)("div",{className:"p-4 rounded-full bg-muted/50 text-muted-foreground ring-1 ring-border",children:(0,qu.jsx)(bu,{className:"w-10 h-10"})}),(0,qu.jsxs)("div",{className:"space-y-2",children:[(0,qu.jsx)("h3",{className:"text-xl font-semibold tracking-tight",children:e||r("Cloud.Hints.LoginRequired")}),(0,qu.jsx)("p",{className:"text-sm text-muted-foreground leading-relaxed",children:t||r("Cloud.Hints.LoginRequiredDesc")})]}),(0,qu.jsxs)(we,{onClick:a,className:"mt-4 gap-2 px-6 shadow-sm transition-all hover:translate-y-[-1px]",children:[r("Cloud.Hints.GoToSettings"),(0,qu.jsx)(hs,{className:"w-4 h-4"})]})]})};var ie=A(oe());function eme(e){let t=0;for(let n=0;n<e.length;n++){let a=e.charCodeAt(n);t=(t<<5)-t+a,t=t&t}return Math.abs(t).toString(16).padStart(8,"0").repeat(4)}var tme=()=>{let e=Ue.getState().i18n,t=Ue.getState().i18n.app,r=Ue(I=>I.sourceUpdateTick),n=Te.use.uploadType(),a=Te.use.selectedPluginId(),i=Te.use.selectedSourceId(),s=Te.use.uploadForm(),o=Te.use.localFiles(),l=Te.use.isLoading(),c=Te.use.repoInitialized(),u=Te.use.repoChecking(),d=Te.use.githubUser(),f=Te.use.setUploadType(),p=Te.use.setSelectedPluginId(),m=Te.use.setSelectedSourceId(),h=Te.use.setUploadForm(),x=Te.use.setLocalFiles(),g=Te.use.resetUploadForm(),y=Te.use.setRepoInitialized(),b=Te.use.repoManifest(),S=Te.use.setRepoManifest(),w=Te.use.setRepoDataLoaded(),E=Te.use.canCreateRepo(),C=Te.use.repoNameInput(),N=Te.use.setRepoNameInput(),_=Te.use.repoDescriptionInput(),O=Te.use.setRepoDescriptionInput(),D=e.settings.shareRepo,[W,Z]=(0,pl.useState)(!1),me=Te.use.setCurrentTab(),Q=(0,pl.useMemo)(()=>Object.values(t.plugins.manifests).filter(K=>K.id==="i18n"?!1:e.sourceManager.hasAnySources(K.id)),[t,e.settings.language,e.sourceManager,r]),V=(0,pl.useMemo)(()=>{try{let I=require("path").normalize(t.vault.adapter.getBasePath()),K=require("path").join(I,".obsidian","themes");return ml.existsSync(K)?ml.readdirSync(K,{withFileTypes:!0}).filter(q=>q.isDirectory()?e.sourceManager.hasAnySources(q.name):!1).map(q=>({id:q.name,name:q.name})):[]}catch{return[]}},[t,e.sourceManager,r]),U=n==="plugin"?Q:V,k=(0,pl.useMemo)(()=>a?e.sourceManager.getSourcesForPlugin(a):[],[a,e.sourceManager,r]),L=(0,pl.useMemo)(()=>i?b.find(I=>I.id===i):null,[i,b]),M=!!L,ee=Te.use.setDiffDialogSourceId(),se=(0,pl.useMemo)(()=>{if(!i)return"";let I=e.sourceManager.getSourceFilePath(i);if(I&&ml.existsSync(I))try{let K=ml.readFileSync(I,"utf-8");return eme(K)}catch{return""}return""},[i,e.sourceManager]),ne=(0,pl.useMemo)(()=>!L||!se?!1:L.hash===se,[L,se]);(0,pl.useEffect)(()=>{if(!i){x([]);return}let I=e.sourceManager,K=I.getSource(i),he=I.getSourceFilePath(i);if(K&&he&&ml.existsSync(he)){let q=ml.statSync(he);x([{path:he,language:e.settings.language,exists:!0,lastModified:q.mtime,size:q.size}]);let be="",Ie="";try{let Ne=ml.readJsonSync(he);Ne?.metadata?.description&&(be=Ne.metadata.description),(Ne?.metadata?.supportedVersions||Ne?.metadata?.version)&&(Ie=Ne.metadata.supportedVersions||Ne.metadata.version)}catch{}h({version:Ie,title:K.title,description:be})}else x([{path:"",language:e.settings.language,exists:!1}])},[i,e.settings.language,e.sourceManager]);let ge=(0,pl.useCallback)(async()=>{if(!s.title.trim()){e.notice.errorPrefix(v("Cloud.Errors.UploadFailed"),v("Cloud.Hints.TitleEmpty"));return}let I=o[0];if(!I?.exists){e.notice.errorPrefix(v("Cloud.Errors.UploadFailed"),v("Cloud.Errors.LocalFileMissing"));return}if(!d){e.notice.errorPrefix(v("Cloud.Errors.UploadFailed"),v("Cloud.Errors.NoGithubUser"));return}Z(!0);try{let K=ml.readFileSync(I.path,"utf-8"),he=d.login,q=d.id,be=e.sourceManager.getSource(i);if(!be?.id)throw new Error(v("Cloud.Errors.InvalidSourceConfig"));let Ie=be.id,Ne=eme(K),He=Ro(Ie,be.type),xt=Buffer.from(K,"utf-8").toString("base64"),Ce=v(M?"Cloud.Labels.UpdateTranslationMsg":"Cloud.Labels.AddTranslationMsg",{title:s.title,plugin:a});e.notice.successPrefix(v("Cloud.Status.Processing"),v("Cloud.Status.UploadingFile"));let ke=await e.api.github.uploadFile(he,D,He,xt,Ce);if(!ke.state)throw new Error(`${v("Cloud.Errors.UploadFileFail")}: ${ke.data?.message||ke.data}`);e.notice.successPrefix(v("Cloud.Status.Processing"),v("Cloud.Status.UpdatingIndex"));let je=[],ot,Nt=await e.api.github.getFileContent(he,D,"metadata.json");if(Nt.state&&Nt.data?.content){ot=Nt.data.sha;let Ge=Buffer.from(Nt.data.content,"base64").toString("utf-8"),ht=JSON.parse(Ge);Array.isArray(ht)&&(je=ht)}else if(Nt.status!==404)throw new Error(v("Cloud.Errors.UpdateManifestFail")+": "+(Nt.data?.message||"Network Error"));let It=new Date().toISOString(),ar={id:Ie,plugin:a,language:e.settings.language,version:s.version,supported_versions:s.version,title:s.title,description:s.description||"",hash:Ne,created_at:It,updated_at:It,type:be.type},Wr=je.findIndex(Ge=>Ge.id===Ie);Wr>=0?(je[Wr]={...je[Wr],version:s.version,supported_versions:s.version,title:s.title,description:s.description||"",hash:Ne,updated_at:It},je=je.filter((Ge,ht)=>Ge.id!==Ie||ht===Wr)):je.push(ar),e.notice.successPrefix(v("Cloud.Status.Processing"),v("Cloud.Status.UpdatingIndex"));let pe=Buffer.from(JSON.stringify(je,null,4),"utf-8").toString("base64"),We=await e.api.github.uploadFile(he,D,"metadata.json",pe,v("Cloud.Labels.UpdateManifestMsg",{plugin:a}),"main",ot);if(!We.state)throw new Error(`${v("Cloud.Errors.UpdateManifestFail")}: ${We.data?.message||We.data}`);let ct={...be,origin:"cloud",cloud:{owner:he,repo:D,hash:Ne},updatedAt:Date.now()};e.sourceManager.saveSource(ct),S(je),e.notice.successPrefix(v("Cloud.Notices.UploadSuccess"),v("Cloud.Notices.UploadCompleteDesc"))}catch(K){e.notice.errorPrefix(v("Cloud.Errors.UploadFailed"),`${K}`)}finally{Z(!1)}},[s,o,a,i,e,d,D,S,v]),ue=I=>{if(!I)return"0 B";let K=1024,he=["B","KB","MB","GB"],q=Math.floor(Math.log(I)/Math.log(K));return parseFloat((I/Math.pow(K,q)).toFixed(2))+" "+he[q]},H=()=>(0,ie.jsx)("div",{className:"flex items-center justify-between px-1 pb-4 shrink-0 ",children:(0,ie.jsxs)("div",{className:"flex items-center gap-3",children:[(0,ie.jsxs)(we,{variant:"ghost",size:"sm",className:"h-8 px-2 gap-1.5 text-muted-foreground hover:text-primary",onClick:()=>me("my"),children:[(0,ie.jsx)(mu,{className:"w-4 h-4"}),v("Cloud.Actions.BackToManage")]}),(0,ie.jsx)("div",{className:"w-[1px] h-5 bg-border/50"}),(0,ie.jsxs)("div",{className:"flex items-center gap-2",children:[(0,ie.jsx)(ql,{className:"w-4 h-4 text-primary"}),(0,ie.jsx)("h2",{className:"text-sm font-semibold",children:v("Cloud.Actions.PublishToCloud")})]})]})});return e.settings.shareToken?u?(0,ie.jsxs)("div",{className:"flex flex-col flex-1 h-full min-h-0 w-full animate-in fade-in duration-500",children:[H(),(0,ie.jsxs)("div",{className:"flex-1 flex flex-col items-center justify-center gap-4 text-muted-foreground p-6",children:[(0,ie.jsx)(Gt,{className:"w-8 h-8 animate-spin text-primary"}),(0,ie.jsx)("p",{className:"text-sm",children:v("Cloud.Status.Checking")})]})]}):c?(0,ie.jsxs)("div",{className:"flex flex-col flex-1 h-full min-h-0 w-full animate-in fade-in duration-500",children:[H(),(0,ie.jsx)("div",{className:"flex flex-col flex-1 min-h-0 overflow-y-auto overflow-x-hidden",children:(0,ie.jsxs)("div",{className:"flex flex-col gap-6 p-4 max-w-2xl mx-auto pb-20 w-full",children:[(0,ie.jsxs)("div",{className:"flex items-center gap-2 p-3 rounded-lg bg-green-500/5 border border-green-500/20 text-xs text-green-600 dark:text-green-400",children:[(0,ie.jsx)(gi,{className:"w-4 h-4"}),(0,ie.jsx)("span",{children:v("Cloud.Notices.RepoReadyPrefix")}),(0,ie.jsxs)("span",{className:"font-mono font-medium",children:[d?.login,"/",D]})]}),(0,ie.jsxs)("section",{className:"space-y-3",children:[(0,ie.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,ie.jsx)("div",{className:"flex h-6 w-6 items-center justify-center rounded-full bg-primary/10 text-primary text-xs font-bold",children:"1"}),(0,ie.jsx)(Jr,{className:"text-sm font-semibold uppercase tracking-wider text-muted-foreground",children:v("Cloud.Steps.SelectType")})]}),(0,ie.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,ie.jsxs)("button",{onClick:()=>f("plugin"),className:le("flex flex-col items-center justify-center gap-3 p-4 rounded-xl border-2 transition-all relative overflow-hidden",n==="plugin"?"border-primary bg-primary/5 shadow-sm ring-2 ring-primary/20":"border-border/60 bg-card hover:bg-accent/50 hover:border-border"),children:[(0,ie.jsx)("div",{className:le("p-3 rounded-full transition-colors",n==="plugin"?"bg-primary text-primary-foreground shadow-md":"bg-muted text-muted-foreground"),children:(0,ie.jsx)(Fs,{className:"w-6 h-6"})}),(0,ie.jsxs)("div",{className:"text-center space-y-1",children:[(0,ie.jsx)("div",{className:"font-semibold",children:v("Cloud.Labels.UploadTypePlugin")}),(0,ie.jsx)("div",{className:"text-[10px] text-muted-foreground",children:v("Cloud.Labels.UploadTypePluginDesc")})]}),n==="plugin"&&(0,ie.jsx)("div",{className:"absolute top-3 right-3 text-primary",children:(0,ie.jsx)(gi,{className:"w-5 h-5 animate-in zoom-in"})})]}),(0,ie.jsxs)("button",{onClick:()=>f("theme"),className:le("flex flex-col items-center justify-center gap-3 p-4 rounded-xl border-2 transition-all relative overflow-hidden",n==="theme"?"border-primary bg-primary/5 shadow-sm ring-2 ring-primary/20":"border-border/60 bg-card hover:bg-accent/50 hover:border-border"),children:[(0,ie.jsx)("div",{className:le("p-3 rounded-full transition-colors",n==="theme"?"bg-primary text-primary-foreground shadow-md":"bg-muted text-muted-foreground"),children:(0,ie.jsx)(Yn,{className:"w-6 h-6"})}),(0,ie.jsxs)("div",{className:"text-center space-y-1",children:[(0,ie.jsx)("div",{className:"font-semibold",children:v("Cloud.Labels.UploadTypeTheme")}),(0,ie.jsx)("div",{className:"text-[10px] text-muted-foreground",children:v("Cloud.Labels.UploadTypeThemeDesc")})]}),n==="theme"&&(0,ie.jsx)("div",{className:"absolute top-3 right-3 text-primary",children:(0,ie.jsx)(gi,{className:"w-5 h-5 animate-in zoom-in"})})]})]})]}),(0,ie.jsxs)("section",{className:"space-y-3 animate-in fade-in slide-in-from-bottom-2 duration-500",children:[(0,ie.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,ie.jsx)("div",{className:"flex h-6 w-6 items-center justify-center rounded-full bg-primary/10 text-primary text-xs font-bold",children:"2"}),(0,ie.jsx)(Jr,{className:"text-sm font-semibold uppercase tracking-wider text-muted-foreground",children:v("Cloud.Steps.SelectTarget",{type:n==="plugin"?v("Common.Labels.Plugins"):v("Common.Labels.Themes")})})]}),(0,ie.jsxs)(Si,{className:"border-border/50 shadow-sm overflow-hidden transition-all hover:shadow-md hover:border-primary/20",children:[(0,ie.jsx)(kp,{className:"pb-3 bg-muted/30",children:(0,ie.jsxs)("div",{className:"flex items-center gap-2",children:[n==="plugin"?(0,ie.jsx)(Fs,{className:"w-4 h-4 text-primary"}):(0,ie.jsx)(Yn,{className:"w-4 h-4 text-primary"}),(0,ie.jsx)(_p,{className:"text-sm font-medium",children:v("Cloud.Labels.Target",{type:n==="plugin"?v("Common.Labels.Plugins"):v("Common.Labels.Themes")})})]})}),(0,ie.jsxs)(Lp,{className:"pt-4",children:[(0,ie.jsxs)(mr,{value:a,onValueChange:p,children:[(0,ie.jsx)(gr,{size:"sm",className:"w-full bg-background border-border/60",children:(0,ie.jsx)(hr,{placeholder:v("Cloud.Placeholders.SelectTarget",{type:n==="plugin"?v("Common.Labels.Plugins"):v("Common.Labels.Themes")})})}),(0,ie.jsx)(yr,{children:U.map(I=>(0,ie.jsx)(Ot,{value:I.id,children:(0,ie.jsxs)("div",{className:"flex items-center justify-between w-full gap-2",children:[(0,ie.jsx)("span",{children:I.name}),(0,ie.jsx)("span",{className:"text-[10px] bg-muted px-1.5 py-0.5 rounded text-muted-foreground",children:I.id})]})},I.id))})]}),U.length===0&&(0,ie.jsxs)("div",{className:"mt-3 flex items-start gap-2 p-3 rounded-md bg-amber-500/5 border border-amber-500/20 text-xs text-amber-600 dark:text-amber-400",children:[(0,ie.jsx)(hi,{className:"w-3.5 h-3.5 mt-0.5"}),(0,ie.jsx)("p",{children:v("Cloud.Hints.NoLocalSourcesTip",{type:n==="plugin"?v("Common.Labels.Plugins"):v("Common.Labels.Themes")})})]})]})]})]}),a&&(0,ie.jsxs)("section",{className:"space-y-3 animate-in fade-in slide-in-from-bottom-2 duration-500",children:[(0,ie.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,ie.jsx)("div",{className:"flex h-6 w-6 items-center justify-center rounded-full bg-primary/10 text-primary text-xs font-bold",children:"3"}),(0,ie.jsx)(Jr,{className:"text-sm font-semibold uppercase tracking-wider text-muted-foreground",children:v("Cloud.Steps.SelectSource")})]}),(0,ie.jsxs)(Si,{className:"border-border/50 shadow-sm overflow-hidden transition-all hover:shadow-md hover:border-primary/20",children:[(0,ie.jsxs)(kp,{className:"pb-3 bg-muted/30",children:[(0,ie.jsxs)("div",{className:"flex items-center justify-between",children:[(0,ie.jsxs)("div",{className:"flex items-center gap-2",children:[(0,ie.jsx)($n,{className:"w-4 h-4 text-primary"}),(0,ie.jsx)(_p,{className:"text-sm font-medium",children:v("Cloud.Labels.Source")})]}),(0,ie.jsxs)(vt,{variant:"outline",className:"text-[10px] font-mono",children:[k.length," ",v("Cloud.Labels.UnitPlugins")]})]}),(0,ie.jsx)(OT,{className:"text-[11px] mt-1",children:v("Cloud.Tips.SelectSourceDesc")})]}),(0,ie.jsx)(Lp,{className:"pt-4",children:k.length===0?(0,ie.jsxs)("div",{className:"flex items-start gap-2 p-3 rounded-md bg-amber-500/5 border border-amber-500/20 text-xs text-amber-600 dark:text-amber-400",children:[(0,ie.jsx)(hi,{className:"w-3.5 h-3.5 mt-0.5"}),(0,ie.jsx)("p",{children:v("Cloud.Hints.NoSourcesForTarget",{type:n==="plugin"?v("Common.Labels.Plugins"):v("Common.Labels.Themes")})})]}):(0,ie.jsx)("div",{className:"flex flex-col gap-2",children:k.map(I=>{let K=b.some(q=>q.id===I.id),he=i===I.id;return(0,ie.jsxs)("button",{onClick:()=>m(I.id),className:le("group w-full flex items-center gap-3 p-3 rounded-lg border text-left transition-all",he?"bg-primary/5 border-primary/40 ring-1 ring-primary/20 shadow-sm":"bg-muted/20 border-border/40 hover:bg-muted/50 hover:border-border/60"),children:[(0,ie.jsx)("div",{className:le("flex items-center justify-center w-8 h-8 rounded-md shrink-0 transition-colors",he?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground"),children:(0,ie.jsx)(Vx,{className:"w-4 h-4"})}),(0,ie.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,ie.jsxs)("div",{className:"flex items-center gap-2",children:[(0,ie.jsx)("span",{className:le("text-[13px] font-semibold truncate",he?"text-primary":"text-foreground"),children:I.title}),K&&(0,ie.jsx)(vt,{variant:"outline",className:"text-[9px] px-1.5 py-0 h-[16px] bg-blue-500/10 border-blue-500/30 text-blue-600 shrink-0",children:v("Cloud.Status.Published")})]}),(0,ie.jsxs)("div",{className:"flex items-center gap-2 mt-0.5",children:[(0,ie.jsxs)("span",{className:"text-[10px] text-muted-foreground/60 font-mono truncate max-w-[180px]",title:I.id,children:[I.id.substring(0,8),"..."]}),(0,ie.jsx)("span",{className:le("text-[9px] px-1 py-0 rounded uppercase font-bold",I.origin==="local"?"bg-green-500/10 text-green-600":"bg-blue-500/10 text-blue-600"),children:I.origin==="local"?v("Cloud.Status.Local"):v("Cloud.Status.Cloud")})]})]}),he&&(0,ie.jsx)(gi,{className:"w-4 h-4 text-primary shrink-0"})]},I.id)})})})]})]}),i&&(0,ie.jsxs)("section",{className:"space-y-3 animate-in fade-in slide-in-from-bottom-2 duration-500",children:[(0,ie.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,ie.jsxs)("div",{className:"flex items-center gap-2",children:[(0,ie.jsx)("div",{className:"flex h-6 w-6 items-center justify-center rounded-full bg-primary/10 text-primary text-xs font-bold",children:"4"}),(0,ie.jsx)(Jr,{className:"text-sm font-semibold uppercase tracking-wider text-muted-foreground",children:v("Cloud.Steps.CheckFiles")})]}),M?(0,ie.jsxs)(vt,{variant:"secondary",className:"bg-blue-500/10 text-blue-600 border-blue-500/20 hover:bg-blue-500/20 flex items-center gap-1 py-0.5 text-[10px]",children:[(0,ie.jsx)(CT,{className:"w-3 h-3"}),v("Cloud.Status.UpdateAvailable")]}):(0,ie.jsxs)(vt,{variant:"secondary",className:"bg-green-500/10 text-green-600 border-green-500/20 hover:bg-green-500/20 flex items-center gap-1 py-0.5 text-[10px]",children:[(0,ie.jsx)(ET,{className:"w-3 h-3"}),v("Cloud.Status.Cloud")]})]}),(0,ie.jsx)(Si,{className:le("border-border/50 shadow-sm overflow-hidden transition-all",o[0]?.exists?M?"bg-blue-500/5 border-blue-500/20":"bg-green-500/5 border-green-500/20":"bg-red-500/5 border-red-500/20"),children:(0,ie.jsx)(Lp,{className:"p-4",children:o.map(I=>(0,ie.jsxs)("div",{className:"flex items-start gap-4",children:[(0,ie.jsx)("div",{className:le("mt-1 p-2 rounded-lg",I.exists?"bg-green-100 text-green-600 dark:bg-green-950/50":"bg-red-100 text-red-600 dark:bg-red-950/50"),children:I.exists?(0,ie.jsx)(Vx,{className:"w-5 h-5"}):(0,ie.jsx)(Nh,{className:"w-5 h-5"})}),(0,ie.jsxs)("div",{className:"flex-1 space-y-1",children:[(0,ie.jsxs)("div",{className:"flex items-center justify-between",children:[(0,ie.jsx)("h4",{className:"text-sm font-bold",children:I.exists?v("Cloud.Status.Uploaded"):v("Cloud.Status.NotDownloaded")}),I.exists&&(0,ie.jsx)("span",{className:"text-[10px] font-medium bg-green-500/10 text-green-600 px-2 py-0.5 rounded-full border border-green-500/20 uppercase",children:v("Cloud.Status.Ready")})]}),(0,ie.jsx)("p",{className:"text-xs text-muted-foreground break-all",children:I.exists?I.path:`${v("Cloud.Notices.NoFile")}: ${I.language}.json`}),I.exists&&I.lastModified&&(0,ie.jsxs)("div",{className:"flex flex-wrap gap-x-4 gap-y-1 mt-2",children:[(0,ie.jsxs)("div",{className:"flex items-center gap-1.5 text-[11px] text-muted-foreground",children:[(0,ie.jsx)(vu,{className:"w-3 h-3"}),(0,ie.jsx)("span",{children:I.language.toUpperCase()})]}),(0,ie.jsxs)("div",{className:"flex items-center gap-1.5 text-[11px] text-muted-foreground",children:[(0,ie.jsx)(wp,{className:"w-3 h-3"}),(0,ie.jsx)("span",{children:ue(I.size)})]}),(0,ie.jsxs)("div",{className:"flex items-center gap-1.5 text-[11px] text-muted-foreground",children:[(0,ie.jsx)($n,{className:"w-3 h-3"}),(0,ie.jsxs)("span",{children:[v("Common.Labels.Mtime"),": ",I.lastModified.toLocaleString(e.settings.language,{dateStyle:"medium",timeStyle:"short"})]})]})]})]})]},I.path))})})]}),i&&(0,ie.jsxs)("section",{className:"space-y-3 animate-in fade-in slide-in-from-bottom-2 duration-500",children:[(0,ie.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,ie.jsx)("div",{className:"flex h-6 w-6 items-center justify-center rounded-full bg-primary/10 text-primary text-xs font-bold",children:"5"}),(0,ie.jsx)(Jr,{className:"text-sm font-semibold uppercase tracking-wider text-muted-foreground",children:v("Cloud.Steps.CompleteInfo")})]}),(0,ie.jsx)(Si,{className:"border-border/50 shadow-sm transition-all hover:shadow-md hover:border-primary/20",children:(0,ie.jsxs)(Lp,{className:"p-5 space-y-4",children:[(0,ie.jsxs)("div",{className:"space-y-2",children:[(0,ie.jsxs)(Jr,{className:"text-xs text-muted-foreground font-medium flex items-center gap-1.5",children:[(0,ie.jsx)(xp,{className:"w-3.5 h-3.5"}),v("Cloud.Labels.TranslationTitle")]}),(0,ie.jsx)(nt,{value:s.title,onChange:I=>h({...s,title:I.target.value}),placeholder:v("Cloud.Placeholders.RepoName"),className:"bg-muted/30 focus:bg-background transition-colors"}),(0,ie.jsx)("p",{className:"text-[10px] text-muted-foreground",children:v("Cloud.Tips.ReadmeDefault")})]}),(0,ie.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,ie.jsxs)("div",{className:"space-y-2",children:[(0,ie.jsxs)(Jr,{className:"text-xs text-muted-foreground font-medium flex items-center gap-1.5",children:[(0,ie.jsx)(vu,{className:"w-3.5 h-3.5"}),v("Cloud.Labels.Version")]}),(0,ie.jsx)(nt,{value:s.version,onChange:I=>h({...s,version:I.target.value}),placeholder:"1.0.0",className:"bg-muted/30 focus:bg-background transition-colors font-mono"})]}),(0,ie.jsxs)("div",{className:"space-y-2",children:[(0,ie.jsxs)(Jr,{className:"text-xs text-muted-foreground font-medium flex items-center gap-1.5",children:[(0,ie.jsx)(Jo,{className:"w-3.5 h-3.5"}),v("Cloud.Labels.Language")]}),(0,ie.jsx)(nt,{value:e.settings.language,disabled:!0,className:"bg-muted/50 text-muted-foreground font-medium"})]})]}),(0,ie.jsxs)("div",{className:"space-y-2",children:[(0,ie.jsxs)(Jr,{className:"text-xs text-muted-foreground font-medium flex items-center gap-1.5",children:[(0,ie.jsx)(wp,{className:"w-3.5 h-3.5"}),v("Cloud.Labels.Description")," (",v("Common.Labels.Optional"),")"]}),(0,ie.jsx)(al,{value:s.description,onChange:I=>h({...s,description:I.target.value}),placeholder:v("Cloud.Tabs.Readme"),className:"min-h-[100px] bg-muted/30 focus:bg-background transition-colors resize-none"})]})]})})]}),i&&(0,ie.jsxs)("section",{className:"space-y-3 animate-in fade-in slide-in-from-bottom-2 duration-500 pb-8",children:[(0,ie.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,ie.jsx)("div",{className:"flex h-6 w-6 items-center justify-center rounded-full bg-primary/10 text-primary text-xs font-bold",children:"6"}),(0,ie.jsx)(Jr,{className:"text-sm font-semibold uppercase tracking-wider text-muted-foreground",children:v("Cloud.Steps.VerifyAndPublish")})]}),(0,ie.jsxs)(Si,{className:le("border-border shadow-sm overflow-hidden",M?"bg-blue-500/[0.02]":"bg-green-500/[0.02]"),children:[(0,ie.jsx)(kp,{className:"py-4 border-b bg-muted/10",children:(0,ie.jsxs)("div",{className:"flex items-center justify-between",children:[(0,ie.jsxs)("div",{className:"flex items-center gap-2",children:[M?(0,ie.jsx)(_h,{className:"w-5 h-5 text-blue-500"}):(0,ie.jsx)(PT,{className:"w-5 h-5 text-primary"}),(0,ie.jsxs)("div",{children:[(0,ie.jsx)(_p,{className:"text-[15px] font-bold",children:M?v("Cloud.Actions.UpdateTranslation"):v("Cloud.Titles.NewPublish")}),(0,ie.jsx)(OT,{className:"text-[10px]",children:M?v("Cloud.Dialogs.ConfirmUpdate"):v("Cloud.Notices.UploadCompleteDesc")})]})]}),M&&(0,ie.jsx)(vt,{variant:"outline",className:"bg-blue-500/10 text-blue-600 border-blue-500/30 font-bold uppercase",children:v("Common.Actions.Update")})]})}),(0,ie.jsxs)(Lp,{className:"p-0",children:[(0,ie.jsxs)("div",{className:"p-4 bg-muted/5 space-y-3",children:[(0,ie.jsxs)("div",{className:"grid grid-cols-2 gap-6",children:[(0,ie.jsxs)("div",{className:"space-y-1",children:[(0,ie.jsx)("div",{className:"text-[10px] text-muted-foreground font-medium uppercase tracking-wider",children:v("Cloud.Labels.LocalFile")}),(0,ie.jsxs)("div",{className:"flex items-center gap-2",children:[(0,ie.jsx)("div",{className:"w-1.5 h-1.5 rounded-full bg-green-500"}),(0,ie.jsx)("span",{className:"text-xs font-mono truncate max-w-[150px]",title:o[0]?.path,children:o[0]?.path.split(/[\\/]/).pop()})]})]}),(0,ie.jsxs)("div",{className:"space-y-1",children:[(0,ie.jsx)("div",{className:"text-[10px] text-muted-foreground font-medium uppercase tracking-wider",children:v("Cloud.Labels.FileSize")}),(0,ie.jsx)("div",{className:"text-xs font-mono",children:ue(o[0]?.size)})]})]}),(0,ie.jsxs)("div",{className:"flex items-center gap-2 pt-1",children:[(0,ie.jsx)("div",{className:"text-[10px] text-muted-foreground font-medium uppercase tracking-wider",children:v("Cloud.Labels.ContentHash")}),(0,ie.jsx)("div",{className:"text-[10px] font-mono text-muted-foreground/50 bg-muted/30 px-1.5 py-0.5 rounded truncate",children:se})]}),L&&(0,ie.jsxs)("div",{className:le("mt-2 p-3 rounded-lg border-l-4 flex items-center justify-between",ne?"bg-green-500/5 border-l-green-500 text-green-600":"bg-amber-500/5 border-l-amber-500 text-amber-600"),children:[(0,ie.jsx)("div",{className:"flex items-center gap-2",children:ne?(0,ie.jsxs)(ie.Fragment,{children:[(0,ie.jsx)(gi,{className:"w-4 h-4"}),(0,ie.jsx)("span",{className:"text-xs font-medium",children:v("Cloud.Status.SyncWithCloud")})]}):(0,ie.jsxs)(ie.Fragment,{children:[(0,ie.jsx)(hi,{className:"w-4 h-4"}),(0,ie.jsx)("span",{className:"text-xs font-medium",children:v("Cloud.Status.CloudDifferent")})]})}),(0,ie.jsxs)(we,{variant:"ghost",size:"sm",className:"h-7 text-[10px] gap-1 hover:bg-background/80",onClick:()=>ee(i),children:[(0,ie.jsx)(pT,{className:"w-3 h-3"}),v("Cloud.Actions.ViewDiff")]})]})]}),(0,ie.jsxs)("div",{className:"p-5 bg-background",children:[(0,ie.jsx)(we,{onClick:ge,disabled:W||M&&ne,className:le("w-full h-12 gap-2 text-base font-bold shadow-xl transition-all active:scale-95",M?"bg-blue-600 hover:bg-blue-700 shadow-blue-500/20":"bg-primary hover:bg-primary/90 shadow-primary/20",M&&ne&&"opacity-50 grayscale cursor-not-allowed"),children:W?(0,ie.jsxs)(ie.Fragment,{children:[(0,ie.jsx)(Gt,{className:"w-5 h-5 animate-spin"}),M?v("Cloud.Actions.Update"):v("Cloud.Actions.Add"),"..."]}):(0,ie.jsxs)(ie.Fragment,{children:[M?(0,ie.jsx)(vp,{className:"w-5 h-5"}):(0,ie.jsx)(Sp,{className:"w-5 h-5"}),M?ne?v("Cloud.Status.UpToDate"):v("Cloud.Actions.Update"):v("Cloud.Actions.Add")]})}),(0,ie.jsxs)("p",{className:"text-[10px] text-center text-muted-foreground mt-3",children:[v("Cloud.Tips.PublishNoticePrefix")," ",(0,ie.jsxs)("span",{className:"underline decoration-dotted",children:[d?.login,"/",D]})," ",v("Cloud.Tips.PublishNoticeSuffix")]})]})]})]})]})]})}),(0,ie.jsx)(Qpe,{})]}):(0,ie.jsxs)("div",{className:"flex flex-col flex-1 h-full min-h-0 w-full animate-in fade-in duration-500",children:[H(),(0,ie.jsxs)("div",{className:"flex-1 flex flex-col items-center justify-center gap-4 text-muted-foreground p-6",children:[(0,ie.jsx)(yi,{className:"w-10 h-10 opacity-50"}),(0,ie.jsx)("p",{className:"text-sm",children:v("Cloud.Hints.RepoNotInit")}),(0,ie.jsx)(we,{variant:"outline",size:"sm",className:"mt-4 shadow-sm hover:bg-primary hover:text-primary-foreground transition-all",onClick:()=>me("my"),children:v("Cloud.Actions.BackToManage")})]})]}):(0,ie.jsxs)("div",{className:"flex flex-col flex-1 h-full min-h-0 w-full animate-in fade-in duration-500",children:[H(),(0,ie.jsx)(Im,{})]})};var en=A(Le());Kt();$t();$r();zf();var c_=A(ii());var J=A(oe());function cut(e){let t=0;for(let n=0;n<e.length;n++){let a=e.charCodeAt(n);t=(t<<5)-t+a,t=t&t}return Math.abs(t).toString(16).padStart(8,"0").repeat(4)}var rme=()=>{let e=Ue.getState().i18n,t=Ue(pe=>pe.sourceUpdateTick),r=Te.use.githubUser(),n=Te.use.repoInitialized(),a=Te.use.repoChecking(),i=Te.use.repoManifest(),s=Te.use.setRepoManifest(),o=Te.use.myRepoInfo(),l=Te.use.myRepoReadme(),c=Te.use.setMyRepoReadme(),u=Te.use.setRepoInitialized(),d=Te.use.setRepoDataLoaded(),f=Te.use.canCreateRepo(),p=Te.use.repoNameInput(),m=Te.use.setRepoNameInput(),h=Te.use.repoDescriptionInput(),x=Te.use.setRepoDescriptionInput(),[g,y]=(0,en.useState)(null),[b,S]=(0,en.useState)("all"),[w,E]=(0,en.useState)(""),[C,N]=(0,en.useState)([]),[_,O]=(0,en.useState)("plugins"),[D,W]=(0,en.useState)(!1),[Z,me]=(0,en.useState)(""),[Q,V]=(0,en.useState)(!1),[U,k]=(0,en.useState)(!1);(0,en.useEffect)(()=>{(async()=>{let We=[],ct=e.app.plugins.manifests;Object.values(ct).forEach(Ge=>{Ge.id!==e.manifest.id&&We.push({id:Ge.id,name:Ge.name,type:"plugin"})});try{let Ge=e.app.vault.adapter.getBasePath();if(await e.app.vault.adapter.exists(`${e.app.vault.configDir}/themes`)){let Ht=await e.app.vault.adapter.list(`${e.app.vault.configDir}/themes`);for(let ut of Ht.folders){let Ct=ut.split("/").pop();Ct&&We.push({id:Ct,name:Ct,type:"theme"})}}}catch{}N(We.sort((Ge,ht)=>Ge.name.localeCompare(ht.name)))})()},[e]);let L=e.settings.shareRepo,M=Te.use.communityRegistry(),ee=Te.use.communityStats(),[se,ne]=(0,en.useState)(!1),[ge,ue]=(0,en.useState)(!1),[H,I]=(0,en.useState)(!1),K=ee?.repos[`${r?.login}/${L}`]!==void 0,he=Te.use.setCurrentTab(),q=Te.use.setSelectedPluginId(),be=Te.use.setUploadForm(),Ie=Te.use.setSelectedSourceId(),[Ne,He]=(0,en.useState)(null),xt=Te.use.setHistoryDialogEntryId(),Ce=(0,en.useCallback)(async pe=>{let We=p.trim();if(We.includes("/")&&(We=We.split("/").pop()||""),!We){e.notice.errorPrefix(v("Cloud.Errors.InitFailed"),v("Cloud.Hints.RepoNameRequired"));return}if(!r){e.notice.errorPrefix(v("Cloud.Errors.InitFailed"),v("Cloud.Errors.NoGithubUser"));return}k(!0);try{if(pe==="create"){if(e.notice.successPrefix(v("Cloud.Status.Initializing"),v("Cloud.Status.CreatingRepo")),!(await e.api.github.createRepo(We)).state)throw new Error(v("Cloud.Errors.CreateRepoFail"));await new Promise(ht=>setTimeout(ht,2e3))}else if(e.notice.successPrefix(v("Cloud.Status.Checking"),v("Cloud.Status.VerifyingRepo")),!(await e.api.github.checkRepoExists(r.login,We)).state)throw new Error(v("Cloud.Errors.RepoNotExistOnGithub",{repo:`${r.login}/${We}`}));if(e.notice.successPrefix(v("Cloud.Status.Initializing"),v("Cloud.Status.InitializingStructure")),!(await e.api.github.initRepoStructure(r.login,We)).state)throw new Error(v("Cloud.Errors.InitRepoStructFail"));if(pe==="create"){e.notice.successPrefix(v("Cloud.Status.Initializing"),v("Cloud.Status.GeneratingReadme"));let Ge=`# ${We}
${h.trim()||v("Cloud.Tips.ReadmeDefault")}`,ht=Buffer.from(Ge,"utf-8").toString("base64");(await e.api.github.uploadFile(r.login,We,"README.md",ht,v("Cloud.Labels.InitReadmeMsg"))).state}e.settings.shareRepo=We,await e.saveSettings(),e.notice.successPrefix(v("Cloud.Notices.UploadSuccess"),v("Cloud.Notices.RepoReadyPrefix")),u(!0),await new Promise(Ge=>setTimeout(Ge,1e3)),d(!1)}catch(ct){e.notice.errorPrefix(v("Cloud.Errors.InitFailed"),`${ct}`)}finally{k(!1)}},[e,r,p,h,u,d,v]);en.default.useEffect(()=>{if(!r||!L||K)return;let pe=!1;return(async()=>{I(!0);try{let ct="eondrcode/obsidian-i18n-resources",[Ge,ht]=ct.split("/"),Ht=`${r.login}/${L}`,ut=await e.api.github.checkHasOpenRegistrationIssue(Ge,ht,Ht,r.login);!pe&&ut.state&&ut.hasOpenIssue&&ue(!0)}catch{}finally{pe||I(!1)}})(),()=>{pe=!0}},[r,L,K,e]);let ke=(0,en.useCallback)(async()=>{if(!r||!L||se)return;let pe=`${r.login}/${L}`;if(K){e.notice.successPrefix(v("Cloud.Status.Registered"),v("Cloud.Hints.RepoAlreadyInCommunity"));return}if(i.length===0){e.notice.errorPrefix(v("Cloud.Errors.CannotRegister"),v("Cloud.Hints.PublishBeforeRegister"));return}ne(!0);try{let We="eondrcode/obsidian-i18n-resources";if(!We)throw new Error(v("Cloud.Errors.RegistryAddrMissing"));let[ct,Ge]=We.split("/");if(!ct||!Ge)throw new Error(v("Cloud.Errors.RegistryAddrFormatError"));let ht=`[Register] ${pe}`,Ht=`https://github.com/${pe}`,ut=`https://github.com/${pe}/blob/main/metadata.json`,Ct=i.length,fa=Array.from(new Set(i.map(Me=>Me.language))).join(", "),Kr=[`## ${v("Cloud.Actions.ApplyForCommunity")}`,"",`${v("Cloud.Labels.RegistrationLabel")}`,"",`### \u{1F4D6} ${v("Cloud.Labels.RepoInfo")}`,`- **${v("Cloud.Labels.RepoAddress")}**: [${pe}](${Ht})`,`- **${v("Cloud.Labels.ManifestFile")}**: [metadata.json](${ut})`,`- **${v("Cloud.Labels.TranslationCountLabel")}**: \`${Ct}\` ${v("Cloud.Labels.UnitPlugins")}`,`- **${v("Cloud.Labels.LanguagesCovered")}**: \`${fa||v("Common.Status.Unknown")}\``,"",`### \u{1F6E0} ${v("Cloud.Labels.ReviewHelper")}`,`> **${v("Cloud.Labels.ReviewerNotes")}**\uFF1A`,`> 1. ${v("Cloud.Labels.ReviewerNote1")}`,`> 2. ${v("Cloud.Labels.ReviewerNote2")}`,`> 3. ${v("Cloud.Labels.ReviewerNote3")}`,`> - [\u{1F517} ${v("Cloud.Labels.CheckManifestData")}](https://raw.githubusercontent.com/${pe}/main/metadata.json)`,"","---",`*${v("Cloud.Labels.IssueAutoGenerated")}*`].join(`
`),Fr=await e.api.github.getFileContent(ct,Ge,"registry.json");if(Fr.state&&Fr.data?.content){let Me=Buffer.from(Fr.data.content,"base64").toString("utf-8");try{let qe=JSON.parse(Me);if(Array.isArray(qe)&&qe.some(st=>st.repoAddress===pe)){e.notice.errorPrefix(v("Cloud.Hints.RegistrationIntercept"),v("Cloud.Hints.RepoAlreadyRegistered"));return}}catch{}}let ye=await e.api.github.checkHasOpenRegistrationIssue(ct,Ge,pe,r.login);if(ye.state&&ye.hasOpenIssue){e.notice.errorPrefix(v("Cloud.Hints.RegistrationIntercept"),v("Cloud.Hints.RegistrationPending"));return}let De=await e.api.github.postIssue(ht,Kr,void 0,ct,Ge);if(De.state)e.notice.successPrefix(v("Cloud.Notices.SubmitSuccess"),v("Cloud.Notices.RegistrationSubmittedDesc")),ue(!0);else throw new Error(De.data?.message||v("Common.Notices.Failure"))}catch(We){e.notice.errorPrefix(v("Common.Notices.Failure"),`${We}`)}finally{ne(!1)}},[r,L,se,K,i,e]),je=(0,en.useCallback)(async()=>{if(!(!r||!L)){V(!0);try{let pe=r.login,We=Buffer.from(Z,"utf-8").toString("base64"),ct=await e.api.github.uploadFile(pe,L,"README.md",We,v("Cloud.Labels.UpdateReadmeMsg"));if(!ct.state)throw new Error(ct.data?.message||v("Common.Notices.SaveFail"));c(Z),W(!1),e.notice.successPrefix(v("Cloud.Notices.SaveSuccess"),v("Cloud.Notices.ReadmeUpdated"))}catch(pe){e.notice.errorPrefix(v("Common.Notices.SaveFail"),`${pe}`)}finally{V(!1)}}},[r,L,Z,e,c]),ot=(0,en.useCallback)(pe=>{q(pe.plugin),Ie(pe.id),be({title:pe.title,description:pe.description||"",version:pe.version||pe.supported_versions||""}),he("upload")},[q,Ie,be,he]),Nt=(0,en.useCallback)(async pe=>{if(confirm(v("Cloud.Dialogs.DeleteConfirm",{plugin:pe.plugin,title:pe.title}))&&r){y(pe.id);try{let We=r.login,ct=Ro(pe.id,pe.type),Ge=await e.api.github.deleteFile(We,L,ct,`${v("Cloud.Labels.RemoveTranslation")}: ${pe.id}`);!Ge.state&&(Ge.data,v("Cloud.Notices.NoFile"));let ht=[],Ht=await e.api.github.getFileContent(We,L,"metadata.json");if(Ht.state&&Ht.data?.content){let Ct=Buffer.from(Ht.data.content,"base64").toString("utf-8");ht=JSON.parse(Ct)}else if(Ht.status!==404)throw new Error(v("Cloud.Errors.UpdateIndexFail")+": "+(Ht.data?.message||"Network Error"));ht=ht.filter(Ct=>Ct.id!==pe.id);let ut=await e.api.github.uploadFile(We,L,"metadata.json",Buffer.from(JSON.stringify(ht,null,2)).toString("base64"),`${v("Cloud.Labels.DeleteEntry")}: ${pe.plugin}`);if(!ut.state)throw new Error(`${v("Cloud.Errors.UpdateIndexFail")}: ${ut.data?.message||ut.data}`);s(ht),e.notice.successPrefix(v("Common.Notices.Success"),v("Common.Notices.DeleteSuccess"))}catch(We){e.notice.errorPrefix(v("Common.Notices.Failure"),`${We}`)}finally{y(null)}}},[r,e,L,s]),It=(0,en.useCallback)(async pe=>{if(!(!r||!L)&&!Ne){He(pe.id),e.notice.successPrefix(v("Cloud.Status.Processing"),v("Cloud.Status.Downloading",{title:pe.title}));try{let We=r.login,ct=await e.api.github.getFileContentWithFallback(We,L,Ro(pe.id,pe.type));if(!ct.state||!ct.data){let ut=ct.isRateLimit?v("Cloud.Hints.RateLimitTitle"):ct.data?.message||ct.data||"";throw new Error(`${v("Cloud.Errors.DownloadFail")}: ${ut}`)}let Ge=typeof ct.data=="string"?JSON.parse(ct.data):ct.data,ht=e.sourceManager;if(!ht)throw new Error(v("Cloud.Errors.InitFailed"));ht.saveSourceFile(pe.id,Ge);let Ht=ht.getAllSources().find(ut=>ut.id===pe.id);if(Ht){let ut={...Ht,origin:"cloud",title:pe.title||Ht.title,checksum:Li(Ge),cloud:{owner:We,repo:L,hash:pe.hash},updatedAt:Date.now()};ht.saveSource(ut)}else{let ut={id:pe.id,plugin:pe.plugin,title:pe.title||v("Cloud.Labels.UnnamedTranslation"),type:pe.type,origin:"cloud",isActive:!1,checksum:Li(Ge),cloud:{owner:We,repo:L,hash:pe.hash},updatedAt:Date.now(),createdAt:Date.now()};ht.saveSource(ut),ht.getActiveSourceId(pe.plugin)||ht.setActive(pe.id,!0)}Ue.getState().triggerSourceUpdate(),e.notice.successPrefix(v("Common.Notices.Success"),v("Cloud.Notices.DownloadSuccessLocal"))}catch(We){e.notice.errorPrefix(v("Cloud.Errors.DownloadFail"),`${We}`)}finally{He(null)}}},[r,e,L,Ne]),ar=(0,en.useCallback)(pe=>{let We=e.sourceManager;if(!We)return"not_downloaded";let Ge=We.getAllSources().find(ht=>ht.id===pe.id);if(!Ge)return"not_downloaded";try{let ht=We.getSourceFilePath(Ge.id);if(!ht||!c_.existsSync(ht))return"not_downloaded";let Ht=c_.readFileSync(ht,"utf-8");return cut(Ht)===pe.hash?"up_to_date":"update_available"}catch{return"update_available"}},[e,t]);if(!e.settings.shareToken)return(0,J.jsx)(Im,{});let Wr=i.filter(pe=>!(b&&b!=="all"&&pe.language!==b||w&&!pe.plugin.toLowerCase().includes(w.toLowerCase())&&!pe.title.toLowerCase().includes(w.toLowerCase())));return e.settings.shareToken?a?(0,J.jsxs)("div",{className:"flex flex-col items-center justify-center h-40 gap-3 text-muted-foreground",children:[(0,J.jsx)(Gt,{className:"w-6 h-6 animate-spin text-primary"}),(0,J.jsx)("p",{className:"text-sm",children:v("Cloud.Status.LoadingRepo")})]}):n?(0,J.jsxs)("div",{className:"flex h-full gap-0 overflow-hidden min-h-0 animate-in fade-in duration-500",children:[(0,J.jsx)("aside",{className:"w-[280px] flex flex-col border-r border-border/20 pr-5 shrink-0 overflow-hidden min-h-0",children:(0,J.jsx)(dr,{className:"flex-1",children:(0,J.jsxs)("div",{className:"space-y-8 pb-8 pt-4",children:[i.length>0&&(0,J.jsxs)("div",{className:"bg-card border border-border/60 shadow-[0_8px_30px_rgb(0,0,0,0.02)] dark:shadow-[0_8px_30px_rgb(0,0,0,0.15)] rounded-lg overflow-hidden group transition-all duration-300 hover:border-primary/20",children:[(0,J.jsxs)("div",{className:"p-5 pb-4 border-b border-border/40 bg-muted/5",children:[(0,J.jsxs)("div",{className:"flex items-center gap-4 mb-4",children:[(0,J.jsxs)("div",{className:"relative",children:[r?.avatar_url?(0,J.jsx)("img",{src:r.avatar_url,className:"w-12 h-12 rounded-full border-2 border-background shadow-md object-cover",alt:"avatar"}):(0,J.jsx)("div",{className:"w-12 h-12 rounded-full bg-primary/10 flex items-center justify-center text-primary shadow-inner",children:(0,J.jsx)(Fi,{className:"w-6 h-6"})}),(0,J.jsx)("div",{className:"absolute -bottom-1 -right-1 w-4 h-4 rounded-full bg-green-500 border-2 border-background",title:"Connected"})]}),(0,J.jsxs)("div",{className:"flex flex-col min-w-0",children:[(0,J.jsx)("span",{className:"text-[14px] font-extrabold text-foreground leading-none truncate mb-1",title:r?.name||r?.login,children:r?.name||r?.login}),(0,J.jsxs)("div",{className:"flex items-center gap-2 text-[10px] text-muted-foreground/70 font-medium",children:[(0,J.jsxs)("span",{className:"flex items-center gap-1",children:[(0,J.jsx)(Fi,{className:"w-2.5 h-2.5"}),r?.followers||0]}),(0,J.jsx)("span",{className:"opacity-30",children:"\u2022"}),(0,J.jsxs)("span",{className:"flex items-center gap-1",children:[(0,J.jsx)(yi,{className:"w-2.5 h-2.5"}),r?.public_repos||0]})]})]})]}),(0,J.jsxs)("div",{className:"flex items-center gap-2 p-2 px-2.5 rounded-lg bg-background/50 border border-border/40 overflow-hidden",children:[(0,J.jsx)(Xo,{className:"w-3.5 h-3.5 text-primary shrink-0 opacity-70"}),(0,J.jsx)("a",{href:`https://github.com/${r?.login}/${L}`,target:"_blank",rel:"noopener noreferrer",className:"font-bold text-[11px] font-mono truncate hover:text-primary transition-colors text-muted-foreground/90",title:v("Cloud.Labels.ViewOnGithubTitle",{repo:`${r?.login}/${L}`}),children:L})]})]}),(0,J.jsxs)("div",{className:"p-5 space-y-5",children:[(0,J.jsx)("div",{className:"grid grid-cols-2 gap-3",children:[{label:v("Cloud.Labels.StatAssets"),value:i.length,color:"text-primary"},{label:v("Cloud.Labels.StatStars"),value:o?.stargazers_count??"-",color:"text-yellow-600"},{label:v("Cloud.Labels.StatForks"),value:o?.forks_count??"-",color:"text-blue-600"},{label:v("Cloud.Labels.StatIssues"),value:o?.open_issues_count??"-",color:"text-red-500/80"}].map((pe,We)=>(0,J.jsxs)("div",{className:"flex flex-col p-2.5 rounded-md bg-muted/20 border border-border/5 transition-all hover:bg-muted/40 hover:border-border/20 group/stat",children:[(0,J.jsx)("span",{className:"text-[9px] font-bold text-muted-foreground/60 uppercase tracking-widest mb-1 group-hover/stat:text-primary/70",children:pe.label}),(0,J.jsx)("span",{className:le("text-[13px] font-black tracking-tighter",pe.color),children:pe.value})]},We))}),K?(0,J.jsxs)("div",{className:"flex items-center justify-center gap-2 w-full h-9 rounded-lg bg-green-500/5 text-green-600 text-[11px] font-black tracking-tight border border-green-500/10 shadow-sm uppercase",children:[(0,J.jsx)(jl,{className:"w-3.5 h-3.5"}),v("Cloud.Status.Registered")]}):(0,J.jsxs)(we,{variant:"outline",size:"sm",className:"w-full h-9 text-[11px] font-bold tracking-tight gap-2 rounded-lg border-primary/20 bg-primary/5 text-primary hover:bg-primary hover:text-primary-foreground transition-all active:scale-[0.97]",onClick:ke,disabled:se||ge||H,children:[se||H?(0,J.jsx)(Gt,{className:"w-3.5 h-3.5 animate-spin"}):(0,J.jsx)(Fi,{className:"w-3.5 h-3.5"}),ge?v("Cloud.Status.Reviewing"):H?v("Cloud.Status.Fetching"):v("Cloud.Actions.RegisterCommunity")]})]})]}),(0,J.jsxs)("div",{className:"space-y-3 px-1",children:[(0,J.jsxs)("div",{className:"flex items-center gap-2 text-[9px] font-black text-muted-foreground/50 uppercase tracking-[0.2em] mb-4",children:[(0,J.jsx)(Bn,{className:"w-3 h-3 opacity-60"}),(0,J.jsx)("span",{children:v("Cloud.Labels.CloudActions")})]}),(0,J.jsxs)(we,{variant:"outline",className:"w-full justify-between h-10 px-4 group bg-card border-border/60 hover:border-primary/40 hover:bg-primary/5 transition-all active:scale-[0.97]",onClick:()=>{q(""),he("upload")},children:[(0,J.jsxs)("div",{className:"flex items-center gap-3",children:[(0,J.jsx)(ql,{className:"w-4 h-4 text-primary opacity-70 group-hover:scale-110 transition-transform"}),(0,J.jsx)("span",{className:"text-[12px] font-extrabold tracking-tight",children:v("Cloud.Actions.PublishNew")})]}),(0,J.jsx)(xi,{className:"w-3.5 h-3.5 text-muted-foreground/30"})]}),(0,J.jsxs)(we,{variant:"outline",className:"w-full justify-between h-10 px-4 group bg-card border-border/60 hover:border-blue-500/40 hover:bg-blue-500/5 transition-all active:scale-[0.97]",onClick:()=>he("backup"),children:[(0,J.jsxs)("div",{className:"flex items-center gap-3",children:[(0,J.jsx)(Bn,{className:"w-4 h-4 text-blue-500 opacity-70 group-hover:scale-110 transition-transform"}),(0,J.jsx)("span",{className:"text-[12px] font-extrabold tracking-tight",children:v("Cloud.Labels.BackupRestore")})]}),(0,J.jsx)(wo,{className:"w-3.5 h-3.5 text-muted-foreground/30"})]}),(0,J.jsx)("div",{className:"pt-4 border-t border-border/10 mt-2",children:(0,J.jsxs)(we,{variant:"ghost",className:"w-full justify-start h-9 px-3 gap-3 text-muted-foreground/60 hover:text-primary hover:bg-primary/5 transition-all rounded-lg group",onClick:()=>d(!1),children:[(0,J.jsx)(nn,{className:"w-4 h-4 opacity-50 group-hover:rotate-180 group-hover:opacity-100 transition-all duration-500"}),(0,J.jsx)("span",{className:"text-[11px] font-bold",children:v("Cloud.Actions.ForceRefresh")})]})})]})]})})}),(0,J.jsx)("main",{className:"flex-1 flex flex-col pt-1 pl-4 overflow-hidden min-h-0 border-l border-border/10",children:(0,J.jsxs)(Zl,{value:_,onValueChange:pe=>O(pe),className:"flex flex-col h-full min-h-0",children:[i.length>0&&(0,J.jsxs)("div",{className:"flex flex-col gap-3 mb-5 mt-1 border border-border/40 rounded-xl bg-card/60 p-3 shadow-sm backdrop-blur-sm",children:[(0,J.jsx)("div",{className:"flex items-center justify-between pb-3 border-b border-border/30",children:(0,J.jsxs)(Ql,{className:"h-9 p-1 bg-muted/50 border border-border/40 rounded-lg shadow-inner",children:[(0,J.jsxs)(sa,{value:"plugins",className:"text-xs px-4 h-7 data-[state=active]:bg-background data-[state=active]:shadow-sm rounded-md transition-all",children:[(0,J.jsx)(hn,{className:"w-3.5 h-3.5 mr-1.5 text-muted-foreground"}),v("Cloud.Tabs.Resources")]}),(0,J.jsxs)(sa,{value:"readme",className:"text-xs px-4 h-7 data-[state=active]:bg-background data-[state=active]:shadow-sm rounded-md transition-all",children:[(0,J.jsx)(yo,{className:"w-3.5 h-3.5 mr-1.5 text-muted-foreground"}),v("Cloud.Tabs.Readme")]})]})}),(0,J.jsxs)("div",{className:"flex items-center justify-between min-h-[32px] px-1",children:[(0,J.jsx)("div",{className:"flex items-center gap-2 text-[13px] font-semibold text-muted-foreground/80",children:_==="plugins"?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)("div",{className:"flex items-center justify-center w-6 h-6 rounded bg-primary/10 text-primary shrink-0",children:(0,J.jsx)(Yo,{className:"w-3.5 h-3.5"})}),(0,J.jsxs)("span",{children:[v("Cloud.Labels.PublishedResources")," (",i.length,")"]})]}):(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)("div",{className:"flex items-center justify-center w-6 h-6 rounded bg-primary/10 text-primary shrink-0",children:(0,J.jsx)(yo,{className:"w-3.5 h-3.5"})}),(0,J.jsx)("span",{children:v("Cloud.Labels.ReadmeCustomPage")})]})}),(0,J.jsxs)("div",{className:le("flex items-center gap-3 shrink-0 transition-opacity",_==="readme"?"opacity-30 pointer-events-none":"opacity-100"),children:[(0,J.jsxs)("div",{className:"relative group w-52 shadow-sm",children:[(0,J.jsx)(fn,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 w-3.5 h-3.5 text-muted-foreground group-focus-within:text-primary transition-colors"}),(0,J.jsx)(nt,{placeholder:v("Cloud.Placeholders.SearchPublished"),value:w,onChange:pe=>E(pe.target.value),className:"pl-8 h-8 text-xs bg-background border-border/60 focus:border-primary/50 transition-all rounded-md"})]}),(0,J.jsxs)(mr,{onValueChange:pe=>{E(pe==="all"?"":pe)},children:[(0,J.jsx)(gr,{size:"sm",className:"w-44 text-xs bg-background border-border/60 rounded-md shadow-sm h-8",children:(0,J.jsx)(hr,{placeholder:v("Common.Filters.All")})}),(0,J.jsx)(yr,{children:(0,J.jsxs)(dr,{className:"h-72",children:[(0,J.jsx)(Ot,{value:"all",className:"text-[11px]",children:v("Common.Filters.All")}),C.map(pe=>(0,J.jsx)(Ot,{value:pe.name,className:"text-[11px]",children:(0,J.jsxs)("div",{className:"flex items-center gap-2",children:[pe.type==="plugin"?(0,J.jsx)(hn,{className:"w-3 h-3 text-muted-foreground/50"}):(0,J.jsx)(Yn,{className:"w-3 h-3 text-muted-foreground/50"}),(0,J.jsx)("span",{children:pe.name})]})},pe.id))]})})]}),(0,J.jsxs)(mr,{value:b,onValueChange:S,children:[(0,J.jsx)(gr,{size:"sm",className:"w-32 text-xs bg-background border-border/60 rounded-md shadow-sm h-8",children:(0,J.jsx)(hr,{})}),(0,J.jsxs)(yr,{children:[(0,J.jsx)(Ot,{value:"all",className:"text-[11px]",children:v("Common.Filters.All")}),di.map(pe=>(0,J.jsx)(Ot,{value:pe.value,className:"text-[11px]",children:pe.label},pe.value))]})]}),(0,J.jsx)(vt,{variant:"secondary",className:"h-8 px-2.5 font-mono text-[11px] font-bold bg-muted text-muted-foreground border border-border/50 shadow-sm rounded-md hover:bg-muted ml-1",children:Wr.length})]})]})]}),(0,J.jsx)(bn,{value:"plugins",className:"flex-1 min-h-0 m-0 outline-none data-[state=active]:flex flex-col relative z-10",children:(0,J.jsx)(dut,{filteredEntries:Wr,repoManifest:i,handleEdit:ot,handleDelete:Nt,handleDownload:It,setHistoryDialogEntryId:xt,setCurrentTab:he,deletingId:g,downloadingId:Ne,getUpdateStatus:ar,t:v})}),(0,J.jsxs)(bn,{value:"readme",className:"flex-1 min-h-0 m-0 outline-none data-[state=active]:flex flex-col relative z-10 bg-card rounded-xl border shadow-sm overflow-hidden",children:[(0,J.jsxs)("div",{className:"flex items-center justify-between px-4 py-2 border-b border-border/40 shrink-0 bg-muted/20",children:[(0,J.jsxs)("div",{className:"text-xs font-semibold text-muted-foreground flex items-center gap-2",children:[(0,J.jsx)(yo,{className:"w-4 h-4"}),"README.md"]}),(0,J.jsx)("div",{children:D?(0,J.jsxs)("div",{className:"flex gap-2",children:[(0,J.jsx)(we,{size:"sm",variant:"ghost",className:"h-7 text-xs",onClick:()=>{W(!1),me(l||"")},children:v("Common.Actions.Cancel")}),(0,J.jsxs)(we,{size:"sm",className:"h-7 text-xs",onClick:je,disabled:Q,children:[Q?(0,J.jsx)(Gt,{className:"w-3 h-3 animate-spin mr-1"}):(0,J.jsx)(Md,{className:"w-3 h-3 mr-1"})," ",v("Common.Actions.Save")]})]}):(0,J.jsxs)(we,{size:"sm",variant:"outline",className:"h-7 text-xs",onClick:()=>{W(!0),me(l||"")},children:[(0,J.jsx)(Dd,{className:"w-3 h-3 mr-1"})," ",v("Common.Actions.Edit")]})})]}),(0,J.jsx)(dr,{className:"flex-1 min-h-0 bg-background/50",children:D?(0,J.jsx)("div",{className:"p-4 h-full",children:(0,J.jsx)(al,{value:Z,onChange:pe=>me(pe.target.value),className:"min-h-[300px] h-full font-mono text-[13px] border-0 focus-visible:ring-0 resize-none rounded-none bg-transparent",placeholder:v("Cloud.Placeholders.ReadmeEdit")})}):(0,J.jsx)("div",{className:"p-6",children:l?(0,J.jsx)(s_,{content:l,owner:r?.login,repo:L}):(0,J.jsxs)("div",{className:"flex flex-col items-center justify-center py-32 text-muted-foreground border-2 border-dashed border-border/40 rounded-xl bg-muted/10 mx-auto max-w-md",children:[(0,J.jsx)(yo,{className:"w-12 h-12 mb-4 opacity-20"}),(0,J.jsx)("p",{className:"text-sm font-medium",children:v("Cloud.Labels.NoReadmeAdded")}),(0,J.jsx)("p",{className:"text-xs mt-1 text-muted-foreground/60 text-center px-6",children:v("Cloud.Labels.NoReadmeAddedDesc")})]})})})]})]},t)})]}):(0,J.jsx)("div",{className:"flex flex-col flex-1 h-full min-h-0 w-full animate-in fade-in duration-500",children:(0,J.jsx)("div",{className:"flex-1 overflow-y-auto overflow-x-hidden",children:(0,J.jsxs)("div",{className:"flex flex-col items-center justify-center gap-6 p-4 max-w-md mx-auto py-12",children:[(0,J.jsxs)("div",{className:"flex flex-col items-center gap-3 text-center",children:[(0,J.jsx)("div",{className:"p-4 rounded-full bg-primary/10",children:(0,J.jsx)(yi,{className:"w-10 h-10 text-primary"})}),(0,J.jsx)("h3",{className:"text-lg font-semibold",children:v("Cloud.Actions.InitPersonalRepo")}),(0,J.jsx)("p",{className:"text-sm text-muted-foreground leading-relaxed",children:v("Cloud.Tips.InitRepoDesc")})]}),(0,J.jsxs)("div",{className:"w-full max-w-xs space-y-2",children:[(0,J.jsx)(Jr,{className:"text-xs text-muted-foreground font-medium",children:v("Cloud.Labels.RepoName")}),(0,J.jsx)(nt,{value:p,onChange:pe=>m(pe.target.value),placeholder:"obsidian-i18n-resources",className:"font-mono text-sm"}),r&&(0,J.jsxs)("p",{className:"text-[10px] text-muted-foreground",children:[v("Cloud.Labels.RepoUrlPrefix")," ",(0,J.jsxs)("span",{className:"font-mono font-medium",children:[r.login,"/",p||"..."]})]})]}),(0,J.jsxs)("div",{className:"w-full max-w-xs space-y-2",children:[(0,J.jsxs)(Jr,{className:"text-xs text-muted-foreground font-medium",children:[v("Cloud.Labels.RepoDesc")," (",v("Common.Labels.Optional"),")"]}),(0,J.jsx)(al,{value:h,onChange:pe=>x(pe.target.value),placeholder:v("Cloud.Tips.ReadmeDefault"),className:"text-sm min-h-[80px]"})]}),(0,J.jsxs)("div",{className:"w-full max-w-xs space-y-3",children:[(0,J.jsxs)("div",{className:"space-y-1.5",children:[(0,J.jsx)(we,{onClick:()=>Ce("create"),disabled:U||!p.trim()||!f,className:"w-full h-10 bg-primary hover:bg-primary/90 text-primary-foreground font-semibold shadow-lg shadow-primary/20",children:U?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(Gt,{className:"w-4 h-4 mr-2 animate-spin"}),v("Cloud.Status.Processing")]}):(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(xi,{className:"w-4 h-4 mr-2"}),v("Cloud.Actions.CreateNewRepo")]})}),!f&&(0,J.jsxs)("div",{className:"flex items-start gap-1.5 px-2 text-[10px] text-amber-600 dark:text-amber-400",children:[(0,J.jsx)(hi,{className:"w-3 h-3 mt-0.5 shrink-0"}),(0,J.jsxs)("span",{children:[v("Cloud.Errors.NoCreateRepoPerm")," ",(0,J.jsx)("code",{className:"font-mono bg-muted px-1 rounded",children:"public_repo"})," ",v("Cloud.Labels.Permission")]})]})]}),(0,J.jsxs)("div",{className:"flex items-center gap-3 px-2",children:[(0,J.jsx)("div",{className:"flex-1 h-px bg-border/60"}),(0,J.jsx)("span",{className:"text-[10px] text-muted-foreground font-medium",children:v("Common.Labels.Or")}),(0,J.jsx)("div",{className:"flex-1 h-px bg-border/60"})]}),(0,J.jsxs)("div",{className:"space-y-1.5",children:[(0,J.jsx)(we,{variant:"outline",onClick:()=>Ce("use-existing"),disabled:U||!p.trim(),className:"w-full h-10 font-semibold",children:U?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(Gt,{className:"w-4 h-4 mr-2 animate-spin"}),v("Cloud.Status.Checking")]}):(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(yi,{className:"w-4 h-4 mr-2"}),v("Cloud.Actions.UseExistingRepo")]})}),(0,J.jsx)("p",{className:"text-[10px] text-center text-muted-foreground",children:v("Cloud.Tips.UseExistingDesc")})]})]})]})})}):(0,J.jsxs)("div",{className:"flex flex-col items-center justify-center h-40 gap-3 text-muted-foreground",children:[(0,J.jsx)(hi,{className:"w-10 h-10 opacity-50"}),(0,J.jsx)("p",{className:"text-sm",children:v("Cloud.Hints.TokenRequired")})]})},uut=({entry:e,onEdit:t,onDelete:r,onDownload:n,onHistory:a,isDeleting:i,isDownloading:s,updateStatus:o})=>(0,J.jsxs)("div",{className:le("group flex flex-col overflow-hidden bg-card text-card-foreground rounded-lg border border-border/60 transition-all duration-300 animate-in fade-in h-[188px] relative select-none","hover:shadow-[0_8px_30px_rgb(0,0,0,0.04)] dark:hover:shadow-[0_8px_30px_rgb(0,0,0,0.2)] hover:border-primary/40",o==="update_available"&&"border-amber-500/20 hover:border-amber-500/40 hover:shadow-amber-500/5",o==="not_downloaded"&&"border-blue-500/20 hover:border-blue-500/40 hover:shadow-blue-500/5",o==="up_to_date"&&"border-green-500/20 hover:border-green-500/40 hover:shadow-green-500/5"),children:[(0,J.jsxs)("div",{className:"flex flex-col flex-1 p-4 pb-3 min-h-0 space-y-3",children:[(0,J.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,J.jsxs)("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[(0,J.jsx)("div",{className:le("flex items-center justify-center w-9 h-9 rounded-md shrink-0 shadow-sm border border-border/10 transition-colors","bg-muted/50 group-hover:bg-muted"),children:e.type==="theme"?(0,J.jsx)(Yn,{className:"w-5 h-5 text-muted-foreground group-hover:text-primary transition-colors"}):(0,J.jsx)(hn,{className:"w-5 h-5 text-muted-foreground group-hover:text-primary transition-colors"})}),(0,J.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,J.jsx)("h3",{className:"text-[13px] font-semibold text-foreground tracking-tight leading-snug truncate",title:e.title||e.plugin,children:e.title||e.plugin}),(0,J.jsxs)("div",{className:"flex items-center gap-1.5 mt-0.5",children:[(0,J.jsxs)("span",{className:"text-[10px] text-muted-foreground/60 font-mono tracking-tighter",children:["v",e.version]}),e.supported_versions&&(0,J.jsxs)("span",{className:"text-[9px] text-muted-foreground/30 font-mono italic",children:["[",e.supported_versions,"]"]})]})]})]}),(0,J.jsxs)("div",{className:"flex items-center shrink-0 pt-0.5",children:[o==="up_to_date"&&(0,J.jsxs)("div",{className:"p-1 px-2 rounded-sm bg-green-500/5 border border-green-500/10 text-green-600/80 text-[9px] font-bold tracking-tight uppercase flex items-center gap-1",children:[(0,J.jsx)(jl,{className:"w-3 h-3 opacity-70"}),v("Cloud.Status.Uploaded")]}),o==="update_available"&&(0,J.jsxs)("div",{className:"p-1 px-2 rounded-sm bg-amber-500/5 border border-amber-500/10 text-amber-600/80 text-[9px] font-bold tracking-tight uppercase animate-pulse flex items-center gap-1",children:[(0,J.jsx)(wo,{className:"w-3 h-3 opacity-70"}),v("Cloud.Status.Modified")]}),o==="not_downloaded"&&(0,J.jsxs)("div",{className:"p-1 px-2 rounded-sm bg-blue-500/5 border border-blue-500/10 text-blue-600/80 text-[9px] font-bold tracking-tight uppercase flex items-center gap-1",children:[(0,J.jsx)(ts,{className:"w-3 h-3 opacity-70"}),v("Cloud.Status.NotDownloaded")]})]})]}),(0,J.jsx)("div",{className:"min-h-[34px] max-h-[34px] overflow-hidden",children:(0,J.jsx)("p",{className:"text-[11px] text-muted-foreground/90 leading-relaxed line-clamp-2",title:e.description||v("Cloud.Labels.UnnamedTranslation"),children:e.description||v("Cloud.Labels.UnnamedTranslation")})}),(0,J.jsxs)("div",{className:"mt-auto flex items-center justify-between px-2.5 py-1.5 rounded bg-muted/20 border border-border/5",children:[(0,J.jsxs)("div",{className:"flex items-center gap-3",children:[(0,J.jsxs)("div",{className:"flex items-center gap-1.5 text-[10px] text-muted-foreground/70 font-semibold",children:[(0,J.jsx)($n,{className:"w-3 h-3 opacity-50"}),e.language]}),(0,J.jsx)("div",{className:"w-[1px] h-2 bg-border/20"}),(0,J.jsxs)("div",{className:"flex items-center gap-1.5 text-[10px] text-muted-foreground/70 font-semibold",children:[(0,J.jsx)(Os,{className:"w-3 h-3 opacity-50"}),e.updated_at?new Date(e.updated_at).toLocaleDateString(void 0,{month:"2-digit",day:"2-digit"}):"-"]})]}),(0,J.jsx)("span",{className:"text-[9px] text-muted-foreground/50 font-mono tracking-tight truncate max-w-[80px]",children:e.plugin})]})]}),(0,J.jsxs)("div",{className:"flex border-t border-border/30 h-10 shrink-0 bg-muted/5 group-hover:bg-muted/10 transition-colors",children:[(0,J.jsxs)("button",{onClick:()=>o==="not_downloaded"?n():o==="update_available"?t():void 0,disabled:o==="up_to_date"||s,className:le("flex-1 flex items-center justify-center gap-2 text-[11px] font-bold transition-all active:scale-95 disabled:active:scale-100",o==="up_to_date"?"text-green-600/50 cursor-default":o==="not_downloaded"?"text-blue-600 hover:text-blue-700 hover:bg-blue-500/5":"text-amber-600 hover:text-amber-700 hover:bg-amber-500/5"),children:[s?(0,J.jsx)(nn,{className:"w-3.5 h-3.5 animate-spin"}):o==="up_to_date"?(0,J.jsx)(jl,{className:"w-3.5 h-3.5"}):o==="not_downloaded"?(0,J.jsx)(ts,{className:"w-3.5 h-3.5"}):(0,J.jsx)(Dd,{className:"w-3.5 h-3.5"}),(0,J.jsx)("span",{className:"uppercase tracking-tight",children:s?v("Common.Status.Loading"):o==="up_to_date"?v("Cloud.Status.Latest"):o==="not_downloaded"?v("Cloud.Actions.Download"):v("Cloud.Actions.PublishNew")})]}),(0,J.jsx)("div",{className:"w-[1px] bg-border/20 my-2"}),(0,J.jsx)("button",{onClick:a,className:"px-3 flex items-center justify-center text-muted-foreground/60 hover:text-primary hover:bg-muted/20 transition-all active:scale-90",title:v("Cloud.Labels.ViewHistory"),children:(0,J.jsx)(_h,{className:"w-4 h-4"})}),(0,J.jsx)("div",{className:"w-[1px] bg-border/20 my-2"}),(0,J.jsx)("button",{onClick:r,disabled:i,className:"px-4 flex items-center justify-center text-muted-foreground/60 hover:text-destructive hover:bg-destructive/5 transition-all active:scale-90 disabled:opacity-50",title:v("Cloud.Labels.DeleteCloudPkg"),children:i?(0,J.jsx)(Gt,{className:"w-4 h-4 animate-spin"}):(0,J.jsx)(aa,{className:"w-4 h-4"})})]})]}),dut=({filteredEntries:e,repoManifest:t,handleEdit:r,handleDelete:n,handleDownload:a,setHistoryDialogEntryId:i,setCurrentTab:s,deletingId:o,downloadingId:l,getUpdateStatus:c,t:u})=>{let d=(0,en.useRef)(null),[f,p]=(0,en.useState)(0);(0,en.useEffect)(()=>{let y=d.current;if(!y)return;let b=new ResizeObserver(S=>{for(let w of S){let E=w.contentRect.width;E>0&&p(E)}});return b.observe(y),()=>b.disconnect()},[]);let m=(0,en.useMemo)(()=>{let y=Math.floor((f-20+16)/336);return Math.max(1,y)},[f]),h=Math.ceil(e.length/m),x=xs({count:h,getScrollElement:()=>d.current,estimateSize:(0,en.useCallback)(()=>204,[]),overscan:5}),g=x.getVirtualItems();return(0,J.jsx)(dr,{className:"flex-1 min-h-0 pr-2",viewportRef:d,children:t.length===0?(0,J.jsxs)("div",{className:"flex flex-col items-center justify-center py-20 gap-3 text-muted-foreground animate-in fade-in duration-700",children:[(0,J.jsx)("div",{className:"p-4 rounded-full bg-primary/5 mb-1",children:(0,J.jsx)(hn,{className:"w-12 h-12 opacity-30 text-primary"})}),(0,J.jsx)("h3",{className:"text-base font-semibold text-foreground/80",children:u("Cloud.Hints.NoPublished")}),(0,J.jsx)("p",{className:"text-xs max-w-xs text-center leading-relaxed px-6 opacity-70",children:u("Cloud.Hints.NoPublishedDesc")}),(0,J.jsx)(we,{variant:"outline",size:"sm",className:"mt-4 shadow-sm hover:bg-primary hover:text-primary-foreground transition-all",onClick:()=>s("upload"),children:u("Cloud.Actions.GoPublish")})]}):e.length===0?(0,J.jsxs)("div",{className:"flex flex-col items-center justify-center pt-24 text-muted-foreground",children:[(0,J.jsx)(fn,{className:"w-14 h-14 mb-4 opacity-20"}),(0,J.jsx)("p",{className:"text-sm font-medium",children:u("Common.Labels.NoPlugins")})]}):f===0?(0,J.jsx)("div",{className:"flex items-center justify-center pt-24 text-muted-foreground animate-in fade-in duration-300",children:(0,J.jsx)(nn,{className:"w-8 h-8 animate-spin text-primary/30"})}):(0,J.jsx)("div",{className:"relative w-full overflow-hidden",style:{height:`${x.getTotalSize()}px`},children:g.map(y=>{let b=y.index*m,S=e.slice(b,b+m);return(0,J.jsx)("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:`${y.size}px`,transform:`translateY(${y.start}px)`,display:"grid",gridTemplateColumns:`repeat(${m}, 1fr)`,gap:"16px",paddingBottom:"16px"},children:S.map(w=>(0,J.jsx)(uut,{entry:w,onEdit:()=>r(w),onDelete:()=>n(w),onDownload:()=>a(w),onHistory:()=>{i(w.id),s("history")},isDeleting:o===w.id,isDownloading:l===w.id,updateStatus:c(w)},w.id))},y.key)})})})};var Ln=A(Le());Kt();tr();$t();$r();var jv={};xl(jv,{Collapsible:()=>rU,CollapsibleContent:()=>iU,CollapsibleTrigger:()=>nU,Content:()=>xut,Root:()=>gut,Trigger:()=>yut,createCollapsibleScope:()=>put});var ls=A(Le(),1);var Kg=A(oe(),1),u_="Collapsible",[fut,put]=jn(u_),[mut,tU]=fut(u_),rU=ls.forwardRef((e,t)=>{let{__scopeCollapsible:r,open:n,defaultOpen:a,disabled:i,onOpenChange:s,...o}=e,[l,c]=as({prop:n,defaultProp:a??!1,onChange:s,caller:u_});return(0,Kg.jsx)(mut,{scope:r,disabled:i,contentId:Ea(),open:l,onOpenToggle:ls.useCallback(()=>c(u=>!u),[c]),children:(0,Kg.jsx)(pt.div,{"data-state":sU(l),"data-disabled":i?"":void 0,...o,ref:t})})});rU.displayName=u_;var nme="CollapsibleTrigger",nU=ls.forwardRef((e,t)=>{let{__scopeCollapsible:r,...n}=e,a=tU(nme,r);return(0,Kg.jsx)(pt.button,{type:"button","aria-controls":a.contentId,"aria-expanded":a.open||!1,"data-state":sU(a.open),"data-disabled":a.disabled?"":void 0,disabled:a.disabled,...n,ref:t,onClick:tt(e.onClick,a.onOpenToggle)})});nU.displayName=nme;var aU="CollapsibleContent",iU=ls.forwardRef((e,t)=>{let{forceMount:r,...n}=e,a=tU(aU,e.__scopeCollapsible);return(0,Kg.jsx)(ia,{present:r||a.open,children:({present:i})=>(0,Kg.jsx)(hut,{...n,ref:t,present:i})})});iU.displayName=aU;var hut=ls.forwardRef((e,t)=>{let{__scopeCollapsible:r,present:n,children:a,...i}=e,s=tU(aU,r),[o,l]=ls.useState(n),c=ls.useRef(null),u=Xt(t,c),d=ls.useRef(0),f=d.current,p=ls.useRef(0),m=p.current,h=s.open||o,x=ls.useRef(h),g=ls.useRef(void 0);return ls.useEffect(()=>{let y=requestAnimationFrame(()=>x.current=!1);return()=>cancelAnimationFrame(y)},[]),Nn(()=>{let y=c.current;if(y){g.current=g.current||{transitionDuration:y.style.transitionDuration,animationName:y.style.animationName},y.style.transitionDuration="0s",y.style.animationName="none";let b=y.getBoundingClientRect();d.current=b.height,p.current=b.width,x.current||(y.style.transitionDuration=g.current.transitionDuration,y.style.animationName=g.current.animationName),l(n)}},[s.open,n]),(0,Kg.jsx)(pt.div,{"data-state":sU(s.open),"data-disabled":s.disabled?"":void 0,id:s.contentId,hidden:!h,...i,ref:u,style:{["--radix-collapsible-content-height"]:f?`${f}px`:void 0,["--radix-collapsible-content-width"]:m?`${m}px`:void 0,...e.style},children:h&&a})});function sU(e){return e?"open":"closed"}var gut=rU,yut=nU,xut=iU;var d_=A(oe());function _C({...e}){return(0,d_.jsx)(jv.Root,{"data-slot":"collapsible",...e})}function LC({...e}){return(0,d_.jsx)(jv.CollapsibleTrigger,{"data-slot":"collapsible-trigger",...e})}function RC({...e}){return(0,d_.jsx)(jv.CollapsibleContent,{"data-slot":"collapsible-content",...e})}var re=A(oe()),ame=()=>{let{t:e}=Ve(),t=Ue.getState().i18n,r=Te.use.communityRegistry(),n=Te.use.communityStats(),a=Te.use.communityLoaded(),i=Te.use.communityLoading(),s=Te.use.setCommunityRegistry(),o=Te.use.setCommunityStats(),l=Te.use.setCommunityLoaded(),c=Te.use.setCommunityLoading(),u=Te.use.fetchCommunityRegistry(),d=Te.use.setCurrentTab(),f=Te.use.setTargetRepoAddress(),[p,m]=(0,Ln.useState)(""),[h,x]=(0,Ln.useState)("all"),[g,y]=(0,Ln.useState)(!0),[b,S]=(0,Ln.useState)(!0),[w,E]=(0,Ln.useState)(!0),[C,N]=(0,Ln.useState)(!0),[_,O]=(0,Ln.useState)(!1);Ln.default.useEffect(()=>{!a&&!i&&u(t)},[a,i,u,t]);let D=(0,Ln.useMemo)(()=>{if(!n?.repos)return[];let M=n.leaderboard?.topReposByStars;return M&&M.length>0?M.map(ee=>{let se=n.repos[ee];if(!se)return null;let[ne,ge]=ee.split("/");return{address:ee,owner:ne,repo:ge,stats:se}}).filter(Boolean).slice(0,5):r.map(ee=>{let se=n.repos[ee.repoAddress];if(!se)return null;let[ne,ge]=ee.repoAddress.split("/");return{address:ee.repoAddress,owner:ne,repo:ge,stats:se}}).filter(Boolean).sort((ee,se)=>(se.stats.stars??0)-(ee.stats.stars??0)).slice(0,5)},[r,n]),W=(0,Ln.useMemo)(()=>{if(!n?.repos)return[];let M=n.leaderboard?.topReposByActivity;return M&&M.length>0?M.map(ee=>{let se=n.repos[ee];if(!se)return null;let[ne,ge]=ee.split("/");return{address:ee,owner:ne,repo:ge,stats:se}}).filter(Boolean).slice(0,5):r.map(ee=>{let se=n.repos[ee.repoAddress];if(!se)return null;let[ne,ge]=ee.repoAddress.split("/");return{address:ee.repoAddress,owner:ne,repo:ge,stats:se}}).filter(Boolean).sort((ee,se)=>(se.stats.activityScore??0)-(ee.stats.activityScore??0)).slice(0,5)},[r,n]),Z=(0,Ln.useMemo)(()=>n?.repos?r.map(M=>{let ee=n.repos[M.repoAddress];if(!ee)return null;let[se,ne]=M.repoAddress.split("/");return{address:M.repoAddress,owner:se,repo:ne,stats:ee}}).filter(Boolean).sort((M,ee)=>(ee.stats.pluginCount??0)-(M.stats.pluginCount??0)||(ee.stats.stars??0)-(M.stats.stars??0)).slice(0,5):[],[r,n]),me=(0,Ln.useMemo)(()=>r.filter(M=>{let ee=n?.repos?.[M.repoAddress];if(p){let se=p.toLowerCase(),ne=M.repoAddress.toLowerCase().includes(se),ge=ee?.description?.toLowerCase().includes(se)||!1,ue=ee?.authorName?.toLowerCase().includes(se)||!1;if(!ne&&!ge&&!ue)return!1}return!(h&&h!=="all"&&!ee?.languages?.includes(h))}).sort((M,ee)=>{let se=he=>he.isOfficial&&he.isFeatured?3:he.isOfficial?2:he.isFeatured?1:0,ne=se(M),ge=se(ee);if(ne!==ge)return ge-ne;let ue=n?.repos?.[M.repoAddress],H=n?.repos?.[ee.repoAddress],I=ue?.stars||0,K=H?.stars||0;return I!==K?K-I:(H?.activityScore||0)-(ue?.activityScore||0)}),[r,n,p,h]),Q=(0,Ln.useCallback)(M=>{f(M);let ee=t.settings.cloudRepos||[];if(!ee.includes(M)){let se=[...ee,M];t.settings.cloudRepos=se,t.saveSettings(),Te.getState().setSavedRepos(se)}Te.getState().setTargetManifest([]),d("download")},[f,d,t]),V=(0,Ln.useMemo)(()=>n?.leaderboard?.topAuthors||[],[n]),U=(0,Ln.useMemo)(()=>{let M={};return r.forEach(ee=>{if(ee.authorBadge){let[se]=ee.repoAddress.split("/");M[se]=ee.authorBadge}}),M},[r]),k=(0,Ln.useMemo)(()=>{if(!n?.repos)return 0;let M=new Set;Object.entries(n.repos).forEach(([se,ne])=>{let ge=ne.authorName||se.split("/")[0];ge&&M.add(ge)});let ee=n.summary?.totalContributors||0;return ee>M.size?ee:M.size},[n]),L=a&&(D.length>0||W.length>0||Z.length>0||V.length>0);return i&&!a?(0,re.jsxs)("div",{className:"flex flex-col items-center justify-center h-full text-muted-foreground animate-in fade-in duration-300",children:[(0,re.jsx)(nn,{className:"w-10 h-10 animate-spin text-primary/50 mb-4"}),(0,re.jsx)("p",{className:"text-sm font-medium tracking-tight",children:e("Cloud.Labels.FetchingResources")})]}):!a&&!_?(0,re.jsxs)("div",{className:"flex flex-col items-center justify-center h-full text-muted-foreground",children:[(0,re.jsx)($n,{className:"w-16 h-16 mb-4 opacity-20"}),(0,re.jsx)("p",{className:"text-sm font-medium",children:e("Cloud.Errors.FetchFail")}),(0,re.jsx)(we,{variant:"link",size:"sm",onClick:()=>u(t),className:"mt-2",children:e("Cloud.Actions.Recheck")})]}):_&&r.length===0?(0,re.jsxs)("div",{className:"flex flex-col items-center justify-center h-full text-center p-6 space-y-4 max-w-md mx-auto animate-in fade-in duration-500",children:[(0,re.jsx)("div",{className:"p-4 rounded-full bg-orange-500/10 text-orange-600 ring-1 ring-orange-500/20",children:(0,re.jsx)($n,{className:"w-10 h-10 opacity-80"})}),(0,re.jsxs)("div",{className:"space-y-2",children:[(0,re.jsx)("h3",{className:"text-xl font-bold tracking-tight",children:e("Cloud.Hints.RateLimitTitle")}),(0,re.jsx)("p",{className:"text-sm text-muted-foreground leading-relaxed",children:e("Cloud.Hints.RateLimitDesc")})]}),(0,re.jsxs)(we,{onClick:()=>{t.app.setting.open(),t.app.setting.openTabById("i18n")},className:"mt-4 gap-2 px-6 shadow-sm transition-all hover:translate-y-[-1px] bg-orange-500 hover:bg-orange-600 text-white border-none",children:[e("Cloud.Hints.RateLimitGuide"),(0,re.jsx)(hs,{className:"w-4 h-4"})]}),(0,re.jsxs)(we,{variant:"ghost",size:"sm",onClick:()=>u(t),className:"text-xs text-muted-foreground",children:[(0,re.jsx)(nn,{className:"w-3 h-3 mr-1.5"}),e("Cloud.Actions.Recheck")]})]}):r.length===0?(0,re.jsxs)("div",{className:"flex flex-col items-center justify-center h-full text-muted-foreground animate-in fade-in duration-700",children:[(0,re.jsx)("div",{className:"p-10 rounded-full bg-primary/5 mb-6 ring-1 ring-primary/10",children:(0,re.jsx)(Fi,{className:"w-20 h-20 opacity-20 text-primary"})}),(0,re.jsx)("h3",{className:"text-xl font-bold text-foreground/80 tracking-tight",children:e("Cloud.Labels.NoRegistry")}),(0,re.jsx)("p",{className:"text-sm mt-2 text-center text-muted-foreground/60 max-w-[320px] leading-relaxed",children:e("Cloud.Labels.NoRegistryDesc")})]}):(0,re.jsxs)("div",{className:"flex h-full gap-0 overflow-hidden min-h-0 animate-in fade-in duration-500",children:[L&&(0,re.jsx)("aside",{className:"w-[300px] flex flex-col border-r border-border/30 pr-2 shrink-0 overflow-hidden min-h-0",children:(0,re.jsx)(dr,{className:"flex-1 pr-2.5",children:(0,re.jsxs)("div",{className:"space-y-4 pb-6 pt-1",children:[W.length>0&&(0,re.jsx)(_C,{open:b,onOpenChange:S,children:(0,re.jsxs)("div",{className:"rounded-lg border border-border/40 bg-card/60 backdrop-blur-sm shadow-[0_4px_20px_rgb(0,0,0,0.03)] dark:shadow-[0_4px_20px_rgb(0,0,0,0.1)] overflow-hidden transition-all duration-300 hover:border-orange-500/20",children:[(0,re.jsxs)(LC,{className:"w-full flex items-center gap-2.5 px-4 py-3 border-b border-border/20 bg-gradient-to-r from-orange-500/5 to-transparent hover:from-orange-500/10 transition-all cursor-pointer select-none",children:[(0,re.jsx)("div",{className:"p-1 rounded-md bg-orange-500/10",children:(0,re.jsx)(To,{className:"w-3.5 h-3.5 text-orange-500"})}),(0,re.jsx)("h3",{className:"text-[12px] font-extrabold text-foreground tracking-tight flex-1 text-left min-w-0 truncate",children:v("Cloud.Labels.TopActive")}),(0,re.jsxs)(vt,{variant:"secondary",className:"text-[9px] h-[18px] px-2 bg-orange-500/10 text-orange-600 border-orange-500/20 font-black",children:["TOP ",W.length]}),(0,re.jsx)(Oi,{className:le("w-3.5 h-3.5 text-muted-foreground/50 transition-transform duration-200",b?"rotate-0":"-rotate-90")})]}),(0,re.jsx)(RC,{children:(0,re.jsx)("div",{className:"divide-y divide-border/20",children:W.map((M,ee)=>(0,re.jsxs)("div",{className:"flex items-center gap-2.5 px-3 py-2 hover:bg-muted/30 transition-colors cursor-pointer group",onClick:()=>Q(M.address),children:[(0,re.jsx)("div",{className:"w-5 h-5 flex items-center justify-center shrink-0",children:ee===0?(0,re.jsx)("span",{className:"text-sm",title:e("Cloud.Labels.Rank1"),children:"\u{1F947}"}):ee===1?(0,re.jsx)("span",{className:"text-sm",title:e("Cloud.Labels.Rank2"),children:"\u{1F948}"}):ee===2?(0,re.jsx)("span",{className:"text-sm",title:e("Cloud.Labels.Rank3"),children:"\u{1F949}"}):(0,re.jsx)("span",{className:"text-[10px] font-bold text-muted-foreground/50 font-mono",children:ee+1})}),M.stats.avatarUrl?(0,re.jsx)("img",{src:M.stats.avatarUrl,className:"w-6 h-6 rounded-md ring-1 ring-border/50 shrink-0 group-hover:scale-105 transition-transform",alt:M.owner}):(0,re.jsx)("div",{className:"w-6 h-6 rounded-md bg-muted flex items-center justify-center shrink-0",children:(0,re.jsx)(bo,{className:"w-3 h-3 text-muted-foreground/50"})}),(0,re.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,re.jsx)("div",{className:"text-[11px] font-semibold text-foreground truncate leading-tight group-hover:text-primary transition-colors",children:M.repo}),(0,re.jsx)("div",{className:"text-[9px] text-muted-foreground/60 truncate",children:M.stats.authorName||M.owner})]}),(0,re.jsxs)("div",{className:"flex items-center gap-1 text-[10px] font-mono font-bold text-orange-600 shrink-0",children:[(0,re.jsx)(To,{className:"w-2.5 h-2.5 text-orange-500"}),Math.round((M.stats.activityScore||0)*100)]})]},M.address))})})]})}),V.length>0&&(0,re.jsx)(_C,{open:C,onOpenChange:N,children:(0,re.jsxs)("div",{className:"rounded-lg border border-border/40 bg-card/60 backdrop-blur-sm shadow-[0_4px_20px_rgb(0,0,0,0.03)] dark:shadow-[0_4px_20px_rgb(0,0,0,0.1)] overflow-hidden transition-all duration-300 hover:border-green-500/20",children:[(0,re.jsxs)(LC,{className:"w-full flex items-center gap-2.5 px-4 py-3 border-b border-border/20 bg-gradient-to-r from-green-500/5 to-transparent hover:from-green-500/10 transition-all cursor-pointer select-none",children:[(0,re.jsx)("div",{className:"p-1 rounded-md bg-green-500/10",children:(0,re.jsx)(Fi,{className:"w-3.5 h-3.5 text-green-500"})}),(0,re.jsx)("h3",{className:"text-[12px] font-extrabold text-foreground tracking-tight flex-1 text-left min-w-0 truncate",children:v("Cloud.Labels.TopAuthors")}),(0,re.jsxs)(vt,{variant:"secondary",className:"text-[9px] h-[18px] px-2 bg-green-500/10 text-green-600 border-green-500/20 font-black",children:["TOP ",V.length]}),(0,re.jsx)(Oi,{className:le("w-3.5 h-3.5 text-muted-foreground/50 transition-transform duration-200",C?"rotate-0":"-rotate-90")})]}),(0,re.jsx)(RC,{children:(0,re.jsx)("div",{className:"divide-y divide-border/20",children:V.map((M,ee)=>(0,re.jsxs)("div",{className:"flex items-center gap-2.5 px-3 py-2 hover:bg-muted/30 transition-colors cursor-pointer group",onClick:()=>{M.htmlUrl&&window.open(M.htmlUrl,"_blank")},children:[(0,re.jsx)("div",{className:"w-5 h-5 flex items-center justify-center shrink-0",children:ee===0?(0,re.jsx)("span",{className:"text-sm",title:e("Cloud.Labels.Rank1"),children:"\u{1F947}"}):ee===1?(0,re.jsx)("span",{className:"text-sm",title:e("Cloud.Labels.Rank2"),children:"\u{1F948}"}):ee===2?(0,re.jsx)("span",{className:"text-sm",title:e("Cloud.Labels.Rank3"),children:"\u{1F949}"}):(0,re.jsx)("span",{className:"text-[10px] font-bold text-muted-foreground/50 font-mono",children:ee+1})}),M.avatarUrl?(0,re.jsx)("img",{src:M.avatarUrl,className:"w-6 h-6 rounded-full ring-1 ring-border/50 shrink-0 group-hover:scale-105 transition-transform",alt:M.name}):(0,re.jsx)("div",{className:"w-6 h-6 rounded-full bg-muted flex items-center justify-center shrink-0",children:(0,re.jsx)(Fi,{className:"w-3 h-3 text-muted-foreground/50"})}),(0,re.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,re.jsxs)("div",{className:"text-[11px] font-semibold text-foreground truncate leading-tight group-hover:text-primary transition-colors flex items-center gap-1.5",children:[M.name,U[M.name]&&(0,re.jsx)(vt,{variant:"outline",className:"h-3.5 px-1 text-[8px] border-primary/30 text-primary bg-primary/5 font-black uppercase tracking-tighter shrink-0",children:U[M.name]})]}),(0,re.jsxs)("div",{className:"text-[9px] text-muted-foreground/60 truncate flex gap-1 items-center",children:[(0,re.jsxs)("span",{children:[M.repoCount," ",e("Cloud.Labels.SubscriptionRepo")]}),(0,re.jsx)("span",{children:"\xB7"}),(0,re.jsxs)("span",{children:[M.totalPlugins," ",e("Cloud.Labels.UnitPlugins")]})]})]}),(0,re.jsxs)("div",{className:"flex items-center gap-1 text-[10px] font-mono font-bold text-green-600 shrink-0",title:`\u7EFC\u5408\u6D3B\u8DC3\u5EA6: ${Math.round(M.activityScore*100)}`,children:[(0,re.jsx)(To,{className:"w-2.5 h-2.5 text-green-500"}),Math.round(M.activityScore*100)]})]},M.name))})})]})}),D.length>0&&(0,re.jsx)(_C,{open:g,onOpenChange:y,children:(0,re.jsxs)("div",{className:"rounded-lg border border-border/40 bg-card/60 backdrop-blur-sm shadow-[0_4px_20px_rgb(0,0,0,0.03)] dark:shadow-[0_4px_20px_rgb(0,0,0,0.1)] overflow-hidden transition-all duration-300 hover:border-yellow-500/20",children:[(0,re.jsxs)(LC,{className:"w-full flex items-center gap-2.5 px-4 py-3 border-b border-border/20 bg-gradient-to-r from-yellow-500/5 to-transparent hover:from-yellow-500/10 transition-all cursor-pointer select-none",children:[(0,re.jsx)("div",{className:"p-1 rounded-md bg-yellow-500/10",children:(0,re.jsx)(So,{className:"w-3.5 h-3.5 text-yellow-500"})}),(0,re.jsx)("h3",{className:"text-[12px] font-extrabold text-foreground tracking-tight flex-1 text-left min-w-0 truncate",children:v("Cloud.Labels.TopStars")}),(0,re.jsxs)(vt,{variant:"secondary",className:"text-[9px] h-[18px] px-2 bg-yellow-500/10 text-yellow-600 border-yellow-500/20 font-black",children:["TOP ",D.length]}),(0,re.jsx)(Oi,{className:le("w-3.5 h-3.5 text-muted-foreground/50 transition-transform duration-200",g?"rotate-0":"-rotate-90")})]}),(0,re.jsx)(RC,{children:(0,re.jsx)("div",{className:"divide-y divide-border/20",children:D.map((M,ee)=>(0,re.jsxs)("div",{className:"flex items-center gap-2.5 px-3 py-2 hover:bg-muted/30 transition-colors cursor-pointer group",onClick:()=>Q(M.address),children:[(0,re.jsx)("div",{className:"w-5 h-5 flex items-center justify-center shrink-0",children:ee===0?(0,re.jsx)("span",{className:"text-sm",title:e("Cloud.Labels.Rank1"),children:"\u{1F947}"}):ee===1?(0,re.jsx)("span",{className:"text-sm",title:e("Cloud.Labels.Rank2"),children:"\u{1F948}"}):ee===2?(0,re.jsx)("span",{className:"text-sm",title:e("Cloud.Labels.Rank3"),children:"\u{1F949}"}):(0,re.jsx)("span",{className:"text-[10px] font-bold text-muted-foreground/50 font-mono",children:ee+1})}),M.stats.avatarUrl?(0,re.jsx)("img",{src:M.stats.avatarUrl,className:"w-6 h-6 rounded-md ring-1 ring-border/50 shrink-0 group-hover:scale-105 transition-transform",alt:M.owner}):(0,re.jsx)("div",{className:"w-6 h-6 rounded-md bg-muted flex items-center justify-center shrink-0",children:(0,re.jsx)(bo,{className:"w-3 h-3 text-muted-foreground/50"})}),(0,re.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,re.jsx)("div",{className:"text-[11px] font-semibold text-foreground truncate leading-tight group-hover:text-primary transition-colors",children:M.repo}),(0,re.jsx)("div",{className:"text-[9px] text-muted-foreground/60 truncate",children:M.stats.authorName||M.owner})]}),(0,re.jsxs)("div",{className:"flex items-center gap-1 text-[10px] font-mono font-bold text-yellow-600 shrink-0",children:[(0,re.jsx)(So,{className:"w-2.5 h-2.5 fill-yellow-500/80 text-yellow-500"}),M.stats.stars]})]},M.address))})})]})}),Z.length>0&&(0,re.jsx)(_C,{open:w,onOpenChange:E,children:(0,re.jsxs)("div",{className:"rounded-lg border border-border/40 bg-card/60 backdrop-blur-sm shadow-[0_4px_20px_rgb(0,0,0,0.03)] dark:shadow-[0_4px_20px_rgb(0,0,0,0.1)] overflow-hidden transition-all duration-300 hover:border-blue-500/20",children:[(0,re.jsxs)(LC,{className:"w-full flex items-center gap-2.5 px-4 py-3 border-b border-border/20 bg-gradient-to-r from-blue-500/5 to-transparent hover:from-blue-500/10 transition-all cursor-pointer select-none",children:[(0,re.jsx)("div",{className:"p-1 rounded-md bg-blue-500/10",children:(0,re.jsx)(hn,{className:"w-3.5 h-3.5 text-blue-500"})}),(0,re.jsx)("h3",{className:"text-[12px] font-extrabold text-foreground tracking-tight flex-1 text-left min-w-0 truncate",children:v("Cloud.Labels.TopPlugins")}),(0,re.jsxs)(vt,{variant:"secondary",className:"text-[9px] h-[18px] px-2 bg-blue-500/10 text-blue-600 border-blue-500/20 font-black",children:["TOP ",Z.length]}),(0,re.jsx)(Oi,{className:le("w-3.5 h-3.5 text-muted-foreground/50 transition-transform duration-200",w?"rotate-0":"-rotate-90")})]}),(0,re.jsx)(RC,{children:(0,re.jsx)("div",{className:"divide-y divide-border/20",children:Z.map((M,ee)=>(0,re.jsxs)("div",{className:"flex items-center gap-2.5 px-3 py-2 hover:bg-muted/30 transition-colors cursor-pointer group",onClick:()=>Q(M.address),children:[(0,re.jsx)("div",{className:"w-5 h-5 flex items-center justify-center shrink-0",children:ee===0?(0,re.jsx)("span",{className:"text-sm",title:e("Cloud.Labels.Rank1"),children:"\u{1F947}"}):ee===1?(0,re.jsx)("span",{className:"text-sm",title:e("Cloud.Labels.Rank2"),children:"\u{1F948}"}):ee===2?(0,re.jsx)("span",{className:"text-sm",title:e("Cloud.Labels.Rank3"),children:"\u{1F949}"}):(0,re.jsx)("span",{className:"text-[10px] font-bold text-muted-foreground/50 font-mono",children:ee+1})}),M.stats.avatarUrl?(0,re.jsx)("img",{src:M.stats.avatarUrl,className:"w-6 h-6 rounded-md ring-1 ring-border/50 shrink-0 group-hover:scale-105 transition-transform",alt:M.owner}):(0,re.jsx)("div",{className:"w-6 h-6 rounded-md bg-muted flex items-center justify-center shrink-0",children:(0,re.jsx)(bo,{className:"w-3 h-3 text-muted-foreground/50"})}),(0,re.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,re.jsx)("div",{className:"text-[11px] font-semibold text-foreground truncate leading-tight group-hover:text-primary transition-colors",children:M.repo}),(0,re.jsx)("div",{className:"text-[9px] text-muted-foreground/60 truncate",children:M.stats.authorName||M.owner})]}),(0,re.jsxs)("div",{className:"flex items-center gap-1 text-[10px] font-mono font-bold text-blue-600 shrink-0",children:[(0,re.jsx)(hn,{className:"w-2.5 h-2.5 text-blue-500"}),M.stats.pluginCount||0]})]},M.address))})})]})}),(0,re.jsx)("div",{className:"mt-8 pt-6 border-t border-border/20 text-[10px] text-muted-foreground/60 leading-relaxed italic text-center max-w-[280px] mx-auto",children:v("Cloud.Labels.LeaderboardTip")})]})})}),(0,re.jsxs)("main",{className:le("flex-1 flex flex-col overflow-hidden min-h-0",L&&"pl-4 border-l border-border/10"),children:[(0,re.jsxs)("div",{className:"flex items-center justify-between mb-5 shrink-0 pt-2 border-b border-border/10 pb-3",children:[(0,re.jsxs)("div",{className:"flex items-center gap-3",children:[(0,re.jsx)("h2",{className:"text-[17px] font-extrabold text-foreground tracking-tight",children:v("Cloud.Labels.DiscoverTranslations")}),(0,re.jsxs)(vt,{variant:"secondary",className:"px-2.5 py-0.5 text-[10px] font-black bg-primary/10 text-primary border-primary/20 shadow-sm gap-1.5 rounded-full uppercase tracking-tighter",children:[(0,re.jsx)("span",{className:"opacity-70",children:r.length})," ",v("Cloud.Labels.SubscriptionRepo")]})]}),n?.summary&&(0,re.jsxs)("div",{className:"hidden md:flex items-center gap-4 text-[11px] text-muted-foreground ml-auto mr-4 px-4 py-1.5 rounded-full bg-muted/20 border border-border/40 shadow-sm",children:[(0,re.jsxs)("div",{className:"flex items-center gap-1.5",title:e("Cloud.Labels.TotalTranslations"),children:[(0,re.jsx)(hn,{className:"w-3.5 h-3.5 text-blue-500/70"}),(0,re.jsx)("span",{className:"font-bold text-foreground/80",children:n.summary.totalTranslations})," \u4EFD\u7FFB\u8BD1"]}),(0,re.jsx)("div",{className:"w-[1px] h-3 bg-border/50"}),(0,re.jsxs)("div",{className:"flex items-center gap-1.5",title:e("Cloud.Labels.TotalContributors"),children:[(0,re.jsx)(Fi,{className:"w-3.5 h-3.5 text-green-500/70"}),(0,re.jsx)("span",{className:"font-bold text-foreground/80",children:k})," \u4F4D\u8D21\u732E\u8005"]}),(0,re.jsx)("div",{className:"w-[1px] h-3 bg-border/50"}),(0,re.jsxs)("div",{className:"flex items-center gap-1.5",title:e("Cloud.Labels.TotalStars"),children:[(0,re.jsx)(So,{className:"w-3.5 h-3.5 text-yellow-500/70"}),(0,re.jsx)("span",{className:"font-bold text-foreground/80",children:n.summary.totalStars})," \u4E2A\u661F\u6807"]})]}),(0,re.jsxs)("div",{className:"flex items-center gap-2",children:[(0,re.jsxs)("div",{className:"relative group w-48",children:[(0,re.jsx)(fn,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 w-3.5 h-3.5 text-muted-foreground group-focus-within:text-primary transition-colors"}),(0,re.jsx)(nt,{placeholder:e("Cloud.Placeholders.SearchRepo"),value:p,onChange:M=>m(M.target.value),className:"pl-8 h-8 text-[11px] bg-muted/20 border-border/40 focus:border-primary/40 focus:ring-1 focus:ring-primary/20 shadow-sm transition-all"})]}),(0,re.jsxs)(mr,{value:h,onValueChange:x,children:[(0,re.jsx)(gr,{size:"sm",className:"w-28 text-[11px] bg-muted/20 border-border/40 shadow-sm",children:(0,re.jsx)(hr,{})}),(0,re.jsxs)(yr,{children:[(0,re.jsx)(Ot,{value:"all",className:"text-[11px]",children:e("Common.Filters.All")}),di.map(M=>(0,re.jsx)(Ot,{value:M.value,className:"text-[11px]",children:M.label},M.value))]})]}),(0,re.jsxs)("div",{className:"flex items-center bg-muted/30 border border-border/40 rounded-md h-8 shadow-sm",children:[(0,re.jsx)("div",{className:"flex items-center justify-center px-2.5 h-full text-[10px] font-mono font-medium text-muted-foreground border-r border-border/40",title:"\u5F53\u524D\u7B5B\u9009\u7ED3\u679C\u6570",children:me.length}),(0,re.jsx)(we,{variant:"ghost",size:"icon",className:"h-full w-8 rounded-none rounded-r-md hover:bg-muted/50 text-muted-foreground hover:text-foreground",onClick:()=>u(t),disabled:i,children:(0,re.jsx)(nn,{className:le("w-3.5 h-3.5",i&&"animate-spin")})})]})]})]}),(0,re.jsx)(vut,{filteredItems:me,communityStats:n,handleViewRepo:Q,t:v})]})]})},but=({item:e,stats:t,onView:r})=>{let{t:n}=Ve(),[a,i]=e.repoAddress.split("/");return(0,re.jsxs)("div",{className:le("group flex flex-col overflow-hidden bg-card text-card-foreground rounded-lg border border-border/60 transition-all duration-300 animate-in fade-in h-[196px] relative select-none","hover:shadow-[0_8px_30px_rgb(0,0,0,0.04)] dark:hover:shadow-[0_8px_30px_rgb(0,0,0,0.2)] hover:border-primary/40"),children:[(0,re.jsxs)("div",{className:"absolute top-4 right-4 flex items-center gap-1.5 px-2 py-0.5 rounded-full bg-amber-500/10 border border-amber-500/20 shadow-sm z-10 transition-transform group-hover:scale-105",children:[(0,re.jsx)(So,{className:"w-3 h-3 text-amber-500 fill-amber-500/20"}),(0,re.jsx)("span",{className:"text-[10px] font-black text-amber-600/90",children:t?.stars||0})]}),(0,re.jsxs)("div",{className:"flex flex-col flex-1 p-4 pb-3 min-h-0 space-y-3",children:[(0,re.jsx)("div",{className:"flex items-start justify-between gap-3",children:(0,re.jsxs)("div",{className:"flex items-center gap-2.5 flex-1 min-w-0",children:[(0,re.jsx)("div",{className:le("flex items-center justify-center w-8 h-8 rounded-lg shrink-0 shadow-sm border border-border/10 transition-colors overflow-hidden","bg-muted/50 group-hover:bg-muted"),children:t?.avatarUrl?(0,re.jsx)("img",{src:t.avatarUrl,className:"w-full h-full object-cover group-hover:scale-110 transition-transform duration-500",alt:a}):(0,re.jsx)(hn,{className:"w-4 h-4 text-muted-foreground/60"})}),(0,re.jsxs)("div",{className:"min-w-0 flex-1 pr-14",children:[(0,re.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0",children:[(0,re.jsx)("h3",{className:"text-[12px] font-extrabold text-foreground tracking-tight leading-none truncate",title:e.repoAddress,children:i}),e.isOfficial&&(0,re.jsx)("span",{title:v("Cloud.Labels.Official"),className:"shrink-0 flex items-center",children:(0,re.jsx)(Mh,{className:"w-3.5 h-3.5 text-blue-500 fill-blue-500/10"})}),e.isFeatured&&(0,re.jsx)("span",{title:v("Cloud.Labels.Featured"),className:"shrink-0 flex items-center",children:(0,re.jsx)(wo,{className:"w-3.5 h-3.5 text-orange-500 fill-orange-500/10"})})]}),(0,re.jsxs)("div",{className:"flex items-center gap-1.5 mt-1",children:[(0,re.jsx)("span",{className:"text-[9px] text-muted-foreground/60 font-bold uppercase tracking-wider truncate",children:t?.authorName||a}),e.authorBadge&&(0,re.jsx)(vt,{variant:"outline",className:"h-[14px] px-1 text-[7px] border-primary/20 text-primary/80 bg-primary/5 font-black uppercase tracking-tighter",children:e.authorBadge})]})]})]})}),e.badges&&e.badges.length>0&&(0,re.jsx)("div",{className:"flex flex-wrap gap-1",children:e.badges.map((s,o)=>(0,re.jsx)(vt,{variant:"secondary",className:"h-[15px] px-1.5 text-[8px] font-bold bg-muted/40 text-muted-foreground/80 border-none rounded",children:s},o))}),(0,re.jsx)("div",{className:"min-h-[34px] max-h-[34px] overflow-hidden",children:(0,re.jsx)("p",{className:"text-[11px] text-muted-foreground/90 leading-relaxed line-clamp-2",title:t?.description||"",children:t?.description||v("Cloud.Labels.NoDesc")})}),(0,re.jsxs)("div",{className:"mt-auto grid grid-cols-2 gap-1.5",children:[(0,re.jsxs)("div",{className:"flex items-center justify-between px-2 py-1 rounded bg-muted/20 border border-border/5",children:[(0,re.jsxs)("div",{className:"flex items-center gap-1.5 text-[9px] text-muted-foreground/70 font-bold uppercase tracking-tighter",children:[(0,re.jsx)($n,{className:"w-2.5 h-2.5 opacity-40"}),t?.languages?.[0]||"ZH"]}),(0,re.jsx)("div",{className:"flex items-center gap-1.5 text-[9px] text-muted-foreground/70 font-bold",children:(0,re.jsxs)("div",{className:"flex items-center gap-1.5",title:v("Cloud.Labels.PublishedResources"),children:[(0,re.jsx)(bo,{className:"w-2.5 h-2.5 opacity-40 text-blue-500"}),(0,re.jsx)("span",{children:(t?.pluginCount||0)+(t?.themeCount||0)})]})})]}),(0,re.jsx)("div",{className:"flex items-center justify-between px-2 py-1 rounded bg-muted/20 border border-border/5",children:(0,re.jsxs)("div",{className:"flex items-center gap-1.5 text-[9px] text-muted-foreground/70 font-bold",children:[(0,re.jsx)(To,{className:"w-2.5 h-2.5 opacity-40 text-emerald-500"}),t?.activityScore!==void 0?Math.round(t.activityScore*100):0]})})]})]}),(0,re.jsxs)("div",{className:"flex border-t border-border/30 h-10 shrink-0 bg-muted/5 group-hover:bg-muted/10 transition-colors",children:[(0,re.jsxs)("button",{onClick:r,className:"flex-1 flex items-center justify-center gap-2 text-[11px] font-bold text-primary transition-all active:scale-95 hover:bg-primary/5",children:[(0,re.jsx)(hs,{className:"w-3.5 h-3.5"}),(0,re.jsx)("span",{className:"uppercase tracking-tight",children:v("Cloud.Labels.ExploreThisRepo")})]}),(0,re.jsx)("div",{className:"w-[1px] bg-border/20 my-2"}),(0,re.jsx)("a",{href:`https://github.com/${e.repoAddress}`,target:"_blank",rel:"noopener noreferrer",className:"px-4 flex items-center justify-center text-muted-foreground/60 hover:text-foreground hover:bg-muted/20 transition-all active:scale-90",title:"GitHub",children:(0,re.jsx)(Xo,{className:"w-4 h-4"})})]})]})},vut=({filteredItems:e,communityStats:t,handleViewRepo:r,t:n})=>{let a=(0,Ln.useRef)(null),[i,s]=(0,Ln.useState)(0);(0,Ln.useEffect)(()=>{let d=a.current;if(!d)return;let f=new ResizeObserver(p=>{for(let m of p){let h=m.contentRect.width;h>0&&s(h)}});return f.observe(d),()=>f.disconnect()},[]);let o=(0,Ln.useMemo)(()=>{let d=Math.floor((i-20+16)/336);return Math.max(1,d)},[i]),l=Math.ceil(e.length/o),c=xs({count:l,getScrollElement:()=>a.current,estimateSize:(0,Ln.useCallback)(()=>204,[]),overscan:5}),u=c.getVirtualItems();return(0,re.jsx)(dr,{className:"flex-1 min-h-0",viewportRef:a,children:(0,re.jsx)("div",{className:"pb-6 pr-4",children:e.length===0?(0,re.jsxs)("div",{className:"flex flex-col items-center justify-center py-20 text-muted-foreground bg-muted/10 rounded-xl border border-dashed border-border/40",children:[(0,re.jsx)(hn,{className:"w-12 h-12 mb-4 opacity-10"}),(0,re.jsx)("p",{className:"text-sm font-medium",children:n("Cloud.Hints.NoMatchingRepos")})]}):(0,re.jsx)("div",{className:"relative w-full overflow-hidden",style:{height:`${c.getTotalSize()}px`},children:u.map(d=>{let f=d.index*o,p=e.slice(f,f+o);return(0,re.jsx)("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:`${d.size}px`,transform:`translateY(${d.start}px)`,display:"grid",gridTemplateColumns:`repeat(${o}, 1fr)`,gap:"16px",paddingBottom:"16px"},children:p.map(m=>(0,re.jsx)(but,{item:m,stats:t?.repos?.[m.repoAddress],onView:()=>r(m.repoAddress)},m.repoAddress))},d.key)})})})})};var hl=A(Le());Kt();$t();$r();zf();var Bt=A(oe());function Sut(e){let t=0;for(let n=0;n<e.length;n++){let a=e.charCodeAt(n);t=(t<<5)-t+a,t=t&t}return Math.abs(t).toString(16).padStart(8,"0").repeat(4)}var ime=()=>{let e=Ue.getState().i18n,t=Te.use.historyDialogEntryId(),r=Te.use.setHistoryDialogEntryId(),n=Te.use.setCurrentTab(),a=Te.use.repoManifest(),i=Te.use.setRepoManifest(),s=Te.use.githubUser(),o=e.settings.shareRepo,l=a.find(N=>N.id===t)||null,[c,u]=(0,hl.useState)([]),[d,f]=(0,hl.useState)(!1),[p,m]=(0,hl.useState)(null),[h,x]=(0,hl.useState)(null),[g,y]=(0,hl.useState)(!1),[b,S]=(0,hl.useState)(!1),w=(0,hl.useCallback)(()=>{r(null),n("my")},[r,n]);(0,hl.useEffect)(()=>{if(!l||!s){u([]),m(null),x(null);return}let N=!1;return(async()=>{f(!0);try{let O=`plugins/${l.id}.json`,D=await e.api.github.getFileCommits(s.login,o,O,1,20);if(!N&&D.state&&Array.isArray(D.data)){let W=D.data.map(Z=>({sha:Z.sha,message:Z.commit?.message||"",date:Z.commit?.author?.date||Z.commit?.committer?.date||"",author:Z.commit?.author?.name||Z.author?.login||v("Common.Status.Unknown"),avatarUrl:Z.author?.avatar_url}));u(W)}}catch{}finally{N||f(!1)}})(),()=>{N=!0}},[l?.id,s,o,e]);let E=(0,hl.useCallback)(async N=>{if(!(!l||!s)){m(N),x(null),y(!0);try{let _=`plugins/${l.id}.json`,O=await e.api.github.getFileAtCommit(s.login,o,_,N);if(O.state&&O.data?.content){let D=Buffer.from(O.data.content,"base64").toString("utf-8");try{let W=JSON.parse(D);x(JSON.stringify(W,null,2))}catch{x(D)}}else x(`// ${v("Cloud.Errors.GetFileFail")}`)}catch{x(`// ${v("Common.Notices.Failure")}`)}finally{y(!1)}}},[l,s,o,e]),C=(0,hl.useCallback)(async()=>{if(!(!p||!h||!l||!s)&&confirm(v("Cloud.Dialogs.RollbackConfirm"))){S(!0);try{let N=s.login,_=`plugins/${l.id}.json`,O=Buffer.from(h,"utf-8").toString("base64");if(!(await e.api.github.uploadFile(N,o,_,O,v("Cloud.Labels.RollbackTranslationMsg",{plugin:l.plugin,sha:p.substring(0,7)}))).state)throw new Error(v("Cloud.Errors.RollbackFail"));let W=Sut(h),Z=[],me=await e.api.github.getFileContent(N,o,"metadata.json");if(me.state&&me.data?.content){let U=Buffer.from(me.data.content,"base64").toString("utf-8"),k=JSON.parse(U);Array.isArray(k)&&(Z=k)}let Q=Z.findIndex(U=>U.id===l.id);Q>=0&&(Z[Q]={...Z[Q],hash:W,updated_at:new Date().toISOString()});let V=Buffer.from(JSON.stringify(Z,null,4),"utf-8").toString("base64");await e.api.github.uploadFile(N,o,"metadata.json",V,v("Cloud.Labels.UpdateManifestRollbackMsg",{plugin:l.plugin}),"main",me.data?.sha);try{let U=JSON.parse(h);e.sourceManager.saveSourceFile(l.id,U);let k=e.sourceManager.getSource(l.id);if(k){let L={...k,checksum:Li(U),cloud:{owner:N,repo:o,hash:W},updatedAt:Date.now()};e.sourceManager.saveSource(L)}}catch{}i(Z),Ue.getState().triggerSourceUpdate(),e.notice.successPrefix(v("Common.Notices.Success"),v("Cloud.Notices.RollbackSuccessLocal")),w()}catch(N){e.notice.errorPrefix(v("Common.Notices.Failure"),`${N}`)}finally{S(!1)}}},[p,h,l,s,o,e,i,w]);return e.settings.shareToken?!t||!l?(0,Bt.jsxs)("div",{className:"flex flex-col items-center justify-center h-full gap-4 text-muted-foreground",children:[(0,Bt.jsx)(kd,{className:"w-12 h-12 opacity-20"}),(0,Bt.jsx)("p",{className:"text-sm",children:v("Cloud.Tips.SelectHistoryEntry")}),(0,Bt.jsxs)(we,{variant:"outline",size:"sm",onClick:w,children:[(0,Bt.jsx)(mu,{className:"w-4 h-4 mr-2"}),v("Cloud.Actions.BackToManage")]})]}):(0,Bt.jsxs)("div",{className:"flex flex-col h-full min-h-0",children:[(0,Bt.jsxs)("div",{className:"flex items-center justify-between px-1 pb-4 shrink-0",children:[(0,Bt.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Bt.jsxs)(we,{variant:"ghost",size:"sm",className:"h-8 px-2 gap-1.5 text-muted-foreground hover:text-primary",onClick:w,children:[(0,Bt.jsx)(mu,{className:"w-4 h-4"}),v("Common.Actions.Back")]}),(0,Bt.jsx)("div",{className:"w-[1px] h-5 bg-border/50"}),(0,Bt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Bt.jsx)(kd,{className:"w-4 h-4 text-primary"}),(0,Bt.jsx)("h2",{className:"text-sm font-semibold",children:v("Cloud.Labels.TranslationHistory")})]}),(0,Bt.jsxs)(vt,{variant:"outline",className:"text-[10px] px-2 py-0 h-[18px] font-medium",children:[l.title," (",l.plugin,")"]})]}),p&&h&&!g&&(0,Bt.jsxs)(we,{size:"sm",variant:"destructive",className:"h-8 text-xs px-3 gap-1.5",onClick:C,disabled:b,children:[b?(0,Bt.jsx)(Gt,{className:"w-3.5 h-3.5 animate-spin"}):(0,Bt.jsx)(rs,{className:"w-3.5 h-3.5"}),b?v("Cloud.Status.RollingBack"):v("Cloud.Labels.RollbackToVersion")]})]}),(0,Bt.jsxs)("div",{className:"flex flex-1 min-h-0 border rounded-xl overflow-hidden bg-card",style:{maxHeight:"calc(100% - 48px)"},children:[(0,Bt.jsxs)("div",{className:"w-[320px] border-r flex flex-col shrink-0 overflow-hidden",children:[(0,Bt.jsxs)("div",{className:"px-4 py-2.5 bg-muted/20 border-b text-[11px] font-semibold text-muted-foreground uppercase tracking-wider flex items-center gap-1.5",children:[(0,Bt.jsx)(Os,{className:"w-3.5 h-3.5"}),v("Cloud.Labels.Commits")," (",c.length,")"]}),(0,Bt.jsx)(dr,{className:"flex-1 h-0",children:d?(0,Bt.jsxs)("div",{className:"flex flex-col items-center justify-center h-40 gap-2",children:[(0,Bt.jsx)(Gt,{className:"w-5 h-5 animate-spin text-primary"}),(0,Bt.jsx)("span",{className:"text-xs text-muted-foreground",children:v("Cloud.Tips.LoadingCommits")})]}):c.length===0?(0,Bt.jsxs)("div",{className:"flex flex-col items-center justify-center h-40 gap-2 text-muted-foreground",children:[(0,Bt.jsx)(hi,{className:"w-8 h-8 opacity-30"}),(0,Bt.jsx)("span",{className:"text-xs",children:v("Cloud.Tips.NoCommits")})]}):(0,Bt.jsx)("div",{className:"flex flex-col py-2",children:c.map((N,_)=>(0,Bt.jsxs)("button",{onClick:()=>E(N.sha),className:le("group relative flex items-start gap-3 px-4 py-3 text-left transition-all hover:bg-muted/40",p===N.sha&&"bg-primary/5 border-l-2 border-l-primary"),children:[(0,Bt.jsxs)("div",{className:"flex flex-col items-center pt-1 shrink-0",children:[(0,Bt.jsx)("div",{className:le("w-2.5 h-2.5 rounded-full border-2 transition-colors",p===N.sha?"bg-primary border-primary":_===0?"bg-green-500 border-green-500":"bg-muted border-border group-hover:border-primary/50")}),_<c.length-1&&(0,Bt.jsx)("div",{className:"w-[1px] flex-1 bg-border/60 mt-1 min-h-[20px]"})]}),(0,Bt.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Bt.jsx)("p",{className:"text-[12px] font-semibold text-foreground/90 line-clamp-2 leading-snug",children:N.message}),(0,Bt.jsxs)("div",{className:"flex items-center gap-2 mt-1.5",children:[N.avatarUrl&&(0,Bt.jsx)("img",{src:N.avatarUrl,className:"w-3.5 h-3.5 rounded-full",alt:""}),(0,Bt.jsx)("span",{className:"text-[10px] text-muted-foreground truncate",children:N.author}),(0,Bt.jsx)("span",{className:"text-[10px] text-muted-foreground/60",children:new Date(N.date).toLocaleDateString(void 0,{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"})})]}),(0,Bt.jsx)("code",{className:"text-[9px] text-muted-foreground/40 font-mono mt-0.5 block",children:N.sha.substring(0,7)})]}),(0,Bt.jsx)($l,{className:le("w-3.5 h-3.5 text-muted-foreground/30 mt-1 shrink-0 transition-colors",p===N.sha&&"text-primary")})]},N.sha))})})]}),(0,Bt.jsxs)("div",{className:"flex-1 flex flex-col min-w-0 overflow-hidden",children:[(0,Bt.jsxs)("div",{className:"px-4 py-2.5 bg-muted/20 border-b text-[11px] font-semibold text-muted-foreground uppercase tracking-wider flex items-center gap-1.5",children:[(0,Bt.jsx)(Ux,{className:"w-3.5 h-3.5"}),v("Cloud.Labels.VersionPreview"),p&&(0,Bt.jsx)(vt,{variant:"outline",className:"text-[9px] px-1.5 py-0 h-[16px] font-mono ml-1",children:p.substring(0,7)})]}),(0,Bt.jsx)(dr,{className:"flex-1 h-0",children:p?g?(0,Bt.jsxs)("div",{className:"flex flex-col items-center justify-center h-full min-h-[300px] gap-2",children:[(0,Bt.jsx)(Gt,{className:"w-5 h-5 animate-spin text-primary"}),(0,Bt.jsx)("span",{className:"text-xs text-muted-foreground",children:v("Cloud.Status.LoadingContent")})]}):(0,Bt.jsx)("pre",{className:"p-4 text-[11px] font-mono text-foreground/80 leading-relaxed whitespace-pre-wrap break-all",children:h}):(0,Bt.jsxs)("div",{className:"flex flex-col items-center justify-center h-full min-h-[300px] gap-3 text-muted-foreground",children:[(0,Bt.jsx)(Ux,{className:"w-10 h-10 opacity-20"}),(0,Bt.jsx)("p",{className:"text-xs",children:v("Cloud.Labels.SelectCommitToPreview")})]})})]})]})]}):(0,Bt.jsx)(Im,{})};var Hu=A(Le());Kt();$t();$r();zf();var Wg=A(ii());var Qe=A(oe());function sme(e){let t=0;for(let n=0;n<e.length;n++){let a=e.charCodeAt(n);t=(t<<5)-t+a,t=t&t}return Math.abs(t).toString(16).padStart(8,"0").repeat(4)}var ome=()=>{let e=Ue.getState().i18n,t=Te.use.setCurrentTab(),r=Te.use.backupDialogMode(),n=Te.use.backupProgress(),a=Te.use.setBackupDialogMode(),i=Te.use.setBackupProgress(),s=Te.use.githubUser(),o=Te.use.repoManifest(),l=Te.use.setRepoManifest(),c=e.settings.shareRepo,[u,d]=(0,Hu.useState)([]),[f,p]=(0,Hu.useState)(!1),[m,h]=(0,Hu.useState)(null),x=w=>d(E=>[...E,`[${new Date().toLocaleTimeString()}] ${w}`]);Hu.default.useEffect(()=>{let w=e.sourceManager.loadCheckpoint();w&&(h(w),x(v("Cloud.Notices.FoundCheckpoint",{date:new Date(w.timestamp).toLocaleString()})))},[e.sourceManager]);let g=(0,Hu.useCallback)(async(w=!1)=>{if(!s||!c)return;p(!0),w||d([]);let E=s.login;try{let C=[],N=[],_=[],O=0,D=0;if(w&&m)x(v("Cloud.Status.ResumingBackup")),C=m.filesToUpload||[],N=m.sourcesToSave||[],_=m.manifest||[],D=m.total||C.length,O=m.currentIdx||0;else{let V=e.sourceManager.getAllSources();if(V.length===0){x(v("Cloud.Hints.NoLocalSourcesBackup")),i({total:0,current:0,currentPlugin:"",phase:"done"});return}x(v("Cloud.Notices.FoundLocalSources",{count:V.length})),i({total:V.length,current:0,currentPlugin:"",phase:"uploading"}),x(v("Cloud.Status.FetchingManifest"));try{let L=await e.api.github.getFileContentWithFallback(E,c,"metadata.json");L.state&&Array.isArray(L.data)&&(_=L.data)}catch{}x(v("Cloud.Status.PreparingData"));let U=V.map(async L=>{try{let M=e.sourceManager.getSourceFilePath(L.id);if(!M||!Wg.existsSync(M))return null;let ee=await Wg.readFile(M,"utf-8"),se=sme(ee),ne=_.find(I=>I.id===L.id);if(ne&&ne.hash===se)return null;let ge=Ro(L.id,L.type),ue=new Date().toISOString(),H={id:L.id,plugin:L.plugin,type:L.type,language:e.settings.language,version:"",supported_versions:"",title:L.title||v("Cloud.Labels.UnnamedTranslation"),description:"",hash:se,created_at:ne?.created_at||ue,updated_at:ue};try{let I=JSON.parse(ee);I?.metadata?.version&&(H.version=I.metadata.version),I?.metadata?.supportedVersions&&(H.supported_versions=I.metadata.supportedVersions),I?.metadata?.description&&(H.description=I.metadata.description)}catch{}return{file:{path:ge,content:ee},sourceUpdate:{...L,origin:"cloud",cloud:{owner:E,repo:c,hash:se},updatedAt:Date.now()},manifestEntry:H}}catch{return null}}),k=(await Promise.all(U)).filter(L=>L!==null);if(k.length===0){x(v("Cloud.Notices.BackupNoChanges")),i({total:V.length,current:V.length,currentPlugin:"",phase:"done"});return}C=k.map(L=>L.file),N=k.map(L=>L.sourceUpdate),k.forEach(L=>{let M=_.findIndex(ee=>ee.id===L.manifestEntry.id);M>=0?_[M]=L.manifestEntry:_.push(L.manifestEntry)}),D=C.length,x(v("Cloud.Notices.ItemsToUpload",{count:D}))}let W=20,Z=[];for(let V=O;V<C.length;V+=W)Z.push(C.slice(V,V+W));for(let V=0;V<Z.length;V++){let U=Z[V],k=O+V*W;i({total:C.length,current:k,currentPlugin:v("Cloud.Status.UploadingBatch",{current:V+1,total:Z.length}),phase:"uploading"}),x(v("Cloud.Status.UploadingBatchLog",{current:V+1,total:Z.length,count:U.length}));let L=await e.api.github.batchUploadFiles(E,c,U,v("Cloud.Labels.BulkBackupMsgBatch",{current:V+1,total:Z.length}));if(!L.state)throw e.sourceManager.saveCheckpoint({filesToUpload:C,sourcesToSave:N,manifest:_,total:D,currentIdx:k}),new Error(L.data);e.sourceManager.saveCheckpoint({filesToUpload:C,sourcesToSave:N,manifest:_,total:D,currentIdx:k+U.length})}x(v("Cloud.Status.UpdatingIndex"));let me=JSON.stringify(_,null,4);if(!(await e.api.github.uploadFile(E,c,"metadata.json",Buffer.from(me).toString("base64"),v("Cloud.Labels.UpdateManifestGlobalMsg"),"main")).state)throw new Error(v("Cloud.Errors.UpdateManifestFail"));x(v("Cloud.Status.FinalizingLocal")),e.sourceManager.batchSaveSources(N),l(_),Ue.getState().triggerSourceUpdate(),e.sourceManager.clearCheckpoint(),h(null),i({total:D,current:D,currentPlugin:"",phase:"done"}),x(v("Cloud.Status.BackupDone")),e.notice.successPrefix(v("Common.Notices.Success"),v("Cloud.Notices.BackupSuccessCount",{count:D}))}catch(C){x(v("Cloud.Errors.BackupErrorMsg",{error:`${C}`})),i({total:0,current:0,currentPlugin:"",phase:"error",errorMessage:`${C}`}),e.notice.errorPrefix(v("Common.Notices.Failure"),`${C}`)}finally{p(!1)}},[s,c,e,l,i,m]),y=(0,Hu.useCallback)(async()=>{if(!s||!c||!confirm(v("Cloud.Dialogs.ConfirmRestoreAll")))return;p(!0),d([]);let w=s.login;try{x(v("Cloud.Hints.FetchingManifest"));let E=await e.api.github.getFileContentWithFallback(w,c,"metadata.json");if(!E.state||!E.data){x(v("Cloud.Errors.GetManifestFail")),i({total:0,current:0,currentPlugin:"",phase:"error",errorMessage:v("Cloud.Errors.GetManifestFail")});return}let C=E.data;if(!Array.isArray(C)||C.length===0){x(v("Cloud.Hints.NoCloudData")),i({total:0,current:0,currentPlugin:"",phase:"done"});return}x(v("Cloud.Notices.FoundCloudSources",{count:C.length})),i({total:C.length,current:0,currentPlugin:"",phase:"downloading"});let N=0,_=0;for(let O=0;O<C.length;O++){let D=C[O];i({total:C.length,current:O,currentPlugin:D.title||D.plugin,phase:"downloading"});try{let W=e.sourceManager.getSource(D.id);if(W){let V=e.sourceManager.getSourceFilePath(D.id);if(V&&Wg.existsSync(V)){let U=Wg.readFileSync(V,"utf-8");if(sme(U)===D.hash){x(v("Cloud.Notices.SkipLocalLatest",{title:D.title||D.plugin})),_++;continue}}}let Z=await e.api.github.getFileContentWithFallback(w,c,Ro(D.id,D.type));if(!Z.state||!Z.data){let V=Z.isRateLimit?v("Cloud.Hints.RateLimitTitle"):Z.data?.message||Z.data||"";x(`${v("Cloud.Errors.DownloadFailItem",{title:D.title||D.plugin})}: ${V}`);continue}let me=typeof Z.data=="string"?JSON.parse(Z.data):Z.data;e.sourceManager.saveSourceFile(D.id,me);let Q={id:D.id,plugin:D.plugin,title:D.title||v("Cloud.Labels.UnnamedTranslation"),type:D.type,origin:"cloud",isActive:W?.isActive||!1,checksum:Li(me),cloud:{owner:w,repo:c,hash:D.hash},updatedAt:Date.now(),createdAt:W?.createdAt||Date.now()};e.sourceManager.saveSource(Q),e.sourceManager.getActiveSourceId(D.plugin)||e.sourceManager.setActive(D.id,!0),N++,x(v("Cloud.Notices.RestoreSuccessItem",{title:D.title||D.plugin}))}catch(W){x(v("Cloud.Errors.ProcessingFailItem",{title:D.title||D.plugin,error:`${W}`}))}}l(C),Ue.getState().triggerSourceUpdate(),i({total:C.length,current:C.length,currentPlugin:"",phase:"done"}),x(v("Cloud.Notices.RestoreCompleteStat",{restored:N,skipped:_})),e.notice.successPrefix(v("Common.Notices.Success"),v("Cloud.Notices.RestoreSuccessCount",{count:N}))}catch(E){x(v("Cloud.Errors.RestoreErrorMsg",{error:`${E}`})),i({total:0,current:0,currentPlugin:"",phase:"error",errorMessage:`${E}`}),e.notice.errorPrefix(v("Common.Notices.Failure"),`${E}`)}finally{p(!1)}},[s,c,e,l,i]),b=(0,Hu.useCallback)(()=>{f||(a(null),i(null),d([]),t("my"))},[f,a,i,t]);if(!e.settings.shareToken)return(0,Qe.jsx)(Im,{});let S=n?.total?Math.round(n.current/n.total*100):0;return(0,Qe.jsxs)("div",{className:"flex flex-col h-full min-h-0",children:[(0,Qe.jsx)("div",{className:"flex items-center justify-between px-1 pb-4 shrink-0",children:(0,Qe.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Qe.jsxs)(we,{variant:"ghost",size:"sm",className:"h-8 px-2 gap-1.5 text-muted-foreground hover:text-primary",onClick:b,children:[(0,Qe.jsx)(mu,{className:"w-4 h-4"}),v("Cloud.Actions.BackToManage")]}),(0,Qe.jsx)("div",{className:"w-[1px] h-5 bg-border/50"}),(0,Qe.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Qe.jsx)(Yo,{className:"w-4 h-4 text-primary"}),(0,Qe.jsx)("h2",{className:"text-sm font-semibold",children:v("Cloud.Actions.BackupSync")})]})]})}),(0,Qe.jsx)(dr,{className:"flex-1 min-h-0 border rounded-xl overflow-hidden bg-card",children:(0,Qe.jsxs)("div",{className:"flex flex-col gap-6 p-6 max-w-2xl mx-auto w-full animate-in fade-in slide-in-from-bottom-4 duration-500",children:[(0,Qe.jsx)("div",{className:"text-sm text-muted-foreground bg-muted/30 p-4 rounded-lg border border-border/50",children:v("Cloud.Tips.BackupDesc")}),!r&&!f&&(0,Qe.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Qe.jsxs)("button",{onClick:()=>a("backup"),className:"flex flex-col items-center gap-3 p-6 rounded-xl border-2 border-dashed border-border/60 hover:border-primary/40 hover:bg-primary/5 transition-all group",children:[(0,Qe.jsx)("div",{className:"p-3 rounded-full bg-blue-500/10 text-blue-600 group-hover:bg-blue-500/20 transition-colors",children:(0,Qe.jsx)(ql,{className:"w-6 h-6"})}),(0,Qe.jsxs)("div",{className:"text-center",children:[(0,Qe.jsx)("p",{className:"text-sm font-semibold",children:v("Cloud.Tips.BackupToCloud")}),(0,Qe.jsx)("p",{className:"text-[10px] text-muted-foreground mt-1",children:v("Cloud.Tips.LocalToGithub")})]})]}),m&&(0,Qe.jsxs)("button",{onClick:()=>g(!0),className:"col-span-2 flex items-center justify-between p-4 rounded-xl border-2 border-primary/20 bg-primary/5 hover:bg-primary/10 transition-all group",children:[(0,Qe.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Qe.jsx)("div",{className:"p-2 rounded-full bg-primary/20 text-primary",children:(0,Qe.jsx)(rs,{className:"w-5 h-5"})}),(0,Qe.jsxs)("div",{className:"text-left",children:[(0,Qe.jsx)("p",{className:"text-sm font-semibold text-primary",children:v("Cloud.Actions.ResumeLastBackup")}),(0,Qe.jsx)("p",{className:"text-[10px] text-muted-foreground",children:new Date(m.timestamp).toLocaleString()})]})]}),(0,Qe.jsx)(hs,{className:"w-5 h-5 text-primary opacity-50 group-hover:opacity-100 transition-opacity"})]}),(0,Qe.jsxs)("button",{onClick:()=>a("restore"),className:"flex flex-col items-center gap-3 p-6 rounded-xl border-2 border-dashed border-border/60 hover:border-primary/40 hover:bg-primary/5 transition-all group",children:[(0,Qe.jsx)("div",{className:"p-3 rounded-full bg-green-500/10 text-green-600 group-hover:bg-green-500/20 transition-colors",children:(0,Qe.jsx)(ts,{className:"w-6 h-6"})}),(0,Qe.jsxs)("div",{className:"text-center",children:[(0,Qe.jsx)("p",{className:"text-sm font-semibold",children:v("Cloud.Tips.RestoreFromCloud")}),(0,Qe.jsx)("p",{className:"text-[10px] text-muted-foreground mt-1",children:v("Cloud.Tips.GithubToLocal")})]})]})]}),r&&!f&&!n&&(0,Qe.jsxs)("div",{className:"space-y-4",children:[(0,Qe.jsx)("div",{className:le("flex items-center gap-4 p-4 rounded-xl border",r==="backup"?"bg-blue-500/5 border-blue-500/20":"bg-green-500/5 border-green-500/20"),children:(0,Qe.jsx)("div",{className:"flex items-center gap-2 text-sm",children:r==="backup"?(0,Qe.jsxs)(Qe.Fragment,{children:[(0,Qe.jsx)(Yo,{className:"w-5 h-5 text-blue-600"}),(0,Qe.jsx)("span",{className:"font-semibold",children:v("Cloud.Labels.LocalTranslation")}),(0,Qe.jsx)(hs,{className:"w-4 h-4 text-muted-foreground"}),(0,Qe.jsx)(Bn,{className:"w-5 h-5 text-blue-600"}),(0,Qe.jsx)("span",{className:"font-semibold",children:v("Cloud.Tips.GithubRepo")})]}):(0,Qe.jsxs)(Qe.Fragment,{children:[(0,Qe.jsx)(Bn,{className:"w-5 h-5 text-green-600"}),(0,Qe.jsx)("span",{className:"font-semibold",children:v("Cloud.Tips.GithubRepo")}),(0,Qe.jsx)(hs,{className:"w-4 h-4 text-muted-foreground"}),(0,Qe.jsx)(Yo,{className:"w-5 h-5 text-green-600"}),(0,Qe.jsx)("span",{className:"font-semibold",children:v("Cloud.Labels.LocalTranslation")})]})})}),(0,Qe.jsx)("div",{className:"text-xs text-muted-foreground space-y-1 px-1",children:r==="backup"?(0,Qe.jsxs)(Qe.Fragment,{children:[(0,Qe.jsx)("p",{children:v("Cloud.Tips.BackupStep1")}),(0,Qe.jsx)("p",{children:v("Cloud.Tips.BackupStep2")}),(0,Qe.jsx)("p",{children:v("Cloud.Tips.BackupStep3")})]}):(0,Qe.jsxs)(Qe.Fragment,{children:[(0,Qe.jsx)("p",{children:v("Cloud.Tips.RestoreStep1")}),(0,Qe.jsx)("p",{children:v("Cloud.Tips.RestoreStep2")}),(0,Qe.jsx)("p",{children:v("Cloud.Tips.RestoreStep3")})]})}),(0,Qe.jsxs)("div",{className:"flex gap-2",children:[(0,Qe.jsx)(we,{variant:"outline",className:"flex-1",onClick:()=>a(null),children:v("Common.Actions.Back")}),(0,Qe.jsx)(we,{className:"flex-1",onClick:()=>g(!1),children:r==="backup"?(0,Qe.jsxs)(Qe.Fragment,{children:[(0,Qe.jsx)(ql,{className:"w-4 h-4 mr-2"}),v("Cloud.Actions.StartBackup")]}):(0,Qe.jsxs)(Qe.Fragment,{children:[(0,Qe.jsx)(ts,{className:"w-4 h-4 mr-2"}),v("Cloud.Actions.StartRestore")]})})]})]}),(f||n)&&(0,Qe.jsxs)("div",{className:"space-y-3",children:[(0,Qe.jsxs)("div",{className:"space-y-2",children:[(0,Qe.jsxs)("div",{className:"flex items-center justify-between text-xs",children:[(0,Qe.jsx)("span",{className:"text-muted-foreground font-medium",children:n?.phase==="done"?v("Cloud.Status.BackupDone"):n?.phase==="error"?v("Cloud.Status.BackupError"):n?.phase==="uploading"?v("Cloud.Status.UploadingCloud"):v("Cloud.Status.DownloadingCloud")}),(0,Qe.jsxs)("span",{className:"font-mono font-semibold text-primary",children:[n?.current,"/",n?.total]})]}),(0,Qe.jsx)(Mp,{value:S,className:"h-2"}),n?.currentPlugin&&f&&(0,Qe.jsxs)("div",{className:"flex items-center gap-1.5 text-[11px] text-muted-foreground",children:[(0,Qe.jsx)(Fs,{className:"w-3 h-3"}),(0,Qe.jsx)("span",{className:"truncate",children:n.currentPlugin})]})]}),(0,Qe.jsx)(dr,{className:"h-40 border rounded-lg bg-muted/10",children:(0,Qe.jsx)("div",{className:"p-3 space-y-1",children:u.map((w,E)=>(0,Qe.jsx)("p",{className:"text-[11px] text-muted-foreground font-mono leading-relaxed",children:w},E))})}),!f&&n&&(0,Qe.jsxs)(we,{className:"w-full",onClick:b,children:[(0,Qe.jsx)(gi,{className:"w-4 h-4 mr-2"}),v("Cloud.Status.Done")]})]})]})})]})};$t();var zt=A(oe()),zv="i18n-cloud-view",Tut=()=>{let{t:e}=Ve(),t=Ue.getState().i18n,r=Te.use.currentTab(),n=Te.use.setCurrentTab(),a=Te.use.reset(),i=Te.use.repoDataLoaded(),s=Te.use.repoChecking(),o=Te.use.repoInitialized(),l=Te.use.githubUser(),c=Te.use.isForking(),u=Te.use.refreshVersion(),d=Te.use.setRepoDataLoaded(),f=Te.use.setRepoChecking(),p=Te.use.setRepoInitialized(),m=Te.use.setRepoManifest(),h=Te.use.setMyRepoInfo(),x=Te.use.setMyRepoReadme(),g=Te.use.setRepoNameInput(),y=Te.use.fetchGithubUser();return lme.default.useEffect(()=>{if(i||!t.settings.shareToken)return;let S=t.settings.shareRepo;g(S||"obsidian-i18n-resources");let w=!1;return(async()=>{f(!0);try{if(await y(t),w)return;let C=Te.getState().githubUser;if(!C)return;if(!S){p(!1);return}let N=await t.api.github.checkRepoExists(C.login,S);if(w)return;if(p(N.state),N.state&&N.data&&typeof N.data.stargazers_count=="number"?h({stargazers_count:N.data.stargazers_count,watchers_count:N.data.watchers_count||0,forks_count:N.data.forks_count||0,open_issues_count:N.data.open_issues_count||0,created_at:N.data.created_at||"",updated_at:N.data.updated_at||"",size:N.data.size||0,description:N.data.description||""}):h(null),t.api.github.getFileContent(C.login,S,"README.md").then(_=>{if(!w&&_.state&&_.data?.content){let O=Buffer.from(_.data.content,"base64").toString("utf-8");x(O)}else w||x(null)}).catch(()=>{w||x(null)}),N.state)try{let _=await t.api.github.getFileContentWithFallback(C.login,S,"metadata.json");if(!w&&_.state&&_.data){let O=_.data;Array.isArray(O)&&m(O)}}catch{w||m([])}}catch{}finally{w||(f(!1),d(!0))}})(),()=>{w=!0}},[i,t,u]),(0,zt.jsx)("div",{className:"flex flex-col h-full w-full bg-background font-sans overflow-hidden",children:(0,zt.jsxs)(Zl,{value:r,onValueChange:b=>n(b),className:"flex-1 flex flex-col min-h-0 overflow-hidden",children:[(0,zt.jsxs)("div",{className:"flex items-center justify-between px-6 py-3 bg-card/50 backdrop-blur sticky top-0 z-20",children:[(0,zt.jsx)("div",{className:"flex items-center gap-6",children:(0,zt.jsxs)(Ql,{className:"bg-muted/50 p-1 rounded-lg border border-border/50",children:[(0,zt.jsx)(sa,{value:"community",className:"data-[state=active]:bg-background data-[state=active]:text-primary data-[state=active]:shadow-sm transition-all duration-200 px-4 py-1.5",children:(0,zt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,zt.jsx)(Fi,{className:"w-3.5 h-3.5"}),(0,zt.jsx)("span",{children:e("Cloud.Tabs.Community")})]})}),(0,zt.jsx)(sa,{value:"download",className:"data-[state=active]:bg-background data-[state=active]:text-primary data-[state=active]:shadow-sm transition-all duration-200 px-4 py-1.5",children:(0,zt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,zt.jsx)(ts,{className:"w-3.5 h-3.5"}),(0,zt.jsx)("span",{children:e("Cloud.Tabs.Explore")})]})}),(0,zt.jsx)(sa,{value:"my",className:"data-[state=active]:bg-background data-[state=active]:text-primary data-[state=active]:shadow-sm transition-all duration-200 px-4 py-1.5",children:(0,zt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,zt.jsx)(yi,{className:"w-3.5 h-3.5"}),(0,zt.jsx)("span",{children:e("Cloud.Tabs.Manage")})]})})]})}),(0,zt.jsx)("div",{className:"flex items-center gap-4",children:t.settings.shareToken?s?(0,zt.jsx)("div",{className:"flex items-center gap-3 px-3 py-1.5 rounded-xl bg-muted/20 border border-border/40 text-xs shadow-sm",children:(0,zt.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,zt.jsx)(nn,{className:"w-3.5 h-3.5 animate-spin"}),(0,zt.jsx)("span",{className:"whitespace-nowrap",children:e("Cloud.Status.Checking")})]})}):(0,zt.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1.5 rounded-xl bg-muted/20 border border-border/40 shadow-sm hover:shadow-md hover:bg-muted/40 hover:border-border/60 transition-all cursor-default group overflow-hidden",children:[(0,zt.jsxs)("div",{className:"flex items-center gap-2",children:[l?.avatar_url?(0,zt.jsx)("img",{src:l.avatar_url,className:"w-7 h-7 rounded-lg ring-1 ring-border shadow-[0_2px_4px_rgba(0,0,0,0.05)] group-hover:scale-[1.02] transition-transform object-cover",alt:"avatar"}):(0,zt.jsx)("div",{className:"w-7 h-7 rounded-lg bg-primary/10 flex items-center justify-center text-primary ring-1 ring-primary/20 shadow-[0_2px_4px_rgba(0,0,0,0.05)]",children:(0,zt.jsx)(Su,{className:"w-4 h-4"})}),(0,zt.jsx)("div",{className:"flex flex-col pr-1 justify-center whitespace-nowrap",children:(0,zt.jsx)("span",{className:"font-bold text-[13px] text-foreground/90 leading-none",children:l?.login||e("Common.Labels.GithubUser")})})]}),(0,zt.jsxs)("div",{className:"flex items-center gap-1 max-w-0 opacity-0 group-hover:max-w-[80px] group-hover:opacity-100 group-hover:pl-2 group-hover:ml-1 group-hover:border-l group-hover:border-border/40 transition-all duration-300 overflow-hidden",children:[(0,zt.jsx)("button",{onClick:()=>a(),className:"flex shrink-0 items-center justify-center w-6 h-6 rounded-md hover:bg-primary/10 text-muted-foreground hover:text-primary transition-colors cursor-pointer",title:e("Common.Actions.Refresh"),children:(0,zt.jsx)(nn,{className:"w-3.5 h-3.5"})}),(0,zt.jsx)("button",{onClick:async()=>{t.settings.shareToken="",t.settings.shareRepo="",await t.saveSettings(),a()},className:"flex shrink-0 items-center justify-center w-6 h-6 rounded-md text-destructive/70 hover:bg-destructive/10 hover:text-destructive transition-colors cursor-pointer",title:e("Cloud.Actions.Logout"),children:(0,zt.jsx)(vT,{className:"w-3.5 h-3.5"})})]})]}):(0,zt.jsxs)("div",{onClick:()=>{t.activeSettingTab="share",t.app.setting.open(),t.app.setting.openTabById("i18n")},className:"flex items-center gap-2 px-2 py-1.5 rounded-xl bg-orange-500/10 border border-orange-500/20 shadow-sm hover:shadow-md hover:bg-orange-500/20 hover:border-orange-500/30 transition-all cursor-pointer group",title:e("Cloud.Hints.TokenRequired"),children:[(0,zt.jsx)("div",{className:"w-7 h-7 rounded-lg bg-orange-500/10 flex items-center justify-center text-orange-600 ring-1 ring-orange-500/20 shadow-[0_2px_4px_rgba(0,0,0,0.05)]",children:(0,zt.jsx)(Su,{className:"w-4 h-4"})}),(0,zt.jsx)("div",{className:"flex flex-col pr-1 justify-center whitespace-nowrap",children:(0,zt.jsx)("span",{className:"font-bold text-[13px] text-foreground/90 leading-none",children:["community","download"].includes(r)?e("Cloud.Status.GuestMode"):e("Cloud.Status.Unauthorized")})})]})})]}),(0,zt.jsxs)("div",{className:"flex-1 overflow-hidden relative bg-muted/5 flex flex-col min-h-0",children:[(0,zt.jsx)("div",{className:"absolute top-0 left-0 w-full h-[300px] bg-gradient-to-b from-primary/5 to-transparent pointer-events-none"}),(0,zt.jsx)(bn,{value:"community",className:"flex-1 min-h-0 m-0 p-6 data-[state=active]:flex flex-col relative z-10 animate-in fade-in slide-in-from-bottom-2 duration-300",children:(0,zt.jsx)(ame,{})}),(0,zt.jsx)(bn,{value:"download",className:"flex-1 min-h-0 m-0 p-6 data-[state=active]:flex flex-col relative z-10 animate-in fade-in slide-in-from-bottom-2 duration-300",children:(0,zt.jsx)(Zpe,{})}),(0,zt.jsx)(bn,{value:"my",className:"flex-1 min-h-0 m-0 p-6 data-[state=active]:flex flex-col relative z-10 animate-in fade-in slide-in-from-bottom-2 duration-300",children:(0,zt.jsx)(rme,{})}),(0,zt.jsx)(bn,{value:"upload",className:"flex-1 min-h-0 m-0 p-6 data-[state=active]:flex flex-col relative z-10 animate-in fade-in slide-in-from-bottom-2 duration-300",children:(0,zt.jsx)(tme,{})}),(0,zt.jsx)(bn,{value:"history",className:"flex-1 min-h-0 m-0 p-6 data-[state=active]:flex flex-col relative z-10 animate-in fade-in slide-in-from-bottom-2 duration-300",children:(0,zt.jsx)(ime,{})}),(0,zt.jsx)(bn,{value:"backup",className:"flex-1 min-h-0 m-0 p-6 data-[state=active]:flex flex-col relative z-10 animate-in fade-in slide-in-from-bottom-2 duration-300",children:(0,zt.jsx)(ome,{})})]})]})})},DC=class extends cme.ItemView{constructor(r,n){super(r);this.root=null;this.shadowRoot=null;this.i18n=n}getViewType(){return zv}getDisplayText(){return v("Cloud.Labels.CloudCentral")}getIcon(){return"cloud"}async onOpen(){let{root:r,shadowRoot:n}=el(this.contentEl,this.i18n,(0,zt.jsx)(Tut,{}));this.root=r,this.shadowRoot=n}async onClose(){Te.getState().reset(),this.root?.unmount(),this.shadowRoot&&(this.shadowRoot.innerHTML="")}};var Ee=A(oe()),dme=Am.default.memo(({plugin:e,i18n:t,settings:r,isEnabled:n,data:a,reloadPlugin:i,refreshParent:s,close:o,viewMode:l})=>{let{t:c}=Ve(),[u,d]=(0,Am.useState)(!1),[f,p]=(0,Am.useState)(!1),[m,h]=(0,Am.useState)(!1),[x,g]=(0,Am.useState)(!1),{statusColor:y,statusText:b,statusDesc:S,isLangDoc:w,langDoc:E,pluginDir:C,sources:N,activeSourceId:_,translationFormatMark:O,mainDoc:D,manifestDoc:W,isApplied:Z,isTranslated:me,translationVersion:Q,supportedVersion:V,cloudEntries:U}=a,k=t.sourceManager,[L,M]=(0,Am.useState)(null),ee=async ue=>{if(!L){M(ue.id);try{let H=r.defaultCloudRepo;if(!H){t.notice.error(c("Cloud.Errors.FetchFail")||"No default cloud repo set");return}let I=H.split("/");if(I.length!==2)return;let[K,he]=I,q=await t.api.github.getFileContentWithFallback(K,he,`plugins/${ue.id}.json`);if(!q.state||!q.data)throw new Error(q.isRateLimit?"Rate limit exceeded":q.data?.message||"Download failed");let be=typeof q.data=="string"?JSON.parse(q.data):q.data,{calculateChecksum:Ie}=await Promise.resolve().then(()=>($t(),kT)),Ne=k?.getAllSources().find(He=>He.id===ue.id);if(Ne)k?.saveSourceFile(Ne.id,be),k?.saveSource({...Ne,origin:"cloud",title:ue.title||Ne.title,checksum:Ie(be),cloud:{owner:K,repo:he,hash:ue.hash},updatedAt:Date.now()}),t.notice.successPrefix("Cloud",c("Cloud.Notices.UpdateSuccess")||"Update success");else{k?.saveSourceFile(ue.id,be);let He=!k?.getActiveSourceId(e.id);k?.saveSource({id:ue.id,plugin:ue.plugin,title:ue.title||"Unknown",type:ue.type,origin:"cloud",isActive:He,checksum:Ie(be),cloud:{owner:K,repo:he,hash:ue.hash},updatedAt:Date.now(),createdAt:Date.now()}),t.notice.successPrefix("Cloud",c("Cloud.Notices.DownloadSuccess")||"Download success")}s()}catch(H){t.notice.error(`Failed to download: ${H}`)}finally{M(null)}}},se=async()=>{d(!0);try{if(!await cc.pathExists(D)){t.notice.error(c("Manager.Plugins.Errors.MainNotFound"));return}let H=(await cc.readFile(D)).toString(),I=await cc.readJson(W);await new Promise(q=>setTimeout(q,0));let{generatePlugin:K}=await Promise.resolve().then(()=>($t(),kT)),he=K(e.version,I,H,r.language,t.settings);k&&(await k.extractAndSaveSource(e.id,he,{title:e.name}),t.notice.successPrefix(c("Manager.Plugins.Notices.ExtractSuccess"),c("Manager.Plugins.Hints.ExtractSuccessDesc"))),s()}catch(ue){t.notice.result(!1,`${ue}`)}finally{d(!1)}},ne=async()=>{if(!f){if(!Z&&!me){g(!0);return}p(!0);try{let ue=si(E);if(ue.dict){let K=Object.keys(ue.dict);await t.backupManager.createBackup(e.id,C,K);let he={};for(let[q,be]of Object.entries(ue.dict)){let Ie=ume.join(C,q);if(!cc.existsSync(Ie))continue;let Ne=cc.readFileSync(Ie).toString();if(be.ast&&be.ast.length>0){let He=new _s(t.settings),xt=He.loadCode(Ne);xt&&(Ne=He.translate(xt,be.ast))}if(be.regex&&be.regex.length>0&&(Ne=new oo(t.settings).translate(Ne,be.regex)),Ie.endsWith(".js")&&!new _s(t.settings).loadCode(Ne))throw new Error(c("Manager.Plugins.Errors.SyntaxError",{file:q}));he[Ie]=Ne}for(let[q,be]of Object.entries(he))cc.writeFileSync(q,be)}t.stateManager.setPluginState(e.id,{id:e.id,isApplied:!0,pluginVersion:e.version,translationVersion:ue.metadata.version});let H=n,I=!1;try{t.app.plugins.enabledPlugins.has(e.id)&&await t.app.plugins.disablePlugin(e.id),await t.app.plugins.enablePlugin(e.id),t.app.plugins.plugins[e.id]||(I=!0)}catch{I=!0}if(I){t.notice.error(c("Manager.Plugins.Errors.LoadFailedAfterApply")||"\u8BD1\u6587\u5BFC\u81F4\u6838\u5FC3\u903B\u8F91\u635F\u574F\uFF0C\u5DF2\u89E6\u53D1\u5B89\u5168\u62E6\u622A\u5E76\u81EA\u52A8\u56DE\u6EDA\u3002"),await t.backupManager.restoreBackup(e.id,C),t.stateManager.deletePluginState(e.id),H?await t.app.plugins.enablePlugin(e.id):await t.app.plugins.disablePlugin(e.id),s();return}H?t.notice.successPrefix(c("Manager.Plugins.Notices.ReloadSuccess")||"\u63D2\u4EF6\u91CD\u8F7D\u6210\u529F",e.id):await t.app.plugins.disablePlugin(e.id),s()}catch(ue){t.notice.result(!1,String(ue))}finally{p(!1)}}},ge=async()=>{if(!m){h(!0);try{await t.backupManager.restoreBackup(e.id,C)?(t.stateManager.deletePluginState(e.id),n&&await i(e.id),t.notice.result(!0)):t.notice.result(!1,c("Manager.Plugins.Errors.BackupNotFound")),s()}catch(ue){t.notice.result(!1,String(ue))}finally{h(!1)}}};return l==="grid"?(0,Ee.jsxs)("div",{className:"group relative flex flex-col h-[200px] border rounded-none bg-card/85 text-card-foreground shadow-xs hover:shadow-lg hover:bg-muted/30 transition-all duration-300 overflow-hidden border-border/60 backdrop-blur-md",children:[(0,Ee.jsx)("div",{className:le("absolute left-0 top-0 bottom-0 w-[4px] transition-colors duration-300 z-10 bg-opacity-100",y)}),(0,Ee.jsxs)("div",{className:"p-4 flex flex-col h-full relative z-0",children:[(0,Ee.jsxs)("div",{className:"flex justify-between items-start mb-3 gap-2",children:[(0,Ee.jsxs)("div",{className:"flex flex-col overflow-hidden min-w-0",children:[(0,Ee.jsx)("span",{className:"font-bold truncate text-[14px] leading-tight text-foreground/90 group-hover:text-primary transition-colors duration-300",title:e.name,children:e.name}),(0,Ee.jsxs)("div",{className:"flex items-center gap-2 mt-1",children:[(0,Ee.jsxs)("span",{className:"text-[10px] text-muted-foreground/60 font-semibold tracking-tight bg-muted/30 px-1.5 py-0.5 rounded-none",children:["v",e.version]}),Q&&(0,Ee.jsxs)("span",{className:"text-[10px] text-primary/80 font-bold bg-primary/5 border border-primary/10 px-1.5 py-0.5 rounded-none",children:["v",Q]})]})]}),(0,Ee.jsxs)("div",{className:le("px-2 py-0.5 text-[9px] uppercase tracking-widest font-extrabold rounded-none bg-background border border-border shadow-xs flex items-center gap-1.5",y.replace(/bg-/g,"text-")),children:[(0,Ee.jsx)("span",{className:le("w-1.5 h-1.5 rounded-full shadow-sm animate-pulse-slow",y)}),b]})]}),(0,Ee.jsx)("div",{className:"flex-1 text-[11px] text-muted-foreground overflow-hidden leading-relaxed break-words font-medium relative",title:e.description,style:{WebkitMaskImage:"linear-gradient(to bottom, black 70%, transparent 100%)",maskImage:"linear-gradient(to bottom, black 70%, transparent 100%)"},children:e.description||c("Common.Status.Unknown")}),(0,Ee.jsx)("div",{className:"flex flex-col gap-3 mt-auto pt-3 border-t border-border/30",children:(0,Ee.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[N.length>0?(0,Ee.jsxs)(mr,{value:_??void 0,onValueChange:ue=>{k?.setActive(ue,!0),s()},children:[(0,Ee.jsx)(gr,{className:"w-[110px] text-[10px] px-2 h-7 bg-muted/40 border-none shadow-none hover:bg-muted/60 transition-all rounded-none",size:"sm",children:(0,Ee.jsx)(hr,{placeholder:c("Manager.Common.Actions.SelectSource")})}),(0,Ee.jsx)(yr,{className:"backdrop-blur-md bg-background/95 border-border/40",children:N.map(ue=>(0,Ee.jsx)(Ot,{value:ue.id,className:"text-[11px]",children:ue.title},ue.id))})]}):(0,Ee.jsx)("div",{}),(0,Ee.jsxs)("div",{className:"flex gap-2",children:[w&&!Z&&(0,Ee.jsx)(ti,{children:(0,Ee.jsxs)(oa,{children:[(0,Ee.jsx)(la,{asChild:!0,children:(0,Ee.jsxs)(we,{variant:"default",size:"sm",className:"h-7 px-3 text-[10px] font-bold shadow-sm hover:shadow-md hover:bg-primary/90 transition-all active:scale-95 rounded-none",onClick:ne,disabled:f,children:[f&&(0,Ee.jsx)(Gt,{className:"w-2.5 h-2.5 animate-spin mr-1"}),c("Manager.Common.Actions.Apply")]})}),(0,Ee.jsx)(ca,{side:"top",className:"text-[10px]",children:c("Manager.Common.Actions.Apply")})]})}),Z&&(0,Ee.jsx)(ti,{children:(0,Ee.jsxs)(oa,{children:[(0,Ee.jsx)(la,{asChild:!0,children:(0,Ee.jsxs)(we,{variant:"outline",size:"sm",className:"h-7 px-3 text-[10px] font-bold border-border/50 hover:bg-secondary/20 transition-all active:scale-95 rounded-none",onClick:ge,disabled:m,children:[m&&(0,Ee.jsx)(Gt,{className:"w-2.5 h-2.5 animate-spin mr-1"}),c("Manager.Common.Actions.Restore")]})}),(0,Ee.jsx)(ca,{side:"top",className:"text-[10px]",children:c("Manager.Common.Actions.Restore")})]})}),U&&U.length>0&&(0,Ee.jsxs)(ri,{children:[(0,Ee.jsx)(ni,{asChild:!0,children:(0,Ee.jsx)(we,{variant:"ghost",size:"icon",className:"h-7 w-7 rounded-none hover:bg-muted/50 transition-all",children:L?(0,Ee.jsx)(Gt,{className:"w-4 h-4 animate-spin text-primary"}):(0,Ee.jsx)(Ul,{className:"w-4 h-4 text-primary/80"})})}),(0,Ee.jsx)(ai,{align:"end",className:"w-56 shadow-2xl backdrop-blur-md bg-background/95 border-border/40",children:U.map(ue=>{let H=N.some(K=>K.id===ue.id),I=N.some(K=>K.id===ue.id&&K.cloud?.hash!==ue.hash);return(0,Ee.jsxs)(an,{onClick:()=>ee(ue),className:"text-[11px] py-1.5 flex items-center justify-between",children:[(0,Ee.jsxs)("div",{className:"flex items-center truncate",children:[(0,Ee.jsx)(Bn,{className:"w-3.5 h-3.5 mr-2 text-primary/60"}),(0,Ee.jsxs)("span",{className:"truncate",title:ue.title,children:[ue.title," ",(0,Ee.jsxs)("span",{className:"text-muted-foreground/60",children:["v",ue.version]})]})]}),H&&!I?(0,Ee.jsx)(vt,{variant:"outline",className:"text-[8px] h-4 px-1 ml-2 bg-green-500/10 text-green-600 border-none shrink-0",children:"\u5DF2\u4E0B\u8F7D"}):I?(0,Ee.jsx)(vt,{variant:"outline",className:"text-[8px] h-4 px-1 ml-2 bg-amber-500/10 text-amber-600 border-none shrink-0 animate-pulse",children:"\u6709\u66F4\u65B0"}):null]},ue.id)})})]}),(0,Ee.jsxs)(ri,{children:[(0,Ee.jsx)(ni,{asChild:!0,children:(0,Ee.jsx)(we,{variant:"ghost",size:"icon",className:"h-7 w-7 rounded-none hover:bg-muted/50 transition-all",children:(0,Ee.jsx)(go,{className:"w-4 h-4 text-muted-foreground"})})}),(0,Ee.jsxs)(ai,{align:"end",className:"w-48 shadow-2xl backdrop-blur-md bg-background/95 border-border/40",children:[O&&w&&(0,Ee.jsxs)(an,{onClick:()=>{let ue=si(E);Ue.getState().setEditorPluginTranslation(ue),Ue.getState().setEditorPluginTranslationPath(E),t.view.activateView(Cm)},className:"text-[12px] py-2",children:[(0,Ee.jsx)(vo,{className:"w-3.5 h-3.5 mr-2.5 text-primary/70"}),(0,Ee.jsx)("span",{children:c("Manager.Common.Actions.Edit")})]}),(0,Ee.jsxs)(an,{onClick:se,disabled:u,className:"text-[12px] py-2",children:[(0,Ee.jsx)(Cc,{className:"w-3.5 h-3.5 mr-2.5 text-blue-500/70"}),(0,Ee.jsx)("span",{children:c("Manager.Plugins.Actions.Extract")})]}),_&&(0,Ee.jsxs)(an,{onClick:()=>{k?.removeSource(_),s()},className:"text-[12px] py-2 text-destructive focus:text-destructive focus:bg-destructive/5",children:[(0,Ee.jsx)(zl,{className:"w-3.5 h-3.5 mr-2.5 opacity-70"}),(0,Ee.jsx)("span",{children:c("Manager.Common.Actions.Delete")})]}),(0,Ee.jsx)(tc,{className:"bg-border/40"}),n&&(0,Ee.jsxs)(an,{onClick:()=>{t.app.setting.open(),t.app.setting.openTabById(e.id)},className:"text-[12px] py-2",children:[(0,Ee.jsx)(xu,{className:"w-3.5 h-3.5 mr-2.5 text-orange-500/70"}),(0,Ee.jsx)("span",{children:c("Manager.Plugins.Actions.OpenSettings")})]}),(0,Ee.jsxs)(an,{onClick:()=>au(t,C),className:"text-[12px] py-2",children:[(0,Ee.jsx)(yi,{className:"w-3.5 h-3.5 mr-2.5 text-amber-500/70"}),(0,Ee.jsx)("span",{children:c("Manager.Common.Actions.OpenFolder")})]})]})]})]})]})})]})]}):(0,Ee.jsxs)("div",{className:"group relative border rounded-none bg-card/75 text-card-foreground shadow-xs hover:shadow-md hover:bg-muted/20 transition-all duration-300 px-4 py-1.5 w-full border-border/50 overflow-hidden backdrop-blur-md",children:[(0,Ee.jsx)("div",{className:le("absolute left-0 top-0 bottom-0 w-[3px] transition-colors duration-300 z-10 bg-opacity-100",y)}),(0,Ee.jsxs)("div",{className:"flex items-center gap-5 overflow-hidden min-w-0 relative z-0",children:[(0,Ee.jsxs)("div",{className:le("px-2.5 py-0.5 text-[9px] uppercase tracking-[0.1em] font-extrabold rounded-none bg-background border border-border shadow-xs flex items-center gap-1.5",y.replace(/bg-/g,"text-")),children:[(0,Ee.jsx)("span",{className:le("w-1.5 h-1.5 rounded-full shadow-sm",y)}),b]}),(0,Ee.jsxs)("div",{className:"flex items-center gap-2.5 min-w-0 flex-1",children:[(0,Ee.jsx)("span",{className:"font-bold truncate text-[13.5px] text-foreground/90 group-hover:text-primary transition-colors duration-300 shrink-0 max-w-[40%]",children:e.name}),(0,Ee.jsxs)("span",{className:"text-[10px] text-muted-foreground/50 shrink-0 font-bold bg-muted/20 px-1.5 py-0.5 rounded-none",children:["v",e.version]}),Q&&(0,Ee.jsxs)("span",{className:"text-[10px] text-primary/80 font-bold bg-primary/5 border border-primary/10 px-1.5 py-0.5 rounded-none shrink-0",children:["v",Q]})]}),(0,Ee.jsxs)("div",{className:"flex items-center gap-2.5 ml-auto shrink-0 pl-2",children:[N.length>0&&(0,Ee.jsxs)(mr,{value:_??void 0,onValueChange:ue=>{k?.setActive(ue,!0),s()},children:[(0,Ee.jsx)(gr,{className:"w-[125px] h-8 text-[11px] bg-muted/40 border-none shadow-none hover:bg-muted/60 transition-all rounded-none",size:"sm",children:(0,Ee.jsx)(hr,{placeholder:c("Manager.Common.Actions.SelectSource")})}),(0,Ee.jsx)(yr,{className:"backdrop-blur-md bg-background/95 border-border/40",children:N.map(ue=>(0,Ee.jsx)(Ot,{value:ue.id,className:"text-[11px]",children:ue.title},ue.id))})]}),(0,Ee.jsxs)("div",{className:"flex items-center gap-1.5",children:[O&&w&&(0,Ee.jsx)(ti,{children:(0,Ee.jsxs)(oa,{children:[(0,Ee.jsx)(la,{asChild:!0,children:(0,Ee.jsx)(we,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-none hover:bg-primary/10 hover:text-primary transition-all",onClick:()=>{let ue=si(E);Ue.getState().setEditorPluginTranslation(ue),Ue.getState().setEditorPluginTranslationPath(E),t.view.activateView(Cm)},children:(0,Ee.jsx)(vo,{className:"w-3.5 h-3.5"})})}),(0,Ee.jsx)(ca,{className:"text-[10px]",children:c("Manager.Common.Actions.Edit")})]})}),w&&!Z&&(0,Ee.jsx)(ti,{children:(0,Ee.jsxs)(oa,{children:[(0,Ee.jsx)(la,{asChild:!0,children:(0,Ee.jsxs)(we,{variant:"default",size:"sm",className:"h-8 px-4 text-[11px] font-bold shadow-sm hover:shadow-md hover:translate-y-[-1px] active:scale-95 transition-all rounded-none",onClick:ne,disabled:f,children:[f&&(0,Ee.jsx)(Gt,{className:"w-3 h-3 animate-spin mr-1.5"}),c("Manager.Common.Actions.Apply")]})}),(0,Ee.jsx)(ca,{className:"text-[10px]",children:c("Manager.Common.Actions.Apply")})]})}),Z&&(0,Ee.jsx)(ti,{children:(0,Ee.jsxs)(oa,{children:[(0,Ee.jsx)(la,{asChild:!0,children:(0,Ee.jsxs)(we,{variant:"outline",size:"sm",className:"h-8 px-4 text-[11px] font-bold border-border/50 hover:bg-secondary/20 transition-all active:scale-95 rounded-none",onClick:ge,disabled:m,children:[m&&(0,Ee.jsx)(Gt,{className:"w-3 h-3 animate-spin mr-1.5"}),c("Manager.Common.Actions.Restore")]})}),(0,Ee.jsx)(ca,{className:"text-[10px]",children:c("Manager.Common.Actions.Restore")})]})}),U&&U.length>0&&(0,Ee.jsxs)(ri,{children:[(0,Ee.jsx)(ni,{asChild:!0,children:(0,Ee.jsx)(we,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-none hover:bg-primary/10 hover:text-primary transition-all",children:L?(0,Ee.jsx)(Gt,{className:"w-4 h-4 animate-spin"}):(0,Ee.jsx)(Ul,{className:"w-4 h-4"})})}),(0,Ee.jsx)(ai,{align:"end",className:"w-56 shadow-2xl backdrop-blur-md bg-background/95 border-border/40",children:U.map(ue=>{let H=N.some(K=>K.id===ue.id),I=N.some(K=>K.id===ue.id&&K.cloud?.hash!==ue.hash);return(0,Ee.jsxs)(an,{onClick:()=>ee(ue),className:"text-[12px] py-2 flex items-center justify-between",children:[(0,Ee.jsxs)("div",{className:"flex items-center truncate",children:[(0,Ee.jsx)(Bn,{className:"w-4 h-4 mr-2.5 text-primary/60"}),(0,Ee.jsxs)("span",{className:"truncate",title:ue.title,children:[ue.title," ",(0,Ee.jsxs)("span",{className:"text-muted-foreground/50 ml-1",children:["v",ue.version]})]})]}),H&&!I?(0,Ee.jsx)(vt,{variant:"outline",className:"text-[9px] h-5 px-1.5 ml-2 bg-green-500/10 text-green-600 border-none shrink-0",children:"\u5DF2\u4E0B\u8F7D"}):I?(0,Ee.jsx)(vt,{variant:"outline",className:"text-[9px] h-5 px-1.5 ml-2 bg-amber-500/10 text-amber-600 border-none shrink-0 animate-pulse",children:"\u6709\u66F4\u65B0"}):null]},ue.id)})})]}),(0,Ee.jsxs)(ri,{children:[(0,Ee.jsx)(ni,{asChild:!0,children:(0,Ee.jsx)(we,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-none hover:bg-muted/50 transition-all",children:(0,Ee.jsx)(go,{className:"w-4 h-4 text-muted-foreground"})})}),(0,Ee.jsxs)(ai,{align:"end",className:"w-48 shadow-2xl backdrop-blur-md bg-background/95 border-border/40",children:[(0,Ee.jsxs)(an,{onClick:se,disabled:u,className:"text-[12px] py-2",children:[(0,Ee.jsx)(Cc,{className:"w-3.5 h-3.5 mr-2.5 text-blue-500/70"}),(0,Ee.jsx)("span",{children:c("Manager.Plugins.Actions.Extract")})]}),_&&(0,Ee.jsxs)(an,{onClick:()=>{k?.removeSource(_),s()},className:"text-[12px] py-2 text-destructive focus:text-destructive focus:bg-destructive/5",children:[(0,Ee.jsx)(zl,{className:"w-3.5 h-3.5 mr-2.5 opacity-70"}),(0,Ee.jsx)("span",{children:c("Manager.Common.Actions.Delete")})]}),(0,Ee.jsx)(tc,{className:"bg-border/40"}),n&&(0,Ee.jsxs)(an,{onClick:()=>{t.app.setting.open(),t.app.setting.openTabById(e.id)},className:"text-[12px] py-2",children:[(0,Ee.jsx)(xu,{className:"w-3.5 h-3.5 mr-2.5 text-orange-500/70"}),(0,Ee.jsx)("span",{children:c("Manager.Plugins.Actions.OpenSettings")})]}),(0,Ee.jsxs)(an,{onClick:()=>au(t,C),className:"text-[12px] py-2",children:[(0,Ee.jsx)(yi,{className:"w-3.5 h-3.5 mr-2.5 text-amber-500/70"}),(0,Ee.jsx)("span",{children:c("Manager.Common.Actions.OpenFolder")})]})]})]}),(0,Ee.jsx)(Kd,{open:x,onOpenChange:g,children:(0,Ee.jsxs)(Wd,{className:"sm:max-w-[425px] rounded-none border-border/60",children:[(0,Ee.jsxs)(Xd,{children:[(0,Ee.jsxs)(Yd,{className:"flex items-center gap-2 text-amber-500",children:[(0,Ee.jsx)("span",{className:"text-xl",children:"\u26A0\uFE0F"}),c("Manager.Plugins.Dialogs.EmptyTranslationTitle")]}),(0,Ee.jsx)(bb,{className:"pt-4 leading-relaxed text-foreground/80",children:c("Manager.Plugins.Dialogs.EmptyTranslationDesc")})]}),(0,Ee.jsx)(dg,{className:"mt-6 flex justify-center",children:(0,Ee.jsx)(we,{variant:"secondary",onClick:()=>g(!1),className:"w-full rounded-none h-10 bg-amber-500/10 hover:bg-amber-500/20 text-amber-600 dark:text-amber-400 border-amber-500/20",children:c("Common.Actions.Confirm")})})]})})]})]})]})]})});var Sn=A(oe()),fme=({i18n:e,close:t})=>{let{t:r}=Ve(),n=e.app,a=e.settings,[i,s]=(0,mn.useState)(a.searchText),[o,l]=(0,mn.useState)(a.sort),[c,u]=(0,mn.useState)(a.pluginViewMode||"list"),d=(0,mn.useCallback)(H=>{u(H),a.pluginViewMode=H,e.saveSettings()},[e,a]),[f,p]=(0,mn.useState)("all"),[m,h]=(0,mn.useState)([]),[x,g]=(0,mn.useState)(new Set),[y,b]=(0,mn.useState)(0),[S,w]=(0,mn.useState)(!1),[E,C]=(0,mn.useState)([]);(0,mn.useEffect)(()=>{let H=a.defaultCloudRepo;if(!H){C([]);return}let I=H.split("/");if(I.length!==2)return;let[K,he]=I,q=!0;return e.api.github.getFileContentWithFallback(K,he,"metadata.json").then(be=>{q&&be.state&&Array.isArray(be.data)&&C(be.data)}).catch(be=>{}),()=>{q=!1}},[a.defaultCloudRepo,e]);let N=Ue(H=>H.sourceUpdateTick),_=(0,mn.useMemo)(()=>[{key:"0",label:r("Common.Data.SortAsc")},{key:"1",label:r("Common.Data.SortDesc")}],[r]),O=(0,mn.useMemo)(()=>[{key:"all",label:r("Manager.Common.Filters.All")},{key:"toExtract",label:r("Manager.Plugins.Filters.ToExtract")},{key:"untranslated",label:r("Manager.Plugins.Filters.Untranslated")},{key:"translated",label:r("Manager.Plugins.Filters.Translated")},{key:"unapplied",label:r("Manager.Plugins.Filters.Unapplied")},{key:"applied",label:r("Manager.Plugins.Filters.Applied")}],[r]);(0,mn.useEffect)(()=>{let I=Object.values(n.plugins.manifests).filter(K=>K.id!==e.manifest.id);h(I),g(new Set(n.plugins.enabledPlugins))},[n,y,e.manifest.id]);let D=(0,mn.useCallback)(H=>H.dict?Object.values(H.dict).some(I=>I.ast.some(K=>K.target&&K.target!==K.source)||I.regex.some(K=>K.target&&K.target!==K.source)):!1,[]),W=(0,mn.useMemo)(()=>{let H={},I=Vv.normalize(e.app.vault.adapter.getBasePath());for(let K of m){let he=Vv.join(I,K.dir||""),q=e.sourceManager.getTranslationPath(K.id,he),be=f_.pathExistsSync(q),Ie=Vv.join(he,"manifest.json"),Ne=Vv.join(he,"main.js"),He=e.stateManager.getPluginState(K.id),xt=e.sourceManager?.getSourcesForPlugin(K.id)||[],Ce=e.sourceManager?.getActiveSourceId(K.id),ke,je=!0,ot=!1;if(be)try{ke=si(q),je=YM(ke),je&&ke&&(ot=D(ke))}catch{je=!1}let Nt="bg-muted-foreground",It=r("Manager.Plugins.Status.ToExtract"),ar=r("Manager.Plugins.Hints.NoTransDesc"),Wr=0,pe="",We="";ke&&je?(pe=ke.metadata.version,We=ke.metadata.supportedVersions,Wr=be?f_.statSync(q).mtimeMs:Date.now(),!!(He&&He.isApplied)?(Nt="bg-green-500 dark:bg-green-600",It=r("Manager.Plugins.Status.Applied")):ot?(Nt="bg-blue-500 dark:bg-blue-600",It=r("Manager.Plugins.Status.Unapplied")):(Nt="bg-amber-500 dark:bg-amber-600",It=r("Manager.Plugins.Status.Untranslated")),ar=`${r("Manager.Plugins.Labels.Mtime")}: ${JM(Wr)}`):ke&&!je?(Nt="bg-destructive",It=r("Manager.Common.Errors.Error"),ar=r("Manager.Common.Errors.ErrorDesc")):be||(Nt="bg-muted-foreground",It=r("Manager.Plugins.Status.ToExtract")),H[K.id]={statusColor:Nt,statusText:It,statusDesc:ar,isLangDoc:be,langDoc:q,pluginDir:he,sources:xt,activeSourceId:Ce,translationFormatMark:je,mainDoc:Ne,manifestDoc:Ie,isApplied:!!(He&&He.isApplied),isTranslated:ot,translationVersion:pe,supportedVersion:We,cloudEntries:E.filter(ct=>ct.plugin===K.id&&ct.type==="plugin")}}return H},[m,e,y,N,r,D,E]),Z=(0,mn.useMemo)(()=>{let H=[...m];return i&&(H=H.filter(I=>I.name.toLowerCase().includes(i.toLowerCase()))),f!=="all"&&(H=H.filter(I=>{let K=W[I.id];if(!K)return!1;switch(f){case"applied":return K.isApplied;case"unapplied":return K.isTranslated&&!K.isApplied;case"translated":return K.isTranslated;case"untranslated":return K.isLangDoc&&!K.isTranslated;case"toExtract":return!K.isLangDoc;default:return!0}})),o==="0"?H.sort((I,K)=>I.name.localeCompare(K.name)):o==="1"&&H.sort((I,K)=>K.name.localeCompare(I.name)),H},[m,i,o,f,W]),me=H=>{let I=H.target.value;s(I),a.searchText=I,e.saveSettings()},Q=H=>{l(H),a.sort=H,e.saveSettings()},V=(0,mn.useRef)(null),[U,k]=(0,mn.useState)(0);(0,mn.useEffect)(()=>{if(!V.current)return;let H=new ResizeObserver(I=>{for(let K of I)k(K.contentRect.width)});return H.observe(V.current),()=>H.disconnect()},[]);let L=(0,mn.useMemo)(()=>{if(c==="list")return 1;let H=Math.floor((U+16)/(320+16));return Math.max(1,H)},[c,U]),M=Math.ceil(Z.length/L),ee=xs({count:M,getScrollElement:()=>V.current,estimateSize:(0,mn.useCallback)(()=>c==="list"?44+4:200+12,[c]),getItemKey:(0,mn.useCallback)(H=>`${c}-${H}`,[c]),overscan:5}),se=ee.getVirtualItems(),ne=(0,mn.useCallback)(async H=>{try{return n.plugins.enabledPlugins.has(H)?(await n.plugins.disablePlugin(H),await n.plugins.enablePlugin(H),new Uv.Notice(r("Manager.Plugins.Notices.ReloadPlugin",{id:H})),!0):!1}catch(I){return new Uv.Notice(r("Manager.Plugins.Errors.ReloadPluginFailed",{error:I})),!1}},[n,r]),ge=(0,mn.useCallback)(()=>{b(H=>H+1)},[]),ue=(0,mn.useCallback)(async()=>{w(!0);try{let H=e.manifest.id;n.plugins.enabledPlugins.has(H)?(await n.plugins.disablePlugin(H),await n.plugins.enablePlugin(H),new Uv.Notice(r("Manager.Plugins.Notices.ReloadSuccess"))):(new Uv.Notice(r("Manager.Plugins.Errors.PluginNotEnabled")),w(!1))}catch(H){new Uv.Notice(r("Manager.Plugins.Errors.ReloadFailed",{error:H})),w(!1)}},[n,e.manifest.id,r]);return(0,Sn.jsxs)("div",{className:"flex flex-col h-full bg-background text-foreground overflow-hidden",children:[(0,Sn.jsx)("div",{className:"flex flex-col gap-4 py-2 px-4 border-b shrink-0",children:(0,Sn.jsxs)("div",{className:"flex gap-2",children:[(0,Sn.jsxs)("div",{className:"relative flex-1",children:[(0,Sn.jsx)(fn,{className:"absolute left-2.5 top-2.5 h-4 w-4 text-muted-foreground/70"}),(0,Sn.jsx)(nt,{placeholder:r("Manager.Plugins.Placeholders.SearchPlugins"),value:i,onChange:me,className:"pl-8 h-9 rounded-none border-muted-foreground/20 focus:ring-1 text-[13px] bg-muted/10 shadow-sm transition-colors hover:bg-muted/20"})]}),(0,Sn.jsxs)("div",{className:"flex items-center gap-1 border border-muted-foreground/20 rounded-none p-0.5 h-9 bg-muted/20 shadow-sm",children:[(0,Sn.jsx)(we,{variant:c==="list"?"secondary":"ghost",size:"icon",className:"h-8 w-8 rounded-none transition-all",onClick:()=>d("list"),children:(0,Sn.jsx)(Lh,{className:"h-4 w-4 text-muted-foreground/80"})}),(0,Sn.jsx)(we,{variant:c==="grid"?"secondary":"ghost",size:"icon",className:"h-8 w-8 rounded-none transition-all",onClick:()=>d("grid"),children:(0,Sn.jsx)(xo,{className:"h-4 w-4 text-muted-foreground/80"})})]}),(0,Sn.jsxs)(mr,{value:f,onValueChange:H=>p(H),children:[(0,Sn.jsx)(gr,{className:"w-[120px] h-9 rounded-none border-muted-foreground/20 shadow-sm text-[13px]",size:"default",children:(0,Sn.jsx)(hr,{placeholder:r("Manager.Common.Filters.All")})}),(0,Sn.jsx)(yr,{children:O.map(H=>(0,Sn.jsx)(Ot,{value:H.key,children:H.label},H.key))})]}),(0,Sn.jsxs)(mr,{value:o,onValueChange:Q,children:[(0,Sn.jsx)(gr,{className:"w-[130px] h-9 rounded-none border-muted-foreground/20 shadow-sm text-[13px]",size:"default",children:(0,Sn.jsx)(hr,{placeholder:r("Common.Data.SortAsc")})}),(0,Sn.jsx)(yr,{children:_.map(H=>(0,Sn.jsx)(Ot,{value:H.key,children:H.label},H.key))})]})]})}),(0,Sn.jsx)(dr,{className:"flex-1 min-h-0",viewportRef:V,children:(0,Sn.jsx)("div",{className:"py-2 px-4",children:(0,Sn.jsxs)("div",{className:le("gap-2 w-full overflow-hidden relative",c==="grid"?"grid grid-cols-[repeat(auto-fill,minmax(300px,1fr))]":"flex flex-col"),style:{height:`${ee.getTotalSize()}px`},children:[se.map(H=>{let I=H.index*L,K=Z.slice(I,I+L);return(0,Sn.jsx)("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:`${H.size}px`,transform:`translateY(${H.start}px)`,display:"grid",gridTemplateColumns:`repeat(${L}, 1fr)`,gap:c==="list"?"0px":"12px",paddingBottom:c==="list"?"4px":"12px"},children:K.map(he=>(0,Sn.jsx)(dme,{plugin:he,i18n:e,settings:a,isEnabled:x.has(he.id),data:W[he.id],reloadPlugin:ne,refreshParent:ge,close:t,viewMode:c},he.id))},H.key)}),Z.length===0&&(0,Sn.jsx)("div",{className:"text-center text-muted-foreground py-8 col-span-full",children:r("Manager.Plugins.Status.NoPlugins")})]})})})]})};var Rn=A(Le()),Yg=A(require("path")),km=A(ii());tr();Kt();$t();var Nm=A(Le()),pme=A(require("path")),Xg=A(ii());tr();Kt();$t();$t();var Ae=A(oe()),mme=Nm.default.memo(({theme:e,i18n:t,data:r,refreshParent:n,viewMode:a})=>{let{t:i}=Ve(),[s,o]=(0,Nm.useState)(!1),[l,c]=(0,Nm.useState)(!1),[u,d]=(0,Nm.useState)(!1),[f,p]=(0,Nm.useState)(!1),{statusColor:m,statusText:h,statusDesc:x,hasTranslation:g,translationPath:y,themeDir:b,themeCssPath:S,sources:w,activeSourceId:E,isApplied:C,isTranslated:N,translationVersion:_,description:O,supportedVersion:D,cloudEntries:W}=r,Z=t.sourceManager,[me,Q]=(0,Nm.useState)(null),V=async M=>{if(!me){Q(M.id);try{let ee=t.settings.defaultCloudRepo;if(!ee){t.notice.error(i("Cloud.Errors.FetchFail")||"No default cloud repo set");return}let se=ee.split("/");if(se.length!==2)return;let[ne,ge]=se,ue=await t.api.github.getFileContentWithFallback(ne,ge,`themes/${M.id}.json`);if(!ue.state||!ue.data)throw new Error(ue.isRateLimit?"Rate limit exceeded":ue.data?.message||"Download failed");let H=typeof ue.data=="string"?JSON.parse(ue.data):ue.data,{calculateChecksum:I}=await Promise.resolve().then(()=>($t(),kT)),K=Z?.getAllSources().find(he=>he.id===M.id);if(K)Z?.saveSourceFile(K.id,H),Z?.saveSource({...K,origin:"cloud",title:M.title||K.title,checksum:I(H),cloud:{owner:ne,repo:ge,hash:M.hash},updatedAt:Date.now()}),t.notice.successPrefix("Cloud",i("Cloud.Notices.UpdateSuccess")||"Update success");else{Z?.saveSourceFile(M.id,H);let he=!Z?.getActiveSourceId(e.name);Z?.saveSource({id:M.id,plugin:M.plugin,title:M.title||"Unknown",type:M.type,origin:"cloud",isActive:he,checksum:I(H),cloud:{owner:ne,repo:ge,hash:M.hash},updatedAt:Date.now(),createdAt:Date.now()}),t.notice.successPrefix("Cloud",i("Cloud.Notices.DownloadSuccess")||"Download success")}n()}catch(ee){t.notice.error(`Failed to download: ${ee}`)}finally{Q(null)}}},U=async()=>{o(!0);try{if(!Xg.existsSync(S)){t.notice.error(i("Manager.Themes.Errors.ThemeCssNotFound"));return}let M=Xg.readFileSync(S).toString(),ee=pme.join(b,"manifest.json"),se={name:e.name,version:"0.0.0",minAppVersion:"",author:"",authorUrl:""};if(Xg.existsSync(ee))try{se=Xg.readJsonSync(ee)}catch{}let{generateTheme:ne}=await Promise.resolve().then(()=>($t(),kT)),ge=ne(se,M,t.settings);if(ge.dict.length===0){t.notice.error(i("Manager.Themes.Errors.NoSettingsBlock"));return}t.sourceManager&&(await t.sourceManager.extractAndSaveSource(e.name,ge,{title:e.name,type:"theme"}),t.notice.successPrefix(i("Manager.Themes.Notices.ThemeExtractPrefix"),i("Manager.Plugins.Hints.ExtractSuccessDesc"))),n()}catch(M){t.notice.result(!1,`${M}`)}finally{o(!1)}},k=async()=>{if(!l){if(!C&&!N){p(!0);return}c(!0);try{await t.injectorManager.applyToTheme(e.name)?(t.notice.result(!0),n()):t.notice.result(!1,i("Manager.Common.Errors.ErrorDesc"))}catch(M){t.notice.result(!1,String(M))}finally{c(!1)}}},L=async()=>{if(!u){d(!0);try{await t.backupManager.restoreBackup(e.name,b)?(t.stateManager.deleteThemeState(e.name),t.notice.result(!0)):t.notice.result(!1,i("Manager.Themes.Errors.BackupNotFound")),n()}catch(M){t.notice.result(!1,String(M))}finally{d(!1)}}};return a==="grid"?(0,Ae.jsxs)("div",{className:"group relative flex flex-col h-[200px] border rounded-none bg-card/85 text-card-foreground shadow-xs hover:shadow-lg hover:bg-muted/30 transition-all duration-300 overflow-hidden border-border/60 backdrop-blur-md",children:[(0,Ae.jsx)("div",{className:le("absolute left-0 top-0 bottom-0 w-[4px] transition-colors duration-300 z-10 bg-opacity-100",m)}),(0,Ae.jsxs)("div",{className:"p-4 flex flex-col h-full relative z-0",children:[(0,Ae.jsxs)("div",{className:"flex justify-between items-start mb-3 gap-2",children:[(0,Ae.jsxs)("div",{className:"flex flex-col overflow-hidden min-w-0",children:[(0,Ae.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,Ae.jsx)("span",{className:"font-bold truncate text-[14px] leading-tight text-foreground/90 group-hover:text-primary transition-colors duration-300 whitespace-nowrap",title:e.name,children:e.name}),e.isActive&&(0,Ae.jsx)(vt,{variant:"secondary",className:"px-1.5 py-0 h-4 text-[8px] font-extrabold uppercase tracking-tighter rounded-none bg-primary/10 text-primary border-none shadow-xs shrink-0",children:i("Manager.Themes.Labels.ThemeActive")})]}),(0,Ae.jsxs)("div",{className:"flex items-center gap-2 mt-1",children:[(0,Ae.jsx)("span",{className:"text-[10px] text-muted-foreground/60 font-semibold tracking-tight bg-muted/30 px-1.5 py-0.5 rounded-none",children:e.manifest?`v${e.manifest.version}`:"v0.0.0"}),_&&(0,Ae.jsxs)("span",{className:"text-[10px] text-primary/80 font-bold bg-primary/5 border border-primary/10 px-1.5 py-0.5 rounded-none",children:["v",_]})]})]}),(0,Ae.jsxs)("div",{className:le("px-2 py-0.5 text-[9px] uppercase tracking-widest font-extrabold rounded-none bg-background border border-border shadow-xs flex items-center gap-1.5",m.replace(/bg-/g,"text-")),children:[(0,Ae.jsx)("span",{className:le("w-1.5 h-1.5 rounded-full shadow-sm animate-pulse-slow",m)}),h]})]}),(0,Ae.jsxs)("div",{className:"flex-1 text-[11px] text-muted-foreground overflow-hidden leading-relaxed break-words font-medium relative line-clamp-2",children:[O||(e.manifest?.author?`${i("Manager.Common.Labels.Author")}: ${e.manifest.author}`:i("Common.Status.Unknown")),(0,Ae.jsx)("div",{className:"absolute inset-x-0 bottom-0 h-4 bg-gradient-to-t from-card to-transparent pointer-events-none opacity-50"})]}),(0,Ae.jsx)("div",{className:"flex flex-col gap-3 mt-auto pt-3 border-t border-border/50",children:(0,Ae.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[w.length>0?(0,Ae.jsxs)(mr,{value:E??void 0,onValueChange:M=>{Z?.setActive(M,!0),n()},children:[(0,Ae.jsx)(gr,{className:"w-[110px] text-[10px] px-2 h-7 bg-muted/40 border-none shadow-none hover:bg-muted/60 transition-all rounded-none",size:"sm",children:(0,Ae.jsx)(hr,{placeholder:i("Manager.Common.Filters.All")})}),(0,Ae.jsx)(yr,{className:"backdrop-blur-md bg-background/95 border-border/40",children:w.map(M=>(0,Ae.jsx)(Ot,{value:M.id,className:"text-[11px]",children:M.title},M.id))})]}):(0,Ae.jsx)("div",{}),(0,Ae.jsxs)("div",{className:"flex gap-2",children:[g&&!C&&(0,Ae.jsx)(ti,{children:(0,Ae.jsxs)(oa,{children:[(0,Ae.jsx)(la,{asChild:!0,children:(0,Ae.jsxs)(we,{variant:"default",size:"sm",className:"h-7 px-3 text-[10px] font-bold shadow-sm hover:shadow-md hover:bg-primary/90 transition-all active:scale-95 rounded-none",onClick:k,disabled:l,children:[l&&(0,Ae.jsx)(Gt,{className:"w-2.5 h-2.5 animate-spin mr-1"}),i("Manager.Common.Actions.Apply")]})}),(0,Ae.jsx)(ca,{side:"top",className:"text-[10px]",children:i("Manager.Themes.Notices.ThemeApplyPrefix")})]})}),C&&(0,Ae.jsx)(ti,{children:(0,Ae.jsxs)(oa,{children:[(0,Ae.jsx)(la,{asChild:!0,children:(0,Ae.jsxs)(we,{variant:"outline",size:"sm",className:"h-7 px-3 text-[10px] font-bold border-border/50 hover:bg-secondary/20 transition-all active:scale-95 rounded-none",onClick:L,disabled:u,children:[u&&(0,Ae.jsx)(Gt,{className:"w-2.5 h-2.5 animate-spin mr-1"}),i("Manager.Common.Actions.Restore")]})}),(0,Ae.jsx)(ca,{side:"top",className:"text-[10px]",children:i("Manager.Themes.Notices.ThemeRestorePrefix")})]})}),W&&W.length>0&&(0,Ae.jsxs)(ri,{children:[(0,Ae.jsx)(ni,{asChild:!0,children:(0,Ae.jsx)(we,{variant:"ghost",size:"icon",className:"h-7 w-7 rounded-none hover:bg-muted/50 transition-all",children:me?(0,Ae.jsx)(Gt,{className:"w-4 h-4 animate-spin text-primary"}):(0,Ae.jsx)(Ul,{className:"w-4 h-4 text-primary/80"})})}),(0,Ae.jsx)(ai,{align:"end",className:"w-56 shadow-2xl backdrop-blur-md bg-background/95 border-border/40",children:W.map(M=>{let ee=w.some(ne=>ne.id===M.id),se=w.some(ne=>ne.id===M.id&&ne.cloud?.hash!==M.hash);return(0,Ae.jsxs)(an,{onClick:()=>V(M),className:"text-[11px] py-1.5 flex items-center justify-between",children:[(0,Ae.jsxs)("div",{className:"flex items-center truncate",children:[(0,Ae.jsx)(Bn,{className:"w-3.5 h-3.5 mr-2 text-primary/60"}),(0,Ae.jsxs)("span",{className:"truncate",title:M.title,children:[M.title," ",(0,Ae.jsxs)("span",{className:"text-muted-foreground/60",children:["v",M.version]})]})]}),ee&&!se?(0,Ae.jsx)(vt,{variant:"outline",className:"text-[8px] h-4 px-1 ml-2 bg-green-500/10 text-green-600 border-none shrink-0",children:"\u5DF2\u4E0B\u8F7D"}):se?(0,Ae.jsx)(vt,{variant:"outline",className:"text-[8px] h-4 px-1 ml-2 bg-amber-500/10 text-amber-600 border-none shrink-0 animate-pulse",children:"\u6709\u66F4\u65B0"}):null]},M.id)})})]}),(0,Ae.jsxs)(ri,{children:[(0,Ae.jsx)(ni,{asChild:!0,children:(0,Ae.jsx)(we,{variant:"ghost",size:"icon",className:"h-7 w-7 rounded-none hover:bg-muted/50 transition-all",children:(0,Ae.jsx)(go,{className:"w-4 h-4 text-muted-foreground"})})}),(0,Ae.jsxs)(ai,{align:"end",className:"w-48 shadow-2xl backdrop-blur-md bg-background/95 border-border/40",children:[g&&(0,Ae.jsxs)(an,{onClick:()=>{let M=si(y);M&&(Ue.getState().setEditorTheme(M,e.name,b,y),t.view.activateView(Fv))},className:"text-[12px] py-2",children:[(0,Ae.jsx)(vo,{className:"w-3.5 h-3.5 mr-2.5 text-primary/70"}),(0,Ae.jsx)("span",{children:i("Manager.Common.Actions.Edit")})]}),(0,Ae.jsxs)(an,{onClick:U,disabled:s,className:"text-[12px] py-2",children:[(0,Ae.jsx)(Cc,{className:"w-3.5 h-3.5 mr-2.5 text-blue-500/70"}),(0,Ae.jsx)("span",{children:i("Manager.Themes.Notices.ThemeExtractPrefix")})]}),E&&(0,Ae.jsxs)(an,{onClick:()=>{Z?.removeSource(E),n()},className:"text-[12px] py-2 text-destructive focus:text-destructive focus:bg-destructive/5",children:[(0,Ae.jsx)(zl,{className:"w-3.5 h-3.5 mr-2.5 opacity-70"}),(0,Ae.jsx)("span",{children:i("Manager.Common.Actions.Delete")})]}),(0,Ae.jsx)(tc,{className:"bg-border/40"}),(0,Ae.jsxs)(an,{onClick:()=>au(t,b),className:"text-[12px] py-2",children:[(0,Ae.jsx)(yi,{className:"w-3.5 h-3.5 mr-2.5 text-amber-500/70"}),(0,Ae.jsx)("span",{children:i("Manager.Common.Actions.OpenFolder")})]})]})]})]})]})})]})]}):(0,Ae.jsxs)("div",{className:"group relative border rounded-none bg-card/75 text-card-foreground shadow-xs hover:shadow-md hover:bg-muted/20 transition-all duration-300 px-4 py-1.5 w-full border-border/50 overflow-hidden backdrop-blur-md",children:[(0,Ae.jsx)("div",{className:le("absolute left-0 top-0 bottom-0 w-[3px] transition-colors duration-300 z-10 bg-opacity-100",m)}),(0,Ae.jsxs)("div",{className:"flex items-center gap-5 overflow-hidden min-w-0 relative z-0",children:[(0,Ae.jsxs)("div",{className:le("px-2.5 py-0.5 text-[9px] uppercase tracking-[0.1em] font-extrabold rounded-none bg-background border border-border shadow-xs flex items-center gap-1.5",m.replace(/bg-/g,"text-")),children:[(0,Ae.jsx)("span",{className:le("w-1.5 h-1.5 rounded-full shadow-sm",m)}),h]}),(0,Ae.jsxs)("div",{className:"flex items-center gap-2.5 min-w-0 flex-1",children:[(0,Ae.jsx)("span",{className:"font-bold truncate text-[13.5px] text-foreground/90 group-hover:text-primary transition-colors duration-300 shrink-0 max-w-[40%]",children:e.name}),(0,Ae.jsx)("span",{className:"text-[10px] text-muted-foreground/50 shrink-0 font-bold bg-muted/20 px-1.5 py-0.5 rounded-none",children:e.manifest?`v${e.manifest.version}`:"v0.0.0"}),e.isActive&&(0,Ae.jsx)(vt,{variant:"secondary",className:"px-1.5 py-0 h-4 text-[8px] font-extrabold uppercase tracking-tighter rounded-none bg-primary/10 text-primary border-none shadow-xs shrink-0",children:i("Manager.Themes.Labels.ThemeActive")}),_&&(0,Ae.jsxs)("span",{className:"text-[10px] text-primary/80 font-bold bg-primary/5 border border-primary/10 px-1.5 py-0.5 rounded-none shrink-0",children:["v",_]})]}),(0,Ae.jsxs)("div",{className:"flex items-center gap-2.5 ml-auto shrink-0 pl-2",children:[w.length>0&&(0,Ae.jsxs)(mr,{value:E??void 0,onValueChange:M=>{Z?.setActive(M,!0),n()},children:[(0,Ae.jsx)(gr,{className:"w-[125px] h-8 text-[11px] bg-muted/40 border-none shadow-none hover:bg-muted/60 transition-all rounded-none",size:"sm",children:(0,Ae.jsx)(hr,{placeholder:i("Manager.Common.Filters.All")})}),(0,Ae.jsx)(yr,{className:"backdrop-blur-md bg-background/95 border-border/40",children:w.map(M=>(0,Ae.jsx)(Ot,{value:M.id,className:"text-[11px]",children:M.title},M.id))})]}),(0,Ae.jsxs)("div",{className:"flex items-center gap-1.5",children:[g&&(0,Ae.jsx)(ti,{children:(0,Ae.jsxs)(oa,{children:[(0,Ae.jsx)(la,{asChild:!0,children:(0,Ae.jsx)(we,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-none hover:bg-primary/10 hover:text-primary transition-all",onClick:()=>{let M=si(y);M&&(Ue.getState().setEditorTheme(M,e.name,b,y),t.view.activateView(Fv))},children:(0,Ae.jsx)(vo,{className:"w-3.5 h-3.5"})})}),(0,Ae.jsx)(ca,{className:"text-[10px]",children:i("Manager.Common.Actions.Edit")})]})}),g&&!C&&(0,Ae.jsx)(ti,{children:(0,Ae.jsxs)(oa,{children:[(0,Ae.jsx)(la,{asChild:!0,children:(0,Ae.jsxs)(we,{variant:"default",size:"sm",className:"h-8 px-4 text-[11px] font-bold shadow-sm hover:shadow-md hover:translate-y-[-1px] active:scale-95 transition-all rounded-none",onClick:k,disabled:l,children:[l&&(0,Ae.jsx)(Gt,{className:"w-3 h-3 animate-spin mr-1.5"}),i("Manager.Common.Actions.Apply")]})}),(0,Ae.jsx)(ca,{className:"text-[10px]",children:i("Manager.Themes.Notices.ThemeApplyPrefix")})]})}),C&&(0,Ae.jsx)(ti,{children:(0,Ae.jsxs)(oa,{children:[(0,Ae.jsx)(la,{asChild:!0,children:(0,Ae.jsxs)(we,{variant:"outline",size:"sm",className:"h-8 px-4 text-[11px] font-bold border-border/50 hover:bg-secondary/20 transition-all active:scale-95 rounded-none",onClick:L,disabled:u,children:[u&&(0,Ae.jsx)(Gt,{className:"w-3 h-3 animate-spin mr-1.5"}),i("Manager.Common.Actions.Restore")]})}),(0,Ae.jsx)(ca,{className:"text-[10px]",children:i("Manager.Themes.Notices.ThemeRestorePrefix")})]})}),W&&W.length>0&&(0,Ae.jsxs)(ri,{children:[(0,Ae.jsx)(ni,{asChild:!0,children:(0,Ae.jsx)(we,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-none hover:bg-primary/10 hover:text-primary transition-all",children:me?(0,Ae.jsx)(Gt,{className:"w-4 h-4 animate-spin"}):(0,Ae.jsx)(Ul,{className:"w-4 h-4"})})}),(0,Ae.jsx)(ai,{align:"end",className:"w-56 shadow-2xl backdrop-blur-md bg-background/95 border-border/40",children:W.map(M=>{let ee=w.some(ne=>ne.id===M.id),se=w.some(ne=>ne.id===M.id&&ne.cloud?.hash!==M.hash);return(0,Ae.jsxs)(an,{onClick:()=>V(M),className:"text-[12px] py-2 flex items-center justify-between",children:[(0,Ae.jsxs)("div",{className:"flex items-center truncate",children:[(0,Ae.jsx)(Bn,{className:"w-4 h-4 mr-2.5 text-primary/60"}),(0,Ae.jsxs)("span",{className:"truncate",title:M.title,children:[M.title," ",(0,Ae.jsxs)("span",{className:"text-muted-foreground/50 ml-1",children:["v",M.version]})]})]}),ee&&!se?(0,Ae.jsx)(vt,{variant:"outline",className:"text-[9px] h-5 px-1.5 ml-2 bg-green-500/10 text-green-600 border-none shrink-0",children:"\u5DF2\u4E0B\u8F7D"}):se?(0,Ae.jsx)(vt,{variant:"outline",className:"text-[9px] h-5 px-1.5 ml-2 bg-amber-500/10 text-amber-600 border-none shrink-0 animate-pulse",children:"\u6709\u66F4\u65B0"}):null]},M.id)})})]}),(0,Ae.jsxs)(ri,{children:[(0,Ae.jsx)(ni,{asChild:!0,children:(0,Ae.jsx)(we,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-none hover:bg-muted/50 transition-all",children:(0,Ae.jsx)(go,{className:"w-4 h-4 text-muted-foreground"})})}),(0,Ae.jsxs)(ai,{align:"end",className:"w-48 shadow-2xl backdrop-blur-md bg-background/95 border-border/40",children:[(0,Ae.jsxs)(an,{onClick:U,disabled:s,className:"text-[12px] py-2",children:[(0,Ae.jsx)(Cc,{className:"w-3.5 h-3.5 mr-2.5 text-blue-500/70"}),(0,Ae.jsx)("span",{children:i("Manager.Themes.Notices.ThemeExtractPrefix")})]}),E&&(0,Ae.jsxs)(an,{onClick:()=>{Z?.removeSource(E),n()},className:"text-[12px] py-2 text-destructive focus:text-destructive focus:bg-destructive/5",children:[(0,Ae.jsx)(zl,{className:"w-3.5 h-3.5 mr-2.5 opacity-70"}),(0,Ae.jsx)("span",{children:i("Manager.Common.Actions.Delete")})]}),(0,Ae.jsx)(tc,{className:"bg-border/40"}),(0,Ae.jsxs)(an,{onClick:()=>au(t,b),className:"text-[12px] py-2",children:[(0,Ae.jsx)(yi,{className:"w-3.5 h-3.5 mr-2.5 text-amber-500/70"}),(0,Ae.jsx)("span",{children:i("Manager.Common.Actions.OpenFolder")})]})]})]}),(0,Ae.jsx)(Kd,{open:f,onOpenChange:p,children:(0,Ae.jsxs)(Wd,{className:"sm:max-w-[425px] rounded-none border-border/60",children:[(0,Ae.jsxs)(Xd,{children:[(0,Ae.jsxs)(Yd,{className:"flex items-center gap-2 text-amber-500",children:[(0,Ae.jsx)("span",{className:"text-xl",children:"\u26A0\uFE0F"}),i("Manager.Themes.Dialogs.EmptyTranslationTitle")]}),(0,Ae.jsx)(bb,{className:"pt-4 leading-relaxed text-foreground/80",children:i("Manager.Themes.Dialogs.EmptyTranslationDesc")})]}),(0,Ae.jsx)(dg,{className:"mt-6 flex justify-center",children:(0,Ae.jsx)(we,{variant:"secondary",onClick:()=>p(!1),className:"w-full rounded-none h-10 bg-amber-500/10 hover:bg-amber-500/20 text-amber-600 dark:text-amber-400 border-amber-500/20",children:i("Common.Actions.Confirm")})})]})})]})]})]})]})});var Tn=A(oe()),hme=({i18n:e})=>{let{t}=Ve(),r=e.app,[n,a]=(0,Rn.useState)(""),[i,s]=(0,Rn.useState)("0"),[o,l]=(0,Rn.useState)(e.settings.themeViewMode||"list"),c=(0,Rn.useCallback)(V=>{l(V),e.settings.themeViewMode=V,e.saveSettings()},[e]),[u,d]=(0,Rn.useState)([]),[f,p]=(0,Rn.useState)(0),[m,h]=(0,Rn.useState)("all"),[x,g]=(0,Rn.useState)([]);(0,Rn.useEffect)(()=>{let V=e.settings.defaultCloudRepo;if(!V){g([]);return}let U=V.split("/");if(U.length!==2)return;let[k,L]=U,M=!0;return e.api.github.getFileContentWithFallback(k,L,"metadata.json").then(ee=>{M&&ee.state&&Array.isArray(ee.data)&&g(ee.data)}).catch(ee=>{}),()=>{M=!1}},[e.settings.defaultCloudRepo,e]);let y=Ue(V=>V.sourceUpdateTick),b=(0,Rn.useMemo)(()=>[{key:"0",label:t("Common.Data.SortAsc")},{key:"1",label:t("Common.Data.SortDesc")}],[t]),S=(0,Rn.useMemo)(()=>[{key:"all",label:t("Manager.Common.Filters.All")},{key:"toExtract",label:t("Manager.Themes.Filters.ToExtract")},{key:"untranslated",label:t("Manager.Themes.Filters.Untranslated")},{key:"translated",label:t("Manager.Themes.Filters.Translated")},{key:"unapplied",label:t("Manager.Themes.Filters.Unapplied")},{key:"applied",label:t("Manager.Themes.Filters.Applied")}],[t]);(0,Rn.useEffect)(()=>{(()=>{try{let U=Yg.normalize(r.vault.adapter.getBasePath()),k=Yg.join(U,".obsidian","themes");if(!km.existsSync(k)){d([]);return}let L=km.readdirSync(k,{withFileTypes:!0}),M=[],ee=r.customCss?.theme||"";for(let se of L){if(!se.isDirectory())continue;let ne=Yg.join(k,se.name),ge=Yg.join(ne,"manifest.json"),ue=null;if(km.existsSync(ge))try{ue=km.readJsonSync(ge)}catch{}M.push({name:se.name,manifest:ue,dir:ne,isActive:se.name===ee})}d(M)}catch{d([])}})()},[r,f]);let w=(0,Rn.useCallback)(V=>V.dict?V.dict.some(U=>U.target&&U.target!==U.source):!1,[]),E=(0,Rn.useMemo)(()=>{let V={};for(let U of u){let k=U.dir,L=Yg.join(k,"theme.css"),M=e.sourceManager,ee=M?.getSourcesForPlugin(U.name)||[],se=M?.getActiveSourceId(U.name),ne=se?M?.getSourceFilePath(se):"",ge=ne?km.existsSync(ne):!1,ue=e.stateManager.getThemeState(U.name),H=!1,I="",K="",he="";if(ge&&ne)try{let He=si(ne);H=w(He),I=He.metadata.version,K=He.metadata.supportedVersions,he=He.metadata.description}catch{}let q="bg-muted-foreground",be=t("Manager.Themes.Status.ToExtract"),Ie=t("Manager.Plugins.Hints.NoTransDesc"),Ne=!!(ue&&ue.isApplied);Ne?(q="bg-green-500 dark:bg-green-600",be=t("Manager.Themes.Status.Applied")):H?(q="bg-blue-500 dark:bg-blue-600",be=t("Manager.Themes.Status.Unapplied")):ge?(q="bg-amber-500 dark:bg-amber-600",be=t("Manager.Themes.Status.Untranslated")):(q="bg-muted-foreground",be=t("Manager.Themes.Status.ToExtract")),Ie=U.manifest?`v${U.manifest.version}`:"",V[U.name]={statusColor:q,statusText:be,statusDesc:Ie,hasTranslation:ge,translationPath:ne||"",themeDir:k,themeCssPath:L,sources:ee,activeSourceId:se,isApplied:Ne,isTranslated:H,translationVersion:I,description:he,supportedVersion:K,cloudEntries:x.filter(He=>He.plugin===U.name&&He.type==="theme")}}return V},[u,e,f,y,t,w,x]),C=(0,Rn.useMemo)(()=>{let V=[...u];return n&&(V=V.filter(U=>U.name.toLowerCase().includes(n.toLowerCase()))),m!=="all"&&(V=V.filter(U=>{let k=E[U.name];if(!k)return!1;switch(m){case"applied":return k.isApplied;case"unapplied":return k.isTranslated&&!k.isApplied;case"translated":return k.isTranslated;case"untranslated":return k.hasTranslation&&!k.isTranslated;case"toExtract":return!k.hasTranslation;default:return!0}})),i==="0"?V.sort((U,k)=>U.name.localeCompare(k.name)):i==="1"&&V.sort((U,k)=>k.name.localeCompare(U.name)),V},[u,n,i,m,E]),N=(0,Rn.useCallback)(()=>{p(V=>V+1)},[]),_=(0,Rn.useRef)(null),[O,D]=(0,Rn.useState)(0);(0,Rn.useEffect)(()=>{if(!_.current)return;let V=new ResizeObserver(U=>{for(let k of U)D(k.contentRect.width)});return V.observe(_.current),()=>V.disconnect()},[]);let W=(0,Rn.useMemo)(()=>{if(o==="list")return 1;let V=Math.floor((O+16)/(320+16));return Math.max(1,V)},[o,O]),Z=Math.ceil(C.length/W),me=xs({count:Z,getScrollElement:()=>_.current,estimateSize:(0,Rn.useCallback)(()=>o==="list"?44+4:200+12,[o]),getItemKey:(0,Rn.useCallback)(V=>`${o}-${V}`,[o]),overscan:5}),Q=me.getVirtualItems();return(0,Tn.jsxs)("div",{className:"flex flex-col h-full bg-background text-foreground overflow-hidden",children:[(0,Tn.jsx)("div",{className:"flex flex-col gap-4 py-2 px-4 border-b shrink-0",children:(0,Tn.jsxs)("div",{className:"flex gap-2",children:[(0,Tn.jsxs)("div",{className:"relative flex-1",children:[(0,Tn.jsx)(fn,{className:"absolute left-2.5 top-2.5 h-4 w-4 text-muted-foreground/70"}),(0,Tn.jsx)(nt,{placeholder:t("Manager.Themes.Placeholders.SearchThemes"),value:n,onChange:V=>a(V.target.value),className:"pl-8 h-9 rounded-none border-muted-foreground/20 focus:ring-1 text-[13px] bg-muted/10 shadow-sm transition-colors hover:bg-muted/20"})]}),(0,Tn.jsxs)("div",{className:"flex items-center gap-1 border border-muted-foreground/20 rounded-none p-0.5 h-9 bg-muted/20 shadow-sm",children:[(0,Tn.jsx)(we,{variant:o==="list"?"secondary":"ghost",size:"icon",className:"h-8 w-8 rounded-none transition-all",onClick:()=>c("list"),children:(0,Tn.jsx)(Lh,{className:"h-4 w-4 text-muted-foreground/80"})}),(0,Tn.jsx)(we,{variant:o==="grid"?"secondary":"ghost",size:"icon",className:"h-8 w-8 rounded-none transition-all",onClick:()=>c("grid"),children:(0,Tn.jsx)(xo,{className:"h-4 w-4 text-muted-foreground/80"})})]}),(0,Tn.jsxs)(mr,{value:m,onValueChange:V=>h(V),children:[(0,Tn.jsx)(gr,{className:"w-[120px] h-9 rounded-none border-muted-foreground/20 shadow-sm text-[13px]",size:"default",children:(0,Tn.jsx)(hr,{placeholder:t("Manager.Common.Filters.All")})}),(0,Tn.jsx)(yr,{children:S.map(V=>(0,Tn.jsx)(Ot,{value:V.key,children:V.label},V.key))})]}),(0,Tn.jsxs)(mr,{value:i,onValueChange:s,children:[(0,Tn.jsx)(gr,{className:"w-[130px] h-9 rounded-none border-muted-foreground/20 shadow-sm text-[13px]",size:"default",children:(0,Tn.jsx)(hr,{placeholder:t("Common.Data.SortAsc")})}),(0,Tn.jsx)(yr,{children:b.map(V=>(0,Tn.jsx)(Ot,{value:V.key,children:V.label},V.key))})]})]})}),(0,Tn.jsx)(dr,{className:"flex-1 min-h-0",viewportRef:_,children:(0,Tn.jsx)("div",{className:"py-2 px-4",children:(0,Tn.jsxs)("div",{className:le("gap-2 w-full overflow-hidden relative",o==="grid"?"grid grid-cols-[repeat(auto-fill,minmax(300px,1fr))]":"flex flex-col"),style:{height:`${me.getTotalSize()}px`},children:[Q.map(V=>{let U=V.index*W,k=C.slice(U,U+W);return(0,Tn.jsx)("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:`${V.size}px`,transform:`translateY(${V.start}px)`,display:"grid",gridTemplateColumns:`repeat(${W}, 1fr)`,gap:o==="list"?"0px":"12px",paddingBottom:o==="list"?"4px":"12px"},children:k.map(L=>(0,Tn.jsx)(mme,{theme:L,i18n:e,data:E[L.name],refreshParent:N,viewMode:o},L.name))},V.key)}),C.length===0&&(0,Tn.jsx)("div",{className:"text-center text-muted-foreground py-8 col-span-full",children:t("Manager.Themes.Status.NoThemes")})]})})})]})};var cU=A(Le());tr();Wy();var Jg=iu((e,t)=>({status:"idle",progress:{current:0,total:0},tasks:[],summary:{upToDate:0,success:0,error:0,applied:0},history:[],excludeList:[],trustedRepos:[],autoDiscovery:!0,autoApply:!1,autoMatchStrategy:"comprehensive",autoCheckInterval:24,autoScanMode:"incremental",filterStatus:"all",setStatus:r=>e({status:r}),setFilterStatus:r=>e({filterStatus:r}),setProgress:(r,n)=>e({progress:{current:r,total:n}}),initTasks:r=>e(n=>{let a={upToDate:r.filter(i=>i.status==="up_to_date").length,success:r.filter(i=>i.status==="success"||i.status==="discovered_new"||i.status==="discovered_update").length,error:r.filter(i=>i.status==="error").length,applied:n.summary.applied};return{tasks:r,summary:a,progress:{current:0,total:r.length}}}),updateTaskStatus:(r,n,a,i,s,o)=>e(l=>{let c=l.tasks.map(d=>d.id===r?{...d,status:n,message:a||d.message,sourceRepo:i||d.sourceRepo,targetVersion:s||d.targetVersion,scoreBreakdown:o||d.scoreBreakdown}:d),u={upToDate:c.filter(d=>d.status==="up_to_date").length,success:c.filter(d=>d.status==="success"||d.status==="discovered_new"||d.status==="discovered_update").length,error:c.filter(d=>d.status==="error").length,applied:l.summary.applied};return{tasks:c,summary:u}}),addTasks:r=>e(n=>{let a=[...n.tasks,...r],i={upToDate:a.filter(s=>s.status==="up_to_date").length,success:a.filter(s=>s.status==="success"||s.status==="discovered_new"||s.status==="discovered_update").length,error:a.filter(s=>s.status==="error").length,applied:n.summary.applied};return{tasks:a,summary:i}}),setSummary:r=>e(n=>({summary:{...n.summary,...r}})),addHistory:r=>e(n=>({history:[r,...n.history].slice(0,50)})),setHistory:r=>e({history:r}),toggleExclude:r=>e(n=>({excludeList:n.excludeList.includes(r)?n.excludeList.filter(i=>i!==r):[...n.excludeList,r]})),setTrustedRepos:r=>e({trustedRepos:r}),addTrustedRepo:r=>e(n=>({trustedRepos:n.trustedRepos.includes(r)?n.trustedRepos:[...n.trustedRepos,r]})),removeTrustedRepo:r=>e(n=>({trustedRepos:n.trustedRepos.filter(a=>a!==r)})),setConfigs:r=>e(r),hydrate:(r,n)=>e({trustedRepos:r.autoTrustedRepos||[],excludeList:r.autoExcludeList||[],autoApply:r.autoApply!==void 0?r.autoApply:!1,autoDiscovery:r.autoDiscovery!==void 0?r.autoDiscovery:!0,autoMatchStrategy:r.autoMatchStrategy||"comprehensive",autoCheckInterval:r.autoCheckInterval||24,autoScanMode:r.autoScanMode||"incremental",history:n?.history||[],summary:{...t().summary,applied:n?.appliedCount||0}}),clearAll:()=>e({tasks:[],summary:{upToDate:0,success:0,error:0,applied:t().summary.applied}})}));Kt();var Pe=A(oe()),yme=({i18n:e})=>{let{t}=Ve(),{status:r,progress:n,tasks:a,summary:i,clearAll:s,trustedRepos:o,addTrustedRepo:l,removeTrustedRepo:c,autoDiscovery:u,autoApply:d,autoMatchStrategy:f,autoCheckInterval:p,autoScanMode:m,filterStatus:h,setFilterStatus:x,setConfigs:g}=Jg(),[y,b]=(0,cU.useState)(""),[S,w]=(0,cU.useState)(!1),E=async()=>{r!=="running"&&await e.autoManager.runSmartAuto({isIncremental:m==="incremental"})},C=async()=>{if(!y.includes("/")||S)return;w(!0),await e.autoManager.verifyRepo(y)?(l(y),e.settings.autoTrustedRepos=Array.from(new Set([...e.settings.autoTrustedRepos,y])),await e.saveSettings(),b("")):e.notice.error(t("Manager.Common.Errors.InvalidRepo")),w(!1)},N=async D=>{c(D),e.settings.autoTrustedRepos=e.settings.autoTrustedRepos.filter(W=>W!==D),await e.saveSettings()},_=async D=>{let W=!e.settings[D];e.settings[D]=W,await e.saveSettings(),g({[D]:W})},O=a.length>0?Math.round(i.upToDate/a.length*100):0;return(0,Pe.jsxs)("div",{className:"flex flex-col h-full bg-background overflow-hidden text-foreground",children:[(0,Pe.jsxs)("div",{className:"flex items-center justify-between py-2 px-4 border-b shrink-0 bg-background shadow-xs",children:[(0,Pe.jsxs)("div",{className:"flex items-center gap-5",children:[(0,Pe.jsxs)("div",{className:"flex items-center gap-3 pr-5 border-r border-border/40 h-9",children:[(0,Pe.jsxs)("div",{className:"relative w-8 h-8 flex items-center justify-center shrink-0",children:[(0,Pe.jsxs)("svg",{className:"w-full h-full transform -rotate-90",children:[(0,Pe.jsx)("circle",{cx:"16",cy:"16",r:"13",stroke:"currentColor",strokeWidth:"2.5",fill:"transparent",className:"text-muted/10"}),(0,Pe.jsx)("circle",{cx:"16",cy:"16",r:"13",stroke:"currentColor",strokeWidth:"2.5",fill:"transparent",strokeDasharray:81.6,strokeDashoffset:81.6*(1-O/100),className:"text-emerald-500 transition-all duration-1000 ease-out",strokeLinecap:"butt"})]}),(0,Pe.jsxs)("span",{className:"absolute inset-0 flex items-center justify-center text-[9px] font-black tracking-tighter",children:[O,"%"]})]}),(0,Pe.jsxs)("div",{className:"flex flex-col justify-center",children:[(0,Pe.jsx)("span",{className:"text-[9px] font-bold text-muted-foreground/50 uppercase leading-none tracking-tight",children:t("Manager.Auto.Stats.Health")}),(0,Pe.jsx)("span",{className:"text-[12px] font-black leading-tight mt-0.5",children:t("Manager.Auto.Stats.VaultStatus")})]})]}),(0,Pe.jsxs)("div",{className:"flex items-center gap-2 h-9",children:[(0,Pe.jsx)(oU,{label:t("Manager.Common.Status.Labels.up_to_date"),value:i.upToDate,color:"text-blue-500",bg:"bg-blue-500/5",icon:(0,Pe.jsx)(gi,{className:"w-4 h-4"})}),(0,Pe.jsx)(oU,{label:t("Manager.Common.Status.Labels.discovered"),value:i.success,color:"text-amber-500",bg:"bg-amber-500/5",icon:(0,Pe.jsx)(nn,{className:"w-4 h-4"})}),(0,Pe.jsx)(oU,{label:t("Manager.Common.Status.Labels.error"),value:i.error,color:"text-rose-500",bg:"bg-rose-500/5",icon:(0,Pe.jsx)(hi,{className:"w-4 h-4"})})]})]}),(0,Pe.jsxs)("div",{className:"flex items-center gap-2 h-9",children:[(0,Pe.jsxs)(we,{size:"sm",variant:"ghost",className:"h-9 px-3 rounded-none font-bold text-[13px] text-muted-foreground/80 hover:bg-muted/50 border border-transparent hover:border-border/40",onClick:s,disabled:r==="running",children:[(0,Pe.jsx)(rs,{className:"w-4 h-4 mr-2 opacity-60"}),t("Common.Actions.Clear")||"\u6E05\u7A7A\u7ED3\u679C"]}),(0,Pe.jsxs)(we,{size:"sm",className:le("h-9 px-5 rounded-none font-black text-[13px] transition-all shadow-sm",r==="running"?"bg-muted cursor-not-allowed border border-border/40":"bg-primary text-primary-foreground hover:bg-primary/90"),onClick:E,disabled:r==="running",children:[r==="running"?(0,Pe.jsx)(Gt,{className:"w-4 h-4 animate-spin mr-2"}):(0,Pe.jsx)(Dh,{className:"w-4 h-4 mr-2 fill-current"}),t("Manager.Auto.Actions.StartAuto")]})]})]}),(0,Pe.jsxs)("div",{className:"flex-1 flex overflow-hidden",children:[(0,Pe.jsxs)("div",{className:"flex-1 flex flex-col overflow-hidden",children:[r==="running"&&n.total>0&&(0,Pe.jsxs)("div",{className:"bg-primary/5 px-4 py-1.5 border-b border-primary/20 flex items-center justify-between shrink-0",children:[(0,Pe.jsxs)("span",{className:"text-[10px] font-bold text-primary tracking-widest uppercase flex items-center gap-2",children:[(0,Pe.jsx)(Sc,{className:"w-3 h-3 animate-pulse"}),t("Manager.Auto.Status.Analyzing")]}),(0,Pe.jsxs)("div",{className:"flex items-center gap-3 w-1/3",children:[(0,Pe.jsx)("div",{className:"flex-1 h-1 bg-muted rounded-full overflow-hidden",children:(0,Pe.jsx)("div",{className:"h-full bg-primary transition-all duration-300",style:{width:`${Math.round(n.current/n.total*100)}%`}})}),(0,Pe.jsxs)("span",{className:"text-[10px] font-mono text-muted-foreground/60",children:[n.current,"/",n.total]})]})]}),(0,Pe.jsx)("div",{className:"flex-1 overflow-y-auto px-4 py-2 custom-scrollbar bg-background",children:a.length===0?(0,Pe.jsxs)("div",{className:"h-full flex flex-col items-center justify-center text-muted-foreground/30 py-24",children:[(0,Pe.jsx)(IT,{className:"w-12 h-12 mb-4 opacity-20"}),(0,Pe.jsx)("p",{className:"text-[12px] font-bold uppercase tracking-[0.2em]",children:t("Manager.Auto.Status.NoLogs")})]}):(0,Pe.jsx)("div",{className:"flex flex-col gap-1 pb-10",children:[...a].filter(D=>h==="all"?D.status!=="pending":D.status===h).sort((D,W)=>{let Z={processing:10,discovered_update:9,discovered_new:8,error:7,success:6,up_to_date:5};return(Z[W.status]||0)-(Z[D.status]||0)}).map(D=>(0,Pe.jsx)(wut,{task:D,i18n:e},D.id))})})]}),(0,Pe.jsx)("div",{className:"w-72 border-l border-border/80 flex flex-col h-full bg-muted/10 shrink-0",children:(0,Pe.jsxs)("div",{className:"p-5 flex flex-col gap-8 h-full overflow-y-auto custom-scrollbar",children:[(0,Pe.jsxs)("section",{className:"space-y-4",children:[(0,Pe.jsxs)("h3",{className:"text-[10px] font-black text-muted-foreground/50 uppercase tracking-widest flex items-center gap-2",children:[(0,Pe.jsx)(Wo,{className:"w-3 h-3"}),t("Manager.Auto.Filters.Title")]}),(0,Pe.jsx)("div",{className:"flex flex-col gap-1",children:["all","discovered_update","discovered_new","up_to_date","success","error"].map(D=>(0,Pe.jsxs)("button",{onClick:()=>x(D),className:le("px-3 py-2 text-[12px] font-bold transition-all text-left border rounded-none flex justify-between items-center",h===D?"bg-background border-primary/40 text-primary shadow-sm":"bg-transparent border-transparent text-muted-foreground hover:bg-muted/50"),children:[(0,Pe.jsx)("span",{children:t(D==="all"?"Manager.Common.Filters.All":`Manager.Common.Status.Labels.${D}`)}),(0,Pe.jsxs)("span",{className:"opacity-40 font-mono text-[10px]",children:["(",a.filter(W=>D==="all"?W.status!=="pending":W.status===D).length,")"]})]},D))}),a.filter(D=>D.status.startsWith("discovered")).length>0&&(0,Pe.jsxs)(we,{size:"sm",className:"w-full h-10 mt-2 rounded-none font-black text-[12px] bg-primary text-primary-foreground hover:bg-primary/90 shadow-lg shadow-primary/10 transition-all active:scale-95",onClick:async()=>{let D=a.filter(W=>W.status.startsWith("discovered")).map(W=>W.id);await e.autoManager.applyBatchDiscovered(D)},children:[(0,Pe.jsx)(wo,{className:"w-4 h-4 mr-2 fill-current"}),t("Manager.Auto.Actions.OneClickReview")," (",a.filter(D=>D.status.startsWith("discovered")).length,")"]})]}),(0,Pe.jsxs)("section",{className:"space-y-3",children:[(0,Pe.jsxs)("h3",{className:"text-[10px] font-black text-muted-foreground/50 uppercase tracking-widest flex items-center gap-2",children:[(0,Pe.jsx)(xT,{className:"w-3 h-3"}),t("Manager.Auto.Scoping.Title")]}),(0,Pe.jsxs)("div",{className:"border border-border/40 p-0.5 bg-background shadow-xs flex gap-0.5",children:[(0,Pe.jsx)("button",{className:le("flex-1 py-2 text-[10px] font-bold rounded-none transition-all",m==="incremental"?"bg-muted text-foreground shadow-sm":"hover:bg-muted/50 text-muted-foreground/70"),onClick:async()=>{e.settings.autoScanMode="incremental",await e.saveSettings(),g({autoScanMode:"incremental"})},children:t("Manager.Auto.Modes.Incremental")}),(0,Pe.jsx)("button",{className:le("flex-1 py-2 text-[10px] font-bold rounded-none transition-all",m==="full"?"bg-muted text-foreground shadow-sm":"hover:bg-muted/50 text-muted-foreground/70"),onClick:async()=>{e.settings.autoScanMode="full",await e.saveSettings(),g({autoScanMode:"full"})},children:t("Manager.Auto.Modes.Full")})]})]}),(0,Pe.jsxs)("section",{className:"space-y-3",children:[(0,Pe.jsxs)("h3",{className:"text-[10px] font-black text-muted-foreground/50 uppercase tracking-widest flex items-center gap-2",children:[(0,Pe.jsx)(hT,{className:"w-3 h-3"}),t("Manager.Common.Status.Labels.MatchStrategy")]}),(0,Pe.jsxs)(mr,{value:f,onValueChange:async D=>{e.settings.autoMatchStrategy=D,await e.saveSettings(),g({autoMatchStrategy:D})},children:[(0,Pe.jsx)(gr,{className:"h-8 text-xs bg-background border-border/40 rounded-none px-3 shadow-xs",children:(0,Pe.jsx)(hr,{})}),(0,Pe.jsxs)(yr,{className:"rounded-none border-border/80 shadow-2xl",children:[(0,Pe.jsx)(Ot,{value:"comprehensive",className:"text-xs",children:t("Manager.Common.Status.Labels.MatchStrategies.comprehensive")}),(0,Pe.jsx)(Ot,{value:"version_first",className:"text-xs",children:t("Manager.Common.Status.Labels.MatchStrategies.version_first")}),(0,Pe.jsx)(Ot,{value:"popularity",className:"text-xs",children:t("Manager.Common.Status.Labels.MatchStrategies.popularity")}),(0,Pe.jsx)(Ot,{value:"latest_update",className:"text-xs",children:t("Manager.Common.Status.Labels.MatchStrategies.latest_update")})]})]})]}),(0,Pe.jsxs)("section",{className:"space-y-3",children:[(0,Pe.jsxs)("h3",{className:"text-[10px] font-black text-muted-foreground/50 uppercase tracking-widest flex items-center gap-2",children:[(0,Pe.jsx)(Zo,{className:"w-3 h-3"}),t("Manager.Auto.QuickSettings.Title")]}),(0,Pe.jsxs)("div",{className:"space-y-1.5",children:[(0,Pe.jsx)(gme,{label:t("Manager.Auto.QuickSettings.DiscoveryNotice"),active:u,onToggle:()=>_("autoDiscovery")}),(0,Pe.jsx)(gme,{label:t("Manager.Auto.QuickSettings.AutoApply"),active:d,onToggle:()=>_("autoApply")})]})]}),(0,Pe.jsxs)("section",{className:"space-y-3",children:[(0,Pe.jsxs)("h3",{className:"text-[10px] font-black text-muted-foreground/50 uppercase tracking-widest flex items-center gap-2",children:[(0,Pe.jsx)(Sc,{className:"w-3 h-3"}),t("Manager.Auto.QuickSettings.CheckInterval")]}),(0,Pe.jsx)("div",{className:"px-3 py-2 bg-background border border-border/40 shadow-xs",children:(0,Pe.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,Pe.jsx)(nt,{type:"number",value:p,className:"h-7 text-[12px] font-mono bg-transparent border-none p-0 focus-visible:ring-0 w-16",onChange:async D=>{let W=parseInt(D.target.value)||0;e.settings.autoCheckInterval=W,await e.saveSettings(),g({autoCheckInterval:W})}}),(0,Pe.jsx)("span",{className:"text-[9px] font-black text-muted-foreground/50",children:t("Manager.Auto.QuickSettings.Hours")})]})})]}),(0,Pe.jsxs)("section",{className:"space-y-3 border-t pt-6",children:[(0,Pe.jsxs)("h3",{className:"text-[10px] font-black text-muted-foreground/50 uppercase tracking-widest flex items-center gap-2",children:[(0,Pe.jsx)($n,{className:"w-3 h-3"}),t("Manager.Auto.Repos.Title")]}),(0,Pe.jsxs)("div",{className:"flex gap-1 mb-3",children:[(0,Pe.jsx)(nt,{placeholder:"owner/repo",value:y,onChange:D=>b(D.target.value),className:"h-8 text-xs font-mono bg-background border-border/40 rounded-none shadow-xs",disabled:S}),(0,Pe.jsx)(we,{size:"icon",variant:"outline",className:"h-8 w-8 shrink-0 rounded-none border-border/40 bg-background hover:bg-muted",onClick:C,disabled:S,children:S?(0,Pe.jsx)(Gt,{className:"w-3 h-3 animate-spin"}):(0,Pe.jsx)(xi,{className:"w-3 h-3"})})]}),(0,Pe.jsx)("div",{className:"space-y-1 max-h-60 overflow-y-auto custom-scrollbar",children:o.map(D=>(0,Pe.jsxs)("div",{className:"flex items-center justify-between group p-2 bg-muted/20 border border-transparent hover:border-border/40 text-[10px] font-mono text-muted-foreground rounded-none",children:[(0,Pe.jsx)("span",{className:"truncate",children:D}),(0,Pe.jsx)("button",{onClick:()=>N(D),className:"opacity-0 group-hover:opacity-100 hover:text-rose-500 transition-opacity",children:(0,Pe.jsx)(aa,{className:"w-3 h-3"})})]},D))})]})]})})]})]})},oU=({label:e,value:t,color:r,bg:n,icon:a})=>(0,Pe.jsxs)("div",{className:le("flex items-center gap-2 px-2.5 py-1 border border-border/20 rounded-none h-9 bg-muted/10 shadow-xs transition-colors hover:bg-muted/20",r),children:[(0,Pe.jsx)("div",{className:le("p-1 rounded-none",n),children:a}),(0,Pe.jsxs)("div",{className:"flex items-center gap-1.5 flex-nowrap",children:[(0,Pe.jsx)("span",{className:"text-[11.5px] font-black tabular-nums",children:t}),(0,Pe.jsx)("span",{className:"text-[10px] font-bold text-muted-foreground opacity-60 whitespace-nowrap",children:e})]})]}),gme=({label:e,active:t,onToggle:r})=>(0,Pe.jsxs)("div",{className:le("flex items-center justify-between px-3 py-2 border transition-all cursor-pointer group",t?"bg-background border-border shadow-xs":"bg-transparent border-transparent opacity-60 hover:opacity-100"),onClick:r,children:[(0,Pe.jsx)("span",{className:"text-[12px] font-bold tracking-tight",children:e}),(0,Pe.jsx)("div",{className:le("w-7 h-4 rounded-full relative transition-colors bg-muted/50"),children:(0,Pe.jsx)("div",{className:le("absolute top-0.5 w-3 h-3 rounded-full transition-all shadow-sm",t?"bg-primary left-3.5":"bg-muted-foreground/40 left-0.5")})})]}),wut=({task:e,i18n:t})=>{let{t:r}=Ve(),n=e.status==="discovered_new"||e.status==="discovered_update",a="bg-muted-foreground/30",i="text-muted-foreground";return e.status==="success"?(a="bg-emerald-500",i="text-emerald-600"):e.status==="error"?(a="bg-rose-500",i="text-rose-600"):e.status==="processing"?(a="bg-primary",i="text-primary"):n?(a="bg-amber-500",i="text-amber-600"):e.status==="up_to_date"&&(a="bg-blue-500",i="text-blue-600"),(0,Pe.jsxs)("div",{className:le("group relative border rounded-none bg-card/75 text-card-foreground shadow-xs hover:shadow-md hover:bg-muted/10 transition-all duration-300 px-4 py-1.5 w-full border-border/50 flex items-center gap-4 overflow-hidden backdrop-blur-md h-[46px]",e.status==="processing"&&"bg-primary/[0.02]"),children:[(0,Pe.jsx)("div",{className:le("absolute left-0 top-0 bottom-0 w-[3px]",a,e.status==="processing"&&"animate-pulse")}),(0,Pe.jsx)("div",{className:"flex items-center justify-center shrink-0 w-8",children:(0,Pe.jsx)("div",{className:le("w-7 h-7 rounded-none flex items-center justify-center border border-border/40 bg-background shadow-xs",e.type==="theme"?"text-indigo-500":"text-amber-500"),children:e.type==="theme"?(0,Pe.jsx)(Yn,{className:"w-3.5 h-3.5"}):(0,Pe.jsx)(Fs,{className:"w-3.5 h-3.5"})})}),(0,Pe.jsxs)("div",{className:"flex items-center gap-2.5 min-w-0 flex-1",children:[(0,Pe.jsx)("h4",{className:"text-[13.5px] font-bold truncate tracking-tight text-foreground/90 group-hover:text-primary transition-colors shrink-0 max-w-[40%]",children:e.name||e.id}),e.targetVersion&&(0,Pe.jsxs)("span",{className:"text-[10px] text-primary/80 font-bold bg-primary/5 border border-primary/10 px-1.5 py-0.5 rounded-none shrink-0",children:["v",e.targetVersion]}),e.sourceRepo&&(0,Pe.jsxs)("span",{className:"text-[10px] text-muted-foreground/50 truncate font-medium flex items-center gap-1 opacity-60",children:[(0,Pe.jsx)($n,{className:"w-3 h-3"}),e.sourceRepo.split("/").pop()]}),(0,Pe.jsxs)("div",{className:le("ml-auto px-2.5 py-0.5 text-[9px] uppercase tracking-[0.1em] font-extrabold rounded-none bg-background border border-border shadow-xs flex items-center gap-1.5 shrink-0 justify-center min-w-[75px]",i),children:[(0,Pe.jsx)("span",{className:le("w-1.5 h-1.5 rounded-full shadow-sm",a,e.status==="processing"?"animate-pulse":"")}),r(`Manager.Common.Status.Labels.${e.status}`)]})]}),(0,Pe.jsx)("div",{className:"flex items-center justify-center shrink-0 w-20",children:e.scoreBreakdown&&(0,Pe.jsx)(ti,{children:(0,Pe.jsxs)(oa,{delayDuration:300,children:[(0,Pe.jsx)(la,{asChild:!0,children:(0,Pe.jsxs)("div",{className:"flex items-center gap-2 cursor-help py-1 px-2 border border-transparent hover:border-border/40 group/score transition-all",children:[(0,Pe.jsx)("span",{className:"text-[11px] font-black text-amber-500 tabular-nums",children:e.scoreBreakdown.total}),(0,Pe.jsx)("div",{className:"flex gap-0.5",children:[1,2,3].map(s=>(0,Pe.jsx)("div",{className:le("w-1.5 h-1.5 rounded-none",s<=Math.round(e.scoreBreakdown.total/33)?"bg-amber-500":"bg-muted")},s))})]})}),(0,Pe.jsx)(ca,{side:"top",className:"p-0 bg-background border border-border shadow-2xl rounded-none z-[999]",children:(0,Pe.jsxs)("div",{className:"p-3 space-y-2.5 min-w-[160px]",children:[(0,Pe.jsx)("div",{className:"text-[10px] font-black text-muted-foreground/40 uppercase tracking-[0.2em] mb-1",children:r("Manager.Auto.Discovery.ScoreBreakdown.Title")}),(0,Pe.jsx)(lU,{label:r("Manager.Auto.Discovery.ScoreBreakdown.Version"),score:e.scoreBreakdown.version,max:50,icon:(0,Pe.jsx)(wT,{className:"w-3 h-3"})}),(0,Pe.jsx)(lU,{label:r("Manager.Auto.Discovery.ScoreBreakdown.Popularity"),score:e.scoreBreakdown.popularity,max:30,icon:(0,Pe.jsx)(Sc,{className:"w-3 h-3"})}),(0,Pe.jsx)(lU,{label:r("Manager.Auto.Discovery.ScoreBreakdown.Freshness"),score:e.scoreBreakdown.freshness,max:20,icon:(0,Pe.jsx)(nn,{className:"w-3 h-3"})})]})})]})})}),(0,Pe.jsx)("div",{className:"shrink-0 flex items-center justify-end w-32",children:n?(0,Pe.jsx)(we,{variant:"outline",size:"sm",className:"h-8 px-4 text-[11px] font-black bg-primary text-primary-foreground border-none rounded-none hover:bg-primary/90 transition-all active:scale-95",onClick:()=>t.autoManager.retryTask(e.id,e.type),children:r("Manager.Auto.Discovery.ReviewAction")}):(0,Pe.jsx)("div",{className:"w-8 h-8 rounded-full border-2 border-border/10 flex items-center justify-center opacity-20",children:(0,Pe.jsx)(gi,{className:"w-4 h-4"})})}),(0,Pe.jsx)("div",{className:"absolute left-1/2 -translate-x-1/2 bottom-0.5 overflow-hidden max-w-[200px]",children:(0,Pe.jsx)("span",{className:"text-[8px] text-muted-foreground/20 italic truncate block",children:e.message&&e.message!=="-"?e.message:""})})]})},lU=({label:e,score:t,max:r,icon:n})=>{let a=t||0;return(0,Pe.jsxs)("div",{className:"flex items-center justify-between gap-4",children:[(0,Pe.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Pe.jsx)("span",{className:"text-muted-foreground/50",children:n}),(0,Pe.jsx)("span",{className:"text-foreground/70 font-bold text-[11px]",children:e})]}),(0,Pe.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Pe.jsx)("div",{className:"w-10 h-1 bg-muted/40 rounded-none overflow-hidden",children:(0,Pe.jsx)("div",{className:"h-full bg-amber-500/40",style:{width:`${Math.min(a/r*100,100)}%`}})}),(0,Pe.jsx)("span",{className:"font-mono text-[11px] font-black min-w-[20px] text-right",children:a})]})]})};var Zg=A(Le());tr();Kt();var Uc=require("obsidian"),xme=A(ii()),p_=A(require("zlib")),qv=A(require("path"));$t();var rt=A(oe()),bme=({i18n:e})=>{let{t}=Ve(),r=e.sourceManager,[n,a]=(0,Zg.useState)(""),[i,s]=(0,Zg.useState)(new Set),[o,l]=(0,Zg.useState)("all"),[c,u]=(0,Zg.useState)("all"),d=Ue(S=>S.sourceUpdateTick),f=(0,Zg.useMemo)(()=>{let S=r.getAllSources();if(n){let E=n.toLowerCase();S=S.filter(C=>C.title.toLowerCase().includes(E)||C.plugin.toLowerCase().includes(E)||C.id.toLowerCase().includes(E))}o!=="all"&&(S=S.filter(E=>E.origin===o)),c!=="all"&&(S=S.filter(E=>E.type===c)),S=S.sort((E,C)=>(C.updatedAt||0)-(E.updatedAt||0));let w=qv.normalize(e.app.vault.adapter.getBasePath());return S.map(E=>{let C=!1;return E.type==="plugin"?C=!!e.app.plugins.manifests[E.plugin]:C=xme.existsSync(qv.join(w,".obsidian","themes",E.plugin)),{...E,isInstalled:C}})},[e,n,o,c,d,e.app.plugins.manifests]),p=()=>{i.size===f.length?s(new Set):s(new Set(f.map(S=>S.id)))},m=S=>{let w=new Set(i);w.has(S)?w.delete(S):w.add(S),s(w)},h=()=>{let S=new Set(i),w=!1;f.forEach(E=>{!E.isInstalled&&!S.has(E.id)&&(S.add(E.id),w=!0)}),w&&s(S)},x=S=>S?new Date(S).toLocaleString():"-",g=async()=>{if(i.size!==0)try{let S={};for(let O of i){let D=r.getSource(O);if(D){let W=r.readSourceFile(O);S[O]={meta:D,content:W}}}let w=JSON.stringify(S),E=p_.gzipSync(Buffer.from(w,"utf-8")),C=new Blob([new Uint8Array(E)],{type:"application/gzip"}),N=URL.createObjectURL(C),_=document.createElement("a");_.href=N,_.download=`i18n-translations-export-${Date.now()}.i18n.gz`,_.click(),URL.revokeObjectURL(N),new Uc.Notice(t("Manager.Sources.Actions.ExportSuccess"))}catch{new Uc.Notice(t("Manager.Common.Errors.Error"))}},y=()=>{let S=document.createElement("input");S.type="file",S.accept=".i18n.gz,.gz,.json",S.onchange=async w=>{let E=w.target.files[0];if(E)try{let C=new FileReader;C.onload=async N=>{try{let _=N.target?.result,O;E.name.endsWith(".gz")||E.name.endsWith(".i18n.gz")?O=p_.gunzipSync(Buffer.from(_)).toString("utf-8"):O=new TextDecoder().decode(_);let D=JSON.parse(O),W=0,Z=0,me=0;if(D&&typeof D=="object")for(let Q in D){let V=D[Q];if(V.meta&&V.content){let U=r.getSource(V.meta.id);if(U)if(U.checksum===V.meta.checksum){me++;continue}else Z++;else W++;r.saveSource(V.meta),r.saveSourceFile(V.meta.id,V.content)}}if(W>0||Z>0){let Q="";W>0&&(Q+=`\u65B0\u589E ${W} `),Z>0&&(Q+=`\u66F4\u65B0 ${Z} `),me>0&&(Q+=`(\u8DF3\u8FC7 ${me} \u9879\u91CD\u590D)`),new Uc.Notice(Q.trim()||t("Manager.Sources.Actions.ImportSuccess",{count:W+Z})),Ue.getState().triggerSourceUpdate()}else me>0?new Uc.Notice(`\u5168\u90E8 ${me} \u9879\u5DF2\u5B58\u5728\u4E14\u5185\u5BB9\u4E00\u81F4\uFF0C\u65E0\u9700\u5BFC\u5165`):new Uc.Notice(t("Manager.Common.Errors.ErrorDesc"))}catch{new Uc.Notice(t("Manager.Common.Errors.Error"))}},C.readAsArrayBuffer(E)}catch{new Uc.Notice(t("Manager.Common.Errors.Error"))}},S.click()},b=async()=>{if(!(i.size===0||!window.confirm(t("Manager.Sources.Actions.DeleteConfirm",{count:i.size}))))try{for(let w of i)r.removeSource(w);s(new Set),new Uc.Notice(t("Common.Notices.DeleteSuccess")),Ue.getState().triggerSourceUpdate()}catch{new Uc.Notice(t("Manager.Common.Errors.Error"))}};return(0,rt.jsxs)("div",{className:"flex flex-col flex-1 min-h-0 bg-background",children:[(0,rt.jsx)("div",{className:"flex flex-col gap-4 py-2 px-4 border-b shrink-0",children:(0,rt.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,rt.jsxs)("div",{className:"relative flex-1 min-w-[200px]",children:[(0,rt.jsx)(fn,{className:"absolute left-2.5 top-2.5 h-4 w-4 text-muted-foreground/70"}),(0,rt.jsx)(nt,{className:"pl-8 h-9 rounded-none border-muted-foreground/20 focus:ring-1 text-[13px] bg-muted/10 shadow-sm transition-colors hover:bg-muted/20",placeholder:t("Manager.Sources.Filters.SearchPlaceholder"),value:n,onChange:S=>a(S.target.value)})]}),(0,rt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,rt.jsxs)(ri,{children:[(0,rt.jsx)(ni,{asChild:!0,children:(0,rt.jsxs)(we,{variant:"outline",size:"sm",className:"h-9 shadow-sm gap-1.5 rounded-none border-muted-foreground/20 text-[13px] hover:bg-muted/30",children:[(0,rt.jsx)(Wo,{className:"w-3.5 h-3.5 text-muted-foreground/70"}),t(o==="all"?"Manager.Common.Filters.All":o==="local"?"Manager.Sources.Filters.OriginLocal":"Manager.Sources.Filters.OriginCloud")]})}),(0,rt.jsxs)(ai,{align:"end",className:"w-40 rounded-none",children:[(0,rt.jsx)(an,{onClick:()=>l("all"),children:t("Manager.Common.Filters.All")}),(0,rt.jsx)(an,{onClick:()=>l("local"),children:t("Manager.Sources.Filters.OriginLocal")}),(0,rt.jsx)(an,{onClick:()=>l("cloud"),children:t("Manager.Sources.Filters.OriginCloud")})]})]}),(0,rt.jsxs)(ri,{children:[(0,rt.jsx)(ni,{asChild:!0,children:(0,rt.jsxs)(we,{variant:"outline",size:"sm",className:"h-9 shadow-sm gap-1.5 rounded-none border-muted-foreground/20 text-[13px] hover:bg-muted/30",children:[(0,rt.jsx)(Wo,{className:"w-3.5 h-3.5 text-muted-foreground/70"}),t(c==="all"?"Manager.Common.Filters.All":c==="plugin"?"Common.Labels.Plugins":"Common.Labels.Themes")]})}),(0,rt.jsxs)(ai,{align:"end",className:"w-40 rounded-none",children:[(0,rt.jsx)(an,{onClick:()=>u("all"),children:t("Manager.Common.Filters.All")}),(0,rt.jsx)(an,{onClick:()=>u("plugin"),children:t("Common.Labels.Plugins")}),(0,rt.jsx)(an,{onClick:()=>u("theme"),children:t("Common.Labels.Themes")})]})]})]}),(0,rt.jsxs)("div",{className:"flex items-center ml-auto gap-3",children:[(0,rt.jsxs)("div",{className:"flex items-center rounded-none border border-muted-foreground/20 bg-background shadow-sm h-9",children:[(0,rt.jsxs)(we,{variant:"ghost",size:"sm",onClick:p,className:"gap-1.5 h-9 rounded-none px-3 border-r border-muted-foreground/20 hover:bg-muted/50",children:[(0,rt.jsx)(Cp,{className:le("w-4 h-4",f.length>0&&i.size===f.length?"text-primary":"text-muted-foreground/70")}),(0,rt.jsx)("span",{className:le("hidden lg:inline text-[13px]",f.length>0&&i.size===f.length?"text-primary":"text-muted-foreground/90"),children:t("Manager.Sources.Actions.SelectAll")})]}),(0,rt.jsxs)(we,{variant:"ghost",size:"sm",onClick:h,className:"gap-1.5 h-9 rounded-none px-3 hover:bg-destructive/10 hover:text-destructive group",title:t("Manager.Sources.Actions.SelectUninstalled"),children:[(0,rt.jsx)(hi,{className:"w-4 h-4 text-destructive/80 group-hover:text-destructive"}),(0,rt.jsx)("span",{className:"hidden lg:inline text-[13px] text-destructive/90 group-hover:text-destructive",children:t("Manager.Sources.Actions.SelectUninstalled")})]})]}),(0,rt.jsxs)("div",{className:"flex items-center rounded-none border border-muted-foreground/20 bg-background shadow-sm h-9",children:[(0,rt.jsxs)(we,{variant:"ghost",size:"sm",onClick:y,className:"gap-1.5 h-9 rounded-none px-3 border-r border-muted-foreground/20 hover:bg-primary/5 hover:text-primary group",children:[(0,rt.jsx)(ql,{className:"w-4 h-4 text-muted-foreground/70 group-hover:text-primary"}),(0,rt.jsx)("span",{className:"text-[13px] text-muted-foreground/90 hidden lg:inline group-hover:text-primary",children:t("Manager.Sources.Actions.Import")})]}),(0,rt.jsxs)(we,{variant:"ghost",size:"sm",onClick:g,disabled:i.size===0,className:"gap-1.5 h-9 rounded-none px-3 hover:bg-primary/5 hover:text-primary group",children:[(0,rt.jsx)(ts,{className:"w-4 h-4 text-muted-foreground/70 group-hover:text-primary"}),(0,rt.jsx)("span",{className:"text-[13px] text-muted-foreground/90 hidden lg:inline group-hover:text-primary",children:t("Manager.Sources.Actions.Export")})]})]}),(0,rt.jsxs)(we,{variant:"destructive",size:"sm",onClick:b,disabled:i.size===0,className:"gap-1.5 h-9 rounded-none shadow-sm px-3 text-[13px]",children:[(0,rt.jsx)(aa,{className:"w-4 h-4"}),(0,rt.jsx)("span",{className:"hidden lg:inline",children:t("Manager.Sources.Actions.BatchDelete")})]})]})]})}),(0,rt.jsx)(dr,{className:"flex-1 min-h-0 bg-background",children:(0,rt.jsx)("div",{className:"px-4 py-2 h-full",children:(0,rt.jsx)("div",{className:"flex flex-col pb-6",children:f.length===0?(0,rt.jsxs)("div",{className:"flex flex-col items-center justify-center text-muted-foreground py-24 border border-dashed border-border/50 bg-muted/5 my-4 rounded-none",children:[(0,rt.jsx)(Ad,{className:"w-10 h-10 opacity-30 text-primary mb-4"}),(0,rt.jsx)("p",{className:"text-sm font-bold text-foreground/70 mb-1",children:t("Manager.Plugins.Status.NoTrans")}),(0,rt.jsx)("p",{className:"text-xs opacity-60",children:t("Manager.Common.Placeholders.SearchPlaceholder")})]}):f.map(S=>{let w=!S.isInstalled,E=S.origin==="cloud",C="bg-primary";w?C="bg-destructive":E?C="bg-indigo-500":C="bg-cyan-500";let N=w?S.type==="theme"?t("Manager.Sources.Status.ThemeNotInstalled"):t("Manager.Sources.Status.NotInstalled"):t(E?"Manager.Sources.Filters.OriginCloud":"Manager.Sources.Filters.OriginLocal");return(0,rt.jsxs)("div",{className:le("group relative border rounded-none text-card-foreground shadow-xs hover:shadow-md hover:bg-muted/10 transition-all duration-300 px-4 py-1.5 w-full overflow-hidden backdrop-blur-md mb-1",w&&"border-dashed border-destructive/50",i.has(S.id)?"bg-primary/[0.05] border-primary/40 ring-1 ring-primary/20":"bg-card/75 hover:bg-muted/20 border-border/50"),children:[(0,rt.jsx)("div",{className:le("absolute left-0 top-0 bottom-0 w-[3px] transition-colors duration-300 z-10 bg-opacity-100",C,w&&"animate-pulse")}),(0,rt.jsxs)("div",{className:"flex items-center gap-4 overflow-hidden min-w-0 relative z-0",children:[(0,rt.jsx)("div",{className:"flex items-center justify-center shrink-0",children:(0,rt.jsx)(Kl,{className:le("rounded-none transition-opacity",i.has(S.id)?"opacity-100":"opacity-30 group-hover:opacity-100"),checked:i.has(S.id),onCheckedChange:()=>m(S.id)})}),(0,rt.jsxs)("div",{className:le("px-2.5 py-0.5 text-[9px] uppercase tracking-[0.1em] font-extrabold rounded-none bg-background border border-border shadow-xs flex items-center gap-1.5 shrink-0 justify-center",C.replace(/bg-/g,"text-")),children:[(0,rt.jsx)("span",{className:le("w-1.5 h-1.5 rounded-full shadow-sm",C,w?"animate-pulse":"")}),N]}),(0,rt.jsxs)("div",{className:"flex items-center gap-2.5 min-w-0 flex-1",children:[(0,rt.jsx)("span",{className:"font-bold truncate text-[13.5px] text-foreground/90 group-hover:text-primary transition-colors duration-300 shrink-0 max-w-[50%]",title:S.title,children:S.title}),(0,rt.jsx)("span",{className:"text-[10px] text-muted-foreground/50 font-mono truncate bg-muted/20 px-1.5 py-0.5 rounded-none max-w-[30%] border border-border/30 relative",title:S.plugin,children:S.plugin}),S.type==="theme"?(0,rt.jsx)(vt,{variant:"secondary",className:"bg-orange-500/10 text-orange-600 hover:bg-orange-500/15 border border-orange-500/20 text-[9px] px-1.5 py-0 h-[18px] font-medium shrink-0 rounded-none",children:t("Common.Labels.Themes")}):(0,rt.jsx)(vt,{variant:"secondary",className:"bg-purple-500/10 text-purple-600 hover:bg-purple-500/15 border border-purple-500/20 text-[9px] px-1.5 py-0 h-[18px] font-medium shrink-0 rounded-none",children:t("Common.Labels.Plugins")})]}),(0,rt.jsxs)("div",{className:"hidden md:flex flex-col items-end justify-center px-4 shrink-0 min-w-[120px] tabular-nums",children:[(0,rt.jsx)("span",{className:"text-[11px] font-bold text-muted-foreground/80 group-hover:text-foreground/80 transition-colors",children:x(S.updatedAt).split(" ")[0]}),(0,rt.jsx)("span",{className:"text-[9px] text-muted-foreground/50",children:x(S.updatedAt).split(" ")[1]})]}),(0,rt.jsx)("div",{className:"shrink-0 flex items-center justify-end",children:(0,rt.jsxs)(ri,{children:[(0,rt.jsx)(ni,{asChild:!0,children:(0,rt.jsx)(we,{variant:"ghost",size:"icon",className:"h-8 w-8 text-muted-foreground/50 hover:text-foreground hover:bg-muted/50 rounded-none transition-all",children:(0,rt.jsx)(go,{className:"w-4 h-4"})})}),(0,rt.jsxs)(ai,{align:"end",className:"w-[180px] rounded-none p-1 shadow-2xl backdrop-blur-md bg-background/95 border-border/40",children:[(0,rt.jsxs)(an,{className:"text-[12px] rounded-none cursor-pointer py-2",onClick:()=>{let _=r.getSourceFilePath(S.id),O=si(_);Ue.getState().setEditorPluginTranslation(O),Ue.getState().setEditorPluginTranslationPath(_),e.view.activateView(Cm)},children:[(0,rt.jsx)(vo,{className:"w-3.5 h-3.5 mr-2.5 text-primary/70"}),t("Manager.Common.Actions.Edit")]}),(0,rt.jsxs)(an,{className:"text-[12px] rounded-none cursor-pointer py-2",onClick:()=>{let _=r.getSourceFilePath(S.id);au(e,qv.dirname(_))},children:[(0,rt.jsx)(yi,{className:"w-3.5 h-3.5 mr-2.5 text-amber-500/70"}),t("Manager.Common.Actions.OpenFolder")]}),(0,rt.jsx)("div",{className:"h-px bg-border/40 my-1 mx-1"}),(0,rt.jsxs)(an,{className:"text-[12px] text-destructive focus:text-destructive focus:bg-destructive/10 rounded-none cursor-pointer py-2",onClick:()=>{r.removeSource(S.id),new Uc.Notice(t("Common.Notices.DeleteSuccess")),Ue.getState().triggerSourceUpdate()},children:[(0,rt.jsx)(aa,{className:"w-3.5 h-3.5 mr-2.5 opacity-70"}),t("Manager.Common.Actions.Delete")]})]})]})})]})]},S.id)})})})}),(0,rt.jsxs)("div",{className:"shrink-0 px-4 py-2 border-t bg-muted/30 flex items-center justify-between text-[10px] text-muted-foreground",children:[(0,rt.jsxs)("div",{className:"flex items-center gap-4",children:[(0,rt.jsxs)("span",{className:"flex items-center gap-1",children:[(0,rt.jsx)(wp,{className:"w-3 h-3"}),t("Manager.Sources.Stats.Total"),": ",f.length]}),i.size>0&&(0,rt.jsxs)("span",{className:"text-primary font-medium",children:[t("Manager.Sources.Stats.Selected"),": ",i.size]})]}),(0,rt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,rt.jsxs)("span",{className:"px-1.5 py-0.5 rounded bg-emerald-500/10 text-emerald-600 border border-emerald-500/20",children:[t("Manager.Sources.Filters.OriginLocal"),": ",f.filter(S=>S.origin==="local").length]}),(0,rt.jsxs)("span",{className:"px-1.5 py-0.5 rounded bg-blue-500/10 text-blue-600 border border-blue-500/20",children:[t("Manager.Sources.Filters.OriginCloud"),": ",f.filter(S=>S.origin==="cloud").length]})]})]})]})};var Sf=A(Le());tr();Kt();var yt=A(oe());function Cut(e){if(e.avatarUrl)return e.avatarUrl;if(e.githubUsername)return`https://github.com/${e.githubUsername}.png?size=80`}var Tme=({i18n:e})=>{let{t}=Ve(),r=Te.use.communityStats(),n=Te.use.communityRegistry(),a=Te.use.communityLoaded(),i=Te.use.fetchCommunityRegistry(),s=Te.use.contributors(),o=Te.use.contributorsLoaded(),l=Te.use.fetchContributors();(0,Sf.useEffect)(()=>{a||i(e),o||l(e)},[a,o,i,l,e]);let c=(0,Sf.useMemo)(()=>{let p={};if(!n)return p;for(let m of n){let h=m.repoAddress?.split("/")[0];m.authorBadge&&h&&(p[h]=m.authorBadge)}return p},[n]),u=(0,Sf.useMemo)(()=>{let p=r?.leaderboard?.topAuthors||[];if(p.length>0)return p;if(!r?.repos)return[];let m=new Map;return Object.values(r.repos).forEach(h=>{if(!m.has(h.authorName))m.set(h.authorName,{name:h.authorName,avatarUrl:h.avatarUrl,htmlUrl:h.authorHtmlUrl,totalPlugins:h.pluginCount,totalStars:h.stars,repoCount:1,languages:h.languages||[],activityScore:h.activityScore,lastActiveAt:h.lastPushedAt});else{let x=m.get(h.authorName);x.totalPlugins+=h.pluginCount,x.totalStars+=h.stars,x.repoCount+=1}}),Array.from(m.values()).sort((h,x)=>x.totalStars-h.totalStars)},[r]),d=(0,Sf.useMemo)(()=>[{id:"sponsor",icon:(0,yt.jsx)($x,{className:"w-4 h-4"}),colorFrom:"from-fuchsia-500/15",colorTo:"to-purple-500/10",ringColor:"ring-fuchsia-500/30",badgeColor:"bg-fuchsia-500/15 text-fuchsia-600"},{id:"translation",icon:(0,yt.jsx)($n,{className:"w-4 h-4"}),colorFrom:"from-blue-500/10",colorTo:"to-cyan-500/5",ringColor:"ring-blue-500/20",badgeColor:"bg-blue-500/10 text-blue-600"},{id:"code",icon:(0,yt.jsx)(Ko,{className:"w-4 h-4"}),colorFrom:"from-emerald-500/10",colorTo:"to-green-500/5",ringColor:"ring-emerald-500/20",badgeColor:"bg-emerald-500/10 text-emerald-600"},{id:"video",icon:(0,yt.jsx)(Bh,{className:"w-4 h-4"}),colorFrom:"from-rose-500/10",colorTo:"to-pink-500/5",ringColor:"ring-rose-500/20",badgeColor:"bg-rose-500/10 text-rose-600"},{id:"testing",icon:(0,yt.jsx)(Oh,{className:"w-4 h-4"}),colorFrom:"from-amber-500/10",colorTo:"to-yellow-500/5",ringColor:"ring-amber-500/20",badgeColor:"bg-amber-500/10 text-amber-600"},{id:"suggestion",icon:(0,yt.jsx)(yu,{className:"w-4 h-4"}),colorFrom:"from-violet-500/10",colorTo:"to-purple-500/5",ringColor:"ring-violet-500/20",badgeColor:"bg-violet-500/10 text-violet-600"}],[]),f=(0,Sf.useMemo)(()=>{let p={sponsor:[],code:[],video:[],testing:[],suggestion:[]};for(let m of s)p[m.category]&&p[m.category].push(m);return p},[s]);return a?(0,yt.jsx)(dr,{className:"flex-1 min-h-0 w-full h-full",children:(0,yt.jsxs)("div",{className:"max-w-3xl mx-auto px-6 py-8",children:[(0,yt.jsxs)("div",{className:"text-center mb-8 relative",children:[(0,yt.jsx)("div",{className:"absolute inset-0 -z-10 bg-gradient-to-b from-primary/5 via-transparent to-transparent rounded-3xl blur-3xl"}),(0,yt.jsx)("div",{className:"inline-flex items-center justify-center w-14 h-14 rounded-2xl bg-gradient-to-br from-amber-400/20 via-orange-400/10 to-rose-400/20 border border-amber-500/10 mb-4 shadow-lg shadow-amber-500/5",children:(0,yt.jsx)(Ld,{className:"w-7 h-7 text-amber-500"})}),(0,yt.jsx)("h2",{className:"text-xl font-bold text-foreground tracking-tight mb-1.5",children:t("Manager.Credits.Title")}),(0,yt.jsx)("p",{className:"text-xs text-muted-foreground/70 max-w-sm mx-auto leading-relaxed",children:t("Manager.Credits.Subtitle")})]}),(0,yt.jsxs)("div",{className:"space-y-6",children:[(()=>{let p=d[0],m=f[p.id]||[];return(0,yt.jsx)(uU,{category:p,title:t("Manager.Credits.CatSponsor"),subtitle:t("Manager.Credits.CatSponsorDesc"),count:m.length,t,defaultOpen:!0,children:m.length>0?(0,yt.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2.5",children:m.map(h=>(0,yt.jsx)(vme,{contributor:h,category:p},`${h.category}-${h.name}`))}):(0,yt.jsx)("div",{className:"text-center py-6 text-xs text-muted-foreground/40 italic",children:t("Manager.Credits.ComingSoon")})},p.id)})(),(0,yt.jsx)(uU,{category:d[1],title:t("Manager.Credits.CatTranslation"),subtitle:t("Manager.Credits.CatTranslationDesc"),count:u.length,t,defaultOpen:!0,children:u.length>0?(0,yt.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2.5",children:u.map((p,m)=>(0,yt.jsx)(Put,{creator:p,rank:m+1,badge:c[p.name],category:d[1],t},p.name))}):(0,yt.jsx)("div",{className:"text-center py-6 text-xs text-muted-foreground/40 italic",children:t("Manager.Credits.ComingSoon")})}),d.slice(2).map(p=>{let m=f[p.id]||[];return(0,yt.jsx)(uU,{category:p,title:t(`Manager.Credits.Cat${Sme(p.id)}`),subtitle:t(`Manager.Credits.Cat${Sme(p.id)}Desc`),count:m.length,t,defaultOpen:m.length>0,children:m.length>0?(0,yt.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2.5",children:m.map(h=>(0,yt.jsx)(vme,{contributor:h,category:p},`${h.category}-${h.name}`))}):(0,yt.jsx)("div",{className:"text-center py-6 text-xs text-muted-foreground/40 italic",children:t("Manager.Credits.ComingSoon")})},p.id)})]}),(0,yt.jsx)("div",{className:"text-center mt-10 pb-4",children:(0,yt.jsxs)("div",{className:"inline-flex items-center gap-2 text-[10px] text-muted-foreground/40 px-4 py-2 rounded-full bg-muted/15 border border-border/15",children:[(0,yt.jsx)(bi,{className:"w-3 h-3"}),t("Manager.Credits.Footer")]})})]})}):(0,yt.jsxs)("div",{className:"flex flex-col items-center justify-center h-full gap-4 text-muted-foreground",children:[(0,yt.jsx)(Gt,{className:"w-8 h-8 animate-spin text-primary/40"}),(0,yt.jsx)("p",{className:"text-sm",children:t("Common.Status.Loading")})]})},uU=({category:e,title:t,subtitle:r,count:n,t:a,defaultOpen:i,children:s})=>{let[o,l]=(0,Sf.useState)(i);return(0,yt.jsxs)("div",{className:le("rounded-xl border overflow-hidden transition-all duration-300","bg-gradient-to-br",e.colorFrom,e.colorTo,"border-border/30"),children:[(0,yt.jsxs)("button",{className:"w-full flex items-center gap-3 px-4 py-3 text-left hover:bg-muted/20 transition-colors",onClick:()=>l(!o),children:[(0,yt.jsx)("div",{className:le("flex items-center justify-center w-8 h-8 rounded-lg shrink-0",e.badgeColor),children:e.icon}),(0,yt.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,yt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,yt.jsx)("span",{className:"text-[13px] font-bold text-foreground",children:t}),n>0&&(0,yt.jsx)(vt,{variant:"secondary",className:"text-[9px] px-1.5 py-0 h-4 font-mono",children:n})]}),(0,yt.jsx)("p",{className:"text-[10px] text-muted-foreground/60 truncate mt-0.5",children:r})]}),(0,yt.jsx)(Oi,{className:le("w-4 h-4 text-muted-foreground/40 transition-transform duration-200 shrink-0",o?"rotate-0":"-rotate-90")})]}),o&&(0,yt.jsx)("div",{className:"px-4 pb-4 pt-1",children:s})]})},Put=({creator:e,rank:t,badge:r,category:n,t:a})=>{let i=t<=3;return(0,yt.jsxs)("div",{className:le("group relative flex items-center gap-3 p-3 rounded-lg border transition-all duration-200 cursor-pointer select-none","bg-background/60 backdrop-blur-sm hover:bg-background/90 hover:shadow-sm hover:-translate-y-px",i?"border-amber-500/15":"border-border/30"),onClick:()=>e.htmlUrl&&window.open(e.htmlUrl,"_blank"),children:[i&&(0,yt.jsx)("div",{className:"absolute -top-1.5 -right-1.5 z-10",children:(0,yt.jsx)("div",{className:le("w-5 h-5 rounded-full flex items-center justify-center text-[9px] font-black shadow-sm",t===1?"bg-amber-500/15 text-amber-600 ring-1 ring-amber-500/20":t===2?"bg-slate-400/15 text-slate-500 ring-1 ring-slate-400/20":"bg-orange-500/15 text-orange-600 ring-1 ring-orange-500/20"),children:t})}),e.avatarUrl?(0,yt.jsx)("img",{src:e.avatarUrl,alt:e.name,className:le("w-9 h-9 rounded-lg ring-1 shrink-0 transition-transform group-hover:scale-105",n.ringColor)}):(0,yt.jsx)("div",{className:le("w-9 h-9 rounded-lg flex items-center justify-center text-xs font-bold shrink-0",n.badgeColor),children:e.name.charAt(0).toUpperCase()}),(0,yt.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,yt.jsxs)("div",{className:"flex items-center gap-1.5 mb-0.5",children:[(0,yt.jsx)("span",{className:"text-[12px] font-bold text-foreground truncate",children:e.name}),r&&(0,yt.jsxs)(vt,{variant:"secondary",className:"text-[8px] px-1 py-0 h-3.5 font-bold shrink-0",children:[(0,yt.jsx)($x,{className:"w-2 h-2 mr-0.5"}),r]}),(0,yt.jsx)(zx,{className:"w-2.5 h-2.5 text-muted-foreground/20 opacity-0 group-hover:opacity-100 transition-opacity shrink-0 ml-auto"})]}),(0,yt.jsxs)("div",{className:"flex items-center gap-2.5 text-[9px] text-muted-foreground/50",children:[(0,yt.jsxs)("span",{className:"flex items-center gap-0.5",children:[(0,yt.jsx)(So,{className:"w-2.5 h-2.5 text-amber-500/40"}),e.totalStars]}),(0,yt.jsxs)("span",{className:"flex items-center gap-0.5",children:[(0,yt.jsx)(kh,{className:"w-2.5 h-2.5"}),e.repoCount," ",a("Manager.Credits.UnitRepos")]}),(0,yt.jsxs)("span",{className:"flex items-center gap-0.5",children:[(0,yt.jsx)($n,{className:"w-2.5 h-2.5"}),e.totalPlugins," ",a("Manager.Credits.UnitPlugins")]})]})]})]})},vme=({contributor:e,category:t})=>{let r=Cut(e);return(0,yt.jsxs)("div",{className:le("group flex items-center gap-3 p-3 rounded-lg border transition-all duration-200 select-none","bg-background/60 backdrop-blur-sm hover:bg-background/90 hover:shadow-sm",e.url?"cursor-pointer hover:-translate-y-px":"","border-border/30"),onClick:()=>e.url&&window.open(e.url,"_blank"),children:[r?(0,yt.jsx)("img",{src:r,alt:e.name,className:le("w-9 h-9 rounded-lg ring-1 shrink-0",t.ringColor)}):(0,yt.jsx)("div",{className:le("w-9 h-9 rounded-lg flex items-center justify-center text-xs font-bold shrink-0",t.badgeColor),children:e.name.charAt(0).toUpperCase()}),(0,yt.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,yt.jsx)("span",{className:"text-[12px] font-bold text-foreground truncate block",children:e.name}),e.description&&(0,yt.jsx)("span",{className:"text-[10px] text-muted-foreground/50 truncate block",children:e.description})]}),e.url&&(0,yt.jsx)(zx,{className:"w-3 h-3 text-muted-foreground/20 opacity-0 group-hover:opacity-100 transition-opacity shrink-0"})]})};function Sme(e){return e.charAt(0).toUpperCase()+e.slice(1)}Kt();BM();var Ra=A(Le());tr();Kt();var _m=require("obsidian");var fe=A(oe()),Eut=({item:e,stats:t,isTopStar:r,updateRegistryItem:n,t:a})=>{let[i,s]=(0,Ra.useState)(!1),o=e.isOfficial?"bg-amber-500":e.isFeatured?"bg-amber-400":"bg-primary",l=e.isOfficial?a("Manager.Admin.Controls.Official"):e.isFeatured?a("Manager.Admin.Controls.Featured"):"NORMAL";return(0,fe.jsxs)("div",{className:"group relative border rounded-none bg-card/75 text-card-foreground shadow-xs hover:shadow-md hover:bg-muted/20 transition-all duration-300 w-full border-border/50 overflow-hidden backdrop-blur-md flex flex-col mb-2",children:[(0,fe.jsx)("div",{className:le("absolute left-0 top-0 bottom-0 w-[3px] transition-colors duration-300 z-10 bg-opacity-100",o)}),(0,fe.jsxs)("div",{className:"flex items-center gap-5 px-4 py-2 min-h-[44px] cursor-pointer select-none",onClick:()=>s(!i),children:[(0,fe.jsxs)("div",{className:le("px-2.5 py-0.5 text-[9px] uppercase tracking-[0.1em] font-extrabold rounded-none bg-background border border-border shadow-xs flex items-center gap-1.5 shrink-0",o.replace(/bg-/g,"text-")),children:[(0,fe.jsx)("span",{className:le("w-1.5 h-1.5 rounded-full shadow-sm",o)}),l]}),(0,fe.jsxs)("div",{className:"flex items-center gap-2.5 min-w-0 flex-1",children:[(0,fe.jsx)("span",{className:"font-bold truncate text-[13.5px] text-foreground/90 group-hover:text-primary transition-colors duration-300 shrink-0 max-w-[40%]",children:e.repoAddress.split("/")[1]}),(0,fe.jsx)("span",{className:"text-[10px] text-muted-foreground/50 shrink-0 font-bold bg-muted/20 px-2 py-0.5 rounded-none",children:e.repoAddress.split("/")[0]}),r&&(0,fe.jsxs)("span",{className:"text-[10px] text-amber-500 font-bold bg-amber-500/10 border border-amber-500/20 px-1.5 py-0.5 rounded-none shrink-0 flex items-center gap-1",children:[(0,fe.jsx)(AT,{className:"w-2.5 h-2.5"})," Top 3"]})]}),(0,fe.jsxs)("div",{className:"flex items-center gap-4 ml-auto shrink-0",children:[(0,fe.jsxs)("div",{className:"flex items-center gap-4 mr-2 text-muted-foreground/60 hidden md:flex",children:[(0,fe.jsxs)("div",{className:"flex items-center gap-1.5",title:a("Manager.Admin.Stats.Stars"),children:[(0,fe.jsx)(So,{className:"w-3.5 h-3.5 opacity-70"}),(0,fe.jsx)("span",{className:"text-[11px] font-mono font-medium",children:t?.stars||0})]}),(0,fe.jsxs)("div",{className:"flex items-center gap-1.5",title:a("Manager.Admin.Stats.Plugins"),children:[(0,fe.jsx)(xo,{className:"w-3.5 h-3.5 opacity-70"}),(0,fe.jsx)("span",{className:"text-[11px] font-mono font-medium",children:t?.pluginCount||0})]}),(0,fe.jsxs)("div",{className:"flex items-center gap-1.5",title:"Translations",children:[(0,fe.jsx)(Jo,{className:"w-3.5 h-3.5 opacity-70"}),(0,fe.jsx)("span",{className:"text-[11px] font-mono font-medium",children:t?.translationCount||0})]})]}),(0,fe.jsx)(we,{variant:"ghost",size:"icon",className:"h-7 w-7 rounded-none transition-all pointer-events-none group-hover:bg-primary/5 group-hover:text-primary",children:(0,fe.jsx)(Oi,{className:le("w-4 h-4 transition-transform duration-300",i&&"rotate-180")})})]})]}),i&&(0,fe.jsxs)("div",{className:"px-5 py-4 border-t border-border/30 bg-muted/10 animate-in slide-in-from-top-2 duration-200 space-y-4",children:[(0,fe.jsxs)("div",{className:"flex items-center gap-4 text-[10px] text-muted-foreground/60 p-2 rounded-md bg-background/50 border border-border/40 overflow-x-auto whitespace-nowrap",children:[(0,fe.jsxs)("div",{className:"flex items-center gap-1.5",title:"License",children:[(0,fe.jsx)(Xo,{className:"w-3 h-3"})," ",(0,fe.jsx)("span",{className:"font-mono",children:t?.license||"No License"})]}),(0,fe.jsx)(Eu,{orientation:"vertical",className:"h-3"}),(0,fe.jsxs)("div",{className:"flex items-center gap-1.5",title:"Repo Size",children:[(0,fe.jsx)(uT,{className:"w-3 h-3"})," ",(0,fe.jsxs)("span",{className:"font-mono",children:[(t?.repoSize?t.repoSize/1024:0).toFixed(1),"MB"]})]}),(0,fe.jsx)(Eu,{orientation:"vertical",className:"h-3"}),(0,fe.jsxs)("div",{className:"flex items-center gap-1.5",title:"Forks",children:[(0,fe.jsx)(kh,{className:"w-3 h-3"})," ",(0,fe.jsxs)("span",{className:"font-mono",children:[t?.forks||0," Forks"]})]}),(0,fe.jsx)(Eu,{orientation:"vertical",className:"h-3"}),(0,fe.jsxs)("div",{className:"flex items-center gap-1.5",title:"Open Issues",children:[(0,fe.jsx)(Eh,{className:"w-3 h-3"})," ",(0,fe.jsxs)("span",{className:"font-mono",children:[t?.openIssuesCount||0," Issues"]})]}),(0,fe.jsx)(Eu,{orientation:"vertical",className:"h-3"}),(0,fe.jsxs)("div",{className:"flex items-center gap-1.5",title:"Recent Commits 30d",children:[(0,fe.jsx)(To,{className:"w-3 h-3 text-blue-500/70"})," ",(0,fe.jsxs)("span",{className:"font-mono text-blue-500/70",children:[t?.recentCommits30d||0," Commits (30d)"]})]}),(0,fe.jsx)("div",{className:"ml-auto flex items-center gap-2 font-bold px-2 py-0.5 rounded-sm bg-primary/10 text-primary",children:(0,fe.jsxs)("span",{children:["Activity Score: ",Math.round((t?.activityScore||0)*100),"%"]})})]}),(0,fe.jsxs)("div",{className:"flex flex-col lg:flex-row gap-6",children:[(0,fe.jsxs)("div",{className:"flex-1 grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,fe.jsxs)("div",{className:"space-y-1.5",children:[(0,fe.jsxs)(Jr,{className:"text-[10px] font-black flex items-center gap-1.5 text-muted-foreground/60 uppercase tracking-[0.1em]",children:[(0,fe.jsx)(Fi,{className:"w-3 h-3"}),a("Manager.Admin.Fields.AuthorReputation")]}),(0,fe.jsx)(nt,{value:e.authorBadge||"",placeholder:a("Manager.Admin.Fields.AuthorReputationPlaceholder"),className:"h-8 text-[11px] bg-background border-border/60 focus:border-primary/40 focus:bg-background transition-all rounded-md font-medium",onChange:c=>n(e.repoAddress,{authorBadge:c.target.value})})]}),(0,fe.jsxs)("div",{className:"space-y-1.5",children:[(0,fe.jsxs)(Jr,{className:"text-[10px] font-black flex items-center gap-1.5 text-muted-foreground/60 uppercase tracking-[0.1em]",children:[(0,fe.jsx)(Ld,{className:"w-3 h-3"}),a("Manager.Admin.Fields.RegistryBadges")]}),(0,fe.jsx)(nt,{value:JSON.stringify(e.badges||[]),placeholder:a("Manager.Admin.Fields.RegistryBadgesPlaceholder"),className:"h-8 text-[11px] bg-background font-mono border-border/60 focus:border-primary/40 rounded-md",onChange:c=>{try{let u=JSON.parse(c.target.value);Array.isArray(u)&&n(e.repoAddress,{badges:u})}catch{}}})]}),(0,fe.jsxs)("div",{className:"space-y-1.5 md:col-span-2",children:[(0,fe.jsxs)(Jr,{className:"text-[10px] font-black flex items-center gap-1.5 text-muted-foreground/60 uppercase tracking-[0.1em]",children:[(0,fe.jsx)(yu,{className:"w-3 h-3"}),a("Manager.Admin.Fields.FeaturedContext")]}),(0,fe.jsx)(nt,{value:e.reason||"",placeholder:a("Manager.Admin.Fields.FeaturedContextPlaceholder"),className:"h-8 text-[11px] bg-background border-border/60 focus:border-primary/40 rounded-md",onChange:c=>n(e.repoAddress,{reason:c.target.value})})]})]}),(0,fe.jsx)(Eu,{orientation:"vertical",className:"hidden lg:block h-auto mx-2 opacity-30"}),(0,fe.jsxs)("div",{className:"w-full lg:w-48 shrink-0 flex flex-col justify-center gap-2",children:[(0,fe.jsxs)("div",{className:le("flex items-center justify-between p-2.5 rounded-lg border transition-all duration-300 select-none cursor-pointer group/toggle",e.isOfficial?"bg-blue-600/10 border-blue-600/30 shadow-inner":"bg-background border-border/40 hover:bg-muted/50 shadow-sm"),onClick:c=>{c.stopPropagation(),n(e.repoAddress,{isOfficial:!e.isOfficial})},children:[(0,fe.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,fe.jsx)(Mh,{className:le("w-4 h-4",e.isOfficial?"text-blue-600":"text-muted-foreground/50")}),(0,fe.jsx)("span",{className:le("text-[11px] font-bold uppercase",e.isOfficial?"text-blue-600":"text-muted-foreground"),children:a("Manager.Admin.Controls.Official")})]}),(0,fe.jsx)(Kl,{id:`off-${e.repoAddress}`,checked:e.isOfficial||!1,className:le("h-4 w-4",e.isOfficial?"border-blue-600/50 data-[state=checked]:bg-blue-600 data-[state=checked]:text-white":"border-border/60"),onCheckedChange:c=>n(e.repoAddress,{isOfficial:c}),onClick:c=>c.stopPropagation()})]}),(0,fe.jsxs)("div",{className:le("flex items-center justify-between p-2.5 rounded-lg border transition-all duration-300 select-none cursor-pointer group/toggle",e.isFeatured?"bg-amber-500/10 border-amber-500/30 shadow-inner":"bg-background border-border/40 hover:bg-muted/50 shadow-sm"),onClick:c=>{c.stopPropagation(),n(e.repoAddress,{isFeatured:!e.isFeatured})},children:[(0,fe.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,fe.jsx)(wo,{className:le("w-4 h-4",e.isFeatured?"text-amber-500 fill-amber-500":"text-muted-foreground/50")}),(0,fe.jsx)("span",{className:le("text-[11px] font-bold uppercase",e.isFeatured?"text-amber-600 dark:text-amber-500":"text-muted-foreground"),children:a("Manager.Admin.Controls.Featured")})]}),(0,fe.jsx)(Kl,{id:`feat-${e.repoAddress}`,checked:e.isFeatured||!1,className:le("h-4 w-4",e.isFeatured?"border-amber-500/50 data-[state=checked]:bg-amber-500 data-[state=checked]:text-white":"border-border/60"),onCheckedChange:c=>n(e.repoAddress,{isFeatured:c}),onClick:c=>c.stopPropagation()})]})]})]})]})]})},Iut=({contributor:e,updateContributor:t,removeContributor:r,t:n})=>{let[a,i]=(0,Ra.useState)(!1),[s,o]=(0,Ra.useState)(!1),[l,c]=(0,Ra.useState)(e.name),[u,d]=(0,Ra.useState)(e.githubUsername||""),[f,p]=(0,Ra.useState)(e.url||""),[m,h]=(0,Ra.useState)(e.description||"");(0,Ra.useEffect)(()=>{c(e.name),d(e.githubUsername||""),p(e.url||""),h(e.description||"")},[e]);let x=()=>{t(e.name,e.category,{name:l,githubUsername:u,url:f,description:m}),o(!1),new _m.Notice(n("Manager.Admin.Controls.Saved","Saved changes"))};return(0,fe.jsxs)("div",{className:"group relative border rounded-none bg-card/10 text-card-foreground shadow-xs hover:shadow-md hover:bg-muted/10 transition-all duration-300 w-full border-border/50 overflow-hidden backdrop-blur-md flex flex-col mb-1",children:[(0,fe.jsxs)("div",{className:"flex items-center gap-4 px-4 py-2 min-h-[44px] cursor-pointer select-none",onClick:()=>i(!a),children:[e.githubUsername?(0,fe.jsx)("img",{src:`https://github.com/${e.githubUsername}.png?size=40`,alt:e.name,className:"w-7 h-7 rounded-md ring-1 ring-border/30 shrink-0"}):(0,fe.jsx)("div",{className:"w-7 h-7 rounded-md bg-muted flex items-center justify-center text-[11px] font-bold shrink-0",children:e.name.charAt(0).toUpperCase()}),(0,fe.jsxs)("div",{className:"flex-1 min-w-0 flex items-center gap-2",children:[(0,fe.jsx)("span",{className:"text-[12px] font-bold truncate block group-hover:text-primary transition-colors",children:e.name}),e.githubUsername&&(0,fe.jsxs)("span",{className:"text-[9px] text-muted-foreground/50 font-mono bg-muted/40 px-1.5 py-0.5 rounded-sm",children:["@",e.githubUsername]})]}),(0,fe.jsxs)("div",{className:"flex items-center gap-4 ml-auto shrink-0",children:[(0,fe.jsx)("div",{className:"flex items-center gap-4 mr-2 text-muted-foreground/60 hidden md:flex",children:e.description?(0,fe.jsx)("span",{className:"text-[10px] truncate max-w-48",title:e.description,children:e.description}):(0,fe.jsx)("span",{className:"text-[10px] italic opacity-50",children:"-"})}),(0,fe.jsx)(we,{variant:"ghost",size:"icon",className:"h-7 w-7 rounded-none transition-all pointer-events-none group-hover:bg-primary/5 group-hover:text-primary",children:(0,fe.jsx)(Oi,{className:le("w-4 h-4 transition-transform duration-300",a&&"rotate-180")})})]})]}),a&&(0,fe.jsx)("div",{className:"px-5 py-4 border-t border-border/30 bg-muted/5 animate-in slide-in-from-top-2 duration-200",children:(0,fe.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,fe.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,fe.jsxs)("div",{className:"space-y-1.5",children:[(0,fe.jsx)(Jr,{className:"text-[10px] font-black uppercase tracking-widest text-muted-foreground/60",children:n("Manager.Admin.ContributorsManagement.Name")}),(0,fe.jsx)(nt,{value:l,onChange:g=>c(g.target.value),className:le("h-8 text-[11px] bg-background border-border/60 transition-all focus:border-primary/50",s&&"shadow-sm"),disabled:!s})]}),(0,fe.jsxs)("div",{className:"space-y-1.5",children:[(0,fe.jsx)(Jr,{className:"text-[10px] font-black uppercase tracking-widest text-muted-foreground/60",children:n("Manager.Admin.ContributorsManagement.Github")}),(0,fe.jsx)(nt,{value:u,onChange:g=>d(g.target.value),className:le("h-8 text-[11px] bg-background border-border/60 transition-all focus:border-primary/50",s&&"shadow-sm"),disabled:!s})]}),(0,fe.jsxs)("div",{className:"space-y-1.5",children:[(0,fe.jsx)(Jr,{className:"text-[10px] font-black uppercase tracking-widest text-muted-foreground/60",children:n("Manager.Admin.ContributorsManagement.Url")}),(0,fe.jsx)(nt,{value:f,onChange:g=>p(g.target.value),className:le("h-8 text-[11px] bg-background border-border/60 transition-all focus:border-primary/50",s&&"shadow-sm"),disabled:!s})]}),(0,fe.jsxs)("div",{className:"space-y-1.5",children:[(0,fe.jsx)(Jr,{className:"text-[10px] font-black uppercase tracking-widest text-muted-foreground/60",children:n("Manager.Admin.ContributorsManagement.Description")}),(0,fe.jsx)(nt,{value:m,onChange:g=>h(g.target.value),className:le("h-8 text-[11px] bg-background border-border/60 transition-all focus:border-primary/50",s&&"shadow-sm"),disabled:!s})]})]}),(0,fe.jsxs)("div",{className:"flex items-center justify-between border-t border-border/20 pt-4 mt-2",children:[(0,fe.jsxs)(we,{variant:"ghost",size:"sm",className:"h-7 px-3 gap-1.5 text-destructive hover:bg-destructive/10 text-[10px] font-bold",onClick:()=>{r(e.name,e.category),new _m.Notice(n("Manager.Admin.ContributorsManagement.RemoveSuccess",{name:e.name}))},children:[(0,fe.jsx)(aa,{className:"w-3 h-3"}),n("Manager.Admin.ContributorsManagement.Remove")]}),s?(0,fe.jsxs)("div",{className:"flex gap-2",children:[(0,fe.jsx)(we,{variant:"ghost",size:"sm",className:"h-7 text-[10px] font-bold",onClick:()=>{o(!1),c(e.name),d(e.githubUsername||""),p(e.url||""),h(e.description||"")},children:"Cancel"}),(0,fe.jsx)(we,{variant:"default",size:"sm",className:"h-7 px-3 text-[10px] font-bold",disabled:!l.trim(),onClick:x,children:"Save Changes"})]}):(0,fe.jsxs)(we,{variant:"outline",size:"sm",className:"h-7 px-3 gap-1.5 text-[10px] font-bold bg-background",onClick:()=>o(!0),children:[(0,fe.jsx)(Zo,{className:"w-3 h-3"}),"Edit Details"]})]})]})})]})},wme=({i18n:e})=>{let{t}=Ve(),r=Te.use.communityRegistry(),n=Te.use.communityStats(),a=Te.use.communityLoaded(),i=Te.use.communityLoading(),s=Te.use.isPushing(),o=Te.use.fetchCommunityRegistry(),l=Te.use.pushRegistryToCloud(),c=Te.use.updateRegistryItem(),u=Te.use.contributors(),d=Te.use.contributorsLoaded(),f=Te.use.fetchContributors(),p=Te.use.addContributor(),m=Te.use.removeContributor(),h=Te.use.updateContributor(),x=Te.use.pushContributorsToCloud();(0,Ra.useEffect)(()=>{!a&&!i&&o(e),d||f(e)},[a,i,o,d,f,e]);let[g,y]=(0,Ra.useState)("registry"),[b,S]=(0,Ra.useState)(""),[w,E]=(0,Ra.useState)(!1),[C,N]=(0,Ra.useState)(!1),[_,O]=(0,Ra.useState)(""),[D,W]=(0,Ra.useState)("code"),[Z,me]=(0,Ra.useState)(""),[Q,V]=(0,Ra.useState)(""),[U,k]=(0,Ra.useState)(""),L=(0,Ra.useMemo)(()=>{if(!b)return r;let se=b.toLowerCase();return r.filter(ne=>ne.repoAddress.toLowerCase().includes(se)||(ne.authorBadge||"").toLowerCase().includes(se))},[r,b]),M=()=>{let se=JSON.stringify(r,null,2);navigator.clipboard.writeText(se),E(!0),new _m.Notice(t("Manager.Common.Notices.CopySuccess")),setTimeout(()=>E(!1),2e3)},ee=async()=>{await l(e)?new _m.Notice(t("Manager.Common.Notices.SyncSuccess")):new _m.Notice(t("Manager.Common.Errors.SyncFailed"))};return(0,fe.jsxs)(Zl,{defaultValue:"registry",value:g,onValueChange:y,className:"flex-1 min-h-0 flex flex-col w-full h-full bg-background select-none overflow-hidden",children:[(0,fe.jsx)("div",{className:"flex flex-col gap-4 py-2 px-4 border-b shrink-0 bg-background",children:(0,fe.jsxs)("div",{className:"flex items-center justify-between flex-wrap gap-2",children:[(0,fe.jsxs)(Ql,{className:"h-9",children:[(0,fe.jsx)(sa,{value:"registry",className:"text-[13px] px-4",children:t("Manager.Admin.Management.Title")}),(0,fe.jsx)(sa,{value:"contributors",className:"text-[13px] px-4",children:t("Manager.Admin.ContributorsManagement.Title")})]}),(0,fe.jsxs)("div",{className:"flex items-center gap-2",children:[g==="registry"&&(0,fe.jsxs)(fe.Fragment,{children:[(0,fe.jsxs)("div",{className:"relative flex-1 min-w-[200px]",children:[(0,fe.jsx)(fn,{className:"absolute left-2.5 top-2.5 h-4 w-4 text-muted-foreground/70"}),(0,fe.jsx)(nt,{placeholder:t("Manager.Admin.SearchPlaceholder"),className:"pl-8 h-9 rounded-md border-muted-foreground/20 focus:ring-1 text-[13px] bg-muted/10 shadow-sm transition-colors hover:bg-muted/20",value:b,onChange:se=>S(se.target.value)})]}),(0,fe.jsxs)("div",{className:"flex items-center rounded-md border border-muted-foreground/20 bg-background shadow-sm h-9 ml-2",children:[(0,fe.jsxs)(we,{variant:"ghost",size:"sm",className:"h-9 px-3 gap-1.5 border-r border-muted-foreground/20 hover:bg-primary/5 hover:text-primary group rounded-none rounded-l-md",onClick:ee,disabled:s,children:[s?(0,fe.jsx)(Gt,{className:"w-4 h-4 text-muted-foreground/70 group-hover:text-primary animate-spin"}):(0,fe.jsx)(Bn,{className:"w-4 h-4 text-muted-foreground/70 group-hover:text-primary"}),(0,fe.jsx)("span",{className:"text-[13px] text-muted-foreground/90 group-hover:text-primary hidden lg:inline",children:t("Manager.Admin.PushToCloud")})]}),(0,fe.jsx)(we,{variant:"ghost",size:"sm",className:"h-9 px-3 hover:bg-primary/5 hover:text-primary group rounded-none rounded-r-md",onClick:M,title:t("Manager.Admin.ExportJson"),children:w?(0,fe.jsx)(Tc,{className:"w-4 h-4 text-green-500"}):(0,fe.jsx)(Ad,{className:"w-4 h-4 text-muted-foreground/70 group-hover:text-primary"})})]})]}),g==="contributors"&&(0,fe.jsx)("div",{className:"flex items-center rounded-md border border-muted-foreground/20 bg-background shadow-sm h-9",children:(0,fe.jsxs)(we,{variant:"ghost",size:"sm",className:"h-9 px-3 gap-1.5 hover:bg-primary/5 hover:text-primary group rounded-md",onClick:async()=>{let se=await x(e);new _m.Notice(t(se?"Manager.Common.Notices.SyncSuccess":"Manager.Common.Errors.SyncFailed"))},disabled:s,children:[s?(0,fe.jsx)(Gt,{className:"w-4 h-4 text-muted-foreground/70 group-hover:text-primary animate-spin"}):(0,fe.jsx)(Bn,{className:"w-4 h-4 text-muted-foreground/70 group-hover:text-primary"}),(0,fe.jsx)("span",{className:"text-[13px] text-muted-foreground/90 group-hover:text-primary hidden lg:inline",children:t("Manager.Admin.ContributorsManagement.PushToCloud")})]})})]})]})}),(0,fe.jsx)(bn,{value:"registry",className:"flex-1 min-h-0 m-0 border-none p-0 data-[state=active]:flex flex-col outline-none",children:(0,fe.jsx)(dr,{className:"flex-1 min-h-0 w-full bg-background",children:(0,fe.jsxs)("div",{className:"px-4 py-4 w-full h-full max-w-[1600px] mx-auto space-y-4",children:[(0,fe.jsxs)("div",{className:"flex items-center justify-between px-1",children:[(0,fe.jsx)("h3",{className:"text-sm font-bold text-foreground/80",children:t("Manager.Admin.Management.Title")}),(0,fe.jsx)("div",{className:"text-xs font-medium text-muted-foreground/50",children:t("Manager.Admin.Management.ShowingStats",{filtered:L.length,total:r.length})})]}),i?(0,fe.jsxs)("div",{className:"flex flex-col items-center justify-center py-24 text-muted-foreground bg-muted/5 rounded-2xl border border-dashed text-center",children:[(0,fe.jsx)(nn,{className:"w-10 h-10 animate-spin text-primary/30 mb-4 mx-auto"}),(0,fe.jsx)("p",{className:"text-[10px] font-black uppercase tracking-widest opacity-40",children:t("Manager.Admin.Management.SyncingData")})]}):L.length===0?(0,fe.jsxs)("div",{className:"flex flex-col items-center justify-center py-24 text-muted-foreground bg-muted/5 rounded-2xl border border-dashed text-center",children:[(0,fe.jsx)(xo,{className:"w-12 h-12 opacity-10 mb-4 mx-auto"}),(0,fe.jsx)("h3",{className:"text-xs font-black uppercase tracking-wider opacity-30",children:t("Manager.Admin.Management.NoData")})]}):(0,fe.jsx)("div",{className:"grid grid-cols-1 gap-2",children:L.map(se=>{let ne=n?.repos?.[se.repoAddress],ge=n?.leaderboard?.topReposByStars.slice(0,3).includes(se.repoAddress);return(0,fe.jsx)(Eut,{item:se,stats:ne,isTopStar:ge,updateRegistryItem:c,t},se.repoAddress)})})]})})}),(0,fe.jsx)(bn,{value:"contributors",className:"flex-1 min-h-0 m-0 border-none p-0 data-[state=active]:flex flex-col outline-none",children:(0,fe.jsx)(dr,{className:"flex-1 min-h-0 w-full bg-background",children:(0,fe.jsxs)("div",{className:"px-4 py-4 w-full h-full max-w-[1600px] mx-auto space-y-4",children:[(0,fe.jsxs)("div",{className:"flex items-center justify-between px-1",children:[(0,fe.jsx)("h3",{className:"text-sm font-bold text-foreground/80",children:t("Manager.Admin.ContributorsManagement.Title")}),(0,fe.jsx)(vt,{variant:"secondary",className:"text-xs font-mono",children:u.length})]}),(0,fe.jsxs)("div",{className:"group relative border rounded-none bg-card/20 text-card-foreground hover:bg-muted/10 transition-all duration-300 w-full border-border/50 border-dashed overflow-hidden flex flex-col mb-4",children:[(0,fe.jsxs)("div",{className:"flex items-center gap-3 px-4 py-3 cursor-pointer",onClick:()=>N(!C),children:[(0,fe.jsx)("div",{className:"p-1 rounded-sm bg-primary/10 text-primary",children:(0,fe.jsx)(xi,{className:"w-3 h-3"})}),(0,fe.jsx)("span",{className:"text-[11px] font-bold text-muted-foreground uppercase tracking-widest",children:t("Manager.Admin.ContributorsManagement.AddNew")})]}),C&&(0,fe.jsx)("div",{className:"px-3 py-3 border-t border-border/30 border-dashed bg-muted/5 animate-in slide-in-from-top-1 duration-200",children:(0,fe.jsxs)("div",{className:"flex flex-col md:flex-row items-center gap-2",children:[(0,fe.jsxs)("select",{className:"h-8 w-full md:w-24 rounded-md border border-border/60 bg-background px-2 text-[11px] focus:outline-none focus:border-primary/50 cursor-pointer",value:D,onChange:se=>W(se.target.value),children:[(0,fe.jsx)("option",{value:"code",children:"\u{1F4BB} \u4EE3\u7801"}),(0,fe.jsx)("option",{value:"video",children:"\u{1F3AC} \u89C6\u9891"}),(0,fe.jsx)("option",{value:"testing",children:"\u{1F9EA} \u6D4B\u8BD5"}),(0,fe.jsx)("option",{value:"suggestion",children:"\u{1F4AC} \u5EFA\u8BAE"})]}),(0,fe.jsxs)("div",{className:"flex-1 flex flex-wrap lg:flex-nowrap items-center gap-2 w-full",children:[(0,fe.jsx)(nt,{placeholder:t("Manager.Admin.ContributorsManagement.Name"),className:"h-8 w-full md:w-28 text-[11px] bg-background border-border/60 focus:border-primary/50 shadow-sm",value:_,onChange:se=>O(se.target.value)}),(0,fe.jsx)(nt,{placeholder:"GitHub ID",className:"h-8 w-full md:w-28 text-[11px] bg-background border-border/60 focus:border-primary/50 shadow-sm",value:Q,onChange:se=>V(se.target.value)}),(0,fe.jsx)(nt,{placeholder:"URL",className:"h-8 flex-1 min-w-[100px] text-[11px] bg-background border-border/60 focus:border-primary/50 shadow-sm",value:Z,onChange:se=>me(se.target.value)}),(0,fe.jsx)(nt,{placeholder:"Description",className:"h-8 w-full lg:w-48 text-[11px] bg-background border-border/60 focus:border-primary/50 shadow-sm",value:U,onChange:se=>k(se.target.value)})]}),(0,fe.jsxs)(we,{variant:"default",size:"sm",className:"h-8 px-3 ml-auto text-[10px] font-bold shrink-0 mt-2 md:mt-0",disabled:!_.trim(),onClick:()=>{p({name:_.trim(),category:D,url:Z.trim()||void 0,githubUsername:Q.trim()||void 0,description:U.trim()||void 0}),O(""),me(""),V(""),k(""),N(!1),new _m.Notice(t("Manager.Admin.ContributorsManagement.AddSuccess",{name:_.trim()}))},children:[(0,fe.jsx)(xi,{className:"w-3.5 h-3.5"}),t("Manager.Admin.ContributorsManagement.Add")]})]})})]}),u.length>0&&(0,fe.jsx)("div",{className:"space-y-4",children:["code","video","testing","suggestion"].map(se=>{let ne=u.filter(H=>H.category===se);if(ne.length===0)return null;let ue={code:{icon:(0,fe.jsx)(Ko,{className:"w-3.5 h-3.5"}),label:"\u4EE3\u7801\u8D21\u732E\u8005",color:"text-emerald-500"},video:{icon:(0,fe.jsx)(Bh,{className:"w-3.5 h-3.5"}),label:"\u89C6\u9891\u521B\u4F5C\u8005",color:"text-rose-500"},testing:{icon:(0,fe.jsx)(Oh,{className:"w-3.5 h-3.5"}),label:"\u6D4B\u8BD5\u8D21\u732E\u8005",color:"text-amber-500"},suggestion:{icon:(0,fe.jsx)(yu,{className:"w-3.5 h-3.5"}),label:"\u5EFA\u8BAE\u8D21\u732E\u8005",color:"text-violet-500"}}[se];return(0,fe.jsxs)("div",{className:"space-y-2 pb-2",children:[(0,fe.jsxs)("div",{className:"flex items-center gap-2 px-1 mb-1",children:[(0,fe.jsxs)("span",{className:le("flex items-center gap-1.5 text-[10px] font-black uppercase tracking-widest",ue.color),children:[ue.icon,ue.label]}),(0,fe.jsx)(vt,{variant:"secondary",className:"text-[9px] px-1.5 py-0 h-4 font-mono",children:ne.length})]}),(0,fe.jsx)("div",{className:"flex flex-col gap-1",children:ne.map(H=>(0,fe.jsx)(Iut,{contributor:H,updateContributor:h,removeContributor:m,t},`${H.category}-${H.name}`))})]},se)})})]})})})]})};var kt=A(oe()),Pme=({i18n:e,close:t})=>{let{t:r}=Ve(),n=e.app,a=Te.use.isAdmin(),i=Te.use.githubUser(),s=Te.use.fetchGithubUser();return(0,Cme.useEffect)(()=>{e.settings.shareToken&&!i&&s(e)},[e.settings.shareToken,i,s,e]),(0,kt.jsx)("div",{className:"flex flex-col h-full bg-background overflow-hidden",children:(0,kt.jsxs)(Zl,{defaultValue:e.settings.managerTab||"plugins",onValueChange:o=>{e.settings.managerTab=o,e.saveSettings()},className:"flex flex-col h-full gap-0",children:[(0,kt.jsxs)("div",{className:"flex items-center justify-between px-4 py-2 border-b shrink-0",children:[(0,kt.jsxs)(Ql,{className:"h-9 p-1 bg-muted/50 border rounded-none shadow-inner",children:[(0,kt.jsxs)(sa,{className:"h-7 text-xs data-[state=active]:shadow-sm gap-1.5 px-3 rounded-none",value:"plugins",children:[(0,kt.jsx)(xo,{className:"w-3.5 h-3.5"}),r("Manager.Plugins.TabName")]}),(0,kt.jsxs)(sa,{className:"h-7 text-xs data-[state=active]:shadow-sm gap-1.5 px-3 rounded-none",value:"themes",children:[(0,kt.jsx)(Yn,{className:"w-3.5 h-3.5"}),r("Manager.Themes.TabName")]}),(0,kt.jsxs)(sa,{className:"h-7 text-xs data-[state=active]:shadow-sm gap-1.5 px-3 rounded-none",value:"sources",children:[(0,kt.jsx)(Ad,{className:"w-3.5 h-3.5"}),r("Manager.Sources.TabName")]}),(0,kt.jsxs)(sa,{className:"h-7 text-xs data-[state=active]:shadow-sm gap-1.5 px-3 rounded-none",value:"auto",children:[(0,kt.jsx)(TT,{className:"w-3.5 h-3.5"}),r("Manager.Auto.TabName","\u81EA\u52A8\u5316")]}),(0,kt.jsxs)(sa,{className:"h-7 text-xs data-[state=active]:shadow-sm gap-1.5 px-3 rounded-none",value:"credits",children:[(0,kt.jsx)(Ld,{className:"w-3.5 h-3.5"}),r("Manager.Credits.TabName","\u9E23\u8C22")]}),a&&(0,kt.jsxs)(sa,{className:"h-7 text-xs data-[state=active]:shadow-sm gap-1.5 px-3 rounded-none",value:"admin",children:[(0,kt.jsx)(bu,{className:"w-3.5 h-3.5"}),r("Manager.Admin.TabName","\u7BA1\u7406")]})]}),(0,kt.jsxs)("div",{className:"flex items-center border rounded-none divide-x bg-background shadow-sm overflow-hidden",children:[(0,kt.jsx)(ti,{children:(0,kt.jsxs)(oa,{children:[(0,kt.jsx)(la,{asChild:!0,children:(0,kt.jsxs)(we,{variant:"ghost",className:"rounded-none h-9 px-3 hover:bg-muted gap-2 text-xs",onClick:()=>window.open(Ls.SPONSOR),children:[(0,kt.jsx)(Ih,{className:"w-4 h-4"}),(0,kt.jsx)("span",{children:r("Manager.Common.Actions.Sponsor")})]})}),(0,kt.jsx)(ca,{children:r("Manager.Common.Actions.Sponsor")})]})}),(0,kt.jsx)(ti,{children:(0,kt.jsxs)(oa,{children:[(0,kt.jsx)(la,{asChild:!0,children:(0,kt.jsxs)(we,{variant:"ghost",className:"rounded-none h-9 px-3 hover:bg-muted gap-2 text-xs",onClick:()=>{e.view.activateView($v)},children:[(0,kt.jsx)(wc,{className:"w-4 h-4"}),(0,kt.jsx)("span",{children:r("Manager.Common.Actions.Help")})]})}),(0,kt.jsx)(ca,{children:r("Manager.Common.Actions.HelpDoc")})]})}),(0,kt.jsx)(ti,{children:(0,kt.jsxs)(oa,{children:[(0,kt.jsx)(la,{asChild:!0,children:(0,kt.jsxs)(we,{variant:"ghost",className:"rounded-none h-9 px-3 hover:bg-muted gap-2 text-xs",onClick:()=>{e.view.activateView(zv)},children:[(0,kt.jsx)(Bn,{className:"w-4 h-4"}),(0,kt.jsx)("span",{children:r("Manager.Common.Actions.Cloud")})]})}),(0,kt.jsx)(ca,{children:r("Manager.Common.Actions.Cloud")})]})}),(0,kt.jsx)(ti,{children:(0,kt.jsxs)(oa,{children:[(0,kt.jsx)(la,{asChild:!0,children:(0,kt.jsxs)(we,{variant:"ghost",className:"rounded-none h-9 px-3 hover:bg-muted gap-2 text-xs",onClick:()=>{n.setting.open(),n.setting.openTabById(e.manifest.id)},children:[(0,kt.jsx)(xu,{className:"w-4 h-4"}),(0,kt.jsx)("span",{children:r("Manager.Common.Actions.Settings")})]})}),(0,kt.jsx)(ca,{children:r("Manager.Common.Actions.Settings")})]})})]})]}),(0,kt.jsx)(bn,{value:"plugins",className:"flex-1 min-h-0 m-0 focus-visible:ring-0",children:(0,kt.jsx)(fme,{i18n:e,close:t})}),(0,kt.jsx)(bn,{value:"themes",className:"flex-1 min-h-0 m-0 focus-visible:ring-0",children:(0,kt.jsx)(hme,{i18n:e})}),(0,kt.jsx)(bn,{value:"sources",className:"flex-1 min-h-0 m-0 focus-visible:ring-0 overflow-hidden flex flex-col",children:(0,kt.jsx)(bme,{i18n:e})}),(0,kt.jsx)(bn,{value:"auto",className:"flex-1 min-h-0 m-0 focus-visible:ring-0 overflow-y-auto w-full",children:(0,kt.jsx)(yme,{i18n:e})}),(0,kt.jsx)(bn,{value:"credits",className:"flex-1 min-h-0 m-0 focus-visible:ring-0 overflow-hidden flex flex-col",children:(0,kt.jsx)(Tme,{i18n:e})}),a&&(0,kt.jsx)(bn,{value:"admin",className:"flex-1 min-h-0 m-0 focus-visible:ring-0 overflow-hidden flex flex-col",children:(0,kt.jsx)(wme,{i18n:e})})]})})};$r();$t();var Ime=A(oe()),Lm="i18n-manager-view",m_=class extends Eme.ItemView{constructor(r,n){super(r);this.root=null;this.shadowRoot=null;this.i18n=n}getViewType(){return Lm}getDisplayText(){return v("Manager.Common.Titles.Main")}getIcon(){return"layout-grid"}async onOpen(){let{root:r,shadowRoot:n}=el(this.contentEl,this.i18n,(0,Ime.jsx)(Pme,{i18n:this.i18n,close:()=>{this.leaf.detach()}}));this.root=r,this.shadowRoot=n}async onClose(){this.root?.unmount(),this.shadowRoot&&(this.shadowRoot.innerHTML="")}};$r();var Aut=(e,t)=>{t.addCommand({id:"i18n-translate",name:v("command.open_panel"),callback:()=>{t.view.activateView(Lm)}}),t.addCommand({id:"i18n-auto-manager",name:v("Manager.Auto.TabName"),callback:()=>{t.settings.managerTab="auto",t.saveSettings(),t.view.activateView(Lm)}})},Ame=Aut;var Hv=class{constructor(t){this.github=new Kx(t)}static getInstance(t){return Hv.instance||(Hv.instance=new Hv(t)),Hv.instance}},Gv=Hv;Gv.instance=null;var kme=(a=>(a[a.DEBUG=1]="DEBUG",a[a.INFO=2]="INFO",a[a.WARN=4]="WARN",a[a.ERROR=8]="ERROR",a))(kme||{}),Nut={[1]:"\u8C03\u8BD5",[2]:"\u4FE1\u606F",[4]:"\u8B66\u544A",[8]:"\u9519\u8BEF"},Nme={[1]:" #409EFF;",[2]:" #67C23A;",[4]:" #E6A23C;",[8]:" #F56C6C;"},Gu=class{constructor(t=Object.values(kme).filter(r=>typeof r=="number")){this.shouldLog=t=>this.enabledTypes.has(t);this.getFormattedTimestamp=()=>new Intl.DateTimeFormat("zh-CN",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",fractionalSecondDigits:3}).format(new Date);this.log=(t,r,...n)=>{if(this.shouldLog(t)){let a=Nut[t],i=this.getFormattedTimestamp(),s=`border-radius: 2px; padding: 2px 6px; font-size: 10px; color: #fff; background: ${Nme[t]};text-align: center;`,o=`color:${Nme[t]}`,l=[`%c${a}%c [${i}]`,s,o],c=`${r}`,u=!1;for(let d=0;d<n.length;d++){let f=n[d],p=d<n.length-1?n[d+1]:null;typeof f=="string"&&f.endsWith("\uFF1A")&&p&&typeof p=="object"?(c+=`
${f}`,u=!0):u&&typeof f=="object"?u=!1:(typeof f=="string"||typeof f=="number"||typeof f=="boolean")&&(c+=`
${f}`)}l.push(`
${c}`);for(let d=0;d<n.length;d++){let f=n[d];typeof f=="object"&&f!==null&&l.push(f)}}};this.debug=(t,...r)=>this.log(1,t,...r);this.info=(t,...r)=>this.log(2,t,...r);this.warn=(t,...r)=>this.log(4,t,...r);this.error=(t,...r)=>this.log(8,t,...r);this.enabledTypes=new Set(t)}setLogLevel(t){this.enabledTypes=new Set(t)}static getInstance(){return Gu.instance||(Gu.instance=new Gu),Gu.instance}};var _me=require("obsidian");$r();var Qg=class{constructor(t){this.notices=[];this.i18n=t}static getInstance(t){return Qg.instance||(Qg.instance=new Qg(t)),Qg.instance}createNotice(t,r,n){let i=`${{primary:"\u2728",success:"\u2705",info:"\u2139\uFE0F",warning:"\u26A0\uFE0F",error:"\u274C"}[r]||""} ${t}`,s=new _me.Notice(i,n);switch(s.containerEl.addClass("rounded-lg","border","shadow-md","backdrop-blur-md","p-4","mb-2","animate-in","fade-in","slide-in-from-right-4","duration-300"),r){case"primary":s.containerEl.addClass("bg-primary/10","text-primary","border-primary/20");break;case"success":s.containerEl.addClass("bg-emerald-500/10","text-emerald-600","border-emerald-500/20");break;case"info":s.containerEl.addClass("bg-sky-500/10","text-sky-600","border-sky-500/20");break;case"warning":s.containerEl.addClass("bg-amber-500/10","text-amber-600","border-amber-500/20");break;case"error":s.containerEl.addClass("bg-destructive/10","text-destructive","border-destructive/20");break}return s}addNotice(t){this.notices.length>=Qg.MAX_NOTICE_QUEUE&&(this.notices[0].containerEl.remove(),this.notices.shift()),this.notices.push(t)}primary(t,r=4e3){let n=this.createNotice(`${t}`,"primary",r);this.addNotice(n)}success(t,r=4e3){let n=this.createNotice(`${t}`,"success",r);this.addNotice(n)}info(t,r=4e3){let n=this.createNotice(`${t}`,"info",r);this.addNotice(n)}warning(t,r=4e3){let n=this.createNotice(`${t}`,"warning",r);this.addNotice(n)}error(t,r=1e4){let n=this.createNotice(`${t}`,"error",r);this.addNotice(n)}primaryPrefix(t,r,n=4e3){let a=this.createNotice(`[${t}] ${r}`,"primary",n);this.addNotice(a)}successPrefix(t,r,n=4e3){let a=this.createNotice(`[${t}] ${r}`,"success",n);this.addNotice(a)}infoPrefix(t,r,n=4e3){let a=this.createNotice(`[${t}] ${r}`,"info",n);this.addNotice(a)}warningPrefix(t,r,n=4e3){let a=this.createNotice(`[${t}] ${r}`,"warning",n);this.addNotice(a)}errorPrefix(t,r,n=1e4){let a=this.createNotice(`[${t}] ${r}`,"error",n);this.addNotice(a)}resultPrefix(t,r,n="",a=4e3){let i;r?i=n?`[${t}] ${v("Common.Notices.Success")}
${n}`:`[${t}] ${v("Common.Notices.Success")}`:i=`[${t}] ${v("Common.Notices.Failure")}
${n}`;let s=this.createNotice(i,r?"success":"error",r?a:1e4);this.addNotice(s)}result(t,r="",n=4e3){let a;t?a=r?`${v("Common.Notices.Success")}
${r}`:v("Common.Notices.Success"):a=`${v("Common.Notices.Failure")}
${r}`;let i=this.createNotice(a,t?"success":"error",t?n:1e4);this.addNotice(i)}reload(){this.notices.forEach(t=>t.containerEl.remove()),this.notices.length=0}},ey=Qg;ey.instance=null,ey.MAX_NOTICE_QUEUE=100;var dU=class{constructor(t,r,n,a,i){this.leafType="window";if(!t)throw new Error("i18n \u5B9E\u4F8B\u4E0D\u53EF\u4E3A\u7A7A");if(!r)throw new Error("\u89C6\u56FE\u7C7B\u578B type \u4E0D\u53EF\u4E3A\u7A7A");if(!n)throw new Error("\u89C6\u56FE\u521B\u5EFA\u5668 viewCreator \u4E0D\u53EF\u4E3A\u7A7A");this.i18n=t,this.viewType=r,this.leafType=a,this.viewOption=i,this.i18n.registerView(this.viewType,n)}async activate(){let{workspace:t}=this.i18n.app;await new Promise(a=>t.onLayoutReady(()=>a(null))),this.deactivate();let r=null,n=t.getLeavesOfType(this.viewType);if(n.length>0)r=n[0];else{try{r=t.getLeaf(this.leafType)}catch{r=t.getLeaf("window")}if(r&&(await r.setViewState({type:this.viewType,active:!0}),(this.leafType==="window"||r.containerEl.ownerDocument!==document)&&this.viewOption)){let a=r.view.containerEl.ownerDocument.defaultView;if(a){let i=this.viewOption.width||a.outerWidth,s=this.viewOption.height||a.outerHeight;a.resizeTo(i,s);let o=(a.screen.availWidth-i)/2,l=(a.screen.availHeight-s)/2;a.moveTo(o,l)}}}r&&t.revealLeaf(r)}deactivate(){this.i18n.app.workspace.detachLeavesOfType(this.viewType)}},ty=class{constructor(t){this.i18n=t,this.views=new Map}static getInstance(t){if(!t)throw new Error("i18n \u5B9E\u4F8B\u4E0D\u53EF\u4E3A\u7A7A");if(!ty.instance)ty.instance=new ty(t);else if(ty.instance.i18n!==t)throw new Error("ViewManager \u5DF2\u4F7F\u7528\u4E0D\u540C\u7684 I18N \u5B9E\u4F8B\u521D\u59CB\u5316");return ty.instance}addView(t,r,n="window",a){if(this.views.has(t))throw new Error(`\u89C6\u56FE\u7C7B\u578B ${t} \u5DF2\u5B58\u5728`);let i=new dU(this.i18n,t,r,n,a);return this.views.set(t,i),i}getView(t){return this.views.get(t)}getAllViews(){return Array.from(this.views.values())}async activateView(t){let r=this.getView(t);if(r)await r.activate();else throw new Error(`\u89C6\u56FE\u7C7B\u578B ${t} \u4E0D\u5B58\u5728`)}deactivateView(t){let r=this.getView(t);if(r)r.deactivate();else throw new Error(`\u89C6\u56FE\u7C7B\u578B ${t} \u4E0D\u5B58\u5728`)}deactivateAllViews(){this.views.forEach(t=>t.deactivate())}removeView(t){let r=this.views.get(t);r&&(r.deactivate(),this.views.delete(t))}removeAllViews(){this.deactivateAllViews(),this.views.clear()}},Kv=ty;Kv.instance=null;var Ku=A(require("path")),gl=A(ii()),Lme=require("obsidian"),MC=class{constructor(t){this.data={plugins:{},themes:{}};this.save=(0,Lme.debounce)(()=>{try{gl.outputJsonSync(this.path,this.data,{spaces:4})}catch{}},1e3,!0);this.plugin=t;let r=this.plugin.app.vault.adapter.getBasePath();this.path=Ku.join(r,this.plugin.manifest.dir||"","states.json"),this.load()}load(){if(gl.pathExistsSync(this.path))try{this.data=gl.readJsonSync(this.path),this.data.plugins||(this.data.plugins={}),this.data.themes||(this.data.themes={})}catch{this.data={plugins:{},themes:{}}}}getPluginState(t){return this.data.plugins[t]}setPluginState(t,r){this.data.plugins[t]=r,this.save()}deletePluginState(t){this.data.plugins[t]&&(delete this.data.plugins[t],this.save())}clearAllStates(){this.data={plugins:{},themes:{}},this.save()}getAllPluginStates(){return this.data.plugins||{}}getAllThemeStates(){return this.data.themes||{}}getThemeState(t){return this.data.themes[t]}setThemeState(t,r){this.data.themes[t]=r,this.save()}deleteThemeState(t){this.data.themes[t]&&(delete this.data.themes[t],this.save())}async validateVersions(t){let r=Object.values(t.plugins.manifests),n=!1;for(let a of r){let i=this.getPluginState(a.id);i&&i.pluginVersion!==a.version&&(i.isApplied?(i.isApplied=!1,i.pluginVersion=a.version,n=!0):(i.pluginVersion=a.version,n=!0))}try{let a=t.vault.adapter.getBasePath?Ku.normalize(t.vault.adapter.getBasePath()):"";if(a){let i=Ku.join(a,t.vault.configDir,"themes");if(gl.existsSync(i)){let s=gl.readdirSync(i,{withFileTypes:!0});for(let o of s){if(!o.isDirectory())continue;let l=o.name,c=Ku.join(i,l,"manifest.json"),u="0.0.0";if(gl.existsSync(c))try{let f=gl.readJsonSync(c);f&&f.version&&(u=f.version)}catch{}let d=this.getThemeState(l);d&&d.pluginVersion!==u&&(d.isApplied=!1,d.pluginVersion=u,n=!0)}}}}catch{}n&&this.save()}async cleanupRemovedResources(t){let r=t.plugins.manifests,n=!1,a=Object.keys(this.data.plugins);for(let s of a)if(!r[s]){if(this.data.plugins[s].isApplied&&this.plugin.backupManager.hasBackup(s)){let l=t.vault.adapter.getBasePath?Ku.normalize(t.vault.adapter.getBasePath()):"",c=Ku.join(l,t.vault.configDir,"plugins",s);try{await this.plugin.backupManager.restoreBackup(s,c)}catch{await this.plugin.backupManager.removeBackup(s)}}else await this.plugin.backupManager.removeBackup(s);delete this.data.plugins[s],n=!0}let i=Object.keys(this.data.themes);for(let s of i){let o=t.vault.adapter.getBasePath?Ku.normalize(t.vault.adapter.getBasePath()):"";if(!o)continue;let l=Ku.join(o,t.vault.configDir,"themes",s);if(!gl.existsSync(l)){let c=this.data.themes[s];await this.plugin.backupManager.removeBackup(s),delete this.data.themes[s],n=!0}}n&&this.save()}};var ci=A(require("path")),er=A(ii()),Wv=A(require("zlib")),fU=require("util"),kut=(0,fU.promisify)(Wv.gzip),h_=(0,fU.promisify)(Wv.gunzip),OC=class{constructor(t){this.backupDir=ci.join(t,"backups"),er.ensureDirSync(this.backupDir)}getLegacyBackupPath(t){return ci.join(this.backupDir,`${t}.js.gz`)}getLegacyUncompressedBackupPath(t){return ci.join(this.backupDir,`${t}.js`)}getPluginBackupDir(t){return ci.join(this.backupDir,t)}async createBackup(t,r,n,a=!1){let i=this.getPluginBackupDir(t);try{await er.ensureDir(i);for(let s of n){let o=ci.join(r,s),l=ci.join(i,`${s}.gz`);if(await er.ensureDir(ci.dirname(l)),!await er.pathExists(o)||await er.pathExists(l)&&!a)continue;let c=await er.readFile(o),u=await kut(c);await er.writeFile(l,u)}return await this.removeLegacyBackups(t),!0}catch{return!1}}async restoreBackup(t,r){let n=this.getPluginBackupDir(t),a=this.getLegacyBackupPath(t),i=this.getLegacyUncompressedBackupPath(t);try{let s=!1;if(await er.pathExists(n)){let o=async(l,c)=>{let u=await er.readdir(l,{withFileTypes:!0});for(let d of u){let f=ci.join(l,d.name);if(d.isDirectory())await o(f,c);else if(d.isFile()&&d.name.endsWith(".gz")){let p=ci.relative(c,f).replace(/\.gz$/,""),m=ci.join(r,p);await er.ensureDir(ci.dirname(m));let h=await er.readFile(f),x=await h_(h);await er.writeFile(m,x),s=!0}}};return await o(n,n),await er.remove(n),s}if(await er.pathExists(a)){let o=ci.join(r,"main.js"),l=await er.readFile(a),c=await h_(l);return await er.writeFile(o,c),await er.remove(a),!0}if(await er.pathExists(i)){let o=ci.join(r,"main.js");return await er.copy(i,o,{overwrite:!0}),await er.remove(i),!0}return!1}catch{return!1}}hasBackup(t){return er.existsSync(this.getPluginBackupDir(t))||er.existsSync(this.getLegacyBackupPath(t))||er.existsSync(this.getLegacyUncompressedBackupPath(t))}async getBackupContent(t,r){let n=this.getPluginBackupDir(t),a=ci.join(n,`${r}.gz`);if(await er.pathExists(a)){let i=await er.readFile(a);return(await h_(i)).toString()}if(r==="main.js"){let i=this.getLegacyBackupPath(t);if(await er.pathExists(i)){let s=await er.readFile(i);return(await h_(s)).toString()}}return null}async removeBackup(t){let r=this.getPluginBackupDir(t);await er.pathExists(r)&&await er.remove(r),await this.removeLegacyBackups(t)}async removeLegacyBackups(t){let r=this.getLegacyBackupPath(t);await er.pathExists(r)&&await er.remove(r);let n=this.getLegacyUncompressedBackupPath(t);await er.pathExists(n)&&await er.remove(n)}backupTranslationSync(t,r){let n=ci.join(r,`${t}.json`),a=ci.join(this.backupDir,"translations",`${t}.json.gz`);try{if(!er.existsSync(n))return;er.ensureDirSync(ci.dirname(a));let i=er.readFileSync(n),s=Wv.gzipSync(i);er.writeFileSync(a,s)}catch{}}};var Da=A(ii()),Xv=A(require("path"));RP();zf();var Rme="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";var pU=(e=21)=>{let t="",r=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+=Rme[r[e]&63];return t};$t();$r();var FC=class{constructor(t){this.basePath=t,this.sourcesDir=Xv.join(t,"translations"),this.metaPath=Xv.join(t,"metadata.json"),this.checkpointPath=Xv.join(t,"backup-checkpoint.json"),this.meta=this.loadMeta()}loadMeta(){try{if(Da.existsSync(this.metaPath)){let t=Da.readJsonSync(this.metaPath);if(t.sources){let r=!1;for(let n of Object.values(t.sources)){!n.origin&&(n.type==="cloud"||n.type==="local")&&(n.origin=n.type,n.type="plugin",r=!0),"pluginId"in n&&!("plugin"in n)&&(n.plugin=n.pluginId,delete n.pluginId,r=!0);for(let a of["language","version","supportedVersions"])a in n&&(delete n[a],r=!0)}r&&(Da.ensureDirSync(this.sourcesDir),Da.writeJsonSync(this.metaPath,t,{spaces:2}))}return t}}catch{}return JSON.parse(JSON.stringify(vK))}saveMeta(){try{Da.ensureDirSync(this.sourcesDir),Da.writeJsonSync(this.metaPath,this.meta,{spaces:2}),Ue.getState().triggerSourceUpdate()}catch(t){throw t}}getSource(t){return this.meta.sources[t]||null}deleteSource(t){this.meta.sources[t]&&(delete this.meta.sources[t],this.saveMeta())}clearAll(){this.meta.sources={},Da.existsSync(this.sourcesDir)&&Da.emptyDirSync(this.sourcesDir),this.saveMeta()}getAllSources(){return Object.values(this.meta.sources)}getSourcesForPlugin(t){return Object.values(this.meta.sources).filter(r=>r.plugin===t)}getActiveSourceId(t){let r=this.getSourcesForPlugin(t),n=r.find(a=>a.isActive);return!n&&r.length>0?r[0].id:n?.id||null}getActiveSource(t){let r=this.getActiveSourceId(t);return r&&this.meta.sources[r]||null}saveSource(t){let r=Date.now();this.meta.sources[t.id]?this.meta.sources[t.id]={...this.meta.sources[t.id],...t,updatedAt:r}:(t.createdAt=t.createdAt||r,t.updatedAt=r,this.meta.sources[t.id]=t),this.saveMeta()}batchSaveSources(t){let r=Date.now();for(let n of t)this.meta.sources[n.id]?this.meta.sources[n.id]={...this.meta.sources[n.id],...n,updatedAt:r}:(n.createdAt=n.createdAt||r,n.updatedAt=r,this.meta.sources[n.id]=n);this.saveMeta()}removeSource(t){let r=this.meta.sources[t];if(!r)return;let n=r.isActive,a=r.plugin;if(delete this.meta.sources[t],n){let s=this.getSourcesForPlugin(a);s.length>0&&(s[0].isActive=!0,this.saveMeta())}let i=this.getSourceFilePath(t);Da.existsSync(i)&&Da.removeSync(i),this.saveMeta()}setActive(t,r){let n=this.meta.sources[t];n&&(r&&Object.values(this.meta.sources).filter(a=>a.plugin===n.plugin).forEach(a=>a.isActive=!1),n.isActive=r,this.saveMeta())}getSourceFilePath(t){return Xv.join(this.sourcesDir,`${t}.${_B}`)}getActiveSourcePath(t){let r=this.getActiveSourceId(t);return r?this.getSourceFilePath(r):null}getTranslationPath(t,r){let n=this.getActiveSourcePath(t);return n&&Da.existsSync(n)?n:""}getPluginIds(){let t=new Set;return Object.values(this.meta.sources).forEach(r=>t.add(r.plugin)),Array.from(t)}hasAnySources(t){return this.getSourcesForPlugin(t).length>0}generateRandomId(){return pU(32)}generateSourceId(t){return pU(32)}saveSourceFile(t,r){let n=Xv.join(this.sourcesDir,`${t}.${_B}`);Eb(n,r)}readSourceFile(t){let r=this.getSourceFilePath(t);return si(r)}getSourceMetadata(t){try{return this.readSourceFile(t)?.metadata||null}catch{return null}}async extractAndSaveSource(t,r,n){let a=this.generateRandomId(),i={id:a,plugin:t,title:n.title||v("func.extract_local"),type:n.type||"plugin",origin:"local",isActive:!0,checksum:Li(r),updatedAt:Date.now(),createdAt:Date.now()};return Object.values(this.meta.sources).filter(s=>s.plugin===t).forEach(s=>s.isActive=!1),this.saveSourceFile(a,r),this.saveSource(i),a}saveCheckpoint(t){try{Da.writeJsonSync(this.checkpointPath,{...t,timestamp:Date.now()},{spaces:2})}catch{}}loadCheckpoint(){try{if(Da.existsSync(this.checkpointPath))return Da.readJsonSync(this.checkpointPath)}catch{}return null}clearCheckpoint(){try{Da.existsSync(this.checkpointPath)&&Da.removeSync(this.checkpointPath)}catch{}}};var uc=A(require("path")),cs=A(ii());$r();var g_=class{constructor(t){this.i18n=t}async run(t){if(this.i18n.settings.automaticUpdate){let r=[];r=Object.values(t.plugins.manifests).filter(a=>a.id!=="i18n");let n=0;for(let a of r){let i=this.i18n.stateManager.getPluginState(a.id);i&&i.isApplied&&a.version!=i.pluginVersion&&await this.applyToPlugin(a.id)&&n++}try{let a=this.i18n.app.vault.adapter.getBasePath?uc.normalize(this.i18n.app.vault.adapter.getBasePath()):"";if(a){let i=uc.join(a,this.i18n.app.vault.configDir,"themes");if(cs.existsSync(i)){let s=cs.readdirSync(i,{withFileTypes:!0});for(let o of s){if(!o.isDirectory())continue;let l=o.name,c=uc.join(i,l,"manifest.json"),u="0.0.0";if(cs.existsSync(c))try{let f=cs.readJsonSync(c);f&&f.version&&(u=f.version)}catch{}let d=this.i18n.stateManager.getThemeState(l);d&&d.isApplied&&u!==d.pluginVersion&&await this.applyToTheme(l)&&n++}}}}catch{}n>0&&this.i18n.notice.successPrefix(v("Settings.Basis.SmartTitle"),`${v("Settings.Basis.SmartUpdate")}${n}${v("Settings.Basis.SmartPlugins")}`)}await this.i18n.stateManager.validateVersions(t)}async applyToPlugin(t){let r=this.i18n.app.plugins.manifests[t];if(!r)return!1;let n=uc.join(uc.normalize(this.i18n.app.vault.adapter.getBasePath()),r.dir??"");try{let a=this.i18n.coreManager.getAstTranslator(),i=this.i18n.coreManager.getRegexTranslator(),s=this.i18n.sourceManager.getActiveSourcePath(r.id);if(!s)return!1;let o=si(s);if(!o||!o.dict)return!1;let l=Object.keys(o.dict);await this.i18n.backupManager.createBackup(r.id,n,l);for(let[u,d]of Object.entries(o.dict)){let f=uc.join(n,u);if(!cs.existsSync(f))continue;let p=await this.i18n.backupManager.getBackupContent(r.id,u);if(p||(p=cs.readFileSync(f).toString()),d.ast&&d.ast.length>0){let m=a.loadCode(p);m&&(p=a.translate(m,d.ast))}d.regex&&d.regex.length>0&&(p=i.translate(p,d.regex)),cs.writeFileSync(f,p)}if(this.i18n.stateManager.setPluginState(r.id,{id:r.id,isApplied:!0,pluginVersion:r.version,translationVersion:o.metadata?.version||"0.0.0"}),this.i18n.app.plugins.enabledPlugins.has(r.id)){await this.i18n.app.plugins.disablePlugin(r.id);try{if(await this.i18n.app.plugins.enablePlugin(r.id),!this.i18n.app.plugins.enabledPlugins.has(r.id))throw new Error("Plugin failed to load after injection (not in enabledPlugins list)")}catch{await this.i18n.backupManager.restoreBackup(r.id,n);try{await this.i18n.app.plugins.enablePlugin(r.id),this.i18n.notice.warning(v("Manager.Common.Notices.RollbackSuccess",{id:t}))}catch{}throw new Error("ROLLBACK_TRIGGERED")}}return!0}catch(a){if(a.message==="ROLLBACK_TRIGGERED")throw a;return!1}}async applyToTheme(t){let r=uc.normalize(this.i18n.app.vault.adapter.getBasePath()),n=uc.join(r,this.i18n.app.vault.configDir,"themes",t),a=uc.join(n,"theme.css");if(!cs.existsSync(a))return!1;try{let i="0.0.0",s=uc.join(n,"manifest.json");if(cs.existsSync(s))try{let d=cs.readJsonSync(s);d&&d.version&&(i=d.version)}catch{}let o=this.i18n.sourceManager.getActiveSourcePath(t);if(!o)return!1;let l=si(o);if(!l||!l.dict)return!1;await this.i18n.backupManager.createBackup(t,n,["theme.css"]);let c=cs.readFileSync(a).toString();c=c.replace(/\/\* @settings([\s\S]*?)\*\//g,(d,f)=>{let p=f;for(let m of l.dict){let h=m.type,x=m.source,g=m.target;if(x&&g&&x!==g){let y=x.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),b=new RegExp(`^([ \\t]*)(${h}):\\s*(["']?)${y}\\3[ \\t]*(?:\\r?\\n|$)`,"gm");p=p.replace(b,(S,w,E,C)=>`${w}${E}: ${C}${g}${C}
`)}}return`/* @settings${p}*/`}),cs.writeFileSync(a,c);let u=l.metadata?.version||"1.0.0";return this.i18n.stateManager.setThemeState(t,{id:t,isApplied:!0,pluginVersion:i,translationVersion:String(u)}),!0}catch{return!1}}};var BC=A(require("path")),Dme=A(ii());$r();$t();var y_=class{constructor(t){this.updatesMark=!1;this._astTranslator=null;this._regexTranslator=null;this.i18n=t}setupRibbonIcons(){this.i18n.addRibbonIcon("i18n_translate",v("common.i18n"),()=>{this.i18n.view.activateView(Lm)})}async firstRun(){}async checkUpdates(){let t="eondrcode",r="obsidian-i18n",n=await this.i18n.api.github.getLatestRelease(t,r);if(n.state){let a=n.data.tag_name.replace(/^v/,"");if(this.i18n.manifest.version!==a){let i=`${v("Settings.Basis.CheckUpdateNotice")}(${a})
${n.data.body||""}`;this.i18n.notice.primaryPrefix(v("Settings.Basis.CheckUpdatePrefix"),i,15e3),this.updatesMark=!0,this.updatesVersion=a}}}async activateIMT(){await $M(this.i18n.settings),this.i18n.settings.modeImt=!0,this.i18n.saveSettings()}deactivateIMT(){jM(),this.i18n.settings.modeImt=!1,this.i18n.saveSettings()}getCss(){let t=BC.join(BC.join(BC.normalize(this.i18n.app.vault.adapter.getBasePath()),this.i18n.manifest.dir),"styles.css");this.css=Dme.readFileSync(t).toString(),this.i18n.css=this.css;try{this.i18n.sharedStyleSheet=new CSSStyleSheet,this.i18n.sharedStyleSheet.replaceSync(this.css)}catch(r){this.i18n.logger.error("Failed to precompile CSSStyleSheet:",r)}}getAstTranslator(){return this._astTranslator||(this._astTranslator=new _s(this.i18n.settings)),this._astTranslator}getRegexTranslator(){return this._regexTranslator||(this._regexTranslator=new oo(this.i18n.settings)),this._regexTranslator}resetTranslators(){this._astTranslator=null,this._regexTranslator=null}};var Fme=A(require("path"));$t();var Lut=A(yI()),Rut=A(Le());var mU=A(Le());var Mme=A(oe());var _ut=A(Le());tr();var Ome=A(oe());var jme=require("obsidian");$r();zf();var Vc=A(ii()),hU=A(require("path")),Dut=24*60*60*1e3,Bme="eondrcode/obsidian-i18n-resources",$me={repos:{},summary:{totalRepos:0,totalPlugins:0,totalTranslations:0,totalContributors:0,totalStars:0,languageDistribution:{}},lastUpdated:new Date().toISOString(),leaderboard:{topReposByStars:[],topReposByActivity:[],topAuthors:[]}},x_=class{constructor(t){this.i18n=t;let r=this.i18n.app.vault.adapter.getBasePath();this.cacheDir=hU.join(r,this.i18n.manifest.dir||"","cache"),Vc.ensureDirSync(this.cacheDir)}async getRegistry(t=!1){return this.getCachedOrFetch("registry.json",async()=>{let[r,n]=Bme.split("/"),a=await this.i18n.api.github.getFileContentWithFallback(r,n,"registry.json");if(!a.state)throw new Error("Failed to fetch registry.json");return a.data},t)}async getStats(t=!1){try{return await this.getCachedOrFetch("stats.json",async()=>{let[r,n]=Bme.split("/"),a=await this.i18n.api.github.getFileContentWithFallback(r,n,"stats.json");return!a.state||!a.data?$me:a.data},t)}catch{return $me}}invalidate(){try{Vc.existsSync(this.cacheDir)&&Vc.emptyDirSync(this.cacheDir)}catch{}}async getCachedOrFetch(t,r,n){let a=hU.join(this.cacheDir,t);if(!n&&Vc.existsSync(a))try{let s=Vc.readJsonSync(a);if(Date.now()-s.fetchedAt<Dut)return s.data}catch{}let i=await r();try{let s={data:i,fetchedAt:Date.now()};Vc.writeJsonSync(a,s,{spaces:2})}catch{}return i}};var b_=class{constructor(t,r){this.app=t,this.historyPath=`${r}/auto-history.json`}async loadHistory(){try{let t=this.app.vault.adapter;if(await t.exists(this.historyPath)){let r=await t.read(this.historyPath);return JSON.parse(r)}}catch{}return[]}async saveHistory(t){try{let r=this.app.vault.adapter,n=this.historyPath.split("/").slice(0,-1).join("/");await r.exists(n)||await r.mkdir(n);let a=t.slice(0,50);await r.write(this.historyPath,JSON.stringify(a,null,2))}catch{}}async addRecord(t,r){let n=await this.loadHistory(),a=r.filter(u=>u.status==="success").length,i=r.filter(u=>u.status==="error").length,s=r.filter(u=>u.status==="skipped").length,o=r.filter(u=>u.status==="up_to_date").length,l=r.filter(u=>u.status==="discovered_new"||u.status==="discovered_update").length,c={id:Date.now().toString(),time:Date.now(),trigger:t,summary:{total:r.length,success:a,error:i,skipped:s,discovered:l,upToDate:o},details:JSON.stringify(r.filter(u=>u.status!=="pending"&&u.status!=="skipped"))};return n.unshift(c),await this.saveHistory(n),c}async clear(){await this.saveHistory([])}};var $C=class{constructor(t){this.isRunning=!1;this.manifestCache=[];this.i18n=t,this.registryCache=new x_(t),this.historyManager=new b_(t.app,t.manifest.dir||"")}async initialize(){this.syncStore()}async syncStore(){let t=Jg.getState(),r=await this.historyManager.loadHistory(),n=this.i18n.stateManager.getAllPluginStates(),a=this.i18n.stateManager.getAllThemeStates(),i=[...Object.values(n),...Object.values(a)].filter(s=>s.isApplied).length;t.hydrate(this.i18n.settings,{appliedCount:i,history:r})}async runDiscovery(){if(this.i18n.settings.autoDiscovery)return this.runSmartAuto({silent:!0,isDiscovery:!0})}async checkAndRunDiscovery(){if(!this.i18n.settings.autoDiscovery||this.isRunning)return;let t=Date.now(),r=this.i18n.settings.lastAutoCheckTime||0,n=this.i18n.settings.autoCheckInterval*60*60*1e3;n!==0&&t-r>=n&&await this.runSmartAuto({isDiscovery:!0,isIncremental:!0,silent:!0})}async runSmartAuto(t={}){let r=Jg.getState();if(this.isRunning){t.silent||new jme.Notice(v("Manager.Status.Running"));return}let n=t.silent;this.isRunning=!0,r.setStatus("running"),r.clearAll(),n||this.i18n.notice.info(v("Manager.Status.AutoStarting"));try{await this.i18n.stateManager.validateVersions(this.i18n.app);let a=this.i18n.settings.autoTrustedRepos;if(!a||a.length===0){r.setStatus("error"),n||this.i18n.notice.warning(v("Manager.Errors.NoTrustedRepos"));return}let[i,s]=await Promise.all([this.registryCache.getRegistry(),this.registryCache.getStats()]),o=this.getInstalledPlugins(),l=await this.getInstalledThemes(),c=[...o,...l],u=new Set(this.i18n.settings.autoExcludeList||[]);if(c=c.filter(E=>!u.has(E.id)),(t.isIncremental||t.isDiscovery)&&(c=c.filter(E=>{let C=E.type==="theme"?this.i18n.stateManager.getThemeState(E.id):this.i18n.stateManager.getPluginState(E.id);return!C||!C.isApplied||E.version!==C.pluginVersion}),c.length===0)){r.setStatus("success"),this.isRunning=!1;return}r.initTasks(c.map(E=>({id:E.id,type:E.type,name:E.id,status:"pending"}))),n||this.i18n.notice.info(v("Manager.Status.ScanningInstalled",{count:c.length}));let d=new Set(a),f=i.filter(E=>d.has(E.repoAddress));if(f.length===0){r.setStatus("error"),n||this.i18n.notice.warning(v("Manager.Errors.TrustedRepoNotInRegistry"));return}let p=5;this.manifestCache=[];for(let E=0;E<f.length;E+=p){let C=f.slice(E,E+p);await Promise.all(C.map(async N=>{let[_,O]=N.repoAddress.split("/"),D=await this.i18n.api.github.getFileContentWithFallback(_,O,"metadata.json");D.state&&Array.isArray(D.data)&&D.data.forEach(W=>{this.manifestCache.push({repoAddress:N.repoAddress,entry:W})})})),E+p<f.length&&await new Promise(N=>setTimeout(N,500))}let m=this.manifestCache,h=0,x=0,g=0,y=0,b=0;for(let E of c){if(!this.isRunning)break;b++,r.setProgress(b,c.length);try{if(this.i18n.settings.autoExcludeList.includes(E.id)){x++,r.updateTaskStatus(E.id,"skipped",v("Manager.Auto.Status.SkipReasons.Exclusion"));continue}r.updateTaskStatus(E.id,"processing");let C=m.filter(O=>O.entry.plugin===E.id);if(C.length===0){x++,r.updateTaskStatus(E.id,"skipped",v("Manager.Auto.Status.SkipReasons.NoMatch"));continue}let{match:N,scoreInfo:_}=this.selectBestTranslation(C,s,E.version,this.i18n.settings.language,E.type==="theme");if(N){let O=this.i18n.sourceManager.getSource(N.entry.id),D=E.type==="theme"?this.i18n.stateManager.getThemeState(E.id):this.i18n.stateManager.getPluginState(E.id),W=O&&O.cloud?.hash===N.entry.hash,Z=D&&String(D.translationVersion)===String(N.entry.version),me=D&&D.pluginVersion===E.version;if(D?.isApplied===!0&&W&&Z&&me){r.updateTaskStatus(E.id,"up_to_date",void 0,N.repoAddress,String(N.entry.version),_),g++;continue}if(t.isDiscovery||!this.i18n.settings.autoApply){h++;let U=O?"discovered_update":"discovered_new";r.updateTaskStatus(E.id,U,void 0,N.repoAddress,String(N.entry.version),_);continue}if(W){this.i18n.sourceManager.setActive(N.entry.id,!0),(E.type==="theme"?await this.i18n.injectorManager.applyToTheme(E.id):await this.i18n.injectorManager.applyToPlugin(E.id))?(h++,r.updateTaskStatus(E.id,"success",void 0,N.repoAddress,String(N.entry.version),_)):(y++,r.updateTaskStatus(E.id,"error","Cache apply failed"));continue}await this.applyTranslation(N,E.type)?(h++,r.updateTaskStatus(E.id,"success",void 0,N.repoAddress,String(N.entry.version),_)):(y++,r.updateTaskStatus(E.id,"error",v("Manager.Errors.ApplyFailed")))}else x++,r.updateTaskStatus(E.id,"skipped",v("Manager.Auto.Status.SkipReasons.NoVersion"))}catch(C){C.message==="ROLLBACK_TRIGGERED"?r.updateTaskStatus(E.id,"error",v("Manager.Status.AutoRollbacked")):r.updateTaskStatus(E.id,"error",C.message||"Unknown Error"),y++}}t.isDiscovery&&h>0&&!n&&this.i18n.notice.info(v("Manager.Auto.Status.DiscoveryComplete",{count:h}),5e3),r.setStatus(y>0?"error":"success"),this.i18n.settings.lastAutoCheckTime=Date.now(),await this.i18n.saveSettings();let S=t.isDiscovery?"discovery":t.isIncremental?"startup":"manual",w=await this.historyManager.addRecord(S,r.tasks);r.addHistory(w),this.syncStore()}catch(a){r.setStatus("error"),n||this.i18n.notice.error(`${v("Manager.Errors.AutoFailed")}: ${a.message||a}`)}finally{this.isRunning=!1}}async retryTask(t,r){let n=Jg.getState();n.updateTaskStatus(t,"processing");try{let a="0.0.0";if(r==="plugin"){let p=this.i18n.app.plugins.manifests[t];p&&(a=p.version)}else{let m=(await this.getInstalledThemes()).find(h=>h.id===t);m&&(a=m.version)}let[i,s]=await Promise.all([this.registryCache.getRegistry(),this.registryCache.getStats()]),o=new Set(this.i18n.settings.autoTrustedRepos||[]),l=i.filter(p=>o.has(p.repoAddress));if(l.length===0){n.updateTaskStatus(t,"error",v("Manager.Errors.TrustedRepoNotInRegistry"));return}let c=[];for(let p of l){let[m,h]=p.repoAddress.split("/");try{let x=await this.i18n.api.github.getFileContentWithFallback(m,h,"metadata.json");x.state&&Array.isArray(x.data)&&x.data.forEach(g=>{c.push({repoAddress:p.repoAddress,entry:g})})}catch{}}let u=c.filter(p=>p.entry.plugin===t);if(u.length===0){n.updateTaskStatus(t,"skipped",v("Manager.Auto.Status.SkipReasons.NoMatch"));return}let{match:d}=this.selectBestTranslation(u,s,a,this.i18n.settings.language,r==="theme");if(!d){n.updateTaskStatus(t,"skipped",v("Manager.Auto.Status.SkipReasons.NoVersion"));return}await this.applyTranslation(d,r)?n.updateTaskStatus(t,"success",void 0,d.repoAddress,String(d.entry.version)):n.updateTaskStatus(t,"error","Download or injection failed")}catch(a){n.updateTaskStatus(t,"error",a.message||"Unknown error")}}invalidateCache(){this.registryCache.invalidate()}async verifyRepo(t){try{if((await this.registryCache.getRegistry()).some(o=>o.repoAddress===t))return!0;let[a,i]=t.split("/");return(await this.i18n.api.github.getFileContentWithFallback(a,i,"metadata.json")).state===!0}catch{return!1}}getInstalledPlugins(){let t=this.i18n.app.plugins.manifests;return Object.values(t).filter(r=>r.id!==this.i18n.manifest.id).map(r=>({id:r.id,name:r.name,version:r.version,type:"plugin"}))}async getInstalledThemes(){let t=[];try{let r=this.i18n.app.vault.adapter,n=`${this.i18n.app.vault.configDir}/themes`;if(await r.exists(n)){let a=await r.list(n);for(let i of a.folders){let s=i.split("/").pop();if(s){let o="0.0.0";try{let l=`${i}/manifest.json`;if(await r.exists(l)){let c=JSON.parse(await r.read(l));c?.version&&(o=c.version)}}catch{}t.push({id:s,name:s,version:o,type:"theme"})}}}}catch{}return t}isVersionCompatible(t,r){if(t===r)return 100;let n=t.split(".").map(Number),a=r.split(".").map(Number);return n[0]===a[0]?50:0}async applyBatchDiscovered(t){let r=Jg.getState();r.setStatus("running");let n=0,a=0;this.manifestCache.length;let i=await this.registryCache.getStats();for(let s of t){let o=r.tasks.find(h=>h.id===s);if(!o)continue;let l=this.manifestCache.filter(h=>h.entry.plugin===s);if(l.length===0){a++,r.updateTaskStatus(s,"error",v("Manager.Auto.Errors.NoCachedManifest"));continue}let u=[...Object.values(this.i18n.app.plugins.manifests).map(h=>({...h,type:"plugin"})),...(await this.getInstalledThemes()).map(h=>({...h,type:"theme"}))].find(h=>h.id===s);if(!u)continue;let{match:d,scoreInfo:f}=this.selectBestTranslation(l,i,u.version,this.i18n.settings.language,u.type==="theme");if(!d){a++,r.updateTaskStatus(s,"error",v("Manager.Auto.Errors.NoBestMatch"));continue}r.updateTaskStatus(s,"processing");let p=this.i18n.sourceManager.getSource(d.entry.id);if(p&&p.cloud?.hash===d.entry.hash){this.i18n.sourceManager.setActive(d.entry.id,!0),(o.type==="theme"?await this.i18n.injectorManager.applyToTheme(s):await this.i18n.injectorManager.applyToPlugin(s))?(n++,r.updateTaskStatus(s,"success",void 0,d.repoAddress,String(d.entry.version),f)):(a++,r.updateTaskStatus(s,"error",v("Manager.Auto.Errors.LocalApplyFailed")));continue}await this.applyTranslation(d,o.type)?(n++,r.updateTaskStatus(s,"success",void 0,d.repoAddress,String(d.entry.version),f)):(a++,r.updateTaskStatus(s,"error","Download/Apply failed"))}r.setStatus("success"),this.i18n.notice.success(v("Manager.Auto.Log.BatchComplete",{success:n,fail:a})),this.syncStore()}selectBestTranslation(t,r,n,a,i){let s=this.i18n.settings.autoMatchStrategy||"comprehensive",o=t.filter(c=>c.entry.language===a);o.length===0&&(o=t);let l=o.map(c=>{let u=r.repos[c.repoAddress]||{},d=u.stars||0,f=u.activityScore||0,p=u.pluginCount||0,h=(i?50:this.isVersionCompatible(c.entry.supported_versions||"",n))/100*50,x=Math.min(d/500*20,20),g=Math.min(f*10,10),y=x+g,b=new Date(c.entry.updated_at||0).getTime(),S=(Date.now()-b)/(1e3*60*60*24),w=0;S<=30?w=20:S<=90?w=15:S<=180?w=10:S<=365&&(w=5);let E=0;switch(s){case"version_first":E=h*1.5+y*.5+w*.5;break;case"popularity":E=h*.5+y*1.5+w*.5;break;case"latest_update":E=h*.5+y*.5+w*1.5;break;default:E=h+y+w}return E=Math.min(Math.round(E),100),{...c,score:E,breakdown:{version:Math.round(h),popularity:Math.round(y),freshness:Math.round(w),total:E}}});return l.sort((c,u)=>u.score-c.score),{match:l[0]||null,scoreInfo:l[0]?.breakdown||{version:0,popularity:0,freshness:0,total:0}}}async applyTranslation(t,r){let[n,a]=t.repoAddress.split("/"),i=Ro(t.entry.id,r);try{let s=await this.i18n.api.github.getFileContentWithFallback(n,a,i);if(!s.state||!s.data)return!1;let o=s.data,l=this.i18n.sourceManager,c=l.getSource(t.entry.id);c&&this.i18n.backupManager.backupTranslationSync(c.id,l.sourcesDir),l.saveSourceFile(t.entry.id,o);let u={id:t.entry.id,plugin:t.entry.plugin,title:t.entry.title,type:t.entry.type,origin:"cloud",isActive:!0,checksum:Li(o),cloud:{owner:n,repo:a,hash:t.entry.hash},updatedAt:Date.now(),createdAt:c?.createdAt||Date.now()};return l.saveSource(u),l.setActive(t.entry.id,!0),r==="theme"?await this.i18n.injectorManager.applyToTheme(t.entry.plugin):await this.i18n.injectorManager.applyToPlugin(t.entry.plugin)}catch{return!1}}};$t();$t();var qme=A(Le()),Hme=A(yI());var Do=A(Le()),qc=require("obsidian"),S_=A(require("path"));var jC=require("obsidian");async function zme(e,t){let r=[],n=e.trim();if(!n)return r;let a=t.stateManager.getAllPluginStates(),i=Object.keys(a).filter(s=>a[s].isApplied);for(let s of i){let o=t.sourceManager.getActiveSourcePath(s);if(!o)continue;let l=si(o);if(!(!l||!l.dict))for(let[c,u]of Object.entries(l.dict))(u.ast||[]).filter(p=>p.target===n||p.source===n).forEach(p=>{r.push({pluginId:s,file:c,type:p.type,name:p.name,source:p.source,target:p.target})})}return r}var v_=class{constructor(t,r){this.active=!1;this.i18n=t,this.onDeactivate=r}isActive(){return this.active}activate(){if(this.active)return;this.active=!0,document.body.style.cursor="help";let t=document.createElement("style");t.id="i18n-ast-inspector-style",t.innerHTML=`
.i18n-inspect-target {
outline: 2px solid #9c27b0 !important;
outline-offset: -2px !important;
background-color: rgba(156, 39, 176, 0.2) !important;
transition: outline 0.1s ease !important;
cursor: help !important;
}
* {
pointer-events: auto !important;
}
`,document.head.appendChild(t);let r=i=>{let s=i.target;document.querySelectorAll(".i18n-inspect-target").forEach(o=>o.classList.remove("i18n-inspect-target")),s.classList.add("i18n-inspect-target")},n=async i=>{i.preventDefault(),i.stopPropagation();let s=i.target,o=(s.innerText||s.textContent||"").trim();if(o){let l=await zme(o,this.i18n);l.length>0?(new jC.Notice(`\u627E\u5230 ${l.length} \u4E2A AST \u5339\u914D\u9879\uFF0C\u8BE6\u60C5\u8BF7\u67E5\u770B\u63A7\u5236\u53F0`,5e3),l.slice(0,2).forEach(c=>{new jC.Notice(`[${c.pluginId}] ${c.type}:${c.name}
Source: ${c.source}`,8e3)})):new jC.Notice("\u672A\u80FD\u5728\u5DF2\u5E94\u7528\u7684\u7FFB\u8BD1\u5B57\u5178\u4E2D\u627E\u5230\u5339\u914D\u9879",3e3)}else new jC.Notice("\u9009\u4E2D\u7684\u5143\u7D20\u6CA1\u6709\u53EF\u62FE\u53D6\u7684\u6587\u672C",2e3)},a=i=>{i.key==="Escape"&&this.deactivate()};window.addEventListener("mouseover",r,!0),window.addEventListener("click",n,!0),window.addEventListener("keydown",a,!0),this._handlers={handleMouseOver:r,handleClick:n,handleKeyDown:a}}deactivate(){if(!this.active)return;this.active=!1,document.body.style.cursor="",document.getElementById("i18n-ast-inspector-style")?.remove(),document.querySelectorAll(".i18n-inspect-target").forEach(a=>a.classList.remove("i18n-inspect-target"));let{handleMouseOver:t,handleClick:r,handleKeyDown:n}=this._handlers;window.removeEventListener("mouseover",t,!0),window.removeEventListener("click",r,!0),window.removeEventListener("keydown",n,!0),this.onDeactivate&&this.onDeactivate()}};var us=A(oe()),Ume=({i18n:e})=>{let[t,r]=(0,Do.useState)(!1),[n,a]=(0,Do.useState)(()=>{let N=localStorage.getItem("i18n-debug-pos");return N?JSON.parse(N):{x:window.innerWidth-260,y:100}}),[i,s]=(0,Do.useState)(!1),o=(0,Do.useRef)({x:0,y:0}),l=(0,Do.useRef)(null),[c,u]=(0,Do.useState)(!1),d=(0,Do.useRef)(null);(0,Do.useEffect)(()=>(d.current=new v_(e,()=>u(!1)),()=>{d.current?.deactivate()}),[e]);let[f,p]=(0,Do.useState)(document.body.classList.contains("theme-dark"));(0,Do.useEffect)(()=>{let N=()=>p(document.body.classList.contains("theme-dark")),_=new MutationObserver(N);return _.observe(document.body,{attributes:!0,attributeFilter:["class"]}),()=>_.disconnect()},[]);let m=N=>{if(l.current){let _=l.current.getBoundingClientRect();o.current={x:N.clientX-_.left,y:N.clientY-_.top},s(!0)}};(0,Do.useEffect)(()=>{let N=O=>{if(!i)return;let D={x:Math.max(0,Math.min(O.clientX-o.current.x,window.innerWidth-240)),y:Math.max(0,Math.min(O.clientY-o.current.y,window.innerHeight-100))};a(D),localStorage.setItem("i18n-debug-pos",JSON.stringify(D))},_=()=>s(!1);return i&&(window.addEventListener("mousemove",N),window.addEventListener("mouseup",_)),()=>{window.removeEventListener("mousemove",N),window.removeEventListener("mouseup",_)}},[i]);let h=async()=>{r(!0);try{await e.app.plugins.disablePlugin(e.manifest.id),await e.app.plugins.enablePlugin(e.manifest.id),new qc.Notice("I18N: \u63D2\u4EF6\u5DF2\u91CD\u8F7D")}finally{r(!1)}},x=()=>{new qc.Notice("\u5FEB\u7167\u5DF2\u5B58\u81F3\u63A7\u5236\u53F0")},g=async()=>{if(!confirm("\u6E05\u7406\u4E91\u7AEF\u7F13\u5B58\uFF1F"))return;let N=e.sourceManager;N.getAllSources().filter(_=>_.origin==="cloud").forEach(_=>N.deleteSource(_.id)),new qc.Notice("\u7F13\u5B58\u5DF2\u6E05\u7406")},y=()=>e.autoManager.runSmartAuto(),b=async()=>{if(confirm("\u786E\u5B9A\u8981\u8FD8\u539F\u6240\u6709\u5DF2\u5E94\u7528\u7FFB\u8BD1\u7684\u63D2\u4EF6\u5417\uFF1F\u8FD9\u5C06\u6062\u590D\u6E90\u7801\u5907\u4EFD\u3002")){r(!0);try{let N=Object.values(e.stateManager.getAllPluginStates()),_=0;for(let O of N)if(O.isApplied){let D=e.app.plugins.manifests[O.id];if(!D)continue;let W=S_.join(S_.normalize(e.app.vault.adapter.getBasePath()),D.dir??"");await e.backupManager.restoreBackup(O.id,W)&&(e.stateManager.setPluginState(O.id,{...O,isApplied:!1}),e.app.plugins.enabledPlugins.has(O.id)&&(await e.app.plugins.disablePlugin(O.id),await e.app.plugins.enablePlugin(O.id)),_++)}new qc.Notice(`\u5DF2\u6210\u529F\u8FD8\u539F ${_} \u4E2A\u63D2\u4EF6`)}catch{new qc.Notice("\u8FD8\u539F\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u63A7\u5236\u53F0")}finally{r(!1)}}},S=async()=>{if(confirm("\u786E\u5B9A\u8981\u5F3A\u5236\u91CD\u65B0\u5E94\u7528\u6240\u6709\u5F53\u524D\u7FFB\u8BD1\u5417\uFF1F")){r(!0);try{let N=Object.values(e.stateManager.getAllPluginStates()),_=0;for(let O of N)O.isApplied&&await e.injectorManager.applyToPlugin(O.id)&&_++;new qc.Notice(`\u5DF2\u91CD\u65B0\u5E94\u7528 ${_} \u4E2A\u63D2\u4EF6\u7FFB\u8BD1`)}catch{new qc.Notice("\u66FF\u6362\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u63A7\u5236\u53F0")}finally{r(!1)}}},w=async()=>{if(!confirm("\u{1F6D1} \u8B66\u544A\uFF1A\u786E\u5B9A\u8981\u5220\u9664\u6240\u6709\u672C\u5730\u7FFB\u8BD1\u6587\u4EF6\u5417\uFF1F\u6B64\u64CD\u4F5C\u4E0D\u53EF\u64A4\u9500\uFF01"))return;let N=confirm(`\u5728\u5220\u9664\u6587\u4EF6\u524D\uFF0C\u662F\u5426\u5148\u5C06\u6240\u6709\u63D2\u4EF6\u8FD8\u539F\u4E3A\u539F\u59CB\u6E90\u7801\u72B6\u6001\uFF1F
(\u5EFA\u8BAE\u9009\u62E9\u201C\u662F\u201D\uFF0C\u5426\u5219\u5DF2\u88AB\u7FFB\u8BD1\u7684\u63D2\u4EF6\u5C06\u4FDD\u6301\u7FFB\u8BD1\u72B6\u6001\u4E14\u65E0\u6CD5\u901A\u8FC7\u63D2\u4EF6\u8FD8\u539F)`);r(!0);try{N&&await b(),e.sourceManager.clearAll(),e.stateManager.clearAllStates(),new qc.Notice("\u6240\u6709\u7FFB\u8BD1\u6587\u4EF6\u53CA\u91CD\u7F6E\u72B6\u6001\u5DF2\u6E05\u7406\u5B8C\u6BD5")}catch{new qc.Notice("\u6E05\u7406\u5931\u8D25\uFF0C\u8BF7\u67E5\u770B\u63A7\u5236\u53F0")}finally{r(!1)}},E=()=>{c?(d.current?.deactivate(),u(!1)):(d.current?.activate(),u(!0),new qc.Notice("AST \u76D1\u542C\u6A21\u5F0F\u5DF2\u5F00\u542F\uFF1A\u70B9\u51FB\u754C\u9762\u5143\u7D20\u67E5\u770B\u6E90\u7801\u4FE1\u606F",3e3))},C=f?{bg:"#1e1e1e",border:"#444",text:"#ddd",headerBg:"#4a1515",btnBg:"#333",btnHover:"#444"}:{bg:"#fff",border:"#ccc",text:"#333",headerBg:"#fee2e2",btnBg:"#f3f4f6",btnHover:"#e5e7eb"};return(0,us.jsxs)("div",{ref:l,style:{position:"fixed",left:n.x+"px",top:n.y+"px",width:"240px",backgroundColor:C.bg,border:`1px solid ${C.border}`,borderRadius:"8px",boxShadow:"0 10px 25px rgba(0,0,0,0.2)",zIndex:1e4,color:C.text,fontFamily:"sans-serif",overflow:"hidden",userSelect:"none"},children:[(0,us.jsxs)("div",{onMouseDown:m,style:{padding:"10px 12px",backgroundColor:C.headerBg,cursor:"move",display:"flex",alignItems:"center",justifyContent:"space-between",fontWeight:"bold",fontSize:"12px",borderBottom:`1px solid ${C.border}`},children:[(0,us.jsx)("span",{children:"\u{1F6E0}\uFE0F I18N DEBUGGER"}),(0,us.jsx)("span",{style:{fontSize:"10px",opacity:.7},children:"DEV"})]}),(0,us.jsxs)("div",{style:{padding:"12px",display:"grid",gridTemplateColumns:"1fr 1fr",gap:"8px"},children:[(0,us.jsx)("button",{onClick:h,disabled:t,style:{padding:"8px",fontSize:"11px",backgroundColor:C.btnBg,color:C.text,border:`1px solid ${C.border}`,borderRadius:"4px",cursor:"pointer"},children:t?"\u267B\uFE0F...":"\u267B\uFE0F \u91CD\u8F7D"}),(0,us.jsx)("button",{onClick:x,style:{padding:"8px",fontSize:"11px",backgroundColor:C.btnBg,color:C.text,border:`1px solid ${C.border}`,borderRadius:"4px",cursor:"pointer"},children:"\u{1F4F8} \u5FEB\u7167"}),(0,us.jsx)("button",{onClick:y,style:{padding:"8px",fontSize:"11px",backgroundColor:C.btnBg,color:C.text,border:`1px solid ${C.border}`,borderRadius:"4px",cursor:"pointer"},children:"\u26A1 \u540C\u6B65"}),(0,us.jsx)("button",{onClick:g,style:{padding:"8px",fontSize:"11px",backgroundColor:C.btnBg,color:C.text,border:`1px solid ${C.border}`,borderRadius:"4px",cursor:"pointer"},children:"\u{1F5D1}\uFE0F \u6E05\u7406"}),(0,us.jsx)("button",{onClick:E,style:{padding:"8px",fontSize:"11px",backgroundColor:c?f?"#4a1515":"#fee2e2":C.btnBg,color:c?f?"#ff9999":"#c53030":C.text,border:`1px solid ${c?f?"#ff4444":"#f87171":C.border}`,borderRadius:"4px",cursor:"pointer",gridColumn:"span 2",fontWeight:c?"bold":"normal"},children:c?"\u{1F6D1} \u505C\u6B62\u76D1\u542C":"\u{1F50D} \u76D1\u542C AST"}),(0,us.jsx)("button",{onClick:b,disabled:t,style:{padding:"8px",fontSize:"11px",backgroundColor:f?"#2d1a1a":"#fff1f1",color:f?"#ff9999":"#c53030",border:`1px solid ${f?"#5c2d2d":"#fbcfe8"}`,borderRadius:"4px",cursor:"pointer",gridColumn:"span 2"},children:"\u23EA \u4E00\u952E\u8FD8\u539F (\u6062\u590D\u6E90\u7801)"}),(0,us.jsx)("button",{onClick:S,disabled:t,style:{padding:"8px",fontSize:"11px",backgroundColor:f?"#1a2d1a":"#f1fff1",color:f?"#99ff99":"#2f855a",border:`1px solid ${f?"#2d5c2d":"#c6f6d5"}`,borderRadius:"4px",cursor:"pointer",gridColumn:"span 2"},children:"\u{1F504} \u4E00\u952E\u66FF\u6362 (\u91CD\u65B0\u7FFB\u8BD1)"}),(0,us.jsx)("button",{onClick:w,disabled:t,style:{padding:"8px",fontSize:"11px",backgroundColor:f?"#3d0a0a":"#742a2a",color:"#fff",border:"1px solid #000",borderRadius:"4px",cursor:"pointer",gridColumn:"span 2",marginTop:"4px",fontWeight:"bold"},children:"\u{1F480} \u5F7B\u5E95\u5220\u9664\u6240\u6709\u8BD1\u6587"})]}),(0,us.jsxs)("div",{style:{padding:"8px 12px",fontSize:"10px",opacity:.6,borderTop:`1px solid ${C.border}`},children:["AutoUpdate: ",e.settings.automaticUpdate?"\u2705":"\u274C",(0,us.jsx)("br",{}),"Native HTML/CSS Debugger."]})]})};var zC=class extends Vme.Plugin{constructor(){super(...arguments);this.activeSettingTab="basis";this.devRoot=null}async onload(){$P(this),D3(),Ame(this.app,this),await this.loadSettings(),this.initManagers(),this.coreManager.getCss(),this.settings.agreement?(this.initViews(),this.initCores(),this.coreManager.setupRibbonIcons(),Ue.getState().setI18n(this),this.addSettingTab(new MT(this.app,this)),this.registerInterval(window.setInterval(()=>{this.autoManager.checkAndRunDiscovery()},30*60*1e3)),setTimeout(()=>{this.autoManager.checkAndRunDiscovery()},30*1e3)):(this.view.addView(NC,r=>new a_(r,this),!0),this.view.activateView(NC))}async onunload(){this.view.deactivateAllViews(),this.settings.modeImt&&this.coreManager.deactivateIMT(),this.cleanupDevDebug()}async loadSettings(){this.settings=Object.assign({},s1,await this.loadData()),await this.migrateOpenAIProfiles()}async saveSettings(){await this.saveData(this.settings)}async migrateOpenAIProfiles(){if(this.settings.llmOpenaiProfiles&&this.settings.llmOpenaiProfiles.length>0){let n=!1;this.settings.llmOpenaiProfiles.forEach(a=>{a.useCustomPrice===void 0&&(a.useCustomPrice=!1,a.priceInput=1.1,a.priceOutput=4.4,n=!0)}),n&&await this.saveSettings();return}if(this.settings.llmOpenaiUrl||this.settings.llmOpenaiKey||this.settings.llmOpenaiProfiles.length===0){let n={id:"default",name:"Default",url:this.settings.llmOpenaiUrl||"",key:this.settings.llmOpenaiKey||"",model:this.settings.llmOpenaiModel||"gpt-3.5-turbo",useCustomPrice:this.settings.llmUseCustomPrice||!1,priceInput:this.settings.llmPriceInputCustom||1.1,priceOutput:this.settings.llmPriceOutputCustom||4.4};this.settings.llmOpenaiProfiles=[n],this.settings.llmOpenaiActiveProfileId="default",this.settings.llmOpenaiUrl=n.url,this.settings.llmOpenaiKey=n.key,this.settings.llmOpenaiModel=n.model,this.settings.llmUseCustomPrice=n.useCustomPrice,this.settings.llmPriceInputCustom=n.priceInput,this.settings.llmPriceOutputCustom=n.priceOutput,await this.saveSettings()}}initManagers(){this.logger=Gu.getInstance(),this.notice=ey.getInstance(this),this.view=Kv.getInstance(this),this.api=Gv.getInstance(this),this.stateManager=new MC(this);let r=Yv.join(Yv.normalize(this.app.vault.adapter.getBasePath()),this.manifest.dir);this.backupManager=new OC(r);let n=Yv.join(Yv.normalize(this.app.vault.adapter.getBasePath()),this.manifest.dir);this.sourceManager=new FC(n),this.injectorManager=new g_(this),this.coreManager=new y_(this),this.autoManager=new $C(this)}initViews(){this.view.addView(Cm,r=>new Zk(r,this),!0),this.view.addView(Fv,r=>new t_(r,this),!0),this.view.addView(zv,r=>new DC(r,this),!0),this.view.addView(Lm,r=>new m_(r,this),!0),this.view.addView($v,r=>new r_(r,this),!0)}async initCores(){this.coreManager.firstRun(),this.settings.checkUpdates&&this.coreManager.checkUpdates(),this.settings.automaticUpdate&&await this.injectorManager.run(this.app),await this.autoManager.initialize(),this.settings.autoDiscovery&&await this.autoManager.runDiscovery(),this.settings.modeImt&&this.coreManager.activateIMT(),await this.stateManager.cleanupRemovedResources(this.app)}async onAgreementAccepted(){this.initViews(),await this.initCores(),this.coreManager.setupRibbonIcons(),this.addSettingTab(new MT(this.app,this)),Ue.getState().setI18n(this),this.view.deactivateView(NC),this.view.activateView($v)}shareLoad(r,n,a){this.shareType=r,this.sharePath=n,this.shareObj=a}initDevDebug(){}cleanupDevDebug(){if(this.devRoot){this.devRoot.unmount();let r=document.body.querySelector(".i18n-dev-debug-container");r&&r.remove(),this.devRoot=null}}};var Mut=zC;
//# sourceMappingURL=main.js.map