@c4a/server-cli 0.4.11 → 0.4.12-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/index.js +795 -3402
  2. package/package.json +1 -1
  3. package/serve.js +3223 -4193
  4. package/web/assets/index--UyZtsHr.js +238 -0
  5. package/web/assets/index-15FuETM5.js +238 -0
  6. package/web/assets/index-1O90ZcBt.js +238 -0
  7. package/web/assets/index-2ZaXHlEm.js +12 -0
  8. package/web/assets/index-5SgaIe6K.js +238 -0
  9. package/web/assets/index-69TE-Dt9.js +238 -0
  10. package/web/assets/index-6qWMAJjW.js +12 -0
  11. package/web/assets/index-8bavzcKH.js +238 -0
  12. package/web/assets/index-B2JcVRax.js +238 -0
  13. package/web/assets/index-B3a1j3cz.js +238 -0
  14. package/web/assets/index-B6EqO_Cg.js +12 -0
  15. package/web/assets/index-B7OJ5sV_.js +238 -0
  16. package/web/assets/index-B9YWtkC-.js +12 -0
  17. package/web/assets/index-BD162a_1.js +238 -0
  18. package/web/assets/index-BF50bkqY.css +1 -0
  19. package/web/assets/index-BPMcNaXa.css +1 -0
  20. package/web/assets/index-BPlwhwPb.css +1 -0
  21. package/web/assets/index-BW9aouHt.js +238 -0
  22. package/web/assets/index-BbZvxZvZ.css +1 -0
  23. package/web/assets/index-BkYFml7g.css +1 -0
  24. package/web/assets/index-Bnn0CunM.js +238 -0
  25. package/web/assets/index-BosC7CbW.css +1 -0
  26. package/web/assets/index-BrJa-9jA.css +1 -0
  27. package/web/assets/index-C63Z-8cw.js +238 -0
  28. package/web/assets/index-C6ydhyiL.js +238 -0
  29. package/web/assets/index-CAXoXe3-.css +1 -0
  30. package/web/assets/index-CDG7D9Wo.css +1 -0
  31. package/web/assets/index-CNruo9jb.js +238 -0
  32. package/web/assets/index-CUGq5bZG.js +12 -0
  33. package/web/assets/index-CVB_F0xd.js +238 -0
  34. package/web/assets/index-CVct6UjO.css +1 -0
  35. package/web/assets/index-CX2QKHgP.js +12 -0
  36. package/web/assets/index-Cok56quU.css +1 -0
  37. package/web/assets/index-Ct-X2M8U.js +12 -0
  38. package/web/assets/index-CtnVCeI7.css +1 -0
  39. package/web/assets/index-Cu6ttPtz.js +12 -0
  40. package/web/assets/index-CvTLDILA.css +1 -0
  41. package/web/assets/index-D0x9zuj2.js +238 -0
  42. package/web/assets/index-D12WsS4E.js +238 -0
  43. package/web/assets/index-D3-qG0Hp.js +238 -0
  44. package/web/assets/index-D3UsEQTE.css +1 -0
  45. package/web/assets/index-D5WvCk3U.js +238 -0
  46. package/web/assets/index-D6QqUdMz.css +1 -0
  47. package/web/assets/index-D7EkgIsu.js +12 -0
  48. package/web/assets/index-DB_YWOXK.js +12 -0
  49. package/web/assets/index-DBaysFVi.css +1 -0
  50. package/web/assets/index-DGYdHfUt.js +238 -0
  51. package/web/assets/index-DIzfj2PR.css +1 -0
  52. package/web/assets/index-DJiYLRIW.css +1 -0
  53. package/web/assets/index-DQcztEye.js +238 -0
  54. package/web/assets/index-DSnxWXVs.css +1 -0
  55. package/web/assets/index-DX1UQEJF.css +1 -0
  56. package/web/assets/index-DgtV8nwc.js +238 -0
  57. package/web/assets/index-DqdyIshw.js +12 -0
  58. package/web/assets/index-DyF2kEj9.js +238 -0
  59. package/web/assets/index-H6Rs5Fbq.js +12 -0
  60. package/web/assets/index-O5LI2GNV.js +238 -0
  61. package/web/assets/index-SnFvyzm_.css +1 -0
  62. package/web/assets/index-bnfl0N-T.css +1 -0
  63. package/web/assets/index-cMgxghVE.css +1 -0
  64. package/web/assets/index-dDuVahj-.js +12 -0
  65. package/web/assets/index-fG23cf-l.js +238 -0
  66. package/web/assets/index-it-5oMch.css +1 -0
  67. package/web/assets/index-yq497d-W.js +12 -0
  68. package/web/index.html +2 -2
