@c4a/server-cli 0.4.11-beta.1 → 0.4.12-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +795 -3402
- package/package.json +1 -1
- package/serve.js +3223 -4183
- package/web/assets/index--UyZtsHr.js +238 -0
- package/web/assets/index-15FuETM5.js +238 -0
- package/web/assets/index-1O90ZcBt.js +238 -0
- package/web/assets/index-2ZaXHlEm.js +12 -0
- package/web/assets/index-5SgaIe6K.js +238 -0
- package/web/assets/index-69TE-Dt9.js +238 -0
- package/web/assets/index-6qWMAJjW.js +12 -0
- package/web/assets/index-8bavzcKH.js +238 -0
- package/web/assets/index-B2JcVRax.js +238 -0
- package/web/assets/index-B3a1j3cz.js +238 -0
- package/web/assets/index-B6EqO_Cg.js +12 -0
- package/web/assets/index-B7OJ5sV_.js +238 -0
- package/web/assets/index-B9YWtkC-.js +12 -0
- package/web/assets/index-BD162a_1.js +238 -0
- package/web/assets/index-BF50bkqY.css +1 -0
- package/web/assets/index-BPMcNaXa.css +1 -0
- package/web/assets/index-BPlwhwPb.css +1 -0
- package/web/assets/index-BW9aouHt.js +238 -0
- package/web/assets/index-BbZvxZvZ.css +1 -0
- package/web/assets/index-BkYFml7g.css +1 -0
- package/web/assets/index-Bnn0CunM.js +238 -0
- package/web/assets/index-BosC7CbW.css +1 -0
- package/web/assets/index-BrJa-9jA.css +1 -0
- package/web/assets/index-C63Z-8cw.js +238 -0
- package/web/assets/index-C6ydhyiL.js +238 -0
- package/web/assets/index-CAXoXe3-.css +1 -0
- package/web/assets/index-CDG7D9Wo.css +1 -0
- package/web/assets/index-CNruo9jb.js +238 -0
- package/web/assets/index-CUGq5bZG.js +12 -0
- package/web/assets/index-CVB_F0xd.js +238 -0
- package/web/assets/index-CVct6UjO.css +1 -0
- package/web/assets/index-CX2QKHgP.js +12 -0
- package/web/assets/index-Cok56quU.css +1 -0
- package/web/assets/index-Ct-X2M8U.js +12 -0
- package/web/assets/index-CtnVCeI7.css +1 -0
- package/web/assets/index-Cu6ttPtz.js +12 -0
- package/web/assets/index-CvTLDILA.css +1 -0
- package/web/assets/index-D0x9zuj2.js +238 -0
- package/web/assets/index-D3-qG0Hp.js +238 -0
- package/web/assets/index-D3UsEQTE.css +1 -0
- package/web/assets/index-D5WvCk3U.js +238 -0
- package/web/assets/index-D6QqUdMz.css +1 -0
- package/web/assets/index-D7EkgIsu.js +12 -0
- package/web/assets/index-DB_YWOXK.js +12 -0
- package/web/assets/index-DBaysFVi.css +1 -0
- package/web/assets/index-DGYdHfUt.js +238 -0
- package/web/assets/index-DIzfj2PR.css +1 -0
- package/web/assets/index-DJiYLRIW.css +1 -0
- package/web/assets/index-DQcztEye.js +238 -0
- package/web/assets/index-DSnxWXVs.css +1 -0
- package/web/assets/index-DX1UQEJF.css +1 -0
- package/web/assets/index-DgtV8nwc.js +238 -0
- package/web/assets/index-DqdyIshw.js +12 -0
- package/web/assets/index-DyF2kEj9.js +238 -0
- package/web/assets/index-H6Rs5Fbq.js +12 -0
- package/web/assets/index-O5LI2GNV.js +238 -0
- package/web/assets/index-SnFvyzm_.css +1 -0
- package/web/assets/index-bnfl0N-T.css +1 -0
- package/web/assets/index-cMgxghVE.css +1 -0
- package/web/assets/index-dDuVahj-.js +12 -0
- package/web/assets/index-fG23cf-l.js +238 -0
- package/web/assets/index-it-5oMch.css +1 -0
- package/web/assets/index-yq497d-W.js +12 -0
- package/web/index.html +2 -2
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
function Gv(n,i){for(var r=0;r<i.length;r++){const s=i[r];if(typeof s!="string"&&!Array.isArray(s)){for(const c in s)if(c!=="default"&&!(c in n)){const d=Object.getOwnPropertyDescriptor(s,c);d&&Object.defineProperty(n,c,d.get?d:{enumerable:!0,get:()=>s[c]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))s(c);new MutationObserver(c=>{for(const d of c)if(d.type==="childList")for(const h of d.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&s(h)}).observe(document,{childList:!0,subtree:!0});function r(c){const d={};return c.integrity&&(d.integrity=c.integrity),c.referrerPolicy&&(d.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?d.credentials="include":c.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function s(c){if(c.ep)return;c.ep=!0;const d=r(c);fetch(c.href,d)}})();function $v(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Ru={exports:{}},or={};var lp;function Kv(){if(lp)return or;lp=1;var n=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function r(s,c,d){var h=null;if(d!==void 0&&(h=""+d),c.key!==void 0&&(h=""+c.key),"key"in c){d={};for(var p in c)p!=="key"&&(d[p]=c[p])}else d=c;return c=d.ref,{$$typeof:n,type:s,key:h,ref:c!==void 0?c:null,props:d}}return or.Fragment=i,or.jsx=r,or.jsxs=r,or}var ip;function Xv(){return ip||(ip=1,Ru.exports=Kv()),Ru.exports}var f=Xv();const ze=n=>typeof n=="string",cr=()=>{let n,i;const r=new Promise((s,c)=>{n=s,i=c});return r.resolve=n,r.reject=i,r},rp=n=>n==null?"":""+n,Qv=(n,i,r)=>{n.forEach(s=>{i[s]&&(r[s]=i[s])})},Zv=/###/g,sp=n=>n&&n.indexOf("###")>-1?n.replace(Zv,"."):n,op=n=>!n||ze(n),xr=(n,i,r)=>{const s=ze(i)?i.split("."):i;let c=0;for(;c<s.length-1;){if(op(n))return{};const d=sp(s[c]);!n[d]&&r&&(n[d]=new r),Object.prototype.hasOwnProperty.call(n,d)?n=n[d]:n={},++c}return op(n)?{}:{obj:n,k:sp(s[c])}},cp=(n,i,r)=>{const{obj:s,k:c}=xr(n,i,Object);if(s!==void 0||i.length===1){s[c]=r;return}let d=i[i.length-1],h=i.slice(0,i.length-1),p=xr(n,h,Object);for(;p.obj===void 0&&h.length;)d=`${h[h.length-1]}.${d}`,h=h.slice(0,h.length-1),p=xr(n,h,Object),p?.obj&&typeof p.obj[`${p.k}.${d}`]<"u"&&(p.obj=void 0);p.obj[`${p.k}.${d}`]=r},Fv=(n,i,r,s)=>{const{obj:c,k:d}=xr(n,i,Object);c[d]=c[d]||[],c[d].push(r)},lo=(n,i)=>{const{obj:r,k:s}=xr(n,i);if(r&&Object.prototype.hasOwnProperty.call(r,s))return r[s]},Jv=(n,i,r)=>{const s=lo(n,r);return s!==void 0?s:lo(i,r)},Dg=(n,i,r)=>{for(const s in i)s!=="__proto__"&&s!=="constructor"&&(s in n?ze(n[s])||n[s]instanceof String||ze(i[s])||i[s]instanceof String?r&&(n[s]=i[s]):Dg(n[s],i[s],r):n[s]=i[s]);return n},Sl=n=>n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var Wv={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const Pv=n=>ze(n)?n.replace(/[&<>"'\/]/g,i=>Wv[i]):n;class Iv{constructor(i){this.capacity=i,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(i){const r=this.regExpMap.get(i);if(r!==void 0)return r;const s=new RegExp(i);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(i,s),this.regExpQueue.push(i),s}}const e0=[" ",",","?","!",";"],t0=new Iv(20),a0=(n,i,r)=>{i=i||"",r=r||"";const s=e0.filter(h=>i.indexOf(h)<0&&r.indexOf(h)<0);if(s.length===0)return!0;const c=t0.getRegExp(`(${s.map(h=>h==="?"?"\\?":h).join("|")})`);let d=!c.test(n);if(!d){const h=n.indexOf(r);h>0&&!c.test(n.substring(0,h))&&(d=!0)}return d},Fu=(n,i,r=".")=>{if(!n)return;if(n[i])return Object.prototype.hasOwnProperty.call(n,i)?n[i]:void 0;const s=i.split(r);let c=n;for(let d=0;d<s.length;){if(!c||typeof c!="object")return;let h,p="";for(let g=d;g<s.length;++g)if(g!==d&&(p+=r),p+=s[g],h=c[p],h!==void 0){if(["string","number","boolean"].indexOf(typeof h)>-1&&g<s.length-1)continue;d+=g-d+1;break}c=h}return c},Sr=n=>n?.replace("_","-"),n0={type:"logger",log(n){this.output("log",n)},warn(n){this.output("warn",n)},error(n){this.output("error",n)},output(n,i){console?.[n]?.apply?.(console,i)}};class io{constructor(i,r={}){this.init(i,r)}init(i,r={}){this.prefix=r.prefix||"i18next:",this.logger=i||n0,this.options=r,this.debug=r.debug}log(...i){return this.forward(i,"log","",!0)}warn(...i){return this.forward(i,"warn","",!0)}error(...i){return this.forward(i,"error","")}deprecate(...i){return this.forward(i,"warn","WARNING DEPRECATED: ",!0)}forward(i,r,s,c){return c&&!this.debug?null:(ze(i[0])&&(i[0]=`${s}${this.prefix} ${i[0]}`),this.logger[r](i))}create(i){return new io(this.logger,{prefix:`${this.prefix}:${i}:`,...this.options})}clone(i){return i=i||this.options,i.prefix=i.prefix||this.prefix,new io(this.logger,i)}}var Ja=new io;class co{constructor(){this.observers={}}on(i,r){return i.split(" ").forEach(s=>{this.observers[s]||(this.observers[s]=new Map);const c=this.observers[s].get(r)||0;this.observers[s].set(r,c+1)}),this}off(i,r){if(this.observers[i]){if(!r){delete this.observers[i];return}this.observers[i].delete(r)}}emit(i,...r){this.observers[i]&&Array.from(this.observers[i].entries()).forEach(([c,d])=>{for(let h=0;h<d;h++)c(...r)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([c,d])=>{for(let h=0;h<d;h++)c.apply(c,[i,...r])})}}class up extends co{constructor(i,r={ns:["translation"],defaultNS:"translation"}){super(),this.data=i||{},this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(i){this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}removeNamespaces(i){const r=this.options.ns.indexOf(i);r>-1&&this.options.ns.splice(r,1)}getResource(i,r,s,c={}){const d=c.keySeparator!==void 0?c.keySeparator:this.options.keySeparator,h=c.ignoreJSONStructure!==void 0?c.ignoreJSONStructure:this.options.ignoreJSONStructure;let p;i.indexOf(".")>-1?p=i.split("."):(p=[i,r],s&&(Array.isArray(s)?p.push(...s):ze(s)&&d?p.push(...s.split(d)):p.push(s)));const g=lo(this.data,p);return!g&&!r&&!s&&i.indexOf(".")>-1&&(i=p[0],r=p[1],s=p.slice(2).join(".")),g||!h||!ze(s)?g:Fu(this.data?.[i]?.[r],s,d)}addResource(i,r,s,c,d={silent:!1}){const h=d.keySeparator!==void 0?d.keySeparator:this.options.keySeparator;let p=[i,r];s&&(p=p.concat(h?s.split(h):s)),i.indexOf(".")>-1&&(p=i.split("."),c=r,r=p[1]),this.addNamespaces(r),cp(this.data,p,c),d.silent||this.emit("added",i,r,s,c)}addResources(i,r,s,c={silent:!1}){for(const d in s)(ze(s[d])||Array.isArray(s[d]))&&this.addResource(i,r,d,s[d],{silent:!0});c.silent||this.emit("added",i,r,s)}addResourceBundle(i,r,s,c,d,h={silent:!1,skipCopy:!1}){let p=[i,r];i.indexOf(".")>-1&&(p=i.split("."),c=s,s=r,r=p[1]),this.addNamespaces(r);let g=lo(this.data,p)||{};h.skipCopy||(s=JSON.parse(JSON.stringify(s))),c?Dg(g,s,d):g={...g,...s},cp(this.data,p,g),h.silent||this.emit("added",i,r,s)}removeResourceBundle(i,r){this.hasResourceBundle(i,r)&&delete this.data[i][r],this.removeNamespaces(r),this.emit("removed",i,r)}hasResourceBundle(i,r){return this.getResource(i,r)!==void 0}getResourceBundle(i,r){return r||(r=this.options.defaultNS),this.getResource(i,r)}getDataByLanguage(i){return this.data[i]}hasLanguageSomeTranslations(i){const r=this.getDataByLanguage(i);return!!(r&&Object.keys(r)||[]).find(c=>r[c]&&Object.keys(r[c]).length>0)}toJSON(){return this.data}}var Mg={processors:{},addPostProcessor(n){this.processors[n.name]=n},handle(n,i,r,s,c){return n.forEach(d=>{i=this.processors[d]?.process(i,r,s,c)??i}),i}};const Ag=Symbol("i18next/PATH_KEY");function l0(){const n=[],i=Object.create(null);let r;return i.get=(s,c)=>(r?.revoke?.(),c===Ag?n:(n.push(c),r=Proxy.revocable(s,i),r.proxy)),Proxy.revocable(Object.create(null),i).proxy}function Ju(n,i){const{[Ag]:r}=n(l0());return r.join(i?.keySeparator??".")}const dp={},zu=n=>!ze(n)&&typeof n!="boolean"&&typeof n!="number";class ro extends co{constructor(i,r={}){super(),Qv(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],i,this),this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Ja.create("translator")}changeLanguage(i){i&&(this.language=i)}exists(i,r={interpolation:{}}){const s={...r};if(i==null)return!1;const c=this.resolve(i,s);if(c?.res===void 0)return!1;const d=zu(c.res);return!(s.returnObjects===!1&&d)}extractFromKey(i,r){let s=r.nsSeparator!==void 0?r.nsSeparator:this.options.nsSeparator;s===void 0&&(s=":");const c=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator;let d=r.ns||this.options.defaultNS||[];const h=s&&i.indexOf(s)>-1,p=!this.options.userDefinedKeySeparator&&!r.keySeparator&&!this.options.userDefinedNsSeparator&&!r.nsSeparator&&!a0(i,s,c);if(h&&!p){const g=i.match(this.interpolator.nestingRegexp);if(g&&g.length>0)return{key:i,namespaces:ze(d)?[d]:d};const m=i.split(s);(s!==c||s===c&&this.options.ns.indexOf(m[0])>-1)&&(d=m.shift()),i=m.join(c)}return{key:i,namespaces:ze(d)?[d]:d}}translate(i,r,s){let c=typeof r=="object"?{...r}:r;if(typeof c!="object"&&this.options.overloadTranslationOptionHandler&&(c=this.options.overloadTranslationOptionHandler(arguments)),typeof c=="object"&&(c={...c}),c||(c={}),i==null)return"";typeof i=="function"&&(i=Ju(i,{...this.options,...c})),Array.isArray(i)||(i=[String(i)]);const d=c.returnDetails!==void 0?c.returnDetails:this.options.returnDetails,h=c.keySeparator!==void 0?c.keySeparator:this.options.keySeparator,{key:p,namespaces:g}=this.extractFromKey(i[i.length-1],c),m=g[g.length-1];let b=c.nsSeparator!==void 0?c.nsSeparator:this.options.nsSeparator;b===void 0&&(b=":");const x=c.lng||this.language,_=c.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(x?.toLowerCase()==="cimode")return _?d?{res:`${m}${b}${p}`,usedKey:p,exactUsedKey:p,usedLng:x,usedNS:m,usedParams:this.getUsedParamsDetails(c)}:`${m}${b}${p}`:d?{res:p,usedKey:p,exactUsedKey:p,usedLng:x,usedNS:m,usedParams:this.getUsedParamsDetails(c)}:p;const j=this.resolve(i,c);let R=j?.res;const D=j?.usedKey||p,k=j?.exactUsedKey||p,Z=["[object Number]","[object Function]","[object RegExp]"],G=c.joinArrays!==void 0?c.joinArrays:this.options.joinArrays,K=!this.i18nFormat||this.i18nFormat.handleAsObject,le=c.count!==void 0&&!ze(c.count),F=ro.hasDefaultValue(c),I=le?this.pluralResolver.getSuffix(x,c.count,c):"",W=c.ordinal&&le?this.pluralResolver.getSuffix(x,c.count,{ordinal:!1}):"",N=le&&!c.ordinal&&c.count===0,Y=N&&c[`defaultValue${this.options.pluralSeparator}zero`]||c[`defaultValue${I}`]||c[`defaultValue${W}`]||c.defaultValue;let J=R;K&&!R&&F&&(J=Y);const he=zu(J),ie=Object.prototype.toString.apply(J);if(K&&J&&he&&Z.indexOf(ie)<0&&!(ze(G)&&Array.isArray(J))){if(!c.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const ee=this.options.returnedObjectHandler?this.options.returnedObjectHandler(D,J,{...c,ns:g}):`key '${p} (${this.language})' returned an object instead of string.`;return d?(j.res=ee,j.usedParams=this.getUsedParamsDetails(c),j):ee}if(h){const ee=Array.isArray(J),se=ee?[]:{},ge=ee?k:D;for(const M in J)if(Object.prototype.hasOwnProperty.call(J,M)){const P=`${ge}${h}${M}`;F&&!R?se[M]=this.translate(P,{...c,defaultValue:zu(Y)?Y[M]:void 0,joinArrays:!1,ns:g}):se[M]=this.translate(P,{...c,joinArrays:!1,ns:g}),se[M]===P&&(se[M]=J[M])}R=se}}else if(K&&ze(G)&&Array.isArray(R))R=R.join(G),R&&(R=this.extendTranslation(R,i,c,s));else{let ee=!1,se=!1;!this.isValidLookup(R)&&F&&(ee=!0,R=Y),this.isValidLookup(R)||(se=!0,R=p);const M=(c.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&se?void 0:R,P=F&&Y!==R&&this.options.updateMissing;if(se||ee||P){if(this.logger.log(P?"updateKey":"missingKey",x,m,p,P?Y:R),h){const E=this.resolve(p,{...c,keySeparator:!1});E&&E.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 de=[];const $=this.languageUtils.getFallbackCodes(this.options.fallbackLng,c.lng||this.language);if(this.options.saveMissingTo==="fallback"&&$&&$[0])for(let E=0;E<$.length;E++)de.push($[E]);else this.options.saveMissingTo==="all"?de=this.languageUtils.toResolveHierarchy(c.lng||this.language):de.push(c.lng||this.language);const fe=(E,B,te)=>{const re=F&&te!==R?te:M;this.options.missingKeyHandler?this.options.missingKeyHandler(E,m,B,re,P,c):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(E,m,B,re,P,c),this.emit("missingKey",E,m,B,R)};this.options.saveMissing&&(this.options.saveMissingPlurals&&le?de.forEach(E=>{const B=this.pluralResolver.getSuffixes(E,c);N&&c[`defaultValue${this.options.pluralSeparator}zero`]&&B.indexOf(`${this.options.pluralSeparator}zero`)<0&&B.push(`${this.options.pluralSeparator}zero`),B.forEach(te=>{fe([E],p+te,c[`defaultValue${te}`]||Y)})}):fe(de,p,Y))}R=this.extendTranslation(R,i,c,j,s),se&&R===p&&this.options.appendNamespaceToMissingKey&&(R=`${m}${b}${p}`),(se||ee)&&this.options.parseMissingKeyHandler&&(R=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${m}${b}${p}`:p,ee?R:void 0,c))}return d?(j.res=R,j.usedParams=this.getUsedParamsDetails(c),j):R}extendTranslation(i,r,s,c,d){if(this.i18nFormat?.parse)i=this.i18nFormat.parse(i,{...this.options.interpolation.defaultVariables,...s},s.lng||this.language||c.usedLng,c.usedNS,c.usedKey,{resolved:c});else if(!s.skipInterpolation){s.interpolation&&this.interpolator.init({...s,interpolation:{...this.options.interpolation,...s.interpolation}});const g=ze(i)&&(s?.interpolation?.skipOnVariables!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let m;if(g){const x=i.match(this.interpolator.nestingRegexp);m=x&&x.length}let b=s.replace&&!ze(s.replace)?s.replace:s;if(this.options.interpolation.defaultVariables&&(b={...this.options.interpolation.defaultVariables,...b}),i=this.interpolator.interpolate(i,b,s.lng||this.language||c.usedLng,s),g){const x=i.match(this.interpolator.nestingRegexp),_=x&&x.length;m<_&&(s.nest=!1)}!s.lng&&c&&c.res&&(s.lng=this.language||c.usedLng),s.nest!==!1&&(i=this.interpolator.nest(i,(...x)=>d?.[0]===x[0]&&!s.context?(this.logger.warn(`It seems you are nesting recursively key: ${x[0]} in key: ${r[0]}`),null):this.translate(...x,r),s)),s.interpolation&&this.interpolator.reset()}const h=s.postProcess||this.options.postProcess,p=ze(h)?[h]:h;return i!=null&&p?.length&&s.applyPostProcessor!==!1&&(i=Mg.handle(p,i,r,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...c,usedParams:this.getUsedParamsDetails(s)},...s}:s,this)),i}resolve(i,r={}){let s,c,d,h,p;return ze(i)&&(i=[i]),i.forEach(g=>{if(this.isValidLookup(s))return;const m=this.extractFromKey(g,r),b=m.key;c=b;let x=m.namespaces;this.options.fallbackNS&&(x=x.concat(this.options.fallbackNS));const _=r.count!==void 0&&!ze(r.count),j=_&&!r.ordinal&&r.count===0,R=r.context!==void 0&&(ze(r.context)||typeof r.context=="number")&&r.context!=="",D=r.lngs?r.lngs:this.languageUtils.toResolveHierarchy(r.lng||this.language,r.fallbackLng);x.forEach(k=>{this.isValidLookup(s)||(p=k,!dp[`${D[0]}-${k}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(p)&&(dp[`${D[0]}-${k}`]=!0,this.logger.warn(`key "${c}" for languages "${D.join(", ")}" won't get resolved as namespace "${p}" 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!!!")),D.forEach(Z=>{if(this.isValidLookup(s))return;h=Z;const G=[b];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(G,b,Z,k,r);else{let le;_&&(le=this.pluralResolver.getSuffix(Z,r.count,r));const F=`${this.options.pluralSeparator}zero`,I=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(_&&(r.ordinal&&le.indexOf(I)===0&&G.push(b+le.replace(I,this.options.pluralSeparator)),G.push(b+le),j&&G.push(b+F)),R){const W=`${b}${this.options.contextSeparator||"_"}${r.context}`;G.push(W),_&&(r.ordinal&&le.indexOf(I)===0&&G.push(W+le.replace(I,this.options.pluralSeparator)),G.push(W+le),j&&G.push(W+F))}}let K;for(;K=G.pop();)this.isValidLookup(s)||(d=K,s=this.getResource(Z,k,K,r))}))})}),{res:s,usedKey:c,exactUsedKey:d,usedLng:h,usedNS:p}}isValidLookup(i){return i!==void 0&&!(!this.options.returnNull&&i===null)&&!(!this.options.returnEmptyString&&i==="")}getResource(i,r,s,c={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(i,r,s,c):this.resourceStore.getResource(i,r,s,c)}getUsedParamsDetails(i={}){const r=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],s=i.replace&&!ze(i.replace);let c=s?i.replace:i;if(s&&typeof i.count<"u"&&(c.count=i.count),this.options.interpolation.defaultVariables&&(c={...this.options.interpolation.defaultVariables,...c}),!s){c={...c};for(const d of r)delete c[d]}return c}static hasDefaultValue(i){const r="defaultValue";for(const s in i)if(Object.prototype.hasOwnProperty.call(i,s)&&r===s.substring(0,r.length)&&i[s]!==void 0)return!0;return!1}}class fp{constructor(i){this.options=i,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Ja.create("languageUtils")}getScriptPartFromCode(i){if(i=Sr(i),!i||i.indexOf("-")<0)return null;const r=i.split("-");return r.length===2||(r.pop(),r[r.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(r.join("-"))}getLanguagePartFromCode(i){if(i=Sr(i),!i||i.indexOf("-")<0)return i;const r=i.split("-");return this.formatLanguageCode(r[0])}formatLanguageCode(i){if(ze(i)&&i.indexOf("-")>-1){let r;try{r=Intl.getCanonicalLocales(i)[0]}catch{}return r&&this.options.lowerCaseLng&&(r=r.toLowerCase()),r||(this.options.lowerCaseLng?i.toLowerCase():i)}return this.options.cleanCode||this.options.lowerCaseLng?i.toLowerCase():i}isSupportedCode(i){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(i=this.getLanguagePartFromCode(i)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(i)>-1}getBestMatchFromCodes(i){if(!i)return null;let r;return i.forEach(s=>{if(r)return;const c=this.formatLanguageCode(s);(!this.options.supportedLngs||this.isSupportedCode(c))&&(r=c)}),!r&&this.options.supportedLngs&&i.forEach(s=>{if(r)return;const c=this.getScriptPartFromCode(s);if(this.isSupportedCode(c))return r=c;const d=this.getLanguagePartFromCode(s);if(this.isSupportedCode(d))return r=d;r=this.options.supportedLngs.find(h=>{if(h===d)return h;if(!(h.indexOf("-")<0&&d.indexOf("-")<0)&&(h.indexOf("-")>0&&d.indexOf("-")<0&&h.substring(0,h.indexOf("-"))===d||h.indexOf(d)===0&&d.length>1))return h})}),r||(r=this.getFallbackCodes(this.options.fallbackLng)[0]),r}getFallbackCodes(i,r){if(!i)return[];if(typeof i=="function"&&(i=i(r)),ze(i)&&(i=[i]),Array.isArray(i))return i;if(!r)return i.default||[];let s=i[r];return s||(s=i[this.getScriptPartFromCode(r)]),s||(s=i[this.formatLanguageCode(r)]),s||(s=i[this.getLanguagePartFromCode(r)]),s||(s=i.default),s||[]}toResolveHierarchy(i,r){const s=this.getFallbackCodes((r===!1?[]:r)||this.options.fallbackLng||[],i),c=[],d=h=>{h&&(this.isSupportedCode(h)?c.push(h):this.logger.warn(`rejecting language code not found in supportedLngs: ${h}`))};return ze(i)&&(i.indexOf("-")>-1||i.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&d(this.formatLanguageCode(i)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&d(this.getScriptPartFromCode(i)),this.options.load!=="currentOnly"&&d(this.getLanguagePartFromCode(i))):ze(i)&&d(this.formatLanguageCode(i)),s.forEach(h=>{c.indexOf(h)<0&&d(this.formatLanguageCode(h))}),c}}const hp={zero:0,one:1,two:2,few:3,many:4,other:5},mp={select:n=>n===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class i0{constructor(i,r={}){this.languageUtils=i,this.options=r,this.logger=Ja.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(i,r={}){const s=Sr(i==="dev"?"en":i),c=r.ordinal?"ordinal":"cardinal",d=JSON.stringify({cleanedCode:s,type:c});if(d in this.pluralRulesCache)return this.pluralRulesCache[d];let h;try{h=new Intl.PluralRules(s,{type:c})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),mp;if(!i.match(/-|_/))return mp;const g=this.languageUtils.getLanguagePartFromCode(i);h=this.getRule(g,r)}return this.pluralRulesCache[d]=h,h}needsPlural(i,r={}){let s=this.getRule(i,r);return s||(s=this.getRule("dev",r)),s?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(i,r,s={}){return this.getSuffixes(i,s).map(c=>`${r}${c}`)}getSuffixes(i,r={}){let s=this.getRule(i,r);return s||(s=this.getRule("dev",r)),s?s.resolvedOptions().pluralCategories.sort((c,d)=>hp[c]-hp[d]).map(c=>`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${c}`):[]}getSuffix(i,r,s={}){const c=this.getRule(i,s);return c?`${this.options.prepend}${s.ordinal?`ordinal${this.options.prepend}`:""}${c.select(r)}`:(this.logger.warn(`no plural rule found for: ${i}`),this.getSuffix("dev",r,s))}}const pp=(n,i,r,s=".",c=!0)=>{let d=Jv(n,i,r);return!d&&c&&ze(r)&&(d=Fu(n,r,s),d===void 0&&(d=Fu(i,r,s))),d},Tu=n=>n.replace(/\$/g,"$$$$");class gp{constructor(i={}){this.logger=Ja.create("interpolator"),this.options=i,this.format=i?.interpolation?.format||(r=>r),this.init(i)}init(i={}){i.interpolation||(i.interpolation={escapeValue:!0});const{escape:r,escapeValue:s,useRawValueToEscape:c,prefix:d,prefixEscaped:h,suffix:p,suffixEscaped:g,formatSeparator:m,unescapeSuffix:b,unescapePrefix:x,nestingPrefix:_,nestingPrefixEscaped:j,nestingSuffix:R,nestingSuffixEscaped:D,nestingOptionsSeparator:k,maxReplaces:Z,alwaysFormat:G}=i.interpolation;this.escape=r!==void 0?r:Pv,this.escapeValue=s!==void 0?s:!0,this.useRawValueToEscape=c!==void 0?c:!1,this.prefix=d?Sl(d):h||"{{",this.suffix=p?Sl(p):g||"}}",this.formatSeparator=m||",",this.unescapePrefix=b?"":x||"-",this.unescapeSuffix=this.unescapePrefix?"":b||"",this.nestingPrefix=_?Sl(_):j||Sl("$t("),this.nestingSuffix=R?Sl(R):D||Sl(")"),this.nestingOptionsSeparator=k||",",this.maxReplaces=Z||1e3,this.alwaysFormat=G!==void 0?G:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const i=(r,s)=>r?.source===s?(r.lastIndex=0,r):new RegExp(s,"g");this.regexp=i(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=i(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=i(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(i,r,s,c){let d,h,p;const g=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},m=j=>{if(j.indexOf(this.formatSeparator)<0){const Z=pp(r,g,j,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(Z,void 0,s,{...c,...r,interpolationkey:j}):Z}const R=j.split(this.formatSeparator),D=R.shift().trim(),k=R.join(this.formatSeparator).trim();return this.format(pp(r,g,D,this.options.keySeparator,this.options.ignoreJSONStructure),k,s,{...c,...r,interpolationkey:D})};this.resetRegExp();const b=c?.missingInterpolationHandler||this.options.missingInterpolationHandler,x=c?.interpolation?.skipOnVariables!==void 0?c.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:j=>Tu(j)},{regex:this.regexp,safeValue:j=>this.escapeValue?Tu(this.escape(j)):Tu(j)}].forEach(j=>{for(p=0;d=j.regex.exec(i);){const R=d[1].trim();if(h=m(R),h===void 0)if(typeof b=="function"){const k=b(i,d,c);h=ze(k)?k:""}else if(c&&Object.prototype.hasOwnProperty.call(c,R))h="";else if(x){h=d[0];continue}else this.logger.warn(`missed to pass in variable ${R} for interpolating ${i}`),h="";else!ze(h)&&!this.useRawValueToEscape&&(h=rp(h));const D=j.safeValue(h);if(i=i.replace(d[0],D),x?(j.regex.lastIndex+=h.length,j.regex.lastIndex-=d[0].length):j.regex.lastIndex=0,p++,p>=this.maxReplaces)break}}),i}nest(i,r,s={}){let c,d,h;const p=(g,m)=>{const b=this.nestingOptionsSeparator;if(g.indexOf(b)<0)return g;const x=g.split(new RegExp(`${Sl(b)}[ ]*{`));let _=`{${x[1]}`;g=x[0],_=this.interpolate(_,h);const j=_.match(/'/g),R=_.match(/"/g);((j?.length??0)%2===0&&!R||(R?.length??0)%2!==0)&&(_=_.replace(/'/g,'"'));try{h=JSON.parse(_),m&&(h={...m,...h})}catch(D){return this.logger.warn(`failed parsing options string in nesting for key ${g}`,D),`${g}${b}${_}`}return h.defaultValue&&h.defaultValue.indexOf(this.prefix)>-1&&delete h.defaultValue,g};for(;c=this.nestingRegexp.exec(i);){let g=[];h={...s},h=h.replace&&!ze(h.replace)?h.replace:h,h.applyPostProcessor=!1,delete h.defaultValue;const m=/{.*}/.test(c[1])?c[1].lastIndexOf("}")+1:c[1].indexOf(this.formatSeparator);if(m!==-1&&(g=c[1].slice(m).split(this.formatSeparator).map(b=>b.trim()).filter(Boolean),c[1]=c[1].slice(0,m)),d=r(p.call(this,c[1].trim(),h),h),d&&c[0]===i&&!ze(d))return d;ze(d)||(d=rp(d)),d||(this.logger.warn(`missed to resolve ${c[1]} for nesting ${i}`),d=""),g.length&&(d=g.reduce((b,x)=>this.format(b,x,s.lng,{...s,interpolationkey:c[1].trim()}),d.trim())),i=i.replace(c[0],d),this.regexp.lastIndex=0}return i}}const r0=n=>{let i=n.toLowerCase().trim();const r={};if(n.indexOf("(")>-1){const s=n.split("(");i=s[0].toLowerCase().trim();const c=s[1].substring(0,s[1].length-1);i==="currency"&&c.indexOf(":")<0?r.currency||(r.currency=c.trim()):i==="relativetime"&&c.indexOf(":")<0?r.range||(r.range=c.trim()):c.split(";").forEach(h=>{if(h){const[p,...g]=h.split(":"),m=g.join(":").trim().replace(/^'+|'+$/g,""),b=p.trim();r[b]||(r[b]=m),m==="false"&&(r[b]=!1),m==="true"&&(r[b]=!0),isNaN(m)||(r[b]=parseInt(m,10))}})}return{formatName:i,formatOptions:r}},yp=n=>{const i={};return(r,s,c)=>{let d=c;c&&c.interpolationkey&&c.formatParams&&c.formatParams[c.interpolationkey]&&c[c.interpolationkey]&&(d={...d,[c.interpolationkey]:void 0});const h=s+JSON.stringify(d);let p=i[h];return p||(p=n(Sr(s),c),i[h]=p),p(r)}},s0=n=>(i,r,s)=>n(Sr(r),s)(i);class o0{constructor(i={}){this.logger=Ja.create("formatter"),this.options=i,this.init(i)}init(i,r={interpolation:{}}){this.formatSeparator=r.interpolation.formatSeparator||",";const s=r.cacheInBuiltFormats?yp:s0;this.formats={number:s((c,d)=>{const h=new Intl.NumberFormat(c,{...d});return p=>h.format(p)}),currency:s((c,d)=>{const h=new Intl.NumberFormat(c,{...d,style:"currency"});return p=>h.format(p)}),datetime:s((c,d)=>{const h=new Intl.DateTimeFormat(c,{...d});return p=>h.format(p)}),relativetime:s((c,d)=>{const h=new Intl.RelativeTimeFormat(c,{...d});return p=>h.format(p,d.range||"day")}),list:s((c,d)=>{const h=new Intl.ListFormat(c,{...d});return p=>h.format(p)})}}add(i,r){this.formats[i.toLowerCase().trim()]=r}addCached(i,r){this.formats[i.toLowerCase().trim()]=yp(r)}format(i,r,s,c={}){const d=r.split(this.formatSeparator);if(d.length>1&&d[0].indexOf("(")>1&&d[0].indexOf(")")<0&&d.find(p=>p.indexOf(")")>-1)){const p=d.findIndex(g=>g.indexOf(")")>-1);d[0]=[d[0],...d.splice(1,p)].join(this.formatSeparator)}return d.reduce((p,g)=>{const{formatName:m,formatOptions:b}=r0(g);if(this.formats[m]){let x=p;try{const _=c?.formatParams?.[c.interpolationkey]||{},j=_.locale||_.lng||c.locale||c.lng||s;x=this.formats[m](p,j,{...b,...c,..._})}catch(_){this.logger.warn(_)}return x}else this.logger.warn(`there was no format function for ${m}`);return p},i)}}const c0=(n,i)=>{n.pending[i]!==void 0&&(delete n.pending[i],n.pendingCount--)};class u0 extends co{constructor(i,r,s,c={}){super(),this.backend=i,this.store=r,this.services=s,this.languageUtils=s.languageUtils,this.options=c,this.logger=Ja.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=c.maxParallelReads||10,this.readingCalls=0,this.maxRetries=c.maxRetries>=0?c.maxRetries:5,this.retryTimeout=c.retryTimeout>=1?c.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(s,c.backend,c)}queueLoad(i,r,s,c){const d={},h={},p={},g={};return i.forEach(m=>{let b=!0;r.forEach(x=>{const _=`${m}|${x}`;!s.reload&&this.store.hasResourceBundle(m,x)?this.state[_]=2:this.state[_]<0||(this.state[_]===1?h[_]===void 0&&(h[_]=!0):(this.state[_]=1,b=!1,h[_]===void 0&&(h[_]=!0),d[_]===void 0&&(d[_]=!0),g[x]===void 0&&(g[x]=!0)))}),b||(p[m]=!0)}),(Object.keys(d).length||Object.keys(h).length)&&this.queue.push({pending:h,pendingCount:Object.keys(h).length,loaded:{},errors:[],callback:c}),{toLoad:Object.keys(d),pending:Object.keys(h),toLoadLanguages:Object.keys(p),toLoadNamespaces:Object.keys(g)}}loaded(i,r,s){const c=i.split("|"),d=c[0],h=c[1];r&&this.emit("failedLoading",d,h,r),!r&&s&&this.store.addResourceBundle(d,h,s,void 0,void 0,{skipCopy:!0}),this.state[i]=r?-1:2,r&&s&&(this.state[i]=0);const p={};this.queue.forEach(g=>{Fv(g.loaded,[d],h),c0(g,i),r&&g.errors.push(r),g.pendingCount===0&&!g.done&&(Object.keys(g.loaded).forEach(m=>{p[m]||(p[m]={});const b=g.loaded[m];b.length&&b.forEach(x=>{p[m][x]===void 0&&(p[m][x]=!0)})}),g.done=!0,g.errors.length?g.callback(g.errors):g.callback())}),this.emit("loaded",p),this.queue=this.queue.filter(g=>!g.done)}read(i,r,s,c=0,d=this.retryTimeout,h){if(!i.length)return h(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:i,ns:r,fcName:s,tried:c,wait:d,callback:h});return}this.readingCalls++;const p=(m,b)=>{if(this.readingCalls--,this.waitingReads.length>0){const x=this.waitingReads.shift();this.read(x.lng,x.ns,x.fcName,x.tried,x.wait,x.callback)}if(m&&b&&c<this.maxRetries){setTimeout(()=>{this.read.call(this,i,r,s,c+1,d*2,h)},d);return}h(m,b)},g=this.backend[s].bind(this.backend);if(g.length===2){try{const m=g(i,r);m&&typeof m.then=="function"?m.then(b=>p(null,b)).catch(p):p(null,m)}catch(m){p(m)}return}return g(i,r,p)}prepareLoading(i,r,s={},c){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),c&&c();ze(i)&&(i=this.languageUtils.toResolveHierarchy(i)),ze(r)&&(r=[r]);const d=this.queueLoad(i,r,s,c);if(!d.toLoad.length)return d.pending.length||c(),null;d.toLoad.forEach(h=>{this.loadOne(h)})}load(i,r,s){this.prepareLoading(i,r,{},s)}reload(i,r,s){this.prepareLoading(i,r,{reload:!0},s)}loadOne(i,r=""){const s=i.split("|"),c=s[0],d=s[1];this.read(c,d,"read",void 0,void 0,(h,p)=>{h&&this.logger.warn(`${r}loading namespace ${d} for language ${c} failed`,h),!h&&p&&this.logger.log(`${r}loaded namespace ${d} for language ${c}`,p),this.loaded(i,h,p)})}saveMissing(i,r,s,c,d,h={},p=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(r)){this.logger.warn(`did not save key "${s}" 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(!(s==null||s==="")){if(this.backend?.create){const g={...h,isUpdate:d},m=this.backend.create.bind(this.backend);if(m.length<6)try{let b;m.length===5?b=m(i,r,s,c,g):b=m(i,r,s,c),b&&typeof b.then=="function"?b.then(x=>p(null,x)).catch(p):p(null,b)}catch(b){p(b)}else m(i,r,s,c,p,g)}!i||!i[0]||this.store.addResource(i[0],r,s,c)}}}const Ou=()=>({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:n=>{let i={};if(typeof n[1]=="object"&&(i=n[1]),ze(n[1])&&(i.defaultValue=n[1]),ze(n[2])&&(i.tDescription=n[2]),typeof n[2]=="object"||typeof n[3]=="object"){const r=n[3]||n[2];Object.keys(r).forEach(s=>{i[s]=r[s]})}return i},interpolation:{escapeValue:!0,format:n=>n,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),xp=n=>(ze(n.ns)&&(n.ns=[n.ns]),ze(n.fallbackLng)&&(n.fallbackLng=[n.fallbackLng]),ze(n.fallbackNS)&&(n.fallbackNS=[n.fallbackNS]),n.supportedLngs?.indexOf?.("cimode")<0&&(n.supportedLngs=n.supportedLngs.concat(["cimode"])),typeof n.initImmediate=="boolean"&&(n.initAsync=n.initImmediate),n),Zs=()=>{},d0=n=>{Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(r=>{typeof n[r]=="function"&&(n[r]=n[r].bind(n))})},Lg="__i18next_supportNoticeShown",f0=()=>typeof globalThis<"u"&&!!globalThis[Lg],h0=()=>{typeof globalThis<"u"&&(globalThis[Lg]=!0)},m0=n=>!!(n?.modules?.backend?.name?.indexOf("Locize")>0||n?.modules?.backend?.constructor?.name?.indexOf("Locize")>0||n?.options?.backend?.backends&&n.options.backend.backends.some(i=>i?.name?.indexOf("Locize")>0||i?.constructor?.name?.indexOf("Locize")>0)||n?.options?.backend?.projectId||n?.options?.backend?.backendOptions&&n.options.backend.backendOptions.some(i=>i?.projectId));class vr extends co{constructor(i={},r){if(super(),this.options=xp(i),this.services={},this.logger=Ja,this.modules={external:[]},d0(this),r&&!this.isInitialized&&!i.isClone){if(!this.options.initAsync)return this.init(i,r),this;setTimeout(()=>{this.init(i,r)},0)}}init(i={},r){this.isInitializing=!0,typeof i=="function"&&(r=i,i={}),i.defaultNS==null&&i.ns&&(ze(i.ns)?i.defaultNS=i.ns:i.ns.indexOf("translation")<0&&(i.defaultNS=i.ns[0]));const s=Ou();this.options={...s,...this.options,...xp(i)},this.options.interpolation={...s.interpolation,...this.options.interpolation},i.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=i.keySeparator),i.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=i.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=s.overloadTranslationOptionHandler),this.options.showSupportNotice!==!1&&!m0(this)&&!f0()&&(typeof console<"u"&&typeof console.info<"u"&&console.info("🌐 i18next is maintained with support from Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙"),h0());const c=m=>m?typeof m=="function"?new m:m:null;if(!this.options.isClone){this.modules.logger?Ja.init(c(this.modules.logger),this.options):Ja.init(null,this.options);let m;this.modules.formatter?m=this.modules.formatter:m=o0;const b=new fp(this.options);this.store=new up(this.options.resources,this.options);const x=this.services;x.logger=Ja,x.resourceStore=this.store,x.languageUtils=b,x.pluralResolver=new i0(b,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==s.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"),m&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(x.formatter=c(m),x.formatter.init&&x.formatter.init(x,this.options),this.options.interpolation.format=x.formatter.format.bind(x.formatter)),x.interpolator=new gp(this.options),x.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},x.backendConnector=new u0(c(this.modules.backend),x.resourceStore,x,this.options),x.backendConnector.on("*",(j,...R)=>{this.emit(j,...R)}),this.modules.languageDetector&&(x.languageDetector=c(this.modules.languageDetector),x.languageDetector.init&&x.languageDetector.init(x,this.options.detection,this.options)),this.modules.i18nFormat&&(x.i18nFormat=c(this.modules.i18nFormat),x.i18nFormat.init&&x.i18nFormat.init(this)),this.translator=new ro(this.services,this.options),this.translator.on("*",(j,...R)=>{this.emit(j,...R)}),this.modules.external.forEach(j=>{j.init&&j.init(this)})}if(this.format=this.options.interpolation.format,r||(r=Zs),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const m=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);m.length>0&&m[0]!=="dev"&&(this.options.lng=m[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(m=>{this[m]=(...b)=>this.store[m](...b)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(m=>{this[m]=(...b)=>(this.store[m](...b),this)});const p=cr(),g=()=>{const m=(b,x)=>{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),p.resolve(x),r(b,x)};if(this.languages&&!this.isInitialized)return m(null,this.t.bind(this));this.changeLanguage(this.options.lng,m)};return this.options.resources||!this.options.initAsync?g():setTimeout(g,0),p}loadResources(i,r=Zs){let s=r;const c=ze(i)?i:this.language;if(typeof i=="function"&&(s=i),!this.options.resources||this.options.partialBundledLanguages){if(c?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return s();const d=[],h=p=>{if(!p||p==="cimode")return;this.services.languageUtils.toResolveHierarchy(p).forEach(m=>{m!=="cimode"&&d.indexOf(m)<0&&d.push(m)})};c?h(c):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(g=>h(g)),this.options.preload?.forEach?.(p=>h(p)),this.services.backendConnector.load(d,this.options.ns,p=>{!p&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),s(p)})}else s(null)}reloadResources(i,r,s){const c=cr();return typeof i=="function"&&(s=i,i=void 0),typeof r=="function"&&(s=r,r=void 0),i||(i=this.languages),r||(r=this.options.ns),s||(s=Zs),this.services.backendConnector.reload(i,r,d=>{c.resolve(),s(d)}),c}use(i){if(!i)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!i.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return i.type==="backend"&&(this.modules.backend=i),(i.type==="logger"||i.log&&i.warn&&i.error)&&(this.modules.logger=i),i.type==="languageDetector"&&(this.modules.languageDetector=i),i.type==="i18nFormat"&&(this.modules.i18nFormat=i),i.type==="postProcessor"&&Mg.addPostProcessor(i),i.type==="formatter"&&(this.modules.formatter=i),i.type==="3rdParty"&&this.modules.external.push(i),this}setResolvedLanguage(i){if(!(!i||!this.languages)&&!(["cimode","dev"].indexOf(i)>-1)){for(let r=0;r<this.languages.length;r++){const s=this.languages[r];if(!(["cimode","dev"].indexOf(s)>-1)&&this.store.hasLanguageSomeTranslations(s)){this.resolvedLanguage=s;break}}!this.resolvedLanguage&&this.languages.indexOf(i)<0&&this.store.hasLanguageSomeTranslations(i)&&(this.resolvedLanguage=i,this.languages.unshift(i))}}changeLanguage(i,r){this.isLanguageChangingTo=i;const s=cr();this.emit("languageChanging",i);const c=p=>{this.language=p,this.languages=this.services.languageUtils.toResolveHierarchy(p),this.resolvedLanguage=void 0,this.setResolvedLanguage(p)},d=(p,g)=>{g?this.isLanguageChangingTo===i&&(c(g),this.translator.changeLanguage(g),this.isLanguageChangingTo=void 0,this.emit("languageChanged",g),this.logger.log("languageChanged",g)):this.isLanguageChangingTo=void 0,s.resolve((...m)=>this.t(...m)),r&&r(p,(...m)=>this.t(...m))},h=p=>{!i&&!p&&this.services.languageDetector&&(p=[]);const g=ze(p)?p:p&&p[0],m=this.store.hasLanguageSomeTranslations(g)?g:this.services.languageUtils.getBestMatchFromCodes(ze(p)?[p]:p);m&&(this.language||c(m),this.translator.language||this.translator.changeLanguage(m),this.services.languageDetector?.cacheUserLanguage?.(m)),this.loadResources(m,b=>{d(b,m)})};return!i&&this.services.languageDetector&&!this.services.languageDetector.async?h(this.services.languageDetector.detect()):!i&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(h):this.services.languageDetector.detect(h):h(i),s}getFixedT(i,r,s){const c=(d,h,...p)=>{let g;typeof h!="object"?g=this.options.overloadTranslationOptionHandler([d,h].concat(p)):g={...h},g.lng=g.lng||c.lng,g.lngs=g.lngs||c.lngs,g.ns=g.ns||c.ns,g.keyPrefix!==""&&(g.keyPrefix=g.keyPrefix||s||c.keyPrefix);const m=this.options.keySeparator||".";let b;return g.keyPrefix&&Array.isArray(d)?b=d.map(x=>(typeof x=="function"&&(x=Ju(x,{...this.options,...h})),`${g.keyPrefix}${m}${x}`)):(typeof d=="function"&&(d=Ju(d,{...this.options,...h})),b=g.keyPrefix?`${g.keyPrefix}${m}${d}`:d),this.t(b,g)};return ze(i)?c.lng=i:c.lngs=i,c.ns=r,c.keyPrefix=s,c}t(...i){return this.translator?.translate(...i)}exists(...i){return this.translator?.exists(...i)}setDefaultNamespace(i){this.options.defaultNS=i}hasLoadedNamespace(i,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;const s=r.lng||this.resolvedLanguage||this.languages[0],c=this.options?this.options.fallbackLng:!1,d=this.languages[this.languages.length-1];if(s.toLowerCase()==="cimode")return!0;const h=(p,g)=>{const m=this.services.backendConnector.state[`${p}|${g}`];return m===-1||m===0||m===2};if(r.precheck){const p=r.precheck(this,h);if(p!==void 0)return p}return!!(this.hasResourceBundle(s,i)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||h(s,i)&&(!c||h(d,i)))}loadNamespaces(i,r){const s=cr();return this.options.ns?(ze(i)&&(i=[i]),i.forEach(c=>{this.options.ns.indexOf(c)<0&&this.options.ns.push(c)}),this.loadResources(c=>{s.resolve(),r&&r(c)}),s):(r&&r(),Promise.resolve())}loadLanguages(i,r){const s=cr();ze(i)&&(i=[i]);const c=this.options.preload||[],d=i.filter(h=>c.indexOf(h)<0&&this.services.languageUtils.isSupportedCode(h));return d.length?(this.options.preload=c.concat(d),this.loadResources(h=>{s.resolve(),r&&r(h)}),s):(r&&r(),Promise.resolve())}dir(i){if(i||(i=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!i)return"rtl";try{const c=new Intl.Locale(i);if(c&&c.getTextInfo){const d=c.getTextInfo();if(d&&d.direction)return d.direction}}catch{}const 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"],s=this.services?.languageUtils||new fp(Ou());return i.toLowerCase().indexOf("-latn")>1?"ltr":r.indexOf(s.getLanguagePartFromCode(i))>-1||i.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(i={},r){const s=new vr(i,r);return s.createInstance=vr.createInstance,s}cloneInstance(i={},r=Zs){const s=i.forkResourceStore;s&&delete i.forkResourceStore;const c={...this.options,...i,isClone:!0},d=new vr(c);if((i.debug!==void 0||i.prefix!==void 0)&&(d.logger=d.logger.clone(i)),["store","services","language"].forEach(p=>{d[p]=this[p]}),d.services={...this.services},d.services.utils={hasLoadedNamespace:d.hasLoadedNamespace.bind(d)},s){const p=Object.keys(this.store.data).reduce((g,m)=>(g[m]={...this.store.data[m]},g[m]=Object.keys(g[m]).reduce((b,x)=>(b[x]={...g[m][x]},b),g[m]),g),{});d.store=new up(p,c),d.services.resourceStore=d.store}if(i.interpolation){const g={...Ou().interpolation,...this.options.interpolation,...i.interpolation},m={...c,interpolation:g};d.services.interpolator=new gp(m)}return d.translator=new ro(d.services,c),d.translator.on("*",(p,...g)=>{d.emit(p,...g)}),d.init(c,r),d.translator.options=c,d.translator.backendConnector.services.utils={hasLoadedNamespace:d.hasLoadedNamespace.bind(d)},d}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Kt=vr.createInstance();Kt.createInstance;Kt.dir;Kt.init;Kt.loadResources;Kt.reloadResources;Kt.use;Kt.changeLanguage;Kt.getFixedT;Kt.t;Kt.exists;Kt.setDefaultNamespace;Kt.hasLoadedNamespace;Kt.loadNamespaces;Kt.loadLanguages;var Du={exports:{}},Te={};var vp;function p0(){if(vp)return Te;vp=1;var n=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),d=Symbol.for("react.consumer"),h=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),x=Symbol.for("react.activity"),_=Symbol.iterator;function j(E){return E===null||typeof E!="object"?null:(E=_&&E[_]||E["@@iterator"],typeof E=="function"?E:null)}var R={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},D=Object.assign,k={};function Z(E,B,te){this.props=E,this.context=B,this.refs=k,this.updater=te||R}Z.prototype.isReactComponent={},Z.prototype.setState=function(E,B){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,B,"setState")},Z.prototype.forceUpdate=function(E){this.updater.enqueueForceUpdate(this,E,"forceUpdate")};function G(){}G.prototype=Z.prototype;function K(E,B,te){this.props=E,this.context=B,this.refs=k,this.updater=te||R}var le=K.prototype=new G;le.constructor=K,D(le,Z.prototype),le.isPureReactComponent=!0;var F=Array.isArray;function I(){}var W={H:null,A:null,T:null,S:null},N=Object.prototype.hasOwnProperty;function Y(E,B,te){var re=te.ref;return{$$typeof:n,type:E,key:B,ref:re!==void 0?re:null,props:te}}function J(E,B){return Y(E.type,B,E.props)}function he(E){return typeof E=="object"&&E!==null&&E.$$typeof===n}function ie(E){var B={"=":"=0",":":"=2"};return"$"+E.replace(/[=:]/g,function(te){return B[te]})}var ee=/\/+/g;function se(E,B){return typeof E=="object"&&E!==null&&E.key!=null?ie(""+E.key):B.toString(36)}function ge(E){switch(E.status){case"fulfilled":return E.value;case"rejected":throw E.reason;default:switch(typeof E.status=="string"?E.then(I,I):(E.status="pending",E.then(function(B){E.status==="pending"&&(E.status="fulfilled",E.value=B)},function(B){E.status==="pending"&&(E.status="rejected",E.reason=B)})),E.status){case"fulfilled":return E.value;case"rejected":throw E.reason}}throw E}function M(E,B,te,re,je){var _e=typeof E;(_e==="undefined"||_e==="boolean")&&(E=null);var Oe=!1;if(E===null)Oe=!0;else switch(_e){case"bigint":case"string":case"number":Oe=!0;break;case"object":switch(E.$$typeof){case n:case i:Oe=!0;break;case b:return Oe=E._init,M(Oe(E._payload),B,te,re,je)}}if(Oe)return je=je(E),Oe=re===""?"."+se(E,0):re,F(je)?(te="",Oe!=null&&(te=Oe.replace(ee,"$&/")+"/"),M(je,B,te,"",function(vt){return vt})):je!=null&&(he(je)&&(je=J(je,te+(je.key==null||E&&E.key===je.key?"":(""+je.key).replace(ee,"$&/")+"/")+Oe)),B.push(je)),1;Oe=0;var at=re===""?".":re+":";if(F(E))for(var ue=0;ue<E.length;ue++)re=E[ue],_e=at+se(re,ue),Oe+=M(re,B,te,_e,je);else if(ue=j(E),typeof ue=="function")for(E=ue.call(E),ue=0;!(re=E.next()).done;)re=re.value,_e=at+se(re,ue++),Oe+=M(re,B,te,_e,je);else if(_e==="object"){if(typeof E.then=="function")return M(ge(E),B,te,re,je);throw B=String(E),Error("Objects are not valid as a React child (found: "+(B==="[object Object]"?"object with keys {"+Object.keys(E).join(", ")+"}":B)+"). If you meant to render a collection of children, use an array instead.")}return Oe}function P(E,B,te){if(E==null)return E;var re=[],je=0;return M(E,re,"","",function(_e){return B.call(te,_e,je++)}),re}function de(E){if(E._status===-1){var B=E._result;B=B(),B.then(function(te){(E._status===0||E._status===-1)&&(E._status=1,E._result=te)},function(te){(E._status===0||E._status===-1)&&(E._status=2,E._result=te)}),E._status===-1&&(E._status=0,E._result=B)}if(E._status===1)return E._result.default;throw E._result}var $=typeof reportError=="function"?reportError:function(E){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var B=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(B))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",E);return}console.error(E)},fe={map:P,forEach:function(E,B,te){P(E,function(){B.apply(this,arguments)},te)},count:function(E){var B=0;return P(E,function(){B++}),B},toArray:function(E){return P(E,function(B){return B})||[]},only:function(E){if(!he(E))throw Error("React.Children.only expected to receive a single React element child.");return E}};return Te.Activity=x,Te.Children=fe,Te.Component=Z,Te.Fragment=r,Te.Profiler=c,Te.PureComponent=K,Te.StrictMode=s,Te.Suspense=g,Te.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=W,Te.__COMPILER_RUNTIME={__proto__:null,c:function(E){return W.H.useMemoCache(E)}},Te.cache=function(E){return function(){return E.apply(null,arguments)}},Te.cacheSignal=function(){return null},Te.cloneElement=function(E,B,te){if(E==null)throw Error("The argument must be a React element, but you passed "+E+".");var re=D({},E.props),je=E.key;if(B!=null)for(_e in B.key!==void 0&&(je=""+B.key),B)!N.call(B,_e)||_e==="key"||_e==="__self"||_e==="__source"||_e==="ref"&&B.ref===void 0||(re[_e]=B[_e]);var _e=arguments.length-2;if(_e===1)re.children=te;else if(1<_e){for(var Oe=Array(_e),at=0;at<_e;at++)Oe[at]=arguments[at+2];re.children=Oe}return Y(E.type,je,re)},Te.createContext=function(E){return E={$$typeof:h,_currentValue:E,_currentValue2:E,_threadCount:0,Provider:null,Consumer:null},E.Provider=E,E.Consumer={$$typeof:d,_context:E},E},Te.createElement=function(E,B,te){var re,je={},_e=null;if(B!=null)for(re in B.key!==void 0&&(_e=""+B.key),B)N.call(B,re)&&re!=="key"&&re!=="__self"&&re!=="__source"&&(je[re]=B[re]);var Oe=arguments.length-2;if(Oe===1)je.children=te;else if(1<Oe){for(var at=Array(Oe),ue=0;ue<Oe;ue++)at[ue]=arguments[ue+2];je.children=at}if(E&&E.defaultProps)for(re in Oe=E.defaultProps,Oe)je[re]===void 0&&(je[re]=Oe[re]);return Y(E,_e,je)},Te.createRef=function(){return{current:null}},Te.forwardRef=function(E){return{$$typeof:p,render:E}},Te.isValidElement=he,Te.lazy=function(E){return{$$typeof:b,_payload:{_status:-1,_result:E},_init:de}},Te.memo=function(E,B){return{$$typeof:m,type:E,compare:B===void 0?null:B}},Te.startTransition=function(E){var B=W.T,te={};W.T=te;try{var re=E(),je=W.S;je!==null&&je(te,re),typeof re=="object"&&re!==null&&typeof re.then=="function"&&re.then(I,$)}catch(_e){$(_e)}finally{B!==null&&te.types!==null&&(B.types=te.types),W.T=B}},Te.unstable_useCacheRefresh=function(){return W.H.useCacheRefresh()},Te.use=function(E){return W.H.use(E)},Te.useActionState=function(E,B,te){return W.H.useActionState(E,B,te)},Te.useCallback=function(E,B){return W.H.useCallback(E,B)},Te.useContext=function(E){return W.H.useContext(E)},Te.useDebugValue=function(){},Te.useDeferredValue=function(E,B){return W.H.useDeferredValue(E,B)},Te.useEffect=function(E,B){return W.H.useEffect(E,B)},Te.useEffectEvent=function(E){return W.H.useEffectEvent(E)},Te.useId=function(){return W.H.useId()},Te.useImperativeHandle=function(E,B,te){return W.H.useImperativeHandle(E,B,te)},Te.useInsertionEffect=function(E,B){return W.H.useInsertionEffect(E,B)},Te.useLayoutEffect=function(E,B){return W.H.useLayoutEffect(E,B)},Te.useMemo=function(E,B){return W.H.useMemo(E,B)},Te.useOptimistic=function(E,B){return W.H.useOptimistic(E,B)},Te.useReducer=function(E,B,te){return W.H.useReducer(E,B,te)},Te.useRef=function(E){return W.H.useRef(E)},Te.useState=function(E){return W.H.useState(E)},Te.useSyncExternalStore=function(E,B,te){return W.H.useSyncExternalStore(E,B,te)},Te.useTransition=function(){return W.H.useTransition()},Te.version="19.2.4",Te}var bp;function uo(){return bp||(bp=1,Du.exports=p0()),Du.exports}var v=uo();const fi=$v(v),g0=Gv({__proto__:null,default:fi},[v]),y0=(n,i,r,s)=>{const c=[r,{code:i,...s||{}}];if(n?.services?.logger?.forward)return n.services.logger.forward(c,"warn","react-i18next::",!0);jl(c[0])&&(c[0]=`react-i18next:: ${c[0]}`),n?.services?.logger?.warn?n.services.logger.warn(...c):console?.warn&&console.warn(...c)},Sp={},kg=(n,i,r,s)=>{jl(r)&&Sp[r]||(jl(r)&&(Sp[r]=new Date),y0(n,i,r,s))},Ug=(n,i)=>()=>{if(n.isInitialized)i();else{const r=()=>{setTimeout(()=>{n.off("initialized",r)},0),i()};n.on("initialized",r)}},Wu=(n,i,r)=>{n.loadNamespaces(i,Ug(n,r))},_p=(n,i,r,s)=>{if(jl(r)&&(r=[r]),n.options.preload&&n.options.preload.indexOf(i)>-1)return Wu(n,r,s);r.forEach(c=>{n.options.ns.indexOf(c)<0&&n.options.ns.push(c)}),n.loadLanguages(i,Ug(n,s))},x0=(n,i,r={})=>!i.languages||!i.languages.length?(kg(i,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:i.languages}),!0):i.hasLoadedNamespace(n,{lng:r.lng,precheck:(s,c)=>{if(r.bindI18n&&r.bindI18n.indexOf("languageChanging")>-1&&s.services.backendConnector.backend&&s.isLanguageChangingTo&&!c(s.isLanguageChangingTo,n))return!1}}),jl=n=>typeof n=="string",v0=n=>typeof n=="object"&&n!==null,b0=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,S0={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},_0=n=>S0[n],j0=n=>n.replace(b0,_0);let Pu={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:j0,transDefaultProps:void 0};const N0=(n={})=>{Pu={...Pu,...n}},E0=()=>Pu;let Hg;const w0=n=>{Hg=n},C0=()=>Hg,R0={type:"3rdParty",init(n){N0(n.options.react),w0(n)}},z0=v.createContext();class T0{constructor(){this.usedNamespaces={}}addUsedNamespaces(i){i.forEach(r=>{this.usedNamespaces[r]||(this.usedNamespaces[r]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}var Mu={exports:{}},Au={};var jp;function O0(){if(jp)return Au;jp=1;var n=uo();function i(x,_){return x===_&&(x!==0||1/x===1/_)||x!==x&&_!==_}var r=typeof Object.is=="function"?Object.is:i,s=n.useState,c=n.useEffect,d=n.useLayoutEffect,h=n.useDebugValue;function p(x,_){var j=_(),R=s({inst:{value:j,getSnapshot:_}}),D=R[0].inst,k=R[1];return d(function(){D.value=j,D.getSnapshot=_,g(D)&&k({inst:D})},[x,j,_]),c(function(){return g(D)&&k({inst:D}),x(function(){g(D)&&k({inst:D})})},[x]),h(j),j}function g(x){var _=x.getSnapshot;x=x.value;try{var j=_();return!r(x,j)}catch{return!0}}function m(x,_){return _()}var b=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?m:p;return Au.useSyncExternalStore=n.useSyncExternalStore!==void 0?n.useSyncExternalStore:b,Au}var Np;function D0(){return Np||(Np=1,Mu.exports=O0()),Mu.exports}var M0=D0();const A0=(n,i)=>jl(i)?i:v0(i)&&jl(i.defaultValue)?i.defaultValue:Array.isArray(n)?n[n.length-1]:n,L0={t:A0,ready:!1},k0=()=>()=>{},Re=(n,i={})=>{const{i18n:r}=i,{i18n:s,defaultNS:c}=v.useContext(z0)||{},d=r||s||C0();d&&!d.reportNamespaces&&(d.reportNamespaces=new T0),d||kg(d,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const h=v.useMemo(()=>({...E0(),...d?.options?.react,...i}),[d,i]),{useSuspense:p,keyPrefix:g}=h,m=c||d?.options?.defaultNS,b=jl(m)?[m]:m||["translation"],x=v.useMemo(()=>b,b);d?.reportNamespaces?.addUsedNamespaces?.(x);const _=v.useRef(0),j=v.useCallback(Y=>{if(!d)return k0;const{bindI18n:J,bindI18nStore:he}=h,ie=()=>{_.current+=1,Y()};return J&&d.on(J,ie),he&&d.store.on(he,ie),()=>{J&&J.split(" ").forEach(ee=>d.off(ee,ie)),he&&he.split(" ").forEach(ee=>d.store.off(ee,ie))}},[d,h]),R=v.useRef(),D=v.useCallback(()=>{if(!d)return L0;const Y=!!(d.isInitialized||d.initializedStoreOnce)&&x.every(ge=>x0(ge,d,h)),J=i.lng||d.language,he=_.current,ie=R.current;if(ie&&ie.ready===Y&&ie.lng===J&&ie.keyPrefix===g&&ie.revision===he)return ie;const se={t:d.getFixedT(J,h.nsMode==="fallback"?x:x[0],g),ready:Y,lng:J,keyPrefix:g,revision:he};return R.current=se,se},[d,x,g,h,i.lng]),[k,Z]=v.useState(0),{t:G,ready:K}=M0.useSyncExternalStore(j,D,D);v.useEffect(()=>{if(d&&!K&&!p){const Y=()=>Z(J=>J+1);i.lng?_p(d,i.lng,x,Y):Wu(d,x,Y)}},[d,i.lng,x,K,p,k]);const le=d||{},F=v.useRef(null),I=v.useRef(),W=Y=>{const J=Object.getOwnPropertyDescriptors(Y);J.__original&&delete J.__original;const he=Object.create(Object.getPrototypeOf(Y),J);if(!Object.prototype.hasOwnProperty.call(he,"__original"))try{Object.defineProperty(he,"__original",{value:Y,writable:!1,enumerable:!1,configurable:!1})}catch{}return he},N=v.useMemo(()=>{const Y=le,J=Y?.language;let he=Y;Y&&(F.current&&F.current.__original===Y?I.current!==J?(he=W(Y),F.current=he,I.current=J):he=F.current:(he=W(Y),F.current=he,I.current=J));const ie=[G,he,K];return ie.t=G,ie.i18n=he,ie.ready=K,ie},[G,le,K,le.resolvedLanguage,le.language,le.languages]);if(d&&p&&!K)throw new Promise(Y=>{const J=()=>Y();i.lng?_p(d,i.lng,x,J):Wu(d,x,J)});return N},{slice:U0,forEach:H0}=[];function B0(n){return H0.call(U0.call(arguments,1),i=>{if(i)for(const r in i)n[r]===void 0&&(n[r]=i[r])}),n}function q0(n){return typeof n!="string"?!1:[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(r=>r.test(n))}const Ep=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Y0=function(n,i){const s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},c=encodeURIComponent(i);let d=`${n}=${c}`;if(s.maxAge>0){const h=s.maxAge-0;if(Number.isNaN(h))throw new Error("maxAge should be a Number");d+=`; Max-Age=${Math.floor(h)}`}if(s.domain){if(!Ep.test(s.domain))throw new TypeError("option domain is invalid");d+=`; Domain=${s.domain}`}if(s.path){if(!Ep.test(s.path))throw new TypeError("option path is invalid");d+=`; Path=${s.path}`}if(s.expires){if(typeof s.expires.toUTCString!="function")throw new TypeError("option expires is invalid");d+=`; Expires=${s.expires.toUTCString()}`}if(s.httpOnly&&(d+="; HttpOnly"),s.secure&&(d+="; Secure"),s.sameSite)switch(typeof s.sameSite=="string"?s.sameSite.toLowerCase():s.sameSite){case!0:d+="; SameSite=Strict";break;case"lax":d+="; SameSite=Lax";break;case"strict":d+="; SameSite=Strict";break;case"none":d+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return s.partitioned&&(d+="; Partitioned"),d},wp={create(n,i,r,s){let c=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};r&&(c.expires=new Date,c.expires.setTime(c.expires.getTime()+r*60*1e3)),s&&(c.domain=s),document.cookie=Y0(n,i,c)},read(n){const i=`${n}=`,r=document.cookie.split(";");for(let s=0;s<r.length;s++){let c=r[s];for(;c.charAt(0)===" ";)c=c.substring(1,c.length);if(c.indexOf(i)===0)return c.substring(i.length,c.length)}return null},remove(n,i){this.create(n,"",-1,i)}};var V0={name:"cookie",lookup(n){let{lookupCookie:i}=n;if(i&&typeof document<"u")return wp.read(i)||void 0},cacheUserLanguage(n,i){let{lookupCookie:r,cookieMinutes:s,cookieDomain:c,cookieOptions:d}=i;r&&typeof document<"u"&&wp.create(r,n,s,c,d)}},G0={name:"querystring",lookup(n){let{lookupQuerystring:i}=n,r;if(typeof window<"u"){let{search:s}=window.location;!window.location.search&&window.location.hash?.indexOf("?")>-1&&(s=window.location.hash.substring(window.location.hash.indexOf("?")));const d=s.substring(1).split("&");for(let h=0;h<d.length;h++){const p=d[h].indexOf("=");p>0&&d[h].substring(0,p)===i&&(r=d[h].substring(p+1))}}return r}},$0={name:"hash",lookup(n){let{lookupHash:i,lookupFromHashIndex:r}=n,s;if(typeof window<"u"){const{hash:c}=window.location;if(c&&c.length>2){const d=c.substring(1);if(i){const h=d.split("&");for(let p=0;p<h.length;p++){const g=h[p].indexOf("=");g>0&&h[p].substring(0,g)===i&&(s=h[p].substring(g+1))}}if(s)return s;if(!s&&r>-1){const h=c.match(/\/([a-zA-Z-]*)/g);return Array.isArray(h)?h[typeof r=="number"?r:0]?.replace("/",""):void 0}}}return s}};let ci=null;const Cp=()=>{if(ci!==null)return ci;try{if(ci=typeof window<"u"&&window.localStorage!==null,!ci)return!1;const n="i18next.translate.boo";window.localStorage.setItem(n,"foo"),window.localStorage.removeItem(n)}catch{ci=!1}return ci};var K0={name:"localStorage",lookup(n){let{lookupLocalStorage:i}=n;if(i&&Cp())return window.localStorage.getItem(i)||void 0},cacheUserLanguage(n,i){let{lookupLocalStorage:r}=i;r&&Cp()&&window.localStorage.setItem(r,n)}};let ui=null;const Rp=()=>{if(ui!==null)return ui;try{if(ui=typeof window<"u"&&window.sessionStorage!==null,!ui)return!1;const n="i18next.translate.boo";window.sessionStorage.setItem(n,"foo"),window.sessionStorage.removeItem(n)}catch{ui=!1}return ui};var X0={name:"sessionStorage",lookup(n){let{lookupSessionStorage:i}=n;if(i&&Rp())return window.sessionStorage.getItem(i)||void 0},cacheUserLanguage(n,i){let{lookupSessionStorage:r}=i;r&&Rp()&&window.sessionStorage.setItem(r,n)}},Q0={name:"navigator",lookup(n){const i=[];if(typeof navigator<"u"){const{languages:r,userLanguage:s,language:c}=navigator;if(r)for(let d=0;d<r.length;d++)i.push(r[d]);s&&i.push(s),c&&i.push(c)}return i.length>0?i:void 0}},Z0={name:"htmlTag",lookup(n){let{htmlTag:i}=n,r;const s=i||(typeof document<"u"?document.documentElement:null);return s&&typeof s.getAttribute=="function"&&(r=s.getAttribute("lang")),r}},F0={name:"path",lookup(n){let{lookupFromPathIndex:i}=n;if(typeof window>"u")return;const r=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(r)?r[typeof i=="number"?i:0]?.replace("/",""):void 0}},J0={name:"subdomain",lookup(n){let{lookupFromSubdomainIndex:i}=n;const r=typeof i=="number"?i+1:1,s=typeof window<"u"&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(s)return s[r]}};let Bg=!1;try{document.cookie,Bg=!0}catch{}const qg=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];Bg||qg.splice(1,1);const W0=()=>({order:qg,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:n=>n});class Yg{constructor(i){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(i,r)}init(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=i,this.options=B0(r,this.options||{},W0()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=c=>c.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=s,this.addDetector(V0),this.addDetector(G0),this.addDetector(K0),this.addDetector(X0),this.addDetector(Q0),this.addDetector(Z0),this.addDetector(F0),this.addDetector(J0),this.addDetector($0)}addDetector(i){return this.detectors[i.name]=i,this}detect(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,r=[];return i.forEach(s=>{if(this.detectors[s]){let c=this.detectors[s].lookup(this.options);c&&typeof c=="string"&&(c=[c]),c&&(r=r.concat(c))}}),r=r.filter(s=>s!=null&&!q0(s)).map(s=>this.options.convertDetectedLanguage(s)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?r:r.length>0?r[0]:null}cacheUserLanguage(i){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;r&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(i)>-1||r.forEach(s=>{this.detectors[s]&&this.detectors[s].cacheUserLanguage(i,this.options)}))}}Yg.type="languageDetector";const P0={"nav.home":"Home","nav.studio":"Studio","nav.docs":"Docs","nav.login":"Login","nav.logout":"Logout","header.status.connected":"Connected","header.status.disconnected":"Disconnected","header.status.reconnecting":"Reconnecting","footer.copyright":"GitHub · @Context4AI {{year}}. All rights reserved.","footer.copyright_compact":"@Context4AI {{year}}. All rights reserved.","footer.tagline":"Knowledge Factory","footer.theme.dark":"Dark","footer.theme.light":"Light","footer.theme.system":"System","studio.sidebar.sources":"Sources","studio.sidebar.modeling":"Modeling","studio.sidebar.brain":"Brain","studio.sidebar.discovery":"Discovery","studio.sidebar.sharing":"Sharing","studio.sidebar.collaboration":"Collaboration","studio.sidebar.settings":"Settings","placeholder.coming":"Coming in {{version}}","page.login.title":"Login","page.login.description":"Authentication and user management.","page.docs.title":"Docs","page.docs.description":"Public documentation portal.","page.sources.title":"Sources","page.sources.description":"Add code repositories, documents, and other input materials for your brain to index.","page.modeling.title":"Modeling","page.modeling.description":"Model indexed content with AI — only what stands up to scrutiny gets written to the knowledge graph.","page.brain.title":"Brain","page.brain.description":"All modeled knowledge lives here — browse, search, analyze, and use it anytime.","page.discovery.title":"Discovery","page.discovery.description":"Explore knowledge curated by others and add what's useful to your own brain.","page.sharing.title":"Sharing","page.sharing.description":"Package and export knowledge from your brain for others and AI to use directly.","page.collaboration.title":"Collaboration","page.collaboration.description":"Stay in sync with other brains — get notified on updates, no manual transfer needed.","page.settings.title":"Settings","page.settings.description":"Manage workspace members and configuration.","page.code_setup.title":"Code Setup","page.code_setup.description":"Repository selection and configuration for code modeling.","page.code_compile.title":"Code Compile","page.code_compile.description":"Compilation progress tracking for code modeling.","page.code_review.title":"Code Review","page.code_review.description":"Review and approve modeling results.","page.code_result.title":"Code Result","page.code_result.description":"View final modeling results and generated knowledge graph.","home.hero.title":"Context For AI","home.hero.description":"Transform code repositories and business documents into structured knowledge graphs.","home.hero.cta.studio":"Enter Studio","home.hero.cta.github":"GitHub","notfound.title":"404","notfound.description":"The page you're looking for doesn't exist.","notfound.back":"Back to Home","sources.menu.add_client":"Add Client","sources.menu.online":"online","sources.menu.offline":"offline","sources.library.default_cloud_name":"Personal Cloud","sources.library.rename":"Rename","sources.library.rename_placeholder":"Enter library name","sources.header.daemon_status":"{{online}}/{{total}} online","sources.header.all_offline":"All offline","sources.actions.new_folder":"New Folder","sources.folder.name_placeholder":"Enter folder name","sources.actions.import_repo":"Import Repository","sources.actions.rename":"Rename","sources.actions.move_to":"Move to...","sources.actions.delete":"Delete","sources.filter.all":"All","sources.filter.indexed":"Indexed","sources.filter.not_indexed":"Not Indexed","sources.status.none":"None","sources.status.indexed":"Indexed","sources.status.stale":"Stale","sources.status.go_index":"Index","sources.type.code":"Code","sources.type.doc":"Document","sources.empty.cloud.title":"Your personal knowledge input zone","sources.empty.cloud.description":"Create folders to organize your documents and materials. These are visible only to you and will serve as the foundation for building your digital brain.","sources.empty.daemon.title":"Connect your local code assets","sources.empty.daemon.description":"Import local code repositories. The system will automatically extract code structures and technical documents, transforming them into structured knowledge.","sources.empty.indexed.title":"Knowledge not yet indexed","sources.empty.indexed.description":"Select sources and complete indexing. They will be transformed into structured summaries, providing material for your future speculations.","sources.empty.folder.title":"This folder is empty","sources.empty.folder.daemon_description":"You can add or edit documents locally, and they will appear here after the next sync.","sources.safety.notice.repo":"In local mode, your code has absolute privacy. Source code never leaves your computer. The system only extracts structured summaries for knowledge modeling (function signatures, dependencies, etc.).","sources.safety.notice.dir":"The system extracts document content and summaries for knowledge modeling. Although unsafe text is filtered, please ensure sensitive data is not included in indexing or modeling.","sources.import.title":"Import Repository","sources.import.step.select":"Select Repository","sources.import.step.version":"Version Selection","sources.import.step.confirm":"Confirm Import","sources.import.daemon_offline":"Client {{name}} is not connected. Please start the local Daemon and connect to the server before importing.","sources.import.view_guide":"View Connection Guide","sources.import.select_root":"Select repository root directory","sources.import.current_path":"Current path","sources.import.not_git":"This directory is not a Git repository. Please select a directory containing .git.","sources.import.branch":"Branch","sources.import.commit":"Commit","sources.import.branch_warning":"Currently based on {{branch}} branch HEAD","sources.import.uncommitted_warning":"Uncommitted changes will not be collected","sources.import.recognized":"Recognized {{packages}} packages and {{docs}} documents","sources.import.no_packages":"No package structure detected. Will be imported as a single-package repository.","sources.import.confirm_heading":"About to import the following repository to {{name}}:","sources.import.packages":"Packages","sources.import.documents":"Documents","sources.import.loading_repo":"Loading repository info...","sources.import.loading_repo_slow":"Large repositories (>10 GB) may take 5–10 seconds...","sources.import.importing":"Importing...","sources.import.success":"Import complete","sources.add_client.title":"Connect Local Knowledge Source","sources.add_client.description":"Start a client (Daemon) on your local computer to mount local code repositories as input material into your digital brain.","sources.add_client.step1":"Install Daemon","sources.add_client.step2":"Start Daemon","sources.add_client.step3":"Wait for connection","sources.add_client.step3_desc":"This page will update automatically once connected.","sources.add_client.waiting":"Waiting for new client connection...","sources.add_client.detected":"New client detected","sources.add_client.machine_name":"Machine ID","sources.add_client.os":"Operating system","sources.add_client.daemon_version":"Daemon version","sources.add_client.client_name":"Client name","sources.add_client.confirm":"Confirm Add","sources.add_client.reconnected":"Client {{name}} has reconnected","sources.add_client.go_to":"Go to {{name}}","sources.detail.tab.original":"Original","sources.detail.tab.overview":"Overview","sources.detail.tab.digest":"Digest","sources.detail.tab.modeling":"Modeling Result","sources.detail.digest_placeholder":"Structured summary will be available here after indexing is complete.","sources.detail.modeling_placeholder":"Knowledge entities derived from this source will appear here after modeling in the speculation zone.","sources.detail.type":"Type","sources.detail.origin":"Origin","sources.detail.origin.upload":"Upload","sources.detail.origin.local":"Local file","sources.detail.path":"Path","sources.detail.status":"Status","sources.detail.repo":"Repository","sources.detail.branch":"Branch","sources.detail.commit":"Commit","sources.detail.tech_stack":"Tech stack","sources.detail.original_code_placeholder":"Package overview will be available after indexing.","sources.detail.original_doc_placeholder":"Document content will be available after upload.","sources.detail.dependencies":"Dependencies","sources.delete.confirm_title":"Confirm Delete","sources.delete.resource":"Are you sure you want to delete {{name}}?","sources.delete.resource_impact":"The following data will be permanently deleted: original content, structured digest (if any).","sources.delete.session_warning":"If your personal speculation zone is using this source, related candidate speculations will be affected.","sources.delete.entity_safe":"Formal knowledge already merged into the brain will not be affected.","sources.delete.folder":"Are you sure you want to delete folder {{name}}?","sources.delete.folder_impact":"All resources inside will be recursively deleted: {{folders}} sub-folders, {{sources}} sources.","sources.delete.folder_impact_generic":"All sub-folders and resources inside will be recursively deleted.","sources.delete.irreversible":"This action cannot be undone.","sources.delete.repo":"Are you sure you want to remove repository {{name}} from {{library}}?","sources.delete.repo_impact":"Will delete: {{packages}} package index records, {{docs}} document index records.","sources.delete.repo_impact_generic":"All package and document index records will be deleted.","sources.delete.local_safe":"Local files will not be affected.","sources.delete.client":"Are you sure you want to delete client {{name}}?","sources.delete.client_impact":"All imported repository records and related index data under this client will be deleted.","sources.delete.client_reregister":"This client will need to re-register on next connection.","sources.error.name_conflict":'An item named "{{name}}" already exists in this directory.',"sources.move.current":"Current","sources.move.target":"Move to","sources.breadcrumb.sources":"Sources","common.cancel":"Cancel","common.confirm":"Confirm","common.back":"Back","common.next":"Next","common.previous":"Previous","common.items":"{{count}} items","common.loading":"Loading...","sources.import.no_entries":"No entries found","sources.import.allowed_dirs":"Client authorized directories","sources.import.allowed_dirs_tooltip_restrict":"Restrict to specific directories:","sources.import.allowed_dirs_tooltip_all":"Or allow all directories (default):","sources.import.wildcard_home":"Home","sources.import.wildcard_path_placeholder":"Enter a directory path…","sources.import.wildcard_go":"Go","sources.import.wildcard_goto":"Go to","sources.import.wildcard_go_title":"Go to Directory","sources.import.wildcard_path_not_found":"Path does not exist on the remote machine","sources.import.already_imported":"Imported","sources.import.dir_title":"Import Directory","sources.import.dir_step.select":"Select Directory","sources.import.dir_step.scan":"Scan","sources.import.dir_step.confirm":"Confirm Import","sources.import.dir_confirm_heading":"About to import the following directory to {{name}}:","sources.import.dir_name":"Directory Name","sources.import.dir_path":"Directory Path","sources.import.dir_files":"Files","sources.import.dir_subdirs":"Subdirectories","sources.import.dir_git_repos":"Repositories (skipped)","sources.import.dir_git_hint":"Git repositories inside the directory will not be expanded for indexing. Import them separately if needed.","sources.import.dir_scanning":"Scanning directory contents...","sources.import.dir_scan_complete":"Scan complete","sources.import.dir_scan_error":"Failed to scan directory","sources.import.dir_scan_retry":"Retry","sources.import.dir_code_packages":"Code Packages","sources.import.dir_code_packages_tip":"Supported: package.json, pyproject.toml, setup.py, go.mod, Cargo.toml, pom.xml, build.gradle","sources.import.dir_doc_files":"Documents","sources.import.dir_doc_files_tip":"Supported: Markdown (.md)","sources.import.dir_total_files":"Total Files","sources.import.dir_total_dirs":"Directories","sources.import.dir_git_skip_hint":"Git repos are skipped. Use 'Import Repository' instead.","sources.actions.upload":"Upload","sources.actions.upload_md":"Markdown Document","sources.actions.upload_doc":"Document","sources.actions.add":"Add","sources.actions.add_folder":"Folder","sources.actions.add_web":"Web Page","sources.actions.add_feishu":"Feishu Document","sources.actions.import_dir":"Import Directory","sources.actions.import_repo_url":"Import Repository","sources.upgrade.title":"Feature Upgrading","sources.upgrade.description":"This feature will be available in version 0.5.x. Stay tuned.","sources.upload.title":"Upload Documents","sources.upload.drop_hint":"Click to select or drag files here","sources.upload.supported_formats":"Supported: .md, .doc, .docx, .pdf, .ppt, .pptx, .txt (max 5MB each, up to 10 files)","sources.upload.file_too_large":'"{{name}}" exceeds 5MB limit',"sources.upload.too_many_files":"Maximum 10 files allowed, please re-select","sources.upload.unsupported_type":'"{{name}}" is not a supported file type',"sources.upload.uploading":"Uploading...","sources.upload.success":"Uploaded {{count}} documents","sources.upload.selected":"{{count}} files selected","sources.upload.remove":"Remove"},I0={"nav.home":"首页","nav.studio":"工作台","nav.docs":"文档","nav.login":"登录","nav.logout":"退出登录","header.status.connected":"已连接","header.status.disconnected":"已断开","header.status.reconnecting":"重连中","footer.copyright":"GitHub · @Context4AI {{year}}. 版权所有","footer.copyright_compact":"@Context4AI {{year}}. 版权所有","footer.tagline":"知识工厂","footer.theme.dark":"暗色","footer.theme.light":"亮色","footer.theme.system":"跟随系统","studio.sidebar.sources":"知识索引","studio.sidebar.modeling":"知识建模","studio.sidebar.brain":"知识大脑","studio.sidebar.discovery":"发现知识","studio.sidebar.sharing":"分享知识","studio.sidebar.collaboration":"知识协同","studio.sidebar.settings":"设置","placeholder.coming":"计划在 {{version}} 版本实现","page.login.title":"登录","page.login.description":"身份验证与用户管理。","page.docs.title":"文档","page.docs.description":"公开文档门户。","page.sources.title":"知识索引","page.sources.description":"添加代码仓库、文档等输入材料,让大脑完成初步索引。","page.modeling.title":"知识建模","page.modeling.description":"和 AI 一起对索引内容建模,只有经得起推敲的才写入知识图谱。","page.brain.title":"知识大脑","page.brain.description":"建模完成的全部知识都在这里——浏览、搜索、分析,随时调用。","page.discovery.title":"发现知识","page.discovery.description":"看看别人整理好的知识,发现有用的一键补充到自己的大脑。","page.sharing.title":"分享知识","page.sharing.description":"把大脑中的知识打包输出,让别人和 AI 都能直接使用。","page.collaboration.title":"知识协同","page.collaboration.description":"和其他大脑保持同步,知识更新时自动通知,不用手动搬运。","page.settings.title":"设置","page.settings.description":"管理大脑的成员和配置。","page.code_setup.title":"代码设置","page.code_setup.description":"代码建模的仓库选择与配置。","page.code_compile.title":"代码编译","page.code_compile.description":"代码建模的编译进度追踪。","page.code_review.title":"代码审查","page.code_review.description":"审查并确认建模结果。","page.code_result.title":"代码结果","page.code_result.description":"查看最终建模结果与生成的知识图谱。","home.hero.title":"Context For AI","home.hero.description":"将代码仓库和业务文档转化为结构化知识图谱。","home.hero.cta.studio":"进入工作台","home.hero.cta.github":"GitHub","notfound.title":"404","notfound.description":"您访问的页面不存在。","notfound.back":"返回首页","sources.menu.add_client":"添加客户端","sources.menu.online":"在线","sources.menu.offline":"离线","sources.library.default_cloud_name":"个人云","sources.library.rename":"重命名","sources.library.rename_placeholder":"输入名称","sources.header.daemon_status":"{{online}}/{{total}} 在线","sources.header.all_offline":"全部离线","sources.actions.new_folder":"新文件夹","sources.folder.name_placeholder":"输入文件夹名称","sources.actions.import_repo":"导入仓库","sources.actions.rename":"重命名","sources.actions.move_to":"移动到...","sources.actions.delete":"删除","sources.filter.all":"全部","sources.filter.indexed":"已索引","sources.filter.not_indexed":"未索引","sources.status.none":"未索引","sources.status.indexed":"已索引","sources.status.stale":"索引过期","sources.status.go_index":"去索引","sources.type.code":"代码","sources.type.doc":"文档","sources.empty.cloud.title":"这里是你专属的知识输入区","sources.empty.cloud.description":"创建文件夹来整理你的文档和材料。这些内容仅你个人可见,将成为后续推演、构建数字大脑的基础。","sources.empty.daemon.title":"连接你的本地代码资产","sources.empty.daemon.description":"导入本地代码仓库,系统会自动提取代码结构与技术文档,将其转化为结构化知识。","sources.empty.indexed.title":"这些知识尚未被索引","sources.empty.indexed.description":"选择资源并完成索引后,它们将转化为结构化摘要,为你后续的推演提供素材。","sources.empty.folder.title":"当前文件夹还没有内容","sources.empty.folder.daemon_description":"你可以在本地进行文档新增、编辑后查看。","sources.safety.notice.repo":"在本地模式下,你的代码保有绝对隐私,源代码永远不会离开你的电脑,系统仅提取用于知识建模的结构化摘要(函数签名、依赖关系等)。","sources.safety.notice.dir":"系统会提取用于知识建模的文档内容及摘要,尽管会过滤不安全的文本内容,但请确保敏感数据不要参与索引及建模。","sources.import.title":"导入代码仓库","sources.import.step.select":"选择仓库","sources.import.step.version":"版本选择","sources.import.step.confirm":"确认导入","sources.import.daemon_offline":"客户端 {{name}} 未连接,请先启动本地 Daemon 并连接到服务器后再导入仓库。","sources.import.view_guide":"查看连接指引","sources.import.select_root":"选择仓库根目录","sources.import.current_path":"当前路径","sources.import.not_git":"该目录不是 Git 仓库,请选择包含 .git 的目录。","sources.import.branch":"分支","sources.import.commit":"提交","sources.import.branch_warning":"当前基于 {{branch}} 分支的 HEAD","sources.import.uncommitted_warning":"未提交的修改不会被采集","sources.import.recognized":"已识别 {{packages}} 个包和 {{docs}} 篇文档","sources.import.no_packages":"未识别到包结构,将作为单包仓库导入。","sources.import.confirm_heading":"即将导入以下仓库到 {{name}}:","sources.import.packages":"包数","sources.import.documents":"文档","sources.import.loading_repo":"正在加载仓库信息...","sources.import.loading_repo_slow":"大型仓库(>10 GB)可能需要 5~10 秒...","sources.import.importing":"导入中...","sources.import.success":"导入完成","sources.add_client.title":"接入本地知识源","sources.add_client.description":"在本地计算机上启动客户端 (Daemon),即可将本地代码仓库作为输入材料,挂载到你的数字大脑中。","sources.add_client.step1":"安装 Daemon","sources.add_client.step2":"启动 Daemon","sources.add_client.step3":"等待连接","sources.add_client.step3_desc":"连接成功后,本页面将自动更新。","sources.add_client.waiting":"等待新的客户端连接...","sources.add_client.detected":"检测到新的本地客户端","sources.add_client.machine_name":"机器标识","sources.add_client.os":"操作系统","sources.add_client.daemon_version":"Daemon 版本","sources.add_client.client_name":"客户端名称","sources.add_client.confirm":"确认添加","sources.add_client.reconnected":"客户端 {{name}} 已重新连接","sources.add_client.go_to":"前往 {{name}}","sources.detail.tab.original":"原文","sources.detail.tab.overview":"概览","sources.detail.tab.digest":"摘要","sources.detail.tab.modeling":"建模结果","sources.detail.digest_placeholder":"完成索引后,即可在此查看结构化摘要。","sources.detail.modeling_placeholder":"在推演区完成建模后,此处将展示由该源产生的知识实体。","sources.detail.type":"类型","sources.detail.origin":"来源","sources.detail.origin.upload":"直接上传","sources.detail.origin.local":"本地文件","sources.detail.path":"路径","sources.detail.status":"状态","sources.detail.repo":"仓库","sources.detail.branch":"分支","sources.detail.commit":"提交","sources.detail.tech_stack":"技术栈","sources.detail.original_code_placeholder":"完成索引后即可查看包概览。","sources.detail.original_doc_placeholder":"文档内容将在上传后展示。","sources.detail.dependencies":"依赖","sources.delete.confirm_title":"确认删除","sources.delete.resource":"确定要删除 {{name}}?","sources.delete.resource_impact":"以下数据将被永久删除:原文内容、结构化摘要(如有)。","sources.delete.session_warning":"如果你的个人推演区正在使用此知识源,相关的候选推演将受到影响。","sources.delete.entity_safe":"已汇入大脑的正式知识不受影响。","sources.delete.folder":"确定要删除文件夹 {{name}}?","sources.delete.folder_impact":"文件夹内的所有资源将被递归删除:{{folders}} 个子文件夹、{{sources}} 个知识源。","sources.delete.folder_impact_generic":"文件夹内的所有子文件夹和知识源将被递归删除。","sources.delete.irreversible":"此操作不可撤销。","sources.delete.repo":"确定要从 {{library}} 中移除仓库 {{name}}?","sources.delete.repo_impact":"将删除:{{packages}} 个包的索引记录、{{docs}} 篇文档的索引记录。","sources.delete.repo_impact_generic":"所有包和文档的索引记录将被删除。","sources.delete.local_safe":"本地文件不受影响。","sources.delete.client":"确定要删除客户端 {{name}}?","sources.delete.client_impact":"该客户端下的所有已导入仓库记录和相关索引数据将被删除。","sources.delete.client_reregister":"该客户端下次连接时将触发重新注册。","sources.error.name_conflict":'该目录下已存在同名项"{{name}}"。',"sources.move.current":"当前位置","sources.move.target":"移动到","sources.breadcrumb.sources":"知识索引","common.cancel":"取消","common.confirm":"确认","common.back":"返回","common.next":"下一步","common.previous":"上一步","common.items":"{{count}} 项","common.loading":"加载中...","sources.import.no_entries":"未找到任何条目","sources.import.allowed_dirs":"客户端授权目录","sources.import.allowed_dirs_tooltip_restrict":"通过参数设定有权限的目录:","sources.import.allowed_dirs_tooltip_all":"或默认允许全部目录:","sources.import.wildcard_home":"主目录","sources.import.wildcard_path_placeholder":"输入目录路径…","sources.import.wildcard_go":"前往","sources.import.wildcard_goto":"前往","sources.import.wildcard_go_title":"前往目录","sources.import.wildcard_path_not_found":"该路径在远程机器上不存在","sources.import.already_imported":"已导入","sources.import.dir_title":"导入目录","sources.import.dir_step.select":"选择目录","sources.import.dir_step.scan":"扫描","sources.import.dir_step.confirm":"确认导入","sources.import.dir_confirm_heading":"即将导入以下目录到 {{name}}:","sources.import.dir_name":"目录名","sources.import.dir_path":"目录路径","sources.import.dir_files":"文件数","sources.import.dir_subdirs":"子目录数","sources.import.dir_git_repos":"仓库(已跳过)","sources.import.dir_git_hint":"目录内的 Git 仓库不会被展开索引,如需索引请单独导入仓库。","sources.import.dir_scanning":"正在扫描目录内容...","sources.import.dir_scan_complete":"扫描完成","sources.import.dir_scan_error":"目录扫描失败","sources.import.dir_scan_retry":"重试","sources.import.dir_code_packages":"代码包","sources.import.dir_code_packages_tip":"支持:package.json、pyproject.toml、setup.py、go.mod、Cargo.toml、pom.xml、build.gradle","sources.import.dir_doc_files":"文档","sources.import.dir_doc_files_tip":"支持:Markdown (.md)","sources.import.dir_total_files":"文件总数","sources.import.dir_total_dirs":"目录","sources.import.dir_git_skip_hint":"Git 仓库将被跳过,建议单独使用「导入仓库」。","sources.actions.upload":"上传","sources.actions.upload_md":"Markdown 文档","sources.actions.upload_doc":"文档","sources.actions.add":"新增","sources.actions.add_folder":"文件夹","sources.actions.add_web":"网页","sources.actions.add_feishu":"飞书文档","sources.actions.import_dir":"导入目录","sources.actions.import_repo_url":"导入仓库","sources.upgrade.title":"功能升级中","sources.upgrade.description":"此功能将在 0.5.x 版本中推出,敬请期待。","sources.upload.title":"上传文档","sources.upload.drop_hint":"点击选择文件或拖拽至此","sources.upload.supported_formats":"支持格式:.md, .doc, .docx, .pdf, .ppt, .pptx, .txt(每个最大 5MB,最多 10 个)","sources.upload.file_too_large":'"{{name}}" 超过 5MB 限制',"sources.upload.too_many_files":"最多上传 10 个文件,请重新选择","sources.upload.unsupported_type":'"{{name}}" 不是支持的文件类型',"sources.upload.uploading":"上传中...","sources.upload.success":"已上传 {{count}} 个文档","sources.upload.selected":"已选择 {{count}} 个文件","sources.upload.remove":"移除"};Kt.use(Yg).use(R0).init({resources:{en:{translation:P0},zh:{translation:I0}},fallbackLng:"en",interpolation:{escapeValue:!1},detection:{order:["localStorage"],caches:["localStorage"],lookupLocalStorage:"lang"}});var Lu={exports:{}},ur={},ku={exports:{}},Uu={};var zp;function eb(){return zp||(zp=1,(function(n){function i(M,P){var de=M.length;M.push(P);e:for(;0<de;){var $=de-1>>>1,fe=M[$];if(0<c(fe,P))M[$]=P,M[de]=fe,de=$;else break e}}function r(M){return M.length===0?null:M[0]}function s(M){if(M.length===0)return null;var P=M[0],de=M.pop();if(de!==P){M[0]=de;e:for(var $=0,fe=M.length,E=fe>>>1;$<E;){var B=2*($+1)-1,te=M[B],re=B+1,je=M[re];if(0>c(te,de))re<fe&&0>c(je,te)?(M[$]=je,M[re]=de,$=re):(M[$]=te,M[B]=de,$=B);else if(re<fe&&0>c(je,de))M[$]=je,M[re]=de,$=re;else break e}}return P}function c(M,P){var de=M.sortIndex-P.sortIndex;return de!==0?de:M.id-P.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var d=performance;n.unstable_now=function(){return d.now()}}else{var h=Date,p=h.now();n.unstable_now=function(){return h.now()-p}}var g=[],m=[],b=1,x=null,_=3,j=!1,R=!1,D=!1,k=!1,Z=typeof setTimeout=="function"?setTimeout:null,G=typeof clearTimeout=="function"?clearTimeout:null,K=typeof setImmediate<"u"?setImmediate:null;function le(M){for(var P=r(m);P!==null;){if(P.callback===null)s(m);else if(P.startTime<=M)s(m),P.sortIndex=P.expirationTime,i(g,P);else break;P=r(m)}}function F(M){if(D=!1,le(M),!R)if(r(g)!==null)R=!0,I||(I=!0,ie());else{var P=r(m);P!==null&&ge(F,P.startTime-M)}}var I=!1,W=-1,N=5,Y=-1;function J(){return k?!0:!(n.unstable_now()-Y<N)}function he(){if(k=!1,I){var M=n.unstable_now();Y=M;var P=!0;try{e:{R=!1,D&&(D=!1,G(W),W=-1),j=!0;var de=_;try{t:{for(le(M),x=r(g);x!==null&&!(x.expirationTime>M&&J());){var $=x.callback;if(typeof $=="function"){x.callback=null,_=x.priorityLevel;var fe=$(x.expirationTime<=M);if(M=n.unstable_now(),typeof fe=="function"){x.callback=fe,le(M),P=!0;break t}x===r(g)&&s(g),le(M)}else s(g);x=r(g)}if(x!==null)P=!0;else{var E=r(m);E!==null&&ge(F,E.startTime-M),P=!1}}break e}finally{x=null,_=de,j=!1}P=void 0}}finally{P?ie():I=!1}}}var ie;if(typeof K=="function")ie=function(){K(he)};else if(typeof MessageChannel<"u"){var ee=new MessageChannel,se=ee.port2;ee.port1.onmessage=he,ie=function(){se.postMessage(null)}}else ie=function(){Z(he,0)};function ge(M,P){W=Z(function(){M(n.unstable_now())},P)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(M){M.callback=null},n.unstable_forceFrameRate=function(M){0>M||125<M?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):N=0<M?Math.floor(1e3/M):5},n.unstable_getCurrentPriorityLevel=function(){return _},n.unstable_next=function(M){switch(_){case 1:case 2:case 3:var P=3;break;default:P=_}var de=_;_=P;try{return M()}finally{_=de}},n.unstable_requestPaint=function(){k=!0},n.unstable_runWithPriority=function(M,P){switch(M){case 1:case 2:case 3:case 4:case 5:break;default:M=3}var de=_;_=M;try{return P()}finally{_=de}},n.unstable_scheduleCallback=function(M,P,de){var $=n.unstable_now();switch(typeof de=="object"&&de!==null?(de=de.delay,de=typeof de=="number"&&0<de?$+de:$):de=$,M){case 1:var fe=-1;break;case 2:fe=250;break;case 5:fe=1073741823;break;case 4:fe=1e4;break;default:fe=5e3}return fe=de+fe,M={id:b++,callback:P,priorityLevel:M,startTime:de,expirationTime:fe,sortIndex:-1},de>$?(M.sortIndex=de,i(m,M),r(g)===null&&M===r(m)&&(D?(G(W),W=-1):D=!0,ge(F,de-$))):(M.sortIndex=fe,i(g,M),R||j||(R=!0,I||(I=!0,ie()))),M},n.unstable_shouldYield=J,n.unstable_wrapCallback=function(M){var P=_;return function(){var de=_;_=P;try{return M.apply(this,arguments)}finally{_=de}}}})(Uu)),Uu}var Tp;function tb(){return Tp||(Tp=1,ku.exports=eb()),ku.exports}var Hu={exports:{}},Bt={};var Op;function ab(){if(Op)return Bt;Op=1;var n=uo();function i(g){var m="https://react.dev/errors/"+g;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)m+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+g+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var s={d:{f:r,r:function(){throw Error(i(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},c=Symbol.for("react.portal");function d(g,m,b){var x=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:c,key:x==null?null:""+x,children:g,containerInfo:m,implementation:b}}var h=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function p(g,m){if(g==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return Bt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=s,Bt.createPortal=function(g,m){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(i(299));return d(g,m,null,b)},Bt.flushSync=function(g){var m=h.T,b=s.p;try{if(h.T=null,s.p=2,g)return g()}finally{h.T=m,s.p=b,s.d.f()}},Bt.preconnect=function(g,m){typeof g=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,s.d.C(g,m))},Bt.prefetchDNS=function(g){typeof g=="string"&&s.d.D(g)},Bt.preinit=function(g,m){if(typeof g=="string"&&m&&typeof m.as=="string"){var b=m.as,x=p(b,m.crossOrigin),_=typeof m.integrity=="string"?m.integrity:void 0,j=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;b==="style"?s.d.S(g,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:x,integrity:_,fetchPriority:j}):b==="script"&&s.d.X(g,{crossOrigin:x,integrity:_,fetchPriority:j,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},Bt.preinitModule=function(g,m){if(typeof g=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var b=p(m.as,m.crossOrigin);s.d.M(g,{crossOrigin:b,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&s.d.M(g)},Bt.preload=function(g,m){if(typeof g=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var b=m.as,x=p(b,m.crossOrigin);s.d.L(g,b,{crossOrigin:x,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},Bt.preloadModule=function(g,m){if(typeof g=="string")if(m){var b=p(m.as,m.crossOrigin);s.d.m(g,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:b,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else s.d.m(g)},Bt.requestFormReset=function(g){s.d.r(g)},Bt.unstable_batchedUpdates=function(g,m){return g(m)},Bt.useFormState=function(g,m,b){return h.H.useFormState(g,m,b)},Bt.useFormStatus=function(){return h.H.useHostTransitionStatus()},Bt.version="19.2.4",Bt}var Dp;function nb(){if(Dp)return Hu.exports;Dp=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(i){console.error(i)}}return n(),Hu.exports=ab(),Hu.exports}var Mp;function lb(){if(Mp)return ur;Mp=1;var n=tb(),i=uo(),r=nb();function s(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}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 c(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function d(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function h(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 p(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 g(e){if(d(e)!==e)throw Error(s(188))}function m(e){var t=e.alternate;if(!t){if(t=d(e),t===null)throw Error(s(188));return t!==e?null:e}for(var a=e,l=t;;){var o=a.return;if(o===null)break;var u=o.alternate;if(u===null){if(l=o.return,l!==null){a=l;continue}break}if(o.child===u.child){for(u=o.child;u;){if(u===a)return g(o),e;if(u===l)return g(o),t;u=u.sibling}throw Error(s(188))}if(a.return!==l.return)a=o,l=u;else{for(var y=!1,S=o.child;S;){if(S===a){y=!0,a=o,l=u;break}if(S===l){y=!0,l=o,a=u;break}S=S.sibling}if(!y){for(S=u.child;S;){if(S===a){y=!0,a=u,l=o;break}if(S===l){y=!0,l=u,a=o;break}S=S.sibling}if(!y)throw Error(s(189))}}if(a.alternate!==l)throw Error(s(190))}if(a.tag!==3)throw Error(s(188));return a.stateNode.current===a?e:t}function b(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=b(e),t!==null)return t;e=e.sibling}return null}var x=Object.assign,_=Symbol.for("react.element"),j=Symbol.for("react.transitional.element"),R=Symbol.for("react.portal"),D=Symbol.for("react.fragment"),k=Symbol.for("react.strict_mode"),Z=Symbol.for("react.profiler"),G=Symbol.for("react.consumer"),K=Symbol.for("react.context"),le=Symbol.for("react.forward_ref"),F=Symbol.for("react.suspense"),I=Symbol.for("react.suspense_list"),W=Symbol.for("react.memo"),N=Symbol.for("react.lazy"),Y=Symbol.for("react.activity"),J=Symbol.for("react.memo_cache_sentinel"),he=Symbol.iterator;function ie(e){return e===null||typeof e!="object"?null:(e=he&&e[he]||e["@@iterator"],typeof e=="function"?e:null)}var ee=Symbol.for("react.client.reference");function se(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ee?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case D:return"Fragment";case Z:return"Profiler";case k:return"StrictMode";case F:return"Suspense";case I:return"SuspenseList";case Y:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case R:return"Portal";case K:return e.displayName||"Context";case G:return(e._context.displayName||"Context")+".Consumer";case le:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case W:return t=e.displayName||null,t!==null?t:se(e.type)||"Memo";case N:t=e._payload,e=e._init;try{return se(e(t))}catch{}}return null}var ge=Array.isArray,M=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,P=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,de={pending:!1,data:null,method:null,action:null},$=[],fe=-1;function E(e){return{current:e}}function B(e){0>fe||(e.current=$[fe],$[fe]=null,fe--)}function te(e,t){fe++,$[fe]=e.current,e.current=t}var re=E(null),je=E(null),_e=E(null),Oe=E(null);function at(e,t){switch(te(_e,t),te(je,e),te(re,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Cm(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Cm(t),e=Rm(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}B(re),te(re,e)}function ue(){B(re),B(je),B(_e)}function vt(e){e.memoizedState!==null&&te(Oe,e);var t=re.current,a=Rm(t,e.type);t!==a&&(te(je,e),te(re,a))}function Ut(e){je.current===e&&(B(re),B(je)),Oe.current===e&&(B(Oe),lr._currentValue=de)}var Et,Ie;function pt(e){if(Et===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);Et=t&&t[1]||"",Ie=-1<a.stack.indexOf(`
|
|
2
|
+
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
+
`+Et+e+Ie}var ha=!1;function Ia(e,t){if(!e||ha)return"";ha=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var Q=function(){throw Error()};if(Object.defineProperty(Q.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Q,[])}catch(q){var U=q}Reflect.construct(e,[],Q)}else{try{Q.call()}catch(q){U=q}e.call(Q.prototype)}}else{try{throw Error()}catch(q){U=q}(Q=e())&&typeof Q.catch=="function"&&Q.catch(function(){})}}catch(q){if(q&&U&&typeof q.stack=="string")return[q.stack,U.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var o=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");o&&o.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var u=l.DetermineComponentFrameRoot(),y=u[0],S=u[1];if(y&&S){var w=y.split(`
|
|
4
|
+
`),L=S.split(`
|
|
5
|
+
`);for(o=l=0;l<w.length&&!w[l].includes("DetermineComponentFrameRoot");)l++;for(;o<L.length&&!L[o].includes("DetermineComponentFrameRoot");)o++;if(l===w.length||o===L.length)for(l=w.length-1,o=L.length-1;1<=l&&0<=o&&w[l]!==L[o];)o--;for(;1<=l&&0<=o;l--,o--)if(w[l]!==L[o]){if(l!==1||o!==1)do if(l--,o--,0>o||w[l]!==L[o]){var V=`
|
|
6
|
+
`+w[l].replace(" at new "," at ");return e.displayName&&V.includes("<anonymous>")&&(V=V.replace("<anonymous>",e.displayName)),V}while(1<=l&&0<=o);break}}}finally{ha=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?pt(a):""}function Xt(e,t){switch(e.tag){case 26:case 27:case 5:return pt(e.type);case 16:return pt("Lazy");case 13:return e.child!==t&&t!==null?pt("Suspense Fallback"):pt("Suspense");case 19:return pt("SuspenseList");case 0:case 15:return Ia(e.type,!1);case 11:return Ia(e.type.render,!1);case 1:return Ia(e.type,!0);case 31:return pt("Activity");default:return""}}function Gt(e){try{var t="",a=null;do t+=Xt(e,a),a=e,e=e.return;while(e);return t}catch(l){return`
|
|
7
|
+
Error generating stack: `+l.message+`
|
|
8
|
+
`+l.stack}}var ma=Object.prototype.hasOwnProperty,pa=n.unstable_scheduleCallback,en=n.unstable_cancelCallback,_n=n.unstable_shouldYield,jn=n.unstable_requestPaint,Ot=n.unstable_now,Oa=n.unstable_getCurrentPriorityLevel,qa=n.unstable_ImmediatePriority,al=n.unstable_UserBlockingPriority,Ya=n.unstable_NormalPriority,na=n.unstable_LowPriority,Qt=n.unstable_IdlePriority,wl=n.log,vi=n.unstable_setDisableYieldValue,Da=null,Dt=null;function oe(e){if(typeof wl=="function"&&vi(e),Dt&&typeof Dt.setStrictMode=="function")try{Dt.setStrictMode(Da,e)}catch{}}var be=Math.clz32?Math.clz32:ut,ot=Math.log,Zt=Math.LN2;function ut(e){return e>>>=0,e===0?32:31-(ot(e)/Zt|0)|0}var Va=256,ga=262144,Ma=4194304;function Ft(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 Nn(e,t,a){var l=e.pendingLanes;if(l===0)return 0;var o=0,u=e.suspendedLanes,y=e.pingedLanes;e=e.warmLanes;var S=l&134217727;return S!==0?(l=S&~u,l!==0?o=Ft(l):(y&=S,y!==0?o=Ft(y):a||(a=S&~e,a!==0&&(o=Ft(a))))):(S=l&~u,S!==0?o=Ft(S):y!==0?o=Ft(y):a||(a=l&~e,a!==0&&(o=Ft(a)))),o===0?0:t!==0&&t!==o&&(t&u)===0&&(u=o&-o,a=t&-t,u>=a||u===32&&(a&4194048)!==0)?t:o}function En(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function So(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 bi(){var e=Ma;return Ma<<=1,(Ma&62914560)===0&&(Ma=4194304),e}function wn(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function Ga(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ar(e,t,a,l,o,u){var y=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var S=e.entanglements,w=e.expirationTimes,L=e.hiddenUpdates;for(a=y&~a;0<a;){var V=31-be(a),Q=1<<V;S[V]=0,w[V]=-1;var U=L[V];if(U!==null)for(L[V]=null,V=0;V<U.length;V++){var q=U[V];q!==null&&(q.lane&=-536870913)}a&=~Q}l!==0&&Lr(e,l,0),u!==0&&o===0&&e.tag!==0&&(e.suspendedLanes|=u&~(y&~t))}function Lr(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-be(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|a&261930}function kr(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var l=31-be(a),o=1<<l;o&t|e[l]&t&&(e[l]|=t),a&=~o}}function C(e,t){var a=t&-t;return a=(a&42)!==0?1:T(a),(a&(e.suspendedLanes|t))!==0?0:a}function T(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 H(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function ae(){var e=P.p;return e!==0?e:(e=window.event,e===void 0?32:Wm(e.type))}function ne(e,t){var a=P.p;try{return P.p=e,t()}finally{P.p=a}}var ye=Math.random().toString(36).slice(2),ce="__reactFiber$"+ye,me="__reactProps$"+ye,pe="__reactContainer$"+ye,Ne="__reactEvents$"+ye,we="__reactListeners$"+ye,Se="__reactHandles$"+ye,$e="__reactResources$"+ye,ke="__reactMarker$"+ye;function et(e){delete e[ce],delete e[me],delete e[Ne],delete e[we],delete e[Se]}function lt(e){var t=e[ce];if(t)return t;for(var a=e.parentNode;a;){if(t=a[pe]||a[ce]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=Lm(e);e!==null;){if(a=e[ce])return a;e=Lm(e)}return t}e=a,a=e.parentNode}return null}function dt(e){if(e=e[ce]||e[pe]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Ge(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(s(33))}function wt(e){var t=e[$e];return t||(t=e[$e]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function nt(e){e[ke]=!0}var Cn=new Set,Aa={};function Rt(e,t){$a(e,t),$a(e+"Capture",t)}function $a(e,t){for(Aa[e]=t,e=0;e<t.length;e++)Cn.add(t[e])}var nl=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]*$"),Ka={},ll={};function Cl(e){return ma.call(ll,e)?!0:ma.call(Ka,e)?!1:nl.test(e)?ll[e]=!0:(Ka[e]=!0,!1)}function Ue(e,t,a){if(Cl(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var l=t.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function gt(e,t,a){if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+a)}}function Ht(e,t,a,l){if(l===null)e.removeAttribute(a);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+l)}}function bt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function it(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Rl(e,t,a){var l=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var o=l.get,u=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(y){a=""+y,u.call(this,y)}}),Object.defineProperty(e,t,{enumerable:l.enumerable}),{getValue:function(){return a},setValue:function(y){a=""+y},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function zl(e){if(!e._valueTracker){var t=it(e)?"checked":"value";e._valueTracker=Rl(e,t,""+e[t])}}function Ur(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),l="";return e&&(l=it(e)?e.checked?"true":"false":e.value),e=l,e!==a?(t.setValue(e),!0):!1}function Hr(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 Uy=/[\n"\\]/g;function ya(e){return e.replace(Uy,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function _o(e,t,a,l,o,u,y,S){e.name="",y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"?e.type=y:e.removeAttribute("type"),t!=null?y==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+bt(t)):e.value!==""+bt(t)&&(e.value=""+bt(t)):y!=="submit"&&y!=="reset"||e.removeAttribute("value"),t!=null?jo(e,y,bt(t)):a!=null?jo(e,y,bt(a)):l!=null&&e.removeAttribute("value"),o==null&&u!=null&&(e.defaultChecked=!!u),o!=null&&(e.checked=o&&typeof o!="function"&&typeof o!="symbol"),S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?e.name=""+bt(S):e.removeAttribute("name")}function bd(e,t,a,l,o,u,y,S){if(u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(e.type=u),t!=null||a!=null){if(!(u!=="submit"&&u!=="reset"||t!=null)){zl(e);return}a=a!=null?""+bt(a):"",t=t!=null?""+bt(t):a,S||t===e.value||(e.value=t),e.defaultValue=t}l=l??o,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=S?e.checked:!!l,e.defaultChecked=!!l,y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(e.name=y),zl(e)}function jo(e,t,a){t==="number"&&Hr(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function Tl(e,t,a,l){if(e=e.options,t){t={};for(var o=0;o<a.length;o++)t["$"+a[o]]=!0;for(a=0;a<e.length;a++)o=t.hasOwnProperty("$"+e[a].value),e[a].selected!==o&&(e[a].selected=o),o&&l&&(e[a].defaultSelected=!0)}else{for(a=""+bt(a),t=null,o=0;o<e.length;o++){if(e[o].value===a){e[o].selected=!0,l&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function Sd(e,t,a){if(t!=null&&(t=""+bt(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+bt(a):""}function _d(e,t,a,l){if(t==null){if(l!=null){if(a!=null)throw Error(s(92));if(ge(l)){if(1<l.length)throw Error(s(93));l=l[0]}a=l}a==null&&(a=""),t=a}a=bt(t),e.defaultValue=a,l=e.textContent,l===a&&l!==""&&l!==null&&(e.value=l),zl(e)}function Ol(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var Hy=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 jd(e,t,a){var l=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?l?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":l?e.setProperty(t,a):typeof a!="number"||a===0||Hy.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function Nd(e,t,a){if(t!=null&&typeof t!="object")throw Error(s(62));if(e=e.style,a!=null){for(var l in a)!a.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var o in t)l=t[o],t.hasOwnProperty(o)&&a[o]!==l&&jd(e,o,l)}else for(var u in t)t.hasOwnProperty(u)&&jd(e,u,t[u])}function No(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 By=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"]]),qy=/^[\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 Br(e){return qy.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function tn(){}var Eo=null;function wo(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Dl=null,Ml=null;function Ed(e){var t=dt(e);if(t&&(e=t.stateNode)){var a=e[me]||null;e:switch(e=t.stateNode,t.type){case"input":if(_o(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+ya(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var l=a[t];if(l!==e&&l.form===e.form){var o=l[me]||null;if(!o)throw Error(s(90));_o(l,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name)}}for(t=0;t<a.length;t++)l=a[t],l.form===e.form&&Ur(l)}break e;case"textarea":Sd(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&Tl(e,!!a.multiple,t,!1)}}}var Co=!1;function wd(e,t,a){if(Co)return e(t,a);Co=!0;try{var l=e(t);return l}finally{if(Co=!1,(Dl!==null||Ml!==null)&&(ws(),Dl&&(t=Dl,e=Ml,Ml=Dl=null,Ed(t),e)))for(t=0;t<e.length;t++)Ed(e[t])}}function Si(e,t){var a=e.stateNode;if(a===null)return null;var l=a[me]||null;if(l===null)return null;a=l[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":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(s(231,t,typeof a));return a}var an=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ro=!1;if(an)try{var _i={};Object.defineProperty(_i,"passive",{get:function(){Ro=!0}}),window.addEventListener("test",_i,_i),window.removeEventListener("test",_i,_i)}catch{Ro=!1}var Rn=null,zo=null,qr=null;function Cd(){if(qr)return qr;var e,t=zo,a=t.length,l,o="value"in Rn?Rn.value:Rn.textContent,u=o.length;for(e=0;e<a&&t[e]===o[e];e++);var y=a-e;for(l=1;l<=y&&t[a-l]===o[u-l];l++);return qr=o.slice(e,1<l?1-l:void 0)}function Yr(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 Vr(){return!0}function Rd(){return!1}function Jt(e){function t(a,l,o,u,y){this._reactName=a,this._targetInst=o,this.type=l,this.nativeEvent=u,this.target=y,this.currentTarget=null;for(var S in e)e.hasOwnProperty(S)&&(a=e[S],this[S]=a?a(u):u[S]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.returnValue===!1)?Vr:Rd,this.isPropagationStopped=Rd,this}return x(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Vr)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Vr)},persist:function(){},isPersistent:Vr}),t}var il={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Gr=Jt(il),ji=x({},il,{view:0,detail:0}),Yy=Jt(ji),To,Oo,Ni,$r=x({},ji,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Mo,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!==Ni&&(Ni&&e.type==="mousemove"?(To=e.screenX-Ni.screenX,Oo=e.screenY-Ni.screenY):Oo=To=0,Ni=e),To)},movementY:function(e){return"movementY"in e?e.movementY:Oo}}),zd=Jt($r),Vy=x({},$r,{dataTransfer:0}),Gy=Jt(Vy),$y=x({},ji,{relatedTarget:0}),Do=Jt($y),Ky=x({},il,{animationName:0,elapsedTime:0,pseudoElement:0}),Xy=Jt(Ky),Qy=x({},il,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Zy=Jt(Qy),Fy=x({},il,{data:0}),Td=Jt(Fy),Jy={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Wy={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"},Py={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Iy(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Py[e])?!!t[e]:!1}function Mo(){return Iy}var ex=x({},ji,{key:function(e){if(e.key){var t=Jy[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Yr(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Wy[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Mo,charCode:function(e){return e.type==="keypress"?Yr(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Yr(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),tx=Jt(ex),ax=x({},$r,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Od=Jt(ax),nx=x({},ji,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Mo}),lx=Jt(nx),ix=x({},il,{propertyName:0,elapsedTime:0,pseudoElement:0}),rx=Jt(ix),sx=x({},$r,{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}),ox=Jt(sx),cx=x({},il,{newState:0,oldState:0}),ux=Jt(cx),dx=[9,13,27,32],Ao=an&&"CompositionEvent"in window,Ei=null;an&&"documentMode"in document&&(Ei=document.documentMode);var fx=an&&"TextEvent"in window&&!Ei,Dd=an&&(!Ao||Ei&&8<Ei&&11>=Ei),Md=" ",Ad=!1;function Ld(e,t){switch(e){case"keyup":return dx.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function kd(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Al=!1;function hx(e,t){switch(e){case"compositionend":return kd(t);case"keypress":return t.which!==32?null:(Ad=!0,Md);case"textInput":return e=t.data,e===Md&&Ad?null:e;default:return null}}function mx(e,t){if(Al)return e==="compositionend"||!Ao&&Ld(e,t)?(e=Cd(),qr=zo=Rn=null,Al=!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 Dd&&t.locale!=="ko"?null:t.data;default:return null}}var px={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 Ud(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!px[e.type]:t==="textarea"}function Hd(e,t,a,l){Dl?Ml?Ml.push(l):Ml=[l]:Dl=l,t=Ms(t,"onChange"),0<t.length&&(a=new Gr("onChange","change",null,a,l),e.push({event:a,listeners:t}))}var wi=null,Ci=null;function gx(e){Sm(e,0)}function Kr(e){var t=Ge(e);if(Ur(t))return e}function Bd(e,t){if(e==="change")return t}var qd=!1;if(an){var Lo;if(an){var ko="oninput"in document;if(!ko){var Yd=document.createElement("div");Yd.setAttribute("oninput","return;"),ko=typeof Yd.oninput=="function"}Lo=ko}else Lo=!1;qd=Lo&&(!document.documentMode||9<document.documentMode)}function Vd(){wi&&(wi.detachEvent("onpropertychange",Gd),Ci=wi=null)}function Gd(e){if(e.propertyName==="value"&&Kr(Ci)){var t=[];Hd(t,Ci,e,wo(e)),wd(gx,t)}}function yx(e,t,a){e==="focusin"?(Vd(),wi=t,Ci=a,wi.attachEvent("onpropertychange",Gd)):e==="focusout"&&Vd()}function xx(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Kr(Ci)}function vx(e,t){if(e==="click")return Kr(t)}function bx(e,t){if(e==="input"||e==="change")return Kr(t)}function Sx(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var la=typeof Object.is=="function"?Object.is:Sx;function Ri(e,t){if(la(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),l=Object.keys(t);if(a.length!==l.length)return!1;for(l=0;l<a.length;l++){var o=a[l];if(!ma.call(t,o)||!la(e[o],t[o]))return!1}return!0}function $d(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Kd(e,t){var a=$d(e);e=0;for(var l;a;){if(a.nodeType===3){if(l=e+a.textContent.length,e<=t&&l>=t)return{node:a,offset:t-e};e=l}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=$d(a)}}function Xd(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Xd(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Qd(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Hr(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=Hr(e.document)}return t}function Uo(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 _x=an&&"documentMode"in document&&11>=document.documentMode,Ll=null,Ho=null,zi=null,Bo=!1;function Zd(e,t,a){var l=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Bo||Ll==null||Ll!==Hr(l)||(l=Ll,"selectionStart"in l&&Uo(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),zi&&Ri(zi,l)||(zi=l,l=Ms(Ho,"onSelect"),0<l.length&&(t=new Gr("onSelect","select",null,t,a),e.push({event:t,listeners:l}),t.target=Ll)))}function rl(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var kl={animationend:rl("Animation","AnimationEnd"),animationiteration:rl("Animation","AnimationIteration"),animationstart:rl("Animation","AnimationStart"),transitionrun:rl("Transition","TransitionRun"),transitionstart:rl("Transition","TransitionStart"),transitioncancel:rl("Transition","TransitionCancel"),transitionend:rl("Transition","TransitionEnd")},qo={},Fd={};an&&(Fd=document.createElement("div").style,"AnimationEvent"in window||(delete kl.animationend.animation,delete kl.animationiteration.animation,delete kl.animationstart.animation),"TransitionEvent"in window||delete kl.transitionend.transition);function sl(e){if(qo[e])return qo[e];if(!kl[e])return e;var t=kl[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in Fd)return qo[e]=t[a];return e}var Jd=sl("animationend"),Wd=sl("animationiteration"),Pd=sl("animationstart"),jx=sl("transitionrun"),Nx=sl("transitionstart"),Ex=sl("transitioncancel"),Id=sl("transitionend"),ef=new Map,Yo="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(" ");Yo.push("scrollEnd");function La(e,t){ef.set(e,t),Rt(t,[e])}var Xr=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}console.error(e)},xa=[],Ul=0,Vo=0;function Qr(){for(var e=Ul,t=Vo=Ul=0;t<e;){var a=xa[t];xa[t++]=null;var l=xa[t];xa[t++]=null;var o=xa[t];xa[t++]=null;var u=xa[t];if(xa[t++]=null,l!==null&&o!==null){var y=l.pending;y===null?o.next=o:(o.next=y.next,y.next=o),l.pending=o}u!==0&&tf(a,o,u)}}function Zr(e,t,a,l){xa[Ul++]=e,xa[Ul++]=t,xa[Ul++]=a,xa[Ul++]=l,Vo|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function Go(e,t,a,l){return Zr(e,t,a,l),Fr(e)}function ol(e,t){return Zr(e,null,null,t),Fr(e)}function tf(e,t,a){e.lanes|=a;var l=e.alternate;l!==null&&(l.lanes|=a);for(var o=!1,u=e.return;u!==null;)u.childLanes|=a,l=u.alternate,l!==null&&(l.childLanes|=a),u.tag===22&&(e=u.stateNode,e===null||e._visibility&1||(o=!0)),e=u,u=u.return;return e.tag===3?(u=e.stateNode,o&&t!==null&&(o=31-be(a),e=u.hiddenUpdates,l=e[o],l===null?e[o]=[t]:l.push(t),t.lane=a|536870912),u):null}function Fr(e){if(50<Wi)throw Wi=0,Pc=null,Error(s(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Hl={};function wx(e,t,a,l){this.tag=e,this.key=a,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=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ia(e,t,a,l){return new wx(e,t,a,l)}function $o(e){return e=e.prototype,!(!e||!e.isReactComponent)}function nn(e,t){var a=e.alternate;return a===null?(a=ia(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function af(e,t){e.flags&=65011714;var a=e.alternate;return a===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=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,t=a.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Jr(e,t,a,l,o,u){var y=0;if(l=e,typeof e=="function")$o(e)&&(y=1);else if(typeof e=="string")y=Ov(e,a,re.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case Y:return e=ia(31,a,t,o),e.elementType=Y,e.lanes=u,e;case D:return cl(a.children,o,u,t);case k:y=8,o|=24;break;case Z:return e=ia(12,a,t,o|2),e.elementType=Z,e.lanes=u,e;case F:return e=ia(13,a,t,o),e.elementType=F,e.lanes=u,e;case I:return e=ia(19,a,t,o),e.elementType=I,e.lanes=u,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case K:y=10;break e;case G:y=9;break e;case le:y=11;break e;case W:y=14;break e;case N:y=16,l=null;break e}y=29,a=Error(s(130,e===null?"null":typeof e,"")),l=null}return t=ia(y,a,t,o),t.elementType=e,t.type=l,t.lanes=u,t}function cl(e,t,a,l){return e=ia(7,e,l,t),e.lanes=a,e}function Ko(e,t,a){return e=ia(6,e,null,t),e.lanes=a,e}function nf(e){var t=ia(18,null,null,0);return t.stateNode=e,t}function Xo(e,t,a){return t=ia(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var lf=new WeakMap;function va(e,t){if(typeof e=="object"&&e!==null){var a=lf.get(e);return a!==void 0?a:(t={value:e,source:t,stack:Gt(t)},lf.set(e,t),t)}return{value:e,source:t,stack:Gt(t)}}var Bl=[],ql=0,Wr=null,Ti=0,ba=[],Sa=0,zn=null,Xa=1,Qa="";function ln(e,t){Bl[ql++]=Ti,Bl[ql++]=Wr,Wr=e,Ti=t}function rf(e,t,a){ba[Sa++]=Xa,ba[Sa++]=Qa,ba[Sa++]=zn,zn=e;var l=Xa;e=Qa;var o=32-be(l)-1;l&=~(1<<o),a+=1;var u=32-be(t)+o;if(30<u){var y=o-o%5;u=(l&(1<<y)-1).toString(32),l>>=y,o-=y,Xa=1<<32-be(t)+o|a<<o|l,Qa=u+e}else Xa=1<<u|a<<o|l,Qa=e}function Qo(e){e.return!==null&&(ln(e,1),rf(e,1,0))}function Zo(e){for(;e===Wr;)Wr=Bl[--ql],Bl[ql]=null,Ti=Bl[--ql],Bl[ql]=null;for(;e===zn;)zn=ba[--Sa],ba[Sa]=null,Qa=ba[--Sa],ba[Sa]=null,Xa=ba[--Sa],ba[Sa]=null}function sf(e,t){ba[Sa++]=Xa,ba[Sa++]=Qa,ba[Sa++]=zn,Xa=t.id,Qa=t.overflow,zn=e}var Mt=null,rt=null,Ve=!1,Tn=null,_a=!1,Fo=Error(s(519));function On(e){var t=Error(s(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Oi(va(t,e)),Fo}function of(e){var t=e.stateNode,a=e.type,l=e.memoizedProps;switch(t[ce]=e,t[me]=l,a){case"dialog":Be("cancel",t),Be("close",t);break;case"iframe":case"object":case"embed":Be("load",t);break;case"video":case"audio":for(a=0;a<Ii.length;a++)Be(Ii[a],t);break;case"source":Be("error",t);break;case"img":case"image":case"link":Be("error",t),Be("load",t);break;case"details":Be("toggle",t);break;case"input":Be("invalid",t),bd(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":Be("invalid",t);break;case"textarea":Be("invalid",t),_d(t,l.value,l.defaultValue,l.children)}a=l.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||l.suppressHydrationWarning===!0||Em(t.textContent,a)?(l.popover!=null&&(Be("beforetoggle",t),Be("toggle",t)),l.onScroll!=null&&Be("scroll",t),l.onScrollEnd!=null&&Be("scrollend",t),l.onClick!=null&&(t.onclick=tn),t=!0):t=!1,t||On(e,!0)}function cf(e){for(Mt=e.return;Mt;)switch(Mt.tag){case 5:case 31:case 13:_a=!1;return;case 27:case 3:_a=!0;return;default:Mt=Mt.return}}function Yl(e){if(e!==Mt)return!1;if(!Ve)return cf(e),Ve=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||hu(e.type,e.memoizedProps)),a=!a),a&&rt&&On(e),cf(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(317));rt=Am(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(317));rt=Am(e)}else t===27?(t=rt,Kn(e.type)?(e=xu,xu=null,rt=e):rt=t):rt=Mt?Na(e.stateNode.nextSibling):null;return!0}function ul(){rt=Mt=null,Ve=!1}function Jo(){var e=Tn;return e!==null&&(ea===null?ea=e:ea.push.apply(ea,e),Tn=null),e}function Oi(e){Tn===null?Tn=[e]:Tn.push(e)}var Wo=E(null),dl=null,rn=null;function Dn(e,t,a){te(Wo,t._currentValue),t._currentValue=a}function sn(e){e._currentValue=Wo.current,B(Wo)}function Po(e,t,a){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===a)break;e=e.return}}function Io(e,t,a,l){var o=e.child;for(o!==null&&(o.return=e);o!==null;){var u=o.dependencies;if(u!==null){var y=o.child;u=u.firstContext;e:for(;u!==null;){var S=u;u=o;for(var w=0;w<t.length;w++)if(S.context===t[w]){u.lanes|=a,S=u.alternate,S!==null&&(S.lanes|=a),Po(u.return,a,e),l||(y=null);break e}u=S.next}}else if(o.tag===18){if(y=o.return,y===null)throw Error(s(341));y.lanes|=a,u=y.alternate,u!==null&&(u.lanes|=a),Po(y,a,e),y=null}else y=o.child;if(y!==null)y.return=o;else for(y=o;y!==null;){if(y===e){y=null;break}if(o=y.sibling,o!==null){o.return=y.return,y=o;break}y=y.return}o=y}}function Vl(e,t,a,l){e=null;for(var o=t,u=!1;o!==null;){if(!u){if((o.flags&524288)!==0)u=!0;else if((o.flags&262144)!==0)break}if(o.tag===10){var y=o.alternate;if(y===null)throw Error(s(387));if(y=y.memoizedProps,y!==null){var S=o.type;la(o.pendingProps.value,y.value)||(e!==null?e.push(S):e=[S])}}else if(o===Oe.current){if(y=o.alternate,y===null)throw Error(s(387));y.memoizedState.memoizedState!==o.memoizedState.memoizedState&&(e!==null?e.push(lr):e=[lr])}o=o.return}e!==null&&Io(t,e,a,l),t.flags|=262144}function Pr(e){for(e=e.firstContext;e!==null;){if(!la(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function fl(e){dl=e,rn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function At(e){return uf(dl,e)}function Ir(e,t){return dl===null&&fl(e),uf(e,t)}function uf(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},rn===null){if(e===null)throw Error(s(308));rn=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else rn=rn.next=t;return a}var Cx=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,l){e.push(l)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},Rx=n.unstable_scheduleCallback,zx=n.unstable_NormalPriority,St={$$typeof:K,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ec(){return{controller:new Cx,data:new Map,refCount:0}}function Di(e){e.refCount--,e.refCount===0&&Rx(zx,function(){e.controller.abort()})}var Mi=null,tc=0,Gl=0,$l=null;function Tx(e,t){if(Mi===null){var a=Mi=[];tc=0,Gl=lu(),$l={status:"pending",value:void 0,then:function(l){a.push(l)}}}return tc++,t.then(df,df),t}function df(){if(--tc===0&&Mi!==null){$l!==null&&($l.status="fulfilled");var e=Mi;Mi=null,Gl=0,$l=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Ox(e,t){var a=[],l={status:"pending",value:null,reason:null,then:function(o){a.push(o)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var o=0;o<a.length;o++)(0,a[o])(t)},function(o){for(l.status="rejected",l.reason=o,o=0;o<a.length;o++)(0,a[o])(void 0)}),l}var ff=M.S;M.S=function(e,t){Fh=Ot(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Tx(e,t),ff!==null&&ff(e,t)};var hl=E(null);function ac(){var e=hl.current;return e!==null?e:tt.pooledCache}function es(e,t){t===null?te(hl,hl.current):te(hl,t.pool)}function hf(){var e=ac();return e===null?null:{parent:St._currentValue,pool:e}}var Kl=Error(s(460)),nc=Error(s(474)),ts=Error(s(542)),as={then:function(){}};function mf(e){return e=e.status,e==="fulfilled"||e==="rejected"}function pf(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(tn,tn),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,yf(e),e;default:if(typeof t.status=="string")t.then(tn,tn);else{if(e=tt,e!==null&&100<e.shellSuspendCounter)throw Error(s(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var o=t;o.status="fulfilled",o.value=l}},function(l){if(t.status==="pending"){var o=t;o.status="rejected",o.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,yf(e),e}throw pl=t,Kl}}function ml(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(pl=a,Kl):a}}var pl=null;function gf(){if(pl===null)throw Error(s(459));var e=pl;return pl=null,e}function yf(e){if(e===Kl||e===ts)throw Error(s(483))}var Xl=null,Ai=0;function ns(e){var t=Ai;return Ai+=1,Xl===null&&(Xl=[]),pf(Xl,e,t)}function Li(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function ls(e,t){throw t.$$typeof===_?Error(s(525)):(e=Object.prototype.toString.call(t),Error(s(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function xf(e){function t(O,z){if(e){var A=O.deletions;A===null?(O.deletions=[z],O.flags|=16):A.push(z)}}function a(O,z){if(!e)return null;for(;z!==null;)t(O,z),z=z.sibling;return null}function l(O){for(var z=new Map;O!==null;)O.key!==null?z.set(O.key,O):z.set(O.index,O),O=O.sibling;return z}function o(O,z){return O=nn(O,z),O.index=0,O.sibling=null,O}function u(O,z,A){return O.index=A,e?(A=O.alternate,A!==null?(A=A.index,A<z?(O.flags|=67108866,z):A):(O.flags|=67108866,z)):(O.flags|=1048576,z)}function y(O){return e&&O.alternate===null&&(O.flags|=67108866),O}function S(O,z,A,X){return z===null||z.tag!==6?(z=Ko(A,O.mode,X),z.return=O,z):(z=o(z,A),z.return=O,z)}function w(O,z,A,X){var Ee=A.type;return Ee===D?V(O,z,A.props.children,X,A.key):z!==null&&(z.elementType===Ee||typeof Ee=="object"&&Ee!==null&&Ee.$$typeof===N&&ml(Ee)===z.type)?(z=o(z,A.props),Li(z,A),z.return=O,z):(z=Jr(A.type,A.key,A.props,null,O.mode,X),Li(z,A),z.return=O,z)}function L(O,z,A,X){return z===null||z.tag!==4||z.stateNode.containerInfo!==A.containerInfo||z.stateNode.implementation!==A.implementation?(z=Xo(A,O.mode,X),z.return=O,z):(z=o(z,A.children||[]),z.return=O,z)}function V(O,z,A,X,Ee){return z===null||z.tag!==7?(z=cl(A,O.mode,X,Ee),z.return=O,z):(z=o(z,A),z.return=O,z)}function Q(O,z,A){if(typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint")return z=Ko(""+z,O.mode,A),z.return=O,z;if(typeof z=="object"&&z!==null){switch(z.$$typeof){case j:return A=Jr(z.type,z.key,z.props,null,O.mode,A),Li(A,z),A.return=O,A;case R:return z=Xo(z,O.mode,A),z.return=O,z;case N:return z=ml(z),Q(O,z,A)}if(ge(z)||ie(z))return z=cl(z,O.mode,A,null),z.return=O,z;if(typeof z.then=="function")return Q(O,ns(z),A);if(z.$$typeof===K)return Q(O,Ir(O,z),A);ls(O,z)}return null}function U(O,z,A,X){var Ee=z!==null?z.key:null;if(typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint")return Ee!==null?null:S(O,z,""+A,X);if(typeof A=="object"&&A!==null){switch(A.$$typeof){case j:return A.key===Ee?w(O,z,A,X):null;case R:return A.key===Ee?L(O,z,A,X):null;case N:return A=ml(A),U(O,z,A,X)}if(ge(A)||ie(A))return Ee!==null?null:V(O,z,A,X,null);if(typeof A.then=="function")return U(O,z,ns(A),X);if(A.$$typeof===K)return U(O,z,Ir(O,A),X);ls(O,A)}return null}function q(O,z,A,X,Ee){if(typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint")return O=O.get(A)||null,S(z,O,""+X,Ee);if(typeof X=="object"&&X!==null){switch(X.$$typeof){case j:return O=O.get(X.key===null?A:X.key)||null,w(z,O,X,Ee);case R:return O=O.get(X.key===null?A:X.key)||null,L(z,O,X,Ee);case N:return X=ml(X),q(O,z,A,X,Ee)}if(ge(X)||ie(X))return O=O.get(A)||null,V(z,O,X,Ee,null);if(typeof X.then=="function")return q(O,z,A,ns(X),Ee);if(X.$$typeof===K)return q(O,z,A,Ir(z,X),Ee);ls(z,X)}return null}function xe(O,z,A,X){for(var Ee=null,Ke=null,ve=z,Ae=z=0,Ye=null;ve!==null&&Ae<A.length;Ae++){ve.index>Ae?(Ye=ve,ve=null):Ye=ve.sibling;var Xe=U(O,ve,A[Ae],X);if(Xe===null){ve===null&&(ve=Ye);break}e&&ve&&Xe.alternate===null&&t(O,ve),z=u(Xe,z,Ae),Ke===null?Ee=Xe:Ke.sibling=Xe,Ke=Xe,ve=Ye}if(Ae===A.length)return a(O,ve),Ve&&ln(O,Ae),Ee;if(ve===null){for(;Ae<A.length;Ae++)ve=Q(O,A[Ae],X),ve!==null&&(z=u(ve,z,Ae),Ke===null?Ee=ve:Ke.sibling=ve,Ke=ve);return Ve&&ln(O,Ae),Ee}for(ve=l(ve);Ae<A.length;Ae++)Ye=q(ve,O,Ae,A[Ae],X),Ye!==null&&(e&&Ye.alternate!==null&&ve.delete(Ye.key===null?Ae:Ye.key),z=u(Ye,z,Ae),Ke===null?Ee=Ye:Ke.sibling=Ye,Ke=Ye);return e&&ve.forEach(function(Jn){return t(O,Jn)}),Ve&&ln(O,Ae),Ee}function Ce(O,z,A,X){if(A==null)throw Error(s(151));for(var Ee=null,Ke=null,ve=z,Ae=z=0,Ye=null,Xe=A.next();ve!==null&&!Xe.done;Ae++,Xe=A.next()){ve.index>Ae?(Ye=ve,ve=null):Ye=ve.sibling;var Jn=U(O,ve,Xe.value,X);if(Jn===null){ve===null&&(ve=Ye);break}e&&ve&&Jn.alternate===null&&t(O,ve),z=u(Jn,z,Ae),Ke===null?Ee=Jn:Ke.sibling=Jn,Ke=Jn,ve=Ye}if(Xe.done)return a(O,ve),Ve&&ln(O,Ae),Ee;if(ve===null){for(;!Xe.done;Ae++,Xe=A.next())Xe=Q(O,Xe.value,X),Xe!==null&&(z=u(Xe,z,Ae),Ke===null?Ee=Xe:Ke.sibling=Xe,Ke=Xe);return Ve&&ln(O,Ae),Ee}for(ve=l(ve);!Xe.done;Ae++,Xe=A.next())Xe=q(ve,O,Ae,Xe.value,X),Xe!==null&&(e&&Xe.alternate!==null&&ve.delete(Xe.key===null?Ae:Xe.key),z=u(Xe,z,Ae),Ke===null?Ee=Xe:Ke.sibling=Xe,Ke=Xe);return e&&ve.forEach(function(Vv){return t(O,Vv)}),Ve&&ln(O,Ae),Ee}function Pe(O,z,A,X){if(typeof A=="object"&&A!==null&&A.type===D&&A.key===null&&(A=A.props.children),typeof A=="object"&&A!==null){switch(A.$$typeof){case j:e:{for(var Ee=A.key;z!==null;){if(z.key===Ee){if(Ee=A.type,Ee===D){if(z.tag===7){a(O,z.sibling),X=o(z,A.props.children),X.return=O,O=X;break e}}else if(z.elementType===Ee||typeof Ee=="object"&&Ee!==null&&Ee.$$typeof===N&&ml(Ee)===z.type){a(O,z.sibling),X=o(z,A.props),Li(X,A),X.return=O,O=X;break e}a(O,z);break}else t(O,z);z=z.sibling}A.type===D?(X=cl(A.props.children,O.mode,X,A.key),X.return=O,O=X):(X=Jr(A.type,A.key,A.props,null,O.mode,X),Li(X,A),X.return=O,O=X)}return y(O);case R:e:{for(Ee=A.key;z!==null;){if(z.key===Ee)if(z.tag===4&&z.stateNode.containerInfo===A.containerInfo&&z.stateNode.implementation===A.implementation){a(O,z.sibling),X=o(z,A.children||[]),X.return=O,O=X;break e}else{a(O,z);break}else t(O,z);z=z.sibling}X=Xo(A,O.mode,X),X.return=O,O=X}return y(O);case N:return A=ml(A),Pe(O,z,A,X)}if(ge(A))return xe(O,z,A,X);if(ie(A)){if(Ee=ie(A),typeof Ee!="function")throw Error(s(150));return A=Ee.call(A),Ce(O,z,A,X)}if(typeof A.then=="function")return Pe(O,z,ns(A),X);if(A.$$typeof===K)return Pe(O,z,Ir(O,A),X);ls(O,A)}return typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint"?(A=""+A,z!==null&&z.tag===6?(a(O,z.sibling),X=o(z,A),X.return=O,O=X):(a(O,z),X=Ko(A,O.mode,X),X.return=O,O=X),y(O)):a(O,z)}return function(O,z,A,X){try{Ai=0;var Ee=Pe(O,z,A,X);return Xl=null,Ee}catch(ve){if(ve===Kl||ve===ts)throw ve;var Ke=ia(29,ve,null,O.mode);return Ke.lanes=X,Ke.return=O,Ke}}}var gl=xf(!0),vf=xf(!1),Mn=!1;function lc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ic(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 An(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ln(e,t,a){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(Qe&2)!==0){var o=l.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),l.pending=t,t=Fr(e),tf(e,null,a),t}return Zr(e,l,t,a),Fr(e)}function ki(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,kr(e,a)}}function rc(e,t){var a=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,a===l)){var o=null,u=null;if(a=a.firstBaseUpdate,a!==null){do{var y={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};u===null?o=u=y:u=u.next=y,a=a.next}while(a!==null);u===null?o=u=t:u=u.next=t}else o=u=t;a={baseState:l.baseState,firstBaseUpdate:o,lastBaseUpdate:u,shared:l.shared,callbacks:l.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var sc=!1;function Ui(){if(sc){var e=$l;if(e!==null)throw e}}function Hi(e,t,a,l){sc=!1;var o=e.updateQueue;Mn=!1;var u=o.firstBaseUpdate,y=o.lastBaseUpdate,S=o.shared.pending;if(S!==null){o.shared.pending=null;var w=S,L=w.next;w.next=null,y===null?u=L:y.next=L,y=w;var V=e.alternate;V!==null&&(V=V.updateQueue,S=V.lastBaseUpdate,S!==y&&(S===null?V.firstBaseUpdate=L:S.next=L,V.lastBaseUpdate=w))}if(u!==null){var Q=o.baseState;y=0,V=L=w=null,S=u;do{var U=S.lane&-536870913,q=U!==S.lane;if(q?(qe&U)===U:(l&U)===U){U!==0&&U===Gl&&(sc=!0),V!==null&&(V=V.next={lane:0,tag:S.tag,payload:S.payload,callback:null,next:null});e:{var xe=e,Ce=S;U=t;var Pe=a;switch(Ce.tag){case 1:if(xe=Ce.payload,typeof xe=="function"){Q=xe.call(Pe,Q,U);break e}Q=xe;break e;case 3:xe.flags=xe.flags&-65537|128;case 0:if(xe=Ce.payload,U=typeof xe=="function"?xe.call(Pe,Q,U):xe,U==null)break e;Q=x({},Q,U);break e;case 2:Mn=!0}}U=S.callback,U!==null&&(e.flags|=64,q&&(e.flags|=8192),q=o.callbacks,q===null?o.callbacks=[U]:q.push(U))}else q={lane:U,tag:S.tag,payload:S.payload,callback:S.callback,next:null},V===null?(L=V=q,w=Q):V=V.next=q,y|=U;if(S=S.next,S===null){if(S=o.shared.pending,S===null)break;q=S,S=q.next,q.next=null,o.lastBaseUpdate=q,o.shared.pending=null}}while(!0);V===null&&(w=Q),o.baseState=w,o.firstBaseUpdate=L,o.lastBaseUpdate=V,u===null&&(o.shared.lanes=0),qn|=y,e.lanes=y,e.memoizedState=Q}}function bf(e,t){if(typeof e!="function")throw Error(s(191,e));e.call(t)}function Sf(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)bf(a[e],t)}var Ql=E(null),is=E(0);function _f(e,t){e=gn,te(is,e),te(Ql,t),gn=e|t.baseLanes}function oc(){te(is,gn),te(Ql,Ql.current)}function cc(){gn=is.current,B(Ql),B(is)}var ra=E(null),ja=null;function kn(e){var t=e.alternate;te(yt,yt.current&1),te(ra,e),ja===null&&(t===null||Ql.current!==null||t.memoizedState!==null)&&(ja=e)}function uc(e){te(yt,yt.current),te(ra,e),ja===null&&(ja=e)}function jf(e){e.tag===22?(te(yt,yt.current),te(ra,e),ja===null&&(ja=e)):Un()}function Un(){te(yt,yt.current),te(ra,ra.current)}function sa(e){B(ra),ja===e&&(ja=null),B(yt)}var yt=E(0);function rs(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||gu(a)||yu(a)))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)!==0)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 on=0,Me=null,Je=null,_t=null,ss=!1,Zl=!1,yl=!1,os=0,Bi=0,Fl=null,Dx=0;function ft(){throw Error(s(321))}function dc(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!la(e[a],t[a]))return!1;return!0}function fc(e,t,a,l,o,u){return on=u,Me=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,M.H=e===null||e.memoizedState===null?rh:Cc,yl=!1,u=a(l,o),yl=!1,Zl&&(u=Ef(t,a,l,o)),Nf(e),u}function Nf(e){M.H=Vi;var t=Je!==null&&Je.next!==null;if(on=0,_t=Je=Me=null,ss=!1,Bi=0,Fl=null,t)throw Error(s(300));e===null||jt||(e=e.dependencies,e!==null&&Pr(e)&&(jt=!0))}function Ef(e,t,a,l){Me=e;var o=0;do{if(Zl&&(Fl=null),Bi=0,Zl=!1,25<=o)throw Error(s(301));if(o+=1,_t=Je=null,e.updateQueue!=null){var u=e.updateQueue;u.lastEffect=null,u.events=null,u.stores=null,u.memoCache!=null&&(u.memoCache.index=0)}M.H=sh,u=t(a,l)}while(Zl);return u}function Mx(){var e=M.H,t=e.useState()[0];return t=typeof t.then=="function"?qi(t):t,e=e.useState()[0],(Je!==null?Je.memoizedState:null)!==e&&(Me.flags|=1024),t}function hc(){var e=os!==0;return os=0,e}function mc(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function pc(e){if(ss){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}ss=!1}on=0,_t=Je=Me=null,Zl=!1,Bi=os=0,Fl=null}function $t(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return _t===null?Me.memoizedState=_t=e:_t=_t.next=e,_t}function xt(){if(Je===null){var e=Me.alternate;e=e!==null?e.memoizedState:null}else e=Je.next;var t=_t===null?Me.memoizedState:_t.next;if(t!==null)_t=t,Je=e;else{if(e===null)throw Me.alternate===null?Error(s(467)):Error(s(310));Je=e,e={memoizedState:Je.memoizedState,baseState:Je.baseState,baseQueue:Je.baseQueue,queue:Je.queue,next:null},_t===null?Me.memoizedState=_t=e:_t=_t.next=e}return _t}function cs(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function qi(e){var t=Bi;return Bi+=1,Fl===null&&(Fl=[]),e=pf(Fl,e,t),t=Me,(_t===null?t.memoizedState:_t.next)===null&&(t=t.alternate,M.H=t===null||t.memoizedState===null?rh:Cc),e}function us(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return qi(e);if(e.$$typeof===K)return At(e)}throw Error(s(438,String(e)))}function gc(e){var t=null,a=Me.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var l=Me.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(o){return o.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=cs(),Me.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),l=0;l<e;l++)a[l]=J;return t.index++,a}function cn(e,t){return typeof t=="function"?t(e):t}function ds(e){var t=xt();return yc(t,Je,e)}function yc(e,t,a){var l=e.queue;if(l===null)throw Error(s(311));l.lastRenderedReducer=a;var o=e.baseQueue,u=l.pending;if(u!==null){if(o!==null){var y=o.next;o.next=u.next,u.next=y}t.baseQueue=o=u,l.pending=null}if(u=e.baseState,o===null)e.memoizedState=u;else{t=o.next;var S=y=null,w=null,L=t,V=!1;do{var Q=L.lane&-536870913;if(Q!==L.lane?(qe&Q)===Q:(on&Q)===Q){var U=L.revertLane;if(U===0)w!==null&&(w=w.next={lane:0,revertLane:0,gesture:null,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null}),Q===Gl&&(V=!0);else if((on&U)===U){L=L.next,U===Gl&&(V=!0);continue}else Q={lane:0,revertLane:L.revertLane,gesture:null,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null},w===null?(S=w=Q,y=u):w=w.next=Q,Me.lanes|=U,qn|=U;Q=L.action,yl&&a(u,Q),u=L.hasEagerState?L.eagerState:a(u,Q)}else U={lane:Q,revertLane:L.revertLane,gesture:L.gesture,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null},w===null?(S=w=U,y=u):w=w.next=U,Me.lanes|=Q,qn|=Q;L=L.next}while(L!==null&&L!==t);if(w===null?y=u:w.next=S,!la(u,e.memoizedState)&&(jt=!0,V&&(a=$l,a!==null)))throw a;e.memoizedState=u,e.baseState=y,e.baseQueue=w,l.lastRenderedState=u}return o===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function xc(e){var t=xt(),a=t.queue;if(a===null)throw Error(s(311));a.lastRenderedReducer=e;var l=a.dispatch,o=a.pending,u=t.memoizedState;if(o!==null){a.pending=null;var y=o=o.next;do u=e(u,y.action),y=y.next;while(y!==o);la(u,t.memoizedState)||(jt=!0),t.memoizedState=u,t.baseQueue===null&&(t.baseState=u),a.lastRenderedState=u}return[u,l]}function wf(e,t,a){var l=Me,o=xt(),u=Ve;if(u){if(a===void 0)throw Error(s(407));a=a()}else a=t();var y=!la((Je||o).memoizedState,a);if(y&&(o.memoizedState=a,jt=!0),o=o.queue,Sc(zf.bind(null,l,o,e),[e]),o.getSnapshot!==t||y||_t!==null&&_t.memoizedState.tag&1){if(l.flags|=2048,Jl(9,{destroy:void 0},Rf.bind(null,l,o,a,t),null),tt===null)throw Error(s(349));u||(on&127)!==0||Cf(l,t,a)}return a}function Cf(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=Me.updateQueue,t===null?(t=cs(),Me.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function Rf(e,t,a,l){t.value=a,t.getSnapshot=l,Tf(t)&&Of(e)}function zf(e,t,a){return a(function(){Tf(t)&&Of(e)})}function Tf(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!la(e,a)}catch{return!0}}function Of(e){var t=ol(e,2);t!==null&&ta(t,e,2)}function vc(e){var t=$t();if(typeof e=="function"){var a=e;if(e=a(),yl){oe(!0);try{a()}finally{oe(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:cn,lastRenderedState:e},t}function Df(e,t,a,l){return e.baseState=a,yc(e,Je,typeof l=="function"?l:cn)}function Ax(e,t,a,l,o){if(ms(e))throw Error(s(485));if(e=t.action,e!==null){var u={payload:o,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(y){u.listeners.push(y)}};M.T!==null?a(!0):u.isTransition=!1,l(u),a=t.pending,a===null?(u.next=t.pending=u,Mf(t,u)):(u.next=a.next,t.pending=a.next=u)}}function Mf(e,t){var a=t.action,l=t.payload,o=e.state;if(t.isTransition){var u=M.T,y={};M.T=y;try{var S=a(o,l),w=M.S;w!==null&&w(y,S),Af(e,t,S)}catch(L){bc(e,t,L)}finally{u!==null&&y.types!==null&&(u.types=y.types),M.T=u}}else try{u=a(o,l),Af(e,t,u)}catch(L){bc(e,t,L)}}function Af(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(l){Lf(e,t,l)},function(l){return bc(e,t,l)}):Lf(e,t,a)}function Lf(e,t,a){t.status="fulfilled",t.value=a,kf(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,Mf(e,a)))}function bc(e,t,a){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=a,kf(t),t=t.next;while(t!==l)}e.action=null}function kf(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Uf(e,t){return t}function Hf(e,t){if(Ve){var a=tt.formState;if(a!==null){e:{var l=Me;if(Ve){if(rt){t:{for(var o=rt,u=_a;o.nodeType!==8;){if(!u){o=null;break t}if(o=Na(o.nextSibling),o===null){o=null;break t}}u=o.data,o=u==="F!"||u==="F"?o:null}if(o){rt=Na(o.nextSibling),l=o.data==="F!";break e}}On(l)}l=!1}l&&(t=a[0])}}return a=$t(),a.memoizedState=a.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Uf,lastRenderedState:t},a.queue=l,a=nh.bind(null,Me,l),l.dispatch=a,l=vc(!1),u=wc.bind(null,Me,!1,l.queue),l=$t(),o={state:t,dispatch:null,action:e,pending:null},l.queue=o,a=Ax.bind(null,Me,o,u,a),o.dispatch=a,l.memoizedState=e,[t,a,!1]}function Bf(e){var t=xt();return qf(t,Je,e)}function qf(e,t,a){if(t=yc(e,t,Uf)[0],e=ds(cn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=qi(t)}catch(y){throw y===Kl?ts:y}else l=t;t=xt();var o=t.queue,u=o.dispatch;return a!==t.memoizedState&&(Me.flags|=2048,Jl(9,{destroy:void 0},Lx.bind(null,o,a),null)),[l,u,e]}function Lx(e,t){e.action=t}function Yf(e){var t=xt(),a=Je;if(a!==null)return qf(t,a,e);xt(),t=t.memoizedState,a=xt();var l=a.queue.dispatch;return a.memoizedState=e,[t,l,!1]}function Jl(e,t,a,l){return e={tag:e,create:a,deps:l,inst:t,next:null},t=Me.updateQueue,t===null&&(t=cs(),Me.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(l=a.next,a.next=e,e.next=l,t.lastEffect=e),e}function Vf(){return xt().memoizedState}function fs(e,t,a,l){var o=$t();Me.flags|=e,o.memoizedState=Jl(1|t,{destroy:void 0},a,l===void 0?null:l)}function hs(e,t,a,l){var o=xt();l=l===void 0?null:l;var u=o.memoizedState.inst;Je!==null&&l!==null&&dc(l,Je.memoizedState.deps)?o.memoizedState=Jl(t,u,a,l):(Me.flags|=e,o.memoizedState=Jl(1|t,u,a,l))}function Gf(e,t){fs(8390656,8,e,t)}function Sc(e,t){hs(2048,8,e,t)}function kx(e){Me.flags|=4;var t=Me.updateQueue;if(t===null)t=cs(),Me.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function $f(e){var t=xt().memoizedState;return kx({ref:t,nextImpl:e}),function(){if((Qe&2)!==0)throw Error(s(440));return t.impl.apply(void 0,arguments)}}function Kf(e,t){return hs(4,2,e,t)}function Xf(e,t){return hs(4,4,e,t)}function Qf(e,t){if(typeof t=="function"){e=e();var a=t(e);return function(){typeof a=="function"?a():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Zf(e,t,a){a=a!=null?a.concat([e]):null,hs(4,4,Qf.bind(null,t,e),a)}function _c(){}function Ff(e,t){var a=xt();t=t===void 0?null:t;var l=a.memoizedState;return t!==null&&dc(t,l[1])?l[0]:(a.memoizedState=[e,t],e)}function Jf(e,t){var a=xt();t=t===void 0?null:t;var l=a.memoizedState;if(t!==null&&dc(t,l[1]))return l[0];if(l=e(),yl){oe(!0);try{e()}finally{oe(!1)}}return a.memoizedState=[l,t],l}function jc(e,t,a){return a===void 0||(on&1073741824)!==0&&(qe&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=Wh(),Me.lanes|=e,qn|=e,a)}function Wf(e,t,a,l){return la(a,t)?a:Ql.current!==null?(e=jc(e,a,l),la(e,t)||(jt=!0),e):(on&42)===0||(on&1073741824)!==0&&(qe&261930)===0?(jt=!0,e.memoizedState=a):(e=Wh(),Me.lanes|=e,qn|=e,t)}function Pf(e,t,a,l,o){var u=P.p;P.p=u!==0&&8>u?u:8;var y=M.T,S={};M.T=S,wc(e,!1,t,a);try{var w=o(),L=M.S;if(L!==null&&L(S,w),w!==null&&typeof w=="object"&&typeof w.then=="function"){var V=Ox(w,l);Yi(e,t,V,ua(e))}else Yi(e,t,l,ua(e))}catch(Q){Yi(e,t,{then:function(){},status:"rejected",reason:Q},ua())}finally{P.p=u,y!==null&&S.types!==null&&(y.types=S.types),M.T=y}}function Ux(){}function Nc(e,t,a,l){if(e.tag!==5)throw Error(s(476));var o=If(e).queue;Pf(e,o,t,de,a===null?Ux:function(){return eh(e),a(l)})}function If(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:de,baseState:de,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:cn,lastRenderedState:de},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:cn,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function eh(e){var t=If(e);t.next===null&&(t=e.alternate.memoizedState),Yi(e,t.next.queue,{},ua())}function Ec(){return At(lr)}function th(){return xt().memoizedState}function ah(){return xt().memoizedState}function Hx(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=ua();e=An(a);var l=Ln(t,e,a);l!==null&&(ta(l,t,a),ki(l,t,a)),t={cache:ec()},e.payload=t;return}t=t.return}}function Bx(e,t,a){var l=ua();a={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},ms(e)?lh(t,a):(a=Go(e,t,a,l),a!==null&&(ta(a,e,l),ih(a,t,l)))}function nh(e,t,a){var l=ua();Yi(e,t,a,l)}function Yi(e,t,a,l){var o={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(ms(e))lh(t,o);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var y=t.lastRenderedState,S=u(y,a);if(o.hasEagerState=!0,o.eagerState=S,la(S,y))return Zr(e,t,o,0),tt===null&&Qr(),!1}catch{}if(a=Go(e,t,o,l),a!==null)return ta(a,e,l),ih(a,t,l),!0}return!1}function wc(e,t,a,l){if(l={lane:2,revertLane:lu(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},ms(e)){if(t)throw Error(s(479))}else t=Go(e,a,l,2),t!==null&&ta(t,e,2)}function ms(e){var t=e.alternate;return e===Me||t!==null&&t===Me}function lh(e,t){Zl=ss=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function ih(e,t,a){if((a&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,kr(e,a)}}var Vi={readContext:At,use:us,useCallback:ft,useContext:ft,useEffect:ft,useImperativeHandle:ft,useLayoutEffect:ft,useInsertionEffect:ft,useMemo:ft,useReducer:ft,useRef:ft,useState:ft,useDebugValue:ft,useDeferredValue:ft,useTransition:ft,useSyncExternalStore:ft,useId:ft,useHostTransitionStatus:ft,useFormState:ft,useActionState:ft,useOptimistic:ft,useMemoCache:ft,useCacheRefresh:ft};Vi.useEffectEvent=ft;var rh={readContext:At,use:us,useCallback:function(e,t){return $t().memoizedState=[e,t===void 0?null:t],e},useContext:At,useEffect:Gf,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,fs(4194308,4,Qf.bind(null,t,e),a)},useLayoutEffect:function(e,t){return fs(4194308,4,e,t)},useInsertionEffect:function(e,t){fs(4,2,e,t)},useMemo:function(e,t){var a=$t();t=t===void 0?null:t;var l=e();if(yl){oe(!0);try{e()}finally{oe(!1)}}return a.memoizedState=[l,t],l},useReducer:function(e,t,a){var l=$t();if(a!==void 0){var o=a(t);if(yl){oe(!0);try{a(t)}finally{oe(!1)}}}else o=t;return l.memoizedState=l.baseState=o,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:o},l.queue=e,e=e.dispatch=Bx.bind(null,Me,e),[l.memoizedState,e]},useRef:function(e){var t=$t();return e={current:e},t.memoizedState=e},useState:function(e){e=vc(e);var t=e.queue,a=nh.bind(null,Me,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:_c,useDeferredValue:function(e,t){var a=$t();return jc(a,e,t)},useTransition:function(){var e=vc(!1);return e=Pf.bind(null,Me,e.queue,!0,!1),$t().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var l=Me,o=$t();if(Ve){if(a===void 0)throw Error(s(407));a=a()}else{if(a=t(),tt===null)throw Error(s(349));(qe&127)!==0||Cf(l,t,a)}o.memoizedState=a;var u={value:a,getSnapshot:t};return o.queue=u,Gf(zf.bind(null,l,u,e),[e]),l.flags|=2048,Jl(9,{destroy:void 0},Rf.bind(null,l,u,a,t),null),a},useId:function(){var e=$t(),t=tt.identifierPrefix;if(Ve){var a=Qa,l=Xa;a=(l&~(1<<32-be(l)-1)).toString(32)+a,t="_"+t+"R_"+a,a=os++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=Dx++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Ec,useFormState:Hf,useActionState:Hf,useOptimistic:function(e){var t=$t();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=wc.bind(null,Me,!0,a),a.dispatch=t,[e,t]},useMemoCache:gc,useCacheRefresh:function(){return $t().memoizedState=Hx.bind(null,Me)},useEffectEvent:function(e){var t=$t(),a={impl:e};return t.memoizedState=a,function(){if((Qe&2)!==0)throw Error(s(440));return a.impl.apply(void 0,arguments)}}},Cc={readContext:At,use:us,useCallback:Ff,useContext:At,useEffect:Sc,useImperativeHandle:Zf,useInsertionEffect:Kf,useLayoutEffect:Xf,useMemo:Jf,useReducer:ds,useRef:Vf,useState:function(){return ds(cn)},useDebugValue:_c,useDeferredValue:function(e,t){var a=xt();return Wf(a,Je.memoizedState,e,t)},useTransition:function(){var e=ds(cn)[0],t=xt().memoizedState;return[typeof e=="boolean"?e:qi(e),t]},useSyncExternalStore:wf,useId:th,useHostTransitionStatus:Ec,useFormState:Bf,useActionState:Bf,useOptimistic:function(e,t){var a=xt();return Df(a,Je,e,t)},useMemoCache:gc,useCacheRefresh:ah};Cc.useEffectEvent=$f;var sh={readContext:At,use:us,useCallback:Ff,useContext:At,useEffect:Sc,useImperativeHandle:Zf,useInsertionEffect:Kf,useLayoutEffect:Xf,useMemo:Jf,useReducer:xc,useRef:Vf,useState:function(){return xc(cn)},useDebugValue:_c,useDeferredValue:function(e,t){var a=xt();return Je===null?jc(a,e,t):Wf(a,Je.memoizedState,e,t)},useTransition:function(){var e=xc(cn)[0],t=xt().memoizedState;return[typeof e=="boolean"?e:qi(e),t]},useSyncExternalStore:wf,useId:th,useHostTransitionStatus:Ec,useFormState:Yf,useActionState:Yf,useOptimistic:function(e,t){var a=xt();return Je!==null?Df(a,Je,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:gc,useCacheRefresh:ah};sh.useEffectEvent=$f;function Rc(e,t,a,l){t=e.memoizedState,a=a(l,t),a=a==null?t:x({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var zc={enqueueSetState:function(e,t,a){e=e._reactInternals;var l=ua(),o=An(l);o.payload=t,a!=null&&(o.callback=a),t=Ln(e,o,l),t!==null&&(ta(t,e,l),ki(t,e,l))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var l=ua(),o=An(l);o.tag=1,o.payload=t,a!=null&&(o.callback=a),t=Ln(e,o,l),t!==null&&(ta(t,e,l),ki(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=ua(),l=An(a);l.tag=2,t!=null&&(l.callback=t),t=Ln(e,l,a),t!==null&&(ta(t,e,a),ki(t,e,a))}};function oh(e,t,a,l,o,u,y){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,u,y):t.prototype&&t.prototype.isPureReactComponent?!Ri(a,l)||!Ri(o,u):!0}function ch(e,t,a,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,l),t.state!==e&&zc.enqueueReplaceState(t,t.state,null)}function xl(e,t){var a=t;if("ref"in t){a={};for(var l in t)l!=="ref"&&(a[l]=t[l])}if(e=e.defaultProps){a===t&&(a=x({},a));for(var o in e)a[o]===void 0&&(a[o]=e[o])}return a}function uh(e){Xr(e)}function dh(e){console.error(e)}function fh(e){Xr(e)}function ps(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function hh(e,t,a){try{var l=e.onCaughtError;l(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(o){setTimeout(function(){throw o})}}function Tc(e,t,a){return a=An(a),a.tag=3,a.payload={element:null},a.callback=function(){ps(e,t)},a}function mh(e){return e=An(e),e.tag=3,e}function ph(e,t,a,l){var o=a.type.getDerivedStateFromError;if(typeof o=="function"){var u=l.value;e.payload=function(){return o(u)},e.callback=function(){hh(t,a,l)}}var y=a.stateNode;y!==null&&typeof y.componentDidCatch=="function"&&(e.callback=function(){hh(t,a,l),typeof o!="function"&&(Yn===null?Yn=new Set([this]):Yn.add(this));var S=l.stack;this.componentDidCatch(l.value,{componentStack:S!==null?S:""})})}function qx(e,t,a,l,o){if(a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=a.alternate,t!==null&&Vl(t,a,o,!0),a=ra.current,a!==null){switch(a.tag){case 31:case 13:return ja===null?Cs():a.alternate===null&&ht===0&&(ht=3),a.flags&=-257,a.flags|=65536,a.lanes=o,l===as?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([l]):t.add(l),tu(e,l,o)),!1;case 22:return a.flags|=65536,l===as?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([l]):a.add(l)),tu(e,l,o)),!1}throw Error(s(435,a.tag))}return tu(e,l,o),Cs(),!1}if(Ve)return t=ra.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=o,l!==Fo&&(e=Error(s(422),{cause:l}),Oi(va(e,a)))):(l!==Fo&&(t=Error(s(423),{cause:l}),Oi(va(t,a))),e=e.current.alternate,e.flags|=65536,o&=-o,e.lanes|=o,l=va(l,a),o=Tc(e.stateNode,l,o),rc(e,o),ht!==4&&(ht=2)),!1;var u=Error(s(520),{cause:l});if(u=va(u,a),Ji===null?Ji=[u]:Ji.push(u),ht!==4&&(ht=2),t===null)return!0;l=va(l,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=o&-o,a.lanes|=e,e=Tc(a.stateNode,l,e),rc(a,e),!1;case 1:if(t=a.type,u=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||u!==null&&typeof u.componentDidCatch=="function"&&(Yn===null||!Yn.has(u))))return a.flags|=65536,o&=-o,a.lanes|=o,o=mh(o),ph(o,e,a,l),rc(a,o),!1}a=a.return}while(a!==null);return!1}var Oc=Error(s(461)),jt=!1;function Lt(e,t,a,l){t.child=e===null?vf(t,null,a,l):gl(t,e.child,a,l)}function gh(e,t,a,l,o){a=a.render;var u=t.ref;if("ref"in l){var y={};for(var S in l)S!=="ref"&&(y[S]=l[S])}else y=l;return fl(t),l=fc(e,t,a,y,u,o),S=hc(),e!==null&&!jt?(mc(e,t,o),un(e,t,o)):(Ve&&S&&Qo(t),t.flags|=1,Lt(e,t,l,o),t.child)}function yh(e,t,a,l,o){if(e===null){var u=a.type;return typeof u=="function"&&!$o(u)&&u.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=u,xh(e,t,u,l,o)):(e=Jr(a.type,null,l,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(u=e.child,!Bc(e,o)){var y=u.memoizedProps;if(a=a.compare,a=a!==null?a:Ri,a(y,l)&&e.ref===t.ref)return un(e,t,o)}return t.flags|=1,e=nn(u,l),e.ref=t.ref,e.return=t,t.child=e}function xh(e,t,a,l,o){if(e!==null){var u=e.memoizedProps;if(Ri(u,l)&&e.ref===t.ref)if(jt=!1,t.pendingProps=l=u,Bc(e,o))(e.flags&131072)!==0&&(jt=!0);else return t.lanes=e.lanes,un(e,t,o)}return Dc(e,t,a,l,o)}function vh(e,t,a,l){var o=l.children,u=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((t.flags&128)!==0){if(u=u!==null?u.baseLanes|a:a,e!==null){for(l=t.child=e.child,o=0;l!==null;)o=o|l.lanes|l.childLanes,l=l.sibling;l=o&~u}else l=0,t.child=null;return bh(e,t,u,a,l)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&es(t,u!==null?u.cachePool:null),u!==null?_f(t,u):oc(),jf(t);else return l=t.lanes=536870912,bh(e,t,u!==null?u.baseLanes|a:a,a,l)}else u!==null?(es(t,u.cachePool),_f(t,u),Un(),t.memoizedState=null):(e!==null&&es(t,null),oc(),Un());return Lt(e,t,o,a),t.child}function Gi(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function bh(e,t,a,l,o){var u=ac();return u=u===null?null:{parent:St._currentValue,pool:u},t.memoizedState={baseLanes:a,cachePool:u},e!==null&&es(t,null),oc(),jf(t),e!==null&&Vl(e,t,l,!0),t.childLanes=o,null}function gs(e,t){return t=xs({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Sh(e,t,a){return gl(t,e.child,null,a),e=gs(t,t.pendingProps),e.flags|=2,sa(t),t.memoizedState=null,e}function Yx(e,t,a){var l=t.pendingProps,o=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ve){if(l.mode==="hidden")return e=gs(t,l),t.lanes=536870912,Gi(null,e);if(uc(t),(e=rt)?(e=Mm(e,_a),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:zn!==null?{id:Xa,overflow:Qa}:null,retryLane:536870912,hydrationErrors:null},a=nf(e),a.return=t,t.child=a,Mt=t,rt=null)):e=null,e===null)throw On(t);return t.lanes=536870912,null}return gs(t,l)}var u=e.memoizedState;if(u!==null){var y=u.dehydrated;if(uc(t),o)if(t.flags&256)t.flags&=-257,t=Sh(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(s(558));else if(jt||Vl(e,t,a,!1),o=(a&e.childLanes)!==0,jt||o){if(l=tt,l!==null&&(y=C(l,a),y!==0&&y!==u.retryLane))throw u.retryLane=y,ol(e,y),ta(l,e,y),Oc;Cs(),t=Sh(e,t,a)}else e=u.treeContext,rt=Na(y.nextSibling),Mt=t,Ve=!0,Tn=null,_a=!1,e!==null&&sf(t,e),t=gs(t,l),t.flags|=4096;return t}return e=nn(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function ys(e,t){var a=t.ref;if(a===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(s(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function Dc(e,t,a,l,o){return fl(t),a=fc(e,t,a,l,void 0,o),l=hc(),e!==null&&!jt?(mc(e,t,o),un(e,t,o)):(Ve&&l&&Qo(t),t.flags|=1,Lt(e,t,a,o),t.child)}function _h(e,t,a,l,o,u){return fl(t),t.updateQueue=null,a=Ef(t,l,a,o),Nf(e),l=hc(),e!==null&&!jt?(mc(e,t,u),un(e,t,u)):(Ve&&l&&Qo(t),t.flags|=1,Lt(e,t,a,u),t.child)}function jh(e,t,a,l,o){if(fl(t),t.stateNode===null){var u=Hl,y=a.contextType;typeof y=="object"&&y!==null&&(u=At(y)),u=new a(l,u),t.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=zc,t.stateNode=u,u._reactInternals=t,u=t.stateNode,u.props=l,u.state=t.memoizedState,u.refs={},lc(t),y=a.contextType,u.context=typeof y=="object"&&y!==null?At(y):Hl,u.state=t.memoizedState,y=a.getDerivedStateFromProps,typeof y=="function"&&(Rc(t,a,y,l),u.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof u.getSnapshotBeforeUpdate=="function"||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(y=u.state,typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount(),y!==u.state&&zc.enqueueReplaceState(u,u.state,null),Hi(t,l,u,o),Ui(),u.state=t.memoizedState),typeof u.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){u=t.stateNode;var S=t.memoizedProps,w=xl(a,S);u.props=w;var L=u.context,V=a.contextType;y=Hl,typeof V=="object"&&V!==null&&(y=At(V));var Q=a.getDerivedStateFromProps;V=typeof Q=="function"||typeof u.getSnapshotBeforeUpdate=="function",S=t.pendingProps!==S,V||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(S||L!==y)&&ch(t,u,l,y),Mn=!1;var U=t.memoizedState;u.state=U,Hi(t,l,u,o),Ui(),L=t.memoizedState,S||U!==L||Mn?(typeof Q=="function"&&(Rc(t,a,Q,l),L=t.memoizedState),(w=Mn||oh(t,a,w,l,U,L,y))?(V||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount()),typeof u.componentDidMount=="function"&&(t.flags|=4194308)):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=L),u.props=l,u.state=L,u.context=y,l=w):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{u=t.stateNode,ic(e,t),y=t.memoizedProps,V=xl(a,y),u.props=V,Q=t.pendingProps,U=u.context,L=a.contextType,w=Hl,typeof L=="object"&&L!==null&&(w=At(L)),S=a.getDerivedStateFromProps,(L=typeof S=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(y!==Q||U!==w)&&ch(t,u,l,w),Mn=!1,U=t.memoizedState,u.state=U,Hi(t,l,u,o),Ui();var q=t.memoizedState;y!==Q||U!==q||Mn||e!==null&&e.dependencies!==null&&Pr(e.dependencies)?(typeof S=="function"&&(Rc(t,a,S,l),q=t.memoizedState),(V=Mn||oh(t,a,V,l,U,q,w)||e!==null&&e.dependencies!==null&&Pr(e.dependencies))?(L||typeof u.UNSAFE_componentWillUpdate!="function"&&typeof u.componentWillUpdate!="function"||(typeof u.componentWillUpdate=="function"&&u.componentWillUpdate(l,q,w),typeof u.UNSAFE_componentWillUpdate=="function"&&u.UNSAFE_componentWillUpdate(l,q,w)),typeof u.componentDidUpdate=="function"&&(t.flags|=4),typeof u.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof u.componentDidUpdate!="function"||y===e.memoizedProps&&U===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&U===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=q),u.props=l,u.state=q,u.context=w,l=V):(typeof u.componentDidUpdate!="function"||y===e.memoizedProps&&U===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&U===e.memoizedState||(t.flags|=1024),l=!1)}return u=l,ys(e,t),l=(t.flags&128)!==0,u||l?(u=t.stateNode,a=l&&typeof a.getDerivedStateFromError!="function"?null:u.render(),t.flags|=1,e!==null&&l?(t.child=gl(t,e.child,null,o),t.child=gl(t,null,a,o)):Lt(e,t,a,o),t.memoizedState=u.state,e=t.child):e=un(e,t,o),e}function Nh(e,t,a,l){return ul(),t.flags|=256,Lt(e,t,a,l),t.child}var Mc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ac(e){return{baseLanes:e,cachePool:hf()}}function Lc(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=ca),e}function Eh(e,t,a){var l=t.pendingProps,o=!1,u=(t.flags&128)!==0,y;if((y=u)||(y=e!==null&&e.memoizedState===null?!1:(yt.current&2)!==0),y&&(o=!0,t.flags&=-129),y=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ve){if(o?kn(t):Un(),(e=rt)?(e=Mm(e,_a),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:zn!==null?{id:Xa,overflow:Qa}:null,retryLane:536870912,hydrationErrors:null},a=nf(e),a.return=t,t.child=a,Mt=t,rt=null)):e=null,e===null)throw On(t);return yu(e)?t.lanes=32:t.lanes=536870912,null}var S=l.children;return l=l.fallback,o?(Un(),o=t.mode,S=xs({mode:"hidden",children:S},o),l=cl(l,o,a,null),S.return=t,l.return=t,S.sibling=l,t.child=S,l=t.child,l.memoizedState=Ac(a),l.childLanes=Lc(e,y,a),t.memoizedState=Mc,Gi(null,l)):(kn(t),kc(t,S))}var w=e.memoizedState;if(w!==null&&(S=w.dehydrated,S!==null)){if(u)t.flags&256?(kn(t),t.flags&=-257,t=Uc(e,t,a)):t.memoizedState!==null?(Un(),t.child=e.child,t.flags|=128,t=null):(Un(),S=l.fallback,o=t.mode,l=xs({mode:"visible",children:l.children},o),S=cl(S,o,a,null),S.flags|=2,l.return=t,S.return=t,l.sibling=S,t.child=l,gl(t,e.child,null,a),l=t.child,l.memoizedState=Ac(a),l.childLanes=Lc(e,y,a),t.memoizedState=Mc,t=Gi(null,l));else if(kn(t),yu(S)){if(y=S.nextSibling&&S.nextSibling.dataset,y)var L=y.dgst;y=L,l=Error(s(419)),l.stack="",l.digest=y,Oi({value:l,source:null,stack:null}),t=Uc(e,t,a)}else if(jt||Vl(e,t,a,!1),y=(a&e.childLanes)!==0,jt||y){if(y=tt,y!==null&&(l=C(y,a),l!==0&&l!==w.retryLane))throw w.retryLane=l,ol(e,l),ta(y,e,l),Oc;gu(S)||Cs(),t=Uc(e,t,a)}else gu(S)?(t.flags|=192,t.child=e.child,t=null):(e=w.treeContext,rt=Na(S.nextSibling),Mt=t,Ve=!0,Tn=null,_a=!1,e!==null&&sf(t,e),t=kc(t,l.children),t.flags|=4096);return t}return o?(Un(),S=l.fallback,o=t.mode,w=e.child,L=w.sibling,l=nn(w,{mode:"hidden",children:l.children}),l.subtreeFlags=w.subtreeFlags&65011712,L!==null?S=nn(L,S):(S=cl(S,o,a,null),S.flags|=2),S.return=t,l.return=t,l.sibling=S,t.child=l,Gi(null,l),l=t.child,S=e.child.memoizedState,S===null?S=Ac(a):(o=S.cachePool,o!==null?(w=St._currentValue,o=o.parent!==w?{parent:w,pool:w}:o):o=hf(),S={baseLanes:S.baseLanes|a,cachePool:o}),l.memoizedState=S,l.childLanes=Lc(e,y,a),t.memoizedState=Mc,Gi(e.child,l)):(kn(t),a=e.child,e=a.sibling,a=nn(a,{mode:"visible",children:l.children}),a.return=t,a.sibling=null,e!==null&&(y=t.deletions,y===null?(t.deletions=[e],t.flags|=16):y.push(e)),t.child=a,t.memoizedState=null,a)}function kc(e,t){return t=xs({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function xs(e,t){return e=ia(22,e,null,t),e.lanes=0,e}function Uc(e,t,a){return gl(t,e.child,null,a),e=kc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function wh(e,t,a){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),Po(e.return,t,a)}function Hc(e,t,a,l,o,u){var y=e.memoizedState;y===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:a,tailMode:o,treeForkCount:u}:(y.isBackwards=t,y.rendering=null,y.renderingStartTime=0,y.last=l,y.tail=a,y.tailMode=o,y.treeForkCount=u)}function Ch(e,t,a){var l=t.pendingProps,o=l.revealOrder,u=l.tail;l=l.children;var y=yt.current,S=(y&2)!==0;if(S?(y=y&1|2,t.flags|=128):y&=1,te(yt,y),Lt(e,t,l,a),l=Ve?Ti:0,!S&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&wh(e,a,t);else if(e.tag===19)wh(e,a,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(o){case"forwards":for(a=t.child,o=null;a!==null;)e=a.alternate,e!==null&&rs(e)===null&&(o=a),a=a.sibling;a=o,a===null?(o=t.child,t.child=null):(o=a.sibling,a.sibling=null),Hc(t,!1,o,a,u,l);break;case"backwards":case"unstable_legacy-backwards":for(a=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&rs(e)===null){t.child=o;break}e=o.sibling,o.sibling=a,a=o,o=e}Hc(t,!0,a,null,u,l);break;case"together":Hc(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function un(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),qn|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(Vl(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(s(153));if(t.child!==null){for(e=t.child,a=nn(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=nn(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function Bc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Pr(e)))}function Vx(e,t,a){switch(t.tag){case 3:at(t,t.stateNode.containerInfo),Dn(t,St,e.memoizedState.cache),ul();break;case 27:case 5:vt(t);break;case 4:at(t,t.stateNode.containerInfo);break;case 10:Dn(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,uc(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(kn(t),t.flags|=128,null):(a&t.child.childLanes)!==0?Eh(e,t,a):(kn(t),e=un(e,t,a),e!==null?e.sibling:null);kn(t);break;case 19:var o=(e.flags&128)!==0;if(l=(a&t.childLanes)!==0,l||(Vl(e,t,a,!1),l=(a&t.childLanes)!==0),o){if(l)return Ch(e,t,a);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),te(yt,yt.current),l)break;return null;case 22:return t.lanes=0,vh(e,t,a,t.pendingProps);case 24:Dn(t,St,e.memoizedState.cache)}return un(e,t,a)}function Rh(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)jt=!0;else{if(!Bc(e,a)&&(t.flags&128)===0)return jt=!1,Vx(e,t,a);jt=(e.flags&131072)!==0}else jt=!1,Ve&&(t.flags&1048576)!==0&&rf(t,Ti,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=ml(t.elementType),t.type=e,typeof e=="function")$o(e)?(l=xl(e,l),t.tag=1,t=jh(null,t,e,l,a)):(t.tag=0,t=Dc(null,t,e,l,a));else{if(e!=null){var o=e.$$typeof;if(o===le){t.tag=11,t=gh(null,t,e,l,a);break e}else if(o===W){t.tag=14,t=yh(null,t,e,l,a);break e}}throw t=se(e)||e,Error(s(306,t,""))}}return t;case 0:return Dc(e,t,t.type,t.pendingProps,a);case 1:return l=t.type,o=xl(l,t.pendingProps),jh(e,t,l,o,a);case 3:e:{if(at(t,t.stateNode.containerInfo),e===null)throw Error(s(387));l=t.pendingProps;var u=t.memoizedState;o=u.element,ic(e,t),Hi(t,l,null,a);var y=t.memoizedState;if(l=y.cache,Dn(t,St,l),l!==u.cache&&Io(t,[St],a,!0),Ui(),l=y.element,u.isDehydrated)if(u={element:l,isDehydrated:!1,cache:y.cache},t.updateQueue.baseState=u,t.memoizedState=u,t.flags&256){t=Nh(e,t,l,a);break e}else if(l!==o){o=va(Error(s(424)),t),Oi(o),t=Nh(e,t,l,a);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,rt=Na(e.firstChild),Mt=t,Ve=!0,Tn=null,_a=!0,a=vf(t,null,l,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(ul(),l===o){t=un(e,t,a);break e}Lt(e,t,l,a)}t=t.child}return t;case 26:return ys(e,t),e===null?(a=Bm(t.type,null,t.pendingProps,null))?t.memoizedState=a:Ve||(a=t.type,e=t.pendingProps,l=As(_e.current).createElement(a),l[ce]=t,l[me]=e,kt(l,a,e),nt(l),t.stateNode=l):t.memoizedState=Bm(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return vt(t),e===null&&Ve&&(l=t.stateNode=km(t.type,t.pendingProps,_e.current),Mt=t,_a=!0,o=rt,Kn(t.type)?(xu=o,rt=Na(l.firstChild)):rt=o),Lt(e,t,t.pendingProps.children,a),ys(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ve&&((o=l=rt)&&(l=xv(l,t.type,t.pendingProps,_a),l!==null?(t.stateNode=l,Mt=t,rt=Na(l.firstChild),_a=!1,o=!0):o=!1),o||On(t)),vt(t),o=t.type,u=t.pendingProps,y=e!==null?e.memoizedProps:null,l=u.children,hu(o,u)?l=null:y!==null&&hu(o,y)&&(t.flags|=32),t.memoizedState!==null&&(o=fc(e,t,Mx,null,null,a),lr._currentValue=o),ys(e,t),Lt(e,t,l,a),t.child;case 6:return e===null&&Ve&&((e=a=rt)&&(a=vv(a,t.pendingProps,_a),a!==null?(t.stateNode=a,Mt=t,rt=null,e=!0):e=!1),e||On(t)),null;case 13:return Eh(e,t,a);case 4:return at(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=gl(t,null,l,a):Lt(e,t,l,a),t.child;case 11:return gh(e,t,t.type,t.pendingProps,a);case 7:return Lt(e,t,t.pendingProps,a),t.child;case 8:return Lt(e,t,t.pendingProps.children,a),t.child;case 12:return Lt(e,t,t.pendingProps.children,a),t.child;case 10:return l=t.pendingProps,Dn(t,t.type,l.value),Lt(e,t,l.children,a),t.child;case 9:return o=t.type._context,l=t.pendingProps.children,fl(t),o=At(o),l=l(o),t.flags|=1,Lt(e,t,l,a),t.child;case 14:return yh(e,t,t.type,t.pendingProps,a);case 15:return xh(e,t,t.type,t.pendingProps,a);case 19:return Ch(e,t,a);case 31:return Yx(e,t,a);case 22:return vh(e,t,a,t.pendingProps);case 24:return fl(t),l=At(St),e===null?(o=ac(),o===null&&(o=tt,u=ec(),o.pooledCache=u,u.refCount++,u!==null&&(o.pooledCacheLanes|=a),o=u),t.memoizedState={parent:l,cache:o},lc(t),Dn(t,St,o)):((e.lanes&a)!==0&&(ic(e,t),Hi(t,null,null,a),Ui()),o=e.memoizedState,u=t.memoizedState,o.parent!==l?(o={parent:l,cache:l},t.memoizedState=o,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=o),Dn(t,St,l)):(l=u.cache,Dn(t,St,l),l!==o.cache&&Io(t,[St],a,!0))),Lt(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(s(156,t.tag))}function dn(e){e.flags|=4}function qc(e,t,a,l,o){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(o&335544128)===o)if(e.stateNode.complete)e.flags|=8192;else if(tm())e.flags|=8192;else throw pl=as,nc}else e.flags&=-16777217}function zh(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!$m(t))if(tm())e.flags|=8192;else throw pl=as,nc}function vs(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?bi():536870912,e.lanes|=t,ei|=t)}function $i(e,t){if(!Ve)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var l=null;a!==null;)a.alternate!==null&&(l=a),a=a.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function st(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,l=0;if(t)for(var o=e.child;o!==null;)a|=o.lanes|o.childLanes,l|=o.subtreeFlags&65011712,l|=o.flags&65011712,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)a|=o.lanes|o.childLanes,l|=o.subtreeFlags,l|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=l,e.childLanes=a,t}function Gx(e,t,a){var l=t.pendingProps;switch(Zo(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return st(t),null;case 1:return st(t),null;case 3:return a=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),sn(St),ue(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Yl(t)?dn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Jo())),st(t),null;case 26:var o=t.type,u=t.memoizedState;return e===null?(dn(t),u!==null?(st(t),zh(t,u)):(st(t),qc(t,o,null,l,a))):u?u!==e.memoizedState?(dn(t),st(t),zh(t,u)):(st(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&dn(t),st(t),qc(t,o,e,l,a)),null;case 27:if(Ut(t),a=_e.current,o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&dn(t);else{if(!l){if(t.stateNode===null)throw Error(s(166));return st(t),null}e=re.current,Yl(t)?of(t):(e=km(o,l,a),t.stateNode=e,dn(t))}return st(t),null;case 5:if(Ut(t),o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&dn(t);else{if(!l){if(t.stateNode===null)throw Error(s(166));return st(t),null}if(u=re.current,Yl(t))of(t);else{var y=As(_e.current);switch(u){case 1:u=y.createElementNS("http://www.w3.org/2000/svg",o);break;case 2:u=y.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;default:switch(o){case"svg":u=y.createElementNS("http://www.w3.org/2000/svg",o);break;case"math":u=y.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;case"script":u=y.createElement("div"),u.innerHTML="<script><\/script>",u=u.removeChild(u.firstChild);break;case"select":u=typeof l.is=="string"?y.createElement("select",{is:l.is}):y.createElement("select"),l.multiple?u.multiple=!0:l.size&&(u.size=l.size);break;default:u=typeof l.is=="string"?y.createElement(o,{is:l.is}):y.createElement(o)}}u[ce]=t,u[me]=l;e:for(y=t.child;y!==null;){if(y.tag===5||y.tag===6)u.appendChild(y.stateNode);else if(y.tag!==4&&y.tag!==27&&y.child!==null){y.child.return=y,y=y.child;continue}if(y===t)break e;for(;y.sibling===null;){if(y.return===null||y.return===t)break e;y=y.return}y.sibling.return=y.return,y=y.sibling}t.stateNode=u;e:switch(kt(u,o,l),o){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&dn(t)}}return st(t),qc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&dn(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(s(166));if(e=_e.current,Yl(t)){if(e=t.stateNode,a=t.memoizedProps,l=null,o=Mt,o!==null)switch(o.tag){case 27:case 5:l=o.memoizedProps}e[ce]=t,e=!!(e.nodeValue===a||l!==null&&l.suppressHydrationWarning===!0||Em(e.nodeValue,a)),e||On(t,!0)}else e=As(e).createTextNode(l),e[ce]=t,t.stateNode=e}return st(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(l=Yl(t),a!==null){if(e===null){if(!l)throw Error(s(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(557));e[ce]=t}else ul(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;st(t),e=!1}else a=Jo(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(sa(t),t):(sa(t),null);if((t.flags&128)!==0)throw Error(s(558))}return st(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(o=Yl(t),l!==null&&l.dehydrated!==null){if(e===null){if(!o)throw Error(s(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(s(317));o[ce]=t}else ul(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;st(t),o=!1}else o=Jo(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=o),o=!0;if(!o)return t.flags&256?(sa(t),t):(sa(t),null)}return sa(t),(t.flags&128)!==0?(t.lanes=a,t):(a=l!==null,e=e!==null&&e.memoizedState!==null,a&&(l=t.child,o=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(o=l.alternate.memoizedState.cachePool.pool),u=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(u=l.memoizedState.cachePool.pool),u!==o&&(l.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),vs(t,t.updateQueue),st(t),null);case 4:return ue(),e===null&&ou(t.stateNode.containerInfo),st(t),null;case 10:return sn(t.type),st(t),null;case 19:if(B(yt),l=t.memoizedState,l===null)return st(t),null;if(o=(t.flags&128)!==0,u=l.rendering,u===null)if(o)$i(l,!1);else{if(ht!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(u=rs(e),u!==null){for(t.flags|=128,$i(l,!1),e=u.updateQueue,t.updateQueue=e,vs(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)af(a,e),a=a.sibling;return te(yt,yt.current&1|2),Ve&&ln(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&Ot()>Ns&&(t.flags|=128,o=!0,$i(l,!1),t.lanes=4194304)}else{if(!o)if(e=rs(u),e!==null){if(t.flags|=128,o=!0,e=e.updateQueue,t.updateQueue=e,vs(t,e),$i(l,!0),l.tail===null&&l.tailMode==="hidden"&&!u.alternate&&!Ve)return st(t),null}else 2*Ot()-l.renderingStartTime>Ns&&a!==536870912&&(t.flags|=128,o=!0,$i(l,!1),t.lanes=4194304);l.isBackwards?(u.sibling=t.child,t.child=u):(e=l.last,e!==null?e.sibling=u:t.child=u,l.last=u)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=Ot(),e.sibling=null,a=yt.current,te(yt,o?a&1|2:a&1),Ve&&ln(t,l.treeForkCount),e):(st(t),null);case 22:case 23:return sa(t),cc(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(a&536870912)!==0&&(t.flags&128)===0&&(st(t),t.subtreeFlags&6&&(t.flags|=8192)):st(t),a=t.updateQueue,a!==null&&vs(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==a&&(t.flags|=2048),e!==null&&B(hl),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),sn(St),st(t),null;case 25:return null;case 30:return null}throw Error(s(156,t.tag))}function $x(e,t){switch(Zo(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return sn(St),ue(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Ut(t),null;case 31:if(t.memoizedState!==null){if(sa(t),t.alternate===null)throw Error(s(340));ul()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(sa(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(s(340));ul()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return B(yt),null;case 4:return ue(),null;case 10:return sn(t.type),null;case 22:case 23:return sa(t),cc(),e!==null&&B(hl),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return sn(St),null;case 25:return null;default:return null}}function Th(e,t){switch(Zo(t),t.tag){case 3:sn(St),ue();break;case 26:case 27:case 5:Ut(t);break;case 4:ue();break;case 31:t.memoizedState!==null&&sa(t);break;case 13:sa(t);break;case 19:B(yt);break;case 10:sn(t.type);break;case 22:case 23:sa(t),cc(),e!==null&&B(hl);break;case 24:sn(St)}}function Ki(e,t){try{var a=t.updateQueue,l=a!==null?a.lastEffect:null;if(l!==null){var o=l.next;a=o;do{if((a.tag&e)===e){l=void 0;var u=a.create,y=a.inst;l=u(),y.destroy=l}a=a.next}while(a!==o)}}catch(S){Fe(t,t.return,S)}}function Hn(e,t,a){try{var l=t.updateQueue,o=l!==null?l.lastEffect:null;if(o!==null){var u=o.next;l=u;do{if((l.tag&e)===e){var y=l.inst,S=y.destroy;if(S!==void 0){y.destroy=void 0,o=t;var w=a,L=S;try{L()}catch(V){Fe(o,w,V)}}}l=l.next}while(l!==u)}}catch(V){Fe(t,t.return,V)}}function Oh(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{Sf(t,a)}catch(l){Fe(e,e.return,l)}}}function Dh(e,t,a){a.props=xl(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(l){Fe(e,t,l)}}function Xi(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof a=="function"?e.refCleanup=a(l):a.current=l}}catch(o){Fe(e,t,o)}}function Za(e,t){var a=e.ref,l=e.refCleanup;if(a!==null)if(typeof l=="function")try{l()}catch(o){Fe(e,t,o)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(o){Fe(e,t,o)}else a.current=null}function Mh(e){var t=e.type,a=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&l.focus();break e;case"img":a.src?l.src=a.src:a.srcSet&&(l.srcset=a.srcSet)}}catch(o){Fe(e,e.return,o)}}function Yc(e,t,a){try{var l=e.stateNode;fv(l,e.type,a,t),l[me]=t}catch(o){Fe(e,e.return,o)}}function Ah(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Kn(e.type)||e.tag===4}function Vc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ah(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&&Kn(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 Gc(e,t,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=tn));else if(l!==4&&(l===27&&Kn(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(Gc(e,t,a),e=e.sibling;e!==null;)Gc(e,t,a),e=e.sibling}function bs(e,t,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(l!==4&&(l===27&&Kn(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(bs(e,t,a),e=e.sibling;e!==null;)bs(e,t,a),e=e.sibling}function Lh(e){var t=e.stateNode,a=e.memoizedProps;try{for(var l=e.type,o=t.attributes;o.length;)t.removeAttributeNode(o[0]);kt(t,l,a),t[ce]=e,t[me]=a}catch(u){Fe(e,e.return,u)}}var fn=!1,Nt=!1,$c=!1,kh=typeof WeakSet=="function"?WeakSet:Set,zt=null;function Kx(e,t){if(e=e.containerInfo,du=Ys,e=Qd(e),Uo(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var l=a.getSelection&&a.getSelection();if(l&&l.rangeCount!==0){a=l.anchorNode;var o=l.anchorOffset,u=l.focusNode;l=l.focusOffset;try{a.nodeType,u.nodeType}catch{a=null;break e}var y=0,S=-1,w=-1,L=0,V=0,Q=e,U=null;t:for(;;){for(var q;Q!==a||o!==0&&Q.nodeType!==3||(S=y+o),Q!==u||l!==0&&Q.nodeType!==3||(w=y+l),Q.nodeType===3&&(y+=Q.nodeValue.length),(q=Q.firstChild)!==null;)U=Q,Q=q;for(;;){if(Q===e)break t;if(U===a&&++L===o&&(S=y),U===u&&++V===l&&(w=y),(q=Q.nextSibling)!==null)break;Q=U,U=Q.parentNode}Q=q}a=S===-1||w===-1?null:{start:S,end:w}}else a=null}a=a||{start:0,end:0}}else a=null;for(fu={focusedElem:e,selectionRange:a},Ys=!1,zt=t;zt!==null;)if(t=zt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,zt=e;else for(;zt!==null;){switch(t=zt,u=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a<e.length;a++)o=e[a],o.ref.impl=o.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&u!==null){e=void 0,a=t,o=u.memoizedProps,u=u.memoizedState,l=a.stateNode;try{var xe=xl(a.type,o);e=l.getSnapshotBeforeUpdate(xe,u),l.__reactInternalSnapshotBeforeUpdate=e}catch(Ce){Fe(a,a.return,Ce)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)pu(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":pu(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(s(163))}if(e=t.sibling,e!==null){e.return=t.return,zt=e;break}zt=t.return}}function Uh(e,t,a){var l=a.flags;switch(a.tag){case 0:case 11:case 15:mn(e,a),l&4&&Ki(5,a);break;case 1:if(mn(e,a),l&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(y){Fe(a,a.return,y)}else{var o=xl(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(o,t,e.__reactInternalSnapshotBeforeUpdate)}catch(y){Fe(a,a.return,y)}}l&64&&Oh(a),l&512&&Xi(a,a.return);break;case 3:if(mn(e,a),l&64&&(e=a.updateQueue,e!==null)){if(t=null,a.child!==null)switch(a.child.tag){case 27:case 5:t=a.child.stateNode;break;case 1:t=a.child.stateNode}try{Sf(e,t)}catch(y){Fe(a,a.return,y)}}break;case 27:t===null&&l&4&&Lh(a);case 26:case 5:mn(e,a),t===null&&l&4&&Mh(a),l&512&&Xi(a,a.return);break;case 12:mn(e,a);break;case 31:mn(e,a),l&4&&qh(e,a);break;case 13:mn(e,a),l&4&&Yh(e,a),l&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=ev.bind(null,a),bv(e,a))));break;case 22:if(l=a.memoizedState!==null||fn,!l){t=t!==null&&t.memoizedState!==null||Nt,o=fn;var u=Nt;fn=l,(Nt=t)&&!u?pn(e,a,(a.subtreeFlags&8772)!==0):mn(e,a),fn=o,Nt=u}break;case 30:break;default:mn(e,a)}}function Hh(e){var t=e.alternate;t!==null&&(e.alternate=null,Hh(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&et(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 ct=null,Wt=!1;function hn(e,t,a){for(a=a.child;a!==null;)Bh(e,t,a),a=a.sibling}function Bh(e,t,a){if(Dt&&typeof Dt.onCommitFiberUnmount=="function")try{Dt.onCommitFiberUnmount(Da,a)}catch{}switch(a.tag){case 26:Nt||Za(a,t),hn(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:Nt||Za(a,t);var l=ct,o=Wt;Kn(a.type)&&(ct=a.stateNode,Wt=!1),hn(e,t,a),tr(a.stateNode),ct=l,Wt=o;break;case 5:Nt||Za(a,t);case 6:if(l=ct,o=Wt,ct=null,hn(e,t,a),ct=l,Wt=o,ct!==null)if(Wt)try{(ct.nodeType===9?ct.body:ct.nodeName==="HTML"?ct.ownerDocument.body:ct).removeChild(a.stateNode)}catch(u){Fe(a,t,u)}else try{ct.removeChild(a.stateNode)}catch(u){Fe(a,t,u)}break;case 18:ct!==null&&(Wt?(e=ct,Om(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),oi(e)):Om(ct,a.stateNode));break;case 4:l=ct,o=Wt,ct=a.stateNode.containerInfo,Wt=!0,hn(e,t,a),ct=l,Wt=o;break;case 0:case 11:case 14:case 15:Hn(2,a,t),Nt||Hn(4,a,t),hn(e,t,a);break;case 1:Nt||(Za(a,t),l=a.stateNode,typeof l.componentWillUnmount=="function"&&Dh(a,t,l)),hn(e,t,a);break;case 21:hn(e,t,a);break;case 22:Nt=(l=Nt)||a.memoizedState!==null,hn(e,t,a),Nt=l;break;default:hn(e,t,a)}}function qh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{oi(e)}catch(a){Fe(t,t.return,a)}}}function Yh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{oi(e)}catch(a){Fe(t,t.return,a)}}function Xx(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new kh),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new kh),t;default:throw Error(s(435,e.tag))}}function Ss(e,t){var a=Xx(e);t.forEach(function(l){if(!a.has(l)){a.add(l);var o=tv.bind(null,e,l);l.then(o,o)}})}function Pt(e,t){var a=t.deletions;if(a!==null)for(var l=0;l<a.length;l++){var o=a[l],u=e,y=t,S=y;e:for(;S!==null;){switch(S.tag){case 27:if(Kn(S.type)){ct=S.stateNode,Wt=!1;break e}break;case 5:ct=S.stateNode,Wt=!1;break e;case 3:case 4:ct=S.stateNode.containerInfo,Wt=!0;break e}S=S.return}if(ct===null)throw Error(s(160));Bh(u,y,o),ct=null,Wt=!1,u=o.alternate,u!==null&&(u.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Vh(t,e),t=t.sibling}var ka=null;function Vh(e,t){var a=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Pt(t,e),It(e),l&4&&(Hn(3,e,e.return),Ki(3,e),Hn(5,e,e.return));break;case 1:Pt(t,e),It(e),l&512&&(Nt||a===null||Za(a,a.return)),l&64&&fn&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?l:a.concat(l))));break;case 26:var o=ka;if(Pt(t,e),It(e),l&512&&(Nt||a===null||Za(a,a.return)),l&4){var u=a!==null?a.memoizedState:null;if(l=e.memoizedState,a===null)if(l===null)if(e.stateNode===null){e:{l=e.type,a=e.memoizedProps,o=o.ownerDocument||o;t:switch(l){case"title":u=o.getElementsByTagName("title")[0],(!u||u[ke]||u[ce]||u.namespaceURI==="http://www.w3.org/2000/svg"||u.hasAttribute("itemprop"))&&(u=o.createElement(l),o.head.insertBefore(u,o.querySelector("head > title"))),kt(u,l,a),u[ce]=e,nt(u),l=u;break e;case"link":var y=Vm("link","href",o).get(l+(a.href||""));if(y){for(var S=0;S<y.length;S++)if(u=y[S],u.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&u.getAttribute("rel")===(a.rel==null?null:a.rel)&&u.getAttribute("title")===(a.title==null?null:a.title)&&u.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){y.splice(S,1);break t}}u=o.createElement(l),kt(u,l,a),o.head.appendChild(u);break;case"meta":if(y=Vm("meta","content",o).get(l+(a.content||""))){for(S=0;S<y.length;S++)if(u=y[S],u.getAttribute("content")===(a.content==null?null:""+a.content)&&u.getAttribute("name")===(a.name==null?null:a.name)&&u.getAttribute("property")===(a.property==null?null:a.property)&&u.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&u.getAttribute("charset")===(a.charSet==null?null:a.charSet)){y.splice(S,1);break t}}u=o.createElement(l),kt(u,l,a),o.head.appendChild(u);break;default:throw Error(s(468,l))}u[ce]=e,nt(u),l=u}e.stateNode=l}else Gm(o,e.type,e.stateNode);else e.stateNode=Ym(o,l,e.memoizedProps);else u!==l?(u===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):u.count--,l===null?Gm(o,e.type,e.stateNode):Ym(o,l,e.memoizedProps)):l===null&&e.stateNode!==null&&Yc(e,e.memoizedProps,a.memoizedProps)}break;case 27:Pt(t,e),It(e),l&512&&(Nt||a===null||Za(a,a.return)),a!==null&&l&4&&Yc(e,e.memoizedProps,a.memoizedProps);break;case 5:if(Pt(t,e),It(e),l&512&&(Nt||a===null||Za(a,a.return)),e.flags&32){o=e.stateNode;try{Ol(o,"")}catch(xe){Fe(e,e.return,xe)}}l&4&&e.stateNode!=null&&(o=e.memoizedProps,Yc(e,o,a!==null?a.memoizedProps:o)),l&1024&&($c=!0);break;case 6:if(Pt(t,e),It(e),l&4){if(e.stateNode===null)throw Error(s(162));l=e.memoizedProps,a=e.stateNode;try{a.nodeValue=l}catch(xe){Fe(e,e.return,xe)}}break;case 3:if(Us=null,o=ka,ka=Ls(t.containerInfo),Pt(t,e),ka=o,It(e),l&4&&a!==null&&a.memoizedState.isDehydrated)try{oi(t.containerInfo)}catch(xe){Fe(e,e.return,xe)}$c&&($c=!1,Gh(e));break;case 4:l=ka,ka=Ls(e.stateNode.containerInfo),Pt(t,e),It(e),ka=l;break;case 12:Pt(t,e),It(e);break;case 31:Pt(t,e),It(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Ss(e,l)));break;case 13:Pt(t,e),It(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(js=Ot()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Ss(e,l)));break;case 22:o=e.memoizedState!==null;var w=a!==null&&a.memoizedState!==null,L=fn,V=Nt;if(fn=L||o,Nt=V||w,Pt(t,e),Nt=V,fn=L,It(e),l&8192)e:for(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,o&&(a===null||w||fn||Nt||vl(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){w=a=t;try{if(u=w.stateNode,o)y=u.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none";else{S=w.stateNode;var Q=w.memoizedProps.style,U=Q!=null&&Q.hasOwnProperty("display")?Q.display:null;S.style.display=U==null||typeof U=="boolean"?"":(""+U).trim()}}catch(xe){Fe(w,w.return,xe)}}}else if(t.tag===6){if(a===null){w=t;try{w.stateNode.nodeValue=o?"":w.memoizedProps}catch(xe){Fe(w,w.return,xe)}}}else if(t.tag===18){if(a===null){w=t;try{var q=w.stateNode;o?Dm(q,!0):Dm(w.stateNode,!1)}catch(xe){Fe(w,w.return,xe)}}}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;a===t&&(a=null),t=t.return}a===t&&(a=null),t.sibling.return=t.return,t=t.sibling}l&4&&(l=e.updateQueue,l!==null&&(a=l.retryQueue,a!==null&&(l.retryQueue=null,Ss(e,a))));break;case 19:Pt(t,e),It(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Ss(e,l)));break;case 30:break;case 21:break;default:Pt(t,e),It(e)}}function It(e){var t=e.flags;if(t&2){try{for(var a,l=e.return;l!==null;){if(Ah(l)){a=l;break}l=l.return}if(a==null)throw Error(s(160));switch(a.tag){case 27:var o=a.stateNode,u=Vc(e);bs(e,u,o);break;case 5:var y=a.stateNode;a.flags&32&&(Ol(y,""),a.flags&=-33);var S=Vc(e);bs(e,S,y);break;case 3:case 4:var w=a.stateNode.containerInfo,L=Vc(e);Gc(e,L,w);break;default:throw Error(s(161))}}catch(V){Fe(e,e.return,V)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Gh(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Gh(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function mn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Uh(e,t.alternate,t),t=t.sibling}function vl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Hn(4,t,t.return),vl(t);break;case 1:Za(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&Dh(t,t.return,a),vl(t);break;case 27:tr(t.stateNode);case 26:case 5:Za(t,t.return),vl(t);break;case 22:t.memoizedState===null&&vl(t);break;case 30:vl(t);break;default:vl(t)}e=e.sibling}}function pn(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,o=e,u=t,y=u.flags;switch(u.tag){case 0:case 11:case 15:pn(o,u,a),Ki(4,u);break;case 1:if(pn(o,u,a),l=u,o=l.stateNode,typeof o.componentDidMount=="function")try{o.componentDidMount()}catch(L){Fe(l,l.return,L)}if(l=u,o=l.updateQueue,o!==null){var S=l.stateNode;try{var w=o.shared.hiddenCallbacks;if(w!==null)for(o.shared.hiddenCallbacks=null,o=0;o<w.length;o++)bf(w[o],S)}catch(L){Fe(l,l.return,L)}}a&&y&64&&Oh(u),Xi(u,u.return);break;case 27:Lh(u);case 26:case 5:pn(o,u,a),a&&l===null&&y&4&&Mh(u),Xi(u,u.return);break;case 12:pn(o,u,a);break;case 31:pn(o,u,a),a&&y&4&&qh(o,u);break;case 13:pn(o,u,a),a&&y&4&&Yh(o,u);break;case 22:u.memoizedState===null&&pn(o,u,a),Xi(u,u.return);break;case 30:break;default:pn(o,u,a)}t=t.sibling}}function Kc(e,t){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&Di(a))}function Xc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Di(e))}function Ua(e,t,a,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)$h(e,t,a,l),t=t.sibling}function $h(e,t,a,l){var o=t.flags;switch(t.tag){case 0:case 11:case 15:Ua(e,t,a,l),o&2048&&Ki(9,t);break;case 1:Ua(e,t,a,l);break;case 3:Ua(e,t,a,l),o&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Di(e)));break;case 12:if(o&2048){Ua(e,t,a,l),e=t.stateNode;try{var u=t.memoizedProps,y=u.id,S=u.onPostCommit;typeof S=="function"&&S(y,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(w){Fe(t,t.return,w)}}else Ua(e,t,a,l);break;case 31:Ua(e,t,a,l);break;case 13:Ua(e,t,a,l);break;case 23:break;case 22:u=t.stateNode,y=t.alternate,t.memoizedState!==null?u._visibility&2?Ua(e,t,a,l):Qi(e,t):u._visibility&2?Ua(e,t,a,l):(u._visibility|=2,Wl(e,t,a,l,(t.subtreeFlags&10256)!==0||!1)),o&2048&&Kc(y,t);break;case 24:Ua(e,t,a,l),o&2048&&Xc(t.alternate,t);break;default:Ua(e,t,a,l)}}function Wl(e,t,a,l,o){for(o=o&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var u=e,y=t,S=a,w=l,L=y.flags;switch(y.tag){case 0:case 11:case 15:Wl(u,y,S,w,o),Ki(8,y);break;case 23:break;case 22:var V=y.stateNode;y.memoizedState!==null?V._visibility&2?Wl(u,y,S,w,o):Qi(u,y):(V._visibility|=2,Wl(u,y,S,w,o)),o&&L&2048&&Kc(y.alternate,y);break;case 24:Wl(u,y,S,w,o),o&&L&2048&&Xc(y.alternate,y);break;default:Wl(u,y,S,w,o)}t=t.sibling}}function Qi(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,l=t,o=l.flags;switch(l.tag){case 22:Qi(a,l),o&2048&&Kc(l.alternate,l);break;case 24:Qi(a,l),o&2048&&Xc(l.alternate,l);break;default:Qi(a,l)}t=t.sibling}}var Zi=8192;function Pl(e,t,a){if(e.subtreeFlags&Zi)for(e=e.child;e!==null;)Kh(e,t,a),e=e.sibling}function Kh(e,t,a){switch(e.tag){case 26:Pl(e,t,a),e.flags&Zi&&e.memoizedState!==null&&Dv(a,ka,e.memoizedState,e.memoizedProps);break;case 5:Pl(e,t,a);break;case 3:case 4:var l=ka;ka=Ls(e.stateNode.containerInfo),Pl(e,t,a),ka=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=Zi,Zi=16777216,Pl(e,t,a),Zi=l):Pl(e,t,a));break;default:Pl(e,t,a)}}function Xh(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 Fi(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var l=t[a];zt=l,Zh(l,e)}Xh(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Qh(e),e=e.sibling}function Qh(e){switch(e.tag){case 0:case 11:case 15:Fi(e),e.flags&2048&&Hn(9,e,e.return);break;case 3:Fi(e);break;case 12:Fi(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,_s(e)):Fi(e);break;default:Fi(e)}}function _s(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var l=t[a];zt=l,Zh(l,e)}Xh(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Hn(8,t,t.return),_s(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,_s(t));break;default:_s(t)}e=e.sibling}}function Zh(e,t){for(;zt!==null;){var a=zt;switch(a.tag){case 0:case 11:case 15:Hn(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var l=a.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:Di(a.memoizedState.cache)}if(l=a.child,l!==null)l.return=a,zt=l;else e:for(a=e;zt!==null;){l=zt;var o=l.sibling,u=l.return;if(Hh(l),l===a){zt=null;break e}if(o!==null){o.return=u,zt=o;break e}zt=u}}}var Qx={getCacheForType:function(e){var t=At(St),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return At(St).controller.signal}},Zx=typeof WeakMap=="function"?WeakMap:Map,Qe=0,tt=null,He=null,qe=0,Ze=0,oa=null,Bn=!1,Il=!1,Qc=!1,gn=0,ht=0,qn=0,bl=0,Zc=0,ca=0,ei=0,Ji=null,ea=null,Fc=!1,js=0,Fh=0,Ns=1/0,Es=null,Yn=null,Ct=0,Vn=null,ti=null,yn=0,Jc=0,Wc=null,Jh=null,Wi=0,Pc=null;function ua(){return(Qe&2)!==0&&qe!==0?qe&-qe:M.T!==null?lu():ae()}function Wh(){if(ca===0)if((qe&536870912)===0||Ve){var e=ga;ga<<=1,(ga&3932160)===0&&(ga=262144),ca=e}else ca=536870912;return e=ra.current,e!==null&&(e.flags|=32),ca}function ta(e,t,a){(e===tt&&(Ze===2||Ze===9)||e.cancelPendingCommit!==null)&&(ai(e,0),Gn(e,qe,ca,!1)),Ga(e,a),((Qe&2)===0||e!==tt)&&(e===tt&&((Qe&2)===0&&(bl|=a),ht===4&&Gn(e,qe,ca,!1)),Fa(e))}function Ph(e,t,a){if((Qe&6)!==0)throw Error(s(327));var l=!a&&(t&127)===0&&(t&e.expiredLanes)===0||En(e,t),o=l?Wx(e,t):eu(e,t,!0),u=l;do{if(o===0){Il&&!l&&Gn(e,t,0,!1);break}else{if(a=e.current.alternate,u&&!Fx(a)){o=eu(e,t,!1),u=!1;continue}if(o===2){if(u=t,e.errorRecoveryDisabledLanes&u)var y=0;else y=e.pendingLanes&-536870913,y=y!==0?y:y&536870912?536870912:0;if(y!==0){t=y;e:{var S=e;o=Ji;var w=S.current.memoizedState.isDehydrated;if(w&&(ai(S,y).flags|=256),y=eu(S,y,!1),y!==2){if(Qc&&!w){S.errorRecoveryDisabledLanes|=u,bl|=u,o=4;break e}u=ea,ea=o,u!==null&&(ea===null?ea=u:ea.push.apply(ea,u))}o=y}if(u=!1,o!==2)continue}}if(o===1){ai(e,0),Gn(e,t,0,!0);break}e:{switch(l=e,u=o,u){case 0:case 1:throw Error(s(345));case 4:if((t&4194048)!==t)break;case 6:Gn(l,t,ca,!Bn);break e;case 2:ea=null;break;case 3:case 5:break;default:throw Error(s(329))}if((t&62914560)===t&&(o=js+300-Ot(),10<o)){if(Gn(l,t,ca,!Bn),Nn(l,0,!0)!==0)break e;yn=t,l.timeoutHandle=zm(Ih.bind(null,l,a,ea,Es,Fc,t,ca,bl,ei,Bn,u,"Throttled",-0,0),o);break e}Ih(l,a,ea,Es,Fc,t,ca,bl,ei,Bn,u,null,-0,0)}}break}while(!0);Fa(e)}function Ih(e,t,a,l,o,u,y,S,w,L,V,Q,U,q){if(e.timeoutHandle=-1,Q=t.subtreeFlags,Q&8192||(Q&16785408)===16785408){Q={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:tn},Kh(t,u,Q);var xe=(u&62914560)===u?js-Ot():(u&4194048)===u?Fh-Ot():0;if(xe=Mv(Q,xe),xe!==null){yn=u,e.cancelPendingCommit=xe(sm.bind(null,e,t,u,a,l,o,y,S,w,V,Q,null,U,q)),Gn(e,u,y,!L);return}}sm(e,t,u,a,l,o,y,S,w)}function Fx(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var l=0;l<a.length;l++){var o=a[l],u=o.getSnapshot;o=o.value;try{if(!la(u(),o))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;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 Gn(e,t,a,l){t&=~Zc,t&=~bl,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var o=t;0<o;){var u=31-be(o),y=1<<u;l[u]=-1,o&=~y}a!==0&&Lr(e,a,t)}function ws(){return(Qe&6)===0?(Pi(0),!1):!0}function Ic(){if(He!==null){if(Ze===0)var e=He.return;else e=He,rn=dl=null,pc(e),Xl=null,Ai=0,e=He;for(;e!==null;)Th(e.alternate,e),e=e.return;He=null}}function ai(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,pv(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),yn=0,Ic(),tt=e,He=a=nn(e.current,null),qe=t,Ze=0,oa=null,Bn=!1,Il=En(e,t),Qc=!1,ei=ca=Zc=bl=qn=ht=0,ea=Ji=null,Fc=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var o=31-be(l),u=1<<o;t|=e[o],l&=~u}return gn=t,Qr(),a}function em(e,t){Me=null,M.H=Vi,t===Kl||t===ts?(t=gf(),Ze=3):t===nc?(t=gf(),Ze=4):Ze=t===Oc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,oa=t,He===null&&(ht=1,ps(e,va(t,e.current)))}function tm(){var e=ra.current;return e===null?!0:(qe&4194048)===qe?ja===null:(qe&62914560)===qe||(qe&536870912)!==0?e===ja:!1}function am(){var e=M.H;return M.H=Vi,e===null?Vi:e}function nm(){var e=M.A;return M.A=Qx,e}function Cs(){ht=4,Bn||(qe&4194048)!==qe&&ra.current!==null||(Il=!0),(qn&134217727)===0&&(bl&134217727)===0||tt===null||Gn(tt,qe,ca,!1)}function eu(e,t,a){var l=Qe;Qe|=2;var o=am(),u=nm();(tt!==e||qe!==t)&&(Es=null,ai(e,t)),t=!1;var y=ht;e:do try{if(Ze!==0&&He!==null){var S=He,w=oa;switch(Ze){case 8:Ic(),y=6;break e;case 3:case 2:case 9:case 6:ra.current===null&&(t=!0);var L=Ze;if(Ze=0,oa=null,ni(e,S,w,L),a&&Il){y=0;break e}break;default:L=Ze,Ze=0,oa=null,ni(e,S,w,L)}}Jx(),y=ht;break}catch(V){em(e,V)}while(!0);return t&&e.shellSuspendCounter++,rn=dl=null,Qe=l,M.H=o,M.A=u,He===null&&(tt=null,qe=0,Qr()),y}function Jx(){for(;He!==null;)lm(He)}function Wx(e,t){var a=Qe;Qe|=2;var l=am(),o=nm();tt!==e||qe!==t?(Es=null,Ns=Ot()+500,ai(e,t)):Il=En(e,t);e:do try{if(Ze!==0&&He!==null){t=He;var u=oa;t:switch(Ze){case 1:Ze=0,oa=null,ni(e,t,u,1);break;case 2:case 9:if(mf(u)){Ze=0,oa=null,im(t);break}t=function(){Ze!==2&&Ze!==9||tt!==e||(Ze=7),Fa(e)},u.then(t,t);break e;case 3:Ze=7;break e;case 4:Ze=5;break e;case 7:mf(u)?(Ze=0,oa=null,im(t)):(Ze=0,oa=null,ni(e,t,u,7));break;case 5:var y=null;switch(He.tag){case 26:y=He.memoizedState;case 5:case 27:var S=He;if(y?$m(y):S.stateNode.complete){Ze=0,oa=null;var w=S.sibling;if(w!==null)He=w;else{var L=S.return;L!==null?(He=L,Rs(L)):He=null}break t}}Ze=0,oa=null,ni(e,t,u,5);break;case 6:Ze=0,oa=null,ni(e,t,u,6);break;case 8:Ic(),ht=6;break e;default:throw Error(s(462))}}Px();break}catch(V){em(e,V)}while(!0);return rn=dl=null,M.H=l,M.A=o,Qe=a,He!==null?0:(tt=null,qe=0,Qr(),ht)}function Px(){for(;He!==null&&!_n();)lm(He)}function lm(e){var t=Rh(e.alternate,e,gn);e.memoizedProps=e.pendingProps,t===null?Rs(e):He=t}function im(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=_h(a,t,t.pendingProps,t.type,void 0,qe);break;case 11:t=_h(a,t,t.pendingProps,t.type.render,t.ref,qe);break;case 5:pc(t);default:Th(a,t),t=He=af(t,gn),t=Rh(a,t,gn)}e.memoizedProps=e.pendingProps,t===null?Rs(e):He=t}function ni(e,t,a,l){rn=dl=null,pc(t),Xl=null,Ai=0;var o=t.return;try{if(qx(e,o,t,a,qe)){ht=1,ps(e,va(a,e.current)),He=null;return}}catch(u){if(o!==null)throw He=o,u;ht=1,ps(e,va(a,e.current)),He=null;return}t.flags&32768?(Ve||l===1?e=!0:Il||(qe&536870912)!==0?e=!1:(Bn=e=!0,(l===2||l===9||l===3||l===6)&&(l=ra.current,l!==null&&l.tag===13&&(l.flags|=16384))),rm(t,e)):Rs(t)}function Rs(e){var t=e;do{if((t.flags&32768)!==0){rm(t,Bn);return}e=t.return;var a=Gx(t.alternate,t,gn);if(a!==null){He=a;return}if(t=t.sibling,t!==null){He=t;return}He=t=e}while(t!==null);ht===0&&(ht=5)}function rm(e,t){do{var a=$x(e.alternate,e);if(a!==null){a.flags&=32767,He=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){He=e;return}He=e=a}while(e!==null);ht=6,He=null}function sm(e,t,a,l,o,u,y,S,w){e.cancelPendingCommit=null;do zs();while(Ct!==0);if((Qe&6)!==0)throw Error(s(327));if(t!==null){if(t===e.current)throw Error(s(177));if(u=t.lanes|t.childLanes,u|=Vo,Ar(e,a,u,y,S,w),e===tt&&(He=tt=null,qe=0),ti=t,Vn=e,yn=a,Jc=u,Wc=o,Jh=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,av(Ya,function(){return fm(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=M.T,M.T=null,o=P.p,P.p=2,y=Qe,Qe|=4;try{Kx(e,t,a)}finally{Qe=y,P.p=o,M.T=l}}Ct=1,om(),cm(),um()}}function om(){if(Ct===1){Ct=0;var e=Vn,t=ti,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=M.T,M.T=null;var l=P.p;P.p=2;var o=Qe;Qe|=4;try{Vh(t,e);var u=fu,y=Qd(e.containerInfo),S=u.focusedElem,w=u.selectionRange;if(y!==S&&S&&S.ownerDocument&&Xd(S.ownerDocument.documentElement,S)){if(w!==null&&Uo(S)){var L=w.start,V=w.end;if(V===void 0&&(V=L),"selectionStart"in S)S.selectionStart=L,S.selectionEnd=Math.min(V,S.value.length);else{var Q=S.ownerDocument||document,U=Q&&Q.defaultView||window;if(U.getSelection){var q=U.getSelection(),xe=S.textContent.length,Ce=Math.min(w.start,xe),Pe=w.end===void 0?Ce:Math.min(w.end,xe);!q.extend&&Ce>Pe&&(y=Pe,Pe=Ce,Ce=y);var O=Kd(S,Ce),z=Kd(S,Pe);if(O&&z&&(q.rangeCount!==1||q.anchorNode!==O.node||q.anchorOffset!==O.offset||q.focusNode!==z.node||q.focusOffset!==z.offset)){var A=Q.createRange();A.setStart(O.node,O.offset),q.removeAllRanges(),Ce>Pe?(q.addRange(A),q.extend(z.node,z.offset)):(A.setEnd(z.node,z.offset),q.addRange(A))}}}}for(Q=[],q=S;q=q.parentNode;)q.nodeType===1&&Q.push({element:q,left:q.scrollLeft,top:q.scrollTop});for(typeof S.focus=="function"&&S.focus(),S=0;S<Q.length;S++){var X=Q[S];X.element.scrollLeft=X.left,X.element.scrollTop=X.top}}Ys=!!du,fu=du=null}finally{Qe=o,P.p=l,M.T=a}}e.current=t,Ct=2}}function cm(){if(Ct===2){Ct=0;var e=Vn,t=ti,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=M.T,M.T=null;var l=P.p;P.p=2;var o=Qe;Qe|=4;try{Uh(e,t.alternate,t)}finally{Qe=o,P.p=l,M.T=a}}Ct=3}}function um(){if(Ct===4||Ct===3){Ct=0,jn();var e=Vn,t=ti,a=yn,l=Jh;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Ct=5:(Ct=0,ti=Vn=null,dm(e,e.pendingLanes));var o=e.pendingLanes;if(o===0&&(Yn=null),H(a),t=t.stateNode,Dt&&typeof Dt.onCommitFiberRoot=="function")try{Dt.onCommitFiberRoot(Da,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=M.T,o=P.p,P.p=2,M.T=null;try{for(var u=e.onRecoverableError,y=0;y<l.length;y++){var S=l[y];u(S.value,{componentStack:S.stack})}}finally{M.T=t,P.p=o}}(yn&3)!==0&&zs(),Fa(e),o=e.pendingLanes,(a&261930)!==0&&(o&42)!==0?e===Pc?Wi++:(Wi=0,Pc=e):Wi=0,Pi(0)}}function dm(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Di(t)))}function zs(){return om(),cm(),um(),fm()}function fm(){if(Ct!==5)return!1;var e=Vn,t=Jc;Jc=0;var a=H(yn),l=M.T,o=P.p;try{P.p=32>a?32:a,M.T=null,a=Wc,Wc=null;var u=Vn,y=yn;if(Ct=0,ti=Vn=null,yn=0,(Qe&6)!==0)throw Error(s(331));var S=Qe;if(Qe|=4,Qh(u.current),$h(u,u.current,y,a),Qe=S,Pi(0,!1),Dt&&typeof Dt.onPostCommitFiberRoot=="function")try{Dt.onPostCommitFiberRoot(Da,u)}catch{}return!0}finally{P.p=o,M.T=l,dm(e,t)}}function hm(e,t,a){t=va(a,t),t=Tc(e.stateNode,t,2),e=Ln(e,t,2),e!==null&&(Ga(e,2),Fa(e))}function Fe(e,t,a){if(e.tag===3)hm(e,e,a);else for(;t!==null;){if(t.tag===3){hm(t,e,a);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Yn===null||!Yn.has(l))){e=va(a,e),a=mh(2),l=Ln(t,a,2),l!==null&&(ph(a,l,t,e),Ga(l,2),Fa(l));break}}t=t.return}}function tu(e,t,a){var l=e.pingCache;if(l===null){l=e.pingCache=new Zx;var o=new Set;l.set(t,o)}else o=l.get(t),o===void 0&&(o=new Set,l.set(t,o));o.has(a)||(Qc=!0,o.add(a),e=Ix.bind(null,e,t,a),t.then(e,e))}function Ix(e,t,a){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,tt===e&&(qe&a)===a&&(ht===4||ht===3&&(qe&62914560)===qe&&300>Ot()-js?(Qe&2)===0&&ai(e,0):Zc|=a,ei===qe&&(ei=0)),Fa(e)}function mm(e,t){t===0&&(t=bi()),e=ol(e,t),e!==null&&(Ga(e,t),Fa(e))}function ev(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),mm(e,a)}function tv(e,t){var a=0;switch(e.tag){case 31:case 13:var l=e.stateNode,o=e.memoizedState;o!==null&&(a=o.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(s(314))}l!==null&&l.delete(t),mm(e,a)}function av(e,t){return pa(e,t)}var Ts=null,li=null,au=!1,Os=!1,nu=!1,$n=0;function Fa(e){e!==li&&e.next===null&&(li===null?Ts=li=e:li=li.next=e),Os=!0,au||(au=!0,lv())}function Pi(e,t){if(!nu&&Os){nu=!0;do for(var a=!1,l=Ts;l!==null;){if(e!==0){var o=l.pendingLanes;if(o===0)var u=0;else{var y=l.suspendedLanes,S=l.pingedLanes;u=(1<<31-be(42|e)+1)-1,u&=o&~(y&~S),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(a=!0,xm(l,u))}else u=qe,u=Nn(l,l===tt?u:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(u&3)===0||En(l,u)||(a=!0,xm(l,u));l=l.next}while(a);nu=!1}}function nv(){pm()}function pm(){Os=au=!1;var e=0;$n!==0&&mv()&&(e=$n);for(var t=Ot(),a=null,l=Ts;l!==null;){var o=l.next,u=gm(l,t);u===0?(l.next=null,a===null?Ts=o:a.next=o,o===null&&(li=a)):(a=l,(e!==0||(u&3)!==0)&&(Os=!0)),l=o}Ct!==0&&Ct!==5||Pi(e),$n!==0&&($n=0)}function gm(e,t){for(var a=e.suspendedLanes,l=e.pingedLanes,o=e.expirationTimes,u=e.pendingLanes&-62914561;0<u;){var y=31-be(u),S=1<<y,w=o[y];w===-1?((S&a)===0||(S&l)!==0)&&(o[y]=So(S,t)):w<=t&&(e.expiredLanes|=S),u&=~S}if(t=tt,a=qe,a=Nn(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,a===0||e===t&&(Ze===2||Ze===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&en(l),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||En(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(l!==null&&en(l),H(a)){case 2:case 8:a=al;break;case 32:a=Ya;break;case 268435456:a=Qt;break;default:a=Ya}return l=ym.bind(null,e),a=pa(a,l),e.callbackPriority=t,e.callbackNode=a,t}return l!==null&&l!==null&&en(l),e.callbackPriority=2,e.callbackNode=null,2}function ym(e,t){if(Ct!==0&&Ct!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(zs()&&e.callbackNode!==a)return null;var l=qe;return l=Nn(e,e===tt?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(Ph(e,l,t),gm(e,Ot()),e.callbackNode!=null&&e.callbackNode===a?ym.bind(null,e):null)}function xm(e,t){if(zs())return null;Ph(e,t,!0)}function lv(){gv(function(){(Qe&6)!==0?pa(qa,nv):pm()})}function lu(){if($n===0){var e=Gl;e===0&&(e=Va,Va<<=1,(Va&261888)===0&&(Va=256)),$n=e}return $n}function vm(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Br(""+e)}function bm(e,t){var a=t.ownerDocument.createElement("input");return a.name=t.name,a.value=t.value,e.id&&a.setAttribute("form",e.id),t.parentNode.insertBefore(a,t),e=new FormData(e),a.parentNode.removeChild(a),e}function iv(e,t,a,l,o){if(t==="submit"&&a&&a.stateNode===o){var u=vm((o[me]||null).action),y=l.submitter;y&&(t=(t=y[me]||null)?vm(t.formAction):y.getAttribute("formAction"),t!==null&&(u=t,y=null));var S=new Gr("action","action",null,l,o);e.push({event:S,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if($n!==0){var w=y?bm(o,y):new FormData(o);Nc(a,{pending:!0,data:w,method:o.method,action:u},null,w)}}else typeof u=="function"&&(S.preventDefault(),w=y?bm(o,y):new FormData(o),Nc(a,{pending:!0,data:w,method:o.method,action:u},u,w))},currentTarget:o}]})}}for(var iu=0;iu<Yo.length;iu++){var ru=Yo[iu],rv=ru.toLowerCase(),sv=ru[0].toUpperCase()+ru.slice(1);La(rv,"on"+sv)}La(Jd,"onAnimationEnd"),La(Wd,"onAnimationIteration"),La(Pd,"onAnimationStart"),La("dblclick","onDoubleClick"),La("focusin","onFocus"),La("focusout","onBlur"),La(jx,"onTransitionRun"),La(Nx,"onTransitionStart"),La(Ex,"onTransitionCancel"),La(Id,"onTransitionEnd"),$a("onMouseEnter",["mouseout","mouseover"]),$a("onMouseLeave",["mouseout","mouseover"]),$a("onPointerEnter",["pointerout","pointerover"]),$a("onPointerLeave",["pointerout","pointerover"]),Rt("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Rt("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Rt("onBeforeInput",["compositionend","keypress","textInput","paste"]),Rt("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Rt("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Rt("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ii="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(" "),ov=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ii));function Sm(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var l=e[a],o=l.event;l=l.listeners;e:{var u=void 0;if(t)for(var y=l.length-1;0<=y;y--){var S=l[y],w=S.instance,L=S.currentTarget;if(S=S.listener,w!==u&&o.isPropagationStopped())break e;u=S,o.currentTarget=L;try{u(o)}catch(V){Xr(V)}o.currentTarget=null,u=w}else for(y=0;y<l.length;y++){if(S=l[y],w=S.instance,L=S.currentTarget,S=S.listener,w!==u&&o.isPropagationStopped())break e;u=S,o.currentTarget=L;try{u(o)}catch(V){Xr(V)}o.currentTarget=null,u=w}}}}function Be(e,t){var a=t[Ne];a===void 0&&(a=t[Ne]=new Set);var l=e+"__bubble";a.has(l)||(_m(t,e,2,!1),a.add(l))}function su(e,t,a){var l=0;t&&(l|=4),_m(a,e,l,t)}var Ds="_reactListening"+Math.random().toString(36).slice(2);function ou(e){if(!e[Ds]){e[Ds]=!0,Cn.forEach(function(a){a!=="selectionchange"&&(ov.has(a)||su(a,!1,e),su(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ds]||(t[Ds]=!0,su("selectionchange",!1,t))}}function _m(e,t,a,l){switch(Wm(t)){case 2:var o=kv;break;case 8:o=Uv;break;default:o=ju}a=o.bind(null,t,a,e),o=void 0,!Ro||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),l?o!==void 0?e.addEventListener(t,a,{capture:!0,passive:o}):e.addEventListener(t,a,!0):o!==void 0?e.addEventListener(t,a,{passive:o}):e.addEventListener(t,a,!1)}function cu(e,t,a,l,o){var u=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var y=l.tag;if(y===3||y===4){var S=l.stateNode.containerInfo;if(S===o)break;if(y===4)for(y=l.return;y!==null;){var w=y.tag;if((w===3||w===4)&&y.stateNode.containerInfo===o)return;y=y.return}for(;S!==null;){if(y=lt(S),y===null)return;if(w=y.tag,w===5||w===6||w===26||w===27){l=u=y;continue e}S=S.parentNode}}l=l.return}wd(function(){var L=u,V=wo(a),Q=[];e:{var U=ef.get(e);if(U!==void 0){var q=Gr,xe=e;switch(e){case"keypress":if(Yr(a)===0)break e;case"keydown":case"keyup":q=tx;break;case"focusin":xe="focus",q=Do;break;case"focusout":xe="blur",q=Do;break;case"beforeblur":case"afterblur":q=Do;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":q=zd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":q=Gy;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":q=lx;break;case Jd:case Wd:case Pd:q=Xy;break;case Id:q=rx;break;case"scroll":case"scrollend":q=Yy;break;case"wheel":q=ox;break;case"copy":case"cut":case"paste":q=Zy;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":q=Od;break;case"toggle":case"beforetoggle":q=ux}var Ce=(t&4)!==0,Pe=!Ce&&(e==="scroll"||e==="scrollend"),O=Ce?U!==null?U+"Capture":null:U;Ce=[];for(var z=L,A;z!==null;){var X=z;if(A=X.stateNode,X=X.tag,X!==5&&X!==26&&X!==27||A===null||O===null||(X=Si(z,O),X!=null&&Ce.push(er(z,X,A))),Pe)break;z=z.return}0<Ce.length&&(U=new q(U,xe,null,a,V),Q.push({event:U,listeners:Ce}))}}if((t&7)===0){e:{if(U=e==="mouseover"||e==="pointerover",q=e==="mouseout"||e==="pointerout",U&&a!==Eo&&(xe=a.relatedTarget||a.fromElement)&&(lt(xe)||xe[pe]))break e;if((q||U)&&(U=V.window===V?V:(U=V.ownerDocument)?U.defaultView||U.parentWindow:window,q?(xe=a.relatedTarget||a.toElement,q=L,xe=xe?lt(xe):null,xe!==null&&(Pe=d(xe),Ce=xe.tag,xe!==Pe||Ce!==5&&Ce!==27&&Ce!==6)&&(xe=null)):(q=null,xe=L),q!==xe)){if(Ce=zd,X="onMouseLeave",O="onMouseEnter",z="mouse",(e==="pointerout"||e==="pointerover")&&(Ce=Od,X="onPointerLeave",O="onPointerEnter",z="pointer"),Pe=q==null?U:Ge(q),A=xe==null?U:Ge(xe),U=new Ce(X,z+"leave",q,a,V),U.target=Pe,U.relatedTarget=A,X=null,lt(V)===L&&(Ce=new Ce(O,z+"enter",xe,a,V),Ce.target=A,Ce.relatedTarget=Pe,X=Ce),Pe=X,q&&xe)t:{for(Ce=cv,O=q,z=xe,A=0,X=O;X;X=Ce(X))A++;X=0;for(var Ee=z;Ee;Ee=Ce(Ee))X++;for(;0<A-X;)O=Ce(O),A--;for(;0<X-A;)z=Ce(z),X--;for(;A--;){if(O===z||z!==null&&O===z.alternate){Ce=O;break t}O=Ce(O),z=Ce(z)}Ce=null}else Ce=null;q!==null&&jm(Q,U,q,Ce,!1),xe!==null&&Pe!==null&&jm(Q,Pe,xe,Ce,!0)}}e:{if(U=L?Ge(L):window,q=U.nodeName&&U.nodeName.toLowerCase(),q==="select"||q==="input"&&U.type==="file")var Ke=Bd;else if(Ud(U))if(qd)Ke=bx;else{Ke=xx;var ve=yx}else q=U.nodeName,!q||q.toLowerCase()!=="input"||U.type!=="checkbox"&&U.type!=="radio"?L&&No(L.elementType)&&(Ke=Bd):Ke=vx;if(Ke&&(Ke=Ke(e,L))){Hd(Q,Ke,a,V);break e}ve&&ve(e,U,L),e==="focusout"&&L&&U.type==="number"&&L.memoizedProps.value!=null&&jo(U,"number",U.value)}switch(ve=L?Ge(L):window,e){case"focusin":(Ud(ve)||ve.contentEditable==="true")&&(Ll=ve,Ho=L,zi=null);break;case"focusout":zi=Ho=Ll=null;break;case"mousedown":Bo=!0;break;case"contextmenu":case"mouseup":case"dragend":Bo=!1,Zd(Q,a,V);break;case"selectionchange":if(_x)break;case"keydown":case"keyup":Zd(Q,a,V)}var Ae;if(Ao)e:{switch(e){case"compositionstart":var Ye="onCompositionStart";break e;case"compositionend":Ye="onCompositionEnd";break e;case"compositionupdate":Ye="onCompositionUpdate";break e}Ye=void 0}else Al?Ld(e,a)&&(Ye="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(Ye="onCompositionStart");Ye&&(Dd&&a.locale!=="ko"&&(Al||Ye!=="onCompositionStart"?Ye==="onCompositionEnd"&&Al&&(Ae=Cd()):(Rn=V,zo="value"in Rn?Rn.value:Rn.textContent,Al=!0)),ve=Ms(L,Ye),0<ve.length&&(Ye=new Td(Ye,e,null,a,V),Q.push({event:Ye,listeners:ve}),Ae?Ye.data=Ae:(Ae=kd(a),Ae!==null&&(Ye.data=Ae)))),(Ae=fx?hx(e,a):mx(e,a))&&(Ye=Ms(L,"onBeforeInput"),0<Ye.length&&(ve=new Td("onBeforeInput","beforeinput",null,a,V),Q.push({event:ve,listeners:Ye}),ve.data=Ae)),iv(Q,e,L,a,V)}Sm(Q,t)})}function er(e,t,a){return{instance:e,listener:t,currentTarget:a}}function Ms(e,t){for(var a=t+"Capture",l=[];e!==null;){var o=e,u=o.stateNode;if(o=o.tag,o!==5&&o!==26&&o!==27||u===null||(o=Si(e,a),o!=null&&l.unshift(er(e,o,u)),o=Si(e,t),o!=null&&l.push(er(e,o,u))),e.tag===3)return l;e=e.return}return[]}function cv(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function jm(e,t,a,l,o){for(var u=t._reactName,y=[];a!==null&&a!==l;){var S=a,w=S.alternate,L=S.stateNode;if(S=S.tag,w!==null&&w===l)break;S!==5&&S!==26&&S!==27||L===null||(w=L,o?(L=Si(a,u),L!=null&&y.unshift(er(a,L,w))):o||(L=Si(a,u),L!=null&&y.push(er(a,L,w)))),a=a.return}y.length!==0&&e.push({event:t,listeners:y})}var uv=/\r\n?/g,dv=/\u0000|\uFFFD/g;function Nm(e){return(typeof e=="string"?e:""+e).replace(uv,`
|
|
9
|
+
`).replace(dv,"")}function Em(e,t){return t=Nm(t),Nm(e)===t}function We(e,t,a,l,o,u){switch(a){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||Ol(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&Ol(e,""+l);break;case"className":gt(e,"class",l);break;case"tabIndex":gt(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":gt(e,a,l);break;case"style":Nd(e,l,u);break;case"data":if(t!=="object"){gt(e,"data",l);break}case"src":case"href":if(l===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=Br(""+l),e.setAttribute(a,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(a,"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 u=="function"&&(a==="formAction"?(t!=="input"&&We(e,t,"name",o.name,o,null),We(e,t,"formEncType",o.formEncType,o,null),We(e,t,"formMethod",o.formMethod,o,null),We(e,t,"formTarget",o.formTarget,o,null)):(We(e,t,"encType",o.encType,o,null),We(e,t,"method",o.method,o,null),We(e,t,"target",o.target,o,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=Br(""+l),e.setAttribute(a,l);break;case"onClick":l!=null&&(e.onclick=tn);break;case"onScroll":l!=null&&Be("scroll",e);break;case"onScrollEnd":l!=null&&Be("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(s(61));if(a=l.__html,a!=null){if(o.children!=null)throw Error(s(60));e.innerHTML=a}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}a=Br(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,""+l):e.removeAttribute(a);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":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":l===!0?e.setAttribute(a,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,l):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(a,l):e.removeAttribute(a);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(a):e.setAttribute(a,l);break;case"popover":Be("beforetoggle",e),Be("toggle",e),Ue(e,"popover",l);break;case"xlinkActuate":Ht(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":Ht(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":Ht(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":Ht(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":Ht(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":Ht(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":Ht(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":Ht(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":Ht(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":Ue(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=By.get(a)||a,Ue(e,a,l))}}function uu(e,t,a,l,o,u){switch(a){case"style":Nd(e,l,u);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(s(61));if(a=l.__html,a!=null){if(o.children!=null)throw Error(s(60));e.innerHTML=a}}break;case"children":typeof l=="string"?Ol(e,l):(typeof l=="number"||typeof l=="bigint")&&Ol(e,""+l);break;case"onScroll":l!=null&&Be("scroll",e);break;case"onScrollEnd":l!=null&&Be("scrollend",e);break;case"onClick":l!=null&&(e.onclick=tn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Aa.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(o=a.endsWith("Capture"),t=a.slice(2,o?a.length-7:void 0),u=e[me]||null,u=u!=null?u[a]:null,typeof u=="function"&&e.removeEventListener(t,u,o),typeof l=="function")){typeof u!="function"&&u!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,l,o);break e}a in e?e[a]=l:l===!0?e.setAttribute(a,""):Ue(e,a,l)}}}function kt(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Be("error",e),Be("load",e);var l=!1,o=!1,u;for(u in a)if(a.hasOwnProperty(u)){var y=a[u];if(y!=null)switch(u){case"src":l=!0;break;case"srcSet":o=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(s(137,t));default:We(e,t,u,y,a,null)}}o&&We(e,t,"srcSet",a.srcSet,a,null),l&&We(e,t,"src",a.src,a,null);return;case"input":Be("invalid",e);var S=u=y=o=null,w=null,L=null;for(l in a)if(a.hasOwnProperty(l)){var V=a[l];if(V!=null)switch(l){case"name":o=V;break;case"type":y=V;break;case"checked":w=V;break;case"defaultChecked":L=V;break;case"value":u=V;break;case"defaultValue":S=V;break;case"children":case"dangerouslySetInnerHTML":if(V!=null)throw Error(s(137,t));break;default:We(e,t,l,V,a,null)}}bd(e,u,S,w,L,y,o,!1);return;case"select":Be("invalid",e),l=y=u=null;for(o in a)if(a.hasOwnProperty(o)&&(S=a[o],S!=null))switch(o){case"value":u=S;break;case"defaultValue":y=S;break;case"multiple":l=S;default:We(e,t,o,S,a,null)}t=u,a=y,e.multiple=!!l,t!=null?Tl(e,!!l,t,!1):a!=null&&Tl(e,!!l,a,!0);return;case"textarea":Be("invalid",e),u=o=l=null;for(y in a)if(a.hasOwnProperty(y)&&(S=a[y],S!=null))switch(y){case"value":l=S;break;case"defaultValue":o=S;break;case"children":u=S;break;case"dangerouslySetInnerHTML":if(S!=null)throw Error(s(91));break;default:We(e,t,y,S,a,null)}_d(e,l,o,u);return;case"option":for(w in a)a.hasOwnProperty(w)&&(l=a[w],l!=null)&&(w==="selected"?e.selected=l&&typeof l!="function"&&typeof l!="symbol":We(e,t,w,l,a,null));return;case"dialog":Be("beforetoggle",e),Be("toggle",e),Be("cancel",e),Be("close",e);break;case"iframe":case"object":Be("load",e);break;case"video":case"audio":for(l=0;l<Ii.length;l++)Be(Ii[l],e);break;case"image":Be("error",e),Be("load",e);break;case"details":Be("toggle",e);break;case"embed":case"source":case"link":Be("error",e),Be("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(L in a)if(a.hasOwnProperty(L)&&(l=a[L],l!=null))switch(L){case"children":case"dangerouslySetInnerHTML":throw Error(s(137,t));default:We(e,t,L,l,a,null)}return;default:if(No(t)){for(V in a)a.hasOwnProperty(V)&&(l=a[V],l!==void 0&&uu(e,t,V,l,a,void 0));return}}for(S in a)a.hasOwnProperty(S)&&(l=a[S],l!=null&&We(e,t,S,l,a,null))}function fv(e,t,a,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var o=null,u=null,y=null,S=null,w=null,L=null,V=null;for(q in a){var Q=a[q];if(a.hasOwnProperty(q)&&Q!=null)switch(q){case"checked":break;case"value":break;case"defaultValue":w=Q;default:l.hasOwnProperty(q)||We(e,t,q,null,l,Q)}}for(var U in l){var q=l[U];if(Q=a[U],l.hasOwnProperty(U)&&(q!=null||Q!=null))switch(U){case"type":u=q;break;case"name":o=q;break;case"checked":L=q;break;case"defaultChecked":V=q;break;case"value":y=q;break;case"defaultValue":S=q;break;case"children":case"dangerouslySetInnerHTML":if(q!=null)throw Error(s(137,t));break;default:q!==Q&&We(e,t,U,q,l,Q)}}_o(e,y,S,w,L,V,u,o);return;case"select":q=y=S=U=null;for(u in a)if(w=a[u],a.hasOwnProperty(u)&&w!=null)switch(u){case"value":break;case"multiple":q=w;default:l.hasOwnProperty(u)||We(e,t,u,null,l,w)}for(o in l)if(u=l[o],w=a[o],l.hasOwnProperty(o)&&(u!=null||w!=null))switch(o){case"value":U=u;break;case"defaultValue":S=u;break;case"multiple":y=u;default:u!==w&&We(e,t,o,u,l,w)}t=S,a=y,l=q,U!=null?Tl(e,!!a,U,!1):!!l!=!!a&&(t!=null?Tl(e,!!a,t,!0):Tl(e,!!a,a?[]:"",!1));return;case"textarea":q=U=null;for(S in a)if(o=a[S],a.hasOwnProperty(S)&&o!=null&&!l.hasOwnProperty(S))switch(S){case"value":break;case"children":break;default:We(e,t,S,null,l,o)}for(y in l)if(o=l[y],u=a[y],l.hasOwnProperty(y)&&(o!=null||u!=null))switch(y){case"value":U=o;break;case"defaultValue":q=o;break;case"children":break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(s(91));break;default:o!==u&&We(e,t,y,o,l,u)}Sd(e,U,q);return;case"option":for(var xe in a)U=a[xe],a.hasOwnProperty(xe)&&U!=null&&!l.hasOwnProperty(xe)&&(xe==="selected"?e.selected=!1:We(e,t,xe,null,l,U));for(w in l)U=l[w],q=a[w],l.hasOwnProperty(w)&&U!==q&&(U!=null||q!=null)&&(w==="selected"?e.selected=U&&typeof U!="function"&&typeof U!="symbol":We(e,t,w,U,l,q));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 Ce in a)U=a[Ce],a.hasOwnProperty(Ce)&&U!=null&&!l.hasOwnProperty(Ce)&&We(e,t,Ce,null,l,U);for(L in l)if(U=l[L],q=a[L],l.hasOwnProperty(L)&&U!==q&&(U!=null||q!=null))switch(L){case"children":case"dangerouslySetInnerHTML":if(U!=null)throw Error(s(137,t));break;default:We(e,t,L,U,l,q)}return;default:if(No(t)){for(var Pe in a)U=a[Pe],a.hasOwnProperty(Pe)&&U!==void 0&&!l.hasOwnProperty(Pe)&&uu(e,t,Pe,void 0,l,U);for(V in l)U=l[V],q=a[V],!l.hasOwnProperty(V)||U===q||U===void 0&&q===void 0||uu(e,t,V,U,l,q);return}}for(var O in a)U=a[O],a.hasOwnProperty(O)&&U!=null&&!l.hasOwnProperty(O)&&We(e,t,O,null,l,U);for(Q in l)U=l[Q],q=a[Q],!l.hasOwnProperty(Q)||U===q||U==null&&q==null||We(e,t,Q,U,l,q)}function wm(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function hv(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),l=0;l<a.length;l++){var o=a[l],u=o.transferSize,y=o.initiatorType,S=o.duration;if(u&&S&&wm(y)){for(y=0,S=o.responseEnd,l+=1;l<a.length;l++){var w=a[l],L=w.startTime;if(L>S)break;var V=w.transferSize,Q=w.initiatorType;V&&wm(Q)&&(w=w.responseEnd,y+=V*(w<S?1:(S-L)/(w-L)))}if(--l,t+=8*(u+y)/(o.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 du=null,fu=null;function As(e){return e.nodeType===9?e:e.ownerDocument}function Cm(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 Rm(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 hu(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 mu=null;function mv(){var e=window.event;return e&&e.type==="popstate"?e===mu?!1:(mu=e,!0):(mu=null,!1)}var zm=typeof setTimeout=="function"?setTimeout:void 0,pv=typeof clearTimeout=="function"?clearTimeout:void 0,Tm=typeof Promise=="function"?Promise:void 0,gv=typeof queueMicrotask=="function"?queueMicrotask:typeof Tm<"u"?function(e){return Tm.resolve(null).then(e).catch(yv)}:zm;function yv(e){setTimeout(function(){throw e})}function Kn(e){return e==="head"}function Om(e,t){var a=t,l=0;do{var o=a.nextSibling;if(e.removeChild(a),o&&o.nodeType===8)if(a=o.data,a==="/$"||a==="/&"){if(l===0){e.removeChild(o),oi(t);return}l--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")l++;else if(a==="html")tr(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,tr(a);for(var u=a.firstChild;u;){var y=u.nextSibling,S=u.nodeName;u[ke]||S==="SCRIPT"||S==="STYLE"||S==="LINK"&&u.rel.toLowerCase()==="stylesheet"||a.removeChild(u),u=y}}else a==="body"&&tr(e.ownerDocument.body);a=o}while(a);oi(t)}function Dm(e,t){var a=e;e=0;do{var l=a.nextSibling;if(a.nodeType===1?t?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(t?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),l&&l.nodeType===8)if(a=l.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=l}while(a)}function pu(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var a=t;switch(t=t.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":pu(a),et(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function xv(e,t,a,l){for(;e.nodeType===1;){var o=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[ke])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(u=e.getAttribute("rel"),u==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(u!==o.rel||e.getAttribute("href")!==(o.href==null||o.href===""?null:o.href)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin)||e.getAttribute("title")!==(o.title==null?null:o.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(u=e.getAttribute("src"),(u!==(o.src==null?null:o.src)||e.getAttribute("type")!==(o.type==null?null:o.type)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin))&&u&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var u=o.name==null?null:""+o.name;if(o.type==="hidden"&&e.getAttribute("name")===u)return e}else return e;if(e=Na(e.nextSibling),e===null)break}return null}function vv(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=Na(e.nextSibling),e===null))return null;return e}function Mm(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Na(e.nextSibling),e===null))return null;return e}function gu(e){return e.data==="$?"||e.data==="$~"}function yu(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function bv(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var l=function(){t(),a.removeEventListener("DOMContentLoaded",l)};a.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function Na(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 xu=null;function Am(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return Na(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function Lm(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(t===0)return e;t--}else a!=="/$"&&a!=="/&"||t++}e=e.previousSibling}return null}function km(e,t,a){switch(t=As(a),e){case"html":if(e=t.documentElement,!e)throw Error(s(452));return e;case"head":if(e=t.head,!e)throw Error(s(453));return e;case"body":if(e=t.body,!e)throw Error(s(454));return e;default:throw Error(s(451))}}function tr(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);et(e)}var Ea=new Map,Um=new Set;function Ls(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var xn=P.d;P.d={f:Sv,r:_v,D:jv,C:Nv,L:Ev,m:wv,X:Rv,S:Cv,M:zv};function Sv(){var e=xn.f(),t=ws();return e||t}function _v(e){var t=dt(e);t!==null&&t.tag===5&&t.type==="form"?eh(t):xn.r(e)}var ii=typeof document>"u"?null:document;function Hm(e,t,a){var l=ii;if(l&&typeof t=="string"&&t){var o=ya(t);o='link[rel="'+e+'"][href="'+o+'"]',typeof a=="string"&&(o+='[crossorigin="'+a+'"]'),Um.has(o)||(Um.add(o),e={rel:e,crossOrigin:a,href:t},l.querySelector(o)===null&&(t=l.createElement("link"),kt(t,"link",e),nt(t),l.head.appendChild(t)))}}function jv(e){xn.D(e),Hm("dns-prefetch",e,null)}function Nv(e,t){xn.C(e,t),Hm("preconnect",e,t)}function Ev(e,t,a){xn.L(e,t,a);var l=ii;if(l&&e&&t){var o='link[rel="preload"][as="'+ya(t)+'"]';t==="image"&&a&&a.imageSrcSet?(o+='[imagesrcset="'+ya(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(o+='[imagesizes="'+ya(a.imageSizes)+'"]')):o+='[href="'+ya(e)+'"]';var u=o;switch(t){case"style":u=ri(e);break;case"script":u=si(e)}Ea.has(u)||(e=x({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),Ea.set(u,e),l.querySelector(o)!==null||t==="style"&&l.querySelector(ar(u))||t==="script"&&l.querySelector(nr(u))||(t=l.createElement("link"),kt(t,"link",e),nt(t),l.head.appendChild(t)))}}function wv(e,t){xn.m(e,t);var a=ii;if(a&&e){var l=t&&typeof t.as=="string"?t.as:"script",o='link[rel="modulepreload"][as="'+ya(l)+'"][href="'+ya(e)+'"]',u=o;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=si(e)}if(!Ea.has(u)&&(e=x({rel:"modulepreload",href:e},t),Ea.set(u,e),a.querySelector(o)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(nr(u)))return}l=a.createElement("link"),kt(l,"link",e),nt(l),a.head.appendChild(l)}}}function Cv(e,t,a){xn.S(e,t,a);var l=ii;if(l&&e){var o=wt(l).hoistableStyles,u=ri(e);t=t||"default";var y=o.get(u);if(!y){var S={loading:0,preload:null};if(y=l.querySelector(ar(u)))S.loading=5;else{e=x({rel:"stylesheet",href:e,"data-precedence":t},a),(a=Ea.get(u))&&vu(e,a);var w=y=l.createElement("link");nt(w),kt(w,"link",e),w._p=new Promise(function(L,V){w.onload=L,w.onerror=V}),w.addEventListener("load",function(){S.loading|=1}),w.addEventListener("error",function(){S.loading|=2}),S.loading|=4,ks(y,t,l)}y={type:"stylesheet",instance:y,count:1,state:S},o.set(u,y)}}}function Rv(e,t){xn.X(e,t);var a=ii;if(a&&e){var l=wt(a).hoistableScripts,o=si(e),u=l.get(o);u||(u=a.querySelector(nr(o)),u||(e=x({src:e,async:!0},t),(t=Ea.get(o))&&bu(e,t),u=a.createElement("script"),nt(u),kt(u,"link",e),a.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},l.set(o,u))}}function zv(e,t){xn.M(e,t);var a=ii;if(a&&e){var l=wt(a).hoistableScripts,o=si(e),u=l.get(o);u||(u=a.querySelector(nr(o)),u||(e=x({src:e,async:!0,type:"module"},t),(t=Ea.get(o))&&bu(e,t),u=a.createElement("script"),nt(u),kt(u,"link",e),a.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},l.set(o,u))}}function Bm(e,t,a,l){var o=(o=_e.current)?Ls(o):null;if(!o)throw Error(s(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=ri(a.href),a=wt(o).hoistableStyles,l=a.get(t),l||(l={type:"style",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=ri(a.href);var u=wt(o).hoistableStyles,y=u.get(e);if(y||(o=o.ownerDocument||o,y={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,y),(u=o.querySelector(ar(e)))&&!u._p&&(y.instance=u,y.state.loading=5),Ea.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Ea.set(e,a),u||Tv(o,e,a,y.state))),t&&l===null)throw Error(s(528,""));return y}if(t&&l!==null)throw Error(s(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=si(a),a=wt(o).hoistableScripts,l=a.get(t),l||(l={type:"script",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(s(444,e))}}function ri(e){return'href="'+ya(e)+'"'}function ar(e){return'link[rel="stylesheet"]['+e+"]"}function qm(e){return x({},e,{"data-precedence":e.precedence,precedence:null})}function Tv(e,t,a,l){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?l.loading=1:(t=e.createElement("link"),l.preload=t,t.addEventListener("load",function(){return l.loading|=1}),t.addEventListener("error",function(){return l.loading|=2}),kt(t,"link",a),nt(t),e.head.appendChild(t))}function si(e){return'[src="'+ya(e)+'"]'}function nr(e){return"script[async]"+e}function Ym(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+ya(a.href)+'"]');if(l)return t.instance=l,nt(l),l;var o=x({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),nt(l),kt(l,"style",o),ks(l,a.precedence,e),t.instance=l;case"stylesheet":o=ri(a.href);var u=e.querySelector(ar(o));if(u)return t.state.loading|=4,t.instance=u,nt(u),u;l=qm(a),(o=Ea.get(o))&&vu(l,o),u=(e.ownerDocument||e).createElement("link"),nt(u);var y=u;return y._p=new Promise(function(S,w){y.onload=S,y.onerror=w}),kt(u,"link",l),t.state.loading|=4,ks(u,a.precedence,e),t.instance=u;case"script":return u=si(a.src),(o=e.querySelector(nr(u)))?(t.instance=o,nt(o),o):(l=a,(o=Ea.get(u))&&(l=x({},a),bu(l,o)),e=e.ownerDocument||e,o=e.createElement("script"),nt(o),kt(o,"link",l),e.head.appendChild(o),t.instance=o);case"void":return null;default:throw Error(s(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,ks(l,a.precedence,e));return t.instance}function ks(e,t,a){for(var l=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),o=l.length?l[l.length-1]:null,u=o,y=0;y<l.length;y++){var S=l[y];if(S.dataset.precedence===t)u=S;else if(u!==o)break}u?u.parentNode.insertBefore(e,u.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function vu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function bu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Us=null;function Vm(e,t,a){if(Us===null){var l=new Map,o=Us=new Map;o.set(a,l)}else o=Us,l=o.get(a),l||(l=new Map,o.set(a,l));if(l.has(e))return l;for(l.set(e,null),a=a.getElementsByTagName(e),o=0;o<a.length;o++){var u=a[o];if(!(u[ke]||u[ce]||e==="link"&&u.getAttribute("rel")==="stylesheet")&&u.namespaceURI!=="http://www.w3.org/2000/svg"){var y=u.getAttribute(t)||"";y=e+y;var S=l.get(y);S?S.push(u):l.set(y,[u])}}return l}function Gm(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function Ov(e,t,a){if(a===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;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!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 $m(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Dv(e,t,a,l){if(a.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var o=ri(l.href),u=t.querySelector(ar(o));if(u){t=u._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Hs.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=u,nt(u);return}u=t.ownerDocument||t,l=qm(l),(o=Ea.get(o))&&vu(l,o),u=u.createElement("link"),nt(u);var y=u;y._p=new Promise(function(S,w){y.onload=S,y.onerror=w}),kt(u,"link",l),a.instance=u}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=Hs.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var Su=0;function Mv(e,t){return e.stylesheets&&e.count===0&&qs(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var l=setTimeout(function(){if(e.stylesheets&&qs(e,e.stylesheets),e.unsuspend){var u=e.unsuspend;e.unsuspend=null,u()}},6e4+t);0<e.imgBytes&&Su===0&&(Su=62500*hv());var o=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&qs(e,e.stylesheets),e.unsuspend)){var u=e.unsuspend;e.unsuspend=null,u()}},(e.imgBytes>Su?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(o)}}:null}function Hs(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)qs(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Bs=null;function qs(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Bs=new Map,t.forEach(Av,e),Bs=null,Hs.call(e))}function Av(e,t){if(!(t.state.loading&4)){var a=Bs.get(e);if(a)var l=a.get(null);else{a=new Map,Bs.set(e,a);for(var o=e.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u<o.length;u++){var y=o[u];(y.nodeName==="LINK"||y.getAttribute("media")!=="not all")&&(a.set(y.dataset.precedence,y),l=y)}l&&a.set(null,l)}o=t.instance,y=o.getAttribute("data-precedence"),u=a.get(y)||l,u===l&&a.set(null,o),a.set(y,o),this.count++,l=Hs.bind(this),o.addEventListener("load",l),o.addEventListener("error",l),u?u.parentNode.insertBefore(o,u.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(o,e.firstChild)),t.state.loading|=4}}var lr={$$typeof:K,Provider:null,Consumer:null,_currentValue:de,_currentValue2:de,_threadCount:0};function Lv(e,t,a,l,o,u,y,S,w){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=wn(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=wn(0),this.hiddenUpdates=wn(null),this.identifierPrefix=l,this.onUncaughtError=o,this.onCaughtError=u,this.onRecoverableError=y,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=w,this.incompleteTransitions=new Map}function Km(e,t,a,l,o,u,y,S,w,L,V,Q){return e=new Lv(e,t,a,y,w,L,V,Q,S),t=1,u===!0&&(t|=24),u=ia(3,null,null,t),e.current=u,u.stateNode=e,t=ec(),t.refCount++,e.pooledCache=t,t.refCount++,u.memoizedState={element:l,isDehydrated:a,cache:t},lc(u),e}function Xm(e){return e?(e=Hl,e):Hl}function Qm(e,t,a,l,o,u){o=Xm(o),l.context===null?l.context=o:l.pendingContext=o,l=An(t),l.payload={element:a},u=u===void 0?null:u,u!==null&&(l.callback=u),a=Ln(e,l,t),a!==null&&(ta(a,e,t),ki(a,e,t))}function Zm(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function _u(e,t){Zm(e,t),(e=e.alternate)&&Zm(e,t)}function Fm(e){if(e.tag===13||e.tag===31){var t=ol(e,67108864);t!==null&&ta(t,e,67108864),_u(e,67108864)}}function Jm(e){if(e.tag===13||e.tag===31){var t=ua();t=T(t);var a=ol(e,t);a!==null&&ta(a,e,t),_u(e,t)}}var Ys=!0;function kv(e,t,a,l){var o=M.T;M.T=null;var u=P.p;try{P.p=2,ju(e,t,a,l)}finally{P.p=u,M.T=o}}function Uv(e,t,a,l){var o=M.T;M.T=null;var u=P.p;try{P.p=8,ju(e,t,a,l)}finally{P.p=u,M.T=o}}function ju(e,t,a,l){if(Ys){var o=Nu(l);if(o===null)cu(e,t,l,Vs,a),Pm(e,l);else if(Bv(o,e,t,a,l))l.stopPropagation();else if(Pm(e,l),t&4&&-1<Hv.indexOf(e)){for(;o!==null;){var u=dt(o);if(u!==null)switch(u.tag){case 3:if(u=u.stateNode,u.current.memoizedState.isDehydrated){var y=Ft(u.pendingLanes);if(y!==0){var S=u;for(S.pendingLanes|=2,S.entangledLanes|=2;y;){var w=1<<31-be(y);S.entanglements[1]|=w,y&=~w}Fa(u),(Qe&6)===0&&(Ns=Ot()+500,Pi(0))}}break;case 31:case 13:S=ol(u,2),S!==null&&ta(S,u,2),ws(),_u(u,2)}if(u=Nu(l),u===null&&cu(e,t,l,Vs,a),u===o)break;o=u}o!==null&&l.stopPropagation()}else cu(e,t,l,null,a)}}function Nu(e){return e=wo(e),Eu(e)}var Vs=null;function Eu(e){if(Vs=null,e=lt(e),e!==null){var t=d(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=h(t),e!==null)return e;e=null}else if(a===31){if(e=p(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Vs=e,null}function Wm(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(Oa()){case qa:return 2;case al:return 8;case Ya:case na:return 32;case Qt:return 268435456;default:return 32}default:return 32}}var wu=!1,Xn=null,Qn=null,Zn=null,ir=new Map,rr=new Map,Fn=[],Hv="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 Pm(e,t){switch(e){case"focusin":case"focusout":Xn=null;break;case"dragenter":case"dragleave":Qn=null;break;case"mouseover":case"mouseout":Zn=null;break;case"pointerover":case"pointerout":ir.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":rr.delete(t.pointerId)}}function sr(e,t,a,l,o,u){return e===null||e.nativeEvent!==u?(e={blockedOn:t,domEventName:a,eventSystemFlags:l,nativeEvent:u,targetContainers:[o]},t!==null&&(t=dt(t),t!==null&&Fm(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function Bv(e,t,a,l,o){switch(t){case"focusin":return Xn=sr(Xn,e,t,a,l,o),!0;case"dragenter":return Qn=sr(Qn,e,t,a,l,o),!0;case"mouseover":return Zn=sr(Zn,e,t,a,l,o),!0;case"pointerover":var u=o.pointerId;return ir.set(u,sr(ir.get(u)||null,e,t,a,l,o)),!0;case"gotpointercapture":return u=o.pointerId,rr.set(u,sr(rr.get(u)||null,e,t,a,l,o)),!0}return!1}function Im(e){var t=lt(e.target);if(t!==null){var a=d(t);if(a!==null){if(t=a.tag,t===13){if(t=h(a),t!==null){e.blockedOn=t,ne(e.priority,function(){Jm(a)});return}}else if(t===31){if(t=p(a),t!==null){e.blockedOn=t,ne(e.priority,function(){Jm(a)});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Gs(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=Nu(e.nativeEvent);if(a===null){a=e.nativeEvent;var l=new a.constructor(a.type,a);Eo=l,a.target.dispatchEvent(l),Eo=null}else return t=dt(a),t!==null&&Fm(t),e.blockedOn=a,!1;t.shift()}return!0}function ep(e,t,a){Gs(e)&&a.delete(t)}function qv(){wu=!1,Xn!==null&&Gs(Xn)&&(Xn=null),Qn!==null&&Gs(Qn)&&(Qn=null),Zn!==null&&Gs(Zn)&&(Zn=null),ir.forEach(ep),rr.forEach(ep)}function $s(e,t){e.blockedOn===t&&(e.blockedOn=null,wu||(wu=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,qv)))}var Ks=null;function tp(e){Ks!==e&&(Ks=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Ks===e&&(Ks=null);for(var t=0;t<e.length;t+=3){var a=e[t],l=e[t+1],o=e[t+2];if(typeof l!="function"){if(Eu(l||a)===null)continue;break}var u=dt(a);u!==null&&(e.splice(t,3),t-=3,Nc(u,{pending:!0,data:o,method:a.method,action:l},l,o))}}))}function oi(e){function t(w){return $s(w,e)}Xn!==null&&$s(Xn,e),Qn!==null&&$s(Qn,e),Zn!==null&&$s(Zn,e),ir.forEach(t),rr.forEach(t);for(var a=0;a<Fn.length;a++){var l=Fn[a];l.blockedOn===e&&(l.blockedOn=null)}for(;0<Fn.length&&(a=Fn[0],a.blockedOn===null);)Im(a),a.blockedOn===null&&Fn.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(l=0;l<a.length;l+=3){var o=a[l],u=a[l+1],y=o[me]||null;if(typeof u=="function")y||tp(a);else if(y){var S=null;if(u&&u.hasAttribute("formAction")){if(o=u,y=u[me]||null)S=y.formAction;else if(Eu(o)!==null)continue}else S=y.action;typeof S=="function"?a[l+1]=S:(a.splice(l,3),l-=3),tp(a)}}}function ap(){function e(u){u.canIntercept&&u.info==="react-transition"&&u.intercept({handler:function(){return new Promise(function(y){return o=y})},focusReset:"manual",scroll:"manual"})}function t(){o!==null&&(o(),o=null),l||setTimeout(a,20)}function a(){if(!l&&!navigation.transition){var u=navigation.currentEntry;u&&u.url!=null&&navigation.navigate(u.url,{state:u.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,o=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){l=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),o!==null&&(o(),o=null)}}}function Cu(e){this._internalRoot=e}Xs.prototype.render=Cu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(s(409));var a=t.current,l=ua();Qm(a,l,e,t,null,null)},Xs.prototype.unmount=Cu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Qm(e.current,2,null,e,null,null),ws(),t[pe]=null}};function Xs(e){this._internalRoot=e}Xs.prototype.unstable_scheduleHydration=function(e){if(e){var t=ae();e={blockedOn:null,target:e,priority:t};for(var a=0;a<Fn.length&&t!==0&&t<Fn[a].priority;a++);Fn.splice(a,0,e),a===0&&Im(e)}};var np=i.version;if(np!=="19.2.4")throw Error(s(527,np,"19.2.4"));P.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(s(188)):(e=Object.keys(e).join(","),Error(s(268,e)));return e=m(t),e=e!==null?b(e):null,e=e===null?null:e.stateNode,e};var Yv={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:M,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Qs=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Qs.isDisabled&&Qs.supportsFiber)try{Da=Qs.inject(Yv),Dt=Qs}catch{}}return ur.createRoot=function(e,t){if(!c(e))throw Error(s(299));var a=!1,l="",o=uh,u=dh,y=fh;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(u=t.onCaughtError),t.onRecoverableError!==void 0&&(y=t.onRecoverableError)),t=Km(e,1,!1,null,null,a,l,null,o,u,y,ap),e[pe]=t.current,ou(e),new Cu(t)},ur.hydrateRoot=function(e,t,a){if(!c(e))throw Error(s(299));var l=!1,o="",u=uh,y=dh,S=fh,w=null;return a!=null&&(a.unstable_strictMode===!0&&(l=!0),a.identifierPrefix!==void 0&&(o=a.identifierPrefix),a.onUncaughtError!==void 0&&(u=a.onUncaughtError),a.onCaughtError!==void 0&&(y=a.onCaughtError),a.onRecoverableError!==void 0&&(S=a.onRecoverableError),a.formState!==void 0&&(w=a.formState)),t=Km(e,1,!0,t,a??null,l,o,w,u,y,S,ap),t.context=Xm(null),a=t.current,l=ua(),l=T(l),o=An(l),o.callback=null,Ln(a,o,l),a=l,t.current.lanes=a,Ga(t,a),Fa(t),e[pe]=t.current,ou(e),new Xs(t)},ur.version="19.2.4",ur}var Ap;function ib(){if(Ap)return Lu.exports;Ap=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(i){console.error(i)}}return n(),Lu.exports=lb(),Lu.exports}var rb=ib();var Vg=n=>{throw TypeError(n)},sb=(n,i,r)=>i.has(n)||Vg("Cannot "+r),Bu=(n,i,r)=>(sb(n,i,"read from private field"),r?r.call(n):i.get(n)),ob=(n,i,r)=>i.has(n)?Vg("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(n):i.set(n,r),Lp="popstate";function kp(n){return typeof n=="object"&&n!=null&&"pathname"in n&&"search"in n&&"hash"in n&&"state"in n&&"key"in n}function cb(n={}){function i(s,c){let d=c.state?.masked,{pathname:h,search:p,hash:g}=d||s.location;return _r("",{pathname:h,search:p,hash:g},c.state&&c.state.usr||null,c.state&&c.state.key||"default",d?{pathname:s.location.pathname,search:s.location.search,hash:s.location.hash}:void 0)}function r(s,c){return typeof c=="string"?c:Wa(c)}return db(i,r,null,n)}function Le(n,i){if(n===!1||n===null||typeof n>"u")throw new Error(i)}function mt(n,i){if(!n){typeof console<"u"&&console.warn(i);try{throw new Error(i)}catch{}}}function ub(){return Math.random().toString(36).substring(2,10)}function Up(n,i){return{usr:n.state,key:n.key,idx:i,masked:n.unstable_mask?{pathname:n.pathname,search:n.search,hash:n.hash}:void 0}}function _r(n,i,r=null,s,c){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof i=="string"?Sn(i):i,state:r,key:i&&i.key||s||ub(),unstable_mask:c}}function Wa({pathname:n="/",search:i="",hash:r=""}){return i&&i!=="?"&&(n+=i.charAt(0)==="?"?i:"?"+i),r&&r!=="#"&&(n+=r.charAt(0)==="#"?r:"#"+r),n}function Sn(n){let i={};if(n){let r=n.indexOf("#");r>=0&&(i.hash=n.substring(r),n=n.substring(0,r));let s=n.indexOf("?");s>=0&&(i.search=n.substring(s),n=n.substring(0,s)),n&&(i.pathname=n)}return i}function db(n,i,r,s={}){let{window:c=document.defaultView,v5Compat:d=!1}=s,h=c.history,p="POP",g=null,m=b();m==null&&(m=0,h.replaceState({...h.state,idx:m},""));function b(){return(h.state||{idx:null}).idx}function x(){p="POP";let k=b(),Z=k==null?null:k-m;m=k,g&&g({action:p,location:D.location,delta:Z})}function _(k,Z){p="PUSH";let G=kp(k)?k:_r(D.location,k,Z);m=b()+1;let K=Up(G,m),le=D.createHref(G.unstable_mask||G);try{h.pushState(K,"",le)}catch(F){if(F instanceof DOMException&&F.name==="DataCloneError")throw F;c.location.assign(le)}d&&g&&g({action:p,location:D.location,delta:1})}function j(k,Z){p="REPLACE";let G=kp(k)?k:_r(D.location,k,Z);m=b();let K=Up(G,m),le=D.createHref(G.unstable_mask||G);h.replaceState(K,"",le),d&&g&&g({action:p,location:D.location,delta:0})}function R(k){return Gg(k)}let D={get action(){return p},get location(){return n(c,h)},listen(k){if(g)throw new Error("A history only accepts one active listener");return c.addEventListener(Lp,x),g=k,()=>{c.removeEventListener(Lp,x),g=null}},createHref(k){return i(c,k)},createURL:R,encodeLocation(k){let Z=R(k);return{pathname:Z.pathname,search:Z.search,hash:Z.hash}},push:_,replace:j,go(k){return h.go(k)}};return D}function Gg(n,i=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),Le(r,"No window.location.(origin|href) available to create URL");let s=typeof n=="string"?n:Wa(n);return s=s.replace(/ $/,"%20"),!i&&s.startsWith("//")&&(s=r+s),new URL(s,r)}var pr,Hp=class{constructor(n){if(ob(this,pr,new Map),n)for(let[i,r]of n)this.set(i,r)}get(n){if(Bu(this,pr).has(n))return Bu(this,pr).get(n);if(n.defaultValue!==void 0)return n.defaultValue;throw new Error("No value found for context")}set(n,i){Bu(this,pr).set(n,i)}};pr=new WeakMap;var fb=new Set(["lazy","caseSensitive","path","id","index","children"]);function hb(n){return fb.has(n)}var mb=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function pb(n){return mb.has(n)}function gb(n){return n.index===!0}function jr(n,i,r=[],s={},c=!1){return n.map((d,h)=>{let p=[...r,String(h)],g=typeof d.id=="string"?d.id:p.join("-");if(Le(d.index!==!0||!d.children,"Cannot specify children on an index route"),Le(c||!s[g],`Found a route id collision on id "${g}". Route id's must be globally unique within Data Router usages`),gb(d)){let m={...d,id:g};return s[g]=Bp(m,i(m)),m}else{let m={...d,id:g,children:void 0};return s[g]=Bp(m,i(m)),d.children&&(m.children=jr(d.children,i,p,s,c)),m}})}function Bp(n,i){return Object.assign(n,{...i,...typeof i.lazy=="object"&&i.lazy!=null?{lazy:{...n.lazy,...i.lazy}}:{}})}function Wn(n,i,r="/"){return gr(n,i,r,!1)}function gr(n,i,r,s){let c=typeof i=="string"?Sn(i):i,d=Ra(c.pathname||"/",r);if(d==null)return null;let h=$g(n);xb(h);let p=null;for(let g=0;p==null&&g<h.length;++g){let m=zb(d);p=Cb(h[g],m,s)}return p}function yb(n,i){let{route:r,pathname:s,params:c}=n;return{id:r.id,pathname:s,params:c,data:i[r.id],loaderData:i[r.id],handle:r.handle}}function $g(n,i=[],r=[],s="",c=!1){let d=(h,p,g=c,m)=>{let b={relativePath:m===void 0?h.path||"":m,caseSensitive:h.caseSensitive===!0,childrenIndex:p,route:h};if(b.relativePath.startsWith("/")){if(!b.relativePath.startsWith(s)&&g)return;Le(b.relativePath.startsWith(s),`Absolute route path "${b.relativePath}" nested under path "${s}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),b.relativePath=b.relativePath.slice(s.length)}let x=Ha([s,b.relativePath]),_=r.concat(b);h.children&&h.children.length>0&&(Le(h.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${x}".`),$g(h.children,i,_,x,g)),!(h.path==null&&!h.index)&&i.push({path:x,score:Eb(x,h.index),routesMeta:_})};return n.forEach((h,p)=>{if(h.path===""||!h.path?.includes("?"))d(h,p);else for(let g of Kg(h.path))d(h,p,!0,g)}),i}function Kg(n){let i=n.split("/");if(i.length===0)return[];let[r,...s]=i,c=r.endsWith("?"),d=r.replace(/\?$/,"");if(s.length===0)return c?[d,""]:[d];let h=Kg(s.join("/")),p=[];return p.push(...h.map(g=>g===""?d:[d,g].join("/"))),c&&p.push(...h),p.map(g=>n.startsWith("/")&&g===""?"/":g)}function xb(n){n.sort((i,r)=>i.score!==r.score?r.score-i.score:wb(i.routesMeta.map(s=>s.childrenIndex),r.routesMeta.map(s=>s.childrenIndex)))}var vb=/^:[\w-]+$/,bb=3,Sb=2,_b=1,jb=10,Nb=-2,qp=n=>n==="*";function Eb(n,i){let r=n.split("/"),s=r.length;return r.some(qp)&&(s+=Nb),i&&(s+=Sb),r.filter(c=>!qp(c)).reduce((c,d)=>c+(vb.test(d)?bb:d===""?_b:jb),s)}function wb(n,i){return n.length===i.length&&n.slice(0,-1).every((s,c)=>s===i[c])?n[n.length-1]-i[i.length-1]:0}function Cb(n,i,r=!1){let{routesMeta:s}=n,c={},d="/",h=[];for(let p=0;p<s.length;++p){let g=s[p],m=p===s.length-1,b=d==="/"?i:i.slice(d.length)||"/",x=so({path:g.relativePath,caseSensitive:g.caseSensitive,end:m},b),_=g.route;if(!x&&m&&r&&!s[s.length-1].route.index&&(x=so({path:g.relativePath,caseSensitive:g.caseSensitive,end:!1},b)),!x)return null;Object.assign(c,x.params),h.push({params:c,pathname:Ha([d,x.pathname]),pathnameBase:Db(Ha([d,x.pathnameBase])),route:_}),x.pathnameBase!=="/"&&(d=Ha([d,x.pathnameBase]))}return h}function so(n,i){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[r,s]=Rb(n.path,n.caseSensitive,n.end),c=i.match(r);if(!c)return null;let d=c[0],h=d.replace(/(.)\/+$/,"$1"),p=c.slice(1);return{params:s.reduce((m,{paramName:b,isOptional:x},_)=>{if(b==="*"){let R=p[_]||"";h=d.slice(0,d.length-R.length).replace(/(.)\/+$/,"$1")}const j=p[_];return x&&!j?m[b]=void 0:m[b]=(j||"").replace(/%2F/g,"/"),m},{}),pathname:d,pathnameBase:h,pattern:n}}function Rb(n,i=!1,r=!0){mt(n==="*"||!n.endsWith("*")||n.endsWith("/*"),`Route path "${n}" will be treated as if it were "${n.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${n.replace(/\*$/,"/*")}".`);let s=[],c="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(h,p,g,m,b)=>{if(s.push({paramName:p,isOptional:g!=null}),g){let x=b.charAt(m+h.length);return x&&x!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return n.endsWith("*")?(s.push({paramName:"*"}),c+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?c+="\\/*$":n!==""&&n!=="/"&&(c+="(?:(?=\\/|$))"),[new RegExp(c,i?void 0:"i"),s]}function zb(n){try{return n.split("/").map(i=>decodeURIComponent(i).replace(/\//g,"%2F")).join("/")}catch(i){return mt(!1,`The URL path "${n}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${i}).`),n}}function Ra(n,i){if(i==="/")return n;if(!n.toLowerCase().startsWith(i.toLowerCase()))return null;let r=i.endsWith("/")?i.length-1:i.length,s=n.charAt(r);return s&&s!=="/"?null:n.slice(r)||"/"}function Tb({basename:n,pathname:i}){return i==="/"?n:Ha([n,i])}var Xg=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,od=n=>Xg.test(n);function Ob(n,i="/"){let{pathname:r,search:s="",hash:c=""}=typeof n=="string"?Sn(n):n,d;return r?(r=r.replace(/\/\/+/g,"/"),r.startsWith("/")?d=Yp(r.substring(1),"/"):d=Yp(r,i)):d=i,{pathname:d,search:Mb(s),hash:Ab(c)}}function Yp(n,i){let r=i.replace(/\/+$/,"").split("/");return n.split("/").forEach(c=>{c===".."?r.length>1&&r.pop():c!=="."&&r.push(c)}),r.length>1?r.join("/"):"/"}function qu(n,i,r,s){return`Cannot include a '${n}' character in a manually specified \`to.${i}\` field [${JSON.stringify(s)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Qg(n){return n.filter((i,r)=>r===0||i.route.path&&i.route.path.length>0)}function fo(n){let i=Qg(n);return i.map((r,s)=>s===i.length-1?r.pathname:r.pathnameBase)}function Cr(n,i,r,s=!1){let c;typeof n=="string"?c=Sn(n):(c={...n},Le(!c.pathname||!c.pathname.includes("?"),qu("?","pathname","search",c)),Le(!c.pathname||!c.pathname.includes("#"),qu("#","pathname","hash",c)),Le(!c.search||!c.search.includes("#"),qu("#","search","hash",c)));let d=n===""||c.pathname==="",h=d?"/":c.pathname,p;if(h==null)p=r;else{let x=i.length-1;if(!s&&h.startsWith("..")){let _=h.split("/");for(;_[0]==="..";)_.shift(),x-=1;c.pathname=_.join("/")}p=x>=0?i[x]:"/"}let g=Ob(c,p),m=h&&h!=="/"&&h.endsWith("/"),b=(d||h===".")&&r.endsWith("/");return!g.pathname.endsWith("/")&&(m||b)&&(g.pathname+="/"),g}var Ha=n=>n.join("/").replace(/\/\/+/g,"/"),Db=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),Mb=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,Ab=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n,Rr=class{constructor(n,i,r,s=!1){this.status=n,this.statusText=i||"",this.internal=s,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function Nr(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}function zr(n){return n.map(i=>i.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Zg=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Fg(n,i){let r=n;if(typeof r!="string"||!Xg.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let s=r,c=!1;if(Zg)try{let d=new URL(window.location.href),h=r.startsWith("//")?new URL(d.protocol+r):new URL(r),p=Ra(h.pathname,i);h.origin===d.origin&&p!=null?r=p+h.search+h.hash:c=!0}catch{mt(!1,`<Link to="${r}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:s,isExternal:c,to:r}}var In=Symbol("Uninstrumented");function Lb(n,i){let r={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};n.forEach(c=>c({id:i.id,index:i.index,path:i.path,instrument(d){let h=Object.keys(r);for(let p of h)d[p]&&r[p].push(d[p])}}));let s={};if(typeof i.lazy=="function"&&r.lazy.length>0){let c=hi(r.lazy,i.lazy,()=>{});c&&(s.lazy=c)}if(typeof i.lazy=="object"){let c=i.lazy;["middleware","loader","action"].forEach(d=>{let h=c[d],p=r[`lazy.${d}`];if(typeof h=="function"&&p.length>0){let g=hi(p,h,()=>{});g&&(s.lazy=Object.assign(s.lazy||{},{[d]:g}))}})}return["loader","action"].forEach(c=>{let d=i[c];if(typeof d=="function"&&r[c].length>0){let h=d[In]??d,p=hi(r[c],h,(...g)=>Vp(g[0]));p&&(c==="loader"&&h.hydrate===!0&&(p.hydrate=!0),p[In]=h,s[c]=p)}}),i.middleware&&i.middleware.length>0&&r.middleware.length>0&&(s.middleware=i.middleware.map(c=>{let d=c[In]??c,h=hi(r.middleware,d,(...p)=>Vp(p[0]));return h?(h[In]=d,h):c})),s}function kb(n,i){let r={navigate:[],fetch:[]};if(i.forEach(s=>s({instrument(c){let d=Object.keys(c);for(let h of d)c[h]&&r[h].push(c[h])}})),r.navigate.length>0){let s=n.navigate[In]??n.navigate,c=hi(r.navigate,s,(...d)=>{let[h,p]=d;return{to:typeof h=="number"||typeof h=="string"?h:h?Wa(h):".",...Gp(n,p??{})}});c&&(c[In]=s,n.navigate=c)}if(r.fetch.length>0){let s=n.fetch[In]??n.fetch,c=hi(r.fetch,s,(...d)=>{let[h,,p,g]=d;return{href:p??".",fetcherKey:h,...Gp(n,g??{})}});c&&(c[In]=s,n.fetch=c)}return n}function hi(n,i,r){return n.length===0?null:async(...s)=>{let c=await Jg(n,r(...s),()=>i(...s),n.length-1);if(c.type==="error")throw c.value;return c.value}}async function Jg(n,i,r,s){let c=n[s],d;if(c){let h,p=async()=>(h?console.error("You cannot call instrumented handlers more than once"):h=Jg(n,i,r,s-1),d=await h,Le(d,"Expected a result"),d.type==="error"&&d.value instanceof Error?{status:"error",error:d.value}:{status:"success",error:void 0});try{await c(p,i)}catch(g){console.error("An instrumentation function threw an error:",g)}h||await p(),await h}else try{d={type:"success",value:await r()}}catch(h){d={type:"error",value:h}}return d||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function Vp(n){let{request:i,context:r,params:s,unstable_pattern:c}=n;return{request:Ub(i),params:{...s},unstable_pattern:c,context:Hb(r)}}function Gp(n,i){return{currentUrl:Wa(n.state.location),..."formMethod"in i?{formMethod:i.formMethod}:{},..."formEncType"in i?{formEncType:i.formEncType}:{},..."formData"in i?{formData:i.formData}:{},..."body"in i?{body:i.body}:{}}}function Ub(n){return{method:n.method,url:n.url,headers:{get:(...i)=>n.headers.get(...i)}}}function Hb(n){if(qb(n)){let i={...n};return Object.freeze(i),i}else return{get:i=>n.get(i)}}var Bb=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function qb(n){if(n===null||typeof n!="object")return!1;const i=Object.getPrototypeOf(n);return i===Object.prototype||i===null||Object.getOwnPropertyNames(i).sort().join("\0")===Bb}var Wg=["POST","PUT","PATCH","DELETE"],Yb=new Set(Wg),Vb=["GET",...Wg],Gb=new Set(Vb),Pg=new Set([301,302,303,307,308]),$b=new Set([307,308]),Yu={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Kb={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},dr={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Xb=n=>({hasErrorBoundary:!!n.hasErrorBoundary}),Ig="remix-router-transitions",ey=Symbol("ResetLoaderData");function Qb(n){const i=n.window?n.window:typeof window<"u"?window:void 0,r=typeof i<"u"&&typeof i.document<"u"&&typeof i.document.createElement<"u";Le(n.routes.length>0,"You must provide a non-empty routes array to createRouter");let s=n.hydrationRouteProperties||[],c=n.mapRouteProperties||Xb,d=c;if(n.unstable_instrumentations){let C=n.unstable_instrumentations;d=T=>({...c(T),...Lb(C.map(H=>H.route).filter(Boolean),T)})}let h={},p=jr(n.routes,d,void 0,h),g,m=n.basename||"/";m.startsWith("/")||(m=`/${m}`);let b=n.dataStrategy||Pb,x={...n.future},_=null,j=new Set,R=null,D=null,k=null,Z=n.hydrationData!=null,G=Wn(p,n.history.location,m),K=!1,le=null,F,I;if(G==null&&!n.patchRoutesOnNavigation){let C=wa(404,{pathname:n.history.location.pathname}),{matches:T,route:H}=Fs(p);F=!0,I=!F,G=T,le={[H.id]:C}}else if(G&&!n.hydrationData&&wn(G,p,n.history.location.pathname).active&&(G=null),G)if(G.some(C=>C.route.lazy))F=!1,I=!F;else if(!G.some(C=>cd(C.route)))F=!0,I=!F;else{let C=n.hydrationData?n.hydrationData.loaderData:null,T=n.hydrationData?n.hydrationData.errors:null,H=G;if(T){let ae=G.findIndex(ne=>T[ne.route.id]!==void 0);H=H.slice(0,ae+1)}I=!1,F=H.every(ae=>{let ne=ty(ae.route,C,T);return I=I||ne.renderFallback,!ne.shouldLoad})}else{F=!1,I=!F,G=[];let C=wn(null,p,n.history.location.pathname);C.active&&C.matches&&(K=!0,G=C.matches)}let W,N={historyAction:n.history.action,location:n.history.location,matches:G,initialized:F,renderFallback:I,navigation:Yu,restoreScrollPosition:n.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:n.hydrationData&&n.hydrationData.loaderData||{},actionData:n.hydrationData&&n.hydrationData.actionData||null,errors:n.hydrationData&&n.hydrationData.errors||le,fetchers:new Map,blockers:new Map},Y="POP",J=null,he=!1,ie,ee=!1,se=new Map,ge=null,M=!1,P=!1,de=new Set,$=new Map,fe=0,E=-1,B=new Map,te=new Set,re=new Map,je=new Map,_e=new Set,Oe=new Map,at,ue=null;function vt(){if(_=n.history.listen(({action:C,location:T,delta:H})=>{if(at){at(),at=void 0;return}mt(Oe.size===0||H!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let ae=Ma({currentLocation:N.location,nextLocation:T,historyAction:C});if(ae&&H!=null){let ne=new Promise(ye=>{at=ye});n.history.go(H*-1),ga(ae,{state:"blocked",location:T,proceed(){ga(ae,{state:"proceeding",proceed:void 0,reset:void 0,location:T}),ne.then(()=>n.history.go(H))},reset(){let ye=new Map(N.blockers);ye.set(ae,dr),Ie({blockers:ye})}}),J?.resolve(),J=null;return}return Xt(C,T)}),r){g1(i,se);let C=()=>y1(i,se);i.addEventListener("pagehide",C),ge=()=>i.removeEventListener("pagehide",C)}return N.initialized||Xt("POP",N.location,{initialHydration:!0}),W}function Ut(){_&&_(),ge&&ge(),j.clear(),ie&&ie.abort(),N.fetchers.forEach((C,T)=>Da(T)),N.blockers.forEach((C,T)=>Va(T))}function Et(C){return j.add(C),()=>j.delete(C)}function Ie(C,T={}){C.matches&&(C.matches=C.matches.map(ne=>{let ye=h[ne.route.id],ce=ne.route;return ce.element!==ye.element||ce.errorElement!==ye.errorElement||ce.hydrateFallbackElement!==ye.hydrateFallbackElement?{...ne,route:ye}:ne})),N={...N,...C};let H=[],ae=[];N.fetchers.forEach((ne,ye)=>{ne.state==="idle"&&(_e.has(ye)?H.push(ye):ae.push(ye))}),_e.forEach(ne=>{!N.fetchers.has(ne)&&!$.has(ne)&&H.push(ne)}),[...j].forEach(ne=>ne(N,{deletedFetchers:H,newErrors:C.errors??null,viewTransitionOpts:T.viewTransitionOpts,flushSync:T.flushSync===!0})),H.forEach(ne=>Da(ne)),ae.forEach(ne=>N.fetchers.delete(ne))}function pt(C,T,{flushSync:H}={}){let ae=N.actionData!=null&&N.navigation.formMethod!=null&&qt(N.navigation.formMethod)&&N.navigation.state==="loading"&&C.state?._isRedirect!==!0,ne;T.actionData?Object.keys(T.actionData).length>0?ne=T.actionData:ne=null:ae?ne=N.actionData:ne=null;let ye=T.loaderData?Ip(N.loaderData,T.loaderData,T.matches||[],T.errors):N.loaderData,ce=N.blockers;ce.size>0&&(ce=new Map(ce),ce.forEach((we,Se)=>ce.set(Se,dr)));let me=M?!1:bi(C,T.matches||N.matches),pe=he===!0||N.navigation.formMethod!=null&&qt(N.navigation.formMethod)&&C.state?._isRedirect!==!0;g&&(p=g,g=void 0),M||Y==="POP"||(Y==="PUSH"?n.history.push(C,C.state):Y==="REPLACE"&&n.history.replace(C,C.state));let Ne;if(Y==="POP"){let we=se.get(N.location.pathname);we&&we.has(C.pathname)?Ne={currentLocation:N.location,nextLocation:C}:se.has(C.pathname)&&(Ne={currentLocation:C,nextLocation:N.location})}else if(ee){let we=se.get(N.location.pathname);we?we.add(C.pathname):(we=new Set([C.pathname]),se.set(N.location.pathname,we)),Ne={currentLocation:N.location,nextLocation:C}}Ie({...T,actionData:ne,loaderData:ye,historyAction:Y,location:C,initialized:!0,renderFallback:!1,navigation:Yu,revalidation:"idle",restoreScrollPosition:me,preventScrollReset:pe,blockers:ce},{viewTransitionOpts:Ne,flushSync:H===!0}),Y="POP",he=!1,ee=!1,M=!1,P=!1,J?.resolve(),J=null,ue?.resolve(),ue=null}async function ha(C,T){if(J?.resolve(),J=null,typeof C=="number"){J||(J=ng());let et=J.promise;return n.history.go(C),et}let H=Iu(N.location,N.matches,m,C,T?.fromRouteId,T?.relative),{path:ae,submission:ne,error:ye}=$p(!1,H,T),ce;T?.unstable_mask&&(ce={pathname:"",search:"",hash:"",...typeof T.unstable_mask=="string"?Sn(T.unstable_mask):{...N.location.unstable_mask,...T.unstable_mask}});let me=N.location,pe=_r(me,ae,T&&T.state,void 0,ce);pe={...pe,...n.history.encodeLocation(pe)};let Ne=T&&T.replace!=null?T.replace:void 0,we="PUSH";Ne===!0?we="REPLACE":Ne===!1||ne!=null&&qt(ne.formMethod)&&ne.formAction===N.location.pathname+N.location.search&&(we="REPLACE");let Se=T&&"preventScrollReset"in T?T.preventScrollReset===!0:void 0,$e=(T&&T.flushSync)===!0,ke=Ma({currentLocation:me,nextLocation:pe,historyAction:we});if(ke){ga(ke,{state:"blocked",location:pe,proceed(){ga(ke,{state:"proceeding",proceed:void 0,reset:void 0,location:pe}),ha(C,T)},reset(){let et=new Map(N.blockers);et.set(ke,dr),Ie({blockers:et})}});return}await Xt(we,pe,{submission:ne,pendingError:ye,preventScrollReset:Se,replace:T&&T.replace,enableViewTransition:T&&T.viewTransition,flushSync:$e,callSiteDefaultShouldRevalidate:T&&T.unstable_defaultShouldRevalidate})}function Ia(){ue||(ue=ng()),Ya(),Ie({revalidation:"loading"});let C=ue.promise;return N.navigation.state==="submitting"?C:N.navigation.state==="idle"?(Xt(N.historyAction,N.location,{startUninterruptedRevalidation:!0}),C):(Xt(Y||N.historyAction,N.navigation.location,{overrideNavigation:N.navigation,enableViewTransition:ee===!0}),C)}async function Xt(C,T,H){ie&&ie.abort(),ie=null,Y=C,M=(H&&H.startUninterruptedRevalidation)===!0,So(N.location,N.matches),he=(H&&H.preventScrollReset)===!0,ee=(H&&H.enableViewTransition)===!0;let ae=g||p,ne=H&&H.overrideNavigation,ye=H?.initialHydration&&N.matches&&N.matches.length>0&&!K?N.matches:Wn(ae,T,m),ce=(H&&H.flushSync)===!0;if(ye&&N.initialized&&!P&&r1(N.location,T)&&!(H&&H.submission&&qt(H.submission.formMethod))){pt(T,{matches:ye},{flushSync:ce});return}let me=wn(ye,ae,T.pathname);if(me.active&&me.matches&&(ye=me.matches),!ye){let{error:lt,notFoundMatches:dt,route:Ge}=Ft(T.pathname);pt(T,{matches:dt,loaderData:{},errors:{[Ge.id]:lt}},{flushSync:ce});return}ie=new AbortController;let pe=di(n.history,T,ie.signal,H&&H.submission),Ne=n.getContext?await n.getContext():new Hp,we;if(H&&H.pendingError)we=[Pn(ye).route.id,{type:"error",error:H.pendingError}];else if(H&&H.submission&&qt(H.submission.formMethod)){let lt=await Gt(pe,T,H.submission,ye,Ne,me.active,H&&H.initialHydration===!0,{replace:H.replace,flushSync:ce});if(lt.shortCircuited)return;if(lt.pendingActionResult){let[dt,Ge]=lt.pendingActionResult;if(da(Ge)&&Nr(Ge.error)&&Ge.error.status===404){ie=null,pt(T,{matches:lt.matches,loaderData:{},errors:{[dt]:Ge.error}});return}}ye=lt.matches||ye,we=lt.pendingActionResult,ne=Vu(T,H.submission),ce=!1,me.active=!1,pe=di(n.history,pe.url,pe.signal)}let{shortCircuited:Se,matches:$e,loaderData:ke,errors:et}=await ma(pe,T,ye,Ne,me.active,ne,H&&H.submission,H&&H.fetcherSubmission,H&&H.replace,H&&H.initialHydration===!0,ce,we,H&&H.callSiteDefaultShouldRevalidate);Se||(ie=null,pt(T,{matches:$e||ye,...eg(we),loaderData:ke,errors:et}))}async function Gt(C,T,H,ae,ne,ye,ce,me={}){Ya();let pe=m1(T,H);if(Ie({navigation:pe},{flushSync:me.flushSync===!0}),ye){let Se=await Ga(ae,T.pathname,C.signal);if(Se.type==="aborted")return{shortCircuited:!0};if(Se.type==="error"){if(Se.partialMatches.length===0){let{matches:ke,route:et}=Fs(p);return{matches:ke,pendingActionResult:[et.id,{type:"error",error:Se.error}]}}let $e=Pn(Se.partialMatches).route.id;return{matches:Se.partialMatches,pendingActionResult:[$e,{type:"error",error:Se.error}]}}else if(Se.matches)ae=Se.matches;else{let{notFoundMatches:$e,error:ke,route:et}=Ft(T.pathname);return{matches:$e,pendingActionResult:[et.id,{type:"error",error:ke}]}}}let Ne,we=to(ae,T);if(!we.route.action&&!we.route.lazy)Ne={type:"error",error:wa(405,{method:C.method,pathname:T.pathname,routeId:we.route.id})};else{let Se=mi(d,h,C,ae,we,ce?[]:s,ne),$e=await qa(C,Se,ne,null);if(Ne=$e[we.route.id],!Ne){for(let ke of ae)if($e[ke.route.id]){Ne=$e[ke.route.id];break}}if(C.signal.aborted)return{shortCircuited:!0}}if(_l(Ne)){let Se;return me&&me.replace!=null?Se=me.replace:Se=Jp(Ne.response.headers.get("Location"),new URL(C.url),m,n.history)===N.location.pathname+N.location.search,await Oa(C,Ne,!0,{submission:H,replace:Se}),{shortCircuited:!0}}if(da(Ne)){let Se=Pn(ae,we.route.id);return(me&&me.replace)!==!0&&(Y="PUSH"),{matches:ae,pendingActionResult:[Se.route.id,Ne,we.route.id]}}return{matches:ae,pendingActionResult:[we.route.id,Ne]}}async function ma(C,T,H,ae,ne,ye,ce,me,pe,Ne,we,Se,$e){let ke=ye||Vu(T,ce),et=ce||me||ag(ke),lt=!M&&!Ne;if(ne){if(lt){let gt=pa(Se);Ie({navigation:ke,...gt!==void 0?{actionData:gt}:{}},{flushSync:we})}let Ue=await Ga(H,T.pathname,C.signal);if(Ue.type==="aborted")return{shortCircuited:!0};if(Ue.type==="error"){if(Ue.partialMatches.length===0){let{matches:Ht,route:bt}=Fs(p);return{matches:Ht,loaderData:{},errors:{[bt.id]:Ue.error}}}let gt=Pn(Ue.partialMatches).route.id;return{matches:Ue.partialMatches,loaderData:{},errors:{[gt]:Ue.error}}}else if(Ue.matches)H=Ue.matches;else{let{error:gt,notFoundMatches:Ht,route:bt}=Ft(T.pathname);return{matches:Ht,loaderData:{},errors:{[bt.id]:gt}}}}let dt=g||p,{dsMatches:Ge,revalidatingFetchers:wt}=Kp(C,ae,d,h,n.history,N,H,et,T,Ne?[]:s,Ne===!0,P,de,_e,re,te,dt,m,n.patchRoutesOnNavigation!=null,Se,$e);if(E=++fe,!n.dataStrategy&&!Ge.some(Ue=>Ue.shouldLoad)&&!Ge.some(Ue=>Ue.route.middleware&&Ue.route.middleware.length>0)&&wt.length===0){let Ue=ot();return pt(T,{matches:H,loaderData:{},errors:Se&&da(Se[1])?{[Se[0]]:Se[1].error}:null,...eg(Se),...Ue?{fetchers:new Map(N.fetchers)}:{}},{flushSync:we}),{shortCircuited:!0}}if(lt){let Ue={};if(!ne){Ue.navigation=ke;let gt=pa(Se);gt!==void 0&&(Ue.actionData=gt)}wt.length>0&&(Ue.fetchers=en(wt)),Ie(Ue,{flushSync:we})}wt.forEach(Ue=>{oe(Ue.key),Ue.controller&&$.set(Ue.key,Ue.controller)});let nt=()=>wt.forEach(Ue=>oe(Ue.key));ie&&ie.signal.addEventListener("abort",nt);let{loaderResults:Cn,fetcherResults:Aa}=await al(Ge,wt,C,ae);if(C.signal.aborted)return{shortCircuited:!0};ie&&ie.signal.removeEventListener("abort",nt),wt.forEach(Ue=>$.delete(Ue.key));let Rt=Js(Cn);if(Rt)return await Oa(C,Rt.result,!0,{replace:pe}),{shortCircuited:!0};if(Rt=Js(Aa),Rt)return te.add(Rt.key),await Oa(C,Rt.result,!0,{replace:pe}),{shortCircuited:!0};let{loaderData:$a,errors:nl}=Pp(N,H,Cn,Se,wt,Aa);Ne&&N.errors&&(nl={...N.errors,...nl});let Ka=ot(),ll=Zt(E),Cl=Ka||ll||wt.length>0;return{matches:H,loaderData:$a,errors:nl,...Cl?{fetchers:new Map(N.fetchers)}:{}}}function pa(C){if(C&&!da(C[1]))return{[C[0]]:C[1].data};if(N.actionData)return Object.keys(N.actionData).length===0?null:N.actionData}function en(C){return C.forEach(T=>{let H=N.fetchers.get(T.key),ae=fr(void 0,H?H.data:void 0);N.fetchers.set(T.key,ae)}),new Map(N.fetchers)}async function _n(C,T,H,ae){oe(C);let ne=(ae&&ae.flushSync)===!0,ye=g||p,ce=Iu(N.location,N.matches,m,H,T,ae?.relative),me=Wn(ye,ce,m),pe=wn(me,ye,ce);if(pe.active&&pe.matches&&(me=pe.matches),!me){Qt(C,T,wa(404,{pathname:ce}),{flushSync:ne});return}let{path:Ne,submission:we,error:Se}=$p(!0,ce,ae);if(Se){Qt(C,T,Se,{flushSync:ne});return}let $e=n.getContext?await n.getContext():new Hp,ke=(ae&&ae.preventScrollReset)===!0;if(we&&qt(we.formMethod)){await jn(C,T,Ne,me,$e,pe.active,ne,ke,we,ae&&ae.unstable_defaultShouldRevalidate);return}re.set(C,{routeId:T,path:Ne}),await Ot(C,T,Ne,me,$e,pe.active,ne,ke,we)}async function jn(C,T,H,ae,ne,ye,ce,me,pe,Ne){Ya(),re.delete(C);let we=N.fetchers.get(C);na(C,p1(pe,we),{flushSync:ce});let Se=new AbortController,$e=di(n.history,H,Se.signal,pe);if(ye){let it=await Ga(ae,new URL($e.url).pathname,$e.signal,C);if(it.type==="aborted")return;if(it.type==="error"){Qt(C,T,it.error,{flushSync:ce});return}else if(it.matches)ae=it.matches;else{Qt(C,T,wa(404,{pathname:H}),{flushSync:ce});return}}let ke=to(ae,H);if(!ke.route.action&&!ke.route.lazy){let it=wa(405,{method:pe.formMethod,pathname:H,routeId:T});Qt(C,T,it,{flushSync:ce});return}$.set(C,Se);let et=fe,lt=mi(d,h,$e,ae,ke,s,ne),dt=await qa($e,lt,ne,C),Ge=dt[ke.route.id];if(!Ge){for(let it of lt)if(dt[it.route.id]){Ge=dt[it.route.id];break}}if($e.signal.aborted){$.get(C)===Se&&$.delete(C);return}if(_e.has(C)){if(_l(Ge)||da(Ge)){na(C,vn(void 0));return}}else{if(_l(Ge))if($.delete(C),E>et){na(C,vn(void 0));return}else return te.add(C),na(C,fr(pe)),Oa($e,Ge,!1,{fetcherSubmission:pe,preventScrollReset:me});if(da(Ge)){Qt(C,T,Ge.error);return}}let wt=N.navigation.location||N.location,nt=di(n.history,wt,Se.signal),Cn=g||p,Aa=N.navigation.state!=="idle"?Wn(Cn,N.navigation.location,m):N.matches;Le(Aa,"Didn't find any matches after fetcher action");let Rt=++fe;B.set(C,Rt);let $a=fr(pe,Ge.data);N.fetchers.set(C,$a);let{dsMatches:nl,revalidatingFetchers:Ka}=Kp(nt,ne,d,h,n.history,N,Aa,pe,wt,s,!1,P,de,_e,re,te,Cn,m,n.patchRoutesOnNavigation!=null,[ke.route.id,Ge],Ne);Ka.filter(it=>it.key!==C).forEach(it=>{let Rl=it.key,zl=N.fetchers.get(Rl),Ur=fr(void 0,zl?zl.data:void 0);N.fetchers.set(Rl,Ur),oe(Rl),it.controller&&$.set(Rl,it.controller)}),Ie({fetchers:new Map(N.fetchers)});let ll=()=>Ka.forEach(it=>oe(it.key));Se.signal.addEventListener("abort",ll);let{loaderResults:Cl,fetcherResults:Ue}=await al(nl,Ka,nt,ne);if(Se.signal.aborted)return;if(Se.signal.removeEventListener("abort",ll),B.delete(C),$.delete(C),Ka.forEach(it=>$.delete(it.key)),N.fetchers.has(C)){let it=vn(Ge.data);N.fetchers.set(C,it)}let gt=Js(Cl);if(gt)return Oa(nt,gt.result,!1,{preventScrollReset:me});if(gt=Js(Ue),gt)return te.add(gt.key),Oa(nt,gt.result,!1,{preventScrollReset:me});let{loaderData:Ht,errors:bt}=Pp(N,Aa,Cl,void 0,Ka,Ue);Zt(Rt),N.navigation.state==="loading"&&Rt>E?(Le(Y,"Expected pending action"),ie&&ie.abort(),pt(N.navigation.location,{matches:Aa,loaderData:Ht,errors:bt,fetchers:new Map(N.fetchers)})):(Ie({errors:bt,loaderData:Ip(N.loaderData,Ht,Aa,bt),fetchers:new Map(N.fetchers)}),P=!1)}async function Ot(C,T,H,ae,ne,ye,ce,me,pe){let Ne=N.fetchers.get(C);na(C,fr(pe,Ne?Ne.data:void 0),{flushSync:ce});let we=new AbortController,Se=di(n.history,H,we.signal);if(ye){let Ge=await Ga(ae,new URL(Se.url).pathname,Se.signal,C);if(Ge.type==="aborted")return;if(Ge.type==="error"){Qt(C,T,Ge.error,{flushSync:ce});return}else if(Ge.matches)ae=Ge.matches;else{Qt(C,T,wa(404,{pathname:H}),{flushSync:ce});return}}let $e=to(ae,H);$.set(C,we);let ke=fe,et=mi(d,h,Se,ae,$e,s,ne),dt=(await qa(Se,et,ne,C))[$e.route.id];if($.get(C)===we&&$.delete(C),!Se.signal.aborted){if(_e.has(C)){na(C,vn(void 0));return}if(_l(dt))if(E>ke){na(C,vn(void 0));return}else{te.add(C),await Oa(Se,dt,!1,{preventScrollReset:me});return}if(da(dt)){Qt(C,T,dt.error);return}na(C,vn(dt.data))}}async function Oa(C,T,H,{submission:ae,fetcherSubmission:ne,preventScrollReset:ye,replace:ce}={}){H||(J?.resolve(),J=null),T.response.headers.has("X-Remix-Revalidate")&&(P=!0);let me=T.response.headers.get("Location");Le(me,"Expected a Location header on the redirect Response"),me=Jp(me,new URL(C.url),m,n.history);let pe=_r(N.location,me,{_isRedirect:!0});if(r){let et=!1;if(T.response.headers.has("X-Remix-Reload-Document"))et=!0;else if(od(me)){const lt=Gg(me,!0);et=lt.origin!==i.location.origin||Ra(lt.pathname,m)==null}if(et){ce?i.location.replace(me):i.location.assign(me);return}}ie=null;let Ne=ce===!0||T.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:we,formAction:Se,formEncType:$e}=N.navigation;!ae&&!ne&&we&&Se&&$e&&(ae=ag(N.navigation));let ke=ae||ne;if($b.has(T.response.status)&&ke&&qt(ke.formMethod))await Xt(Ne,pe,{submission:{...ke,formAction:me},preventScrollReset:ye||he,enableViewTransition:H?ee:void 0});else{let et=Vu(pe,ae);await Xt(Ne,pe,{overrideNavigation:et,fetcherSubmission:ne,preventScrollReset:ye||he,enableViewTransition:H?ee:void 0})}}async function qa(C,T,H,ae){let ne,ye={};try{ne=await e1(b,C,T,ae,H,!1)}catch(ce){return T.filter(me=>me.shouldLoad).forEach(me=>{ye[me.route.id]={type:"error",error:ce}}),ye}if(C.signal.aborted)return ye;if(!qt(C.method))for(let ce of T){if(ne[ce.route.id]?.type==="error")break;!ne.hasOwnProperty(ce.route.id)&&!N.loaderData.hasOwnProperty(ce.route.id)&&(!N.errors||!N.errors.hasOwnProperty(ce.route.id))&&ce.shouldCallHandler()&&(ne[ce.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${ce.route.id}`)})}for(let[ce,me]of Object.entries(ne))if(u1(me)){let pe=me.result;ye[ce]={type:"redirect",response:l1(pe,C,ce,T,m)}}else ye[ce]=await n1(me);return ye}async function al(C,T,H,ae){let ne=qa(H,C,ae,null),ye=Promise.all(T.map(async pe=>{if(pe.matches&&pe.match&&pe.request&&pe.controller){let we=(await qa(pe.request,pe.matches,ae,pe.key))[pe.match.route.id];return{[pe.key]:we}}else return Promise.resolve({[pe.key]:{type:"error",error:wa(404,{pathname:pe.path})}})})),ce=await ne,me=(await ye).reduce((pe,Ne)=>Object.assign(pe,Ne),{});return{loaderResults:ce,fetcherResults:me}}function Ya(){P=!0,re.forEach((C,T)=>{$.has(T)&&de.add(T),oe(T)})}function na(C,T,H={}){N.fetchers.set(C,T),Ie({fetchers:new Map(N.fetchers)},{flushSync:(H&&H.flushSync)===!0})}function Qt(C,T,H,ae={}){let ne=Pn(N.matches,T);Da(C),Ie({errors:{[ne.route.id]:H},fetchers:new Map(N.fetchers)},{flushSync:(ae&&ae.flushSync)===!0})}function wl(C){return je.set(C,(je.get(C)||0)+1),_e.has(C)&&_e.delete(C),N.fetchers.get(C)||Kb}function vi(C,T){oe(C,T?.reason),na(C,vn(null))}function Da(C){let T=N.fetchers.get(C);$.has(C)&&!(T&&T.state==="loading"&&B.has(C))&&oe(C),re.delete(C),B.delete(C),te.delete(C),_e.delete(C),de.delete(C),N.fetchers.delete(C)}function Dt(C){let T=(je.get(C)||0)-1;T<=0?(je.delete(C),_e.add(C)):je.set(C,T),Ie({fetchers:new Map(N.fetchers)})}function oe(C,T){let H=$.get(C);H&&(H.abort(T),$.delete(C))}function be(C){for(let T of C){let H=wl(T),ae=vn(H.data);N.fetchers.set(T,ae)}}function ot(){let C=[],T=!1;for(let H of te){let ae=N.fetchers.get(H);Le(ae,`Expected fetcher: ${H}`),ae.state==="loading"&&(te.delete(H),C.push(H),T=!0)}return be(C),T}function Zt(C){let T=[];for(let[H,ae]of B)if(ae<C){let ne=N.fetchers.get(H);Le(ne,`Expected fetcher: ${H}`),ne.state==="loading"&&(oe(H),B.delete(H),T.push(H))}return be(T),T.length>0}function ut(C,T){let H=N.blockers.get(C)||dr;return Oe.get(C)!==T&&Oe.set(C,T),H}function Va(C){N.blockers.delete(C),Oe.delete(C)}function ga(C,T){let H=N.blockers.get(C)||dr;Le(H.state==="unblocked"&&T.state==="blocked"||H.state==="blocked"&&T.state==="blocked"||H.state==="blocked"&&T.state==="proceeding"||H.state==="blocked"&&T.state==="unblocked"||H.state==="proceeding"&&T.state==="unblocked",`Invalid blocker state transition: ${H.state} -> ${T.state}`);let ae=new Map(N.blockers);ae.set(C,T),Ie({blockers:ae})}function Ma({currentLocation:C,nextLocation:T,historyAction:H}){if(Oe.size===0)return;Oe.size>1&&mt(!1,"A router only supports one blocker at a time");let ae=Array.from(Oe.entries()),[ne,ye]=ae[ae.length-1],ce=N.blockers.get(ne);if(!(ce&&ce.state==="proceeding")&&ye({currentLocation:C,nextLocation:T,historyAction:H}))return ne}function Ft(C){let T=wa(404,{pathname:C}),H=g||p,{matches:ae,route:ne}=Fs(H);return{notFoundMatches:ae,route:ne,error:T}}function Nn(C,T,H){if(R=C,k=T,D=H||null,!Z&&N.navigation===Yu){Z=!0;let ae=bi(N.location,N.matches);ae!=null&&Ie({restoreScrollPosition:ae})}return()=>{R=null,k=null,D=null}}function En(C,T){return D&&D(C,T.map(ae=>yb(ae,N.loaderData)))||C.key}function So(C,T){if(R&&k){let H=En(C,T);R[H]=k()}}function bi(C,T){if(R){let H=En(C,T),ae=R[H];if(typeof ae=="number")return ae}return null}function wn(C,T,H){if(n.patchRoutesOnNavigation)if(C){if(Object.keys(C[0].params).length>0)return{active:!0,matches:gr(T,H,m,!0)}}else return{active:!0,matches:gr(T,H,m,!0)||[]};return{active:!1,matches:null}}async function Ga(C,T,H,ae){if(!n.patchRoutesOnNavigation)return{type:"success",matches:C};let ne=C;for(;;){let ye=g==null,ce=g||p,me=h;try{await n.patchRoutesOnNavigation({signal:H,path:T,matches:ne,fetcherKey:ae,patch:(we,Se)=>{H.aborted||Xp(we,Se,ce,me,d,!1)}})}catch(we){return{type:"error",error:we,partialMatches:ne}}finally{ye&&!H.aborted&&(p=[...p])}if(H.aborted)return{type:"aborted"};let pe=Wn(ce,T,m),Ne=null;if(pe){if(Object.keys(pe[0].params).length===0)return{type:"success",matches:pe};if(Ne=gr(ce,T,m,!0),!(Ne&&ne.length<Ne.length&&Ar(ne,Ne.slice(0,ne.length))))return{type:"success",matches:pe}}if(Ne||(Ne=gr(ce,T,m,!0)),!Ne||Ar(ne,Ne))return{type:"success",matches:null};ne=Ne}}function Ar(C,T){return C.length===T.length&&C.every((H,ae)=>H.route.id===T[ae].route.id)}function Lr(C){h={},g=jr(C,d,void 0,h)}function kr(C,T,H=!1){let ae=g==null;Xp(C,T,g||p,h,d,H),ae&&(p=[...p],Ie({}))}return W={get basename(){return m},get future(){return x},get state(){return N},get routes(){return p},get window(){return i},initialize:vt,subscribe:Et,enableScrollRestoration:Nn,navigate:ha,fetch:_n,revalidate:Ia,createHref:C=>n.history.createHref(C),encodeLocation:C=>n.history.encodeLocation(C),getFetcher:wl,resetFetcher:vi,deleteFetcher:Dt,dispose:Ut,getBlocker:ut,deleteBlocker:Va,patchRoutes:kr,_internalFetchControllers:$,_internalSetRoutes:Lr,_internalSetStateDoNotUseOrYouWillBreakYourApp(C){Ie(C)}},n.unstable_instrumentations&&(W=kb(W,n.unstable_instrumentations.map(C=>C.router).filter(Boolean))),W}function Zb(n){return n!=null&&("formData"in n&&n.formData!=null||"body"in n&&n.body!==void 0)}function Iu(n,i,r,s,c,d){let h,p;if(c){h=[];for(let m of i)if(h.push(m),m.route.id===c){p=m;break}}else h=i,p=i[i.length-1];let g=Cr(s||".",fo(h),Ra(n.pathname,r)||n.pathname,d==="path");if(s==null&&(g.search=n.search,g.hash=n.hash),(s==null||s===""||s===".")&&p){let m=dd(g.search);if(p.route.index&&!m)g.search=g.search?g.search.replace(/^\?/,"?index&"):"?index";else if(!p.route.index&&m){let b=new URLSearchParams(g.search),x=b.getAll("index");b.delete("index"),x.filter(j=>j).forEach(j=>b.append("index",j));let _=b.toString();g.search=_?`?${_}`:""}}return r!=="/"&&(g.pathname=Tb({basename:r,pathname:g.pathname})),Wa(g)}function $p(n,i,r){if(!r||!Zb(r))return{path:i};if(r.formMethod&&!h1(r.formMethod))return{path:i,error:wa(405,{method:r.formMethod})};let s=()=>({path:i,error:wa(400,{type:"invalid-body"})}),d=(r.formMethod||"get").toUpperCase(),h=sy(i);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!qt(d))return s();let x=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((_,[j,R])=>`${_}${j}=${R}
|
|
10
|
+
`,""):String(r.body);return{path:i,submission:{formMethod:d,formAction:h,formEncType:r.formEncType,formData:void 0,json:void 0,text:x}}}else if(r.formEncType==="application/json"){if(!qt(d))return s();try{let x=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:i,submission:{formMethod:d,formAction:h,formEncType:r.formEncType,formData:void 0,json:x,text:void 0}}}catch{return s()}}}Le(typeof FormData=="function","FormData is not available in this environment");let p,g;if(r.formData)p=td(r.formData),g=r.formData;else if(r.body instanceof FormData)p=td(r.body),g=r.body;else if(r.body instanceof URLSearchParams)p=r.body,g=Wp(p);else if(r.body==null)p=new URLSearchParams,g=new FormData;else try{p=new URLSearchParams(r.body),g=Wp(p)}catch{return s()}let m={formMethod:d,formAction:h,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:g,json:void 0,text:void 0};if(qt(m.formMethod))return{path:i,submission:m};let b=Sn(i);return n&&b.search&&dd(b.search)&&p.append("index",""),b.search=`?${p}`,{path:Wa(b),submission:m}}function Kp(n,i,r,s,c,d,h,p,g,m,b,x,_,j,R,D,k,Z,G,K,le){let F=K?da(K[1])?K[1].error:K[1].data:void 0,I=c.createURL(d.location),W=c.createURL(g),N;if(b&&d.errors){let ge=Object.keys(d.errors)[0];N=h.findIndex(M=>M.route.id===ge)}else if(K&&da(K[1])){let ge=K[0];N=h.findIndex(M=>M.route.id===ge)-1}let Y=K?K[1].statusCode:void 0,J=Y&&Y>=400,he={currentUrl:I,currentParams:d.matches[0]?.params||{},nextUrl:W,nextParams:h[0].params,...p,actionResult:F,actionStatus:Y},ie=zr(h),ee=h.map((ge,M)=>{let{route:P}=ge,de=null;if(N!=null&&M>N)de=!1;else if(P.lazy)de=!0;else if(!cd(P))de=!1;else if(b){let{shouldLoad:B}=ty(P,d.loaderData,d.errors);de=B}else Fb(d.loaderData,d.matches[M],ge)&&(de=!0);if(de!==null)return ed(r,s,n,ie,ge,m,i,de);let $=!1;typeof le=="boolean"?$=le:J?$=!1:(x||I.pathname+I.search===W.pathname+W.search||I.search!==W.search||Jb(d.matches[M],ge))&&($=!0);let fe={...he,defaultShouldRevalidate:$},E=br(ge,fe);return ed(r,s,n,ie,ge,m,i,E,fe,le)}),se=[];return R.forEach((ge,M)=>{if(b||!h.some(re=>re.route.id===ge.routeId)||j.has(M))return;let P=d.fetchers.get(M),de=P&&P.state!=="idle"&&P.data===void 0,$=Wn(k,ge.path,Z);if(!$){if(G&&de)return;se.push({key:M,routeId:ge.routeId,path:ge.path,matches:null,match:null,request:null,controller:null});return}if(D.has(M))return;let fe=to($,ge.path),E=new AbortController,B=di(c,ge.path,E.signal),te=null;if(_.has(M))_.delete(M),te=mi(r,s,B,$,fe,m,i);else if(de)x&&(te=mi(r,s,B,$,fe,m,i));else{let re;typeof le=="boolean"?re=le:J?re=!1:re=x;let je={...he,defaultShouldRevalidate:re};br(fe,je)&&(te=mi(r,s,B,$,fe,m,i,je))}te&&se.push({key:M,routeId:ge.routeId,path:ge.path,matches:te,match:fe,request:B,controller:E})}),{dsMatches:ee,revalidatingFetchers:se}}function cd(n){return n.loader!=null||n.middleware!=null&&n.middleware.length>0}function ty(n,i,r){if(n.lazy)return{shouldLoad:!0,renderFallback:!0};if(!cd(n))return{shouldLoad:!1,renderFallback:!1};let s=i!=null&&n.id in i,c=r!=null&&r[n.id]!==void 0;if(!s&&c)return{shouldLoad:!1,renderFallback:!1};if(typeof n.loader=="function"&&n.loader.hydrate===!0)return{shouldLoad:!0,renderFallback:!s};let d=!s&&!c;return{shouldLoad:d,renderFallback:d}}function Fb(n,i,r){let s=!i||r.route.id!==i.route.id,c=!n.hasOwnProperty(r.route.id);return s||c}function Jb(n,i){let r=n.route.path;return n.pathname!==i.pathname||r!=null&&r.endsWith("*")&&n.params["*"]!==i.params["*"]}function br(n,i){if(n.route.shouldRevalidate){let r=n.route.shouldRevalidate(i);if(typeof r=="boolean")return r}return i.defaultShouldRevalidate}function Xp(n,i,r,s,c,d){let h;if(n){let m=s[n];Le(m,`No route found to patch children into: routeId = ${n}`),m.children||(m.children=[]),h=m.children}else h=r;let p=[],g=[];if(i.forEach(m=>{let b=h.find(x=>ay(m,x));b?g.push({existingRoute:b,newRoute:m}):p.push(m)}),p.length>0){let m=jr(p,c,[n||"_","patch",String(h?.length||"0")],s);h.push(...m)}if(d&&g.length>0)for(let m=0;m<g.length;m++){let{existingRoute:b,newRoute:x}=g[m],_=b,[j]=jr([x],c,[],{},!0);Object.assign(_,{element:j.element?j.element:_.element,errorElement:j.errorElement?j.errorElement:_.errorElement,hydrateFallbackElement:j.hydrateFallbackElement?j.hydrateFallbackElement:_.hydrateFallbackElement})}}function ay(n,i){return"id"in n&&"id"in i&&n.id===i.id?!0:n.index===i.index&&n.path===i.path&&n.caseSensitive===i.caseSensitive?(!n.children||n.children.length===0)&&(!i.children||i.children.length===0)?!0:n.children?.every((r,s)=>i.children?.some(c=>ay(r,c)))??!1:!1}var Qp=new WeakMap,ny=({key:n,route:i,manifest:r,mapRouteProperties:s})=>{let c=r[i.id];if(Le(c,"No route found in manifest"),!c.lazy||typeof c.lazy!="object")return;let d=c.lazy[n];if(!d)return;let h=Qp.get(c);h||(h={},Qp.set(c,h));let p=h[n];if(p)return p;let g=(async()=>{let m=hb(n),x=c[n]!==void 0&&n!=="hasErrorBoundary";if(m)mt(!m,"Route property "+n+" is not a supported lazy route property. This property will be ignored."),h[n]=Promise.resolve();else if(x)mt(!1,`Route "${c.id}" has a static property "${n}" defined. The lazy property will be ignored.`);else{let _=await d();_!=null&&(Object.assign(c,{[n]:_}),Object.assign(c,s(c)))}typeof c.lazy=="object"&&(c.lazy[n]=void 0,Object.values(c.lazy).every(_=>_===void 0)&&(c.lazy=void 0))})();return h[n]=g,g},Zp=new WeakMap;function Wb(n,i,r,s,c){let d=r[n.id];if(Le(d,"No route found in manifest"),!n.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof n.lazy=="function"){let b=Zp.get(d);if(b)return{lazyRoutePromise:b,lazyHandlerPromise:b};let x=(async()=>{Le(typeof n.lazy=="function","No lazy route function found");let _=await n.lazy(),j={};for(let R in _){let D=_[R];if(D===void 0)continue;let k=pb(R),G=d[R]!==void 0&&R!=="hasErrorBoundary";k?mt(!k,"Route property "+R+" is not a supported property to be returned from a lazy route function. This property will be ignored."):G?mt(!G,`Route "${d.id}" has a static property "${R}" defined but its lazy function is also returning a value for this property. The lazy route property "${R}" will be ignored.`):j[R]=D}Object.assign(d,j),Object.assign(d,{...s(d),lazy:void 0})})();return Zp.set(d,x),x.catch(()=>{}),{lazyRoutePromise:x,lazyHandlerPromise:x}}let h=Object.keys(n.lazy),p=[],g;for(let b of h){if(c&&c.includes(b))continue;let x=ny({key:b,route:n,manifest:r,mapRouteProperties:s});x&&(p.push(x),b===i&&(g=x))}let m=p.length>0?Promise.all(p).then(()=>{}):void 0;return m?.catch(()=>{}),g?.catch(()=>{}),{lazyRoutePromise:m,lazyHandlerPromise:g}}async function Fp(n){let i=n.matches.filter(c=>c.shouldLoad),r={};return(await Promise.all(i.map(c=>c.resolve()))).forEach((c,d)=>{r[i[d].route.id]=c}),r}async function Pb(n){return n.matches.some(i=>i.route.middleware)?ly(n,()=>Fp(n)):Fp(n)}function ly(n,i){return Ib(n,i,s=>{if(f1(s))throw s;return s},o1,r);function r(s,c,d){if(d)return Promise.resolve(Object.assign(d.value,{[c]:{type:"error",result:s}}));{let{matches:h}=n,p=Math.min(Math.max(h.findIndex(m=>m.route.id===c),0),Math.max(h.findIndex(m=>m.shouldCallHandler()),0)),g=Pn(h,h[p].route.id).route.id;return Promise.resolve({[g]:{type:"error",result:s}})}}}async function Ib(n,i,r,s,c){let{matches:d,request:h,params:p,context:g,unstable_pattern:m}=n,b=d.flatMap(_=>_.route.middleware?_.route.middleware.map(j=>[_.route.id,j]):[]);return await iy({request:h,params:p,context:g,unstable_pattern:m},b,i,r,s,c)}async function iy(n,i,r,s,c,d,h=0){let{request:p}=n;if(p.signal.aborted)throw p.signal.reason??new Error(`Request aborted: ${p.method} ${p.url}`);let g=i[h];if(!g)return await r();let[m,b]=g,x,_=async()=>{if(x)throw new Error("You may only call `next()` once per middleware");try{return x={value:await iy(n,i,r,s,c,d,h+1)},x.value}catch(j){return x={value:await d(j,m,x)},x.value}};try{let j=await b(n,_),R=j!=null?s(j):void 0;return c(R)?R:x?R??x.value:(x={value:await _()},x.value)}catch(j){return await d(j,m,x)}}function ry(n,i,r,s,c){let d=ny({key:"middleware",route:s.route,manifest:i,mapRouteProperties:n}),h=Wb(s.route,qt(r.method)?"action":"loader",i,n,c);return{middleware:d,route:h.lazyRoutePromise,handler:h.lazyHandlerPromise}}function ed(n,i,r,s,c,d,h,p,g=null,m){let b=!1,x=ry(n,i,r,c,d);return{...c,_lazyPromises:x,shouldLoad:p,shouldRevalidateArgs:g,shouldCallHandler(_){return b=!0,g?typeof m=="boolean"?br(c,{...g,defaultShouldRevalidate:m}):typeof _=="boolean"?br(c,{...g,defaultShouldRevalidate:_}):br(c,g):p},resolve(_){let{lazy:j,loader:R,middleware:D}=c.route,k=b||p||_&&!qt(r.method)&&(j||R),Z=D&&D.length>0&&!R&&!j;return k&&(qt(r.method)||!Z)?t1({request:r,unstable_pattern:s,match:c,lazyHandlerPromise:x?.handler,lazyRoutePromise:x?.route,handlerOverride:_,scopedContext:h}):Promise.resolve({type:"data",result:void 0})}}}function mi(n,i,r,s,c,d,h,p=null){return s.map(g=>g.route.id!==c.route.id?{...g,shouldLoad:!1,shouldRevalidateArgs:p,shouldCallHandler:()=>!1,_lazyPromises:ry(n,i,r,g,d),resolve:()=>Promise.resolve({type:"data",result:void 0})}:ed(n,i,r,zr(s),g,d,h,!0,p))}async function e1(n,i,r,s,c,d){r.some(m=>m._lazyPromises?.middleware)&&await Promise.all(r.map(m=>m._lazyPromises?.middleware));let h={request:i,unstable_pattern:zr(r),params:r[0].params,context:c,matches:r},g=await n({...h,fetcherKey:s,runClientMiddleware:m=>{let b=h;return ly(b,()=>m({...b,fetcherKey:s,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(r.flatMap(m=>[m._lazyPromises?.handler,m._lazyPromises?.route]))}catch{}return g}async function t1({request:n,unstable_pattern:i,match:r,lazyHandlerPromise:s,lazyRoutePromise:c,handlerOverride:d,scopedContext:h}){let p,g,m=qt(n.method),b=m?"action":"loader",x=_=>{let j,R=new Promise((Z,G)=>j=G);g=()=>j(),n.signal.addEventListener("abort",g);let D=Z=>typeof _!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${b}" [routeId: ${r.route.id}]`)):_({request:n,unstable_pattern:i,params:r.params,context:h},...Z!==void 0?[Z]:[]),k=(async()=>{try{return{type:"data",result:await(d?d(G=>D(G)):D())}}catch(Z){return{type:"error",result:Z}}})();return Promise.race([k,R])};try{let _=m?r.route.action:r.route.loader;if(s||c)if(_){let j,[R]=await Promise.all([x(_).catch(D=>{j=D}),s,c]);if(j!==void 0)throw j;p=R}else{await s;let j=m?r.route.action:r.route.loader;if(j)[p]=await Promise.all([x(j),c]);else if(b==="action"){let R=new URL(n.url),D=R.pathname+R.search;throw wa(405,{method:n.method,pathname:D,routeId:r.route.id})}else return{type:"data",result:void 0}}else if(_)p=await x(_);else{let j=new URL(n.url),R=j.pathname+j.search;throw wa(404,{pathname:R})}}catch(_){return{type:"error",result:_}}finally{g&&n.signal.removeEventListener("abort",g)}return p}async function a1(n){let i=n.headers.get("Content-Type");return i&&/\bapplication\/json\b/.test(i)?n.body==null?null:n.json():n.text()}async function n1(n){let{result:i,type:r}=n;if(ud(i)){let s;try{s=await a1(i)}catch(c){return{type:"error",error:c}}return r==="error"?{type:"error",error:new Rr(i.status,i.statusText,s),statusCode:i.status,headers:i.headers}:{type:"data",data:s,statusCode:i.status,headers:i.headers}}return r==="error"?tg(i)?i.data instanceof Error?{type:"error",error:i.data,statusCode:i.init?.status,headers:i.init?.headers?new Headers(i.init.headers):void 0}:{type:"error",error:s1(i),statusCode:Nr(i)?i.status:void 0,headers:i.init?.headers?new Headers(i.init.headers):void 0}:{type:"error",error:i,statusCode:Nr(i)?i.status:void 0}:tg(i)?{type:"data",data:i.data,statusCode:i.init?.status,headers:i.init?.headers?new Headers(i.init.headers):void 0}:{type:"data",data:i}}function l1(n,i,r,s,c){let d=n.headers.get("Location");if(Le(d,"Redirects returned/thrown from loaders/actions must have a Location header"),!od(d)){let h=s.slice(0,s.findIndex(p=>p.route.id===r)+1);d=Iu(new URL(i.url),h,c,d),n.headers.set("Location",d)}return n}function Jp(n,i,r,s){let c=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(od(n)){let d=n,h=d.startsWith("//")?new URL(i.protocol+d):new URL(d);if(c.includes(h.protocol))throw new Error("Invalid redirect location");let p=Ra(h.pathname,r)!=null;if(h.origin===i.origin&&p)return h.pathname+h.search+h.hash}try{let d=s.createURL(n);if(c.includes(d.protocol))throw new Error("Invalid redirect location")}catch{}return n}function di(n,i,r,s){let c=n.createURL(sy(i)).toString(),d={signal:r};if(s&&qt(s.formMethod)){let{formMethod:h,formEncType:p}=s;d.method=h.toUpperCase(),p==="application/json"?(d.headers=new Headers({"Content-Type":p}),d.body=JSON.stringify(s.json)):p==="text/plain"?d.body=s.text:p==="application/x-www-form-urlencoded"&&s.formData?d.body=td(s.formData):d.body=s.formData}return new Request(c,d)}function td(n){let i=new URLSearchParams;for(let[r,s]of n.entries())i.append(r,typeof s=="string"?s:s.name);return i}function Wp(n){let i=new FormData;for(let[r,s]of n.entries())i.append(r,s);return i}function i1(n,i,r,s=!1,c=!1){let d={},h=null,p,g=!1,m={},b=r&&da(r[1])?r[1].error:void 0;return n.forEach(x=>{if(!(x.route.id in i))return;let _=x.route.id,j=i[_];if(Le(!_l(j),"Cannot handle redirect results in processLoaderData"),da(j)){let R=j.error;if(b!==void 0&&(R=b,b=void 0),h=h||{},c)h[_]=R;else{let D=Pn(n,_);h[D.route.id]==null&&(h[D.route.id]=R)}s||(d[_]=ey),g||(g=!0,p=Nr(j.error)?j.error.status:500),j.headers&&(m[_]=j.headers)}else d[_]=j.data,j.statusCode&&j.statusCode!==200&&!g&&(p=j.statusCode),j.headers&&(m[_]=j.headers)}),b!==void 0&&r&&(h={[r[0]]:b},r[2]&&(d[r[2]]=void 0)),{loaderData:d,errors:h,statusCode:p||200,loaderHeaders:m}}function Pp(n,i,r,s,c,d){let{loaderData:h,errors:p}=i1(i,r,s);return c.filter(g=>!g.matches||g.matches.some(m=>m.shouldLoad)).forEach(g=>{let{key:m,match:b,controller:x}=g;if(x&&x.signal.aborted)return;let _=d[m];if(Le(_,"Did not find corresponding fetcher result"),da(_)){let j=Pn(n.matches,b?.route.id);p&&p[j.route.id]||(p={...p,[j.route.id]:_.error}),n.fetchers.delete(m)}else if(_l(_))Le(!1,"Unhandled fetcher revalidation redirect");else{let j=vn(_.data);n.fetchers.set(m,j)}}),{loaderData:h,errors:p}}function Ip(n,i,r,s){let c=Object.entries(i).filter(([,d])=>d!==ey).reduce((d,[h,p])=>(d[h]=p,d),{});for(let d of r){let h=d.route.id;if(!i.hasOwnProperty(h)&&n.hasOwnProperty(h)&&d.route.loader&&(c[h]=n[h]),s&&s.hasOwnProperty(h))break}return c}function eg(n){return n?da(n[1])?{actionData:{}}:{actionData:{[n[0]]:n[1].data}}:{}}function Pn(n,i){return(i?n.slice(0,n.findIndex(s=>s.route.id===i)+1):[...n]).reverse().find(s=>s.route.hasErrorBoundary===!0)||n[0]}function Fs(n){let i=n.length===1?n[0]:n.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:i}],route:i}}function wa(n,{pathname:i,routeId:r,method:s,type:c,message:d}={}){let h="Unknown Server Error",p="Unknown @remix-run/router error";return n===400?(h="Bad Request",s&&i&&r?p=`You made a ${s} request to "${i}" but did not provide a \`loader\` for route "${r}", so there is no way to handle the request.`:c==="invalid-body"&&(p="Unable to encode submission body")):n===403?(h="Forbidden",p=`Route "${r}" does not match URL "${i}"`):n===404?(h="Not Found",p=`No route matches URL "${i}"`):n===405&&(h="Method Not Allowed",s&&i&&r?p=`You made a ${s.toUpperCase()} request to "${i}" but did not provide an \`action\` for route "${r}", so there is no way to handle the request.`:s&&(p=`Invalid request method "${s.toUpperCase()}"`)),new Rr(n||500,h,new Error(p),!0)}function Js(n){let i=Object.entries(n);for(let r=i.length-1;r>=0;r--){let[s,c]=i[r];if(_l(c))return{key:s,result:c}}}function sy(n){let i=typeof n=="string"?Sn(n):n;return Wa({...i,hash:""})}function r1(n,i){return n.pathname!==i.pathname||n.search!==i.search?!1:n.hash===""?i.hash!=="":n.hash===i.hash?!0:i.hash!==""}function s1(n){return new Rr(n.init?.status??500,n.init?.statusText??"Internal Server Error",n.data)}function o1(n){return n!=null&&typeof n=="object"&&Object.entries(n).every(([i,r])=>typeof i=="string"&&c1(r))}function c1(n){return n!=null&&typeof n=="object"&&"type"in n&&"result"in n&&(n.type==="data"||n.type==="error")}function u1(n){return ud(n.result)&&Pg.has(n.result.status)}function da(n){return n.type==="error"}function _l(n){return(n&&n.type)==="redirect"}function tg(n){return typeof n=="object"&&n!=null&&"type"in n&&"data"in n&&"init"in n&&n.type==="DataWithResponseInit"}function ud(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.headers=="object"&&typeof n.body<"u"}function d1(n){return Pg.has(n)}function f1(n){return ud(n)&&d1(n.status)&&n.headers.has("Location")}function h1(n){return Gb.has(n.toUpperCase())}function qt(n){return Yb.has(n.toUpperCase())}function dd(n){return new URLSearchParams(n).getAll("index").some(i=>i==="")}function to(n,i){let r=typeof i=="string"?Sn(i).search:i.search;if(n[n.length-1].route.index&&dd(r||""))return n[n.length-1];let s=Qg(n);return s[s.length-1]}function ag(n){let{formMethod:i,formAction:r,formEncType:s,text:c,formData:d,json:h}=n;if(!(!i||!r||!s)){if(c!=null)return{formMethod:i,formAction:r,formEncType:s,formData:void 0,json:void 0,text:c};if(d!=null)return{formMethod:i,formAction:r,formEncType:s,formData:d,json:void 0,text:void 0};if(h!==void 0)return{formMethod:i,formAction:r,formEncType:s,formData:void 0,json:h,text:void 0}}}function Vu(n,i){return i?{state:"loading",location:n,formMethod:i.formMethod,formAction:i.formAction,formEncType:i.formEncType,formData:i.formData,json:i.json,text:i.text}:{state:"loading",location:n,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function m1(n,i){return{state:"submitting",location:n,formMethod:i.formMethod,formAction:i.formAction,formEncType:i.formEncType,formData:i.formData,json:i.json,text:i.text}}function fr(n,i){return n?{state:"loading",formMethod:n.formMethod,formAction:n.formAction,formEncType:n.formEncType,formData:n.formData,json:n.json,text:n.text,data:i}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:i}}function p1(n,i){return{state:"submitting",formMethod:n.formMethod,formAction:n.formAction,formEncType:n.formEncType,formData:n.formData,json:n.json,text:n.text,data:i?i.data:void 0}}function vn(n){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:n}}function g1(n,i){try{let r=n.sessionStorage.getItem(Ig);if(r){let s=JSON.parse(r);for(let[c,d]of Object.entries(s||{}))d&&Array.isArray(d)&&i.set(c,new Set(d||[]))}}catch{}}function y1(n,i){if(i.size>0){let r={};for(let[s,c]of i)r[s]=[...c];try{n.sessionStorage.setItem(Ig,JSON.stringify(r))}catch(s){mt(!1,`Failed to save applied view transitions in sessionStorage (${s}).`)}}}function ng(){let n,i,r=new Promise((s,c)=>{n=async d=>{s(d);try{await r}catch{}},i=async d=>{c(d);try{await r}catch{}}});return{promise:r,resolve:n,reject:i}}var El=v.createContext(null);El.displayName="DataRouter";var Tr=v.createContext(null);Tr.displayName="DataRouterState";var oy=v.createContext(!1);function x1(){return v.useContext(oy)}var fd=v.createContext({isTransitioning:!1});fd.displayName="ViewTransition";var cy=v.createContext(new Map);cy.displayName="Fetchers";var v1=v.createContext(null);v1.displayName="Await";var fa=v.createContext(null);fa.displayName="Navigation";var ho=v.createContext(null);ho.displayName="Location";var za=v.createContext({outlet:null,matches:[],isDataRoute:!1});za.displayName="Route";var hd=v.createContext(null);hd.displayName="RouteError";var uy="REACT_ROUTER_ERROR",b1="REDIRECT",S1="ROUTE_ERROR_RESPONSE";function _1(n){if(n.startsWith(`${uy}:${b1}:{`))try{let i=JSON.parse(n.slice(28));if(typeof i=="object"&&i&&typeof i.status=="number"&&typeof i.statusText=="string"&&typeof i.location=="string"&&typeof i.reloadDocument=="boolean"&&typeof i.replace=="boolean")return i}catch{}}function j1(n){if(n.startsWith(`${uy}:${S1}:{`))try{let i=JSON.parse(n.slice(40));if(typeof i=="object"&&i&&typeof i.status=="number"&&typeof i.statusText=="string")return new Rr(i.status,i.statusText,i.data)}catch{}}function N1(n,{relative:i}={}){Le(yi(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:s}=v.useContext(fa),{hash:c,pathname:d,search:h}=Or(n,{relative:i}),p=d;return r!=="/"&&(p=d==="/"?r:Ha([r,d])),s.createHref({pathname:p,search:h,hash:c})}function yi(){return v.useContext(ho)!=null}function Ba(){return Le(yi(),"useLocation() may be used only in the context of a <Router> component."),v.useContext(ho).location}var dy="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function fy(n){v.useContext(fa).static||v.useLayoutEffect(n)}function tl(){let{isDataRoute:n}=v.useContext(za);return n?B1():E1()}function E1(){Le(yi(),"useNavigate() may be used only in the context of a <Router> component.");let n=v.useContext(El),{basename:i,navigator:r}=v.useContext(fa),{matches:s}=v.useContext(za),{pathname:c}=Ba(),d=JSON.stringify(fo(s)),h=v.useRef(!1);return fy(()=>{h.current=!0}),v.useCallback((g,m={})=>{if(mt(h.current,dy),!h.current)return;if(typeof g=="number"){r.go(g);return}let b=Cr(g,JSON.parse(d),c,m.relative==="path");n==null&&i!=="/"&&(b.pathname=b.pathname==="/"?i:Ha([i,b.pathname])),(m.replace?r.replace:r.push)(b,m.state,m)},[i,r,d,c,n])}var w1=v.createContext(null);function C1(n){let i=v.useContext(za).outlet;return v.useMemo(()=>i&&v.createElement(w1.Provider,{value:n},i),[i,n])}function mo(){let{matches:n}=v.useContext(za),i=n[n.length-1];return i?i.params:{}}function Or(n,{relative:i}={}){let{matches:r}=v.useContext(za),{pathname:s}=Ba(),c=JSON.stringify(fo(r));return v.useMemo(()=>Cr(n,JSON.parse(c),s,i==="path"),[n,c,s,i])}function R1(n,i,r){Le(yi(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:s}=v.useContext(fa),{matches:c}=v.useContext(za),d=c[c.length-1],h=d?d.params:{},p=d?d.pathname:"/",g=d?d.pathnameBase:"/",m=d&&d.route;{let k=m&&m.path||"";my(p,!m||k.endsWith("*")||k.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${p}" (under <Route path="${k}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
11
|
+
|
|
12
|
+
Please change the parent <Route path="${k}"> to <Route path="${k==="/"?"*":`${k}/*`}">.`)}let b=Ba(),x;x=b;let _=x.pathname||"/",j=_;if(g!=="/"){let k=g.replace(/^\//,"").split("/");j="/"+_.replace(/^\//,"").split("/").slice(k.length).join("/")}let R=Wn(n,{pathname:j});return mt(m||R!=null,`No routes matched location "${x.pathname}${x.search}${x.hash}" `),mt(R==null||R[R.length-1].route.element!==void 0||R[R.length-1].route.Component!==void 0||R[R.length-1].route.lazy!==void 0,`Matched leaf route at location "${x.pathname}${x.search}${x.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),M1(R&&R.map(k=>Object.assign({},k,{params:Object.assign({},h,k.params),pathname:Ha([g,s.encodeLocation?s.encodeLocation(k.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:k.pathname]),pathnameBase:k.pathnameBase==="/"?g:Ha([g,s.encodeLocation?s.encodeLocation(k.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:k.pathnameBase])})),c,r)}function z1(){let n=H1(),i=Nr(n)?`${n.status} ${n.statusText}`:n instanceof Error?n.message:JSON.stringify(n),r=n instanceof Error?n.stack:null,s="rgba(200,200,200, 0.5)",c={padding:"0.5rem",backgroundColor:s},d={padding:"2px 4px",backgroundColor:s},h=null;return console.error("Error handled by React Router default ErrorBoundary:",n),h=v.createElement(v.Fragment,null,v.createElement("p",null,"💿 Hey developer 👋"),v.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",v.createElement("code",{style:d},"ErrorBoundary")," or"," ",v.createElement("code",{style:d},"errorElement")," prop on your route.")),v.createElement(v.Fragment,null,v.createElement("h2",null,"Unexpected Application Error!"),v.createElement("h3",{style:{fontStyle:"italic"}},i),r?v.createElement("pre",{style:c},r):null,h)}var T1=v.createElement(z1,null),hy=class extends v.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,i){return i.location!==n.location||i.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:i.error,location:i.location,revalidation:n.revalidation||i.revalidation}}componentDidCatch(n,i){this.props.onError?this.props.onError(n,i):console.error("React Router caught the following error during render",n)}render(){let n=this.state.error;if(this.context&&typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){const r=j1(n.digest);r&&(n=r)}let i=n!==void 0?v.createElement(za.Provider,{value:this.props.routeContext},v.createElement(hd.Provider,{value:n,children:this.props.component})):this.props.children;return this.context?v.createElement(O1,{error:n},i):i}};hy.contextType=oy;var Gu=new WeakMap;function O1({children:n,error:i}){let{basename:r}=v.useContext(fa);if(typeof i=="object"&&i&&"digest"in i&&typeof i.digest=="string"){let s=_1(i.digest);if(s){let c=Gu.get(i);if(c)throw c;let d=Fg(s.location,r);if(Zg&&!Gu.get(i))if(d.isExternal||s.reloadDocument)window.location.href=d.absoluteURL||d.to;else{const h=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(d.to,{replace:s.replace}));throw Gu.set(i,h),h}return v.createElement("meta",{httpEquiv:"refresh",content:`0;url=${d.absoluteURL||d.to}`})}}return n}function D1({routeContext:n,match:i,children:r}){let s=v.useContext(El);return s&&s.static&&s.staticContext&&(i.route.errorElement||i.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=i.route.id),v.createElement(za.Provider,{value:n},r)}function M1(n,i=[],r){let s=r?.state;if(n==null){if(!s)return null;if(s.errors)n=s.matches;else if(i.length===0&&!s.initialized&&s.matches.length>0)n=s.matches;else return null}let c=n,d=s?.errors;if(d!=null){let b=c.findIndex(x=>x.route.id&&d?.[x.route.id]!==void 0);Le(b>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(d).join(",")}`),c=c.slice(0,Math.min(c.length,b+1))}let h=!1,p=-1;if(r&&s){h=s.renderFallback;for(let b=0;b<c.length;b++){let x=c[b];if((x.route.HydrateFallback||x.route.hydrateFallbackElement)&&(p=b),x.route.id){let{loaderData:_,errors:j}=s,R=x.route.loader&&!_.hasOwnProperty(x.route.id)&&(!j||j[x.route.id]===void 0);if(x.route.lazy||R){r.isStatic&&(h=!0),p>=0?c=c.slice(0,p+1):c=[c[0]];break}}}}let g=r?.onError,m=s&&g?(b,x)=>{g(b,{location:s.location,params:s.matches?.[0]?.params??{},unstable_pattern:zr(s.matches),errorInfo:x})}:void 0;return c.reduceRight((b,x,_)=>{let j,R=!1,D=null,k=null;s&&(j=d&&x.route.id?d[x.route.id]:void 0,D=x.route.errorElement||T1,h&&(p<0&&_===0?(my("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),R=!0,k=null):p===_&&(R=!0,k=x.route.hydrateFallbackElement||null)));let Z=i.concat(c.slice(0,_+1)),G=()=>{let K;return j?K=D:R?K=k:x.route.Component?K=v.createElement(x.route.Component,null):x.route.element?K=x.route.element:K=b,v.createElement(D1,{match:x,routeContext:{outlet:b,matches:Z,isDataRoute:s!=null},children:K})};return s&&(x.route.ErrorBoundary||x.route.errorElement||_===0)?v.createElement(hy,{location:s.location,revalidation:s.revalidation,component:D,error:j,children:G(),routeContext:{outlet:null,matches:Z,isDataRoute:!0},onError:m}):G()},null)}function md(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function A1(n){let i=v.useContext(El);return Le(i,md(n)),i}function L1(n){let i=v.useContext(Tr);return Le(i,md(n)),i}function k1(n){let i=v.useContext(za);return Le(i,md(n)),i}function pd(n){let i=k1(n),r=i.matches[i.matches.length-1];return Le(r.route.id,`${n} can only be used on routes that contain a unique "id"`),r.route.id}function U1(){return pd("useRouteId")}function H1(){let n=v.useContext(hd),i=L1("useRouteError"),r=pd("useRouteError");return n!==void 0?n:i.errors?.[r]}function B1(){let{router:n}=A1("useNavigate"),i=pd("useNavigate"),r=v.useRef(!1);return fy(()=>{r.current=!0}),v.useCallback(async(c,d={})=>{mt(r.current,dy),r.current&&(typeof c=="number"?await n.navigate(c):await n.navigate(c,{fromRouteId:i,...d}))},[n,i])}var lg={};function my(n,i,r){!i&&!lg[n]&&(lg[n]=!0,mt(!1,r))}var ig={};function rg(n,i){!n&&!ig[i]&&(ig[i]=!0,console.warn(i))}var q1="useOptimistic",sg=g0[q1],Y1=()=>{};function V1(n){return sg?sg(n):[n,Y1]}function G1(n){let i={hasErrorBoundary:n.hasErrorBoundary||n.ErrorBoundary!=null||n.errorElement!=null};return n.Component&&(n.element&&mt(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(i,{element:v.createElement(n.Component),Component:void 0})),n.HydrateFallback&&(n.hydrateFallbackElement&&mt(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(i,{hydrateFallbackElement:v.createElement(n.HydrateFallback),HydrateFallback:void 0})),n.ErrorBoundary&&(n.errorElement&&mt(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(i,{errorElement:v.createElement(n.ErrorBoundary),ErrorBoundary:void 0})),i}var $1=["HydrateFallback","hydrateFallbackElement"],K1=class{constructor(){this.status="pending",this.promise=new Promise((n,i)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",n(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",i(r))}})}};function X1({router:n,flushSync:i,onError:r,unstable_useTransitions:s}){s=x1()||s;let[d,h]=v.useState(n.state),[p,g]=V1(d),[m,b]=v.useState(),[x,_]=v.useState({isTransitioning:!1}),[j,R]=v.useState(),[D,k]=v.useState(),[Z,G]=v.useState(),K=v.useRef(new Map),le=v.useCallback((N,{deletedFetchers:Y,newErrors:J,flushSync:he,viewTransitionOpts:ie})=>{J&&r&&Object.values(J).forEach(se=>r(se,{location:N.location,params:N.matches[0]?.params??{},unstable_pattern:zr(N.matches)})),N.fetchers.forEach((se,ge)=>{se.data!==void 0&&K.current.set(ge,se.data)}),Y.forEach(se=>K.current.delete(se)),rg(he===!1||i!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let ee=n.window!=null&&n.window.document!=null&&typeof n.window.document.startViewTransition=="function";if(rg(ie==null||ee,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!ie||!ee){i&&he?i(()=>h(N)):s===!1?h(N):v.startTransition(()=>{s===!0&&g(se=>og(se,N)),h(N)});return}if(i&&he){i(()=>{D&&(j?.resolve(),D.skipTransition()),_({isTransitioning:!0,flushSync:!0,currentLocation:ie.currentLocation,nextLocation:ie.nextLocation})});let se=n.window.document.startViewTransition(()=>{i(()=>h(N))});se.finished.finally(()=>{i(()=>{R(void 0),k(void 0),b(void 0),_({isTransitioning:!1})})}),i(()=>k(se));return}D?(j?.resolve(),D.skipTransition(),G({state:N,currentLocation:ie.currentLocation,nextLocation:ie.nextLocation})):(b(N),_({isTransitioning:!0,flushSync:!1,currentLocation:ie.currentLocation,nextLocation:ie.nextLocation}))},[n.window,i,D,j,s,g,r]);v.useLayoutEffect(()=>n.subscribe(le),[n,le]),v.useEffect(()=>{x.isTransitioning&&!x.flushSync&&R(new K1)},[x]),v.useEffect(()=>{if(j&&m&&n.window){let N=m,Y=j.promise,J=n.window.document.startViewTransition(async()=>{s===!1?h(N):v.startTransition(()=>{s===!0&&g(he=>og(he,N)),h(N)}),await Y});J.finished.finally(()=>{R(void 0),k(void 0),b(void 0),_({isTransitioning:!1})}),k(J)}},[m,j,n.window,s,g]),v.useEffect(()=>{j&&m&&p.location.key===m.location.key&&j.resolve()},[j,D,p.location,m]),v.useEffect(()=>{!x.isTransitioning&&Z&&(b(Z.state),_({isTransitioning:!0,flushSync:!1,currentLocation:Z.currentLocation,nextLocation:Z.nextLocation}),G(void 0))},[x.isTransitioning,Z]);let F=v.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:N=>n.navigate(N),push:(N,Y,J)=>n.navigate(N,{state:Y,preventScrollReset:J?.preventScrollReset}),replace:(N,Y,J)=>n.navigate(N,{replace:!0,state:Y,preventScrollReset:J?.preventScrollReset})}),[n]),I=n.basename||"/",W=v.useMemo(()=>({router:n,navigator:F,static:!1,basename:I,onError:r}),[n,F,I,r]);return v.createElement(v.Fragment,null,v.createElement(El.Provider,{value:W},v.createElement(Tr.Provider,{value:p},v.createElement(cy.Provider,{value:K.current},v.createElement(fd.Provider,{value:x},v.createElement(F1,{basename:I,location:p.location,navigationType:p.historyAction,navigator:F,unstable_useTransitions:s},v.createElement(Q1,{routes:n.routes,future:n.future,state:p,isStatic:!1,onError:r})))))),null)}function og(n,i){return{...n,navigation:i.navigation.state!=="idle"?i.navigation:n.navigation,revalidation:i.revalidation!=="idle"?i.revalidation:n.revalidation,actionData:i.navigation.state!=="submitting"?i.actionData:n.actionData,fetchers:i.fetchers}}var Q1=v.memo(Z1);function Z1({routes:n,future:i,state:r,isStatic:s,onError:c}){return R1(n,void 0,{state:r,isStatic:s,onError:c})}function cg({to:n,replace:i,state:r,relative:s}){Le(yi(),"<Navigate> may be used only in the context of a <Router> component.");let{static:c}=v.useContext(fa);mt(!c,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:d}=v.useContext(za),{pathname:h}=Ba(),p=tl(),g=Cr(n,fo(d),h,s==="path"),m=JSON.stringify(g);return v.useEffect(()=>{p(JSON.parse(m),{replace:i,state:r,relative:s})},[p,m,s,i,r]),null}function py(n){return C1(n.context)}function F1({basename:n="/",children:i=null,location:r,navigationType:s="POP",navigator:c,static:d=!1,unstable_useTransitions:h}){Le(!yi(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let p=n.replace(/^\/*/,"/"),g=v.useMemo(()=>({basename:p,navigator:c,static:d,unstable_useTransitions:h,future:{}}),[p,c,d,h]);typeof r=="string"&&(r=Sn(r));let{pathname:m="/",search:b="",hash:x="",state:_=null,key:j="default",unstable_mask:R}=r,D=v.useMemo(()=>{let k=Ra(m,p);return k==null?null:{location:{pathname:k,search:b,hash:x,state:_,key:j,unstable_mask:R},navigationType:s}},[p,m,b,x,_,j,s,R]);return mt(D!=null,`<Router basename="${p}"> is not able to match the URL "${m}${b}${x}" because it does not start with the basename, so the <Router> won't render anything.`),D==null?null:v.createElement(fa.Provider,{value:g},v.createElement(ho.Provider,{children:i,value:D}))}var ao="get",no="application/x-www-form-urlencoded";function po(n){return typeof HTMLElement<"u"&&n instanceof HTMLElement}function J1(n){return po(n)&&n.tagName.toLowerCase()==="button"}function W1(n){return po(n)&&n.tagName.toLowerCase()==="form"}function P1(n){return po(n)&&n.tagName.toLowerCase()==="input"}function I1(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function e4(n,i){return n.button===0&&(!i||i==="_self")&&!I1(n)}function ad(n=""){return new URLSearchParams(typeof n=="string"||Array.isArray(n)||n instanceof URLSearchParams?n:Object.keys(n).reduce((i,r)=>{let s=n[r];return i.concat(Array.isArray(s)?s.map(c=>[r,c]):[[r,s]])},[]))}function t4(n,i){let r=ad(n);return i&&i.forEach((s,c)=>{r.has(c)||i.getAll(c).forEach(d=>{r.append(c,d)})}),r}var Ws=null;function a4(){if(Ws===null)try{new FormData(document.createElement("form"),0),Ws=!1}catch{Ws=!0}return Ws}var n4=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function $u(n){return n!=null&&!n4.has(n)?(mt(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${no}"`),null):n}function l4(n,i){let r,s,c,d,h;if(W1(n)){let p=n.getAttribute("action");s=p?Ra(p,i):null,r=n.getAttribute("method")||ao,c=$u(n.getAttribute("enctype"))||no,d=new FormData(n)}else if(J1(n)||P1(n)&&(n.type==="submit"||n.type==="image")){let p=n.form;if(p==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let g=n.getAttribute("formaction")||p.getAttribute("action");if(s=g?Ra(g,i):null,r=n.getAttribute("formmethod")||p.getAttribute("method")||ao,c=$u(n.getAttribute("formenctype"))||$u(p.getAttribute("enctype"))||no,d=new FormData(p,n),!a4()){let{name:m,type:b,value:x}=n;if(b==="image"){let _=m?`${m}.`:"";d.append(`${_}x`,"0"),d.append(`${_}y`,"0")}else m&&d.append(m,x)}}else{if(po(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=ao,s=null,c=no,h=n}return d&&c==="text/plain"&&(h=d,d=void 0),{action:s,method:r.toLowerCase(),encType:c,formData:d,body:h}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function gd(n,i){if(n===!1||n===null||typeof n>"u")throw new Error(i)}function i4(n,i,r,s){let c=typeof n=="string"?new URL(n,typeof window>"u"?"server://singlefetch/":window.location.origin):n;return r?c.pathname.endsWith("/")?c.pathname=`${c.pathname}_.${s}`:c.pathname=`${c.pathname}.${s}`:c.pathname==="/"?c.pathname=`_root.${s}`:i&&Ra(c.pathname,i)==="/"?c.pathname=`${i.replace(/\/$/,"")}/_root.${s}`:c.pathname=`${c.pathname.replace(/\/$/,"")}.${s}`,c}async function r4(n,i){if(n.id in i)return i[n.id];try{let r=await import(n.module);return i[n.id]=r,r}catch(r){return console.error(`Error loading route module \`${n.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function s4(n){return n==null?!1:n.href==null?n.rel==="preload"&&typeof n.imageSrcSet=="string"&&typeof n.imageSizes=="string":typeof n.rel=="string"&&typeof n.href=="string"}async function o4(n,i,r){let s=await Promise.all(n.map(async c=>{let d=i.routes[c.route.id];if(d){let h=await r4(d,r);return h.links?h.links():[]}return[]}));return f4(s.flat(1).filter(s4).filter(c=>c.rel==="stylesheet"||c.rel==="preload").map(c=>c.rel==="stylesheet"?{...c,rel:"prefetch",as:"style"}:{...c,rel:"prefetch"}))}function ug(n,i,r,s,c,d){let h=(g,m)=>r[m]?g.route.id!==r[m].route.id:!0,p=(g,m)=>r[m].pathname!==g.pathname||r[m].route.path?.endsWith("*")&&r[m].params["*"]!==g.params["*"];return d==="assets"?i.filter((g,m)=>h(g,m)||p(g,m)):d==="data"?i.filter((g,m)=>{let b=s.routes[g.route.id];if(!b||!b.hasLoader)return!1;if(h(g,m)||p(g,m))return!0;if(g.route.shouldRevalidate){let x=g.route.shouldRevalidate({currentUrl:new URL(c.pathname+c.search+c.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(n,window.origin),nextParams:g.params,defaultShouldRevalidate:!0});if(typeof x=="boolean")return x}return!0}):[]}function c4(n,i,{includeHydrateFallback:r}={}){return u4(n.map(s=>{let c=i.routes[s.route.id];if(!c)return[];let d=[c.module];return c.clientActionModule&&(d=d.concat(c.clientActionModule)),c.clientLoaderModule&&(d=d.concat(c.clientLoaderModule)),r&&c.hydrateFallbackModule&&(d=d.concat(c.hydrateFallbackModule)),c.imports&&(d=d.concat(c.imports)),d}).flat(1))}function u4(n){return[...new Set(n)]}function d4(n){let i={},r=Object.keys(n).sort();for(let s of r)i[s]=n[s];return i}function f4(n,i){let r=new Set;return new Set(i),n.reduce((s,c)=>{let d=JSON.stringify(d4(c));return r.has(d)||(r.add(d),s.push({key:d,link:c})),s},[])}function gy(){let n=v.useContext(El);return gd(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function h4(){let n=v.useContext(Tr);return gd(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var yd=v.createContext(void 0);yd.displayName="FrameworkContext";function yy(){let n=v.useContext(yd);return gd(n,"You must render this element inside a <HydratedRouter> element"),n}function m4(n,i){let r=v.useContext(yd),[s,c]=v.useState(!1),[d,h]=v.useState(!1),{onFocus:p,onBlur:g,onMouseEnter:m,onMouseLeave:b,onTouchStart:x}=i,_=v.useRef(null);v.useEffect(()=>{if(n==="render"&&h(!0),n==="viewport"){let D=Z=>{Z.forEach(G=>{h(G.isIntersecting)})},k=new IntersectionObserver(D,{threshold:.5});return _.current&&k.observe(_.current),()=>{k.disconnect()}}},[n]),v.useEffect(()=>{if(s){let D=setTimeout(()=>{h(!0)},100);return()=>{clearTimeout(D)}}},[s]);let j=()=>{c(!0)},R=()=>{c(!1),h(!1)};return r?n!=="intent"?[d,_,{}]:[d,_,{onFocus:hr(p,j),onBlur:hr(g,R),onMouseEnter:hr(m,j),onMouseLeave:hr(b,R),onTouchStart:hr(x,j)}]:[!1,_,{}]}function hr(n,i){return r=>{n&&n(r),r.defaultPrevented||i(r)}}function p4({page:n,...i}){let{router:r}=gy(),s=v.useMemo(()=>Wn(r.routes,n,r.basename),[r.routes,n,r.basename]);return s?v.createElement(y4,{page:n,matches:s,...i}):null}function g4(n){let{manifest:i,routeModules:r}=yy(),[s,c]=v.useState([]);return v.useEffect(()=>{let d=!1;return o4(n,i,r).then(h=>{d||c(h)}),()=>{d=!0}},[n,i,r]),s}function y4({page:n,matches:i,...r}){let s=Ba(),{future:c,manifest:d,routeModules:h}=yy(),{basename:p}=gy(),{loaderData:g,matches:m}=h4(),b=v.useMemo(()=>ug(n,i,m,d,s,"data"),[n,i,m,d,s]),x=v.useMemo(()=>ug(n,i,m,d,s,"assets"),[n,i,m,d,s]),_=v.useMemo(()=>{if(n===s.pathname+s.search+s.hash)return[];let D=new Set,k=!1;if(i.forEach(G=>{let K=d.routes[G.route.id];!K||!K.hasLoader||(!b.some(le=>le.route.id===G.route.id)&&G.route.id in g&&h[G.route.id]?.shouldRevalidate||K.hasClientLoader?k=!0:D.add(G.route.id))}),D.size===0)return[];let Z=i4(n,p,c.unstable_trailingSlashAwareDataRequests,"data");return k&&D.size>0&&Z.searchParams.set("_routes",i.filter(G=>D.has(G.route.id)).map(G=>G.route.id).join(",")),[Z.pathname+Z.search]},[p,c.unstable_trailingSlashAwareDataRequests,g,s,d,b,i,n,h]),j=v.useMemo(()=>c4(x,d),[x,d]),R=g4(x);return v.createElement(v.Fragment,null,_.map(D=>v.createElement("link",{key:D,rel:"prefetch",as:"fetch",href:D,...r})),j.map(D=>v.createElement("link",{key:D,rel:"modulepreload",href:D,...r})),R.map(({key:D,link:k})=>v.createElement("link",{key:D,nonce:r.nonce,...k,crossOrigin:k.crossOrigin??r.crossOrigin})))}function x4(...n){return i=>{n.forEach(r=>{typeof r=="function"?r(i):r!=null&&(r.current=i)})}}var v4=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{v4&&(window.__reactRouterVersion="7.13.1")}catch{}function b4(n,i){return Qb({basename:i?.basename,getContext:i?.getContext,future:i?.future,history:cb({window:i?.window}),hydrationData:S4(),routes:n,mapRouteProperties:G1,hydrationRouteProperties:$1,dataStrategy:i?.dataStrategy,patchRoutesOnNavigation:i?.patchRoutesOnNavigation,window:i?.window,unstable_instrumentations:i?.unstable_instrumentations}).initialize()}function S4(){let n=window?.__staticRouterHydrationData;return n&&n.errors&&(n={...n,errors:_4(n.errors)}),n}function _4(n){if(!n)return null;let i=Object.entries(n),r={};for(let[s,c]of i)if(c&&c.__type==="RouteErrorResponse")r[s]=new Rr(c.status,c.statusText,c.data,c.internal===!0);else if(c&&c.__type==="Error"){if(c.__subType){let d=window[c.__subType];if(typeof d=="function")try{let h=new d(c.message);h.stack="",r[s]=h}catch{}}if(r[s]==null){let d=new Error(c.message);d.stack="",r[s]=d}}else r[s]=c;return r}var xy=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,aa=v.forwardRef(function({onClick:i,discover:r="render",prefetch:s="none",relative:c,reloadDocument:d,replace:h,unstable_mask:p,state:g,target:m,to:b,preventScrollReset:x,viewTransition:_,unstable_defaultShouldRevalidate:j,...R},D){let{basename:k,navigator:Z,unstable_useTransitions:G}=v.useContext(fa),K=typeof b=="string"&&xy.test(b),le=Fg(b,k);b=le.to;let F=N1(b,{relative:c}),I=Ba(),W=null;if(p){let ge=Cr(p,[],I.unstable_mask?I.unstable_mask.pathname:"/",!0);k!=="/"&&(ge.pathname=ge.pathname==="/"?k:Ha([k,ge.pathname])),W=Z.createHref(ge)}let[N,Y,J]=m4(s,R),he=E4(b,{replace:h,unstable_mask:p,state:g,target:m,preventScrollReset:x,relative:c,viewTransition:_,unstable_defaultShouldRevalidate:j,unstable_useTransitions:G});function ie(ge){i&&i(ge),ge.defaultPrevented||he(ge)}let ee=!(le.isExternal||d),se=v.createElement("a",{...R,...J,href:(ee?W:void 0)||le.absoluteURL||F,onClick:ee?ie:i,ref:x4(D,Y),target:m,"data-discover":!K&&r==="render"?"true":void 0});return N&&!K?v.createElement(v.Fragment,null,se,v.createElement(p4,{page:F})):se});aa.displayName="Link";var Er=v.forwardRef(function({"aria-current":i="page",caseSensitive:r=!1,className:s="",end:c=!1,style:d,to:h,viewTransition:p,children:g,...m},b){let x=Or(h,{relative:m.relative}),_=Ba(),j=v.useContext(Tr),{navigator:R,basename:D}=v.useContext(fa),k=j!=null&&T4(x)&&p===!0,Z=R.encodeLocation?R.encodeLocation(x).pathname:x.pathname,G=_.pathname,K=j&&j.navigation&&j.navigation.location?j.navigation.location.pathname:null;r||(G=G.toLowerCase(),K=K?K.toLowerCase():null,Z=Z.toLowerCase()),K&&D&&(K=Ra(K,D)||K);const le=Z!=="/"&&Z.endsWith("/")?Z.length-1:Z.length;let F=G===Z||!c&&G.startsWith(Z)&&G.charAt(le)==="/",I=K!=null&&(K===Z||!c&&K.startsWith(Z)&&K.charAt(Z.length)==="/"),W={isActive:F,isPending:I,isTransitioning:k},N=F?i:void 0,Y;typeof s=="function"?Y=s(W):Y=[s,F?"active":null,I?"pending":null,k?"transitioning":null].filter(Boolean).join(" ");let J=typeof d=="function"?d(W):d;return v.createElement(aa,{...m,"aria-current":N,className:Y,ref:b,style:J,to:h,viewTransition:p},typeof g=="function"?g(W):g)});Er.displayName="NavLink";var j4=v.forwardRef(({discover:n="render",fetcherKey:i,navigate:r,reloadDocument:s,replace:c,state:d,method:h=ao,action:p,onSubmit:g,relative:m,preventScrollReset:b,viewTransition:x,unstable_defaultShouldRevalidate:_,...j},R)=>{let{unstable_useTransitions:D}=v.useContext(fa),k=R4(),Z=z4(p,{relative:m}),G=h.toLowerCase()==="get"?"get":"post",K=typeof p=="string"&&xy.test(p),le=F=>{if(g&&g(F),F.defaultPrevented)return;F.preventDefault();let I=F.nativeEvent.submitter,W=I?.getAttribute("formmethod")||h,N=()=>k(I||F.currentTarget,{fetcherKey:i,method:W,navigate:r,replace:c,state:d,relative:m,preventScrollReset:b,viewTransition:x,unstable_defaultShouldRevalidate:_});D&&r!==!1?v.startTransition(()=>N()):N()};return v.createElement("form",{ref:R,method:G,action:Z,onSubmit:s?g:le,...j,"data-discover":!K&&n==="render"?"true":void 0})});j4.displayName="Form";function N4(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function vy(n){let i=v.useContext(El);return Le(i,N4(n)),i}function E4(n,{target:i,replace:r,unstable_mask:s,state:c,preventScrollReset:d,relative:h,viewTransition:p,unstable_defaultShouldRevalidate:g,unstable_useTransitions:m}={}){let b=tl(),x=Ba(),_=Or(n,{relative:h});return v.useCallback(j=>{if(e4(j,i)){j.preventDefault();let R=r!==void 0?r:Wa(x)===Wa(_),D=()=>b(n,{replace:R,unstable_mask:s,state:c,preventScrollReset:d,relative:h,viewTransition:p,unstable_defaultShouldRevalidate:g});m?v.startTransition(()=>D()):D()}},[x,b,_,r,s,c,i,n,d,h,p,g,m])}function by(n){mt(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let i=v.useRef(ad(n)),r=v.useRef(!1),s=Ba(),c=v.useMemo(()=>t4(s.search,r.current?null:i.current),[s.search]),d=tl(),h=v.useCallback((p,g)=>{const m=ad(typeof p=="function"?p(new URLSearchParams(c)):p);r.current=!0,d("?"+m,g)},[d,c]);return[c,h]}var w4=0,C4=()=>`__${String(++w4)}__`;function R4(){let{router:n}=vy("useSubmit"),{basename:i}=v.useContext(fa),r=U1(),s=n.fetch,c=n.navigate;return v.useCallback(async(d,h={})=>{let{action:p,method:g,encType:m,formData:b,body:x}=l4(d,i);if(h.navigate===!1){let _=h.fetcherKey||C4();await s(_,r,h.action||p,{unstable_defaultShouldRevalidate:h.unstable_defaultShouldRevalidate,preventScrollReset:h.preventScrollReset,formData:b,body:x,formMethod:h.method||g,formEncType:h.encType||m,flushSync:h.flushSync})}else await c(h.action||p,{unstable_defaultShouldRevalidate:h.unstable_defaultShouldRevalidate,preventScrollReset:h.preventScrollReset,formData:b,body:x,formMethod:h.method||g,formEncType:h.encType||m,replace:h.replace,state:h.state,fromRouteId:r,flushSync:h.flushSync,viewTransition:h.viewTransition})},[s,c,i,r])}function z4(n,{relative:i}={}){let{basename:r}=v.useContext(fa),s=v.useContext(za);Le(s,"useFormAction must be used inside a RouteContext");let[c]=s.matches.slice(-1),d={...Or(n||".",{relative:i})},h=Ba();if(n==null){d.search=h.search;let p=new URLSearchParams(d.search),g=p.getAll("index");if(g.some(b=>b==="")){p.delete("index"),g.filter(x=>x).forEach(x=>p.append("index",x));let b=p.toString();d.search=b?`?${b}`:""}}return(!n||n===".")&&c.route.index&&(d.search=d.search?d.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(d.pathname=d.pathname==="/"?r:Ha([r,d.pathname])),Wa(d)}function T4(n,{relative:i}={}){let r=v.useContext(fd);Le(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:s}=vy("useViewTransitionState"),c=Or(n,{relative:i});if(!r.isTransitioning)return!1;let d=Ra(r.currentLocation.pathname,s)||r.currentLocation.pathname,h=Ra(r.nextLocation.pathname,s)||r.nextLocation.pathname;return so(c.pathname,h)!=null||so(c.pathname,d)!=null}const Sy=(...n)=>n.filter((i,r,s)=>!!i&&i.trim()!==""&&s.indexOf(i)===r).join(" ").trim();const O4=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const D4=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(i,r,s)=>s?s.toUpperCase():r.toLowerCase());const dg=n=>{const i=D4(n);return i.charAt(0).toUpperCase()+i.slice(1)};var M4={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"};const A4=n=>{for(const i in n)if(i.startsWith("aria-")||i==="role"||i==="title")return!0;return!1};const L4=v.forwardRef(({color:n="currentColor",size:i=24,strokeWidth:r=2,absoluteStrokeWidth:s,className:c="",children:d,iconNode:h,...p},g)=>v.createElement("svg",{ref:g,...M4,width:i,height:i,stroke:n,strokeWidth:s?Number(r)*24/Number(i):r,className:Sy("lucide",c),...!d&&!A4(p)&&{"aria-hidden":"true"},...p},[...h.map(([m,b])=>v.createElement(m,b)),...Array.isArray(d)?d:[d]]));const De=(n,i)=>{const r=v.forwardRef(({className:s,...c},d)=>v.createElement(L4,{ref:d,iconNode:i,className:Sy(`lucide-${O4(dg(n))}`,`lucide-${n}`,s),...c}));return r.displayName=dg(n),r};const k4=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],_y=De("arrow-right",k4);const U4=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],fg=De("arrow-up-right",U4);const H4=[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]],B4=De("boxes",H4);const q4=[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]],Y4=De("brain",q4);const V4=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],pi=De("check",V4);const G4=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],go=De("chevron-down",G4);const $4=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],bn=De("chevron-right",$4);const K4=[["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"}]],xd=De("circle-alert",K4);const X4=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],hg=De("copy",X4);const Q4=[["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"}]],Z4=De("database",Q4);const F4=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M8 13h2",key:"yr2amv"}],["path",{d:"M14 13h2",key:"un5t4a"}],["path",{d:"M8 17h2",key:"2yhykz"}],["path",{d:"M14 17h2",key:"10kma7"}]],J4=De("file-spreadsheet",F4);const W4=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],el=De("file-text",W4);const P4=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]],jy=De("file",P4);const I4=[["path",{d:"M15 2h-4a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V8",key:"14sh0y"}],["path",{d:"M16.706 2.706A2.4 2.4 0 0 0 15 2v5a1 1 0 0 0 1 1h5a2.4 2.4 0 0 0-.706-1.706z",key:"1970lx"}],["path",{d:"M5 7a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 1.732-1",key:"l4dndm"}]],e2=De("files",I4);const t2=[["path",{d:"M18 19a5 5 0 0 1-5-5v8",key:"sz5oeg"}],["path",{d:"M9 20H4a2 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.9H20a2 2 0 0 1 2 2v5",key:"1w6njk"}],["circle",{cx:"13",cy:"12",r:"2",key:"1j92g6"}],["circle",{cx:"20",cy:"19",r:"2",key:"1obnsp"}]],vd=De("folder-git-2",t2);const a2=[["path",{d:"M2 9V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-1",key:"fm4g5t"}],["path",{d:"M2 13h10",key:"pgb2dq"}],["path",{d:"m9 16 3-3-3-3",key:"6m91ic"}]],n2=De("folder-input",a2);const l2=[["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"}]],i2=De("folder-open",l2);const r2=[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["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"}]],Ny=De("folder-plus",r2);const s2=[["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"}]],Ca=De("folder",s2);const o2=[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]],oo=De("git-branch",o2);const c2=[["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"}]],nd=De("git-commit-horizontal",c2);const u2=[["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"}]],ld=De("github",u2);const d2=[["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"}]],f2=De("globe",d2);const h2=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],m2=De("info",h2);const p2=[["path",{d:"M2 5h20",key:"1fs1ex"}],["path",{d:"M6 12h12",key:"8npq4p"}],["path",{d:"M9 19h6",key:"456am0"}]],g2=De("list-filter",p2);const y2=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Yt=De("loader-circle",y2);const x2=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],v2=De("menu",x2);const b2=[["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"}]],S2=De("monitor",b2);const _2=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],j2=De("moon",_2);const N2=[["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"}]],gi=De("package",N2);const E2=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],w2=De("panel-left",E2);const C2=[["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"}]],id=De("pencil",C2);const R2=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Ey=De("plus",R2);const z2=[["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"}]],T2=De("refresh-cw",z2);const O2=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],D2=De("search",O2);const M2=[["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"}]],A2=De("settings",M2);const L2=[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]],k2=De("share-2",L2);const U2=[["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"}]],H2=De("sparkles",U2);const B2=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],q2=De("sun",B2);const Y2=[["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"}]],wy=De("trash-2",Y2);const V2=[["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"}]],rd=De("upload",V2);const G2=[["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"}]],$2=De("users",G2);const K2=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],yo=De("x",K2),mg=n=>{let i;const r=new Set,s=(m,b)=>{const x=typeof m=="function"?m(i):m;if(!Object.is(x,i)){const _=i;i=b??(typeof x!="object"||x===null)?x:Object.assign({},i,x),r.forEach(j=>j(i,_))}},c=()=>i,p={setState:s,getState:c,getInitialState:()=>g,subscribe:m=>(r.add(m),()=>r.delete(m))},g=i=n(s,c,p);return p},X2=(n=>n?mg(n):mg),Q2=n=>n;function Z2(n,i=Q2){const r=fi.useSyncExternalStore(n.subscribe,fi.useCallback(()=>i(n.getState()),[n,i]),fi.useCallback(()=>i(n.getInitialState()),[n,i]));return fi.useDebugValue(r),r}const pg=n=>{const i=X2(n),r=s=>Z2(i,s);return Object.assign(r,i),r},xo=(n=>n?pg(n):pg),F2="/api/v1";class yr extends Error{constructor(i,r,s){super(s),this.status=i,this.code=r,this.name="ApiError"}}async function Ps(n,i,r,s){let c=`${F2}${i}`;if(s){const p=new URLSearchParams(s).toString();p&&(c+=`?${p}`)}const d={method:n,headers:{"Content-Type":"application/json"}};r!==void 0&&(d.body=JSON.stringify(r));const h=await fetch(c,d);if(!h.ok){let p="UNKNOWN",g=h.statusText;try{const m=await h.json();m.code&&(p=m.code),m.message&&(g=m.message)}catch{}throw new yr(h.status,p,g)}return h.json()}const Tt={get(n,i){return Ps("GET",n,void 0,i)},post(n,i){return Ps("POST",n,i)},put(n,i){return Ps("PUT",n,i)},delete(n){return Ps("DELETE",n)}},J2=3e4,W2=1e3,P2=3e4;class I2{ws=null;url="";handlers=new Map;statusHandlers=new Set;heartbeatTimer=null;reconnectTimer=null;reconnectAttempt=0;intentionalClose=!1;_status="disconnected";get status(){return this._status}setStatus(i){this._status=i;for(const r of this.statusHandlers)r(i)}onStatusChange(i){return this.statusHandlers.add(i),()=>{this.statusHandlers.delete(i)}}connect(i){this.url=i,this.intentionalClose=!1,this.reconnectAttempt=0,this.open()}disconnect(){this.intentionalClose=!0,this.clearTimers(),this.ws&&(this.ws.close(),this.ws=null),this.setStatus("disconnected")}on(i,r){let s=this.handlers.get(i);return s||(s=new Set,this.handlers.set(i,s)),s.add(r),()=>{s.delete(r),s.size===0&&this.handlers.delete(i)}}send(i,r){if(this.ws?.readyState!==WebSocket.OPEN)return;const s={event:i,payload:r,timestamp:Date.now()};this.ws.send(JSON.stringify(s))}open(){this.setStatus("connecting");const i=new WebSocket(this.url);i.onopen=()=>{this.reconnectAttempt=0,this.setStatus("connected"),this.startHeartbeat()},i.onmessage=r=>{try{const s=JSON.parse(String(r.data));if(s.event==="pong")return;const c=this.handlers.get(s.event);if(c)for(const d of c)d(s.payload)}catch{}},i.onclose=()=>{this.stopHeartbeat(),this.intentionalClose||(this.setStatus("reconnecting"),this.scheduleReconnect())},i.onerror=()=>{},this.ws=i}startHeartbeat(){this.stopHeartbeat(),this.heartbeatTimer=setInterval(()=>{this.ws?.readyState===WebSocket.OPEN&&this.ws.send(JSON.stringify({event:"ping",payload:null,timestamp:Date.now()}))},J2)}stopHeartbeat(){this.heartbeatTimer&&(clearInterval(this.heartbeatTimer),this.heartbeatTimer=null)}scheduleReconnect(){if(this.reconnectTimer)return;const i=Math.min(W2*2**this.reconnectAttempt,P2);this.reconnectAttempt++,this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.open()},i)}clearTimers(){this.stopHeartbeat(),this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null)}}const Pa=new I2,Nl=xo(n=>({status:"disconnected",onlineCount:0,connections:[],setStatus:i=>n({status:i}),fetchDaemonStatus:async()=>{try{const i=await Tt.get("/daemons/status");n({onlineCount:i.online_count,connections:i.connections})}catch{}}})),eS=n=>n==="connecting"?"disconnected":n;Pa.onStatusChange(n=>{Nl.getState().setStatus(eS(n))});Pa.on("ws:daemon:connected",n=>{const i=n;Nl.setState(r=>{if(r.connections.some(h=>h.machine_id===i.machine_id))return r;const c={machine_id:i.machine_id};i.lib_id&&(c.lib_id=i.lib_id);const d=[...r.connections,c];return{connections:d,onlineCount:d.length}})});Pa.on("ws:daemon:status",n=>{const i=n;Nl.setState(r=>{if(i.is_online){if(r.connections.some(p=>p.machine_id===i.machine_id))return r;const d={machine_id:i.machine_id};i.lib_id&&(d.lib_id=i.lib_id);const h=[...r.connections,d];return{connections:h,onlineCount:h.length}}const s=r.connections.filter(c=>c.machine_id!==i.machine_id);return{connections:s,onlineCount:s.length}})});const wr="lib_cloud_default",Vt=xo((n,i)=>({libraries:[],loading:!1,error:null,fetchLibraries:async()=>{n({loading:!0,error:null});try{const r=await Tt.get("/libraries");n({libraries:r,loading:!1})}catch(r){n({error:r instanceof Error?r.message:"Failed to load libraries",loading:!1})}},createLibrary:async r=>{const s=await Tt.post("/libraries",r);return n(c=>({libraries:[...c.libraries,s]})),s},deleteLibrary:async r=>{await Tt.delete(`/libraries/${r}`),n(s=>({libraries:s.libraries.filter(c=>c.id!==r)}))},updateLibraryName:async(r,s)=>{const c=await Tt.put(`/libraries/${r}`,{name:s});n(d=>({libraries:d.libraries.map(h=>h.id===r?c:h)}))},_updateLibraryOnline:(r,s)=>{n(c=>({libraries:c.libraries.map(d=>d.id===r?{...d,is_online:s}:d)}))},_refreshLibrary:async r=>{try{const s=await Tt.get(`/libraries/${r}`);n(c=>({libraries:c.libraries.map(d=>d.id===r?s:d)}))}catch{i().fetchLibraries()}}})),Dr=n=>{const i=n.libraries.filter(s=>s.type==="cloud").sort((s,c)=>s.created_at.localeCompare(c.created_at)),r=n.libraries.filter(s=>s.type==="daemon").sort((s,c)=>s.name.localeCompare(c.name));return[...i,...r]},tS=n=>n.libraries.filter(i=>i.type==="daemon");Pa.on("ws:daemon:status",n=>{const i=n;i.lib_id&&Vt.getState()._updateLibraryOnline(i.lib_id,i.is_online),Vt.getState().fetchLibraries()});Pa.on("ws:daemon:connected",n=>{const i=n;i.lib_id&&Vt.getState()._updateLibraryOnline(i.lib_id,!0),Vt.getState().fetchLibraries()});Pa.on("ws:library:updated",n=>{const i=n;Vt.getState()._refreshLibrary(i.library_id)});const gg=n=>Symbol.iterator in n,yg=n=>"entries"in n,xg=(n,i)=>{const r=n instanceof Map?n:new Map(n.entries()),s=i instanceof Map?i:new Map(i.entries());if(r.size!==s.size)return!1;for(const[c,d]of r)if(!s.has(c)||!Object.is(d,s.get(c)))return!1;return!0},aS=(n,i)=>{const r=n[Symbol.iterator](),s=i[Symbol.iterator]();let c=r.next(),d=s.next();for(;!c.done&&!d.done;){if(!Object.is(c.value,d.value))return!1;c=r.next(),d=s.next()}return!!c.done&&!!d.done};function nS(n,i){return Object.is(n,i)?!0:typeof n!="object"||n===null||typeof i!="object"||i===null||Object.getPrototypeOf(n)!==Object.getPrototypeOf(i)?!1:gg(n)&&gg(i)?yg(n)&&yg(i)?xg(n,i):aS(n,i):xg({entries:()=>Object.entries(n)},{entries:()=>Object.entries(i)})}function xi(n){const i=fi.useRef(void 0);return r=>{const s=n(r);return nS(i.current,s)?i.current:i.current=s}}function sd(){const{t:n}=Re(),i=Nl(h=>h.onlineCount),r=Nl(h=>h.connections.length);if(Vt(xi(tS)).length===0)return null;const c=i>0,d=c?n("sources.header.daemon_status",{online:i,total:r}):n("sources.header.all_offline");return f.jsxs("div",{className:"group relative flex items-center",title:d,children:[f.jsx("span",{className:`inline-block h-[7px] w-[7px] rounded-full ${c?"bg-c4a-success":"bg-c4a-error"}`}),f.jsx("span",{className:"pointer-events-none absolute right-full mr-2 hidden whitespace-nowrap rounded bg-c4a-bg-elevated px-2 py-1 font-mono text-xs text-c4a-text-secondary shadow-c4a-md group-hover:block",children:d})]})}const vg=[{to:"/",labelKey:"nav.home"},{to:"/studio",labelKey:"nav.studio"},{to:"/docs",labelKey:"nav.docs"}];function lS(){const{t:n}=Re(),[i,r]=v.useState(!1);return f.jsxs("header",{className:"sticky top-0 z-40 border-b border-c4a-border-subtle bg-c4a-bg-base/95 backdrop-blur-sm",children:[f.jsxs("div",{className:"flex h-14 items-center justify-between px-4",children:[f.jsxs(aa,{to:"/",className:"flex items-center gap-2 text-c4a-text-primary",children:[f.jsx("span",{className:"font-mono text-lg font-bold text-c4a-accent",children:"C4A"}),f.jsx("span",{className:"hidden font-mono text-sm font-semibold uppercase tracking-tight md:inline",children:"Context4AI"})]}),f.jsxs("div",{className:"hidden items-center gap-6 md:flex",children:[f.jsx("nav",{className:"flex items-center gap-4",children:vg.map(({to:s,labelKey:c})=>f.jsx(Er,{to:s,end:s==="/",className:({isActive:d})=>`font-mono text-xs uppercase tracking-tight transition-colors duration-150 ${d?"text-c4a-accent":"text-c4a-text-secondary hover:text-c4a-text-primary"}`,children:n(c)},s))}),f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx(sd,{}),f.jsx(aa,{to:"/login",className:"font-mono text-xs uppercase tracking-tight text-c4a-text-muted transition-colors duration-150 hover:text-c4a-text-primary",children:n("nav.login")})]})]}),f.jsx("button",{onClick:()=>r(!i),className:"text-c4a-text-secondary md:hidden",children:i?f.jsx(yo,{size:20}):f.jsx(v2,{size:20})})]}),i&&f.jsxs("div",{className:"border-t border-c4a-border-subtle bg-c4a-bg-surface px-4 pb-4 pt-2 md:hidden",children:[f.jsx("nav",{className:"flex flex-col gap-2",children:vg.map(({to:s,labelKey:c})=>f.jsx(Er,{to:s,end:s==="/",onClick:()=>r(!1),className:({isActive:d})=>`block py-2 font-mono text-xs uppercase tracking-tight transition-colors duration-150 ${d?"text-c4a-accent":"text-c4a-text-secondary hover:text-c4a-text-primary"}`,children:n(c)},s))}),f.jsx("div",{className:"mt-2 border-t border-c4a-border-subtle pt-2",children:f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx(sd,{}),f.jsx(aa,{to:"/login",onClick:()=>r(!1),className:"font-mono text-xs uppercase tracking-tight text-c4a-text-muted transition-colors duration-150 hover:text-c4a-text-primary",children:n("nav.login")})]})})]})]})}function iS(n){return n==="system"&&typeof window<"u"?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":n==="system"?"dark":n}function Cy(n){if(typeof window>"u")return;const i=iS(n);document.documentElement.setAttribute("data-theme",i),localStorage.setItem("theme",n)}function rS(){try{return localStorage.getItem("theme")||"system"}catch{return"system"}}const Ry=xo(n=>({theme:rS(),setTheme:i=>{Cy(i),n({theme:i})}}));let bg=!1;function sS(){if(bg||typeof window>"u")return;bg=!0;const n=window.matchMedia("(prefers-color-scheme: dark)"),i=()=>{const{theme:r}=Ry.getState();r==="system"&&Cy("system")};n.addEventListener("change",i)}sS();const oS=[{mode:"light",icon:q2,labelKey:"footer.theme.light"},{mode:"dark",icon:j2,labelKey:"footer.theme.dark"},{mode:"system",icon:S2,labelKey:"footer.theme.system"}];function zy(){const{t:n}=Re(),{theme:i,setTheme:r}=Ry();return f.jsx("div",{className:"flex items-center gap-1",children:oS.map(({mode:s,icon:c,labelKey:d})=>f.jsx("button",{onClick:()=>r(s),title:n(d),className:`cursor-pointer rounded p-1.5 transition-colors duration-150 ${i===s?"bg-c4a-bg-active text-c4a-accent":"text-c4a-text-muted hover:text-c4a-text-secondary hover:bg-c4a-bg-hover"}`,children:f.jsx(c,{size:14})},s))})}function Ty(){const{i18n:n}=Re(),i=()=>{const r=n.language==="en"?"zh":"en";n.changeLanguage(r)};return f.jsx("button",{onClick:i,className:"cursor-pointer rounded px-2 py-1 font-mono text-xs uppercase tracking-tight text-c4a-text-muted transition-colors duration-150 hover:text-c4a-text-secondary hover:bg-c4a-bg-hover",children:n.language==="en"?"CN":"EN"})}function Oy({compact:n}){const{t:i}=Re(),r=new Date().getFullYear(),s=n?"footer.copyright_compact":"footer.copyright";return f.jsx("p",{className:"font-mono text-[11px] text-c4a-text-muted",children:i(s,{year:r})})}const cS="_brandIcon_1c7st_1",uS="_iconPulse_1c7st_35",Sg={brandIcon:cS,iconPulse:uS};function dS({variant:n}){const{t:i}=Re(),r=n==="studio"?"bg-c4a-bg-surface":"bg-c4a-bg-base";return f.jsx("footer",{className:`border-t border-c4a-border-subtle ${r} px-4 py-4`,children:f.jsxs("div",{className:"flex items-end justify-between gap-4",children:[f.jsxs("div",{className:"hidden items-center gap-3 md:flex",children:[f.jsx("div",{className:Sg.brandIcon,children:f.jsx("span",{className:Sg.iconPulse,children:"C4A"})}),f.jsxs("div",{className:"flex flex-col",children:[f.jsx("span",{className:"font-mono text-xs font-semibold uppercase tracking-tight text-c4a-text-primary",children:"Context4AI"}),f.jsx("span",{className:"font-mono text-[10px] uppercase tracking-wider text-c4a-text-muted",children:i("footer.tagline")})]})]}),f.jsxs("div",{className:"ml-auto flex flex-col items-end gap-2",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(zy,{}),f.jsx(Ty,{})]}),f.jsx(Oy,{})]})]})})}function fS(){return f.jsxs("div",{className:"flex min-h-screen flex-col",children:[f.jsx(lS,{}),f.jsx("main",{className:"mx-auto flex w-full max-w-[1200px] flex-1 flex-col px-4",children:f.jsx(py,{})}),f.jsx(dS,{})]})}function hS({onToggleSidebar:n}){const{t:i}=Re();return f.jsx("header",{className:"sticky top-0 z-40 border-b border-c4a-border-subtle bg-c4a-bg-surface/95 backdrop-blur-sm",children:f.jsxs("div",{className:"relative flex h-14 items-center justify-between px-4",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[n&&f.jsx("button",{onClick:n,className:"text-c4a-text-secondary transition-colors duration-150 hover:text-c4a-text-primary md:hidden",children:f.jsx(w2,{size:20})}),f.jsxs(aa,{to:"/",className:"hidden items-center gap-2 text-c4a-text-primary md:flex",children:[f.jsx("span",{className:"font-mono text-lg font-bold text-c4a-accent",children:"C4A"}),f.jsx("span",{className:"font-mono text-sm font-semibold uppercase tracking-tight",children:"Context4AI"})]})]}),f.jsx(aa,{to:"/",className:"absolute left-1/2 flex -translate-x-1/2 items-center gap-2 text-c4a-text-primary md:hidden",children:f.jsx("span",{className:"font-mono text-lg font-bold text-c4a-accent",children:"C4A"})}),f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx(sd,{}),f.jsx(aa,{to:"/login",className:"font-mono text-xs uppercase tracking-tight text-c4a-text-muted transition-colors duration-150 hover:text-c4a-text-primary",children:i("nav.login")})]})]})})}const mS="lib_cloud_default",pS=n=>`flex items-center gap-2 rounded px-3 py-2 font-mono text-xs uppercase tracking-tight transition-colors duration-150 ${n?"bg-c4a-bg-active text-c4a-accent":"text-c4a-text-secondary hover:bg-c4a-bg-hover hover:text-c4a-text-primary"}`,gS=[{to:"/studio/modeling",icon:B4,i18nKey:"studio.sidebar.modeling"},{to:"/studio/brain",icon:Y4,i18nKey:"studio.sidebar.brain"},{to:"/studio/discovery",icon:D2,i18nKey:"studio.sidebar.discovery"},{to:"/studio/sharing",icon:k2,i18nKey:"studio.sidebar.sharing"},{to:"/studio/collaboration",icon:$2,i18nKey:"studio.sidebar.collaboration"},{to:"/studio/settings",icon:A2,i18nKey:"studio.sidebar.settings"}];function _g({onNavigate:n}){const{t:i}=Re(),r=Ba(),s=tl(),c=Vt(xi(Dr)),d=r.pathname.startsWith("/studio/sources")||r.pathname.startsWith("/studio/source/"),[h,p]=v.useState(d);v.useEffect(()=>{d&&p(!0)},[d]);const g=m=>m.id===mS?i("sources.library.default_cloud_name"):m.name;return f.jsxs("aside",{className:"flex h-full w-[220px] shrink-0 flex-col border-r border-c4a-border-subtle bg-c4a-bg-surface p-4",children:[f.jsxs("nav",{className:"flex flex-col gap-1",children:[f.jsxs("div",{className:"group/sources",children:[f.jsxs("button",{onClick:()=>p(m=>!m),className:`flex w-full cursor-pointer items-center gap-2 rounded px-3 py-2 font-mono text-xs uppercase tracking-tight transition-colors duration-150 ${d?"text-c4a-accent":"text-c4a-text-secondary hover:text-c4a-text-primary"}`,children:[f.jsx(Z4,{size:14}),i("studio.sidebar.sources"),f.jsx("span",{role:"button",tabIndex:0,onClick:m=>{m.stopPropagation(),s("/studio/sources/add-client"),n?.()},onKeyDown:m=>{(m.key==="Enter"||m.key===" ")&&(m.stopPropagation(),s("/studio/sources/add-client"),n?.())},className:"rounded p-0.5 text-c4a-text-muted opacity-0 transition-all hover:bg-c4a-bg-hover max-md:opacity-100 group-hover/sources:opacity-100 group-hover/sources:text-c4a-accent",title:i("sources.menu.add_client"),children:f.jsx(Ey,{size:12})}),f.jsx("span",{className:"ml-auto shrink-0",children:h?f.jsx(go,{size:12}):f.jsx(bn,{size:12})})]}),h&&f.jsx("div",{className:"mt-0.5 flex flex-col gap-0.5",children:c.map(m=>{const b=g(m);return f.jsxs(Er,{to:`/studio/sources/${m.id}`,onClick:n,className:({isActive:x})=>`flex items-center gap-2 rounded py-1.5 pl-8 pr-3 font-mono text-xs tracking-tight transition-colors duration-150 ${x?"bg-c4a-bg-active text-c4a-accent":"text-c4a-text-secondary hover:bg-c4a-bg-hover hover:text-c4a-text-primary"}`,children:[f.jsx("span",{className:"truncate",children:b}),m.type==="daemon"&&f.jsx("span",{className:`ml-auto h-[7px] w-[7px] shrink-0 rounded-full ${m.is_online?"bg-c4a-success":"bg-c4a-error"}`})]},m.id)})})]}),gS.map(({to:m,icon:b,i18nKey:x})=>f.jsxs(Er,{to:m,onClick:n,className:({isActive:_})=>pS(_),children:[f.jsx(b,{size:14}),i(x)]},m))]}),f.jsxs("div",{className:"mt-auto flex flex-col gap-2 pt-3",children:[f.jsxs("div",{className:"flex items-center gap-1.5",children:[f.jsx(zy,{}),f.jsx(Ty,{})]}),f.jsx(Oy,{compact:!0})]})]})}function yS(){const[n,i]=v.useState(!1);return v.useEffect(()=>{Vt.getState().fetchLibraries(),Nl.getState().fetchDaemonStatus()},[]),v.useEffect(()=>Pa.onStatusChange(r=>{r==="connected"&&(Vt.getState().fetchLibraries(),Nl.getState().fetchDaemonStatus())}),[]),f.jsxs("div",{className:"flex h-screen flex-col overflow-hidden",children:[f.jsx(hS,{onToggleSidebar:()=>i(!n)}),f.jsxs("div",{className:"flex min-h-0 flex-1",children:[f.jsx("div",{className:"hidden md:block",children:f.jsx(_g,{})}),n&&f.jsxs(f.Fragment,{children:[f.jsx("div",{className:"fixed inset-0 top-14 z-30 bg-black/40 md:hidden",onClick:()=>i(!1)}),f.jsx("div",{className:"fixed bottom-0 left-0 top-14 z-30 md:hidden",children:f.jsx(_g,{onNavigate:()=>i(!1)})})]}),f.jsx("main",{className:"flex min-h-0 flex-1 flex-col overflow-x-hidden",children:f.jsx(py,{})})]})]})}function xS(){const{t:n}=Re();return f.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center py-20 text-center",children:[f.jsx("h1",{className:"font-mono text-4xl font-bold uppercase tracking-wide text-c4a-text-primary md:text-5xl",children:n("home.hero.title")}),f.jsx("p",{className:"mt-6 max-w-lg text-base text-c4a-text-secondary",children:n("home.hero.description")}),f.jsxs("div",{className:"mt-10 flex items-center gap-4",children:[f.jsxs(aa,{to:"/studio",className:"flex items-center gap-2 rounded bg-c4a-accent px-5 py-2.5 font-mono text-xs font-semibold uppercase tracking-tight text-white transition-colors duration-150 hover:bg-c4a-accent-hover",children:[n("home.hero.cta.studio"),f.jsx(_y,{size:14})]}),f.jsx("a",{href:"https://github.com/context4ai/c4a",target:"_blank",rel:"noopener noreferrer",className:"rounded border border-c4a-border-default px-5 py-2.5 font-mono text-xs font-semibold uppercase tracking-tight text-c4a-text-secondary transition-colors duration-150 hover:border-c4a-border-strong hover:text-c4a-text-primary",children:n("home.hero.cta.github")})]})]})}function Ta({title:n,version:i,description:r}){const{t:s}=Re();return f.jsx("div",{className:"flex flex-1 items-center justify-center p-8",children:f.jsxs("div",{className:"max-w-md text-center",children:[f.jsx("h2",{className:"font-mono text-2xl font-bold uppercase text-c4a-text-primary",children:n}),i&&f.jsx("span",{className:"mt-3 inline-block rounded border border-c4a-border-default bg-c4a-bg-surface px-3 py-1 font-mono text-xs uppercase text-c4a-accent",children:s("placeholder.coming",{version:i})}),f.jsx("p",{className:"mt-4 text-sm text-c4a-text-secondary",children:r})]})})}function vS(){const{t:n}=Re();return f.jsx(Ta,{title:n("page.login.title"),version:"0.5.0",description:n("page.login.description")})}function bS(){const{t:n}=Re();return f.jsx(Ta,{title:n("page.docs.title"),version:"0.4.13",description:n("page.docs.description")})}function SS(){const{t:n}=Re();return f.jsxs("div",{className:"flex min-h-screen flex-col items-center justify-center bg-c4a-bg-base p-8 text-center",children:[f.jsx("h1",{className:"font-mono text-6xl font-bold text-c4a-accent",children:n("notfound.title")}),f.jsx("p",{className:"mt-4 text-base text-c4a-text-secondary",children:n("notfound.description")}),f.jsx(aa,{to:"/",className:"mt-8 rounded border border-c4a-border-default px-5 py-2.5 font-mono text-xs uppercase tracking-tight text-c4a-text-secondary transition-colors duration-150 hover:border-c4a-border-strong hover:text-c4a-text-primary",children:n("notfound.back")})]})}function _S(){const{t:n}=Re();return f.jsx(Ta,{title:n("page.modeling.title"),version:"0.4.16",description:n("page.modeling.description")})}function jS(){const{t:n}=Re();return f.jsx(Ta,{title:n("page.brain.title"),version:"0.4.18",description:n("page.brain.description")})}function NS(){const{t:n}=Re();return f.jsx(Ta,{title:n("page.discovery.title"),version:"0.6.x",description:n("page.discovery.description")})}function ES(){const{t:n}=Re();return f.jsx(Ta,{title:n("page.sharing.title"),version:"0.4.39",description:n("page.sharing.description")})}function wS(){const{t:n}=Re();return f.jsx(Ta,{title:n("page.collaboration.title"),version:"0.5.x",description:n("page.collaboration.description")})}function CS(){const{t:n}=Re();return f.jsx(Ta,{title:n("page.settings.title"),version:"0.5.x",description:n("page.settings.description")})}function RS(){const{t:n}=Re();return f.jsx(Ta,{title:n("page.code_setup.title"),version:"0.4.13",description:n("page.code_setup.description")})}function zS(){const{t:n}=Re();return f.jsx(Ta,{title:n("page.code_compile.title"),version:"0.4.13",description:n("page.code_compile.description")})}function TS(){const{t:n}=Re();return f.jsx(Ta,{title:n("page.code_review.title"),version:"0.4.14",description:n("page.code_review.description")})}function OS(){const{t:n}=Re();return f.jsx(Ta,{title:n("page.code_result.title"),version:"0.4.14",description:n("page.code_result.description")})}const vo=(n,i)=>{for(const r of n){if(r.path===i)return r;if(r.children){const s=vo(r.children,i);if(s)return s}}return null},DS=(n,i)=>i===""?n:vo(n,i)?.children??[],Dy=(n,i)=>{if(!i)return[];const r=i.split("/"),s=[];let c="";for(const d of r){c=c?`${c}/${d}`:d;const h=vo(n,c);h&&s.push(h)}return s},bo=xo(n=>({rootSources:[],currentRoot:null,loading:!1,error:null,total:0,limit:100,offset:0,filter:"all",fetchRootSources:async({library_id:i,limit:r,offset:s})=>{n({loading:!0,error:null});try{const c={library_id:i};r!==void 0&&(c.limit=String(r)),s!==void 0&&(c.offset=String(s));const d=await Tt.get("/sources",c);n({rootSources:d.items,total:d.total,limit:d.limit,offset:d.offset,loading:!1})}catch(c){n({error:c instanceof Error?c.message:"Failed to load sources",loading:!1})}},fetchRootSource:async i=>{const r=await Tt.get(`/sources/${i}`);return n({currentRoot:r}),r},createSource:async i=>await Tt.post("/sources",i),addTreeNode:async(i,r)=>{const s=await Tt.post(`/sources/${i}/tree`,r);return n(c=>({rootSources:c.rootSources.map(d=>d.id===i?s:d),currentRoot:c.currentRoot?.id===i?s:c.currentRoot})),s},updateSource:async(i,r)=>{const s=await Tt.put(`/sources/${i}`,r);n(c=>({rootSources:c.rootSources.map(d=>d.id===i?s:d),currentRoot:c.currentRoot?.id===i?s:c.currentRoot}))},deleteSource:async i=>{await Tt.delete(`/sources/${i}`),n(r=>({rootSources:r.rootSources.filter(s=>s.id!==i),currentRoot:r.currentRoot?.id===i?null:r.currentRoot}))},uploadDoc:async i=>await Tt.post("/sources/upload",i),setFilter:i=>n({filter:i}),clearSources:()=>n({rootSources:[],currentRoot:null,total:0,offset:0})}));function Mr({segments:n}){const{t:i}=Re(),r=v.useRef(null),s=v.useRef(null),[c,d]=v.useState(0),h=[{label:i("sources.breadcrumb.sources")},...n],p=Math.max(0,h.length-3);v.useEffect(()=>{const m=r.current,b=s.current;if(!m||!b)return;const x=()=>{const j=m.clientWidth,R=Array.from(b.children);if(R.length===0)return;const D=R.map(W=>W.offsetWidth),k=4;if(D.reduce((W,N)=>W+N,0)+k*(D.length-1)<=j){d(0);return}const G=20,K=(D[0]??0)+(D[1]??0)+k,le=D[D.length-1]??0,F=K+k+G+k+le;let I=p;for(let W=1;W<=p;W++){let N=0;for(let Y=2+W;Y<D.length-1;Y++)N+=D[Y]+k;if(F+N<=j){I=W;break}}d(I)};x();const _=new ResizeObserver(x);return _.observe(m),()=>_.disconnect()},[p,n,i]);const g=(()=>{if(c===0||h.length<=3)return h;const m=h.slice(0,2),b=h[h.length-1],x=h.slice(2+c,h.length-1);return[...m,{label:"…"},...x,b]})();return f.jsxs("div",{ref:r,className:"relative min-w-0 overflow-hidden",children:[f.jsx("nav",{className:"flex min-h-8 items-center gap-1 font-mono text-xs text-c4a-text-muted",children:g.map((m,b)=>{const x=b===g.length-1;return f.jsxs("span",{className:"flex shrink-0 items-center gap-1",children:[b>0&&f.jsx(bn,{size:12,className:"shrink-0 text-c4a-text-muted"}),m.to&&!x?f.jsx(aa,{to:m.to,className:"cursor-pointer whitespace-nowrap transition-colors hover:text-c4a-text-primary",children:m.label}):f.jsx("span",{className:`whitespace-nowrap ${x?"text-c4a-text-primary":""}`,children:m.label})]},b)})}),f.jsx("div",{ref:s,"aria-hidden":!0,className:"pointer-events-none invisible absolute left-0 top-0 flex h-0 items-center gap-1 overflow-visible whitespace-nowrap font-mono text-xs",children:h.map((m,b)=>f.jsxs("span",{className:"flex shrink-0 items-center gap-1",children:[b>0&&f.jsx(bn,{size:12}),f.jsx("span",{className:"whitespace-nowrap",children:m.label})]},b))})]})}const MS=["all","indexed","not_indexed"];function AS({value:n,onChange:i}){const{t:r}=Re(),[s,c]=v.useState(!1),d=v.useRef(null),h=v.useRef(null),p={all:r("sources.filter.all"),indexed:r("sources.filter.indexed"),not_indexed:r("sources.filter.not_indexed")},g=v.useCallback(x=>{d.current&&!d.current.contains(x.target)&&c(!1)},[]);v.useEffect(()=>{if(s)return document.addEventListener("mousedown",g),()=>document.removeEventListener("mousedown",g)},[s,g]);const m=v.useCallback(()=>{h.current&&(clearTimeout(h.current),h.current=null),c(!0)},[]),b=v.useCallback(()=>{h.current=setTimeout(()=>c(!1),150)},[]);return f.jsxs("div",{ref:d,className:"relative",onMouseEnter:m,onMouseLeave:b,children:[f.jsxs("button",{className:"flex items-center gap-1.5 rounded border border-c4a-border-default bg-c4a-bg-surface p-1 font-mono text-xs uppercase text-c4a-text-secondary transition-colors hover:bg-c4a-bg-hover hover:text-c4a-text-primary sm:px-2 sm:py-1",children:[f.jsx(g2,{size:12}),f.jsx("span",{className:"hidden sm:inline",children:p[n]}),f.jsx(go,{size:12,className:"hidden transition-transform sm:block"})]}),s&&f.jsx("div",{className:"absolute right-0 top-full z-20 mt-1 min-w-[120px] rounded border border-c4a-border-default bg-c4a-bg-elevated py-1 shadow-c4a-lg",children:MS.map(x=>f.jsxs("button",{onClick:()=>{i(x),c(!1)},className:`flex w-full items-center gap-2 px-3 py-1.5 text-left font-mono text-xs transition-colors hover:bg-c4a-bg-hover hover:text-c4a-text-primary ${x===n?"text-c4a-accent":"text-c4a-text-secondary"}`,children:[f.jsx(pi,{size:12,className:x===n?"opacity-100":"opacity-0"}),p[x]]},x))})]})}function My({currentName:n,onConfirm:i,onCancel:r,error:s}){const[c,d]=v.useState(n),h=v.useRef(null);v.useEffect(()=>{h.current?.select()},[]);const p=v.useCallback(()=>{const m=c.trim();m&&m!==n?i(m):r()},[c,n,i,r]),g=v.useCallback(m=>{m.key==="Enter"?(m.preventDefault(),p()):m.key==="Escape"&&r()},[p,r]);return f.jsxs("div",{className:"flex items-center gap-1",children:[f.jsx("input",{ref:h,value:c,onChange:m=>d(m.target.value),onKeyDown:g,onBlur:p,className:"min-w-0 flex-1 rounded border border-c4a-accent bg-c4a-bg-surface px-2 py-1 text-sm text-c4a-text-primary outline-none",autoFocus:!0}),f.jsx("button",{onClick:m=>{m.stopPropagation(),p()},className:"rounded p-0.5 text-c4a-success hover:bg-c4a-bg-hover",children:f.jsx(pi,{size:14})}),f.jsx("button",{onClick:m=>{m.stopPropagation(),r()},className:"rounded p-0.5 text-c4a-error hover:bg-c4a-bg-hover",children:f.jsx(yo,{size:14})}),s&&f.jsx("span",{className:"ml-1 text-xs text-c4a-error",children:s})]})}function LS({source:n,isDaemonLibrary:i}){return n.kind==="folder"?i?f.jsx(i2,{size:16,className:"shrink-0 text-c4a-text-muted"}):f.jsx(Ca,{size:16,className:"shrink-0 text-c4a-text-muted"}):n.source_type==="code"?f.jsx(gi,{size:16,className:"shrink-0 text-c4a-accent"}):f.jsx(el,{size:16,className:"shrink-0 text-c4a-accent"})}function jg({status:n}){const{t:i}=Re(),[r,s]=v.useState(!1),c={none:"bg-c4a-accent/10 text-c4a-accent/60",indexed:"bg-c4a-accent/20 text-c4a-accent",stale:"bg-c4a-warning/20 text-c4a-warning"},d={none:"sources.status.none",indexed:"sources.status.indexed",stale:"sources.status.stale"},h=n==="none"&&r;return f.jsx("span",{className:`rounded px-1.5 py-0.5 font-mono text-[10px] uppercase transition-colors ${c[n]} ${n==="none"?"cursor-pointer hover:bg-c4a-accent/20 hover:text-c4a-accent":""}`,onMouseEnter:()=>s(!0),onMouseLeave:()=>s(!1),children:i(h?"sources.status.go_index":d[n])})}function Ng({source:n,displayName:i,childCount:r,isDaemonLibrary:s,isRepoRoot:c,onClick:d,onRename:h,onDelete:p}){const{t:g}=Re(),[m,b]=v.useState(!1),[x,_]=v.useState(null),j=v.useCallback(async Z=>{if(!h)return;const G=await h(Z);G?_(G):(b(!1),_(null))},[h]),R=v.useCallback(()=>{b(!1),_(null)},[]),D=!c&&h,k=p;return f.jsxs("div",{className:"group flex items-center gap-3 rounded pl-3 pr-5 py-2 transition-colors hover:bg-c4a-bg-hover cursor-pointer",onClick:m?void 0:d,children:[f.jsx(LS,{source:n,isDaemonLibrary:s??!1}),m?f.jsx("div",{className:"min-w-0 flex-1",onClick:Z=>Z.stopPropagation(),children:f.jsx(My,{currentName:n.name,onConfirm:j,onCancel:R,error:x})}):f.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-c4a-text-primary",children:i??n.name}),f.jsxs("div",{className:"hidden items-center gap-2 md:flex",children:[n.kind==="folder"&&r!==void 0&&f.jsx("span",{className:"font-mono text-xs text-c4a-text-muted",children:g("common.items",{count:r})}),n.kind==="source"&&f.jsx(jg,{status:n.index_status})]}),f.jsx("div",{className:"flex items-center gap-2 md:hidden",children:n.kind==="source"&&f.jsx(jg,{status:n.index_status})}),(D||k)&&f.jsxs("div",{className:"flex items-center gap-1 opacity-0 transition-opacity group-hover:opacity-100",children:[D&&f.jsx("button",{title:g("sources.actions.rename"),onClick:Z=>{Z.stopPropagation(),b(!0)},className:"rounded p-1 text-c4a-text-muted transition-colors hover:text-c4a-accent",children:f.jsx(id,{size:14})}),k&&f.jsx("button",{title:g("sources.actions.delete"),onClick:Z=>{Z.stopPropagation(),p()},className:"rounded p-1 text-c4a-text-muted transition-colors hover:text-c4a-accent",children:f.jsx(wy,{size:14})})]})]})}function Eg({target:n,onConfirm:i,onCancel:r}){const{t:s}=Re(),c=v.useRef(null);v.useEffect(()=>{const h=p=>{p.key==="Escape"&&r()};return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[r]);const d=v.useCallback(h=>{c.current&&!c.current.contains(h.target)&&r()},[r]);return f.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",onClick:d,children:f.jsxs("div",{ref:c,className:"mx-4 w-full max-w-md rounded border border-c4a-border-default bg-c4a-bg-elevated p-6 shadow-c4a-lg",children:[f.jsx("h3",{className:"font-mono text-sm font-bold uppercase text-c4a-text-primary",children:s("sources.delete.confirm_title")}),f.jsxs("div",{className:"mt-4 space-y-3 text-sm text-c4a-text-secondary",children:[n.type==="resource"&&f.jsxs(f.Fragment,{children:[f.jsx("p",{children:s("sources.delete.resource",{name:n.name})}),f.jsx("p",{children:s("sources.delete.resource_impact")}),f.jsx("p",{className:"text-c4a-warning",children:s("sources.delete.session_warning")}),f.jsx("p",{children:s("sources.delete.entity_safe")})]}),n.type==="folder"&&f.jsxs(f.Fragment,{children:[f.jsx("p",{children:s("sources.delete.folder",{name:n.name})}),f.jsx("p",{children:n.folderCount!==void 0&&n.sourceCount!==void 0?s("sources.delete.folder_impact",{folders:n.folderCount,sources:n.sourceCount}):s("sources.delete.folder_impact_generic")}),f.jsx("p",{className:"text-c4a-warning",children:s("sources.delete.irreversible")})]}),n.type==="repo"&&f.jsxs(f.Fragment,{children:[f.jsx("p",{children:s("sources.delete.repo",{name:n.name,library:n.libraryName})}),f.jsx("p",{children:n.packageCount!==void 0&&n.docCount!==void 0?s("sources.delete.repo_impact",{packages:n.packageCount,docs:n.docCount}):s("sources.delete.repo_impact_generic")}),f.jsx("p",{children:s("sources.delete.local_safe")}),f.jsx("p",{children:s("sources.delete.entity_safe")})]}),n.type==="client"&&f.jsxs(f.Fragment,{children:[f.jsx("p",{children:s("sources.delete.client",{name:n.name})}),f.jsx("p",{children:s("sources.delete.client_impact")}),f.jsx("p",{children:s("sources.delete.local_safe")}),f.jsx("p",{children:s("sources.delete.entity_safe")}),f.jsx("p",{className:"text-c4a-warning",children:s("sources.delete.irreversible")}),f.jsx("p",{className:"text-c4a-text-muted",children:s("sources.delete.client_reregister")})]})]}),f.jsxs("div",{className:"mt-6 flex justify-end gap-2",children:[f.jsx("button",{onClick:r,className:"rounded border border-c4a-border-default px-3 py-1.5 font-mono text-xs text-c4a-text-secondary transition-colors hover:bg-c4a-bg-hover hover:text-c4a-text-primary",children:s("common.cancel")}),f.jsx("button",{onClick:i,className:"rounded bg-c4a-error px-3 py-1.5 font-mono text-xs text-white transition-colors hover:bg-c4a-error/80",children:s("common.confirm")})]})]})})}function kS({onConfirm:n,onCancel:i,error:r}){const{t:s}=Re(),[c,d]=v.useState(""),h=v.useRef(null),p=v.useRef(null);v.useEffect(()=>{h.current?.focus()},[]),v.useEffect(()=>{const x=_=>{_.key==="Escape"&&i()};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[i]);const g=v.useCallback(x=>{p.current&&!p.current.contains(x.target)&&i()},[i]),m=v.useCallback(()=>{const x=c.trim();x&&n(x)},[c,n]),b=v.useCallback(x=>{x.key==="Enter"&&(x.preventDefault(),m())},[m]);return f.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",onClick:g,children:f.jsxs("div",{ref:p,className:"mx-4 w-full max-w-md rounded border border-c4a-border-default bg-c4a-bg-elevated p-6 shadow-c4a-lg",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(Ny,{size:16,className:"shrink-0 text-c4a-accent"}),f.jsx("h3",{className:"font-mono text-sm font-bold uppercase text-c4a-text-primary",children:s("sources.actions.new_folder")})]}),f.jsxs("div",{className:"mt-4",children:[f.jsx("input",{ref:h,value:c,onChange:x=>d(x.target.value),onKeyDown:b,placeholder:s("sources.folder.name_placeholder"),className:"w-full rounded border border-c4a-border-default bg-c4a-bg-surface px-3 py-2 text-sm text-c4a-text-primary outline-none transition-colors focus:border-c4a-accent",autoFocus:!0}),r&&f.jsx("p",{className:"mt-2 text-xs text-c4a-error",children:r})]}),f.jsxs("div",{className:"mt-6 flex justify-end gap-2",children:[f.jsx("button",{onClick:i,className:"rounded border border-c4a-border-default px-3 py-1.5 font-mono text-xs text-c4a-text-secondary transition-colors hover:bg-c4a-bg-hover hover:text-c4a-text-primary",children:s("common.cancel")}),f.jsx("button",{onClick:m,disabled:!c.trim(),className:"rounded bg-c4a-accent px-3 py-1.5 font-mono text-xs text-white transition-colors hover:bg-c4a-accent-hover disabled:opacity-40",children:s("common.confirm")})]})]})})}function Ku({label:n,icon:i,items:r,alignRight:s}){const[c,d]=v.useState(!1),h=v.useRef(null),p=v.useRef(null),g=v.useCallback(x=>{h.current&&!h.current.contains(x.target)&&d(!1)},[]);v.useEffect(()=>{if(c)return document.addEventListener("mousedown",g),()=>document.removeEventListener("mousedown",g)},[c,g]);const m=v.useCallback(()=>{p.current&&(clearTimeout(p.current),p.current=null),d(!0)},[]),b=v.useCallback(()=>{p.current=setTimeout(()=>d(!1),150)},[]);return f.jsxs("div",{ref:h,className:"relative",onMouseEnter:m,onMouseLeave:b,children:[f.jsxs("button",{className:`flex items-center gap-1.5 rounded border border-c4a-border-default bg-c4a-bg-surface font-mono text-xs uppercase text-c4a-text-secondary transition-colors hover:bg-c4a-bg-hover hover:text-c4a-text-primary ${n?"p-1 sm:px-2 sm:py-1":"p-1"}`,children:[i,n&&f.jsx("span",{className:"hidden sm:inline",children:n}),n&&f.jsx(go,{size:12,className:"hidden transition-transform sm:block"})]}),c&&f.jsx("div",{className:`absolute top-full z-20 mt-1 min-w-[160px] rounded border border-c4a-border-default bg-c4a-bg-elevated py-1 shadow-c4a-lg ${s?"right-0":"left-0"}`,children:r.map(x=>f.jsxs("button",{onClick:()=>{x.onClick(),d(!1)},className:"flex w-full items-center gap-2 px-3 py-1.5 text-left font-mono text-xs text-c4a-text-secondary transition-colors hover:bg-c4a-bg-hover hover:text-c4a-text-primary",children:[x.icon,x.label]},x.label))})]})}function US({onClose:n}){const{t:i}=Re(),r=v.useRef(null),s=v.useCallback(c=>{r.current&&!r.current.contains(c.target)&&n()},[n]);return f.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",onClick:s,children:f.jsxs("div",{ref:r,className:"w-full max-w-sm rounded border border-c4a-border-default bg-c4a-bg-elevated p-6 shadow-c4a-lg",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(H2,{size:18,className:"text-c4a-accent"}),f.jsx("h3",{className:"font-mono text-sm font-bold uppercase text-c4a-text-primary",children:i("sources.upgrade.title")})]}),f.jsx("p",{className:"mt-3 text-sm text-c4a-text-secondary",children:i("sources.upgrade.description")}),f.jsx("div",{className:"mt-6 flex justify-end",children:f.jsx("button",{onClick:n,className:"rounded bg-c4a-accent px-4 py-2 font-mono text-xs text-white transition-colors hover:bg-c4a-accent-hover",children:i("common.confirm")})})]})})}const HS=new Set([".md",".doc",".docx",".pdf",".ppt",".pptx",".txt"]),BS=5*1024*1024,qS=10;function YS(n){const i=n.lastIndexOf(".");return i>=0?n.slice(i).toLowerCase():""}function VS(n){return n<1024?`${n} B`:n<1024*1024?`${(n/1024).toFixed(1)} KB`:`${(n/(1024*1024)).toFixed(1)} MB`}function GS({onConfirm:n,onCancel:i,error:r,uploading:s}){const{t:c}=Re(),[d,h]=v.useState([]),[p,g]=v.useState(null),[m,b]=v.useState(!1),x=v.useRef(null),_=v.useRef(null);v.useEffect(()=>{const F=I=>{I.key==="Escape"&&!s&&i()};return document.addEventListener("keydown",F),()=>document.removeEventListener("keydown",F)},[i,s]);const j=v.useCallback(F=>{!s&&_.current&&!_.current.contains(F.target)&&i()},[i,s]);v.useCallback(F=>{g(null);for(const I of F){const W=YS(I.name);if(!HS.has(W)){g(c("sources.upload.unsupported_type",{name:I.name}));return}if(I.size>BS){g(c("sources.upload.file_too_large",{name:I.name}));return}}h(I=>{const W=new Map(I.map(Y=>[Y.name,Y]));for(const Y of F)W.set(Y.name,{name:Y.name,size:Y.size,file:Y});const N=Array.from(W.values());return N.length>qS?(g(c("sources.upload.too_many_files")),I):N})},[c]);const R=v.useCallback(F=>{const I=F.target.files;!I||I.length===0||(validateAndSetFiles(Array.from(I)),F.target.value="")},[validateAndSetFiles]),D=v.useCallback(F=>{h(I=>I.filter((W,N)=>N!==F)),g(null)},[]),k=v.useCallback(F=>{F.preventDefault(),b(!1);const I=F.dataTransfer?.files;!I||I.length===0||validateAndSetFiles(Array.from(I))},[validateAndSetFiles]),Z=v.useCallback(F=>{F.preventDefault(),b(!0)},[]),G=v.useCallback(F=>{F.preventDefault(),b(!1)},[]),K=v.useCallback(async()=>{if(d.length===0)return;const F=await Promise.all(d.map(I=>new Promise((W,N)=>{const Y=new FileReader;Y.onload=()=>W({name:I.name,content:Y.result}),Y.onerror=()=>N(Y.error),Y.readAsText(I.file)})));n(F)},[d,n]),le=r||p;return f.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",onClick:j,children:f.jsxs("div",{ref:_,className:"mx-4 w-full max-w-md rounded border border-c4a-border-default bg-c4a-bg-elevated p-6 shadow-c4a-lg",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(rd,{size:16,className:"shrink-0 text-c4a-accent"}),f.jsx("h3",{className:"font-mono text-sm font-bold uppercase text-c4a-text-primary",children:c("sources.upload.title")})]}),f.jsxs("div",{className:"mt-4",children:[f.jsx("input",{ref:x,type:"file",accept:".md,.doc,.docx,.pdf,.ppt,.pptx,.txt",multiple:!0,onChange:R,className:"hidden"}),f.jsxs("button",{type:"button",onClick:()=>x.current?.click(),onDrop:k,onDragOver:Z,onDragLeave:G,disabled:s,className:`flex w-full flex-col items-center justify-center rounded border-2 border-dashed px-4 py-8 transition-colors ${m?"border-c4a-accent bg-c4a-accent/5":"border-c4a-border-default hover:border-c4a-accent/50"} ${s?"cursor-not-allowed opacity-40":"cursor-pointer"}`,children:[f.jsx(rd,{size:24,className:"text-c4a-text-muted"}),f.jsx("p",{className:"mt-2 text-sm text-c4a-text-secondary",children:c("sources.upload.drop_hint")}),f.jsx("p",{className:"mt-1 text-[10px] text-c4a-text-muted",children:c("sources.upload.supported_formats")})]})]}),d.length>0&&f.jsxs("div",{className:"mt-3",children:[f.jsx("p",{className:"text-xs text-c4a-text-muted",children:c("sources.upload.selected",{count:d.length})}),f.jsx("div",{className:"mt-1 max-h-40 space-y-1 overflow-y-auto c4a-scrollbar",children:d.map((F,I)=>f.jsxs("div",{className:"flex items-center gap-2 rounded bg-c4a-bg-surface px-2 py-1",children:[f.jsx(el,{size:12,className:"shrink-0 text-c4a-text-muted"}),f.jsx("span",{className:"min-w-0 flex-1 truncate text-xs text-c4a-text-primary",children:F.name}),f.jsx("span",{className:"shrink-0 text-[10px] text-c4a-text-muted",children:VS(F.size)}),!s&&f.jsx("button",{type:"button",onClick:()=>D(I),className:"shrink-0 text-c4a-text-muted transition-colors hover:text-c4a-text-primary",title:c("sources.upload.remove"),children:f.jsx(yo,{size:12})})]},`${F.name}-${I}`))})]}),le&&f.jsx("p",{className:"mt-2 text-xs text-c4a-error",children:le}),f.jsxs("div",{className:"mt-6 flex justify-end gap-2",children:[f.jsx("button",{onClick:i,disabled:s,className:"rounded border border-c4a-border-default px-3 py-1.5 font-mono text-xs text-c4a-text-secondary transition-colors hover:bg-c4a-bg-hover hover:text-c4a-text-primary disabled:opacity-40",children:c("common.cancel")}),f.jsxs("button",{onClick:K,disabled:d.length===0||s,className:"flex items-center gap-1.5 rounded bg-c4a-accent px-3 py-1.5 font-mono text-xs text-white transition-colors hover:bg-c4a-accent-hover disabled:opacity-40",children:[s&&f.jsx(Yt,{size:12,className:"animate-spin"}),c(s?"sources.upload.uploading":"common.confirm")]})]})]})})}function $S({pathLabel:n,loading:i,onNavigateUp:r,children:s}){return f.jsxs("div",{className:"mt-4 flex min-h-0 flex-1 flex-col rounded border border-c4a-border-default bg-c4a-bg-surface p-4",children:[f.jsx("p",{className:"min-w-0 truncate font-mono text-xs text-c4a-text-muted",children:n}),f.jsx("hr",{className:"my-3 border-c4a-border-subtle"}),f.jsx("div",{className:"c4a-scrollbar flex min-h-0 flex-1 flex-col overflow-y-auto",children:i?f.jsx("div",{className:"flex flex-1 items-center justify-center py-8",children:f.jsx(Yt,{size:14,className:"animate-spin text-c4a-text-muted"})}):f.jsxs(f.Fragment,{children:[r&&f.jsxs("button",{onClick:r,className:"flex w-full cursor-pointer items-center gap-3 rounded pl-3 pr-5 py-2 text-left text-sm text-c4a-text-primary transition-colors hover:bg-c4a-bg-hover",children:[f.jsx(Ca,{size:16,className:"shrink-0 text-c4a-text-muted"}),f.jsx("span",{children:".."})]}),s]})})]})}function KS({library:n,onNewFolder:i,onImportRepo:r,onImportDir:s,onUpgrade:c}){const{t:d}=Re(),h=n.type==="daemon";return f.jsx("div",{className:"flex flex-1 items-center justify-center p-8",children:f.jsxs("div",{className:"max-w-2xl text-center",children:[f.jsx("h3",{className:"font-mono text-lg font-bold uppercase text-c4a-text-primary",children:d(h?"sources.empty.daemon.title":"sources.empty.cloud.title")}),f.jsx("p",{className:"mt-3 text-sm text-c4a-text-secondary",children:d(h?"sources.empty.daemon.description":"sources.empty.cloud.description")}),f.jsx("div",{className:"mt-6 flex justify-center gap-3",children:h?f.jsxs(f.Fragment,{children:[s&&f.jsx("button",{onClick:s,disabled:!n.is_online,className:"rounded border border-c4a-border-default bg-c4a-bg-surface px-4 py-2 font-mono text-xs uppercase text-c4a-text-secondary transition-colors hover:bg-c4a-bg-hover hover:text-c4a-text-primary disabled:opacity-40",children:d("sources.actions.import_dir")}),r&&f.jsx("button",{onClick:r,disabled:!n.is_online,className:"rounded bg-c4a-accent px-4 py-2 font-mono text-xs uppercase text-white transition-colors hover:bg-c4a-accent-hover disabled:opacity-40",children:d("sources.actions.import_repo")})]}):f.jsxs(f.Fragment,{children:[f.jsx("button",{onClick:i,className:"rounded border border-c4a-border-default bg-c4a-bg-surface px-4 py-2 font-mono text-xs uppercase text-c4a-text-secondary transition-colors hover:bg-c4a-bg-hover hover:text-c4a-text-primary",children:d("sources.actions.new_folder")}),c&&f.jsx("button",{onClick:c,className:"rounded bg-c4a-accent px-4 py-2 font-mono text-xs uppercase text-white transition-colors hover:bg-c4a-accent-hover",children:d("sources.actions.import_repo_url")})]})})]})})}function XS(){const{t:n}=Re();return f.jsxs("div",{className:"rounded border border-c4a-border-subtle bg-c4a-bg-surface p-6 text-center",children:[f.jsx("h4",{className:"font-mono text-sm font-bold text-c4a-text-primary",children:n("sources.empty.indexed.title")}),f.jsx("p",{className:"mt-2 text-xs text-c4a-text-secondary",children:n("sources.empty.indexed.description")})]})}const wg=n=>{const i=n.children??[];return{folders:i.filter(r=>r.kind==="folder").length,sources:i.filter(r=>r.kind==="source").length,codeSources:i.filter(r=>r.kind==="source"&&r.source_type==="code").length,docSources:i.filter(r=>r.kind==="source"&&r.source_type==="doc").length}};function QS(){const{t:n}=Re(),i=tl(),{libId:r}=mo(),[s,c]=by(),d=s.get("rootId")||null,h=s.get("path")||"",g=Vt(xi(Dr)).find(oe=>oe.id===r),m=Vt(oe=>oe.updateLibraryName),b=Vt(oe=>oe.deleteLibrary),{rootSources:x,currentRoot:_,loading:j,filter:R,fetchRootSources:D,fetchRootSource:k,createSource:Z,addTreeNode:G,updateSource:K,deleteSource:le,uploadDoc:F,setFilter:I}=bo(),[W,N]=v.useState(!1),[Y,J]=v.useState(null),[he,ie]=v.useState(null),[ee,se]=v.useState(null),[ge,M]=v.useState(!1),[P,de]=v.useState(!1),[$,fe]=v.useState(null),[E,B]=v.useState(!1),[te,re]=v.useState(!1),[je,_e]=v.useState(null),[Oe,at]=v.useState(!1);v.useEffect(()=>{r&&D({library_id:r})},[r,D]),v.useEffect(()=>{d&&k(d)},[d,k]);const ue=d!==null,vt=v.useMemo(()=>ue?_?[...DS(_.tree,h)].sort((ot,Zt)=>ot.kind!==Zt.kind?ot.kind==="folder"?-1:1:ot.name.localeCompare(Zt.name)).map(ot=>({type:"node",root:_,node:ot})):[]:[...x].sort((Zt,ut)=>new Date(Zt.created_at).getTime()-new Date(ut.created_at).getTime()).map(Zt=>({type:"root",root:Zt,node:null})),[ue,x,_,h]),Ut=v.useMemo(()=>R==="all"?vt:vt.filter(oe=>oe.type==="root"||!oe.node||oe.node.kind==="folder"?!0:R==="indexed"?oe.node.index_status==="indexed":oe.node.index_status==="none"||!oe.node.index_status),[vt,R]),Et=g?.type==="daemon",Ie=g?.type==="cloud",pt=Et&&!ue,ha=v.useMemo(()=>{if(!g)return[];const oe=[{label:g.id===wr?n("sources.library.default_cloud_name"):g.name,to:`/studio/sources/${g.id}`}];return ue&&_&&(oe.push({label:_.name,to:`/studio/sources/${g.id}?rootId=${_.id}`}),h&&Dy(_.tree,h).forEach(ot=>{oe.push({label:ot.name,to:`/studio/sources/${g.id}?rootId=${_.id}&path=${encodeURIComponent(ot.path)}`})})),oe},[g,ue,_,h,n]),Ia=v.useCallback(async oe=>{if(r)try{ue&&d?await G(d,{parent_path:h,kind:"folder",name:oe}):(await Z({library_id:r,kind:"folder",name:oe}),D({library_id:r})),N(!1),J(null)}catch(be){be instanceof yr&&be.status===409&&J(n("sources.error.name_conflict",{name:oe}))}},[r,ue,d,h,Z,G,D,n]),Xt=v.useCallback(oe=>{r&&(oe.type==="root"?c({rootId:oe.root.id}):oe.node&&(oe.node.kind==="folder"?c({rootId:oe.root.id,path:oe.node.path}):i(`/studio/source/${oe.root.id}?path=${encodeURIComponent(oe.node.path)}`)))},[r,i,c]),Gt=v.useCallback(()=>{if(!(!d||!r))if(h){const oe=h.split("/");oe.pop();const be=oe.join("/");c(be?{rootId:d,path:be}:{rootId:d})}else c({})},[d,r,h,c]),ma=v.useCallback(async(oe,be)=>{try{return await K(oe,{name:be}),D({library_id:r}),null}catch(ot){return ot instanceof yr&&ot.status===409?n("sources.error.name_conflict",{name:be}):null}},[r,K,D,n]),pa=v.useCallback(oe=>{if(oe.type==="root"){se(oe.root.id);const be=oe.root.tree.length>0?wg({children:oe.root.tree}):void 0;ie(Et?{type:"repo",name:oe.root.name,libraryName:g.name,...be?{packageCount:be.codeSources,docCount:be.docSources}:{}}:{type:"folder",name:oe.root.name,...be?{folderCount:be.folders,sourceCount:be.sources}:{}})}},[Et,g]),en=v.useCallback(async()=>{if(!(!ee||!r))try{await le(ee),ie(null),se(null),D({library_id:r})}catch{}},[ee,r,le,D]),_n=v.useCallback(()=>{r&&i(`/studio/sources/import/${r}`)},[r,i]),jn=v.useCallback(()=>{r&&i(`/studio/sources/import-dir/${r}`)},[r,i]),Ot=v.useCallback(async oe=>{if(r){B(!0),fe(null);try{const be={library_id:r,files:oe.map(ot=>({file_name:ot.name,content:ot.content}))};ue&&d&&(be.root_source_id=d,be.parent_path=h),await F(be),ue&&d?k(d):D({library_id:r}),de(!1)}catch(be){be instanceof yr&&be.status===409?fe(n("sources.error.name_conflict",{name:oe[0]?.name??""})):be instanceof yr&&fe(be.message)}finally{B(!1)}}},[r,ue,d,h,F,D,k,n]),Oa=g?.id===wr,qa=v.useCallback(async oe=>{if(r)try{await m(r,oe),re(!1),_e(null)}catch(be){const ot=be instanceof Error?be.message:String(be);_e(ot)}},[r,m]),al=v.useCallback(()=>{re(!1),_e(null)},[]),Ya=v.useCallback(async()=>{if(r){try{await b(r),i("/studio/sources/add-client")}catch{}at(!1)}},[r,b,i]),na=v.useCallback(()=>{at(!1)},[]);if(!g)return f.jsx("div",{className:"flex flex-1 items-center justify-center p-8",children:f.jsx("p",{className:"text-sm text-c4a-text-muted",children:n("common.loading")})});const Qt=x.length===0&&R==="all"&&!j&&!ue,wl=Ut.filter(oe=>oe.type==="node"&&oe.node?.kind==="source").length===0&&R==="indexed"&&!j,vi=!pt,Da=Ie,Dt=pt;return f.jsxs("div",{className:"flex min-h-0 flex-1 flex-col p-4 md:p-6",children:[f.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[f.jsx("div",{className:"min-w-0 flex-1",children:te?f.jsx(My,{currentName:g.name,onConfirm:qa,onCancel:al,error:je}):f.jsx(Mr,{segments:ha})}),f.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[Da&&f.jsxs(f.Fragment,{children:[f.jsx(Ku,{label:n("sources.actions.upload"),icon:f.jsx(rd,{size:14}),items:[{label:n("sources.actions.upload_doc"),icon:f.jsx(el,{size:14}),onClick:()=>de(!0)}]}),f.jsx(Ku,{label:n("sources.actions.add"),icon:f.jsx(Ey,{size:14}),items:[{label:n("sources.actions.add_folder"),icon:f.jsx(Ny,{size:14}),onClick:()=>N(!0)},{label:n("sources.actions.add_web"),icon:f.jsx(f2,{size:14}),onClick:()=>M(!0)},{label:n("sources.actions.add_feishu"),icon:f.jsx(J4,{size:14}),onClick:()=>M(!0)}]}),f.jsxs("button",{onClick:()=>M(!0),className:"flex items-center gap-1.5 rounded border border-c4a-border-default bg-c4a-bg-surface p-1 font-mono text-xs uppercase text-c4a-text-secondary transition-colors hover:bg-c4a-bg-hover hover:text-c4a-text-primary sm:px-2 sm:py-1",children:[f.jsx(fg,{size:14}),f.jsx("span",{className:"hidden sm:inline",children:n("sources.actions.import_repo_url")})]})]}),Dt&&f.jsxs(f.Fragment,{children:[f.jsxs("button",{onClick:jn,disabled:!g.is_online,title:g.is_online?void 0:n("sources.import.daemon_offline",{name:g.name}),className:"flex items-center gap-1.5 rounded border border-c4a-border-default bg-c4a-bg-surface p-1 font-mono text-xs uppercase text-c4a-text-secondary transition-colors hover:bg-c4a-bg-hover hover:text-c4a-text-primary disabled:cursor-not-allowed disabled:opacity-40 sm:px-2 sm:py-1",children:[f.jsx(n2,{size:14}),f.jsx("span",{className:"hidden sm:inline",children:n("sources.actions.import_dir")})]}),f.jsxs("button",{onClick:_n,disabled:!g.is_online,title:g.is_online?void 0:n("sources.import.daemon_offline",{name:g.name}),className:"flex items-center gap-1.5 rounded border border-c4a-border-default bg-c4a-bg-surface p-1 font-mono text-xs uppercase text-c4a-text-secondary transition-colors hover:bg-c4a-bg-hover hover:text-c4a-text-primary disabled:cursor-not-allowed disabled:opacity-40 sm:px-2 sm:py-1",children:[f.jsx(fg,{size:14}),f.jsx("span",{className:"hidden sm:inline",children:n("sources.actions.import_repo")})]}),f.jsx(Ku,{label:"",icon:f.jsx(id,{size:14}),alignRight:!0,items:[{label:n("sources.library.rename"),icon:f.jsx(id,{size:14}),onClick:()=>re(!0)},...Oa?[]:[{label:n("sources.actions.delete"),icon:f.jsx(wy,{size:14}),onClick:()=>at(!0)}]]})]}),vi&&f.jsx(AS,{value:R,onChange:I})]})]}),Qt?f.jsx(KS,{library:g,onNewFolder:()=>N(!0),...Et?{onImportRepo:_n,onImportDir:jn}:{},...Ie?{onUpgrade:()=>M(!0)}:{}}):f.jsx($S,{pathLabel:ha.map(oe=>oe.label).join(" / "),loading:j,onNavigateUp:ue?Gt:void 0,children:Ut.length===0?wl?f.jsx(XS,{}):ue?null:f.jsx("p",{className:"py-8 text-center text-xs text-c4a-text-muted",children:n("common.items",{count:0})}):f.jsx("div",{className:"flex flex-col gap-0.5",children:Ut.map(oe=>{if(oe.type==="root"){const ut=oe.root,Va=Et,ga=Va?ut.metadata?.local_path:void 0,Ma=ut.tree.length>0?wg({children:ut.tree}):void 0,Ft=Ma?Ma.folders+Ma.sources:0;return f.jsx(Ng,{source:{id:ut.id,library_id:ut.library_id,owner_id:ut.owner_id,path:"",kind:ut.kind,source_type:ut.source_type,name:ut.name,content_hash:ut.content_hash,metadata:ut.metadata,index_status:ut.index_status,created_at:ut.created_at,updated_at:ut.updated_at},...typeof ga=="string"?{displayName:ga}:{},...Ft>0?{childCount:Ft}:{},isDaemonLibrary:Et??!1,isRepoRoot:Va,onClick:()=>Xt(oe),onRename:Nn=>ma(ut.id,Nn),onDelete:()=>pa(oe)},ut.id)}const be=oe.node,ot=`${oe.root.id}:${be.path}`,Zt=be.kind==="folder"&&be.children?be.children.length:void 0;return f.jsx(Ng,{source:{id:oe.root.id,library_id:oe.root.library_id,owner_id:oe.root.owner_id,path:be.path,kind:be.kind,source_type:be.source_type??null,name:be.name,content_hash:null,metadata:be.metadata??null,index_status:be.index_status??"none",created_at:oe.root.created_at,updated_at:oe.root.updated_at},...Zt!==void 0?{childCount:Zt}:{},isDaemonLibrary:Et??!1,onClick:()=>Xt(oe)},ot)})})}),W&&f.jsx(kS,{onConfirm:Ia,onCancel:()=>{N(!1),J(null)},error:Y}),P&&f.jsx(GS,{onConfirm:Ot,onCancel:()=>{de(!1),fe(null)},error:$,uploading:E}),ge&&f.jsx(US,{onClose:()=>M(!1)}),he&&f.jsx(Eg,{target:he,onConfirm:en,onCancel:()=>{ie(null),se(null)}}),Oe&&g&&f.jsx(Eg,{target:{type:"client",name:g.name},onConfirm:Ya,onCancel:na})]})}function Ay(){const{t:n}=Re(),[i,r]=v.useState(!1),[s,c]=v.useState(null),d=v.useRef(),h=v.useRef(),p=window.location.host,g=`c4a-daemon --server ${p} --allow <dir1> <dir2>`,m=`c4a-daemon --server ${p}`,b=v.useCallback((j,R)=>{navigator.clipboard.writeText(j),c(R),clearTimeout(d.current),d.current=setTimeout(()=>c(null),1500)},[]),x=v.useCallback(()=>{clearTimeout(h.current),r(!0)},[]),_=v.useCallback(()=>{h.current=setTimeout(()=>r(!1),150)},[]);return f.jsxs("span",{className:"relative",onMouseEnter:x,onMouseLeave:_,children:[f.jsx(xd,{size:12,className:"text-c4a-warning"}),i&&f.jsxs("span",{className:"absolute left-full top-1/2 z-10 ml-2 -translate-y-1/2 rounded border border-c4a-border-default bg-c4a-bg-elevated px-2.5 py-2 shadow-lg",onMouseEnter:x,onMouseLeave:_,children:[f.jsx("span",{className:"block whitespace-nowrap font-mono text-xs text-c4a-text-secondary",children:n("sources.import.allowed_dirs_tooltip_restrict")}),f.jsxs("span",{className:"mt-1 flex items-center gap-1.5 whitespace-nowrap",children:[f.jsx("span",{className:"font-mono text-xs text-c4a-accent",children:g}),f.jsx("button",{onClick:()=>b(g,0),className:"shrink-0 rounded p-0.5 text-c4a-accent transition-colors hover:bg-c4a-bg-hover",title:"Copy",children:s===0?f.jsx(pi,{size:10}):f.jsx(hg,{size:10})})]}),f.jsx("span",{className:"mt-2 block whitespace-nowrap font-mono text-xs text-c4a-text-secondary",children:n("sources.import.allowed_dirs_tooltip_all")}),f.jsxs("span",{className:"mt-1 flex items-center gap-1.5 whitespace-nowrap",children:[f.jsx("span",{className:"font-mono text-xs text-c4a-accent",children:m}),f.jsx("button",{onClick:()=>b(m,1),className:"shrink-0 rounded p-0.5 text-c4a-accent transition-colors hover:bg-c4a-bg-hover",title:"Copy",children:s===1?f.jsx(pi,{size:10}):f.jsx(hg,{size:10})})]})]})]})}function Ly({open:n,onClose:i,rpc:r,onNavigate:s,defaultPath:c}){const{t:d}=Re(),[h,p]=v.useState(c??""),[g,m]=v.useState(null),[b,x]=v.useState(!1),_=v.useRef(null);v.useEffect(()=>{c&&!h&&p(c)},[c]);const j=v.useCallback(async()=>{const D=h.trim();if(D){x(!0),m(null);try{(await r("fs/exists",{path:D})).exists?(s(D),p(c??""),m(null),i()):m(d("sources.import.wildcard_path_not_found"))}catch(k){m(k instanceof Error?k.message:String(k))}finally{x(!1)}}},[h,r,d,s,i]),R=v.useCallback(()=>{p(c??""),m(null),i()},[i,c]);return n?f.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40",children:f.jsxs("div",{className:"w-full max-w-md rounded-lg border border-c4a-border-default bg-c4a-bg-surface p-5 shadow-xl",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsx("h3",{className:"font-mono text-sm font-medium text-c4a-text-primary",children:d("sources.import.wildcard_go_title")}),f.jsx("button",{onClick:R,className:"rounded p-1 text-c4a-text-muted transition-colors hover:bg-c4a-bg-hover hover:text-c4a-text-secondary",children:f.jsx(yo,{size:14})})]}),f.jsxs("div",{className:"mt-3 flex items-center gap-2",children:[f.jsx("input",{ref:_,type:"text",value:h,onChange:D=>{p(D.target.value),m(null)},onKeyDown:D=>{D.key==="Enter"&&j()},placeholder:d("sources.import.wildcard_path_placeholder"),autoFocus:!0,className:"flex-1 rounded border border-c4a-border-default bg-c4a-bg-base px-3 py-2 font-mono text-xs text-c4a-text-primary outline-none transition-colors focus:border-c4a-accent"}),f.jsxs("button",{onClick:j,disabled:b||!h.trim(),className:"flex shrink-0 items-center gap-1.5 rounded bg-c4a-accent px-3 py-2 font-mono text-xs text-white transition-colors hover:bg-c4a-accent-hover disabled:opacity-40",children:[b?f.jsx(Yt,{size:12,className:"animate-spin"}):f.jsx(_y,{size:12}),d("sources.import.wildcard_go")]})]}),g&&f.jsx("p",{className:"mt-2 text-xs text-c4a-error",children:g})]})}):null}function ky(n){const i=n.match(/^[\w.-]+@([\w.-]+):([\w./-]+?)(?:\.git)?$/);if(i){const r=i[1],s=i[2];return{slug:s,repoUrl:`https://${r}/${s}`,host:r}}try{const r=new URL(n),s=r.hostname,c=r.pathname.replace(/^\//,"").replace(/\.git$/,"");return c?{slug:c,repoUrl:`https://${s}/${c}`,host:s}:null}catch{return null}}function ZS(n,i){return`${n}/tree/${encodeURIComponent(i)}`}function FS(n,i){return`${n}/commit/${i}`}function JS({rpc:n,selectedPath:i,onSelect:r,allowedPaths:s,importedPaths:c}){const{t:d}=Re(),h=!!s&&s.length>0,p=h&&s.length===1&&s[0]==="*",[g,m]=v.useState(h),[b,x]=v.useState(h&&!p?"":"/"),[_,j]=v.useState([]),[R,D]=v.useState(!1),[k,Z]=v.useState(null),[G,K]=v.useState(null);v.useEffect(()=>{if(h&&!p)return;let $=!1;return(async()=>{try{const fe=await n("fs/homeDir",{});$||K(fe.home_dir)}catch{$||K("/")}})(),()=>{$=!0}},[h,p,n]);const[le,F]=v.useState(!1),I=v.useCallback(async $=>{D(!0),Z(null);try{const fe=await n("fs/listTree",{path:$,depth:1});j(fe.entries||[]),x($),m(!1)}catch(fe){const E=fe instanceof Error?fe.message:String(fe);Z(E)}finally{D(!1)}},[n]);v.useEffect(()=>{h&&!p||G!==null&&I(G)},[G]);const[W,N]=v.useState(null),[Y,J]=v.useState(null),[he,ie]=v.useState(!1);v.useEffect(()=>{if(!i){J(null),ie(!1);return}J(null),ie(!0);let $=!1;return(async()=>{try{const fe=await n("fs/repoStatus",{path:i});$||(J({branch:fe.branch,hash:fe.head_hash,remoteUrl:fe.remote_url}),ie(!1))}catch{$||(J(null),ie(!1))}})(),()=>{$=!0}},[i,n]);const ee=v.useMemo(()=>Y?.remoteUrl?ky(Y.remoteUrl):null,[Y?.remoteUrl]),se=v.useMemo(()=>new Set(c??[]),[c]),ge=v.useCallback($=>{if($.type==="directory")if($.is_git_repo){if(se.has($.path))return;N(null),r($.path,$.name)}else N($.path),I($.path)},[r,I,se]),M=v.useCallback(()=>{if(h&&!p&&s.some(E=>E===b)){m(!0),x(""),j([]),Z(null),N(null);return}const $=b.split("/").slice(0,-1).join("/")||"/";N(null),I($)},[b,I,h,p,s]),P=v.useMemo(()=>_.filter($=>$.type==="directory").sort(($,fe)=>$.is_git_repo&&!fe.is_git_repo?-1:!$.is_git_repo&&fe.is_git_repo?1:$.name.localeCompare(fe.name)),[_]),de=v.useMemo(()=>_.filter($=>$.type==="file").sort(($,fe)=>$.name.localeCompare(fe.name)),[_]);return f.jsxs("div",{className:"flex min-h-0 flex-1 flex-col rounded border border-c4a-border-default bg-c4a-bg-surface p-4",children:[f.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-x-4 gap-y-1",children:[g?f.jsxs("p",{className:"flex items-center gap-1.5 font-mono text-xs text-c4a-text-muted",children:[f.jsx("span",{children:d("sources.import.allowed_dirs")}),f.jsx(Ay,{})]}):f.jsx("p",{className:"min-w-0 shrink truncate font-mono text-xs text-c4a-text-muted",children:b}),i&&he?f.jsxs("div",{className:"flex shrink-0 items-center gap-1.5 font-mono text-xs text-c4a-accent",children:[f.jsx(Yt,{size:12,className:"animate-spin"}),f.jsx("span",{children:d("common.loading")})]}):i&&Y?f.jsxs("div",{className:"flex min-w-0 shrink items-center gap-1.5 font-mono text-xs leading-none text-c4a-accent flex-wrap",children:[ee?f.jsxs("a",{href:ee.repoUrl,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 truncate hover:underline",title:ee.repoUrl,children:[f.jsx(ld,{size:12,className:"shrink-0"}),f.jsx("span",{className:"truncate",children:ee.slug})]}):f.jsxs("span",{className:"flex items-center gap-1 truncate",children:[f.jsx(ld,{size:12,className:"shrink-0"}),f.jsx("span",{className:"truncate",children:i.split("/").pop()||i})]}),f.jsx("span",{className:"text-c4a-text-muted",children:"/"}),ee?f.jsxs("a",{href:ZS(ee.repoUrl,Y.branch),target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 hover:underline",children:[f.jsx(oo,{size:10,className:"shrink-0"}),f.jsx("span",{children:Y.branch})]}):f.jsxs("span",{className:"flex items-center gap-1",children:[f.jsx(oo,{size:10,className:"shrink-0"}),f.jsx("span",{children:Y.branch})]}),f.jsx("span",{className:"text-c4a-text-muted",children:"/"}),ee?f.jsx("a",{href:FS(ee.repoUrl,Y.hash),target:"_blank",rel:"noopener noreferrer",className:"hover:underline",children:Y.hash.slice(0,7)}):f.jsx("span",{children:Y.hash.slice(0,7)})]}):!i&&p&&g?f.jsx("button",{onClick:()=>F(!0),className:"flex shrink-0 items-center gap-1.5 rounded border border-c4a-accent/40 bg-c4a-accent/10 px-2.5 py-1 text-xs text-c4a-accent transition-colors hover:bg-c4a-accent/20",children:d("sources.import.wildcard_goto")}):null]}),f.jsx("hr",{className:"my-3 border-c4a-border-subtle"}),g?p?f.jsx("div",{className:"min-h-0 flex-1 c4a-scrollbar overflow-y-auto",children:G&&f.jsxs("button",{onClick:()=>I(G),className:"flex w-full items-center gap-2 rounded pl-2 pr-4 py-1.5 text-left text-sm text-c4a-text-secondary transition-colors hover:bg-c4a-bg-hover",children:[f.jsx(Ca,{size:14,className:"shrink-0"}),f.jsxs("span",{className:"truncate",children:[G,f.jsxs("span",{className:"ml-1.5 text-c4a-text-muted",children:["(",d("sources.import.wildcard_home"),")"]})]}),f.jsx(bn,{size:12,className:"shrink-0 text-c4a-text-muted"})]})}):f.jsx("div",{className:"min-h-0 flex-1 c4a-scrollbar overflow-y-auto",children:s.map($=>f.jsxs("button",{onClick:()=>I($),className:"flex w-full items-center gap-2 rounded pl-2 pr-4 py-1.5 text-left text-sm text-c4a-text-secondary transition-colors hover:bg-c4a-bg-hover",children:[f.jsx(Ca,{size:14,className:"shrink-0"}),f.jsx("span",{className:"truncate",children:$}),f.jsx(bn,{size:12,className:"shrink-0 text-c4a-text-muted"})]},$))}):k&&!R?f.jsx("p",{className:"py-4 text-xs text-c4a-error",children:k}):f.jsxs("div",{className:"relative min-h-[5rem] min-h-0 flex-1 c4a-scrollbar overflow-y-auto",children:[R&&f.jsx("div",{className:"absolute inset-0 z-10 flex items-center justify-center bg-c4a-bg-surface/60",children:f.jsx(Yt,{size:14,className:"animate-spin text-c4a-text-muted"})}),b!=="/"&&f.jsxs("button",{onClick:M,disabled:R,className:"flex w-full items-center gap-2 rounded pl-2 pr-4 py-1.5 text-left text-sm text-c4a-text-secondary hover:bg-c4a-bg-hover disabled:pointer-events-none",children:[f.jsx(Ca,{size:14}),f.jsx("span",{children:".."})]}),P.map($=>{const fe=$.is_git_repo&&se.has($.path),E=$.is_git_repo?vd:Ca;return f.jsxs("div",{className:`flex w-full items-center rounded pl-2 pr-4 text-left text-sm transition-colors ${fe?"cursor-not-allowed text-c4a-accent/60":i===$.path?"bg-c4a-accent/10 text-c4a-accent":"text-c4a-text-secondary hover:bg-c4a-accent/10 hover:text-c4a-accent"}`,children:[f.jsxs("button",{onClick:()=>ge($),disabled:fe||R,className:"flex flex-1 items-center gap-2 px-2 py-1.5",children:[f.jsx(E,{size:14,className:"shrink-0"}),f.jsx("span",{className:"flex-1 truncate text-left",children:$.name}),fe&&f.jsx("span",{className:"rounded bg-c4a-accent/10 px-1.5 py-0.5 font-mono text-[10px] text-c4a-accent/60",children:d("sources.import.already_imported")})]}),!fe&&f.jsx("button",{onClick:B=>{B.stopPropagation(),I($.path)},disabled:R,className:"shrink-0 rounded p-1.5 text-c4a-text-muted transition-colors hover:bg-c4a-accent/10 hover:text-c4a-accent disabled:pointer-events-none",title:$.path,children:f.jsx(bn,{size:12})})]},$.path)}),de.map($=>f.jsxs("div",{className:"flex w-full items-center gap-2 pl-2 pr-4 py-1.5 text-sm text-c4a-text-muted",children:[f.jsx(jy,{size:14,className:"shrink-0"}),f.jsx("span",{className:"truncate",children:$.name})]},$.path)),_.length===0&&!R&&f.jsx("p",{className:"py-4 text-center text-xs text-c4a-text-muted",children:d("sources.import.no_entries")})]}),W&&!i&&f.jsx("p",{className:"mt-3 text-xs text-c4a-warning",children:d("sources.import.not_git")}),f.jsx(Ly,{open:le,onClose:()=>F(!1),rpc:n,onNavigate:I,defaultPath:G??void 0})]})}function Cg({value:n,options:i,onChange:r,icon:s,maxHeight:c="max-h-60"}){const[d,h]=v.useState(!1),p=v.useRef(null),g=v.useRef(null),m=v.useCallback(j=>{p.current&&!p.current.contains(j.target)&&h(!1)},[]);v.useEffect(()=>{if(d)return document.addEventListener("mousedown",m),()=>document.removeEventListener("mousedown",m)},[d,m]);const b=v.useCallback(()=>{g.current&&(clearTimeout(g.current),g.current=null),h(!0)},[]),x=v.useCallback(()=>{g.current=setTimeout(()=>h(!1),150)},[]),_=i.find(j=>j.value===n);return f.jsxs("div",{ref:p,className:"relative",onMouseEnter:b,onMouseLeave:x,children:[f.jsxs("button",{onClick:()=>h(j=>!j),className:"flex items-center gap-1.5 rounded border border-c4a-border-default bg-c4a-bg-surface px-2 py-1 font-mono text-xs text-c4a-text-secondary transition-colors hover:bg-c4a-bg-hover hover:text-c4a-text-primary",children:[s,f.jsx("span",{className:"max-w-[200px] truncate",children:_?.label??n}),f.jsx(go,{size:12,className:`shrink-0 transition-transform ${d?"rotate-180":""}`})]}),d&&f.jsx("div",{className:`absolute left-0 top-full z-20 mt-1 min-w-[180px] max-w-[360px] rounded border border-c4a-border-default bg-c4a-bg-elevated py-1 shadow-c4a-lg ${c} c4a-scrollbar overflow-y-auto`,children:i.map(j=>f.jsxs("button",{onClick:()=>{r(j.value),h(!1)},className:`flex w-full items-center gap-2 px-3 py-1.5 text-left font-mono text-xs transition-colors hover:bg-c4a-bg-hover ${j.value===n?"text-c4a-accent":"text-c4a-text-secondary hover:text-c4a-text-primary"}`,children:[f.jsx(pi,{size:12,className:`shrink-0 ${j.value===n?"opacity-100":"opacity-0"}`}),f.jsx("span",{className:"truncate",children:j.label})]},j.value))})]})}const WS=/\.md$/i,Xu=100,PS=(n,i)=>{const r=n.toLowerCase();try{if(r.endsWith("package.json")){const s=JSON.parse(i);if(typeof s.name=="string"&&s.name.trim())return s.name.trim()}if(r.endsWith("pyproject.toml"))return i.match(/^\s*name\s*=\s*["']([^"']+)["']/m)?.[1]??null;if(r.endsWith("go.mod"))return i.match(/^\s*module\s+([^\s]+)\s*$/m)?.[1]??null;if(r.endsWith("cargo.toml"))return i.match(/^\s*name\s*=\s*["']([^"']+)["']/m)?.[1]??null;if(r.endsWith("pom.xml"))return i.match(/<artifactId>([^<]+)<\/artifactId>/)?.[1]?.trim()??null;if(r.endsWith("build.gradle"))return i.match(/rootProject\.name\s*=\s*["']([^"']+)["']/)?.[1]??null}catch{return null}return null};function IS({rpc:n,repoPath:i,onReady:r,onBusyChange:s}){const{t:c}=Re(),[d,h]=v.useState(""),[p,g]=v.useState([]),[m,b]=v.useState(""),[x,_]=v.useState([]),[j,R]=v.useState(!1),[D,k]=v.useState(!0),[Z,G]=v.useState(!1),[K,le]=v.useState(!1),[F,I]=v.useState([]),[W,N]=v.useState([]),[,Y]=v.useState([]),[J,he]=v.useState(),ie=v.useMemo(()=>J?ky(J):null,[J]),[ee,se]=v.useState("packages"),[ge,M]=v.useState(Xu),P=v.useRef(null),de=v.useRef(null);v.useEffect(()=>{if(!D){G(!1);return}const ue=setTimeout(()=>G(!0),2e3);return()=>clearTimeout(ue)},[D]),v.useEffect(()=>{M(Xu),de.current?.scrollTo(0,0)},[ee]),v.useEffect(()=>{const ue=P.current;if(!ue)return;const vt=ee==="packages"?F.length:W.length;if(ge>=vt)return;const Ut=new IntersectionObserver(Et=>{Et[0]?.isIntersecting&&M(Ie=>Math.min(Ie+Xu,vt))},{root:de.current,threshold:.1});return Ut.observe(ue),()=>Ut.disconnect()},[ee,ge,F.length,W.length]);const $=v.useCallback(async(ue,vt)=>{le(!0),s?.(!0);try{const Ut=await n("fs/repoScan",{path:i,hash:ue}),Et=Ut.files||[],Ie=Ut.manifests||[];Y(Et);const pt=[];for(const Gt of Ie){const ma=Gt.path.split("/"),pa=ma.slice(0,-1).join("/")||".",en=ma.length===1||Gt.path==="package.json",_n=pa==="."?i.split("/").pop()||"root":ma[ma.length-2]||pa,jn=PS(Gt.path,Gt.content);pt.push({name:jn||_n,path:pa,isRoot:en})}const ha=Et.filter(Gt=>WS.test(Gt.path)).map(Gt=>Gt.path);N(ha),I(pt);const Ia=vt?.branch??d,Xt=vt?.isDirty??j;r({branch:Ia,commit:ue,isDirty:Xt,repoFiles:Et,packages:pt,mdFiles:ha,repoFileContents:Ie})}catch{}finally{le(!1),s?.(!1)}},[n,i,d,j,r,s]);v.useEffect(()=>{(async()=>{k(!0),s?.(!0);try{const ue=await n("fs/repoStatus",{path:i});h(ue.branch),g(ue.branches||[ue.branch]),b(ue.head_hash),R(ue.is_dirty),he(ue.remote_url),_(ue.commits||[{hash:ue.head_hash,message:"HEAD"}]),await $(ue.head_hash,{branch:ue.branch,isDirty:ue.is_dirty})}catch{}finally{k(!1),s?.(!1)}})()},[i]),v.useEffect(()=>{r({branch:d,commit:m,isDirty:j,packages:F,mdFiles:W,repoFileContents:[]})},[d,m,j]);const fe=v.useCallback(async ue=>{h(ue);try{const vt=await n("fs/repoStatus",{path:i});b(vt.head_hash),await $(vt.head_hash)}catch{}},[i,n,$]),E=d&&d!=="main"&&d!=="master",B=i.split("/").pop()||i;if(D)return f.jsxs("div",{className:"flex min-h-0 flex-1 flex-col items-center justify-center",children:[f.jsx(Yt,{size:20,className:"animate-spin text-c4a-accent"}),Z&&f.jsx("p",{className:"mt-3 font-mono text-xs text-c4a-accent",children:c("sources.import.loading_repo_slow")})]});const te=p.map(ue=>({value:ue,label:ue})),re=x.map(ue=>({value:ue.hash,label:`${ue.hash.slice(0,7)} ${ue.message!=="HEAD"?`— ${ue.message.slice(0,50)}`:""}`.trim()})),je=x.length<=1,_e=ee==="packages"?F:W,Oe=_e.slice(0,ge),at=ge<_e.length;return f.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[f.jsxs("div",{className:"shrink-0",children:[f.jsxs("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1",children:[f.jsx("span",{className:"flex items-center gap-1.5",children:ie?f.jsxs("a",{href:ie.repoUrl,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1.5 font-mono text-sm font-bold text-c4a-accent hover:underline",children:[f.jsx(ld,{size:14,className:"shrink-0"}),B]}):f.jsx("span",{className:"font-mono text-sm font-bold text-c4a-accent",children:B})}),f.jsx("span",{className:"hidden font-mono text-xs text-c4a-text-muted sm:inline",children:i}),f.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[f.jsx(Cg,{value:d,options:te,onChange:fe,icon:f.jsx(oo,{size:12})}),je?f.jsxs("span",{className:"hidden items-center gap-1.5 rounded border border-c4a-border-default bg-c4a-bg-surface px-2 py-1 font-mono text-xs text-c4a-text-muted sm:flex",children:[f.jsx(nd,{size:12}),m.slice(0,7)]}):f.jsx("div",{className:"hidden sm:block",children:f.jsx(Cg,{value:m,options:re,onChange:ue=>{b(ue),$(ue)},icon:f.jsx(nd,{size:12})})})]})]}),(E||j)&&f.jsxs("div",{className:"mt-2 flex flex-wrap gap-x-4 gap-y-1",children:[E&&f.jsxs("p",{className:"flex items-center gap-1 text-xs text-c4a-info",children:[f.jsx(m2,{size:12}),c("sources.import.branch_warning",{branch:d})]}),j&&f.jsxs("p",{className:"flex items-center gap-1 text-xs text-c4a-warning",children:[f.jsx(xd,{size:12}),c("sources.import.uncommitted_warning")]})]})]}),f.jsxs("div",{className:"mt-4 flex min-h-0 flex-1 flex-col rounded border border-c4a-border-default bg-c4a-bg-surface",children:[f.jsxs("div",{className:"flex shrink-0 items-center justify-between px-4 py-3",children:[f.jsx("p",{className:"hidden font-mono text-xs text-c4a-text-primary sm:block",children:K?f.jsxs("span",{className:"flex items-center gap-2",children:[f.jsx(Yt,{size:12,className:"animate-spin text-c4a-text-muted"}),f.jsx("span",{className:"text-c4a-text-muted",children:"Analyzing repository..."})]}):F.length>0?c("sources.import.recognized",{packages:F.length,docs:W.length}):c("sources.import.no_packages")}),!K&&(F.length>0||W.length>0)&&f.jsxs("div",{className:"flex rounded border border-c4a-border-subtle",children:[f.jsxs("button",{onClick:()=>se("packages"),className:`flex items-center gap-1 px-2.5 py-1 text-xs transition-colors ${ee==="packages"?"bg-c4a-accent/10 text-c4a-accent":"text-c4a-text-muted hover:text-c4a-text-secondary"}`,children:[f.jsx(gi,{size:13}),f.jsx("span",{className:"font-mono",children:F.length})]}),f.jsxs("button",{onClick:()=>se("docs"),className:`flex items-center gap-1 border-l border-c4a-border-subtle px-2.5 py-1 text-xs transition-colors ${ee==="docs"?"bg-c4a-accent/10 text-c4a-accent":"text-c4a-text-muted hover:text-c4a-text-secondary"}`,children:[f.jsx(el,{size:13}),f.jsx("span",{className:"font-mono",children:W.length})]})]})]}),f.jsx("hr",{className:"border-c4a-border-subtle"}),f.jsx("div",{ref:de,className:"min-h-0 flex-1 c4a-scrollbar overflow-y-auto px-2 py-1",children:K?f.jsx("div",{className:"flex items-center justify-center py-8",children:f.jsx(Yt,{size:14,className:"animate-spin text-c4a-text-muted"})}):_e.length===0?f.jsx("p",{className:"py-8 text-center text-xs text-c4a-text-muted",children:ee==="packages"?c("sources.import.no_packages"):"—"}):f.jsxs(f.Fragment,{children:[ee==="packages"?Oe.map(ue=>f.jsxs("div",{className:"flex items-center gap-2 rounded pl-2 pr-4 py-1 text-xs",children:[f.jsx(gi,{size:14,className:"shrink-0 text-c4a-accent"}),f.jsx("span",{className:"text-c4a-text-primary",children:ue.name}),f.jsx("span",{className:"hidden truncate text-c4a-text-muted sm:inline",children:ue.path}),ue.isRoot&&f.jsx("span",{className:"rounded bg-c4a-bg-active px-1 py-0.5 font-mono text-[10px] text-c4a-text-muted",children:"root"})]},ue.path)):Oe.map(ue=>f.jsxs("div",{className:"flex items-center gap-2 rounded pl-2 pr-4 py-1 text-xs",children:[f.jsx(el,{size:14,className:"shrink-0 text-c4a-text-secondary"}),f.jsx("span",{className:"truncate text-c4a-text-primary",children:ue})]},ue)),at&&f.jsx("div",{ref:P,className:"h-4"})]})})]})]})}function e_({importState:n,libraryName:i,importing:r}){const{t:s}=Re(),c=n.repoName||n.repoPath.split("/").pop()||"";return f.jsxs("div",{className:"rounded border border-c4a-border-default bg-c4a-bg-surface p-6",children:[f.jsx("p",{className:"text-sm text-c4a-text-secondary",children:s("sources.import.confirm_heading",{name:i})}),f.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-x-3 gap-y-1",children:[f.jsx("span",{className:"font-mono text-sm font-bold text-c4a-accent",children:c}),f.jsx("span",{className:"font-mono text-xs text-c4a-text-muted",children:n.repoPath})]}),f.jsxs("div",{className:"mt-4 grid grid-cols-1 gap-3 sm:grid-cols-4",children:[f.jsx(Is,{icon:f.jsx(oo,{size:14}),label:s("sources.import.branch"),value:n.branch}),f.jsx(Is,{icon:f.jsx(nd,{size:14}),label:s("sources.import.commit"),value:n.commit.slice(0,7)}),f.jsx(Is,{icon:f.jsx(gi,{size:14}),label:s("sources.import.packages"),value:String(n.packages.length),tooltip:s("sources.import.dir_code_packages_tip")}),f.jsx(Is,{icon:f.jsx(el,{size:14}),label:s("sources.import.documents"),value:String(n.mdFiles.length),tooltip:s("sources.import.dir_doc_files_tip")})]}),r&&f.jsxs("div",{className:"mt-4 flex items-center justify-center gap-2 rounded bg-c4a-bg-base p-3",children:[f.jsx(Yt,{size:14,className:"animate-spin text-c4a-accent"}),f.jsx("p",{className:"font-mono text-xs text-c4a-accent",children:s("sources.import.importing")})]})]})}function Is({icon:n,label:i,value:r,tooltip:s}){return f.jsxs("div",{className:"group/stat relative rounded border border-c4a-border-subtle bg-c4a-bg-base p-3",children:[f.jsxs("div",{className:"flex items-center gap-1.5 text-c4a-text-muted",children:[n,f.jsx("span",{className:"font-mono text-[10px] uppercase",children:i})]}),f.jsx("p",{className:"mt-1 truncate font-mono text-sm font-bold text-c4a-text-primary",title:r,children:r}),s&&f.jsx("div",{className:"pointer-events-none absolute bottom-full left-0 z-30 mb-1.5 hidden w-max max-w-[260px] rounded border border-c4a-border-default bg-c4a-bg-elevated px-2.5 py-1.5 text-[11px] leading-relaxed text-c4a-text-secondary shadow-c4a-lg group-hover/stat:block",children:s})]})}function t_(){const{t:n}=Re(),i=tl(),{libId:r}=mo(),c=Vt(xi(Dr)).find(N=>N.id===r),d=bo(N=>N.createSource),[h,p]=v.useState(1),[g,m]=v.useState(!1),[b,x]=v.useState(!1),[_,j]=v.useState({repoPath:"",repoName:"",branch:"",branches:[],commit:"",commits:[],isDirty:!1,repoFiles:[],packages:[],mdFiles:[],repoFileContents:[]}),R=c?.is_online??!1,[D,k]=v.useState([]);v.useEffect(()=>{if(!r)return;let N=!1;return(async()=>{try{const Y=await Tt.get("/sources",{library_id:r,limit:"500"});if(N)return;const J=Y.items.map(he=>{const ie=he.metadata;return typeof ie?.local_path=="string"?ie.local_path:null}).filter(he=>he!==null);k(J)}catch{}})(),()=>{N=!0}},[r]);const Z=v.useMemo(()=>{const N=c?.config;return!N||!Array.isArray(N.allowed_paths)?[]:N.allowed_paths},[c]),G=v.useCallback(async(N,Y)=>{if(!r)throw new Error("No library");const J=await Tt.post(`/libraries/${r}/rpc`,{method:N,params:Y});if(J.error){const he=J.error;throw new Error(he.message??JSON.stringify(J.error))}return J.result??J},[r]),K=v.useCallback((N,Y)=>{j(J=>({...J,repoPath:N,repoName:Y}))},[]),le=v.useCallback(N=>{j(Y=>({...Y,...N}))},[]),F=v.useCallback(async()=>{if(r){m(!0);try{const N=await d({library_id:r,repo_name:_.repoName,repo_root_path:_.repoPath,repo_branch:_.branch,repo_commit:_.commit,repo_files:_.repoFiles.map(J=>J.path),repo_file_contents:_.repoFileContents}),Y=Array.isArray(N)?N[0]:N;Y?.id?i(`/studio/sources/${r}?rootId=${Y.id}`):i(`/studio/sources/${r}`)}catch{m(!1)}}},[r,_,d,i]),I=v.useMemo(()=>h===1?!!_.repoPath:h===2?!!_.commit:!0,[h,_]),W=v.useMemo(()=>c?[{label:c.id===wr?n("sources.library.default_cloud_name"):c.name,to:`/studio/sources/${c.id}`},{label:n("sources.import.title")}]:[],[c,n]);return c?f.jsxs("div",{className:"flex min-h-0 flex-1 flex-col p-4 md:p-6",children:[f.jsx("div",{className:"shrink-0",children:f.jsx(Mr,{segments:W})}),f.jsxs("div",{className:"mt-3 flex shrink-0 items-center gap-2 font-mono text-sm sm:mt-6 md:gap-3",children:[f.jsx(Qu,{active:h>=1,current:h===1}),f.jsx("span",{className:h===1?"text-c4a-accent":"text-c4a-text-muted",children:n("sources.import.step.select")}),f.jsx(Rg,{}),f.jsx(Qu,{active:h>=2,current:h===2}),f.jsx("span",{className:h===2?"text-c4a-accent":"text-c4a-text-muted",children:n("sources.import.step.version")}),f.jsx(Rg,{}),f.jsx(Qu,{active:h>=3,current:h===3}),f.jsx("span",{className:h===3?"text-c4a-accent":"text-c4a-text-muted",children:n("sources.import.step.confirm")})]}),f.jsx("div",{className:"mt-3 flex min-h-0 flex-1 flex-col sm:mt-6",children:R?f.jsxs(f.Fragment,{children:[h===1&&f.jsx(JS,{rpc:G,selectedPath:_.repoPath,onSelect:K,allowedPaths:Z,importedPaths:D}),h===2&&f.jsx(IS,{rpc:G,repoPath:_.repoPath,onReady:le,onBusyChange:x}),h===3&&f.jsx(e_,{importState:_,libraryName:c.name,importing:g})]}):f.jsx(a_,{libraryName:c.name})}),R&&f.jsxs("div",{className:"mt-3 flex shrink-0 items-center gap-4 sm:mt-6",children:[f.jsx("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-c4a-text-muted line-clamp-1 sm:line-clamp-none",title:n("sources.safety.notice.repo"),onClick:N=>N.currentTarget.classList.toggle("line-clamp-1"),children:n("sources.safety.notice.repo")}),f.jsxs("div",{className:"flex shrink-0 gap-2",children:[h>1&&f.jsx("button",{onClick:()=>p(N=>N-1),disabled:g||b,className:"rounded border border-c4a-border-default px-4 py-2 font-mono text-xs text-c4a-text-secondary transition-colors hover:bg-c4a-bg-hover disabled:opacity-40",children:n("common.previous")}),h<3?f.jsx("button",{onClick:()=>p(N=>N+1),disabled:!I||b,className:"rounded bg-c4a-accent px-4 py-2 font-mono text-xs text-white transition-colors hover:bg-c4a-accent-hover disabled:opacity-40",children:n("common.next")}):f.jsxs("button",{onClick:F,disabled:g||b,className:"flex items-center gap-1.5 rounded bg-c4a-accent px-4 py-2 font-mono text-xs text-white transition-colors hover:bg-c4a-accent-hover disabled:opacity-40",children:[g&&f.jsx(Yt,{size:12,className:"animate-spin"}),n(g?"sources.import.importing":"sources.import.step.confirm")]})]})]})]}):f.jsx("div",{className:"flex flex-1 items-center justify-center p-8",children:f.jsx("p",{className:"text-sm text-c4a-text-muted",children:n("common.loading")})})}function Qu({active:n,current:i}){return f.jsx("span",{className:`inline-block h-2.5 w-2.5 rounded-full border-2 ${i?"border-c4a-accent bg-c4a-accent":n?"border-c4a-accent bg-transparent":"border-c4a-border-default bg-transparent"}`})}function Rg(){return f.jsx("span",{className:"h-px flex-1 bg-c4a-border-default"})}function a_({libraryName:n}){const{t:i}=Re();return f.jsxs("div",{className:"rounded border border-c4a-warning/30 bg-c4a-bg-surface p-6 text-center",children:[f.jsx("p",{className:"text-sm text-c4a-warning",children:i("sources.import.daemon_offline",{name:n})}),f.jsx(aa,{to:"/studio/sources/add-client",className:"mt-4 inline-block rounded bg-c4a-accent px-3 py-1.5 font-mono text-xs text-white transition-colors hover:bg-c4a-accent-hover",children:i("sources.import.view_guide")})]})}const zg=(n,i)=>{let r=0,s=0,c=0;const d=[],h=p=>{for(const g of p)if(g.type==="directory")s++,g.is_git_repo&&c++,g.children&&h(g.children);else if(r++,/\.md$/i.test(g.name)){const m=g.path.startsWith(i)?g.path.slice(i.length).replace(/^\//,""):g.name;d.push(m)}};return h(n),{files:r,dirs:s,gitRepos:c,mdFiles:d}};function n_({rpc:n,selectedPath:i,onSelect:r,allowedPaths:s,importedPaths:c}){const{t:d}=Re(),h=!!s&&s.length>0,p=h&&s.length===1&&s[0]==="*",[g,m]=v.useState(h),[b,x]=v.useState(h&&!p?"":"/"),[_,j]=v.useState([]),[R,D]=v.useState(!1),[k,Z]=v.useState(null),G=v.useMemo(()=>new Set(c??[]),[c]),[K,le]=v.useState(null);v.useEffect(()=>{if(h&&!p)return;let ee=!1;return(async()=>{try{const se=await n("fs/homeDir",{});ee||le(se.home_dir)}catch{ee||le("/")}})(),()=>{ee=!0}},[h,p,n]);const[F,I]=v.useState(!1),W=v.useCallback(async ee=>{D(!0),Z(null);try{const se=await n("fs/listTree",{path:ee,depth:1});j(se.entries||[]),x(ee),m(!1)}catch(se){const ge=se instanceof Error?se.message:String(se);Z(ge)}finally{D(!1)}},[n]);v.useEffect(()=>{h&&!p||K!==null&&W(K)},[K]);const N=v.useCallback(ee=>{if(ee.type!=="directory"||G.has(ee.path))return;const se=zg(ee.children||[],ee.path);r(ee.path,ee.name,se),W(ee.path)},[r,W,G]),Y=v.useCallback(()=>{if(h&&!p&&s.some(ge=>ge===b)){m(!0),x(""),j([]),Z(null);return}const ee=b.split("/").slice(0,-1).join("/")||"/";W(ee)},[b,W,h,p,s]);v.useEffect(()=>{if(b&&!g&&_.length>=0&&!R){const ee=b.split("/").pop()||b,se=zg(_,b);r(b,ee,se)}},[b,g,_,R]);const J=v.useMemo(()=>i?i.split("/").pop()||i:"",[i]),he=v.useMemo(()=>_.filter(ee=>ee.type==="directory").sort((ee,se)=>ee.is_git_repo&&!se.is_git_repo?-1:!ee.is_git_repo&&se.is_git_repo?1:ee.name.localeCompare(se.name)),[_]),ie=v.useMemo(()=>_.filter(ee=>ee.type==="file").sort((ee,se)=>ee.name.localeCompare(se.name)),[_]);return f.jsxs("div",{className:"flex min-h-0 flex-1 flex-col rounded border border-c4a-border-default bg-c4a-bg-surface p-4",children:[f.jsxs("div",{className:"flex items-center justify-between gap-4",children:[g?f.jsxs("p",{className:"flex items-center gap-1.5 font-mono text-xs text-c4a-text-muted",children:[f.jsx("span",{children:d("sources.import.allowed_dirs")}),f.jsx(Ay,{})]}):f.jsx("p",{className:"min-w-0 truncate font-mono text-xs text-c4a-text-muted",children:b}),i?f.jsxs("p",{className:"flex shrink-0 items-center gap-2 font-mono text-xs text-c4a-accent",children:[f.jsx(Ca,{size:12}),f.jsx("span",{children:J})]}):p&&g?f.jsx("button",{onClick:()=>I(!0),className:"flex shrink-0 items-center gap-1.5 rounded border border-c4a-accent/40 bg-c4a-accent/10 px-2.5 py-1 text-xs text-c4a-accent transition-colors hover:bg-c4a-accent/20",children:d("sources.import.wildcard_goto")}):null]}),f.jsx("hr",{className:"my-3 border-c4a-border-subtle"}),g?p?f.jsx("div",{className:"min-h-0 flex-1 c4a-scrollbar overflow-y-auto",children:K&&f.jsxs("button",{onClick:()=>W(K),className:"flex w-full items-center gap-2 rounded pl-2 pr-4 py-1.5 text-left text-sm text-c4a-text-secondary transition-colors hover:bg-c4a-bg-hover",children:[f.jsx(Ca,{size:14,className:"shrink-0"}),f.jsxs("span",{className:"truncate",children:[K,f.jsxs("span",{className:"ml-1.5 text-c4a-text-muted",children:["(",d("sources.import.wildcard_home"),")"]})]}),f.jsx(bn,{size:12,className:"shrink-0 text-c4a-text-muted"})]})}):f.jsx("div",{className:"min-h-0 flex-1 c4a-scrollbar overflow-y-auto",children:s.map(ee=>f.jsxs("button",{onClick:()=>W(ee),className:"flex w-full items-center gap-2 rounded pl-2 pr-4 py-1.5 text-left text-sm text-c4a-text-secondary transition-colors hover:bg-c4a-bg-hover",children:[f.jsx(Ca,{size:14,className:"shrink-0"}),f.jsx("span",{className:"truncate",children:ee}),f.jsx(bn,{size:12,className:"shrink-0 text-c4a-text-muted"})]},ee))}):k&&!R?f.jsx("p",{className:"py-4 text-xs text-c4a-error",children:k}):f.jsxs("div",{className:"relative min-h-[5rem] min-h-0 flex-1 c4a-scrollbar overflow-y-auto",children:[R&&f.jsx("div",{className:"absolute inset-0 z-10 flex items-center justify-center bg-c4a-bg-surface/60",children:f.jsx(Yt,{size:14,className:"animate-spin text-c4a-text-muted"})}),b!=="/"&&f.jsxs("button",{onClick:Y,disabled:R,className:"flex w-full items-center gap-2 rounded pl-2 pr-4 py-1.5 text-left text-sm text-c4a-text-secondary hover:bg-c4a-bg-hover disabled:pointer-events-none",children:[f.jsx(Ca,{size:14}),f.jsx("span",{children:".."})]}),he.map(ee=>{const se=G.has(ee.path),ge=ee.is_git_repo?vd:Ca;return f.jsxs("button",{onClick:()=>N(ee),disabled:se||R,className:`flex w-full items-center gap-2 rounded pl-2 pr-4 py-1.5 text-left text-sm transition-colors ${se?"cursor-not-allowed text-c4a-accent/60":i===ee.path?"bg-c4a-accent/10 text-c4a-accent":"text-c4a-text-secondary hover:bg-c4a-bg-hover"}`,children:[f.jsx(ge,{size:14,className:"shrink-0"}),f.jsx("span",{className:"flex-1 truncate",children:ee.name}),se&&f.jsx("span",{className:"rounded bg-c4a-accent/10 px-1.5 py-0.5 font-mono text-[10px] text-c4a-accent/60",children:d("sources.import.already_imported")}),f.jsx(bn,{size:12,className:"shrink-0 text-c4a-text-muted"})]},ee.path)}),ie.map(ee=>f.jsxs("div",{className:"flex w-full items-center gap-2 pl-2 pr-4 py-1.5 text-sm text-c4a-text-muted",children:[f.jsx(jy,{size:14,className:"shrink-0"}),f.jsx("span",{className:"truncate",children:ee.name})]},ee.path)),_.length===0&&!R&&f.jsx("p",{className:"py-4 text-center text-xs text-c4a-text-muted",children:d("sources.import.no_entries")})]}),f.jsx(Ly,{open:F,onClose:()=>I(!1),rpc:n,onNavigate:W,defaultPath:K??void 0})]})}const l_=new Set(["package.json","pyproject.toml","setup.py","go.mod","cargo.toml","pom.xml","build.gradle"]),i_=n=>{let i=0,r=0,s=0,c=0,d=0;const h=new Set;for(const p of n)if(p.type==="directory")r++,p.is_git_repo&&d++;else{i++,p.path.toLowerCase().endsWith(".md")&&c++;const m=p.path.split("/").pop();if(m&&l_.has(m.toLowerCase())){const b=p.path.split("/").slice(0,-1).join("/");n.some(_=>_.type==="directory"&&_.is_git_repo&&(b===_.path||b.startsWith(`${_.path}/`)))||h.add(b)}}return s=h.size,{totalFiles:i,totalDirs:r,codePackages:s,docFiles:c,gitRepos:d}};function r_({dirPath:n,rpc:i,importing:r,onScanComplete:s,onBusyChange:c}){const{t:d}=Re(),[h,p]=v.useState(!1),[g,m]=v.useState(null),[b,x]=v.useState(null),_=v.useCallback(async()=>{p(!0),c?.(!0),m(null),x(null);try{const j=await i("fs/dirScan",{path:n}),R=j.entries||[],D=j.manifests||[],k=i_(R);x(k),s(R,k,D)}catch(j){const R=j instanceof Error?j.message:String(j);m(R)}finally{p(!1),c?.(!1)}},[n,i,s,c]);return v.useEffect(()=>{_()},[_]),f.jsxs("div",{className:"flex min-h-0 flex-1 flex-col rounded border border-c4a-border-default bg-c4a-bg-surface p-6",children:[f.jsx("p",{className:"shrink-0 font-mono text-xs text-c4a-text-muted",children:n}),f.jsx("div",{className:"mt-3 shrink-0 border-t border-c4a-border-subtle"}),f.jsxs("div",{className:"c4a-scrollbar min-h-0 flex-1 overflow-y-auto",children:[h&&f.jsxs("div",{className:"mt-6 flex items-center justify-center gap-2 rounded bg-c4a-bg-base p-4",children:[f.jsx(Yt,{size:14,className:"animate-spin text-c4a-accent"}),f.jsx("p",{className:"font-mono text-xs text-c4a-accent",children:d("sources.import.dir_scanning")})]}),g&&f.jsxs("div",{className:"mt-6",children:[f.jsxs("p",{className:"flex items-start gap-2 text-xs text-c4a-error",children:[f.jsx(xd,{size:14,className:"mt-0.5 shrink-0"}),d("sources.import.dir_scan_error")]}),f.jsx("p",{className:"mt-1 text-xs text-c4a-text-muted",children:g}),f.jsxs("button",{onClick:_,className:"mt-3 flex items-center gap-1.5 rounded border border-c4a-border-default px-3 py-1.5 font-mono text-xs text-c4a-text-secondary transition-colors hover:bg-c4a-bg-hover",children:[f.jsx(T2,{size:12}),d("sources.import.dir_scan_retry")]})]}),b&&!h&&!g&&f.jsxs("div",{className:"mt-6 space-y-3",children:[f.jsxs("p",{className:"font-mono text-sm uppercase text-c4a-accent",children:[d("sources.import.dir_scan_complete"),"!"]}),f.jsxs("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-3 lg:grid-cols-5",children:[f.jsx(mr,{icon:f.jsx(el,{size:14}),label:d("sources.import.dir_doc_files"),value:b.docFiles,tooltip:d("sources.import.dir_doc_files_tip")}),f.jsx(mr,{icon:f.jsx(gi,{size:14}),label:d("sources.import.dir_code_packages"),value:b.codePackages,tooltip:d("sources.import.dir_code_packages_tip")}),b.gitRepos>0&&f.jsx(mr,{icon:f.jsx(vd,{size:14}),label:d("sources.import.dir_git_repos"),value:b.gitRepos}),f.jsx(mr,{icon:f.jsx(Ca,{size:14}),label:d("sources.import.dir_total_dirs"),value:b.totalDirs}),f.jsx(mr,{icon:f.jsx(e2,{size:14}),label:d("sources.import.dir_total_files"),value:b.totalFiles})]}),b.gitRepos>0&&f.jsx("p",{className:"text-xs text-c4a-warning",children:d("sources.import.dir_git_skip_hint",{count:b.gitRepos})})]}),r&&f.jsxs("div",{className:"mt-4 flex items-center justify-center gap-2 rounded bg-c4a-bg-base p-3",children:[f.jsx(Yt,{size:14,className:"animate-spin text-c4a-accent"}),f.jsx("p",{className:"font-mono text-xs text-c4a-accent",children:d("sources.import.importing")})]})]})]})}function mr({icon:n,label:i,value:r,tooltip:s}){return f.jsxs("div",{className:"group/stat relative rounded border border-c4a-border-subtle bg-c4a-bg-base p-3",children:[f.jsxs("div",{className:"flex items-center gap-1.5 text-c4a-text-muted",children:[n,f.jsx("span",{className:"font-mono text-[10px] uppercase",children:i})]}),f.jsx("p",{className:"mt-1 font-mono text-lg font-bold text-c4a-text-primary",children:r}),s&&f.jsx("div",{className:"pointer-events-none absolute bottom-full left-0 z-30 mb-1.5 hidden w-max max-w-[260px] rounded border border-c4a-border-default bg-c4a-bg-elevated px-2.5 py-1.5 text-[11px] leading-relaxed text-c4a-text-secondary shadow-c4a-lg group-hover/stat:block",children:s})]})}function s_(){const{t:n}=Re(),i=tl(),{libId:r}=mo(),c=Vt(xi(Dr)).find(N=>N.id===r),d=bo(N=>N.createSource),[h,p]=v.useState(1),[g,m]=v.useState(!1),[b,x]=v.useState(!1),[_,j]=v.useState({dirPath:"",dirName:"",fileCount:0,subDirCount:0,gitRepoCount:0,mdFiles:[],scanEntries:[],scanStats:null,manifests:[]}),R=c?.is_online??!1,[D,k]=v.useState([]);v.useEffect(()=>{if(!r)return;let N=!1;return(async()=>{try{const Y=await Tt.get("/sources",{library_id:r,limit:"500"});if(N)return;const J=Y.items.map(he=>{const ie=he.metadata;return typeof ie?.local_path=="string"?ie.local_path:null}).filter(he=>he!==null);k(J)}catch{}})(),()=>{N=!0}},[r]);const Z=v.useMemo(()=>{const N=c?.config;return!N||!Array.isArray(N.allowed_paths)?[]:N.allowed_paths},[c]),G=v.useCallback(async(N,Y)=>{if(!r)throw new Error("No library");const J=await Tt.post(`/libraries/${r}/rpc`,{method:N,params:Y});if(J.error){const he=J.error;throw new Error(he.message??JSON.stringify(J.error))}return J.result??J},[r]),K=v.useCallback((N,Y,J)=>{j(he=>({...he,dirPath:N,dirName:Y,fileCount:J.files,subDirCount:J.dirs,gitRepoCount:J.gitRepos,mdFiles:J.mdFiles}))},[]),le=v.useCallback((N,Y,J)=>{j(he=>({...he,scanEntries:N,scanStats:Y,manifests:J}))},[]),F=v.useCallback(async()=>{if(r){m(!0);try{const N=await d({library_id:r,dir_files:_.scanEntries,dir_name:_.dirName,dir_path:_.dirPath,dir_file_contents:_.manifests}),Y=Array.isArray(N)?N[0]:N;Y?.id?i(`/studio/sources/${r}?rootId=${Y.id}`):i(`/studio/sources/${r}`)}catch{m(!1)}}},[r,_,d,i]),I=v.useMemo(()=>h===1?!!_.dirPath:h===2?_.scanEntries.length>0:!0,[h,_]),W=v.useMemo(()=>c?[{label:c.id===wr?n("sources.library.default_cloud_name"):c.name,to:`/studio/sources/${c.id}`},{label:n("sources.import.dir_title")}]:[],[c,n]);return c?f.jsxs("div",{className:"flex min-h-0 flex-1 flex-col p-4 md:p-6",children:[f.jsx("div",{className:"shrink-0",children:f.jsx(Mr,{segments:W})}),f.jsxs("div",{className:"mt-3 flex shrink-0 items-center gap-2 font-mono text-sm sm:mt-6 md:gap-3",children:[f.jsx(Tg,{active:h>=1,current:h===1}),f.jsx("span",{className:h===1?"text-c4a-accent":"text-c4a-text-muted",children:n("sources.import.dir_step.select")}),f.jsx(o_,{}),f.jsx(Tg,{active:h>=2,current:h===2}),f.jsx("span",{className:h===2?"text-c4a-accent":"text-c4a-text-muted",children:n("sources.import.dir_step.confirm")})]}),f.jsx("div",{className:"mt-3 flex min-h-0 flex-1 flex-col sm:mt-6",children:R?f.jsxs(f.Fragment,{children:[h===1&&f.jsx(n_,{rpc:G,selectedPath:_.dirPath,onSelect:K,allowedPaths:Z,importedPaths:D}),h===2&&f.jsx(r_,{dirPath:_.dirPath,rpc:G,importing:g,onScanComplete:le,onBusyChange:x})]}):f.jsx(c_,{libraryName:c.name})}),R&&f.jsxs("div",{className:"mt-3 flex shrink-0 items-center gap-4 sm:mt-6",children:[f.jsx("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-c4a-text-muted line-clamp-1 sm:line-clamp-none",title:n("sources.safety.notice.dir"),onClick:N=>N.currentTarget.classList.toggle("line-clamp-1"),children:n("sources.safety.notice.dir")}),f.jsxs("div",{className:"flex shrink-0 gap-2",children:[h>1&&f.jsx("button",{onClick:()=>p(N=>N-1),disabled:g||b,className:"rounded border border-c4a-border-default px-4 py-2 font-mono text-xs text-c4a-text-secondary transition-colors hover:bg-c4a-bg-hover disabled:opacity-40",children:n("common.previous")}),h<2?f.jsx("button",{onClick:()=>p(N=>N+1),disabled:!I||b,className:"rounded bg-c4a-accent px-4 py-2 font-mono text-xs text-white transition-colors hover:bg-c4a-accent-hover disabled:opacity-40",children:n("common.next")}):f.jsxs("button",{onClick:F,disabled:g||b||!I,className:"flex items-center gap-1.5 rounded bg-c4a-accent px-4 py-2 font-mono text-xs text-white transition-colors hover:bg-c4a-accent-hover disabled:opacity-40",children:[g&&f.jsx(Yt,{size:12,className:"animate-spin"}),n(g?"sources.import.importing":"sources.import.dir_step.confirm")]})]})]})]}):f.jsx("div",{className:"flex flex-1 items-center justify-center p-8",children:f.jsx("p",{className:"text-sm text-c4a-text-muted",children:n("common.loading")})})}function Tg({active:n,current:i}){return f.jsx("span",{className:`inline-block h-2.5 w-2.5 rounded-full border-2 ${i?"border-c4a-accent bg-c4a-accent":n?"border-c4a-accent bg-transparent":"border-c4a-border-default bg-transparent"}`})}function o_(){return f.jsx("span",{className:"h-px flex-1 bg-c4a-border-default"})}function c_({libraryName:n}){const{t:i}=Re();return f.jsxs("div",{className:"rounded border border-c4a-warning/30 bg-c4a-bg-surface p-6 text-center",children:[f.jsx("p",{className:"text-sm text-c4a-warning",children:i("sources.import.daemon_offline",{name:n})}),f.jsx(aa,{to:"/studio/sources/add-client",className:"mt-4 inline-block rounded bg-c4a-accent px-3 py-1.5 font-mono text-xs text-white transition-colors hover:bg-c4a-accent-hover",children:i("sources.import.view_guide")})]})}function u_(){const{t:n}=Re(),i=tl(),r=Vt(_=>_.createLibrary),[s,c]=v.useState("waiting"),[d,h]=v.useState(null),[p,g]=v.useState(""),[m,b]=v.useState(!1);v.useEffect(()=>Pa.on("ws:daemon:connected",j=>{const R=j;h(R),g(R.machine_id),c(R.needs_registration?"new_client":"reconnected")}),[]),v.useEffect(()=>{let _=!1;return(async()=>{try{const j=await Tt.get("/daemons/pending");if(_||j.pending.length===0)return;const R=j.pending[0];h({machine_id:R.machine_id,needs_registration:!0}),g(R.machine_id),c("new_client")}catch{}})(),()=>{_=!0}},[]);const x=v.useCallback(async()=>{if(d){b(!0);try{const _=await r({type:"daemon",name:p||d.machine_id,config:{machine_id:d.machine_id,os:d.os||"",daemon_version:d.daemon_version||""}});i(`/studio/sources/${_.id}`)}catch{b(!1)}}},[d,p,r,i]);return f.jsxs("div",{className:"flex flex-1 flex-col p-4 md:p-6",children:[f.jsx(Mr,{segments:[{label:n("sources.add_client.title")}]}),f.jsx("p",{className:"mt-4 text-sm text-c4a-text-secondary",children:n("sources.add_client.description")}),f.jsx("div",{className:"mt-6 rounded border border-c4a-border-default bg-c4a-bg-surface p-5",children:f.jsxs("ol",{className:"space-y-4 text-sm text-c4a-text-secondary",children:[f.jsxs("li",{children:[f.jsxs("span",{className:"font-mono text-xs font-bold text-c4a-text-primary",children:["1. ",n("sources.add_client.step1")]}),f.jsx("pre",{className:"mt-1 rounded bg-c4a-bg-base px-3 py-2 font-mono text-xs text-c4a-accent",children:"npm install -g @c4a/daemon"})]}),f.jsxs("li",{children:[f.jsxs("span",{className:"font-mono text-xs font-bold text-c4a-text-primary",children:["2. ",n("sources.add_client.step2")]}),f.jsx("pre",{className:"mt-1 rounded bg-c4a-bg-base px-3 py-2 font-mono text-xs text-c4a-accent",children:`c4a-daemon --server ${window.location.host}`})]}),f.jsxs("li",{children:[f.jsxs("span",{className:"font-mono text-xs font-bold text-c4a-text-primary",children:["3. ",n("sources.add_client.step3")]}),f.jsx("p",{className:"mt-1 text-xs text-c4a-text-muted",children:n("sources.add_client.step3_desc")})]})]})}),f.jsxs("div",{className:"mt-6 rounded border border-c4a-border-default bg-c4a-bg-surface p-5",children:[s==="waiting"&&f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx(Yt,{size:16,className:"animate-spin text-c4a-warning"}),f.jsx("span",{className:"text-sm text-c4a-warning",children:n("sources.add_client.waiting")})]}),s==="new_client"&&d&&f.jsxs("div",{className:"space-y-4",children:[f.jsx("h3",{className:"font-mono text-sm font-bold text-c4a-accent",children:n("sources.add_client.detected")}),f.jsxs("div",{className:"space-y-2 text-sm",children:[f.jsx(Zu,{label:n("sources.add_client.machine_name"),value:d.machine_id}),d.os&&f.jsx(Zu,{label:n("sources.add_client.os"),value:d.os}),d.daemon_version&&f.jsx(Zu,{label:n("sources.add_client.daemon_version"),value:d.daemon_version})]}),f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("span",{className:"w-32 font-mono text-xs text-c4a-text-muted",children:n("sources.add_client.client_name")}),f.jsx("input",{value:p,onChange:_=>g(_.target.value),className:"min-w-0 flex-1 rounded border border-c4a-border-default bg-c4a-bg-base px-2 py-1 font-mono text-xs text-c4a-text-primary outline-none focus:border-c4a-accent"})]}),f.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[f.jsx("button",{onClick:()=>i("/studio/sources"),className:"rounded border border-c4a-border-default px-3 py-1.5 font-mono text-xs text-c4a-text-secondary transition-colors hover:bg-c4a-bg-hover",children:n("common.cancel")}),f.jsxs("button",{onClick:x,disabled:m||!p.trim(),className:"flex items-center gap-1.5 rounded bg-c4a-accent px-3 py-1.5 font-mono text-xs text-white transition-colors hover:bg-c4a-accent-hover disabled:opacity-50",children:[m&&f.jsx(Yt,{size:12,className:"animate-spin"}),n("sources.add_client.confirm")]})]})]}),s==="reconnected"&&d&&f.jsxs("div",{className:"space-y-4",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(pi,{size:16,className:"text-c4a-success"}),f.jsx("span",{className:"text-sm text-c4a-text-primary",children:n("sources.add_client.reconnected",{name:d.machine_id})})]}),d.lib_id&&f.jsx(aa,{to:`/studio/sources/${d.lib_id}`,className:"inline-block rounded bg-c4a-accent px-3 py-1.5 font-mono text-xs text-white transition-colors hover:bg-c4a-accent-hover",children:n("sources.add_client.go_to",{name:d.machine_id})})]})]})]})}function Zu({label:n,value:i}){return f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("span",{className:"w-32 font-mono text-xs text-c4a-text-muted",children:n}),f.jsx("span",{className:"font-mono text-xs text-c4a-text-primary",children:i})]})}function d_(){const{t:n}=Re(),{sourceUuid:i}=mo(),[r]=by(),s=r.get("path")||"",{currentRoot:c,loading:d,fetchRootSource:h}=bo(),p=Vt(xi(Dr)),[g,m]=v.useState("original");v.useEffect(()=>{i&&h(i)},[i,h]);const b=v.useMemo(()=>!c||!s?null:vo(c.tree,s),[c,s]),x=p.find(K=>K.id===c?.library_id),_=b?.metadata,j=_?Object.fromEntries(Object.entries(_).map(([K,le])=>[K,String(le??"")])):null,R=b?.source_type==="code",D=b?.name??c?.name??"",k=b?.source_type??null,Z=v.useMemo(()=>{if(!c||!x)return[];const K=[{label:x.id===wr?n("sources.library.default_cloud_name"):x.name,to:`/studio/sources/${x.id}`},{label:c.name,to:`/studio/sources/${x.id}?rootId=${c.id}`}];if(s){const le=Dy(c.tree,s);for(let F=0;F<le.length-1;F++){const I=le[F];K.push({label:I.name,to:`/studio/sources/${x.id}?rootId=${c.id}&path=${encodeURIComponent(I.path)}`})}le.length>0&&K.push({label:le[le.length-1].name})}return K},[c,x,s,n]),G=[{key:"original",label:n(R?"sources.detail.tab.overview":"sources.detail.tab.original")},{key:"digest",label:n("sources.detail.tab.digest")},{key:"modeling",label:n("sources.detail.tab.modeling")}];return d||!c||!b?f.jsx("div",{className:"flex flex-1 items-center justify-center p-8",children:f.jsx("p",{className:"text-sm text-c4a-text-muted",children:n("common.loading")})}):f.jsxs("div",{className:"flex flex-1 flex-col p-4 md:p-6",children:[f.jsx(Mr,{segments:Z}),f.jsxs("div",{className:"mt-4 flex flex-wrap items-baseline gap-x-6 gap-y-2",children:[f.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[R?f.jsx(gi,{size:20,className:"shrink-0 text-c4a-accent"}):f.jsx(el,{size:20,className:"shrink-0 text-c4a-accent"}),f.jsx("h1",{className:"min-w-0 break-all font-mono text-xl font-bold leading-none text-c4a-text-primary",children:D})]}),f.jsxs("div",{className:"flex flex-wrap items-baseline gap-4 text-xs text-c4a-text-muted",children:[f.jsxs("span",{children:[n("sources.detail.type"),":"," ",f.jsx("span",{className:"text-c4a-text-secondary",children:n(k==="code"?"sources.type.code":"sources.type.doc")})]}),R&&j?.relative_path&&f.jsxs("span",{children:[n("sources.detail.path"),":"," ",f.jsx("span",{className:"font-mono text-c4a-text-secondary",children:j.relative_path})]}),!R&&f.jsxs("span",{children:[n("sources.detail.origin"),":"," ",f.jsx("span",{className:"text-c4a-text-secondary",children:x?.type==="daemon"?n("sources.detail.origin.local"):n("sources.detail.origin.upload")})]}),f.jsxs("span",{children:[n("sources.detail.status"),":"," ",f.jsx("span",{className:"text-c4a-text-secondary",children:n(`sources.status.${b.index_status??"none"}`)})]})]})]}),R&&j&&f.jsx("div",{className:"mt-4 rounded border border-c4a-border-subtle bg-c4a-bg-surface p-4",children:f.jsxs("div",{className:"grid grid-cols-2 gap-x-8 gap-y-2 text-xs md:grid-cols-4",children:[j.repo_name&&f.jsx(eo,{label:n("sources.detail.repo"),value:j.repo_name}),j.pinned_branch&&f.jsx(eo,{label:n("sources.detail.branch"),value:j.pinned_branch}),j.pinned_hash&&f.jsx(eo,{label:n("sources.detail.commit"),value:j.pinned_hash.slice(0,7)}),j.tech_stack&&f.jsx(eo,{label:n("sources.detail.tech_stack"),value:j.tech_stack})]})}),f.jsx("div",{className:"mt-3 flex border-b border-c4a-border-subtle",children:G.map(K=>f.jsx("button",{onClick:()=>m(K.key),className:`border-b-2 px-4 py-2 font-mono text-xs uppercase transition-colors ${g===K.key?"border-c4a-accent text-c4a-accent":"border-transparent text-c4a-text-muted hover:text-c4a-text-secondary"}`,children:K.label},K.key))}),f.jsxs("div",{className:"mt-4 flex-1",children:[g==="original"&&f.jsx(f_,{node:b,isCode:R}),g==="digest"&&f.jsx(Og,{message:n("sources.detail.digest_placeholder")}),g==="modeling"&&f.jsx(Og,{message:n("sources.detail.modeling_placeholder")})]})]})}function eo({label:n,value:i}){return f.jsxs("div",{children:[f.jsx("span",{className:"text-c4a-text-muted",children:n}),f.jsx("p",{className:"mt-0.5 font-mono text-c4a-text-primary",children:i})]})}function f_({node:n,isCode:i}){const{t:r}=Re(),s=n.metadata;return i?f.jsxs("div",{className:"space-y-4 text-sm text-c4a-text-secondary",children:[!!s?.description&&f.jsx("p",{children:String(s.description)}),!!s?.dependencies&&f.jsxs("div",{children:[f.jsx("h4",{className:"font-mono text-xs font-bold uppercase text-c4a-text-primary",children:r("sources.detail.dependencies")}),f.jsx("div",{className:"mt-2 rounded bg-c4a-bg-surface p-3 font-mono text-xs",children:Object.entries(s.dependencies).map(([c,d])=>f.jsxs("div",{className:"flex justify-between py-0.5",children:[f.jsx("span",{className:"text-c4a-text-primary",children:c}),f.jsx("span",{className:"text-c4a-text-muted",children:d})]},c))})]}),!s?.description&&!s?.dependencies&&f.jsx("p",{className:"text-c4a-text-muted",children:r("sources.detail.original_code_placeholder")})]}):f.jsx("div",{className:"prose prose-invert max-w-none text-sm text-c4a-text-secondary",children:f.jsx("p",{className:"text-c4a-text-muted",children:r("sources.detail.original_doc_placeholder")})})}function Og({message:n}){return f.jsx("div",{className:"flex items-center justify-center rounded border border-dashed border-c4a-border-subtle p-12",children:f.jsx("p",{className:"text-center text-sm text-c4a-text-muted",children:n})})}const h_="lib_cloud_default",m_=b4([{element:f.jsx(fS,{}),children:[{path:"/",element:f.jsx(xS,{})},{path:"/login",element:f.jsx(vS,{})},{path:"/docs",element:f.jsx(bS,{})}]},{path:"/studio",element:f.jsx(yS,{}),children:[{index:!0,element:f.jsx(cg,{to:"/studio/sources",replace:!0})},{path:"sources",element:f.jsx(cg,{to:`/studio/sources/${h_}`,replace:!0})},{path:"sources/add-client",element:f.jsx(u_,{})},{path:"sources/import/:libId",element:f.jsx(t_,{})},{path:"sources/import-dir/:libId",element:f.jsx(s_,{})},{path:"sources/:libId",element:f.jsx(QS,{})},{path:"source/:sourceUuid",element:f.jsx(d_,{})},{path:"modeling",element:f.jsx(_S,{})},{path:"modeling/code/setup",element:f.jsx(RS,{})},{path:"modeling/code/compile",element:f.jsx(zS,{})},{path:"modeling/code/review",element:f.jsx(TS,{})},{path:"modeling/code/result",element:f.jsx(OS,{})},{path:"brain",element:f.jsx(jS,{})},{path:"discovery",element:f.jsx(NS,{})},{path:"sharing",element:f.jsx(ES,{})},{path:"collaboration",element:f.jsx(wS,{})},{path:"settings",element:f.jsx(CS,{})}]},{path:"*",element:f.jsx(SS,{})}]);function p_(){return v.useEffect(()=>{const i=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws`;return Pa.connect(i),()=>{Pa.disconnect()}},[]),f.jsx(X1,{router:m_})}rb.createRoot(document.getElementById("root")).render(f.jsx(v.StrictMode,{children:f.jsx(p_,{})}));
|