@@ -0,0 +1,12 @@
1
+ function Vv(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 Gv(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var wu={exports:{}},ir={};var np;function $v(){if(np)return ir;np=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 ir.Fragment=i,ir.jsx=r,ir.jsxs=r,ir}var lp;function Kv(){return lp||(lp=1,wu.exports=$v()),wu.exports}var f=Kv();const Re=n=>typeof n=="string",rr=()=>{let n,i;const r=new Promise((s,c)=>{n=s,i=c});return r.resolve=n,r.reject=i,r},ip=n=>n==null?"":""+n,Xv=(n,i,r)=>{n.forEach(s=>{i[s]&&(r[s]=i[s])})},Qv=/###/g,rp=n=>n&&n.indexOf("###")>-1?n.replace(Qv,"."):n,sp=n=>!n||Re(n),mr=(n,i,r)=>{const s=Re(i)?i.split("."):i;let c=0;for(;c<s.length-1;){if(sp(n))return{};const d=rp(s[c]);!n[d]&&r&&(n[d]=new r),Object.prototype.hasOwnProperty.call(n,d)?n=n[d]:n={},++c}return sp(n)?{}:{obj:n,k:rp(s[c])}},op=(n,i,r)=>{const{obj:s,k:c}=mr(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=mr(n,h,Object);for(;p.obj===void 0&&h.length;)d=`${h[h.length-1]}.${d}`,h=h.slice(0,h.length-1),p=mr(n,h,Object),p?.obj&&typeof p.obj[`${p.k}.${d}`]<"u"&&(p.obj=void 0);p.obj[`${p.k}.${d}`]=r},Zv=(n,i,r,s)=>{const{obj:c,k:d}=mr(n,i,Object);c[d]=c[d]||[],c[d].push(r)},ao=(n,i)=>{const{obj:r,k:s}=mr(n,i);if(r&&Object.prototype.hasOwnProperty.call(r,s))return r[s]},Fv=(n,i,r)=>{const s=ao(n,r);return s!==void 0?s:ao(i,r)},Og=(n,i,r)=>{for(const s in i)s!=="__proto__"&&s!=="constructor"&&(s in n?Re(n[s])||n[s]instanceof String||Re(i[s])||i[s]instanceof String?r&&(n[s]=i[s]):Og(n[s],i[s],r):n[s]=i[s]);return n},yl=n=>n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var Jv={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const Wv=n=>Re(n)?n.replace(/[&<>"'\/]/g,i=>Jv[i]):n;class Pv{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 Iv=[" ",",","?","!",";"],e0=new Pv(20),t0=(n,i,r)=>{i=i||"",r=r||"";const s=Iv.filter(h=>i.indexOf(h)<0&&r.indexOf(h)<0);if(s.length===0)return!0;const c=e0.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},Qu=(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},yr=n=>n?.replace("_","-"),a0={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 no{constructor(i,r={}){this.init(i,r)}init(i,r={}){this.prefix=r.prefix||"i18next:",this.logger=i||a0,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:(Re(i[0])&&(i[0]=`${s}${this.prefix} ${i[0]}`),this.logger[r](i))}create(i){return new no(this.logger,{prefix:`${this.prefix}:${i}:`,...this.options})}clone(i){return i=i||this.options,i.prefix=i.prefix||this.prefix,new no(this.logger,i)}}var Qa=new no;class so{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 cp extends so{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):Re(s)&&d?p.push(...s.split(d)):p.push(s)));const g=ao(this.data,p);return!g&&!r&&!s&&i.indexOf(".")>-1&&(i=p[0],r=p[1],s=p.slice(2).join(".")),g||!h||!Re(s)?g:Qu(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),op(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)(Re(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=ao(this.data,p)||{};h.skipCopy||(s=JSON.parse(JSON.stringify(s))),c?Og(g,s,d):g={...g,...s},op(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 Dg=Symbol("i18next/PATH_KEY");function n0(){const n=[],i=Object.create(null);let r;return i.get=(s,c)=>(r?.revoke?.(),c===Dg?n:(n.push(c),r=Proxy.revocable(s,i),r.proxy)),Proxy.revocable(Object.create(null),i).proxy}function Zu(n,i){const{[Dg]:r}=n(n0());return r.join(i?.keySeparator??".")}const up={},Cu=n=>!Re(n)&&typeof n!="boolean"&&typeof n!="number";class lo extends so{constructor(i,r={}){super(),Xv(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],i,this),this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Qa.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=Cu(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&&!t0(i,s,c);if(h&&!p){const g=i.match(this.interpolator.nestingRegexp);if(g&&g.length>0)return{key:i,namespaces:Re(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:Re(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=Zu(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 M=j?.usedKey||p,U=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,ie=c.count!==void 0&&!Re(c.count),ae=lo.hasDefaultValue(c),oe=ie?this.pluralResolver.getSuffix(x,c.count,c):"",W=c.ordinal&&ie?this.pluralResolver.getSuffix(x,c.count,{ordinal:!1}):"",N=ie&&!c.ordinal&&c.count===0,Q=N&&c[`defaultValue${this.options.pluralSeparator}zero`]||c[`defaultValue${oe}`]||c[`defaultValue${W}`]||c.defaultValue;let F=R;K&&!R&&ae&&(F=Q);const ue=Cu(F),ne=Object.prototype.toString.apply(F);if(K&&F&&ue&&Z.indexOf(ne)<0&&!(Re(G)&&Array.isArray(F))){if(!c.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const P=this.options.returnedObjectHandler?this.options.returnedObjectHandler(M,F,{...c,ns:g}):`key '${p} (${this.language})' returned an object instead of string.`;return d?(j.res=P,j.usedParams=this.getUsedParamsDetails(c),j):P}if(h){const P=Array.isArray(F),se=P?[]:{},fe=P?U:M;for(const D in F)if(Object.prototype.hasOwnProperty.call(F,D)){const J=`${fe}${h}${D}`;ae&&!R?se[D]=this.translate(J,{...c,defaultValue:Cu(Q)?Q[D]:void 0,joinArrays:!1,ns:g}):se[D]=this.translate(J,{...c,joinArrays:!1,ns:g}),se[D]===J&&(se[D]=F[D])}R=se}}else if(K&&Re(G)&&Array.isArray(R))R=R.join(G),R&&(R=this.extendTranslation(R,i,c,s));else{let P=!1,se=!1;!this.isValidLookup(R)&&ae&&(P=!0,R=Q),this.isValidLookup(R)||(se=!0,R=p);const D=(c.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&se?void 0:R,J=ae&&Q!==R&&this.options.updateMissing;if(se||P||J){if(this.logger.log(J?"updateKey":"missingKey",x,m,p,J?Q: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 ce=[];const V=this.languageUtils.getFallbackCodes(this.options.fallbackLng,c.lng||this.language);if(this.options.saveMissingTo==="fallback"&&V&&V[0])for(let E=0;E<V.length;E++)ce.push(V[E]);else this.options.saveMissingTo==="all"?ce=this.languageUtils.toResolveHierarchy(c.lng||this.language):ce.push(c.lng||this.language);const de=(E,H,I)=>{const le=ae&&I!==R?I:D;this.options.missingKeyHandler?this.options.missingKeyHandler(E,m,H,le,J,c):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(E,m,H,le,J,c),this.emit("missingKey",E,m,H,R)};this.options.saveMissing&&(this.options.saveMissingPlurals&&ie?ce.forEach(E=>{const H=this.pluralResolver.getSuffixes(E,c);N&&c[`defaultValue${this.options.pluralSeparator}zero`]&&H.indexOf(`${this.options.pluralSeparator}zero`)<0&&H.push(`${this.options.pluralSeparator}zero`),H.forEach(I=>{de([E],p+I,c[`defaultValue${I}`]||Q)})}):de(ce,p,Q))}R=this.extendTranslation(R,i,c,j,s),se&&R===p&&this.options.appendNamespaceToMissingKey&&(R=`${m}${b}${p}`),(se||P)&&this.options.parseMissingKeyHandler&&(R=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${m}${b}${p}`:p,P?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=Re(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&&!Re(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=Re(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 Re(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&&!Re(r.count),j=_&&!r.ordinal&&r.count===0,R=r.context!==void 0&&(Re(r.context)||typeof r.context=="number")&&r.context!=="",M=r.lngs?r.lngs:this.languageUtils.toResolveHierarchy(r.lng||this.language,r.fallbackLng);x.forEach(U=>{this.isValidLookup(s)||(p=U,!up[`${M[0]}-${U}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(p)&&(up[`${M[0]}-${U}`]=!0,this.logger.warn(`key "${c}" for languages "${M.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!!!")),M.forEach(Z=>{if(this.isValidLookup(s))return;h=Z;const G=[b];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(G,b,Z,U,r);else{let ie;_&&(ie=this.pluralResolver.getSuffix(Z,r.count,r));const ae=`${this.options.pluralSeparator}zero`,oe=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(_&&(r.ordinal&&ie.indexOf(oe)===0&&G.push(b+ie.replace(oe,this.options.pluralSeparator)),G.push(b+ie),j&&G.push(b+ae)),R){const W=`${b}${this.options.contextSeparator||"_"}${r.context}`;G.push(W),_&&(r.ordinal&&ie.indexOf(oe)===0&&G.push(W+ie.replace(oe,this.options.pluralSeparator)),G.push(W+ie),j&&G.push(W+ae))}}let K;for(;K=G.pop();)this.isValidLookup(s)||(d=K,s=this.getResource(Z,U,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&&!Re(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 dp{constructor(i){this.options=i,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Qa.create("languageUtils")}getScriptPartFromCode(i){if(i=yr(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=yr(i),!i||i.indexOf("-")<0)return i;const r=i.split("-");return this.formatLanguageCode(r[0])}formatLanguageCode(i){if(Re(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)),Re(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 Re(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))):Re(i)&&d(this.formatLanguageCode(i)),s.forEach(h=>{c.indexOf(h)<0&&d(this.formatLanguageCode(h))}),c}}const fp={zero:0,one:1,two:2,few:3,many:4,other:5},hp={select:n=>n===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class l0{constructor(i,r={}){this.languageUtils=i,this.options=r,this.logger=Qa.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(i,r={}){const s=yr(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!"),hp;if(!i.match(/-|_/))return hp;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)=>fp[c]-fp[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 mp=(n,i,r,s=".",c=!0)=>{let d=Fv(n,i,r);return!d&&c&&Re(r)&&(d=Qu(n,r,s),d===void 0&&(d=Qu(i,r,s))),d},Ru=n=>n.replace(/\$/g,"$$$$");class pp{constructor(i={}){this.logger=Qa.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:M,nestingOptionsSeparator:U,maxReplaces:Z,alwaysFormat:G}=i.interpolation;this.escape=r!==void 0?r:Wv,this.escapeValue=s!==void 0?s:!0,this.useRawValueToEscape=c!==void 0?c:!1,this.prefix=d?yl(d):h||"{{",this.suffix=p?yl(p):g||"}}",this.formatSeparator=m||",",this.unescapePrefix=b?"":x||"-",this.unescapeSuffix=this.unescapePrefix?"":b||"",this.nestingPrefix=_?yl(_):j||yl("$t("),this.nestingSuffix=R?yl(R):M||yl(")"),this.nestingOptionsSeparator=U||",",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=mp(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),M=R.shift().trim(),U=R.join(this.formatSeparator).trim();return this.format(mp(r,g,M,this.options.keySeparator,this.options.ignoreJSONStructure),U,s,{...c,...r,interpolationkey:M})};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=>Ru(j)},{regex:this.regexp,safeValue:j=>this.escapeValue?Ru(this.escape(j)):Ru(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 U=b(i,d,c);h=Re(U)?U:""}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!Re(h)&&!this.useRawValueToEscape&&(h=ip(h));const M=j.safeValue(h);if(i=i.replace(d[0],M),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(`${yl(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(M){return this.logger.warn(`failed parsing options string in nesting for key ${g}`,M),`${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&&!Re(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&&!Re(d))return d;Re(d)||(d=ip(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 i0=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}},gp=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(yr(s),c),i[h]=p),p(r)}},r0=n=>(i,r,s)=>n(yr(r),s)(i);class s0{constructor(i={}){this.logger=Qa.create("formatter"),this.options=i,this.init(i)}init(i,r={interpolation:{}}){this.formatSeparator=r.interpolation.formatSeparator||",";const s=r.cacheInBuiltFormats?gp:r0;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()]=gp(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}=i0(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 o0=(n,i)=>{n.pending[i]!==void 0&&(delete n.pending[i],n.pendingCount--)};class c0 extends so{constructor(i,r,s,c={}){super(),this.backend=i,this.store=r,this.services=s,this.languageUtils=s.languageUtils,this.options=c,this.logger=Qa.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=>{Zv(g.loaded,[d],h),o0(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();Re(i)&&(i=this.languageUtils.toResolveHierarchy(i)),Re(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 zu=()=>({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]),Re(n[1])&&(i.defaultValue=n[1]),Re(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}),yp=n=>(Re(n.ns)&&(n.ns=[n.ns]),Re(n.fallbackLng)&&(n.fallbackLng=[n.fallbackLng]),Re(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),Xs=()=>{},u0=n=>{Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(r=>{typeof n[r]=="function"&&(n[r]=n[r].bind(n))})},Ag="__i18next_supportNoticeShown",d0=()=>typeof globalThis<"u"&&!!globalThis[Ag],f0=()=>{typeof globalThis<"u"&&(globalThis[Ag]=!0)},h0=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 pr extends so{constructor(i={},r){if(super(),this.options=yp(i),this.services={},this.logger=Qa,this.modules={external:[]},u0(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&&(Re(i.ns)?i.defaultNS=i.ns:i.ns.indexOf("translation")<0&&(i.defaultNS=i.ns[0]));const s=zu();this.options={...s,...this.options,...yp(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&&!h0(this)&&!d0()&&(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 💙"),f0());const c=m=>m?typeof m=="function"?new m:m:null;if(!this.options.isClone){this.modules.logger?Qa.init(c(this.modules.logger),this.options):Qa.init(null,this.options);let m;this.modules.formatter?m=this.modules.formatter:m=s0;const b=new dp(this.options);this.store=new cp(this.options.resources,this.options);const x=this.services;x.logger=Qa,x.resourceStore=this.store,x.languageUtils=b,x.pluralResolver=new l0(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 pp(this.options),x.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},x.backendConnector=new c0(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 lo(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=Xs),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=rr(),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=Xs){let s=r;const c=Re(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=rr();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=Xs),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=rr();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=Re(p)?p:p&&p[0],m=this.store.hasLanguageSomeTranslations(g)?g:this.services.languageUtils.getBestMatchFromCodes(Re(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=Zu(x,{...this.options,...h})),`${g.keyPrefix}${m}${x}`)):(typeof d=="function"&&(d=Zu(d,{...this.options,...h})),b=g.keyPrefix?`${g.keyPrefix}${m}${d}`:d),this.t(b,g)};return Re(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=rr();return this.options.ns?(Re(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=rr();Re(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 dp(zu());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 pr(i,r);return s.createInstance=pr.createInstance,s}cloneInstance(i={},r=Xs){const s=i.forkResourceStore;s&&delete i.forkResourceStore;const c={...this.options,...i,isClone:!0},d=new pr(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 cp(p,c),d.services.resourceStore=d.store}if(i.interpolation){const g={...zu().interpolation,...this.options.interpolation,...i.interpolation},m={...c,interpolation:g};d.services.interpolator=new pp(m)}return d.translator=new lo(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 Xt=pr.createInstance();Xt.createInstance;Xt.dir;Xt.init;Xt.loadResources;Xt.reloadResources;Xt.use;Xt.changeLanguage;Xt.getFixedT;Xt.t;Xt.exists;Xt.setDefaultNamespace;Xt.hasLoadedNamespace;Xt.loadNamespaces;Xt.loadLanguages;var Tu={exports:{}},Te={};var xp;function m0(){if(xp)return Te;xp=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(){}},M=Object.assign,U={};function Z(E,H,I){this.props=E,this.context=H,this.refs=U,this.updater=I||R}Z.prototype.isReactComponent={},Z.prototype.setState=function(E,H){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,H,"setState")},Z.prototype.forceUpdate=function(E){this.updater.enqueueForceUpdate(this,E,"forceUpdate")};function G(){}G.prototype=Z.prototype;function K(E,H,I){this.props=E,this.context=H,this.refs=U,this.updater=I||R}var ie=K.prototype=new G;ie.constructor=K,M(ie,Z.prototype),ie.isPureReactComponent=!0;var ae=Array.isArray;function oe(){}var W={H:null,A:null,T:null,S:null},N=Object.prototype.hasOwnProperty;function Q(E,H,I){var le=I.ref;return{$$typeof:n,type:E,key:H,ref:le!==void 0?le:null,props:I}}function F(E,H){return Q(E.type,H,E.props)}function ue(E){return typeof E=="object"&&E!==null&&E.$$typeof===n}function ne(E){var H={"=":"=0",":":"=2"};return"$"+E.replace(/[=:]/g,function(I){return H[I]})}var P=/\/+/g;function se(E,H){return typeof E=="object"&&E!==null&&E.key!=null?ne(""+E.key):H.toString(36)}function fe(E){switch(E.status){case"fulfilled":return E.value;case"rejected":throw E.reason;default:switch(typeof E.status=="string"?E.then(oe,oe):(E.status="pending",E.then(function(H){E.status==="pending"&&(E.status="fulfilled",E.value=H)},function(H){E.status==="pending"&&(E.status="rejected",E.reason=H)})),E.status){case"fulfilled":return E.value;case"rejected":throw E.reason}}throw E}function D(E,H,I,le,ve){var _e=typeof E;(_e==="undefined"||_e==="boolean")&&(E=null);var ze=!1;if(E===null)ze=!0;else switch(_e){case"bigint":case"string":case"number":ze=!0;break;case"object":switch(E.$$typeof){case n:case i:ze=!0;break;case b:return ze=E._init,D(ze(E._payload),H,I,le,ve)}}if(ze)return ve=ve(E),ze=le===""?"."+se(E,0):le,ae(ve)?(I="",ze!=null&&(I=ze.replace(P,"$&/")+"/"),D(ve,H,I,"",function(wt){return wt})):ve!=null&&(ue(ve)&&(ve=F(ve,I+(ve.key==null||E&&E.key===ve.key?"":(""+ve.key).replace(P,"$&/")+"/")+ze)),H.push(ve)),1;ze=0;var lt=le===""?".":le+":";if(ae(E))for(var he=0;he<E.length;he++)le=E[he],_e=lt+se(le,he),ze+=D(le,H,I,_e,ve);else if(he=j(E),typeof he=="function")for(E=he.call(E),he=0;!(le=E.next()).done;)le=le.value,_e=lt+se(le,he++),ze+=D(le,H,I,_e,ve);else if(_e==="object"){if(typeof E.then=="function")return D(fe(E),H,I,le,ve);throw H=String(E),Error("Objects are not valid as a React child (found: "+(H==="[object Object]"?"object with keys {"+Object.keys(E).join(", ")+"}":H)+"). If you meant to render a collection of children, use an array instead.")}return ze}function J(E,H,I){if(E==null)return E;var le=[],ve=0;return D(E,le,"","",function(_e){return H.call(I,_e,ve++)}),le}function ce(E){if(E._status===-1){var H=E._result;H=H(),H.then(function(I){(E._status===0||E._status===-1)&&(E._status=1,E._result=I)},function(I){(E._status===0||E._status===-1)&&(E._status=2,E._result=I)}),E._status===-1&&(E._status=0,E._result=H)}if(E._status===1)return E._result.default;throw E._result}var V=typeof reportError=="function"?reportError:function(E){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var H=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(H))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",E);return}console.error(E)},de={map:J,forEach:function(E,H,I){J(E,function(){H.apply(this,arguments)},I)},count:function(E){var H=0;return J(E,function(){H++}),H},toArray:function(E){return J(E,function(H){return H})||[]},only:function(E){if(!ue(E))throw Error("React.Children.only expected to receive a single React element child.");return E}};return Te.Activity=x,Te.Children=de,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,H,I){if(E==null)throw Error("The argument must be a React element, but you passed "+E+".");var le=M({},E.props),ve=E.key;if(H!=null)for(_e in H.key!==void 0&&(ve=""+H.key),H)!N.call(H,_e)||_e==="key"||_e==="__self"||_e==="__source"||_e==="ref"&&H.ref===void 0||(le[_e]=H[_e]);var _e=arguments.length-2;if(_e===1)le.children=I;else if(1<_e){for(var ze=Array(_e),lt=0;lt<_e;lt++)ze[lt]=arguments[lt+2];le.children=ze}return Q(E.type,ve,le)},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,H,I){var le,ve={},_e=null;if(H!=null)for(le in H.key!==void 0&&(_e=""+H.key),H)N.call(H,le)&&le!=="key"&&le!=="__self"&&le!=="__source"&&(ve[le]=H[le]);var ze=arguments.length-2;if(ze===1)ve.children=I;else if(1<ze){for(var lt=Array(ze),he=0;he<ze;he++)lt[he]=arguments[he+2];ve.children=lt}if(E&&E.defaultProps)for(le in ze=E.defaultProps,ze)ve[le]===void 0&&(ve[le]=ze[le]);return Q(E,_e,ve)},Te.createRef=function(){return{current:null}},Te.forwardRef=function(E){return{$$typeof:p,render:E}},Te.isValidElement=ue,Te.lazy=function(E){return{$$typeof:b,_payload:{_status:-1,_result:E},_init:ce}},Te.memo=function(E,H){return{$$typeof:m,type:E,compare:H===void 0?null:H}},Te.startTransition=function(E){var H=W.T,I={};W.T=I;try{var le=E(),ve=W.S;ve!==null&&ve(I,le),typeof le=="object"&&le!==null&&typeof le.then=="function"&&le.then(oe,V)}catch(_e){V(_e)}finally{H!==null&&I.types!==null&&(H.types=I.types),W.T=H}},Te.unstable_useCacheRefresh=function(){return W.H.useCacheRefresh()},Te.use=function(E){return W.H.use(E)},Te.useActionState=function(E,H,I){return W.H.useActionState(E,H,I)},Te.useCallback=function(E,H){return W.H.useCallback(E,H)},Te.useContext=function(E){return W.H.useContext(E)},Te.useDebugValue=function(){},Te.useDeferredValue=function(E,H){return W.H.useDeferredValue(E,H)},Te.useEffect=function(E,H){return W.H.useEffect(E,H)},Te.useEffectEvent=function(E){return W.H.useEffectEvent(E)},Te.useId=function(){return W.H.useId()},Te.useImperativeHandle=function(E,H,I){return W.H.useImperativeHandle(E,H,I)},Te.useInsertionEffect=function(E,H){return W.H.useInsertionEffect(E,H)},Te.useLayoutEffect=function(E,H){return W.H.useLayoutEffect(E,H)},Te.useMemo=function(E,H){return W.H.useMemo(E,H)},Te.useOptimistic=function(E,H){return W.H.useOptimistic(E,H)},Te.useReducer=function(E,H,I){return W.H.useReducer(E,H,I)},Te.useRef=function(E){return W.H.useRef(E)},Te.useState=function(E){return W.H.useState(E)},Te.useSyncExternalStore=function(E,H,I){return W.H.useSyncExternalStore(E,H,I)},Te.useTransition=function(){return W.H.useTransition()},Te.version="19.2.4",Te}var vp;function oo(){return vp||(vp=1,Tu.exports=m0()),Tu.exports}var v=oo();const ui=Gv(v),p0=Vv({__proto__:null,default:ui},[v]),g0=(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);vl(c[0])&&(c[0]=`react-i18next:: ${c[0]}`),n?.services?.logger?.warn?n.services.logger.warn(...c):console?.warn&&console.warn(...c)},bp={},Lg=(n,i,r,s)=>{vl(r)&&bp[r]||(vl(r)&&(bp[r]=new Date),g0(n,i,r,s))},kg=(n,i)=>()=>{if(n.isInitialized)i();else{const r=()=>{setTimeout(()=>{n.off("initialized",r)},0),i()};n.on("initialized",r)}},Fu=(n,i,r)=>{n.loadNamespaces(i,kg(n,r))},Sp=(n,i,r,s)=>{if(vl(r)&&(r=[r]),n.options.preload&&n.options.preload.indexOf(i)>-1)return Fu(n,r,s);r.forEach(c=>{n.options.ns.indexOf(c)<0&&n.options.ns.push(c)}),n.loadLanguages(i,kg(n,s))},y0=(n,i,r={})=>!i.languages||!i.languages.length?(Lg(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}}),vl=n=>typeof n=="string",x0=n=>typeof n=="object"&&n!==null,v0=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,b0={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},S0=n=>b0[n],_0=n=>n.replace(v0,S0);let Ju={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:_0,transDefaultProps:void 0};const j0=(n={})=>{Ju={...Ju,...n}},N0=()=>Ju;let Ug;const E0=n=>{Ug=n},w0=()=>Ug,C0={type:"3rdParty",init(n){j0(n.options.react),E0(n)}},R0=v.createContext();class z0{constructor(){this.usedNamespaces={}}addUsedNamespaces(i){i.forEach(r=>{this.usedNamespaces[r]||(this.usedNamespaces[r]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}var Ou={exports:{}},Mu={};var _p;function T0(){if(_p)return Mu;_p=1;var n=oo();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:_}}),M=R[0].inst,U=R[1];return d(function(){M.value=j,M.getSnapshot=_,g(M)&&U({inst:M})},[x,j,_]),c(function(){return g(M)&&U({inst:M}),x(function(){g(M)&&U({inst:M})})},[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 Mu.useSyncExternalStore=n.useSyncExternalStore!==void 0?n.useSyncExternalStore:b,Mu}var jp;function O0(){return jp||(jp=1,Ou.exports=T0()),Ou.exports}var M0=O0();const D0=(n,i)=>vl(i)?i:x0(i)&&vl(i.defaultValue)?i.defaultValue:Array.isArray(n)?n[n.length-1]:n,A0={t:D0,ready:!1},L0=()=>()=>{},Ce=(n,i={})=>{const{i18n:r}=i,{i18n:s,defaultNS:c}=v.useContext(R0)||{},d=r||s||w0();d&&!d.reportNamespaces&&(d.reportNamespaces=new z0),d||Lg(d,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const h=v.useMemo(()=>({...N0(),...d?.options?.react,...i}),[d,i]),{useSuspense:p,keyPrefix:g}=h,m=c||d?.options?.defaultNS,b=vl(m)?[m]:m||["translation"],x=v.useMemo(()=>b,b);d?.reportNamespaces?.addUsedNamespaces?.(x);const _=v.useRef(0),j=v.useCallback(Q=>{if(!d)return L0;const{bindI18n:F,bindI18nStore:ue}=h,ne=()=>{_.current+=1,Q()};return F&&d.on(F,ne),ue&&d.store.on(ue,ne),()=>{F&&F.split(" ").forEach(P=>d.off(P,ne)),ue&&ue.split(" ").forEach(P=>d.store.off(P,ne))}},[d,h]),R=v.useRef(),M=v.useCallback(()=>{if(!d)return A0;const Q=!!(d.isInitialized||d.initializedStoreOnce)&&x.every(fe=>y0(fe,d,h)),F=i.lng||d.language,ue=_.current,ne=R.current;if(ne&&ne.ready===Q&&ne.lng===F&&ne.keyPrefix===g&&ne.revision===ue)return ne;const se={t:d.getFixedT(F,h.nsMode==="fallback"?x:x[0],g),ready:Q,lng:F,keyPrefix:g,revision:ue};return R.current=se,se},[d,x,g,h,i.lng]),[U,Z]=v.useState(0),{t:G,ready:K}=M0.useSyncExternalStore(j,M,M);v.useEffect(()=>{if(d&&!K&&!p){const Q=()=>Z(F=>F+1);i.lng?Sp(d,i.lng,x,Q):Fu(d,x,Q)}},[d,i.lng,x,K,p,U]);const ie=d||{},ae=v.useRef(null),oe=v.useRef(),W=Q=>{const F=Object.getOwnPropertyDescriptors(Q);F.__original&&delete F.__original;const ue=Object.create(Object.getPrototypeOf(Q),F);if(!Object.prototype.hasOwnProperty.call(ue,"__original"))try{Object.defineProperty(ue,"__original",{value:Q,writable:!1,enumerable:!1,configurable:!1})}catch{}return ue},N=v.useMemo(()=>{const Q=ie,F=Q?.language;let ue=Q;Q&&(ae.current&&ae.current.__original===Q?oe.current!==F?(ue=W(Q),ae.current=ue,oe.current=F):ue=ae.current:(ue=W(Q),ae.current=ue,oe.current=F));const ne=[G,ue,K];return ne.t=G,ne.i18n=ue,ne.ready=K,ne},[G,ie,K,ie.resolvedLanguage,ie.language,ie.languages]);if(d&&p&&!K)throw new Promise(Q=>{const F=()=>Q();i.lng?Sp(d,i.lng,x,F):Fu(d,x,F)});return N},{slice:k0,forEach:U0}=[];function H0(n){return U0.call(k0.call(arguments,1),i=>{if(i)for(const r in i)n[r]===void 0&&(n[r]=i[r])}),n}function B0(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 Np=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,q0=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(!Np.test(s.domain))throw new TypeError("option domain is invalid");d+=`; Domain=${s.domain}`}if(s.path){if(!Np.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},Ep={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=q0(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 Y0={name:"cookie",lookup(n){let{lookupCookie:i}=n;if(i&&typeof document<"u")return Ep.read(i)||void 0},cacheUserLanguage(n,i){let{lookupCookie:r,cookieMinutes:s,cookieDomain:c,cookieOptions:d}=i;r&&typeof document<"u"&&Ep.create(r,n,s,c,d)}},V0={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}},G0={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 si=null;const wp=()=>{if(si!==null)return si;try{if(si=typeof window<"u"&&window.localStorage!==null,!si)return!1;const n="i18next.translate.boo";window.localStorage.setItem(n,"foo"),window.localStorage.removeItem(n)}catch{si=!1}return si};var $0={name:"localStorage",lookup(n){let{lookupLocalStorage:i}=n;if(i&&wp())return window.localStorage.getItem(i)||void 0},cacheUserLanguage(n,i){let{lookupLocalStorage:r}=i;r&&wp()&&window.localStorage.setItem(r,n)}};let oi=null;const Cp=()=>{if(oi!==null)return oi;try{if(oi=typeof window<"u"&&window.sessionStorage!==null,!oi)return!1;const n="i18next.translate.boo";window.sessionStorage.setItem(n,"foo"),window.sessionStorage.removeItem(n)}catch{oi=!1}return oi};var K0={name:"sessionStorage",lookup(n){let{lookupSessionStorage:i}=n;if(i&&Cp())return window.sessionStorage.getItem(i)||void 0},cacheUserLanguage(n,i){let{lookupSessionStorage:r}=i;r&&Cp()&&window.sessionStorage.setItem(r,n)}},X0={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}},Q0={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}},Z0={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}},F0={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 Hg=!1;try{document.cookie,Hg=!0}catch{}const Bg=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];Hg||Bg.splice(1,1);const J0=()=>({order:Bg,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:n=>n});class qg{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=H0(r,this.options||{},J0()),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(Y0),this.addDetector(V0),this.addDetector($0),this.addDetector(K0),this.addDetector(X0),this.addDetector(Q0),this.addDetector(Z0),this.addDetector(F0),this.addDetector(G0)}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&&!B0(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)}))}}qg.type="languageDetector";const W0={"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 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.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."},P0={"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.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 版本中推出,敬请期待。"};Xt.use(qg).use(C0).init({resources:{en:{translation:W0},zh:{translation:P0}},fallbackLng:"en",interpolation:{escapeValue:!1},detection:{order:["localStorage"],caches:["localStorage"],lookupLocalStorage:"lang"}});var Du={exports:{}},sr={},Au={exports:{}},Lu={};var Rp;function I0(){return Rp||(Rp=1,(function(n){function i(D,J){var ce=D.length;D.push(J);e:for(;0<ce;){var V=ce-1>>>1,de=D[V];if(0<c(de,J))D[V]=J,D[ce]=de,ce=V;else break e}}function r(D){return D.length===0?null:D[0]}function s(D){if(D.length===0)return null;var J=D[0],ce=D.pop();if(ce!==J){D[0]=ce;e:for(var V=0,de=D.length,E=de>>>1;V<E;){var H=2*(V+1)-1,I=D[H],le=H+1,ve=D[le];if(0>c(I,ce))le<de&&0>c(ve,I)?(D[V]=ve,D[le]=ce,V=le):(D[V]=I,D[H]=ce,V=H);else if(le<de&&0>c(ve,ce))D[V]=ve,D[le]=ce,V=le;else break e}}return J}function c(D,J){var ce=D.sortIndex-J.sortIndex;return ce!==0?ce:D.id-J.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,M=!1,U=!1,Z=typeof setTimeout=="function"?setTimeout:null,G=typeof clearTimeout=="function"?clearTimeout:null,K=typeof setImmediate<"u"?setImmediate:null;function ie(D){for(var J=r(m);J!==null;){if(J.callback===null)s(m);else if(J.startTime<=D)s(m),J.sortIndex=J.expirationTime,i(g,J);else break;J=r(m)}}function ae(D){if(M=!1,ie(D),!R)if(r(g)!==null)R=!0,oe||(oe=!0,ne());else{var J=r(m);J!==null&&fe(ae,J.startTime-D)}}var oe=!1,W=-1,N=5,Q=-1;function F(){return U?!0:!(n.unstable_now()-Q<N)}function ue(){if(U=!1,oe){var D=n.unstable_now();Q=D;var J=!0;try{e:{R=!1,M&&(M=!1,G(W),W=-1),j=!0;var ce=_;try{t:{for(ie(D),x=r(g);x!==null&&!(x.expirationTime>D&&F());){var V=x.callback;if(typeof V=="function"){x.callback=null,_=x.priorityLevel;var de=V(x.expirationTime<=D);if(D=n.unstable_now(),typeof de=="function"){x.callback=de,ie(D),J=!0;break t}x===r(g)&&s(g),ie(D)}else s(g);x=r(g)}if(x!==null)J=!0;else{var E=r(m);E!==null&&fe(ae,E.startTime-D),J=!1}}break e}finally{x=null,_=ce,j=!1}J=void 0}}finally{J?ne():oe=!1}}}var ne;if(typeof K=="function")ne=function(){K(ue)};else if(typeof MessageChannel<"u"){var P=new MessageChannel,se=P.port2;P.port1.onmessage=ue,ne=function(){se.postMessage(null)}}else ne=function(){Z(ue,0)};function fe(D,J){W=Z(function(){D(n.unstable_now())},J)}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(D){D.callback=null},n.unstable_forceFrameRate=function(D){0>D||125<D?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):N=0<D?Math.floor(1e3/D):5},n.unstable_getCurrentPriorityLevel=function(){return _},n.unstable_next=function(D){switch(_){case 1:case 2:case 3:var J=3;break;default:J=_}var ce=_;_=J;try{return D()}finally{_=ce}},n.unstable_requestPaint=function(){U=!0},n.unstable_runWithPriority=function(D,J){switch(D){case 1:case 2:case 3:case 4:case 5:break;default:D=3}var ce=_;_=D;try{return J()}finally{_=ce}},n.unstable_scheduleCallback=function(D,J,ce){var V=n.unstable_now();switch(typeof ce=="object"&&ce!==null?(ce=ce.delay,ce=typeof ce=="number"&&0<ce?V+ce:V):ce=V,D){case 1:var de=-1;break;case 2:de=250;break;case 5:de=1073741823;break;case 4:de=1e4;break;default:de=5e3}return de=ce+de,D={id:b++,callback:J,priorityLevel:D,startTime:ce,expirationTime:de,sortIndex:-1},ce>V?(D.sortIndex=ce,i(m,D),r(g)===null&&D===r(m)&&(M?(G(W),W=-1):M=!0,fe(ae,ce-V))):(D.sortIndex=de,i(g,D),R||j||(R=!0,oe||(oe=!0,ne()))),D},n.unstable_shouldYield=F,n.unstable_wrapCallback=function(D){var J=_;return function(){var ce=_;_=J;try{return D.apply(this,arguments)}finally{_=ce}}}})(Lu)),Lu}var zp;function eb(){return zp||(zp=1,Au.exports=I0()),Au.exports}var ku={exports:{}},qt={};var Tp;function tb(){if(Tp)return qt;Tp=1;var n=oo();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 qt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=s,qt.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)},qt.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()}},qt.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))},qt.prefetchDNS=function(g){typeof g=="string"&&s.d.D(g)},qt.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})}},qt.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)},qt.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})}},qt.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)},qt.requestFormReset=function(g){s.d.r(g)},qt.unstable_batchedUpdates=function(g,m){return g(m)},qt.useFormState=function(g,m,b){return h.H.useFormState(g,m,b)},qt.useFormStatus=function(){return h.H.useHostTransitionStatus()},qt.version="19.2.4",qt}var Op;function ab(){if(Op)return ku.exports;Op=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(),ku.exports=tb(),ku.exports}var Mp;function nb(){if(Mp)return sr;Mp=1;var n=eb(),i=oo(),r=ab();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"),M=Symbol.for("react.fragment"),U=Symbol.for("react.strict_mode"),Z=Symbol.for("react.profiler"),G=Symbol.for("react.consumer"),K=Symbol.for("react.context"),ie=Symbol.for("react.forward_ref"),ae=Symbol.for("react.suspense"),oe=Symbol.for("react.suspense_list"),W=Symbol.for("react.memo"),N=Symbol.for("react.lazy"),Q=Symbol.for("react.activity"),F=Symbol.for("react.memo_cache_sentinel"),ue=Symbol.iterator;function ne(e){return e===null||typeof e!="object"?null:(e=ue&&e[ue]||e["@@iterator"],typeof e=="function"?e:null)}var P=Symbol.for("react.client.reference");function se(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===P?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case M:return"Fragment";case Z:return"Profiler";case U:return"StrictMode";case ae:return"Suspense";case oe:return"SuspenseList";case Q: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 ie: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 fe=Array.isArray,D=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,J=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ce={pending:!1,data:null,method:null,action:null},V=[],de=-1;function E(e){return{current:e}}function H(e){0>de||(e.current=V[de],V[de]=null,de--)}function I(e,t){de++,V[de]=e.current,e.current=t}var le=E(null),ve=E(null),_e=E(null),ze=E(null);function lt(e,t){switch(I(_e,t),I(ve,e),I(le,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?wm(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=wm(t),e=Cm(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}H(le),I(le,e)}function he(){H(le),H(ve),H(_e)}function wt(e){e.memoizedState!==null&&I(ze,e);var t=le.current,a=Cm(t,e.type);t!==a&&(I(ve,e),I(le,a))}function Qt(e){ve.current===e&&(H(le),H(ve)),ze.current===e&&(H(ze),tr._currentValue=ce)}var ta,at;function bt(e){if(ta===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);ta=t&&t[1]||"",at=-1<a.stack.indexOf(`
2
+ at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
3
+ `+ta+e+at}var fa=!1;function Ha(e,t){if(!e||fa)return"";fa=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var X=function(){throw Error()};if(Object.defineProperty(X.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(X,[])}catch(q){var k=q}Reflect.construct(e,[],X)}else{try{X.call()}catch(q){k=q}e.call(X.prototype)}}else{try{throw Error()}catch(q){k=q}(X=e())&&typeof X.catch=="function"&&X.catch(function(){})}}catch(q){if(q&&k&&typeof q.stack=="string")return[q.stack,k.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 Y=`
6
+ `+w[l].replace(" at new "," at ");return e.displayName&&Y.includes("<anonymous>")&&(Y=Y.replace("<anonymous>",e.displayName)),Y}while(1<=l&&0<=o);break}}}finally{fa=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?bt(a):""}function aa(e,t){switch(e.tag){case 26:case 27:case 5:return bt(e.type);case 16:return bt("Lazy");case 13:return e.child!==t&&t!==null?bt("Suspense Fallback"):bt("Suspense");case 19:return bt("SuspenseList");case 0:case 15:return Ha(e.type,!1);case 11:return Ha(e.type.render,!1);case 1:return Ha(e.type,!0);case 31:return bt("Activity");default:return""}}function Gt(e){try{var t="",a=null;do t+=aa(e,a),a=e,e=e.return;while(e);return t}catch(l){return`
7
+ Error generating stack: `+l.message+`
8
+ `+l.stack}}var ha=Object.prototype.hasOwnProperty,ma=n.unstable_scheduleCallback,Ja=n.unstable_cancelCallback,Fn=n.unstable_shouldYield,Jn=n.unstable_requestPaint,Dt=n.unstable_now,Ta=n.unstable_getCurrentPriorityLevel,Ba=n.unstable_ImmediatePriority,pe=n.unstable_UserBlockingPriority,De=n.unstable_NormalPriority,Je=n.unstable_LowPriority,dt=n.unstable_IdlePriority,ut=n.log,jl=n.unstable_setDisableYieldValue,pa=null,Ct=null;function gt(e){if(typeof ut=="function"&&jl(e),Ct&&typeof Ct.setStrictMode=="function")try{Ct.setStrictMode(pa,e)}catch{}}var Tt=Math.clz32?Math.clz32:xo,Tr=Math.log,Or=Math.LN2;function xo(e){return e>>>=0,e===0?32:31-(Tr(e)/Or|0)|0}var Wn=256,Wa=262144,Pn=4194304;function Oa(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 Nl(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=Oa(l):(y&=S,y!==0?o=Oa(y):a||(a=S&~e,a!==0&&(o=Oa(a))))):(S=l&~u,S!==0?o=Oa(S):y!==0?o=Oa(y):a||(a=l&~e,a!==0&&(o=Oa(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 vn(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function vo(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 yi(){var e=Pn;return Pn<<=1,(Pn&62914560)===0&&(Pn=4194304),e}function bn(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function qa(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Mr(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 Y=31-Tt(a),X=1<<Y;S[Y]=0,w[Y]=-1;var k=L[Y];if(k!==null)for(L[Y]=null,Y=0;Y<k.length;Y++){var q=k[Y];q!==null&&(q.lane&=-536870913)}a&=~X}l!==0&&Dr(e,l,0),u!==0&&o===0&&e.tag!==0&&(e.suspendedLanes|=u&~(y&~t))}function Dr(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-Tt(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|a&261930}function Ar(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var l=31-Tt(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 B(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function ee(){var e=J.p;return e!==0?e:(e=window.event,e===void 0?32:Jm(e.type))}function te(e,t){var a=J.p;try{return J.p=e,t()}finally{J.p=a}}var ye=Math.random().toString(36).slice(2),re="__reactFiber$"+ye,me="__reactProps$"+ye,ge="__reactContainer$"+ye,je="__reactEvents$"+ye,Ee="__reactListeners$"+ye,Se="__reactHandles$"+ye,$e="__reactResources$"+ye,ke="__reactMarker$"+ye;function et(e){delete e[re],delete e[me],delete e[je],delete e[Ee],delete e[Se]}function it(e){var t=e[re];if(t)return t;for(var a=e.parentNode;a;){if(t=a[ge]||a[re]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=Am(e);e!==null;){if(a=e[re])return a;e=Am(e)}return t}e=a,a=e.parentNode}return null}function ft(e){if(e=e[re]||e[ge]){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 Rt(e){var t=e[$e];return t||(t=e[$e]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function nt(e){e[ke]=!0}var Sn=new Set,Ma={};function Ot(e,t){Ya(e,t),Ya(e+"Capture",t)}function Ya(e,t){for(Ma[e]=t,e=0;e<t.length;e++)Sn.add(t[e])}var In=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]*$"),Va={},el={};function El(e){return ha.call(el,e)?!0:ha.call(Va,e)?!1:In.test(e)?el[e]=!0:(Va[e]=!0,!1)}function Ue(e,t,a){if(El(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 yt(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 Bt(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 St(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function rt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function wl(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 Cl(e){if(!e._valueTracker){var t=rt(e)?"checked":"value";e._valueTracker=wl(e,t,""+e[t])}}function Lr(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),l="";return e&&(l=rt(e)?e.checked?"true":"false":e.value),e=l,e!==a?(t.setValue(e),!0):!1}function kr(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 ky=/[\n"\\]/g;function ga(e){return e.replace(ky,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function bo(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=""+St(t)):e.value!==""+St(t)&&(e.value=""+St(t)):y!=="submit"&&y!=="reset"||e.removeAttribute("value"),t!=null?So(e,y,St(t)):a!=null?So(e,y,St(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=""+St(S):e.removeAttribute("name")}function vd(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)){Cl(e);return}a=a!=null?""+St(a):"",t=t!=null?""+St(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),Cl(e)}function So(e,t,a){t==="number"&&kr(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function Rl(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=""+St(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 bd(e,t,a){if(t!=null&&(t=""+St(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+St(a):""}function Sd(e,t,a,l){if(t==null){if(l!=null){if(a!=null)throw Error(s(92));if(fe(l)){if(1<l.length)throw Error(s(93));l=l[0]}a=l}a==null&&(a=""),t=a}a=St(t),e.defaultValue=a,l=e.textContent,l===a&&l!==""&&l!==null&&(e.value=l),Cl(e)}function zl(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var Uy=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 _d(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||Uy.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function jd(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&&_d(e,o,l)}else for(var u in t)t.hasOwnProperty(u)&&_d(e,u,t[u])}function _o(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 Hy=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"]]),By=/^[\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 Ur(e){return By.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Pa(){}var jo=null;function No(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Tl=null,Ol=null;function Nd(e){var t=ft(e);if(t&&(e=t.stateNode)){var a=e[me]||null;e:switch(e=t.stateNode,t.type){case"input":if(bo(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="'+ga(""+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));bo(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&&Lr(l)}break e;case"textarea":bd(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&Rl(e,!!a.multiple,t,!1)}}}var Eo=!1;function Ed(e,t,a){if(Eo)return e(t,a);Eo=!0;try{var l=e(t);return l}finally{if(Eo=!1,(Tl!==null||Ol!==null)&&(Ns(),Tl&&(t=Tl,e=Ol,Ol=Tl=null,Nd(t),e)))for(t=0;t<e.length;t++)Nd(e[t])}}function xi(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 Ia=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),wo=!1;if(Ia)try{var vi={};Object.defineProperty(vi,"passive",{get:function(){wo=!0}}),window.addEventListener("test",vi,vi),window.removeEventListener("test",vi,vi)}catch{wo=!1}var _n=null,Co=null,Hr=null;function wd(){if(Hr)return Hr;var e,t=Co,a=t.length,l,o="value"in _n?_n.value:_n.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 Hr=o.slice(e,1<l?1-l:void 0)}function Br(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 qr(){return!0}function Cd(){return!1}function Zt(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)?qr:Cd,this.isPropagationStopped=Cd,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=qr)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=qr)},persist:function(){},isPersistent:qr}),t}var tl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Yr=Zt(tl),bi=x({},tl,{view:0,detail:0}),qy=Zt(bi),Ro,zo,Si,Vr=x({},bi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Oo,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!==Si&&(Si&&e.type==="mousemove"?(Ro=e.screenX-Si.screenX,zo=e.screenY-Si.screenY):zo=Ro=0,Si=e),Ro)},movementY:function(e){return"movementY"in e?e.movementY:zo}}),Rd=Zt(Vr),Yy=x({},Vr,{dataTransfer:0}),Vy=Zt(Yy),Gy=x({},bi,{relatedTarget:0}),To=Zt(Gy),$y=x({},tl,{animationName:0,elapsedTime:0,pseudoElement:0}),Ky=Zt($y),Xy=x({},tl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Qy=Zt(Xy),Zy=x({},tl,{data:0}),zd=Zt(Zy),Fy={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Jy={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"},Wy={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Py(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Wy[e])?!!t[e]:!1}function Oo(){return Py}var Iy=x({},bi,{key:function(e){if(e.key){var t=Fy[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Br(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Jy[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Oo,charCode:function(e){return e.type==="keypress"?Br(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Br(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),ex=Zt(Iy),tx=x({},Vr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Td=Zt(tx),ax=x({},bi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Oo}),nx=Zt(ax),lx=x({},tl,{propertyName:0,elapsedTime:0,pseudoElement:0}),ix=Zt(lx),rx=x({},Vr,{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}),sx=Zt(rx),ox=x({},tl,{newState:0,oldState:0}),cx=Zt(ox),ux=[9,13,27,32],Mo=Ia&&"CompositionEvent"in window,_i=null;Ia&&"documentMode"in document&&(_i=document.documentMode);var dx=Ia&&"TextEvent"in window&&!_i,Od=Ia&&(!Mo||_i&&8<_i&&11>=_i),Md=" ",Dd=!1;function Ad(e,t){switch(e){case"keyup":return ux.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ld(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ml=!1;function fx(e,t){switch(e){case"compositionend":return Ld(t);case"keypress":return t.which!==32?null:(Dd=!0,Md);case"textInput":return e=t.data,e===Md&&Dd?null:e;default:return null}}function hx(e,t){if(Ml)return e==="compositionend"||!Mo&&Ad(e,t)?(e=wd(),Hr=Co=_n=null,Ml=!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 Od&&t.locale!=="ko"?null:t.data;default:return null}}var mx={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 kd(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!mx[e.type]:t==="textarea"}function Ud(e,t,a,l){Tl?Ol?Ol.push(l):Ol=[l]:Tl=l,t=Os(t,"onChange"),0<t.length&&(a=new Yr("onChange","change",null,a,l),e.push({event:a,listeners:t}))}var ji=null,Ni=null;function px(e){bm(e,0)}function Gr(e){var t=Ge(e);if(Lr(t))return e}function Hd(e,t){if(e==="change")return t}var Bd=!1;if(Ia){var Do;if(Ia){var Ao="oninput"in document;if(!Ao){var qd=document.createElement("div");qd.setAttribute("oninput","return;"),Ao=typeof qd.oninput=="function"}Do=Ao}else Do=!1;Bd=Do&&(!document.documentMode||9<document.documentMode)}function Yd(){ji&&(ji.detachEvent("onpropertychange",Vd),Ni=ji=null)}function Vd(e){if(e.propertyName==="value"&&Gr(Ni)){var t=[];Ud(t,Ni,e,No(e)),Ed(px,t)}}function gx(e,t,a){e==="focusin"?(Yd(),ji=t,Ni=a,ji.attachEvent("onpropertychange",Vd)):e==="focusout"&&Yd()}function yx(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Gr(Ni)}function xx(e,t){if(e==="click")return Gr(t)}function vx(e,t){if(e==="input"||e==="change")return Gr(t)}function bx(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var na=typeof Object.is=="function"?Object.is:bx;function Ei(e,t){if(na(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(!ha.call(t,o)||!na(e[o],t[o]))return!1}return!0}function Gd(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function $d(e,t){var a=Gd(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=Gd(a)}}function Kd(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Kd(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Xd(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=kr(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=kr(e.document)}return t}function Lo(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 Sx=Ia&&"documentMode"in document&&11>=document.documentMode,Dl=null,ko=null,wi=null,Uo=!1;function Qd(e,t,a){var l=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Uo||Dl==null||Dl!==kr(l)||(l=Dl,"selectionStart"in l&&Lo(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}),wi&&Ei(wi,l)||(wi=l,l=Os(ko,"onSelect"),0<l.length&&(t=new Yr("onSelect","select",null,t,a),e.push({event:t,listeners:l}),t.target=Dl)))}function al(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var Al={animationend:al("Animation","AnimationEnd"),animationiteration:al("Animation","AnimationIteration"),animationstart:al("Animation","AnimationStart"),transitionrun:al("Transition","TransitionRun"),transitionstart:al("Transition","TransitionStart"),transitioncancel:al("Transition","TransitionCancel"),transitionend:al("Transition","TransitionEnd")},Ho={},Zd={};Ia&&(Zd=document.createElement("div").style,"AnimationEvent"in window||(delete Al.animationend.animation,delete Al.animationiteration.animation,delete Al.animationstart.animation),"TransitionEvent"in window||delete Al.transitionend.transition);function nl(e){if(Ho[e])return Ho[e];if(!Al[e])return e;var t=Al[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in Zd)return Ho[e]=t[a];return e}var Fd=nl("animationend"),Jd=nl("animationiteration"),Wd=nl("animationstart"),_x=nl("transitionrun"),jx=nl("transitionstart"),Nx=nl("transitioncancel"),Pd=nl("transitionend"),Id=new Map,Bo="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(" ");Bo.push("scrollEnd");function Da(e,t){Id.set(e,t),Ot(t,[e])}var $r=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)},ya=[],Ll=0,qo=0;function Kr(){for(var e=Ll,t=qo=Ll=0;t<e;){var a=ya[t];ya[t++]=null;var l=ya[t];ya[t++]=null;var o=ya[t];ya[t++]=null;var u=ya[t];if(ya[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&&ef(a,o,u)}}function Xr(e,t,a,l){ya[Ll++]=e,ya[Ll++]=t,ya[Ll++]=a,ya[Ll++]=l,qo|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function Yo(e,t,a,l){return Xr(e,t,a,l),Qr(e)}function ll(e,t){return Xr(e,null,null,t),Qr(e)}function ef(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-Tt(a),e=u.hiddenUpdates,l=e[o],l===null?e[o]=[t]:l.push(t),t.lane=a|536870912),u):null}function Qr(e){if(50<Zi)throw Zi=0,Jc=null,Error(s(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var kl={};function Ex(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 la(e,t,a,l){return new Ex(e,t,a,l)}function Vo(e){return e=e.prototype,!(!e||!e.isReactComponent)}function en(e,t){var a=e.alternate;return a===null?(a=la(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 tf(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 Zr(e,t,a,l,o,u){var y=0;if(l=e,typeof e=="function")Vo(e)&&(y=1);else if(typeof e=="string")y=Tv(e,a,le.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case Q:return e=la(31,a,t,o),e.elementType=Q,e.lanes=u,e;case M:return il(a.children,o,u,t);case U:y=8,o|=24;break;case Z:return e=la(12,a,t,o|2),e.elementType=Z,e.lanes=u,e;case ae:return e=la(13,a,t,o),e.elementType=ae,e.lanes=u,e;case oe:return e=la(19,a,t,o),e.elementType=oe,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 ie: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=la(y,a,t,o),t.elementType=e,t.type=l,t.lanes=u,t}function il(e,t,a,l){return e=la(7,e,l,t),e.lanes=a,e}function Go(e,t,a){return e=la(6,e,null,t),e.lanes=a,e}function af(e){var t=la(18,null,null,0);return t.stateNode=e,t}function $o(e,t,a){return t=la(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var nf=new WeakMap;function xa(e,t){if(typeof e=="object"&&e!==null){var a=nf.get(e);return a!==void 0?a:(t={value:e,source:t,stack:Gt(t)},nf.set(e,t),t)}return{value:e,source:t,stack:Gt(t)}}var Ul=[],Hl=0,Fr=null,Ci=0,va=[],ba=0,jn=null,Ga=1,$a="";function tn(e,t){Ul[Hl++]=Ci,Ul[Hl++]=Fr,Fr=e,Ci=t}function lf(e,t,a){va[ba++]=Ga,va[ba++]=$a,va[ba++]=jn,jn=e;var l=Ga;e=$a;var o=32-Tt(l)-1;l&=~(1<<o),a+=1;var u=32-Tt(t)+o;if(30<u){var y=o-o%5;u=(l&(1<<y)-1).toString(32),l>>=y,o-=y,Ga=1<<32-Tt(t)+o|a<<o|l,$a=u+e}else Ga=1<<u|a<<o|l,$a=e}function Ko(e){e.return!==null&&(tn(e,1),lf(e,1,0))}function Xo(e){for(;e===Fr;)Fr=Ul[--Hl],Ul[Hl]=null,Ci=Ul[--Hl],Ul[Hl]=null;for(;e===jn;)jn=va[--ba],va[ba]=null,$a=va[--ba],va[ba]=null,Ga=va[--ba],va[ba]=null}function rf(e,t){va[ba++]=Ga,va[ba++]=$a,va[ba++]=jn,Ga=t.id,$a=t.overflow,jn=e}var At=null,st=null,Ve=!1,Nn=null,Sa=!1,Qo=Error(s(519));function En(e){var t=Error(s(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ri(xa(t,e)),Qo}function sf(e){var t=e.stateNode,a=e.type,l=e.memoizedProps;switch(t[re]=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<Ji.length;a++)Be(Ji[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),vd(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),Sd(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||Nm(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=Pa),t=!0):t=!1,t||En(e,!0)}function of(e){for(At=e.return;At;)switch(At.tag){case 5:case 31:case 13:Sa=!1;return;case 27:case 3:Sa=!0;return;default:At=At.return}}function Bl(e){if(e!==At)return!1;if(!Ve)return of(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")||du(e.type,e.memoizedProps)),a=!a),a&&st&&En(e),of(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(317));st=Dm(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(317));st=Dm(e)}else t===27?(t=st,Bn(e.type)?(e=gu,gu=null,st=e):st=t):st=At?ja(e.stateNode.nextSibling):null;return!0}function rl(){st=At=null,Ve=!1}function Zo(){var e=Nn;return e!==null&&(Pt===null?Pt=e:Pt.push.apply(Pt,e),Nn=null),e}function Ri(e){Nn===null?Nn=[e]:Nn.push(e)}var Fo=E(null),sl=null,an=null;function wn(e,t,a){I(Fo,t._currentValue),t._currentValue=a}function nn(e){e._currentValue=Fo.current,H(Fo)}function Jo(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 Wo(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),Jo(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),Jo(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 ql(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;na(o.pendingProps.value,y.value)||(e!==null?e.push(S):e=[S])}}else if(o===ze.current){if(y=o.alternate,y===null)throw Error(s(387));y.memoizedState.memoizedState!==o.memoizedState.memoizedState&&(e!==null?e.push(tr):e=[tr])}o=o.return}e!==null&&Wo(t,e,a,l),t.flags|=262144}function Jr(e){for(e=e.firstContext;e!==null;){if(!na(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ol(e){sl=e,an=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Lt(e){return cf(sl,e)}function Wr(e,t){return sl===null&&ol(e),cf(e,t)}function cf(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},an===null){if(e===null)throw Error(s(308));an=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else an=an.next=t;return a}var wx=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()})}},Cx=n.unstable_scheduleCallback,Rx=n.unstable_NormalPriority,_t={$$typeof:K,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Po(){return{controller:new wx,data:new Map,refCount:0}}function zi(e){e.refCount--,e.refCount===0&&Cx(Rx,function(){e.controller.abort()})}var Ti=null,Io=0,Yl=0,Vl=null;function zx(e,t){if(Ti===null){var a=Ti=[];Io=0,Yl=au(),Vl={status:"pending",value:void 0,then:function(l){a.push(l)}}}return Io++,t.then(uf,uf),t}function uf(){if(--Io===0&&Ti!==null){Vl!==null&&(Vl.status="fulfilled");var e=Ti;Ti=null,Yl=0,Vl=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Tx(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 df=D.S;D.S=function(e,t){Zh=Dt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&zx(e,t),df!==null&&df(e,t)};var cl=E(null);function ec(){var e=cl.current;return e!==null?e:tt.pooledCache}function Pr(e,t){t===null?I(cl,cl.current):I(cl,t.pool)}function ff(){var e=ec();return e===null?null:{parent:_t._currentValue,pool:e}}var Gl=Error(s(460)),tc=Error(s(474)),Ir=Error(s(542)),es={then:function(){}};function hf(e){return e=e.status,e==="fulfilled"||e==="rejected"}function mf(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(Pa,Pa),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,gf(e),e;default:if(typeof t.status=="string")t.then(Pa,Pa);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,gf(e),e}throw dl=t,Gl}}function ul(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(dl=a,Gl):a}}var dl=null;function pf(){if(dl===null)throw Error(s(459));var e=dl;return dl=null,e}function gf(e){if(e===Gl||e===Ir)throw Error(s(483))}var $l=null,Oi=0;function ts(e){var t=Oi;return Oi+=1,$l===null&&($l=[]),mf($l,e,t)}function Mi(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function as(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 yf(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=en(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,$){return z===null||z.tag!==6?(z=Go(A,O.mode,$),z.return=O,z):(z=o(z,A),z.return=O,z)}function w(O,z,A,$){var Ne=A.type;return Ne===M?Y(O,z,A.props.children,$,A.key):z!==null&&(z.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===N&&ul(Ne)===z.type)?(z=o(z,A.props),Mi(z,A),z.return=O,z):(z=Zr(A.type,A.key,A.props,null,O.mode,$),Mi(z,A),z.return=O,z)}function L(O,z,A,$){return z===null||z.tag!==4||z.stateNode.containerInfo!==A.containerInfo||z.stateNode.implementation!==A.implementation?(z=$o(A,O.mode,$),z.return=O,z):(z=o(z,A.children||[]),z.return=O,z)}function Y(O,z,A,$,Ne){return z===null||z.tag!==7?(z=il(A,O.mode,$,Ne),z.return=O,z):(z=o(z,A),z.return=O,z)}function X(O,z,A){if(typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint")return z=Go(""+z,O.mode,A),z.return=O,z;if(typeof z=="object"&&z!==null){switch(z.$$typeof){case j:return A=Zr(z.type,z.key,z.props,null,O.mode,A),Mi(A,z),A.return=O,A;case R:return z=$o(z,O.mode,A),z.return=O,z;case N:return z=ul(z),X(O,z,A)}if(fe(z)||ne(z))return z=il(z,O.mode,A,null),z.return=O,z;if(typeof z.then=="function")return X(O,ts(z),A);if(z.$$typeof===K)return X(O,Wr(O,z),A);as(O,z)}return null}function k(O,z,A,$){var Ne=z!==null?z.key:null;if(typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint")return Ne!==null?null:S(O,z,""+A,$);if(typeof A=="object"&&A!==null){switch(A.$$typeof){case j:return A.key===Ne?w(O,z,A,$):null;case R:return A.key===Ne?L(O,z,A,$):null;case N:return A=ul(A),k(O,z,A,$)}if(fe(A)||ne(A))return Ne!==null?null:Y(O,z,A,$,null);if(typeof A.then=="function")return k(O,z,ts(A),$);if(A.$$typeof===K)return k(O,z,Wr(O,A),$);as(O,A)}return null}function q(O,z,A,$,Ne){if(typeof $=="string"&&$!==""||typeof $=="number"||typeof $=="bigint")return O=O.get(A)||null,S(z,O,""+$,Ne);if(typeof $=="object"&&$!==null){switch($.$$typeof){case j:return O=O.get($.key===null?A:$.key)||null,w(z,O,$,Ne);case R:return O=O.get($.key===null?A:$.key)||null,L(z,O,$,Ne);case N:return $=ul($),q(O,z,A,$,Ne)}if(fe($)||ne($))return O=O.get(A)||null,Y(z,O,$,Ne,null);if(typeof $.then=="function")return q(O,z,A,ts($),Ne);if($.$$typeof===K)return q(O,z,A,Wr(z,$),Ne);as(z,$)}return null}function xe(O,z,A,$){for(var Ne=null,Ke=null,be=z,Ae=z=0,Ye=null;be!==null&&Ae<A.length;Ae++){be.index>Ae?(Ye=be,be=null):Ye=be.sibling;var Xe=k(O,be,A[Ae],$);if(Xe===null){be===null&&(be=Ye);break}e&&be&&Xe.alternate===null&&t(O,be),z=u(Xe,z,Ae),Ke===null?Ne=Xe:Ke.sibling=Xe,Ke=Xe,be=Ye}if(Ae===A.length)return a(O,be),Ve&&tn(O,Ae),Ne;if(be===null){for(;Ae<A.length;Ae++)be=X(O,A[Ae],$),be!==null&&(z=u(be,z,Ae),Ke===null?Ne=be:Ke.sibling=be,Ke=be);return Ve&&tn(O,Ae),Ne}for(be=l(be);Ae<A.length;Ae++)Ye=q(be,O,Ae,A[Ae],$),Ye!==null&&(e&&Ye.alternate!==null&&be.delete(Ye.key===null?Ae:Ye.key),z=u(Ye,z,Ae),Ke===null?Ne=Ye:Ke.sibling=Ye,Ke=Ye);return e&&be.forEach(function($n){return t(O,$n)}),Ve&&tn(O,Ae),Ne}function we(O,z,A,$){if(A==null)throw Error(s(151));for(var Ne=null,Ke=null,be=z,Ae=z=0,Ye=null,Xe=A.next();be!==null&&!Xe.done;Ae++,Xe=A.next()){be.index>Ae?(Ye=be,be=null):Ye=be.sibling;var $n=k(O,be,Xe.value,$);if($n===null){be===null&&(be=Ye);break}e&&be&&$n.alternate===null&&t(O,be),z=u($n,z,Ae),Ke===null?Ne=$n:Ke.sibling=$n,Ke=$n,be=Ye}if(Xe.done)return a(O,be),Ve&&tn(O,Ae),Ne;if(be===null){for(;!Xe.done;Ae++,Xe=A.next())Xe=X(O,Xe.value,$),Xe!==null&&(z=u(Xe,z,Ae),Ke===null?Ne=Xe:Ke.sibling=Xe,Ke=Xe);return Ve&&tn(O,Ae),Ne}for(be=l(be);!Xe.done;Ae++,Xe=A.next())Xe=q(be,O,Ae,Xe.value,$),Xe!==null&&(e&&Xe.alternate!==null&&be.delete(Xe.key===null?Ae:Xe.key),z=u(Xe,z,Ae),Ke===null?Ne=Xe:Ke.sibling=Xe,Ke=Xe);return e&&be.forEach(function(Yv){return t(O,Yv)}),Ve&&tn(O,Ae),Ne}function Ie(O,z,A,$){if(typeof A=="object"&&A!==null&&A.type===M&&A.key===null&&(A=A.props.children),typeof A=="object"&&A!==null){switch(A.$$typeof){case j:e:{for(var Ne=A.key;z!==null;){if(z.key===Ne){if(Ne=A.type,Ne===M){if(z.tag===7){a(O,z.sibling),$=o(z,A.props.children),$.return=O,O=$;break e}}else if(z.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===N&&ul(Ne)===z.type){a(O,z.sibling),$=o(z,A.props),Mi($,A),$.return=O,O=$;break e}a(O,z);break}else t(O,z);z=z.sibling}A.type===M?($=il(A.props.children,O.mode,$,A.key),$.return=O,O=$):($=Zr(A.type,A.key,A.props,null,O.mode,$),Mi($,A),$.return=O,O=$)}return y(O);case R:e:{for(Ne=A.key;z!==null;){if(z.key===Ne)if(z.tag===4&&z.stateNode.containerInfo===A.containerInfo&&z.stateNode.implementation===A.implementation){a(O,z.sibling),$=o(z,A.children||[]),$.return=O,O=$;break e}else{a(O,z);break}else t(O,z);z=z.sibling}$=$o(A,O.mode,$),$.return=O,O=$}return y(O);case N:return A=ul(A),Ie(O,z,A,$)}if(fe(A))return xe(O,z,A,$);if(ne(A)){if(Ne=ne(A),typeof Ne!="function")throw Error(s(150));return A=Ne.call(A),we(O,z,A,$)}if(typeof A.then=="function")return Ie(O,z,ts(A),$);if(A.$$typeof===K)return Ie(O,z,Wr(O,A),$);as(O,A)}return typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint"?(A=""+A,z!==null&&z.tag===6?(a(O,z.sibling),$=o(z,A),$.return=O,O=$):(a(O,z),$=Go(A,O.mode,$),$.return=O,O=$),y(O)):a(O,z)}return function(O,z,A,$){try{Oi=0;var Ne=Ie(O,z,A,$);return $l=null,Ne}catch(be){if(be===Gl||be===Ir)throw be;var Ke=la(29,be,null,O.mode);return Ke.lanes=$,Ke.return=O,Ke}}}var fl=yf(!0),xf=yf(!1),Cn=!1;function ac(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function nc(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 Rn(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function zn(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=Qr(e),ef(e,null,a),t}return Xr(e,l,t,a),Qr(e)}function Di(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,Ar(e,a)}}function lc(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 ic=!1;function Ai(){if(ic){var e=Vl;if(e!==null)throw e}}function Li(e,t,a,l){ic=!1;var o=e.updateQueue;Cn=!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 Y=e.alternate;Y!==null&&(Y=Y.updateQueue,S=Y.lastBaseUpdate,S!==y&&(S===null?Y.firstBaseUpdate=L:S.next=L,Y.lastBaseUpdate=w))}if(u!==null){var X=o.baseState;y=0,Y=L=w=null,S=u;do{var k=S.lane&-536870913,q=k!==S.lane;if(q?(qe&k)===k:(l&k)===k){k!==0&&k===Yl&&(ic=!0),Y!==null&&(Y=Y.next={lane:0,tag:S.tag,payload:S.payload,callback:null,next:null});e:{var xe=e,we=S;k=t;var Ie=a;switch(we.tag){case 1:if(xe=we.payload,typeof xe=="function"){X=xe.call(Ie,X,k);break e}X=xe;break e;case 3:xe.flags=xe.flags&-65537|128;case 0:if(xe=we.payload,k=typeof xe=="function"?xe.call(Ie,X,k):xe,k==null)break e;X=x({},X,k);break e;case 2:Cn=!0}}k=S.callback,k!==null&&(e.flags|=64,q&&(e.flags|=8192),q=o.callbacks,q===null?o.callbacks=[k]:q.push(k))}else q={lane:k,tag:S.tag,payload:S.payload,callback:S.callback,next:null},Y===null?(L=Y=q,w=X):Y=Y.next=q,y|=k;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);Y===null&&(w=X),o.baseState=w,o.firstBaseUpdate=L,o.lastBaseUpdate=Y,u===null&&(o.shared.lanes=0),An|=y,e.lanes=y,e.memoizedState=X}}function vf(e,t){if(typeof e!="function")throw Error(s(191,e));e.call(t)}function bf(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)vf(a[e],t)}var Kl=E(null),ns=E(0);function Sf(e,t){e=hn,I(ns,e),I(Kl,t),hn=e|t.baseLanes}function rc(){I(ns,hn),I(Kl,Kl.current)}function sc(){hn=ns.current,H(Kl),H(ns)}var ia=E(null),_a=null;function Tn(e){var t=e.alternate;I(xt,xt.current&1),I(ia,e),_a===null&&(t===null||Kl.current!==null||t.memoizedState!==null)&&(_a=e)}function oc(e){I(xt,xt.current),I(ia,e),_a===null&&(_a=e)}function _f(e){e.tag===22?(I(xt,xt.current),I(ia,e),_a===null&&(_a=e)):On()}function On(){I(xt,xt.current),I(ia,ia.current)}function ra(e){H(ia),_a===e&&(_a=null),H(xt)}var xt=E(0);function ls(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||mu(a)||pu(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 ln=0,Me=null,We=null,jt=null,is=!1,Xl=!1,hl=!1,rs=0,ki=0,Ql=null,Ox=0;function ht(){throw Error(s(321))}function cc(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!na(e[a],t[a]))return!1;return!0}function uc(e,t,a,l,o,u){return ln=u,Me=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,D.H=e===null||e.memoizedState===null?ih:Ec,hl=!1,u=a(l,o),hl=!1,Xl&&(u=Nf(t,a,l,o)),jf(e),u}function jf(e){D.H=Bi;var t=We!==null&&We.next!==null;if(ln=0,jt=We=Me=null,is=!1,ki=0,Ql=null,t)throw Error(s(300));e===null||Nt||(e=e.dependencies,e!==null&&Jr(e)&&(Nt=!0))}function Nf(e,t,a,l){Me=e;var o=0;do{if(Xl&&(Ql=null),ki=0,Xl=!1,25<=o)throw Error(s(301));if(o+=1,jt=We=null,e.updateQueue!=null){var u=e.updateQueue;u.lastEffect=null,u.events=null,u.stores=null,u.memoCache!=null&&(u.memoCache.index=0)}D.H=rh,u=t(a,l)}while(Xl);return u}function Mx(){var e=D.H,t=e.useState()[0];return t=typeof t.then=="function"?Ui(t):t,e=e.useState()[0],(We!==null?We.memoizedState:null)!==e&&(Me.flags|=1024),t}function dc(){var e=rs!==0;return rs=0,e}function fc(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function hc(e){if(is){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}is=!1}ln=0,jt=We=Me=null,Xl=!1,ki=rs=0,Ql=null}function $t(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return jt===null?Me.memoizedState=jt=e:jt=jt.next=e,jt}function vt(){if(We===null){var e=Me.alternate;e=e!==null?e.memoizedState:null}else e=We.next;var t=jt===null?Me.memoizedState:jt.next;if(t!==null)jt=t,We=e;else{if(e===null)throw Me.alternate===null?Error(s(467)):Error(s(310));We=e,e={memoizedState:We.memoizedState,baseState:We.baseState,baseQueue:We.baseQueue,queue:We.queue,next:null},jt===null?Me.memoizedState=jt=e:jt=jt.next=e}return jt}function ss(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ui(e){var t=ki;return ki+=1,Ql===null&&(Ql=[]),e=mf(Ql,e,t),t=Me,(jt===null?t.memoizedState:jt.next)===null&&(t=t.alternate,D.H=t===null||t.memoizedState===null?ih:Ec),e}function os(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Ui(e);if(e.$$typeof===K)return Lt(e)}throw Error(s(438,String(e)))}function mc(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=ss(),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]=F;return t.index++,a}function rn(e,t){return typeof t=="function"?t(e):t}function cs(e){var t=vt();return pc(t,We,e)}function pc(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,Y=!1;do{var X=L.lane&-536870913;if(X!==L.lane?(qe&X)===X:(ln&X)===X){var k=L.revertLane;if(k===0)w!==null&&(w=w.next={lane:0,revertLane:0,gesture:null,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null}),X===Yl&&(Y=!0);else if((ln&k)===k){L=L.next,k===Yl&&(Y=!0);continue}else X={lane:0,revertLane:L.revertLane,gesture:null,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null},w===null?(S=w=X,y=u):w=w.next=X,Me.lanes|=k,An|=k;X=L.action,hl&&a(u,X),u=L.hasEagerState?L.eagerState:a(u,X)}else k={lane:X,revertLane:L.revertLane,gesture:L.gesture,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null},w===null?(S=w=k,y=u):w=w.next=k,Me.lanes|=X,An|=X;L=L.next}while(L!==null&&L!==t);if(w===null?y=u:w.next=S,!na(u,e.memoizedState)&&(Nt=!0,Y&&(a=Vl,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 gc(e){var t=vt(),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);na(u,t.memoizedState)||(Nt=!0),t.memoizedState=u,t.baseQueue===null&&(t.baseState=u),a.lastRenderedState=u}return[u,l]}function Ef(e,t,a){var l=Me,o=vt(),u=Ve;if(u){if(a===void 0)throw Error(s(407));a=a()}else a=t();var y=!na((We||o).memoizedState,a);if(y&&(o.memoizedState=a,Nt=!0),o=o.queue,vc(Rf.bind(null,l,o,e),[e]),o.getSnapshot!==t||y||jt!==null&&jt.memoizedState.tag&1){if(l.flags|=2048,Zl(9,{destroy:void 0},Cf.bind(null,l,o,a,t),null),tt===null)throw Error(s(349));u||(ln&127)!==0||wf(l,t,a)}return a}function wf(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=Me.updateQueue,t===null?(t=ss(),Me.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function Cf(e,t,a,l){t.value=a,t.getSnapshot=l,zf(t)&&Tf(e)}function Rf(e,t,a){return a(function(){zf(t)&&Tf(e)})}function zf(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!na(e,a)}catch{return!0}}function Tf(e){var t=ll(e,2);t!==null&&It(t,e,2)}function yc(e){var t=$t();if(typeof e=="function"){var a=e;if(e=a(),hl){gt(!0);try{a()}finally{gt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:rn,lastRenderedState:e},t}function Of(e,t,a,l){return e.baseState=a,pc(e,We,typeof l=="function"?l:rn)}function Dx(e,t,a,l,o){if(fs(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)}};D.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=D.T,y={};D.T=y;try{var S=a(o,l),w=D.S;w!==null&&w(y,S),Df(e,t,S)}catch(L){xc(e,t,L)}finally{u!==null&&y.types!==null&&(u.types=y.types),D.T=u}}else try{u=a(o,l),Df(e,t,u)}catch(L){xc(e,t,L)}}function Df(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(l){Af(e,t,l)},function(l){return xc(e,t,l)}):Af(e,t,a)}function Af(e,t,a){t.status="fulfilled",t.value=a,Lf(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 xc(e,t,a){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=a,Lf(t),t=t.next;while(t!==l)}e.action=null}function Lf(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function kf(e,t){return t}function Uf(e,t){if(Ve){var a=tt.formState;if(a!==null){e:{var l=Me;if(Ve){if(st){t:{for(var o=st,u=Sa;o.nodeType!==8;){if(!u){o=null;break t}if(o=ja(o.nextSibling),o===null){o=null;break t}}u=o.data,o=u==="F!"||u==="F"?o:null}if(o){st=ja(o.nextSibling),l=o.data==="F!";break e}}En(l)}l=!1}l&&(t=a[0])}}return a=$t(),a.memoizedState=a.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:kf,lastRenderedState:t},a.queue=l,a=ah.bind(null,Me,l),l.dispatch=a,l=yc(!1),u=Nc.bind(null,Me,!1,l.queue),l=$t(),o={state:t,dispatch:null,action:e,pending:null},l.queue=o,a=Dx.bind(null,Me,o,u,a),o.dispatch=a,l.memoizedState=e,[t,a,!1]}function Hf(e){var t=vt();return Bf(t,We,e)}function Bf(e,t,a){if(t=pc(e,t,kf)[0],e=cs(rn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=Ui(t)}catch(y){throw y===Gl?Ir:y}else l=t;t=vt();var o=t.queue,u=o.dispatch;return a!==t.memoizedState&&(Me.flags|=2048,Zl(9,{destroy:void 0},Ax.bind(null,o,a),null)),[l,u,e]}function Ax(e,t){e.action=t}function qf(e){var t=vt(),a=We;if(a!==null)return Bf(t,a,e);vt(),t=t.memoizedState,a=vt();var l=a.queue.dispatch;return a.memoizedState=e,[t,l,!1]}function Zl(e,t,a,l){return e={tag:e,create:a,deps:l,inst:t,next:null},t=Me.updateQueue,t===null&&(t=ss(),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 Yf(){return vt().memoizedState}function us(e,t,a,l){var o=$t();Me.flags|=e,o.memoizedState=Zl(1|t,{destroy:void 0},a,l===void 0?null:l)}function ds(e,t,a,l){var o=vt();l=l===void 0?null:l;var u=o.memoizedState.inst;We!==null&&l!==null&&cc(l,We.memoizedState.deps)?o.memoizedState=Zl(t,u,a,l):(Me.flags|=e,o.memoizedState=Zl(1|t,u,a,l))}function Vf(e,t){us(8390656,8,e,t)}function vc(e,t){ds(2048,8,e,t)}function Lx(e){Me.flags|=4;var t=Me.updateQueue;if(t===null)t=ss(),Me.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function Gf(e){var t=vt().memoizedState;return Lx({ref:t,nextImpl:e}),function(){if((Qe&2)!==0)throw Error(s(440));return t.impl.apply(void 0,arguments)}}function $f(e,t){return ds(4,2,e,t)}function Kf(e,t){return ds(4,4,e,t)}function Xf(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 Qf(e,t,a){a=a!=null?a.concat([e]):null,ds(4,4,Xf.bind(null,t,e),a)}function bc(){}function Zf(e,t){var a=vt();t=t===void 0?null:t;var l=a.memoizedState;return t!==null&&cc(t,l[1])?l[0]:(a.memoizedState=[e,t],e)}function Ff(e,t){var a=vt();t=t===void 0?null:t;var l=a.memoizedState;if(t!==null&&cc(t,l[1]))return l[0];if(l=e(),hl){gt(!0);try{e()}finally{gt(!1)}}return a.memoizedState=[l,t],l}function Sc(e,t,a){return a===void 0||(ln&1073741824)!==0&&(qe&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=Jh(),Me.lanes|=e,An|=e,a)}function Jf(e,t,a,l){return na(a,t)?a:Kl.current!==null?(e=Sc(e,a,l),na(e,t)||(Nt=!0),e):(ln&42)===0||(ln&1073741824)!==0&&(qe&261930)===0?(Nt=!0,e.memoizedState=a):(e=Jh(),Me.lanes|=e,An|=e,t)}function Wf(e,t,a,l,o){var u=J.p;J.p=u!==0&&8>u?u:8;var y=D.T,S={};D.T=S,Nc(e,!1,t,a);try{var w=o(),L=D.S;if(L!==null&&L(S,w),w!==null&&typeof w=="object"&&typeof w.then=="function"){var Y=Tx(w,l);Hi(e,t,Y,ca(e))}else Hi(e,t,l,ca(e))}catch(X){Hi(e,t,{then:function(){},status:"rejected",reason:X},ca())}finally{J.p=u,y!==null&&S.types!==null&&(y.types=S.types),D.T=y}}function kx(){}function _c(e,t,a,l){if(e.tag!==5)throw Error(s(476));var o=Pf(e).queue;Wf(e,o,t,ce,a===null?kx:function(){return If(e),a(l)})}function Pf(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ce,baseState:ce,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:rn,lastRenderedState:ce},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:rn,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function If(e){var t=Pf(e);t.next===null&&(t=e.alternate.memoizedState),Hi(e,t.next.queue,{},ca())}function jc(){return Lt(tr)}function eh(){return vt().memoizedState}function th(){return vt().memoizedState}function Ux(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=ca();e=Rn(a);var l=zn(t,e,a);l!==null&&(It(l,t,a),Di(l,t,a)),t={cache:Po()},e.payload=t;return}t=t.return}}function Hx(e,t,a){var l=ca();a={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},fs(e)?nh(t,a):(a=Yo(e,t,a,l),a!==null&&(It(a,e,l),lh(a,t,l)))}function ah(e,t,a){var l=ca();Hi(e,t,a,l)}function Hi(e,t,a,l){var o={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(fs(e))nh(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,na(S,y))return Xr(e,t,o,0),tt===null&&Kr(),!1}catch{}if(a=Yo(e,t,o,l),a!==null)return It(a,e,l),lh(a,t,l),!0}return!1}function Nc(e,t,a,l){if(l={lane:2,revertLane:au(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},fs(e)){if(t)throw Error(s(479))}else t=Yo(e,a,l,2),t!==null&&It(t,e,2)}function fs(e){var t=e.alternate;return e===Me||t!==null&&t===Me}function nh(e,t){Xl=is=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function lh(e,t,a){if((a&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,Ar(e,a)}}var Bi={readContext:Lt,use:os,useCallback:ht,useContext:ht,useEffect:ht,useImperativeHandle:ht,useLayoutEffect:ht,useInsertionEffect:ht,useMemo:ht,useReducer:ht,useRef:ht,useState:ht,useDebugValue:ht,useDeferredValue:ht,useTransition:ht,useSyncExternalStore:ht,useId:ht,useHostTransitionStatus:ht,useFormState:ht,useActionState:ht,useOptimistic:ht,useMemoCache:ht,useCacheRefresh:ht};Bi.useEffectEvent=ht;var ih={readContext:Lt,use:os,useCallback:function(e,t){return $t().memoizedState=[e,t===void 0?null:t],e},useContext:Lt,useEffect:Vf,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,us(4194308,4,Xf.bind(null,t,e),a)},useLayoutEffect:function(e,t){return us(4194308,4,e,t)},useInsertionEffect:function(e,t){us(4,2,e,t)},useMemo:function(e,t){var a=$t();t=t===void 0?null:t;var l=e();if(hl){gt(!0);try{e()}finally{gt(!1)}}return a.memoizedState=[l,t],l},useReducer:function(e,t,a){var l=$t();if(a!==void 0){var o=a(t);if(hl){gt(!0);try{a(t)}finally{gt(!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=Hx.bind(null,Me,e),[l.memoizedState,e]},useRef:function(e){var t=$t();return e={current:e},t.memoizedState=e},useState:function(e){e=yc(e);var t=e.queue,a=ah.bind(null,Me,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:bc,useDeferredValue:function(e,t){var a=$t();return Sc(a,e,t)},useTransition:function(){var e=yc(!1);return e=Wf.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||wf(l,t,a)}o.memoizedState=a;var u={value:a,getSnapshot:t};return o.queue=u,Vf(Rf.bind(null,l,u,e),[e]),l.flags|=2048,Zl(9,{destroy:void 0},Cf.bind(null,l,u,a,t),null),a},useId:function(){var e=$t(),t=tt.identifierPrefix;if(Ve){var a=$a,l=Ga;a=(l&~(1<<32-Tt(l)-1)).toString(32)+a,t="_"+t+"R_"+a,a=rs++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=Ox++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:jc,useFormState:Uf,useActionState:Uf,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=Nc.bind(null,Me,!0,a),a.dispatch=t,[e,t]},useMemoCache:mc,useCacheRefresh:function(){return $t().memoizedState=Ux.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)}}},Ec={readContext:Lt,use:os,useCallback:Zf,useContext:Lt,useEffect:vc,useImperativeHandle:Qf,useInsertionEffect:$f,useLayoutEffect:Kf,useMemo:Ff,useReducer:cs,useRef:Yf,useState:function(){return cs(rn)},useDebugValue:bc,useDeferredValue:function(e,t){var a=vt();return Jf(a,We.memoizedState,e,t)},useTransition:function(){var e=cs(rn)[0],t=vt().memoizedState;return[typeof e=="boolean"?e:Ui(e),t]},useSyncExternalStore:Ef,useId:eh,useHostTransitionStatus:jc,useFormState:Hf,useActionState:Hf,useOptimistic:function(e,t){var a=vt();return Of(a,We,e,t)},useMemoCache:mc,useCacheRefresh:th};Ec.useEffectEvent=Gf;var rh={readContext:Lt,use:os,useCallback:Zf,useContext:Lt,useEffect:vc,useImperativeHandle:Qf,useInsertionEffect:$f,useLayoutEffect:Kf,useMemo:Ff,useReducer:gc,useRef:Yf,useState:function(){return gc(rn)},useDebugValue:bc,useDeferredValue:function(e,t){var a=vt();return We===null?Sc(a,e,t):Jf(a,We.memoizedState,e,t)},useTransition:function(){var e=gc(rn)[0],t=vt().memoizedState;return[typeof e=="boolean"?e:Ui(e),t]},useSyncExternalStore:Ef,useId:eh,useHostTransitionStatus:jc,useFormState:qf,useActionState:qf,useOptimistic:function(e,t){var a=vt();return We!==null?Of(a,We,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:mc,useCacheRefresh:th};rh.useEffectEvent=Gf;function wc(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 Cc={enqueueSetState:function(e,t,a){e=e._reactInternals;var l=ca(),o=Rn(l);o.payload=t,a!=null&&(o.callback=a),t=zn(e,o,l),t!==null&&(It(t,e,l),Di(t,e,l))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var l=ca(),o=Rn(l);o.tag=1,o.payload=t,a!=null&&(o.callback=a),t=zn(e,o,l),t!==null&&(It(t,e,l),Di(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=ca(),l=Rn(a);l.tag=2,t!=null&&(l.callback=t),t=zn(e,l,a),t!==null&&(It(t,e,a),Di(t,e,a))}};function sh(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?!Ei(a,l)||!Ei(o,u):!0}function oh(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&&Cc.enqueueReplaceState(t,t.state,null)}function ml(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 ch(e){$r(e)}function uh(e){console.error(e)}function dh(e){$r(e)}function hs(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function fh(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 Rc(e,t,a){return a=Rn(a),a.tag=3,a.payload={element:null},a.callback=function(){hs(e,t)},a}function hh(e){return e=Rn(e),e.tag=3,e}function mh(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(){fh(t,a,l)}}var y=a.stateNode;y!==null&&typeof y.componentDidCatch=="function"&&(e.callback=function(){fh(t,a,l),typeof o!="function"&&(Ln===null?Ln=new Set([this]):Ln.add(this));var S=l.stack;this.componentDidCatch(l.value,{componentStack:S!==null?S:""})})}function Bx(e,t,a,l,o){if(a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=a.alternate,t!==null&&ql(t,a,o,!0),a=ia.current,a!==null){switch(a.tag){case 31:case 13:return _a===null?Es():a.alternate===null&&mt===0&&(mt=3),a.flags&=-257,a.flags|=65536,a.lanes=o,l===es?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([l]):t.add(l),Ic(e,l,o)),!1;case 22:return a.flags|=65536,l===es?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)),Ic(e,l,o)),!1}throw Error(s(435,a.tag))}return Ic(e,l,o),Es(),!1}if(Ve)return t=ia.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=o,l!==Qo&&(e=Error(s(422),{cause:l}),Ri(xa(e,a)))):(l!==Qo&&(t=Error(s(423),{cause:l}),Ri(xa(t,a))),e=e.current.alternate,e.flags|=65536,o&=-o,e.lanes|=o,l=xa(l,a),o=Rc(e.stateNode,l,o),lc(e,o),mt!==4&&(mt=2)),!1;var u=Error(s(520),{cause:l});if(u=xa(u,a),Qi===null?Qi=[u]:Qi.push(u),mt!==4&&(mt=2),t===null)return!0;l=xa(l,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=o&-o,a.lanes|=e,e=Rc(a.stateNode,l,e),lc(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"&&(Ln===null||!Ln.has(u))))return a.flags|=65536,o&=-o,a.lanes|=o,o=hh(o),mh(o,e,a,l),lc(a,o),!1}a=a.return}while(a!==null);return!1}var zc=Error(s(461)),Nt=!1;function kt(e,t,a,l){t.child=e===null?xf(t,null,a,l):fl(t,e.child,a,l)}function ph(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 ol(t),l=uc(e,t,a,y,u,o),S=dc(),e!==null&&!Nt?(fc(e,t,o),sn(e,t,o)):(Ve&&S&&Ko(t),t.flags|=1,kt(e,t,l,o),t.child)}function gh(e,t,a,l,o){if(e===null){var u=a.type;return typeof u=="function"&&!Vo(u)&&u.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=u,yh(e,t,u,l,o)):(e=Zr(a.type,null,l,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(u=e.child,!Uc(e,o)){var y=u.memoizedProps;if(a=a.compare,a=a!==null?a:Ei,a(y,l)&&e.ref===t.ref)return sn(e,t,o)}return t.flags|=1,e=en(u,l),e.ref=t.ref,e.return=t,t.child=e}function yh(e,t,a,l,o){if(e!==null){var u=e.memoizedProps;if(Ei(u,l)&&e.ref===t.ref)if(Nt=!1,t.pendingProps=l=u,Uc(e,o))(e.flags&131072)!==0&&(Nt=!0);else return t.lanes=e.lanes,sn(e,t,o)}return Tc(e,t,a,l,o)}function xh(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 vh(e,t,u,a,l)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Pr(t,u!==null?u.cachePool:null),u!==null?Sf(t,u):rc(),_f(t);else return l=t.lanes=536870912,vh(e,t,u!==null?u.baseLanes|a:a,a,l)}else u!==null?(Pr(t,u.cachePool),Sf(t,u),On(),t.memoizedState=null):(e!==null&&Pr(t,null),rc(),On());return kt(e,t,o,a),t.child}function qi(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function vh(e,t,a,l,o){var u=ec();return u=u===null?null:{parent:_t._currentValue,pool:u},t.memoizedState={baseLanes:a,cachePool:u},e!==null&&Pr(t,null),rc(),_f(t),e!==null&&ql(e,t,l,!0),t.childLanes=o,null}function ms(e,t){return t=gs({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function bh(e,t,a){return fl(t,e.child,null,a),e=ms(t,t.pendingProps),e.flags|=2,ra(t),t.memoizedState=null,e}function qx(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=ms(t,l),t.lanes=536870912,qi(null,e);if(oc(t),(e=st)?(e=Mm(e,Sa),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:jn!==null?{id:Ga,overflow:$a}:null,retryLane:536870912,hydrationErrors:null},a=af(e),a.return=t,t.child=a,At=t,st=null)):e=null,e===null)throw En(t);return t.lanes=536870912,null}return ms(t,l)}var u=e.memoizedState;if(u!==null){var y=u.dehydrated;if(oc(t),o)if(t.flags&256)t.flags&=-257,t=bh(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(s(558));else if(Nt||ql(e,t,a,!1),o=(a&e.childLanes)!==0,Nt||o){if(l=tt,l!==null&&(y=C(l,a),y!==0&&y!==u.retryLane))throw u.retryLane=y,ll(e,y),It(l,e,y),zc;Es(),t=bh(e,t,a)}else e=u.treeContext,st=ja(y.nextSibling),At=t,Ve=!0,Nn=null,Sa=!1,e!==null&&rf(t,e),t=ms(t,l),t.flags|=4096;return t}return e=en(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function ps(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 Tc(e,t,a,l,o){return ol(t),a=uc(e,t,a,l,void 0,o),l=dc(),e!==null&&!Nt?(fc(e,t,o),sn(e,t,o)):(Ve&&l&&Ko(t),t.flags|=1,kt(e,t,a,o),t.child)}function Sh(e,t,a,l,o,u){return ol(t),t.updateQueue=null,a=Nf(t,l,a,o),jf(e),l=dc(),e!==null&&!Nt?(fc(e,t,u),sn(e,t,u)):(Ve&&l&&Ko(t),t.flags|=1,kt(e,t,a,u),t.child)}function _h(e,t,a,l,o){if(ol(t),t.stateNode===null){var u=kl,y=a.contextType;typeof y=="object"&&y!==null&&(u=Lt(y)),u=new a(l,u),t.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=Cc,t.stateNode=u,u._reactInternals=t,u=t.stateNode,u.props=l,u.state=t.memoizedState,u.refs={},ac(t),y=a.contextType,u.context=typeof y=="object"&&y!==null?Lt(y):kl,u.state=t.memoizedState,y=a.getDerivedStateFromProps,typeof y=="function"&&(wc(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&&Cc.enqueueReplaceState(u,u.state,null),Li(t,l,u,o),Ai(),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=ml(a,S);u.props=w;var L=u.context,Y=a.contextType;y=kl,typeof Y=="object"&&Y!==null&&(y=Lt(Y));var X=a.getDerivedStateFromProps;Y=typeof X=="function"||typeof u.getSnapshotBeforeUpdate=="function",S=t.pendingProps!==S,Y||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(S||L!==y)&&oh(t,u,l,y),Cn=!1;var k=t.memoizedState;u.state=k,Li(t,l,u,o),Ai(),L=t.memoizedState,S||k!==L||Cn?(typeof X=="function"&&(wc(t,a,X,l),L=t.memoizedState),(w=Cn||sh(t,a,w,l,k,L,y))?(Y||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,nc(e,t),y=t.memoizedProps,Y=ml(a,y),u.props=Y,X=t.pendingProps,k=u.context,L=a.contextType,w=kl,typeof L=="object"&&L!==null&&(w=Lt(L)),S=a.getDerivedStateFromProps,(L=typeof S=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(y!==X||k!==w)&&oh(t,u,l,w),Cn=!1,k=t.memoizedState,u.state=k,Li(t,l,u,o),Ai();var q=t.memoizedState;y!==X||k!==q||Cn||e!==null&&e.dependencies!==null&&Jr(e.dependencies)?(typeof S=="function"&&(wc(t,a,S,l),q=t.memoizedState),(Y=Cn||sh(t,a,Y,l,k,q,w)||e!==null&&e.dependencies!==null&&Jr(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&&k===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&k===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=q),u.props=l,u.state=q,u.context=w,l=Y):(typeof u.componentDidUpdate!="function"||y===e.memoizedProps&&k===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&k===e.memoizedState||(t.flags|=1024),l=!1)}return u=l,ps(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=fl(t,e.child,null,o),t.child=fl(t,null,a,o)):kt(e,t,a,o),t.memoizedState=u.state,e=t.child):e=sn(e,t,o),e}function jh(e,t,a,l){return rl(),t.flags|=256,kt(e,t,a,l),t.child}var Oc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Mc(e){return{baseLanes:e,cachePool:ff()}}function Dc(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=oa),e}function Nh(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:(xt.current&2)!==0),y&&(o=!0,t.flags&=-129),y=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ve){if(o?Tn(t):On(),(e=st)?(e=Mm(e,Sa),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:jn!==null?{id:Ga,overflow:$a}:null,retryLane:536870912,hydrationErrors:null},a=af(e),a.return=t,t.child=a,At=t,st=null)):e=null,e===null)throw En(t);return pu(e)?t.lanes=32:t.lanes=536870912,null}var S=l.children;return l=l.fallback,o?(On(),o=t.mode,S=gs({mode:"hidden",children:S},o),l=il(l,o,a,null),S.return=t,l.return=t,S.sibling=l,t.child=S,l=t.child,l.memoizedState=Mc(a),l.childLanes=Dc(e,y,a),t.memoizedState=Oc,qi(null,l)):(Tn(t),Ac(t,S))}var w=e.memoizedState;if(w!==null&&(S=w.dehydrated,S!==null)){if(u)t.flags&256?(Tn(t),t.flags&=-257,t=Lc(e,t,a)):t.memoizedState!==null?(On(),t.child=e.child,t.flags|=128,t=null):(On(),S=l.fallback,o=t.mode,l=gs({mode:"visible",children:l.children},o),S=il(S,o,a,null),S.flags|=2,l.return=t,S.return=t,l.sibling=S,t.child=l,fl(t,e.child,null,a),l=t.child,l.memoizedState=Mc(a),l.childLanes=Dc(e,y,a),t.memoizedState=Oc,t=qi(null,l));else if(Tn(t),pu(S)){if(y=S.nextSibling&&S.nextSibling.dataset,y)var L=y.dgst;y=L,l=Error(s(419)),l.stack="",l.digest=y,Ri({value:l,source:null,stack:null}),t=Lc(e,t,a)}else if(Nt||ql(e,t,a,!1),y=(a&e.childLanes)!==0,Nt||y){if(y=tt,y!==null&&(l=C(y,a),l!==0&&l!==w.retryLane))throw w.retryLane=l,ll(e,l),It(y,e,l),zc;mu(S)||Es(),t=Lc(e,t,a)}else mu(S)?(t.flags|=192,t.child=e.child,t=null):(e=w.treeContext,st=ja(S.nextSibling),At=t,Ve=!0,Nn=null,Sa=!1,e!==null&&rf(t,e),t=Ac(t,l.children),t.flags|=4096);return t}return o?(On(),S=l.fallback,o=t.mode,w=e.child,L=w.sibling,l=en(w,{mode:"hidden",children:l.children}),l.subtreeFlags=w.subtreeFlags&65011712,L!==null?S=en(L,S):(S=il(S,o,a,null),S.flags|=2),S.return=t,l.return=t,l.sibling=S,t.child=l,qi(null,l),l=t.child,S=e.child.memoizedState,S===null?S=Mc(a):(o=S.cachePool,o!==null?(w=_t._currentValue,o=o.parent!==w?{parent:w,pool:w}:o):o=ff(),S={baseLanes:S.baseLanes|a,cachePool:o}),l.memoizedState=S,l.childLanes=Dc(e,y,a),t.memoizedState=Oc,qi(e.child,l)):(Tn(t),a=e.child,e=a.sibling,a=en(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 Ac(e,t){return t=gs({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function gs(e,t){return e=la(22,e,null,t),e.lanes=0,e}function Lc(e,t,a){return fl(t,e.child,null,a),e=Ac(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Eh(e,t,a){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),Jo(e.return,t,a)}function kc(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 wh(e,t,a){var l=t.pendingProps,o=l.revealOrder,u=l.tail;l=l.children;var y=xt.current,S=(y&2)!==0;if(S?(y=y&1|2,t.flags|=128):y&=1,I(xt,y),kt(e,t,l,a),l=Ve?Ci:0,!S&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Eh(e,a,t);else if(e.tag===19)Eh(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&&ls(e)===null&&(o=a),a=a.sibling;a=o,a===null?(o=t.child,t.child=null):(o=a.sibling,a.sibling=null),kc(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&&ls(e)===null){t.child=o;break}e=o.sibling,o.sibling=a,a=o,o=e}kc(t,!0,a,null,u,l);break;case"together":kc(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function sn(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),An|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(ql(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=en(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=en(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function Uc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Jr(e)))}function Yx(e,t,a){switch(t.tag){case 3:lt(t,t.stateNode.containerInfo),wn(t,_t,e.memoizedState.cache),rl();break;case 27:case 5:wt(t);break;case 4:lt(t,t.stateNode.containerInfo);break;case 10:wn(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,oc(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(Tn(t),t.flags|=128,null):(a&t.child.childLanes)!==0?Nh(e,t,a):(Tn(t),e=sn(e,t,a),e!==null?e.sibling:null);Tn(t);break;case 19:var o=(e.flags&128)!==0;if(l=(a&t.childLanes)!==0,l||(ql(e,t,a,!1),l=(a&t.childLanes)!==0),o){if(l)return wh(e,t,a);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),I(xt,xt.current),l)break;return null;case 22:return t.lanes=0,xh(e,t,a,t.pendingProps);case 24:wn(t,_t,e.memoizedState.cache)}return sn(e,t,a)}function Ch(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)Nt=!0;else{if(!Uc(e,a)&&(t.flags&128)===0)return Nt=!1,Yx(e,t,a);Nt=(e.flags&131072)!==0}else Nt=!1,Ve&&(t.flags&1048576)!==0&&lf(t,Ci,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=ul(t.elementType),t.type=e,typeof e=="function")Vo(e)?(l=ml(e,l),t.tag=1,t=_h(null,t,e,l,a)):(t.tag=0,t=Tc(null,t,e,l,a));else{if(e!=null){var o=e.$$typeof;if(o===ie){t.tag=11,t=ph(null,t,e,l,a);break e}else if(o===W){t.tag=14,t=gh(null,t,e,l,a);break e}}throw t=se(e)||e,Error(s(306,t,""))}}return t;case 0:return Tc(e,t,t.type,t.pendingProps,a);case 1:return l=t.type,o=ml(l,t.pendingProps),_h(e,t,l,o,a);case 3:e:{if(lt(t,t.stateNode.containerInfo),e===null)throw Error(s(387));l=t.pendingProps;var u=t.memoizedState;o=u.element,nc(e,t),Li(t,l,null,a);var y=t.memoizedState;if(l=y.cache,wn(t,_t,l),l!==u.cache&&Wo(t,[_t],a,!0),Ai(),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=jh(e,t,l,a);break e}else if(l!==o){o=xa(Error(s(424)),t),Ri(o),t=jh(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,st=ja(e.firstChild),At=t,Ve=!0,Nn=null,Sa=!0,a=xf(t,null,l,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(rl(),l===o){t=sn(e,t,a);break e}kt(e,t,l,a)}t=t.child}return t;case 26:return ps(e,t),e===null?(a=Hm(t.type,null,t.pendingProps,null))?t.memoizedState=a:Ve||(a=t.type,e=t.pendingProps,l=Ms(_e.current).createElement(a),l[re]=t,l[me]=e,Ut(l,a,e),nt(l),t.stateNode=l):t.memoizedState=Hm(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return wt(t),e===null&&Ve&&(l=t.stateNode=Lm(t.type,t.pendingProps,_e.current),At=t,Sa=!0,o=st,Bn(t.type)?(gu=o,st=ja(l.firstChild)):st=o),kt(e,t,t.pendingProps.children,a),ps(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ve&&((o=l=st)&&(l=yv(l,t.type,t.pendingProps,Sa),l!==null?(t.stateNode=l,At=t,st=ja(l.firstChild),Sa=!1,o=!0):o=!1),o||En(t)),wt(t),o=t.type,u=t.pendingProps,y=e!==null?e.memoizedProps:null,l=u.children,du(o,u)?l=null:y!==null&&du(o,y)&&(t.flags|=32),t.memoizedState!==null&&(o=uc(e,t,Mx,null,null,a),tr._currentValue=o),ps(e,t),kt(e,t,l,a),t.child;case 6:return e===null&&Ve&&((e=a=st)&&(a=xv(a,t.pendingProps,Sa),a!==null?(t.stateNode=a,At=t,st=null,e=!0):e=!1),e||En(t)),null;case 13:return Nh(e,t,a);case 4:return lt(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=fl(t,null,l,a):kt(e,t,l,a),t.child;case 11:return ph(e,t,t.type,t.pendingProps,a);case 7:return kt(e,t,t.pendingProps,a),t.child;case 8:return kt(e,t,t.pendingProps.children,a),t.child;case 12:return kt(e,t,t.pendingProps.children,a),t.child;case 10:return l=t.pendingProps,wn(t,t.type,l.value),kt(e,t,l.children,a),t.child;case 9:return o=t.type._context,l=t.pendingProps.children,ol(t),o=Lt(o),l=l(o),t.flags|=1,kt(e,t,l,a),t.child;case 14:return gh(e,t,t.type,t.pendingProps,a);case 15:return yh(e,t,t.type,t.pendingProps,a);case 19:return wh(e,t,a);case 31:return qx(e,t,a);case 22:return xh(e,t,a,t.pendingProps);case 24:return ol(t),l=Lt(_t),e===null?(o=ec(),o===null&&(o=tt,u=Po(),o.pooledCache=u,u.refCount++,u!==null&&(o.pooledCacheLanes|=a),o=u),t.memoizedState={parent:l,cache:o},ac(t),wn(t,_t,o)):((e.lanes&a)!==0&&(nc(e,t),Li(t,null,null,a),Ai()),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),wn(t,_t,l)):(l=u.cache,wn(t,_t,l),l!==o.cache&&Wo(t,[_t],a,!0))),kt(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(s(156,t.tag))}function on(e){e.flags|=4}function Hc(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(em())e.flags|=8192;else throw dl=es,tc}else e.flags&=-16777217}function Rh(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Gm(t))if(em())e.flags|=8192;else throw dl=es,tc}function ys(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?yi():536870912,e.lanes|=t,Pl|=t)}function Yi(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 ot(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 Vx(e,t,a){var l=t.pendingProps;switch(Xo(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ot(t),null;case 1:return ot(t),null;case 3:return a=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),nn(_t),he(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Bl(t)?on(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Zo())),ot(t),null;case 26:var o=t.type,u=t.memoizedState;return e===null?(on(t),u!==null?(ot(t),Rh(t,u)):(ot(t),Hc(t,o,null,l,a))):u?u!==e.memoizedState?(on(t),ot(t),Rh(t,u)):(ot(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&on(t),ot(t),Hc(t,o,e,l,a)),null;case 27:if(Qt(t),a=_e.current,o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&on(t);else{if(!l){if(t.stateNode===null)throw Error(s(166));return ot(t),null}e=le.current,Bl(t)?sf(t):(e=Lm(o,l,a),t.stateNode=e,on(t))}return ot(t),null;case 5:if(Qt(t),o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&on(t);else{if(!l){if(t.stateNode===null)throw Error(s(166));return ot(t),null}if(u=le.current,Bl(t))sf(t);else{var y=Ms(_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[re]=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(Ut(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&&on(t)}}return ot(t),Hc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&on(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(s(166));if(e=_e.current,Bl(t)){if(e=t.stateNode,a=t.memoizedProps,l=null,o=At,o!==null)switch(o.tag){case 27:case 5:l=o.memoizedProps}e[re]=t,e=!!(e.nodeValue===a||l!==null&&l.suppressHydrationWarning===!0||Nm(e.nodeValue,a)),e||En(t,!0)}else e=Ms(e).createTextNode(l),e[re]=t,t.stateNode=e}return ot(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(l=Bl(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[re]=t}else rl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ot(t),e=!1}else a=Zo(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(ra(t),t):(ra(t),null);if((t.flags&128)!==0)throw Error(s(558))}return ot(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(o=Bl(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[re]=t}else rl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ot(t),o=!1}else o=Zo(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=o),o=!0;if(!o)return t.flags&256?(ra(t),t):(ra(t),null)}return ra(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),ys(t,t.updateQueue),ot(t),null);case 4:return he(),e===null&&ru(t.stateNode.containerInfo),ot(t),null;case 10:return nn(t.type),ot(t),null;case 19:if(H(xt),l=t.memoizedState,l===null)return ot(t),null;if(o=(t.flags&128)!==0,u=l.rendering,u===null)if(o)Yi(l,!1);else{if(mt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(u=ls(e),u!==null){for(t.flags|=128,Yi(l,!1),e=u.updateQueue,t.updateQueue=e,ys(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)tf(a,e),a=a.sibling;return I(xt,xt.current&1|2),Ve&&tn(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&Dt()>_s&&(t.flags|=128,o=!0,Yi(l,!1),t.lanes=4194304)}else{if(!o)if(e=ls(u),e!==null){if(t.flags|=128,o=!0,e=e.updateQueue,t.updateQueue=e,ys(t,e),Yi(l,!0),l.tail===null&&l.tailMode==="hidden"&&!u.alternate&&!Ve)return ot(t),null}else 2*Dt()-l.renderingStartTime>_s&&a!==536870912&&(t.flags|=128,o=!0,Yi(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=Dt(),e.sibling=null,a=xt.current,I(xt,o?a&1|2:a&1),Ve&&tn(t,l.treeForkCount),e):(ot(t),null);case 22:case 23:return ra(t),sc(),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&&(ot(t),t.subtreeFlags&6&&(t.flags|=8192)):ot(t),a=t.updateQueue,a!==null&&ys(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&&H(cl),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),nn(_t),ot(t),null;case 25:return null;case 30:return null}throw Error(s(156,t.tag))}function Gx(e,t){switch(Xo(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return nn(_t),he(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Qt(t),null;case 31:if(t.memoizedState!==null){if(ra(t),t.alternate===null)throw Error(s(340));rl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(ra(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(s(340));rl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return H(xt),null;case 4:return he(),null;case 10:return nn(t.type),null;case 22:case 23:return ra(t),sc(),e!==null&&H(cl),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return nn(_t),null;case 25:return null;default:return null}}function zh(e,t){switch(Xo(t),t.tag){case 3:nn(_t),he();break;case 26:case 27:case 5:Qt(t);break;case 4:he();break;case 31:t.memoizedState!==null&&ra(t);break;case 13:ra(t);break;case 19:H(xt);break;case 10:nn(t.type);break;case 22:case 23:ra(t),sc(),e!==null&&H(cl);break;case 24:nn(_t)}}function Vi(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 Mn(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(Y){Fe(o,w,Y)}}}l=l.next}while(l!==u)}}catch(Y){Fe(t,t.return,Y)}}function Th(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{bf(t,a)}catch(l){Fe(e,e.return,l)}}}function Oh(e,t,a){a.props=ml(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(l){Fe(e,t,l)}}function Gi(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 Ka(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 Bc(e,t,a){try{var l=e.stateNode;dv(l,e.type,a,t),l[me]=t}catch(o){Fe(e,e.return,o)}}function Dh(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Bn(e.type)||e.tag===4}function qc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Dh(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&&Bn(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 Yc(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=Pa));else if(l!==4&&(l===27&&Bn(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(Yc(e,t,a),e=e.sibling;e!==null;)Yc(e,t,a),e=e.sibling}function xs(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&&Bn(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(xs(e,t,a),e=e.sibling;e!==null;)xs(e,t,a),e=e.sibling}function Ah(e){var t=e.stateNode,a=e.memoizedProps;try{for(var l=e.type,o=t.attributes;o.length;)t.removeAttributeNode(o[0]);Ut(t,l,a),t[re]=e,t[me]=a}catch(u){Fe(e,e.return,u)}}var cn=!1,Et=!1,Vc=!1,Lh=typeof WeakSet=="function"?WeakSet:Set,Mt=null;function $x(e,t){if(e=e.containerInfo,cu=Bs,e=Xd(e),Lo(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,Y=0,X=e,k=null;t:for(;;){for(var q;X!==a||o!==0&&X.nodeType!==3||(S=y+o),X!==u||l!==0&&X.nodeType!==3||(w=y+l),X.nodeType===3&&(y+=X.nodeValue.length),(q=X.firstChild)!==null;)k=X,X=q;for(;;){if(X===e)break t;if(k===a&&++L===o&&(S=y),k===u&&++Y===l&&(w=y),(q=X.nextSibling)!==null)break;X=k,k=X.parentNode}X=q}a=S===-1||w===-1?null:{start:S,end:w}}else a=null}a=a||{start:0,end:0}}else a=null;for(uu={focusedElem:e,selectionRange:a},Bs=!1,Mt=t;Mt!==null;)if(t=Mt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Mt=e;else for(;Mt!==null;){switch(t=Mt,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=ml(a.type,o);e=l.getSnapshotBeforeUpdate(xe,u),l.__reactInternalSnapshotBeforeUpdate=e}catch(we){Fe(a,a.return,we)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)hu(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":hu(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,Mt=e;break}Mt=t.return}}function kh(e,t,a){var l=a.flags;switch(a.tag){case 0:case 11:case 15:dn(e,a),l&4&&Vi(5,a);break;case 1:if(dn(e,a),l&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(y){Fe(a,a.return,y)}else{var o=ml(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(o,t,e.__reactInternalSnapshotBeforeUpdate)}catch(y){Fe(a,a.return,y)}}l&64&&Th(a),l&512&&Gi(a,a.return);break;case 3:if(dn(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{bf(e,t)}catch(y){Fe(a,a.return,y)}}break;case 27:t===null&&l&4&&Ah(a);case 26:case 5:dn(e,a),t===null&&l&4&&Mh(a),l&512&&Gi(a,a.return);break;case 12:dn(e,a);break;case 31:dn(e,a),l&4&&Bh(e,a);break;case 13:dn(e,a),l&4&&qh(e,a),l&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=Ix.bind(null,a),vv(e,a))));break;case 22:if(l=a.memoizedState!==null||cn,!l){t=t!==null&&t.memoizedState!==null||Et,o=cn;var u=Et;cn=l,(Et=t)&&!u?fn(e,a,(a.subtreeFlags&8772)!==0):dn(e,a),cn=o,Et=u}break;case 30:break;default:dn(e,a)}}function Uh(e){var t=e.alternate;t!==null&&(e.alternate=null,Uh(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,Ft=!1;function un(e,t,a){for(a=a.child;a!==null;)Hh(e,t,a),a=a.sibling}function Hh(e,t,a){if(Ct&&typeof Ct.onCommitFiberUnmount=="function")try{Ct.onCommitFiberUnmount(pa,a)}catch{}switch(a.tag){case 26:Et||Ka(a,t),un(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:Et||Ka(a,t);var l=ct,o=Ft;Bn(a.type)&&(ct=a.stateNode,Ft=!1),un(e,t,a),Pi(a.stateNode),ct=l,Ft=o;break;case 5:Et||Ka(a,t);case 6:if(l=ct,o=Ft,ct=null,un(e,t,a),ct=l,Ft=o,ct!==null)if(Ft)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&&(Ft?(e=ct,Tm(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),ri(e)):Tm(ct,a.stateNode));break;case 4:l=ct,o=Ft,ct=a.stateNode.containerInfo,Ft=!0,un(e,t,a),ct=l,Ft=o;break;case 0:case 11:case 14:case 15:Mn(2,a,t),Et||Mn(4,a,t),un(e,t,a);break;case 1:Et||(Ka(a,t),l=a.stateNode,typeof l.componentWillUnmount=="function"&&Oh(a,t,l)),un(e,t,a);break;case 21:un(e,t,a);break;case 22:Et=(l=Et)||a.memoizedState!==null,un(e,t,a),Et=l;break;default:un(e,t,a)}}function Bh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{ri(e)}catch(a){Fe(t,t.return,a)}}}function qh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{ri(e)}catch(a){Fe(t,t.return,a)}}function Kx(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Lh),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Lh),t;default:throw Error(s(435,e.tag))}}function vs(e,t){var a=Kx(e);t.forEach(function(l){if(!a.has(l)){a.add(l);var o=ev.bind(null,e,l);l.then(o,o)}})}function Jt(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(Bn(S.type)){ct=S.stateNode,Ft=!1;break e}break;case 5:ct=S.stateNode,Ft=!1;break e;case 3:case 4:ct=S.stateNode.containerInfo,Ft=!0;break e}S=S.return}if(ct===null)throw Error(s(160));Hh(u,y,o),ct=null,Ft=!1,u=o.alternate,u!==null&&(u.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Yh(t,e),t=t.sibling}var Aa=null;function Yh(e,t){var a=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Jt(t,e),Wt(e),l&4&&(Mn(3,e,e.return),Vi(3,e),Mn(5,e,e.return));break;case 1:Jt(t,e),Wt(e),l&512&&(Et||a===null||Ka(a,a.return)),l&64&&cn&&(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=Aa;if(Jt(t,e),Wt(e),l&512&&(Et||a===null||Ka(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[re]||u.namespaceURI==="http://www.w3.org/2000/svg"||u.hasAttribute("itemprop"))&&(u=o.createElement(l),o.head.insertBefore(u,o.querySelector("head > title"))),Ut(u,l,a),u[re]=e,nt(u),l=u;break e;case"link":var y=Ym("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),Ut(u,l,a),o.head.appendChild(u);break;case"meta":if(y=Ym("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),Ut(u,l,a),o.head.appendChild(u);break;default:throw Error(s(468,l))}u[re]=e,nt(u),l=u}e.stateNode=l}else Vm(o,e.type,e.stateNode);else e.stateNode=qm(o,l,e.memoizedProps);else u!==l?(u===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):u.count--,l===null?Vm(o,e.type,e.stateNode):qm(o,l,e.memoizedProps)):l===null&&e.stateNode!==null&&Bc(e,e.memoizedProps,a.memoizedProps)}break;case 27:Jt(t,e),Wt(e),l&512&&(Et||a===null||Ka(a,a.return)),a!==null&&l&4&&Bc(e,e.memoizedProps,a.memoizedProps);break;case 5:if(Jt(t,e),Wt(e),l&512&&(Et||a===null||Ka(a,a.return)),e.flags&32){o=e.stateNode;try{zl(o,"")}catch(xe){Fe(e,e.return,xe)}}l&4&&e.stateNode!=null&&(o=e.memoizedProps,Bc(e,o,a!==null?a.memoizedProps:o)),l&1024&&(Vc=!0);break;case 6:if(Jt(t,e),Wt(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(Ls=null,o=Aa,Aa=Ds(t.containerInfo),Jt(t,e),Aa=o,Wt(e),l&4&&a!==null&&a.memoizedState.isDehydrated)try{ri(t.containerInfo)}catch(xe){Fe(e,e.return,xe)}Vc&&(Vc=!1,Vh(e));break;case 4:l=Aa,Aa=Ds(e.stateNode.containerInfo),Jt(t,e),Wt(e),Aa=l;break;case 12:Jt(t,e),Wt(e);break;case 31:Jt(t,e),Wt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,vs(e,l)));break;case 13:Jt(t,e),Wt(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(Ss=Dt()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,vs(e,l)));break;case 22:o=e.memoizedState!==null;var w=a!==null&&a.memoizedState!==null,L=cn,Y=Et;if(cn=L||o,Et=Y||w,Jt(t,e),Et=Y,cn=L,Wt(e),l&8192)e:for(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,o&&(a===null||w||cn||Et||pl(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 X=w.memoizedProps.style,k=X!=null&&X.hasOwnProperty("display")?X.display:null;S.style.display=k==null||typeof k=="boolean"?"":(""+k).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?Om(q,!0):Om(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,vs(e,a))));break;case 19:Jt(t,e),Wt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,vs(e,l)));break;case 30:break;case 21:break;default:Jt(t,e),Wt(e)}}function Wt(e){var t=e.flags;if(t&2){try{for(var a,l=e.return;l!==null;){if(Dh(l)){a=l;break}l=l.return}if(a==null)throw Error(s(160));switch(a.tag){case 27:var o=a.stateNode,u=qc(e);xs(e,u,o);break;case 5:var y=a.stateNode;a.flags&32&&(zl(y,""),a.flags&=-33);var S=qc(e);xs(e,S,y);break;case 3:case 4:var w=a.stateNode.containerInfo,L=qc(e);Yc(e,L,w);break;default:throw Error(s(161))}}catch(Y){Fe(e,e.return,Y)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Vh(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Vh(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function dn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)kh(e,t.alternate,t),t=t.sibling}function pl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Mn(4,t,t.return),pl(t);break;case 1:Ka(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&Oh(t,t.return,a),pl(t);break;case 27:Pi(t.stateNode);case 26:case 5:Ka(t,t.return),pl(t);break;case 22:t.memoizedState===null&&pl(t);break;case 30:pl(t);break;default:pl(t)}e=e.sibling}}function fn(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:fn(o,u,a),Vi(4,u);break;case 1:if(fn(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++)vf(w[o],S)}catch(L){Fe(l,l.return,L)}}a&&y&64&&Th(u),Gi(u,u.return);break;case 27:Ah(u);case 26:case 5:fn(o,u,a),a&&l===null&&y&4&&Mh(u),Gi(u,u.return);break;case 12:fn(o,u,a);break;case 31:fn(o,u,a),a&&y&4&&Bh(o,u);break;case 13:fn(o,u,a),a&&y&4&&qh(o,u);break;case 22:u.memoizedState===null&&fn(o,u,a),Gi(u,u.return);break;case 30:break;default:fn(o,u,a)}t=t.sibling}}function Gc(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&&zi(a))}function $c(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&zi(e))}function La(e,t,a,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Gh(e,t,a,l),t=t.sibling}function Gh(e,t,a,l){var o=t.flags;switch(t.tag){case 0:case 11:case 15:La(e,t,a,l),o&2048&&Vi(9,t);break;case 1:La(e,t,a,l);break;case 3:La(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&&zi(e)));break;case 12:if(o&2048){La(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 La(e,t,a,l);break;case 31:La(e,t,a,l);break;case 13:La(e,t,a,l);break;case 23:break;case 22:u=t.stateNode,y=t.alternate,t.memoizedState!==null?u._visibility&2?La(e,t,a,l):$i(e,t):u._visibility&2?La(e,t,a,l):(u._visibility|=2,Fl(e,t,a,l,(t.subtreeFlags&10256)!==0||!1)),o&2048&&Gc(y,t);break;case 24:La(e,t,a,l),o&2048&&$c(t.alternate,t);break;default:La(e,t,a,l)}}function Fl(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:Fl(u,y,S,w,o),Vi(8,y);break;case 23:break;case 22:var Y=y.stateNode;y.memoizedState!==null?Y._visibility&2?Fl(u,y,S,w,o):$i(u,y):(Y._visibility|=2,Fl(u,y,S,w,o)),o&&L&2048&&Gc(y.alternate,y);break;case 24:Fl(u,y,S,w,o),o&&L&2048&&$c(y.alternate,y);break;default:Fl(u,y,S,w,o)}t=t.sibling}}function $i(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:$i(a,l),o&2048&&Gc(l.alternate,l);break;case 24:$i(a,l),o&2048&&$c(l.alternate,l);break;default:$i(a,l)}t=t.sibling}}var Ki=8192;function Jl(e,t,a){if(e.subtreeFlags&Ki)for(e=e.child;e!==null;)$h(e,t,a),e=e.sibling}function $h(e,t,a){switch(e.tag){case 26:Jl(e,t,a),e.flags&Ki&&e.memoizedState!==null&&Ov(a,Aa,e.memoizedState,e.memoizedProps);break;case 5:Jl(e,t,a);break;case 3:case 4:var l=Aa;Aa=Ds(e.stateNode.containerInfo),Jl(e,t,a),Aa=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=Ki,Ki=16777216,Jl(e,t,a),Ki=l):Jl(e,t,a));break;default:Jl(e,t,a)}}function Kh(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 Xi(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];Mt=l,Qh(l,e)}Kh(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Xh(e),e=e.sibling}function Xh(e){switch(e.tag){case 0:case 11:case 15:Xi(e),e.flags&2048&&Mn(9,e,e.return);break;case 3:Xi(e);break;case 12:Xi(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,bs(e)):Xi(e);break;default:Xi(e)}}function bs(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];Mt=l,Qh(l,e)}Kh(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Mn(8,t,t.return),bs(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,bs(t));break;default:bs(t)}e=e.sibling}}function Qh(e,t){for(;Mt!==null;){var a=Mt;switch(a.tag){case 0:case 11:case 15:Mn(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:zi(a.memoizedState.cache)}if(l=a.child,l!==null)l.return=a,Mt=l;else e:for(a=e;Mt!==null;){l=Mt;var o=l.sibling,u=l.return;if(Uh(l),l===a){Mt=null;break e}if(o!==null){o.return=u,Mt=o;break e}Mt=u}}}var Xx={getCacheForType:function(e){var t=Lt(_t),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return Lt(_t).controller.signal}},Qx=typeof WeakMap=="function"?WeakMap:Map,Qe=0,tt=null,He=null,qe=0,Ze=0,sa=null,Dn=!1,Wl=!1,Kc=!1,hn=0,mt=0,An=0,gl=0,Xc=0,oa=0,Pl=0,Qi=null,Pt=null,Qc=!1,Ss=0,Zh=0,_s=1/0,js=null,Ln=null,zt=0,kn=null,Il=null,mn=0,Zc=0,Fc=null,Fh=null,Zi=0,Jc=null;function ca(){return(Qe&2)!==0&&qe!==0?qe&-qe:D.T!==null?au():ee()}function Jh(){if(oa===0)if((qe&536870912)===0||Ve){var e=Wa;Wa<<=1,(Wa&3932160)===0&&(Wa=262144),oa=e}else oa=536870912;return e=ia.current,e!==null&&(e.flags|=32),oa}function It(e,t,a){(e===tt&&(Ze===2||Ze===9)||e.cancelPendingCommit!==null)&&(ei(e,0),Un(e,qe,oa,!1)),qa(e,a),((Qe&2)===0||e!==tt)&&(e===tt&&((Qe&2)===0&&(gl|=a),mt===4&&Un(e,qe,oa,!1)),Xa(e))}function Wh(e,t,a){if((Qe&6)!==0)throw Error(s(327));var l=!a&&(t&127)===0&&(t&e.expiredLanes)===0||vn(e,t),o=l?Jx(e,t):Pc(e,t,!0),u=l;do{if(o===0){Wl&&!l&&Un(e,t,0,!1);break}else{if(a=e.current.alternate,u&&!Zx(a)){o=Pc(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=Qi;var w=S.current.memoizedState.isDehydrated;if(w&&(ei(S,y).flags|=256),y=Pc(S,y,!1),y!==2){if(Kc&&!w){S.errorRecoveryDisabledLanes|=u,gl|=u,o=4;break e}u=Pt,Pt=o,u!==null&&(Pt===null?Pt=u:Pt.push.apply(Pt,u))}o=y}if(u=!1,o!==2)continue}}if(o===1){ei(e,0),Un(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:Un(l,t,oa,!Dn);break e;case 2:Pt=null;break;case 3:case 5:break;default:throw Error(s(329))}if((t&62914560)===t&&(o=Ss+300-Dt(),10<o)){if(Un(l,t,oa,!Dn),Nl(l,0,!0)!==0)break e;mn=t,l.timeoutHandle=Rm(Ph.bind(null,l,a,Pt,js,Qc,t,oa,gl,Pl,Dn,u,"Throttled",-0,0),o);break e}Ph(l,a,Pt,js,Qc,t,oa,gl,Pl,Dn,u,null,-0,0)}}break}while(!0);Xa(e)}function Ph(e,t,a,l,o,u,y,S,w,L,Y,X,k,q){if(e.timeoutHandle=-1,X=t.subtreeFlags,X&8192||(X&16785408)===16785408){X={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Pa},$h(t,u,X);var xe=(u&62914560)===u?Ss-Dt():(u&4194048)===u?Zh-Dt():0;if(xe=Mv(X,xe),xe!==null){mn=u,e.cancelPendingCommit=xe(rm.bind(null,e,t,u,a,l,o,y,S,w,Y,X,null,k,q)),Un(e,u,y,!L);return}}rm(e,t,u,a,l,o,y,S,w)}function Zx(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(!na(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 Un(e,t,a,l){t&=~Xc,t&=~gl,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var o=t;0<o;){var u=31-Tt(o),y=1<<u;l[u]=-1,o&=~y}a!==0&&Dr(e,a,t)}function Ns(){return(Qe&6)===0?(Fi(0),!1):!0}function Wc(){if(He!==null){if(Ze===0)var e=He.return;else e=He,an=sl=null,hc(e),$l=null,Oi=0,e=He;for(;e!==null;)zh(e.alternate,e),e=e.return;He=null}}function ei(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,mv(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),mn=0,Wc(),tt=e,He=a=en(e.current,null),qe=t,Ze=0,sa=null,Dn=!1,Wl=vn(e,t),Kc=!1,Pl=oa=Xc=gl=An=mt=0,Pt=Qi=null,Qc=!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-Tt(l),u=1<<o;t|=e[o],l&=~u}return hn=t,Kr(),a}function Ih(e,t){Me=null,D.H=Bi,t===Gl||t===Ir?(t=pf(),Ze=3):t===tc?(t=pf(),Ze=4):Ze=t===zc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,sa=t,He===null&&(mt=1,hs(e,xa(t,e.current)))}function em(){var e=ia.current;return e===null?!0:(qe&4194048)===qe?_a===null:(qe&62914560)===qe||(qe&536870912)!==0?e===_a:!1}function tm(){var e=D.H;return D.H=Bi,e===null?Bi:e}function am(){var e=D.A;return D.A=Xx,e}function Es(){mt=4,Dn||(qe&4194048)!==qe&&ia.current!==null||(Wl=!0),(An&134217727)===0&&(gl&134217727)===0||tt===null||Un(tt,qe,oa,!1)}function Pc(e,t,a){var l=Qe;Qe|=2;var o=tm(),u=am();(tt!==e||qe!==t)&&(js=null,ei(e,t)),t=!1;var y=mt;e:do try{if(Ze!==0&&He!==null){var S=He,w=sa;switch(Ze){case 8:Wc(),y=6;break e;case 3:case 2:case 9:case 6:ia.current===null&&(t=!0);var L=Ze;if(Ze=0,sa=null,ti(e,S,w,L),a&&Wl){y=0;break e}break;default:L=Ze,Ze=0,sa=null,ti(e,S,w,L)}}Fx(),y=mt;break}catch(Y){Ih(e,Y)}while(!0);return t&&e.shellSuspendCounter++,an=sl=null,Qe=l,D.H=o,D.A=u,He===null&&(tt=null,qe=0,Kr()),y}function Fx(){for(;He!==null;)nm(He)}function Jx(e,t){var a=Qe;Qe|=2;var l=tm(),o=am();tt!==e||qe!==t?(js=null,_s=Dt()+500,ei(e,t)):Wl=vn(e,t);e:do try{if(Ze!==0&&He!==null){t=He;var u=sa;t:switch(Ze){case 1:Ze=0,sa=null,ti(e,t,u,1);break;case 2:case 9:if(hf(u)){Ze=0,sa=null,lm(t);break}t=function(){Ze!==2&&Ze!==9||tt!==e||(Ze=7),Xa(e)},u.then(t,t);break e;case 3:Ze=7;break e;case 4:Ze=5;break e;case 7:hf(u)?(Ze=0,sa=null,lm(t)):(Ze=0,sa=null,ti(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?Gm(y):S.stateNode.complete){Ze=0,sa=null;var w=S.sibling;if(w!==null)He=w;else{var L=S.return;L!==null?(He=L,ws(L)):He=null}break t}}Ze=0,sa=null,ti(e,t,u,5);break;case 6:Ze=0,sa=null,ti(e,t,u,6);break;case 8:Wc(),mt=6;break e;default:throw Error(s(462))}}Wx();break}catch(Y){Ih(e,Y)}while(!0);return an=sl=null,D.H=l,D.A=o,Qe=a,He!==null?0:(tt=null,qe=0,Kr(),mt)}function Wx(){for(;He!==null&&!Fn();)nm(He)}function nm(e){var t=Ch(e.alternate,e,hn);e.memoizedProps=e.pendingProps,t===null?ws(e):He=t}function lm(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=Sh(a,t,t.pendingProps,t.type,void 0,qe);break;case 11:t=Sh(a,t,t.pendingProps,t.type.render,t.ref,qe);break;case 5:hc(t);default:zh(a,t),t=He=tf(t,hn),t=Ch(a,t,hn)}e.memoizedProps=e.pendingProps,t===null?ws(e):He=t}function ti(e,t,a,l){an=sl=null,hc(t),$l=null,Oi=0;var o=t.return;try{if(Bx(e,o,t,a,qe)){mt=1,hs(e,xa(a,e.current)),He=null;return}}catch(u){if(o!==null)throw He=o,u;mt=1,hs(e,xa(a,e.current)),He=null;return}t.flags&32768?(Ve||l===1?e=!0:Wl||(qe&536870912)!==0?e=!1:(Dn=e=!0,(l===2||l===9||l===3||l===6)&&(l=ia.current,l!==null&&l.tag===13&&(l.flags|=16384))),im(t,e)):ws(t)}function ws(e){var t=e;do{if((t.flags&32768)!==0){im(t,Dn);return}e=t.return;var a=Vx(t.alternate,t,hn);if(a!==null){He=a;return}if(t=t.sibling,t!==null){He=t;return}He=t=e}while(t!==null);mt===0&&(mt=5)}function im(e,t){do{var a=Gx(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);mt=6,He=null}function rm(e,t,a,l,o,u,y,S,w){e.cancelPendingCommit=null;do Cs();while(zt!==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|=qo,Mr(e,a,u,y,S,w),e===tt&&(He=tt=null,qe=0),Il=t,kn=e,mn=a,Zc=u,Fc=o,Fh=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,tv(De,function(){return dm(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=D.T,D.T=null,o=J.p,J.p=2,y=Qe,Qe|=4;try{$x(e,t,a)}finally{Qe=y,J.p=o,D.T=l}}zt=1,sm(),om(),cm()}}function sm(){if(zt===1){zt=0;var e=kn,t=Il,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=D.T,D.T=null;var l=J.p;J.p=2;var o=Qe;Qe|=4;try{Yh(t,e);var u=uu,y=Xd(e.containerInfo),S=u.focusedElem,w=u.selectionRange;if(y!==S&&S&&S.ownerDocument&&Kd(S.ownerDocument.documentElement,S)){if(w!==null&&Lo(S)){var L=w.start,Y=w.end;if(Y===void 0&&(Y=L),"selectionStart"in S)S.selectionStart=L,S.selectionEnd=Math.min(Y,S.value.length);else{var X=S.ownerDocument||document,k=X&&X.defaultView||window;if(k.getSelection){var q=k.getSelection(),xe=S.textContent.length,we=Math.min(w.start,xe),Ie=w.end===void 0?we:Math.min(w.end,xe);!q.extend&&we>Ie&&(y=Ie,Ie=we,we=y);var O=$d(S,we),z=$d(S,Ie);if(O&&z&&(q.rangeCount!==1||q.anchorNode!==O.node||q.anchorOffset!==O.offset||q.focusNode!==z.node||q.focusOffset!==z.offset)){var A=X.createRange();A.setStart(O.node,O.offset),q.removeAllRanges(),we>Ie?(q.addRange(A),q.extend(z.node,z.offset)):(A.setEnd(z.node,z.offset),q.addRange(A))}}}}for(X=[],q=S;q=q.parentNode;)q.nodeType===1&&X.push({element:q,left:q.scrollLeft,top:q.scrollTop});for(typeof S.focus=="function"&&S.focus(),S=0;S<X.length;S++){var $=X[S];$.element.scrollLeft=$.left,$.element.scrollTop=$.top}}Bs=!!cu,uu=cu=null}finally{Qe=o,J.p=l,D.T=a}}e.current=t,zt=2}}function om(){if(zt===2){zt=0;var e=kn,t=Il,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=D.T,D.T=null;var l=J.p;J.p=2;var o=Qe;Qe|=4;try{kh(e,t.alternate,t)}finally{Qe=o,J.p=l,D.T=a}}zt=3}}function cm(){if(zt===4||zt===3){zt=0,Jn();var e=kn,t=Il,a=mn,l=Fh;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?zt=5:(zt=0,Il=kn=null,um(e,e.pendingLanes));var o=e.pendingLanes;if(o===0&&(Ln=null),B(a),t=t.stateNode,Ct&&typeof Ct.onCommitFiberRoot=="function")try{Ct.onCommitFiberRoot(pa,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=D.T,o=J.p,J.p=2,D.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{D.T=t,J.p=o}}(mn&3)!==0&&Cs(),Xa(e),o=e.pendingLanes,(a&261930)!==0&&(o&42)!==0?e===Jc?Zi++:(Zi=0,Jc=e):Zi=0,Fi(0)}}function um(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,zi(t)))}function Cs(){return sm(),om(),cm(),dm()}function dm(){if(zt!==5)return!1;var e=kn,t=Zc;Zc=0;var a=B(mn),l=D.T,o=J.p;try{J.p=32>a?32:a,D.T=null,a=Fc,Fc=null;var u=kn,y=mn;if(zt=0,Il=kn=null,mn=0,(Qe&6)!==0)throw Error(s(331));var S=Qe;if(Qe|=4,Xh(u.current),Gh(u,u.current,y,a),Qe=S,Fi(0,!1),Ct&&typeof Ct.onPostCommitFiberRoot=="function")try{Ct.onPostCommitFiberRoot(pa,u)}catch{}return!0}finally{J.p=o,D.T=l,um(e,t)}}function fm(e,t,a){t=xa(a,t),t=Rc(e.stateNode,t,2),e=zn(e,t,2),e!==null&&(qa(e,2),Xa(e))}function Fe(e,t,a){if(e.tag===3)fm(e,e,a);else for(;t!==null;){if(t.tag===3){fm(t,e,a);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Ln===null||!Ln.has(l))){e=xa(a,e),a=hh(2),l=zn(t,a,2),l!==null&&(mh(a,l,t,e),qa(l,2),Xa(l));break}}t=t.return}}function Ic(e,t,a){var l=e.pingCache;if(l===null){l=e.pingCache=new Qx;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)||(Kc=!0,o.add(a),e=Px.bind(null,e,t,a),t.then(e,e))}function Px(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&&(mt===4||mt===3&&(qe&62914560)===qe&&300>Dt()-Ss?(Qe&2)===0&&ei(e,0):Xc|=a,Pl===qe&&(Pl=0)),Xa(e)}function hm(e,t){t===0&&(t=yi()),e=ll(e,t),e!==null&&(qa(e,t),Xa(e))}function Ix(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),hm(e,a)}function ev(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),hm(e,a)}function tv(e,t){return ma(e,t)}var Rs=null,ai=null,eu=!1,zs=!1,tu=!1,Hn=0;function Xa(e){e!==ai&&e.next===null&&(ai===null?Rs=ai=e:ai=ai.next=e),zs=!0,eu||(eu=!0,nv())}function Fi(e,t){if(!tu&&zs){tu=!0;do for(var a=!1,l=Rs;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-Tt(42|e)+1)-1,u&=o&~(y&~S),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(a=!0,ym(l,u))}else u=qe,u=Nl(l,l===tt?u:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(u&3)===0||vn(l,u)||(a=!0,ym(l,u));l=l.next}while(a);tu=!1}}function av(){mm()}function mm(){zs=eu=!1;var e=0;Hn!==0&&hv()&&(e=Hn);for(var t=Dt(),a=null,l=Rs;l!==null;){var o=l.next,u=pm(l,t);u===0?(l.next=null,a===null?Rs=o:a.next=o,o===null&&(ai=a)):(a=l,(e!==0||(u&3)!==0)&&(zs=!0)),l=o}zt!==0&&zt!==5||Fi(e),Hn!==0&&(Hn=0)}function pm(e,t){for(var a=e.suspendedLanes,l=e.pingedLanes,o=e.expirationTimes,u=e.pendingLanes&-62914561;0<u;){var y=31-Tt(u),S=1<<y,w=o[y];w===-1?((S&a)===0||(S&l)!==0)&&(o[y]=vo(S,t)):w<=t&&(e.expiredLanes|=S),u&=~S}if(t=tt,a=qe,a=Nl(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&&Ja(l),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||vn(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(l!==null&&Ja(l),B(a)){case 2:case 8:a=pe;break;case 32:a=De;break;case 268435456:a=dt;break;default:a=De}return l=gm.bind(null,e),a=ma(a,l),e.callbackPriority=t,e.callbackNode=a,t}return l!==null&&l!==null&&Ja(l),e.callbackPriority=2,e.callbackNode=null,2}function gm(e,t){if(zt!==0&&zt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(Cs()&&e.callbackNode!==a)return null;var l=qe;return l=Nl(e,e===tt?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(Wh(e,l,t),pm(e,Dt()),e.callbackNode!=null&&e.callbackNode===a?gm.bind(null,e):null)}function ym(e,t){if(Cs())return null;Wh(e,t,!0)}function nv(){pv(function(){(Qe&6)!==0?ma(Ba,av):mm()})}function au(){if(Hn===0){var e=Yl;e===0&&(e=Wn,Wn<<=1,(Wn&261888)===0&&(Wn=256)),Hn=e}return Hn}function xm(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Ur(""+e)}function vm(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 lv(e,t,a,l,o){if(t==="submit"&&a&&a.stateNode===o){var u=xm((o[me]||null).action),y=l.submitter;y&&(t=(t=y[me]||null)?xm(t.formAction):y.getAttribute("formAction"),t!==null&&(u=t,y=null));var S=new Yr("action","action",null,l,o);e.push({event:S,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(Hn!==0){var w=y?vm(o,y):new FormData(o);_c(a,{pending:!0,data:w,method:o.method,action:u},null,w)}}else typeof u=="function"&&(S.preventDefault(),w=y?vm(o,y):new FormData(o),_c(a,{pending:!0,data:w,method:o.method,action:u},u,w))},currentTarget:o}]})}}for(var nu=0;nu<Bo.length;nu++){var lu=Bo[nu],iv=lu.toLowerCase(),rv=lu[0].toUpperCase()+lu.slice(1);Da(iv,"on"+rv)}Da(Fd,"onAnimationEnd"),Da(Jd,"onAnimationIteration"),Da(Wd,"onAnimationStart"),Da("dblclick","onDoubleClick"),Da("focusin","onFocus"),Da("focusout","onBlur"),Da(_x,"onTransitionRun"),Da(jx,"onTransitionStart"),Da(Nx,"onTransitionCancel"),Da(Pd,"onTransitionEnd"),Ya("onMouseEnter",["mouseout","mouseover"]),Ya("onMouseLeave",["mouseout","mouseover"]),Ya("onPointerEnter",["pointerout","pointerover"]),Ya("onPointerLeave",["pointerout","pointerover"]),Ot("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ot("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ot("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ot("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ot("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ot("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ji="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(" "),sv=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ji));function bm(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(Y){$r(Y)}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(Y){$r(Y)}o.currentTarget=null,u=w}}}}function Be(e,t){var a=t[je];a===void 0&&(a=t[je]=new Set);var l=e+"__bubble";a.has(l)||(Sm(t,e,2,!1),a.add(l))}function iu(e,t,a){var l=0;t&&(l|=4),Sm(a,e,l,t)}var Ts="_reactListening"+Math.random().toString(36).slice(2);function ru(e){if(!e[Ts]){e[Ts]=!0,Sn.forEach(function(a){a!=="selectionchange"&&(sv.has(a)||iu(a,!1,e),iu(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ts]||(t[Ts]=!0,iu("selectionchange",!1,t))}}function Sm(e,t,a,l){switch(Jm(t)){case 2:var o=Lv;break;case 8:o=kv;break;default:o=Su}a=o.bind(null,t,a,e),o=void 0,!wo||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 su(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=it(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}Ed(function(){var L=u,Y=No(a),X=[];e:{var k=Id.get(e);if(k!==void 0){var q=Yr,xe=e;switch(e){case"keypress":if(Br(a)===0)break e;case"keydown":case"keyup":q=ex;break;case"focusin":xe="focus",q=To;break;case"focusout":xe="blur",q=To;break;case"beforeblur":case"afterblur":q=To;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=Rd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":q=Vy;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":q=nx;break;case Fd:case Jd:case Wd:q=Ky;break;case Pd:q=ix;break;case"scroll":case"scrollend":q=qy;break;case"wheel":q=sx;break;case"copy":case"cut":case"paste":q=Qy;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":q=Td;break;case"toggle":case"beforetoggle":q=cx}var we=(t&4)!==0,Ie=!we&&(e==="scroll"||e==="scrollend"),O=we?k!==null?k+"Capture":null:k;we=[];for(var z=L,A;z!==null;){var $=z;if(A=$.stateNode,$=$.tag,$!==5&&$!==26&&$!==27||A===null||O===null||($=xi(z,O),$!=null&&we.push(Wi(z,$,A))),Ie)break;z=z.return}0<we.length&&(k=new q(k,xe,null,a,Y),X.push({event:k,listeners:we}))}}if((t&7)===0){e:{if(k=e==="mouseover"||e==="pointerover",q=e==="mouseout"||e==="pointerout",k&&a!==jo&&(xe=a.relatedTarget||a.fromElement)&&(it(xe)||xe[ge]))break e;if((q||k)&&(k=Y.window===Y?Y:(k=Y.ownerDocument)?k.defaultView||k.parentWindow:window,q?(xe=a.relatedTarget||a.toElement,q=L,xe=xe?it(xe):null,xe!==null&&(Ie=d(xe),we=xe.tag,xe!==Ie||we!==5&&we!==27&&we!==6)&&(xe=null)):(q=null,xe=L),q!==xe)){if(we=Rd,$="onMouseLeave",O="onMouseEnter",z="mouse",(e==="pointerout"||e==="pointerover")&&(we=Td,$="onPointerLeave",O="onPointerEnter",z="pointer"),Ie=q==null?k:Ge(q),A=xe==null?k:Ge(xe),k=new we($,z+"leave",q,a,Y),k.target=Ie,k.relatedTarget=A,$=null,it(Y)===L&&(we=new we(O,z+"enter",xe,a,Y),we.target=A,we.relatedTarget=Ie,$=we),Ie=$,q&&xe)t:{for(we=ov,O=q,z=xe,A=0,$=O;$;$=we($))A++;$=0;for(var Ne=z;Ne;Ne=we(Ne))$++;for(;0<A-$;)O=we(O),A--;for(;0<$-A;)z=we(z),$--;for(;A--;){if(O===z||z!==null&&O===z.alternate){we=O;break t}O=we(O),z=we(z)}we=null}else we=null;q!==null&&_m(X,k,q,we,!1),xe!==null&&Ie!==null&&_m(X,Ie,xe,we,!0)}}e:{if(k=L?Ge(L):window,q=k.nodeName&&k.nodeName.toLowerCase(),q==="select"||q==="input"&&k.type==="file")var Ke=Hd;else if(kd(k))if(Bd)Ke=vx;else{Ke=yx;var be=gx}else q=k.nodeName,!q||q.toLowerCase()!=="input"||k.type!=="checkbox"&&k.type!=="radio"?L&&_o(L.elementType)&&(Ke=Hd):Ke=xx;if(Ke&&(Ke=Ke(e,L))){Ud(X,Ke,a,Y);break e}be&&be(e,k,L),e==="focusout"&&L&&k.type==="number"&&L.memoizedProps.value!=null&&So(k,"number",k.value)}switch(be=L?Ge(L):window,e){case"focusin":(kd(be)||be.contentEditable==="true")&&(Dl=be,ko=L,wi=null);break;case"focusout":wi=ko=Dl=null;break;case"mousedown":Uo=!0;break;case"contextmenu":case"mouseup":case"dragend":Uo=!1,Qd(X,a,Y);break;case"selectionchange":if(Sx)break;case"keydown":case"keyup":Qd(X,a,Y)}var Ae;if(Mo)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 Ml?Ad(e,a)&&(Ye="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(Ye="onCompositionStart");Ye&&(Od&&a.locale!=="ko"&&(Ml||Ye!=="onCompositionStart"?Ye==="onCompositionEnd"&&Ml&&(Ae=wd()):(_n=Y,Co="value"in _n?_n.value:_n.textContent,Ml=!0)),be=Os(L,Ye),0<be.length&&(Ye=new zd(Ye,e,null,a,Y),X.push({event:Ye,listeners:be}),Ae?Ye.data=Ae:(Ae=Ld(a),Ae!==null&&(Ye.data=Ae)))),(Ae=dx?fx(e,a):hx(e,a))&&(Ye=Os(L,"onBeforeInput"),0<Ye.length&&(be=new zd("onBeforeInput","beforeinput",null,a,Y),X.push({event:be,listeners:Ye}),be.data=Ae)),lv(X,e,L,a,Y)}bm(X,t)})}function Wi(e,t,a){return{instance:e,listener:t,currentTarget:a}}function Os(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=xi(e,a),o!=null&&l.unshift(Wi(e,o,u)),o=xi(e,t),o!=null&&l.push(Wi(e,o,u))),e.tag===3)return l;e=e.return}return[]}function ov(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function _m(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=xi(a,u),L!=null&&y.unshift(Wi(a,L,w))):o||(L=xi(a,u),L!=null&&y.push(Wi(a,L,w)))),a=a.return}y.length!==0&&e.push({event:t,listeners:y})}var cv=/\r\n?/g,uv=/\u0000|\uFFFD/g;function jm(e){return(typeof e=="string"?e:""+e).replace(cv,`
9
+ `).replace(uv,"")}function Nm(e,t){return t=jm(t),jm(e)===t}function Pe(e,t,a,l,o,u){switch(a){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||zl(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&zl(e,""+l);break;case"className":yt(e,"class",l);break;case"tabIndex":yt(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":yt(e,a,l);break;case"style":jd(e,l,u);break;case"data":if(t!=="object"){yt(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=Ur(""+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"&&Pe(e,t,"name",o.name,o,null),Pe(e,t,"formEncType",o.formEncType,o,null),Pe(e,t,"formMethod",o.formMethod,o,null),Pe(e,t,"formTarget",o.formTarget,o,null)):(Pe(e,t,"encType",o.encType,o,null),Pe(e,t,"method",o.method,o,null),Pe(e,t,"target",o.target,o,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=Ur(""+l),e.setAttribute(a,l);break;case"onClick":l!=null&&(e.onclick=Pa);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=Ur(""+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":Bt(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":Bt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":Bt(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":Bt(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":Bt(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":Bt(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":Bt(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":Bt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":Bt(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=Hy.get(a)||a,Ue(e,a,l))}}function ou(e,t,a,l,o,u){switch(a){case"style":jd(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"?zl(e,l):(typeof l=="number"||typeof l=="bigint")&&zl(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=Pa);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Ma.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 Ut(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:Pe(e,t,u,y,a,null)}}o&&Pe(e,t,"srcSet",a.srcSet,a,null),l&&Pe(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 Y=a[l];if(Y!=null)switch(l){case"name":o=Y;break;case"type":y=Y;break;case"checked":w=Y;break;case"defaultChecked":L=Y;break;case"value":u=Y;break;case"defaultValue":S=Y;break;case"children":case"dangerouslySetInnerHTML":if(Y!=null)throw Error(s(137,t));break;default:Pe(e,t,l,Y,a,null)}}vd(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:Pe(e,t,o,S,a,null)}t=u,a=y,e.multiple=!!l,t!=null?Rl(e,!!l,t,!1):a!=null&&Rl(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:Pe(e,t,y,S,a,null)}Sd(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":Pe(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<Ji.length;l++)Be(Ji[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:Pe(e,t,L,l,a,null)}return;default:if(_o(t)){for(Y in a)a.hasOwnProperty(Y)&&(l=a[Y],l!==void 0&&ou(e,t,Y,l,a,void 0));return}}for(S in a)a.hasOwnProperty(S)&&(l=a[S],l!=null&&Pe(e,t,S,l,a,null))}function dv(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,Y=null;for(q in a){var X=a[q];if(a.hasOwnProperty(q)&&X!=null)switch(q){case"checked":break;case"value":break;case"defaultValue":w=X;default:l.hasOwnProperty(q)||Pe(e,t,q,null,l,X)}}for(var k in l){var q=l[k];if(X=a[k],l.hasOwnProperty(k)&&(q!=null||X!=null))switch(k){case"type":u=q;break;case"name":o=q;break;case"checked":L=q;break;case"defaultChecked":Y=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!==X&&Pe(e,t,k,q,l,X)}}bo(e,y,S,w,L,Y,u,o);return;case"select":q=y=S=k=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)||Pe(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":k=u;break;case"defaultValue":S=u;break;case"multiple":y=u;default:u!==w&&Pe(e,t,o,u,l,w)}t=S,a=y,l=q,k!=null?Rl(e,!!a,k,!1):!!l!=!!a&&(t!=null?Rl(e,!!a,t,!0):Rl(e,!!a,a?[]:"",!1));return;case"textarea":q=k=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:Pe(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":k=o;break;case"defaultValue":q=o;break;case"children":break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(s(91));break;default:o!==u&&Pe(e,t,y,o,l,u)}bd(e,k,q);return;case"option":for(var xe in a)k=a[xe],a.hasOwnProperty(xe)&&k!=null&&!l.hasOwnProperty(xe)&&(xe==="selected"?e.selected=!1:Pe(e,t,xe,null,l,k));for(w in l)k=l[w],q=a[w],l.hasOwnProperty(w)&&k!==q&&(k!=null||q!=null)&&(w==="selected"?e.selected=k&&typeof k!="function"&&typeof k!="symbol":Pe(e,t,w,k,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 we in a)k=a[we],a.hasOwnProperty(we)&&k!=null&&!l.hasOwnProperty(we)&&Pe(e,t,we,null,l,k);for(L in l)if(k=l[L],q=a[L],l.hasOwnProperty(L)&&k!==q&&(k!=null||q!=null))switch(L){case"children":case"dangerouslySetInnerHTML":if(k!=null)throw Error(s(137,t));break;default:Pe(e,t,L,k,l,q)}return;default:if(_o(t)){for(var Ie in a)k=a[Ie],a.hasOwnProperty(Ie)&&k!==void 0&&!l.hasOwnProperty(Ie)&&ou(e,t,Ie,void 0,l,k);for(Y in l)k=l[Y],q=a[Y],!l.hasOwnProperty(Y)||k===q||k===void 0&&q===void 0||ou(e,t,Y,k,l,q);return}}for(var O in a)k=a[O],a.hasOwnProperty(O)&&k!=null&&!l.hasOwnProperty(O)&&Pe(e,t,O,null,l,k);for(X in l)k=l[X],q=a[X],!l.hasOwnProperty(X)||k===q||k==null&&q==null||Pe(e,t,X,k,l,q)}function Em(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function fv(){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&&Em(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 Y=w.transferSize,X=w.initiatorType;Y&&Em(X)&&(w=w.responseEnd,y+=Y*(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 cu=null,uu=null;function Ms(e){return e.nodeType===9?e:e.ownerDocument}function wm(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 Cm(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 du(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 fu=null;function hv(){var e=window.event;return e&&e.type==="popstate"?e===fu?!1:(fu=e,!0):(fu=null,!1)}var Rm=typeof setTimeout=="function"?setTimeout:void 0,mv=typeof clearTimeout=="function"?clearTimeout:void 0,zm=typeof Promise=="function"?Promise:void 0,pv=typeof queueMicrotask=="function"?queueMicrotask:typeof zm<"u"?function(e){return zm.resolve(null).then(e).catch(gv)}:Rm;function gv(e){setTimeout(function(){throw e})}function Bn(e){return e==="head"}function Tm(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),ri(t);return}l--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")l++;else if(a==="html")Pi(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,Pi(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"&&Pi(e.ownerDocument.body);a=o}while(a);ri(t)}function Om(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 hu(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":hu(a),et(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function yv(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=ja(e.nextSibling),e===null)break}return null}function xv(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=ja(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=ja(e.nextSibling),e===null))return null;return e}function mu(e){return e.data==="$?"||e.data==="$~"}function pu(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function vv(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 ja(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 gu=null;function Dm(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return ja(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function Am(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 Lm(e,t,a){switch(t=Ms(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 Pi(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);et(e)}var Na=new Map,km=new Set;function Ds(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var pn=J.d;J.d={f:bv,r:Sv,D:_v,C:jv,L:Nv,m:Ev,X:Cv,S:wv,M:Rv};function bv(){var e=pn.f(),t=Ns();return e||t}function Sv(e){var t=ft(e);t!==null&&t.tag===5&&t.type==="form"?If(t):pn.r(e)}var ni=typeof document>"u"?null:document;function Um(e,t,a){var l=ni;if(l&&typeof t=="string"&&t){var o=ga(t);o='link[rel="'+e+'"][href="'+o+'"]',typeof a=="string"&&(o+='[crossorigin="'+a+'"]'),km.has(o)||(km.add(o),e={rel:e,crossOrigin:a,href:t},l.querySelector(o)===null&&(t=l.createElement("link"),Ut(t,"link",e),nt(t),l.head.appendChild(t)))}}function _v(e){pn.D(e),Um("dns-prefetch",e,null)}function jv(e,t){pn.C(e,t),Um("preconnect",e,t)}function Nv(e,t,a){pn.L(e,t,a);var l=ni;if(l&&e&&t){var o='link[rel="preload"][as="'+ga(t)+'"]';t==="image"&&a&&a.imageSrcSet?(o+='[imagesrcset="'+ga(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(o+='[imagesizes="'+ga(a.imageSizes)+'"]')):o+='[href="'+ga(e)+'"]';var u=o;switch(t){case"style":u=li(e);break;case"script":u=ii(e)}Na.has(u)||(e=x({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),Na.set(u,e),l.querySelector(o)!==null||t==="style"&&l.querySelector(Ii(u))||t==="script"&&l.querySelector(er(u))||(t=l.createElement("link"),Ut(t,"link",e),nt(t),l.head.appendChild(t)))}}function Ev(e,t){pn.m(e,t);var a=ni;if(a&&e){var l=t&&typeof t.as=="string"?t.as:"script",o='link[rel="modulepreload"][as="'+ga(l)+'"][href="'+ga(e)+'"]',u=o;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=ii(e)}if(!Na.has(u)&&(e=x({rel:"modulepreload",href:e},t),Na.set(u,e),a.querySelector(o)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(er(u)))return}l=a.createElement("link"),Ut(l,"link",e),nt(l),a.head.appendChild(l)}}}function wv(e,t,a){pn.S(e,t,a);var l=ni;if(l&&e){var o=Rt(l).hoistableStyles,u=li(e);t=t||"default";var y=o.get(u);if(!y){var S={loading:0,preload:null};if(y=l.querySelector(Ii(u)))S.loading=5;else{e=x({rel:"stylesheet",href:e,"data-precedence":t},a),(a=Na.get(u))&&yu(e,a);var w=y=l.createElement("link");nt(w),Ut(w,"link",e),w._p=new Promise(function(L,Y){w.onload=L,w.onerror=Y}),w.addEventListener("load",function(){S.loading|=1}),w.addEventListener("error",function(){S.loading|=2}),S.loading|=4,As(y,t,l)}y={type:"stylesheet",instance:y,count:1,state:S},o.set(u,y)}}}function Cv(e,t){pn.X(e,t);var a=ni;if(a&&e){var l=Rt(a).hoistableScripts,o=ii(e),u=l.get(o);u||(u=a.querySelector(er(o)),u||(e=x({src:e,async:!0},t),(t=Na.get(o))&&xu(e,t),u=a.createElement("script"),nt(u),Ut(u,"link",e),a.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},l.set(o,u))}}function Rv(e,t){pn.M(e,t);var a=ni;if(a&&e){var l=Rt(a).hoistableScripts,o=ii(e),u=l.get(o);u||(u=a.querySelector(er(o)),u||(e=x({src:e,async:!0,type:"module"},t),(t=Na.get(o))&&xu(e,t),u=a.createElement("script"),nt(u),Ut(u,"link",e),a.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},l.set(o,u))}}function Hm(e,t,a,l){var o=(o=_e.current)?Ds(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=li(a.href),a=Rt(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=li(a.href);var u=Rt(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(Ii(e)))&&!u._p&&(y.instance=u,y.state.loading=5),Na.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},Na.set(e,a),u||zv(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=ii(a),a=Rt(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 li(e){return'href="'+ga(e)+'"'}function Ii(e){return'link[rel="stylesheet"]['+e+"]"}function Bm(e){return x({},e,{"data-precedence":e.precedence,precedence:null})}function zv(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}),Ut(t,"link",a),nt(t),e.head.appendChild(t))}function ii(e){return'[src="'+ga(e)+'"]'}function er(e){return"script[async]"+e}function qm(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+ga(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),Ut(l,"style",o),As(l,a.precedence,e),t.instance=l;case"stylesheet":o=li(a.href);var u=e.querySelector(Ii(o));if(u)return t.state.loading|=4,t.instance=u,nt(u),u;l=Bm(a),(o=Na.get(o))&&yu(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}),Ut(u,"link",l),t.state.loading|=4,As(u,a.precedence,e),t.instance=u;case"script":return u=ii(a.src),(o=e.querySelector(er(u)))?(t.instance=o,nt(o),o):(l=a,(o=Na.get(u))&&(l=x({},a),xu(l,o)),e=e.ownerDocument||e,o=e.createElement("script"),nt(o),Ut(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,As(l,a.precedence,e));return t.instance}function As(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 yu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function xu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Ls=null;function Ym(e,t,a){if(Ls===null){var l=new Map,o=Ls=new Map;o.set(a,l)}else o=Ls,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[re]||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 Vm(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function Tv(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 Gm(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Ov(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=li(l.href),u=t.querySelector(Ii(o));if(u){t=u._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=ks.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=u,nt(u);return}u=t.ownerDocument||t,l=Bm(l),(o=Na.get(o))&&yu(l,o),u=u.createElement("link"),nt(u);var y=u;y._p=new Promise(function(S,w){y.onload=S,y.onerror=w}),Ut(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=ks.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var vu=0;function Mv(e,t){return e.stylesheets&&e.count===0&&Hs(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var l=setTimeout(function(){if(e.stylesheets&&Hs(e,e.stylesheets),e.unsuspend){var u=e.unsuspend;e.unsuspend=null,u()}},6e4+t);0<e.imgBytes&&vu===0&&(vu=62500*fv());var o=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Hs(e,e.stylesheets),e.unsuspend)){var u=e.unsuspend;e.unsuspend=null,u()}},(e.imgBytes>vu?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(o)}}:null}function ks(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Hs(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Us=null;function Hs(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Us=new Map,t.forEach(Dv,e),Us=null,ks.call(e))}function Dv(e,t){if(!(t.state.loading&4)){var a=Us.get(e);if(a)var l=a.get(null);else{a=new Map,Us.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=ks.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 tr={$$typeof:K,Provider:null,Consumer:null,_currentValue:ce,_currentValue2:ce,_threadCount:0};function Av(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=bn(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=bn(0),this.hiddenUpdates=bn(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 $m(e,t,a,l,o,u,y,S,w,L,Y,X){return e=new Av(e,t,a,y,w,L,Y,X,S),t=1,u===!0&&(t|=24),u=la(3,null,null,t),e.current=u,u.stateNode=e,t=Po(),t.refCount++,e.pooledCache=t,t.refCount++,u.memoizedState={element:l,isDehydrated:a,cache:t},ac(u),e}function Km(e){return e?(e=kl,e):kl}function Xm(e,t,a,l,o,u){o=Km(o),l.context===null?l.context=o:l.pendingContext=o,l=Rn(t),l.payload={element:a},u=u===void 0?null:u,u!==null&&(l.callback=u),a=zn(e,l,t),a!==null&&(It(a,e,t),Di(a,e,t))}function Qm(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function bu(e,t){Qm(e,t),(e=e.alternate)&&Qm(e,t)}function Zm(e){if(e.tag===13||e.tag===31){var t=ll(e,67108864);t!==null&&It(t,e,67108864),bu(e,67108864)}}function Fm(e){if(e.tag===13||e.tag===31){var t=ca();t=T(t);var a=ll(e,t);a!==null&&It(a,e,t),bu(e,t)}}var Bs=!0;function Lv(e,t,a,l){var o=D.T;D.T=null;var u=J.p;try{J.p=2,Su(e,t,a,l)}finally{J.p=u,D.T=o}}function kv(e,t,a,l){var o=D.T;D.T=null;var u=J.p;try{J.p=8,Su(e,t,a,l)}finally{J.p=u,D.T=o}}function Su(e,t,a,l){if(Bs){var o=_u(l);if(o===null)su(e,t,l,qs,a),Wm(e,l);else if(Hv(o,e,t,a,l))l.stopPropagation();else if(Wm(e,l),t&4&&-1<Uv.indexOf(e)){for(;o!==null;){var u=ft(o);if(u!==null)switch(u.tag){case 3:if(u=u.stateNode,u.current.memoizedState.isDehydrated){var y=Oa(u.pendingLanes);if(y!==0){var S=u;for(S.pendingLanes|=2,S.entangledLanes|=2;y;){var w=1<<31-Tt(y);S.entanglements[1]|=w,y&=~w}Xa(u),(Qe&6)===0&&(_s=Dt()+500,Fi(0))}}break;case 31:case 13:S=ll(u,2),S!==null&&It(S,u,2),Ns(),bu(u,2)}if(u=_u(l),u===null&&su(e,t,l,qs,a),u===o)break;o=u}o!==null&&l.stopPropagation()}else su(e,t,l,null,a)}}function _u(e){return e=No(e),ju(e)}var qs=null;function ju(e){if(qs=null,e=it(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 qs=e,null}function Jm(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(Ta()){case Ba:return 2;case pe:return 8;case De:case Je:return 32;case dt:return 268435456;default:return 32}default:return 32}}var Nu=!1,qn=null,Yn=null,Vn=null,ar=new Map,nr=new Map,Gn=[],Uv="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 Wm(e,t){switch(e){case"focusin":case"focusout":qn=null;break;case"dragenter":case"dragleave":Yn=null;break;case"mouseover":case"mouseout":Vn=null;break;case"pointerover":case"pointerout":ar.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":nr.delete(t.pointerId)}}function lr(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=ft(t),t!==null&&Zm(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function Hv(e,t,a,l,o){switch(t){case"focusin":return qn=lr(qn,e,t,a,l,o),!0;case"dragenter":return Yn=lr(Yn,e,t,a,l,o),!0;case"mouseover":return Vn=lr(Vn,e,t,a,l,o),!0;case"pointerover":var u=o.pointerId;return ar.set(u,lr(ar.get(u)||null,e,t,a,l,o)),!0;case"gotpointercapture":return u=o.pointerId,nr.set(u,lr(nr.get(u)||null,e,t,a,l,o)),!0}return!1}function Pm(e){var t=it(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,te(e.priority,function(){Fm(a)});return}}else if(t===31){if(t=p(a),t!==null){e.blockedOn=t,te(e.priority,function(){Fm(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 Ys(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=_u(e.nativeEvent);if(a===null){a=e.nativeEvent;var l=new a.constructor(a.type,a);jo=l,a.target.dispatchEvent(l),jo=null}else return t=ft(a),t!==null&&Zm(t),e.blockedOn=a,!1;t.shift()}return!0}function Im(e,t,a){Ys(e)&&a.delete(t)}function Bv(){Nu=!1,qn!==null&&Ys(qn)&&(qn=null),Yn!==null&&Ys(Yn)&&(Yn=null),Vn!==null&&Ys(Vn)&&(Vn=null),ar.forEach(Im),nr.forEach(Im)}function Vs(e,t){e.blockedOn===t&&(e.blockedOn=null,Nu||(Nu=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,Bv)))}var Gs=null;function ep(e){Gs!==e&&(Gs=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Gs===e&&(Gs=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(ju(l||a)===null)continue;break}var u=ft(a);u!==null&&(e.splice(t,3),t-=3,_c(u,{pending:!0,data:o,method:a.method,action:l},l,o))}}))}function ri(e){function t(w){return Vs(w,e)}qn!==null&&Vs(qn,e),Yn!==null&&Vs(Yn,e),Vn!==null&&Vs(Vn,e),ar.forEach(t),nr.forEach(t);for(var a=0;a<Gn.length;a++){var l=Gn[a];l.blockedOn===e&&(l.blockedOn=null)}for(;0<Gn.length&&(a=Gn[0],a.blockedOn===null);)Pm(a),a.blockedOn===null&&Gn.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||ep(a);else if(y){var S=null;if(u&&u.hasAttribute("formAction")){if(o=u,y=u[me]||null)S=y.formAction;else if(ju(o)!==null)continue}else S=y.action;typeof S=="function"?a[l+1]=S:(a.splice(l,3),l-=3),ep(a)}}}function tp(){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 Eu(e){this._internalRoot=e}$s.prototype.render=Eu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(s(409));var a=t.current,l=ca();Xm(a,l,e,t,null,null)},$s.prototype.unmount=Eu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Xm(e.current,2,null,e,null,null),Ns(),t[ge]=null}};function $s(e){this._internalRoot=e}$s.prototype.unstable_scheduleHydration=function(e){if(e){var t=ee();e={blockedOn:null,target:e,priority:t};for(var a=0;a<Gn.length&&t!==0&&t<Gn[a].priority;a++);Gn.splice(a,0,e),a===0&&Pm(e)}};var ap=i.version;if(ap!=="19.2.4")throw Error(s(527,ap,"19.2.4"));J.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 qv={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:D,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ks=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ks.isDisabled&&Ks.supportsFiber)try{pa=Ks.inject(qv),Ct=Ks}catch{}}return sr.createRoot=function(e,t){if(!c(e))throw Error(s(299));var a=!1,l="",o=ch,u=uh,y=dh;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=$m(e,1,!1,null,null,a,l,null,o,u,y,tp),e[ge]=t.current,ru(e),new Eu(t)},sr.hydrateRoot=function(e,t,a){if(!c(e))throw Error(s(299));var l=!1,o="",u=ch,y=uh,S=dh,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=$m(e,1,!0,t,a??null,l,o,w,u,y,S,tp),t.context=Km(null),a=t.current,l=ca(),l=T(l),o=Rn(l),o.callback=null,zn(a,o,l),a=l,t.current.lanes=a,qa(t,a),Xa(t),e[ge]=t.current,ru(e),new $s(t)},sr.version="19.2.4",sr}var Dp;function lb(){if(Dp)return Du.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(),Du.exports=nb(),Du.exports}var ib=lb();var Yg=n=>{throw TypeError(n)},rb=(n,i,r)=>i.has(n)||Yg("Cannot "+r),Uu=(n,i,r)=>(rb(n,i,"read from private field"),r?r.call(n):i.get(n)),sb=(n,i,r)=>i.has(n)?Yg("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(n):i.set(n,r),Ap="popstate";function Lp(n){return typeof n=="object"&&n!=null&&"pathname"in n&&"search"in n&&"hash"in n&&"state"in n&&"key"in n}function ob(n={}){function i(s,c){let d=c.state?.masked,{pathname:h,search:p,hash:g}=d||s.location;return xr("",{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:Za(c)}return ub(i,r,null,n)}function Le(n,i){if(n===!1||n===null||typeof n>"u")throw new Error(i)}function pt(n,i){if(!n){typeof console<"u"&&console.warn(i);try{throw new Error(i)}catch{}}}function cb(){return Math.random().toString(36).substring(2,10)}function kp(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 xr(n,i,r=null,s,c){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof i=="string"?xn(i):i,state:r,key:i&&i.key||s||cb(),unstable_mask:c}}function Za({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 xn(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 ub(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 U=b(),Z=U==null?null:U-m;m=U,g&&g({action:p,location:M.location,delta:Z})}function _(U,Z){p="PUSH";let G=Lp(U)?U:xr(M.location,U,Z);m=b()+1;let K=kp(G,m),ie=M.createHref(G.unstable_mask||G);try{h.pushState(K,"",ie)}catch(ae){if(ae instanceof DOMException&&ae.name==="DataCloneError")throw ae;c.location.assign(ie)}d&&g&&g({action:p,location:M.location,delta:1})}function j(U,Z){p="REPLACE";let G=Lp(U)?U:xr(M.location,U,Z);m=b();let K=kp(G,m),ie=M.createHref(G.unstable_mask||G);h.replaceState(K,"",ie),d&&g&&g({action:p,location:M.location,delta:0})}function R(U){return Vg(U)}let M={get action(){return p},get location(){return n(c,h)},listen(U){if(g)throw new Error("A history only accepts one active listener");return c.addEventListener(Ap,x),g=U,()=>{c.removeEventListener(Ap,x),g=null}},createHref(U){return i(c,U)},createURL:R,encodeLocation(U){let Z=R(U);return{pathname:Z.pathname,search:Z.search,hash:Z.hash}},push:_,replace:j,go(U){return h.go(U)}};return M}function Vg(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:Za(n);return s=s.replace(/ $/,"%20"),!i&&s.startsWith("//")&&(s=r+s),new URL(s,r)}var fr,Up=class{constructor(n){if(sb(this,fr,new Map),n)for(let[i,r]of n)this.set(i,r)}get(n){if(Uu(this,fr).has(n))return Uu(this,fr).get(n);if(n.defaultValue!==void 0)return n.defaultValue;throw new Error("No value found for context")}set(n,i){Uu(this,fr).set(n,i)}};fr=new WeakMap;var db=new Set(["lazy","caseSensitive","path","id","index","children"]);function fb(n){return db.has(n)}var hb=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function mb(n){return hb.has(n)}function pb(n){return n.index===!0}function vr(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`),pb(d)){let m={...d,id:g};return s[g]=Hp(m,i(m)),m}else{let m={...d,id:g,children:void 0};return s[g]=Hp(m,i(m)),d.children&&(m.children=vr(d.children,i,p,s,c)),m}})}function Hp(n,i){return Object.assign(n,{...i,...typeof i.lazy=="object"&&i.lazy!=null?{lazy:{...n.lazy,...i.lazy}}:{}})}function Kn(n,i,r="/"){return hr(n,i,r,!1)}function hr(n,i,r,s){let c=typeof i=="string"?xn(i):i,d=Ca(c.pathname||"/",r);if(d==null)return null;let h=Gg(n);yb(h);let p=null;for(let g=0;p==null&&g<h.length;++g){let m=Rb(d);p=wb(h[g],m,s)}return p}function gb(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 Gg(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=ka([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}".`),Gg(h.children,i,_,x,g)),!(h.path==null&&!h.index)&&i.push({path:x,score:Nb(x,h.index),routesMeta:_})};return n.forEach((h,p)=>{if(h.path===""||!h.path?.includes("?"))d(h,p);else for(let g of $g(h.path))d(h,p,!0,g)}),i}function $g(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=$g(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 yb(n){n.sort((i,r)=>i.score!==r.score?r.score-i.score:Eb(i.routesMeta.map(s=>s.childrenIndex),r.routesMeta.map(s=>s.childrenIndex)))}var xb=/^:[\w-]+$/,vb=3,bb=2,Sb=1,_b=10,jb=-2,Bp=n=>n==="*";function Nb(n,i){let r=n.split("/"),s=r.length;return r.some(Bp)&&(s+=jb),i&&(s+=bb),r.filter(c=>!Bp(c)).reduce((c,d)=>c+(xb.test(d)?vb:d===""?Sb:_b),s)}function Eb(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 wb(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=io({path:g.relativePath,caseSensitive:g.caseSensitive,end:m},b),_=g.route;if(!x&&m&&r&&!s[s.length-1].route.index&&(x=io({path:g.relativePath,caseSensitive:g.caseSensitive,end:!1},b)),!x)return null;Object.assign(c,x.params),h.push({params:c,pathname:ka([d,x.pathname]),pathnameBase:Ob(ka([d,x.pathnameBase])),route:_}),x.pathnameBase!=="/"&&(d=ka([d,x.pathnameBase]))}return h}function io(n,i){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[r,s]=Cb(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 Cb(n,i=!1,r=!0){pt(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 Rb(n){try{return n.split("/").map(i=>decodeURIComponent(i).replace(/\//g,"%2F")).join("/")}catch(i){return pt(!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 Ca(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 zb({basename:n,pathname:i}){return i==="/"?n:ka([n,i])}var Kg=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,rd=n=>Kg.test(n);function Tb(n,i="/"){let{pathname:r,search:s="",hash:c=""}=typeof n=="string"?xn(n):n,d;return r?(r=r.replace(/\/\/+/g,"/"),r.startsWith("/")?d=qp(r.substring(1),"/"):d=qp(r,i)):d=i,{pathname:d,search:Mb(s),hash:Db(c)}}function qp(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 Hu(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 Xg(n){return n.filter((i,r)=>r===0||i.route.path&&i.route.path.length>0)}function co(n){let i=Xg(n);return i.map((r,s)=>s===i.length-1?r.pathname:r.pathnameBase)}function jr(n,i,r,s=!1){let c;typeof n=="string"?c=xn(n):(c={...n},Le(!c.pathname||!c.pathname.includes("?"),Hu("?","pathname","search",c)),Le(!c.pathname||!c.pathname.includes("#"),Hu("#","pathname","hash",c)),Le(!c.search||!c.search.includes("#"),Hu("#","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=Tb(c,p),m=h&&h!=="/"&&h.endsWith("/"),b=(d||h===".")&&r.endsWith("/");return!g.pathname.endsWith("/")&&(m||b)&&(g.pathname+="/"),g}var ka=n=>n.join("/").replace(/\/\/+/g,"/"),Ob=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),Mb=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,Db=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n,Nr=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 br(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}function Er(n){return n.map(i=>i.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Qg=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Zg(n,i){let r=n;if(typeof r!="string"||!Kg.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let s=r,c=!1;if(Qg)try{let d=new URL(window.location.href),h=r.startsWith("//")?new URL(d.protocol+r):new URL(r),p=Ca(h.pathname,i);h.origin===d.origin&&p!=null?r=p+h.search+h.hash:c=!0}catch{pt(!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 Qn=Symbol("Uninstrumented");function Ab(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=di(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=di(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[Qn]??d,p=di(r[c],h,(...g)=>Yp(g[0]));p&&(c==="loader"&&h.hydrate===!0&&(p.hydrate=!0),p[Qn]=h,s[c]=p)}}),i.middleware&&i.middleware.length>0&&r.middleware.length>0&&(s.middleware=i.middleware.map(c=>{let d=c[Qn]??c,h=di(r.middleware,d,(...p)=>Yp(p[0]));return h?(h[Qn]=d,h):c})),s}function Lb(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[Qn]??n.navigate,c=di(r.navigate,s,(...d)=>{let[h,p]=d;return{to:typeof h=="number"||typeof h=="string"?h:h?Za(h):".",...Vp(n,p??{})}});c&&(c[Qn]=s,n.navigate=c)}if(r.fetch.length>0){let s=n.fetch[Qn]??n.fetch,c=di(r.fetch,s,(...d)=>{let[h,,p,g]=d;return{href:p??".",fetcherKey:h,...Vp(n,g??{})}});c&&(c[Qn]=s,n.fetch=c)}return n}function di(n,i,r){return n.length===0?null:async(...s)=>{let c=await Fg(n,r(...s),()=>i(...s),n.length-1);if(c.type==="error")throw c.value;return c.value}}async function Fg(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=Fg(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 Yp(n){let{request:i,context:r,params:s,unstable_pattern:c}=n;return{request:kb(i),params:{...s},unstable_pattern:c,context:Ub(r)}}function Vp(n,i){return{currentUrl:Za(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 kb(n){return{method:n.method,url:n.url,headers:{get:(...i)=>n.headers.get(...i)}}}function Ub(n){if(Bb(n)){let i={...n};return Object.freeze(i),i}else return{get:i=>n.get(i)}}var Hb=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Bb(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")===Hb}var Jg=["POST","PUT","PATCH","DELETE"],qb=new Set(Jg),Yb=["GET",...Jg],Vb=new Set(Yb),Wg=new Set([301,302,303,307,308]),Gb=new Set([307,308]),Bu={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},$b={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},or={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Kb=n=>({hasErrorBoundary:!!n.hasErrorBoundary}),Pg="remix-router-transitions",Ig=Symbol("ResetLoaderData");function Xb(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||Kb,d=c;if(n.unstable_instrumentations){let C=n.unstable_instrumentations;d=T=>({...c(T),...Ab(C.map(B=>B.route).filter(Boolean),T)})}let h={},p=vr(n.routes,d,void 0,h),g,m=n.basename||"/";m.startsWith("/")||(m=`/${m}`);let b=n.dataStrategy||Wb,x={...n.future},_=null,j=new Set,R=null,M=null,U=null,Z=n.hydrationData!=null,G=Kn(p,n.history.location,m),K=!1,ie=null,ae,oe;if(G==null&&!n.patchRoutesOnNavigation){let C=Ea(404,{pathname:n.history.location.pathname}),{matches:T,route:B}=Qs(p);ae=!0,oe=!ae,G=T,ie={[B.id]:C}}else if(G&&!n.hydrationData&&bn(G,p,n.history.location.pathname).active&&(G=null),G)if(G.some(C=>C.route.lazy))ae=!1,oe=!ae;else if(!G.some(C=>sd(C.route)))ae=!0,oe=!ae;else{let C=n.hydrationData?n.hydrationData.loaderData:null,T=n.hydrationData?n.hydrationData.errors:null,B=G;if(T){let ee=G.findIndex(te=>T[te.route.id]!==void 0);B=B.slice(0,ee+1)}oe=!1,ae=B.every(ee=>{let te=ey(ee.route,C,T);return oe=oe||te.renderFallback,!te.shouldLoad})}else{ae=!1,oe=!ae,G=[];let C=bn(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:ae,renderFallback:oe,navigation:Bu,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||ie,fetchers:new Map,blockers:new Map},Q="POP",F=null,ue=!1,ne,P=!1,se=new Map,fe=null,D=!1,J=!1,ce=new Set,V=new Map,de=0,E=-1,H=new Map,I=new Set,le=new Map,ve=new Map,_e=new Set,ze=new Map,lt,he=null;function wt(){if(_=n.history.listen(({action:C,location:T,delta:B})=>{if(lt){lt(),lt=void 0;return}pt(ze.size===0||B!=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 ee=Pn({currentLocation:N.location,nextLocation:T,historyAction:C});if(ee&&B!=null){let te=new Promise(ye=>{lt=ye});n.history.go(B*-1),Wa(ee,{state:"blocked",location:T,proceed(){Wa(ee,{state:"proceeding",proceed:void 0,reset:void 0,location:T}),te.then(()=>n.history.go(B))},reset(){let ye=new Map(N.blockers);ye.set(ee,or),at({blockers:ye})}}),F?.resolve(),F=null;return}return aa(C,T)}),r){p1(i,se);let C=()=>g1(i,se);i.addEventListener("pagehide",C),fe=()=>i.removeEventListener("pagehide",C)}return N.initialized||aa("POP",N.location,{initialHydration:!0}),W}function Qt(){_&&_(),fe&&fe(),j.clear(),ne&&ne.abort(),N.fetchers.forEach((C,T)=>pa(T)),N.blockers.forEach((C,T)=>Wn(T))}function ta(C){return j.add(C),()=>j.delete(C)}function at(C,T={}){C.matches&&(C.matches=C.matches.map(te=>{let ye=h[te.route.id],re=te.route;return re.element!==ye.element||re.errorElement!==ye.errorElement||re.hydrateFallbackElement!==ye.hydrateFallbackElement?{...te,route:ye}:te})),N={...N,...C};let B=[],ee=[];N.fetchers.forEach((te,ye)=>{te.state==="idle"&&(_e.has(ye)?B.push(ye):ee.push(ye))}),_e.forEach(te=>{!N.fetchers.has(te)&&!V.has(te)&&B.push(te)}),[...j].forEach(te=>te(N,{deletedFetchers:B,newErrors:C.errors??null,viewTransitionOpts:T.viewTransitionOpts,flushSync:T.flushSync===!0})),B.forEach(te=>pa(te)),ee.forEach(te=>N.fetchers.delete(te))}function bt(C,T,{flushSync:B}={}){let ee=N.actionData!=null&&N.navigation.formMethod!=null&&Yt(N.navigation.formMethod)&&N.navigation.state==="loading"&&C.state?._isRedirect!==!0,te;T.actionData?Object.keys(T.actionData).length>0?te=T.actionData:te=null:ee?te=N.actionData:te=null;let ye=T.loaderData?Pp(N.loaderData,T.loaderData,T.matches||[],T.errors):N.loaderData,re=N.blockers;re.size>0&&(re=new Map(re),re.forEach((Ee,Se)=>re.set(Se,or)));let me=D?!1:yi(C,T.matches||N.matches),ge=ue===!0||N.navigation.formMethod!=null&&Yt(N.navigation.formMethod)&&C.state?._isRedirect!==!0;g&&(p=g,g=void 0),D||Q==="POP"||(Q==="PUSH"?n.history.push(C,C.state):Q==="REPLACE"&&n.history.replace(C,C.state));let je;if(Q==="POP"){let Ee=se.get(N.location.pathname);Ee&&Ee.has(C.pathname)?je={currentLocation:N.location,nextLocation:C}:se.has(C.pathname)&&(je={currentLocation:C,nextLocation:N.location})}else if(P){let Ee=se.get(N.location.pathname);Ee?Ee.add(C.pathname):(Ee=new Set([C.pathname]),se.set(N.location.pathname,Ee)),je={currentLocation:N.location,nextLocation:C}}at({...T,actionData:te,loaderData:ye,historyAction:Q,location:C,initialized:!0,renderFallback:!1,navigation:Bu,revalidation:"idle",restoreScrollPosition:me,preventScrollReset:ge,blockers:re},{viewTransitionOpts:je,flushSync:B===!0}),Q="POP",ue=!1,P=!1,D=!1,J=!1,F?.resolve(),F=null,he?.resolve(),he=null}async function fa(C,T){if(F?.resolve(),F=null,typeof C=="number"){F||(F=ag());let et=F.promise;return n.history.go(C),et}let B=Wu(N.location,N.matches,m,C,T?.fromRouteId,T?.relative),{path:ee,submission:te,error:ye}=Gp(!1,B,T),re;T?.unstable_mask&&(re={pathname:"",search:"",hash:"",...typeof T.unstable_mask=="string"?xn(T.unstable_mask):{...N.location.unstable_mask,...T.unstable_mask}});let me=N.location,ge=xr(me,ee,T&&T.state,void 0,re);ge={...ge,...n.history.encodeLocation(ge)};let je=T&&T.replace!=null?T.replace:void 0,Ee="PUSH";je===!0?Ee="REPLACE":je===!1||te!=null&&Yt(te.formMethod)&&te.formAction===N.location.pathname+N.location.search&&(Ee="REPLACE");let Se=T&&"preventScrollReset"in T?T.preventScrollReset===!0:void 0,$e=(T&&T.flushSync)===!0,ke=Pn({currentLocation:me,nextLocation:ge,historyAction:Ee});if(ke){Wa(ke,{state:"blocked",location:ge,proceed(){Wa(ke,{state:"proceeding",proceed:void 0,reset:void 0,location:ge}),fa(C,T)},reset(){let et=new Map(N.blockers);et.set(ke,or),at({blockers:et})}});return}await aa(Ee,ge,{submission:te,pendingError:ye,preventScrollReset:Se,replace:T&&T.replace,enableViewTransition:T&&T.viewTransition,flushSync:$e,callSiteDefaultShouldRevalidate:T&&T.unstable_defaultShouldRevalidate})}function Ha(){he||(he=ag()),De(),at({revalidation:"loading"});let C=he.promise;return N.navigation.state==="submitting"?C:N.navigation.state==="idle"?(aa(N.historyAction,N.location,{startUninterruptedRevalidation:!0}),C):(aa(Q||N.historyAction,N.navigation.location,{overrideNavigation:N.navigation,enableViewTransition:P===!0}),C)}async function aa(C,T,B){ne&&ne.abort(),ne=null,Q=C,D=(B&&B.startUninterruptedRevalidation)===!0,vo(N.location,N.matches),ue=(B&&B.preventScrollReset)===!0,P=(B&&B.enableViewTransition)===!0;let ee=g||p,te=B&&B.overrideNavigation,ye=B?.initialHydration&&N.matches&&N.matches.length>0&&!K?N.matches:Kn(ee,T,m),re=(B&&B.flushSync)===!0;if(ye&&N.initialized&&!J&&i1(N.location,T)&&!(B&&B.submission&&Yt(B.submission.formMethod))){bt(T,{matches:ye},{flushSync:re});return}let me=bn(ye,ee,T.pathname);if(me.active&&me.matches&&(ye=me.matches),!ye){let{error:it,notFoundMatches:ft,route:Ge}=Oa(T.pathname);bt(T,{matches:ft,loaderData:{},errors:{[Ge.id]:it}},{flushSync:re});return}ne=new AbortController;let ge=ci(n.history,T,ne.signal,B&&B.submission),je=n.getContext?await n.getContext():new Up,Ee;if(B&&B.pendingError)Ee=[Xn(ye).route.id,{type:"error",error:B.pendingError}];else if(B&&B.submission&&Yt(B.submission.formMethod)){let it=await Gt(ge,T,B.submission,ye,je,me.active,B&&B.initialHydration===!0,{replace:B.replace,flushSync:re});if(it.shortCircuited)return;if(it.pendingActionResult){let[ft,Ge]=it.pendingActionResult;if(ua(Ge)&&br(Ge.error)&&Ge.error.status===404){ne=null,bt(T,{matches:it.matches,loaderData:{},errors:{[ft]:Ge.error}});return}}ye=it.matches||ye,Ee=it.pendingActionResult,te=qu(T,B.submission),re=!1,me.active=!1,ge=ci(n.history,ge.url,ge.signal)}let{shortCircuited:Se,matches:$e,loaderData:ke,errors:et}=await ha(ge,T,ye,je,me.active,te,B&&B.submission,B&&B.fetcherSubmission,B&&B.replace,B&&B.initialHydration===!0,re,Ee,B&&B.callSiteDefaultShouldRevalidate);Se||(ne=null,bt(T,{matches:$e||ye,...Ip(Ee),loaderData:ke,errors:et}))}async function Gt(C,T,B,ee,te,ye,re,me={}){De();let ge=h1(T,B);if(at({navigation:ge},{flushSync:me.flushSync===!0}),ye){let Se=await qa(ee,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}=Qs(p);return{matches:ke,pendingActionResult:[et.id,{type:"error",error:Se.error}]}}let $e=Xn(Se.partialMatches).route.id;return{matches:Se.partialMatches,pendingActionResult:[$e,{type:"error",error:Se.error}]}}else if(Se.matches)ee=Se.matches;else{let{notFoundMatches:$e,error:ke,route:et}=Oa(T.pathname);return{matches:$e,pendingActionResult:[et.id,{type:"error",error:ke}]}}}let je,Ee=Is(ee,T);if(!Ee.route.action&&!Ee.route.lazy)je={type:"error",error:Ea(405,{method:C.method,pathname:T.pathname,routeId:Ee.route.id})};else{let Se=fi(d,h,C,ee,Ee,re?[]:s,te),$e=await Ba(C,Se,te,null);if(je=$e[Ee.route.id],!je){for(let ke of ee)if($e[ke.route.id]){je=$e[ke.route.id];break}}if(C.signal.aborted)return{shortCircuited:!0}}if(xl(je)){let Se;return me&&me.replace!=null?Se=me.replace:Se=Fp(je.response.headers.get("Location"),new URL(C.url),m,n.history)===N.location.pathname+N.location.search,await Ta(C,je,!0,{submission:B,replace:Se}),{shortCircuited:!0}}if(ua(je)){let Se=Xn(ee,Ee.route.id);return(me&&me.replace)!==!0&&(Q="PUSH"),{matches:ee,pendingActionResult:[Se.route.id,je,Ee.route.id]}}return{matches:ee,pendingActionResult:[Ee.route.id,je]}}async function ha(C,T,B,ee,te,ye,re,me,ge,je,Ee,Se,$e){let ke=ye||qu(T,re),et=re||me||tg(ke),it=!D&&!je;if(te){if(it){let yt=ma(Se);at({navigation:ke,...yt!==void 0?{actionData:yt}:{}},{flushSync:Ee})}let Ue=await qa(B,T.pathname,C.signal);if(Ue.type==="aborted")return{shortCircuited:!0};if(Ue.type==="error"){if(Ue.partialMatches.length===0){let{matches:Bt,route:St}=Qs(p);return{matches:Bt,loaderData:{},errors:{[St.id]:Ue.error}}}let yt=Xn(Ue.partialMatches).route.id;return{matches:Ue.partialMatches,loaderData:{},errors:{[yt]:Ue.error}}}else if(Ue.matches)B=Ue.matches;else{let{error:yt,notFoundMatches:Bt,route:St}=Oa(T.pathname);return{matches:Bt,loaderData:{},errors:{[St.id]:yt}}}}let ft=g||p,{dsMatches:Ge,revalidatingFetchers:Rt}=$p(C,ee,d,h,n.history,N,B,et,T,je?[]:s,je===!0,J,ce,_e,le,I,ft,m,n.patchRoutesOnNavigation!=null,Se,$e);if(E=++de,!n.dataStrategy&&!Ge.some(Ue=>Ue.shouldLoad)&&!Ge.some(Ue=>Ue.route.middleware&&Ue.route.middleware.length>0)&&Rt.length===0){let Ue=Tr();return bt(T,{matches:B,loaderData:{},errors:Se&&ua(Se[1])?{[Se[0]]:Se[1].error}:null,...Ip(Se),...Ue?{fetchers:new Map(N.fetchers)}:{}},{flushSync:Ee}),{shortCircuited:!0}}if(it){let Ue={};if(!te){Ue.navigation=ke;let yt=ma(Se);yt!==void 0&&(Ue.actionData=yt)}Rt.length>0&&(Ue.fetchers=Ja(Rt)),at(Ue,{flushSync:Ee})}Rt.forEach(Ue=>{gt(Ue.key),Ue.controller&&V.set(Ue.key,Ue.controller)});let nt=()=>Rt.forEach(Ue=>gt(Ue.key));ne&&ne.signal.addEventListener("abort",nt);let{loaderResults:Sn,fetcherResults:Ma}=await pe(Ge,Rt,C,ee);if(C.signal.aborted)return{shortCircuited:!0};ne&&ne.signal.removeEventListener("abort",nt),Rt.forEach(Ue=>V.delete(Ue.key));let Ot=Zs(Sn);if(Ot)return await Ta(C,Ot.result,!0,{replace:ge}),{shortCircuited:!0};if(Ot=Zs(Ma),Ot)return I.add(Ot.key),await Ta(C,Ot.result,!0,{replace:ge}),{shortCircuited:!0};let{loaderData:Ya,errors:In}=Wp(N,B,Sn,Se,Rt,Ma);je&&N.errors&&(In={...N.errors,...In});let Va=Tr(),el=Or(E),El=Va||el||Rt.length>0;return{matches:B,loaderData:Ya,errors:In,...El?{fetchers:new Map(N.fetchers)}:{}}}function ma(C){if(C&&!ua(C[1]))return{[C[0]]:C[1].data};if(N.actionData)return Object.keys(N.actionData).length===0?null:N.actionData}function Ja(C){return C.forEach(T=>{let B=N.fetchers.get(T.key),ee=cr(void 0,B?B.data:void 0);N.fetchers.set(T.key,ee)}),new Map(N.fetchers)}async function Fn(C,T,B,ee){gt(C);let te=(ee&&ee.flushSync)===!0,ye=g||p,re=Wu(N.location,N.matches,m,B,T,ee?.relative),me=Kn(ye,re,m),ge=bn(me,ye,re);if(ge.active&&ge.matches&&(me=ge.matches),!me){dt(C,T,Ea(404,{pathname:re}),{flushSync:te});return}let{path:je,submission:Ee,error:Se}=Gp(!0,re,ee);if(Se){dt(C,T,Se,{flushSync:te});return}let $e=n.getContext?await n.getContext():new Up,ke=(ee&&ee.preventScrollReset)===!0;if(Ee&&Yt(Ee.formMethod)){await Jn(C,T,je,me,$e,ge.active,te,ke,Ee,ee&&ee.unstable_defaultShouldRevalidate);return}le.set(C,{routeId:T,path:je}),await Dt(C,T,je,me,$e,ge.active,te,ke,Ee)}async function Jn(C,T,B,ee,te,ye,re,me,ge,je){De(),le.delete(C);let Ee=N.fetchers.get(C);Je(C,m1(ge,Ee),{flushSync:re});let Se=new AbortController,$e=ci(n.history,B,Se.signal,ge);if(ye){let rt=await qa(ee,new URL($e.url).pathname,$e.signal,C);if(rt.type==="aborted")return;if(rt.type==="error"){dt(C,T,rt.error,{flushSync:re});return}else if(rt.matches)ee=rt.matches;else{dt(C,T,Ea(404,{pathname:B}),{flushSync:re});return}}let ke=Is(ee,B);if(!ke.route.action&&!ke.route.lazy){let rt=Ea(405,{method:ge.formMethod,pathname:B,routeId:T});dt(C,T,rt,{flushSync:re});return}V.set(C,Se);let et=de,it=fi(d,h,$e,ee,ke,s,te),ft=await Ba($e,it,te,C),Ge=ft[ke.route.id];if(!Ge){for(let rt of it)if(ft[rt.route.id]){Ge=ft[rt.route.id];break}}if($e.signal.aborted){V.get(C)===Se&&V.delete(C);return}if(_e.has(C)){if(xl(Ge)||ua(Ge)){Je(C,gn(void 0));return}}else{if(xl(Ge))if(V.delete(C),E>et){Je(C,gn(void 0));return}else return I.add(C),Je(C,cr(ge)),Ta($e,Ge,!1,{fetcherSubmission:ge,preventScrollReset:me});if(ua(Ge)){dt(C,T,Ge.error);return}}let Rt=N.navigation.location||N.location,nt=ci(n.history,Rt,Se.signal),Sn=g||p,Ma=N.navigation.state!=="idle"?Kn(Sn,N.navigation.location,m):N.matches;Le(Ma,"Didn't find any matches after fetcher action");let Ot=++de;H.set(C,Ot);let Ya=cr(ge,Ge.data);N.fetchers.set(C,Ya);let{dsMatches:In,revalidatingFetchers:Va}=$p(nt,te,d,h,n.history,N,Ma,ge,Rt,s,!1,J,ce,_e,le,I,Sn,m,n.patchRoutesOnNavigation!=null,[ke.route.id,Ge],je);Va.filter(rt=>rt.key!==C).forEach(rt=>{let wl=rt.key,Cl=N.fetchers.get(wl),Lr=cr(void 0,Cl?Cl.data:void 0);N.fetchers.set(wl,Lr),gt(wl),rt.controller&&V.set(wl,rt.controller)}),at({fetchers:new Map(N.fetchers)});let el=()=>Va.forEach(rt=>gt(rt.key));Se.signal.addEventListener("abort",el);let{loaderResults:El,fetcherResults:Ue}=await pe(In,Va,nt,te);if(Se.signal.aborted)return;if(Se.signal.removeEventListener("abort",el),H.delete(C),V.delete(C),Va.forEach(rt=>V.delete(rt.key)),N.fetchers.has(C)){let rt=gn(Ge.data);N.fetchers.set(C,rt)}let yt=Zs(El);if(yt)return Ta(nt,yt.result,!1,{preventScrollReset:me});if(yt=Zs(Ue),yt)return I.add(yt.key),Ta(nt,yt.result,!1,{preventScrollReset:me});let{loaderData:Bt,errors:St}=Wp(N,Ma,El,void 0,Va,Ue);Or(Ot),N.navigation.state==="loading"&&Ot>E?(Le(Q,"Expected pending action"),ne&&ne.abort(),bt(N.navigation.location,{matches:Ma,loaderData:Bt,errors:St,fetchers:new Map(N.fetchers)})):(at({errors:St,loaderData:Pp(N.loaderData,Bt,Ma,St),fetchers:new Map(N.fetchers)}),J=!1)}async function Dt(C,T,B,ee,te,ye,re,me,ge){let je=N.fetchers.get(C);Je(C,cr(ge,je?je.data:void 0),{flushSync:re});let Ee=new AbortController,Se=ci(n.history,B,Ee.signal);if(ye){let Ge=await qa(ee,new URL(Se.url).pathname,Se.signal,C);if(Ge.type==="aborted")return;if(Ge.type==="error"){dt(C,T,Ge.error,{flushSync:re});return}else if(Ge.matches)ee=Ge.matches;else{dt(C,T,Ea(404,{pathname:B}),{flushSync:re});return}}let $e=Is(ee,B);V.set(C,Ee);let ke=de,et=fi(d,h,Se,ee,$e,s,te),ft=(await Ba(Se,et,te,C))[$e.route.id];if(V.get(C)===Ee&&V.delete(C),!Se.signal.aborted){if(_e.has(C)){Je(C,gn(void 0));return}if(xl(ft))if(E>ke){Je(C,gn(void 0));return}else{I.add(C),await Ta(Se,ft,!1,{preventScrollReset:me});return}if(ua(ft)){dt(C,T,ft.error);return}Je(C,gn(ft.data))}}async function Ta(C,T,B,{submission:ee,fetcherSubmission:te,preventScrollReset:ye,replace:re}={}){B||(F?.resolve(),F=null),T.response.headers.has("X-Remix-Revalidate")&&(J=!0);let me=T.response.headers.get("Location");Le(me,"Expected a Location header on the redirect Response"),me=Fp(me,new URL(C.url),m,n.history);let ge=xr(N.location,me,{_isRedirect:!0});if(r){let et=!1;if(T.response.headers.has("X-Remix-Reload-Document"))et=!0;else if(rd(me)){const it=Vg(me,!0);et=it.origin!==i.location.origin||Ca(it.pathname,m)==null}if(et){re?i.location.replace(me):i.location.assign(me);return}}ne=null;let je=re===!0||T.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:Ee,formAction:Se,formEncType:$e}=N.navigation;!ee&&!te&&Ee&&Se&&$e&&(ee=tg(N.navigation));let ke=ee||te;if(Gb.has(T.response.status)&&ke&&Yt(ke.formMethod))await aa(je,ge,{submission:{...ke,formAction:me},preventScrollReset:ye||ue,enableViewTransition:B?P:void 0});else{let et=qu(ge,ee);await aa(je,ge,{overrideNavigation:et,fetcherSubmission:te,preventScrollReset:ye||ue,enableViewTransition:B?P:void 0})}}async function Ba(C,T,B,ee){let te,ye={};try{te=await Ib(b,C,T,ee,B,!1)}catch(re){return T.filter(me=>me.shouldLoad).forEach(me=>{ye[me.route.id]={type:"error",error:re}}),ye}if(C.signal.aborted)return ye;if(!Yt(C.method))for(let re of T){if(te[re.route.id]?.type==="error")break;!te.hasOwnProperty(re.route.id)&&!N.loaderData.hasOwnProperty(re.route.id)&&(!N.errors||!N.errors.hasOwnProperty(re.route.id))&&re.shouldCallHandler()&&(te[re.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${re.route.id}`)})}for(let[re,me]of Object.entries(te))if(c1(me)){let ge=me.result;ye[re]={type:"redirect",response:n1(ge,C,re,T,m)}}else ye[re]=await a1(me);return ye}async function pe(C,T,B,ee){let te=Ba(B,C,ee,null),ye=Promise.all(T.map(async ge=>{if(ge.matches&&ge.match&&ge.request&&ge.controller){let Ee=(await Ba(ge.request,ge.matches,ee,ge.key))[ge.match.route.id];return{[ge.key]:Ee}}else return Promise.resolve({[ge.key]:{type:"error",error:Ea(404,{pathname:ge.path})}})})),re=await te,me=(await ye).reduce((ge,je)=>Object.assign(ge,je),{});return{loaderResults:re,fetcherResults:me}}function De(){J=!0,le.forEach((C,T)=>{V.has(T)&&ce.add(T),gt(T)})}function Je(C,T,B={}){N.fetchers.set(C,T),at({fetchers:new Map(N.fetchers)},{flushSync:(B&&B.flushSync)===!0})}function dt(C,T,B,ee={}){let te=Xn(N.matches,T);pa(C),at({errors:{[te.route.id]:B},fetchers:new Map(N.fetchers)},{flushSync:(ee&&ee.flushSync)===!0})}function ut(C){return ve.set(C,(ve.get(C)||0)+1),_e.has(C)&&_e.delete(C),N.fetchers.get(C)||$b}function jl(C,T){gt(C,T?.reason),Je(C,gn(null))}function pa(C){let T=N.fetchers.get(C);V.has(C)&&!(T&&T.state==="loading"&&H.has(C))&&gt(C),le.delete(C),H.delete(C),I.delete(C),_e.delete(C),ce.delete(C),N.fetchers.delete(C)}function Ct(C){let T=(ve.get(C)||0)-1;T<=0?(ve.delete(C),_e.add(C)):ve.set(C,T),at({fetchers:new Map(N.fetchers)})}function gt(C,T){let B=V.get(C);B&&(B.abort(T),V.delete(C))}function Tt(C){for(let T of C){let B=ut(T),ee=gn(B.data);N.fetchers.set(T,ee)}}function Tr(){let C=[],T=!1;for(let B of I){let ee=N.fetchers.get(B);Le(ee,`Expected fetcher: ${B}`),ee.state==="loading"&&(I.delete(B),C.push(B),T=!0)}return Tt(C),T}function Or(C){let T=[];for(let[B,ee]of H)if(ee<C){let te=N.fetchers.get(B);Le(te,`Expected fetcher: ${B}`),te.state==="loading"&&(gt(B),H.delete(B),T.push(B))}return Tt(T),T.length>0}function xo(C,T){let B=N.blockers.get(C)||or;return ze.get(C)!==T&&ze.set(C,T),B}function Wn(C){N.blockers.delete(C),ze.delete(C)}function Wa(C,T){let B=N.blockers.get(C)||or;Le(B.state==="unblocked"&&T.state==="blocked"||B.state==="blocked"&&T.state==="blocked"||B.state==="blocked"&&T.state==="proceeding"||B.state==="blocked"&&T.state==="unblocked"||B.state==="proceeding"&&T.state==="unblocked",`Invalid blocker state transition: ${B.state} -> ${T.state}`);let ee=new Map(N.blockers);ee.set(C,T),at({blockers:ee})}function Pn({currentLocation:C,nextLocation:T,historyAction:B}){if(ze.size===0)return;ze.size>1&&pt(!1,"A router only supports one blocker at a time");let ee=Array.from(ze.entries()),[te,ye]=ee[ee.length-1],re=N.blockers.get(te);if(!(re&&re.state==="proceeding")&&ye({currentLocation:C,nextLocation:T,historyAction:B}))return te}function Oa(C){let T=Ea(404,{pathname:C}),B=g||p,{matches:ee,route:te}=Qs(B);return{notFoundMatches:ee,route:te,error:T}}function Nl(C,T,B){if(R=C,U=T,M=B||null,!Z&&N.navigation===Bu){Z=!0;let ee=yi(N.location,N.matches);ee!=null&&at({restoreScrollPosition:ee})}return()=>{R=null,U=null,M=null}}function vn(C,T){return M&&M(C,T.map(ee=>gb(ee,N.loaderData)))||C.key}function vo(C,T){if(R&&U){let B=vn(C,T);R[B]=U()}}function yi(C,T){if(R){let B=vn(C,T),ee=R[B];if(typeof ee=="number")return ee}return null}function bn(C,T,B){if(n.patchRoutesOnNavigation)if(C){if(Object.keys(C[0].params).length>0)return{active:!0,matches:hr(T,B,m,!0)}}else return{active:!0,matches:hr(T,B,m,!0)||[]};return{active:!1,matches:null}}async function qa(C,T,B,ee){if(!n.patchRoutesOnNavigation)return{type:"success",matches:C};let te=C;for(;;){let ye=g==null,re=g||p,me=h;try{await n.patchRoutesOnNavigation({signal:B,path:T,matches:te,fetcherKey:ee,patch:(Ee,Se)=>{B.aborted||Kp(Ee,Se,re,me,d,!1)}})}catch(Ee){return{type:"error",error:Ee,partialMatches:te}}finally{ye&&!B.aborted&&(p=[...p])}if(B.aborted)return{type:"aborted"};let ge=Kn(re,T,m),je=null;if(ge){if(Object.keys(ge[0].params).length===0)return{type:"success",matches:ge};if(je=hr(re,T,m,!0),!(je&&te.length<je.length&&Mr(te,je.slice(0,te.length))))return{type:"success",matches:ge}}if(je||(je=hr(re,T,m,!0)),!je||Mr(te,je))return{type:"success",matches:null};te=je}}function Mr(C,T){return C.length===T.length&&C.every((B,ee)=>B.route.id===T[ee].route.id)}function Dr(C){h={},g=vr(C,d,void 0,h)}function Ar(C,T,B=!1){let ee=g==null;Kp(C,T,g||p,h,d,B),ee&&(p=[...p],at({}))}return W={get basename(){return m},get future(){return x},get state(){return N},get routes(){return p},get window(){return i},initialize:wt,subscribe:ta,enableScrollRestoration:Nl,navigate:fa,fetch:Fn,revalidate:Ha,createHref:C=>n.history.createHref(C),encodeLocation:C=>n.history.encodeLocation(C),getFetcher:ut,resetFetcher:jl,deleteFetcher:Ct,dispose:Qt,getBlocker:xo,deleteBlocker:Wn,patchRoutes:Ar,_internalFetchControllers:V,_internalSetRoutes:Dr,_internalSetStateDoNotUseOrYouWillBreakYourApp(C){at(C)}},n.unstable_instrumentations&&(W=Lb(W,n.unstable_instrumentations.map(C=>C.router).filter(Boolean))),W}function Qb(n){return n!=null&&("formData"in n&&n.formData!=null||"body"in n&&n.body!==void 0)}function Wu(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=jr(s||".",co(h),Ca(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=cd(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=zb({basename:r,pathname:g.pathname})),Za(g)}function Gp(n,i,r){if(!r||!Qb(r))return{path:i};if(r.formMethod&&!f1(r.formMethod))return{path:i,error:Ea(405,{method:r.formMethod})};let s=()=>({path:i,error:Ea(400,{type:"invalid-body"})}),d=(r.formMethod||"get").toUpperCase(),h=ry(i);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!Yt(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(!Yt(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=Iu(r.formData),g=r.formData;else if(r.body instanceof FormData)p=Iu(r.body),g=r.body;else if(r.body instanceof URLSearchParams)p=r.body,g=Jp(p);else if(r.body==null)p=new URLSearchParams,g=new FormData;else try{p=new URLSearchParams(r.body),g=Jp(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(Yt(m.formMethod))return{path:i,submission:m};let b=xn(i);return n&&b.search&&cd(b.search)&&p.append("index",""),b.search=`?${p}`,{path:Za(b),submission:m}}function $p(n,i,r,s,c,d,h,p,g,m,b,x,_,j,R,M,U,Z,G,K,ie){let ae=K?ua(K[1])?K[1].error:K[1].data:void 0,oe=c.createURL(d.location),W=c.createURL(g),N;if(b&&d.errors){let fe=Object.keys(d.errors)[0];N=h.findIndex(D=>D.route.id===fe)}else if(K&&ua(K[1])){let fe=K[0];N=h.findIndex(D=>D.route.id===fe)-1}let Q=K?K[1].statusCode:void 0,F=Q&&Q>=400,ue={currentUrl:oe,currentParams:d.matches[0]?.params||{},nextUrl:W,nextParams:h[0].params,...p,actionResult:ae,actionStatus:Q},ne=Er(h),P=h.map((fe,D)=>{let{route:J}=fe,ce=null;if(N!=null&&D>N)ce=!1;else if(J.lazy)ce=!0;else if(!sd(J))ce=!1;else if(b){let{shouldLoad:H}=ey(J,d.loaderData,d.errors);ce=H}else Zb(d.loaderData,d.matches[D],fe)&&(ce=!0);if(ce!==null)return Pu(r,s,n,ne,fe,m,i,ce);let V=!1;typeof ie=="boolean"?V=ie:F?V=!1:(x||oe.pathname+oe.search===W.pathname+W.search||oe.search!==W.search||Fb(d.matches[D],fe))&&(V=!0);let de={...ue,defaultShouldRevalidate:V},E=gr(fe,de);return Pu(r,s,n,ne,fe,m,i,E,de,ie)}),se=[];return R.forEach((fe,D)=>{if(b||!h.some(le=>le.route.id===fe.routeId)||j.has(D))return;let J=d.fetchers.get(D),ce=J&&J.state!=="idle"&&J.data===void 0,V=Kn(U,fe.path,Z);if(!V){if(G&&ce)return;se.push({key:D,routeId:fe.routeId,path:fe.path,matches:null,match:null,request:null,controller:null});return}if(M.has(D))return;let de=Is(V,fe.path),E=new AbortController,H=ci(c,fe.path,E.signal),I=null;if(_.has(D))_.delete(D),I=fi(r,s,H,V,de,m,i);else if(ce)x&&(I=fi(r,s,H,V,de,m,i));else{let le;typeof ie=="boolean"?le=ie:F?le=!1:le=x;let ve={...ue,defaultShouldRevalidate:le};gr(de,ve)&&(I=fi(r,s,H,V,de,m,i,ve))}I&&se.push({key:D,routeId:fe.routeId,path:fe.path,matches:I,match:de,request:H,controller:E})}),{dsMatches:P,revalidatingFetchers:se}}function sd(n){return n.loader!=null||n.middleware!=null&&n.middleware.length>0}function ey(n,i,r){if(n.lazy)return{shouldLoad:!0,renderFallback:!0};if(!sd(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 Zb(n,i,r){let s=!i||r.route.id!==i.route.id,c=!n.hasOwnProperty(r.route.id);return s||c}function Fb(n,i){let r=n.route.path;return n.pathname!==i.pathname||r!=null&&r.endsWith("*")&&n.params["*"]!==i.params["*"]}function gr(n,i){if(n.route.shouldRevalidate){let r=n.route.shouldRevalidate(i);if(typeof r=="boolean")return r}return i.defaultShouldRevalidate}function Kp(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=>ty(m,x));b?g.push({existingRoute:b,newRoute:m}):p.push(m)}),p.length>0){let m=vr(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]=vr([x],c,[],{},!0);Object.assign(_,{element:j.element?j.element:_.element,errorElement:j.errorElement?j.errorElement:_.errorElement,hydrateFallbackElement:j.hydrateFallbackElement?j.hydrateFallbackElement:_.hydrateFallbackElement})}}function ty(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=>ty(r,c)))??!1:!1}var Xp=new WeakMap,ay=({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=Xp.get(c);h||(h={},Xp.set(c,h));let p=h[n];if(p)return p;let g=(async()=>{let m=fb(n),x=c[n]!==void 0&&n!=="hasErrorBoundary";if(m)pt(!m,"Route property "+n+" is not a supported lazy route property. This property will be ignored."),h[n]=Promise.resolve();else if(x)pt(!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},Qp=new WeakMap;function Jb(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=Qp.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 M=_[R];if(M===void 0)continue;let U=mb(R),G=d[R]!==void 0&&R!=="hasErrorBoundary";U?pt(!U,"Route property "+R+" is not a supported property to be returned from a lazy route function. This property will be ignored."):G?pt(!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]=M}Object.assign(d,j),Object.assign(d,{...s(d),lazy:void 0})})();return Qp.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=ay({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 Zp(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 Wb(n){return n.matches.some(i=>i.route.middleware)?ny(n,()=>Zp(n)):Zp(n)}function ny(n,i){return Pb(n,i,s=>{if(d1(s))throw s;return s},s1,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=Xn(h,h[p].route.id).route.id;return Promise.resolve({[g]:{type:"error",result:s}})}}}async function Pb(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 ly({request:h,params:p,context:g,unstable_pattern:m},b,i,r,s,c)}async function ly(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 ly(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 iy(n,i,r,s,c){let d=ay({key:"middleware",route:s.route,manifest:i,mapRouteProperties:n}),h=Jb(s.route,Yt(r.method)?"action":"loader",i,n,c);return{middleware:d,route:h.lazyRoutePromise,handler:h.lazyHandlerPromise}}function Pu(n,i,r,s,c,d,h,p,g=null,m){let b=!1,x=iy(n,i,r,c,d);return{...c,_lazyPromises:x,shouldLoad:p,shouldRevalidateArgs:g,shouldCallHandler(_){return b=!0,g?typeof m=="boolean"?gr(c,{...g,defaultShouldRevalidate:m}):typeof _=="boolean"?gr(c,{...g,defaultShouldRevalidate:_}):gr(c,g):p},resolve(_){let{lazy:j,loader:R,middleware:M}=c.route,U=b||p||_&&!Yt(r.method)&&(j||R),Z=M&&M.length>0&&!R&&!j;return U&&(Yt(r.method)||!Z)?e1({request:r,unstable_pattern:s,match:c,lazyHandlerPromise:x?.handler,lazyRoutePromise:x?.route,handlerOverride:_,scopedContext:h}):Promise.resolve({type:"data",result:void 0})}}}function fi(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:iy(n,i,r,g,d),resolve:()=>Promise.resolve({type:"data",result:void 0})}:Pu(n,i,r,Er(s),g,d,h,!0,p))}async function Ib(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:Er(r),params:r[0].params,context:c,matches:r},g=await n({...h,fetcherKey:s,runClientMiddleware:m=>{let b=h;return ny(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 e1({request:n,unstable_pattern:i,match:r,lazyHandlerPromise:s,lazyRoutePromise:c,handlerOverride:d,scopedContext:h}){let p,g,m=Yt(n.method),b=m?"action":"loader",x=_=>{let j,R=new Promise((Z,G)=>j=G);g=()=>j(),n.signal.addEventListener("abort",g);let M=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]:[]),U=(async()=>{try{return{type:"data",result:await(d?d(G=>M(G)):M())}}catch(Z){return{type:"error",result:Z}}})();return Promise.race([U,R])};try{let _=m?r.route.action:r.route.loader;if(s||c)if(_){let j,[R]=await Promise.all([x(_).catch(M=>{j=M}),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),M=R.pathname+R.search;throw Ea(405,{method:n.method,pathname:M,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 Ea(404,{pathname:R})}}catch(_){return{type:"error",result:_}}finally{g&&n.signal.removeEventListener("abort",g)}return p}async function t1(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 a1(n){let{result:i,type:r}=n;if(od(i)){let s;try{s=await t1(i)}catch(c){return{type:"error",error:c}}return r==="error"?{type:"error",error:new Nr(i.status,i.statusText,s),statusCode:i.status,headers:i.headers}:{type:"data",data:s,statusCode:i.status,headers:i.headers}}return r==="error"?eg(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:r1(i),statusCode:br(i)?i.status:void 0,headers:i.init?.headers?new Headers(i.init.headers):void 0}:{type:"error",error:i,statusCode:br(i)?i.status:void 0}:eg(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 n1(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"),!rd(d)){let h=s.slice(0,s.findIndex(p=>p.route.id===r)+1);d=Wu(new URL(i.url),h,c,d),n.headers.set("Location",d)}return n}function Fp(n,i,r,s){let c=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(rd(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=Ca(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 ci(n,i,r,s){let c=n.createURL(ry(i)).toString(),d={signal:r};if(s&&Yt(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=Iu(s.formData):d.body=s.formData}return new Request(c,d)}function Iu(n){let i=new URLSearchParams;for(let[r,s]of n.entries())i.append(r,typeof s=="string"?s:s.name);return i}function Jp(n){let i=new FormData;for(let[r,s]of n.entries())i.append(r,s);return i}function l1(n,i,r,s=!1,c=!1){let d={},h=null,p,g=!1,m={},b=r&&ua(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(!xl(j),"Cannot handle redirect results in processLoaderData"),ua(j)){let R=j.error;if(b!==void 0&&(R=b,b=void 0),h=h||{},c)h[_]=R;else{let M=Xn(n,_);h[M.route.id]==null&&(h[M.route.id]=R)}s||(d[_]=Ig),g||(g=!0,p=br(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 Wp(n,i,r,s,c,d){let{loaderData:h,errors:p}=l1(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"),ua(_)){let j=Xn(n.matches,b?.route.id);p&&p[j.route.id]||(p={...p,[j.route.id]:_.error}),n.fetchers.delete(m)}else if(xl(_))Le(!1,"Unhandled fetcher revalidation redirect");else{let j=gn(_.data);n.fetchers.set(m,j)}}),{loaderData:h,errors:p}}function Pp(n,i,r,s){let c=Object.entries(i).filter(([,d])=>d!==Ig).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 Ip(n){return n?ua(n[1])?{actionData:{}}:{actionData:{[n[0]]:n[1].data}}:{}}function Xn(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 Qs(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 Ea(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 Nr(n||500,h,new Error(p),!0)}function Zs(n){let i=Object.entries(n);for(let r=i.length-1;r>=0;r--){let[s,c]=i[r];if(xl(c))return{key:s,result:c}}}function ry(n){let i=typeof n=="string"?xn(n):n;return Za({...i,hash:""})}function i1(n,i){return n.pathname!==i.pathname||n.search!==i.search?!1:n.hash===""?i.hash!=="":n.hash===i.hash?!0:i.hash!==""}function r1(n){return new Nr(n.init?.status??500,n.init?.statusText??"Internal Server Error",n.data)}function s1(n){return n!=null&&typeof n=="object"&&Object.entries(n).every(([i,r])=>typeof i=="string"&&o1(r))}function o1(n){return n!=null&&typeof n=="object"&&"type"in n&&"result"in n&&(n.type==="data"||n.type==="error")}function c1(n){return od(n.result)&&Wg.has(n.result.status)}function ua(n){return n.type==="error"}function xl(n){return(n&&n.type)==="redirect"}function eg(n){return typeof n=="object"&&n!=null&&"type"in n&&"data"in n&&"init"in n&&n.type==="DataWithResponseInit"}function od(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.headers=="object"&&typeof n.body<"u"}function u1(n){return Wg.has(n)}function d1(n){return od(n)&&u1(n.status)&&n.headers.has("Location")}function f1(n){return Vb.has(n.toUpperCase())}function Yt(n){return qb.has(n.toUpperCase())}function cd(n){return new URLSearchParams(n).getAll("index").some(i=>i==="")}function Is(n,i){let r=typeof i=="string"?xn(i).search:i.search;if(n[n.length-1].route.index&&cd(r||""))return n[n.length-1];let s=Xg(n);return s[s.length-1]}function tg(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 qu(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 h1(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 cr(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 m1(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 gn(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 p1(n,i){try{let r=n.sessionStorage.getItem(Pg);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 g1(n,i){if(i.size>0){let r={};for(let[s,c]of i)r[s]=[...c];try{n.sessionStorage.setItem(Pg,JSON.stringify(r))}catch(s){pt(!1,`Failed to save applied view transitions in sessionStorage (${s}).`)}}}function ag(){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 _l=v.createContext(null);_l.displayName="DataRouter";var wr=v.createContext(null);wr.displayName="DataRouterState";var sy=v.createContext(!1);function y1(){return v.useContext(sy)}var ud=v.createContext({isTransitioning:!1});ud.displayName="ViewTransition";var oy=v.createContext(new Map);oy.displayName="Fetchers";var x1=v.createContext(null);x1.displayName="Await";var da=v.createContext(null);da.displayName="Navigation";var uo=v.createContext(null);uo.displayName="Location";var Ra=v.createContext({outlet:null,matches:[],isDataRoute:!1});Ra.displayName="Route";var dd=v.createContext(null);dd.displayName="RouteError";var cy="REACT_ROUTER_ERROR",v1="REDIRECT",b1="ROUTE_ERROR_RESPONSE";function S1(n){if(n.startsWith(`${cy}:${v1}:{`))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 _1(n){if(n.startsWith(`${cy}:${b1}:{`))try{let i=JSON.parse(n.slice(40));if(typeof i=="object"&&i&&typeof i.status=="number"&&typeof i.statusText=="string")return new Nr(i.status,i.statusText,i.data)}catch{}}function j1(n,{relative:i}={}){Le(pi(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:s}=v.useContext(da),{hash:c,pathname:d,search:h}=Cr(n,{relative:i}),p=d;return r!=="/"&&(p=d==="/"?r:ka([r,d])),s.createHref({pathname:p,search:h,hash:c})}function pi(){return v.useContext(uo)!=null}function Ua(){return Le(pi(),"useLocation() may be used only in the context of a <Router> component."),v.useContext(uo).location}var uy="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function dy(n){v.useContext(da).static||v.useLayoutEffect(n)}function Zn(){let{isDataRoute:n}=v.useContext(Ra);return n?H1():N1()}function N1(){Le(pi(),"useNavigate() may be used only in the context of a <Router> component.");let n=v.useContext(_l),{basename:i,navigator:r}=v.useContext(da),{matches:s}=v.useContext(Ra),{pathname:c}=Ua(),d=JSON.stringify(co(s)),h=v.useRef(!1);return dy(()=>{h.current=!0}),v.useCallback((g,m={})=>{if(pt(h.current,uy),!h.current)return;if(typeof g=="number"){r.go(g);return}let b=jr(g,JSON.parse(d),c,m.relative==="path");n==null&&i!=="/"&&(b.pathname=b.pathname==="/"?i:ka([i,b.pathname])),(m.replace?r.replace:r.push)(b,m.state,m)},[i,r,d,c,n])}var E1=v.createContext(null);function w1(n){let i=v.useContext(Ra).outlet;return v.useMemo(()=>i&&v.createElement(E1.Provider,{value:n},i),[i,n])}function fo(){let{matches:n}=v.useContext(Ra),i=n[n.length-1];return i?i.params:{}}function Cr(n,{relative:i}={}){let{matches:r}=v.useContext(Ra),{pathname:s}=Ua(),c=JSON.stringify(co(r));return v.useMemo(()=>jr(n,JSON.parse(c),s,i==="path"),[n,c,s,i])}function C1(n,i,r){Le(pi(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:s}=v.useContext(da),{matches:c}=v.useContext(Ra),d=c[c.length-1],h=d?d.params:{},p=d?d.pathname:"/",g=d?d.pathnameBase:"/",m=d&&d.route;{let U=m&&m.path||"";hy(p,!m||U.endsWith("*")||U.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${p}" (under <Route path="${U}">) 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="${U}"> to <Route path="${U==="/"?"*":`${U}/*`}">.`)}let b=Ua(),x;x=b;let _=x.pathname||"/",j=_;if(g!=="/"){let U=g.replace(/^\//,"").split("/");j="/"+_.replace(/^\//,"").split("/").slice(U.length).join("/")}let R=Kn(n,{pathname:j});return pt(m||R!=null,`No routes matched location "${x.pathname}${x.search}${x.hash}" `),pt(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(U=>Object.assign({},U,{params:Object.assign({},h,U.params),pathname:ka([g,s.encodeLocation?s.encodeLocation(U.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:U.pathname]),pathnameBase:U.pathnameBase==="/"?g:ka([g,s.encodeLocation?s.encodeLocation(U.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:U.pathnameBase])})),c,r)}function R1(){let n=U1(),i=br(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 z1=v.createElement(R1,null),fy=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=_1(n.digest);r&&(n=r)}let i=n!==void 0?v.createElement(Ra.Provider,{value:this.props.routeContext},v.createElement(dd.Provider,{value:n,children:this.props.component})):this.props.children;return this.context?v.createElement(T1,{error:n},i):i}};fy.contextType=sy;var Yu=new WeakMap;function T1({children:n,error:i}){let{basename:r}=v.useContext(da);if(typeof i=="object"&&i&&"digest"in i&&typeof i.digest=="string"){let s=S1(i.digest);if(s){let c=Yu.get(i);if(c)throw c;let d=Zg(s.location,r);if(Qg&&!Yu.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 Yu.set(i,h),h}return v.createElement("meta",{httpEquiv:"refresh",content:`0;url=${d.absoluteURL||d.to}`})}}return n}function O1({routeContext:n,match:i,children:r}){let s=v.useContext(_l);return s&&s.static&&s.staticContext&&(i.route.errorElement||i.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=i.route.id),v.createElement(Ra.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:Er(s.matches),errorInfo:x})}:void 0;return c.reduceRight((b,x,_)=>{let j,R=!1,M=null,U=null;s&&(j=d&&x.route.id?d[x.route.id]:void 0,M=x.route.errorElement||z1,h&&(p<0&&_===0?(hy("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),R=!0,U=null):p===_&&(R=!0,U=x.route.hydrateFallbackElement||null)));let Z=i.concat(c.slice(0,_+1)),G=()=>{let K;return j?K=M:R?K=U:x.route.Component?K=v.createElement(x.route.Component,null):x.route.element?K=x.route.element:K=b,v.createElement(O1,{match:x,routeContext:{outlet:b,matches:Z,isDataRoute:s!=null},children:K})};return s&&(x.route.ErrorBoundary||x.route.errorElement||_===0)?v.createElement(fy,{location:s.location,revalidation:s.revalidation,component:M,error:j,children:G(),routeContext:{outlet:null,matches:Z,isDataRoute:!0},onError:m}):G()},null)}function fd(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function D1(n){let i=v.useContext(_l);return Le(i,fd(n)),i}function A1(n){let i=v.useContext(wr);return Le(i,fd(n)),i}function L1(n){let i=v.useContext(Ra);return Le(i,fd(n)),i}function hd(n){let i=L1(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 k1(){return hd("useRouteId")}function U1(){let n=v.useContext(dd),i=A1("useRouteError"),r=hd("useRouteError");return n!==void 0?n:i.errors?.[r]}function H1(){let{router:n}=D1("useNavigate"),i=hd("useNavigate"),r=v.useRef(!1);return dy(()=>{r.current=!0}),v.useCallback(async(c,d={})=>{pt(r.current,uy),r.current&&(typeof c=="number"?await n.navigate(c):await n.navigate(c,{fromRouteId:i,...d}))},[n,i])}var ng={};function hy(n,i,r){!i&&!ng[n]&&(ng[n]=!0,pt(!1,r))}var lg={};function ig(n,i){!n&&!lg[i]&&(lg[i]=!0,console.warn(i))}var B1="useOptimistic",rg=p0[B1],q1=()=>{};function Y1(n){return rg?rg(n):[n,q1]}function V1(n){let i={hasErrorBoundary:n.hasErrorBoundary||n.ErrorBoundary!=null||n.errorElement!=null};return n.Component&&(n.element&&pt(!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&&pt(!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&&pt(!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 G1=["HydrateFallback","hydrateFallbackElement"],$1=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 K1({router:n,flushSync:i,onError:r,unstable_useTransitions:s}){s=y1()||s;let[d,h]=v.useState(n.state),[p,g]=Y1(d),[m,b]=v.useState(),[x,_]=v.useState({isTransitioning:!1}),[j,R]=v.useState(),[M,U]=v.useState(),[Z,G]=v.useState(),K=v.useRef(new Map),ie=v.useCallback((N,{deletedFetchers:Q,newErrors:F,flushSync:ue,viewTransitionOpts:ne})=>{F&&r&&Object.values(F).forEach(se=>r(se,{location:N.location,params:N.matches[0]?.params??{},unstable_pattern:Er(N.matches)})),N.fetchers.forEach((se,fe)=>{se.data!==void 0&&K.current.set(fe,se.data)}),Q.forEach(se=>K.current.delete(se)),ig(ue===!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 P=n.window!=null&&n.window.document!=null&&typeof n.window.document.startViewTransition=="function";if(ig(ne==null||P,"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."),!ne||!P){i&&ue?i(()=>h(N)):s===!1?h(N):v.startTransition(()=>{s===!0&&g(se=>sg(se,N)),h(N)});return}if(i&&ue){i(()=>{M&&(j?.resolve(),M.skipTransition()),_({isTransitioning:!0,flushSync:!0,currentLocation:ne.currentLocation,nextLocation:ne.nextLocation})});let se=n.window.document.startViewTransition(()=>{i(()=>h(N))});se.finished.finally(()=>{i(()=>{R(void 0),U(void 0),b(void 0),_({isTransitioning:!1})})}),i(()=>U(se));return}M?(j?.resolve(),M.skipTransition(),G({state:N,currentLocation:ne.currentLocation,nextLocation:ne.nextLocation})):(b(N),_({isTransitioning:!0,flushSync:!1,currentLocation:ne.currentLocation,nextLocation:ne.nextLocation}))},[n.window,i,M,j,s,g,r]);v.useLayoutEffect(()=>n.subscribe(ie),[n,ie]),v.useEffect(()=>{x.isTransitioning&&!x.flushSync&&R(new $1)},[x]),v.useEffect(()=>{if(j&&m&&n.window){let N=m,Q=j.promise,F=n.window.document.startViewTransition(async()=>{s===!1?h(N):v.startTransition(()=>{s===!0&&g(ue=>sg(ue,N)),h(N)}),await Q});F.finished.finally(()=>{R(void 0),U(void 0),b(void 0),_({isTransitioning:!1})}),U(F)}},[m,j,n.window,s,g]),v.useEffect(()=>{j&&m&&p.location.key===m.location.key&&j.resolve()},[j,M,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 ae=v.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:N=>n.navigate(N),push:(N,Q,F)=>n.navigate(N,{state:Q,preventScrollReset:F?.preventScrollReset}),replace:(N,Q,F)=>n.navigate(N,{replace:!0,state:Q,preventScrollReset:F?.preventScrollReset})}),[n]),oe=n.basename||"/",W=v.useMemo(()=>({router:n,navigator:ae,static:!1,basename:oe,onError:r}),[n,ae,oe,r]);return v.createElement(v.Fragment,null,v.createElement(_l.Provider,{value:W},v.createElement(wr.Provider,{value:p},v.createElement(oy.Provider,{value:K.current},v.createElement(ud.Provider,{value:x},v.createElement(Z1,{basename:oe,location:p.location,navigationType:p.historyAction,navigator:ae,unstable_useTransitions:s},v.createElement(X1,{routes:n.routes,future:n.future,state:p,isStatic:!1,onError:r})))))),null)}function sg(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 X1=v.memo(Q1);function Q1({routes:n,future:i,state:r,isStatic:s,onError:c}){return C1(n,void 0,{state:r,isStatic:s,onError:c})}function og({to:n,replace:i,state:r,relative:s}){Le(pi(),"<Navigate> may be used only in the context of a <Router> component.");let{static:c}=v.useContext(da);pt(!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(Ra),{pathname:h}=Ua(),p=Zn(),g=jr(n,co(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 my(n){return w1(n.context)}function Z1({basename:n="/",children:i=null,location:r,navigationType:s="POP",navigator:c,static:d=!1,unstable_useTransitions:h}){Le(!pi(),"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=xn(r));let{pathname:m="/",search:b="",hash:x="",state:_=null,key:j="default",unstable_mask:R}=r,M=v.useMemo(()=>{let U=Ca(m,p);return U==null?null:{location:{pathname:U,search:b,hash:x,state:_,key:j,unstable_mask:R},navigationType:s}},[p,m,b,x,_,j,s,R]);return pt(M!=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.`),M==null?null:v.createElement(da.Provider,{value:g},v.createElement(uo.Provider,{children:i,value:M}))}var eo="get",to="application/x-www-form-urlencoded";function ho(n){return typeof HTMLElement<"u"&&n instanceof HTMLElement}function F1(n){return ho(n)&&n.tagName.toLowerCase()==="button"}function J1(n){return ho(n)&&n.tagName.toLowerCase()==="form"}function W1(n){return ho(n)&&n.tagName.toLowerCase()==="input"}function P1(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function I1(n,i){return n.button===0&&(!i||i==="_self")&&!P1(n)}function ed(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 e2(n,i){let r=ed(n);return i&&i.forEach((s,c)=>{r.has(c)||i.getAll(c).forEach(d=>{r.append(c,d)})}),r}var Fs=null;function t2(){if(Fs===null)try{new FormData(document.createElement("form"),0),Fs=!1}catch{Fs=!0}return Fs}var a2=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Vu(n){return n!=null&&!a2.has(n)?(pt(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${to}"`),null):n}function n2(n,i){let r,s,c,d,h;if(J1(n)){let p=n.getAttribute("action");s=p?Ca(p,i):null,r=n.getAttribute("method")||eo,c=Vu(n.getAttribute("enctype"))||to,d=new FormData(n)}else if(F1(n)||W1(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?Ca(g,i):null,r=n.getAttribute("formmethod")||p.getAttribute("method")||eo,c=Vu(n.getAttribute("formenctype"))||Vu(p.getAttribute("enctype"))||to,d=new FormData(p,n),!t2()){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(ho(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=eo,s=null,c=to,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 md(n,i){if(n===!1||n===null||typeof n>"u")throw new Error(i)}function l2(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&&Ca(c.pathname,i)==="/"?c.pathname=`${i.replace(/\/$/,"")}/_root.${s}`:c.pathname=`${c.pathname.replace(/\/$/,"")}.${s}`,c}async function i2(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 r2(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 s2(n,i,r){let s=await Promise.all(n.map(async c=>{let d=i.routes[c.route.id];if(d){let h=await i2(d,r);return h.links?h.links():[]}return[]}));return d2(s.flat(1).filter(r2).filter(c=>c.rel==="stylesheet"||c.rel==="preload").map(c=>c.rel==="stylesheet"?{...c,rel:"prefetch",as:"style"}:{...c,rel:"prefetch"}))}function cg(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 o2(n,i,{includeHydrateFallback:r}={}){return c2(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 c2(n){return[...new Set(n)]}function u2(n){let i={},r=Object.keys(n).sort();for(let s of r)i[s]=n[s];return i}function d2(n,i){let r=new Set;return new Set(i),n.reduce((s,c)=>{let d=JSON.stringify(u2(c));return r.has(d)||(r.add(d),s.push({key:d,link:c})),s},[])}function py(){let n=v.useContext(_l);return md(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function f2(){let n=v.useContext(wr);return md(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var pd=v.createContext(void 0);pd.displayName="FrameworkContext";function gy(){let n=v.useContext(pd);return md(n,"You must render this element inside a <HydratedRouter> element"),n}function h2(n,i){let r=v.useContext(pd),[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 M=Z=>{Z.forEach(G=>{h(G.isIntersecting)})},U=new IntersectionObserver(M,{threshold:.5});return _.current&&U.observe(_.current),()=>{U.disconnect()}}},[n]),v.useEffect(()=>{if(s){let M=setTimeout(()=>{h(!0)},100);return()=>{clearTimeout(M)}}},[s]);let j=()=>{c(!0)},R=()=>{c(!1),h(!1)};return r?n!=="intent"?[d,_,{}]:[d,_,{onFocus:ur(p,j),onBlur:ur(g,R),onMouseEnter:ur(m,j),onMouseLeave:ur(b,R),onTouchStart:ur(x,j)}]:[!1,_,{}]}function ur(n,i){return r=>{n&&n(r),r.defaultPrevented||i(r)}}function m2({page:n,...i}){let{router:r}=py(),s=v.useMemo(()=>Kn(r.routes,n,r.basename),[r.routes,n,r.basename]);return s?v.createElement(g2,{page:n,matches:s,...i}):null}function p2(n){let{manifest:i,routeModules:r}=gy(),[s,c]=v.useState([]);return v.useEffect(()=>{let d=!1;return s2(n,i,r).then(h=>{d||c(h)}),()=>{d=!0}},[n,i,r]),s}function g2({page:n,matches:i,...r}){let s=Ua(),{future:c,manifest:d,routeModules:h}=gy(),{basename:p}=py(),{loaderData:g,matches:m}=f2(),b=v.useMemo(()=>cg(n,i,m,d,s,"data"),[n,i,m,d,s]),x=v.useMemo(()=>cg(n,i,m,d,s,"assets"),[n,i,m,d,s]),_=v.useMemo(()=>{if(n===s.pathname+s.search+s.hash)return[];let M=new Set,U=!1;if(i.forEach(G=>{let K=d.routes[G.route.id];!K||!K.hasLoader||(!b.some(ie=>ie.route.id===G.route.id)&&G.route.id in g&&h[G.route.id]?.shouldRevalidate||K.hasClientLoader?U=!0:M.add(G.route.id))}),M.size===0)return[];let Z=l2(n,p,c.unstable_trailingSlashAwareDataRequests,"data");return U&&M.size>0&&Z.searchParams.set("_routes",i.filter(G=>M.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(()=>o2(x,d),[x,d]),R=p2(x);return v.createElement(v.Fragment,null,_.map(M=>v.createElement("link",{key:M,rel:"prefetch",as:"fetch",href:M,...r})),j.map(M=>v.createElement("link",{key:M,rel:"modulepreload",href:M,...r})),R.map(({key:M,link:U})=>v.createElement("link",{key:M,nonce:r.nonce,...U,crossOrigin:U.crossOrigin??r.crossOrigin})))}function y2(...n){return i=>{n.forEach(r=>{typeof r=="function"?r(i):r!=null&&(r.current=i)})}}var x2=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{x2&&(window.__reactRouterVersion="7.13.1")}catch{}function v2(n,i){return Xb({basename:i?.basename,getContext:i?.getContext,future:i?.future,history:ob({window:i?.window}),hydrationData:b2(),routes:n,mapRouteProperties:V1,hydrationRouteProperties:G1,dataStrategy:i?.dataStrategy,patchRoutesOnNavigation:i?.patchRoutesOnNavigation,window:i?.window,unstable_instrumentations:i?.unstable_instrumentations}).initialize()}function b2(){let n=window?.__staticRouterHydrationData;return n&&n.errors&&(n={...n,errors:S2(n.errors)}),n}function S2(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 Nr(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 yy=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ea=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},M){let{basename:U,navigator:Z,unstable_useTransitions:G}=v.useContext(da),K=typeof b=="string"&&yy.test(b),ie=Zg(b,U);b=ie.to;let ae=j1(b,{relative:c}),oe=Ua(),W=null;if(p){let fe=jr(p,[],oe.unstable_mask?oe.unstable_mask.pathname:"/",!0);U!=="/"&&(fe.pathname=fe.pathname==="/"?U:ka([U,fe.pathname])),W=Z.createHref(fe)}let[N,Q,F]=h2(s,R),ue=N2(b,{replace:h,unstable_mask:p,state:g,target:m,preventScrollReset:x,relative:c,viewTransition:_,unstable_defaultShouldRevalidate:j,unstable_useTransitions:G});function ne(fe){i&&i(fe),fe.defaultPrevented||ue(fe)}let P=!(ie.isExternal||d),se=v.createElement("a",{...R,...F,href:(P?W:void 0)||ie.absoluteURL||ae,onClick:P?ne:i,ref:y2(M,Q),target:m,"data-discover":!K&&r==="render"?"true":void 0});return N&&!K?v.createElement(v.Fragment,null,se,v.createElement(m2,{page:ae})):se});ea.displayName="Link";var Sr=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=Cr(h,{relative:m.relative}),_=Ua(),j=v.useContext(wr),{navigator:R,basename:M}=v.useContext(da),U=j!=null&&z2(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&&M&&(K=Ca(K,M)||K);const ie=Z!=="/"&&Z.endsWith("/")?Z.length-1:Z.length;let ae=G===Z||!c&&G.startsWith(Z)&&G.charAt(ie)==="/",oe=K!=null&&(K===Z||!c&&K.startsWith(Z)&&K.charAt(Z.length)==="/"),W={isActive:ae,isPending:oe,isTransitioning:U},N=ae?i:void 0,Q;typeof s=="function"?Q=s(W):Q=[s,ae?"active":null,oe?"pending":null,U?"transitioning":null].filter(Boolean).join(" ");let F=typeof d=="function"?d(W):d;return v.createElement(ea,{...m,"aria-current":N,className:Q,ref:b,style:F,to:h,viewTransition:p},typeof g=="function"?g(W):g)});Sr.displayName="NavLink";var _2=v.forwardRef(({discover:n="render",fetcherKey:i,navigate:r,reloadDocument:s,replace:c,state:d,method:h=eo,action:p,onSubmit:g,relative:m,preventScrollReset:b,viewTransition:x,unstable_defaultShouldRevalidate:_,...j},R)=>{let{unstable_useTransitions:M}=v.useContext(da),U=C2(),Z=R2(p,{relative:m}),G=h.toLowerCase()==="get"?"get":"post",K=typeof p=="string"&&yy.test(p),ie=ae=>{if(g&&g(ae),ae.defaultPrevented)return;ae.preventDefault();let oe=ae.nativeEvent.submitter,W=oe?.getAttribute("formmethod")||h,N=()=>U(oe||ae.currentTarget,{fetcherKey:i,method:W,navigate:r,replace:c,state:d,relative:m,preventScrollReset:b,viewTransition:x,unstable_defaultShouldRevalidate:_});M&&r!==!1?v.startTransition(()=>N()):N()};return v.createElement("form",{ref:R,method:G,action:Z,onSubmit:s?g:ie,...j,"data-discover":!K&&n==="render"?"true":void 0})});_2.displayName="Form";function j2(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function xy(n){let i=v.useContext(_l);return Le(i,j2(n)),i}function N2(n,{target:i,replace:r,unstable_mask:s,state:c,preventScrollReset:d,relative:h,viewTransition:p,unstable_defaultShouldRevalidate:g,unstable_useTransitions:m}={}){let b=Zn(),x=Ua(),_=Cr(n,{relative:h});return v.useCallback(j=>{if(I1(j,i)){j.preventDefault();let R=r!==void 0?r:Za(x)===Za(_),M=()=>b(n,{replace:R,unstable_mask:s,state:c,preventScrollReset:d,relative:h,viewTransition:p,unstable_defaultShouldRevalidate:g});m?v.startTransition(()=>M()):M()}},[x,b,_,r,s,c,i,n,d,h,p,g,m])}function vy(n){pt(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(ed(n)),r=v.useRef(!1),s=Ua(),c=v.useMemo(()=>e2(s.search,r.current?null:i.current),[s.search]),d=Zn(),h=v.useCallback((p,g)=>{const m=ed(typeof p=="function"?p(new URLSearchParams(c)):p);r.current=!0,d("?"+m,g)},[d,c]);return[c,h]}var E2=0,w2=()=>`__${String(++E2)}__`;function C2(){let{router:n}=xy("useSubmit"),{basename:i}=v.useContext(da),r=k1(),s=n.fetch,c=n.navigate;return v.useCallback(async(d,h={})=>{let{action:p,method:g,encType:m,formData:b,body:x}=n2(d,i);if(h.navigate===!1){let _=h.fetcherKey||w2();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 R2(n,{relative:i}={}){let{basename:r}=v.useContext(da),s=v.useContext(Ra);Le(s,"useFormAction must be used inside a RouteContext");let[c]=s.matches.slice(-1),d={...Cr(n||".",{relative:i})},h=Ua();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:ka([r,d.pathname])),Za(d)}function z2(n,{relative:i}={}){let r=v.useContext(ud);Le(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:s}=xy("useViewTransitionState"),c=Cr(n,{relative:i});if(!r.isTransitioning)return!1;let d=Ca(r.currentLocation.pathname,s)||r.currentLocation.pathname,h=Ca(r.nextLocation.pathname,s)||r.nextLocation.pathname;return io(c.pathname,h)!=null||io(c.pathname,d)!=null}const by=(...n)=>n.filter((i,r,s)=>!!i&&i.trim()!==""&&s.indexOf(i)===r).join(" ").trim();const T2=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const O2=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(i,r,s)=>s?s.toUpperCase():r.toLowerCase());const ug=n=>{const i=O2(n);return i.charAt(0).toUpperCase()+i.slice(1)};var M2={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 D2=n=>{for(const i in n)if(i.startsWith("aria-")||i==="role"||i==="title")return!0;return!1};const A2=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,...M2,width:i,height:i,stroke:n,strokeWidth:s?Number(r)*24/Number(i):r,className:by("lucide",c),...!d&&!D2(p)&&{"aria-hidden":"true"},...p},[...h.map(([m,b])=>v.createElement(m,b)),...Array.isArray(d)?d:[d]]));const Oe=(n,i)=>{const r=v.forwardRef(({className:s,...c},d)=>v.createElement(A2,{ref:d,iconNode:i,className:by(`lucide-${T2(ug(n))}`,`lucide-${n}`,s),...c}));return r.displayName=ug(n),r};const L2=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Sy=Oe("arrow-right",L2);const k2=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],dg=Oe("arrow-up-right",k2);const U2=[["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"}]],H2=Oe("boxes",U2);const B2=[["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"}]],q2=Oe("brain",B2);const Y2=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],hi=Oe("check",Y2);const V2=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],mo=Oe("chevron-down",V2);const G2=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],yn=Oe("chevron-right",G2);const $2=[["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"}]],gd=Oe("circle-alert",$2);const K2=[["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"}]],fg=Oe("copy",K2);const X2=[["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"}]],Q2=Oe("database",X2);const Z2=[["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"}]],F2=Oe("file-spreadsheet",Z2);const J2=[["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"}]],bl=Oe("file-text",J2);const W2=[["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"}]],_y=Oe("file",W2);const P2=[["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"}]],I2=Oe("files",P2);const eS=[["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"}]],yd=Oe("folder-git-2",eS);const tS=[["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"}]],aS=Oe("folder-input",tS);const nS=[["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"}]],lS=Oe("folder-open",nS);const iS=[["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"}]],jy=Oe("folder-plus",iS);const rS=[["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"}]],wa=Oe("folder",rS);const sS=[["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"}]],ro=Oe("git-branch",sS);const oS=[["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"}]],td=Oe("git-commit-horizontal",oS);const cS=[["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"}]],ad=Oe("github",cS);const uS=[["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"}]],dS=Oe("globe",uS);const fS=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],hS=Oe("info",fS);const mS=[["path",{d:"M2 5h20",key:"1fs1ex"}],["path",{d:"M6 12h12",key:"8npq4p"}],["path",{d:"M9 19h6",key:"456am0"}]],pS=Oe("list-filter",mS);const gS=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Kt=Oe("loader-circle",gS);const yS=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],xS=Oe("menu",yS);const vS=[["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"}]],bS=Oe("monitor",vS);const SS=[["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"}]],_S=Oe("moon",SS);const jS=[["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"}]],mi=Oe("package",jS);const NS=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],ES=Oe("panel-left",NS);const wS=[["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"}]],nd=Oe("pencil",wS);const CS=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Ny=Oe("plus",CS);const RS=[["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"}]],zS=Oe("refresh-cw",RS);const TS=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],OS=Oe("search",TS);const MS=[["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"}]],DS=Oe("settings",MS);const AS=[["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"}]],LS=Oe("share-2",AS);const kS=[["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"}]],US=Oe("sparkles",kS);const HS=[["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"}]],BS=Oe("sun",HS);const qS=[["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"}]],Ey=Oe("trash-2",qS);const YS=[["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"}]],VS=Oe("upload",YS);const GS=[["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"}]],$S=Oe("users",GS);const KS=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],xd=Oe("x",KS),hg=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},XS=(n=>n?hg(n):hg),QS=n=>n;function ZS(n,i=QS){const r=ui.useSyncExternalStore(n.subscribe,ui.useCallback(()=>i(n.getState()),[n,i]),ui.useCallback(()=>i(n.getInitialState()),[n,i]));return ui.useDebugValue(r),r}const mg=n=>{const i=XS(n),r=s=>ZS(i,s);return Object.assign(r,i),r},po=(n=>n?mg(n):mg),FS="/api/v1";class ld extends Error{constructor(i,r,s){super(s),this.status=i,this.code=r,this.name="ApiError"}}async function Js(n,i,r,s){let c=`${FS}${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 ld(h.status,p,g)}return h.json()}const Ht={get(n,i){return Js("GET",n,void 0,i)},post(n,i){return Js("POST",n,i)},put(n,i){return Js("PUT",n,i)},delete(n){return Js("DELETE",n)}},JS=3e4,WS=1e3,PS=3e4;class IS{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()}))},JS)}stopHeartbeat(){this.heartbeatTimer&&(clearInterval(this.heartbeatTimer),this.heartbeatTimer=null)}scheduleReconnect(){if(this.reconnectTimer)return;const i=Math.min(WS*2**this.reconnectAttempt,PS);this.reconnectAttempt++,this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.open()},i)}clearTimers(){this.stopHeartbeat(),this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null)}}const Fa=new IS,Sl=po(n=>({status:"disconnected",onlineCount:0,connections:[],setStatus:i=>n({status:i}),fetchDaemonStatus:async()=>{try{const i=await Ht.get("/daemons/status");n({onlineCount:i.online_count,connections:i.connections})}catch{}}})),e4=n=>n==="connecting"?"disconnected":n;Fa.onStatusChange(n=>{Sl.getState().setStatus(e4(n))});Fa.on("ws:daemon:connected",n=>{const i=n;Sl.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}})});Fa.on("ws:daemon:status",n=>{const i=n;Sl.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 _r="lib_cloud_default",Vt=po((n,i)=>({libraries:[],loading:!1,error:null,fetchLibraries:async()=>{n({loading:!0,error:null});try{const r=await Ht.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 Ht.post("/libraries",r);return n(c=>({libraries:[...c.libraries,s]})),s},deleteLibrary:async r=>{await Ht.delete(`/libraries/${r}`),n(s=>({libraries:s.libraries.filter(c=>c.id!==r)}))},updateLibraryName:async(r,s)=>{const c=await Ht.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 Ht.get(`/libraries/${r}`);n(c=>({libraries:c.libraries.map(d=>d.id===r?s:d)}))}catch{i().fetchLibraries()}}})),Rr=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]},t4=n=>n.libraries.filter(i=>i.type==="daemon");Fa.on("ws:daemon:status",n=>{const i=n;i.lib_id&&Vt.getState()._updateLibraryOnline(i.lib_id,i.is_online),Vt.getState().fetchLibraries()});Fa.on("ws:daemon:connected",n=>{const i=n;i.lib_id&&Vt.getState()._updateLibraryOnline(i.lib_id,!0),Vt.getState().fetchLibraries()});Fa.on("ws:library:updated",n=>{const i=n;Vt.getState()._refreshLibrary(i.library_id)});const pg=n=>Symbol.iterator in n,gg=n=>"entries"in n,yg=(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},a4=(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 n4(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:pg(n)&&pg(i)?gg(n)&&gg(i)?yg(n,i):a4(n,i):yg({entries:()=>Object.entries(n)},{entries:()=>Object.entries(i)})}function gi(n){const i=ui.useRef(void 0);return r=>{const s=n(r);return n4(i.current,s)?i.current:i.current=s}}function id(){const{t:n}=Ce(),i=Sl(h=>h.onlineCount),r=Sl(h=>h.connections.length);if(Vt(gi(t4)).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 xg=[{to:"/",labelKey:"nav.home"},{to:"/studio",labelKey:"nav.studio"},{to:"/docs",labelKey:"nav.docs"}];function l4(){const{t:n}=Ce(),[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(ea,{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:xg.map(({to:s,labelKey:c})=>f.jsx(Sr,{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(id,{}),f.jsx(ea,{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(xd,{size:20}):f.jsx(xS,{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:xg.map(({to:s,labelKey:c})=>f.jsx(Sr,{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(id,{}),f.jsx(ea,{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 i4(n){return n==="system"&&typeof window<"u"?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":n==="system"?"dark":n}function wy(n){if(typeof window>"u")return;const i=i4(n);document.documentElement.setAttribute("data-theme",i),localStorage.setItem("theme",n)}function r4(){try{return localStorage.getItem("theme")||"system"}catch{return"system"}}const Cy=po(n=>({theme:r4(),setTheme:i=>{wy(i),n({theme:i})}}));let vg=!1;function s4(){if(vg||typeof window>"u")return;vg=!0;const n=window.matchMedia("(prefers-color-scheme: dark)"),i=()=>{const{theme:r}=Cy.getState();r==="system"&&wy("system")};n.addEventListener("change",i)}s4();const o4=[{mode:"light",icon:BS,labelKey:"footer.theme.light"},{mode:"dark",icon:_S,labelKey:"footer.theme.dark"},{mode:"system",icon:bS,labelKey:"footer.theme.system"}];function Ry(){const{t:n}=Ce(),{theme:i,setTheme:r}=Cy();return f.jsx("div",{className:"flex items-center gap-1",children:o4.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 zy(){const{i18n:n}=Ce(),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 Ty({compact:n}){const{t:i}=Ce(),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 c4="_brandIcon_1c7st_1",u4="_iconPulse_1c7st_35",bg={brandIcon:c4,iconPulse:u4};function d4({variant:n}){const{t:i}=Ce(),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:bg.brandIcon,children:f.jsx("span",{className:bg.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(Ry,{}),f.jsx(zy,{})]}),f.jsx(Ty,{})]})]})})}function f4(){return f.jsxs("div",{className:"flex min-h-screen flex-col",children:[f.jsx(l4,{}),f.jsx("main",{className:"mx-auto flex w-full max-w-[1200px] flex-1 flex-col px-4",children:f.jsx(my,{})}),f.jsx(d4,{})]})}function h4({onToggleSidebar:n}){const{t:i}=Ce();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(ES,{size:20})}),f.jsxs(ea,{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(ea,{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(id,{}),f.jsx(ea,{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 m4="lib_cloud_default",p4=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"}`,g4=[{to:"/studio/modeling",icon:H2,i18nKey:"studio.sidebar.modeling"},{to:"/studio/brain",icon:q2,i18nKey:"studio.sidebar.brain"},{to:"/studio/discovery",icon:OS,i18nKey:"studio.sidebar.discovery"},{to:"/studio/sharing",icon:LS,i18nKey:"studio.sidebar.sharing"},{to:"/studio/collaboration",icon:$S,i18nKey:"studio.sidebar.collaboration"},{to:"/studio/settings",icon:DS,i18nKey:"studio.sidebar.settings"}];function Sg({onNavigate:n}){const{t:i}=Ce(),r=Ua(),s=Zn(),c=Vt(gi(Rr)),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===m4?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(Q2,{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-opacity hover:bg-c4a-bg-hover hover:text-c4a-text-primary max-md:opacity-100 group-hover/sources:opacity-100",title:i("sources.menu.add_client"),children:f.jsx(Ny,{size:12})}),f.jsx("span",{className:"ml-auto shrink-0",children:h?f.jsx(mo,{size:12}):f.jsx(yn,{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(Sr,{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)})})]}),g4.map(({to:m,icon:b,i18nKey:x})=>f.jsxs(Sr,{to:m,onClick:n,className:({isActive:_})=>p4(_),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(Ry,{}),f.jsx(zy,{})]}),f.jsx(Ty,{compact:!0})]})]})}function y4(){const[n,i]=v.useState(!1);return v.useEffect(()=>{Vt.getState().fetchLibraries(),Sl.getState().fetchDaemonStatus()},[]),v.useEffect(()=>Fa.onStatusChange(r=>{r==="connected"&&(Vt.getState().fetchLibraries(),Sl.getState().fetchDaemonStatus())}),[]),f.jsxs("div",{className:"flex h-screen flex-col overflow-hidden",children:[f.jsx(h4,{onToggleSidebar:()=>i(!n)}),f.jsxs("div",{className:"flex min-h-0 flex-1",children:[f.jsx("div",{className:"hidden md:block",children:f.jsx(Sg,{})}),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(Sg,{onNavigate:()=>i(!1)})})]}),f.jsx("main",{className:"flex min-h-0 flex-1 flex-col overflow-x-hidden",children:f.jsx(my,{})})]})]})}function x4(){const{t:n}=Ce();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(ea,{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(Sy,{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 za({title:n,version:i,description:r}){const{t:s}=Ce();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 v4(){const{t:n}=Ce();return f.jsx(za,{title:n("page.login.title"),version:"0.5.0",description:n("page.login.description")})}function b4(){const{t:n}=Ce();return f.jsx(za,{title:n("page.docs.title"),version:"0.4.13",description:n("page.docs.description")})}function S4(){const{t:n}=Ce();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(ea,{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 _4(){const{t:n}=Ce();return f.jsx(za,{title:n("page.modeling.title"),version:"0.4.16",description:n("page.modeling.description")})}function j4(){const{t:n}=Ce();return f.jsx(za,{title:n("page.brain.title"),version:"0.4.18",description:n("page.brain.description")})}function N4(){const{t:n}=Ce();return f.jsx(za,{title:n("page.discovery.title"),version:"0.6.x",description:n("page.discovery.description")})}function E4(){const{t:n}=Ce();return f.jsx(za,{title:n("page.sharing.title"),version:"0.4.39",description:n("page.sharing.description")})}function w4(){const{t:n}=Ce();return f.jsx(za,{title:n("page.collaboration.title"),version:"0.5.x",description:n("page.collaboration.description")})}function C4(){const{t:n}=Ce();return f.jsx(za,{title:n("page.settings.title"),version:"0.5.x",description:n("page.settings.description")})}function R4(){const{t:n}=Ce();return f.jsx(za,{title:n("page.code_setup.title"),version:"0.4.13",description:n("page.code_setup.description")})}function z4(){const{t:n}=Ce();return f.jsx(za,{title:n("page.code_compile.title"),version:"0.4.13",description:n("page.code_compile.description")})}function T4(){const{t:n}=Ce();return f.jsx(za,{title:n("page.code_review.title"),version:"0.4.14",description:n("page.code_review.description")})}function O4(){const{t:n}=Ce();return f.jsx(za,{title:n("page.code_result.title"),version:"0.4.14",description:n("page.code_result.description")})}const go=(n,i)=>{for(const r of n){if(r.path===i)return r;if(r.children){const s=go(r.children,i);if(s)return s}}return null},M4=(n,i)=>i===""?n:go(n,i)?.children??[],Oy=(n,i)=>{if(!i)return[];const r=i.split("/"),s=[];let c="";for(const d of r){c=c?`${c}/${d}`:d;const h=go(n,c);h&&s.push(h)}return s},yo=po(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 Ht.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 Ht.get(`/sources/${i}`);return n({currentRoot:r}),r},createSource:async i=>await Ht.post("/sources",i),addTreeNode:async(i,r)=>{const s=await Ht.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 Ht.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 Ht.delete(`/sources/${i}`),n(r=>({rootSources:r.rootSources.filter(s=>s.id!==i),currentRoot:r.currentRoot?.id===i?null:r.currentRoot}))},setFilter:i=>n({filter:i}),clearSources:()=>n({rootSources:[],currentRoot:null,total:0,offset:0})}));function zr({segments:n}){const{t:i}=Ce(),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 M=R.map(W=>W.offsetWidth),U=4;if(M.reduce((W,N)=>W+N,0)+U*(M.length-1)<=j){d(0);return}const G=20,K=(M[0]??0)+(M[1]??0)+U,ie=M[M.length-1]??0,ae=K+U+G+U+ie;let oe=p;for(let W=1;W<=p;W++){let N=0;for(let Q=2+W;Q<M.length-1;Q++)N+=M[Q]+U;if(ae+N<=j){oe=W;break}}d(oe)};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(yn,{size:12,className:"shrink-0 text-c4a-text-muted"}),m.to&&!x?f.jsx(ea,{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(yn,{size:12}),f.jsx("span",{className:"whitespace-nowrap",children:m.label})]},b))})]})}const D4=["all","indexed","not_indexed"];function A4({value:n,onChange:i}){const{t:r}=Ce(),[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(pS,{size:12}),f.jsx("span",{className:"hidden sm:inline",children:p[n]}),f.jsx(mo,{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:D4.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(hi,{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(hi,{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(xd,{size:14})}),s&&f.jsx("span",{className:"ml-1 text-xs text-c4a-error",children:s})]})}function L4({source:n,isDaemonLibrary:i}){return n.kind==="folder"?i?f.jsx(lS,{size:16,className:"shrink-0 text-c4a-text-muted"}):f.jsx(wa,{size:16,className:"shrink-0 text-c4a-text-muted"}):n.source_type==="code"?f.jsx(mi,{size:16,className:"shrink-0 text-c4a-accent"}):f.jsx(bl,{size:16,className:"shrink-0 text-c4a-accent"})}function _g({status:n}){const{t:i}=Ce(),[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 jg({source:n,displayName:i,childCount:r,isDaemonLibrary:s,isRepoRoot:c,onClick:d,onRename:h,onDelete:p}){const{t:g}=Ce(),[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)},[]),M=!c&&h,U=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(L4,{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(_g,{status:n.index_status})]}),f.jsx("div",{className:"flex items-center gap-2 md:hidden",children:n.kind==="source"&&f.jsx(_g,{status:n.index_status})}),(M||U)&&f.jsxs("div",{className:"flex items-center gap-1 opacity-0 transition-opacity group-hover:opacity-100",children:[M&&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(nd,{size:14})}),U&&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(Ey,{size:14})})]})]})}function Ng({target:n,onConfirm:i,onCancel:r}){const{t:s}=Ce(),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 k4({onConfirm:n,onCancel:i,error:r}){const{t:s}=Ce(),[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(jy,{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 Gu({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(mo,{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 U4({onClose:n}){const{t:i}=Ce(),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(US,{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")})})]})})}function H4({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(Kt,{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(wa,{size:16,className:"shrink-0 text-c4a-text-muted"}),f.jsx("span",{children:".."})]}),s]})})]})}function B4({library:n,onNewFolder:i,onImportRepo:r,onImportDir:s,onUpgrade:c}){const{t:d}=Ce(),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 q4(){const{t:n}=Ce();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 Eg=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 Y4(){const{t:n}=Ce(),i=Zn(),{libId:r}=fo(),[s,c]=vy(),d=s.get("rootId")||null,h=s.get("path")||"",g=Vt(gi(Rr)).find(pe=>pe.id===r),m=Vt(pe=>pe.updateLibraryName),b=Vt(pe=>pe.deleteLibrary),{rootSources:x,currentRoot:_,loading:j,filter:R,fetchRootSources:M,fetchRootSource:U,createSource:Z,addTreeNode:G,updateSource:K,deleteSource:ie,setFilter:ae}=yo(),[oe,W]=v.useState(!1),[N,Q]=v.useState(null),[F,ue]=v.useState(null),[ne,P]=v.useState(null),[se,fe]=v.useState(!1),[D,J]=v.useState(!1),[ce,V]=v.useState(null),[de,E]=v.useState(!1);v.useEffect(()=>{r&&M({library_id:r})},[r,M]),v.useEffect(()=>{d&&U(d)},[d,U]);const H=d!==null,I=v.useMemo(()=>H?_?[...M4(_.tree,h)].sort((Je,dt)=>Je.kind!==dt.kind?Je.kind==="folder"?-1:1:Je.name.localeCompare(dt.name)).map(Je=>({type:"node",root:_,node:Je})):[]:[...x].sort((dt,ut)=>new Date(dt.created_at).getTime()-new Date(ut.created_at).getTime()).map(dt=>({type:"root",root:dt,node:null})),[H,x,_,h]),le=v.useMemo(()=>R==="all"?I:I.filter(pe=>pe.type==="root"||!pe.node||pe.node.kind==="folder"?!0:R==="indexed"?pe.node.index_status==="indexed":pe.node.index_status==="none"||!pe.node.index_status),[I,R]),ve=g?.type==="daemon",_e=g?.type==="cloud",ze=ve&&!H,lt=v.useMemo(()=>{if(!g)return[];const pe=[{label:g.id===_r?n("sources.library.default_cloud_name"):g.name,to:`/studio/sources/${g.id}`}];return H&&_&&(pe.push({label:_.name,to:`/studio/sources/${g.id}?rootId=${_.id}`}),h&&Oy(_.tree,h).forEach(Je=>{pe.push({label:Je.name,to:`/studio/sources/${g.id}?rootId=${_.id}&path=${encodeURIComponent(Je.path)}`})})),pe},[g,H,_,h,n]),he=v.useCallback(async pe=>{if(r)try{H&&d?await G(d,{parent_path:h,kind:"folder",name:pe}):(await Z({library_id:r,kind:"folder",name:pe}),M({library_id:r})),W(!1),Q(null)}catch(De){De instanceof ld&&De.status===409&&Q(n("sources.error.name_conflict",{name:pe}))}},[r,H,d,h,Z,G,M,n]),wt=v.useCallback(pe=>{r&&(pe.type==="root"?c({rootId:pe.root.id}):pe.node&&(pe.node.kind==="folder"?c({rootId:pe.root.id,path:pe.node.path}):i(`/studio/source/${pe.root.id}?path=${encodeURIComponent(pe.node.path)}`)))},[r,i,c]),Qt=v.useCallback(()=>{if(!(!d||!r))if(h){const pe=h.split("/");pe.pop();const De=pe.join("/");c(De?{rootId:d,path:De}:{rootId:d})}else c({})},[d,r,h,c]),ta=v.useCallback(async(pe,De)=>{try{return await K(pe,{name:De}),M({library_id:r}),null}catch(Je){return Je instanceof ld&&Je.status===409?n("sources.error.name_conflict",{name:De}):null}},[r,K,M,n]),at=v.useCallback(pe=>{if(pe.type==="root"){P(pe.root.id);const De=pe.root.tree.length>0?Eg({children:pe.root.tree}):void 0;ue(ve?{type:"repo",name:pe.root.name,libraryName:g.name,...De?{packageCount:De.codeSources,docCount:De.docSources}:{}}:{type:"folder",name:pe.root.name,...De?{folderCount:De.folders,sourceCount:De.sources}:{}})}},[ve,g]),bt=v.useCallback(async()=>{if(!(!ne||!r))try{await ie(ne),ue(null),P(null),M({library_id:r})}catch{}},[ne,r,ie,M]),fa=v.useCallback(()=>{r&&i(`/studio/sources/import/${r}`)},[r,i]),Ha=v.useCallback(()=>{r&&i(`/studio/sources/import-dir/${r}`)},[r,i]),aa=g?.id===_r,Gt=v.useCallback(async pe=>{if(r)try{await m(r,pe),J(!1),V(null)}catch(De){const Je=De instanceof Error?De.message:String(De);V(Je)}},[r,m]),ha=v.useCallback(()=>{J(!1),V(null)},[]),ma=v.useCallback(async()=>{if(r){try{await b(r),i("/studio/sources")}catch{}E(!1)}},[r,b,i]),Ja=v.useCallback(()=>{E(!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 Fn=x.length===0&&R==="all"&&!j&&!H,Jn=le.filter(pe=>pe.type==="node"&&pe.node?.kind==="source").length===0&&R==="indexed"&&!j,Dt=!ze,Ta=_e,Ba=ze;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:D?f.jsx(My,{currentName:g.name,onConfirm:Gt,onCancel:ha,error:ce}):f.jsx(zr,{segments:lt})}),f.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[Ta&&f.jsxs(f.Fragment,{children:[f.jsx(Gu,{label:n("sources.actions.upload"),icon:f.jsx(VS,{size:14}),items:[{label:n("sources.actions.upload_md"),icon:f.jsx(bl,{size:14}),onClick:()=>fe(!0)}]}),f.jsx(Gu,{label:n("sources.actions.add"),icon:f.jsx(Ny,{size:14}),items:[{label:n("sources.actions.add_folder"),icon:f.jsx(jy,{size:14}),onClick:()=>W(!0)},{label:n("sources.actions.add_web"),icon:f.jsx(dS,{size:14}),onClick:()=>fe(!0)},{label:n("sources.actions.add_feishu"),icon:f.jsx(F2,{size:14}),onClick:()=>fe(!0)}]}),f.jsxs("button",{onClick:()=>fe(!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(dg,{size:14}),f.jsx("span",{className:"hidden sm:inline",children:n("sources.actions.import_repo_url")})]})]}),Ba&&f.jsxs(f.Fragment,{children:[f.jsxs("button",{onClick:Ha,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(aS,{size:14}),f.jsx("span",{className:"hidden sm:inline",children:n("sources.actions.import_dir")})]}),f.jsxs("button",{onClick:fa,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(dg,{size:14}),f.jsx("span",{className:"hidden sm:inline",children:n("sources.actions.import_repo")})]}),f.jsx(Gu,{label:"",icon:f.jsx(nd,{size:14}),alignRight:!0,items:[{label:n("sources.library.rename"),icon:f.jsx(nd,{size:14}),onClick:()=>J(!0)},...aa?[]:[{label:n("sources.actions.delete"),icon:f.jsx(Ey,{size:14}),onClick:()=>E(!0)}]]})]}),Dt&&f.jsx(A4,{value:R,onChange:ae})]})]}),Fn?f.jsx(B4,{library:g,onNewFolder:()=>W(!0),...ve?{onImportRepo:fa,onImportDir:Ha}:{},..._e?{onUpgrade:()=>fe(!0)}:{}}):f.jsx(H4,{pathLabel:lt.map(pe=>pe.label).join(" / "),loading:j,onNavigateUp:H?Qt:void 0,children:le.length===0?Jn?f.jsx(q4,{}):H?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:le.map(pe=>{if(pe.type==="root"){const ut=pe.root,jl=ve,pa=jl?ut.metadata?.local_path:void 0,Ct=ut.tree.length>0?Eg({children:ut.tree}):void 0,gt=Ct?Ct.folders+Ct.sources:0;return f.jsx(jg,{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 pa=="string"?{displayName:pa}:{},...gt>0?{childCount:gt}:{},isDaemonLibrary:ve??!1,isRepoRoot:jl,onClick:()=>wt(pe),onRename:Tt=>ta(ut.id,Tt),onDelete:()=>at(pe)},ut.id)}const De=pe.node,Je=`${pe.root.id}:${De.path}`,dt=De.kind==="folder"&&De.children?De.children.length:void 0;return f.jsx(jg,{source:{id:pe.root.id,library_id:pe.root.library_id,owner_id:pe.root.owner_id,path:De.path,kind:De.kind,source_type:De.source_type??null,name:De.name,content_hash:null,metadata:De.metadata??null,index_status:De.index_status??"none",created_at:pe.root.created_at,updated_at:pe.root.updated_at},...dt!==void 0?{childCount:dt}:{},isDaemonLibrary:ve??!1,onClick:()=>wt(pe)},Je)})})}),oe&&f.jsx(k4,{onConfirm:he,onCancel:()=>{W(!1),Q(null)},error:N}),se&&f.jsx(U4,{onClose:()=>fe(!1)}),F&&f.jsx(Ng,{target:F,onConfirm:bt,onCancel:()=>{ue(null),P(null)}}),de&&g&&f.jsx(Ng,{target:{type:"client",name:g.name},onConfirm:ma,onCancel:Ja})]})}function Dy(){const{t:n}=Ce(),[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(gd,{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(hi,{size:10}):f.jsx(fg,{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(hi,{size:10}):f.jsx(fg,{size:10})})]})]})]})}function Ay({open:n,onClose:i,rpc:r,onNavigate:s,defaultPath:c}){const{t:d}=Ce(),[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 M=h.trim();if(M){x(!0),m(null);try{(await r("fs/exists",{path:M})).exists?(s(M),p(c??""),m(null),i()):m(d("sources.import.wildcard_path_not_found"))}catch(U){m(U instanceof Error?U.message:String(U))}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(xd,{size:14})})]}),f.jsxs("div",{className:"mt-3 flex items-center gap-2",children:[f.jsx("input",{ref:_,type:"text",value:h,onChange:M=>{p(M.target.value),m(null)},onKeyDown:M=>{M.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(Kt,{size:12,className:"animate-spin"}):f.jsx(Sy,{size:12}),d("sources.import.wildcard_go")]})]}),g&&f.jsx("p",{className:"mt-2 text-xs text-c4a-error",children:g})]})}):null}function Ly(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 V4(n,i){return`${n}/tree/${encodeURIComponent(i)}`}function G4(n,i){return`${n}/commit/${i}`}function $4({rpc:n,selectedPath:i,onSelect:r,allowedPaths:s,importedPaths:c}){const{t:d}=Ce(),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,M]=v.useState(!1),[U,Z]=v.useState(null),[G,K]=v.useState(null);v.useEffect(()=>{if(h&&!p)return;let V=!1;return(async()=>{try{const de=await n("fs/homeDir",{});V||K(de.home_dir)}catch{V||K("/")}})(),()=>{V=!0}},[h,p,n]);const[ie,ae]=v.useState(!1),oe=v.useCallback(async V=>{M(!0),Z(null);try{const de=await n("fs/listTree",{path:V,depth:1});j(de.entries||[]),x(V),m(!1)}catch(de){const E=de instanceof Error?de.message:String(de);Z(E)}finally{M(!1)}},[n]);v.useEffect(()=>{h&&!p||G!==null&&oe(G)},[G]);const[W,N]=v.useState(null),[Q,F]=v.useState(null),[ue,ne]=v.useState(!1);v.useEffect(()=>{if(!i){F(null),ne(!1);return}F(null),ne(!0);let V=!1;return(async()=>{try{const de=await n("fs/repoStatus",{path:i});V||(F({branch:de.branch,hash:de.head_hash,remoteUrl:de.remote_url}),ne(!1))}catch{V||(F(null),ne(!1))}})(),()=>{V=!0}},[i,n]);const P=v.useMemo(()=>Q?.remoteUrl?Ly(Q.remoteUrl):null,[Q?.remoteUrl]),se=v.useMemo(()=>new Set(c??[]),[c]),fe=v.useCallback(V=>{if(V.type==="directory")if(V.is_git_repo){if(se.has(V.path))return;N(null),r(V.path,V.name)}else N(V.path),oe(V.path)},[r,oe,se]),D=v.useCallback(()=>{if(h&&!p&&s.some(E=>E===b)){m(!0),x(""),j([]),Z(null),N(null);return}const V=b.split("/").slice(0,-1).join("/")||"/";N(null),oe(V)},[b,oe,h,p,s]),J=v.useMemo(()=>_.filter(V=>V.type==="directory").sort((V,de)=>V.is_git_repo&&!de.is_git_repo?-1:!V.is_git_repo&&de.is_git_repo?1:V.name.localeCompare(de.name)),[_]),ce=v.useMemo(()=>_.filter(V=>V.type==="file").sort((V,de)=>V.name.localeCompare(de.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(Dy,{})]}):f.jsx("p",{className:"min-w-0 shrink truncate font-mono text-xs text-c4a-text-muted",children:b}),i&&ue?f.jsxs("div",{className:"flex shrink-0 items-center gap-1.5 font-mono text-xs text-c4a-accent",children:[f.jsx(Kt,{size:12,className:"animate-spin"}),f.jsx("span",{children:d("common.loading")})]}):i&&Q?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:[P?f.jsxs("a",{href:P.repoUrl,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 truncate hover:underline",title:P.repoUrl,children:[f.jsx(ad,{size:12,className:"shrink-0"}),f.jsx("span",{className:"truncate",children:P.slug})]}):f.jsxs("span",{className:"flex items-center gap-1 truncate",children:[f.jsx(ad,{size:12,className:"shrink-0"}),f.jsx("span",{className:"truncate",children:i.split("/").pop()||i})]}),f.jsx("span",{className:"text-c4a-text-muted",children:"/"}),P?f.jsxs("a",{href:V4(P.repoUrl,Q.branch),target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 hover:underline",children:[f.jsx(ro,{size:10,className:"shrink-0"}),f.jsx("span",{children:Q.branch})]}):f.jsxs("span",{className:"flex items-center gap-1",children:[f.jsx(ro,{size:10,className:"shrink-0"}),f.jsx("span",{children:Q.branch})]}),f.jsx("span",{className:"text-c4a-text-muted",children:"/"}),P?f.jsx("a",{href:G4(P.repoUrl,Q.hash),target:"_blank",rel:"noopener noreferrer",className:"hover:underline",children:Q.hash.slice(0,7)}):f.jsx("span",{children:Q.hash.slice(0,7)})]}):!i&&p&&g?f.jsx("button",{onClick:()=>ae(!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:()=>oe(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(wa,{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(yn,{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(V=>f.jsxs("button",{onClick:()=>oe(V),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(wa,{size:14,className:"shrink-0"}),f.jsx("span",{className:"truncate",children:V}),f.jsx(yn,{size:12,className:"shrink-0 text-c4a-text-muted"})]},V))}):U&&!R?f.jsx("p",{className:"py-4 text-xs text-c4a-error",children:U}):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(Kt,{size:14,className:"animate-spin text-c4a-text-muted"})}),b!=="/"&&f.jsxs("button",{onClick:D,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(wa,{size:14}),f.jsx("span",{children:".."})]}),J.map(V=>{const de=V.is_git_repo&&se.has(V.path),E=V.is_git_repo?yd:wa;return f.jsxs("div",{className:`flex w-full items-center rounded pl-2 pr-4 text-left text-sm transition-colors ${de?"cursor-not-allowed text-c4a-accent/60":i===V.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:()=>fe(V),disabled:de||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:V.name}),de&&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")})]}),!de&&f.jsx("button",{onClick:H=>{H.stopPropagation(),oe(V.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:V.path,children:f.jsx(yn,{size:12})})]},V.path)}),ce.map(V=>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(_y,{size:14,className:"shrink-0"}),f.jsx("span",{className:"truncate",children:V.name})]},V.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(Ay,{open:ie,onClose:()=>ae(!1),rpc:n,onNavigate:oe,defaultPath:G??void 0})]})}function wg({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(mo,{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(hi,{size:12,className:`shrink-0 ${j.value===n?"opacity-100":"opacity-0"}`}),f.jsx("span",{className:"truncate",children:j.label})]},j.value))})]})}const K4=/\.md$/i,$u=100,X4=(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 Q4({rpc:n,repoPath:i,onReady:r,onBusyChange:s}){const{t:c}=Ce(),[d,h]=v.useState(""),[p,g]=v.useState([]),[m,b]=v.useState(""),[x,_]=v.useState([]),[j,R]=v.useState(!1),[M,U]=v.useState(!0),[Z,G]=v.useState(!1),[K,ie]=v.useState(!1),[ae,oe]=v.useState([]),[W,N]=v.useState([]),[,Q]=v.useState([]),[F,ue]=v.useState(),ne=v.useMemo(()=>F?Ly(F):null,[F]),[P,se]=v.useState("packages"),[fe,D]=v.useState($u),J=v.useRef(null),ce=v.useRef(null);v.useEffect(()=>{if(!M){G(!1);return}const he=setTimeout(()=>G(!0),2e3);return()=>clearTimeout(he)},[M]),v.useEffect(()=>{D($u),ce.current?.scrollTo(0,0)},[P]),v.useEffect(()=>{const he=J.current;if(!he)return;const wt=P==="packages"?ae.length:W.length;if(fe>=wt)return;const Qt=new IntersectionObserver(ta=>{ta[0]?.isIntersecting&&D(at=>Math.min(at+$u,wt))},{root:ce.current,threshold:.1});return Qt.observe(he),()=>Qt.disconnect()},[P,fe,ae.length,W.length]);const V=v.useCallback(async(he,wt)=>{ie(!0),s?.(!0);try{const Qt=await n("fs/repoScan",{path:i,hash:he}),ta=Qt.files||[],at=Qt.manifests||[];Q(ta);const bt=[];for(const Gt of at){const ha=Gt.path.split("/"),ma=ha.slice(0,-1).join("/")||".",Ja=ha.length===1||Gt.path==="package.json",Fn=ma==="."?i.split("/").pop()||"root":ha[ha.length-2]||ma,Jn=X4(Gt.path,Gt.content);bt.push({name:Jn||Fn,path:ma,isRoot:Ja})}const fa=ta.filter(Gt=>K4.test(Gt.path)).map(Gt=>Gt.path);N(fa),oe(bt);const Ha=wt?.branch??d,aa=wt?.isDirty??j;r({branch:Ha,commit:he,isDirty:aa,repoFiles:ta,packages:bt,mdFiles:fa,repoFileContents:at})}catch{}finally{ie(!1),s?.(!1)}},[n,i,d,j,r,s]);v.useEffect(()=>{(async()=>{U(!0),s?.(!0);try{const he=await n("fs/repoStatus",{path:i});h(he.branch),g(he.branches||[he.branch]),b(he.head_hash),R(he.is_dirty),ue(he.remote_url),_(he.commits||[{hash:he.head_hash,message:"HEAD"}]),await V(he.head_hash,{branch:he.branch,isDirty:he.is_dirty})}catch{}finally{U(!1),s?.(!1)}})()},[i]),v.useEffect(()=>{r({branch:d,commit:m,isDirty:j,packages:ae,mdFiles:W,repoFileContents:[]})},[d,m,j]);const de=v.useCallback(async he=>{h(he);try{const wt=await n("fs/repoStatus",{path:i});b(wt.head_hash),await V(wt.head_hash)}catch{}},[i,n,V]),E=d&&d!=="main"&&d!=="master",H=i.split("/").pop()||i;if(M)return f.jsxs("div",{className:"flex min-h-0 flex-1 flex-col items-center justify-center",children:[f.jsx(Kt,{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 I=p.map(he=>({value:he,label:he})),le=x.map(he=>({value:he.hash,label:`${he.hash.slice(0,7)} ${he.message!=="HEAD"?`— ${he.message.slice(0,50)}`:""}`.trim()})),ve=x.length<=1,_e=P==="packages"?ae:W,ze=_e.slice(0,fe),lt=fe<_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:ne?f.jsxs("a",{href:ne.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(ad,{size:14,className:"shrink-0"}),H]}):f.jsx("span",{className:"font-mono text-sm font-bold text-c4a-accent",children:H})}),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(wg,{value:d,options:I,onChange:de,icon:f.jsx(ro,{size:12})}),ve?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(td,{size:12}),m.slice(0,7)]}):f.jsx("div",{className:"hidden sm:block",children:f.jsx(wg,{value:m,options:le,onChange:he=>{b(he),V(he)},icon:f.jsx(td,{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(hS,{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(gd,{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(Kt,{size:12,className:"animate-spin text-c4a-text-muted"}),f.jsx("span",{className:"text-c4a-text-muted",children:"Analyzing repository..."})]}):ae.length>0?c("sources.import.recognized",{packages:ae.length,docs:W.length}):c("sources.import.no_packages")}),!K&&(ae.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 ${P==="packages"?"bg-c4a-accent/10 text-c4a-accent":"text-c4a-text-muted hover:text-c4a-text-secondary"}`,children:[f.jsx(mi,{size:13}),f.jsx("span",{className:"font-mono",children:ae.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 ${P==="docs"?"bg-c4a-accent/10 text-c4a-accent":"text-c4a-text-muted hover:text-c4a-text-secondary"}`,children:[f.jsx(bl,{size:13}),f.jsx("span",{className:"font-mono",children:W.length})]})]})]}),f.jsx("hr",{className:"border-c4a-border-subtle"}),f.jsx("div",{ref:ce,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(Kt,{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:P==="packages"?c("sources.import.no_packages"):"—"}):f.jsxs(f.Fragment,{children:[P==="packages"?ze.map(he=>f.jsxs("div",{className:"flex items-center gap-2 rounded pl-2 pr-4 py-1 text-xs",children:[f.jsx(mi,{size:14,className:"shrink-0 text-c4a-accent"}),f.jsx("span",{className:"text-c4a-text-primary",children:he.name}),f.jsx("span",{className:"hidden truncate text-c4a-text-muted sm:inline",children:he.path}),he.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"})]},he.path)):ze.map(he=>f.jsxs("div",{className:"flex items-center gap-2 rounded pl-2 pr-4 py-1 text-xs",children:[f.jsx(bl,{size:14,className:"shrink-0 text-c4a-text-secondary"}),f.jsx("span",{className:"truncate text-c4a-text-primary",children:he})]},he)),lt&&f.jsx("div",{ref:J,className:"h-4"})]})})]})]})}function Z4({importState:n,libraryName:i,importing:r}){const{t:s}=Ce(),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(Ws,{icon:f.jsx(ro,{size:14}),label:s("sources.import.branch"),value:n.branch}),f.jsx(Ws,{icon:f.jsx(td,{size:14}),label:s("sources.import.commit"),value:n.commit.slice(0,7)}),f.jsx(Ws,{icon:f.jsx(mi,{size:14}),label:s("sources.import.packages"),value:String(n.packages.length),tooltip:s("sources.import.dir_code_packages_tip")}),f.jsx(Ws,{icon:f.jsx(bl,{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(Kt,{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 Ws({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 F4(){const{t:n}=Ce(),i=Zn(),{libId:r}=fo(),c=Vt(gi(Rr)).find(N=>N.id===r),d=yo(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,[M,U]=v.useState([]);v.useEffect(()=>{if(!r)return;let N=!1;return(async()=>{try{const Q=await Ht.get("/sources",{library_id:r,limit:"500"});if(N)return;const F=Q.items.map(ue=>{const ne=ue.metadata;return typeof ne?.local_path=="string"?ne.local_path:null}).filter(ue=>ue!==null);U(F)}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,Q)=>{if(!r)throw new Error("No library");const F=await Ht.post(`/libraries/${r}/rpc`,{method:N,params:Q});if(F.error){const ue=F.error;throw new Error(ue.message??JSON.stringify(F.error))}return F.result??F},[r]),K=v.useCallback((N,Q)=>{j(F=>({...F,repoPath:N,repoName:Q}))},[]),ie=v.useCallback(N=>{j(Q=>({...Q,...N}))},[]),ae=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(F=>F.path),repo_file_contents:_.repoFileContents}),Q=Array.isArray(N)?N[0]:N;Q?.id?i(`/studio/sources/${r}?rootId=${Q.id}`):i(`/studio/sources/${r}`)}catch{m(!1)}}},[r,_,d,i]),oe=v.useMemo(()=>h===1?!!_.repoPath:h===2?!!_.commit:!0,[h,_]),W=v.useMemo(()=>c?[{label:c.id===_r?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(zr,{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(Ku,{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(Cg,{}),f.jsx(Ku,{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(Cg,{}),f.jsx(Ku,{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($4,{rpc:G,selectedPath:_.repoPath,onSelect:K,allowedPaths:Z,importedPaths:M}),h===2&&f.jsx(Q4,{rpc:G,repoPath:_.repoPath,onReady:ie,onBusyChange:x}),h===3&&f.jsx(Z4,{importState:_,libraryName:c.name,importing:g})]}):f.jsx(J4,{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:!oe||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:ae,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(Kt,{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 Ku({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 Cg(){return f.jsx("span",{className:"h-px flex-1 bg-c4a-border-default"})}function J4({libraryName:n}){const{t:i}=Ce();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(ea,{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 Rg=(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 W4({rpc:n,selectedPath:i,onSelect:r,allowedPaths:s,importedPaths:c}){const{t:d}=Ce(),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,M]=v.useState(!1),[U,Z]=v.useState(null),G=v.useMemo(()=>new Set(c??[]),[c]),[K,ie]=v.useState(null);v.useEffect(()=>{if(h&&!p)return;let P=!1;return(async()=>{try{const se=await n("fs/homeDir",{});P||ie(se.home_dir)}catch{P||ie("/")}})(),()=>{P=!0}},[h,p,n]);const[ae,oe]=v.useState(!1),W=v.useCallback(async P=>{M(!0),Z(null);try{const se=await n("fs/listTree",{path:P,depth:1});j(se.entries||[]),x(P),m(!1)}catch(se){const fe=se instanceof Error?se.message:String(se);Z(fe)}finally{M(!1)}},[n]);v.useEffect(()=>{h&&!p||K!==null&&W(K)},[K]);const N=v.useCallback(P=>{if(P.type!=="directory"||G.has(P.path))return;const se=Rg(P.children||[],P.path);r(P.path,P.name,se),W(P.path)},[r,W,G]),Q=v.useCallback(()=>{if(h&&!p&&s.some(fe=>fe===b)){m(!0),x(""),j([]),Z(null);return}const P=b.split("/").slice(0,-1).join("/")||"/";W(P)},[b,W,h,p,s]);v.useEffect(()=>{if(b&&!g&&_.length>=0&&!R){const P=b.split("/").pop()||b,se=Rg(_,b);r(b,P,se)}},[b,g,_,R]);const F=v.useMemo(()=>i?i.split("/").pop()||i:"",[i]),ue=v.useMemo(()=>_.filter(P=>P.type==="directory").sort((P,se)=>P.is_git_repo&&!se.is_git_repo?-1:!P.is_git_repo&&se.is_git_repo?1:P.name.localeCompare(se.name)),[_]),ne=v.useMemo(()=>_.filter(P=>P.type==="file").sort((P,se)=>P.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(Dy,{})]}):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(wa,{size:12}),f.jsx("span",{children:F})]}):p&&g?f.jsx("button",{onClick:()=>oe(!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(wa,{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(yn,{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(P=>f.jsxs("button",{onClick:()=>W(P),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(wa,{size:14,className:"shrink-0"}),f.jsx("span",{className:"truncate",children:P}),f.jsx(yn,{size:12,className:"shrink-0 text-c4a-text-muted"})]},P))}):U&&!R?f.jsx("p",{className:"py-4 text-xs text-c4a-error",children:U}):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(Kt,{size:14,className:"animate-spin text-c4a-text-muted"})}),b!=="/"&&f.jsxs("button",{onClick:Q,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(wa,{size:14}),f.jsx("span",{children:".."})]}),ue.map(P=>{const se=G.has(P.path),fe=P.is_git_repo?yd:wa;return f.jsxs("button",{onClick:()=>N(P),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===P.path?"bg-c4a-accent/10 text-c4a-accent":"text-c4a-text-secondary hover:bg-c4a-bg-hover"}`,children:[f.jsx(fe,{size:14,className:"shrink-0"}),f.jsx("span",{className:"flex-1 truncate",children:P.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(yn,{size:12,className:"shrink-0 text-c4a-text-muted"})]},P.path)}),ne.map(P=>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(_y,{size:14,className:"shrink-0"}),f.jsx("span",{className:"truncate",children:P.name})]},P.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(Ay,{open:ae,onClose:()=>oe(!1),rpc:n,onNavigate:W,defaultPath:K??void 0})]})}const P4=new Set(["package.json","pyproject.toml","setup.py","go.mod","cargo.toml","pom.xml","build.gradle"]),I4=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&&P4.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 e_({dirPath:n,rpc:i,importing:r,onScanComplete:s,onBusyChange:c}){const{t:d}=Ce(),[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||[],M=j.manifests||[],U=I4(R);x(U),s(R,U,M)}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(Kt,{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(gd,{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(zS,{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(dr,{icon:f.jsx(bl,{size:14}),label:d("sources.import.dir_doc_files"),value:b.docFiles,tooltip:d("sources.import.dir_doc_files_tip")}),f.jsx(dr,{icon:f.jsx(mi,{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(dr,{icon:f.jsx(yd,{size:14}),label:d("sources.import.dir_git_repos"),value:b.gitRepos}),f.jsx(dr,{icon:f.jsx(wa,{size:14}),label:d("sources.import.dir_total_dirs"),value:b.totalDirs}),f.jsx(dr,{icon:f.jsx(I2,{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(Kt,{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 dr({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 t_(){const{t:n}=Ce(),i=Zn(),{libId:r}=fo(),c=Vt(gi(Rr)).find(N=>N.id===r),d=yo(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,[M,U]=v.useState([]);v.useEffect(()=>{if(!r)return;let N=!1;return(async()=>{try{const Q=await Ht.get("/sources",{library_id:r,limit:"500"});if(N)return;const F=Q.items.map(ue=>{const ne=ue.metadata;return typeof ne?.local_path=="string"?ne.local_path:null}).filter(ue=>ue!==null);U(F)}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,Q)=>{if(!r)throw new Error("No library");const F=await Ht.post(`/libraries/${r}/rpc`,{method:N,params:Q});if(F.error){const ue=F.error;throw new Error(ue.message??JSON.stringify(F.error))}return F.result??F},[r]),K=v.useCallback((N,Q,F)=>{j(ue=>({...ue,dirPath:N,dirName:Q,fileCount:F.files,subDirCount:F.dirs,gitRepoCount:F.gitRepos,mdFiles:F.mdFiles}))},[]),ie=v.useCallback((N,Q,F)=>{j(ue=>({...ue,scanEntries:N,scanStats:Q,manifests:F}))},[]),ae=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}),Q=Array.isArray(N)?N[0]:N;Q?.id?i(`/studio/sources/${r}?rootId=${Q.id}`):i(`/studio/sources/${r}`)}catch{m(!1)}}},[r,_,d,i]),oe=v.useMemo(()=>h===1?!!_.dirPath:h===2?_.scanEntries.length>0:!0,[h,_]),W=v.useMemo(()=>c?[{label:c.id===_r?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(zr,{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(zg,{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(a_,{}),f.jsx(zg,{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(W4,{rpc:G,selectedPath:_.dirPath,onSelect:K,allowedPaths:Z,importedPaths:M}),h===2&&f.jsx(e_,{dirPath:_.dirPath,rpc:G,importing:g,onScanComplete:ie,onBusyChange:x})]}):f.jsx(n_,{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:!oe||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:ae,disabled:g||b||!oe,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(Kt,{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 zg({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 a_(){return f.jsx("span",{className:"h-px flex-1 bg-c4a-border-default"})}function n_({libraryName:n}){const{t:i}=Ce();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(ea,{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 l_(){const{t:n}=Ce(),i=Zn(),r=Vt(_=>_.createLibrary),[s,c]=v.useState("waiting"),[d,h]=v.useState(null),[p,g]=v.useState(""),[m,b]=v.useState(!1);v.useEffect(()=>Fa.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 Ht.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(zr,{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} --allow ./`})]}),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(Kt,{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-text-primary",children:n("sources.add_client.detected")}),f.jsxs("div",{className:"space-y-2 text-sm",children:[f.jsx(Xu,{label:n("sources.add_client.machine_name"),value:d.machine_id}),d.os&&f.jsx(Xu,{label:n("sources.add_client.os"),value:d.os}),d.daemon_version&&f.jsx(Xu,{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(Kt,{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(hi,{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(ea,{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 Xu({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 i_(){const{t:n}=Ce(),{sourceUuid:i}=fo(),[r]=vy(),s=r.get("path")||"",{currentRoot:c,loading:d,fetchRootSource:h}=yo(),p=Vt(gi(Rr)),[g,m]=v.useState("original");v.useEffect(()=>{i&&h(i)},[i,h]);const b=v.useMemo(()=>!c||!s?null:go(c.tree,s),[c,s]),x=p.find(K=>K.id===c?.library_id),_=b?.metadata,j=_?Object.fromEntries(Object.entries(_).map(([K,ie])=>[K,String(ie??"")])):null,R=b?.source_type==="code",M=b?.name??c?.name??"",U=b?.source_type??null,Z=v.useMemo(()=>{if(!c||!x)return[];const K=[{label:x.id===_r?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 ie=Oy(c.tree,s);for(let ae=0;ae<ie.length-1;ae++){const oe=ie[ae];K.push({label:oe.name,to:`/studio/sources/${x.id}?rootId=${c.id}&path=${encodeURIComponent(oe.path)}`})}ie.length>0&&K.push({label:ie[ie.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(zr,{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(mi,{size:20,className:"shrink-0 text-c4a-accent"}):f.jsx(bl,{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:M})]}),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(U==="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(Ps,{label:n("sources.detail.repo"),value:j.repo_name}),j.pinned_branch&&f.jsx(Ps,{label:n("sources.detail.branch"),value:j.pinned_branch}),j.pinned_hash&&f.jsx(Ps,{label:n("sources.detail.commit"),value:j.pinned_hash.slice(0,7)}),j.tech_stack&&f.jsx(Ps,{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(r_,{node:b,isCode:R}),g==="digest"&&f.jsx(Tg,{message:n("sources.detail.digest_placeholder")}),g==="modeling"&&f.jsx(Tg,{message:n("sources.detail.modeling_placeholder")})]})]})}function Ps({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 r_({node:n,isCode:i}){const{t:r}=Ce(),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 Tg({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 s_="lib_cloud_default",o_=v2([{element:f.jsx(f4,{}),children:[{path:"/",element:f.jsx(x4,{})},{path:"/login",element:f.jsx(v4,{})},{path:"/docs",element:f.jsx(b4,{})}]},{path:"/studio",element:f.jsx(y4,{}),children:[{index:!0,element:f.jsx(og,{to:"/studio/sources",replace:!0})},{path:"sources",element:f.jsx(og,{to:`/studio/sources/${s_}`,replace:!0})},{path:"sources/add-client",element:f.jsx(l_,{})},{path:"sources/import/:libId",element:f.jsx(F4,{})},{path:"sources/import-dir/:libId",element:f.jsx(t_,{})},{path:"sources/:libId",element:f.jsx(Y4,{})},{path:"source/:sourceUuid",element:f.jsx(i_,{})},{path:"modeling",element:f.jsx(_4,{})},{path:"modeling/code/setup",element:f.jsx(R4,{})},{path:"modeling/code/compile",element:f.jsx(z4,{})},{path:"modeling/code/review",element:f.jsx(T4,{})},{path:"modeling/code/result",element:f.jsx(O4,{})},{path:"brain",element:f.jsx(j4,{})},{path:"discovery",element:f.jsx(N4,{})},{path:"sharing",element:f.jsx(E4,{})},{path:"collaboration",element:f.jsx(w4,{})},{path:"settings",element:f.jsx(C4,{})}]},{path:"*",element:f.jsx(S4,{})}]);function c_(){return v.useEffect(()=>{const i=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws`;return Fa.connect(i),()=>{Fa.disconnect()}},[]),f.jsx(K1,{router:o_})}ib.createRoot(document.getElementById("root")).render(f.jsx(v.StrictMode,{children:f.jsx(c_,{})}));